/*************************************************************************
* ADOBE CONFIDENTIAL
* ___________________
*
*  Copyright 2014 Adobe Systems Incorporated
*  All Rights Reserved.
*
* NOTICE:  All information contained herein is, and remains
* the property of Adobe Systems Incorporated and its suppliers,
* if any.  The intellectual and technical concepts contained
* herein are proprietary to Adobe Systems Incorporated and its
* suppliers and are protected by all applicable intellectual property laws,
* including trade secret and or copyright laws.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Adobe Systems Incorporated.
**************************************************************************/

/*************************************************************************
* ADOBE CONFIDENTIAL
* ___________________
*
*  Copyright 2013 Adobe Systems Incorporated
*  All Rights Reserved.
*
* NOTICE:  All information contained herein is, and remains
* the property of Adobe Systems Incorporated and its suppliers,
* if any.  The intellectual and technical concepts contained
* herein are proprietary to Adobe Systems Incorporated and its
* suppliers and are protected by all applicable intellectual property laws,
* including trade secret and or copyright laws.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Adobe Systems Incorporated.
**************************************************************************/

/*************************************************************************
* ADOBE CONFIDENTIAL
* ___________________
*
*  Copyright 2015 Adobe Systems Incorporated
*  All Rights Reserved.
*
* NOTICE:  All information contained herein is, and remains
* the property of Adobe Systems Incorporated and its suppliers,
* if any.  The intellectual and technical concepts contained
* herein are proprietary to Adobe Systems Incorporated and its
* suppliers and are protected by all applicable intellectual property laws,
* including trade secret and or copyright laws.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Adobe Systems Incorporated.
**************************************************************************/

/*************************************************************************
*
* ADOBE CONFIDENTIAL
* ___________________
*
*  Copyright 2015 Adobe Systems Incorporated
*  All Rights Reserved.
*
* NOTICE:  All information contained herein is, and remains
* the property of Adobe Systems Incorporated and its suppliers,
* if any.  The intellectual and technical concepts contained
* herein are proprietary to Adobe Systems Incorporated and its
* suppliers and may be covered by U.S. and Foreign Patents,
* patents in process, and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Adobe Systems Incorporated.
**************************************************************************/

