| Server IP : 193.86.120.172 / Your IP : 216.73.216.67 Web Server : Apache/2.4.63 (Unix) System : Linux JServices 3.10.108 #86003 SMP Wed Oct 22 13:20:46 CST 2025 x86_64 User : kubec ( 1026) PHP Version : 8.2.28 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /volume1/@appstore/SynologyPhotos/ui/ |
Upload File : |
"use strict";(self.webpackChunkFotoExternalSharedAlbumReactLibrary=self.webpackChunkFotoExternalSharedAlbumReactLibrary||[]).push([["818"],{2877:function(e,t,n){n.d(t,{kG:function(){return s},g4:function(){return i},cZ:function(){return r},m3:function(){return c},df:function(){return l}});var a=n(95853);(0,a.q$)({ClearTeamSpaceSetting:"CLEAR_TEAM_SPACE_SETTING",UpdateAllUserGroup:"UPDATE_ALL_USER_GROUP",UpdateTeamSpacePermissionList:"UPDATE_TEAM_SPACE_PERMISSION_LIST",AddTemporaryEntryMember:"ADD_TEMPORARY_ENTRY_MEMBER",ClearTemporaryEntryMembers:"CLEAR_TEMPORARY_ENTRY_MEMBERS"});var o=(0,a.Ky)({LoadAllUserGroup:"LOAD_ALL_USER_GROUP",UpdateTeamSpacePermission:"UPDATE_TEAM_SPACE_PERMISSION",SetTeamSpaceEnabled:"SET_TEAM_SPACE_ENABLED",GetTeamSpacePermissionList:"GET_TEAM_SPACE_PERMISSION_LIST",RevokeTemporaryEntryMembers:"REMOVE_TEMPORARY_ENTRY_MEMBERS"});function i(){return{type:o.LoadAllUserGroup}}function l(e){return{type:o.UpdateTeamSpacePermission,param:e,reload:!1}}function r(e){return{type:o.SetTeamSpaceEnabled,enabled:e}}function c(){return{type:o.GetTeamSpacePermissionList}}function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:o.RevokeTemporaryEntryMembers,excludeMembers:e}}},35104:function(e,t,n){var a=n(45697),o=n.n(a),i=n(67294),l=n(79905);function r(e){var t=e.className,n=e.text;return i.createElement("div",{className:"synofoto-note ".concat(t),role:"note"},i.createElement("span",{className:"synofoto-note__note"},(0,l.n6)("app","note")),n)}r.propTypes={className:o().string,text:o().string.isRequired},r.defaultProps={className:""},t.Z=r},72204:function(e,t,n){n.r(t),n.d(t,{default:function(){return eW}});var a=n(76150),o=n(41196),i=n(7409),l=n(99282),r=n(24460),c=n(28395),s=n(45697),u=n.n(s),d=n(67294),m=n(15593),p=n(29232),f=n(34752),b=n(55210),_=n(12258),g=n(35104),h=n(98848),E=n(39308),v=n(79905);function T(e){var t=e.fieldText,n=e.options,a=e.defaultValue,o=(0,h._)(e,["fieldText","options","defaultValue"]),l=(0,d.useRef)(n.filter(function(e){return e.value===a}));return d.createElement(d.Fragment,null,d.createElement("div",{className:"synofoto-setting-field__label"},"".concat(t).concat((0,v.n6)("common","colon"))),d.createElement(E.Z,(0,i._)({className:"synofoto-setting-field__value",options:n,defaultValue:l.current},o)))}function y(e){var t=e.labelWidth,n=e.inputWidth,a=(0,h._)(e,["labelWidth","inputWidth"]);return d.createElement("fieldset",{className:"synofoto-setting-field__fieldset",style:{gridTemplateColumns:"".concat(t," ").concat(n)}},d.createElement(T,a))}T.propTypes={fieldText:u().string,onChange:u().func.isRequired,options:u().arrayOf(u().shape({value:u().string.isRequired,label:u().string.isRequired}).isRequired).isRequired,defaultValue:u().string},T.defaultProps={fieldText:"",defaultValue:void 0},y.propTypes={labelWidth:u().string,inputWidth:u().string},y.defaultProps={labelWidth:"1fr",inputWidth:"1fr"};var S=function(e){var t=e.headerText,n=e.children,a=e.contentCls;return d.createElement(d.Fragment,null,!!t&&d.createElement("div",{className:"synofoto-setting-block-header"},t),d.createElement("div",{className:"synofoto-setting-block-content ".concat(a)},n))};S.propTypes={children:u().node,headerText:u().string,contentCls:u().string},S.defaultProps={children:null,headerText:"",contentCls:""};var x=n(79113),C=n(96904),I=function(e){var t=e.description,n=e.buttonDisabled,a=e.buttonText,o=e.buttonHandler,i=e.buttonDataTestId,l=e.status;return d.createElement("div",{className:"synofoto-setting-item-with-button"},d.createElement("div",{className:"synofoto-setting-description"},t),d.createElement(x.Z,{color:C.rp.GREY,shape:C.jL.RECTANGLE,text:a,className:"synofoto-setting-gray-button",handler:o,dataTestId:i,disabled:n}),d.createElement("div",{className:"synofoto-setting-item-with-button-status"},l))};I.propTypes={description:u().oneOfType([u().node,u().string]).isRequired,buttonText:u().string.isRequired,buttonHandler:u().func.isRequired,buttonDataTestId:u().string,buttonDisabled:u().bool,status:u().string},I.defaultProps={buttonDataTestId:"",buttonDisabled:!1,status:""};var D=n(47524),A=n(76408),P=function(){var e=D.Z.getStore().getState(),t=A.Z.getIsAmeEligible(e),n=A.Z.getIsGeDSM71Official(e),a=A.Z.getIsGeDSM72Official(e),o=A.Z.getIsAmeV2(e),i=A.Z.getIsAmeV4(e),l=A.Z.getIsAmeInstall(e),r=A.Z.getHasHevc(e),c=A.Z.getHasH264(e),s=A.Z.getHasVc1(e),u=A.Z.getHasAmeLicense(e);return{isAmeEligible:t,needInstallAME4:a&&!i,needInstallAME2:n&&!a&&!o,needInstallAME:!n&&!l,needBuyLicense:n&&!u,needDownloadExec:n&&!a&&!r||a&&(!r||!c||!s),hasH264:c,hasVc1:s,hasHevc:r}},Z=n(5027),k="",N=n(7050),O=n(65316),R=function(e){var t=e.checked,n=e.fieldLabel,a=e.label,o=e.onChange,i=e.hintText,l=e.hintIconTestId,r=(0,O.Z)();return d.createElement(d.Fragment,null,d.createElement("div",{className:"synofoto-setting-field__label"},"".concat(n).concat((0,v.n6)("common","colon")),""!==i&&d.createElement(d.Fragment,null,d.createElement("div",{"data-testid":l,className:"synofoto-setting-checkbox-field-hint synofoto__".concat(r),"data-tooltip-content":i,"data-tooltip-id":"".concat(n,"-hint")}),d.createElement(N.Z,{className:"synofoto-setting-hint-white-tip",tipId:"".concat(n,"-hint"),place:"right",type:C.sZ.WHITE_TIP}))),d.createElement(_.Z,{className:"synofoto-setting-field__checkbox",labelText:a,checked:t,onChange:o}))};R.propTypes={checked:u().bool.isRequired,fieldLabel:u().string.isRequired,label:u().string.isRequired,onChange:u().func.isRequired,hintText:u().string,hintIconTestId:u().string},R.defaultProps={hintText:"",hintIconTestId:""};var w=function(e){var t=e.labelWidth,n=e.inputWidth,a=(0,h._)(e,["labelWidth","inputWidth"]);return d.createElement("fieldset",{className:"synofoto-setting-field__fieldset",style:{gridTemplateColumns:"".concat(t," ").concat(n)}},d.createElement(R,a))};w.propTypes={labelWidth:u().string,inputWidth:u().string},w.defaultProps={labelWidth:"1fr",inputWidth:"1fr"};var L=n(8323),M=n(46677),F=n(37276),H=function(e){var t=e.confirmHandler,n=e.cancelHandler;return{message:d.createElement(F.Z,{text:(0,v.n6)("common","need_install_ame")}),options:{confirmText:(0,v.n6)("action","redirect_to"),confirmHandler:t,cancelHandler:n}}},Y=function(e){return e.map(function(e){return{label:e,value:e}})},G=Y((0,b._)(C.gK.PHOTOS).concat((0,b._)(C.gK.VIDEOS)).map(function(e){return e.toUpperCase()}).sort()),U=function(e){var t,n=e.reducerDispatch,o=e.displayPhotoInfoToGuest,i=e.enablePerson,l=e.enableConcept,s=e.enableSimilar,u=e.enableConvertedOriginalJpeg,f=e.enableUserSharing,b=e.excludeExtension,h=e.supportFace,E=e.supportConcept,T=e.supportSimilar,x=e.supportConvertedOriginalJpeg,D=e.needHevc,N=(0,m.v9)(A.Z.getConvertedFileSize),O=(0,m.v9)(A.Z.getIsCalculatingConvertedFileSize),w=(0,m.v9)(A.Z.getPersonPerformanceNote),F=(0,m.v9)(A.Z.getSimilarPerformanceNote),U=(0,m.v9)(A.Z.getIsClearingConvertedFile),V=(0,m.I0)(),B=(0,r._)((0,d.useState)(!1),2),q=B[0],J=B[1],W=(0,d.useCallback)(function(){V((0,M.hF)())},[V]),K=(0,d.useCallback)(function(){V((0,M.oP)())},[V]);return(0,d.useEffect)(function(){return u&&W(),K},[u,W,K]),d.createElement(d.Fragment,null,h||E||T?d.createElement(S,{headerText:(0,v.n6)("setting","photo_recognition"),contentCls:"synofoto-setting-field__grid"},d.createElement("p",{className:"synofoto-setting-description"},(0,v.n6)("setting","photo_recognition_desc")),h&&d.createElement(_.Z,{className:"synofoto-setting-checkbox__title",labelText:(0,v.n6)("setting","enable_global_people_album"),checked:i,onChange:function(e){return n({enablePerson:e.target.checked})}}),E&&d.createElement(_.Z,{className:"synofoto-setting-checkbox__title",labelText:(0,v.n6)("setting","enable_global_concept_album"),checked:l,onChange:function(e){return n({enableConcept:e.target.checked})}}),T&&d.createElement(_.Z,{className:"synofoto-setting-checkbox__title",labelText:(0,v.n6)("setting","enable_global_similar_photos"),checked:s,onChange:function(e){return n({enableSimilar:e.target.checked})}}),E&&(h||T)||T&&F?d.createElement(g.Z,{text:(0,v.n6)("setting","enable_recognition_note")}):h&&w?d.createElement(g.Z,{text:(0,v.n6)("setting","enable_global_people_album_note")}):null):null,d.createElement(S,{headerText:(0,v.n6)("setting","guest_setting"),contentCls:"synofoto-setting-field__grid two-column-field"},d.createElement(R,{checked:f,fieldLabel:(0,v.n6)("setting","sharing_functions"),label:(0,v.n6)("setting","allow_normal_user_to_share"),hintText:(0,v.n6)("setting","sharing_functions_hint"),hintIconTestId:"sharing-functions-hint",onChange:function(e){n({enableUserSharing:e.target.checked}),e.target.checked||(0,p.Z)((0,v.n6)("setting","disable_user_sharing_alert"),{confirmText:(0,v.n6)("action","continue")}).then(function(e){"close"===e.type&&n({enableUserSharing:!0})})}}),d.createElement(R,{checked:o,fieldLabel:(0,v.n6)("setting","photo_info"),label:(0,v.n6)("setting","display_photo_info_to_guest"),onChange:function(e){return n({displayPhotoInfoToGuest:e.target.checked})}})),x&&d.createElement(S,{headerText:(0,v.n6)("setting","download_setting"),contentCls:"synofoto-setting-field__grid"},d.createElement("p",{className:"synofoto-setting-description"},(0,v.n6)("setting","download_setting_desc")),d.createElement("div",{className:"synofoto-setting-field__label"},d.createElement(_.Z,{labelText:(0,v.n6)("setting","enable_jpeg_convert"),checked:u,onChange:function(e){J(!0);var t=e.target.checked;V((0,M.b9)({hasHevcHandler:function(){return n({enableConvertedOriginalJpeg:t})},noHevcHandler:function(){if(D||V((0,M.K7)({need_hevc:!0})),n({enableConvertedOriginalJpeg:!1}),t){var e=H({confirmHandler:function(){return(0,a._)(function(){return(0,c.Jh)(this,function(e){switch(e.label){case 0:return J(!0),[4,(0,a._)(function(){var e,t,n,o,i,l,r;return(0,c.Jh)(this,function(s){switch(s.label){case 0:var u;if(t=(e=P()).needInstallAME2,n=e.needInstallAME,o=e.needBuyLicense,i=e.needDownloadExec,l="",t||n)l=C.AV.PACKAGE_CENTER;else{if(!o&&!i)return console.error("Failed to open codec pack: unknown status of AME"),[2];l=C.AV.AME}return[4,(u=l,(0,a._)(function(){var e,t,n,a,o,i;return(0,c.Jh)(this,function(l){switch(l.label){case 0:if(""!==k)return[3,4];l.label=1;case 1:return l.trys.push([1,3,,4]),[4,(0,Z.Z)({api:"SYNO.Core.Web.DSM",method:"get",version:1})];case 2:return t=(e=l.sent()).http_port,n=e.https_port,a=e.enable_custom_domain,o=e.fqdn,k=a&&o?"".concat(document.location.protocol,"//").concat(o):"".concat(document.location.protocol,"//").concat(document.location.hostname,":").concat("http:"===window.location.protocol?t:n),[3,4];case 3:return l.sent(),k=document.location.origin,[3,4];case 4:return i=k,u&&(i="".concat(k,"/?launchApp=").concat(u)),[2,i]}})})())];case 1:return r=s.sent(),window.open(r),[2]}})})()];case 1:return e.sent(),J(!1),[2]}})})()},cancelHandler:function(){D||V((0,M.K7)({need_hevc:!1}))}}),o=e.message,i=e.options;(0,p.Z)(o,i)}},onComplete:function(){return J(!1)}}))},wrapperTestId:"enable-jpeg-convert-wrapper",hintIconTestId:"download_setting_hint",hintTextCls:"synofoto-setting-hint-white-tip",hintText:(0,v.n6)("setting","download_support_file_hint")})),q&&d.createElement("p",{className:"synofoto-setting-description synofoto-setting-description--loading"},(0,v.n6)("setting","checking_ame_status")),u&&d.createElement(I,{description:(t=(0,L.Z)((0,v.n6)("setting","cache_size"),(0,v.D9)(N)),O&&(t+=" ".concat((0,v.n6)("setting","calculating_cache_size"))),t),buttonText:(0,v.n6)("action","clear_cache"),buttonHandler:function(){V((0,M.bp)()),V((0,M.hF)())},buttonDisabled:U||0===N,status:U?(0,v.n6)("setting","clearing_cache"):""})),d.createElement(S,{headerText:(0,v.n6)("setting","format_exclusion"),contentCls:"synofoto-setting-field__grid"},d.createElement("p",{className:"synofoto-setting-description"},(0,v.n6)("setting","format_exclusion_desc")),d.createElement(y,{className:"synofoto-format-exclusion",fieldText:(0,v.n6)("setting","format_exclusion_label"),isClearable:!0,isMulti:!0,isSearchable:!0,options:G,placeholder:(0,v.n6)("setting","format_exclusion_placeholder"),showClearIndicator:!0,showDropdownIndicator:!0,value:Y(b),onChange:function(e){n({excludeExtension:(Array.isArray(e)?e:[]).map(function(e){return e.value})})}}),d.createElement(g.Z,{className:"synofoto-setting-description",text:(0,v.n6)("setting","format_exclusion_note")})))};U.propTypes={displayPhotoInfoToGuest:u().bool,enablePerson:u().bool,enableConcept:u().bool,enableSimilar:u().bool,enableUserSharing:u().bool,enableConvertedOriginalJpeg:u().bool,excludeExtension:u().arrayOf(u().string),reducerDispatch:u().func.isRequired,supportFace:u().bool,supportConcept:u().bool,supportSimilar:u().bool,supportConvertedOriginalJpeg:u().bool,needHevc:u().bool.isRequired},U.defaultProps={displayPhotoInfoToGuest:!1,enablePerson:!1,enableConcept:!1,enableSimilar:!0,enableUserSharing:!1,enableConvertedOriginalJpeg:!1,excludeExtension:[],supportFace:!1,supportConcept:!1,supportSimilar:!0,supportConvertedOriginalJpeg:!1};var V=n(7019),B=n(38478),q=n(94599),J=n(88093),W=n(95853),K=(0,W.q$)({ClearIndexTaskCount:"CLEAR_INDEX_TASK_COUNT",SetIndexTaskCount:"SET_INDEX_TASK_COUNT"}),z=(0,W.Ky)({GetIndexTaskCount:"GET_INDEX_TASK_COUNT",ReindexMetadata:"REINDEX_METADATA",ReindexThumbnail:"REINDEX_THUMBNAIL",ReindexThumbnailForAllUser:"REINDEX_THUMBNAIL_FOR_ALL_USER",Reindex:"REINDEX"});function j(){return{type:z.GetIndexTaskCount,IndexAPI:J.Z.FotoTeam.Index}}function X(){return{type:z.GetIndexTaskCount,IndexAPI:J.Z.Foto.Index}}function Q(){return{type:z.ReindexThumbnail,IndexAPI:J.Z.Foto.Index}}function $(){return{type:z.ReindexThumbnail,IndexAPI:J.Z.FotoTeam.Index}}function ee(){return{type:z.Reindex,IndexAPI:J.Z.Foto.Index,getIndexTaskCountAction:X}}function et(){return{type:z.Reindex,IndexAPI:J.Z.FotoTeam.Index,getIndexTaskCountAction:j}}var en=n(69253),ea=function(e){return!0===e.getIn(["indexTask","ready"])},eo=function(e){return e.getIn(["indexTask","count","basic"])>0},ei=function(e){var t=e.library,n=(0,m.I0)(),a=(0,m.v9)(eo),o=(0,m.v9)(ea),l=(0,d.useRef)(null),c=(0,r._)((0,d.useState)(!1),2),s=c[0],u=c[1],p=(0,m.v9)(A.Z.getHasH264),f=t===C.Zu.TEAM?(0,v.n6)("indexing","reindex_shared_space_basic_desc"):(0,v.n6)("indexing","reindex_personal_space_basic_desc"),b=(0,d.useCallback)(function(){l.current&&(clearInterval(l.current),l.current=null)},[]),_=(0,d.useCallback)(function(){(0,en.f)(n,t,X,j)(),l.current=setInterval(function(){return(0,en.f)(n,t,X,j)()},C.ZP.INDEXING_COUNT_POLLING_INTERVAL)},[n,t]);return(0,d.useEffect)(function(){return _(),function(){b(),n({type:K.ClearIndexTaskCount})}},[n,t,_,b]),d.createElement(S,{headerText:(0,v.n6)("indexing","reload_and_reindex")},d.createElement(I,{description:f,buttonText:(0,v.n6)("action","reload"),buttonHandler:function(){n(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,i._)({type:K.SetIndexTaskCount},e)}({count:{basic:1}})),(0,en.f)(n,t,ee,et)(),(0,B.Z)({notificationType:C.ZP.ALBUM_NOTIFICATION_TYPE.PURE_DIV_TEXT,textProps:{text:(0,v.n6)("app","wait_index_hint")}})},buttonDataTestId:"reindex-btn",buttonDisabled:a||!o,status:a?(0,v.n6)("indexing","reloading_in_progress"):""}),p&&d.createElement(I,{description:d.createElement(F.Z,{text:(0,q.Z)((0,v.n6)("indexing","generate_ame_defect_thumbnail_desc"),V.SynoDocsLinks.AutoConvertExtensionAndDesktopApp)}),buttonText:(0,v.n6)("action","generate_ame_defect_thumbnail"),buttonHandler:function(){u(!0),(0,en.f)(n,t,Q,$)(),(0,B.Z)({notificationType:C.ZP.ALBUM_NOTIFICATION_TYPE.PURE_DIV_TEXT,textProps:{text:(0,v.n6)("app","wait_codec_index_hint")}})},buttonDataTestId:"reindex-ame-defect-thumbnail-btn",buttonDisabled:s,status:s?(0,v.n6)("indexing","indexing_in_progress"):""}))};ei.propTypes={library:u().string.isRequired};var el=n(76963),er=n(70826),ec=n(93604),es=n(5943),eu=n(94706),ed=n(67145),em=function(e){e===C.Q2.AUTO?document.documentElement.removeAttribute("data-theme"):document.documentElement.setAttribute("data-theme",e)},ep=n(32835),ef=d.lazy(function(){return n.e("608").then(n.bind(n,69185))}),eb=[{value:C.Q2.LIGHT,label:(0,v.n6)("setting","light")},{value:C.Q2.DARK,label:(0,v.n6)("setting","dark")},{value:C.Q2.AUTO,label:(0,v.n6)("setting","auto")}],e_=[{value:"YYYY-MM-DD",label:"2019-12-31"},{value:"YYYY/MM/DD",label:"2019/12/31"},{value:"YYYY.MM.DD",label:"2019.12.31"},{value:"DD-MM-YYYY",label:"31-12-2019"},{value:"DD/MM/YYYY",label:"31/12/2019"},{value:"DD.MM.YYYY",label:"31.12.2019"},{value:"MM-DD-YYYY",label:"12-31-2019"},{value:"MM/DD/YYYY",label:"12/31/2019"},{value:"MM.DD.YYYY",label:"12.31.2019"}],eg=[{value:"12",label:(0,v.n6)("setting","12_hour")},{value:"24",label:(0,v.n6)("setting","24_hour")}],eh=[{value:C.Ls.DAY,label:(0,v.n6)("setting","timeline_view_scale_day")},{value:C.Ls.MONTH,label:(0,v.n6)("setting","timeline_view_scale_month")}],eE=[{value:C.ER.FILENAME,label:(0,v.n6)("action","sort_by_name")},{value:C.ER.FILESIZE,label:(0,v.n6)("action","sort_by_filesize")},{value:C.ER.ITEM_TYPE,label:(0,v.n6)("action","sort_by_filetype")},{value:C.ER.TAKENTIME,label:(0,v.n6)("action","sort_by_takentime")}],ev=[{value:C.Sr.ASC,label:(0,v.n6)("action","sort_direction_asc")},{value:C.Sr.DESC,label:(0,v.n6)("action","sort_direction_desc")}],eT=[{value:"ignore",label:(0,v.n6)("action","ignore")},{value:"rename",label:(0,v.n6)("action","rename")}],ey=[{value:C.Bp.SKIP,label:(0,v.n6)("action","ignore")},{value:C.Bp.OVERWRITE,label:(0,v.n6)("action","overwrite")}],eS="synofoto-setting-field__grid two-column-field",ex=function(e){var t=e.dispatch,n=e.pcClientEnabled,o=e.extensionEnabled,i=e.allCodecsSupported,l=e.getSettingDiff,r=null;if(o&&n){if(!o||!n||i)return null;if((0,es.eE)())r=d.createElement("div",null,(0,v.n6)("setting","pc_client_partial_codecs_support"));else{var s=(0,q.Z)((0,v.n6)("setting","missing_codec_and_open_pc_client"),V.PcClientSettingsCodecProtocol);r=d.createElement("div",null,d.createElement(F.Z,{text:s}))}}else r=d.createElement("div",null,d.createElement("span",null,(0,v.n6)("setting","require_extension_and_pc_client")),(0,el.Z)(" {0}".concat((0,v.n6)("app","view_detail"),"{1}"),[{type:"function",function:function(){return(0,a._)(function(){var e,n,a,o,i;return(0,c.Jh)(this,function(r){switch(r.label){case 0:if(e=function(e){return 0===Object.keys(e).length},a=(n=l()).userSettingDiff,o=n.teamSettingDiff,i=n.adminSettingDiff,!(!e(a)||!e(o)||!e(i)))return[3,2];return[4,(0,p.Z)((0,v.n6)("app","confirm_not_saved_and_save_first"),{cancelText:(0,v.n6)("action","cancel"),confirmText:(0,v.n6)("setting","save")})];case 1:if(r.sent().type===C.uE.CLOSE)return[2];t((0,M.VR)({userSettingDiff:a,teamSettingDiff:o,adminSettingDiff:i,isReload:!1})),r.label=2;case 2:return(0,eu.zL)(),[2]}})})()}}]));return d.createElement("div",{className:"synofoto-setting-description synofoto-personal-setting-auto-convert-warning"},r)},eC=d.createElement("div",{className:"synofoto-setting-description synofoto-setting-detecting"},d.createElement("div",{className:"synofoto-loading-spin"},d.createElement(d.Suspense,{fallback:d.createElement("div",null)},d.createElement(ef,{path:(0,er.Z)(C.Q2.LIGHT,"ic_spin.json"),loop:!0,play:!0}))),(0,v.n6)("setting","detecting"));function eI(e){var t,n=e.adminEnablePerson,a=e.adminEnablePersonFromStore,o=e.adminEnableConcept,i=e.adminEnableConceptFromStore,l=e.adminEnableSimilar,r=e.adminEnableSimilarFromStore,c=e.autoGenerateThumbnail,s=e.copyMoveDefaultAction,u=e.dateFormat,p=e.enableConcept,f=e.enablePerson,b=e.enableSimilar,h=e.enableHomeService,y=e.itemSortBy,x=e.showItemInfoInLightbox,I=e.sortDirection,D=e.theme,A=e.timeFormat,P=e.timelineGroupUnit,Z=e.uploadDefaultAction,k=e.reducerDispatch,N=e.getSettingDiff,O=(0,m.I0)(),w=(0,m.v9)(ec.Z.getPcClientEnabled),L=(0,m.v9)(ec.Z.getBrowserExtensionEnabled),M=(0,m.v9)(ec.Z.getDependencyStatusLoaded),H=(0,v.n6)("setting","enable_global_people_album_hint"),Y=(0,v.n6)("setting","enable_global_concept_album_hint"),G=(0,v.n6)("setting","enable_global_similar_photos_hint"),U=(0,m.v9)(ec.Z.getAllCodecsSupported);return(0,d.useEffect)(function(){O({type:ep.qA.UpdateDependencyStatus})},[O]),d.createElement(d.Fragment,null,d.createElement(S,{contentCls:eS,headerText:(0,v.n6)("setting","display")},d.createElement(T,{fieldText:(0,v.n6)("setting","theme"),options:eb,defaultValue:D,onChange:function(e){var t=e.value;k({theme:t}),em(t),O((0,ed.ne)({preview_theme:t}))}}),d.createElement(T,{fieldText:(0,v.n6)("setting","date_format"),options:e_,defaultValue:u,onChange:function(e){return k({dateFormat:e.value})}}),d.createElement(T,{fieldText:(0,v.n6)("setting","time_format"),options:eg,defaultValue:A,onChange:function(e){return k({timeFormat:e.value})}}),d.createElement(R,{fieldLabel:(0,v.n6)("lightbox","information"),label:(0,v.n6)("setting","display_info_in_slideshow_and_lightbox"),checked:x,onChange:function(e){return k({showItemInfoInLightbox:e.target.checked})}}),d.createElement(T,{fieldText:(0,v.n6)("setting","timeline_view_scale"),options:eh,defaultValue:P,onChange:function(e){return k({timelineGroupUnit:e.value})}}),d.createElement(T,{fieldText:(0,v.n6)("setting","default_sort_by"),options:eE,defaultValue:y,onChange:function(e){return k({itemSortBy:e.value})}}),d.createElement(E.Z,{className:"synofoto-setting-field__value",options:ev,defaultValue:ev.filter(function(e){return e.value===I})[0],onChange:function(e){return k({sortDirection:e.value})}}),d.createElement(g.Z,{className:"synofoto-setting-field__value",text:(0,v.n6)("setting","default_sorting_notice")})),d.createElement(S,{contentCls:eS,headerText:(0,v.n6)("setting","duplicated_file_handling")},d.createElement(T,{fieldText:(0,v.n6)("setting","during_upload"),options:eT,defaultValue:Z,onChange:function(e){return k({uploadDefaultAction:e.value})}}),d.createElement(T,{fieldText:(0,v.n6)("setting","during_move_copy"),options:ey,defaultValue:s,onChange:function(e){return k({copyMoveDefaultAction:e.value})}})),(t=M?ex({dispatch:O,pcClientEnabled:w,extensionEnabled:L,allCodecsSupported:U,getSettingDiff:N}):eC,d.createElement(S,{headerText:(0,v.n6)("setting","auto_convert_during_browsing"),contentCls:"synofoto-setting-field__grid"},d.createElement("div",null,(0,v.n6)("setting","auto_convert_during_browsing_desc"),d.createElement(F.Z,{text:(0,q.Z)(" {0}".concat((0,v.n6)("common","learn_more"),"{1}"),V.SynoDocsLinks.AutoConvertExtensionAndDesktopApp)})),d.createElement(_.Z,{className:"synofoto-setting-checkbox__title",labelText:(0,v.n6)("setting","enable_auto_convert_during_browsing"),checked:c,onChange:function(e){return k({autoGenerateThumbnail:e.target.checked})},hintIconTestId:"auto-convert-during-browsing-hint",hintTextCls:"synofoto-setting-hint-white-tip",hintText:(0,v.n6)("setting","enable_auto_convert_during_browsing_hint")}),t)),(a||i||r)&&h&&d.createElement(S,{headerText:(0,v.n6)("setting","photo_recognition"),contentCls:"synofoto-setting-field__grid"},(0,v.n6)("setting","photo_recognition_desc_personal"),a&&d.createElement("div",{"data-tooltip-id":C.ZP.GLOBAL_TOOLTIP_ID,"data-tooltip-html":n?null:H},d.createElement(_.Z,{className:"synofoto-setting-field__checkbox",labelText:(0,v.n6)("setting","enable_my_people_album"),checked:f,onChange:function(e){return k({enablePerson:e.target.checked})},disabled:!n})),i&&d.createElement("div",{"data-tooltip-id":C.ZP.GLOBAL_TOOLTIP_ID,"data-tooltip-html":o?null:Y},d.createElement(_.Z,{className:"synofoto-setting-field__checkbox",labelText:(0,v.n6)("setting","enable_my_concept_album"),checked:p,onChange:function(e){return k({enableConcept:e.target.checked})},disabled:!o})),r&&d.createElement("div",{"data-tooltip-id":C.ZP.GLOBAL_TOOLTIP_ID,"data-tooltip-html":l?null:G},d.createElement(_.Z,{className:"synofoto-setting-field__checkbox",labelText:(0,v.n6)("setting","enable_my_similar_photos"),checked:b,onChange:function(e){return k({enableSimilar:e.target.checked})},disabled:!l}))),h&&d.createElement(ei,{library:C.Zu.PERSONAL}))}eI.propTypes={adminEnablePerson:u().bool,adminEnablePersonFromStore:u().bool,adminEnableConcept:u().bool,adminEnableConceptFromStore:u().bool,adminEnableSimilar:u().bool,adminEnableSimilarFromStore:u().bool,autoGenerateThumbnail:u().bool,copyMoveDefaultAction:u().string,dateFormat:u().string,reducerDispatch:u().func.isRequired,enablePerson:u().bool,enableConcept:u().bool,enableSimilar:u().bool,enableHomeService:u().bool,itemSortBy:u().string,showItemInfoInLightbox:u().bool,sortDirection:u().string,theme:u().string,timeFormat:u().string,timelineGroupUnit:u().string,uploadDefaultAction:u().string,getSettingDiff:u().func.isRequired},eI.defaultProps={adminEnablePerson:!1,adminEnablePersonFromStore:!1,adminEnableConcept:!1,adminEnableConceptFromStore:!1,adminEnableSimilar:!1,adminEnableSimilarFromStore:!1,autoGenerateThumbnail:!1,copyMoveDefaultAction:"skip",dateFormat:"YYYY-MM-DD",enablePerson:!1,enableConcept:!1,enableSimilar:!1,enableHomeService:!1,itemSortBy:"takentime",showItemInfoInLightbox:!1,sortDirection:"desc",theme:C.Q2.AUTO,timeFormat:"12",timelineGroupUnit:"day",uploadDefaultAction:"ignore"};var eD=n(83960),eA=n(73935),eP=n(48134),eZ=n(94057),ek=d.lazy(function(){return n.e("677").then(n.bind(n,26474))}),eN=function(){var e=document.body.appendChild(document.createElement("div")),t=D.Z.getStore();return new Promise(function(n){var a={isOpen:!0,handleCancel:function(){n({type:"cancel"})},handleApply:function(){n({type:"apply"})},confirmText:(0,v.n6)("setting","save"),openCancelDirtyCheckDialog:eP.Z};eA.render(d.createElement(m.zt,{store:t},d.createElement(d.Suspense,{fallback:d.createElement("div",null)},d.createElement(ek,a))),e)}).then(function(e){return e}).catch(function(e){throw e}).finally(function(){(0,eZ.P)(e)})},eO=n(2877),eR=function(e){var t=e.adminEnableConcept,n=e.adminEnableConceptFromStore,o=e.adminEnablePerson,i=e.adminEnablePersonFromStore,l=e.adminEnableSimilar,r=e.adminEnableSimilarFromStore,s=e.allowRootFolderPublic,u=e.enabled,f=e.enableConcept,b=e.enableHomeService,g=e.enablePerson,h=e.enableSimilar,E=e.reducerDispatch,T=(0,v.n6)("setting","enable_global_people_album_hint"),y=(0,v.n6)("setting","enable_global_concept_album_hint"),x=(0,v.n6)("setting","enable_global_similar_photos_hint"),D=(0,m.I0)();return u?d.createElement(d.Fragment,null,d.createElement(S,null,d.createElement(I,{description:(0,v.n6)("setting","shared_space_desc"),buttonText:(0,v.n6)("setting","disable_team_library"),buttonHandler:function(){if(!b){(0,eD.Z)((0,v.n6)("setting","at_least_one_space"));return}var e=d.createElement(d.Fragment,null,d.createElement("div",{className:"synofoto-shared-space-setting-confirm-title"},(0,v.n6)("setting","disable_shared_space_title")),d.createElement(F.Z,{className:"synofoto-shared-space-setting-confirm-content",text:(0,v.n6)("setting","disable_shared_space_content")}),d.createElement("div",null,d.createElement("br",null)),d.createElement("div",null,(0,v.n6)("app","confirm_continue")));(0,p.Z)(e,{confirmText:(0,v.n6)("common","yes"),cancelText:(0,v.n6)("common","no")}).then(function(e){"action"===e.type&&D((0,eO.cZ)(!1))})},buttonDataTestId:"disable-shared-space-btn"})),d.createElement(S,{headerText:(0,v.n6)("setting","permission_settings")},d.createElement(I,{description:(0,v.n6)("setting","permission_settings_desc"),buttonText:(0,v.n6)("setting","set_access_permission"),buttonHandler:eN,buttonDataTestId:"access-permission-btn"}),d.createElement(_.Z,{className:"synofoto-setting-checkbox__title",labelText:(0,v.n6)("setting","allow_root_folder_public"),dataTestId:"allow-root-folder-public-checkbox",checked:s,onChange:function(e){return(0,a._)(function(){var t;return(0,c.Jh)(this,function(n){switch(n.label){case 0:if(t=e.target.checked)return[3,2];return[4,(0,p.Z)((0,v.n6)("shared","disallow_root_folder_public_alert"),{confirmText:(0,v.n6)("action","confirm")})];case 1:if(n.sent().type!==C.uE.ACTION)return[2];n.label=2;case 2:return E({allowRootFolderPublic:t}),[2]}})})()}})),(i||n||r)&&d.createElement(S,{headerText:(0,v.n6)("setting","photo_recognition"),contentCls:"synofoto-setting-field__grid"},(0,v.n6)("setting","photo_recognition_desc_team"),i&&d.createElement("div",{"data-tooltip-id":C.ZP.GLOBAL_TOOLTIP_ID,"data-tooltip-html":o?null:T},d.createElement(_.Z,{className:"synofoto-setting-field__checkbox",labelText:(0,v.n6)("setting","enable_shared_people_album"),dataTestId:"enable-shared-people-album-checkbox",wrapperTestId:"enable-shared-people-album-checkbox-wrapper",checked:g,disabled:!o,onChange:function(e){return E({enablePerson:e.target.checked})}})),n&&d.createElement("div",{"data-tooltip-id":C.ZP.GLOBAL_TOOLTIP_ID,"data-tooltip-html":t?null:y},d.createElement(_.Z,{className:"synofoto-setting-field__checkbox",labelText:(0,v.n6)("setting","enable_shared_concept_album"),dataTestId:"enable-shared-concept-album-checkbox",wrapperTestId:"enable-shared-concept-album-checkbox-wrapper",checked:f,disabled:!t,onChange:function(e){return E({enableConcept:e.target.checked})}})),r&&d.createElement("div",{"data-tooltip-id":C.ZP.GLOBAL_TOOLTIP_ID,"data-tooltip-html":l?null:x},d.createElement(_.Z,{className:"synofoto-setting-field__checkbox",labelText:(0,v.n6)("setting","enable_shared_similar_photos"),dataTestId:"enable-shared-similar-photos-checkbox",wrapperTestId:"enable-shared-similar-photos-checkbox-wrapper",checked:h,disabled:!l,onChange:function(e){return E({enableSimilar:e.target.checked})}}))),d.createElement(ei,{library:C.Zu.TEAM})):d.createElement(I,{description:(0,v.n6)("setting","enable_shared_space_desc"),buttonText:(0,v.n6)("setting","enable_team_library"),buttonHandler:function(){return D((0,eO.cZ)(!0))},buttonDataTestId:"enable-shared-space-btn"})};eR.propTypes={allowRootFolderPublic:u().bool,enablePerson:u().bool,enabled:u().bool,reducerDispatch:u().func.isRequired,adminEnablePerson:u().bool,adminEnablePersonFromStore:u().bool,enableHomeService:u().bool,adminEnableConcept:u().bool,adminEnableConceptFromStore:u().bool,enableConcept:u().bool,adminEnableSimilar:u().bool,adminEnableSimilarFromStore:u().bool,enableSimilar:u().bool},eR.defaultProps={adminEnablePerson:!1,adminEnablePersonFromStore:!1,allowRootFolderPublic:!1,enabled:!1,enablePerson:!1,enableHomeService:!1,adminEnableConcept:!1,adminEnableConceptFromStore:!1,enableConcept:!1,adminEnableSimilar:!1,adminEnableSimilarFromStore:!1,enableSimilar:!1};var ew=n(23017),eL=n(26822),eM=n(75296),eF=n(14324),eH=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduce(function(e,t){return t(e)},e)}},eY=n(33873),eG=function(e){var t=e.toJS(),n={};return Object.keys(t).forEach(function(e){n[(0,eL.Z)(e)]=t[e]}),n},eU=function(e){return(0,eF.Z)(e,["autoGenerateThumbnail","copyMoveDefaultAction","dateFormat","enableConcept","enablePerson","enableSimilar","enableHomeService","itemSortBy","showItemInfoInLightbox","sortDirection","theme","timeFormat","timelineGroupUnit","uploadDefaultAction"])},eV=function(e,t){return(0,i._)({},e,t)},eB=function(e,t,n){var a=function(e){return function(t){return Object.prototype.hasOwnProperty.call(e,t)}};return["date_format","enable_concept","enable_person","enable_similar","item_sort_by","sort_direction","timeline_group_unit"].some(a(e))||["enable_concept","enable_person","enable_similar"].some(a(t))||["enable_concept","enable_person","enable_similar"].some(a(n))},eq=function(e,t){var n=t.toJS();return Object.fromEntries(Object.entries(e).filter(function(e){var t=(0,r._)(e,2),a=t[0],i=t[1],l=n[(0,eM.Z)(a)];return(0,o._)(i,Array)?l.length!==i.length||JSON.stringify(l.sort())!==JSON.stringify(i.sort()):void 0!==l&&l!==i}).map(function(e){var t=(0,r._)(e,2),n=t[0],a=t[1];return[(0,eM.Z)(n),a]}))};function eJ(e){var t=e.handleApply,n=e.handleCancel,o=e.isOpen,s=(0,m.I0)(),u=(0,m.v9)(A.Z.getUserSetting),b=(0,r._)((0,d.useReducer)(eV,u,eH(eG,eU)),2),_=b[0],g=b[1],h=(0,m.v9)(A.Z.getTeamSetting),E=(0,r._)((0,d.useReducer)(eV,h,eG),2),T=E[0],y=E[1],S=(0,m.v9)(A.Z.getAdminSetting),x=(0,r._)((0,d.useReducer)(eV,S,eG),2),I=x[0],D=x[1],P=(0,m.v9)(A.Z.getIsAmeEligible),Z=(0,d.useRef)(T.enabled);(0,d.useEffect)(function(){y(eG(h))},[h]),(0,d.useEffect)(function(){I.enablePerson||(g({enablePerson:!1}),y({enablePerson:!1})),I.enableConcept||(g({enableConcept:!1}),y({enableConcept:!1})),I.enableSimilar||(g({enableSimilar:!1}),y({enableSimilar:!1}))},[I.enablePerson,I.enableConcept,I.enableSimilar]),(0,d.useEffect)(function(){return s((0,M.OH)()),function(){s((0,ed.ne)({preview_theme:""}))}},[s]);var k=function(){return{userSettingDiff:eq(_,u),teamSettingDiff:eq(T,h),adminSettingDiff:eq(I,S)}},N=function(e){var n=e.userSettingDiff,a=e.teamSettingDiff,o=e.adminSettingDiff;s((0,M.VR)({userSettingDiff:n,teamSettingDiff:a,adminSettingDiff:o,isReload:eB(n,a,o)||Z.current!==T.enabled})),t()},O=[{text:(0,v.n6)("setting","personalized"),content:d.createElement(eI,(0,l._)((0,i._)({},_),{adminEnableConcept:I.enableConcept,adminEnableConceptFromStore:S.get("enable_concept"),adminEnablePerson:I.enablePerson,adminEnablePersonFromStore:S.get("enable_person"),adminEnableSimilar:I.enableSimilar,adminEnableSimilarFromStore:S.get("enable_similar"),reducerDispatch:g,getSettingDiff:k}))}];return _S("is_admin")&&(O.push({text:(0,v.n6)("app","shared_space"),content:d.createElement(eR,(0,l._)((0,i._)({},T),{adminEnableConcept:I.enableConcept,adminEnableConceptFromStore:S.get("enable_concept"),adminEnablePerson:I.enablePerson,adminEnablePersonFromStore:S.get("enable_person"),adminEnableSimilar:I.enableSimilar,adminEnableSimilarFromStore:S.get("enable_similar"),enableHomeService:_.enableHomeService,reducerDispatch:y}))}),O.push({text:(0,v.n6)("setting","global"),content:d.createElement(U,(0,l._)((0,i._)({},I),{supportConcept:void 0!==S.get("enable_concept"),supportFace:void 0!==S.get("enable_person"),supportSimilar:void 0!==S.get("enable_similar"),supportConvertedOriginalJpeg:void 0!==S.get("enable_converted_original_jpeg")&&u.getIn(["ame_status","has_hevc"]),reducerDispatch:D}))})),d.createElement(f.Z,{isOpen:o,title:(0,v.n6)("action","setting"),className:"synofoto-setting-dialog",content:d.createElement("div",{className:"synofoto-setting-dialog-content"},d.createElement(ew.Z,{tabItems:O,className:"synofoto-setting-dialog-tab-panel"})),handleCancel:function(){return(0,a._)(function(){var e,t,a,o,i,l;return(0,c.Jh)(this,function(r){switch(r.label){case 0:if(e=function(e){return 0===Object.keys(e).length},a=(t=k()).userSettingDiff,o=t.teamSettingDiff,i=t.adminSettingDiff,l=C.uE.LEAVE,!(!e(a)||!e(o)||!e(i)))return[3,2];return[4,(0,eP.Z)()];case 1:l=r.sent().type,r.label=2;case 2:return l===C.uE.SAVE_AND_CLOSE?N({userSettingDiff:a,teamSettingDiff:o,adminSettingDiff:i}):l===C.uE.LEAVE&&(Z.current!==T.enabled&&(0,m.dC)(function(){s((0,M.AU)()),s((0,eY.n9)())}),u.get("theme")!==_.theme&&em(u.get("theme")),P||void 0===i.need_hevc||s((0,M.K7)({need_hevc:i.need_hevc})),n()),[2]}})})()},handleConfirm:function(){return(0,a._)(function(){var e,t;return(0,c.Jh)(this,function(n){switch(n.label){case 0:if(e="action",!(_.sortDirection!==u.get("sort_direction")||_.itemSortBy!==u.get("item_sort_by")))return[3,2];return[4,(0,p.Z)((0,v.n6)("setting","str_confirm_default_sorting_desc"),{confirmText:(0,v.n6)("action","proceed"),cancelText:(0,v.n6)("action","cancel")})];case 1:e=n.sent().type,n.label=2;case 2:return"action"===e&&(void 0!==(t=k()).adminSettingDiff.need_hevc&&delete t.adminSettingDiff.need_hevc,N(t)),[2]}})})()},confirmText:(0,v.n6)("action","save_and_close"),showCancel:!0,contentPadding:C.k3.TOP_AND_BOTTOM})}eJ.propTypes={handleCancel:u().func,handleApply:u().func,isOpen:u().bool},eJ.defaultProps={handleCancel:function(){},handleApply:function(){},isOpen:!1};var eW=eJ},29232:function(e,t,n){n.d(t,{Z:function(){return m}});var a=n(7409),o=n(99282),i=n(67294),l=n(73935),r=n(15593),c=n(42376),s=n(47524),u=n(96904),d=n(94057);function m(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=document.body.appendChild(document.createElement("div"));return new Promise(function(d){var m=s.Z.getStore(),p=(0,o._)((0,a._)({role:"alertdialog",message:e,showConfirm:!0,showCancel:!0,showClose:!1,isOpen:!0},t),{confirmHandler:function(){var e;null===(e=t.confirmHandler)||void 0===e||e.call(t),d({type:u.uE.ACTION})},cancelHandler:function(){var e;null===(e=t.cancelHandler)||void 0===e||e.call(t),d({type:u.uE.CLOSE})}});l.render(i.createElement(r.zt,{store:m},i.createElement(c.Z,p)),n)}).finally(function(){(0,d.P)(n)})}},48134:function(e,t,n){n.d(t,{Z:function(){return d}});var a=n(67294),o=n(73935),i=n(15593),l=n(42376),r=n(47524),c=n(96904),s=n(79905),u=n(94057);function d(){var e=r.Z.getStore(),t=document.body.appendChild(document.createElement("div"));return new Promise(function(n){var r={showClose:!0,showCancel:!0,showConfirm:!0,isOpen:!0,role:"alertdialog",message:(0,s.n6)("app","confirm_not_saved_leave"),closeText:(0,s.n6)("action","leave"),cancelText:(0,s.n6)("action","cancel"),confirmText:(0,s.n6)("action","save_and_close"),closeHandler:function(){n({type:c.uE.LEAVE})},cancelHandler:function(){n({type:c.uE.CANCEL})},confirmHandler:function(){n({type:c.uE.SAVE_AND_CLOSE})}};o.render(a.createElement(i.zt,{store:e},a.createElement(l.Z,r)),t)}).finally(function(){(0,u.P)(t)})}},76963:function(e,t,n){var a=n(55210),o=n(67294),i=n(37276),l=n(94599),r=function(e,t){return t?"synofoto-wrap-with-actions-".concat(e):"synofoto-not-wrap-actions-".concat(e)},c=function(e,t){return/<b>.*?<\/b>/.test(e)?o.createElement(i.Z,{key:r(t,!1),text:e}):e};t.Z=function(e,t){var n=(0,a._)(e.matchAll(/{(\d+)}([^{}]+){\d+}/g)),s=e.split(/{\d+}[^{}]+{\d+}/),u=[];return 0===n.length?u.push(c(e,0)):(n.forEach(function(e,n){var a=e[2],d=t[parseInt(e[1],10)/2];if(u.push(c(s[n],n)),"function"===d.type){var m=d.function?d.function:function(){};u.push(o.createElement("button",{key:r(n,!0),className:"synofoto-wrap-action-button",type:"button",onClick:m},c(a,n)));return}if("url"===d.type){var p=d.url?d.url:"",f=(0,l.l)("{0}".concat(a,"{1}"),[{url:p,target:"_self"}]);u.push(o.createElement(i.Z,{key:r(n,!0),text:f}));return}u.push(c(a,n))}),u.push(c(s[s.length-1],s.length-1))),u}}}]);