define("acplugins/my-recent-files/js/ac-my-recent-files",["plugins-common/ac-plugins"],function(e){var i=e.MyRecentFiles;return i||(i=e.MyRecentFiles={}),i}),define("acplugins/my-recent-files-select/js/ac-my-recent-files-select",["plugins-common/ac-plugins"],function(e){var i=e.MyRecentFilesSelect;return i||(i=e.MyRecentFilesSelect={}),i}),define("acplugins/my-files/js/ac-my-files",["plugins-common/ac-plugins"],function(e){var i=e.MyFiles;return i||(i=e.MyFiles={}),i}),define("acplugins/my-files/js/ops/plugin/initializing-plugin-op",["core/ac-core","files/ac-files","plugins-common/ac-plugins","acplugins/my-files/js/ac-my-files","core/ops/op"],function(e,i,t,n){return n.InitializingPluginOp=e.Op.extend({run:function(){var n,o,s,l,r=this.options,c=r.appApi,a=c.pluginsApi;n=e.modelFactory,o=e.uiModelFactory,s=i.uiModelFactory,_.extend(r,{fileUploadModel:n.create("FileUploadModel"),notificationModel:n.create("NotificationModel"),sessionModel:n.create("SessionModel"),collectionsUiModel:o.create("CollectionsUiModel"),dialogsUiModel:o.create("DialogsUiModel"),errorUiModel:o.create("ErrorUiModel"),fileUploadUiModel:o.create("FileUploadUiModel"),folderUiModel:o.create("FolderUiModel"),hoverPreviewUiModel:o.create("HoverPreviewUiModel"),rhpPreviewUiModel:o.create("RhpPreviewUiModel"),selectionActionsPluginsUiModel:o.create("PluginsUiModel"),keyUiModel:o.create("KeyUiModel"),menusUiModel:o.create("MenusUiModel"),sortUiModel:o.create("SortUiModel"),filesUiModel:s.create("FilesUiModel"),sharingUiModel:s.create("SharingUiModel")}),r.noFullPreviewImpl||_.extend(r,{fullPreviewUiModel:o.create("FullPreviewUiModel"),fullPreviewOverlaysUiModel:o.create("PluginsUiModel"),fullPreviewPluginsUiModel:o.create("PluginsUiModel"),fullPreviewRhpPluginsUiModel:o.create("PluginsUiModel")}),a.isInSearchResultsView()?(_.extend(r,{noSearchControl:!0,noSort:!0,noNewFolder:!0,noFilter:!0,isInSearchResultsView:!0}),r.filesUiModel.set("view",i.FilesUiModel.VIEW_SEARCH_RESULTS)):_.extend(r,{searchModel:n.create("SearchModel",{},this.options),searchUiModel:o.create("SearchUiModel"),selectionUiModel:o.create("SelectionUiModel")}),r.noSelectionActions||(l=a.getPluginTypeConfig("file_selection_actions"),_.extend(r,{actualPluginIds:[]}),_.each(l.plugin_ids,function(e){var i=a.getPluginGroupId(e);e=e+"-"+r.pluginId,r.actualPluginIds.push(e),a.registerPluginsUiModel(e,r.selectionActionsPluginsUiModel),a.addPluginsConfig(e,t.types.file_selection_actions),a.setPluginGroupId(e,i)}),a.registerPluginsUiModel(a.getPluginTypeConfig("file_selection_actions"),r.selectionActionsPluginsUiModel));var p=new $.Deferred,d=r.appApi.connectorsApi,u=d.isConnectorRemovable(d.getConnectorPluginName(r.pluginId));return u?(_.extend(r,{folderModel:n.create("FolderModel")}),p.resolve()):r.appApi.discoveryUrisApi.checkDCAPIEnabled().done(_.bind(function(){r.appApi.discoveryUrisApi.useDCApi()?_.extend(r,{folderModel:n.create("FolderModelDCAPI")}):_.extend(r,{folderModel:n.create("FolderModel")}),p.resolve()})),p.promise()}}),n.InitializingPluginOp}),define("acplugins/my-files/js/ops/plugin/running-plugin-op",["core/ac-core","files/ac-files","acplugins/my-files/js/ac-my-files","core/ops/op"],function(e,i,t){t.RunningPluginOp=e.Op.extend({run:function(){var e,t,n,o,s,l,r,c=this.options;return e=i.opFactory,t=e.create("ListeningForSelectionChangeOp",c),n=e.create("ListeningForViewEventsOp",c),s=e.create("ListeningForSearchInvalidationOp",c),o=e.create("ListeningForSearchQueriesChangeOp",c),l=c.noNotifications?this._getResolvedPromise():e.create("ListeningForCurrentFolderNotificationsOp",c).run(),r=c.noNotifications?this._getResolvedPromise():e.create("ListeningForDupErrorsOp",c).run(),$.when(t.run(),n.run(),s.run(),o.run(),l,r)}})}),define("acplugins/my-files/js/ops/plugin/starting-plugin-op",["core/ac-core","files/ac-files","acplugins/my-files/js/ac-my-files","core/utils/util","core/ops/op"],function(e,i,t,n){t.StartingPluginOp=e.Op.extend({run:function(){var o,s,l=this.options,r=l.appApi,c=i.opFactory,a=$.Deferred();return n.isCEF()||c.create("RestoringFilesPrefsOp",l).run(),c.create("InitializingAcrobatOp",l).run(),t.opFactory.create("RunningPluginOp",l).run(),l.noSelectionActions||e.opFactory.create("LoadingSelectionActionsOp",l).run(),o=l.pluginId,s=r.pluginsApi.getDefaultPluginId("file_selection_dlg"),!r.saveAsApi.isRunningInFileSaveAs()||s!==o||"root-select"!==o&&"ccloud-select"!==o?this._getResolvedPromise():(l.readerContextModel.done(_.bind(function(e){var i=e.get("rna"),t=i.get("viewData").get("fileSelectData");t.invoke("getFileAncestors",[]).done(_.bind(function(e){_.isUndefined(e)||0===e.length||(r.folderApi.setCurrentFolderId(o,e),r.saveAsApi.setCurrentFolderId(e)),a.resolve()},this))},this)),a.promise())}})}),define("acplugins/my-files/js/ops/op-factory",["core/ac-core","acplugins/my-files/js/ac-my-files","acplugins/my-files/js/ops/plugin/initializing-plugin-op","acplugins/my-files/js/ops/plugin/running-plugin-op","acplugins/my-files/js/ops/plugin/starting-plugin-op"],function(e,i){i.OpFactory=e.Op.extend({create:function(e,t){var n=i[e];return n?new n(t):void LOG(0,"AcMyFiles.OpFactory.create: Unrecognized class: "+e)}})}),define("acplugins/ac-bh",[],function(){var e=Ac.Bh;return e||(e=Ac.Bh={}),e}),define("acplugins/build-num",{pluginBuildNumber:"000001"}),define("acplugins/my-files/js/nls/ui-strings",{root:!0,"xx-xx":!0,"de-de":!0,"en-gb":!0,"es-es":!0,"fr-fr":!0,"it-it":!0,"ja-jp":!0,"da-dk":!0,"fi-fi":!0,"nb-no":!0,"nl-nl":!0,"pt-br":!0,"sv-se":!0,"zh-cn":!0,"zh-tw":!0,"ko-kr":!0,"cs-cz":!0,"hu-hu":!0,"pl-pl":!0,"ru-ru":!0,"uk-ua":!0,"tr-tr":!0,"sk-sk":!0,"sl-si":!0,"bg-bg":!0}),define("acplugins/my-files/js/nls/root/ui-strings",{FOOTER_ANCHOR:"Go to Adobe Document Cloud Website",NOTIFICATION_HEADING:"<%= cloudName %> Files",CLOUD_NAME:"Adobe cloud storage",UNSUPPORTED_CONNECTOR_MSG:"<%= actionName %> is currently not supported for files stored in <%= connectorLabel %>."}),define("acplugins/bh-plugin-view",["core/ac-core","acplugins/ac-bh","core/views/plugin-content-view"],function(e,i){return i.PluginView=e.PluginContentView.extend({getAppApiVersion:function(){return Ac.Plugins.groups.blue_heron.FRAMEWORK_VERSION}}),i.PluginView}),define("acplugins/my-files/js/views/plugin-view",["core/ac-core","files/ac-files","plugins-common/ac-plugins","acplugins/ac-bh","acplugins/my-files/js/ac-my-files","core/utils/sc-analytics","acplugins/build-num","core/utils/router-util","core/utils/action-ids","i18n!files/nls/ui-strings","i18n!core/nls/ui-strings","core/utils/file-types","core/utils/util","core/utils/string-util","i18n!acplugins/my-files/js/nls/ui-strings","acplugins/bh-plugin-view","files/views/files-container-view"],function(e,i,t,n,o,s,l,r,c,a,p,d,u,g,h){return o.PluginView=n.PluginView.extend({initialize:function(){n.PluginView.prototype.initialize.call(this),u.isCEF()&&_.extend(this.options,{noUpload:!0,noHoverPreview:!0,noNewFolder:!1,folderDeletionDisabled:!1,noDownload:!0,noShare:!1,noShareButton:!1,footerAnchorText:void 0})},render:function(){var e=this.options;e.appApi.displayApi.applyUIThemeStyles(this.$el).then(_.bind(function(){n.PluginView.prototype.render.call(this),this._renderChildViews(),this._isListeningForFileUploadEvents||(i.opFactory.create("ListeningForFileUploadEventsOp",e).run(),this._isListeningForFileUploadEvents=!0)},this)),!e.appApi.selectionApi.isRunningInFileSelection()||"root-select"!==e.pluginId&&"ccloud-select"!==e.pluginId||e.appApi.rnaApi.done(function(e){e.logAnayticsCustomOpenSave("Time_To_Show_Dialog_View_Connector_File_List")}),e.forRecentFileListing&&this.options.appApi.rnaApi.done(_.bind(function(e){e.fileApi({methodName:"getSelectedRecentFileData"}).done(_.bind(function(){},this))},this))},events:function(){return u.isCEF()?_.extend({},e.View.prototype.events,{changeNetworkStateFromFeat:"_onNetworkStateChangeFromFeat"}):void 0},initPlugin:function(){return this._initPlugin()},selectPlugin:function(t){var n,o,s,l,r,p=this.options,d=p.fullPreviewUiModel,g=p.appApi.routerApi,f=p.appApi.connectorsApi,m=p.appApi.pluginsApi,v=p.appApi.folderApi,A=p.appApi.sessionApi,y=p.appApi.networkConnectivityApi,C=p.appApi.displayApi,F=this.options.rnaRecentFilesSelect,S=u.isCEF();this.options.appApi.done(_.bind(function(){},this));var I=this.options.appApi.routerApi.parseQueryParams(window.location.href.slice(window.location.href.indexOf("?")));if(S&&(t&&(this._pluginOptions=t),p.isInSearchResultsView&&(p.searchModel=this._pluginOptions.searchModel,p.searchUiModel=this._pluginOptions.searchUiModel,p.selectionUiModel=this._pluginOptions.selectionUiModel,p.ussSearchModel=this._pluginOptions.ussSearchModel,p.selectionUiModel.set("multiple_selection",!t.singleFileSelection),p.collectionsUiModel.set("checkbox",!t.singleFileSelection),"root"===p.pluginId?(p.sortUiModel.set("order_by","modified"),p.sortUiModel.set("mru_date_order","modified")):p.sortUiModel.set("order_by","none")),p.forRecentFileListing="true"==I.forRecentFileListing?!0:!1,y.removeNetworkOnlineChangeCallback(this._onOnlineChanged),y.addNetworkOnlineChangeCallback(this._onOnlineChanged),p.appApi.rnaApi.done(_.bind(function(e){e.isFeatRunning()&&e.isASTestAllowInstantiation()&&y.addNetworkConnectivtyChangeCallback(this._onOnlineChanged)},this)),!y.isOnline()&&!F||!A.isSignedInReader()&&!F))return A.removeSignedInChangeCallback(this._onSignedInChange),A.addSignedInChangeCallback(this._onSignedInChange),this._isSelected=!0,p.isInSearchResultsView&&e.opFactory.create("LoadingSelectionActionsOp",p).run(),this.render(),this.options.appApi.displayApi.showSpinner(!1),this._getResolvedPromise();if(t=t||this.getPluginOptions(),t&&(this._setParentScContext(t.scContext),n=t.routeFolderId,o=t.routeViewType,s=t.routeFilesFilters,l=t.routeFileId),n)p.folderUiModel.set("route_folder_id",n),p.searchUiModel.removeAllFieldQueries();else if(s)p.searchUiModel.removeAllFieldQueries(),p.searchUiModel.setFieldQueriesPath(s),p.sortUiModel.setSortFromQueryParams(g.getQueryParams());else if(S&&this._isSelected)return F||(A.removeSignedInChangeCallback(this._onSignedInChange),A.addSignedInChangeCallback(this._onSignedInChange)),this.render(),this._getResolvedPromise();return this._isSelected=!0,S&&!p.isInSearchResultsView,this._startPlugin().then(function(){return F?$.Deferred().resolve().promise():A.ensureSignedIn()}).then(_.bind(function(){var n,s=t&&t.singleFileSelection,u=p.pluginId,y=m.getPluginUiModel(u),I=y.get("connector_name"),E=t&&t.selectedToolPlugin||m.getSelectedPluginId("tools"),w=c.toolIdsToActionIds[E],M=c.toolIdsToActionNames[E],P=f.getConnectorPluginLabel(u);return S&&(this.options.isInSearchResultsView||i.opFactory.create("RestoringFilesPrefsOp",p).run(),F||(A.removeSignedInChangeCallback(this._onSignedInChange),A.addSignedInChangeCallback(this._onSignedInChange)),"root"===I?f.setConnectorPluginRoot(u,v.getRootFolderId(u)):(this.options.footerAnchorText=void 0,this.options.noShare=!0,this.options.noShareButton=!0)),p.selectionUiModel.set("multiple_selection",!s),p.collectionsUiModel.set("checkbox",!s),o&&p.collectionsUiModel.set("view",o),(S||e.Features.isFeatureEnabled("no_collection_item_checkbox")&&g.hasQueryParam("no_collection_item_checkbox","1"))&&p.collectionsUiModel.set("checkbox",!1),this._initFilter(t),this._configureActions(I),this.render(),p.fileUploadUiModel.startListening(),l?(d.isFileOpen(l)||(d.close({silent:!0}),i.opFactory.create("OpeningFullPreviewOp",_.extend({},p,{id:l})).run()),void(S&&C.showSpinner(!1))):f.isConnectorPlugin(u)&&!f.getConnectorPluginRoot(u)?(g.navigate(I),S&&C.showSpinner(!1),this._getResolvedPromise()):p.noUrlUpdate&&f.isActionRestricted(I,w)?(M&&P&&(n=m.getSelectorApi(E),n&&n.getSelectorLabel&&(M=n.getSelectorLabel(),M&&""!==M||(M=c.toolIdsToActionNames[E])),r=_.template(S?h.UNSUPPORTED_CONNECTOR_MSG:a.UNSUPPORTED_CONNECTOR_MSG,{actionName:M,connectorLabel:P}),p.collectionsUiModel.set("force_empty_msg",r)),p.collectionsUiModel.set("force_empty",!0),p.sortUiModel.set("is_locked",!0),p.searchUiModel.set("is_locked",!0),S&&C.showSpinner(!1),this._getResolvedPromise()):(t&&(p=_.extend({},p,_.pick(t,"noHistoryEffect"))),this._runSearchOp(p))},this),_.bind(function(e){if(S){if(C.showSpinner(!1),e&&"NoAccessToPdfServices"===e.errorString)return A.removeSignedInChangeCallback(this._onSignedInChange),A.addSignedInChangeCallback(this._onSignedInChange),this._isSelected=!0,this.render(),this._getResolvedPromise();0===this.$el.children().length&&m.handleServerOutageFailure()}},this))},deselectPlugin:function(){var i=this.options,t=i.appApi.networkConnectivityApi;u.isCEF()&&t.removeNetworkOnlineChangeCallback(this._onOnlineChanged),e.PluginContentView.prototype.deselectPlugin.call(this),this._isSelected=!1},remove:function(){this.deselectPlugin(),e.PluginContentView.prototype.remove.call(this)},releasePlugin:function(){var e=this.options,i=this.options.appApi.folderApi;n.PluginView.prototype.releasePlugin.call(this),u.isCEF()&&(this._unsetPluginRoot(),i.setCurrentFolderId(e.pluginId,void 0),e.folderModel.unset("name"),this._pluginOptions=_.omit(this._pluginOptions,"routeFolderId","routeFilesFilters","routeFileId")),e.folderModel.unset("id"),e.searchUiModel.removeAllFieldQueries()},getSelectionUiModel:function(){return this.options.selectionUiModel},getPluginVersionList:function(){var e=[l.pluginBuildNumber],i=this.options.appApi.baseFilesUrisApi.getServerVersion();return i&&e.push(i),$.Deferred().resolve().promise(e)},getFilesFooterUrl:function(){var i=this.options,t=i.appApi.folderApi;return"root"===i.pluginId?e.opFactory.create("GettingSsoUriOp",i).run("folder/"+encodeURIComponent(t.getRootFolderId())):void 0},clickedOutsideAiCview:function(){return u.isCEF()&&(this._triggerViewEvent(e.ViewEvents.CLEAR_SELECTION),$(document.body).click()),this._getResolvedPromise()},getSiteCatalystName:function(){var e=this.options,i=e.appApi,t=e.pluginId;return i&&i.connectorsApi.isConnectorPlugin(t)?i.connectorsApi.getConnectorPluginScName(t):s.DOCUMENT_CLOUD},doesFileExists:function(e){var i,t,n,o,s,l=this.options,r=l.filesUiModel;return r.isFolderView()?i=l.folderModel.get("items"):l.filesUiModel.isSearchResultsView()&&(i=l.searchModel.get("items")),e&&i&&(e=e.toLowerCase(),s=g.getNormalizedString(e,"NFC"),_.isUndefined(s)||(e=s),n=i.models,t=_.find(n,function(i){return"file"===i.get("object_type")?(o=i.get("name").toLowerCase(),s=g.getNormalizedString(o,"NFC"),_.isUndefined(s)||(o=s),o===e):!1})),t},_runSearchOp:function(e){return this.options.isInSearchResultsView?(u.isCEF()&&this.options.appApi.displayApi.showSpinner(!1),$.Deferred().resolve().promise()):i.opFactory.create("SearchingIfAskedOp",e).run().done(_.bind(function(){if(e.noInitialViewCounts||this._seenInitialView||(this._seenInitialView=!0,this._logInitialViewCounts()),u.isCEF())if("root-select"===e.pluginId){var i=e.folderModel.get("loaded");i&&i===!0&&this.options.appApi.displayApi.showSpinner(!1)}else this.options.appApi.displayApi.showSpinner(!1)},this)).fail(_.bind(function(){u.isCEF()&&this.options.appApi.displayApi.showSpinner(!1)},this))},_onViewEvent:function(i,t){var n=this.options;return n.inFileSelectionDlg&&i===e.ViewEvents.SELECTION_COMMIT?void n.selectionUiModel.commitSelection():void this.trigger(i,t)},_renderChildViews:function(){if(this.options.forRecentFileListing){var t=_.template('<div class="files-rhp ui-theme theme-container">');this.$el.append(t()),this.$rhp=this.$(".files-rhp"),this.$cbView=this._renderChildView("_filesRhpView",i.FilesRhpView,this.$rhp,{forRecentFileList:!0,rhpPreviewUiModel:e.modelFactory.create("RhpPreviewUiModel")})}else this._renderChildView("_filesContainerView",i.FilesContainerView,this.$el)},_initPlugin:function(){var e,i,t=this._initingPluginPromise,n=this.options,s=n.pluginId,l=n.appApi.connectorsApi,r=s,c=h.CLOUD_NAME;return i=l.getConnectorUIName(s),i&&(c=i),e=_.template(h.NOTIFICATION_HEADING,{cloudName:c}),_.extend(this.options,{notificationHeading:e,notificatonCategory:r}),t||(t=this._initingPluginPromise=o.opFactory.create("InitializingPluginOp",this.options).run()),t},_startPlugin:function(){var e=this._startingPluginPromise,i=!1,t=!1;return this.options.forRecentFileListing?(this.render(),void this.options.appApi.displayApi.showSpinner(!1)):(e||(e=this._startingPluginPromise=o.opFactory.create("StartingPluginOp",this.options).run().then(_.bind(function(){this.options.noAcrobat||this._addAppApiCallbacks(),i=this.options.showFoldersInSearch===!0,t=i&&this.options.showNavigationAtRoot===!0,this.options.searchUiModel.set({should_show_folders:i,should_show_navigate_root:t},{silent:!0})},this))),e)},_configureAction:function(e,i,t){var n=this.options,o=n.appApi.connectorsApi,s=o.isActionRestricted(e,i);return s&&(n[t]=!0),s},_configureActions:function(e){var i=this.options,t=i.pluginId,n=i.appApi.connectorsApi;n.isConnectorPlugin(t)&&(this._configureAction(e,c.NEWFOLDER,"noNewFolder"),this._configureAction(e,c.UPLOAD,"noUpload"),this._configureAction(e,c.FILTER,"noFilter"),this._configureAction(e,c.SORT,"noSort")&&i.sortUiModel.set("is_locked",!0),this._configureAction(e,c.SEND,"noShare"),this._configureAction(e,c.SEND,"noShareButton"),this._configureAction(e,c.DOWNLOAD,"noDownload"),this._configureAction(e,c.DELETE,"noDelete"),this._configureAction(e,c.MOVE,"noMove"),this._configureAction(e,c.RENAME,"noRename"))},_initFilter:function(i){var t,n,o,s,l,r=e.SearchUiModel,c=this.options.searchUiModel,a=this._getResolvedPromise();return u.isCEF()&&(a=this.options.readerContextModel),a.then(_.bind(function(){return i?(t=i.filter,t&&(n=t.mimeTypes,o=t.extensions,n&&n.length>0?c.addFieldQuery({field:r.FIELD_FILE_TYPE,value:n.join(),commitQueryBox:!0,queryBoxVisible:!this.options.noVisibleFieldQueries,queryLabel:t.queryLabel,removable:!1},{silent:!0}):u.isCEF()&&o&&o.length>0&&this.options.collectionsUiModel.set("filter_by_extension",o,{silent:!0}),s=t.minSize,s&&c.addFieldQuery({field:r.FIELD_FILE_MIN_SIZE,value:s,commitQueryBox:!1,queryBoxVisible:!this.options.noVisibleFieldQueries,removable:!1},{silent:!0}),l=t.maxSize,l&&c.addFieldQuery({field:r.FIELD_FILE_MAX_SIZE,value:l,commitQueryBox:!1,queryBoxVisible:!this.options.noVisibleFieldQueries,removable:!1},{silent:!0})),t):void 0},this))},_getSiteCatalystContext:function(){var e=this.options,i=e.appApi,t=e.pluginId;return i&&i.connectorsApi.isConnectorPlugin(t)?e.selectFilesScContext?i.connectorsApi.getConnectorPluginScName(t):s.FILE_LIST:e.selectFilesScContext?s.DOCUMENT_CLOUD:s.FILE_LIST},_logInitialViewCounts:function(){var e=this.options,i=e.appApi.siteCatalystApi,t=e.folderModel,n=[this._getSiteCatalystContext(),s.INITIAL_VIEW];i.logScEvent(n.concat([s.NUM_FILES_SHOWN,s.getCountCode(t.getChildFilesCount())])),i.logScEvent(n.concat([s.NUM_FOLDERS_SHOWN,s.getCountCode(t.getChildFoldersCount())]))},_addAppApiCallbacks:function(){var e=this.options.appApi;u.isCEF()||e.sessionApi.addSignedInChangeCallback(this._onSignedInChange),e.acrobatApi.addSelectedFilterIndexChangeCallback(this._onSelectedFilterIndexChange)},_onSignedInChange:function(e,i){var t=this.options;u.isCEF()?this._isSelected?i?(this.deselectPlugin(),this.selectPlugin(this._pluginOptions)):(t.dialogsUiModel.closeAll(),t.selectionUiModel.clearSelection(!1),this.releasePlugin(),delete this._startingPluginPromise,this.render()):i||(t.selectionUiModel.clearSelection(!1),this.releasePlugin(),delete this._startingPluginPromise):i||delete this._startingPluginPromise},_onSelectedFilterIndexChange:function(e,i){var t=this.options;t.collectionsUiModel.set("filter_by_extension",t.appApi.acrobatApi.getFilterFileExtensions(i))},_onOnlineChanged:function(e,i){i?(this.deselectPlugin(),this.selectPlugin(this._pluginOptions)):(this.options.appApi.saveAsApi.setCanSave(!1),this.render())},_unsetPluginRoot:function(){var e=this.options,i=e.appApi.connectorsApi;"root"===i.getConnectorPluginName(e.pluginId)&&i.setConnectorPluginRoot(e.pluginId,void 0)},getFolderAncestorIds:function(){var e,i=[];return e=this.options.folderUiModel.get("path"),_.each(e,function(e){i.push(e.id)}),i},_onNetworkStateChangeFromFeat:function(e,i){var t=(this.options,this.options.appApi);t.rnaApi.done(_.bind(function(e){e.isFeatRunning()&&e.isASTestAllowInstantiation()&&(t.options.networkConnectivityModel.set({is_connected:i?i.state:!1}),t.networkConnectivityApi.removeNetworkConnectivtyChangeCallback(this._onOnlineChanged))},this))},_setContextBoardModel:function(e){this.$cbView&&e&&this.$cbView._setModel(e,!0)},_getSendUriTrimmed:function(){var e=this.options.appApi.baseFilesUrisApi.getSendApiUri(),i=e.lastIndexOf("api");return e=e.substring(0,i)},_onDeleteViewAsset:function(){this._triggerViewEvent(e.ViewEvents.DELETE_SHARED,{parentView:this,parcelModel:this.options.selectionUiModel.getSingleSelectedItemModel()})},_enableRefresh:function(e){this._enableRefresh=e},_refreshDcUI:function(){(void 0==this._enableRefresh||this._enableRefresh)&&this.options.appApi.folderApi.refreshCurrentFolder(this.options)},_refreshAssetSharedStatusInDC:function(e){this.options.appApi.folderApi.updateFileSharedStatus(this.options,e)},_onDeleteReviewAsset:function(i){var t=this.options,n={},o={};i.isOriginalShared?(n.Title=p.CONFIRM_DELETE_SHARED_FILE_TITLE_NO_COPY_MODEL,n.Message=p.CONFIRM_DELETE_SHARED_FILE_MSG_NO_COPY_MODEL,n.ActionButtonName=p.CONFIRM_DELETE_SHARED_FILE_BUTTON_NO_COPY_MODEL):(n.Title=p.CONFIRM_DELETE_SHARED_FILE_TITLE_COPY_MODEL,n.Message=p.CONFIRM_DELETE_SHARED_FILE_MSG_COPY_MODEL,n.ActionButtonName=p.CONFIRM_DELETE_SHARED_FILE_BUTTON_COPY_MODEL),n.RejectButtonName=p.CANCEL,o.InvitationId=i.InvitationId,t.appApi.rnaApi.done(_.bind(function(l){l._reviewAPI.invoke("EurekaAlertDialog",n).done(_.bind(function(n){n===!0&&e.opFactory.create("DeletingReviewOp",this.options).run(i.ParcelId).then(_.bind(function(){try{var e="Delete";void 0!==i.isOriginalShared&&i.isOriginalShared&&(e+=s.VIRGO_ORIGINAL_SHARE),e+=" Review",l._reviewAPI.invoke("logEurekaEventAndDataGroup",["Eureka:Review success","Success",e,"EurekaActions",i.ParcelId,i.role])}catch(n){}l._reviewAPI.invoke("deleteReview",[i.ParcelId,i.InvitationId,i.workflowType]),l._reviewAPI.invoke("AVEurekaDocClose",o),l._reviewAPI.invoke("DeleteEurekaCache",o),this._showToast(p.DELETED_STRING);var r,c=this.options.selectionUiModel.getSingleSelectedItemModel(),a=void 0;Ac.discoveryUrisModel&&(r=Ac.discoveryUrisModel.getUSSUrlsAndUserInfo()),r&&(a=r.isACPUser),t.isInSearchResultsView?a?t.searchUiModel.trigger("refresh_search_category","creative_cloud"):(t.searchUiModel.trigger("refresh_search_category","document_cloud"),t.searchUiModel.trigger("refresh_search_category","review")):(t.selectionUiModel.deselectItem(c.id,!0),t.appApi.folderApi.refreshCurrentFolder(t).then(_.bind(function(){t.selectionUiModel.triggerSelectionChange()},this)))},this))},this))},this))},_showToast:function(i){this.options.toastArgumentString=i,this.options.FadeOutTime=3e3;var t=this.$el;this.$toastPlaceholderDIV=t.find(".rhp-action-toast-placeholder"),0==this.$toastPlaceholderDIV.length&&(this.$toastPlaceholderDIV=$('<div class="rhp-action-toast-placeholder"></div>'),t.append(this.$toastPlaceholderDIV)),this._renderChildView("_rhpToast",e.RhpActionsToast,this.$toastPlaceholderDIV,{options:this.options})},_showCustomizeToast:function(i){if(!_.isUndefined(i)&&!_.isUndefined(i.argsString)){this.options.toastArgumentString=i.argsString,this.options.FadeOutTime=3e3,i.fadeTimeout&&(this.options.FadeOutTime=i.fadeTimeout);var t=this.$el;if(this.$toastPlaceholderDIV=t.find(".rhp-action-toast-placeholder"),0==this.$toastPlaceholderDIV.length&&(this.$toastPlaceholderDIV=$('<div class="rhp-action-toast-placeholder"></div>'),t.append(this.$toastPlaceholderDIV)),this._renderChildView("_rhpToast",e.RhpActionsToast,this.$toastPlaceholderDIV,{options:this.options}),i.hideIcon){var n=t.find(".toast-icon");n&&(n.hide(),this._rhpToast.$toastAction.css("display","block"))}}}}),o.PluginView}),define("acplugins/my-files/js/my-files",["acplugins/my-files/js/ac-my-files","acplugins/my-files/js/ops/op-factory","acplugins/my-files/js/views/plugin-view"],function(e){_.extend(e,{init:function(){e.opFactory=new e.OpFactory}})}),define("acplugins/my-recent-files/js/ops/listening/listening-for-view-events-op",["core/ac-core","files/ac-files","acplugins/my-recent-files/js/ac-my-recent-files","core/ops/op","core/views/view-events","files/views/view-events"],function(e,i,t){t.ListeningForViewEventsOp=e.Op.extend({initialize:function(){e.Op.prototype.initialize.call(this),this._initEventMap(),this.options.appApi.sessionApi.addSignedInChangeCallback(this._onSignedInChange)},_onSignedInChange:function(e,i){i?this.options.rootView.off("all",this._onViewEvent):this.options.rootView.on("all",this._onViewEvent)},run:function(){var e=$.Deferred();return this.options.appApi.sessionApi.isSignedInReader()&&this.options.appApi.networkConnectivityApi.isOnline()?this.options.rootView.off("all",this._onViewEvent):this.options.rootView.on("all",this._onViewEvent),this._deferred=e,e.promise()},_onViewEvent:function(i,t){var n,o;return i===e.ViewEvents.SELECTION_COMMIT?void this.options.selectionUiModel.commitSelection():(n=this._eventMap[i],n&&(o=n[0].create(n[1],t)),void(o&&o.run(i,t).then(function(){return void 0},function(){return void 0})))},_mapEvent:function(e,i,t,n,o){e[i]=[t,n,o]},_initEventMap:function(){var t,n,o,s,l,r;t=this._eventMap={},n=this._mapEvent,o=i.ViewEvents,l=i.opFactory,r=e.opFactory,s=e.ViewEvents,n(t,s.SELECTION_ACTION_ITEM_CLICK,r,"SelectingSelectionActionItemOp"),n(t,s.SELECT_ITEM,r,"SelectingCollectionItemOp"),n(t,s.CLEAR_SELECTION,r,"ClearingSelectionOp"),n(t,s.OPEN_COLLECTION_ITEM,l,"OpeningCollectionItemOp"),n(t,s.OPEN_SELECTED_COLLECTION_ITEMS,l,"OpeningSelectedCollectionItemsOp"),n(t,s.CONTEXT_BOARD_PRIMARY_TOOLS_CLICK,r,"ContextBoardPrimaryToolsClickAppOp"),n(t,s.CONTEXT_BOARD_PRIMARY_TOOLS_CLICK_REDUCEDMODE,r,"ContextBoardPrimaryToolsClickReducedModeAppOp"),n(t,s.F6_KEY_PRESSED,r,"F6KeyPressHandlerOp")}})}),define("acplugins/my-recent-files/js/ops/plugin/starting-plugin-op",["core/ac-core","acplugins/my-recent-files/js/ac-my-recent-files","core/utils/date-util","core/ops/op"],function(e,i,t){i.StartingPluginOp=e.Op.extend({run:function(){var i=this.options,n=e.SearchUiModel,o=i.searchUiModel,s=e.SortUiModel,l=i.sortUiModel;return o.set("pagesize",50),i.noUrlUpdate||o.set("route","recent"),o.addFieldQuery({field:n.FIELD_DATE_LAST_ACCESS,value:t.ALL_TIME,commitQueryBox:!1,queryBoxVisible:!1,removable:!1,id:"my-recent-files-base"},{silent:!0}),l.setOrder(s.ORDER_BY_DATE_LAST_ACCESS,s.ORDER_DESCENDING),l.set("is_locked",!0),this._getResolvedPromise()}})}),define("acplugins/my-recent-files/js/ops/plugin/fetching-rna-recent-files-op",["core/ac-core","acplugins/my-recent-files/js/ac-my-recent-files","core/ops/op"],function(e,i){i.FetchingRNARecentFileList=e.Op.extend({run:function(){var t=$.Deferred();return this.options.appApi.rnaApi.done(_.bind(function(n){n.rnaRecentFilesAPI.fetchRecentFileListApi().done(_.bind(function(n){!_.isUndefined(n)&&n.length?(this._items=e.collectionFactory.create("Collection",void 0,{model:i.LocalItemModel}),this._parseFiles(n),this.options.folderModel.set({items:this._items})):this.options.noFilesInRecents=!0,t.resolve()},this))},this)),t},_parseFiles:function(e){var i={members:[]},t=this._items,n=t?t.model:null;if(n){var o,s=0;_.each(e,function(e){o=e,s=e.recentIndex,i.members.push(new n({index:s},{_proxy:o}))})}this._parse(i)},_parse:function(e){var i=this._items,t=e.members;return i.set(t,{silent:!0,fromODM:!0}),i.trigger("add"),e}})}),define("acplugins/my-recent-files/js/ops/op-factory",["core/ac-core","acplugins/my-recent-files/js/ac-my-recent-files","acplugins/my-recent-files/js/ops/listening/listening-for-view-events-op","acplugins/my-recent-files/js/ops/plugin/starting-plugin-op","acplugins/my-recent-files/js/ops/plugin/fetching-rna-recent-files-op"],function(e,i){i.OpFactory=e.Op.extend({create:function(e,t){var n=i[e];return n?new n(t):void LOG(0,"AcMyRecentFiles.OpFactory.create: Unrecognized class: "+e)}})}),define("acplugins/my-recent-files/js/nls/ui-strings",{root:!0,"xx-xx":!0,"ar-ae":!0,"ca-es":!0,"cs-cz":!0,"da-dk":!0,"de-de":!0,"en-ae":!0,"en-gb":!0,"en-il":!0,"es-es":!0,"eu-es":!0,"fi-fi":!0,"fr-fr":!0,"fr-ma":!0,"he-il":!0,"hr-hr":!0,"hu-hu":!0,"it-it":!0,"ja-jp":!0,"ko-kr":!0,"nb-no":!0,"nl-nl":!0,"pl-pl":!0,"pt-br":!0,"ro-ro":!0,"ru-ru":!0,"sk-sk":!0,"sl-si":!0,"sl-sl":!0,"sv-se":!0,"tr-tr":!0,"uk-ua":!0,"zh-cn":!0,"zh-tw":!0,"bg-bg":!0}),define("acplugins/my-recent-files/js/nls/root/ui-strings",{SELECTOR_LABEL:"Recent",MY_RECENT_FILES:"My Recent Files",NO_RECENT_FILES:"No Recent Files",NO_SEARCH_RESULTS:"No Search Results.",TRY_DIFFERENT_SEARCH:"Please try a different search."}),define("acplugins/my-recent-files/js/models/recent-local-item-model",["core/ac-core","acplugins/my-recent-files/js/ac-my-recent-files","core/utils/util","core/utils/file-types","core/collections/rna/rna-collection","core/models/rna/rna-model"],function(e,i,t,n){return i.LocalItemModel=e.RNAModel.extend({initialize:function(i,o){this.models={list:e.RNACollection};var s=e.RNAModel.prototype.initialize.call(this,i,o),l=t.getExtension(this.get("name"))||"",r=n.getFileMimeType(l.toLowerCase());return r=r||null,this.set("content_type",r,{localAttr:!0}),this.set("object_type","file",{localAttr:!0}),this.set("last_access",this.get("modified"),{localAttr:!0}),this.set("fileURI",null,{localAttr:!0}),this.set("source","native",{localAttr:!0}),this.id=this.get("assetId"),this.isRecentFileItem=!0,""===this.id&&(this.id=this.get("path")),this.set("_proxy",this._proxy,{localAttr:!0}),s},get:function(i){if("items"===i)i="list";else if("id"===i)return this.id;return"fileURI"===i?void 0:e.RNAModel.prototype.get.call(this,i)},isSharedFile:function(){return"file"===this.get("object_type")&&this.get("is_shared")===!0},isCCFile:function(){return!1},isFolder:function(){return"folder"===this.get("object_type")},isRoot:function(){return"root"===this.get("object_type")},isFile:function(){return"file"===this.get("object_type")},getFolderItemsCount:function(){var e=this.get("items");return e?e.length:0},getSharingURL:function(){return""},getRenditionUrl:function(){return this._renditionUrl},setImageBlob:function(e){this.set("imgBlob",e,{localAttr:!0})},getRenameUrl:function(){return""},setRenditionUrl:function(e){this._renditionUrl=e},getPublicUrl:function(){return""},getPathUrl:function(){return void 0},isPublic:function(){return!1},isForm:function(){return!1},isNative:function(){var e=this.get("source");return"native"===e||"native_v2"===e},isPDF:function(){var e=this.get("content_type");return this.isFile()&&"application/pdf"===e}}),i.LocalItemModel}),define("acplugins/my-recent-files/js/views/plugin-view",["files/ac-files","acplugins/my-files/js/ac-my-files","core/ac-core","i18n!acplugins/my-recent-files/js/nls/ui-strings","acplugins/my-recent-files/js/ac-my-recent-files","core/utils/sc-analytics","acplugins/my-recent-files/js/models/recent-local-item-model","acplugins/my-files/js/views/plugin-view","files/views/files-container-view"],function(e,i,t,n,o,s){return o.PluginView=i.PluginView.extend({initialize:function(){i.PluginView.prototype.initialize.call(this),_.extend(this.options,{noSelectionActions:!1,noUpload:!0,noNewFolder:!0,noUrlUpdate:!1,noNotifications:!1,noPreferences:!0,noAcrobat:!0,noFolderSelection:!0,noHoverPreview:!0,noFullPreview:!1,noFullPreviewImpl:!0,noShareButton:!0,selectFilesScContext:!1,noHistoryEffect:!1})},render:function(){return i.PluginView.prototype.render.call(this),this.options.noFilesInRecents&&(this.options.collectionsUiModel.set("force_empty_msg",n.NO_RECENT_FILES),this.options.collectionsUiModel.set("force_empty",!0)),this.options.appApi.selectionApi.isRunningInFileSelection()&&this.options.appApi.rnaApi.done(function(e){e.logAnayticsCustomOpenSave("Time_To_Show_Dialog_View_Recent_Files")}),this},selectPlugin:function(e){var t,n=this.options,s=n.noHistoryEffect;return this.options.appApi.done(_.bind(function(){this.options.appApi.displayApi.showSpinner(!1)
},this)),e=e||this.getPluginOptions(),e&&(_.has(e,"noHistoryEffect")&&(s=e.noHistoryEffect),t=e.routeRecentFilters),s||n.appApi.routerApi.navigate("recent"),t&&n.searchUiModel.setFieldQueriesPath(t),n.isInSearchResultsView&&!this._viewListener&&(this._viewListener=o.opFactory.create("ListeningForViewEventsOp",this.options),this._viewListener.run()),n.sortUiModel.set("is_locked",!0),n.sortUiModel.set("order_by","none"),n.sortUiModel.set("mru_date_order","last_access"),i.PluginView.prototype.selectPlugin.call(this,e)},getSiteCatalystName:function(){return s.RECENT_FILES},_runSearchOp:function(){return t.Util.isCEF()&&this.options.appApi.displayApi.showSpinner(!1),$.Deferred().resolve().promise()},getSelectionUiModel:function(){return this.options.selectionUiModel},_startPlugin:function(){var e=this.options,n=$.Deferred();return this._startingPluginPromise=i.PluginView.prototype._startPlugin.call(this).then(_.bind(function(){t.Util.isCEF()||(n=o.opFactory.create("StartingPluginOp",e).run()),n=o.opFactory.create("FetchingRNARecentFileList",e).run()},this)),$.when(this._startingPluginPromise,n)},_getSiteCatalystContext:function(){return s.RECENT_FILES}}),o.PluginView}),define("acplugins/my-recent-files/js/my-recent-files",["acplugins/my-files/js/ac-my-files","acplugins/my-recent-files/js/ac-my-recent-files","acplugins/my-recent-files/js/ops/op-factory","acplugins/my-recent-files/js/views/plugin-view"],function(e,i){_.extend(i,{init:function(){e.init(),i.opFactory=new i.OpFactory}})}),define("acplugins/my-recent-files-select/js/views/plugin-view",["core/ac-core","acplugins/my-recent-files/js/ac-my-recent-files","acplugins/my-recent-files-select/js/ac-my-recent-files-select","core/utils/util","acplugins/my-recent-files/js/views/plugin-view"],function(e,i,t,n){return t.PluginView=i.PluginView.extend({initialize:function(){i.PluginView.prototype.initialize.call(this),_.extend(this.options,{inFileSelectionDlg:!0,noSelectionActions:!0,noUpload:!0,noNewFolder:!0,noUrlUpdate:!0,noNotifications:!0,noPreferences:!0,noAcrobat:!0,noFolderSelection:!0,noHoverPreview:!0,noFullPreview:!0,noShareButton:!0,selectFilesScContext:!0,noInitialViewCounts:!0,noHistoryEffect:!0,noVisibleFieldQueries:!0,showFoldersInSearch:!1,showNavigationAtRoot:!1}),n.isCEF()&&_.extend(this.options,{noSort:!0,noFilter:!0,noDelete:!0,singleFileSelection:!0,rnaRecentFilesSelect:!0,searchLocally:!0})},selectPlugin:function(e){var t=this.options;return this.options.appApi.done(_.bind(function(){this.options.appApi.displayApi.showSpinner(!1)},this)),e=e||this.getPluginOptions(),e=_.extend({},e,t),i.PluginView.prototype.selectPlugin.call(this,e)}}),t.PluginView}),define("acplugins/my-recent-files-select/js/my-recent-files-select",["acplugins/my-recent-files/js/ac-my-recent-files","acplugins/my-recent-files-select/js/ac-my-recent-files-select","acplugins/my-recent-files/js/ops/op-factory","acplugins/my-recent-files-select/js/views/plugin-view"],function(e,i){_.extend(i,{init:function(){e.init()}})}),define("acplugins/my-recent-files-select/js/plugin",["core/ac-core-init","files/ac-files-init","acplugins/my-recent-files/js/ac-my-recent-files","acplugins/my-recent-files-select/js/ac-my-recent-files-select","acplugins/my-files/js/my-files","acplugins/my-recent-files/js/my-recent-files","acplugins/my-recent-files-select/js/my-recent-files-select"],function(e,i,t,n){n.init()});