/*************************************************************************
* 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 2018 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 2018 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 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 2018 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.
**************************************************************************/

/*************************************************************************
* 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.
**************************************************************************/

/*************************************************************************
*
* 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 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.
**************************************************************************/

/*************************************************************************
*
* ADOBE CONFIDENTIAL
* ___________________
*
*  Copyright 2012 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.
**************************************************************************/

/*************************************************************************
* 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 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 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.
 **************************************************************************/

/*************************************************************************
*
* 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 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.
**************************************************************************/

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

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

define("acplugins/uss-search/js/ac-uss-search",["plugins-common/ac-plugins"],function(e){var t=e.USSSearch;return t||(e.USSSearch=t={}),t.PLUGIN_ID||(t.PLUGIN_ID="uss_search"),t}),define("acplugins/uss-search/js/ops/uss-search-views/loading-uss-search-views-op",["core/ac-core","acplugins/uss-search/js/ac-uss-search","core/utils/util","core/ops/op"],function(e,t,i){t.LoadingUSSSearchViewsOp=e.Op.extend({run:function(){var t,s=this.options,n=s.appApi.pluginsApi;return i.isCEF()&&(t={readerContextModel:s.readerContextModel}),e.opFactory.create("LoadingPluginsOp",_.extend({pluginContext:t,pluginsConfig:n.getPluginTypeConfig("search_views"),pluginsUiModel:s.searchViewsUiModel},_.pick(s,"appApi","pluginId"))).run()}})}),define("acplugins/uss-search/js/ops/uss-search-views/close-uss-search-op",["core/ac-core","acplugins/uss-search/js/ac-uss-search"],function(e,t){t.CloseUSSSearchOp=e.Op.extend({run:function(){this.options.appApi.rnaApi.done(function(e){e.invokeMethod({methodName:"closeUSSSearch",methodArgs:""})})}})}),define("acplugins/uss-search/js/ops/uss-search-views/selecting-uss-search-view-op",["core/ac-core","files/ac-files","acplugins/uss-search/js/ac-uss-search","core/ops/op"],function(e,t,i){return i.SelectingUSSSearchViewOp=e.Op.extend({run:function(t){var i,s=this.options,n=s.searchViewsUiModel;return i=s.pluginId,i&&n.get("plugins").get(i)||(i=n.getSelectedId()),e.opFactory.create("SelectingPluginOp",s).run(i,t).always(function(){s.appApi.selectionApi.clearSelection()})}}),i.SelectingUSSSearchViewOp}),define("acplugins/uss-search/js/ops/uss-search-views/update-search-views-visibility-op",["core/ac-core","acplugins/uss-search/js/ac-uss-search","core/ops/op"],function(e,t){t.UpdateSearchViewsVisibilityOp=e.Op.extend({run:function(){var e=this.options,t=e.pluginsUiModel,i=e.ussSearchModel,s=e.appApi.pluginsApi;return t.get("plugins").each(function(e){var t=s.getPluginContentId(e.id),n=$("#"+t+".search-view-content"),o="root"===e.id?"document_cloud":e.get("config").search_scope;o&&i.getSearchResultCount(o)?n.show():n.hide()}),$(".search-views-content").scroll(),this._getResolvedPromise()}})}),define("acplugins/uss-search/js/views/view-events",["acplugins/uss-search/js/ac-uss-search"],function(e){e.ViewEvents={USS_SEARCH_VIEW_SELECTOR_CLICK:"USSSearch:search-view-selector-click",USS_SEARCH_COMPLETE:"USSSearch:SearchComplete"}}),define("acplugins/uss-search/js/ops/listening/listening-for-view-events-op",["core/ac-core","files/ac-files","acplugins/uss-search/js/ac-uss-search","core/ops/op","core/views/view-events","acplugins/uss-search/js/views/view-events"],function(e,t,i){i.ListeningForViewEventsOp=e.Op.extend({initialize:function(){e.Op.prototype.initialize.call(this),this._initEventMap()},run:function(){var e=$.Deferred();return this.options.rootView.on("all",this._onViewEvent),this._deferred=e,e.promise()},_onViewEvent:function(e,t){var i,s;return i=this._eventMap[e],i&&(s=i[0].create(i[1],t)),s?void s.run(this._pluginOptions).then(function(){return void 0},function(){return void 0}):void LOG(0,"AcHome.ListeningForViewEventsOp._onViewEvent ignoring "+e)},_mapEvent:function(e,t,i,s,n){e[t]=[i,s,n]},_initEventMap:function(){var e,t,s,n;e=this._eventMap={},t=this._mapEvent,s=i.opFactory,n=i.ViewEvents,t(e,n.USS_SEARCH_VIEW_SELECTOR_CLICK,s,"SelectingUSSSearchViewOp"),t(e,n.USS_SEARCH_COMPLETE,s,"UpdateSearchViewsVisibilityOp")}})}),define("acplugins/signatures/js/ac-signature",["plugins-common/ac-plugins"],function(e){e.Signatures||(e.Signatures={});var t=e.Signatures.Home;return t||(t=e.Signatures.Home={}),t.PLUGIN_ID||(t.PLUGIN_ID="signatures"),t}),define("acplugins/signatures/js/constants/sign-constants",{API_SUBPATH_V6:"/api/rest/v6",API_VERSION_V6:"v6",API_SUBPATH_GATEWAY:"/api/gateway"}),define("pdmplugins/esign/js/ac-esign",["plugins-common/ac-plugins"],function(e){var t=e.EchoSign;return t||(t=e.EchoSign={}),t}),define("acplugins/uss-search/js/ops/searching/echo-sign-files-search-op",["core/ac-core","acplugins/signatures/js/ac-signature","acplugins/signatures/js/constants/sign-constants","core/utils/http-util","core/models/workflow-status-strings","acplugins/uss-search/js/ac-uss-search","core/utils/sc-analytics","core/ops/op","pdmplugins/esign/js/ac-esign"],function(e,t,i,s,n,o,a){var r,l,c=["WAITING_FOR_MY_SIGNATURE","WAITING_FOR_MY_APPROVAL","WAITING_FOR_MY_DELEGATION","WAITING_FOR_MY_ACKNOWLEDGEMENT","WAITING_FOR_MY_ACCEPTANCE","WAITING_FOR_MY_FORM_FILLING","OUT_FOR_SIGNATURE","OUT_FOR_APPROVAL","OUT_FOR_DELIVERY","OUT_FOR_ACCEPTANCE","OUT_FOR_FORM_FILLING","SIGNED","APPROVED","DELIVERED","ACCEPTED","FORM_FILLED","EXPIRED","RECALLED","ARCHIVED","LIBRARY_TEMPLATE"];o.EchoSignFilesSearchOp=e.Op.extend({search_scope:"sign",run:function(){var t=this.options,n=t.esApi.authApi.createAuthSession(t),o=t.ussSearchModel.getSearchModel(this.search_scope),d=t.searchUiModel,h=this.search_scope;return _.isEqual(t.search_query,l)?this._getRejectedPromise():(l=t.search_query,n.then(_.bind(function(){function n(e){return r===e.op._requestId}var p,u=t.esAuthUiModel.get("access_token"),g=t.appApi.rnaApiObj.esApi.getEchoSignApiURL();t.noSearchReset||(o.set("total_hits",0),o.get("items").reset()),d.setScopeStatus(this.search_scope,e.SearchUiModel.STATUS_PENDING);var S={q:l,fetch_fields:{includes:["messages"]},scope:["sign"],state:c},m=g+i.API_SUBPATH_GATEWAY+"/search",E={"Content-Type":"application/json","x-api-client-id":s.REQUEST_HEADER_CLIENT_ID,Authorization:"Bearer "+u};return t.startIndex&&_.extend(S,{start_index:t.startIndex}),r=this._requestId=_.uniqueId(),p={op:this},t.appApi.networkApi.throttledAjax(m,{type:"POST",headers:E,context:p,data:JSON.stringify(S),dataType:"json",global:!1}).then(_.bind(function(e){return this._parseUSSResponse(e,t.searchUiModel,t.ussSearchModel,t.noSearchReset),t.noSearchReset||t.ussSearchModel.syncSearchResultCount(),this._getResolvedPromise()},this),function(i){return t.appApi.displayApi.showSpinner(!1),n(this)?(d.setScopeStatus(h,e.SearchUiModel.STATUS_FAILED),$.Deferred().resolve().promise()):void t.appApi.siteCatalystApi.logVirgoEvent(a.SEARCH,"Error:"+i.status)}).always(function(){l=void 0})},this)))},_parseUSSResponse:function(t,i,s,o){if(t&&t.metrics){var a=this.options.appApi.usersMeApi.getUserIdentity();_.each(t.result_sets,_.bind(function(t){var r=t.name,l=o?this.options.searchModel:s.getSearchModel(r);if(l.set("total_hits",t.total_hits),"sign"===r){var c=_.map(t.items,function(e){var t,i={id:e.agreement_id,name:e.name,create_date:e.create_date,modify_date:e.modify_date,expire_date:e.expire_date},s=!1,n=!1;_.each(e.roles,function(e){"ORIGINATOR"===e?s=!0:(t=e,n=!0)});var o;return i.participants=[],_.each(e.participant_list,function(e){!_.isUndefined(_.find(e.roles,function(e){return"ORIGINATOR"===e}))&&e.roles.length>=1?o=e:i.participants.push({email:e.address,name:e.label,status:"RECALLED"===e.state?"CANCELLED":e.state,role:e.roles[0]})}),n&&i.participants.push({email:a.email,name:a.first_name+" "+a.last_name,status:"RECALLED"===e.state?"CANCELLED":e.state,role:t}),i.creator={email:s?a.email:o.address,name:s?a.first_name:o.label},i.company=o&&o.organization?o.organization:"",s&&(i.creator={email:a.email,name:a.first_name+" "+a.last_name,status:"RECALLED"===e.state?"CANCELLED":e.state,role:t}),i.signature_info={company:o&&o.organization?o.organization:"",status:"RECALLED"===e.state?"CANCELLED":e.state,intro_message:e.messages?e.messages[0]:"",deadline_date:e.expire_date,state:"RECALLED"===e.state?"CANCELLED":e.state},i.resources=[],i.resources.push({name:e.name,type:"application/pdf",asset_id:e.agreement_id,id:e.agreement_id}),i});if(o)this.options.collection.add(c),this.options.searchModel.get("parcelCollection").add(c);else{var d=new e.ParcelCollection(c,{wfType:n.SIGN,sortAscending:!1,sortField:"modify_date"});l.set("parcelCollection",d)}}i.setScopeStatus(r,e.SearchUiModel.STATUS_SUCCEEDED)},this))}}})}),define("acplugins/my-recent-files/js/ac-my-recent-files",["plugins-common/ac-plugins"],function(e){var t=e.MyRecentFiles;return t||(t=e.MyRecentFiles={}),t}),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,t,i){i.ListeningForViewEventsOp=e.Op.extend({initialize:function(){e.Op.prototype.initialize.call(this),this._initEventMap(),this.options.appApi.sessionApi.addSignedInChangeCallback(this._onSignedInChange)},_onSignedInChange:function(e,t){t?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(t,i){var s,n;return t===e.ViewEvents.SELECTION_COMMIT?void this.options.selectionUiModel.commitSelection():(s=this._eventMap[t],s&&(n=s[0].create(s[1],i)),void(n&&n.run(t,i).then(function(){return void 0},function(){return void 0})))},_mapEvent:function(e,t,i,s,n){e[t]=[i,s,n]},_initEventMap:function(){var i,s,n,o,a,r;i=this._eventMap={},s=this._mapEvent,n=t.ViewEvents,a=t.opFactory,r=e.opFactory,o=e.ViewEvents,s(i,o.SELECTION_ACTION_ITEM_CLICK,r,"SelectingSelectionActionItemOp"),s(i,o.SELECT_ITEM,r,"SelectingCollectionItemOp"),s(i,o.CLEAR_SELECTION,r,"ClearingSelectionOp"),s(i,o.OPEN_COLLECTION_ITEM,a,"OpeningCollectionItemOp"),s(i,o.OPEN_SELECTED_COLLECTION_ITEMS,a,"OpeningSelectedCollectionItemsOp"),s(i,o.CONTEXT_BOARD_PRIMARY_TOOLS_CLICK,r,"ContextBoardPrimaryToolsClickAppOp"),s(i,o.CONTEXT_BOARD_PRIMARY_TOOLS_CLICK_REDUCEDMODE,r,"ContextBoardPrimaryToolsClickReducedModeAppOp"),s(i,o.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,t,i){t.StartingPluginOp=e.Op.extend({run:function(){var t=this.options,s=e.SearchUiModel,n=t.searchUiModel,o=e.SortUiModel,a=t.sortUiModel;return n.set("pagesize",50),t.noUrlUpdate||n.set("route","recent"),n.addFieldQuery({field:s.FIELD_DATE_LAST_ACCESS,value:i.ALL_TIME,commitQueryBox:!1,queryBoxVisible:!1,removable:!1,id:"my-recent-files-base"},{silent:!0}),a.setOrder(o.ORDER_BY_DATE_LAST_ACCESS,o.ORDER_DESCENDING),a.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,t){t.FetchingRNARecentFileList=e.Op.extend({run:function(){var i=$.Deferred();return this.options.appApi.rnaApi.done(_.bind(function(s){s.rnaRecentFilesAPI.fetchRecentFileListApi().done(_.bind(function(s){!_.isUndefined(s)&&s.length?(this._items=e.collectionFactory.create("Collection",void 0,{model:t.LocalItemModel}),this._parseFiles(s),this.options.folderModel.set({items:this._items})):this.options.noFilesInRecents=!0,i.resolve()},this))},this)),i},_parseFiles:function(e){var t={members:[]},i=this._items,s=i?i.model:null;if(s){var n,o=0;_.each(e,function(e){n=e,o=e.recentIndex,t.members.push(new s({index:o},{_proxy:n}))})}this._parse(t)},_parse:function(e){var t=this._items,i=e.members;return t.set(i,{silent:!0,fromODM:!0}),t.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,t){t.OpFactory=e.Op.extend({create:function(e,i){var s=t[e];return s?new s(i):void LOG(0,"AcMyRecentFiles.OpFactory.create: Unrecognized class: "+e)}})}),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,t,i,s){return t.LocalItemModel=e.RNAModel.extend({initialize:function(t,n){this.models={list:e.RNACollection};var o=e.RNAModel.prototype.initialize.call(this,t,n),a=i.getExtension(this.get("name"))||"",r=s.getFileMimeType(a.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}),o},get:function(t){if("items"===t)t="list";else if("id"===t)return this.id;return"fileURI"===t?void 0:e.RNAModel.prototype.get.call(this,t)},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}}),t.LocalItemModel}),define("acplugins/uss-search/js/ops/searching/recent-files-search-op",["core/ac-core","acplugins/uss-search/js/ac-uss-search","acplugins/my-recent-files/js/ac-my-recent-files","core/ops/op","acplugins/my-recent-files/js/ops/op-factory","acplugins/my-recent-files/js/models/recent-local-item-model"],function(e,t,i){t.RecentFilesSearchOp=e.Op.extend({search_scope:"recent",run:function(){var t=this.options,s=t.ussSearchModel,n=t.searchUiModel,o=s.getSearchModel(this.search_scope),a=o.get("items"),r=(new i.OpFactory).create("FetchingRNARecentFileList",_.extend(t,{folderModel:t.recentFolderModel})),l=t.search_query.toLowerCase();return n.setScopeStatus(this.search_scope,e.SearchUiModel.STATUS_PENDING),r.run().then(_.bind(function(){if(t.recentFolderModel&&a){a.reset(t.recentFolderModel.get("items").filter(function(e){var t=e.get("name").toLowerCase();return l?t.indexOf(l)>-1:e.isPDF()})),t.appApi.folderApi.setFilesCollection(a.models);var i=a.models.length;o.set("total_hits",i)}n.setScopeStatus(this.search_scope,e.SearchUiModel.STATUS_SUCCEEDED),s.syncSearchResultCount()},this))}})}),define("acplugins/uss-search/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/uss-search/js/nls/root/ui-strings",{SEARCH_RESULTS_LABEL:"Search results for <b><%= searchQuery %></b>",SEARCH_RESULTS_COUNT:"(<%=count%>)",SEARCH_PENDING_STATUS:"(...)",SEARCH_SUCCESS_FAILED:"(!)",SEARCH_CLOSE:"Close",SEARCH_CLOSE_LABEL:"Close Search",SEARCH_SIGNOUT_PROMPT:"To search other categories, please <%= prefix %>sign in.<%= suffix %>",SEARCH_SIGNIN:"Sign In",SEARCH_OFFLINE_PROMPT:"Could not complete your request. An error occurred while connecting to the service. Please <%= prefix %>try again.<%= suffix %>",SEARCH_ONLINE:"Try Again",GENERIC_ARIA_LABEL_STRING:"<%= prefix %>. <%= suffix %>",SEARCH_NO_RESULTS_TITLE:"No results found",SEARCH_NO_RESULTS_MESSAGE:"We couldn't find any results for <b><%= searchQuery %></b>.<br> Check your spelling or try broadening your search.",SEARCH_NO_RESULTS_TITLE_CATEGORY:"No results found in <%= category %>",SEARCH_NO_RESULTS_MESSAGE_CATEGORY:"We couldn't find any results for <b><%= searchQuery %></b>.",SEARCH_NO_RESULTS_ERROR:"Something went wrong",SEARCH_CATEGORY_ERROR:"We weren't able to search this category.",SEARCH_CATEGORY_RESULTS_ARIA_LABEL:"<%= category %> Search results for <%= query %> : <%= count %>",SEARCH_CATEGORY_SUMMARY_ARIA_LABEL:"<%= category %> Search results : <%= count %>",SEARCH_NO_RESULTS_MESSAGE_ERROR:"We weren't able to search this category. Please try again later.",AGREEMENT_ENTERPRISE_HEADER:"Adobe Acrobat Sign"}),define("acplugins/uss-search/js/ops/plugin/initializing-plugin-op",["core/ac-core","files/ac-files","acplugins/uss-search/js/ac-uss-search","i18n!acplugins/uss-search/js/nls/ui-strings","core/ops/op"],function(e,t,i,s){return i.InitializingPluginOp=e.Op.extend({run:function(){var n,o=this.options;return n=e.uiModelFactory.create("PluginsUiModel"),o=_.extend(this.options,{searchViewsUiModel:n,pluginsUiModel:n,actionsUiModel:e.uiModelFactory.create("ActionsUiModel"),sessionUiModel:e.uiModelFactory.create("SessionUiModel"),leftRailUiModel:e.uiModelFactory.create("LeftRailUiModel"),ussSearchModel:e.uiModelFactory.create("USSSearchModel",{},this.options),collectionsUiModel:e.uiModelFactory.create("CollectionsUiModel"),searchUiModel:e.uiModelFactory.create("SearchUiModel"),sortUiModel:e.uiModelFactory.create("SortUiModel"),filesUiModel:t.uiModelFactory.create("FilesUiModel"),selectionUiModel:e.uiModelFactory.create("SelectionUiModel"),recentFolderModel:e.modelFactory.create("FolderModel")}),o.searchUiModel.set("isInSearchResultsView",!0),o.searchUiModel.set("header_aria_label",s.SEARCH_CATEGORY_SUMMARY_ARIA_LABEL),i.opFactory.create("LoadingUSSSearchViewsOp",o).run()}}),i.InitializingPluginOp}),define("pdmplugins/esign/js/models/es-limits-model",["pdmplugins/esign/js/ac-esign","aicx/ac-aicx","aicx/models/aicx-model"],function(e,t){return e.EchoSignLimitsModel=t.AicxModel.extend({url:function(){return t.baseAicUrisModel.get("users")+"users/me/limits/esign"}}),e.EchoSignLimitsModel}),define("pdmplugins/esign/js/models/model-factory",["core/ac-core","pdmplugins/esign/js/ac-esign","core/models/model","pdmplugins/esign/js/models/es-limits-model"],function(e,t){return t.ModelFactory=e.Model.extend({create:function(e,i,s){var n=t[e];return n?new n(i,s):void LOG(0,"AcEchoSign.ModelFactory.create: Unrecognized class: "+e)}}),t.ModelFactory}),define("pdmplugins/esign/js/models/ui/es-auth-ui-model",["core/ac-core","pdmplugins/esign/js/ac-esign","core/models/ui/ui-model"],function(e,t){return t.EchoSignAuthUiModel=e.UiModel.extend({recognized:{access_token:{type:"string",optional:!0},expiration_time:{type:"number",optional:!0},expiration_check_time:{type:"number",optional:!0},auth_status:{type:"string",optional:!0},api_access_point:{type:"string",optional:!0},web_access_point:{type:"string",optional:!0},signin_profile_id:{type:"string",optional:!0},signin_profile_name:{type:"string",optional:!0},loggedin_profile_name:{type:"string",optional:!0}},defaults:{expiration_check_time:12e4,expiration_time:0,auth_status:"",access_token:"",api_access_point:"",web_access_point:"",signin_profile_id:"",signin_profile_name:"",loggedin_profile_name:""},clearLastAuthState:function(){this.set("auth_status","",{silent:!0})},resetToDefaults:function(){this.set(this.defaults,{silent:!0})}}),t.EchoSignAuthUiModel}),define("pdmplugins/esign/js/models/ui/es-doc-upload-progress-ui-model",["core/ac-core","pdmplugins/esign/js/ac-esign","core/models/ui/ui-model"],function(e,t){return t.ESDocUploadProgressUiModel=e.UiModel.extend({recognized:{upload_response:{type:"object",optional:!0},progress_status:{type:"string",optional:!0},progress_obj:{type:"object",optional:!0},bytes_uploaded:{type:"number",optional:!0},bytes_total:{type:"number",optional:!0}},defaults:{upload_response:void 0,progress_status:"",progress_obj:void 0,bytes_uploaded:0,bytes_total:0}}),t.ESDocUploadProgressUiModel}),define("pdmplugins/esign/js/models/ui/es-offline-ui-model",["core/ac-core","pdmplugins/esign/js/ac-esign","core/models/ui/ui-model"],function(e,t){return t.EchoSignOfflineUiModel=e.UiModel.extend({recognized:{is_visible:{type:"boolean",optional:!0},user_action:{type:"string",optional:!0}},defaults:{is_visible:!1,user_action:""},resetToDefaults:function(){this.set(this.defaults,{silent:!0})}}),t.EchoSignOfflineUiModel}),define("pdmplugins/esign/js/models/ui/ui-model-factory",["core/ac-core","pdmplugins/esign/js/ac-esign","core/models/model","pdmplugins/esign/js/models/ui/es-auth-ui-model","pdmplugins/esign/js/models/ui/es-doc-upload-progress-ui-model","pdmplugins/esign/js/models/ui/es-offline-ui-model"],function(e,t){return t.UiModelFactory=e.Model.extend({create:function(e,i,s){var n=t[e];return n?new n(i,s):void LOG(0,"AcEchoSign.UiModelFactory.create: Unrecognized class: "+e)}}),t.UiModelFactory}),define("pdmplugins/esign/js/ops/fetch-existing-es-auth-session-op",["pdmplugins/esign/js/ac-esign","core/ac-core","core/ops/op"],function(e,t){return e.FetchExistingESAuthSessionOp=t.Op.extend({run:function(){var e=(this.options,$.Deferred());return this.options.appApi.rnaApi.done(_.bind(function(t){t.esApi.invokeMethod({methodName:"fetchESAuthSession"}).then(function(t){e.resolve(t)},function(){e.reject()})},this)),e}}),e.FetchExistingESAuthSessionOp}),define("pdmplugins/esign/js/ops/creating-new-es-auth-session-op",["pdmplugins/esign/js/ac-esign","core/ac-core","core/utils/http-util","core/ops/op"],function(e,t,i){var s="";return s+="{",s+='"ims_client_id":"<%= imsClientId %>",',s+='"ims_access_token":"<%= imsAccessToken %>",',s+='"es_client_id":"<%= esClientId %>",',s+='"es_client_secret":"<%= esClientSecret %>"',s+="}",e.CreatingNewESAuthSessionOp=t.Op.extend({run:function(){var e=this.options,t=$.Deferred();return e.appApi.rnaApi.done(_.bind(function(i){e.appApi.sessionApi.ensureSignedIn().then(_.bind(function(){this.createNewSession(i,t)},this),_.bind(function(e){e&&"NoAccessToPdfServices"===e.errorString?this.createNewSession(i,t):t.reject()},this))},this)),t},createNewSession:function(e,t){var n,o,a,r,l,c,d,h,p,u=this.options;if(o=e.esApi.getEchoSignServiceParams(),a=o.baseURL,r=o.esClientId,l=o.esClientSecret,c=u.appApi.options.sessionUiModel.get("primary_token"),d=o.imsClientId,_.isEmpty(a)||_.isEmpty(r)||_.isEmpty(l)||_.isEmpty(c)||_.isEmpty(d))return void t.reject();var g=i.getClientIdQueryParam(),S=g.lastIndexOf("=");n=a+"/api/rest/v6/baseUris",h=_.template(s,{imsAccessToken:c,imsClientId:d,esClientId:r,esClientSecret:l}),p={Authorization:"Bearer "+c,"x-api-client-id":g.substr(S+1)},$.ajax({url:n,modal:!1,global:!1,headers:p,contentType:"application/json",type:"GET",dataType:"json",success:function(e){t.resolve(e)},error:_.bind(function(e){var i=e.responseJSON||{};"INVALID_IMS_PROFILE"===i.code&&void 0!==i.details&&i.details.signProfile.authenticatingAccount===i.details.loggedInProfile.authenticatingAccount?(u.signProfileID=i.details.signProfile.profileId,u.signProfileName=i.details.signProfile.profileName,u.loggedInProfileName=i.details.loggedInProfile.profileName,u.appApi.rnaApi.done(_.bind(function(e){e.esApi.invokeMethod({methodName:"GetEchoSignAccessTokenFromCluster",methodArgs:[i.details.signProfile.profileId,i.details.signProfile.profileName,i.details.loggedInProfile.profileName]}).then(_.bind(function(e){u.accessToken=e.accessToken;var i=(new Date).getTime()/1e3;u.expiresIn=e.expiryTime/1e3-i,p={Authorization:"Bearer "+e.accessToken,"x-api-client-id":g.substr(S+1)},$.ajax({url:n,modal:!1,global:!1,headers:p,contentType:"application/json",type:"GET",dataType:"json",success:_.bind(function(e){e.sign_profile_id=u.signProfileID,e.sign_profile_name=u.signProfileName,e.loggedin_profile_name=u.loggedInProfileName,e.access_token=u.accessToken,e.expires_in=u.expiresIn,t.resolve(e)},this),error:function(){t.reject()}})},this),function(){t.reject(i)})},this))):t.reject()},this)})}}),e.CreatingNewESAuthSessionOp}),define("pdmplugins/esign/js/ops/storing-es-auth-session-op",["pdmplugins/esign/js/ac-esign","core/ac-core","core/ops/op"],function(e,t){return e.StoringESAuthSessionOp=t.Op.extend({run:function(){var e=this.options,t=$.Deferred(),i=e.esAuthUiModel.get("access_token"),s=e.esAuthUiModel.get("expiration_time"),n=e.esAuthUiModel.get("refresh_token"),o=e.esAuthUiModel.get("api_access_point"),a=e.esAuthUiModel.get("web_access_point"),r=e.esAuthUiModel.get("signin_profile_id"),l=e.esAuthUiModel.get("signin_profile_name"),c=e.esAuthUiModel.get("loggedin_profile_name");return this.options.appApi.rnaApi.done(_.bind(function(e){e.esApi.setEchoSignApiURL(o),e.esApi.setEchoSignWebURL(a),e.esApi.invokeMethod({methodName:"storeESAuthSession",methodArgs:[n,i,s.toString(),o,a,r,l,c]}).then(function(){t.resolve()},function(){t.reject()})},this)),t}}),e.StoringESAuthSessionOp}),define("pdmplugins/esign/js/ops/upload-document-to-echosign-op",["pdmplugins/esign/js/ac-esign","core/ac-core","core/ops/op"],function(e,t){return e.UploadDocumentToEchoSignOp=t.Op.extend({UPLOAD_STATES:{STARTED:0,FINISHED:1,QUEUED:2},run:function(){var e,t=this.options,i=$.Deferred();if(_.isEmpty(t.esAccessToken)||_.isEmpty(t.esUploadEndpoint))return this._getRejectedPromise();var s="false";if("true"==t.UploadFssSign)s=t.UploadFssSign;else if(_.isEmpty(t.docToUpload)||_.isEmpty(t.mimeType))return this._getRejectedPromise();var n="";return t.apiVersion&&(n=t.apiVersion),e={file:t.docToUpload._proxy,accessToken:t.esAccessToken,uploadEndpoint:t.esUploadEndpoint,mimeType:t.mimeType,fssSignUpload:s,ApiVersion:n},this.options.appApi.rnaApi.done(_.bind(function(t){t.esApi.invokeMethod({methodName:"uploadDocument",methodArgs:e}).then(function(e){i.resolve(e)},function(e){i.reject(e)})},this)),i}}),e.UploadDocumentToEchoSignOp}),define("pdmplugins/esign/js/ops/listening-for-es-doc-upload-progress-events-op",["pdmplugins/esign/js/ac-esign","core/ac-core","core/ops/op"],function(e,t){var i=e.UploadDocumentToEchoSignOp.prototype.UPLOAD_STATES;return e.ListeningForESDocUploadProgressEventsOp=t.Op.extend({run:function(){var e=this.options,t=e.esDocUploadProgressUiModel,s=t.get("upload_response"),n=t.get("progress_obj");return n?(n._addEventListener("custom:uploadProgress",function(e,n){n.params?(s.status=i.RUNNING,t.set("bytes_uploaded",n.params.bytesWritten),t.set("bytes_total",n.params.bytesTotal),t.set("progress_status","ongoing")):(s.errorSet=!0,s.status=i.FINISHED,t.set("progress_status","finished"))}),n._addEventListener("custom:uploadFinished",function(e,n){n.params?_.isUndefined(n.params.errorCode)||0===n.params.errorCode?(s.respStatusCode=n.params.httpRespCode,_.isEmpty(n.params.respBody)||201!==s.respStatusCode||(s.respBody=JSON.parse(n.params.respBody),void 0!=n.params.clusterTokenFetched&&(s.clusterTokenFetched=JSON.parse(n.params.clusterTokenFetched)))):(s.errorSet=!0,s.errorCode=n.params.errorCode,s.respBody=n.params.respBody,s.respStatusCode=n.params.httpRespCode):s.errorSet=!0,s.status=i.FINISHED,t.set("progress_status","finished")}),this._getResolvedPromise()):(s.errorSet=!0,s.status=i.FINISHED,void t.set("progress_status","finished"))}}),e.ListeningForESDocUploadProgressEventsOp}),define("pdmplugins/esign/js/ops/fetch-es-user-subscription-info-op",["pdmplugins/esign/js/ac-esign","core/ac-core","core/ops/op"],function(e,t){return e.FetchESUserSubscriptionInfoOp=t.Op.extend({run:function(){var e=(this.options,$.Deferred());return this.options.appApi.sessionApi.ensureSignedIn().then(_.bind(function(){this.fetchESUserSubscriptionInfo(e)},this),_.bind(function(t){t&&"NoAccessToPdfServices"===t.errorString?this.fetchESUserSubscriptionInfo(e):e.reject(!1)},this)),e},fetchESUserSubscriptionInfo:function(t){var i,s,n,o=this.options,a=e.opFactory,r=o.esLimitsModel,l=["pro","global","enterprise","team"];s=a.create("GettingESLimitsOp",o),s.run().then(function(){n=r.get("esign_access").toLowerCase(),i=$.inArray(n,l)>-1,t.resolve(i)},function(){t.reject()})}}),e.FetchESUserSubscriptionInfoOp}),define("pdmplugins/esign/js/ops/refreshing-es-auth-session-op",["pdmplugins/esign/js/ac-esign","core/ac-core","core/ops/op"],function(e,t){return e.RefreshingESAuthSessionOp=t.Op.extend({run:function(){var e=this.options,t=$.Deferred(),i={};return 0!==e.esAuthUiModel.get("signin_profile_id").length&&0!==e.esAuthUiModel.get("signin_profile_name").length&&0!==e.esAuthUiModel.get("loggedin_profile_name").length?(i.access_token=e.esAuthUiModel.get("access_token"),i.expires_in=e.esAuthUiModel.get("expiration_time")/1e3):(i.access_token=e.appApi.options.sessionUiModel.get("primary_token"),i.expires_in=e.appApi.options.sessionUiModel.get("expiration_time")),i.token_type="Bearer",t.resolve(i),t}}),e.RefreshingESAuthSessionOp}),define("pdmplugins/esign/js/ops/getting-es-limits-op",["pdmplugins/esign/js/ac-esign","core/ac-core","core/ops/op"],function(e,t){return e.GettingESLimitsOp=t.Op.extend({run:function(){return this.options.esLimitsModel.fetch({modal:!1,global:!1})}}),e.GettingESLimitsOp}),define("pdmplugins/esign/js/api/es-auth-api",["core/ac-core","pdmplugins/esign/js/ac-esign","core/apis/api"],function(e,t){return t.EchoSignAuthApi=e.Api.extend({initialize:function(){e.Api.prototype.initialize.call(this),this._authSessionClients=[],this._initStateMachine(),this._initializeOperationMap()},createAuthSession:function(e){var t=_.extend({},e),i=$.Deferred(),s={promise:i};return this._authSessionClients.push(s),this._fsm.handleEvent("CreateESAuthSession",t),i},clearESAuthSession:function(){this._fsm.handleEvent("ClearESAuthSession",_.extend({},this.options))},evaluateAuthStatus:function(e){var t=_.extend({},e),i=$.Deferred(),s={promise:i};return this._authSessionClients.push(s),this._fsm.handleEvent("CheckESAuthStatus",t),i},isLoggedIn:function(){var e=this.options.esAuthUiModel,t=e.get("access_token"),i=e.get("expiration_time");return this._isESAccessTokenValid(t,i)},handleSessionSignOut:function(){this._fsm.handleEvent("IMSUserLoggedOut",_.extend({},this.options))},handleSessionSignedIn:function(){this._fsm.handleEvent("IMSUserLoggedIn",_.extend({},this.options))},handleNetworkDisconnectedEvent:function(){this._fsm.handleEvent("NetworkDisconnectedEvent",_.extend({},this.options))},_initStateMachine:function(){var e=_.extend({controller:this},this.options);this._fsm=t.fsmFactory.create("EchoSignAuthFSM",e)},_initializeOperationMap:function(){this._opMap=this._opMap||{},this._opMap.FetchESAuthSessionOp=this._fetchESAuthSession,this._opMap.CreateNewESAuthSessionOp=this._createNewESAuthSession,this._opMap.ConvertExpiryTimeToAbsoluteTimeOp=this._convertExpiryTimeToAbsoluteTime,this._opMap.CheckESAuthSessionNeedsRefreshOp=this._checkESAuthSessionNeedsRefresh,this._opMap.RefreshESAuthSessionOp=this._refreshESAuthSession,this._opMap.StoreESAuthSessionOp=this._storeESAuthSession,this._opMap.MarkESAuthSessionInProgressOp=this._markESAuthSessionInProgress,this._opMap.MarkESUserAuthenticatedOp=this._markESUserAuthenticated,this._opMap.MarkESUserNotAuthenticatedOp=this._markESUserNotAuthenticated,this._opMap.NotifyESAuthSuccessToClientsOp=this._notifyESAuthSuccessToClients,this._opMap.NotifyESAuthFailureToClientsOp=this._notifyESAuthFailureToClients,this._opMap.ClearESAuthSessionOp=this._clearESAuthSession},_invokeOperation:function(e){var t=e.opName;if(this._opMap){var i=this._opMap[t];i.call(this,e)}},_fetchESAuthSession:function(e){t.opFactory.create("FetchExistingESAuthSessionOp",this.options).run().then(_.bind(function(t){this.options.appApi.rnaApi.done(_.bind(function(i){this.options.appApi.rnaApi.accessToken=t.accessToken,e.es_access_token=t.accessToken,e.es_refresh_token=t.refreshToken,e.es_token_expiry_time=t.expiryTime,e.es_api_access_point=t.signApiUrl,e.es_web_access_point=t.signWebUrl,e.es_t2e_signIn_profile_id=t.signProfileID,e.es_t2e_signIn_profile_name=t.signProfileName,e.es_t2e_loggedin_profile_name=t.loggedinProfileName,i.esApi.setEchoSignApiURL(t.signApiUrl),i.esApi.setEchoSignWebURL(t.signWebUrl),_.isEmpty(e.es_access_token)||_.isEmpty(e.es_api_access_point)?this._fsm.handleEvent("ESAuthSessionDoesNotExists",e):this._fsm.handleEvent("ESAuthSessionExists",e)
},this))},this),_.bind(function(){this._fsm.handleEvent("ESAuthSessionDoesNotExists",e)},this))},_createNewESAuthSession:function(e){t.opFactory.create("CreatingNewESAuthSessionOp",this.options).run().then(_.bind(function(t){"undefined"!=typeof t.sign_profile_id&&0!==t.sign_profile_id.length&&"undefined"!=typeof t.sign_profile_name&&0!==t.sign_profile_name.length&&"undefined"!=typeof t.loggedin_profile_name&&0!==t.loggedin_profile_name.length?(e.es_access_token=t.access_token,e.es_refresh_token="",e.es_token_expiry_time=t.expires_in,e.es_t2e_signIn_profile_id=t.sign_profile_id,e.es_t2e_signIn_profile_name=t.sign_profile_name,e.es_t2e_loggedin_profile_name=t.loggedin_profile_name):(e.es_access_token=e.appApi.options.sessionUiModel.get("primary_token"),e.es_refresh_token="",e.es_token_expiry_time=e.appApi.options.sessionUiModel.get("expiration_time"),e.es_t2e_signIn_profile_id="",e.es_t2e_signIn_profile_name="",e.es_t2e_loggedin_profile_name=""),e.es_token_type="Bearer";var i=t.apiAccessPoint,s=t.webAccessPoint;"/"==i.charAt(i.length-1)&&(i=i.slice(0,-1)),"/"==s.charAt(s.length-1)&&(s=s.slice(0,-1)),e.es_api_access_point=i,e.es_web_access_point=s,this.options.appApi.rnaApi.done(_.bind(function(e){e.esApi.setEchoSignApiURL(i),e.esApi.setEchoSignWebURL(s)},this)),e.es_error_code=t.error_code,e.es_error_msg=t.error_msg,this._fsm.handleEvent("ESAuthSessionCreateSuccess",e)},this),_.bind(function(){this._fsm.handleEvent("ESAuthSessionCreateFailure",e)},this))},_convertExpiryTimeToAbsoluteTime:function(e){var t=e.es_token_expiry_time,i=new Date;i.setTime(i.getTime()+1e3*t),e.es_token_expiry_time=i.getTime()},_checkESAuthSessionNeedsRefresh:function(e){var t=e.es_token_expiry_time;this._shouldRefreshESAccessToken(t)?this._fsm.handleEvent("ESAuthSessionNeedsRefresh",e):this._fsm.handleEvent("ESAuthSessionNeedsNoRefresh",e)},_refreshESAuthSession:function(e){var i=_.extend({},this.options,{es_refresh_token:e.es_refresh_token});t.opFactory.create("RefreshingESAuthSessionOp",i).run().then(_.bind(function(t){e.es_access_token=t.access_token,e.es_token_expiry_time=t.expires_in,e.es_token_type=t.token_type,this._fsm.handleEvent("ESAuthSessionRefreshSuccess",e)},this),_.bind(function(){this._fsm.handleEvent("ESAuthSessionRefreshFailure",e)},this))},_storeESAuthSession:function(){t.opFactory.create("StoringESAuthSessionOp",this.options).run()},_markESAuthSessionInProgress:function(){var e=this.options.esAuthUiModel;e.clearLastAuthState(),e.set("auth_status","in_progress")},_markESUserAuthenticated:function(e){var t=this.options.esAuthUiModel;t.clearLastAuthState(),t.set("access_token",e.es_access_token),t.set("expiration_time",e.es_token_expiry_time),t.set("refresh_token",e.es_refresh_token),t.set("signin_profile_id",e.es_t2e_signIn_profile_id),t.set("signin_profile_name",e.es_t2e_signIn_profile_name),t.set("loggedin_profile_name",e.es_t2e_loggedin_profile_name),t.set("api_access_point",e.es_api_access_point),t.set("web_access_point",e.es_web_access_point),t.set("auth_status","success")},_markESUserNotAuthenticated:function(){var e=this.options.esAuthUiModel;e.clearLastAuthState(),e.set("access_token",""),e.set("signin_profile_id",""),e.set("signin_profile_name",""),e.set("loggedin_profile_name",""),e.set("expiration_time",Number.NaN),e.set("auth_status","failure")},_notifyESAuthSuccessToClients:function(){_.each(this._authSessionClients,function(e){e.promise.resolve()})},_notifyESAuthFailureToClients:function(){_.each(this._authSessionClients,function(e){e.promise.reject()})},_clearESAuthSession:function(){this.options.esAuthUiModel.resetToDefaults(),this.options.appApi.rnaApi.done(_.bind(function(e){e.esApi.invokeMethod({methodName:"clearESAuthSession"})},this))},_isESAccessTokenValid:function(e,t){return _.isEmpty(e)?!1:this._getTimeDiffInESAccessTokenAndCurrentTime(t)>0},_shouldRefreshESAccessToken:function(e){var t=this._getTimeDiffInESAccessTokenAndCurrentTime(e);if(t>0){var i=this.options.esAuthUiModel,s=i.get("expiration_check_time");t-=s}return 0>=t},_getTimeDiffInESAccessTokenAndCurrentTime:function(e){var t=0,i=new Date;return 0>=e?t:t=e-i.getTime()}}),t.EchoSignAuthApi}),define("pdmplugins/esign/js/api/es-api",["core/ac-core","pdmplugins/esign/js/ac-esign","core/apis/api","pdmplugins/esign/js/api/es-auth-api"],function(e,t){return t.EchoSignApi=e.Api.extend({initialize:function(){var i=this.options;e.Api.prototype.initialize.call(this),this.authApi=new t.EchoSignAuthApi(i)}}),t.EchoSignApi}),define("pdmplugins/esign/js/ops/initializing-op",["pdmplugins/esign/js/ac-esign","core/ac-core","pdmplugins/esign/js/api/es-api","core/ops/op"],function(e,t){return e.InitializingOp=t.Op.extend({run:function(){var t=this.options,i=e.modelFactory,s=e.uiModelFactory;_.extend(t,{esLimitsModel:i.create("EchoSignLimitsModel"),esAuthUiModel:s.create("EchoSignAuthUiModel"),esOfflineUiModel:s.create("EchoSignOfflineUiModel")}),e.esApi=new e.EchoSignApi(t)}}),e.InitializingOp}),define("pdmplugins/esign/js/ops/logout-es-web-session-op",["pdmplugins/esign/js/ac-esign","core/ac-core","core/ops/op"],function(e,t){return e.LogOutESWebSessionOp=t.Op.extend({run:function(){var e,t,i,s=$.Deferred();return this.options.appApi.rnaApi.done(_.bind(function(n){return e=n.esApi.getEchoSignServiceParams(),t=e.webURL,console.log(t),_.isEmpty(t)?void s.reject():(i=t+"/public/logout",$("body").append("<div><iframe class='es-logout-frame' src='"+i+"'></iframe></div>"),void $(".es-logout-frame").load(_.bind(function(){n.esApi.invokeMethod({methodName:"unloadESLogoutWebFrame"})},this)))},this)),s}}),e.LogOutESWebSessionOp}),define("pdmplugins/esign/js/ops/cancel-upload-to-echosign-op",["pdmplugins/esign/js/ac-esign","core/ac-core","core/ops/op"],function(e,t){return e.CancelUploadToEchoSignOp=t.Op.extend({run:function(){var e=$.Deferred();return this.options.appApi.rnaApi.done(_.bind(function(t){t.esApi.invokeMethod({methodName:"cancelAllUploadWorkflows"}).then(function(){e.resolve()},function(){e.reject()})},this)),e}}),e.CancelUploadToEchoSignOp}),define("pdmplugins/esign/js/ops/op-factory",["core/ac-core","pdmplugins/esign/js/ac-esign","pdmplugins/esign/js/ops/fetch-existing-es-auth-session-op","pdmplugins/esign/js/ops/creating-new-es-auth-session-op","pdmplugins/esign/js/ops/storing-es-auth-session-op","pdmplugins/esign/js/ops/upload-document-to-echosign-op","pdmplugins/esign/js/ops/listening-for-es-doc-upload-progress-events-op","pdmplugins/esign/js/ops/fetch-es-user-subscription-info-op","pdmplugins/esign/js/ops/refreshing-es-auth-session-op","pdmplugins/esign/js/ops/getting-es-limits-op","pdmplugins/esign/js/ops/initializing-op","pdmplugins/esign/js/ops/logout-es-web-session-op","pdmplugins/esign/js/ops/cancel-upload-to-echosign-op"],function(e,t){return t.OpFactory=e.Op.extend({create:function(e,i){var s=t[e];return s?new s(i):void LOG(0,"AcEchoSign.OpFactory.create: Unrecognized class: "+e)}}),t.OpFactory}),define("pdmplugins/esign/js/fsm/fsm",["core/ac-core"],function(e){return e.FSM=Backbone.View.extend({SPECIAL_FSM_STATE:"*",initialize:function(){Backbone.View.prototype.initialize.call(this),this.cid=_.uniqueId("op"),delete this.options.viewId,delete this.$el,delete this.el,_.bindAll(this),this._stateEventTransitionTable=[],this._supportedStates=[],this._currentState=void 0,this._previousState=void 0,this._initFSM()},handleEvent:function(e,t){var i=this._getCurrentState(),s=!1;if(this._isSupportedState(i)){var n=this._getEventHandlerForState(i,e);return n?(n=_.bind(n,this),s=n(t)):s}},_initFSM:function(){},_getController:function(){return this.options.controller},_getSupportedStates:function(){return this._supportedStates},_setSupportedStates:function(e){this._supportedStates=e},_isSupportedState:function(e){var t=this._getSupportedStates(),i=_.contains(t,e);return i},_setPreviousState:function(e){this._previousState=e},_getPreviousState:function(){return this._previousState},_getCurrentState:function(){return this._currentState},_setCurrentState:function(e){this._isSupportedState(e)&&(this._setPreviousState(this._currentState),this._currentState=e)},_defineTransition:function(e,t,i){var s={state:e,eventName:t,eventHandler:i};this._stateEventTransitionTable.push(s)},_getEventHandlerForState:function(e,t){var i=_.find(this._stateEventTransitionTable,_.bind(function(i){return i.state===e&&i.eventName===t},this));return _.isEmpty(i)&&(i=_.find(this._stateEventTransitionTable,_.bind(function(e){return e.state===this.SPECIAL_FSM_STATE&&e.eventName===t},this))),i?i.eventHandler:void 0},_invokeController:function(e,t){t=t||{};var i=this._getController();if(i){var s=_.extend(t,{opName:e});i._invokeOperation(s)}}}),e.FSM}),define("pdmplugins/esign/js/fsm/es-auth-fsm",["core/ac-core","pdmplugins/esign/js/fsm/fsm","pdmplugins/esign/js/ac-esign"],function(e,t,i){var s={IDLE:0,FETCHING_EXISTING_ES_AUTH_SESSION_STATUS:1,WAITING_FOR_NEW_ES_AUTH_SESSION_TO_CREATE:2,CHECKING_ES_AUTH_SESSION_NEED_TO_REFRESH:3,WAITING_FOR_ES_AUTH_SESSION_TO_REFRESH:4};return i.EchoSignAuthFSM=t.extend({_initFSM:function(){this._setSupportedStates(_.values(s)),this._setCurrentState(s.IDLE),this._defineEventTransitions()},_defineEventTransitions:function(){this._defineTransition(s.IDLE,"CreateESAuthSession",function(e){e.creatingESAuthSession=!0,this._setCurrentState(s.FETCHING_EXISTING_ES_AUTH_SESSION_STATUS),this._invokeController("FetchESAuthSessionOp",e)}),this._defineTransition(s.IDLE,"CheckESAuthStatus",function(e){e.checkingESAuthSession=!0,this._setCurrentState(s.FETCHING_EXISTING_ES_AUTH_SESSION_STATUS),this._invokeController("FetchESAuthSessionOp",e)}),this._defineTransition(s.FETCHING_EXISTING_ES_AUTH_SESSION_STATUS,"ESAuthSessionExists",function(e){this._setCurrentState(s.CHECKING_ES_AUTH_SESSION_NEED_TO_REFRESH),this._invokeController("CheckESAuthSessionNeedsRefreshOp",e)}),this._defineTransition(s.FETCHING_EXISTING_ES_AUTH_SESSION_STATUS,"ESAuthSessionDoesNotExists",function(e){e.creatingESAuthSession?(this._setCurrentState(s.WAITING_FOR_NEW_ES_AUTH_SESSION_TO_CREATE),this._invokeController("MarkESAuthSessionInProgressOp",e),this._invokeController("CreateNewESAuthSessionOp",e)):e.checkingESAuthSession&&(this._setCurrentState(s.IDLE),this._invokeController("MarkESUserNotAuthenticatedOp",e),this._invokeController("NotifyESAuthFailureToClientsOp",e))}),this._defineTransition(s.CHECKING_ES_AUTH_SESSION_NEED_TO_REFRESH,"ESAuthSessionNeedsRefresh",function(e){e.creatingESAuthSession?(this._setCurrentState(s.WAITING_FOR_ES_AUTH_SESSION_TO_REFRESH),this._invokeController("RefreshESAuthSessionOp",e)):e.checkingESAuthSession&&(this._setCurrentState(s.IDLE),this._invokeController("MarkESUserNotAuthenticatedOp",e),this._invokeController("NotifyESAuthFailureToClientsOp",e))}),this._defineTransition(s.CHECKING_ES_AUTH_SESSION_NEED_TO_REFRESH,"ESAuthSessionNeedsNoRefresh",function(e){this._setCurrentState(s.IDLE),this._invokeController("MarkESUserAuthenticatedOp",e),this._invokeController("NotifyESAuthSuccessToClientsOp",e)}),this._defineTransition(s.WAITING_FOR_NEW_ES_AUTH_SESSION_TO_CREATE,"ESAuthSessionCreateSuccess",function(e){this._setCurrentState(s.IDLE),this._invokeController("ConvertExpiryTimeToAbsoluteTimeOp",e),this._invokeController("MarkESUserAuthenticatedOp",e),this._invokeController("StoreESAuthSessionOp",e),this._invokeController("NotifyESAuthSuccessToClientsOp",e)}),this._defineTransition(s.WAITING_FOR_NEW_ES_AUTH_SESSION_TO_CREATE,"ESAuthSessionCreateFailure",function(e){this._setCurrentState(s.IDLE),this._invokeController("MarkESUserNotAuthenticatedOp",e),this._invokeController("NotifyESAuthFailureToClientsOp",e),this._invokeController("ClearESAuthSessionOp",e)}),this._defineTransition(s.WAITING_FOR_ES_AUTH_SESSION_TO_REFRESH,"ESAuthSessionRefreshSuccess",function(e){this._setCurrentState(s.IDLE),this._invokeController("ConvertExpiryTimeToAbsoluteTimeOp",e),this._invokeController("MarkESUserAuthenticatedOp",e),this._invokeController("StoreESAuthSessionOp",e),this._invokeController("NotifyESAuthSuccessToClientsOp",e)}),this._defineTransition(s.WAITING_FOR_ES_AUTH_SESSION_TO_REFRESH,"ESAuthSessionRefreshFailure",function(e){this._setCurrentState(s.IDLE),this._invokeController("MarkESUserNotAuthenticatedOp",e),this._invokeController("NotifyESAuthFailureToClientsOp",e),this._invokeController("ClearESAuthSessionOp",e)}),this._defineTransition(s.IDLE,"ClearESAuthSession",function(e){this._setCurrentState(s.IDLE),this._invokeController("ClearESAuthSessionOp",e)}),this._defineTransition(this.SPECIAL_FSM_STATE,"SessionSignOut",function(){this._setCurrentState(s.IDLE)}),this._defineTransition(this.SPECIAL_FSM_STATE,"NetworkDisconnectedEvent",function(){this._setCurrentState(s.IDLE)})}}),i.EchoSignAuthFSM}),define("pdmplugins/esign/js/fsm/fsm-factory",["core/ac-core","pdmplugins/esign/js/ac-esign","pdmplugins/esign/js/fsm/fsm","pdmplugins/esign/js/fsm/es-auth-fsm"],function(e,t,i){return t.FSMFactory=i.extend({create:function(e,i){var s=t[e];return s?new s(i):void LOG(0,"AcEchoSign.OpFactory.create: Unrecognized class: "+e)}}),t.FSMFactory}),define("pdmplugins/esign/js/ac-esign-init",["pdmplugins/esign/js/ac-esign","pdmplugins/esign/js/models/model-factory","pdmplugins/esign/js/models/ui/ui-model-factory","pdmplugins/esign/js/ops/op-factory","pdmplugins/esign/js/fsm/fsm-factory"],function(e){return _.extend(e,{modelFactory:new e.ModelFactory,uiModelFactory:new e.UiModelFactory,opFactory:new e.OpFactory,fsmFactory:new e.FSMFactory}),e}),define("acplugins/signatures/js/models/ui/collections-ui-model",["core/ac-core","acplugins/signatures/js/ac-signature","core/models/workflow-status-strings","core/models/ui/ui-model"],function(e,t){var i="list",s="thumbnail";return t.CollectionsUiModel=e.UiModel.extend({recognized:{checkbox:{type:"boolean",optional:!1},data_render_delay:{type:"number",optional:!1},scroll_duration:{type:"number",optional:!1},scroll_id_into_view:{type:"string",optional:!0},scroll_render_delay:{type:"number",optional:!1},scroll_listen_delay:{type:"number",optional:!1},view:{type:"string",optional:!1,choices:[i,s]},folders_only:{type:"boolean",optional:!1},filter_by_extension:{type:"array",optional:!1},mode:{type:"string",optional:!1,choices:["desktop","web"]},itemClickAction:{type:"string",optional:!1,choices:["open","select"]},itemDblClickAction:{type:"string",optional:!1,choices:["preview","open"]},show_empty:{type:"boolean",optional:!1},index_last_selected:{type:"number",optional:!1},sort_key:{type:"string",optional:!1},sort_order:{type:"string",optional:!1}},defaults:{checkbox:!0,data_render_delay:10,scroll_duration:250,scroll_render_delay:250,scroll_listen_delay:250,view:i,folders_only:!1,filter_by_extension:[],mode:"web",itemClickAction:"select",itemDblClickAction:"open",show_empty:!1,index_last_selected:-1,sort_key:"",sort_order:""},initializeFromCohorts:function(e){e&&e["ts-a12-ui"]&&this.set({mode:"enabled"===e["ts-a12-ui"]?"desktop":"web"})},isListView:function(){return this.get("view")===i},isThumbnailView:function(){return this.get("view")===s}},{VIEW_LIST:i,VIEW_THUMBNAIL:s}),t.CollectionsUiModel}),define("acplugins/signatures/js/ops/plugin/listening-for-parcel-updates-op",["core/ac-core","acplugins/signatures/js/ac-signature","core/ops/op","core/views/view-events"],function(e,t){t.ListeningForParcelUpdatesOp=e.Op.extend({initialize:function(){e.Op.prototype.initialize.call(this)},run:function(){return this.options.appApi.notificationApi.addFolderNotificationCallback(this._getFolder(),_.bind(function(e){e.fetch()},this,this.options.parcelCollection)),this._getResolvedPromise()},_getFolder:function(){return this.options.parcelCollection.folder}})}),define("acplugins/signatures/js/ops/plugin/starting-plugin-op",["core/ac-core","files/ac-files","acplugins/signatures/js/ac-signature","pdmplugins/esign/js/ac-esign","acplugins/signatures/js/models/ui/collections-ui-model","core/collections/parcel-collection","acplugins/signatures/js/ops/plugin/listening-for-parcel-updates-op","core/ops/op"],function(e,t,i){var s;i.StartingPluginOp=e.Op.extend({run:function(){void 0===s&&(s=!0);{var t,n,o,a,r,l=this.options;e.modelFactory,e.uiModelFactory}return t=i.opFactory,this.options.esInitialized||t.create("InitializeEchoSignOp",l).run(),o=t.create("GettingParcelsOp",l),r=t.create("ListeningForParcelUpdatesOp",l),s===!0&&(s=!1,a=i.opFactory.create("ListeningForViewEventsOp",l),$.when(a.run())),n=t.create("ShowingSignInOp",l),n.run().then(function(){return o.run()},function(){})}})}),define("acplugins/signatures/js/views/view-events",["acplugins/signatures/js/ac-signature"],function(e){e.ViewEvents={DELETE:"ts:delete",DOWNLOAD_PARCEL_ASSETS:"ts:download",UNSHARE:"ts:unshare",TRACK:"ts:track",OPENBROWSER:"ts:openbrowser",SHOW_SINGLE_ASSET:"ts:show_single_asset",FORWARD:"ts:forward",SAVEAS_SINGLE_ASSET:"ts:saveas_single_asset",GET_RHP_PREVIEW_METADATA:"ts:get_rhp_preview_metadata"}}),define("acplugins/signatures/js/ops/plugin/listening-for-view-events-op",["core/ac-core","acplugins/signatures/js/ac-signature","core/ops/op","acplugins/signatures/js/views/view-events","core/views/view-events"],function(e,t){t.ListeningForViewEventsOp=e.Op.extend({initialize:function(){e.Op.prototype.initialize.call(this),this._initEventMap()},run:function(){return this.options.rootView.on("all",this._onViewEvent),this._deferred=$.Deferred(),this._deferred.promise()},_onViewEvent:function(e,t){var i,s,n,o;i=this._eventMap[e],i&&(s=i[0].create(i[1],t)),s&&(n=s.options,n&&(o=n.parentDeferred),s.run().then(function(){o&&o.resolve()},function(){o&&o.reject()}))},_mapEvent:function(e,t,i,s,n){e[t]=[i,s,n]},_initEventMap:function(){var i,s,n,o,a,r;i=this._eventMap={},s=this._mapEvent,n=e.opFactory,o=t.opFactory,a=e.ViewEvents,r=t.ViewEvents,s(i,a.SELECT_ITEM,o,"SelectingCollectionItemOp"),s(i,a.CLEAR_SELECTION,n,"ClearingSelectionOp"),s(i,r.DELETE,o,"DeletingParcelIfConfirmedOp"),s(i,r.DOWNLOAD_PARCEL_ASSETS,o,"DownloadingParcelAssetsOp"),s(i,a.DOWNLOAD,n,"DownloadingAssetIfExistsOp"),s(i,r.UNSHARE,o,"UnsharingParcelIfConfirmedOp"),s(i,r.TRACK,o,"ShowingParcelPreviewOp"),s(i,r.OPENBROWSER,o,"DesktopShowInBrowserOp"),s(i,r.SHOW_SINGLE_ASSET,o,"ShowingSingleAssetOp"),s(i,r.FORWARD,o,"ForwardingParcelOp"),s(i,r.SAVEAS_SINGLE_ASSET,o,"SaveAsSingleAssetOp"),s(i,r.GET_RHP_PREVIEW_METADATA,o,"GettingRhpPreviewMetadataOp")}})}),define("acplugins/signatures/js/ops/getting/getting-parcels-op",["core/ac-core","acplugins/signatures/js/ac-signature","core/collections/parcel-collection","core/ops/op"],function(e,t){t.GettingParcelsOp=e.Op.extend({run:function(){var e,t,i=this.options;return e=i.parcelCollection,e&&(t=e.fetch()),t}})}),define("acplugins/signatures/js/ops/getting/getting-rhp-preview-metadata-op",["core/ac-core","acplugins/signatures/js/ac-signature","core/ops/op"],function(e,t){return t.GettingRhpPreviewMetadataOp=e.Op.extend({run:function(){function t(){var e=c.get("item_model");return e?e.getSingleFileId():void 0}function i(){return o===t()}function s(e){return l.getConnectorsUiHelpers(l.getConnectorName(e))}function n(e){return d.create("GettingFolderPathOp",r).run(e).then(function(e){i()&&(a=e.path,c.set("file_path",a),c.set("connector_info",s(a[0].id)))})}var o,a,r=this.options,l=r.appApi.connectorsApi,c=r.rhpPreviewUiModel,d=e.opFactory;return o=t(),o?d.create("GettingAssetMetadataOp",r).run(o).then(function(e){return i()?(c.set({item_info:e,page_count:e.page_count}),n(e.parent_id)):void 0},function(e){404===e.status&&c.set("item_not_found",!0)}):this._getRejectedPromise()}}),t.GettingRhpPreviewMetadataOp}),define("acplugins/signatures/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/signatures/js/nls/root/ui-strings",{SELECTOR_LABEL:"For Signature",SELECTOR_LABEL_WEB:"Sent",TOOL_LABEL:"Send",SEND_TRACK_LABEL:"Send & Track",SIGN_HEADER:"Shared For Signature",TYPE:"Type",ADDED_DATE:"Added",MODIFIED_DATE:"Modified",PAGES:"Pages",SIZE:"Size",SENDER_NAME:"Sent By",SENT_DATE:"Date Sent",REPORT_ABUSE:"Report Abuse",UNKNOWN:"Unknown",EXTENSION:"(.<%- ext %>)",DOWNLOAD:"Download",DOWNLOAD_ALL:"Download All",REPLY:"Reply",FORWARD:"Forward",NOTIFY_ME_WHEN_VIEWED:"Notify when recipients viewed",UNSHARE:"Unshare",VIEWED_BY:"Viewed By",VIEW_FULL_ACTIVITY:"View Full Activity",EMAIL_REPLY_FORMAT:"Re: <%= emailSubject %>",OPEN:"Open",SAVEAS:"Save As",TRACK:"Track Online",OPEN_LINK:"(Open Link)",MESSAGE_HEADING:"Message",REMOVE:"Remove",FILE_NAME:"NAME",MODIFIED:"SENT / RECEIVED",COMPANY:"COMPANY",PEOPLE:"PEOPLE",PARCEL_PUBLIC_SHARING:"Anonymous",EXPAND:"Expand",COLLAPSE:"Collapse",SELECT_ALL:"Select All",STATUS:"STATUS",NUMBER_OF_VIEWS:"Number of Views",SIGNED:"Signed",GO_TO_ADOBE_SEND_WEBSITE:"Go To Adobe Send Website",GO_TO_ADOBE_S_T_WEBSITE:"Manage Documents Sent for Signature",DATE_VIEWED:"Date Viewed",CONFIRM_UNSHARE_TITLE:"Unshare",CONFIRM_UNSHARE_MSG_ONE_ITEM:"Your files will not longer be viewable to your recipients. Are you sure you want to unshare?",CONFIRM_UNSHARE_MSG_N_ITEMS:"Your files will not longer be viewable to your recipients. Are you sure you want to unshare?",CONFIRM_REMOVE_TITLE:"Remove",CONFIRM_REMOVE_MSG_ONE_ITEM:"Are you sure you want to remove these files from the sent list? By removing the files, they will be unshared and removed from this list, but will not be deleted from your library.",CONFIRM_REMOVE_MSG_N_ITEMS:"Are you sure you want to remove these files from the sent list? By removing the files, they will be unshared and removed from this list, but will not be deleted from your library.",NO_FILES_TITLE:"No Files",NO_FILES_MESSAGE:"There are no files available to download. The files may have been deleted.",SHARE_TITLE:"Send Files",SHARE_WELCOME:"Send and track large files online.",SHARE_WELCOME_DESKTOP:"The fast, easy way to share and monitor files.",SHARE_SELECT_FILES:"Select Files to Send",SHARE_VIEW_SHARED_FILES:"View All Sent Files",READER_FILESELECT_WINDOW_TITLE:"Select Files",READER_FILESELECT_CONTINUE_BUTTON:"Continue",ALL_SUPPORTED_FILES:"All supported files",CHOOSE_FILES:"Choose Files",ALL_SUPPORTED_FILES:"All supported files",FILE:"file",FILES:"files",UPLOADING_TO_SEND:"Uploading to Adobe Document Cloud...",SELECTED_FILES:"Selected Files",ADD_MORE_FILES:"Add Files",SHARE_WITH_HEADING:"Send To",SHARE_ADDRESS_BOOK:"Address Book",SHARE_CHOICE_WORLD:"Create Anonymous Link",SHARE_CHIOCE_WORLD_EXPLAIN:"(with basic usage information)",SHARE_CHOICE_INDIVIDUAL:"Send Personalized Invitations",SHARE_CHOICE_INDIVIDUAL_EXPLAIN:"(with detailed tracking)",SHARE_CHOICE_ALLOW_COMMENTS:"Allow Comments",SHARE_CHOICE_CUSTOMIZE_RECIPIENT_PAGE:"Add Your Logo & Color",SHARE_CHOICE_CUSTOMIZE_RECIPIENT_PAGE_EDIT:"Edit",SHARE_ADDRESS_HEADING:"Recipient Email Addresses",SHARE_ADDRESS_PROMPT:"Enter recipient email addresses",SHARE_SUBJECT_MSG_HEADING:"Subject & Message",SHARE_INITIAL_SUBJECT:"Shared Files",SHARE_AV_ERROR:"Audio/video files are not supported for sending, and have been omitted from your selection.",SHARE_AV_UPGRADE_MESSAGE:" Upgrade to be able to send audio/video files.",SHARE_FORMS_ERROR:"Form files are not currently supported for sending. Go to Fill & Sign to find and download the form.",SHARE_FORMS_ERROR_DESKTOP:"This file type is currently not supported and has been omitted from your selection.",SHARE_AV_FORMS_ERROR:"Audio/video and form files are not supported for sending, and have been omitted from your selection.",SHARE_OVER_LIMIT_APPEND_ERROR:"<br/><br/>Additionally, you selected more than <%- limit %> files. Files beyond that limit have been omitted.",SHARE_OVER_LIMIT_ERROR:"You selected more than <%- limit %> files. Files beyond that limit have been omitted.",SHARE_OVER_LIMIT_TITLE:"Too many files.",SHARE_NON_NATIVE_APPEND_ERROR:"<br/><br/>Additionally, your selection included files stored in one or more unsupported storage locations, and have been omitted.",SHARE_NON_NATIVE_ERROR:"Send & Track is currently not supported for files stored in <%= connectorLabel %>. To send files from <%= connectorLabel %>, save them to your computer first.",SHARE_NON_NATIVE_ERROR_DEFAULT:"Your selection included files stored in one or more unsupported storage locations, and have been omitted.",SHARE_NON_NATIVE_ERROR_HEADING:"Unsupported File Storage",SHARE_MESSAGE_HEADING:"Message",SHARE_MESSAGE_PROMPT:"I have shared some files with you. Please click on the link to view and download them.",SHARE_BUTTON:"Send",SHARE_BUTTON_LINK:"Create Link",SHARE_CANCEL:"Cancel",SHARE_EMAIL_INVALID_PLURAL:"The following email addresses are invalid:",SHARE_EMAIL_INVALID_SINGULAR:"The following email address is invalid:",SHARE_ERROR_SEND_LIMIT_EXCEEDED_TITLE:"Not sent",SHARE_ERROR_SEND_LIMIT_EXCEEDED:"The number of recipients you have selected exceeds your recent limit. Reduce the number of recipients, or wait until later to try again.",SHARE_ERROR_UNSUPPORTED_SHARING_MIME_TYPE:"Audio/video files aren't supported.",SHARE_ERROR_RECIPIENTS_NOT_ALLOWED:"Please upgrade to send to individuals.",SHARE_ERROR_CANNOT_CONVERT_FORM:"Files could not be sent because the form file could not be converted to pdf.",SHARE_ERROR_CANNOT_CONVERT_FORM_RESTRICTION:"Files could not be sent because the form file could not be converted to pdf.",SHARE_ERROR_CANNOT_CONVERT_FORM_TIMEOUT:"Files could not be sent because the form file conversion to PDF timed out.",SHARE_INDIVIDUAL_HELP_WEB:"Note: Personalized links are unique to each recipient, but anyone the recipient shares those links with can access the documents.",SHARE_INDIVIDUAL_HELP:"Note: Personalized invitations are unique to each recipient, but anyone the recipient shares those invitations with can access the documents.",SHARE_UPLOAD_ERROR_TITLE:"Error uploading files",SHARE_UPLOAD_ERROR_MSG:"One or more files could not be uploaded. Please try again.",SHARE_NO_FILES_SELECTED:"There are currently no files selected.",SHARE_CLICK_TO_ADD_FILES:"Click the Add Files button to get started.",SHARE_RECIPIENT_PAGE_HEADLINE:"Recipient Page",SHARE_CHOICE_INCLUDE_MESSAGE:"Include Message Text",SHARE_CHOICE_RESPOND_BACK:"Include Reply-To",SHARE_REMOVE:"Remove",ADD_FILES_REJECTED_TITLE:"Invalid Filename Format",ADD_FILES_REJECTED_MESSAGE:"Files must have a file name extension or be a known file type to be sent. Please ensure that your filename includes a valid file extension.",SHARE_PUBLIC_LINK_HEADING_DESKTOP:"Distribute the anonymous link by:",SHARE_COPY_LINK_BUTTON:"Copy Link",SHARE_SUCCESS_SENT_LINK:"Go to Sent Files",SHARE_SUCCESS_SENT_LINK_FOOTER:"to view all previously sent files",READER_GO_URL:"http://www.adobe.com/go/sendpluginrdr_12_0_0",ACROBAT_GO_URL:"http://www.adobe.com/go/sendpluginacro_12_0_0",SEND_UPSELL_HEADLINE:"Upgrade To",SEND_UPSELL_HEADLINE_OLD:"Upgrade to:",SEND_UPSELL_POINT_1:"• Send large files, including documents and videos",SEND_UPSELL_POINT_2:"• Receive an email when files are viewed",SEND_UPSELL_POINT_3:"• Track downloads using an online dashboard",SEND_UPSELL_LATER:"Later",SEND_UPSELL_NOW:"Upgrade Now",SEND_UPSELL_LEARN_MORE:"Learn More",SEND_UPSELL_UPGRADE_REQUIRED:"Unsupported Files",SHARE_TOO_MANY_DLG_TITLE:"Too many email addresses",SHARE_TOO_MANU_DLG_MESSAGE:"You've entered <%=numRecipients%> email addresses, but you can only send to <%=maxRecipients%> at a time. Delete some addresses and try again.",SHARE_SUCCESS_DLG_TITLE:"Files Shared",SHARE_PUBLIC_LINK_HEADING:"Anonymous Link Generated",SHARE_EMAIL_LINK_BUTTON:"Email Link",SHARE_PUBLIC_LINK_MESSAGE:"Anyone with the link will access the files anonymously.",SHARE_PUBLIC_LINK_NO_COPY_OR_EMAIL_WARNING:"You have not yet copied or emailed the link. Are you sure you want to continue?",SHARE_PUBLIC_LINK_INSTRUCTIONS:"Copy the link below to email or share it with others. Anyone who uses the link will be able to access the files.",SHARE_INVITATIONS_HEADING:"Invitations Sent",SHARE_INVITATIONS_MESSAGE:"Each recipient will receive a link by email, and you will be notified when they follow the link.",SHARE_SUCCESS_CLOSE:"Close",SHARE_SUCCESS_CONTINUE:"Continue",SHARE_FILE_EMAIL_BODY:"I'm using Adobe Send. You can view my file by clicking on the link below:",SHARE_FILES_EMAIL_BODY:"I'm using Adobe Send. You can view my files by clicking on the link below:",S_T_FILE_EMAIL_BODY:"I'm using Adobe Send & Track. You can view my file in Adobe Document Cloud by clicking on the link below:",S_T_FILES_EMAIL_BODY:"I'm using Adobe Send & Track. You can view my files in Adobe Document Cloud by clicking on the link below:",SHARE_CLIPBOARD_MESSAGE:"Tip: Use Ctrl + C to copy",SHARE_CLIPBOARD_MESSAGE_MAC:"Tip: Use Cmd + C to copy",SHARE_CLIPBOARD_COPIED:"link is copied to clipboard",PARCEL_ACTIVITY_DOWNLOADED:"downloaded",PARCEL_ACTIVITY_PREVIEWED:"previewed",PARCEL_ACTIVITY_PUBLIC_VISITOR:"public link visitor",PARCEL_ACTIVITY_ALL_FILES:"All Files",PARCEL_ACTIVITY_ALL_FILES_PREVIEW:"All Files Preview Page",PARCEL_ACTIVITY_HEADING:"Activity for “<%= emailSubject %>”",PARCEL_ACTIVITY_RECIPIENT:"Recipient",PARCEL_ACTIVITY_ACTIVITY:"Activity",PARCEL_ACTIVITY_ITEM:"Item",PARCEL_ACTIVITY_DATE_VIEWED:"Date Viewed",PARCEL_ACTIVITY_CLOSE:"Close",CURRENTLY_SHARED_IN:"Sent To",SHARE_THIS_FILE:"Send this File",SHARE_THIS_FILE_AGAIN:"Send this File Again",SENT_FILES_HEADER_SEARCH_CONTROLS:"Search Controls",SENT_FILES_HEADER_REFRESH:"Refresh",SENT_FILES_NUM_FILES:"<%= numFiles %> files",NO_PARCELS_SIGN_PROMPT:"There aren't any documents here yet.",NO_PARCELS_SIGN_SUBPROMPT:"Documents you've sent or received for signature will appear here.",NO_PARCELS_SIGN_BTN:"Send a document for signature",NO_PARCELS_SEND_SUBPROMPT:"Go to <%= sendBtn %> to deliver files to others",NO_PARCELS_SEND_BTN:"Adobe Send",NO_PARCELS_S_T_BTN:"Send & Track",ON_SIGN_OUT_PROMPT:"Sign in to access shared files.",ON_SIGN_OUT_SUBPROMPT:"See and manage documents you've sent or received for signature.",SIGN_IN_BUTTON:"Sign In",COULD_NOT_SEND:"Could not send",ENTERPRISE_USERS_ACCESS_ERROR:"You do not have access to this service. Please contact your IT Administrator to gain access, or try to sign in with an Adobe ID.",CUSTOMIZE_RECIPIENT_PAGE_DIALOG_NOT_AVAILABLE:"Continue at Adobe Document Cloud",CUSTOMIZE_RECIPIENT_PAGE_DIALOG_USE_WEB_MSG:'Edits to your Color and Logo are currently only available online at the Adobe Send web site. Click "<%= buttonName %>" to go there now.',S_T_CUSTOMIZE_RECIPIENT_PAGE_DIALOG_USE_WEB_MSG:'Edits to your logo and color are currently only available at Adobe Document Cloud. Click "<%= buttonName %>" to go there now.',CUSTOMIZE_RECIPIENT_PAGE_DIALOG_USE_WEB_OK:"Continue",CUSTOMIZE_RECIPIENT_PAGE_DIALOG_TITLE:"Add Your Logo & Color",CUSTOMIZE_RECIPIENT_PAGE_DIALOG_DESCRIPTION:"Add your logo and choose a color to display on emails and recipient page.",CUSTOMIZE_RECIPIENT_PAGE_ADD_LOGO:"Add Logo",CUSTOMIZE_RECIPIENT_PAGE_REMOVE_LOGO:"Remove Logo",CUSTOMIZE_RECIPIENT_PAGE_CHOOSE_COLOR:"Choose Color",CUSTOMIZE_RECIPIENT_PAGE_SAVE:"Save",CUSTOMIZE_RECIPIENT_PAGE_CLOSE:"Cancel",CUSTOMIZE_RECIPIENT_PAGE_FILE_FILTERING_LABEL:"File Type is an image",CUSTOMIZE_RECIPIENT_PAGE_UNSUPPORTED_LOGO_TITLE:"Error",CUSTOMIZE_RECIPIENT_PAGE_UNSUPPORTED_LOGO_FORMAT:"The file you have chosen cannot be used as a logo. Please select another file. ",CUSTOMIZE_RECIPIENT_PAGE_UNSUPPORTED_COLOR_FORMAT:"The color you have entered is invalid. Please enter a hex value like #FFFFFF or #FFF.",SURVEY_TITLE:"We are interested in your Feedback",SURVEY_LINK:"Tell Us What You Think",SURVEY_QUESTION_ONE:"Why are you using Send & Track today?",SURVEY_QUESTION_TWO:"Does it work well for you?",SURVEY_QUESTION_THREE:"Is it missing something you wanted?",SURVEY_SEND:"Send",SURVEY_CLOSE:"No Thanks",SURVEY_TEXTAREA_LIMITATION_LABEL:"characters remaining",INVALID_PARAMETER_SURVEY_MESSAGE:"Answer type not allowed",INVALID_PARAMETER_SURVEY_TITLE:"Invalid Parameter",SEND_RHP_TITLE:"Sent To",GENERIC_ARIA_LABEL_STRING:"<%= prefix %>. <%= suffix %>",ENTERPRISE_RESTRICTIONS_ENFORCED:"Enterprise Sharing Restrictions Enabled",ENTERPRISE_USERS_SHARING_ACCESS:"This feature isn't enabled because your organization has enabled sharing restrictions. ",DRAFTS:"Drafts",TEMPLATES:"Templates",ALL:"All",WAITING_FOR_YOU:"Waiting for you",SIGNED:"Signed",COMPLETED:"Completed",WAITING:"Waiting",CANCELED:"Canceled",EXPIRED:"Expired",APPROVED:"Approved",DELIVERED:"Delivered",ACCEPTED:"Accepted",DELEGATED:"Delegated",FORM_FILLED:"Form Filled",CANCELLED_DECLINED:"Canceled/Declined",IN_PROGRESS:"In progress",DRAFT:"Draft",REQUEST_ESIGN:"Request e-signatures",CREATE_ESIGN_TEMPLATE:"Create e-sign template",EMPTY_STATE_ALL_PROMPT:"No agreements yet",EMPTY_STATE_ALL_SUBPROMPT:"Agreements sent or received by you will appear here.",EMPTY_STATE_COMPLETED_PROMPT:"No completed agreements",EMPTY_STATE_COMPLETED_SUBPROMPT:"Once all recipients sign or approve an agreement, it'll appear here.",EMPTY_STATE_IN_PROGRESS_PROMPT:"No agreements in progress",EMPTY_STATE_IN_PROGRESS_SUBPROMPT:"After sending an agreement for signing, it'll appear here.",EMPTY_STATE_WAITING_FOR_YOU_PROMPT:"No agreements waiting for you",EMPTY_STATE_WAITING_FOR_YOU_SUBPROMPT:"Agreements waiting for your signature or approval will appear here.",EMPTY_STATE_DRAFT_PROMPT:"No draft agreements",EMPTY_STATE_DRAFT_SUBPROMPT:"New agreements that you're still creating will appear here until you send them for signing.",EMPTY_STATE_CANCELED_PROMPT:"No canceled agreements",EMPTY_STATE_CANCELED_SUBPROMPT:"If you cancel an agreement, it'll appear here.",EMPTY_STATE_EXPIRED_PROMPT:"No expired agreements",EMPTY_STATE_EXPIRED_SUBPROMPT:"If an agreement expires, it'll appear here.",EMPTY_STATE_TEMPLATES_PROMPT:"Create reusable templates",EMPTY_STATE_TEMPLATES_SUBPROMPT:"Store frequently used documents as reusable templates. To create a template, start by sending an agreement.",INITIATOR:"INITIATOR",REPLACE:"Replace",SIGNATURES:"Signatures",ANY_TIME:"Any time",ANY_STATUS:"Any status",SIGN:"Sign",APRROVE:"Approve",DELEGATE:"Delegate",ACKNOWLEDGE:"Acknowledge",ACCEPT:"Accept",FILL_FORM:"Fill Form",WAITING_FOR_OTHERS:"Waiting for others",COMPLETE:"Complete",SENDER:"SENDER",PARTIAL_COMPLETE:"<%= done %> of <%= total %> Completed",ASCENDING:"Ascending",DESCENDING:"Descending",AGREEMENT_HEADER:"All agreements",REDIRECT_TO_WEB_TITLE:"Manage agreements in Acrobat Sign.",REDIRECT_TO_WEB_BODY:"Go to Adobe Acrobat Sign to manage your agreements online.",OPEN_ADOBE_SIGN:"Open Acrobat Sign",GET_SHAREABLE_LINK:"Get a shareable link",SEND_A_COPY:"Send a copy",SAVE_A_LOCAL_COPY:"Save a local copy",LIBRARY_TEMPLATE:"Templates",ACTIVE:"Active"}),define("acplugins/signatures/js/ops/downloading/downloading-parcel-assets-op",["core/ac-core","acplugins/signatures/js/ac-signature","i18n!core/nls/ui-strings","i18n!acplugins/signatures/js/nls/ui-strings","core/utils/http-util","core/ops/op"],function(e,t,i,s,n){return t.DownloadingParcelAssetsOp=e.Op.extend({run:function(){var e,t,o,a,r,l,c,d,h,p=this.options,u=$.Deferred(),g=p.appApi.baseFilesUrisApi.getDownloadUri(),S=p.appApi.dialogApi;
return e=p.selectionUiModel,t=e.getSingleSelectedItemModel(),a=e.get("selected_item_ui_models"),t&&(r=t.id,o=a[r],d="GET",l=n.getRequestHeaders(d),o.set("masked",!0),h=t.url()+"/assets",$.ajax(h,{type:d,headers:l,dataType:"JSON"}).then(function(e){var t=e.assets,n=_.pluck(t,"id").join(";");n?p.appApi.downloadApi.getDownloadTicket(n).done(function(e){h=g+"archive/zip/"+n+"?dlticket="+e.download_ticket,c=p.iframe,c?c.attr("src",h):window.open(h,"_self"),o.set("masked",!1)}):S.displayTextAlert(S.SEVERITY_ERROR,s.NO_FILES_TITLE,s.NO_FILES_MESSAGE,i.CLOSE)},function(){o.set("masked",!1)})),u.promise()}}),t.DownloadingParcelAssetsOp}),define("acplugins/signatures/js/ops/downloading/saveas-single-asset-op",["core/ac-core","acplugins/signatures/js/ac-signature","core/models/rna/rna-notification-model","i18n!acplugins/signatures/js/nls/ui-strings","i18n!core/nls/ui-strings","core/ops/op"],function(e,t,i,s,n){var o="binder.zip";t.SaveAsSingleAssetOp=e.Op.extend({run:function(){var t,n,a,r=this.options,l=e.opFactory,c=r.idToSaveAs,d=r.nameToSaveAs,h={notificationHeading:s.SHARED_FILES};return c&&d||(t=r.selectionUiModel,n=t.getSingleSelectedItemModel(),n&&(a=n.get("files"),a&&1===a.length&&(c=a[0].id,d=a[0].name))),h.fileName=o,h.fileExtn=e.Util.getExtension(o),h.showDownloadAll=!1,l.create("GettingAssetMetadataOp",r).run(c).done(_.bind(function(){this.options.appApi.rnaApi.done(_.bind(function(e){e.notificationAPI.createNotification({operationType:i.NOTIFICATION_OPERATIONS.PROCESS,state:i.NOTIFICATION_STATES.IN_PROGRESS,userData:JSON.stringify(h),progress:0,description:"sent"}).done(_.bind(function(t){e.rnaServicesAPI.showServicesProgressWidget(!0,!0,"busy",!0),this._downloadSingleFileAsZip(c,t).then(_.bind(function(e){this._onDownloadCompletion(t,e)},this),_.bind(function(e){this._onDownloadFailed(t,e)},this))},this))},this))},this)),this._getResolvedPromise()},_downloadSingleFileAsZip:function(t,i){var s=this.options,n=e.opFactory;return n.create("DownloadingZipStartOp",_.extend({},s,{id_list:t,numForms:0,fileName:o,notificationObj:i})).run()},_onDownloadCompletion:function(e,t){var s=e.get("userData"),n={};try{n=JSON.parse(s)}catch(o){}t.downloadedFileSys&&(n.downloadedFileSys=t.downloadedFileSys),t.downloadedFilePath&&(n.downloadedFilePath=t.downloadedFilePath),e.invoke("setProperty",{operationType:"",userData:JSON.stringify(n),state:i.NOTIFICATION_STATES.DOWNLOADED})},_onDownloadFailed:function(e,t){if(7!==t){var s={errorTitle:n.NOTIFICATION_DOWNLOAD_ERROR,errorBody:"",downloadError:!0,showRetry:!1};e.invoke("setProperty",{operationType:"",state:i.NOTIFICATION_STATES.FAILED,error:JSON.stringify(s)})}}})}),define("acplugins/signatures/js/ops/manipulation/deleting-parcel-if-confirmed-op",["core/ac-core","acplugins/signatures/js/ac-signature","i18n!core/nls/ui-strings","i18n!acplugins/signatures/js/nls/ui-strings","core/ops/op"],function(e,t,i,s){t.DeletingParcelIfConfirmedOp=e.Op.extend({run:function(){var e,n,o,a,r=this.options,l=r.appApi.dialogApi;e=r.selectionUiModel;var c=r.searchUiModel;return n=e.getNumSelectedItems(),o=1===n?s.CONFIRM_REMOVE_MSG_ONE_ITEM:s.CONFIRM_REMOVE_MSG_N_ITEMS,a=s.CONFIRM_REMOVE_TITLE,l.displayTextAlert(l.SEVERITY_WARNING,a,o,s.REMOVE,i.CANCEL).then(function(){return t.opFactory.create("DeletingParcelOp",r).run().done(function(){e.clearSelection(),c.invalidate()})})}})}),define("acplugins/signatures/js/ops/manipulation/deleting-parcel-op",["core/ac-core","acplugins/signatures/js/ac-signature","core/ops/op"],function(e,t){t.DeletingParcelOp=e.Op.extend({run:function(){var e,t,i,s=this.options,n=[];return e=s.selectionUiModel,t=e.get("selected_item_models"),i=e.get("selected_item_ui_models"),_.each(t,function(t){var s,o=t.id,a=i[o];a.set("masked",!0),s=t.destroy({wait:!0}).then(function(){e.deselectItem(o,!0)},function(){a.set("masked",!1)}),n.push(s)}),$.when.apply($,n)}})}),define("acplugins/signatures/js/ops/manipulation/forwarding-parcel-op",["core/ac-core","acplugins/signatures/js/ac-signature","core/ops/op"],function(e,t){t.ForwardingParcelOp=e.Op.extend({run:function(){var t,i,s,n=this.options,o={};return t=n.selectionUiModel,i=t.getSingleSelectedItemModel(),s="/send/parcel/"+i.id,e.Util.isCEF()?this.options.appApi.rnaApi.done(_.bind(function(e){o.selectedParcelId=i.id,o.selectedAssetIds=[],o.selectedModels=[],e.stApi.launchSendTrackApp(o)},this)):(n.appApi.routerApi.navigate(s,{trigger:!0}),t.clearSelection()),this._getResolvedPromise()}})}),define("acplugins/signatures/js/ops/manipulation/setting-delivery-receipts-op",["core/ac-core","acplugins/signatures/js/ac-signature","core/utils/http-util","core/ops/op"],function(e,t,i){t.SettingDeliveryReceiptsOp=e.Op.extend({run:function(){var e,t,s,n,o,a=this.options,r=this.options.parcelModel;return e=r.url(),t=e+"/delivery_receipts",s="PUT",n={value:a.deliveryReceipts},o=i.getRequestHeaders(s),o["Content-Type"]="application/json",$.ajax(t,{type:s,headers:o,data:JSON.stringify(n),dataType:"json"}).then(function(){a.parcelModel.set({delivery_receipts:a.deliveryReceipts})})}})}),define("acplugins/signatures/js/ops/manipulation/unsharing-parcel-if-confirmed-op",["core/ac-core","acplugins/signatures/js/ac-signature","i18n!acplugins/signatures/js/nls/ui-strings","i18n!core/nls/ui-strings","core/ops/op"],function(e,t,i,s){t.UnsharingParcelIfConfirmedOp=e.Op.extend({run:function(){var e,n,o,a,r=this.options,l=r.appApi.dialogApi;return e=r.selectionUiModel,n=e.getNumSelectedItems(),o=1===n?i.CONFIRM_UNSHARE_MSG_ONE_ITEM:_.template(i.CONFIRM_UNSHARE_MSG_N_ITEMS,{numItems:n}),a=i.CONFIRM_UNSHARE_TITLE,l.displayTextAlert(l.SEVERITY_WARNING,a,o,i.UNSHARE,s.CANCEL).then(function(){return t.opFactory.create("UnsharingParcelOp",r).run().done(function(){e.clearSelection()})})}})}),define("acplugins/signatures/js/ops/manipulation/unshare-one-parcel-op",["core/ac-core","acplugins/signatures/js/ac-signature","core/utils/http-util","core/ops/op"],function(e,t,i){return t.UnshareOneParcelOp=e.Op.extend({run:function(){var e,t,s,n,o,a=this.options,r="PUT";return e=a.itemModel,t=e.url()+"/is_active",s=JSON.stringify({value:!1}),n=i.getRequestHeaders(r),n["Content-Type"]="application/json",o=$.ajax(t,{type:r,headers:n,data:s,dataType:"json"}).then(function(){e.set({is_active:!1})})}}),t.UnshareParcelOp}),define("acplugins/signatures/js/ops/manipulation/unsharing-parcel-op",["core/ac-core","acplugins/signatures/js/ac-signature","core/ops/op","acplugins/signatures/js/ops/manipulation/unshare-one-parcel-op"],function(e,t){t.UnsharingParcelOp=e.Op.extend({run:function(){var e,i,s,n=this.options,o=[];return e=n.selectionUiModel,i=e.get("selected_item_models"),s=e.get("selected_item_ui_models"),_.each(i,function(i){var n,a,r=i.id,l=s[r];l.set("masked",!0),a=new t.UnshareOneParcelOp({itemModel:i}),n=a.run().then(function(){e.clearSelection(),i.set({is_active:!1}),l.set("masked",!1)},function(){l.set("masked",!1)}),o.push(n)}),$.when.apply($,o)}})}),define("acplugins/signatures/js/ops/manipulation/remind-participant-sendAPI-op",["core/ac-core","acplugins/signatures/js/ac-signature","acplugins/signatures/js/constants/sign-constants","pdmplugins/esign/js/ac-esign","core/utils/http-util","core/ops/op"],function(e,t,i,s,n){return t.PostReminderAndGetResponseOp=e.Op.extend({run:function(e){var t=this.options,o=t.esApi.authApi.createAuthSession(t),a=$.Deferred();return o.then(_.bind(function(){var o=t.esAuthUiModel.get("access_token"),r=t.appApi.rnaApiObj.esApi.getEchoSignApiURL();t.esAuthSessionExists=!0;var l=r+i.API_SUBPATH_V6+"/agreements/"+e.agreementID,c=_.extend({Accept:"application/json",Authorization:"Bearer "+o},n.getSignRequestHeaders()),d=[];d.reminderfrequency="",d.remindernote=e.reminderNote;var h={};h.status="ACTIVE",h.note=e.reminderNote,this.options.appApi.rnaApi.done(_.bind(function(t){t.rnaSignWorkflowServicesAPI.isSignV10Enabled()?h.recipientParticipantIds=e.participantIDs:(h.frequency="",l+="/participantSets/"+e.participantID),l+="/reminders",$.ajax({url:l,data:JSON.stringify(h),type:"POST",headers:c,modal:!1,contentType:"application/json",dataType:"json",success:_.bind(function(e){a.resolve(e)},this),error:_.bind(function(e){403==e.status&&"INVALID_API_ACCESS_POINT"==e.responseJSON.code&&s.esApi.authApi.clearESAuthSession(),a.reject({httpRespCode:e.status,httpRespBody:e.responseText})},this)})},this))},this)),a}}),t.PostReminderAndGetResponseOp}),define("acplugins/signatures/js/ops/manipulation/cancel-agreement-op",["core/ac-core","acplugins/signatures/js/ac-signature","acplugins/signatures/js/constants/sign-constants","pdmplugins/esign/js/ac-esign","core/utils/http-util","core/ops/op"],function(e,t,i,s,n){return t.CancelAgreementOp=e.Op.extend({run:function(e){var t=this.options,o=t.esApi.authApi.createAuthSession(t),a=$.Deferred();return o.then(_.bind(function(){var o=t.esAuthUiModel.get("access_token"),r=t.appApi.rnaApiObj.esApi.getEchoSignApiURL(),l=r+i.API_SUBPATH_V6+"/agreements/"+e.agreementID,c=_.extend({Accept:"application/json",Authorization:"Bearer "+o,"If-Match":e.eTag},n.getSignRequestHeaders()),d={};t.appApi.rnaApi.done(_.bind(function(t){t.rnaSignWorkflowServicesAPI.isSignV10Enabled()?(l+="/state",d.state="CANCELLED",d.agreementCancellationInfo={},d.agreementCancellationInfo.comment=JSON.stringify(e.notifyText),d.agreementCancellationInfo.notifyOthers=e.shouldNotifySigners):(l+="/status",d.status="CANCELLED",d.comment=JSON.stringify(e.notifyText),d.notifySigner=e.shouldNotifySigners),$.ajax({url:l,type:"PUT",headers:c,data:JSON.stringify(d),contentType:"application/json",dataType:"json",modal:!1,success:_.bind(function(e){a.resolve(e)},this),error:_.bind(function(e){403==e.status&&"INVALID_API_ACCESS_POINT"==e.responseJSON.code&&s.esApi.authApi.clearESAuthSession(),a.reject({httpRespCode:e.status,httpRespBody:e.responseText})},this)})},this))},this)),a}}),t.CancelAgreementOp}),define("acplugins/signatures/js/ops/selection/selecting-collection-item-op",["core/ac-core","acplugins/signatures/js/ac-signature","core/ops/op"],function(e,t){return t.SelectingCollectionItemOp=e.Op.extend({run:function(){var t,i=this.options,s=i.itemView,n=this._multipleSelection();switch(this.options.selectType){case e.SelectionUiModel.SELECT_ALL:t=this._selectAll(!0);break;case e.SelectionUiModel.SELECT_NONE:t=this._selectAll(!1);break;case e.SelectionUiModel.SELECT_DESELECT:t=this._selectItem(s,!1);break;case e.SelectionUiModel.SELECT_EXTEND:t=this._extendSelectItem(s);break;case e.SelectionUiModel.SELECT_SELECT:t=this._selectItem(s);break;case e.SelectionUiModel.SELECT_TOGGLE:t=this._toggleSelectItem(s);break;case e.SelectionUiModel.SELECT_NEXT:t=this._selectNext();break;case e.SelectionUiModel.SELECT_PREVIOUS:t=this._selectPrevious();break;case e.SelectionUiModel.EXTEND_SELECT_NEXT:t=this._selectNext(n);break;case e.SelectionUiModel.EXTEND_SELECT_PREVIOUS:t=this._selectPrevious(n)}return t&&i.selectionUiModel.triggerSelectionChange(),this._getResolvedPromise()},_selectItemView:function(e,t){var i,s=this.options,n=e.model;return i=s.noFolderSelection&&n.isFolder(),s.selectionUiModel.selectItem(n,e.options.itemUiModel,i?!1:t)},_selectAll:function(t){var i,s=this.options.collectionItemsView.getChildViews();if(!(t&&s.length>1)||this._multipleSelection())return t?(_.each(s,_.bind(function(e){this._selectItemView(e,t)&&(i=!0)},this)),i):(e.opFactory.create("ClearingSelectionOp",this.options).run(),i=!0)},_deselectAll:function(){return this.options.selectionUiModel.getNumSelectedItems()>0?(this._selectAll(!1),!0):!1},_selectNext:function(e){var t=this._getSelectionEnd(),i=this._getNextSelectable(t,!1);if(e||this._deselectAll())return i>=0&&(t=i),this._selectChildAt(t)},_selectPrevious:function(e){var t=this._getSelectionStart(),i=this._getNextSelectable(t,!0);if(e||this._deselectAll())return i>=0&&(t=i),this._selectChildAt(t)},_extendSelectItem:function(e){var t,i,s,n;return this._multipleSelection()||this._selectAll(!1)&&(n=!0),this._selectItemView(e,!0)&&(n=!0),t=this._getTargetIndex(),i=this._getClosestSelectedIndex(t,!1),i>0?(this._selectRange(!0,t,i)&&(n=!0),this._selectRange(!1,0,t-1)&&(n=!0)):(s=this._getClosestSelectedIndex(t,!0),s>=0?this._selectRange(!0,s,t)&&(n=!0):this._selectItem(e)&&(n=!0)),n},_selectItem:function(e){var t;return this._selectAll(!1)&&(t=!0),this._selectItemView(e,!0)&&(t=!0),t},_toggleSelectItem:function(e){var t,i=e.options.itemUiModel.get("selected");return this._multipleSelection()||this._selectAll(!1)&&(t=!0),this._selectItemView(e,!i)&&(t=!0),t},_multipleSelection:function(){return this.options.selectionUiModel.get("multiple_selection")},_getSelectionIndex:function(e){function t(e){return s=i.eq(e),l.isItemSelected(s.data("id"))}var i,s,n,o,a,r=this.options,l=r.selectionUiModel;if(i=this._getChildren(),n=i.length,a=-1,e){for(o=0;n>o;o+=1)if(t(o)){a=o;break}}else for(o=n-1;o>=0;o-=1)if(t(o)){a=o;break}return a},_getSelectionStart:function(){return this._getSelectionIndex(!0)},_getSelectionEnd:function(){return this._getSelectionIndex(!1)},_getTargetId:function(){var e,t,i=this.options.itemView;return i&&(e=i.model,e&&(t=e.id)),t},_getTargetIndex:function(){var e,t,i;return t=this._getTargetId(),i=this.options.collectionItemsView.$el.children(),i.each(function(i,s){return $(s).data("id")===t?(e=i,!1):void 0}),e},_getClosestSelectedIndex:function(e,t){var i,s,n,o,a,r;if(i=this.options.collectionItemsView,s=i.$el.children(),n=s.length,o=-1,r=_.bind(function(e){var t=this._getItemUiModelAt(i,s,e);return t.get("selected")},this),t){for(a=e-1;a>=0;a-=1)if(r(a)){o=a;break}}else for(a=e+1;n>a;a+=1)if(r(a)){o=a;break}return o},_selectRange:function(e,t,i){var s,n,o,a,r;for(s=this.options.collectionItemsView,o=s.$el.children(),a=t;i>=a;a+=1)n=this._getItemViewAt(s,o,a),this._selectItemView(n,e)&&(r=!0);return r},_isChildAtSelectable:function(e){return this._isChildSelectable(this._getChildAt(e))},_isChildSelectable:function(e){var t=e.data("model");return!this.options.noFolderSelection||!t.isFolder()},_selectChild:function(e,t,i){var s,n,o,a=this.options,r=!1;if(e)return e=$(e),o=this.options.collectionItemsView.getChildViewById(e.data("id")),s=o.model,n=o.options.itemUiModel,i&&(r=i.scrollIntoView),r&&this._scrollItemIntoView(e),a.selectionUiModel.selectItem(s,n,this._isChildSelectable(e)?t:!1,!0)},_selectChildAndScroll:function(e,t){return this._selectChild(e,t,{scrollIntoView:!0})},_selectChildAt:function(e,t,i){return _.isUndefined(t)&&(t=!0),this._selectChildAndScroll(this._getChildAt(e),t,i)},_getItemViewAt:function(e,t,i){var s=t.eq(i),n=$(s).data("id");return e.getChildViewById(n)},_getChildren:function(){return this.options.collectionItemsView.$el.children()},_getChildCount:function(){return this._getChildren().length},_getChildAt:function(e){var t=this._getChildren();return 0>e||e>=t.length?void 0:t.eq(e)},_getNextSelectable:function(e,t){return t?Math.max(e-1,0):Math.min(this._getChildCount()-1,e+1)},_scrollItemIntoView:function(e){var t=e.position().top,i=e.height(),s=$(this.options.collectionItemsView.el).height();if(0>t||t+i>s){var n=$(this.options.collectionItemsView.el).scrollTop(),o=t-(s-i)/2;$(this.options.collectionItemsView.el).scrollTop(Math.max(n+o,0))}},_getItemUiModelAt:function(e,t,i){var s=this._getItemViewAt(e,t,i);return s.options.itemUiModel}}),t.SelectingCollectionItemOp}),define("acplugins/signatures/js/ops/showing/showing-parcel-preview-op",["core/ac-core","acplugins/signatures/js/ac-signature","core/ops/op"],function(e,t){t.ShowingParcelPreviewOp=e.Op.extend({run:function(){var e,t,i,s,n=this.options;return e=n.appApi,i=n.parcelModel,i||(t=n.selectionUiModel,i=t.getSingleSelectedItemModel()),i&&(s=i.id),s&&e.routerApi.navigate("/sentfiles/"+s,{trigger:!0}),this._getResolvedPromise()}})}),define("acplugins/signatures/js/ops/showing/showing-sign-in-op",["core/ac-core","acplugins/signatures/js/ac-signature","i18n!acplugins/signatures/js/nls/ui-strings","i18n!core/nls/ui-strings","core/ops/op"],function(e,t){t.ShowingSignInOp=e.Op.extend({run:function(){return this._getResolvedPromise()}})}),define("acplugins/signatures/js/ops/showing/showing-single-asset-op",["core/ac-core","acplugins/signatures/js/ac-signature","i18n!acplugins/signatures/js/nls/ui-strings","i18n!core/nls/ui-strings","core/ops/op"],function(e,t){t.ShowingSingleAssetOp=e.Op.extend({run:function(){var t,i,s,n=this.options,o=n.idToShow,a=[];return o||(t=n.selectionUiModel,i=t.getSingleSelectedItemModel(),i&&(s=i.get("files"),s&&1===s.length&&(o=s[0].id))),e.Util.isCEF()?e.opFactory.create("GettingAssetMetadataOp",n).run(o).done(_.bind(function(e){this.options.appApi.rnaApi.done(function(t){a.push(e.parent_id),t.assetApi({methodName:"openFile",methodArgs:[o,a]})})},this)):o&&n.appApi.routerApi.navigate("/file/"+o,{trigger:!0}),this._getResolvedPromise()}})}),define("acplugins/signatures/js/ops/showing/desktop-show-in-browser-op",["core/ac-core","acplugins/signatures/js/ac-signature","core/ops/op"],function(e,t){t.DesktopShowInBrowserOp=e.Op.extend({run:function(){var i=t.opFactory;if("trackObject"===this.options.eventName)var s=e.getBaseCloudUrl(),n="sentfiles/",o=this.options.selectionUiModel.getSingleSelectedItemModel().id,a=s+n+o;else if("adobeSendWebsite"===this.options.eventName)var a="/send";var r={url:a},l=i.create("JumpToBrowserApiCallOp",this.options),c=l.run(r).done(_.bind(function(){this.options.appApi.rnaApi.done(_.bind(function(e){e.ipmApi({methodName:"executeURI",methodArgs:JSON.parse(c.responseText).uri})},this))},this));return c.promise()}})}),define("acplugins/signatures/js/ops/showing/jump-to-browser-api-call-op",["core/ac-core","core/utils/http-util","acplugins/signatures/js/ac-signature","core/ops/op"],function(e,t,i){var s="reader/jump_to_browser_url";i.JumpToBrowserApiCallOp=e.Op.extend({run:function(e){var i,n,o=this.options,a=Ac.baseFilesUrisModel.getSendApiUri();return _.isEmpty(a)?this._getRejectedPromise():(i="POST",n=_.extend({},t.getRequestHeaders(i,o,!1),{"Content-Type":"application/json"}),a+=s,o.appApi.networkApi.throttledAjax(a,{type:i,headers:n,data:JSON.stringify(e),dataType:"json",global:!1}))}})}),define("acplugins/signatures/js/ops/getting/get-sign-files-op",["core/ac-core","acplugins/signatures/js/ac-signature","acplugins/signatures/js/constants/sign-constants","core/ops/op","pdmplugins/esign/js/ac-esign"],function(e,t,i){var s=["WAITING_FOR_MY_SIGNATURE","WAITING_FOR_MY_APPROVAL","WAITING_FOR_MY_DELEGATION","WAITING_FOR_MY_ACKNOWLEDGEMENT","WAITING_FOR_MY_ACCEPTANCE","WAITING_FOR_MY_FORM_FILLING","OUT_FOR_SIGNATURE","OUT_FOR_APPROVAL","OUT_FOR_DELIVERY","OUT_FOR_ACCEPTANCE","OUT_FOR_FORM_FILLING","SIGNED","APPROVED","DELIVERED","ACCEPTED","FORM_FILLED","EXPIRED","CANCELLED","ARCHIVED","LIBRARY_TEMPLATE"];t.GetSignaturesFilesListOp=e.Op.extend({run:function(e){var t=this.options,i=t.esApi.authApi.createAuthSession(t);i.then(_.bind(function(){this._getFileListInternal(e)},this))},_getFileListInternal:function(e){var t=this.options,i=t.esAuthUiModel.get("access_token"),n=t.appApi.rnaApiObj.esApi.getEchoSignApiURL();t.esAuthSessionExists=!0,this._getAgreementsAPICall(n,i).then(_.bind(function(i){this.promises=[],this.finalResponse={},this.finalResponse.response=i.data,this.finalResponse.request=e,this.finalResponsePromise=$.Deferred(),void 0!==this.finalResponse.response.userAgreementList?(this.finalResponse.response.agreementSpecificDetails={},this.finalResponse.response.userAgreementList.slice().reverse().forEach(_.bind(function(e,t,i){s.includes(e.status)||this.finalResponse.response.userAgreementList.splice(i.length-1-t,1)},this)),this.finalResponse.response.userAgreementList.forEach(_.bind(function(e){var t=this.options,i=t.esAuthUiModel.get("access_token"),s=t.appApi.rnaApiObj.esApi.getEchoSignApiURL();e.displayDate=this._formatDate(new Date(Date.parse(e.displayDate))),this.promises.push(this._getAgreementDetailsAPICall(e.id,s,i)),this.promises.push(this._getAgreementParticipantDetailsAPICall(e.id,s,i))},this)),Promise.all(this.promises).then(_.bind(function(e){for(var t=this.finalResponse.response.agreementSpecificDetails,i=0;i<e.length;i+=2){var s=Object.assign({},e[i].data,e[i+1].data);void 0!==s.createdDate&&(s.createdDate=this._formatDate(new Date(Date.parse(s.createdDate)))),void 0!==s.expirationTime&&(s.expirationTime=this._formatDate(new Date(Date.parse(s.expirationTime)))),s.eTag=e[i].xhr.getResponseHeader("ETag");var n=s.id;void 0===n&&(n=this.finalResponse.response.userAgreementList[parseInt(i/2)].id),t[n]=s}this.finalResponsePromise.resolve()},this))):this.finalResponsePromise.resolve(),this.finalResponsePromise.done(_.bind(function(){t.appApi.rnaApi.done(_.bind(function(e){e.rnaSignWorkflowServicesAPI.invokeMethod({methodName:"updateDataModelFromSignDataAPI",methodArgs:this.finalResponse})},this))},this))},this))},_getAgreementsAPICall:function(e,t){var s=e+i.API_SUBPATH_V6+"/agreements",n=$.Deferred(),o={Accept:"application/json",Authorization:"Bearer "+t};return $.ajax({url:s,headers:o,type:"GET",dataType:"json",global:!1,success:_.bind(function(e,t,i){n.resolve({data:e,status:t,xhr:i})},this),error:_.bind(function(e){n.reject({httpRespCode:e.status,httpRespBody:e.responseText})},this)}),n},_getAgreementDetailsAPICall:function(e,t,s){var n=t+i.API_SUBPATH_V6+"/agreements/"+e,o=$.Deferred(),a={Accept:"application/json",Authorization:"Bearer "+s};return $.ajax({url:n,headers:a,type:"GET",dataType:"json",global:!1,success:_.bind(function(e,t,i){o.resolve({data:e,status:t,xhr:i})},this),error:_.bind(function(e){o.reject({httpRespCode:e.status,httpRespBody:e.responseText})},this)}),o},_getAgreementParticipantDetailsAPICall:function(e,t,s){var n=t+i.API_SUBPATH_V6+"/agreements/"+e+"/participantSets",o=$.Deferred(),a={Accept:"application/json",Authorization:"Bearer "+s};return $.ajax({url:n,headers:a,type:"GET",dataType:"json",global:!1,success:_.bind(function(e,t,i){o.resolve({data:e,status:t,xhr:i})},this),error:_.bind(function(e){o.reject({httpRespCode:e.status,httpRespBody:e.responseText})},this)}),o},_pad:function(e,t,i){return i=i||"0",e+="",e.length>=t?e:new Array(t-e.length+1).join(i)+e},_formatDate:function(e){return e instanceof Date?""+e.getUTCFullYear()+this._pad(e.getUTCMonth()+1,2)+this._pad(e.getUTCDate(),2)+this._pad(e.getUTCHours(),2)+this._pad(e.getUTCMinutes(),2)+this._pad(e.getUTCSeconds(),2)+"Z":""}})}),define("acplugins/signatures/js/ops/getting/get-sign-audit-trail-op",["core/ac-core","acplugins/signatures/js/ac-signature","core/ops/op","pdmplugins/esign/js/ac-esign"],function(e,t){return t.GetSignaturesAuditTrailOp=e.Op.extend({run:function(e){var t,i,s,n,o=this.options,a=o.appApi,r=o.esApi.authApi.createAuthSession(o),l={};r.then(_.bind(function(){o.esAuthSessionExists=!0,n=a.rnaApiObj.esApi.getEchoSignApiURL(),t=o.esAuthUiModel.get("access_token"),s=e.get("id"),i=n+"/api/rest/v6/agreements/"+s+"/auditTrail",a.rnaApi.done(function(e){l.auditUrl=i,l.accessToken=t,l.agreementID=s,e.rnaSignWorkflowServicesAPI.getAuditTrail(l)})},this))}}),t.GetSignaturesAuditTrailOp}),define("acplugins/signatures/js/ops/getting/get-sign-activity-op",["core/ac-core","acplugins/signatures/js/ac-signature","pdmplugins/esign/js/ac-esign","core/utils/http-util","core/ops/op"],function(e,t,i,s){return t.GetSignaturesActivityListOp=e.Op.extend({run:function(e){var t=this.options,n=t.esApi.authApi.createAuthSession(t),o=$.Deferred();return n.then(_.bind(function(){var n,a,r,l,c=t.esAuthUiModel.get("access_token"),d=t.appApi.rnaApiObj.esApi.getEchoSignApiURL(),h={},p=[];t.esAuthSessionExists=!0;var u=_.extend({Authorization:"Bearer "+c},s.getSignRequestHeaders());n=d+"/api/rest/v6/agreements/"+e.agreementID+"/events",$.ajax({url:n,data:h,type:"GET",modal:!1,headers:u,contentType:"application/json",dataType:"json",success:_.bind(function(e){a=e.events,a.forEach(function(e){r=e.description+" <br>",l=new Date(Date.parse(e.date)),l=moment(l).format("MMM DD, hh:mm A"),r+=l,p.unshift(r)}),o.resolve(p)},this),error:_.bind(function(e){403==e.status&&"INVALID_API_ACCESS_POINT"==e.responseJSON.code&&i.esApi.authApi.clearESAuthSession(),o.reject({httpRespCode:e.status,httpRespBody:e.responseText})},this)})},this)),o}}),t.GetSignaturesActivityListOp}),define("acplugins/signatures/js/ops/downloading/open-sign-agreement-op",["core/ac-core","acplugins/signatures/js/ac-signature","core/utils/sc-analytics","pdmplugins/esign/js/ac-esign","core/ops/op"],function(e,t,i){return t.OpenSignAgreementOp=e.Op.extend({run:function(e){var t=this.options,s=t.appApi,n=t.esApi.authApi.createAuthSession(t),o=$.Deferred();if("DRAFT"==e.model.attributes.signature_info.state){const a=[e.model.attributes.signature_info.state,e.model.attributes.signature_info.wf_rsdraft_filesys,e.model.attributes.signature_info.wf_rsdraft_filepath];this.options.appApi.rnaApi.then(_.bind(function(t){var i=e.model;t.rnaSignWorkflowServicesAPI.invokeMethod({methodName:"openSignDraftFile",methodArgs:a}).then(_.bind(function(e){if(e&&e.delete&&1==e.delete){var t="fullItem-"+i.id,s="#"+t;$(s).hide()}}))}))}else if("LIBRARY_TEMPLATE"==e.model.attributes.signature_info.state){const a=[];a.push(e.model.attributes.signature_info.state),a.push(e.model.attributes.resources[0].id),a.push(e.model.attributes.resources[0].invitationUrn),this.options.appApi.rnaApi.then(_.bind(function(t){e.model;t.rnaSignWorkflowServicesAPI.invokeMethod({methodName:"openSignTemplateFile",methodArgs:a})}))}else n.then(_.bind(function(){var n=t.esAuthUiModel.get("access_token"),o=s.rnaApiObj.esApi.getEchoSignApiURL(),a={},r=e.model,l="",c=r.attributes.signature_info.state,d=r.attributes.resources[0].name,h=r.attributes.resources[0].id;t.esAuthSessionExists=!0,c.startsWith("WAITING_FOR_MY_")?this.options.appApi.siteCatalystApi.logScEvent([i.SIGN_DOC_OPEN_FOR_SIGN,i.CLICKED]):(this.options.appApi.siteCatalystApi.logScEvent([i.SIGN_DOC_OPEN,i.CLICKED]),l=o+"/api/rest/v6/agreements/"+h+"/combinedDocument"),s.rnaApi.done(_.bind(function(e){a.agreementURL=l,a.agreementID=h,a.agreementName=d,a.accessToken=n,a.agreementState=c;var t=e.signServiceAuthAPI.ensureValidSignSession();t.done(_.bind(function(){this.options.appApi.rnaApi.done(_.bind(function(e){e.rnaSignWorkflowServicesAPI.openSignFile(a)}))},this))},this))},this));return o}}),t.OpenSignAgreementOp}),define("acplugins/signatures/js/ops/getting/get-next-participant-list-op",["core/ac-core","acplugins/signatures/js/ac-signature","acplugins/signatures/js/constants/sign-constants","pdmplugins/esign/js/ac-esign","core/utils/http-util","core/ops/op"],function(e,t,i,s,n){return t.GetNextParticipantOp=e.Op.extend({run:function(e){var t=this.options,o=t.esApi.authApi.createAuthSession(t),a=$.Deferred();return o.then(_.bind(function(){var o=t.esAuthUiModel.get("access_token"),r=t.appApi.rnaApiObj.esApi.getEchoSignApiURL();t.esAuthSessionExists=!0,t.appApi.rnaApi.done(_.bind(function(t){var l="";l=t.rnaSignWorkflowServicesAPI.isSignV10Enabled()?"/members":"/participantSets";var c="?includeNextParticipantSet=true",d=_.isUndefined(e)?this.options.agreementID:e,h=r+i.API_SUBPATH_V6+"/agreements/"+d+l+c,p=_.extend({Accept:"application/json",Authorization:"Bearer "+o},n.getSignRequestHeaders());$.ajax({url:h,type:"GET",headers:p,contentType:"application/json",dataType:"json",modal:!1,success:_.bind(function(e){a.resolve(e)},this),error:_.bind(function(e){403==e.status&&"INVALID_API_ACCESS_POINT"==e.responseJSON.code&&s.esApi.authApi.clearESAuthSession(),a.reject({httpRespCode:e.status,httpRespBody:e.responseText})},this)})},this))},this)),a}}),t.GetNextParticipantOp}),define("acplugins/signatures/js/ops/getting/get-sign-agreement-etag-op",["core/ac-core","acplugins/signatures/js/ac-signature","pdmplugins/esign/js/ac-esign","core/utils/http-util","core/ops/op"],function(e,t,i,s){return t.GetAgreementIDEtagOp=e.Op.extend({run:function(e){var t=this.options,n=(t.appApi,t.esApi.authApi.createAuthSession(t)),o=$.Deferred();return n.then(_.bind(function(){var n,a=t.esAuthUiModel.get("access_token"),r=t.appApi.rnaApiObj.esApi.getEchoSignApiURL(),l={};t.esAuthSessionExists=!0;var c=_.extend({Authorization:"Bearer "+a},s.getSignRequestHeaders());n=r+"/api/rest/v6/agreements/"+e.agreementID,$.ajax({url:n,type:"GET",modal:!1,headers:c,contentType:"application/json",dataType:"json",success:_.bind(function(e,t,i){l.eTag=i.getResponseHeader("ETag"),o.resolve(l)},this),error:_.bind(function(e){console.log("Error in fetching Agreement Id"),403==e.status&&"INVALID_API_ACCESS_POINT"==e.responseJSON.code&&i.esApi.authApi.clearESAuthSession(),o.reject({httpRespCode:e.status,httpRespBody:e.responseText})},this)})},this)),o}}),t.GetAgreementIDEtagOp}),define("acplugins/signatures/js/ops/getting/get-sign-agreement-data-op",["core/ac-core","acplugins/signatures/js/ac-signature","core/ops/op","pdmplugins/esign/js/ac-esign"],function(e,t){t.GetSignatureAgreementDataOp=e.Op.extend({run:function(e){var t=this.options,i=t.esApi.authApi.createAuthSession(t);t.params=e,i.then(_.bind(function(){var e=t.esAuthUiModel.get("access_token"),i=t.appApi.rnaApiObj.esApi.getEchoSignApiURL(),s=t.params.agreementId,n=[];n.push(this._getAgreementsAPICall(i,e)),n.push(this._getAgreementDetailsAPICall(s,i,e)),n.push(this._getAgreementParticipantDetailsAPICall(s,i,e)),Promise.all(n).then(_.bind(function(e){var i=Object.assign({},e[1].data,e[2].data);void 0!==i.createdDate&&(i.createdDate=this._formatDate(new Date(Date.parse(i.createdDate)))),void 0!==i.expirationTime&&(i.expirationTime=this._formatDate(new Date(Date.parse(i.expirationTime)))),i.eTag=e[1].xhr.getResponseHeader("ETag"),e[0].data.userAgreementList.forEach(function(e){e.id===s&&(i.status=e.status)}),t.appApi.rnaApi.done(_.bind(function(e){e.rnaSignWorkflowServicesAPI.invokeMethod({methodName:"updateDataModelForAgreement",methodArgs:i})},i))},this))},this))},_getAgreementsAPICall:function(e,t){var i=e+"/api/rest/v6/agreements",s=$.Deferred(),n={Accept:"application/json",Authorization:"Bearer "+t};return $.ajax({url:i,headers:n,type:"GET",dataType:"json",global:!1,success:_.bind(function(e,t,i){s.resolve({data:e,status:t,xhr:i})},this),error:_.bind(function(e){s.reject({httpRespCode:e.status,httpRespBody:e.responseText})},this)}),s},_getAgreementDetailsAPICall:function(e,t,i){var s=t+"/api/rest/v6/agreements/"+e,n=$.Deferred(),o={Accept:"application/json",Authorization:"Bearer "+i};return $.ajax({url:s,headers:o,type:"GET",dataType:"json",global:!1,success:_.bind(function(e,t,i){n.resolve({data:e,status:t,xhr:i})},this),error:_.bind(function(e){n.reject({httpRespCode:e.status,httpRespBody:e.responseText})},this)}),n},_getAgreementParticipantDetailsAPICall:function(e,t,i){var s=t+"/api/rest/v6/agreements/"+e+"/participantSets",n=$.Deferred(),o={Accept:"application/json",Authorization:"Bearer "+i};return $.ajax({url:s,headers:o,type:"GET",dataType:"json",global:!1,success:_.bind(function(e,t,i){n.resolve({data:e,status:t,xhr:i})},this),error:_.bind(function(e){n.reject({httpRespCode:e.status,httpRespBody:e.responseText})},this)}),n},_pad:function(e,t,i){return i=i||"0",e+="",e.length>=t?e:new Array(t-e.length+1).join(i)+e},_formatDate:function(e){return e instanceof Date?""+e.getUTCFullYear()+this._pad(e.getUTCMonth()+1,2)+this._pad(e.getUTCDate(),2)+this._pad(e.getUTCHours(),2)+this._pad(e.getUTCMinutes(),2)+this._pad(e.getUTCSeconds(),2)+"Z":""}})}),define("acplugins/signatures/js/ops/getting/get-sign-agreement-thumbnail-op",["core/ac-core","acplugins/signatures/js/ac-signature","acplugins/signatures/js/constants/sign-constants","pdmplugins/esign/js/ac-esign","core/utils/http-util","core/ops/op"],function(e,t,i,s,n){return t.GetSignAgreementThumbnailOp=e.Op.extend({run:function(e,t,i,s){var n=this.options,o=n.appApi,a=n.esApi.authApi.createAuthSession(n),r=$.Deferred();return a.then(_.bind(function(){var a=n.esAuthUiModel.get("access_token"),l=o.rnaApiObj.esApi.getEchoSignApiURL();void 0===t&&(t="FIXED_WIDTH_50px,FIXED_WIDTH_250px"),this._getThumbnailAPICall(e,l,a,t).then(_.bind(function(e){if(e.data.hasOwnProperty("originalDocumentsImageUrlsInfo")){var t=e.data.originalDocumentsImageUrlsInfo;if(Array.isArray(t)&&t.length>0){var n=t[0];
if(n.hasOwnProperty("documentImageUrlsList")&&Array.isArray(n.documentImageUrlsList)){var o={};return n.documentImageUrlsList.forEach(function(e){e.hasOwnProperty("imagesAvailable")&&e.imagesAvailable===!0&&(o[e.imageSize]=e.imageURLs[0].url)}),void r.resolve(i===!0?{ImageURL:o,ItemID:s}:o)}}}r.reject()},this),_.bind(function(e){r.reject(e)},this))},this)),r},_getThumbnailAPICall:function(e,t,o,a){var r=t+i.API_SUBPATH_V6+"/agreements/",l=$.Deferred(),c=_.extend({Accept:"application/json",Authorization:"Bearer "+o,"If-None-Match":""},n.getSignRequestHeaders());return r+=e,r+="/documents/imageUrls",$.ajax({url:r,headers:c,type:"GET",dataType:"json",data:{imageSizes:a},global:!1,success:_.bind(function(e,t,i){l.resolve({data:e,status:t,xhr:i})},this),error:_.bind(function(e){403==e.status&&"INVALID_API_ACCESS_POINT"==e.responseJSON.code&&s.esApi.authApi.clearESAuthSession(),l.reject({httpRespCode:e.status,httpRespBody:e.responseText})},this)}),l}}),t.GetSignaturesAuditTrailOp}),define("acplugins/signatures/js/ops/getting/get-sign-files-using-search-op",["core/ac-core","acplugins/signatures/js/ac-signature","acplugins/signatures/js/constants/sign-constants","pdmplugins/esign/js/ac-esign","core/utils/http-util","core/ops/op"],function(e,t,i,s,n){var o=["WAITING_FOR_MY_SIGNATURE","WAITING_FOR_MY_APPROVAL","WAITING_FOR_MY_DELEGATION","WAITING_FOR_MY_ACKNOWLEDGEMENT","WAITING_FOR_MY_ACCEPTANCE","WAITING_FOR_MY_FORM_FILLING","OUT_FOR_SIGNATURE","OUT_FOR_APPROVAL","OUT_FOR_DELIVERY","OUT_FOR_ACCEPTANCE","OUT_FOR_FORM_FILLING","SIGNED","APPROVED","DELIVERED","ACCEPTED","FORM_FILLED","EXPIRED","RECALLED","ARCHIVED","LIBRARY_TEMPLATE"];t.GetSignFilesListUsingSearchOp=e.Op.extend({run:function(e){var t=this.options,i=t.esApi.authApi.createAuthSession(t);i.then(_.bind(function(){this._getFileListInternal(e)},this))},_getFileListInternal:function(e){var i=this.options,s=i.esAuthUiModel.get("access_token"),n=i.appApi.rnaApiObj.esApi.getEchoSignApiURL(),a={};a.scope=[],a.scope.push("sign"),a.fetch_fields={},a.fetch_fields.includes=[],a.fetch_fields.includes.push("messages"),a.fetch_fields.includes.push("participant_list"),a.limit=100,a.state=o,this._signSearchAPICall(n,s,a).then(_.bind(function(o){var r={};r.response={},r.response.result_set=[],r.status_code=o.xhr.status,r.request=e,r.response.total_hits=o.data.metrics.total_hits,o.data.result_sets.forEach(function(e){"sign"===e.name&&r.response.result_set.push.apply(r.response.result_set,e.items)});var l=[];if(o.data.metrics.total_hits>100)for(var c=100;1e3>c&&c<o.data.metrics.total_hits;c+=100){var d=_.extend(a,{start_index:c}),h=this._signSearchAPICall(n,s,d);l.push(h)}Promise.all(l).then(_.bind(function(e){e.forEach(function(e){e.data.result_sets.forEach(function(e){"sign"===e.name&&r.response.result_set.push.apply(r.response.result_set,e.items)})});var s=[];r.response.result_set.forEach(_.bind(function(e){e.create_date=this._formatDate(new Date(Date.parse(e.create_date))),e.modify_date=this._formatDate(new Date(Date.parse(e.modify_date))),null!==e.expire_date&&(e.expire_date=this._formatDate(new Date(Date.parse(e.expire_date)))),!_.isUndefined(e.roles)&&e.roles.length>1&&e.roles.indexOf("ORIGINATOR")>=0&&s.push(t.opFactory.create("GetNextParticipantOp",this.options).run(e.agreement_id))},this)),Promise.all(s).then(_.bind(function(e){var t=0;r.response.result_set.forEach(_.bind(function(i){if(!_.isUndefined(i.roles)&&i.roles.length>1&&i.roles.indexOf("ORIGINATOR")>=0&&t<e.length){var s=e[t],n={};s.participantSets.forEach(function(e){for(var t=0;t<e.memberInfos.length;t++)e.memberInfos[t].id===s.senderInfo.participantId&&(n.address=e.memberInfos[t].email,n.roles=i.roles,n.label=e.memberInfos[t].name,n.state=e.status,n.id=e.memberInfos[t].id)}),i.participant_list||(i.participant_list=[]),i.participant_list.push(n),t++}},this)),i.appApi.rnaApi.done(_.bind(function(e){e.rnaSignWorkflowServicesAPI.invokeMethod({methodName:"updateDataModelFromSignDataAPI",methodArgs:r})},this))},this))},this))},this),_.bind(function(e){i.appApi.rnaApi.done(_.bind(function(t){t.rnaSignWorkflowServicesAPI.invokeMethod({methodName:"updateDataModelFromSignDataAPI",methodArgs:e})},this))},this))},_signSearchAPICall:function(e,t,o){var a=e+i.API_SUBPATH_GATEWAY+"/search",r=$.Deferred(),l=_.extend({"Content-Type":"application/json",Authorization:"Bearer "+t},n.getSignRequestHeaders());if(_.isUndefined(t)){var c={code:"INVALID_ACCESS_TOKEN",message:"Access token provided is invalid or has expired",status_code:401};r.reject(c)}else $.ajax({url:a,headers:l,type:"POST",dataType:"json",data:JSON.stringify(o),global:!1,success:_.bind(function(e,t,i){r.resolve({data:e,status:t,xhr:i})},this),error:_.bind(function(e){var t=e.responseJSON||{};t.status_code=e.status||400,"INVALID_IMS_PROFILE"===t.code&&void 0!==t.details&&t.details.signProfile.authenticatingAccount===t.details.loggedInProfile.authenticatingAccount?(this.options.signProfileID=t.details.signProfile.profileId,this.options.signProfileName=t.details.signProfile.profileName,this.options.loggedInProfileName=t.details.loggedInProfile.profileName,this.options.appApi.rnaApi.done(_.bind(function(e){e.esApi.invokeMethod({methodName:"GetEchoSignAccessTokenFromCluster",methodArgs:[t.details.signProfile.profileId,t.details.signProfile.profileName,t.details.loggedInProfile.profileName]}).then(_.bind(function(e){this.options.accessToken=e.accessToken;var t=(new Date).getTime()/1e3;this.options.expiresIn=e.expiryTime/1e3-t;var i=this.options.esAuthUiModel;this.options.appApi.rnaApi.accessToken=this.options.accessToken,i.set("access_token",this.options.accessToken),i.set("expiration_time",this.options.expiresIn),i.set("refresh_token",""),i.set("signin_profile_id",this.options.signProfileID),i.set("signin_profile_name",this.options.signProfileName),i.set("loggedin_profile_name",this.options.loggedInProfileName),l=_.extend({"Content-Type":"application/json",Authorization:"Bearer "+e.accessToken},n.getSignRequestHeaders()),$.ajax({url:a,headers:l,type:"POST",dataType:"json",data:JSON.stringify(o),global:!1,success:_.bind(function(e,t,i){r.resolve({data:e,status:t,xhr:i})},this),error:function(e){var t=e.responseJSON||{};t.status_code=e.status||400,403==e.status&&"INVALID_API_ACCESS_POINT"==e.responseJSON.code&&s.esApi.authApi.clearESAuthSession(),r.reject(t)}})},this),function(){r.reject(t)})},this))):403==e.status&&"INVALID_API_ACCESS_POINT"==e.responseJSON.code?(s.esApi.authApi.clearESAuthSession(),r.reject(t)):r.reject(t)},this)});return r},_pad:function(e,t,i){return i=i||"0",e+="",e.length>=t?e:new Array(t-e.length+1).join(i)+e},_formatDate:function(e){return e instanceof Date?""+e.getUTCFullYear()+this._pad(e.getUTCMonth()+1,2)+this._pad(e.getUTCDate(),2)+this._pad(e.getUTCHours(),2)+this._pad(e.getUTCMinutes(),2)+this._pad(e.getUTCSeconds(),2)+"Z":""}})}),define("acplugins/signatures/js/ops/getting/get-sign-agreement-data-using-search-op",["core/ac-core","acplugins/signatures/js/ac-signature","acplugins/signatures/js/constants/sign-constants","pdmplugins/esign/js/ac-esign","core/utils/http-util","core/ops/op"],function(e,t,i,s,n){t.GetSignatureAgreementDataUsingSearchOp=e.Op.extend({run:function(e){var t=this.options,i=t.esApi.authApi.createAuthSession(t),s=$.Deferred();return i.then(_.bind(function(){var i=t.esAuthUiModel.get("access_token"),n=t.appApi.rnaApiObj.esApi.getEchoSignApiURL(),o=e.agreementId,a={};a.scope=[],a.scope.push("sign"),a.fetch_fields={},a.fetch_fields.includes=[],a.fetch_fields.includes.push("messages"),a.fetch_fields.includes.push("participant_list"),a.agreement_id=[],a.agreement_id.push(o),this._signSearchAPICall(n,i,a).then(_.bind(function(t){var i={};i.response={},i.request=JSON.stringify(e),t.data.result_sets.forEach(function(e){"sign"===e.name&&(i.response.result_set=e.items)}),i.response.result_set.forEach(_.bind(function(e){e.create_date=this._formatDate(new Date(Date.parse(e.create_date))),e.modify_date=this._formatDate(new Date(Date.parse(e.modify_date))),null!==e.expire_date&&(e.expire_date=this._formatDate(new Date(Date.parse(e.expire_date))))},this)),s.resolve(i)},this))},this)),s},_signSearchAPICall:function(e,t,o){var a=e+i.API_SUBPATH_GATEWAY,r=$.Deferred(),l=_.extend({"Content-Type":"application/json",Authorization:"Bearer "+t},n.getSignRequestHeaders());return this.options.appApi.rnaApi.done(_.bind(function(e){if(a+=e.rnaSignWorkflowServicesAPI.isSignV10Enabled()?"/search":"/agreementsearch",_.isUndefined(t)){var i={code:"INVALID_ACCESS_TOKEN",message:"Access token provided is invalid or has expired",status_code:401};r.reject(i)}else _.delay(_.bind(function(){$.ajax({url:a,headers:l,type:"POST",dataType:"json",data:JSON.stringify(o),global:!1,success:_.bind(function(e,t,i){r.resolve({data:e,status:t,xhr:i})},this),error:_.bind(function(e){403==e.status&&"INVALID_API_ACCESS_POINT"==e.responseJSON.code&&s.esApi.authApi.clearESAuthSession(),r.reject({httpRespCode:e.status,httpRespBody:e.responseText})},this)})},this),1e3)},this)),r},_pad:function(e,t,i){return i=i||"0",e+="",e.length>=t?e:new Array(t-e.length+1).join(i)+e},_formatDate:function(e){return e instanceof Date?""+e.getUTCFullYear()+this._pad(e.getUTCMonth()+1,2)+this._pad(e.getUTCDate(),2)+this._pad(e.getUTCHours(),2)+this._pad(e.getUTCMinutes(),2)+this._pad(e.getUTCSeconds(),2)+"Z":""}})}),define("acplugins/signatures/js/ops/getting/get-sign-agreement-data-batch-using-search-op",["core/ac-core","acplugins/signatures/js/ac-signature","acplugins/signatures/js/constants/sign-constants","pdmplugins/esign/js/ac-esign","core/utils/http-util","core/ops/op"],function(e,t,i,s,n){t.GetSignatureAgreementDataBatchUsingSearchOp=e.Op.extend({run:function(e){var t=this.options,i=t.esApi.authApi.createAuthSession(t),s=$.Deferred();return i.then(_.bind(function(){var i=t.esAuthUiModel.get("access_token"),n=t.appApi.rnaApiObj.esApi.getEchoSignApiURL(),o=e.agreementIds,a={};a.scope=[],a.scope.push("sign"),a.fetch_fields={},a.fetch_fields.includes=[],a.fetch_fields.includes.push("messages"),a.fetch_fields.includes.push("participant_list"),a.agreement_id=o,this._signSearchAPICall(n,i,a).then(_.bind(function(t){var i={};i.response={},i.request=JSON.stringify(e),t.data.result_sets.forEach(function(e){"sign"===e.name&&(i.response.result_set=e.items)}),i.response.result_set.forEach(_.bind(function(e){e.create_date=this._formatDate(new Date(Date.parse(e.create_date))),e.modify_date=this._formatDate(new Date(Date.parse(e.modify_date))),null!==e.expire_date&&(e.expire_date=this._formatDate(new Date(Date.parse(e.expire_date))))},this)),s.resolve(i)},this))},this)),s},_signSearchAPICall:function(e,t,o){var a=e+i.API_SUBPATH_GATEWAY,r=$.Deferred(),l=_.extend({"Content-Type":"application/json",Authorization:"Bearer "+t},n.getSignRequestHeaders());return this.options.appApi.rnaApi.done(_.bind(function(e){if(a+=e.rnaSignWorkflowServicesAPI.isSignV10Enabled()?"/search":"/agreementsearch",_.isUndefined(t)){var i={code:"INVALID_ACCESS_TOKEN",message:"Access token provided is invalid or has expired",status_code:401};r.reject(i)}else $.ajax({url:a,headers:l,type:"POST",dataType:"json",data:JSON.stringify(o),global:!1,success:_.bind(function(e,t,i){r.resolve({data:e,status:t,xhr:i})},this),error:_.bind(function(e){403==e.status&&"INVALID_API_ACCESS_POINT"==e.responseJSON.code&&s.esApi.authApi.clearESAuthSession(),r.reject({httpRespCode:e.status,httpRespBody:e.responseText})},this)})},this)),r},_pad:function(e,t,i){return i=i||"0",e+="",e.length>=t?e:new Array(t-e.length+1).join(i)+e},_formatDate:function(e){return e instanceof Date?""+e.getUTCFullYear()+this._pad(e.getUTCMonth()+1,2)+this._pad(e.getUTCDate(),2)+this._pad(e.getUTCHours(),2)+this._pad(e.getUTCMinutes(),2)+this._pad(e.getUTCSeconds(),2)+"Z":""}})}),define("acplugins/signatures/js/ops/plugin/inititalize-echosign-op",["core/ac-core","acplugins/signatures/js/ac-signature","pdmplugins/esign/js/ac-esign","core/ops/op"],function(e,t,i){t.InitializeEchoSignOp=e.Op.extend({run:function(){var e=this.options;i.opFactory.create("InitializingOp",e).run(),e.esApi=i.esApi,e.esInitialized=!0}})}),define("acplugins/signatures/js/ops/op-factory",["core/ac-core","acplugins/signatures/js/ac-signature","core/ops/selection/clearing-selection-op","core/ops/selection/selecting-collection-item-op","acplugins/signatures/js/ops/plugin/starting-plugin-op","acplugins/signatures/js/ops/plugin/listening-for-view-events-op","acplugins/signatures/js/ops/getting/getting-parcels-op","acplugins/signatures/js/ops/getting/getting-rhp-preview-metadata-op","acplugins/signatures/js/ops/downloading/downloading-parcel-assets-op","acplugins/signatures/js/ops/downloading/saveas-single-asset-op","acplugins/signatures/js/ops/manipulation/deleting-parcel-if-confirmed-op","acplugins/signatures/js/ops/manipulation/deleting-parcel-op","acplugins/signatures/js/ops/manipulation/forwarding-parcel-op","acplugins/signatures/js/ops/manipulation/setting-delivery-receipts-op","acplugins/signatures/js/ops/manipulation/unsharing-parcel-if-confirmed-op","acplugins/signatures/js/ops/manipulation/unsharing-parcel-op","acplugins/signatures/js/ops/manipulation/remind-participant-sendAPI-op","acplugins/signatures/js/ops/manipulation/cancel-agreement-op","acplugins/signatures/js/ops/selection/selecting-collection-item-op","acplugins/signatures/js/ops/showing/showing-parcel-preview-op","acplugins/signatures/js/ops/showing/showing-sign-in-op","acplugins/signatures/js/ops/showing/showing-single-asset-op","acplugins/signatures/js/ops/showing/desktop-show-in-browser-op","acplugins/signatures/js/ops/showing/jump-to-browser-api-call-op","acplugins/signatures/js/ops/getting/get-sign-files-op","acplugins/signatures/js/ops/getting/get-sign-audit-trail-op","acplugins/signatures/js/ops/getting/get-sign-activity-op","acplugins/signatures/js/ops/downloading/open-sign-agreement-op","acplugins/signatures/js/ops/getting/get-next-participant-list-op","acplugins/signatures/js/ops/getting/get-sign-agreement-etag-op","acplugins/signatures/js/ops/getting/get-sign-agreement-data-op","acplugins/signatures/js/ops/getting/get-sign-agreement-thumbnail-op","acplugins/signatures/js/ops/getting/get-sign-files-using-search-op","acplugins/signatures/js/ops/getting/get-sign-agreement-data-using-search-op","acplugins/signatures/js/ops/getting/get-sign-agreement-data-batch-using-search-op","acplugins/signatures/js/ops/plugin/inititalize-echosign-op"],function(e,t){t.OpFactory=e.Op.extend({create:function(e,i){var s=t[e];return s?new s(i):void LOG(0,"AcSignatures.OpFactory.create: Unrecognized class: "+e)}})}),define("acplugins/signatures/js/utils/sc-constants",["plugins-common/ac-plugins"],function(e){e.Signatures||(e.Signatures={});var t=e.Signatures;return t.ScConstants={ACTION:"Action",ACTIONS:"Actions",ADD_FILES_TO_SHARE:"AddFilesToShare",ADDRESS_BOOK:"AddressBook",ATTEMPTED_TO_SHARE_FORM:"AttemptedToShareForm",AUTOCOMPLETE:"Autocomplete",AVOIDED:"Avoided",BROWSER_CLOSE:"BrowserClosed",BRANDING:"Branding",CANCEL:"Cancel",CHECKED:"Checked",CHICKLET_ADDED:"ChickletAdded",CLICKED:"Clicked",CLICK_BRANDING:"ClickBranding",CLICK_BRANDING_IN_READER:"ClickBrandingInReader",CLICK_BRANDING_IN_ACROBAT:"ClickBrandingInAcrobat",CLOSE:"Close",COLOR_INPUT:"ColorInput",COLOR_MENU_BUTTON:"ColorMenuButton",COLOR_WELL:"ColorWell",CONTINUE:"Continue",DATE_VIEWED:"DateViewed",DEFAULT:"Default",DIALOG:"Dialog",DISABLED:"Disabled",DISALLOWED:"Disallowed",DOWNLOAD:"Download",DOWNLOAD_ALL:"DownloadAll",DOWNLOAD_ONE:"DownloadOne",DRAG_FILES:"DragFiles",DURATION:"Duration",EDIT_BRANDING_ONLINE:"ContinueOnline",EMAIL:"Email",EMAIL_LINK:"EmailLink",ENABLED:"Enabled",ENTERED:"Entered",EVENTUAL_CLICK:"EventualClick",FILE:"File",FILE_LIST:"FileList",FILE_NAME:"FileName",FILES_SHARED_DLG:"FilesSharedDlg",FORWARD:"Forward",FULL_ACTIVITY:"FullActivity",HIDDEN:"Hidden",IMMEDIATE_CLICK:"ImmediateClick",INCLUDE_MESSAGE_TEXT:"IncludeMessageText",INCLUDE_REPLY_TO:"IncludeReplyTo",IPM:"IPM",LATER:"Later",LOGO_BUTTON:"LogoButton",LOGO_CANCEL:"LogoCancel",LOGO_SAVE:"LogoSave",MESSAGE:"Message",MULTI:"Multi",NO_PARCELS:"NoParcels",NOTIFY_WHEN_VIEWED:"NotifyWhenViewed",NUM_FILES_CHECKED:"NumFilesChecked",PERSONAL:"Personal",PERSONAL_AND_PUBLIC:"PersonalANDPublic",PREVIEW:"Preview",PUBLIC:"Public",PUBLIC_LINK:"PublicLink",RECVIEW:"RecView",REPLY:"Reply",REMOVE:"Remove",REPORT_ABUSE:"ReportAbuse",RHP:"RHP",SCROLL:"Scroll",SAVE_AS:"SaveAs",SELECT_ALL:"SelectAll",SELECT_FILES:"SelectFiles",SENT_FILES:"SentFiles",SHARE:"Share",SHARE_BUTTON:"ShareButton",SHARE_FILE_BUTTON:"ShareFileButton",SHARE_ICON:"ShareIcon",SHARE_WITH:"ShareWith",SHARED:"Shared",SHOWN:"Shown",SINGLE:"Single",SORT:"Sort",SUBJECT:"Subject",SUCCESS:"Success",SURVEY:"Survey",SURVEY_CANCEL:"SurveyCancel",SURVEY_FIELD_FOCUS:"SurveyFieldFocus",SURVEY_LINK:"SurveyLink",SURVEY_SEND:"SurveySend",TOOLS:"Tools",TRACK:"Track",TRASH:"Trash",TURN_OFF_BRANDING:"TurnOffBranding",TURN_ON_BRANDING:"TurnOnBranding",UNCHECKED:"Unchecked",UNSHARE:"Unshare",UPGRADE:"Upgrade",URL_HIGHLIGHT:"UrlHighlight",URL_KEY_COPY:"UrlKeyCopy",VIEW:"View",VIEW_ALL_SHARED_FILES:"ViewAllSharedFiles",VIEW_FULL_ACTIVITY:"ViewFullActivity",WARNED_BEFORE_CLOSING:"WarnB4Close",WARNING:"Warning",WITH_REPLY:"wReply",1:"1","2_TO_5":"2to5","6_TO_10":"6to10","11_OR_MORE":"11orMore","11_TO_20":"11to20","21_TO_40":"21to40","41_TO_120":"41to120","121_OR_MORE":"121orMore",FSS:"FSS",FORM:"Form",OUTPUT:"Output",SAVE_TO_PDF:"SaveToPDF","1_STARTED":"1-Started","2_COMPLETED":"2-Completed",ERROR:"Error",SEND_TAB:"SendTab",COMPLETED:"Completed",ALL:"All",DRAFT:"Drafts",IN_PROGRESS:"In progress",WAITING_FOR_YOU:"Waiting for you",EXPIRED:"Expired",CANCELED:"Canceled",TEMPLATES:"Templates"},t.ScConstants}),define("acplugins/signatures/js/templates/tracked-send-template.html",[],function(){return'<div class="on-signed-in ui-theme theme-container"></div>    <div class= "one_table" >      <div class= "one_row" >         <div class="lhs_space" >        </div >        <div class="on-signed-out ui-theme theme-container ">        </div >       </div >       </div >     <div class="files-offline-view ui-theme theme-container"></div>	 <div class="files-no-access-view ui-theme theme-container"></div>    <div class="context-board-view context-board-rhp"></div>'}),define("acplugins/signatures/js/utils/sharing",[],function(){var e={Connector:{kind:"value",values:["DOCCLD","CCLOUD","ONEDRV"]},CountValue2:{kind:"value",values:["2to5","6to10","11orMore"]},CountValue1:{kind:"value",values:["1","2to5","6to10","11orMore"]},CountValue0:{kind:"value",values:["0","1","2to5","6to10","11orMore"]}},t=[{pageName:"FileList:SentFiles:Clicked",selector:""},{pageName:"FileList:SentFiles:Action:Unshare",selector:""},{pageName:"FileList:SentFiles:Action:Forward",selector:""},{pageName:"FileList:SentFiles:Action:Download",selector:""},{pageName:"FileList:SentFiles:Action:Trash",selector:""},{pageName:"FileList:SentFiles:Action:SelectAll",selector:""},{pageName:"FileList:SentFiles:FileName:Checked",selector:""},{pageName:"FileList:SentFiles:FileName:Unchecked",selector:""},{pageName:"FileList:SentFiles:NumFilesChecked:<CountValue1>",selector:"",variables:{CountValue1:e.CountValue1},values:e.CountValue1},{pageName:"Preview:Shared:Single:Shown",selector:""},{pageName:"Preview:Shared:Multi:Shown",selector:""},{pageName:"Preview:Shared:Single:NotifyWhenViewed:Checked",selector:""},{pageName:"Preview:Shared:Multi:NotifyWhenViewed:Checked",selector:""},{pageName:"Preview:Shared:Single:NotifyWhenViewed:Unchecked",selector:""},{pageName:"Preview:Shared:Multi:NotifyWhenViewed:Unchecked",selector:""},{pageName:"Preview:Shared:Single:ViewFullActivity",selector:""},{pageName:"Preview:Shared:Multi:ViewFullActivity",selector:""},{pageName:"Preview:Shared:Multi:PreviewFile:SendFileAgain",selector:""},{pageName:"Preview:Shared:Single:Unshare",selector:""},{pageName:"Preview:Shared:Multi:Unshare",selector:""},{pageName:"Preview:Shared:Single:PublicLink",selector:""},{pageName:"Preview:Shared:Multi:PublicLink",selector:""},{pageName:"Preview:Shared:Multi:Forward",selector:""},{pageName:"Preview:Shared:Multi:File:NextPg",selector:""},{pageName:"Preview:Shared:Multi:File:PrevPg",selector:""},{pageName:"Preview:Shared:Multi:UnshareDlg:Shown",selector:""},{pageName:"Preview:Shared:Multi:UnshareDlg:Unshare:Clicked",selector:""},{pageName:"Preview:Shared:Multi:UnshareDlg:Unshare:Cancel",selector:""},{pageName:"Preview:Shared:Single:FullActivity:Shown",selector:""},{pageName:"Preview:Shared:Multi:FullActivity:Shown",selector:""},{pageName:"Preview:Shared:Single:FullActivity:Close",selector:""},{pageName:"Preview:Shared:Multi:FullActivity:Close",selector:""},{pageName:"Preview:Shared:Multi:FullActivity:Filter:All",selector:""},{pageName:"Preview:Shared:Multi:FullActivity:Filter:Recipient",selector:""},{pageName:"Preview:Shared:Multi:FullActivity:Filter:Activity",selector:""},{pageName:"Preview:Shared:Multi:FullActivity:Filter:Item",selector:""},{pageName:"Preview:Shared:Multi:FullActivity:Sort:ViewedBy",selector:""},{pageName:"Preview:Shared:Multi:FullActivity:Sort:DateViewed",selector:""},{pageName:"Preview:Shared:Multi:FullActivity:Close",selector:""},{pageName:"Preview:Shared:Multi:FullActivity:Sort:File",selector:""},{pageName:"Preview:Shared:Multi:Preview:RHP:ShareFileButton",selector:""},{pageName:"RecView:Multi:Shown",selector:""},{pageName:"RecView:Multi:Shown:wReply",selector:""},{pageName:"RecView:Multi:SaveToAcrobat",selector:""},{pageName:"RecView:Multi:File:NextPg",selector:""},{pageName:"RecView:Multi:File:PrevPg",selector:""},{pageName:"RecView:Preview:BottomNavBar:FitPgFull",selector:""},{pageName:"RecView:Preview:BottomNavBar:FitPgWidth",selector:""},{pageName:"RecView:Preview:BottomNavBar:FullScreen",selector:""},{pageName:"RecView:Preview:BottomNavBar:HideRHP",selector:""},{pageName:"RecView:Preview:BottomNavBar:NextPg",selector:""},{pageName:"RecView:Preview:BottomNavBar:PrevPg",selector:""},{pageName:"RecView:Preview:BottomNavBar:Scroll",selector:""},{pageName:"RecView:Preview:BottomNavBar:Close",selector:""},{pageName:"RecView:Multi:Preview:Shown",selector:""},{pageName:"RecView:Multi:Preview:ReportAbuse",selector:""},{pageName:"RecView:Multi:Preview:Download",selector:""},{pageName:"RecView:Multi:downloadOne",selector:""},{pageName:"RecView:Multi:downloadAll",selector:""},{pageName:"RecView:Multi:Preview:BackButton",selector:""},{pageName:"RecView:Multi:Preview:Reply",selector:""},{pageName:"RecView:Single:Shown",selector:""},{pageName:"RecView:Single:Shown:wReply",selector:""},{pageName:"RecView:Single:ReportAbuse",selector:""},{pageName:"RecView:Single:Download",selector:""},{pageName:"RecView:Single:Reply",selector:""},{pageName:"Preview:Toolbar:Share:Clicked",selector:""},{pageName:"Tools:Share:Clicked",selector:""},{pageName:"Tools:Share:Shown",selector:""},{pageName:"Tools:Share:Shown:Duration:<DurationValue>",selector:""},{pageName:"Tools:Share:ts-direct-to-workflow-view:<cohort-name>",selector:""},{pageName:"Tools:Share:welcome:Shown",selector:""},{pageName:"Tools:Share:workflow:Shown",selector:""},{pageName:"Tools:Share:success:Shown",selector:""},{pageName:"Tools:Share:welcome:Shown:Duration:<DurationValue>",selector:""},{pageName:"Tools:Share:workflow:Shown:Duration:<DurationValue>",selector:""},{pageName:"Tools:Share:success:Shown:Duration:<DurationValue>",selector:""},{pageName:"Tools:Share:welcome:BrowserClosed:Duration:<DurationValue>",selector:""},{pageName:"Tools:Share:workflow:BrowserClosed:Duration:<DurationValue>",selector:""},{pageName:"Tools:Share:success:BrowserClosed:Duration:<DurationValue>",selector:""},{pageName:"Tools:Share:SelectFiles:Clicked",selector:""},{pageName:"Tools:Share:ViewAllSharedFiles:Clicked",selector:""},{pageName:"Tools:Share:AddFilesToShare",selector:""},{pageName:"Tools:Share:ShareWith:Public",selector:""},{pageName:"Tools:Share:ShareWith:Public:Checked",selector:""},{pageName:"Tools:Share:ShareWith:Public:Unchecked",selector:""},{pageName:"Tools:Share:ShareWith:Personal",selector:""},{pageName:"Tools:Share:ShareWith:Personal:Checked",selector:""},{pageName:"Tools:Share:ShareWith:Personal:Unchecked",selector:""},{pageName:"Tools:Share:ShareWith:Personal:<CountValue1>",selector:"",variables:{CountValue1:e.CountValue1},values:e.CountValue1},{pageName:"Tools:Share:Email:Disabled:Clicked",selector:""},{pageName:"Tools:Share:Subject:Entered",selector:""},{pageName:"Tools:Share:Message:Entered",selector:""},{pageName:"Tools:Share:Subject:Default",selector:""},{pageName:"Tools:Share:Message:Default",selector:""},{pageName:"Tools:Share:IncludeMessageText:Unchecked",selector:""},{pageName:"Tools:Share:IncludeMessageText:Checked",selector:""},{pageName:"Tools:Share:IncludeReplyTo:Unchecked",selector:""},{pageName:"Tools:Share:IncludeReplyTo:Checked",selector:""},{pageName:"Tools:Share:AttemptedToShareForm",selector:""},{pageName:"Tools:Share:ShareButton",selector:""},{pageName:"Tools:Share:ShareButton:Clicked",selector:""},{pageName:"Tools:Share:ShareButton:Disabled",selector:""},{pageName:"Tools:Share:Cancel",selector:""},{pageName:"Tools:Share:AddressBook:Clicked",selector:""},{pageName:"Tools:Share:AddressBook:Shown",selector:""},{pageName:"Tools:Share:AddressBook:Success",selector:""},{pageName:"Tools:Share:AddressBook:Cancel",selector:""},{pageName:"Tools:Share:AddressBook:IPM",selector:""},{pageName:"Tools:Share:AddressBook:Enabled",selector:""},{pageName:"Tools:Share:FilesSharedDlog:Personal:ts-success-dlg-1:<cohort-name>",selector:""},{pageName:"Tools:Share:FilesSharedDlog:Public:ts-success-dlg-1:<cohort-name>",selector:""},{pageName:"Tools:Share:FilesSharedDlg:PersonalANDPublic:ts-success-dlg-1:<cohort-name>",selector:""},{pageName:"Tools:Share:FilesSharedDlog:Personal:ts-public-url-copy:<cohort-name>",selector:""},{pageName:"Tools:Share:FilesSharedDlog:Public:ts-public-url-copy:<cohort-name>",selector:""},{pageName:"Tools:Share:FilesSharedDlg:PersonalANDPublic::ts-public-url-copy:<cohort-name>",selector:""},{pageName:"Tools:Share:FilesSharedDlg:Personal:Shown",selector:""},{pageName:"Tools:Share:FilesSharedDlg:Personal:Close",selector:""},{pageName:"Tools:Share:FilesSharedDlg:Public:Shown",selector:""},{pageName:"Tools:Share:FilesSharedDlg:Public:EmailLink",selector:""},{pageName:"Tools:Share:FilesSharedDlg:Public:UrlHighlight",selector:""},{pageName:"Tools:Share:FilesSharedDlg:Public:Close",selector:""},{pageName:"Tools:Share:FilesSharedDlg:PersonalANDPublic:Shown",selector:""},{pageName:"Tools:Share:FilesSharedDlg:PersonalANDPublic:EmailLink",selector:""},{pageName:"Tools:Share:FilesSharedDlg:PersonalANDPublic:UrlHighlight",selector:""},{pageName:"Tools:Share:FilesSharedDlg:Public:UrlKeyCopy",selector:""},{pageName:"Tools:Share:FilesSharedDlg:PersonalANDPublic:UrlKeyCopy",selector:""},{pageName:"Tools:Share:FilesSharedDlg:Personal:Duration:<DurationValue>",selector:""},{pageName:"Tools:Share:FilesSharedDlg:Public:Duration:<DurationValue>",selector:""},{pageName:"Tools:Share:FilesSharedDlg:PersonalANDPublic:Duration:<DurationValue>",selector:""},{pageName:"Tools:Share:FilesSharedDlg:Personal:WarnB4Close",selector:""},{pageName:"Tools:Share:FilesSharedDlg:Public:WarnB4Close",selector:""},{pageName:"Tools:Share:FilesSharedDlg:PersonalANDPublic:WarnB4Close",selector:""},{pageName:"Tools:Share:FilesSharedDlg:PersonalANDPublic:Close",selector:""},{pageName:"Tools:Share:ChooseFilesDlg:MyCmptr:Shown",selector:""},{pageName:"Tools:Share:ChooseFilesDlg:MyCmptr:ChooseFilesButton:Clicked",selector:""},{pageName:"Tools:Share:ChooseFilesDlg:MyCmptr:DragFiles:<CountValue1>",selector:"",variables:{CountValue1:e.CountValue1},values:e.CountValue1},{pageName:"Tools:Share:ChooseFilesDlg:MyCmptr:AddSelected:<CountValue1>",selector:"",variables:{CountValue1:e.CountValue1},values:e.CountValue1},{pageName:"Tools:Share:ChooseFilesDlg:MyCmptr:Cancel",selector:""},{pageName:"Tools:Share:ChooseFilesDlg:<Connector>:Shown",selector:"",variables:{Connector:e.Connector},values:e.Connector},{pageName:"Tools:Share:ChooseFilesDlg:<Connector>:ChooseFiles:Clicked",selector:"",variables:{Connector:e.Connector},values:e.Connector},{pageName:"Tools:Share:ChooseFilesDlg:<Connector>:AddSelected:<CountValue1>",selector:"",variables:{Connector:e.Connector,CountValue1:e.CountValue1},values:e.CountValue1},{pageName:"Tools:Share:ChooseFilesDlg:<Connector>:Cancel",selector:"",variables:{Connector:e.Connector},values:e.Connector},{pageName:"Tools:Share:ChooseFilesDlg:RecentFiles:Clicked",selector:""},{pageName:"Tools:Share:Branding:ColorMenuButton",selector:"",prop49:"Clicked on the color menu button in the customize branding dialog"},{pageName:"Tools:Share:Branding:LogoButton",selector:"",prop49:"Clicked to change logo in customize branding dialog"},{pageName:"Tools:Share:Branding:ClickBrandingInReader",selector:"",prop49:"Clicked to edit their branding settings while in the In Reader Browser"},{pageName:"Tools:Share:Branding:ClickBranding",selector:""},{pageName:"Tools:Share:Branding:LogoCancel",selector:""},{pageName:"Tools:Share:Branding:LogoSave",selector:""},{pageName:"Tools:Share:Branding:TurnOffBranding",selector:""},{pageName:"Tools:Share:Branding:TurnOnBranding",selector:""},{pageName:"Tools:Share:Branding:ColorWell",selector:""},{pageName:"Tools:Share:Branding:ColorInput",selector:""},{pageName:"Tools:Share:Branding:ContinueOnline",selector:""},{pageName:"Tools:Share:Branding:ContinueOnline:Continue",selector:""},{pageName:"Tools:Share:Branding:ContinueOnline:Cancel",selector:""},{pageName:"RecView:ReportAbuse:Dialog:ReportAbuse:Success",selector:""},{pageName:"RecView:ReportAbuse:Dialog:ReportAbuse:Cancel",selector:""},{pageName:"Tools:Share:ShareWith:Personal:IPM:Shown",selector:""},{pageName:"Tools:Share:ShareWith:Personal:IPM:<cohort-name>",selector:""},{pageName:"Tools:Share:ShareWith:Personal:IPM:Later:Clicked",selector:""},{pageName:"Tools:Share:ShareWith:Personal:IPM:Upgrade:Clicked",selector:""},{pageName:"Tools:Share:ShareWith:Personal:IPM:Close",selector:""},{pageName:"Tools:Share:FilesSharedDlg:Disallowed:Warning:Shown",selector:""},{pageName:"Preview:FileInfo:Clicked",selector:""},{pageName:"Preview:ShareIcon:Clicked",selector:""},{pageName:"Tools:Share:ChooseFilesDlg:Cancel",selector:""},{pageName:"Tools:Share:ChooseFilesDlg:<Connector>:Clicked",selector:"",variables:{Connector:e.Connector},values:e.Connector},{pageName:"Tools:Share:ChooseFilesDlg:Continue",selector:""},{pageName:"Tools:Share:ChooseFilesDlg:AcomOnly:Success:1",selector:""},{pageName:"Tools:Share:ChooseFilesDlg:MyCmptr:Clicked",selector:""},{pageName:"Tools:Share:ChooseFilesDlg:Cancel",selector:""},{pageName:"Tools:Share:ChooseFilesDlg:AcomOnly:Success:2",selector:""},{pageName:"Tools:Share:ChooseFilesDlg:AcomOnly:Success:3",selector:""},{pageName:"FileList:Shared:Clicked",selector:""},{pageName:"FileList:ShareFileDlg:Shown",selector:""},{pageName:"FileList:ShareFileDlg:MakePrivate",selector:""},{pageName:"FileList:ShareFileDlg:MakePublic",selector:""},{pageName:"FileList:ShareFileDlg:EmailLink:Clicked",selector:""},{pageName:"FileList:ShareFileDlg:EmailLinkButton:Clicked",selector:""},{pageName:"FileList:ShareFileDlg:Cancel",selector:""},{pageName:"FileList:ActionBar:ShareFileDlg:Shown",selector:""},{pageName:"FileList:ActionBar:ShareFileDlg:MakePrivate",selector:""},{pageName:"FileList:ActionBar:ShareFileDlg:MakePublic",selector:""},{pageName:"FileList:ActionBar:ShareFileDlg:EmailLink:Clicked",selector:""},{pageName:"FileList:ActionBar:ShareFileDlg:EmailLinkButton:Clicked",selector:""},{pageName:"FileList:ActionBar:ShareFileDlg:Cancel",selector:""},{pageName:"Preview:Toolbar:GearMenu:ShareFileDlg:Shown",selector:""},{pageName:"Preview:Toolbar:GearMenu:ShareFileDlg:MakePrivate",selector:""},{pageName:"Preview:Toolbar:GearMenu:ShareFileDlg:MakePublic",selector:""},{pageName:"sent",selector:""},{pageName:"Preview:Toolbar:GearMenu:ShareFileDlg:EmailLinkButton:Clicked",selector:""},{pageName:"Preview:Toolbar:GearMenu:ShareFileDlg:Cancel",selector:""},{pageName:"FileList:DupFileNameDlg:DeleteUploaded:Success",selector:""},{pageName:"Tools:Survey:SurveyLink",selector:""},{pageName:"Tools:Survey:Cancel",selector:""},{pageName:"Tools:Survey:Send",selector:""},{pageName:"Tools:Survey:SurveyFieldFocus",selector:""}];
return{variables:e,pages:t}}),define("acplugins/signatures/js/utils/ts-utils",[],function(){var e={extractRootUrl:function(e){var t=document.createElement("a");return t.href=e,t.protocol+"//"+t.host}};return e}),define("acplugins/signatures/js/models/ui/parcel-preview-ui-model",["core/ac-core","acplugins/signatures/js/ac-signature","core/models/ui/ui-model"],function(e,t){return t.ParcelPreviewUiModel=e.UiModel.extend({recognized:{parcelPreview:{type:"object",optional:!0},deferred:{type:"object",optional:!0},onHistoryChange:{type:"object",optional:!0}},defaults:{parcelPreview:void 0,deferred:void 0,onHistoryChange:void 0}}),t.ParcelPreviewUiModel}),define("viewer/ac-viewer",[],function(){var e,t,i;return e="dev",t=Ac.Viewer,t||(t=Ac.Viewer={}),i=t[e],i||(i=t[e]={}),i.VERSION=e,i.ID||(i.APP_ID="viewer"),i}),define("viewer/models/parcel-asset-model",["core/ac-core","viewer/ac-viewer","core/models/collection-item-model"],function(e,t){t.ParcelAssetModel=e.CollectionItemModel.extend({initialize:function(t,i){e.CollectionItemModel.prototype.initialize.call(this,t,i),i.collection&&(this.rootUrl=i.collection.rootUrl),i.rootUrl&&(this.rootUrl=i.rootUrl)},getRenditionUrl:function(t,i){var s,n,o;return s=this.collection.parcel,o=s.get("invitation"),o?(n=this.rootUrl+"a/invitation/"+encodeURIComponent(o)+"/asset/"+encodeURIComponent(this.get("id"))+"/"+t,i&&(n+="?page="+i),n):e.CollectionItemModel.prototype.getRenditionUrl.call(this,t,i)}})}),define("viewer/collections/parcel-asset-collection",["viewer/ac-viewer","core/utils/http-util","viewer/models/parcel-asset-model"],function(e,t){e.ParcelAssetCollection=Backbone.Collection.extend({model:e.ParcelAssetModel,initialize:function(e,t){Backbone.Collection.prototype.initialize.call(this,e,t),this.rootUrl=t.rootUrl,this.parcel_id=t.parcel_id,this.parcel=t.parcelModel,this.sortAscending=!0,this.sortField="name"},comparator:function(e,t){var i,s,n,o=e.get(this.sortField),a=t.get(this.sortField);return i=this.sortAscending?o:a,s=this.sortAscending?a:o,n=i===s?0:s>i?-1:1},url:function(){return this.rootUrl+"/a/api/parcels/"+this.parcel_id+"/assets"},fetch:function(e){return e=t.customizeOptions("GET",e),Backbone.Collection.prototype.fetch.call(this,e)},parse:function(e){return e.assets}})}),define("acplugins/signatures/js/ops/showing/parcel-preview-op",["core/ac-core","acplugins/signatures/js/ac-signature","viewer/ac-viewer","acplugins/signatures/js/utils/sc-constants","acplugins/signatures/js/utils/ts-utils","viewer/collections/parcel-asset-collection","core/ops/op"],function(e,t,i,s,n){return t.ParcelPreviewOp=e.Op.extend({run:function(){var e,o,a,r,l,c,d=this.options,h=this.options.parcelModel,p=this.options.parcelPreviewUiModel,u=this.options.appApi;e=u.displayApi.showFullOverlay(!0),o=this.options.appApi.baseFilesUrisApi.getSendApiUri(),o=n.extractRootUrl(o),d.parcelAssetsCollection=new i.ParcelAssetCollection([],{rootUrl:o,parcel_id:h.id,parcelModel:h}),a=p.get("parcelPreview"),a&&a.off(),l=p.get("deferred"),l||(l=$.Deferred(),p.set({deferred:l})),c=p.get("onHistoryChange"),c&&u.routerApi.removeHistoryChangeCallback(c),c=this._onHistoryChange,u.routerApi.addHistoryChangeCallback(c),p.set({onHistoryChange:c}),r=_.extend({},d,{el:e,parcelModel:h}),a=new t.ParcelPreviewView(r),p.set({parcelPreview:a}),this.parcelPreview=a,a.on("all",d.rootView._onViewEvent,d.rootView),a.on("ParcelPreview_Close",this._onParcelPreviewClose,this);var g=t.opFactory.create("GettingAssetsOp",d);return g.run().then(_.bind(function(){var e;e=d.parcelAssetsCollection&&d.parcelAssetsCollection.length>1?s.MULTI:s.SINGLE,u.siteCatalystApi.logScEvent([s.PREVIEW,s.SHARED,e,s.SHOWN]),this.render()},a)),l.promise()},_onParcelPreviewClose:function(){var e,t=this.options.parcelPreviewUiModel;e=t.get("parcelPreview"),e&&(t.unset("parcelPreview"),e.off(),_.defer(_.bind(function(){var i=t.get("deferred");i.resolve(),t.unset("deferred"),this.options.appApi.routerApi.removeHistoryChangeCallback(this._onHistoryChange),this.options.appApi.displayApi.showFullOverlay(!1),e.$el.empty()},this)))},_onHistoryChange:function(){this._onParcelPreviewClose()}}),t.ParcelPreviewOp}),define("acplugins/signatures/js/templates/on-signed-in-template.html",[],function(){return'<div class="signatures-files-header"></div><div class="signatures-files-body shared-workflow-files-body"></div><div class="sent-files-rhp shared-files-rhp hidden"></div><div class="sent-files-footer ui-theme theme-container-prominent theme-border"></div>'}),define("acplugins/signatures/js/templates/signatures-files-header-template.html",[],function(){return'<div class="signatures-files-main-header shared-files-main-header theme-file-list-row-border"><div class="signature-workflow-name shared-workflow-heading theme-page-header "><%= workflowName %></div></div>'}),define("acplugins/signatures/js/utils/sign-workflow-utils",["core/ac-core","acplugins/signatures/js/ac-signature","i18n!core/nls/ui-strings","core/models/workflow-status-strings","acplugins/signatures/js/utils/sc-constants","i18n!acplugins/signatures/js/nls/ui-strings"],function(e,t,i,s,n,o){var a=[{id:"waiting-for-you",str:i.WAITING_FOR_YOU,status:[s.WAITING_FOR_MY_SIGNATURE,s.WAITING_FOR_MY_APPROVAL,s.WAITING_FOR_MY_DELEGATION,s.WAITING_FOR_MY_ACKNOWLEDGEMENT,s.WAITING_FOR_MY_ACCEPTANCE,s.WAITING_FOR_MY_FORM_FILLING]},{id:"signed",str:i.SIGNED,status:s.SIGNED},{id:"completed",str:i.COMPLETED,status:s.COMPLETED},{id:"waiting",str:i.WAITING,status:[s.WAITING_FOR_MY_SIGNATURE,s.WAITING_FOR_MY_APPROVAL,s.WAITING_FOR_MY_DELEGATION,s.WAITING_FOR_MY_ACKNOWLEDGEMENT,s.WAITING_FOR_MY_ACCEPTANCE,s.WAITING_FOR_MY_FORM_FILLING]},{id:"canceled",str:i.CANCELLED,status:s.CANCELLED},{id:"expired",str:i.EXPIRED,status:s.EXPIRED},{id:"approved",str:i.APPROVED,status:s.APPROVED},{id:"delivered",str:i.DELIVERED,status:s.DELIVERED},{id:"accepted",str:i.ACCEPTED,status:s.ACCEPTED},{id:"form-filled",str:i.FORM_FILLED,status:s.FORM_FILLED},{id:"template",str:i.LIBRARY_TEMPLATE,status:s.LIBRARY_TEMPLATE}];return t.SignWorkflowUtil={_getStatusInfo:function(){return a},getModernSignStatus:function(e){var t="";return e===s.SIGNED||e===s.APPROVED||e===s.DELIVERED||e===s.ACCEPTED||e===s.FORM_FILLED||e===s.ARCHIVED?t=n.COMPLETED:e===s.WAITING_FOR_MY_SIGNATURE||e===s.WAITING_FOR_MY_APPROVAL||e===s.WAITING_FOR_MY_DELEGATION||e===s.WAITING_FOR_MY_ACKNOWLEDGEMENT||e===s.WAITING_FOR_MY_ACCEPTANCE||e===s.WAITING_FOR_MY_FORM_FILLING?t=n.WAITING_FOR_YOU:e===s.OUT_FOR_SIGNATURE||e===s.OUT_FOR_APPROVAL||e===s.OUT_FOR_DELIVERY||e===s.OUT_FOR_ACCEPTANCE||e===s.OUT_FOR_FORM_FILLING?t=n.IN_PROGRESS:e===s.CANCELLED?t=n.CANCELED:e===s.EXPIRED?t=n.EXPIRED:e===s.DRAFT||e===s.WAITING_FOR_AUTHORING?t=n.DRAFT:(e===s.TEMPLATES||e===s.LIBRARY_TEMPLATE)&&(t=n.TEMPLATES),t},getUIStringFromStatusID:function(e){switch(e){case n.ALL:return o.ALL;case n.COMPLETED:return o.COMPLETED;case n.DRAFT:return o.DRAFTS;case n.WAITING_FOR_YOU:return o.WAITING_FOR_YOU;case n.CANCELED:return o.CANCELED;case n.IN_PROGRESS:return o.IN_PROGRESS;case n.EXPIRED:return o.EXPIRED;case n.TEMPLATES:return o.TEMPLATES;default:return""}},getPromptMsgFromStatusID:function(e){switch(e){case n.ALL:return o.EMPTY_STATE_ALL_PROMPT;case n.COMPLETED:return o.EMPTY_STATE_COMPLETED_PROMPT;case n.DRAFT:return o.EMPTY_STATE_DRAFT_PROMPT;case n.WAITING_FOR_YOU:return o.EMPTY_STATE_WAITING_FOR_YOU_PROMPT;case n.CANCELED:return o.EMPTY_STATE_CANCELED_PROMPT;case n.IN_PROGRESS:return o.EMPTY_STATE_IN_PROGRESS_PROMPT;case n.EXPIRED:return o.EMPTY_STATE_EXPIRED_PROMPT;case n.TEMPLATES:return o.EMPTY_STATE_TEMPLATES_PROMPT;default:return""}},getSubPromptMsgFromStatusID:function(e){switch(e){case n.ALL:return o.EMPTY_STATE_ALL_SUBPROMPT;case n.COMPLETED:return o.EMPTY_STATE_COMPLETED_SUBPROMPT;case n.DRAFT:return o.EMPTY_STATE_DRAFT_SUBPROMPT;case n.WAITING_FOR_YOU:return o.EMPTY_STATE_WAITING_FOR_YOU_SUBPROMPT;case n.CANCELED:return o.EMPTY_STATE_CANCELED_SUBPROMPT;case n.IN_PROGRESS:return o.EMPTY_STATE_IN_PROGRESS_SUBPROMPT;case n.EXPIRED:return o.EMPTY_STATE_EXPIRED_SUBPROMPT;case n.TEMPLATES:return o.EMPTY_STATE_TEMPLATES_SUBPROMPT;default:return""}},checkIfLeftRailIDNativeRS:function(e){return[n.ALL,n.COMPLETED,n.DRAFT,n.WAITING_FOR_YOU,n.CANCELED,n.IN_PROGRESS,n.EXPIRED,n.TEMPLATES].indexOf(e)>=0?!0:!1}},t.SignWorkflowUtil}),define("acplugins/signatures/js/views/signatures-files-header-view",["core/ac-core","core/models/workflow-status-strings","acplugins/signatures/js/ac-signature","i18n!acplugins/signatures/js/nls/ui-strings","i18n!files/nls/ui-strings","acplugins/signatures/js/templates/signatures-files-header-template.html","acplugins/signatures/js/utils/sign-workflow-utils"],function(e,t,i,s,n,o){i.SignaturesFilesHeaderView=e.View.extend({events:{},initialize:function(){e.View.prototype.initialize.call(this),this._template=_.template(o),this._addUiModelEventListeners(),this._addKeyEventListener(),this._addFocusEventListener()},render:function(){if(e.View.prototype.render.call(this),0===this.$el.children().length&&(this.$el.html(this._template({workflowName:s.AGREEMENT_HEADER})),this._initWrappers()),this.options.isInSearchResultsView){var t=this.options,i=t.searchModel.get("total_hits");if(_.isUndefined(i))this.$signaureWorkflowName.text(s.AGREEMENT_HEADER);else{var o=_.template(n.SEARCH_HEADER,{label:s.AGREEMENT_HEADER,count:i});this.$signaureWorkflowName.text(o),this.$signaureWorkflowName.attr("title",o),this.$signaureWorkflowName.attr("aria-label",_.template(this.options.searchUiModel.getHeaderAriaLabel(),{category:s.AGREEMENT_HEADER,count:i}))}}return this},_initWrappers:function(){this.$listViewBtn=this.$(".shared-workflow-header-btn.listView"),this.$thumbnailViewBtn=this.$(".shared-workflow-header-btn.thumbnailView"),this.$listingToggleButtons=this.$(".signatures-files-header-item.shared-header-listing-btns"),this.$mainHeader=this.$(".signatures-files-main-header"),this.$signaureWorkflowName=this.$(".signature-workflow-name"),this.options.isInSearchResultsView&&(this.$mainHeader.addClass("uss-search-active"),this.$thumbnailViewBtn.hide(),this.$listViewBtn.hide(),this.$listingToggleButtons.hide())},_addUiModelEventListeners:function(){var e=this.options,t=e.appApi.pluginsApi.getPluginsUiModel(e.pluginId);this.listenTo(e.selectionUiModel,"change:selected_item_models",this._onSelectedItemModelsChange),e.isInSearchResultsView&&(this.listenTo(e.searchModel,"change:total_hits",this.render),this.listenTo(t,"change:selected_searched_plugin_id",this._searchPluginChanged))},_searchPluginChanged:function(e,t){"search_summary"===t?this.$el.show():this.$el.hide()},_onListViewButtonClick:function(){this.$thumbnailViewBtn.removeClass("button-selected"),this.$listViewBtn.addClass("button-selected"),this.options.collectionsUiModel.set("view","list")},_onThumbnailViewButtonClick:function(){this.$thumbnailViewBtn.addClass("button-selected"),this.$listViewBtn.removeClass("button-selected"),this.options.collectionsUiModel.set("view","thumbnail")},_onSelectedItemModelsChange:function(e){var t=this.options,i=(this.$header,this.$body,this.$rhp,t.appApi);t.noSelectionActions||i.acrobatApi.isInAcrobat()||(e.isItemSelected()?this.$mainHeader.addClass("with-rhp"):this.$mainHeader.removeClass("with-rhp"))},_updateButtonSelectionState:function(){this.options.parcelCollection&&(0==this.options.parcelCollection.length?this.$listingToggleButtons.hide():this.$listingToggleButtons.show());var e=this.options.collectionsUiModel.get("view");"list"==e?(this.$thumbnailViewBtn.removeClass("button-selected"),this.$listViewBtn.addClass("button-selected")):"thumbnail"==e&&(this.$thumbnailViewBtn.addClass("button-selected"),this.$listViewBtn.removeClass("button-selected"))}})}),define("acplugins/signatures/js/templates/sent-files-body-template.html",[],function(){return'<div class="parcels"></div>    <div class="parcels-search-results"></div>    <div class="parcel-hover-details"></div>'}),define("acplugins/signatures/js/templates/parcels-template.html",[],function(){return'<div class="parcels-content signature-parcels-content ui-theme theme-container"></div>    <div class="parcels-no-content"></div>	<div class="parcel-redirect-web"></div>'}),define("acplugins/signatures/js/templates/parcels-collection-template.html",[],function(){return'<div role="toolbar" class="selection-actions ui-theme theme-container"></div><div role="group"     aria-labelledby="<%= pluginSelectorId %>"     aria-multiselectable="true">    <div role="row" class="agreement-header shared-workflow-files-header ui-theme theme-container theme-file-list-row-border"></div>    <div role="presentation" tabindex="-1"         class="signature-collection-items shared-collection-items with-header">    </div>    <div role="presentation" class="collection-footer"></div></div>'}),define("acplugins/signatures/js/models/ui/parcels-list-item-ui-model",["core/ac-core","acplugins/signatures/js/ac-signature","core/models/ui/ui-model"],function(e,t){t.ParcelsListItemUiModel=e.CollectionItemUiModel.extend({recognized:{expanded:{type:"boolean",optional:!1},masked:{type:"boolean",optional:!1},selected:{type:"boolean",optional:!1}},defaults:{expanded:!1,masked:!1,selected:!1}})}),define("acplugins/signatures/js/templates/parcels-list-file-template.html",[],function(){return'<div role="row" class="signature-list-item-file" data-id="<%= fileId %>"        aria-selected="false" aria-level="2">    <div role="gridcell"></div>    <div role="gridcell">        <div role="img"             aria-label="<%= iconDesc %>"             class="collection-item-thumb <%= iconCls %> signature-list-item-file-icon"></div>        <a class="signature-list-item-file-name theme-list-item-text"           tabindex="-1"><%- filename %></a>    </div>    <div role="gridcell"></div>    <div role="gridcell"></div>    <div role="gridcell"></div>    <div role="gridcell"></div></div>'}),define("acplugins/signatures/js/templates/parcels-list-item-template.html",[],function(){return'<div id="fullItem-<%=viewId%>" role="<%= itemRole %>" class="signature-list-item shared-workflow-list-item theme-list-item-row theme-file-list-row-border shared-file-list-text-color">    <div role="row" class="shared-list-item-row shared-theme-list-item-row" aria-selected="false">        <div role="gridcell">            <div class="list-item-checkbox" style="display:none;"                 tabindex="-1"                 aria-checked="false"                 aria-labelledby="list-item-file-name-<%= viewId %>" id="list-item-checkbox-<%= viewId %>">            </div>        </div>        <div role="presentation"             class="agreement-list-item-info-container shared-list-item-info-container">            <div role="rowheader">                <div class="signature-list-preview-img-cn shared-list-preview-img-cn theme-file-list-row-border" id="signature-list-preview-img-cn-<%= viewId %>">                   <div role="img" aria-label="<%= iconDesc %>"                     aria-hidden="true"                     class="collection-item-thumb <%= iconCls %>                            signature-list-item-icon shared-list-item-icon" id="signature-list-item-icon-<%= viewId %>"></div>                <img class="signature-list-preview-image shared-list-preview-image centered-vertically" id="signature-list-preview-image-<%= viewId %>" style="display: none;" alt=""  src=""/>                </div>                <div class="list-item-file-name"                     id="list-item-file-name-<%= viewId %>"                    <%- numFiles %>                </div>            </div>            <div role="gridcell" class="list-item-sender" id="list-item-sender-<%= viewId %>">               <div id="list-item-sender-name-<%= viewId %>"><%= senderName %></div>               <div id="list-item-sender-company-<%= viewId %>" style="display:none;"><%= senderCompany %></div>            </div>            <div role="gridcell" class="list-item-modified-date"                 id="list-item-modified-date-<%= viewId %>">               <%= itemDate %></div>            <div role="gridcell" class="list-item-status"                 id="list-item-status-<%= viewId %>">               <%= status %></div>        </div>    </div>    <div role="presentation" class="signature-list-item-files"></div>    <div role="presentation" class="signature-list-item-mask"></div></div>'}),define("acplugins/signatures/js/views/parcels-list-item-view",["core/ac-core","acplugins/signatures/js/ac-signature","core/utils/view-util","core/utils/css-util","core/utils/date-util","core/utils/file-types","core/utils/truncate","acplugins/signatures/js/templates/parcels-list-file-template.html","acplugins/signatures/js/templates/parcels-list-item-template.html","i18n!acplugins/signatures/js/nls/ui-strings","core/models/workflow-status-strings","acplugins/signatures/js/utils/sc-constants"],function(e,t,i,s,n,o,a,r,l,c,d,h){t.ParcelsListItemView=e.View.extend({initialize:function(){e.View.prototype.initialize.call(this),this._template=_.template(l),this._fileTemplate=_.template(r),this._addUiModelEventListeners()},render:function(i,s){var n,o,a,r,l,c=this.options.model.get("resources"),d=this.model.id,p=this._getSenderCompany().toUpperCase();if(e.View.prototype.render.call(this),this.$item?(i?i.data("id")!==d&&(this.$item=this.$item.clone(),i.replaceWith(this.$item.get(0)),this._initWrappers()):this.$el.append(this.$item.get(0)),this.invalidate()):(1===c.length?(n="s_agreementfiletype",o=this._getIconDesc(c[0]),a="presentation"):(n="file-icon-multifile signature-list-item-icon-hitarea",o="",a="rowgroup"),r=d,l=$(this._template({iconCls:n,iconDesc:o,numFiles:this._getNumFiles(),itemDate:this._getDateSent(),senderName:this._getSenderName(),senderCompany:p,people:this._getRecipients(),status:this._getStatus(),viewId:r,modelId:d,itemRole:a})),e.Util.isCEF()?1===c.length?l.find("[role='row']:first").addClass("signature-list-item-row").attr({"aria-label":this._getNumFiles()+", "+this._getDateSent()+", "+this._getSenderName()+" "+p+", "+this._getStatus(),tabindex:"-1"}):l.addClass("signature-list-item-row").attr({"aria-expanded":"false","aria-label":this._getParcelAriaLabel(c.length)+", "+this._getDateSent()+", "+this._getSenderName()+" "+p+", "+this._getStatus(),"aria-level":"1","aria-selected":"false",tabindex:"-1"}):1===c.length?l.find("[role='row']:first").addClass("signature-list-item-row").attr({"aria-labelledby":"list-item-file-name-"+r,tabindex:"-1"}):l.addClass("signature-list-item-row").attr({"aria-expanded":"false","aria-labelledby":"list-item-file-name-"+r+" list-item-modified-date-"+r,"aria-level":"1","aria-selected":"false",tabindex:"-1"}),o.length&&l.find(".collection-item-thumb:first").removeAttr("aria-hidden"),i?i.replaceWith(l):this.$el.append(l),this.$item=this.$el.children().eq(s),this._initWrappers()),this.$item.data("id",d),e.Util.isCEF()&&(this.$item.find(".list-item-modified-date").addClass("desktop"),this.$item.find(".list-item-sender").addClass("desktop"),this.$item.find(".signature-list-item-file-name").addClass("desktop")),e.Util.isCEF()){var u=this.model.get("signature_info").state,_=t.SignWorkflowUtil.getModernSignStatus(u),g=this.options.parcelCollection.leftRailFilter,S=t.SignWorkflowUtil.checkIfLeftRailIDNativeRS(g);S&&"signatures"!=g&&g!=h.ALL&&g!=_?this.$item.hide():this.$item.show()}return this._initWrappers(),this._updateFields(),p&&(this.$senderName.addClass("list-item-top-level"),this.$senderCompany.addClass("list-item-bottom-level"),this.$senderCompany.show()),e.Util.isCEF()&&this._updateForVerticalScrollBar(),this._setSignButtonTextAndVisibility(),this._onViewChange(this.options.collectionsUiModel),this._showThumbnail(null,!1),this},_getParcelAriaLabel:function(e){return _.template(c.GENERIC_ARIA_LABEL_STRING,{prefix:e,suffix:c.FILES})},_updateForVerticalScrollBar:function(){setTimeout(_.bind(function(){this.$el.length&&this.options.collectionUiModel.set("has_vertical_scrollbar",i.isVerticalScrollBarPresent(this.$el))},this),150)},remove:function(){this.$item.remove()},getViewElement:function(){return this.$item},invalidate:function(){e.View.prototype.invalidate.call(this)},expand:function(){this.options.itemUiModel.set("expanded",!0)},collapse:function(){this.options.itemUiModel.set("expanded",!1)},isExpanded:function(){return this.options.itemUiModel.get("expanded")},stopListening:function(t,i,s){e.View.prototype.stopListening.call(this,t,i,s)},_initWrappers:function(){this.$expandBtn=this.$item.find(".signature-list-item-expand-btn"),this.$expandHitArea=this.$item.find(".signature-list-item-expand-hitarea"),this.$iconHitArea=this.$item.find(".signature-list-item-icon-hitarea"),this.$infoContainer=this.$item.find(".agreement-list-item-info-container"),this.$files=this.$item.find(".signature-list-item-files"),this.$checkbox=this.$item.find("#list-item-checkbox-"+this.model.id),this.$fileName=this.$item.find("#signature-list-item-file-name-"+this.model.id),this.$numFiles=this.$item.find("#list-item-file-name-"+this.model.id),this.$itemDate=this.$item.find("#list-item-modified-date-"+this.model.id),this.$sender=this.$item.find("#list-item-sender-"+this.model.id),this.$senderName=this.$item.find("#list-item-sender-name-"+this.model.id),this.$senderCompany=this.$item.find("#list-item-sender-company-"+this.model.id),this.$people=this.$item.find("#list-item-people-"+this.model.id),this.$status=this.$item.find("#list-item-status-"+this.model.id),this.$itemRow=this.$item.find(".signature-list-item-row"),this.$parcelItemIcon=this.$item.find("#signature-list-item-icon-"+this.model.id),this.$multiFileIcon=this.$item.find(".file-icon-multifile"),this.$parcelNumFiles=this.$item.find("#list-item-file-name-"+this.model.id),this.$actionButton=this.$item.find("#signature-list-item-action-button-"+this.model.id),this.$preview=this.$("#signature-list-preview-image-"+this.model.id),this.$previewCn=this.$("#signature-list-preview-img-cn-"+this.model.id),this.$tripleDot=this.$("#signature-list-item-triple-dot-"+this.model.id)},_getNumFiles:function(){var e,t=this.model.get("resources");return e=t?1===t.length?t[0].name:_.template(c.SENT_FILES_NUM_FILES,{numFiles:t.length}):0},_getEmailSubject:function(){return this.model.get("signature_info").intro_message},_getRecipients:function(){var e=0,t=0;if(this.model.get("signature_info").state===d.ARCHIVED){var i=this.options.model.get("participants");i.length>0?(e=i.length,t=i.length):(e=1,t=1)}_.each(this.options.model.get("participants"),function(i){"SHARE"!=i.role&&(e++,(-1!=$.inArray(i.status,[d.WAITING_FOR_OTHERS,d.SIGNED,d.COMPLETED,d.APPROVED,d.DELIVERED,d.ACCEPTED,d.FORM_FILLED])||i.status.startsWith("OUT_FOR_"))&&t++)},this);var s=_.template(c.PARTIAL_COMPLETE.toLowerCase(),{done:t,total:e});return s},_getDateSent:function(){var e=this.model.get("create_date"),t=this.options.isInSearchResultsView?void 0:"YYMMDDHHmmssZ";return n.formatDateWithFormat(e,t,!1)},_getDateModified:function(){var e=this.model.get("modify_date"),t=this.options.isInSearchResultsView?void 0:"YYMMDDHHmmssZ";return n.formatDateWithFormat(e,t,!1)},_getSenderName:function(){var e=this.model.getSenderName();return e?e:"-"},_getSenderCompany:function(){return this.model.get("signature_info").company},_getStatus:function(){var e=this.model.get("signature_info").state,t="-",i=!1;return e==d.SIGNED||e==d.APPROVED||e==d.DELIVERED||e==d.ACCEPTED||e==d.FORM_FILLED||e==d.ARCHIVED?t=c.COMPLETED:e==d.WAITING_FOR_MY_SIGNATURE||e==d.WAITING_FOR_MY_APPROVAL||e==d.WAITING_FOR_MY_DELEGATION||e==d.WAITING_FOR_MY_ACKNOWLEDGEMENT||e==d.WAITING_FOR_MY_ACCEPTANCE||e==d.WAITING_FOR_MY_FORM_FILLING?(t=c.WAITING_FOR_YOU,i=!0):e==d.OUT_FOR_SIGNATURE||e==d.OUT_FOR_APPROVAL||e==d.OUT_FOR_DELIVERY||e==d.OUT_FOR_ACCEPTANCE||e==d.OUT_FOR_FORM_FILLING?t=c.WAITING_FOR_OTHERS:e==d.CANCELLED?(t=c.CANCELLED_DECLINED,i=!0):e==d.EXPIRED?(t=c.EXPIRED,i=!0):e==d.DRAFT||e==d.WAITING_FOR_AUTHORING?(t=c.DRAFT,i=!0):e==d.LIBRARY_TEMPLATE&&(t=c.ACTIVE,i=!0),i?t:this._getRecipients()},_getIconClass:function(e){var t,i=o.getFileInfo(e.type||"",e.name);return t=i.iconCls||""},_getIconDesc:function(e){var t,i=o.getFileInfo(e.type||"",e.name);return t=i.desc||""},_getNumHits:function(){return this.model.getNumHits()},_updateExpandButtonVisibility:function(){var e=this.model.get("resources").length;e>1&&(this.$expandBtn.addClass("shown"),this.$expandHitArea.removeAttr("aria-hidden disabled").prop("disabled",!1))},_setSignButtonTextAndVisibility:function(){var e=this.$actionButton;if("thumbnail"==this.options.collectionsUiModel.get("view"))return void e.hide();var t=this.options.model,i=t.getWorkflowStatus(),s=!1,n="";i==d.WAITING_FOR_MY_SIGNATURE?(n=c.SIGN,s=!0):i==d.WAITING_FOR_MY_APPROVAL?(n=c.APRROVE,s=!0):i==d.WAITING_FOR_MY_DELEGATION?(n=c.DELEGATE,s=!0):i==d.WAITING_FOR_MY_ACKNOWLEDGEMENT?(n=c.ACKNOWLEDGE,s=!0):i==d.WAITING_FOR_MY_ACCEPTANCE?(n=c.ACCEPT,s=!0):i==d.WAITING_FOR_MY_FORM_FILLING?(n=c.FILL_FORM,s=!0):s=!1,s?(e.text(n),e.attr("title",n),e.show()):e.hide()},_updateFields:function(){{var t=this.model.id,i=this.$numFiles;this.$infoContainer}i.attr("href")&&-1!==i.attr("href").indexOf(t)||i.attr("href","/sentfiles/"+t),e.Util.isCEF()&&this.$fileName.addClass("desktop");var s=this._getDateSent(),n=this._getSenderName(),o=this._getSenderCompany(),a=this._getRecipients(),r=this._getStatus(),l=this._getNumFiles();if(this.$itemDate.text(s),this.$itemDate.attr("title",s),this.$people.text(a),this.$people.attr("title",a),this.$status.text(r),this.$status.attr("title",r),this.$numFiles.attr("title",l),this.options.isInSearchResultsView){var c=this.options.searchUiModel.get("mru_query_regex");l=l.replace(c,function(e){return"<b>"+e+"</b>"}),this.$numFiles.html(l)}else this.$numFiles.text(l);this.$senderName.text(n),o?(this.$senderCompany.text(o),this.$sender.attr("title",n+"\n"+o)):this.$sender.attr("title",n)},onExpandButtonClick:function(t){var i=this.model.get("resources");this._consumeEvent(t),i.length<2||(this.isExpanded()?this.collapse():this.expand(),e.Util.isCEF()&&this._updateForVerticalScrollBar())},_onExpandedChange:function(e,t){this._showFileList(t)},_addUiModelEventListeners:function(){var e=this.options.itemUiModel;this.listenTo(e,"change:expanded",this._onExpandedChange).listenTo(e,"change:selected",this._onUiModelSelectedChange).listenTo(this.options.collectionsUiModel,"change:view",this._onViewChange).listenTo(this.options.collectionsUiModel,"change:rhpShown",this._adjustLayout).listenTo(this.options.collectionUiModel,"change:has_vertical_scrollbar",this._adjustLayout),this.options.appApi.windowApi.addWindowResizeCallback(_.bind(this._adjustLayout))},_onUiModelSelectedChange:function(){this._updateSelectionStatus()},_showFileList:function(e){this.render(this.$item),e?this.$files.slideDown("fast"):this.$files.slideUp("fast")},_updateSelectionStatus:function(){var t=this.$item,n=this.$checkbox,o=this.$tripleDot,a=this.model.get("resources").length>1,r=a?t:this.$itemRow,l=r.find("[aria-selected]").addBack();this.options.itemUiModel.get("selected")?(s.addClass(t,"selected"),s.addClass(n,"selected"),s.addClass(o,"selected"),l.attr("aria-selected",!0),n.attr("aria-checked",!0)):(s.removeClass(t,"selected"),s.removeClass(n,"selected"),s.removeClass(o,"selected"),l.attr("aria-selected",!1),n.attr("aria-checked",!1)),e.Util.isIE8()&&i.detachAndReattachElement(n)},_loadThumbnail:function(){if(this.model){var e=null;if(this.model.get("thumbnailUrl"))e=this.model.get("thumbnailUrl"),this._showThumbnail(e,!0);else if(0==this.model.get("thumbFetchSucces",!1))this._showThumbnail(e,!1);else{var i=t.opFactory.create("GetSignAgreementThumbnailOp",this.options).run(this.model.id);i.then(_.bind(function(t){t&&t.FIXED_WIDTH_250px?(e=t.FIXED_WIDTH_250px,this._showThumbnail(e,!0),this.model.set("thumbnailUrl",e),this.model.set("thumbFetchSucces",!0)):(this._showThumbnail(e,!1),this.model.set("thumbFetchSucces",!1))},this),function(){}),this.model.set("thumbFetchSucces",!1)&&this._showThumbnail(e,!1)}}},_showThumbnail:function(e,t){var i="#signature-list-preview-image-"+this.model.id,s=this.$(i),n="#signature-list-item-icon-"+this.model.id,o=this.$(n);s.attr("src",e),t?(s.show(),o.hide()):(s.hide(),o.show())},_onViewChange:function(e){var t=e.get("view");"list"==t?(this.$itemDate.removeClass("shared-thumb-view"),this.$sender.removeClass("shared-thumb-view"),this.$people.removeClass("shared-thumb-view"),this.$status.removeClass("shared-thumb-view"),this.$preview.removeClass("shared-thumb-view"),this.$item.removeClass("shared-thumb-view"),this.$item.addClass("theme-list-item-row theme-file-list-row-border"),this.$previewCn.removeClass("shared-thumb-view theme-file-preview-background theme-grid-view-border"),this.$infoContainer.removeClass("shared-thumb-view"),this._setSignButtonTextAndVisibility()):"thumbnail"==t&&(this.$itemDate.addClass("shared-thumb-view"),this.$sender.addClass("shared-thumb-view"),this.$people.addClass("shared-thumb-view"),this.$status.addClass("shared-thumb-view"),this.$preview.addClass("shared-thumb-view"),this.$item.addClass("shared-thumb-view"),this.$item.removeClass("theme-list-item-row theme-file-list-row-border"),this.$previewCn.addClass("shared-thumb-view theme-file-preview-background theme-grid-view-border"),this.$infoContainer.addClass("shared-thumb-view "),this._setSignButtonTextAndVisibility()),this._adjustLayout()},_updateVisibilityOfColumns:function(e,t){var i=t.colMargin,s=this.$numFiles.position().left,n=t.totalVisibleCols,o=e-s,a=o-i*n,r=t.totalFluidCols,l=a/r;if(1==t.fileName.visibility){var c=t.fileName.end-t.fileName.start+1;this.$numFiles.css("width",l*c+"px"),this.$numFiles.css("margin-right",i+"px"),this.$numFiles.show()}else this.$numFiles.hide();if(1==t.lastActivity.visibility){var c=t.lastActivity.end-t.lastActivity.start+1,d=t.lastActivity.colNumber;this.$itemDate.css("left",s+l*(t.lastActivity.start-1)+i*d+"px"),this.$itemDate.css("width",l*c+"px"),this.$itemDate.css("margin-right",i+"px"),this.$itemDate.show()}else this.$itemDate.hide();if(1==t.owner.visibility){var c=t.owner.end-t.owner.start+1,d=t.owner.colNumber;this.$sender.css("left",s+l*(t.owner.start-1)+i*d+"px"),this.$sender.css("width",l*c+"px"),this.$sender.css("margin-right",i+"px"),this.$sender.show()}else this.$sender.hide();if(1==t.status.visibility){var c=t.status.end-t.status.start+1,d=t.status.colNumber;this.$status.css("left",s+l*(t.status.start-1)+i*d+"px"),this.$status.css("width",l*c+"px"),this.$status.css("margin-right",i+"px"),this.$status.show()}else this.$status.hide()},_adjustLayout:function(){if(this.$el.is(":visible")){var e=this.options.collectionsUiModel.get("view");if(this.$numFiles.removeAttr("style"),this.$itemDate.removeAttr("style"),this.$sender.removeAttr("style"),this.$status.removeAttr("style"),this.$tripleDot.removeAttr("style"),this.$tripleDot.hide(),"list"==e){var t=this.$item.width();100>=t?this._updateVisibilityOfColumns(t,{fileName:{visibility:!1},lastActivity:{visibility:!1},owner:{visibility:!1},status:{visibility:!1},totalFluidCols:0,totalVisibleCols:0,colMargin:24}):t>100&&300>=t?this._updateVisibilityOfColumns(t,{fileName:{visibility:!0,colNumber:0,start:1,end:1},lastActivity:{visibility:!1},owner:{visibility:!1},status:{visibility:!1},totalFluidCols:1,totalVisibleCols:1,colMargin:24}):t>300&&500>=t?this._updateVisibilityOfColumns(t,{fileName:{visibility:!0,colNumber:0,start:1,end:3},lastActivity:{visibility:!1},owner:{visibility:!1},status:{visibility:!0,colNumber:1,start:4,end:5},totalFluidCols:5,totalVisibleCols:2,colMargin:24}):t>500&&700>=t?this._updateVisibilityOfColumns(t,{fileName:{visibility:!0,colNumber:0,start:1,end:3},lastActivity:{visibility:!1},owner:{visibility:!0,colNumber:1,start:4,end:5},status:{visibility:!0,colNumber:2,start:6,end:7},totalFluidCols:7,totalVisibleCols:3,colMargin:32}):this._updateVisibilityOfColumns(t,{fileName:{visibility:!0,colNumber:0,start:1,end:3},lastActivity:{visibility:!0,colNumber:1,start:4,end:5},owner:{visibility:!0,colNumber:2,start:6,end:7},status:{visibility:!0,colNumber:3,start:8,end:9},totalFluidCols:9,totalVisibleCols:4,colMargin:32})
}else if("thumbnail"==e){var t=this.$el.width();if(t){var i=parseInt($(".shared-workflow-files-body").css("marginLeft")),s=$(".shared-thumb-view .shared-workflow-list-item").width(),n=24,o=Math.floor((t-i)/(s+n)),a=(t-i-s*o)/o;$(".shared-thumb-view .shared-workflow-list-item").css("marginRight",a+"px")}}}}})}),define("acplugins/signatures/js/ops/manipulation/unshare-one-if-confirmed-op",["core/ac-core","acplugins/signatures/js/ac-signature","i18n!acplugins/signatures/js/nls/ui-strings","i18n!core/nls/ui-strings","core/ops/op"],function(e,t,i,s){t.UnshareOneIfConfirmedOp=e.Op.extend({run:function(){var e,n,o,a=this.options,r=a.appApi.dialogApi;return e=i.CONFIRM_UNSHARE_MSG_ONE_ITEM,n=i.CONFIRM_UNSHARE_TITLE,r.displayTextAlert(r.SEVERITY_WARNING,n,e,i.UNSHARE,s.CANCEL).then(function(){o=new t.UnshareOneParcelOp(a),o.run()})}})}),define("acplugins/signatures/js/templates/parcel-activity-template.html",[],function(){return'<div role="dialog" tabindex="-1" aria-label="<%- header %>" class="parcel-activity-dlg generic-dialog">        <div role="presentation" class="parcel-activity-dlg-content">            <div role="presentation" class="dialog-title-bar">                <div role="heading" class="dialog-title">                    <%= header %>                </div>            </div>            <div role="grid" class="parcel-table-container">                <div role="row" class="parcel-activity-table-header collection-header">                    <div role="columnheader" class="collection-header-column-title parcel-recipient-col parcel-activity-nosort"><%= recipient %></div>                    <div role="columnheader" class="collection-header-column-title parcel-activity-col parcel-activity-nosort"><%= activity %></div>                    <div role="columnheader" class="collection-header-column-title parcel-item-col parcel-activity-nosort"><%= item %></div>                    <button role="columnheader" tabindex="0" aria-sort="descending" class="collection-header-column-title parcel-date-col parcel-date-col-header"><%= dateViewed %>                    <div class="collection-header-column-sort descending parcel-activity-sort-btn" data-test-name="parcel-activity-date-sort"></div>                    </button>                </div>                <div role="presentation" class="parcel-activity-body"></div>            </div>            <button class="parcel-activity-close-btn control-button ui-theme theme-text button-grey"><%= close %></button>        </div>    </div>'}),define("acplugins/signatures/js/templates/parcel-activity-item-template.html",[],function(){return'<div role="row" class="parcel-activity-item-row collection-item">        <div role="gridcell" class="parcel-activity-item-recipient parcel-recipient-col"><%= email %></div>            <div role="gridcell" class="parcel-activity-item-what parcel-activity-col"><%= what %></div>        <div role="gridcell" class="parcel-activity-item-item parcel-item-col">            <div role="img" aria-label="<%= iconDesc %>"<% if (!iconDesc.length) { %>                 aria-hidden="true"<% } %>                 class="collection-item-thumb <%= iconCls %>"></div>            <div class="parcel-activity-item-filename"><%= filename %></div>        </div>        <div role="gridcell" class="parcel-activity-item-date parcel-date-col"><%= date %></div>    </div>'}),define("acplugins/signatures/js/collections/fileviewevent-collection",["acplugins/signatures/js/ac-signature","core/utils/http-util"],function(e,t){e.FileViewEventCollection=Backbone.Collection.extend({initialize:function(e,t){Backbone.Collection.prototype.initialize.call(this,e,t),this.parcel_id=t.parcel_id,this.rootUrl=t.rootUrl},url:function(){return this.rootUrl+"/a/api/parcels/"+this.parcel_id+"/file_view_events"},fetch:function(e){return e=e||{},e=t.customizeOptions("GET",e),Backbone.Collection.prototype.fetch.call(this,e)},parse:function(e){return e.events}})}),define("acplugins/signatures/js/views/parcel-activity-dlg",["core/ac-core","core/utils/date-util","acplugins/signatures/js/ac-signature","acplugins/signatures/js/templates/parcel-activity-template.html","acplugins/signatures/js/templates/parcel-activity-item-template.html","core/utils/file-types","core/utils/truncate","i18n!acplugins/signatures/js/nls/ui-strings","acplugins/signatures/js/utils/sc-constants","acplugins/signatures/js/utils/ts-utils","core/utils/util","acplugins/signatures/js/collections/fileviewevent-collection"],function(e,t,i,s,n,o,a,r,l,c,d){i.ParcelActivityDlg=e.DialogView.extend({PAGE_SIZE:25,_page_num:0,_sort_order:"desc",_no_more_events:!1,_prev_scrolltop:0,_what_map:{parcel_view:r.PARCEL_ACTIVITY_PREVIEWED,download:r.PARCEL_ACTIVITY_DOWNLOADED},events:{"click .parcel-activity-close-btn":"_onCloseBtnClick","click .parcel-date-col-header":"_onSortClick"},initialize:function(){var t,o,a,d=this.options,h=this.options.parcelModel.get("parcel_id"),p={},u={};o=this.options.appApi.baseFilesUrisApi.getSendApiUri(),o=c.extractRootUrl(o),t={parcel_id:h,comparator:!1,rootUrl:o},e.DialogView.prototype.initialize.call(this),this._fileviewevent_collection=new i.FileViewEventCollection([],t),d.parcelModel.set("fileviewevents",this._fileviewevent_collection),this._template=_.template(s),this._itemTemplate=_.template(n),e.View.prototype.initialize.call(this),_.each(d.parcelModel.get("invitations"),function(e){p[e.invitation_id]="PARCEL_PUBLIC_SHARING"===e.recipient_email?r.PARCEL_ACTIVITY_PUBLIC_VISITOR:_.escape(e.recipient_email)},this),this._inv_emails=p,_.each(d.parcelModel.get("files"),function(e){e.icon_class=this._getIconClass(e),e.icon_desc=this._getIconDesc(e),u[e.id]=e},this),this._files_by_id=u,a=d.parcelAssetsCollection&&d.parcelAssetsCollection.length>1?l.MULTI:l.SINGLE,d.appApi.siteCatalystApi.logScEvent([l.PREVIEW,l.SHARED,a,l.FULL_ACTIVITY,l.SHOWN])},render:function(){e.DialogView.prototype.render.call(this),this.$el.html(this._template({header:_.template(r.PARCEL_ACTIVITY_HEADING,{emailSubject:_.escape(this.options.parcelModel.get("email_subject"))}),recipient:r.PARCEL_ACTIVITY_RECIPIENT,activity:r.PARCEL_ACTIVITY_ACTIVITY,item:r.PARCEL_ACTIVITY_ITEM,dateViewed:r.PARCEL_ACTIVITY_DATE_VIEWED,close:r.PARCEL_ACTIVITY_CLOSE})),this.$body=this.$(".parcel-activity-body"),this.loadEvents(_.bind(function(e){this._checkLimit(e.length),this.displayEvents(e),this.$body.scrollTop(0)},this),!1),this.$body.scroll(_.bind(function(){this._checkScroll()},this)),this._initWrappers(),this._invalidateSize(),this._initTabLimits(),this.$el.find(":focusable:first").focus()},loadEvents:function(e,t){this.isLoading=!0,this._fileviewevent_collection.fetch({data:{sort:"created!"+this._sort_order,page:this._page_num,max:this.PAGE_SIZE},reset:t,success:e})},displayEvents:function(e){_.each(e.models,function(e){var i,s,n,o,a=e.get("event_type"),l=e.get("file_id"),c="hidden",d="";"parcel_view"===a?(n=this.options.parcelModel.get("files"),1===n.length?(s=this._files_by_id[n[0].id],o=s.name,c=s.icon_class,d=s.icon_desc):(o=r.PARCEL_ACTIVITY_ALL_FILES_PREVIEW,c="file-icon-multifile")):"all"===l?(o=r.PARCEL_ACTIVITY_ALL_FILES,c="file-icon-multifile"):(s=this._files_by_id[l],o=s?s.name:"",c=s?s.icon_class:"hidden",d=s?s.icon_desc:""),i=this._itemTemplate({filename:o,iconCls:c,iconDesc:d,what:this._what_map[a],email:this._inv_emails[e.get("invitation_id")],date:t.formatDate(e.get("created"))}),this.$body.append(i)},this),_.each(this.$(".parcel-recipient-col"),function(e){var t=$(e);a.truncateElementText(t)}),_.each(this.$(".parcel-activity-item-filename"),function(e){var t=$(e);a.truncateElementText(t)}),this.isLoading=!1},close:function(t,i){var s;s=this.options.parcelAssetsCollection&&this.options.parcelAssetsCollection.length>1?l.MULTI:l.SINGLE,this.options.appApi.siteCatalystApi.logScEvent([l.PREVIEW,l.SHARED,s,l.FULL_ACTIVITY,l.CLOSE]),e.DialogView.prototype.close.call(this,t,i)},_initWrappers:function(){e.DialogView.prototype._initWrappers.call(this),this.$body=this.$(".parcel-activity-body")},_onSortClick:function(){var e,t=this.options;this._sort_order="asc"===this._sort_order?"desc":"asc",this._page_num=0,this._no_more_events=!1,this.loadEvents(_.bind(function(e){var t=this.$(".parcel-activity-sort-btn"),i=this.$(".parcel-date-col-header");this.$body.empty(),this._checkLimit(e.length),this.displayEvents(e),this.$body.scrollTop(0),"asc"===this._sort_order?(t.removeClass("descending"),i.attr("aria-sort","ascending")):(t.addClass("descending"),i.attr("aria-sort","descending"))},this),!0),e=t.parcelAssetsCollection&&t.parcelAssetsCollection.length>1?l.MULTI:l.SINGLE,t.appApi.siteCatalystApi.logScEvent([l.PREVIEW,l.SHARED,e,l.FULL_ACTIVITY,l.SORT,l.DATE_VIEWED])},_checkLimit:function(e){e<this.PAGE_SIZE&&(this._no_more_events=!0)},_checkScroll:function(){var e=100,t=this.$body.height(),i=this.$body.get(0).scrollHeight,s=this.$body.scrollTop(),n=this._prev_scrolltop;this._prev_scrolltop=s,!this._no_more_events&&s>n&&!this.isLoading&&+s+t+e>i&&(this._page_num+=1,this.loadEvents(_.bind(function(e){this._checkLimit(e.length),this.displayEvents(e)},this),!1))},_getIconClass:function(e){var t,i=o.getFileInfo(e.content_type||"",e.name);return t=i.iconCls||""},_getIconDesc:function(e){var t,i=o.getFileInfo(e.content_type||"",e.name);return t=i.desc||""},_setupSizedElement:function(e){var t=this.$(e);t.attr("data-title")?t.text(t.attr("data-title")):t.attr({"data-title":t.text()}),a.truncateElementText(t)},_invalidateSize:function(){this._setupSizedElement(".dialog-title"),this._center(),this._showModalMask(!0)},_addAppApiCallbacks:function(){e.DialogView.prototype._addAppApiCallbacks.call(this),d.isIE8()||this.options.appApi.windowApi.addWindowResizeCallback(this._onWindowResize)},_removeAppApiCallbacks:function(){e.DialogView.prototype._removeAppApiCallbacks.call(this),d.isIE8()||this.options.appApi.windowApi.removeWindowResizeCallback(this._onWindowResize)},_onWindowResize:function(){this.render()}})}),define("acplugins/tracked-send/js/tool/ac-tracked-send",["plugins-common/ac-plugins"],function(e){e.TrackedSend||(e.TrackedSend={});var t=e.TrackedSend.Tool;return t||(t=e.TrackedSend.Tool={}),t.PLUGIN_ID||(t.PLUGIN_ID="send"),t}),define("viewer/templates/viewer-page-template.html",[],function(){return'<div class="page-main-container">        <div class="page-error error"></div>        <div class="page-body-container parcel-container">            <div class="page-body thumbnails">                <div class="parcel-body-header">                    <div class="full-preview-home-btn-wrapper">                        <button class="full-preview-home-btn parcel-preview-home-btn"                                id="full-preview-header-home-btn"                                title="<%= back %>">                            <span class="hidden-accessible"><%= back %></span>                        </button>                        <div class="full-preview-home-btn-separator"></div>                        <div class="toolbar-item plugin-selector">                            <div class="toolbar-item-icon-container">                                <div class="toolbar-item-icon back-toolbar-icon parcel-preview-home-btn"></div>                            </div>                            <div class="toolbar-item-label"></div>                        </div>                    </div>                    <div class="full-preview-branding-logo wrap-branding-logo"><div class="branding-logo parcel-branding-logo"></div></div>                    <div class="full-preview-name parcel-subject" id="parcel-subject" role="heading" aria-level="1"><%= parcelSubject %></div>                    <div class="parcel-action-buttons">                        <button class="toolbar-item plugin-selector tracked-send-unshare-btn">                            <div class="tracked-send-toolbar-item-icon-container">                                <div class="tracked-send-toolbar-item-icon unshare"></div>                            </div>                                <div class="tracked-send-toolbar-item-label"><%= unshare %></div>                        </button>                        <button class="toolbar-item plugin-selector tracked-send-forward-btn">                            <div class="tracked-send-toolbar-item-icon-container">                                <div class="tracked-send-toolbar-item-icon forward"></div>                            </div>                                <div class="tracked-send-toolbar-item-label"><%= forwardLabel %></div>                        </button>                        <button class="control-button ts-viewer-download-button"><%= downloadAll %></button>                    </div>                </div>                <div class="parcel-rendition-body-holder">                    <div class="parcel-rendition-list"                         role="group" aria-labelledby="parcel-subject">                    </div>                    <div role="complimentary" class="parcel-rendition-list-rhp">                    </div>                </div>            </div>            <div class="page-body full-preview"></div>        </div>    </div>'}),define("acplugins/tracked-send/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/tracked-send/js/nls/root/ui-strings",{SELECTOR_LABEL:"For Viewing",SELECTOR_LABEL_WEB:"Sent",TOOL_LABEL:"Send",SEND_TRACK_LABEL:"Shared For Viewing",TYPE:"Type",ADDED_DATE:"Added",MODIFIED_DATE:"Modified",PAGES:"Pages",SIZE:"Size",SENDER_NAME:"Sent By",SENT_DATE:"Date Sent",REPORT_ABUSE:"Report Abuse",UNKNOWN:"Unknown",EXTENSION:"(.<%- ext %>)",DOWNLOAD:"Download",DOWNLOAD_ALL:"Download All",REPLY:"Reply",FORWARD:"Forward",NOTIFY_ME_WHEN_VIEWED:"Notify when recipients viewed",UNSHARE:"Unshare",UNSHARED:"Unshared",VIEWED_BY:"Viewed By",VIEW_FULL_ACTIVITY:"View Full Activity",EMAIL_REPLY_FORMAT:"Re: <%= emailSubject %>",OPEN:"Open",SAVEAS:"Save As",TRACK:"Track Online",OPEN_LINK:"(Open Link)",MESSAGE_HEADING:"Message",REMOVE:"Remove",DELETE:"Delete",SHARED_FILES:"Sent Files",SUBJECT:"Subject",SENT_TO:"Sent To",DATE_SENT:"Date Sent",VIEWS:"Views",PARCEL_PUBLIC_SHARING:"Anonymous",EXPAND:"Expand",COLLAPSE:"Collapse",SELECT_ALL:"Select All",NUMBER_OF_VIEWS:"Number of Views",GO_TO_ADOBE_SEND_WEBSITE:"Go To Adobe Send Website",GO_TO_ADOBE_S_T_WEBSITE:"Manage Documents Sent for Signature",DATE_VIEWED:"Date Viewed",CONFIRM_UNSHARE_TITLE:"Unshare File",CONFIRM_UNSHARE_MSG_ONE_ITEM:"If you unshare this file, people won’t be able to access it anymore. You can share it again later.",CONFIRM_UNSHARE_MSG_N_ITEMS:"If you unshare this file, people won’t be able to access it anymore. You can share it again later.",CONFIRM_UNSHARE_MSG:"Are you sure? We will remove the link to this document from your account.",Unshare_checkbox:"Delete shared file from Document Cloud",CONFIRM_REMOVE_TITLE:"Delete shared file",CONFIRM_REMOVE_BUTTON:"Delete file",CONFIRM_REMOVE_MSG_ONE_ITEM:"Are you sure you want to remove these files from the sent list? By removing the files, they will be unshared and removed from this list, but will not be deleted from your library.",CONFIRM_REMOVE_MSG_N_ITEMS:"Are you sure you want to remove these files from the sent list? By removing the files, they will be unshared and removed from this list, but will not be deleted from your library.",CONFIRM_DELETE_MSG_ONE_ITEM:"Deleting this shared file will permanently remove it from Document Cloud. This can’t be undone.",NO_FILES_TITLE:"No Files",NO_FILES_MESSAGE:"There are no files available to download. The files may have been deleted.",SHARE_TITLE:"Send Files",SHARE_WELCOME:"Send and track large files online.",SHARE_WELCOME_DESKTOP:"The fast, easy way to share and monitor files.",SHARE_SELECT_FILES:"Select Files to Send",SHARE_VIEW_SHARED_FILES:"View All Sent Files",READER_FILESELECT_WINDOW_TITLE:"Select Files",READER_FILESELECT_CONTINUE_BUTTON:"Continue",ALL_SUPPORTED_FILES:"All supported files",CHOOSE_FILES:"Choose Files",ALL_SUPPORTED_FILES:"All supported files",FILE:"file",FILES:"files",UPLOADING_TO_SEND:"Uploading to Adobe Document Cloud...",SELECTED_FILES:"Selected Files",ADD_MORE_FILES:"Add Files",SHARE_WITH_HEADING:"Send To",SHARE_ADDRESS_BOOK:"Address Book",SHARE_CHOICE_WORLD:"Create Anonymous Link",SHARE_CHIOCE_WORLD_EXPLAIN:"(with basic usage information)",SHARE_CHOICE_INDIVIDUAL:"Send Personalized Invitations",SHARE_CHOICE_INDIVIDUAL_EXPLAIN:"(with detailed tracking)",SHARE_CHOICE_ALLOW_COMMENTS:"Allow Comments",SHARE_CHOICE_CUSTOMIZE_RECIPIENT_PAGE:"Add Your Logo & Color",SHARE_CHOICE_CUSTOMIZE_RECIPIENT_PAGE_EDIT:"Edit",SHARE_ADDRESS_HEADING:"Recipient Email Addresses",SHARE_ADDRESS_PROMPT:"Enter recipient email addresses",SHARE_SUBJECT_MSG_HEADING:"Subject & Message",SHARE_INITIAL_SUBJECT:"Shared Files",SHARE_AV_ERROR:"Audio/video files are not supported for sending, and have been omitted from your selection.",SHARE_AV_UPGRADE_MESSAGE:" Upgrade to be able to send audio/video files.",SHARE_FORMS_ERROR:"Form files are not currently supported for sending. Go to Fill & Sign to find and download the form.",SHARE_FORMS_ERROR_DESKTOP:"This file type is currently not supported and has been omitted from your selection.",SHARE_AV_FORMS_ERROR:"Audio/video and form files are not supported for sending, and have been omitted from your selection.",SHARE_OVER_LIMIT_APPEND_ERROR:"<br/><br/>Additionally, you selected more than <%- limit %> files. Files beyond that limit have been omitted.",SHARE_OVER_LIMIT_ERROR:"You selected more than <%- limit %> files. Files beyond that limit have been omitted.",SHARE_OVER_LIMIT_TITLE:"Too many files.",SHARE_NON_NATIVE_APPEND_ERROR:"<br/><br/>Additionally, your selection included files stored in one or more unsupported storage locations, and have been omitted.",SHARE_NON_NATIVE_ERROR:"Send & Track is currently not supported for files stored in <%= connectorLabel %>. To send files from <%= connectorLabel %>, save them to your computer first.",SHARE_NON_NATIVE_ERROR_DEFAULT:"Your selection included files stored in one or more unsupported storage locations, and have been omitted.",SHARE_NON_NATIVE_ERROR_HEADING:"Unsupported File Storage",SHARE_MESSAGE_HEADING:"Message",SHARE_MESSAGE_PROMPT:"I have shared some files with you. Please click on the link to view and download them.",SHARE_BUTTON:"Send",SHARE_BUTTON_LINK:"Create Link",SHARE_CANCEL:"Cancel",SHARE_EMAIL_INVALID_PLURAL:"The following email addresses are invalid:",SHARE_EMAIL_INVALID_SINGULAR:"The following email address is invalid:",SHARE_ERROR_SEND_LIMIT_EXCEEDED_TITLE:"Not sent",SHARE_ERROR_SEND_LIMIT_EXCEEDED:"The number of recipients you have selected exceeds your recent limit. Reduce the number of recipients, or wait until later to try again.",SHARE_ERROR_UNSUPPORTED_SHARING_MIME_TYPE:"Audio/video files aren't supported.",SHARE_ERROR_RECIPIENTS_NOT_ALLOWED:"Please upgrade to send to individuals.",SHARE_ERROR_CANNOT_CONVERT_FORM:"Files could not be sent because the form file could not be converted to pdf.",SHARE_ERROR_CANNOT_CONVERT_FORM_RESTRICTION:"Files could not be sent because the form file could not be converted to pdf.",SHARE_ERROR_CANNOT_CONVERT_FORM_TIMEOUT:"Files could not be sent because the form file conversion to PDF timed out.",SHARE_INDIVIDUAL_HELP_WEB:"Note: Personalized links are unique to each recipient, but anyone the recipient shares those links with can access the documents.",SHARE_INDIVIDUAL_HELP:"Note: Personalized invitations are unique to each recipient, but anyone the recipient shares those invitations with can access the documents.",SHARE_UPLOAD_ERROR_TITLE:"Error uploading files",SHARE_UPLOAD_ERROR_MSG:"One or more files could not be uploaded. Please try again.",SHARE_NO_FILES_SELECTED:"There are currently no files selected.",SHARE_CLICK_TO_ADD_FILES:"Click the Add Files button to get started.",SHARE_RECIPIENT_PAGE_HEADLINE:"Recipient Page",SHARE_CHOICE_INCLUDE_MESSAGE:"Include Message Text",SHARE_CHOICE_RESPOND_BACK:"Include Reply-To",SHARE_REMOVE:"Remove",ADD_FILES_REJECTED_TITLE:"Invalid Filename Format",ADD_FILES_REJECTED_MESSAGE:"Files must have a file name extension or be a known file type to be sent. Please ensure that your filename includes a valid file extension.",SHARE_PUBLIC_LINK_HEADING_DESKTOP:"Distribute the anonymous link by:",SHARE_COPY_LINK_BUTTON:"Copy Link",SHARE_SUCCESS_SENT_LINK:"Go to Sent Files",SHARE_SUCCESS_SENT_LINK_FOOTER:"to view all previously sent files",READER_GO_URL:"http://www.adobe.com/go/sendpluginrdr_12_0_0",ACROBAT_GO_URL:"http://www.adobe.com/go/sendpluginacro_12_0_0",SEND_UPSELL_HEADLINE:"Upgrade To",SEND_UPSELL_HEADLINE_OLD:"Upgrade to:",SEND_UPSELL_POINT_1:"• Send large files, including documents and videos",SEND_UPSELL_POINT_2:"• Receive an email when files are viewed",SEND_UPSELL_POINT_3:"• Track downloads using an online dashboard",SEND_UPSELL_LATER:"Later",SEND_UPSELL_NOW:"Upgrade Now",SEND_UPSELL_LEARN_MORE:"Learn More",SEND_UPSELL_UPGRADE_REQUIRED:"Unsupported Files",SHARE_TOO_MANY_DLG_TITLE:"Too many email addresses",SHARE_TOO_MANU_DLG_MESSAGE:"You've entered <%=numRecipients%> email addresses, but you can only send to <%=maxRecipients%> at a time. Delete some addresses and try again.",SHARE_SUCCESS_DLG_TITLE:"Files Shared",SHARE_PUBLIC_LINK_HEADING:"Anonymous Link Generated",SHARE_EMAIL_LINK_BUTTON:"Email Link",SHARE_PUBLIC_LINK_MESSAGE:"Anyone with the link will access the files anonymously.",SHARE_PUBLIC_LINK_NO_COPY_OR_EMAIL_WARNING:"You have not yet copied or emailed the link. Are you sure you want to continue?",SHARE_PUBLIC_LINK_INSTRUCTIONS:"Copy the link below to email or share it with others. Anyone who uses the link will be able to access the files.",SHARE_INVITATIONS_HEADING:"Invitations Sent",SHARE_INVITATIONS_MESSAGE:"Each recipient will receive a link by email, and you will be notified when they follow the link.",SHARE_SUCCESS_CLOSE:"Close",SHARE_SUCCESS_CONTINUE:"Continue",SHARE_FILE_EMAIL_BODY:"I'm using Adobe Send. You can view my file by clicking on the link below:",SHARE_FILES_EMAIL_BODY:"I'm using Adobe Send. You can view my files by clicking on the link below:",S_T_FILE_EMAIL_BODY:"I'm using Adobe Send & Track. You can view my file in Adobe Document Cloud by clicking on the link below:",S_T_FILES_EMAIL_BODY:"I'm using Adobe Send & Track. You can view my files in Adobe Document Cloud by clicking on the link below:",SHARE_CLIPBOARD_MESSAGE:"Tip: Use Ctrl + C to copy",SHARE_CLIPBOARD_MESSAGE_MAC:"Tip: Use Cmd + C to copy",SHARE_CLIPBOARD_COPIED:"link is copied to clipboard",PARCEL_ACTIVITY_DOWNLOADED:"downloaded",PARCEL_ACTIVITY_PREVIEWED:"previewed",PARCEL_ACTIVITY_PUBLIC_VISITOR:"public link visitor",PARCEL_ACTIVITY_ALL_FILES:"All Files",PARCEL_ACTIVITY_ALL_FILES_PREVIEW:"All Files Preview Page",PARCEL_ACTIVITY_HEADING:"Activity for “<%= emailSubject %>”",PARCEL_ACTIVITY_RECIPIENT:"Recipient",PARCEL_ACTIVITY_ACTIVITY:"Activity",PARCEL_ACTIVITY_ITEM:"Item",PARCEL_ACTIVITY_DATE_VIEWED:"Date Viewed",PARCEL_ACTIVITY_CLOSE:"Close",CURRENTLY_SHARED_IN:"Sent To",SHARE_THIS_FILE:"Send this File",SHARE_THIS_FILE_AGAIN:"Send this File Again",SENT_FILES_HEADER_SEARCH_CONTROLS:"Search Controls",SENT_FILES_HEADER_REFRESH:"Refresh",SENT_FILES_NUM_FILES:"<%= numFiles %> files",NO_PARCELS_SEND_PROMPT:"There aren't any files here yet.",NO_PARCELS_SEND_SUBPROMPT:"Files you've sent or received for viewing will appear here.",NO_PARCELS_SEND_BTN:"Adobe Send",NO_PARCELS_S_T_BTN:"Learn about sending files for viewing",LEARN_MORE_ST_GO_URL:"http://www.adobe.com/go/LearnMoreSTEmpty",NO_SENT_PARCELS_REVIEW_SUBPROMPT:"Files that are shared by you will appear here.",NO_RECEIVED_PARCELS_REVIEW_SUBPROMPT:"Files that are shared by others will appear here.",SENT_LEARN_MORE:"Learn More",RECEIVED_LEARN_MORE:"Learn More",CTA_SHARE_A_FILE:"Share a file",NO_SHARED_FILE:"No shared files yet.",ON_SIGN_OUT_PROMPT:"Sign in to access shared files.",ON_SIGN_OUT_SUBPROMPT:"See and manage files you've sent or received for viewing.",SIGN_IN_BUTTON:"Sign In",ON_SIGN_OUT_SUBPROMPT_SENT_FILES:"See and manage files that are shared by you.",ON_SIGN_OUT_SUBPROMPT_RECEIVED_FILES:"See and manage files that are shared by others.",COULD_NOT_SEND:"Could not send",ENTERPRISE_USERS_ACCESS_ERROR:"You do not have access to this service. Please contact your IT Administrator to gain access, or try to sign in with an Adobe ID.",CUSTOMIZE_RECIPIENT_PAGE_DIALOG_NOT_AVAILABLE:"Continue at Adobe Document Cloud",CUSTOMIZE_RECIPIENT_PAGE_DIALOG_USE_WEB_MSG:'Edits to your Color and Logo are currently only available online at the Adobe Send web site. Click "<%= buttonName %>" to go there now.',S_T_CUSTOMIZE_RECIPIENT_PAGE_DIALOG_USE_WEB_MSG:'Edits to your logo and color are currently only available at Adobe Document Cloud. Click "<%= buttonName %>" to go there now.',CUSTOMIZE_RECIPIENT_PAGE_DIALOG_USE_WEB_OK:"Continue",CUSTOMIZE_RECIPIENT_PAGE_DIALOG_TITLE:"Add Your Logo & Color",CUSTOMIZE_RECIPIENT_PAGE_DIALOG_DESCRIPTION:"Add your logo and choose a color to display on emails and recipient page.",CUSTOMIZE_RECIPIENT_PAGE_ADD_LOGO:"Add Logo",CUSTOMIZE_RECIPIENT_PAGE_REMOVE_LOGO:"Remove Logo",CUSTOMIZE_RECIPIENT_PAGE_CHOOSE_COLOR:"Choose Color",CUSTOMIZE_RECIPIENT_PAGE_SAVE:"Save",CUSTOMIZE_RECIPIENT_PAGE_CLOSE:"Cancel",CUSTOMIZE_RECIPIENT_PAGE_FILE_FILTERING_LABEL:"File Type is an image",CUSTOMIZE_RECIPIENT_PAGE_UNSUPPORTED_LOGO_TITLE:"Error",CUSTOMIZE_RECIPIENT_PAGE_UNSUPPORTED_LOGO_FORMAT:"The file you have chosen cannot be used as a logo. Please select another file. ",CUSTOMIZE_RECIPIENT_PAGE_UNSUPPORTED_COLOR_FORMAT:"The color you have entered is invalid. Please enter a hex value like #FFFFFF or #FFF.",SURVEY_TITLE:"We are interested in your Feedback",SURVEY_LINK:"Tell Us What You Think",SURVEY_QUESTION_ONE:"Why are you using Send & Track today?",SURVEY_QUESTION_TWO:"Does it work well for you?",SURVEY_QUESTION_THREE:"Is it missing something you wanted?",SURVEY_SEND:"Send",SURVEY_CLOSE:"No Thanks",SURVEY_TEXTAREA_LIMITATION_LABEL:"characters remaining",INVALID_PARAMETER_SURVEY_MESSAGE:"Answer type not allowed",INVALID_PARAMETER_SURVEY_TITLE:"Invalid Parameter",SEND_RHP_TITLE:"Sent To",GENERIC_ARIA_LABEL_STRING:"<%= prefix %>. <%= suffix %>",ENTERPRISE_RESTRICTIONS_ENFORCED:"Enterprise Sharing Restrictions Enabled",ENTERPRISE_USERS_SHARING_ACCESS:"This feature isn't available because your organization has enabled sharing restrictions. ",NAME:"NAME",SENT_RECEIVED:"SENT/RECEIVED",OWNER:"SENDER",STATUS:"STATUS",SHARED:"Shared",YOU:"You",VIEWED:"viewed",VIEWED_CAPS:"Viewed",WAITING_FOR_YOU:"Waiting for you",OF:"of",ACTIVITY_VIEWED_BY:"Viewed by <%= participant %>",ACTIVITY_DOWNLOADED_BY:"Downloaded by <%= participant %>",ACTIVITY_ONE_DOWNLOADED_BY:"<%= file_name %> downloaded by <%= participant %>",ACTIVITY_CREATED_BY:"Created by <%= participant %>",ACTIVITY_DOCUMENT_CREATED_BY:"Document created by <%= participant %>",ACTIVITY_SENT_TO:"Sent to <%= participant %>",REMOVE_LINK_DC_TITLE:"Remove Link from Adobe's cloud storage",REMOVE_LINK_DC_CONTENT:"Removing this link will delete it from the list of items shared with you.",REMOVE_LINK_DC_BUTTON:"Remove Link",ASCENDING:"Ascending",DESCENDING:"Descending",SHARED_FILES_DOWNLOAD_TITLE:"Shared Files",SENT_FILES_HEADER:"Shared by you",RECEIVED_FILES_HEADER:"Shared by others",LAST_ACTIVITY:"LAST ACTIVITY",DATE_LAST_ACTIVITY:"Date Last Activity",SHARED_BY:"SHARED BY",SIZE:"SIZE",SHARING:"SHARING",DATE_SHARED:"DATE SHARED",DATE_SHARED_S:"Date Shared",FROM:"FROM",DUE_BY:"Due by"}),define("acplugins/tracked-send/js/utils/sc-constants",["plugins-common/ac-plugins"],function(e){e.TrackedSend||(e.TrackedSend={});var t=e.TrackedSend;return t.ScConstants={ACTION:"Action",ACTIONS:"Actions",ADD_FILES_TO_SHARE:"AddFilesToShare",ADDRESS_BOOK:"AddressBook",ATTEMPTED_TO_SHARE_FORM:"AttemptedToShareForm",AUTOCOMPLETE:"Autocomplete",AVOIDED:"Avoided",BROWSER_CLOSE:"BrowserClosed",BRANDING:"Branding",CANCEL:"Cancel",CHECKED:"Checked",CHICKLET_ADDED:"ChickletAdded",CLICKED:"Clicked",CLICK_BRANDING:"ClickBranding",CLICK_BRANDING_IN_READER:"ClickBrandingInReader",CLICK_BRANDING_IN_ACROBAT:"ClickBrandingInAcrobat",CLOSE:"Close",COLOR_INPUT:"ColorInput",COLOR_MENU_BUTTON:"ColorMenuButton",COLOR_WELL:"ColorWell",CONTINUE:"Continue",DATE_VIEWED:"DateViewed",DEFAULT:"Default",DIALOG:"Dialog",DISABLED:"Disabled",DISALLOWED:"Disallowed",DOWNLOAD:"Download",DOWNLOAD_ALL:"DownloadAll",DOWNLOAD_ONE:"DownloadOne",DRAG_FILES:"DragFiles",DURATION:"Duration",EDIT_BRANDING_ONLINE:"ContinueOnline",EMAIL:"Email",EMAIL_LINK:"EmailLink",ENABLED:"Enabled",ENTERED:"Entered",EVENTUAL_CLICK:"EventualClick",FILE:"File",FILE_LIST:"FileList",FILE_NAME:"FileName",FILES_SHARED_DLG:"FilesSharedDlg",FORWARD:"Forward",FULL_ACTIVITY:"FullActivity",HIDDEN:"Hidden",IMMEDIATE_CLICK:"ImmediateClick",INCLUDE_MESSAGE_TEXT:"IncludeMessageText",INCLUDE_REPLY_TO:"IncludeReplyTo",IPM:"IPM",LATER:"Later",LOGO_BUTTON:"LogoButton",LOGO_CANCEL:"LogoCancel",LOGO_SAVE:"LogoSave",MESSAGE:"Message",MULTI:"Multi",NO_PARCELS:"NoParcels",NOTIFY_WHEN_VIEWED:"NotifyWhenViewed",NUM_FILES_CHECKED:"NumFilesChecked",PERSONAL:"Personal",PERSONAL_AND_PUBLIC:"PersonalANDPublic",PREVIEW:"Preview",PUBLIC:"Public",PUBLIC_LINK:"PublicLink",RECVIEW:"RecView",REPLY:"Reply",REMOVE:"Remove",REPORT_ABUSE:"ReportAbuse",RHP:"RHP",SCROLL:"Scroll",SAVE_AS:"SaveAs",SELECT_ALL:"SelectAll",SELECT_FILES:"SelectFiles",SENT_FILES:"SentFiles",SHARE:"Share",SHARE_BUTTON:"ShareButton",SHARE_FILE_BUTTON:"ShareFileButton",SHARE_ICON:"ShareIcon",SHARE_WITH:"ShareWith",SHARED:"Shared",SHOWN:"Shown",SINGLE:"Single",SORT:"Sort",SUBJECT:"Subject",SUCCESS:"Success",SURVEY:"Survey",SURVEY_CANCEL:"SurveyCancel",SURVEY_FIELD_FOCUS:"SurveyFieldFocus",SURVEY_LINK:"SurveyLink",SURVEY_SEND:"SurveySend",TOOLS:"Tools",TRACK:"Track",TRASH:"Trash",TURN_OFF_BRANDING:"TurnOffBranding",TURN_ON_BRANDING:"TurnOnBranding",UNCHECKED:"Unchecked",UNSHARE:"Unshare",UPGRADE:"Upgrade",URL_HIGHLIGHT:"UrlHighlight",URL_KEY_COPY:"UrlKeyCopy",VIEW:"View",VIEW_ALL_SHARED_FILES:"ViewAllSharedFiles",VIEW_FULL_ACTIVITY:"ViewFullActivity",WARNED_BEFORE_CLOSING:"WarnB4Close",WARNING:"Warning",WITH_REPLY:"wReply",1:"1","2_TO_5":"2to5","6_TO_10":"6to10","11_OR_MORE":"11orMore","11_TO_20":"11to20","21_TO_40":"21to40","41_TO_120":"41to120","121_OR_MORE":"121orMore",FSS:"FSS",FORM:"Form",OUTPUT:"Output",SAVE_TO_PDF:"SaveToPDF","1_STARTED":"1-Started","2_COMPLETED":"2-Completed",ERROR:"Error",SEND_TAB:"SendTab",COMPLETED:"Completed",SHARED_BY_YOU:"SharedByYou",SHARED_BY_OTHERS:"SharedByOthers",VIEW_FILES:"ViewFiles ",REVIEW_FILES:"ReviewFiles "},t.ScConstants}),define("viewer/templates/page-header-template.html",[],function(){return'<div class="adc-logo"></div>    <div class="page-header-tabs">        <div class="page-header-tab selected"><%= title %></div>    </div>'}),define("viewer/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}),define("viewer/nls/root/ui-strings",{APP_NAME:"VIEWER",UNSUPPORTED_BROWSER_TITLE_2:"Browser Unsupported",UNSUPPORTED_BROWSER_MSG_2:"You are running an unsupported version of Internet Explorer. To view shared file(s), you must upgrade to the <a class='dialog-link' href='<%= ie %>'>latest version of Internet Explorer</a>, or use the latest version of <a class='dialog-link' href='<%= chrome %>'>Google Chrome</a>, <a class='dialog-link' href='<%= safari %>'>Safari</a> or <a class='dialog-link' href='<%= firefox %>'>Firefox</a>."}),define("viewer/views/page-header-view",["core/ac-core","viewer/ac-viewer","viewer/templates/page-header-template.html","i18n!viewer/nls/ui-strings","core/views/view"],function(e,t,i,s){t.PageHeaderView=e.View.extend({initialize:function(){e.View.prototype.initialize.call(this),this._template=_.template(i)},render:function(){return e.View.prototype.render.call(this),0===this.$el.children().length&&this.$el.html(this._template({title:s.APP_NAME})),this
}})}),define("viewer/templates/full-preview-tracked-send-template.html",[],function(){return'<div class="full-preview-header files-header our-preview">    <div class="full-preview-home-btn-wrapper">        <button class="full-preview-home-btn parcel-preview-home-btn"                id="full-preview-header-home-btn"                title="<%= back %>">            <span class="hidden-accessible"><%= back %></span>        </button>        <div class="full-preview-home-btn-separator"></div>    </div>     <div class="full-preview-name-container folder-path                with-home-btn">        <div class="wrap-branding-logo"><div class="branding-logo parcel-branding-logo"></div></div>        <div id="full-preview-name" class="full-preview-name"             role="heading" aria-level="1"><%- name %></div>         <button class="full-preview-action-menu-btn                       files-header-btn"             id="full-preview-action-menu-btn"             title="<%= actions %>" aria-haspopup="true">            <span class="hidden-accessible"><%= actions %></span>        </button>        <div class="full-preview-action-menu menu" role="menu"              aria-hidden="true"></div>    </div>     <div class="full-preview-plugins-selector">        <div class="toolbar-selection-pointer"></div>        <div class="full-preview-plugins-selector-separator"></div>    </div>     <div class="full-preview-header-btns files-header-btns right">        <button class="full-preview-download-btn"             data-test-name="full-preview-header-download-btn">            <div class="full-preview-download-btn-icon"></div>            <div class="full-preview-download-btn-label">                 <%= download %></div>        </button>    </div></div> <div class="full-preview-main">    <div class="full-preview-body folder-items">        <div id="full-preview-image-container"             class="full-preview-image-container">            <!-- Intentionally omit close tag for img.                 See bug 3498744 (IE8) -->            <img class="full-preview-image single hidden" alt=""/>            <div class="full-preview-svg single hidden"/>        </div>        <div class="full-preview-not-available">            <%= previewNotAvailable %>            <span class="full-preview-not-available-desc"                ><%= previewNotAvailableDesc %></span>        </div>    </div>     <div class="full-preview-hud" role="toolbar"         aria-labelledby="full-preview-name"         aria-controls="full-preview-image-container"></div></div> <div class="full-preview-sidebar" tabindex="-1"></div>'}),define("viewer/views/full-preview-tracked-send-view",["core/ac-core","files/ac-files","viewer/ac-viewer","viewer/templates/full-preview-tracked-send-template.html","i18n!files/nls/ui-strings","i18n!acplugins/tracked-send/js/nls/ui-strings","acplugins/tracked-send/js/utils/sc-constants","files/views/full-preview-view"],function(e,t,i,s){i.FullPreviewTrackedSendView=t.FullPreviewView.extend({initialize:function(){t.FullPreviewView.prototype.initialize.call(this),this._template=_.template(s),this.options.fullPreviewUiModel.on("change:show_info",this._toggleRHP,this)},template:function(){return this._template},render:function(){var e,i=(this.options.parcelModel.get("invitation"),new Image);return t.FullPreviewView.prototype.render.call(this),!this.$homeBtn||this.options.viewMode&&"plugin"===this.options.viewMode||this.options.parcelModel.get("enabled")!==!0||(this.$parcelBody.addClass("branded"),this.$fullPreviewHeader.addClass("has-branding"),this.$fullPreviewMain.addClass("has-branding"),this.$parcelBody.addClass("has-branding"),this.$fullPreviewSidebar.addClass("has-branding"),e=this.options.parcelModel.get("color"),this.$fullPreviewBrandingLogo.children().length<1&&this.$fullPreviewBrandingLogo.append(i)),this},_initWrappers:function(){t.FullPreviewView.prototype._initWrappers.call(this),this.$fullPreviewBrandingLogo=$(".full-preview .branding-logo"),this.$parcelContainerFullPreviewName=$(".parcel-container .full-preview-name"),this.$parcelBody=this.$(".full-preview-name-container"),this.$fullPreviewHeader=this.$(".full-preview-header"),this.$fullPreviewMain=this.$(".full-preview-main"),this.$fullPreviewName=this.$(".full-preview-name"),this.$fullPreviewSidebar=this.$(".full-preview-sidebar"),this.$fullPreviewHomeButtonWrapper=this.$(".full-preview-home-btn-wrapper"),this.$fullPreviewHomeButton=this.$(".full-preview-home-btn")},_renderHudView:function(){this._renderChildView("_fullPreviewHudView",i.FullPreviewTrackedSendHudView,this.$previewHud)},_toggleRHP:function(){var e;LOG("Toggle Right Hand Panel"),e=this.options.fullPreviewUiModel.get("show_info"),e?this.$fullPreviewSidebar.addClass("show"):this.$fullPreviewSidebar.removeClass("show")}})}),define("viewer/templates/parcel-asset-template.html",[],function(){return'<div class="parcel-asset-view spinner-icon" role="group" aria-labelledby="parcel-name-<%= viewId %>">        <div role="presentation" class="parcel-hover-preview parcel-asset-rendition-block">            <div role="presentation" class="hover-preview-page3 hover-preview-page small-shadow"></div>            <div role="presentation" class="hover-preview-page2 hover-preview-page small-shadow"></div>            <div role="presentation" class="hover-preview-page1 hover-preview-page small-shadow">                <img class="parcel-asset-rendition" alt="" src="<%= rendition_url %>" />                <div role="presentation" class="hover-preview-not-available-parcel">                    <div class="hover-preview-not-available-header"><%=PREVIEW_NOT_AVAILABLE%></div>                    <div class="hover-preview-not-available-desc">                        <%=PREVIEW_NOT_AVAILABLE_DESC%>                    </div>                </div>                <div role="presentation" class="hover-preview-hud">                    <button data-test-name="hover-preview-hud-prev"                            class="hover-preview-hud-prev                                   hover-preview-control                                   hover-preview-nav-btn disabled"                            title="<%= PREV_PAGE_TITLE %>"                            aria-label="<%= PREV_PAGE_TITLE %>" disabled>                        <div class="hover-preview-nav-btn-img hover-preview-img-prev"></div>                    </button>                    <button data-test-name="hover-preview-hud-next" class="hover-preview-hud-next                                   hover-preview-control                                   hover-preview-nav-btn"                            title="<%= NEXT_PAGE_TITLE %>"                            aria-label="<%= NEXT_PAGE_TITLE %>">                        <div class="hover-preview-nav-btn-img hover-preview-img-next"></div>                    </button>                </div>            </div>        </div>        <div role="presentation" class="parcel-asset-rendition-footer">            <button class="parcel-inline download-button" title="<%= DOWNLOAD %>" aria-label="<%= DOWNLOAD %>"></button><button class="parcel-inline parcel-name" id="parcel-name-<%= viewId %>"><%= filename %></button>        </div>    </div>'}),define("viewer/views/parcel-asset-view",["core/ac-core","viewer/ac-viewer","viewer/templates/parcel-asset-template.html","i18n!files/nls/ui-strings","i18n!core/nls/ui-strings","acplugins/tracked-send/js/utils/sc-constants","core/views/view"],function(e,t,i,s,n,o){t.ParcelAssetView=e.View.extend({initialize:function(){e.View.prototype.initialize.call(this),this._template=_.template(i),this._addKeyEventListener()},resetRendition:function(){var e=this.model.getRenditionUrl("tile",this.model.get("current_page"));this.$rendition.attr("src",e)},adjustHud:function(){0===this.model.get("current_page")?(this.$prevBtn.addClass("disabled").prop("disabled",!0),this.$nextBtn.removeClass("disabled").prop("disabled",!1)):this.model.get("current_page")===this.model.get("page_count")-1?(this.$prevBtn.removeClass("disabled").prop("disabled",!1),this.$nextBtn.addClass("disabled").prop("disabled",!0)):(this.$prevBtn.removeClass("disabled").prop("disabled",!1),this.$nextBtn.removeClass("disabled").prop("disabled",!1))},turnPage:function(e){e.stopPropagation();var t,i,s=e.data.direction,n=1,a="NextPg",r=this.options;"prev"===s&&(n=-1,a="PrevPg"),1===n&&this.$nextBtn.hasClass("disabled")||-1===n&&this.$prevBtn.hasClass("disabled")||(i=r.parcelAssetsCollection&&r.parcelAssetsCollection.length>1?o.MULTI:o.SINGLE,r.appApi.siteCatalystApi.logScEvent(r.viewMode&&"plugin"===r.viewMode?[o.PREVIEW,i,o.FILE,a]:[o.RECVIEW,i,o.FILE,a]),t=(this.model.get("current_page")||0)+n,this.model.set("current_page",t),this.resetRendition(),this.adjustHud())},download:function(t){t.stopPropagation();var i=this.model,s=_.extend({},this.options,{id:i.get("id"),content_type:i.get("content_type")});this._triggerViewEvent(e.ViewEvents.DOWNLOAD,s),this.options.appApi.siteCatalystApi.logScEvent([o.RECVIEW,o.MULTI,o.DOWNLOAD_ONE])},render:function(t,i){var o,a=this.model.id,r=1;return e.View.prototype.render.call(this),this.$item||(o=this._template({filename:this.model.get("name"),rendition_url:this.model.getRenditionUrl("tile",0),PREVIEW_NOT_AVAILABLE:n.PREVIEW_NOT_AVAILABLE,PREVIEW_NOT_AVAILABLE_DESC:n.PREVIEW_NOT_AVAILABLE_DESC,DOWNLOAD:n.DOWNLOAD,PREV_PAGE_TITLE:s.PREV_PAGE_TITLE,NEXT_PAGE_TITLE:s.NEXT_PAGE_TITLE,viewId:a}),t?t.replaceWith(o):this.$el.append(o),this.$item=this.$el.children().eq(i),this.$rendition=$(this.$item.find(".parcel-asset-rendition")),this.$hud=$(this.$item.find("div.hover-preview-hud")),this.$prev=this.$hud.find(".hover-preview-img-prev"),this.$next=this.$hud.find(".hover-preview-img-next"),this.$prevBtn=this.$hud.find(".hover-preview-hud-prev"),this.$nextBtn=this.$hud.find(".hover-preview-hud-next"),this.$download=this.$item.find(".download-button"),this.$norendition=this.$item.find(".hover-preview-not-available-parcel"),this.$rendition.on("error",{},_.bind(function(){this.$norendition.show(),this.$rendition.hide(),$(this.$item.find(".parcel-asset-rendition-block")).css("opacity",1),$(this.$item.find(".hover-preview-page")).css("margin-top",this.$norendition.height()/2-this.$norendition.height())},this)),this.$rendition.on("load",{},_.bind(function(){$(this.$item.find(".hover-preview-page")).css("margin-top",this.$rendition.height()/2-this.$rendition.height()),$(this.$item.find(".parcel-asset-rendition-block")).css("opacity",1),this.$item.removeClass("spinner-icon")},this)),r=parseInt(this.model.get("page_count"),10),r>1?(this.$rendition.on("load",{},_.bind(function(){var e=$(this.$item.find(".hover-preview-page"));e.css("width",this.$rendition.width()).css("height",this.$rendition.height()).css("margin-top",this.$rendition.height()/2-this.$rendition.height())},this)),this.$prevBtn.on("click",{direction:"prev"},_.bind(this.turnPage,this)),this.$nextBtn.on("click",{direction:"next"},_.bind(this.turnPage,this))):this.$hud.addClass("hidden"),this.$download.on("click",{},_.bind(this.download,this)),this.$norendition.find(".preview-download").on("click",{},_.bind(this.download,this))),this.$item.data("id",a),this._checkForReportAbuseFlow(),this},_checkForReportAbuseFlow:function(){"True"===this.options.parcelModel.get("reportabuse")&&($(".parcel-asset-rendition").hide(),$(".hover-preview-not-available-parcel").show())},_onKeyPress:function(e){var t,i=$(e.target),s=e.charCode||e.keyCode,n=!1,o=this.$prevBtn,a=this.$nextBtn,r=!1;return(13===s||32===s)&&(r=i.is(o),(r||i.is(a))&&(t=r?a:o,i.trigger("click"),n=!0,i.is(":disabled")&&t.focus())),n}})}),define("viewer/views/multi-file-view",["core/ac-core","viewer/ac-viewer","i18n!acplugins/tracked-send/js/nls/ui-strings","viewer/views/parcel-asset-view","core/views/view"],function(e,t,i){t.MultiFileView=e.View.extend({events:{"click .parcel-asset-view":"_onClickView"},initialize:function(){e.View.prototype.initialize.call(this)},render:function(){return e.View.prototype.render.call(this),this._renderChildViews(),$(".parcel-rendition-list").addClass("plugin"===this.options.viewMode?"plugin":"viewer"),this},_renderChildViews:function(){var e,t=this.$el.children(),s=t.length,n=0,o=this.options.parcelAssetsCollection;o.each(function(i){var o=this._getChildItemView(i);e=s>n?t.eq(n):void 0,o.render(e,n),n+=1},this),"plugin"!==this.options.viewMode&&0===$(".report-abuse").length&&this.$el.append('<div role="button" tabindex="0" class="report-abuse"><span class="report-abuse-label">'+i.REPORT_ABUSE+"</span></div>")},_getChildItemView:function(e){var i,s=this.options,n=e.id,o=this.$el;return i=this.getChildViewById(n),i?(i.$el!==o&&i.setElement(o),_.extend(i.model.attributes,e.attributes)):(s=_.extend({},s,{el:o,model:e}),i=new t.ParcelAssetView(s),this.addChildView(i,n)),i},_getEventTargetItem:function(e){return $(e.target).closest(".parcel-asset-view")},_getEventTargetView:function(e){var t,i=this._getEventTargetItem(e);return i&&(t=this.getChildViewById(i.data("id"))),t},_onClickView:function(e){var t,i,s,n=this.options;s=this._getEventTargetView(e),i=s.model,t=i.id,this._triggerViewEvent("viewer:preview-file",_.extend({},n,{id:t,itemModel:i}))}})}),define("viewer/templates/viewer-page-rhp-view-template",[],function(){return'<div class="ts-rhp-respond-back-multi"></div><div role="button" tabindex="0" class="report-abuse">    <span class="report-abuse-label"><%= reportAbuse %></span></div> '}),define("acplugins/tracked-send/js/viewer-rhp/templates/respond-back-view-template.html",[],function(){return'<div class="ts-rhp-respond-back-container">       <div class="ts-rhp-sender-title ts-rhp-title"><%= senderHeading %></div>       <div class="ts-rhp-sender-name"><%= senderName %></div>       <input type="button" class="button-light-blue-small ts-rhp-reply-button"           value="<%= replyBtn %>"/>       <div class="ts-rhp-message-title ts-rhp-title"><%- messageHeading %></div>       <div class="ts-rhp-email-subject ts-rhp-body-single" title="<%- emailSubject %>"><%- emailSubject %></div>       <div class="ts-rhp-email-message ts-rhp-body-multi"><%- emailMessage %></div>       <div class="ts-rhp-date-title ts-rhp-title"><%= dateTitle %></div>       <div class="ts-rhp-date-sent ts-rhp-body-single"><%= sentDate %></div>   </div>'}),define("acplugins/tracked-send/js/viewer-rhp/views/respond-back-view",["core/ac-core","acplugins/tracked-send/js/viewer-rhp/templates/respond-back-view-template.html","i18n!acplugins/tracked-send/js/nls/ui-strings","core/utils/date-util","acplugins/tracked-send/js/utils/sc-constants","core/views/view"],function(e,t,i,s,n){return e.View.extend({events:{"click .ts-rhp-reply-button":"_onReplyClick"},initialize:function(){e.View.prototype.initialize.call(this),this._template=_.template(t)},render:function(){var t=this.options.parcelModel,s=t.get("email_message"),n=t.get("sender_email"),o=t.get("sender_name"),a=t.get("email_subject");e.View.prototype.render.call(this),0===this.$el.children().length&&(this.$el.html(this._template({messageHeading:i.SHARE_SUBJECT_MSG_HEADING,emailSubject:a,emailMessage:s,senderEmail:n,senderHeading:i.SENDER_NAME,senderName:o,replyBtn:i.REPLY,dateTitle:i.SENT_DATE,sentDate:this._formatDateSend()})),this._initWrappers()),s||n||o?(this.$respondBackContainer.parent().show(),n?this.$replyButton.show():this.$replyButton.hide(),a?this.$emailSubject.show():this.$emailSubject.hide(),s?this.$emailMessage.show():this.$emailMessage.hide(),a||s?this.$messageTitle.show():this.$messageTitle.hide()):this.$respondBackContainer.parent().hide()},_onReplyClick:function(){var e,t,s="mailto:",o=this.options.parcelModel;t=this.options.parcelAssetsCollection&&this.options.parcelAssetsCollection.length>1?[n.RECVIEW,n.MULTI,n.PREVIEW,n.REPLY]:[n.RECVIEW,n.SINGLE,n.REPLY],this.options.appApi.siteCatalystApi.logScEvent(t),s+=o.get("sender_email"),e=_.template(i.EMAIL_REPLY_FORMAT,{emailSubject:encodeURIComponent(o.get("email_subject"))}),s+="?subject="+e,document.location.href=s},_initWrappers:function(){this.$respondBackContainer=this.$(".ts-rhp-respond-back-container"),this.$replyButton=this.$(".ts-rhp-reply-button"),this.$emailSubject=this.$(".ts-rhp-email-subject"),this.$emailMessage=this.$(".ts-rhp-email-message"),this.$messageTitle=this.$(".ts-rhp-message-title")},_formatDateSend:function(){var e,t=this.options.parcelModel;return e=t.get("date_sent"),t?s.formatDate(e||""):""}})}),define("viewer/views/viewer-page-rhp-view",["core/ac-core","viewer/ac-viewer","viewer/templates/viewer-page-rhp-view-template","i18n!acplugins/tracked-send/js/nls/ui-strings","acplugins/tracked-send/js/viewer-rhp/views/respond-back-view","core/views/view"],function(e,t,i,s,n){t.ViewerPageRHPView=e.View.extend({initialize:function(){e.View.prototype.initialize.call(this),this._template=_.template(i),this._addModelEventListeners()},render:function(){var t=this.options.parcelModel;e.View.prototype.render.call(this),0===this.$el.children().length&&(this.$el.html(this._template({reportAbuse:s.REPORT_ABUSE,sentBy:s.SENDER_NAME,senderName:t.get("sender_name")})),this._initWrappers()),this._renderChildViews()},_addModelEventListeners:function(){this.options.parcelModel.on("change",this._onParcelChange)},_onParcelChange:function(){},_removeModelEventListeners:function(){this.options.parcelModel.off("change")},_initWrappers:function(){this.$respondBack=$(".ts-rhp-respond-back")},_renderChildViews:function(){this._renderRespondBackView()},_renderRespondBackView:function(){this.$respondBack=$(".ts-rhp-respond-back-multi"),this._renderChildView("_respondBackView",n,this.$respondBack)}})}),define("viewer/views/viewer-page-view",["core/ac-core","files/ac-files","app/ac-app","viewer/ac-viewer","acplugins/tracked-send/js/tool/ac-tracked-send","core/utils/css-util","viewer/templates/viewer-page-template.html","i18n!files/nls/ui-strings","i18n!acplugins/tracked-send/js/nls/ui-strings","acplugins/tracked-send/js/utils/sc-constants","viewer/views/page-header-view","viewer/views/full-preview-tracked-send-view","viewer/views/multi-file-view","viewer/views/viewer-page-rhp-view","app/views/modal-mask-view"],function(e,t,i,s,n,o,a,r,l,c){s.ViewerPageView=e.View.extend({events:{"click .ts-viewer-download-button":"_onDownloadClick","click .report-abuse":"_onReportAbuseClick"},initialize:function(){e.View.prototype.initialize.call(this),this._template=_.template(a),this._addUiModelEventListeners(),this._addModelEventListeners(),this._addAppApiCallbacks(),this._addKeyEventListener(),this.on("viewer:preview-file",this._onClickPreview,this)},render:function(){var t=this.$el,i=this.options.parcelModel,s=i.get("email_message"),n=i.get("sender_email"),o=i.get("sender_name");return e.View.prototype.render.call(this),(s||n||o)&&t.addClass("respondBack"),0===this.$el.children().length&&(this.$el.html(this._template({parcelSubject:this._getParcelSubject(),downloadAll:l.DOWNLOAD_ALL,forwardLabel:l.FORWARD,notifyMeWhenViewed:l.NOTIFY_ME_WHEN_VIEWED,viewedBy:l.VIEWED_BY,viewFullActivity:l.VIEW_FULL_ACTIVITY,unshare:l.UNSHARE,reportAbuse:l.REPORT_ABUSE,back:r.BACK})),1===this.options.parcelAssetsCollection.models.length&&"plugin"!==this.options.viewMode&&(this.$(".thumbnails").css("visibility","hidden"),this.$(".parcel-container").css("background-color","#f5f5f5")),this._initWrappers(),this._updateButtonStatus(),this._checkForReportAbuseFlow(),this._renderBrandingLogo()),this._renderChildViews(),this._updateName(),this},stopListening:function(t,i,s){e.View.prototype.stopListening.call(this,t,i,s)},teardown:function(){this._removeModelEventListeners()},_addModelEventListeners:function(){this.options.parcelModel.on("change",this._onParcelChange)},_onParcelChange:function(){0!==this.$el.children().length&&this._updateButtonStatus()},_removeModelEventListeners:function(){this.options.parcelModel.off("change")},_initWrappers:function(){this.$header=this.$(".page-header"),this.$error=this.$(".page-error"),this.$pageBody=this.$(".page-body.thumbnails"),this.$fullPreview=this.$(".page-body.full-preview"),this.$thumbnails=this.$(".parcel-rendition-list"),this.$rightPanel=this.$(".parcel-rendition-list-rhp"),this.$viewedByList=this.$(".parcel-viewed-by-list"),this.$viewedByHead=this.$(".parcel-viewed-by-heading"),this.$notifyChbox=this.$(".parcel-notify-checkbox"),this.$notifyLable=this.$(".parcel-notify-checkbox-label"),this.$modalMask=$("#modal-mask"),this.$parcelBody=this.$(".page-body-container"),this.$parcelBodyHeader=this.$(".parcel-body-header"),this.$brandingLogo=this.$(".branding-logo"),this.$wrapBrandingLogo=this.$(".wrap-branding-logo"),this.$fullPreviewName=this.$(".full-preview-name"),this.$parcelActionBtns=this.$(".parcel-action-buttons"),this.$homeBtnWrapper=this.$(".full-preview-home-btn-wrapper"),this.$homeBtnWrapper.length||(this.$homeBtnWrapper=this.$(".full-preview-home-btn"))},_renderBrandingLogo:function(){var e,t=this.options.parcelModel.get("invitation"),i=new Image;1===this.options.parcelAssetsCollection.models.length||this.options.viewMode&&"plugin"===this.options.viewMode||this.options.parcelModel.get("enabled")!==!0||(this.$parcelBody.addClass("branded"),e=this.options.parcelModel.get("color"),$(i).load($.proxy(this.render,this)),i.src=this.options.itemModel.rootUrl+"a/invitation/"+t+"/asset/branding",this.$brandingLogo.append(i))},_renderChildViews:function(){return e.Features.isFeatureEnabled("ts_enable_eol_ie8and9")&&util.isIE9orBelow()?(this.$parcelBody.hide(),void this._renderUnsupportedBrowserView()):(this.$error.hide(),(this.options.parcelAssetsCollection.models.length>1||"plugin"===this.options.viewMode)&&this._renderPageHeaderView(),this._renderFullPreviewView(),this._renderModalMaskView(),(this.options.parcelAssetsCollection.models.length>1||"plugin"===this.options.viewMode)&&this._renderMultiFileView(),void this._renderRightHandPanel())},_renderUnsupportedBrowserView:function(){this.$error.show(),this._renderChildView("_unsupportedBrowserView",s.UnsupportedBrowserView,this.$error)},_renderPageHeaderView:function(){this._renderChildView("_pageHeaderView",s.PageHeaderView,this.$header)},_renderFullPreviewView:function(){this._renderChildView("_fullPreviewView",s.FullPreviewTrackedSendView,this.$fullPreview)},_renderModalMaskView:function(){var e=this.options.dialogsUiModel.getDialogCount();0===e&&this._renderChildView("_modalMaskView",s.ModalMaskView,this.$modalMask)._updateModal()},_renderMultiFileView:function(){this._renderChildView("_multiFileView",s.MultiFileView,this.$thumbnails)},_renderRightHandPanel:function(){this._renderChildView("_previewRHP",s.ViewerPageRHPView,this.$rightPanel)},_updateButtonStatus:function(){var e=this.options,t=this.$notifyChbox,i=this.$notifyLable,s=e.parcelModel.get("invitations"),n=s&&1===s.length&&"PARCEL_PUBLIC_SHARING"===s[0].recipient_email,a=!n&&e.parcelModel.get("delivery_receipts");a?(o.addClass(t,"selected"),t.prop("checked",!0)):(o.removeClass(t,"selected"),t.prop("checked",!1)),n?(o.addClass(t,"disabled"),o.addClass(i,"disabled"),t.prop("disabled",!0)):(o.removeClass(t,"disabled"),o.removeClass(i,"disabled"),t.prop("disabled",!1))},_addUiModelEventListeners:function(){var e=this.options,t=e.windowUiModel||e.appApi.windowApi.options.windowUiModel;t&&t.on("change:width",this._onWindowResize).on("change:height",this._onWindowResize)},_addAppApiCallbacks:function(){this.options.appApi.previewApi.addItemModelChangeCallback(this._onFullPreviewModelChange)},_onFullPreviewModelChange:function(e){this._toggleOverlay(e?!0:!1)},_toggleOverlay:function(e){var t=this.$pageBody,i="hidden";t&&t.length&&(e?t.addClass(i).attr("aria-hidden",!0):(t.removeClass(i).removeAttr("aria-hidden"),this.render()))},_onWindowResize:function(){if(!this._onDebouncedWindowResize){var e=this.options,t=e.windowUiModel||e.appApi.windowApi.options.windowUiModel;this._onDebouncedWindowResize=_.debounce(this.render,t.get("resize_debounce_delay"))}this._onDebouncedWindowResize()},_onDownloadClick:function(){var t={parentView:this,id:"all"};this.options.appApi.siteCatalystApi.logScEvent([c.RECVIEW,c.MULTI,c.DOWNLOAD_ALL]),this._triggerViewEvent(e.ViewEvents.DOWNLOAD,t)},_onClickPreview:function(i){var s,n,o,a=t.opFactory,r=i.fullPreviewUiModel,l={item_model:i.itemModel};n=i.itemModel.get("page_count"),o=r.get("scroll_pages_limit"),o||(o=1e3);try{e.Features.isFeatureEnabled("enable_ngsend")&&(l.enable_ngdoc=!0,l.view_type="ngdoc")}catch(c){LOG("enable_ngsend is not a feature flipper")}return l.view_format=n>o?"fit_page_width":"scroll_pages",r.set(l),this.options.appApi.siteCatalystApi.logScEvent(["RecView","Multi","Preview","Shown"]),s=a.create("OpeningFullPreviewOp",i),s.run()},_checkForReportAbuseFlow:function(){var e=this.options;"True"===e.parcelModel.get("reportabuse")&&_.defer(function(){$(".report-abuse").trigger("click")}),"plugin"===e.viewMode&&$(".report-abuse").hide()},_onReportAbuseClick:function(){var t,i={parentView:this};return this.options.parcelAssetsCollection&&this.options.parcelAssetsCollection.length>1?(t=[c.RECVIEW,c.MULTI,c.PREVIEW,c.REPORT_ABUSE],i.parcelId=this.options.parcelAssetsCollection.id):(t=[c.RECVIEW,c.SINGLE,c.REPORT_ABUSE],i.id=this.options.itemModel.id),this.options.appApi.siteCatalystApi.logScEvent(t),this._triggerViewEvent(e.ViewEvents.SHOW_REPORT_ABUSE_DLG,i),!1},_getParcelSubject:function(){return _.escape(this.options.parcelModel.get("email_subject"))},_getNameWidth:function(){var e=o.getFullWidth(this.$parcelBodyHeader)-o.getFullWidth(this.$wrapBrandingLogo)-o.getExtraWidth(this.$fullPreviewName)-o.getFullWidth(this.$homeBtnWrapper)-o.getFullWidth(this.$parcelActionBtns);return e},_updateName:function(){var e=this.$fullPreviewName;e&&e.length&&(this.$fullPreviewName.text(this._getParcelSubject()),this._truncateName())},_truncateName:function(){function t(){return truncate.getTextSize(s).width-i}var i=this._getNameWidth(),s=this.$fullPreviewName;"ja-jp"===e.Locale.getLocale()&&(i*=.85,i=Math.floor(i)),!isNaN(i)&&i>0&&truncate.truncateToFit(s,t)},_onKeyPress:function(e){var t=$(e.target),i=e.charCode||e.keyCode,s=!1;return 13!==i&&32!==i||!t.is("[role='button']:not([aria-disabled='true']):not(:disabled)")||(t.trigger("click"),s=!0),s}})}),define("acplugins/signatures/js/templates/parcel-preview-rhp-template",[],function(){return'    <div class="parcel-topic-message-heading" role="heading" level="2"><%= emailHeading %></div>   <div class="parcel-message"><%- emailMessage %></div>   <div role="grid">       <div role="row">           <div class="parcel-viewed-by-heading" role="columnheader">               <%= viewedBy %>           </div>           <div class="hidden-accessible" role="columnheader">               <%= views %>           </div>       </div>       <div role="presentation" class="parcel-viewed-by-list">       </div>   </div>   <div role="button" tabindex="0" class="parcel-activity-btn">       <span class="parcel-activity-btn-label"><%= viewFullActivity %></span>   </div>   <div class="parcel-notify">       <input type="checkbox" class="parcel-notify-checkbox core-checkbox"              id="parcel-notify-checkbox" />       <span class="parcel-notify-checkbox-checkmark" aria-hidden="true"></span>       <div class="parcel-notify-checkbox-label">           <label for="parcel-notify-checkbox"><%= notifyMeWhenViewed %></label>       </div>   </div> '}),define("acplugins/signatures/js/templates/viewer-page-recipient-template.html",[],function(){return'<div role="row" class="parcel-viewed-by-item">        <div role="gridcell" class="parcel-viewed-by-email">            <%= email %>            <% if (typeof(url) != "undefined") { %><a href="<%= url %>" target="_blank"><% } %>            <% if (typeof(url) != "undefined") { %><%= openLink %><% } %>            <% if (typeof(url) != "undefined") { %></a><% } %>        </div>        <div role="gridcell" class="parcel-viewed-by-count"><%= count %></div>    </div>'}),define("acplugins/signatures/js/views/parcel-preview-rhp-view",["core/ac-core","app/ac-app","files/ac-files","acplugins/signatures/js/ac-signature","acplugins/signatures/js/templates/parcel-preview-rhp-template","acplugins/signatures/js/templates/viewer-page-recipient-template.html","i18n!acplugins/signatures/js/nls/ui-strings","core/utils/css-util","core/utils/view-util","acplugins/signatures/js/utils/sc-constants"],function(e,t,i,s,n,o,a,r,l,c){s.ParcelPreviewRHPView=e.View.extend({events:{"click .parcel-notify-checkbox":"_onDeliveryReceiptsClick","click .parcel-notify-checkbox-label":"_onDeliveryReceiptsClick","click .parcel-activity-btn":"_onActivityBtnClick","keydown .parcel-activity-btn":"_onActivityBtnClick"},initialize:function(){e.View.prototype.initialize.call(this),this._template=_.template(n),this._recipientTemplate=_.template(o),this._addModelEventListeners()},render:function(){var t=this.options.parcelModel;e.View.prototype.render.call(this),0===this.$el.children().length&&(this.$el.html(this._template({notifyMeWhenViewed:a.NOTIFY_ME_WHEN_VIEWED,viewedBy:a.VIEWED_BY,viewFullActivity:a.VIEW_FULL_ACTIVITY,publicLink:a.PARCEL_PUBLIC_SHARING,openLink:a.OPEN_LINK,emailHeading:a.MESSAGE_HEADING,emailTopic:t.get("email_subject"),emailMessage:t.get("email_message"),views:a.VIEWS})),this._initWrappers(),this._renderRightPanelItems()),this._updateButtonStatus()},_addModelEventListeners:function(){this.options.parcelModel.on("change",this._onParcelChange)},_onParcelChange:function(){this._updateButtonStatus()},_removeModelEventListeners:function(){this.options.parcelModel.off("change")},_initWrappers:function(){this.$viewedByList=this.$(".parcel-viewed-by-list"),this.$viewedByHead=this.$(".parcel-viewed-by-heading"),this.$notifyChbox=this.$(".parcel-notify-checkbox"),this.$notifyLable=this.$(".parcel-notify-checkbox-label"),this.$parcelTopicMessageHeading=this.$(".parcel-topic-message-heading"),this.$parcelMessage=this.$(".parcel-message")},_renderRightPanelItems:function(){var e,t,i,s,n=this.options.parcelModel,o=n.get("invitations"),r=[],l=!1;o=_.sortBy(o,function(e){return e.recipient_email}),_.each(o,function(n){e=n.event_counts.parcel_view||0,"PARCEL_PUBLIC_SHARING"===n.recipient_email?(s=n.preview_url,i=this._recipientTemplate({email:a.PARCEL_PUBLIC_SHARING,openLink:a.OPEN_LINK,count:e,url:s})):(l=!0,t=this._recipientTemplate({email:_.escape(n.recipient_email),count:e}),r.push(t))},this),i&&r.push(i),this.$viewedByList.append(r),l||(this.$parcelTopicMessageHeading.hide(),this.$parcelMessage.hide())},_updateButtonStatus:function(){var e=this.options,t=this.$notifyChbox,i=this.$notifyLable,s=e.parcelModel.get("invitations"),n=s&&1===s.length&&"PARCEL_PUBLIC_SHARING"===s[0].recipient_email,o=!n&&e.parcelModel.get("delivery_receipts");o?(r.addClass(t,"selected"),t.prop("checked",!0)):(r.removeClass(t,"selected"),t.prop("checked",!1)),l.enableInput(t,!n),n?r.addClass(i,"disabled"):r.removeClass(i,"disabled")},_onActivityBtnClick:function(e){var t,i,n,o=this.options;return"keydown"===e.type&&13!==e.which&&32!==e.which?!0:(i=_.extend(this.options,{parentView:this}),delete i.el,t=new s.ParcelActivityDlg(i),t.open(),n=o.parcelAssetsCollection&&o.parcelAssetsCollection.length>1?c.MULTI:c.SINGLE,void o.appApi.siteCatalystApi.logScEvent([c.PREVIEW,c.SHARED,n,c.VIEW_FULL_ACTIVITY]))},_onDeliveryReceiptsClick:function(){var e,t,i=this.options,n=i.parcelModel.get("invitations"),o=1===n.length&&"PARCEL_PUBLIC_SHARING"===n[0].recipient_email,a=!i.parcelModel.get("delivery_receipts");if(!o)return this._setCheckboxSelectionStatus(a),e=i.parcelAssetsCollection&&i.parcelAssetsCollection.length>1?c.MULTI:c.SINGLE,i.appApi.siteCatalystApi.logScEvent([c.PREVIEW,c.SHARED,e,c.NOTIFY_WHEN_VIEWED,a?c.CHECKED:c.UNCHECKED]),t=s.opFactory.create("SettingDeliveryReceiptsOp",{parcelModel:this.options.parcelModel,deliveryReceipts:a}),t.run().fail(_.bind(function(){this._setCheckboxSelectionStatus(!a)},this))},_setCheckboxSelectionStatus:function(e){var t=this.$(".parcel-notify-checkbox");e?(r.addClass(t,"selected"),t.prop("checked",!0)):(r.removeClass(t,"selected"),t.prop("checked",!1))}})}),define("acplugins/signatures/js/views/parcel-preview-view",["core/ac-core","app/ac-app","files/ac-files","acplugins/signatures/js/ac-signature","viewer/ac-viewer","core/utils/view-util","acplugins/signatures/js/utils/sc-constants","acplugins/signatures/js/ops/manipulation/unshare-one-parcel-op","acplugins/signatures/js/ops/manipulation/unshare-one-if-confirmed-op","acplugins/signatures/js/views/parcel-activity-dlg","viewer/views/viewer-page-view","viewer/collections/parcel-asset-collection","core/models/ui/error-ui-model","core/models/ui/full-preview-ui-model","core/models/ui/plugins-ui-model","app/models/ui/modal-mask-ui-model","acplugins/signatures/js/views/parcel-preview-rhp-view"],function(e,t,i,s,n,o,a){s.ParcelPreviewView=n.ViewerPageView.extend({events:{"click .parcel-preview-home-btn":"_onHomeBtnClick","click .tracked-send-forward-btn":"_onForwardClick","click .tracked-send-unshare-btn":"_onUnshareClick","click .parcel-viewed-by-email":"_onPublicLinkClick"},initialize:function(){this.options.viewMode="plugin",this.options.errorUiModel=e.uiModelFactory.create("ErrorUiModel"),this.options.fullPreviewUiModel=e.uiModelFactory.create("FullPreviewUiModel"),this.options.fullPreviewPluginsUiModel=e.uiModelFactory.create("PluginsUiModel"),this.options.fullPreviewOverlaysUiModel=e.uiModelFactory.create("PluginsUiModel"),this.options.modalMaskUiModel=t.uiModelFactory.create("ModalMaskUiModel"),this.options.fullPreviewUiModel.set({standalone:!1,read_only:!1}),n.ViewerPageView.prototype.initialize.call(this),this.on(i.ViewEvents.FULL_PREVIEW_CLOSE,this._onFullPreviewClose,this)
},render:function(){var e=this.options.parcelModel.id,t=s.PLUGIN_ID+"/"+e;n.ViewerPageView.prototype.render.call(this),this.options.appApi.routerApi.navigate(t)},_renderChildViews:function(){this._renderPageHeaderView(),this._renderFullPreviewView(),this._renderModalMaskView(),this._renderMultiFileView(),this._renderRightHandPanel()},_renderRightHandPanel:function(){this._renderChildView("_previewRHP",s.ParcelPreviewRHPView,this.$rightPanel)},_onFullPreviewClose:function(){i.opFactory.create("ClosingFullPreviewOp",this.options).run()},closeWithoutResolving:function(){this.applyMethodRecursively("undelegateEvents"),this.applyMethodRecursively("stopListening"),this._triggerViewEvent("ParcelPreview_Close")},_initWrappers:function(){n.ViewerPageView.prototype._initWrappers.call(this),this.$unshareButton=this.$(".tracked-send-unshare-btn")},_updateButtonStatus:function(){n.ViewerPageView.prototype._updateButtonStatus.call(this),o.enableInput(this.$unshareButton,this.options.parcelModel.get("is_active"))},_onClickPreview:function(e){var t=e.itemModel;this.options.appApi.routerApi.navigate("/file/"+t.id,{trigger:!0}),this.closeWithoutResolving()},_onHomeBtnClick:function(e){e.preventDefault(),this.closeWithoutResolving(),this.options.appApi.routerApi.navigate(s.PLUGIN_ID)},_onForwardClick:function(){var e,t=this.options,i="/send/parcel/"+t.parcelModel.id;t.appApi.routerApi.navigate(i,{trigger:!0}),this.closeWithoutResolving(),e=t.parcelAssetsCollection&&t.parcelAssetsCollection.length>1?a.MULTI:a.SINGLE,t.appApi.siteCatalystApi.logScEvent([a.PREVIEW,a.SHARED,e,a.PREVIEW,a.RHP,a.SHARE_FILE_BUTTON])},_onPublicLinkClick:function(){var e;e=this.options.parcelAssetsCollection&&this.options.parcelAssetsCollection.length>1?a.MULTI:a.SINGLE,this.options.appApi.siteCatalystApi.logScEvent([a.PREVIEW,a.SHARED,e,a.PUBLIC_LINK])},_onUnshareClick:function(){var e,t,i;this.$unshareButton.hasClass("disabled")||(i=this.options.parcelAssetsCollection&&this.options.parcelAssetsCollection.length>1?a.MULTI:a.SINGLE,this.options.appApi.siteCatalystApi.logScEvent([a.PREVIEW,a.SHARED,i,a.UNSHARE]),t=_.extend(this.options,{itemModel:this.options.parcelModel}),e=new s.UnshareOneIfConfirmedOp(t),e.run())}})}),define("acplugins/signatures/js/ops/getting/getting-assets-op",["core/ac-core","acplugins/signatures/js/ac-signature","core/ops/op","viewer/collections/parcel-asset-collection"],function(e,t){t.GettingAssetsOp=e.Op.extend({run:function(){var e=this.options.parcelAssetsCollection;return e.fetch()}})}),define("acplugins/signatures/js/views/parcels-list-view",["core/ac-core","acplugins/signatures/js/ac-signature","viewer/ac-viewer","core/utils/view-util","core/utils/css-util","acplugins/signatures/js/utils/sc-constants","acplugins/signatures/js/utils/ts-utils","core/utils/sc-analytics","i18n!acplugins/signatures/js/nls/ui-strings","core/models/workflow-status-strings","acplugins/signatures/js/utils/sign-workflow-utils","acplugins/signatures/js/models/ui/parcels-list-item-ui-model","acplugins/signatures/js/views/parcels-list-item-view","acplugins/signatures/js/views/parcel-preview-view","acplugins/signatures/js/ops/getting/getting-assets-op"],function(e,t,i,s,n,o,a,r,l,c,d){t.ParcelsListView=e.View.extend({events:{"click .signature-list-item":"_onItemClick","dblclick .signature-list-item":"_onItemDblClick","keyClick .signature-list-item":"_onItemKeyClick"},initialize:function(){e.View.prototype.initialize.call(this),this.listenTo(this.options.collectionsUiModel,"change:checkbox",_.bind(function(){this.render()},this)),this._addKeyEventListener(),this._addFocusEventListener(),this.bIsSingleClickEventWaiting=!1},findEmptyStates:function(){this.options.parcelCollection.emptyState={};for(var e=this.options.parcelCollection.emptyState,t=this.options.parcelCollection.models,i=0;i<t.length;i++){var s=d.getModernSignStatus(t[i].attributes.signature_info.state);null!=e&&e.hasOwnProperty(s)||(e[s]=!1)}},showEmptyStatePage:function(){var e=this.options.parcelCollection.leftRailFilter;$(".on-signed-in").hide(),$(".on-signed-out").show(),$(".sign-workflow-name").text(d.getUIStringFromStatusID(e)),$(".shared-on-sign-out-prompt").text(d.getPromptMsgFromStatusID(e)),$(".shared-on-sign-out-subprompt").text(d.getSubPromptMsgFromStatusID(e)),$(".shared-offline-icon").removeClass("shared-offline-signtemplate-icon"),$(".one_table").removeClass("div-nativers-table"),$(".one_row").removeClass("div-nativers-table-row"),$(".lhs_space").removeClass("div-nativers-table-col"),$(".on-signed-out").removeClass("div-nativers-table-col"),$(".on-signed-out").removeClass("div-nativers-nativers-library-template"),1==t.SignWorkflowUtil.checkIfLeftRailIDNativeRS(e)&&($(".one_table").addClass("div-nativers-table"),$(".one_row").addClass("div-nativers-table-row"),$(".lhs_space").addClass("div-nativers-table-col"),$(".on-signed-out").addClass("div-nativers-table-col")),e===o.TEMPLATES?($(".on-signed-out").addClass("div-nativers-nativers-library-template"),$(".shared-offline-icon").addClass("shared-offline-signtemplate-icon"),$(".shared-on-sign-out-button").text(l.CREATE_ESIGN_TEMPLATE),$(".shared-on-sign-out-button").show()):e===o.ALL||e===o.IN_PROGRESS?($(".shared-on-sign-out-button").text(l.REQUEST_ESIGN),$(".shared-on-sign-out-button").show()):$(".shared-on-sign-out-button").hide()},checkEmptyStatePage:function(){var e=this.options.parcelCollection.leftRailFilter,i=t.SignWorkflowUtil.checkIfLeftRailIDNativeRS(e);if("signatures"==e||!i)return!1;var s=this.options.parcelCollection.emptyState;return e==o.ALL||null!=s&&s.hasOwnProperty(e)?!1:(this.showEmptyStatePage(),!0)},render:function(){return e.View.prototype.render.call(this),this.findEmptyStates(),this._asyncSetLeftRailFilterID().then(_.bind(function(){this.checkEmptyStatePage()||(this._renderChildViews(),e.Util.isCEF()||this._updateForVerticalScrollBar())},this)),this},_asyncSetLeftRailFilterID:function(){var e=$.Deferred();return _.defer(_.bind(function(){this.options.appApi.rnaApi.done(_.bind(function(){this.options.appApi.rnaApiObj.esApi.getActiveAgreementFilter().then(_.bind(function(t){this.options.parcelCollection.leftRailFilter="",void 0!=t&&t.length>0&&(this.options.parcelCollection.leftRailFilter=t,$(".signature-workflow-name").text(this._getHeaderText(t))),e.resolve()},this))},this))},this)),e.promise()},_getHeaderText:function(e){var i=t.SignWorkflowUtil.checkIfLeftRailIDNativeRS(e);return"signatures"!=e&&i?i?d.getUIStringFromStatusID(e):e:l.AGREEMENT_HEADER},_updateForVerticalScrollBar:function(){setTimeout(_.bind(function(){this.$el.length&&this.options.collectionUiModel.set("has_vertical_scrollbar",s.isVerticalScrollBarPresent(this.$el))},this),50)},_getEventTargetItem:function(e,t){return $(e.target).closest(t)},_getEventTargetView:function(e,t){var i,s;return t||(t=".signature-list-item"),s=this._getEventTargetItem(e,t),s&&(i=this.getChildViewById(s.data("id"))),i},_getEventTargetId:function(e,t){var i,s=this._getEventTargetItem(e,t);return s&&(i=s.data("id")),i},_getViewEventOptions:function(e){return{collectionItemsView:this,itemView:this._getEventTargetView(e)}},_addKeyEventListener:function(){this.options.appApi.keyApi.pushKeyHandler(this)},_removeKeyEventListener:function(){this.options.appApi.keyApi.popKeyHandler(this)},_selectType:function(t){this._triggerViewEvent(e.ViewEvents.SELECT_ITEM,{collectionItemsView:this,selectType:t})},_onExpandClick:function(t){var i=this._getEventTargetView(t);i.onExpandButtonClick(t),e.Util.isCEF()||this._updateForVerticalScrollBar()},showParcelPreview:function(e){var s,n,r,l,c,d,h=this.options,p=h.appApi;s=p.displayApi.showFullOverlay(!0),l=this.options.appApi.baseFilesUrisApi.getSendApiUri(),l=a.extractRootUrl(l),h.parcelAssetsCollection=new i.ParcelAssetCollection([],{rootUrl:l,parcel_id:e.id,parcelModel:e}),this._parcelPreview&&this._parcelPreview.off(),n=_.extend({},h,{el:s,parcelModel:e}),r=new t.ParcelPreviewView(n),this._parcelPreview=r,r.on("ParcelPreview_Close",this._onParcelPreviewClose,this),d=t.opFactory.create("GettingAssetsOp",h),d.run().then(_.bind(function(){c=h.parcelAssetsCollection&&h.parcelAssetsCollection.length>1?o.MULTI:o.SINGLE,p.siteCatalystApi.logScEvent([o.PREVIEW,o.SHARED,c,o.SHOWN]),this.render()},r))},_handleModifiedClick:function(t){var i,s;s=t.shiftKey?e.SelectionUiModel.SELECT_EXTEND:t.ctrlKey||t.metaKey?e.SelectionUiModel.SELECT_TOGGLE:e.SelectionUiModel.SELECT_SELECT,i=this._getViewEventOptions(t),_.extend(i,{selectType:s}),this._triggerViewEvent(e.ViewEvents.SELECT_ITEM,i)},_onItemClick:function(e){this.bIsSingleClickEventWaiting=!0,setTimeout(_.bind(function(){if(1==this.bIsSingleClickEventWaiting){var t=this._getEventTargetItem(e,".parcel-list-item");this.bIsSingleClickEventWaiting=!1,this._selectItemRow(e),this._consumeEvent(e),this._scrollItemIntoView(t)}},this),500)},_onItemKeyClick:function(e){this._delayedKeyClickTimer&&clearTimeout(this._delayedKeyClickTimer),this._delayedKeyClickTimer=_.defer(_.bind(function(){var t=this._getEventTargetItem(e,".parcel-list-item");this._selectItemRow(e),this._consumeEvent(e),this._scrollItemIntoView(t)},this),e)},_onItemDblClick:function(e){this.bIsSingleClickEventWaiting=!1,this.$(".shared-workflow-list-item.selected").removeClass("selected"),this._doOpenFile(e),this.$(".shared-workflow-list-item.selected").find(".shared-list-item-row").focus(),this._consumeEvent(e)},_openSignAgreement:function(e){return this.options.esInitialized||t.opFactory.create("InitializeEchoSignOp",this.options).run(),this.options.appApi.siteCatalystApi.logScEvent([r.SIGN_FILES_HOME_VIEW,r.CLICKED]),this.options.appApi.siteCatalystApi.logVirgoFileOpenEvent(r.VIRGO_SIGN),t.opFactory.create("OpenSignAgreementOp",this.options).run({model:e})},_onSignButtonClick:function(e){var t;if(t=this._getEventTargetView(e)){var i=t.model;i&&this._openSignAgreement(i)}},_doOpenFile:function(e){var t;if(t=this._getEventTargetView(e)){var i=t.model;i&&this._openSignAgreement(i)}},_deselectAll:function(t){this._triggerViewEvent(e.ViewEvents.SELECT_ITEM,_.extend(t,{selectType:e.SelectionUiModel.SELECT_NONE}))},_selectItemRow:function(t){var i,s,n=this._getEventTargetItem(t,".signature-list-item");s=n.hasClass("selected"),i=s?e.SelectionUiModel.SELECT_TOGGLE:e.SelectionUiModel.SELECT_SELECT;var o=this._getViewEventOptions(t);_.extend(o,{selectType:i}),this._consumeEvent(t),this._triggerViewEvent(e.ViewEvents.SELECT_ITEM,o)},_onParcelPreviewClose:function(){_.defer(_.bind(function(){var e=this._parcelPreview;e.off(),this.options.appApi.displayApi.showFullOverlay(!1),delete this._parcelPreview},this))},_renderChildViews:function(){var e=this.collection.length;this._renderInProgress||(this._renderInProgress=!0,this._asyncBeginRenderingListItems().then(_.bind(this._asyncRenderListItems,this,0,e,10)).then(_.bind(this._asyncEndRenderingListItems,this)).then(_.bind(function(){this._renderInProgress=!1,this.collection.length>0&&$("#parcels-no-parcels-prompt-sign").hide()},this)))},_beginRenderingListItems:function(){var e=this.getChildViews();_.each(e,function(e){e.options.remove=!0})},_asyncBeginRenderingListItems:function(){var e=$.Deferred();return _.defer(_.bind(function(){this._beginRenderingListItems(),e.resolve()},this)),e.promise()},_endRenderingListItems:function(){var e,t,i,s=this.getChildViews(),n=this.$el.children();for(t=s.length-1;t>=0;t-=1)e=s[t],e.options.remove&&(e.$item.hasClass("selected")&&this._clearSelection(this.options),this.removeChildView(e));for(n=this.$el.children(),i=this.collection.length-1,t=n.length-1;t>i;t-=1)n.eq(t).remove();this._setTabbableItem()},_asyncEndRenderingListItems:function(){var e=$.Deferred();return _.defer(_.bind(function(){this._endRenderingListItems(),e.resolve()},this)),e.promise()},_renderSomeListItems:function(e,t){var i,s,n=this.$el.children(),o=n.length,a=e;this.collection.each(function(r,l){l>=e&&t>l&&(i=this._getChildItemView(r),s=o>a?n.eq(a):void 0,i.render(s,a),delete i.options.remove,a+=1)},this)},_asyncRenderSomeListItems:function(e,t){var i,s=$.Deferred();return i=_.bind(function(e,t){this._renderSomeListItems(e,t),s.resolve()},this,e,t),i(),s.promise()},_asyncRenderListItems:function(e,t,i){return t>e?this._asyncRenderSomeListItems(e,e+i).then(_.bind(this._asyncRenderListItems,this,e+i,t,i)):this._getResolvedPromise()},_getChildItemView:function(e){var i,s,n=this.options,o=e.id,a=this.$el;return i=this.getChildViewById(o),i?(i.$el!==a&&i.setElement(a),_.extend(i.model.attributes,e.attributes),i.options.checkbox=n.collectionsUiModel.get("checkbox")):(s=new t.ParcelsListItemUiModel,n=_.extend({},n,{el:a,checkbox:n.collectionsUiModel.get("checkbox"),model:e,itemUiModel:s}),i=new t.ParcelsListItemView(n),this.addChildView(i,o)),i},_getContainingItem:function(e){return e.closest(".signature-list-item")},_getContainingRowOrRowGroup:function(e){return e.closest(".signature-list-item-row")},_isItemSelected:function(e){return this._getContainingItem(e).hasClass("selected")},_logScSelectionEvent:function(e,t){var i;i=this._isItemSelected(e),i!==t&&this.options.appApi.siteCatalystApi.logScEvent([o.FILE_LIST,o.SENT_FILES,o.FILE_NAME,i?o.CHECKED:o.UNCHECKED])},_getChildViewHeight:function(){var e=this.$el.children();return e.length>0?n.getFullHeight(e.eq(0)):void 0},_getChildViewWidth:function(){var e=this.$el.children();return e.length>0?n.getFullWidth(e.eq(0)):void 0},_isListView:function(){return this.options.collectionsUiModel.isListView()},_isThumbnailView:function(){return this.options.collectionsUiModel.isThumbnailView()},_scrollItemIntoView:function(e){function t(e){i.stop(!0,!0),i.animate({scrollTop:e},l.get("scroll_duration"))}var i,s,n,o,a,r,l=this.options.collectionsUiModel;e.length&&(i=this.$el,s=e.position().top,n=e.height(),o=i.height(),this._isMouseWheel||(0>s||s+n>o)&&(a=i.scrollTop(),r=s-(o-n)/2,t(Math.max(a+r,0))))},_onFocusIn:function(e){var t,i,s,n=$(e.target);return t=this.$(".signature-list-item-row"),i=this._getContainingRowOrRowGroup(n),s=t.index(i),this._lastActiveRowIndex===s&&this._consumeEvent(e),0===i.length?!0:(t.attr("tabindex",-1),i.hasClass("focused")||(i.addClass("focused").attr("tabindex",0),n.attr("tabindex",0)),this._lastActiveRowIndex!=t.index(i)&&(this._lastActiveRowIndex=t.index(i)),this._consumeEvent(e),this.$el.scrollLeft(0),!0)},_onFocusOut:function(e){var t,i=$(e.target);return t=this._getContainingRowOrRowGroup(i),t.removeClass("focused").find("[role=checkbox]:tabbable, button:tabbable, a[href]:tabbable, [role=link]:tabbable").attr("tabindex",-1),!0},_setTabbableItem:function(){var e=this.$(".signature-list-item-row:focusable"),t=this.$(":tabbable");0===t.length&&e.attr("tabindex","0")},_getNextFocusableIndexForThumbnailView:function(e,t,i,s){var n=t,o=e.width()/$(".shared-thumb-view .signature-list-item").outerWidth(!0)|0,a=Math.ceil(i/o),r=t/o|0,l=t%o;switch(s){case 39:t!=i-1&&(n=t+1);break;case 37:0!=t&&(n=t-1);break;case 38:0!=r&&(n=o*(r-1)+l);break;case 40:r!=a-1&&(n=o*(r+1)+l)}return n>i-1&&(n=t),n},_onKeyDown:function(t){function i(e){r.stop(!0,!0),r.animate({scrollTop:e},A.get("scroll_duration"))}var n,o,a=$(t.target),r=this.$el,l=r[0],c=this.options,d=c.appApi.selectionApi,h=t.which,p=r.height(),u=r.width(),_=r?r.scrollTop():0,g=this._getChildViewHeight(),S=this._getChildViewWidth(),m=0,E=0===g?0:Math.floor(p/g),f=0===S?0:Math.floor(u/S),v=!1,A=this.options.collectionsUiModel,w=this.options.selectionUiModel,C=this.$(".signature-list-item-row"),I=this._getContainingRowOrRowGroup(a),T=I.find(".list-item-checkbox"),R=C.first(),O=C.last(),b=r.find(":tabbable").first(),N=a.is(I),y=!I.is(a),L=a.is("a[href], [role=link]"),P=a.is(".signature-list-item-expand-hitarea,.signature-list-item-expand-btn"),M=C.index(I),D=($.Event("click"),$.Event("dblclick")),F=$.Event("keyClick"),U=s.descendantHasFocus(".signature-parcels-content"),V=s.descendantHasFocus(r),k=!V&&U,x=!1,j=I.hasClass("expanded"),G=I.find(".signature-list-item-files"),H=this._isListView(),B=this._isThumbnailView(),W=!1,Y=a.is("body")&&x?!0:!1;if(g&&(H?m=E:B&&(m=E*f)),s.isElementHidden(r))return v;if(a.is(":focusable")&&!U)return v;switch(c=this._getViewEventOptions(t),F.shiftKey=t.shiftKey,h){case 9:if(0===w.getNumSelectedItems()&&N);else if(this._setTabbableItem(),k){var z=$(".signature-list-header-info-container").find(":tabbable"),K=z.index(a);K==z.length-1&&(o=0===w.getNumSelectedItems()?R:b?b:R,W=!0)}else Y&&(o=b?b:R);break;case 32:V&&(L?(a.trigger(D),v=!0):P?a.hasClass("signature-list-item-row")&&(a.trigger(F),v=!0):((t.shiftKey?I:T).trigger(F),v=!0));break;case 13:V&&(e.Util.isCEF()?(1===w.getNumSelectedItems()&&(n=w.getSingleSelectedItemModel(),this._openSignAgreement(n)),this._consumeEvent(t)):(a.trigger(F),v=!0));break;case 27:!e.Util.isCEF()||d.isRunningInFileSelection()||this.options.isInSearchResultsView&&!w.isItemSelected()||(this._deselectAll(c),v=!0);break;case 33:V?o=C.eq(Math.max(0,M-m)):(i(_-p),v=!0);break;case 34:V?o=C.eq(Math.min(C.length-1,M+m)):(i(_+p),v=!0);break;case 35:i(l.scrollHeight),v=!0,I.is(O)||(o=O);break;case 36:i(0),v=!0,I.is(R)||(o=R);break;case 37:case 39:V&&(x=37===h,B?(j&&y&&(o=s.getNextFocusableDescendant(G,!0)),o&&o.length||(y?o=I:N&&(o=C.eq(this._getNextFocusableIndexForThumbnailView(r,M,C.length,h)),W=!0,o&&o.hasClass("expanded")&&(o=o.find(":focusable:last"))))):(t.ctrlKey||t.metaKey)&&I.is("[aria-expanded]")?(j&&x||!j&&!x)&&(I.find("button").trigger(F),v=!0):a.hasClass("signature-list-item-file-name")||(o=s.getNextFocusableDescendant(I,x,!0,":not(.signature-list-item-file-name)")));break;case 38:V?(j&&y&&(o=s.getNextFocusableDescendant(G,!0)),o&&o.length||(y?o=I:N&&(B?(o=C.eq(this._getNextFocusableIndexForThumbnailView(r,M,C.length,h)),W=!0):M>0&&(o=C.eq(M-1),W=!0),o&&o.hasClass("expanded")&&(o=o.find(":focusable:last"))))):g&&!k&&(i(_-g),v=!0);break;case 40:V?(j&&(o=s.getNextFocusableDescendant(G)),o&&o.length||(B?(o=C.eq(this._getNextFocusableIndexForThumbnailView(r,M,C.length,h)),W=!0):M<C.length-1&&(o=C.eq(M+1),W=!0))):g&&!k&&(i(_+g),v=!0);break;case 65:(t.ctrlKey||t.metaKey)&&(t.shiftKey?this._clearSelection(c):this._selectAll(c),this._consumeEvent(t),v=!0);break;case 68:break;case 127:case 46:}return o&&o.length>0&&(v=!0,this._isItemSelected(I)&&t.shiftKey?o.trigger(F):1!=W||o.parent().hasClass("selected")||(this.$(".shared-workflow-list-item.selected").removeClass("selected"),o.trigger(F)),o.focus()),v},_selectAll:function(t){_.extend(t,{selectType:e.SelectionUiModel.SELECT_ALL}),this._triggerViewEvent(e.ViewEvents.SELECT_ITEM,t)},_clearSelection:function(t){this._triggerViewEvent(e.ViewEvents.CLEAR_SELECTION,t)},_deleteIfSelected:function(){var e,i=this.options;return e=i.selectionUiModel.getNumSelectedItems()>0,e&&this._triggerViewEvent(t.ViewEvents.DELETE,{parentView:this}),e}})}),define("acplugins/signatures/js/templates/parcels-list-header-template.html",[],function(){return'<div role="columnheader">    <div role="checkbox"         class="list-header-checkbox hidden"         title="<%=SELECT_ALL%>"         tabindex="0"></div></div><div role="presentation" class="agreement-list-header-info-container">   <div role="columnheader" class="parcel-list-header-name shared-workflow-files-header-column name">       <button class="shared-workflow-files-header-column-title parcel-list-header-name-title workflow-files-header-column-sort-text-theme name" aria-label="<%= NAME_T %>" title="<%= NAME_T %>" tabindex="0" ></button>       <div class="parcel-list-header-name-sort virgo-sort descending shared-workflow-files-header-column-sort name" tabindex="0"></div>   </div>   <div role="columnheader" class="parcel-list-header-modified shared-workflow-files-header-column create_date">       <button class="shared-workflow-files-header-column-title parcel-list-header-modified-title workflow-files-header-column-sort-text-theme create_date"  aria-label="<%= MODIFIED_DATE_T %>" title="<%= MODIFIED_DATE_T %>" tabindex="0"></button>       <div class="parcel-list-header-modified-sort virgo-sort descending shared-workflow-files-header-column-sort create_date" tabindex="0"></div>   </div>   <div role="columnheader" class="parcel-list-header-sender shared-workflow-files-header-column initiator">       <button class="shared-workflow-files-header-column-title parcel-list-header-sender-title workflow-files-header-column-sort-text-theme initiator"  aria-label="<%= SENDER_T %>" title="<%= SENDER_T%>" tabindex="0"></button>       <div class="parcel-list-header-sender-sort virgo-sort descending shared-workflow-files-header-column-sort initiator" tabindex="0"></div>   </div>   <div role="columnheader" class="parcel-list-header-status shared-workflow-files-header-column status">       <button class="shared-workflow-files-header-column-title parcel-list-header-status-title workflow-files-header-column-sort-text-theme status"  title="<%= STATUS_T%>" aria-label="<%= STATUS_T%>"></button>       <div class="parcel-list-header-status-sort virgo-sort descending shared-workflow-files-header-column-sort status" tabindex="0"></div>   </div>   <div class="sign-files-sort-menu shared-files-sort-menu menu ui-theme dropdown-background-theme dropdown-border-theme" role="menu">           <div class="shared-files-sort-menu-title cb-text-theme"><%= SORT_BY %></div>           <div class="shared-files-sort-menu-items drop-down-text-theme theme-list-item-row name"  aria-label="<%= NAME %>" title="<%= NAME %>" tabindex="-1">               <div class="shared-files-sort-menu-name"><%= NAME %></div>               <div class="shared-files-sort-menu-items-tick-icon name-tick-icon"></div>           </div>           <div class="shared-files-sort-menu-items drop-down-text-theme theme-list-item-row create_date"  aria-label="<%= CREATE_DATE %>" title="<%= CREATE_DATE %>" tabindex="-1">               <div class="shared-files-sort-menu-name"><%= CREATE_DATE %></div>               <div class="shared-files-sort-menu-items-tick-icon create-date-tick-icon"></div>           </div>           <div class="shared-files-sort-menu-items drop-down-text-theme theme-list-item-row initiator"  aria-label="<%= SENDER %>" title="<%= SENDER %>" tabindex="-1">               <div class="shared-files-sort-menu-name"><%= SENDER %></div>               <div class="shared-files-sort-menu-items-tick-icon initiator-tick-icon"></div>           </div>           <div class="shared-files-sort-menu-items drop-down-text-theme theme-list-item-row status"  aria-label="<%= STATUS %>" title="<%= STATUS %>" tabindex="-1">               <div class="shared-files-sort-menu-name"><%= STATUS %></div>               <div class="shared-files-sort-menu-items-tick-icon status-tick-icon"></div>           </div>    </div></div>'}),define("acplugins/signatures/js/views/parcels-list-header-view",["core/ac-core","acplugins/signatures/js/ac-signature","acplugins/signatures/js/templates/parcels-list-header-template.html","i18n!acplugins/signatures/js/nls/ui-strings","core/utils/truncate","core/utils/view-util","acplugins/signatures/js/utils/sc-constants","core/models/workflow-status-strings","i18n!core/nls/ui-strings","core/utils/event-util","core/utils/sc-analytics"],function(e,t,i,s,n,o,a,r,l,c,d){t.ParcelsListHeaderView=e.View.extend({events:{"click .list-header-checkbox":"_onCheckboxClick","click .agreement-list-header-info-container":"_onHeaderClick","click .sign-files-sort-menu":"_onSortMenuClick","dblclick .agreement-list-header-info-container":"_onHeaderClick","dblclick .sign-files-sort-menu":"_onSortMenuClick"},_addMenuEventListeners:function(){c.addDomEventListener(document.body,"click",this._onBodyClick,!0)},initialize:function(){e.View.prototype.initialize.call(this),this._addKeyEventListener(),this._addKeyEventListener(),this._addUiModelEventListeners(),this._addMenuEventListeners()},_onBodyClick:function(e){var t=$(e.target);t.hasClass("shared-workflow-files-header-column-title")||this._hideSortMenu()},_hideSortMenu:function(){this.$sortMenu.hide(),this.$nameTitle.removeClass("selected"),this.$modifiedTitle.removeClass("selected"),this.$senderTitle.removeClass("selected"),this.$statusTitle.removeClass("selected")},render:function(){var t,n,o=this.$el;return e.View.prototype.render.call(this),0===o.children().length&&(o.html(_.template(i)({SELECT_ALL:s.SELECT_ALL,SORT_BY:l.SORT_BY,NAME:l.NAME_S,SENDER:l.SENDER_S,CREATE_DATE:l.SENT_RECIEVED_S,STATUS:l.STATUS_S,MODIFIED_DATE_T:s.MODIFIED,NAME_T:s.FILE_NAME,SENDER_T:s.SENDER,STATUS_T:s.STATUS})),this._initWrappers()),e.Util.isCEF()?(this.$statusTitle.text(s.STATUS),this.$status.css("background-image","none").css("background-position",0),this.$modified.addClass("desktop"),this.$status.addClass("desktop")):this.$status.addClass("web"),t=this.options.collectionUiModel,t.get("has_vertical_scrollbar")?(n=this._getScrollBarWidth(),this.$header.css({right:n+"px"})):this.$header.css({right:0}),this._updateCheckbox(),this.$nameTitle.text(s.FILE_NAME),this.$modifiedTitle.text(s.MODIFIED),this.$senderTitle.text(s.SENDER),this.$people.text(s.PEOPLE),this.$statusTitle.text(s.VIEWS),this._updateFields(),this._adjustLayout(),this},_initWrappers:function(){this.$checkbox=this.$(".list-header-checkbox"),this.$header=this.$(".agreement-list-header-info-container"),this.$name=this.$(".parcel-list-header-name"),this.$status=this.$(".parcel-list-header-status"),this.$modified=this.$(".parcel-list-header-modified"),this.$sender=this.$(".parcel-list-header-sender"),this.$nameTitle=this.$(".parcel-list-header-name-title"),this.$statusTitle=this.$(".parcel-list-header-status-title"),this.$modifiedTitle=this.$(".parcel-list-header-modified-title"),this.$senderTitle=this.$(".parcel-list-header-sender-title"),this.$nameSort=this.$(".parcel-list-header-name-sort"),this.$statusSort=this.$(".parcel-list-header-status-sort"),this.$modifiedSort=this.$(".parcel-list-header-modified-sort"),this.$senderSort=this.$(".parcel-list-header-sender-sort"),this.$people=this.$(".parcel-list-header-people"),this.$sortMenu=this.$(".sign-files-sort-menu")},_onSortMenuClick:function(e){var t=$(e.target);t.hasClass("shared-files-sort-menu-items")&&(this.$sortMenu.hide(),this._sortOnColumn(t)),this._consumeEvent(e)},_onHeaderClick:function(e){var t=$(e.target);!this.options.isInSearchResultsView&&t.hasClass("shared-workflow-files-header-column-title")&&t.hasClass("currently_sorted")?t.hasClass("selected")?(t.removeClass("selected"),this.$sortMenu.hide()):(t.addClass("selected"),this.$sortMenu.show(),t.hasClass("status")&&"list"==this.options.collectionsUiModel.get("view")?this.$sortMenu.css("left",t.parent().position().left+t.outerWidth()-this.$sortMenu.width()):this.$sortMenu.css("left",t.parent().position().left)):(t.hasClass("shared-workflow-files-header-column-title")||t.hasClass("shared-workflow-files-header-column-sort"))&&(this.$sortMenu.hide(),this._sortOnColumn(t)),this._consumeEvent(e)},_getLogColumnName:function(e){var t="";switch(e){case r.CREATE_DATE:t=d.VIRGO_SORT_DATE_SENT;break;case r.INITIATOR:t=d.VIRGO_SORT_SENDER;break;case r.FILENAME:t=d.VIRGO_SORT_FILENAME;break;case r.STATUS:t=d.VIRGO_SORT_STATUS}return t},_sortOnColumn:function(e){var t="",i=r.DESC;e.hasClass("create_date")?t=r.CREATE_DATE:e.hasClass("initiator")?t=r.INITIATOR:e.hasClass("name")?t=r.FILENAME:e.hasClass("status")&&(t=r.STATUS),i=e.hasClass("shared-workflow-files-header-column-sort")&&e.hasClass("descending")?r.ASC:r.DESC,this.options.appApi.siteCatalystApi.logVirgoSortEvent(d.VIRGO_SIGN,this._getLogColumnName(t),i==r.DESC),this.options.collectionsUiModel.trigger("SortItems",{sort_key:t,sort_order:i})},_updateFields:function(){this.$nameSort.hide(),this.$nameTitle.removeClass("currently_sorted selected"),this.$statusSort.hide(),this.$statusTitle.removeClass("currently_sorted selected"),this.$modifiedSort.hide(),this.$modifiedTitle.removeClass("currently_sorted selected"),this.$senderSort.hide(),this.$senderTitle.removeClass("currently_sorted selected"),this.$sortMenu.hide(),this.$(".shared-files-sort-menu-items.create_date").removeClass("selected"),this.$(".shared-files-sort-menu-items.initiator").removeClass("selected"),this.$(".shared-files-sort-menu-items.name").removeClass("selected"),this.$(".shared-files-sort-menu-items.status").removeClass("selected"),this.$(".shared-files-sort-menu-name").css("width","100%"),this.$(".name-tick-icon").hide(),this.$(".create-date-tick-icon").hide(),this.$(".initiator-tick-icon").hide(),this.$(".status-tick-icon").hide();var e=this.options.collectionsUiModel;e.get("sort_key")==r.CREATE_DATE?(this.$modifiedSort.show(),this.$modifiedTitle.addClass("currently_sorted"),e.get("sort_order")==r.DESC?(this.$modifiedSort.addClass("descending"),this.$modifiedSort.attr("aria-label",s.DESCENDING),this.$modifiedSort.attr("title",s.DESCENDING)):(this.$modifiedSort.removeClass("descending"),this.$modifiedSort.attr("aria-label",s.ASCENDING),this.$modifiedSort.attr("title",s.ASCENDING)),this.$(".shared-files-sort-menu-items.create_date").addClass("selected"),this.$(".shared-files-sort-menu-items.create_date").find(".shared-files-sort-menu-name").css("width","90%"),this.$(".create-date-tick-icon").show()):e.get("sort_key")==r.INITIATOR?(this.$senderSort.show(),this.$senderTitle.addClass("currently_sorted"),e.get("sort_order")==r.DESC?(this.$senderSort.addClass("descending"),this.$senderSort.attr("aria-label",s.DESCENDING),this.$senderSort.attr("title",s.DESCENDING)):(this.$senderSort.removeClass("descending"),this.$senderSort.attr("aria-label",s.ASCENDING),this.$senderSort.attr("title",s.ASCENDING)),this.$(".shared-files-sort-menu-items.initiator").addClass("selected"),this.$(".shared-files-sort-menu-items.initiator").find(".shared-files-sort-menu-name").css("width","90%"),this.$(".initiator-tick-icon").show()):e.get("sort_key")==r.FILENAME?(this.$nameSort.show(),this.$nameTitle.addClass("currently_sorted"),e.get("sort_order")==r.DESC?(this.$nameSort.addClass("descending"),this.$nameSort.attr("aria-label",s.DESCENDING),this.$nameSort.attr("title",s.DESCENDING)):(this.$nameSort.removeClass("descending"),this.$nameSort.attr("aria-label",s.ASCENDING),this.$nameSort.attr("title",s.ASCENDING)),this.$(".shared-files-sort-menu-items.name").addClass("selected"),this.$(".shared-files-sort-menu-items.name").find(".shared-files-sort-menu-name").css("width","90%"),this.$(".name-tick-icon").show()):e.get("sort_key")==r.STATUS&&(this.$statusSort.show(),this.$statusTitle.addClass("currently_sorted"),e.get("sort_order")==r.DESC?(this.$statusSort.addClass("descending"),this.$statusSort.attr("aria-label",s.DESCENDING),this.$statusSort.attr("title",s.DESCENDING)):(this.$statusSort.removeClass("descending"),this.$statusSort.attr("aria-label",s.ASCENDING),this.$statusSort.attr("title",s.ASCENDING)),this.$(".shared-files-sort-menu-items.status").addClass("selected"),this.$(".shared-files-sort-menu-items.status").find(".shared-files-sort-menu-name").css("width","90%"),this.$(".status-tick-icon").show())},_isItemSelectable:function(){return!0},_getNumSelectable:function(){var e=0;return this.options.collection.each(_.bind(function(t){this._isItemSelectable(t)&&(e+=1)},this)),e},_getNumSelected:function(){return this.options.selectionUiModel.getSelectionCount()},_getScrollBarWidth:function(){var e=this._scrollBarWidth;return void 0===e&&(e=o.getScrollBarWidth(),this._scrollBarWidth=e),e},_updateCheckbox:function(){var e=this.$checkbox,t=this.options,i=t.selectionUiModel.getSelectionCount();if(i>0){if(i===this._getNumSelectable())return void e.addClass("selected")}else e.removeClass("selected")},_onCheckboxClick:function(){this._getNumSelected()>0?this._triggerViewEvent(e.ViewEvents.CLEAR_SELECTION):(this.options.collection.length>0&&this.options.appApi.siteCatalystApi.logScEvent([a.FILE_LIST,a.SENT_FILES,a.ACTION,a.SELECT_ALL]),this._triggerViewEvent(e.ViewEvents.SELECT_ITEM,_.extend({},this.options,{selectType:e.SelectionUiModel.SELECT_ALL})))},getCurrentSortedColumn:function(){var e,t=this.$sortMenu.find(".selected");return t.length&&(t.hasClass("name")?e=this.$nameTitle:t.hasClass("create_date")?e=this.$modifiedTitle:t.hasClass("initiator")?e=this.$senderTitle:t.hasClass("status")&&(e=this.$statusTitle)),e
},_onKeyDown:function(e){var t,i=!1,s=$(e.target);if(!o.descendantHasFocus(this.$el))return i;switch(e.which){case 9:o.isElementDisplayed(this.$sortMenu)&&this._hideSortMenu(),t=o.getNextFocusableDescendant(this.$header,e.shiftKey);break;case 27:o.isElementDisplayed(this.$sortMenu)&&(this._hideSortMenu(),i=!0);break;case 13:case 32:s.click(),s.hasClass("shared-files-sort-menu-items")&&(t=this.getCurrentSortedColumn()),i=!0;break;case 37:case 39:i=!0;break;case 38:case 40:o.isElementDisplayed(this.$sortMenu)&&(t=o.getNextFocusableDescendant(this.$sortMenu,e.shiftKey,!0)),i=!0}return t&&t.length>0&&(t.focus(),i=!0),i},_addUiModelEventListeners:function(){var e=this.options;e.collectionUiModel.on("change:has_vertical_scrollbar",this._onHasVerticalScrollbarChange),e.collectionsUiModel.on("change:checkbox",this.render),e.selectionUiModel.on("change:selected_item_models",this._updateCheckbox),this.listenTo(this.options.collectionsUiModel,"change:rhpShown",this._adjustLayout),this.listenTo(e.collectionsUiModel,"change:view",this._adjustLayout),this.options.appApi.windowApi.addWindowResizeCallback(_.bind(this._adjustLayout))},_onHasVerticalScrollbarChange:function(){this.render()},_updateVisibilityOfColumns:function(e,t){var i=t.colMargin,s=this.$name.position().left,n=t.totalVisibleCols,o=e-s,a=o-i*n,r=t.totalFluidCols,l=a/r;if(1==t.name.visibility){var c=t.name.end-t.name.start+1;this.$name.css("width",l*c+"px"),this.$name.css("margin-right",i+"px"),this.$name.show(),this.$nameSort.css("left",this.$nameTitle.outerWidth()),this.$nameTitle.hasClass("currently_sorted")&&this.$sortMenu.css("left",this.$name.position().left)}else this.$name.hide();if(1==t.modified.visibility){var c=t.modified.end-t.modified.start+1,d=t.modified.colNumber;this.$modified.css("left",s+l*(t.modified.start-1)+i*d+"px"),this.$modified.css("width",l*c+"px"),this.$modified.css("margin-right",i+"px"),this.$modified.show(),this.$modifiedSort.css("left",this.$modifiedTitle.outerWidth()),this.$modifiedTitle.hasClass("currently_sorted")&&this.$sortMenu.css("left",this.$modified.position().left)}else this.$modified.hide();if(1==t.sender.visibility){var c=t.sender.end-t.sender.start+1,d=t.sender.colNumber;this.$sender.css("left",s+l*(t.sender.start-1)+i*d+"px"),this.$sender.css("width",l*c+"px"),this.$sender.css("margin-right",i+"px"),this.$sender.show(),this.$senderSort.css("left",this.$senderTitle.outerWidth()),this.$senderTitle.hasClass("currently_sorted")&&this.$sortMenu.css("left",this.$sender.position().left)}else this.$sender.hide();if(1==t.status.visibility){var c=t.status.end-t.status.start+1,d=t.status.colNumber;this.$status.css("left",s+l*(t.status.start-1)+i*d+"px"),this.$status.css("width",l*c+"px"),this.$status.css("margin-right",i+"px"),this.$status.show(),this.$statusSort.css("left",this.$statusTitle.outerWidth()),this.$statusTitle.hasClass("currently_sorted")&&this.$sortMenu.css("left",this.$statusTitle.parent().position().left+this.$statusTitle.outerWidth()-this.$sortMenu.width())}else this.$status.hide()},_adjustLayout:function(){var e=this.options.collectionsUiModel.get("view");if(this.$name.removeAttr("style"),this.$modified.removeAttr("style"),this.$sender.removeAttr("style"),this.$status.removeAttr("style"),"list"==e){var t=this.$header.width();this.$el.hasClass("sticky-search-header")&&(this.$el.removeClass("sticky-search-header"),t=this.$header.width(),this.$el.addClass("sticky-search-header")),100>=t?this._updateVisibilityOfColumns(t,{name:{visibility:!1},modified:{visibility:!1},sender:{visibility:!1},status:{visibility:!1},totalFluidCols:0,totalVisibleCols:0,colMargin:24}):t>100&&300>=t?this._updateVisibilityOfColumns(t,{name:{visibility:!0,colNumber:0,start:1,end:1},modified:{visibility:!1},sender:{visibility:!1},status:{visibility:!1},totalFluidCols:1,totalVisibleCols:1,colMargin:24}):t>300&&500>=t?this._updateVisibilityOfColumns(t,{name:{visibility:!0,colNumber:0,start:1,end:3},modified:{visibility:!1},sender:{visibility:!1},status:{visibility:!0,colNumber:1,start:4,end:5},totalFluidCols:5,totalVisibleCols:2,colMargin:24}):t>500&&700>=t?this._updateVisibilityOfColumns(t,{name:{visibility:!0,colNumber:0,start:1,end:3},modified:{visibility:!1},sender:{visibility:!0,colNumber:1,start:4,end:5},status:{visibility:!0,colNumber:2,start:6,end:7},totalFluidCols:7,totalVisibleCols:3,colMargin:32}):this._updateVisibilityOfColumns(t,{name:{visibility:!0,colNumber:0,start:1,end:3},modified:{visibility:!0,colNumber:1,start:4,end:5},sender:{visibility:!0,colNumber:2,start:6,end:7},status:{visibility:!0,colNumber:3,start:8,end:9},totalFluidCols:9,totalVisibleCols:4,colMargin:32})}else this.$nameTitle.hasClass("currently_sorted")?(this.$name.show(),this.$name.css("left","0px"),this.$name.css("width",this.$header.width()),this.$sortMenu.css("left",this.$name.position().left),this.$nameSort.css("left",this.$nameTitle.outerWidth())):this.$name.hide(),this.$modifiedTitle.hasClass("currently_sorted")?(this.$modified.show(),this.$modified.css("left","0px"),this.$modified.css("width",this.$header.width()),this.$sortMenu.css("left",this.$modified.position().left),this.$modifiedSort.css("left",this.$modifiedTitle.outerWidth())):this.$modified.hide(),this.$senderTitle.hasClass("currently_sorted")?(this.$sender.show(),this.$sender.css("left","0px"),this.$sender.css("width",this.$header.width()),this.$sortMenu.css("left",this.$sender.position().left),this.$senderSort.css("left",this.$senderTitle.outerWidth())):this.$sender.hide(),this.$statusTitle.hasClass("currently_sorted")?(this.$status.show(),this.$status.css("left","0px"),this.$status.css("width",this.$header.width()),this.$sortMenu.css("left",this.$status.position().left),this.$statusSort.css("left",this.$statusTitle.outerWidth())):this.$status.hide()}})}),define("acplugins/signatures/js/views/parcels-collection-view",["core/ac-core","acplugins/signatures/js/ac-signature","acplugins/uss-search/js/ac-uss-search","acplugins/signatures/js/templates/parcels-collection-template.html","core/utils/view-util","core/models/workflow-status-strings","i18n!acplugins/signatures/js/nls/ui-strings","acplugins/signatures/js/views/parcels-list-view","acplugins/signatures/js/views/parcels-list-header-view"],function(e,t,i,s,n,o){t.ParcelsCollectionView=e.View.extend({initialize:function(){e.View.prototype.initialize.call(this),this._template=_.template(s),this._addUiModelEventListeners(),this._addKeyEventListener(),this._addCollectionEventListeners()},render:function(){var t=this.$el,i=this.options,s=i.appApi.pluginsApi,n=i.pluginId;return e.View.prototype.render.call(this),0===t.children().length&&(t.html(this._template({pluginSelectorId:s.getPluginSelectorId(n)})),this._initWrappers()),this.options.collectionsUiModel.set("windowSize",this.$items.width()),this._renderChildViews(),this._onViewChange(this.options.collectionsUiModel),this},_initWrappers:function(){this.$header=this.$(".agreement-header"),this.$selectionActions=this.$(".selection-actions"),this.$items=this.$(".signature-collection-items"),this.options.isInSearchResultsView?(this.$items.addClass("uss-search-active"),this.$header.addClass("uss-search-active"),this.$search_content=$(".search-views-content"),this.$search_content.scroll(this._onScrollSearchResults),this._StickyHeaderTop=$(".search-results-header").outerHeight(!0)+this.$header.outerHeight(!0),this._contentBottom=this._StickyHeaderTop+this.$search_content.outerHeight(!0)):this.$items.on("scroll",this._onItemScroll)},_onItemScroll:function(){var t=this.$items,i=this.options.parcelCollection.length,s=this.options.parcelCollection.getNumberOfItems();e.Util.isMac()&&this._renderHeaderView(),2*t.height()+t.scrollTop()>t.prop("scrollHeight")&&s>i&&this.options.appApi.rnaApi.done(_.bind(function(e){e.rnaFileAPI.getWorkflowData(o.SIGN,i).done(_.bind(function(e){e.WorkflowData.length&&this.options.parcelCollection.length===e.dataRange.from&&this.options.parcelCollection.add(e.WorkflowData,{silent:!0,merge:!0,sort:!1}),this.render()},this))},this))},_onScrollSearchResults:function(){if(this.$el.is(":visible")){var e=this.$items.offset().top,t=this.$items.offset().top+this.$items.outerHeight(!0);if(this._StickyHeaderTop>e&&this._StickyHeaderTop<t){if(this.$header.hasClass("sticky-search-header")||this.$header.addClass("sticky-search-header"),this.$search_content.hasClass("with-sticky-search-header")||this.$search_content.addClass("with-sticky-search-header"),this.options.selectionUiModel.getNumSelectedItems()?this.$header.addClass("active-context-board"):this.$header.removeClass("active-context-board"),t<this._contentBottom&&this.collection.length<this.options.searchModel.getSearchResultCount()){var s=this.options;_.extend(s,{startIndex:this.collection.length,search_scope:["sign"],noSearchReset:!0}),this.options.appApi.displayApi.showSpinner(!0),i.opFactory.create("EchoSignFilesSearchOp",s).run().always(_.bind(function(){this.options.appApi.displayApi.showSpinner(!1)},this))}}else this.$header.hasClass("sticky-search-header")&&this.$header.removeClass("sticky-search-header"),this.$search_content.hasClass("with-sticky-search-header")&&this.$search_content.removeClass("with-sticky-search-header")}},_renderChildViews:function(){this._renderItemsView(),this._renderHeaderView()},_renderItemsView:function(){this._renderChildView("_itemsView",t.ParcelsListView,this.$items)},_renderHeaderView:function(){this._renderChildView("_headerView",t.ParcelsListHeaderView,this.$header,{collectionItemsView:this._itemsView})},_renderSelectionActionsView:function(){this._renderChildView("_selectionActionsView",t.SelectionActionsView,this.$selectionActions)},_setFocusToChildView:function(e,t){var i=t?"[role=checkbox]:focusable":":tabbable:first",s=e.find(i);return s.length?(s.focus(),!0):!1},_onKeyDown:function(e){var t=!1;switch(e.which){case 38:n.descendantHasFocus(this.$items)&&(this.setFocusToHeaderView(!0)||this.setFocusToSelectionActionsView(),t=!0);break;case 40:(n.descendantHasFocus(this.$header)||n.descendantHasFocus(this.$selectionActions))&&(this.setFocusToCollectionItemsView(),t=!0)}return t&&this._consumeEvent(e),t},setFocusToHeaderView:function(e){var t=this._setFocusToChildView(this.$header,e);return t},setFocusToSelectionActionsView:function(e){var t=this._setFocusToChildView(this.$selectionActions,e);return t},setFocusToCollectionItemsView:function(){var e=this._setFocusToChildView(this.$items);return e},_correctFocusOnSelectionChange:function(t,i){var s=this.$header,n=s.find("[role=checkbox]"),o=this.$selectionActions,a=!1,r=!1;t&&(a=t.is(s),r=t.is(o)),a&&i.selectType===e.SelectionUiModel.SELECT_ALL?this.setFocusToSelectionActionsView(!0):r&&(n.is(":focusable")?this.setFocusToHeaderView(!0):this.setFocusToCollectionItemsView())},_hideOrShowHeaderCheckbox:function(){var t=this.$header.find("[role=checkbox]"),i=this.$selectionActions;i.hasClass("open")||e.Util.isCEF()?t.hide():t.show()},_addCollectionEventListeners:function(){var e,t,i=this.options,s=i.collectionsUiModel,n=i.collectionUiModel,o=this.collection;e=s.get("debounced_render_delay"),t=_.debounce(_.bind(function(){this.invalidateViewsRecursively(),this.render(),n.set("show_empty",0===o.length)},this),e),o.on("add change remove sort reset",function(){t()})},_onViewEvent:function(t,i){switch(t){case e.ViewEvents.SELECT_ITEM:this._onSelectItem(i);break;case e.ViewEvents.CLEAR_SELECTION:this._onClearSelection(i)}e.View.prototype._onViewEvent.call(this,t,i)},_onSelectItem:function(e){var t,i=n.descendantHasFocus(this.$header),s=n.descendantHasFocus(this.$selectionActions);i?t=this.$header:s&&(t=this.$selectionActions),_.delay(this._correctFocusOnSelectionChange,this.options.collectionsUiModel.get("scroll_render_delay"),t,e)},_onClearSelection:function(e){this._onSelectItem(e)},_addUiModelEventListeners:function(){var e=this.options;this.listenTo(e.collectionsUiModel,"change:view",this._onViewChange)},_setHeaderVisibility:function(){this.options.collection&&(0==this.options.collection.length?this.$header.hide():this.$header.show())},_onViewChange:function(e){var t=e.get("view");"list"==t?(this.$items.removeClass("shared-thumb-view"),this._setHeaderVisibility()):"thumbnail"==t&&(this.$items.addClass("shared-thumb-view"),this._setHeaderVisibility())}})}),define("acplugins/signatures/js/templates/no-parcels-collection-template.html",[],function(){return'<div id="parcels-no-parcels-prompt-sign" class="shared-no-parcels shown"><div class="shared-empty-state-icon signature-empty-state-icon"></div><div class="shared-on-sign-out-prompt theme-text"><%= NO_PARCELS_SIGN_PROMPT %></div><div class="shared-on-sign-out-subprompt theme-text"><%= NO_PARCELS_SIGN_SUBPROMPT %></div><div class="shared-on-sign-out-button control-button theme-button theme-button-label" role="button"aria-label="<%= NO_PARCELS_SIGN_PROMPT %><%= NO_PARCELS_SIGN_SUBPROMPT %><%= NO_PARCELS_SIGN_BTN %>"tabindex="0"><%= NO_PARCELS_SIGN_BTN %></div></div>'}),define("acplugins/signatures/js/templates/no-parcels-button-template",[],function(){return'<button id="parcels-no-parcels-send-btn" class="parcels-no-parcels-btn theme-hyperlink">       <%= sendBtn %></button> '}),define("acplugins/signatures/js/views/no-parcels-collection-view",["core/ac-core","acplugins/signatures/js/ac-signature","acplugins/signatures/js/templates/no-parcels-collection-template.html","acplugins/signatures/js/templates/no-parcels-button-template","i18n!acplugins/signatures/js/nls/ui-strings","acplugins/signatures/js/utils/sc-constants","acplugins/signatures/js/utils/sign-workflow-utils","core/views/view"],function(e,t,i,s,n,o,a){return t.NoParcelsCollectionView=e.View.extend({events:{"click .shared-on-sign-out-button":"_onSendForSignClick"},initialize:function(){e.View.prototype.initialize.call(this),this._template=_.template(i),this._addUiModelEventListeners()},render:function(){return e.View.prototype.render.call(this),0===this.$el.children().length&&(this.$el.html(this._template({NO_PARCELS_SIGN_PROMPT:n.NO_PARCELS_SIGN_PROMPT,NO_PARCELS_SIGN_SUBPROMPT:n.NO_PARCELS_SIGN_SUBPROMPT,NO_PARCELS_SIGN_BTN:n.NO_PARCELS_SIGN_BTN})),this._initWrappers(),this.options.collectionUiModel.get("show_empty")?this.$noParcelsSendPrompt.addClass("shown"):this.$noParcelsSendPrompt.removeClass("shown"),this.options.appApi.rnaApi.done(_.bind(function(e){e.esApi.isSendForSignEnabled()||this.$sendForSignatureBtn.hide()},this))),this.options.appApi.rnaApi.done(_.bind(function(){this.options.appApi.rnaApiObj.esApi.getActiveAgreementFilter().then(_.bind(function(e){this.options.parcelCollection.leftRailFilter="",void 0!=e&&e.length>0&&(this.options.parcelCollection.leftRailFilter=e,"signatures"!=this.options.parcelCollection.leftRailFilter&&this._showEmptyStatePage())},this))},this)),this},_initWrappers:function(){this.$noParcelsSendPrompt=this.$("#parcels-no-parcels-prompt-sign"),this.$sendForSignatureBtn=this.$(".shared-on-sign-out-button")},_onSendForSignClick:function(){var e=this.options;e.appApi.rnaApi.done(function(e){e.esApi.invokeMethod({methodName:"LaunchRSWorkflow"})})},_addUiModelEventListeners:function(){this.listenTo(this.options.collectionUiModel,"change:show_empty",this._onShowEmptyChange)},_onShowEmptyChange:function(e,t){t?(this.render(),this.$noParcelsSendPrompt.addClass("shown")):this.$noParcelsSendPrompt.removeClass("shown")},_showEmptyStatePage:function(){var e=this.options.parcelCollection.leftRailFilter;$(".signature-workflow-name").text(a.getUIStringFromStatusID(e)),$(".shared-on-sign-out-prompt").text(a.getPromptMsgFromStatusID(e)),$(".shared-on-sign-out-subprompt").text(a.getSubPromptMsgFromStatusID(e)),$(".shared-empty-state-icon").addClass("shared-offline-icon").removeClass("shared-empty-state-icon").removeClass("signature-empty-state-icon"),$(".on-signed-out").removeClass("div-nativers-nativers-library-template"),e===o.TEMPLATES?($(".on-signed-out").addClass("div-nativers-nativers-library-template"),$(".shared-on-sign-out-button").text(n.CREATE_ESIGN_TEMPLATE),$(".shared-on-sign-out-button").show()):e===o.ALL||e===o.IN_PROGRESS?($(".shared-on-sign-out-button").text(n.REQUEST_ESIGN),$(".shared-on-sign-out-button").show()):$(".shared-on-sign-out-button").hide()}}),t.NoParcelsCollectionView}),define("acplugins/signatures/js/templates/redirect-to-web-template",[],function(){return'<div id="parcels-no-parcels-prompt-sign" class="shared-no-parcels shown"><div class="shared-empty-state-icon"></div><div class="shared-on-sign-out-prompt theme-text"><%= NO_PARCELS_SIGN_PROMPT %></div><div class="shared-on-sign-out-subprompt"><%= NO_PARCELS_SIGN_SUBPROMPT %></div><div class="shared-on-sign-out-button control-button theme-button theme-button-label" role="button"aria-label="<%= NO_PARCELS_SIGN_PROMPT %><%= NO_PARCELS_SIGN_SUBPROMPT %><%= NO_PARCELS_SIGN_BTN %>"tabindex="0"><%= NO_PARCELS_SIGN_BTN %></div></div>'}),define("acplugins/signatures/js/views/redirect-to-web-view",["core/ac-core","acplugins/signatures/js/ac-signature","acplugins/signatures/js/templates/redirect-to-web-template","acplugins/signatures/js/templates/no-parcels-button-template","i18n!acplugins/signatures/js/nls/ui-strings","acplugins/signatures/js/utils/sc-constants","core/views/view"],function(e,t,i,s,n){return t.RedirectToWebCollectionView=e.View.extend({events:{"click .shared-on-sign-out-button":"_onOpenSignBtn"},initialize:function(){e.View.prototype.initialize.call(this),this._template=_.template(i),this._addUiModelEventListeners()},render:function(){if(e.View.prototype.render.call(this),0===this.$el.children().length){if(e.Util.isReader())var t=n.REDIRECT_TO_WEB_BODY.replace("Acrobat","Reader");else var t=n.REDIRECT_TO_WEB_BODY;this.$el.html(this._template({NO_PARCELS_SIGN_PROMPT:n.REDIRECT_TO_WEB_TITLE,NO_PARCELS_SIGN_SUBPROMPT:t,NO_PARCELS_SIGN_BTN:n.OPEN_ADOBE_SIGN})),this._initWrappers(),this.options.collectionUiModel.get("show_empty")?this.$noParcelsSendPrompt.addClass("shown"):this.$noParcelsSendPrompt.removeClass("shown")}return this},_initWrappers:function(){this.$noParcelsSendPrompt=this.$("#parcels-no-parcels-prompt-sign")},_onOpenSignBtn:function(){this.options.appApi.rnaApi.done(_.bind(function(e){e.rnaSignWorkflowServicesAPI.invokeMethod({methodName:"openAdobeSignWeb"})},this))},_addUiModelEventListeners:function(){this.listenTo(this.options.collectionUiModel,"change:show_empty",this._onShowEmptyChange)},_onShowEmptyChange:function(e,t){t?(this.render(),this.$noParcelsSendPrompt.addClass("shown")):this.$noParcelsSendPrompt.removeClass("shown")}}),t.RedirectToWebCollectionView}),define("acplugins/signatures/js/views/parcels-view",["core/ac-core","acplugins/signatures/js/ac-signature","acplugins/signatures/js/templates/parcels-template.html","acplugins/signatures/js/views/parcels-collection-view","acplugins/signatures/js/views/no-parcels-collection-view","acplugins/signatures/js/views/redirect-to-web-view"],function(e,t,i){t.ParcelsView=e.View.extend({initialize:function(){e.View.prototype.initialize.call(this),this._template=_.template(i)},render:function(){return e.View.prototype.render.call(this),0===this.$el.children().length&&(this.$el.html(this._template()),this._initWrappers()),this._renderChildViews(),this},_initWrappers:function(){this.$parcelsContent=this.$(".parcels-content"),this.$parcelsNoContent=this.$(".parcels-no-content"),this.$parcelRedirectWeb=this.$(".parcel-redirect-web")},_renderChildViews:function(){var t=this._collectionUiModel;e.Util.isCEF()&&_.isUndefined(this.options.parcelCollection)||(t||(t=this._collectionUiModel=e.uiModelFactory.create("CollectionUiModel"),t.set("show_empty",0===this.options.parcelCollection.length)),this.options.appApi.rnaApi.done(_.bind(function(e){e.rnaSignWorkflowServicesAPI.invokeMethod({methodName:"canShowSignNativeExperience"}).done(_.bind(function(e){0===e?this._renderRedirectToWebView(t):0!=this.options.parcelCollection.length||this.options.isInSearchResultsView?(this.$parcelsContent.show(),this.$parcelsNoContent.hide(),this._renderParcelsContentView(t)):setTimeout(_.bind(function(){0!=this.options.parcelCollection.length||this.options.isInSearchResultsView||this._renderParcelsNoContentView(t)},this),200)},this))},this)))},_renderParcelsNoContentView:function(e){this._renderChildView("_noParcelsContentView",t.NoParcelsCollectionView,this.$parcelsNoContent,{collection:this.options.parcelCollection,collectionUiModel:e})},_renderRedirectToWebView:function(e){this._renderChildView("_noParcelsContentView",t.RedirectToWebCollectionView,this.$parcelRedirectWeb,{collection:this.options.parcelCollection,collectionUiModel:e})},_renderParcelsContentView:function(e){this._renderChildView("_parcelsContentView",t.ParcelsCollectionView,this.$parcelsContent,{collection:this.options.parcelCollection,collectionUiModel:e})}})}),define("acplugins/signatures/js/views/sent-files-body-view",["core/ac-core","acplugins/signatures/js/ac-signature","acplugins/signatures/js/templates/sent-files-body-template.html","acplugins/signatures/js/views/parcels-view"],function(e,t,i){t.SentFilesBodyView=e.View.extend({initialize:function(){e.View.prototype.initialize.call(this),this._template=_.template(i)},render:function(){return e.View.prototype.render.call(this),0===this.$el.children().length&&(this.$el.html(this._template()),this._initWrappers()),this._renderChildViews(),this},_initWrappers:function(){this.$parcels=this.$(".parcels"),this.$searchResults=this.$(".parcels-search-results")},_renderChildViews:function(){var e=!0;e&&this._renderParcelsView()},_renderParcelsView:function(){this._renderChildView("_parcelsView",t.ParcelsView,this.$parcels)}})}),define("acplugins/signatures/js/templates/sent-files-footer-template.html",[],function(){return'<div class="adobe-send-btn desktop theme-hyperlink" role="link" id="footer-link" disabled tabindex="-1"><%=GO_TO_ADOBE_SEND_WEBSITE%></div>'}),define("acplugins/signatures/js/views/sent-files-footer-view",["core/ac-core","acplugins/signatures/js/ac-signature","i18n!acplugins/signatures/js/nls/ui-strings","acplugins/signatures/js/templates/sent-files-footer-template.html","core/utils/view-util"],function(e,t,i,s,n){t.SentFilesFooterView=e.View.extend({events:{"click .adobe-send-btn":"_onAdobeSendWebsiteClick"},initialize:function(){e.View.prototype.initialize.call(this),this._addFocusEventListener(),this._addKeyEventListener(),this._template=_.template(s)},render:function(){return e.View.prototype.render.call(this),0===this.$el.children().length&&(this.$el.html(this._template({GO_TO_ADOBE_SEND_WEBSITE:i.GO_TO_ADOBE_S_T_WEBSITE})),this._initWrappers(),this._setTabbableItem()),this._updateSendButton(),this},_initWrappers:function(){this.$adobeSendBtn=this.$(".adobe-send-btn")},_updateSendButton:function(){this.$adobeSendBtn.addClass("desktop")},_onFocusIn:function(e){var t=$(e.target);return this.$(":focusable").not(t).attr("tabindex",-1),t.attr("tabindex",0),!0},_onFocusOut:function(){return!0},_setTabbableItem:function(){var e=this.$(".adobe-send-btn:focusable"),t=this.$(":tabbable");0===t.length&&e.attr("tabindex","0")},_onKeyDown:function(e){var t=this.$el,i=e.which,s=!1;if(!n.descendantHasFocus(t))return s;switch(i){case 13:s=!0,$(e.target).click();break;case 32:s=!0,$(e.target).click()}return s},_onAdobeSendWebsiteClick:function(){var e=this.options;e.appApi.rnaApi?this.options.appApi.rnaApi.done(_.bind(function(e){e.esApi.invokeMethod({methodName:"launchSFSManagePage"})},this)):e.appApi.routerApi.navigate("/send",{trigger:!0})}})}),define("acplugins/signatures/js/templates/files-rhp-template",[],function(){return'<div class="rhp-preview"></div><div class="rhp-properties"></div><div class="rhp-intro-message "></div><div class="rhp-workflow-deadline "></div><div class="rhp-participants-accodian "></div><div class="sign-activity-accodian "></div><div class="rhp-reminders-accodian"></div><div class="rhp-cancel-workflow-accodian "></div><div class="rhp-primary-actions "></div><div class="rhp-es-signin"></div><div class="get-a-link-view-rhp"></div><div class="send-a-copy-view-rhp"></div><div class="save-a-local-copy-view-rhp"></div>'}),define("acplugins/signatures/js/templates/get-a-link-template",[],function(){return'<div class="rhp-option-item"><div class="shared-rhp-action rhp-actions-item with-margins get-a-link-tab cb-active-text-theme" title="<%= GET_A_LINK %>" aria-label="<%= GET_A_LINK %>" tabindex="-1"><div class="shared-rhp-action-icon get-a-link-icon"></div><div class="shared-rhp-action-name" aria-label="<%= GET_A_LINK %>" ><%= GET_A_LINK %></div></div></div>'}),define("acplugins/signatures/js/views/get-a-link-view",["core/ac-core","app/ac-app","files/ac-files","acplugins/signatures/js/ac-signature","acplugins/signatures/js/templates/get-a-link-template","i18n!acplugins/signatures/js/nls/ui-strings","core/utils/css-util","core/utils/view-util","acplugins/signatures/js/utils/sc-constants","core/models/workflow-status-strings"],function(e,t,i,s,n,o,a,r,l,c){s.GetALinkViewRHP=e.View.extend({events:{"click .get-a-link-tab":"_onGetALinkClick"},initialize:function(){e.View.prototype.initialize.call(this),this._template=_.template(n),this._addModelEventListeners()},render:function(){this.options.parcelModel;e.View.prototype.render.call(this),0===this.$el.children().length&&(this.$el.html(this._template({GET_A_LINK:o.GET_SHAREABLE_LINK})),this._initWrappers()),this._updateFields()},_addModelEventListeners:function(){},_updateFields:function(){this.options.cbViewModel.getSingleSelectedItemModel().get("signature_info").state!==c.ARCHIVED&&this.$getALinkTab.hide()},_removeModelEventListeners:function(){},_initWrappers:function(){this.$getALinkTab=this.$(".get-a-link-tab")},_onGetALinkClick:function(){this.options.appApi.rnaApi.done(_.bind(function(e){var t=this.options.cbViewModel.getSingleSelectedItemModel().get("id"),i=this.options.cbViewModel.getSingleSelectedItemModel().getSingleFileName_noext();e.esApi.invokeMethod({methodName:"LaunchShareDialog",methodArgs:{Workflow:"Get_a_link",agreementId:t,agreementName:i}})},this))}})}),define("acplugins/signatures/js/templates/send-a-copy-template",[],function(){return'<div class="rhp-option-item"><div class="shared-rhp-action rhp-actions-item with-margins send-a-copy-tab cb-active-text-theme" title="<%= SEND_A_COPY %>" aria-label="<%= SEND_A_COPY %>" tabindex="-1"><div class="shared-rhp-action-icon send-a-copy-icon"></div><div class="shared-rhp-action-name" aria-label="<%= SEND_A_COPY %>" ><%= SEND_A_COPY %></div></div></div>'}),define("acplugins/signatures/js/views/send-a-copy-view",["core/ac-core","core/utils/util","app/ac-app","files/ac-files","acplugins/signatures/js/ac-signature","acplugins/signatures/js/templates/send-a-copy-template","i18n!acplugins/signatures/js/nls/ui-strings","core/utils/css-util","core/utils/view-util","acplugins/signatures/js/utils/sc-constants","core/models/workflow-status-strings"],function(e,t,i,s,n,o,a,r,l,c,d){n.SendACopyViewRHP=e.View.extend({events:{"click .send-a-copy-tab":"_onSendACopyClick"},initialize:function(){e.View.prototype.initialize.call(this),this._template=_.template(o),this._addModelEventListeners()},render:function(){this.options.parcelModel;e.View.prototype.render.call(this),0===this.$el.children().length&&(this.$el.html(this._template({SEND_A_COPY:a.SEND_A_COPY})),this._initWrappers(),t.isReader()&&this.$(".send-a-copy-tab").hide()),this._updateFields()},_addModelEventListeners:function(){},_removeModelEventListeners:function(){},_initWrappers:function(){this.$sendACopyTab=this.$(".send-a-copy-tab")},_updateFields:function(){this.options.cbViewModel.getSingleSelectedItemModel().get("signature_info").state!==d.ARCHIVED&&this.$sendACopyTab.hide()},_onSendACopyClick:function(){this.options.appApi.rnaApi.done(_.bind(function(e){var t=this.options.cbViewModel.getSingleSelectedItemModel().get("id"),i=this.options.cbViewModel.getSingleSelectedItemModel().getSingleFileName_noext();e.esApi.invokeMethod({methodName:"LaunchShareDialog",methodArgs:{Workflow:"Send_a_copy",agreementId:t,agreementName:i}})},this))}})}),define("acplugins/signatures/js/templates/save-a-local-copy-template",[],function(){return'<div class="rhp-option-item"><div class="shared-rhp-action rhp-actions-item with-margins save-a-local-copy-tab cb-active-text-theme" title="<%= SAVE_A_LOCAL_COPY %>" aria-label="<%= SAVE_A_LOCAL_COPY %>" tabindex="-1"><div class="shared-rhp-action-icon save-a-local-copy-icon"></div><div class="shared-rhp-action-name" aria-label="<%= SAVE_A_LOCAL_COPY %>" ><%= SAVE_A_LOCAL_COPY %></div></div></div>'}),define("acplugins/signatures/js/views/save-a-local-copy-view",["core/ac-core","core/utils/util","app/ac-app","files/ac-files","acplugins/signatures/js/ac-signature","acplugins/signatures/js/templates/save-a-local-copy-template","i18n!acplugins/signatures/js/nls/ui-strings","core/utils/css-util","core/utils/view-util","acplugins/signatures/js/utils/sc-constants","core/models/workflow-status-strings"],function(e,t,i,s,n,o,a){n.SaveALocalCopyViewRHP=e.View.extend({events:{"click .save-a-local-copy-tab":"_onSaveALocalCopyClick","keypress #save-a-local-copy-tab":"_keypressOnSaveALocalCopy","mouseenter #save-a-local-copy-tab":"_onmouseenterSaveALocalCopyTab","mouseleave #save-a-local-copy-tab":"_onmouseleaveSaveALocalCopyTab"},initialize:function(){e.View.prototype.initialize.call(this),this._template=_.template(o),this._addModelEventListeners()},render:function(){this.options.parcelModel;e.View.prototype.render.call(this),0===this.$el.children().length&&(this.$el.html(this._template({SAVE_A_LOCAL_COPY:a.SAVE_A_LOCAL_COPY})),this._initWrappers())},_addModelEventListeners:function(){},_removeModelEventListeners:function(){},_initWrappers:function(){this.$saveALocalCopyTab=this.$(".save-a-local-copy-tab")},_onSaveALocalCopyClick:function(){this.options.appApi.rnaApi.done(_.bind(function(e){var t=this.options.cbViewModel.getSingleSelectedItemModel().get("id"),i=this.options.cbViewModel.getSingleSelectedItemModel().getSingleFileName_noext();e.esApi.invokeMethod({methodName:"SaveALocalCopy",methodArgs:{agreementId:t,agreementName:i}})},this))},_keypressOnSaveALocalCopy:function(e){e&&"keypress"==e.type&&(13==e.keyCode||32==e.keyCode||0==e.keyCode)&&this._SaveALocalCopyClicked()}})}),define("acplugins/signatures/js/views/files-rhp-view",["core/ac-core","acplugins/signatures/js/ac-signature","acplugins/signatures/js/templates/files-rhp-template","i18n!core/nls/ui-strings","core/models/workflow-status-strings","core/utils/sc-analytics","core/utils/view-util","core/views/rhp/shared-rhp-preview-view","core/views/rhp/shared-rhp-properties-view","core/views/rhp/shared-rhp-intro-message-view","core/views/rhp/shared-rhp-deadline-view","core/views/rhp/signature/participants-accodian-view","core/views/rhp/signature/activity-accodian-view","core/views/rhp/signature/cancel-workflow-accodian-view","core/views/rhp/signature/primary-actions-view","core/views/rhp/signature/reminders-accodian-view","core/views/rhp/signature/es-signin-view","core/views/view","core/models/context-board-model","acplugins/signatures/js/views/get-a-link-view","acplugins/signatures/js/views/send-a-copy-view","acplugins/signatures/js/views/save-a-local-copy-view"],function(e,t,i,s,n,o,a){return t.SignatureFilesRhpView=e.View.extend({events:{},initialize:function(){e.View.prototype.initialize.call(this),this.cbViewModel=e.modelFactory.create("ContextBoardModel"),_.extend(this.options,{cbViewModel:this.cbViewModel}),this._addKeyEventListener()},render:function(){e.View.prototype.render.call(this);var t=this.$el;0===t.children().length&&this.options.runningInRHP&&(this.options.rootView._pluginOptions&&this.options.rootView._pluginOptions.isCBView&&"Tracking"!=this.options.rootView._pluginOptions.requestAgent&&"recent"!=this.options.rootView._pluginOptions.requestAgent?this.options.appApi.siteCatalystApi.logEvent("Viewer","ContextBoard",o.VIRGO_SIGN):this.options.appApi.siteCatalystApi.logVirgoRHPOpenedEvent(o.VIRGO_SIGN_CB)),t.html(_.template(i)),this._initWrappers();var s=this.options.appApi.isAppUsingAV2UI();s&&$(".ui-theme.theme-container").addClass("fileinfo");
var a=this.cbViewModel.getSingleSelectedItemModel();return!a||this.options.isInSearchResultsView&&a.workflowType!==n.SIGN?t.hide():(t.show(),this.options.appApi.sessionApi.isESSignedIn()||a.attributes.signature_info.state==n.DRAFT?this._renderChildViews():this._renderRhpESSignInView(),s&&$(".rhp-actions-item").addClass("fileinfo"),this._updateFields()),this},_initWrappers:function(){this.$preview=this.$(".rhp-preview"),this.$properties=this.$(".rhp-properties"),this.$introMessage=this.$(".rhp-intro-message"),this.$deadline=this.$(".rhp-workflow-deadline"),this.$reviewParticipants=this.$(".rhp-participants-accodian"),this.$activityAccodian=this.$(".sign-activity-accodian"),this.$remindersAccodian=this.$(".rhp-reminders-accodian"),this.$primaryActions=this.$(".rhp-primary-actions"),this.$cancelAccodian=this.$(".rhp-cancel-workflow-accodian"),this.$esSignIn=this.$(".rhp-es-signin"),this.$getALinkView=this.$(".get-a-link-view-rhp"),this.$sendacopyView=this.$(".send-a-copy-view-rhp"),this.$savealocalcopyView=this.$(".save-a-local-copy-view-rhp"),this.options.cbViewModel=this.cbViewModel,this.options.rootView._pluginOptions&&!this.options.rootView._pluginOptions.canShowSaveALocalCopy&&this.$savealocalcopyView.hide(),this.options.isInSearchResultsView&&this.$esSignIn.addClass("uss-search-active")},_renderChildViews:function(){this._renderChildView("_previewView",e.SharedRhpPreviewView,this.$preview),this._renderChildView("_propertiesView",e.SharedRhpPropertiesView,this.$properties),this._renderChildView("_introMessageView",e.SharedRhpIntroMsgView,this.$introMessage),this._renderChildView("_deadlineView",e.SharedRhpDeadlineView,this.$deadline),this._renderChildView("_reviewParticipantsView",e.SignatureRhpParticipantsView,this.$reviewParticipants),this._renderChildView("_activityAccodianView",e.SignatureRhpActivityAccodianView,this.$activityAccodian),this._renderChildView("_remindersAccodianView",e.SignatureRhpRemindersAccodianView,this.$remindersAccodian),this._renderChildView("_primaryActionsView",e.SignaturesRhpPrimaryActionsView,this.$primaryActions),this._renderChildView("_cancelAccodianView",e.SignatureRhpCancelWorkflowAccodianView,this.$cancelAccodian),this._renderChildView("_getalinkview",t.GetALinkViewRHP,this.$getALinkView),this._renderChildView("_sendacopyview",t.SendACopyViewRHP,this.$sendacopyView),this._renderChildView("_savealocalcopyview",t.SaveALocalCopyViewRHP,this.$savealocalcopyView)},_renderRhpESSignInView:function(){this._renderChildView("_esSignInView",e.SignaturesRhpESSignInView,this.$esSignIn)},_updateFields:function(){this.options.hidePreview?this.$preview.hide():this.$preview.show()},_addUiModelEventListeners:function(){{var e=this.options;e.rhpPreviewUiModel}this.listenTo(e.selectionUiModel,"change:selected_item_models",this._onSelectedItemModelsChange)},_setModel:function(e,t){var i=this.cbViewModel;i.clearSelection(),t?i.addItem(e):_.each(_.values(e),function(e){i.addItem(e)}),this.render()},_getSiteCatalystContext:function(){return s.RHP},_onKeyDown:function(e){var t=($(e.target),e.which),i=!1,s=e.shiftKey,n=e.ctrlKey;if(117!=t)return i;var o=$(".sent-files-rhp");if(0!=o.length)return i;if(o=$(".context-board-rhp:visible"),!this.$el.is(o))return i;var r,l=o.hasClass("hidden")?!1:!0,c=a.descendantHasFocus(this.$el),d=o.find(":focusable");(!c||n)&&(l&&(s||d&&d.length>0&&(r=d.first().attr("tabindex",0))),r&&r.length>0&&(i=!0,r.focus()));var h={};return h.isF6Consumed=i,h.shift=s,this.options.appApi.rnaApi.done(_.bind(function(e){e.rnaServicesAPI.f6KeyHandled(h)},this)),i}}),t.SignatureFilesRhpView}),define("acplugins/signatures/js/views/on-signed-in-view",["core/ac-core","files/ac-files","acplugins/signatures/js/ac-signature","core/models/workflow-status-strings","acplugins/signatures/js/templates/on-signed-in-template.html","core/utils/util","core/utils/css-util","core/utils/sc-analytics","core/utils/view-util","acplugins/signatures/js/views/signatures-files-header-view","acplugins/signatures/js/views/sent-files-body-view","acplugins/signatures/js/views/sent-files-footer-view","acplugins/signatures/js/views/files-rhp-view"],function(e,t,i,s,n,o,a,r,l){return i.OnSignedInView=e.View.extend({initialize:function(){e.View.prototype.initialize.call(this),this._template=_.template(n),this._addUiModelEventListeners(),this._addKeyEventListener()},render:function(){var t=this.$el;return e.View.prototype.render.call(this),0===t.children().length&&(t.html(_.template(n)),this._initWrappers()),this._renderChildViews(),this},_initWrappers:function(){if(this.$header=this.$(".signatures-files-header"),this.$body=this.$(".signatures-files-body"),this.$footer=this.$(".sent-files-footer"),this.$plugin=$("#signatures-plugin"),this.options.isInSearchResultsView){this.$body.addClass("uss-search-active"),this.$searchContextBoard=$(".search-context-board");var e=this.options.pluginId+"-rhpId",t=_.template('<div class="sent-files-rhp ui-theme theme-container" id="'+e+'">');this.$searchContextBoard.append(t()),this.$rhp=this.$searchContextBoard.find("#"+e)}else this.$rhp=this.$(".sent-files-rhp")},_addUiModelEventListeners:function(){var e=this.options;this.listenTo(e.selectionUiModel,"change:selected_item_models",this._onSelectedItemModelsChange)},_renderChildViews:function(){this._renderSignaturesFilesHeaderView(),this._renderSentFilesBodyView(),this._renderSentFilesRhpView(),"desktop"===this.options.collectionsUiModel.get("mode")&&this.options.appApi.rnaApi.done(_.bind(function(e){e.esApi.isSendForSignEnabled()&&this._renderSentFilesFooterView()},this))},_renderSignaturesFilesHeaderView:function(){this._renderChildView("_signaturesFilesHeaderView",i.SignaturesFilesHeaderView,this.$header)},_renderSentFilesBodyView:function(){this._renderChildView("_sentFilesBodyView",i.SentFilesBodyView,this.$body)},_renderSentFilesFooterView:function(){this._renderChildView("_sentFilesFooterView",i.SentFilesFooterView,this.$footer)},_renderSentFilesRhpView:function(){if(this.rhpView=this._renderChildView("_sentFilesRhpView",i.SignatureFilesRhpView,this.$rhp),this.options.selectionUiModel.isItemSelected()){var e=this.options.selectionUiModel.getSingleSelectedItemModel().id,t=this.options.parcelCollection._byId[e];this.options.selectionUiModel.updateSelectedItemModel(t,!0)}},_onSelectedItemModelsChange:function(e){var t=this.options,i=this.$header,n=this.$body,o=this.$rhp,a=t.appApi;if(!t.noSelectionActions&&!a.acrobatApi.isInAcrobat()){if(t.isInSearchResultsView){var l=e.getSingleSelectedItemModel();if(l&&l.workflowType!=s.SIGN)return o.hide(),void(i.hasClass("with-rhp")||(i.addClass("with-rhp"),n.addClass("with-rhp"),this.options.collectionsUiModel.set("rhpShown",!0),this._renderSignaturesFilesHeaderView(),this._renderSentFilesBodyView()))}e.isItemSelected()?(this.rhpView._setModel(e.getSelectedItemModels()),i.hasClass("with-rhp")||(i.addClass("with-rhp"),n.addClass("with-rhp"),o.removeClass("hidden").removeClass("invisible"),this.options.collectionsUiModel.set("rhpShown",!0),this.options.appApi.siteCatalystApi.logVirgoRHPOpenedEvent(r.VIRGO_SIGN_CB))):i.hasClass("with-rhp")&&(i.removeClass("with-rhp"),n.removeClass("with-rhp"),o.addClass("hidden"),this.options.collectionsUiModel.set("rhpShown",!1))}},_onKeyDown:function(e){var t=$(e.target),i=e.which,s=!1,n=e.shiftKey;if(!l.isElementDisplayed(this.$plugin))return!1;if(117!=i||!l.descendantHasFocus(this.$el))return s;var o,a=this.$rhp.hasClass("hidden")?!1:!0,r=t.closest(this.$rhp).length?!0:!1,c=this.$rhp.find(":focusable"),d=this.$body.find(".signature-list-item.selected>.signature-list-item-row"),h=this.$el.find(":tabbable"),p=e.altKey,u=e.ctrlKey;p||!a&&u?o=d.length>0?d:h.first().attr("tabindex",0):u?o=c.first().attr("tabindex",0):r?(n&&(o=d),c.attr("tabindex",-1)):a&&(n||c&&c.length>0&&(o=c.first().attr("tabindex",0))),o&&o.length>0&&(s=!0,o.focus());var g={};return g.isF6Consumed=s,g.shift=n,this.options.appApi.rnaApi.done(_.bind(function(e){e.rnaServicesAPI.f6KeyHandled(g)},this)),s}}),i.OnSignedInView}),define("acplugins/signatures/js/templates/on-signed-out-template.html",[],function(){return'<div class="sign-workflow-name shared-workflow-heading shared-files-main-header-empty-state theme-page-header" title="<%= workflowName %>" ><%= workflowName %></div><div class="shared-offline-icon"></div><div class="shared-on-sign-out-prompt theme-text"><%= ON_SIGN_OUT_PROMPT %></div><div class="shared-on-sign-out-subprompt theme-text"><%= ON_SIGN_OUT_SUBPROMPT %></div><div class="shared-on-sign-out-button control-button theme-button theme-button-label" role="button"aria-label="<%= ON_SIGN_OUT_PROMPT %><%= ON_SIGN_OUT_SUBPROMPT %><%= SIGN_IN_BUTTON %>"tabindex="0"><%= SIGN_IN_BUTTON %></div>'}),define("acplugins/signatures/js/views/on-signed-out-view",["core/ac-core","core/models/workflow-status-strings","acplugins/signatures/js/ac-signature","acplugins/signatures/js/templates/on-signed-out-template.html","i18n!acplugins/signatures/js/nls/ui-strings","core/views/view"],function(e,t,i,s,n){return i.OnSignedOutView=e.View.extend({events:{"click .shared-on-sign-out-button":"_onSignInClick","click .div-nativers-nativers-library-template":"_onCreateTemplateClick"},initialize:function(){e.View.prototype.initialize.call(this),this._addKeyEventListener(),this._template=_.template(s)},render:function(){return e.View.prototype.render.call(this),0===this.$el.children().length&&(this.$el.html(this._template({workflowName:n.AGREEMENT_HEADER,ON_SIGN_OUT_PROMPT:n.ON_SIGN_OUT_PROMPT,ON_SIGN_OUT_SUBPROMPT:n.ON_SIGN_OUT_SUBPROMPT,SIGN_IN_BUTTON:n.SIGN_IN_BUTTON})),this._initWrappers()),this},_initWrappers:function(){this.$adobeSendIcon=this.$(".adobe-send-icon"),this.$onSignOutPrompt=this.$(".on-sign-out-prompt"),this.$signInBtn=this.$(".sign-in-btn")},_onKeyDown:function(e){return 32===e.which||13===e.which?($(e.target).click(),!0):!1},_onCreateTemplateClick:function(){var e=this.options;e.appApi.rnaApi.done(function(e){e.esApi.invokeMethod({methodName:"LaunchRSWorkflow"})})},_onSignInClick:function(e){$(".on-signed-out").hasClass("div-nativers-nativers-library-template")?this._onCreateTemplateClick(e):(this._consumeEvent(e),this.$el.hide(),this.options.appApi.displayApi.showSpinner(!0),this.options.appApi.sessionApi.ensureSignedIn().then(_.bind(function(){this.options.appApi.displayApi.showSpinner(!1)},this),_.bind(function(){this.options.appApi.displayApi.showSpinner(!1),this.$el.show()},this)))}}),i.OnSignedOutView}),define("acplugins/signatures/js/views/signature-home-view-view",["core/ac-core","files/ac-files","plugins-common/ac-plugins","acplugins/signatures/js/ac-signature","acplugins/signatures/js/utils/sc-constants","acplugins/signatures/js/templates/tracked-send-template.html","acplugins/signatures/js/utils/sharing","acplugins/signatures/js/utils/ts-utils","core/models/workflow-status-strings","i18n!acplugins/signatures/js/nls/ui-strings","core/utils/sc-analytics","acplugins/signatures/js/models/ui/parcel-preview-ui-model","core/views/home-view-view","acplugins/signatures/js/ops/showing/parcel-preview-op","acplugins/signatures/js/views/on-signed-in-view","acplugins/signatures/js/views/on-signed-out-view","core/views/rhp-actions-toast-view"],function(e,t,i,s,n,o,a,r,l,c){return s.HomeViewView=e.PluginContentView.extend({initialize:function(){e.PluginContentView.prototype.initialize.call(this),e.Util.isCEF()&&(require(["files/views/files-offline-view"],function(){}),require(["files/views/files-no-access-view"],function(){})),s.plugin=this,this.options.parcelCollection=new e.ParcelCollection([],{wfType:l.SIGN})},_addUiModelEventListeners:function(){var e=this.options;e.collectionsUiModel.on("SortItems",this._sortItems)},_sortSearchResults:function(t,i){var s,n,o=this.options.parcelCollection,a=i===e.SortUiModel.ORDER_ASCENDING?1:-1;o.comparator=t===l.FILENAME?function(e,t){return s=e.getSingleFileName().toLowerCase(),n=t.getSingleFileName().toLowerCase(),s>n?1*a:n>s?-1*a:0}:t===l.INITIATOR?function(e,t){return s=e.getSenderName().toLowerCase(),n=t.getSenderName().toLowerCase(),s>n?1*a:n>s?-1*a:0}:t===l.STATUS?function(e,t){return s=e.get("signature_info").state,n=t.get("signature_info").state,s>n?1*a:n>s?-1*a:0}:function(e,i){return e.get(t)>i.get(t)?1*a:e.get(t)<i.get(t)?-1*a:0},o.sort(),this.options.collectionsUiModel.set("sort_key",t),this.options.collectionsUiModel.set("sort_order",i)},_sortItems:function(e){this.options.isInSearchResultsView?this._sortSearchResults(e.sort_key,e.sort_order):this._requestWorkflowData({sortField:e.sort_key,sortOrder:e.sort_order})},_requestWorkflowData:function(e){if(!this.options.isInSearchResultsView){var t="",i="";e&&e.sortField?t=e.sortField:this.options.collectionsUiModel.get("sort_key")&&(t=this.options.collectionsUiModel.get("sort_key")),e&&e.sortOrder?i=e.sortOrder:this.options.collectionsUiModel.get("sort_order")&&(i=this.options.collectionsUiModel.get("sort_order")),this.options.appApi.rnaApi.done(_.bind(function(e){e.fileApi({methodName:"requestWorkflowData",methodArgs:{WorkflowType:l.SIGN,SortField:t,SortOrder:i}}).done(_.bind(function(){},this))},this))}},render:function(){this.options.selectionUiModel.clearSelection();var t=this.$el;e.PluginContentView.prototype.render.call(this),this._pluginOptions&&this._pluginOptions.isCBView&&(0===t.children().length&&(t.html(_.template(o)),this._initWrappers()),this.options.appApi.rnaApi.done("Tracking"==this._pluginOptions.requestAgent||"recent"==this._pluginOptions.requestAgent?_.bind(function(e){var t={workflowId:this._pluginOptions.workflowID,workflowType:"Signature"};e.fileApi({methodName:"getTrackingWorkflowData",methodArgs:t}).done(_.bind(function(){},this))},this):_.bind(function(e){e.fileApi({methodName:"getSingleWorkflowData",methodArgs:this._pluginOptions.workflowID}).done(_.bind(function(){},this))},this))),this._processRouterArgs().then(_.bind(function(){0===t.children().length&&(t.html(_.template(o)),this._initWrappers()),!this.options.isInSearchResultsView&&!this._isSelected||t.closest(".hidden").length||this._renderChildViews()},this))},initPlugin:function(){var t=this.options,i=t.appApi.pluginsApi,n=e.modelFactory,o=e.uiModelFactory;return _.extend(t,{sessionModel:n.create("SessionModel"),collectionsUiModel:new s.CollectionsUiModel,dialogsUiModel:o.create("DialogsUiModel"),rhpPreviewUiModel:o.create("RhpPreviewUiModel"),itemUiModel:o.create("CollectionItemUiModel"),parcelPreviewUiModel:new s.ParcelPreviewUiModel}),i.isPluginOfThisType(t.pluginId,"search_views")?_.extend(t,{isInSearchResultsView:!0}):_.extend(t,{selectionUiModel:o.create("SelectionUiModel")}),e.Util.isCEF()&&this._changeModeToDesktop(),t.appApi.siteCatalystApi.register("sharing",a),t.collectionsUiModel.on("change:mode",this._onModeChange),t.isInSearchResultsView?(t.collectionsUiModel.set("checkbox",!1),t.collectionsUiModel.set("sort_key",l.CREATE_DATE),t.collectionsUiModel.set("sort_order",l.DESC)):this._onModeChange(),this._isSelected=!1,this._addUiModelEventListeners(),this._getResolvedPromise()},selectPlugin:function(t){return _.defer(_.bind(function(t){var i,o,a=this.options,r=(a.appApi.networkConnectivityApi,this.options.appApi.routerApi.parseQueryParams(window.location.href.slice(window.location.href.indexOf("?"))));if(this._pluginOptions=this._pluginOptions||{},t&&_.extend(this._pluginOptions,t),t&&a.isInSearchResultsView&&(a.searchModel=t.searchModel,a.searchUiModel=t.searchUiModel,a.selectionUiModel=t.selectionUiModel,a.selectionUiModel.set("multiple_selection",!1),a.collectionsUiModel.set("checkbox",!a.selectionUiModel.isSingleSelectionMode())),a.searchModel&&a.parcelCollection.reset(a.searchModel.get("parcelCollection").models),t&&(o=t.noHistoryEffect),o||(i=a.appApi.routerApi,i.navigate(s.PLUGIN_ID)),e.Util.isCEF()){if(this.options.appApi.siteCatalystApi.logScEvent([n.FILE_LIST,n.SENT_FILES,n.CLICKED]),this._isSelected&&_.isUndefined(this.options.parcelCollection))return this._renderForStartup(),this._getResolvedPromise();this.options.appApi.displayApi.applyUIThemeStyles(this.$el).then(_.bind(function(){this.render()},this))}return"desktop"===a.collectionsUiModel.get("mode")?(this._pluginOptions||(this._pluginOptions={}),r.isCBView&&(this._pluginOptions.isCBView="true"==r.isCBView?!0:!1),r.workflowID&&(this._pluginOptions.workflowID=r.workflowID),r.requestAgent&&(this._pluginOptions.requestAgent=r.requestAgent),this._pluginOptions.canShowSaveALocalCopy="true"==r.canShowSaveALocalCopy?!0:!1,r.notificationID&&(this._pluginOptions.notificationID=r.notificationID),this._addAppApiCallbacks(),this.options.appApi.rnaApi.done(_.bind(function(e){e.signServiceAuthAPI.isESSessionActive()},this)),a.appApi.networkConnectivityApi.isOnline()&&a.appApi.sessionApi.isSignedInReader()?(this.$onSignedOut&&this.$onSignedOut.hide(),this.$offlineView&&this.$offlineView.hide(),a.appApi.sessionApi.ensureSignedIn().then(_.bind(function(){return this._isSelected=!0,this._startPlugin()},this),_.bind(function(e){return a.appApi.displayApi.showSpinner(!1),e&&"NoAccessToPdfServices"===e.errorString?(this._isSelected=!0,this._renderForStartup(),this._startPlugin()):void(0===this.$el.children().length&&a.appApi.pluginsApi.handleServerOutageFailure())},this)),this._getResolvedPromise()):(this._isSelected=!0,this._renderForStartup(),this._getResolvedPromise())):(this._isSelected=!0,this._startPlugin())},this),t),this._getResolvedPromise()},deselectPlugin:function(){e.Util.isCEF()&&$(".page-main-container").removeClass("sent-files-container"),e.PluginContentView.prototype.deselectPlugin.call(this),this._isSelected=!1},releasePlugin:function(){delete this._startingPluginPromise,e.PluginContentView.prototype.releasePlugin.call(this)},clickedOutsideAiCview:function(){if(e.Util.isCEF()){this.options.selectionUiModel.clearSelection();var t=this.$(".sign-files-sort-menu");t.length>0&&"none"!==t.css("display")&&(t.hide(),this.$(".parcel-list-header-name-title").removeClass("selected"),this.$(".parcel-list-header-modified-title").removeClass("selected"),this.$(".parcel-list-header-sender-title").removeClass("selected"),this.$(".parcel-list-header-status-title").removeClass("selected"))}return this._getResolvedPromise()},getSiteCatalystName:function(){return n.SENT_FILES},getAppApiVersion:function(){return void 0==Ac.Plugins.groups.send?"dev":Ac.Plugins.groups.send.FRAMEWORK_VERSION},getSignaturesFilesList:function(e){this.options.esInitialized||s.opFactory.create("InitializeEchoSignOp",this.options).run(),this.options.appApi.rnaApi.done(_.bind(function(t){t.rnaSignWorkflowServicesAPI.isSignSearchMicroserviceEnabled()?s.opFactory.create("GetSignFilesListUsingSearchOp",this.options).run(e):s.opFactory.create("GetSignaturesFilesListOp",this.options).run(e)},this))},getSignAgreementData:function(e){this.options.esInitialized||s.opFactory.create("InitializeEchoSignOp",this.options).run(),this.options.appApi.rnaApi.done(_.bind(function(t){t.rnaSignWorkflowServicesAPI.isSignSearchMicroserviceEnabled()?s.opFactory.create("GetSignatureAgreementDataUsingSearchOp",this.options).run(e).then(_.bind(function(e){this.options.appApi.rnaApi.done(_.bind(function(t){t.rnaSignWorkflowServicesAPI.invokeMethod({methodName:"updateDataModelForAgreement",methodArgs:e})},e))},this)):s.opFactory.create("GetSignatureAgreementDataOp",this.options).run(e)},this))},getSignAgreementDataBatch:function(e){this.options.esInitialized||s.opFactory.create("InitializeEchoSignOp",this.options).run(),s.opFactory.create("GetSignatureAgreementDataUsingSearchOp",this.options).run(e).then(_.bind(function(e){this.options.appApi.rnaApi.done(_.bind(function(t){t.rnaSignWorkflowServicesAPI.invokeMethod({methodName:"updateDataModelBatch",methodArgs:e})},e))},this))},getSignAgreementDataForNotifications:function(e){var t=$.Deferred();return this.options.esInitialized||s.opFactory.create("InitializeEchoSignOp",this.options).run(),this.options.appApi.rnaApi.done(_.bind(function(i){return i.rnaSignWorkflowServicesAPI.isSignSearchMicroserviceEnabled()?void s.opFactory.create("GetSignatureAgreementDataUsingSearchOp",this.options).run(e).then(_.bind(function(e){t.resolve(e)},this)):t.resolve($.Deferred().reject())},this)),t},getNextParticipantSetList:function(e){return this.options.agreementID=e,this.options.esInitialized||s.opFactory.create("InitializeEchoSignOp",this.options).run(),s.opFactory.create("GetNextParticipantOp",this.options).run()},getSignaturesAuditTrail:function(e){this.options.esInitialized||s.opFactory.create("InitializeEchoSignOp",this.options).run(),s.opFactory.create("GetSignaturesAuditTrailOp",this.options).run(e)},sendReminder:function(e){return this.options.esInitialized||s.opFactory.create("InitializeEchoSignOp",this.options).run(),s.opFactory.create("PostReminderAndGetResponseOp",this.options).run(e)},getSignaturesActivityList:function(e){return this.options.esInitialized||s.opFactory.create("InitializeEchoSignOp",this.options).run(),s.opFactory.create("GetSignaturesActivityListOp",this.options).run({agreementID:e})},showToastForAction:function(t){this.options.toastArgumentString=t;var i=this.$el;this.$toastPlaceholderDIV=i.find(".rhp-action-toast-placeholder"),0==this.$toastPlaceholderDIV.length&&(this.$toastPlaceholderDIV=$("<div class='rhp-action-toast-placeholder'></div>"),i.append(this.$toastPlaceholderDIV)),this._renderChildView("_rhpToast",e.RhpActionsToast,this.$toastPlaceholderDIV,{options:this.options})},sendCancelAgreement:function(e){this.options.esInitialized||s.opFactory.create("InitializeEchoSignOp",this.options).run(),s.opFactory.create("GetAgreementIDEtagOp",this.options).run({agreementID:e.agreementID}).then(_.bind(function(t){s.opFactory.create("CancelAgreementOp",this.options).run({agreementID:e.agreementID,shouldNotifySigners:e.notifySigners,notifyText:e.notifyText,eTag:t.eTag}).then(_.bind(function(){var t=e.cancelString;if(this.showToastForAction(t),this.options.isInSearchResultsView)this.options.searchUiModel.trigger("refresh_search_category","sign");else{var i={};i.id=e.agreementID,this.options.appApi.rnaApi.done(_.bind(function(e){e.rnaSignWorkflowServicesAPI.invokeMethod({methodName:"updateDataModelAfterActionForAgreement",methodArgs:i})},this)),$(".sent-files-rhp,.context-board-view").removeClass("cursor-wait")}},this),_.bind(function(e){this.options.cancelResponseFetchHttpCode=e.httpRespCode,this.options.cancelResponseFetchRespBody=e.httpRespBody,$(".sent-files-rhp,.context-board-view").removeClass("cursor-wait")},this))},this),_.bind(function(e){this.options.getEtagResponseFetchHttpCode=e.httpRespCode,this.options.getEtagResponseFetchRespBody=e.httpRespBody,$(".sent-files-rhp,.context-board-view").removeClass("cursor-wait")},this))},openSignAgreement:function(e){return this.options.esInitialized||s.opFactory.create("InitializeEchoSignOp",this.options).run(),s.opFactory.create("OpenSignAgreementOp",this.options).run({model:e})},getSignThumbnail:function(e){return this.options.esInitialized||s.opFactory.create("InitializeEchoSignOp",this.options).run(),s.opFactory.create("GetSignAgreementThumbnailOp",this.options).run(e.workflowId,e.size,e.NeedIDInResponse,e.ItemID)},_initWrappers:function(){this.$onSignedIn=this.$(".on-signed-in"),this.$onSignedOut=this.$(".on-signed-out"),this.$offlineView=this.$(".files-offline-view"),this.$noAccessView=this.$(".files-no-access-view"),this.$contextBoard=this.$(".context-board-view")},_renderChildViews:function(){var e=this.options.collectionsUiModel.get("mode");if("desktop"===e){if(this._pluginOptions&&this._pluginOptions.isCBView)return this._renderContextBoardView(),this.$offlineView.hide(),this.$onSignedIn.hide(),this.$onSignedOut.hide(),this.$noAccessView.hide(),void this.$contextBoard.show();this.$contextBoard.hide(),this.options.appApi.networkConnectivityApi.isOnline()?this.options.appApi.sessionApi.isSignedInReader()?this.options.appApi.sessionApi.ensureSignedIn().then(_.bind(function(){this.$onSignedIn.show(),this.$onSignedOut.hide(),this.$offlineView.hide(),this.$noAccessView.hide(),this.$contextBoard.hide(),this._renderOnSignedOutView(),this._renderOnSignedInView()},this),_.bind(function(e){e&&"NoAccessToPdfServices"===e.errorString&&(this.$onSignedIn.show(),this.$onSignedOut.hide(),this.$offlineView.hide(),this.$noAccessView.hide(),this.$contextBoard.hide(),this._renderOnSignedInView())},this)):(this.$onSignedOut.show(),this.$onSignedOut.addClass("unselectable"),this.$onSignedIn.hide(),this.$offlineView.hide(),this.$noAccessView.hide(),this.$contextBoard.hide(),this._renderOnSignedOutView()):(this.$offlineView.show(),this.$onSignedIn.hide(),this.$onSignedOut.hide(),this.$noAccessView.hide(),this.$contextBoard.hide(),this._renderOfflineView())}else this.$onSignedIn.show(),this.$onSignedOut.hide(),this.$offlineView.hide(),this.$noAccessView.hide(),this.$contextBoard.hide(),this._renderOnSignedInView()},_renderOnSignedInView:function(){this._renderChildView("_onSignedInView",s.OnSignedInView,this.$onSignedIn)},_renderOnSignedOutView:function(){this._renderChildView("_onSignedOutView",s.OnSignedOutView,this.$onSignedOut)},_renderOfflineView:function(){var e={workflowName:c.AGREEMENT_HEADER};this._renderChildView("_filesOfflineView",t.FilesOfflineView,this.$offlineView,e)},_renderNoAccessView:function(){this._renderChildView("_filesNoAccessView",t.FilesNoAccessView,this.$noAccessView)},_renderContextBoardView:function(){var e=!1,t=!1,i="list",n=!1;this._pluginOptions&&(i=this._pluginOptions.requestAgent,"Tracking"==i?(e=!1,t=!0):"recent"==i?(e=!1,t=!1):(e=!0,n=!0)),this.$cbView=this._renderChildView("_sentFilesRhpView",s.SignatureFilesRhpView,this.$contextBoard,{hidePreview:e,showRemoveFromTracking:t,agent:i,isDocView:n})},_whenSignedInFunction:function(){var e,t=this.options;e=t.appApi.baseFilesUrisApi.getSendApiUri(),e=r.extractRootUrl(e),this._requestWorkflowData(),t.collectionsUiModel.initializeFromCohorts(t.appApi.usersMeApi.getUserCohorts())},_startPlugin:function(){var e=this._startingPluginPromise,t=this.options.collectionsUiModel.get("mode");return this._pluginOptions&&this._pluginOptions.isCBView?void this._renderForStartup():(e?("desktop"===t&&this._requestWorkflowData(),this._renderForStartup()):(this._whenSignedInFunction(),e=this._startingPluginPromise=s.opFactory.create("StartingPluginOp",this.options).run().then(_.bind(function(){"desktop"===t&&this._addAppApiCallbacks(),this._renderForStartup()},this))),e)},_addAppApiCallbacks:function(){var e=(this.options,this.options.appApi),t=e.sessionApi,i=e.networkConnectivityApi;t.removeSignedInChangeCallback(this._onSignedInChange),t.removeESSignedInChangeCallback(this._refreshUI),i.removeNetworkConnectivtyChangeCallback(this._onConnectionChanged),t.addSignedInChangeCallback(this._onSignedInChange),t.addESSignedInChangeCallback(this._refreshUI),i.addNetworkConnectivtyChangeCallback(this._onConnectionChanged)},_onSignedInChange:function(e,t){t?this._isSelected&&(this.deselectPlugin(),this.selectPlugin(this._pluginOptions)):($(".page-main-container").removeClass("sent-files-container"),this.options.selectionUiModel.clearSelection(),this.releasePlugin(),this._renderForStartup())},_onConnectionChanged:function(e,t){t?(this.deselectPlugin(),this.selectPlugin(this._pluginOptions)):($(".page-main-container").removeClass("sent-files-container"),this._renderForStartup())},_renderForStartup:function(){var t=this.options.selectionUiModel;e.Util.isCEF()||t.clearSelection(),this.render(),this.options.appApi.displayApi.showSpinner(!1)},_processRouterArgs:function(){var e,t,i,n=s.selector.routerArgs,o=this.options,a=$.Deferred();return n?(e=n.parcelID,this._startingPluginPromise.then(_.bind(function(){var n;i=o.appApi.baseFilesUrisApi.getSendApiUri(),i=r.extractRootUrl(i),t=new s.ParcelModel({parcel_id:e},{rootUrl:i}),t.fetch().then(_.bind(function(e){n=_.extend({},o,{},{parcelModel:e})},this,t))},this))):a.resolve(),delete s.selector.routerArgs,a.promise()},_changeModeToDesktop:function(){var e=this.options,t=e.collectionsUiModel.get("mode");"web"===t&&e.collectionsUiModel.set("mode","desktop")},_onModeChange:function(){var e=this.options,t=e.collectionsUiModel,i=e.selectionUiModel,s=t.get("mode");"desktop"===s?(t.set("checkbox",!1),i.set("multiple_selection",!0)):"web"===s&&(t.set("checkbox",!0),i.set("multiple_selection",!0))},_onViewEvent:function(t,i){"ParcelPreview_Close"===t&&this._renderChildViews(),e.View.prototype._onViewEvent.call(this,t,i)},_setContextBoardModel:function(e){if(this.$cbView&&e.model){_.extend(this._pluginOptions,e.pluginOptions);var t=!1,i=!1,s=!0,n=!1;"Tracking"==this._pluginOptions.requestAgent?(n=this._pluginOptions.isUnaccepted,i=!0):"recent"==this._pluginOptions.requestAgent?i=!1:t=!0;var o={hidePreview:t,showRemoveFromTracking:i,expandParticipantsAccodian:s,isUnaccepted:n,notificationID:this._pluginOptions.notificationID};_.extend(this.$cbView.options,o),_.each(this.$cbView.getChildViews(),function(e){_.extend(e.options,o)}),this.options.selectionUiModel.clearSelection(),this.options.selectionUiModel.updateSelectedItemModel(e.model,!1),this.$cbView._setModel(e.model,!0)}},_refreshUI:function(){this.options.isInSearchResultsView||this.options.appApi.rnaApi.done(_.bind(function(e){e.rnaFileAPI.getWorkflowData(l.SIGN).done(_.bind(function(e){e&&(this._workflow_status_code!=e.status_code&&(this._workflow_status_code=e.status_code,200!=this._workflow_status_code&&this.options.appApi.pluginsApi.isPluginSelected(this.options.pluginId)&&!this.options.appApi.pluginsApi.isNativeViewSelected()&&this.options.appApi.networkConnectivityApi.isOnline()&&this.options.appApi.errorApi.enqueueAjaxError({status:e.status_code,responseText:e.status_message})),this.options.parcelCollection.reset(),this.options.parcelCollection.pushData(e),this.options.collectionsUiModel.set("sort_key",e.sortBy),this.options.collectionsUiModel.set("sort_order",e.sortOrder),this.render())},this))},this))}}),s.HomeViewView}),define("acplugins/signatures/js/signature",["acplugins/signatures/js/ac-signature","pdmplugins/esign/js/ac-esign-init","acplugins/signatures/js/ops/op-factory","acplugins/signatures/js/views/signature-home-view-view"],function(e){_.extend(e,{init:function(){e.opFactory=new e.OpFactory}})}),define("acplugins/uss-search/js/ops/plugin/running-plugin-op",["core/ac-core","acplugins/uss-search/js/ac-uss-search","acplugins/signatures/js/ac-signature","acplugins/signatures/js/signature","core/ops/op"],function(e,t,i){return t.RunningPluginOp=e.Op.extend({run:function(){var e,s,n=this.options,o=n.ussSearchModel,a=t.opFactory,r=i.opFactory;return n.appApi.rnaApi.done(function(t){e=t.rnaServicesAPI.isParcelHidden(),s=t.rnaServicesAPI.isReviewHidden(),o.set("search_disabled",{review:e||s,parcel:e,sign:t.rnaServicesAPI.isSignatureSearchDisabled()}),o.set("search_hidden",{review:e||s,parcel:e,sign:t.rnaServicesAPI.isSignatureHidden()})}),n.appApi.inactivityApi.setIdleTimeout(36e5),$.when(a.create("ListeningForViewEventsOp",n).run(),r.create("InitializeEchoSignOp",this.options).run({}))}}),t.RunningPluginOp}),define("acplugins/uss-search/js/ops/plugin/starting-plugin-op",["core/ac-core","acplugins/uss-search/js/ac-uss-search","core/ops/op"],function(e,t){return t.StartingPluginOp=e.Op.extend({run:function(){var i,s=this.options;return i=e.opFactory.create("InstantiatingConnectorsByCohortOp",s).run({pluginsUiModel:s.searchViewsUiModel,inSearchView:!0}),t.opFactory.create("RunningPluginOp",s).run(),i}}),t.StartingPluginOp}),define("acplugins/uss-search/js/ops/op-factory",["core/ac-core","acplugins/uss-search/js/ac-uss-search","acplugins/uss-search/js/ops/uss-search-views/loading-uss-search-views-op","acplugins/uss-search/js/ops/uss-search-views/close-uss-search-op","acplugins/uss-search/js/ops/uss-search-views/selecting-uss-search-view-op","acplugins/uss-search/js/ops/uss-search-views/update-search-views-visibility-op","acplugins/uss-search/js/ops/listening/listening-for-view-events-op","acplugins/uss-search/js/ops/searching/echo-sign-files-search-op","acplugins/uss-search/js/ops/searching/recent-files-search-op","acplugins/uss-search/js/ops/plugin/initializing-plugin-op","acplugins/uss-search/js/ops/plugin/running-plugin-op","acplugins/uss-search/js/ops/plugin/starting-plugin-op"],function(e,t){t.OpFactory=e.Op.extend({create:function(e,i){var s=t[e];
return s?new s(i):void LOG(0,"AcHome.OpFactory.create: Unrecognized class: "+e)}})}),define("acplugins/ac-bh",[],function(){var e=Ac.Bh;return e||(e=Ac.Bh={}),e}),define("acplugins/uss-search/js/templates/plugin-template",[],function(){return'<div class="home-tool">    <div role="navigation"    <% if (pluginSelectorId.length > 0) { %>          aria-labelledby="<%= pluginSelectorId %>"    <% } %>>        <div class="home-views-selector ui-theme theme-container search-views-selector" role="menubar"             aria-controls="home-views-content-<%= viewId %>"         <% if (pluginSelectorId.length > 0) { %>              aria-labelledby="<%= pluginSelectorId %>"         <% } %>></div>    </div>   <div class="search-results-header ui-theme theme-container"></div>   <div class="search-results-no-results ui-theme theme-container"></div>   <div class="search-results-placeholder ui-theme theme-container"></div><div class="search-results-scroll-bar-wrap ui-theme theme-container">   <div id="home-views-content-<%= viewId %>"         class="home-views-content ui-theme theme-container search-views-content" role="main"></div>  <div class="search-results-cover-bar ui-theme theme-container"></div></div>    <div class="context-board-view ui-theme theme-container context-board-rhp search-context-board"></div> </div></div>'}),define("acplugins/uss-search/js/templates/uss-search-category-error-template",[],function(){return'<div class="search-category-error"><div class="shared-workflow-heading search-category-error-text theme-text"><%= categoryName %></div><div class="search-category-error-message search-category-error-text theme-text"><div class="search-category-error-image search-category-error-text"></div><div class="search-category-error-text theme-text"><%= categoryErrorMessage %></div></div></div>'}),define("acplugins/build-num",{pluginBuildNumber:"000001"}),define("acplugins/bh-plugin-view",["core/ac-core","acplugins/ac-bh","core/views/plugin-content-view"],function(e,t){return t.PluginView=e.PluginContentView.extend({getAppApiVersion:function(){return Ac.Plugins.groups.blue_heron.FRAMEWORK_VERSION}}),t.PluginView}),define("acplugins/uss-search/js/templates/uss-search-results-summary-template",[],function(){return'<table class="summery-table"><tr><td class="summery-column"><div class="search-results-label theme-text"><%= searchResultsLabel %></div><div class="spinner-xsmall search-status-pending"></div></td><td class="close-column"><div role = "button" class = "search-results-close app-center-section-list-cta theme-list-item-text theme-primary-button theme-primary-button-label" title="<%= SearchResultsCloseTip %>" aria-label="<%= SearchResultsCloseTip %>" tabindex="1"><%=SearchResultsClose%></div></td></tr></table>'}),define("acplugins/uss-search/js/views/uss-search-results-summary-view",["core/ac-core","acplugins/uss-search/js/ac-uss-search","acplugins/uss-search/js/templates/uss-search-results-summary-template","i18n!acplugins/uss-search/js/nls/ui-strings","core/views/view"],function(e,t,i,s){t.SearchResultsSummaryView=e.View.extend({events:{"click .search-results-close":"_onSearchResultsClose"},initialize:function(){e.View.prototype.initialize.call(this),this._template=_.template(i)},_onSearchResultsClose:function(){t.opFactory.create("CloseUSSSearchOp",this.options).run()},_initWrappers:function(){this.$message=this.$(".search-results-label"),this.$statusPending=this.$(".search-status-pending"),this.$closeBtn=this.$(".search-results-close")},render:function(){return e.View.prototype.render.call(this),0===this.$el.children().length&&(this.$el.html(this._template({searchResultsLabel:s.SEARCH_RESULTS_LABEL,SearchResultsCloseTip:s.SEARCH_CLOSE_LABEL,SearchResultsClose:s.SEARCH_CLOSE})),this._initWrappers(),this._updateUIForAV2(),this._addModelEventListeners()),this._updateMessageContent(),this._updateStatusPending(),this},_updateUIForAV2:function(){var e=this.options.appApi,t=!1;t=e.isAppUsingAV2UI(),t&&this.$closeBtn.remove()},_addModelEventListeners:function(){this.listenTo(this.options.ussSearchModel,"change:search_status",this._updateStatusPending)},_updateStatusPending:function(){this.options.ussSearchModel.isSearchClosed()?this.$statusPending.hide():this.$statusPending.show()},_updateMessageContent:function(){var e=this.options.searchUiModel.get("mru_query")||this.options.search_query;this.$message.html(_.template(s.SEARCH_RESULTS_LABEL,{searchQuery:e}))}})}),define("acplugins/uss-search/js/templates/uss-search-results-placeholder-template",[],function(){return'<div class="review-list-item-filename placeholder skeleton ui-theme placeholder-skeleton-theme" style="left:32px;top:0px;height:20px;">   </div>   <div class="shared-workflow-files-body placeholder ui-theme theme-container">       <div class="shared-workflow-files-header placeholder theme-container theme-file-list-row-border">           <div class="review-list-header-info-container placeholder">               <div class="review-list-header-file theme-text placeholder"><%= name %></div>               <div class="review-list-header-sharing theme-text placeholder"><%= sharing %></div>               <div class="review-list-header-lastactivity theme-text placeholder"><%= sortorder %></div>               <div class="review-list-header-size theme-text placeholder"><%= size %></div>           </div>       </div>       <div class="shared-collection-items placeholder">       </div>   </div>'}),define("acplugins/uss-search/js/templates/uss-search-results-virgo-items-placeholder-template",[],function(){return'<div class="shared-workflow-list-item theme-container theme-file-list-row-border">   <div class="shared-list-item-info-container">       <div class="shared-list-preview-img-cn placeholder skeleton ui-theme placeholder-skeleton-theme"></div>       <div class="review-list-item-filename placeholder skeleton ui-theme placeholder-skeleton-theme"></div>       <div class="review-list-item-sharing placeholder skeleton ui-theme placeholder-skeleton-theme"></div>       <div class="review-list-item-create-date placeholder skeleton ui-theme placeholder-skeleton-theme"></div>       <div class="review-list-item-size placeholder skeleton ui-theme placeholder-skeleton-theme"></div>    </div></div>'}),define("acplugins/uss-search/js/views/uss-search-results-placeholder-view",["core/ac-core","acplugins/uss-search/js/ac-uss-search","acplugins/uss-search/js/templates/uss-search-results-placeholder-template","acplugins/uss-search/js/templates/uss-search-results-virgo-items-placeholder-template","i18n!core/nls/ui-strings","core/views/view"],function(e,t,i,s,n){return t.SearchResultsPlaceHolderView=e.View.extend({initialize:function(){e.View.prototype.initialize.call(this),this._template=_.template(i),this._rowTemplate=_.template(s)},render:function(){return e.View.prototype.render.call(this),0===this.$el.children().length&&(this.$el.html(this._template({name:n.VIRGO_NAME,sharing:n.VIRGO_HDR_SHARE,sortorder:n.VIRGO_OPENED,size:n.VIRGO_SIZE})),this.$placeholder_list=this.$(".shared-collection-items.placeholder"),this._populatePlaceholderRows(),this._addAppApiCallbacks()),this},_addAppApiCallbacks:function(){this.options.appApi.windowApi.addWindowResizeCallback(this._populatePlaceholderRows)},_populatePlaceholderRows:function(){this.$placeholder_list.empty();for(var e=this.$el.height()/62;0<e--;)this.$placeholder_list.append(this._rowTemplate())}}),t.SearchResultsPlaceHolderView}),define("acplugins/uss-search/js/templates/uss-search-selector-template",[],function(){return'<div class="home-view-selector search-section-selector theme-vertical-tab theme-virgo-basic-text plugin-selector"        role="menuitemradio"        aria-checked="false" tabindex="0">    <div class="home-view-selector-label search-selector-label unselectable"><%= label %>    </div>    <div class=" search-selector-label search-selector-icon unselectable"></div>    <div class=" search-selector-label search-selector-count unselectable"></div></div>'}),define("acplugins/uss-search/js/templates/uss-search-section-selector-template",[],function(){return'<div class="home-views-section search-views-section ui-theme theme-container"        role="group" aria-labelledby="section-label-<%= viewId %>"><div role="heading" aria-level="3">    <div class="home-views-section theme-page-header search-section-label section-label unselectable"          id="section-label-<%= viewId %>">          <%= sectionLabel %></div>    </div></div>'}),define("acplugins/uss-search/js/views/uss-search-section-selector-view",["core/ac-core","acplugins/uss-search/js/ac-uss-search","core/utils/util","acplugins/uss-search/js/templates/uss-search-section-selector-template","i18n!acplugins/uss-search/js/nls/ui-strings","core/utils/truncate","core/utils/css-util","core/utils/view-util","core/utils/sc-analytics","core/views/view"],function(e,t,i,s,n,o,a,r,l){return t.SearchSectionSelectorView=e.View.extend({events:{"click .plugin-selector":"_onPluginSelectorClick"},initialize:function(){e.View.prototype.initialize.call(this),this._addKeyEventListener(),this._addFocusEventListener(),this._template=_.template(s)},render:function(){this.$item||(this.$el.append(this._template({sectionLabel:this.options.sectionLabel,viewId:this.options.viewId})),this.$item=this.$el.children().last(),this.setElement(this.$item),this._section=this.options.section,this._selectorTemplate=this.options.selectorTemplate,this._selectorClickEvent=this.options.clickEvent,this._initWrappers());var t,i,s,o,a,r=this.options,l=r.pluginsUiModel,c=this.$el;e.View.prototype.render.call(this),c.children(".plugin-selector").remove(),i=_.template(this._getSelectorTemplate()),l.get("plugins").each(_.bind(function(e){if(o=e.id,this._getSectionName&&e.get("config").section!==this._getSectionName())return!0;if(s=e.get("selector_api"),!s)return!0;this.options.appApi.pluginsApi.addSelectorApi(o,s),s.setElement(c),s.setTemplateFunction(i);var l=e.get("tooltip");if(l&&s.setToolTip(l),a=e.get("selector_label"),a&&s.setSelectorLabel(a),delete s.$item,!e.isPluginShown())return!0;if("search_summary"===o&&this._isOfflineOrSignedOut())return!0;var d=e.get("config").search_scope;if("review"!==d&&r.ussSearchModel.isSearchCategoryHidden(d))return!0;if(s.render(),t=c.children().last(),t.data("id",o),t.attr("id",o+"-selector"),"root"==o&&(d="document_cloud"),d&&this._isOfflineOrSignedOut()&&"recent"!=d&&(d=void 0),!d&&"search_summary"!=o||"review"!==d&&r.ussSearchModel.isSearchCategoryDisabled(d)){if("sign"==d&&!this._isOfflineOrSignedOut()&&0==this.options.isSignIntegrated){var h=t.children(".search-selector-icon");h.addClass("sign"),h.show(),t[0].children[0].innerText=n.AGREEMENT_ENTERPRISE_HEADER}t.children().addClass("theme-disabled-text"),t.addClass("disabled").attr({disabled:"disabled","aria-disabled":!0})}else{t.removeClass("disabled").removeAttr("disabled aria-disabled"),t.removeClass("pending"),t.children().removeClass("theme-disabled-text");var p,u=t.children(".search-selector-count");p=d?r.ussSearchModel.getSearchModel(d):r.ussSearchModel,p?(r.searchUiModel.hasSearchFailed(d)?u.addClass("search-category-error-image"):r.searchUiModel.isSearchPending(d)?(t.addClass("pending"),u.text(n.SEARCH_PENDING_STATUS)):u.text(_.template(n.SEARCH_RESULTS_COUNT,{count:p.getSearchResultCount()})),u.show()):u.hide(),t.attr("aria-label",_.template(n.SEARCH_CATEGORY_RESULTS_ARIA_LABEL,{category:s.getSelectorLabel(),query:r.searchUiModel.get("mru_query"),count:p.getSearchResultCount()})),this.listenTo(p,"change:total_hits",_.bind(function(e,t){if(t){var i=_.template(n.SEARCH_RESULTS_COUNT,{count:t});this.text(i),this.show()}else this.hide()},u))}document.getElementById(o+"-plugin")&&t.attr({"aria-controls":o+"-plugin"}),e.set("selector_elem",t),s.setElement(t)},this)),this._initWrappers(),this._unhighlightSelection(),this._highlightSelection(),this.$selectors.filter(".disabled").removeAttr("tabindex")},_isOfflineOrSignedOut:function(){return!(this.options.appApi.networkConnectivityApi.isOnline()&&this.options.appApi.sessionApi.isSignedInReader())},_getSelectorTemplate:function(){return this._selectorTemplate},_getSelectorViewEvent:function(){return this._selectorClickEvent},_getSiteCatalystContext:function(){return this._scAnalyticsEvent},_getSectionName:function(){return this._section},selectPlugin:function(e){this.$lastActiveElement=$(document.activeElement),this._triggerViewEvent(this._getSelectorViewEvent(),{pluginId:e})},_initWrappers:function(){this.$sectionLabel=this.$(".section-label"),this.$selectors=this.$(".plugin-selector")},_getSelectedSearchCategory:function(){var e,t,i=this.options.pluginsUiModel;return e=this._isOfflineOrSignedOut()?"my_recent_files_search":i.get("selected_searched_plugin_id"),e&&(t=i.get("plugins").get(e)),t},_getSelectedSelectorElement:function(){var e=this._getSelectedSearchCategory();return e?e.get("selector_elem"):void 0},_dimDisabledItems:function(){var e,t,i=this.options,s=i.pluginsUiModel;s.get("plugins").each(function(i){return e=i.get("plugin_api"),t=i.get("selector_elem"),e&&t?void(i.get("config").search_scope||"root"==i.id||"search_summary"==i.id?t.removeClass("disabled").removeAttr("disabled aria-disabled"):t.addClass("disabled").attr({disabled:"disabled","aria-disabled":!0})):!0})},_unhighlightSelection:function(){this.$selectors.removeClass("selected").filter("[aria-pressed]").attr({"aria-pressed":!1}),this.$selectors.filter("[aria-selected]").attr({"aria-selected":!1}),this.$selectors.filter("[aria-checked]").attr({"aria-checked":!1})},_highlightSelection:function(){var e=this._getSelectedSelectorElement();e?(this.$selectors.not(e).attr("tabindex",-1),e.addClass("selected").attr("tabindex",0).filter("[aria-pressed]").attr({"aria-pressed":!0}),e.filter("[aria-selected]").attr({"aria-selected":!0}),e.filter("[aria-checked]").attr({"aria-checked":!0}),(!this.$lastActiveElement||this.$lastActiveElement&&e.attr("id")===this.$lastActiveElement.attr("id"))&&e.focus()):this.$selectors.filter(":focusable").attr("tabindex",0),this.$lastActiveElement=null},_onPluginSelectorClick:function(e){var t,i,s,n,o,a,r,c=$(e.target),d=this.options,h=d.pluginsUiModel,p=d.appApi.pluginsApi,u=d.ussSearchModel,_=d.searchUiModel;c.is(".plugin-selector")||(c=$(e.currentTarget)),t=c.data("id"),i=c.hasClass("selected"),s=c.hasClass("disabled"),n=c.hasClass("pending"),d.noHistoryEffect||h&&h.set("pending_plugin_id",t),i||s?r=l.CLICKED_NOOP:(o=!0,r=l.CLICKED),a=p.callSelectorMethod(t,"getSiteCatalystName",void 0,t,!0),a||(a=this.options.appApi.pluginsApi.callPluginMethod(t,"getSiteCatalystName",void 0,t,!0)),this._logSiteCatalystEvent([a,r]),s||n||o&&(h.set("selected_searched_plugin_id",t),this.selectPlugin(t),h.get("plugins").each(function(e){var i=p.getPluginContentId(e.id),s=$("#"+i+".search-view-content"),n="root"===e.id?"document_cloud":e.get("config").search_scope;n&&u.getSearchResultCount(n)&&_.hasSearchSucceeded(n)&&(t==e.id||"search_summary"==t)?s.show():s.hide()}),"search_summary"==t?$(".search-category-error").show():$(".search-category-error").hide(),$(".search-views-content").scroll())},_onKeyDown:function(e){var t,i,s,n=$(e.target),o=this.$el,a=!1,l=n.closest(".plugin-selector");if(!n.closest(o).length||!l.length)return a;switch(t=o.parent(),s=n.is(l),e.which){case 13:case 32:n.trigger("click"),this._consumeEvent(e),a=!0;break;case 37:case 38:i=s?r.getNextFocusableDescendant(t,!0,!0,".plugin-selector"):l,a=!0;break;case 39:case 40:s||l.focus(),i=r.getNextFocusableDescendant(t,!1,!0,".plugin-selector"),a=!0}return i&&1===i.length&&(this._consumeEvent(e),i.focus(),i.is("[role='tab']")&&i.trigger("click")),a},_onFocusIn:function(e){if(this.$selectors){var t=$(e.target),i=this.$selectors.filter(":focusable");t.is(".plugin-selector")&&(i.not(t).attr("tabindex",-1),t.attr("tabindex",0))}},_onFocusOut:function(e){if(this.$selectors){var t=$(e.target),i=this.$selectors.filter(":focusable"),s=i.filter(".selected");t.is(".plugin-selector")&&t.attr("tabindex","-1"),t.is(".plugin-selector")&&s.length&&(i.not(s).attr("tabindex",-1),s.attr("tabindex",0))}},_truncateToFit:function(){var e,t=this.$sectionLabel;t.text(this.options.sectionLabel),e=a.getFullWidth(t)-a.getExtraWidth(t),o.truncateElementText(t,e,{truncateFromRight:!0})}}),t.SearchSectionSelectorView}),define("acplugins/uss-search/js/views/uss-search-views-selector-view",["core/ac-core","acplugins/uss-search/js/ac-uss-search","core/utils/sc-analytics","core/utils/util","acplugins/uss-search/js/templates/uss-search-selector-template","i18n!core/nls/ui-strings","core/utils/truncate","core/views/view","acplugins/uss-search/js/views/uss-search-section-selector-view","acplugins/uss-search/js/views/view-events"],function(e,t,i,s,n,o,a){return t.USSSearchViewsSelectorView=e.View.extend({render:function(){var i,s,a=this.options;e.View.prototype.render.call(this),0===this.$el.children().length&&(i=_.uniq(_.pluck(this.options.pluginsUiModel.get("plugins").pluck("config"),"section")),_.each(i,_.bind(function(e){if(s=0,_.each(a.pluginsUiModel.get("plugins").models,function(t){t.get("config").section===e&&t.get("show_plugin")&&s++}),s){var i=new t.SearchSectionSelectorView(_.extend({},this.options,{section:e,sectionLabel:o[e],clickEvent:this._getSelectorClickEvent(),deleteEvent:this._getSelectorDeleteEvent(),scContext:this._getSiteCatalystContext(),enableEditing:this._enableEditing(),selectorTemplate:n}));this.addChildView(i)}},this)),this.$el.click(this._onLeftRailClick)),this._renderChildViews(),this._truncateText(),this._scrollSelectedItemIntoView()},_renderChildViews:function(){var e=this.getChildViews();_.each(e,function(e){e instanceof t.SearchSectionSelectorView&&e.render()},this)},_getSelectorClickEvent:function(){return t.ViewEvents.USS_SEARCH_VIEW_SELECTOR_CLICK},_getSelectorDeleteEvent:function(){return t.ViewEvents.USS_SEARCH_VIEW_SELECTOR_DELETE},_getSiteCatalystContext:function(){return i.FILE_LIST},_enableEditing:function(){return!0},_onLeftRailClick:function(e){var t,i=this.options,n=i.appApi;e.target===this.$el.get(0)&&(t=n.pluginsApi.callPluginMethod(i.pluginsUiModel.get("selected_plugin_id"),"hasCollectionItemCheckbox",void 0,!s.isCEF(),!0),t||n.selectionApi.clearSelection()),i.leftRailUiModel.set("is_editing",!1)},_truncateText:function(){var e=this.$(".home-view-selector-label"),t=this.options,i=t.pluginsUiModel;_.each(e,function(e){a.truncateElementText($(e),void 0,{truncateFromRight:!0})}),i.get("plugins").each(_.bind(function(e){var t=e.get("selector_elem");if(t){var i=$(t).find(".home-view-selector-label").attr("title"),s=e.get("tooltip");_.isUndefined(i)?_.isUndefined(s)||$(t).attr("title",s):($(t).find(".home-view-selector-label").removeAttr("title"),_.isUndefined(s)?$(t).attr("title",i):$(t).attr("title",i+"\n"+s)),e.set("selector_elem",$(t))}},this))},_scrollSelectedItemIntoView:function(){var e,t,i,s,n,o,a;e=this.$el,t=$(_.find(e.children().children(),function(e){return"true"===$(e).attr("aria-checked")})),!_.isUndefined(t)&&t.length&&(i=t.position().top,s=t.height(),n=e.height(),o=e.scrollTop(),0>i||i+s>n?(a=i-(n-s)/2,this.$el.scrollTop(Math.max(o+a,0))):o>i&&(a=i+(n-s)/2,this.$el.scrollTop(Math.max(o-a,0))))}}),t.USSSearchViewsSelectorView}),define("acplugins/uss-search/js/templates/uss-search-view-content-template",[],function(){return'<div class="home-view-content search-view-content plugin-content ui-theme theme-container"        role="application"></div>'}),define("acplugins/uss-search/js/views/uss-search-views-content-view",["core/ac-core","acplugins/uss-search/js/ac-uss-search","acplugins/uss-search/js/templates/uss-search-view-content-template","core/views/plugins-content-view"],function(e,t,i){t.USSSearchViewsContentView=e.PluginsContentView.extend({_getContentTemplate:function(){return i}})}),define("acplugins/uss-search/js/templates/uss-search-results-signout-template",[],function(){return'<div class="search-results-signout search-results-offline-signout"><div class="search-warning-image"/><div class="search-sign-out-prompt search-error-message theme-text">/div></div>'}),define("acplugins/uss-search/js/views/uss-search-results-signout-view",["core/ac-core","acplugins/uss-search/js/ac-uss-search","acplugins/uss-search/js/templates/uss-search-results-signout-template","i18n!acplugins/uss-search/js/nls/ui-strings","core/views/view"],function(e,t,i,s){return t.SearchResultsSignedOutView=e.View.extend({events:{"click .search-sign-in-btn":"_onSignInClick"},initialize:function(){e.View.prototype.initialize.call(this),this._addKeyEventListener(),this._template=_.template(i)},render:function(){return e.View.prototype.render.call(this),0===this.$el.children().length&&(this.$el.html(this._template()),this._initWrappers()),this.options.appApi.networkConnectivityApi.isOnline()&&!this.options.appApi.sessionApi.isSignedInReader()?this.$el.show():this.$el.hide(),this},_initWrappers:function(){this.$signOutPrompt=this.$(".search-sign-out-prompt"),this.$signOutPrompt.html(_.template(s.SEARCH_SIGNOUT_PROMPT,{prefix:'<a class="search-sign-in-btn">',suffix:"</a>"}))},_onKeyDown:function(e){return 32===e.which||13===e.which?($(e.target).click(),!0):!1},_onSignInClick:function(e){this._consumeEvent(e),this.options.appApi.displayApi.showSpinner(!0),this.options.appApi.sessionApi.ensureSignedIn().then(_.bind(function(){this.options.appApi.displayApi.showSpinner(!1)},this),_.bind(function(){this.options.appApi.displayApi.showSpinner(!1),this.$el.show()},this))}}),t.SearchResultsSignedOutView}),define("acplugins/uss-search/js/templates/uss-search-results-offline-template",[],function(){return'<div class="search-results-offline search-results-offline-signout"><div class="search-warning-image"/><div class="search-offline-prompt search-error-message theme-text">/div></div>'}),define("acplugins/uss-search/js/views/uss-search-results-offline-view",["core/ac-core","acplugins/uss-search/js/ac-uss-search","acplugins/uss-search/js/templates/uss-search-results-offline-template","i18n!acplugins/uss-search/js/nls/ui-strings","core/views/view"],function(e,t,i,s){return t.SearchResultsOfflineView=e.View.extend({events:{"click .search-offline-btn":"_onRetry"},initialize:function(){e.View.prototype.initialize.call(this),this._addKeyEventListener(),this._template=_.template(i)},render:function(){return e.View.prototype.render.call(this),0===this.$el.children().length&&(this.$el.html(this._template()),this._initWrappers()),this.options.appApi.networkConnectivityApi.isOnline()?this.$el.hide():this.$el.show(),this},_initWrappers:function(){this.$signOutPrompt=this.$(".search-offline-prompt"),this.$signOutPrompt.html(_.template(s.SEARCH_OFFLINE_PROMPT,{prefix:'<a class="search-offline-btn">',suffix:"</a>"}))},_onKeyDown:function(e){return 32===e.which||13===e.which?($(e.target).click(),!0):!1},_onRetry:function(){this.options.searchUiModel.invalidate()}}),t.SearchResultsOfflineView}),define("acplugins/uss-search/js/templates/uss-search-results-no-results-template",[],function(){return'<div class="search-results-no-results-container"><div class="search-results-no-results-image"/><div class="search-results-no-results-title theme-text"><%= title %></div><div class="search-results-no-results-content theme-text"><%= content %></div></div>'}),define("acplugins/uss-search/js/views/uss-search-results-no-results-view",["core/ac-core","acplugins/uss-search/js/ac-uss-search","acplugins/uss-search/js/templates/uss-search-results-no-results-template","i18n!acplugins/uss-search/js/nls/ui-strings","core/views/view"],function(e,t,i,s){return t.SearchResultsNoResultsView=e.View.extend({initialize:function(){e.View.prototype.initialize.call(this),this._template=_.template(i)},render:function(){return e.View.prototype.render.call(this),0===this.$el.children().length&&(this.$el.html(this._template({title:s.SEARCH_NO_RESULTS_TITLE,content:s.SEARCH_NO_RESULTS_MESSAGE})),this._initWrappers()),this._updateMessageContent(),this},_initWrappers:function(){this.$title=this.$(".search-results-no-results-title"),this.$message=this.$(".search-results-no-results-content"),this.$image=this.$(".search-results-no-results-image")},_updateMessageContent:function(){var e,t,i=this.options,n=i.searchUiModel,o=i.pluginsUiModel,a=n.get("mru_query"),r=o.get("selected_searched_plugin_id");if(r&&(e=o.get("plugins").get(r),t="root"===r?"document_cloud":e.get("config").search_scope),t)if(n.hasSearchFailed(t))this.$title.text(s.SEARCH_NO_RESULTS_ERROR),this.$message.text(s.SEARCH_NO_RESULTS_MESSAGE_ERROR),this.$image.addClass("error");else{var l=n.getPluginIdForSearchScope(t),c=i.appApi.pluginsApi.getSelectorApi(l).getSelectorLabel();this.$title.html(_.template(s.SEARCH_NO_RESULTS_TITLE,{category:c})),this.$message.html(_.template(s.SEARCH_NO_RESULTS_MESSAGE_CATEGORY,{searchQuery:a})),this.$image.removeClass("error")}else this.$title.text(s.SEARCH_NO_RESULTS_TITLE),this.$message.html(_.template(s.SEARCH_NO_RESULTS_MESSAGE,{searchQuery:a})),this.$image.removeClass("error")}}),t.SearchResultsNoResultsView}),define("acplugins/uss-search/js/views/plugin-view",["core/ac-core","files/ac-files","acplugins/ac-bh","acplugins/uss-search/js/ac-uss-search","acplugins/uss-search/js/templates/plugin-template","acplugins/uss-search/js/templates/uss-search-category-error-template","i18n!acplugins/uss-search/js/nls/ui-strings","acplugins/build-num","core/utils/util","core/utils/view-util","core/utils/sc-analytics","acplugins/bh-plugin-view","acplugins/uss-search/js/ops/op-factory","acplugins/uss-search/js/views/uss-search-results-summary-view","acplugins/uss-search/js/views/uss-search-results-placeholder-view","acplugins/uss-search/js/views/uss-search-views-selector-view","acplugins/uss-search/js/views/uss-search-views-content-view","acplugins/uss-search/js/views/uss-search-results-signout-view","acplugins/uss-search/js/views/uss-search-results-offline-view","acplugins/uss-search/js/views/uss-search-results-no-results-view"],function(e,t,i,s,n,o,a,r,l,c,d){return s.PluginView=i.PluginView.extend({initialize:function(){i.PluginView.prototype.initialize.call(this)},template:function(){return _.template(n)},render:function(){var e=this.$el,t=this.options,s=t.appApi.pluginsApi,o=t.pluginId;i.PluginView.prototype.render.call(this),0===e.children().length&&(e.html(_.template(n)({pluginSelectorId:s.getPluginSelectorId(o),viewId:_.uniqueId()})),this._initWrappers(),this._addKeyEventListener()),this._renderChildViews()},initPlugin:function(){return this._initPlugin()},selectPlugin:function(){var e=this.options.appApi;return this.options.appApi.done(_.bind(function(){this.options.appApi.displayApi.showSpinner(!1)},this)),this._startPlugin().then(_.bind(function(){return e.networkConnectivityApi.isOnline()&&e.sessionApi.isSignedInReader()?e.sessionApi.ensureSignedIn():void this._runSearchOp()},this))},getPluginVersionList:function(){var e=[r.pluginBuildNumber],t=this.options.appApi.baseFilesUrisApi.getServerVersion();return t&&e.push(t),this._getResolvedPromise(e)},getSiteCatalystName:function(){return"USS-Search"},_initWrappers:function(){this.$selector=this.$(".search-views-selector"),this.$content=this.$(".search-views-content"),this.$header=this.$(".search-results-header"),this.$noResultsView=this.$(".search-results-no-results"),this.$contextBoardView=this.$(".search-context-board"),this.$coverBarView=this.$(".search-results-cover-bar"),this.$placeHolder=this.$(".search-results-placeholder")},_renderChildViews:function(){var e=this.options;this._renderSearchHeaderView(),this._renderSearchSelectorView(),this._renderPlaceholderView(),this._renderSearchContentView(),this._renderOfflineView(),this._renderSignoutView(),this._renderNoResultsView(),e.ussSearchModel.getSearchResultCount(this.options.category)?(this.$noResultsView.hide(),this.$placeHolder.hide(),this.$content.show()):e.ussSearchModel.isSearchClosed()?(this.$content.show(),this.$placeHolder.hide(),$(".search-category-error").hide(),this.$noResultsView.show()):(this.$content.hide(),this.$placeHolder.show(),this.$noResultsView.hide())},_renderSearchContentView:function(){this._renderChildView("_ussSearchViewsContent",s.USSSearchViewsContentView,this.$content,this.options)},_renderSearchSelectorView:function(){this.options.appApi.rnaApi.done(_.bind(function(e){e.rnaSignWorkflowServicesAPI.invokeMethod({methodName:"canShowSignNativeExperience"}).done(_.bind(function(e){this.options.isSignIntegrated=!0,0===e&&(this.options.isSignIntegrated=!1),this._renderChildView("_ussSearchViewsSelector",s.USSSearchViewsSelectorView,this.$selector,this.options)},this))},this))},_renderSearchHeaderView:function(){this._renderChildView("_ussSearchViewsSummary",s.SearchResultsSummaryView,this.$header,this.options)},_renderSignoutView:function(){this.signOutView||(this.signOutView=new s.SearchResultsSignedOutView(this.options)),this.$content.prepend(this.signOutView.$el),this.signOutView.render()},_renderOfflineView:function(){this.offlineView||(this.offlineView=new s.SearchResultsOfflineView(this.options)),this.$content.prepend(this.offlineView.$el),this.offlineView.render()},_renderPlaceholderView:function(){this._renderChildView("_ussSearchPlaceholder",s.SearchResultsPlaceHolderView,this.$placeHolder,this.options)},_renderNoResultsView:function(){this.noResultsView=this._renderChildView("_ussSearchResultsNoResults",s.SearchResultsNoResultsView,this.$noResultsView,this.options)},_initPlugin:function(){var e=this._initingPluginPromise;return e||(e=this._initingPluginPromise=s.opFactory.create("InitializingPluginOp",this.options).run()),e},_startPlugin:function(){var e=this._startingPluginPromise;return this.options.appApi.displayApi.showSpinner(!1),e||(e=this._startingPluginPromise=s.opFactory.create("StartingPluginOp",this.options).run().then(_.bind(function(){return this._onSearchPluginLoaded(),this._addAppApiCallbacks(),this._addUiModelEventListeners(),this._initializeSearchQuery(),this.options.appApi.displayApi.applyUIThemeStyles(this.$el).then(_.bind(function(){this.render()},this))},this))),e},_initializeSearchQuery:function(){var e=this.options.appApi.routerApi,t=e.parseQueryParams(window.location.href.slice(window.location.href.indexOf("?")));t&&t.search&&(this.options.search_query=t.search)},_addAppApiCallbacks:function(){var e=this.options.appApi;l.isCEF()&&(e.sessionApi.addSignedInChangeCallback(this._onSignedInChange),e.connectorsApi.addConnectorsChangeCallback(this._onConnectorsChange),e.connectorsApi.addConnectorsUiHelpersChangeCallback(this._onConnectorsChange),e.networkConnectivityApi.addNetworkOnlineChangeCallback(this._onOnlineChanged),e.inactivityApi.addIdleChangeCallback(this._onIsIdleChange)),e.statusMenuApi.addStatusChangeCallback(this.options.pluginId,this._onHomeStatusChange)},_onIsIdleChange:function(e,t){t||this._runSearchOp()},_onSearchResultsClose:function(){s.opFactory.create("CloseUSSSearchOp",this.options).run()},_onSearchPluginLoaded:function(){this.options.appApi.rnaApi.done(function(e){e.invokeMethod({methodName:"loadedUSSSearch",methodArgs:""})})},_onKeyDown:function(e){if(27===e.which){if(this.options.selectionUiModel.isItemSelected()&&c.descendantHasFocus(this.$selector))this.options.selectionUiModel.clearSelection();else if(!this.options.selectionUiModel.isItemSelected())return this._onSearchResultsClose(),this._consumeEvent(e),!0}else if(117===e.which&&c.descendantHasFocus(this.$contextBoardView))return this.$selector.find(":tabbable").focus(),this.options.appApi.rnaApi.done(_.bind(function(t){t.rnaServicesAPI.f6KeyHandled({isF6Consumed:!0,shift:e.shiftKey})},this)),this._consumeEvent(e),!0;return!1},_onOnlineChanged:function(e,t){this._runSearchOp(!t)},_onSignedInChange:function(e,t){var i=this.options.appApi.connectorsApi;t?this._onConnectorsChange():(i.removeConnectorPlugins(),this._renderSignoutView()),this._runSearchOp(!t)},_onConnectorsChange:function(){var t=this.options;e.opFactory.create("InstantiatingConnectorsOp",t).run({pluginsUiModel:t.searchViewsUiModel,isInSearchResultsView:!0}).then(this.render)},_onHomeStatusChange:function(e){var t=this.options.appApi.statusMenuApi;
e===t.STATUS_IDLE&&t.showMenu(!1)},_addUiModelEventListeners:function(){var e=this.options.searchViewsUiModel,t=this.options.actionsUiModel,i=this.options.searchUiModel,s=this.options.selectionUiModel;t.addCallback("updateSearch",this._updateSearchQuery),t.addCallback("recentFilesUpdated",this._refreshRecentSearchResults),this.listenTo(e,"change:selected_plugin_id",this._onSelectedPluginIdChange),this.listenTo(e.get("plugins"),"add remove",this.render),this.listenTo(i,"change:scope_status",this._onSearchStatusChange),this.listenTo(i,"refresh_search_category",this._onRefreshCategory),this.listenTo(i,"refresh_search_count",this._onRefreshCount),this.listenTo(s,"change:selected_item_models",this._onSelectedItemModelsChange)},_refreshRecentSearchResults:function(){s.opFactory.create("RecentFilesSearchOp",this.options).run()},_onRefreshCount:function(){this.options.ussSearchModel.syncSearchResultCount()},_onSelectedItemModelsChange:function(e,t){e.isItemSelected()?(this.options.appApi.selectionApi.setSelectedItemModels(t),this.$header.hasClass("active-context-board")||(this.$header.addClass("active-context-board"),this.$contextBoardView.addClass("active-context-board"),this.$content.addClass("active-context-board"),this.$coverBarView.addClass("active-context-board"),this.$(".sticky-search-header").addClass("active-context-board")),this.options.appApi.siteCatalystApi.logVirgoRHPOpenedEvent(d.VIRGO_USS_CB)):this.$header.hasClass("active-context-board")&&(this.$header.removeClass("active-context-board"),this.$contextBoardView.removeClass("active-context-board"),this.$content.removeClass("active-context-board"),this.$coverBarView.removeClass("active-context-board"),this.$(".sticky-search-header").removeClass("active-context-board"))},_onSearchStatusChange:function(t,i){var s=this.options,n=s.searchUiModel,r=s.appApi.pluginsApi,l=s.ussSearchModel,c=s.category,d=n.getPluginIdForSearchScope(i);if(d){var h=s.pluginsUiModel.get("selected_searched_plugin_id"),p=r.getPluginContentId(d),u=$("#"+p+".search-view-content"),g=this.$("#category-error-"+d+".search-category-error");n.hasSearchSucceeded(i)&&l.getSearchResultCount(i)?(s.query=void 0,e.opFactory.create("SelectingPluginOp",s).run(d,_.extend({},s,{searchModel:l.getSearchModel(i),singleFileSelection:!0})).then(_.bind(function(){this.options.category=c},this)),g.length&&g.remove(),(h===d||"search_summary"===h)&&u.show()):n.hasSearchFailed(i)?(g.length||(g=$(_.template(o,{categoryName:r.getSelectorApi(d).getSelectorLabel(),categoryErrorMessage:a.SEARCH_CATEGORY_ERROR})).insertBefore(u),g.attr("id","category-error-"+d)),g.show(),u.hide()):0==l.getSearchResultCount(i)&&u.hide(),this.render()}},_onRefreshCategory:function(e){if(e){var i,n=this.options;n.selectionUiModel.clearSelection(),n.appApi.displayApi.showSpinner(!0),i="sign"===e?s.opFactory.create("EchoSignFilesSearchOp",n):t.opFactory.create("USSSearchingOp",_.extend({},n,{search_scope:[e]})),i.run().always(_.bind(function(){this.options.appApi.displayApi.showSpinner(!1)},this))}},_onSelectedPluginIdChange:function(e,t){var i=this.options.pluginsUiModel.get("plugins").get(t);this.options.category="root"===t?"document_cloud":i.get("config").search_scope,this.render()},_updateSearchQuery:function(e,t){this.options.search_query=t.search,this._runSearchOp()},_resetInitialState:function(){var e=this.options;e.selectionUiModel.clearSelection(),e.searchUiModel.resetToDefaults(),e.ussSearchModel.resetUSSSearchResults(),this.options.category=void 0,$(".search-view-content").hide(),$(".sticky-search-header").removeClass("sticky-search-header"),this.render()},_runSearchOp:function(i){var n,o,a,r,l,c=this.options,d=c.ussSearchModel;if(void 0!==c.search_query){this.options.appApi.rnaApi.done(function(e){e.logPerformance("GlobalSearch","start")});var h=c.appApi.networkConnectivityApi.isOnline()&&c.appApi.sessionApi.isSignedInReader()&&!i;this._resetInitialState(),c.pluginsUiModel.set("selected_searched_plugin_id","search_summary"),c.searchUiModel.set("mru_query",c.search_query);var p=new RegExp(c.search_query.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"gi");c.searchUiModel.set("mru_query_regex",p),o=s.opFactory.create("RecentFilesSearchOp",c),h?(n=e.opFactory.create("RefreshingSessionInitiallyOp",c).run(),r=s.opFactory.create("EchoSignFilesSearchOp",c),a=t.opFactory.create("USSSearchingOp",c)):(n=this._getResolvedPromise(),c.search_scope=["recent"]);var u;Ac.discoveryUrisModel&&(u=Ac.discoveryUrisModel.getUSSUrlsAndUserInfo(),c.SCserverURL=u.SCUrl,c.ACPserverURL=u.ACPUrlUSS,c.isACPuser=u.isACPUser),c.isACPuser?(c.search_scope=["creative_cloud"],d.isSearchCategoryDisabled("review")||c.search_scope.push("review")):(c.search_scope=["document_cloud"],d.isSearchCategoryDisabled("parcel")||c.search_scope.push("parcel"),d.isSearchCategoryDisabled("review")||c.search_scope.push("review"),c.ACPserverURL&&c.search_scope.push("creative_cloud")),n.then(_.bind(function(){l=h?d.isSearchCategoryDisabled("sign")?$.when(o.run(),a.run()):$.when(o.run(),a.run(),r.run({})):o.run(),l.then(_.bind(function(){d.closeSearch(),"search_summary"===c.pluginsUiModel.get("selected_searched_plugin_id")&&this._triggerViewEvent(s.ViewEvents.USS_SEARCH_COMPLETE),this.render()},this))},this))}}}),s.PluginView}),define("acplugins/uss-search/js/uss-search",["acplugins/uss-search/js/ac-uss-search","acplugins/uss-search/js/ops/op-factory","acplugins/uss-search/js/views/plugin-view"],function(e){_.extend(e,{init:function(){e.opFactory=new e.OpFactory}})}),define("acplugins/uss-search/js/plugin",["acplugins/uss-search/js/ac-uss-search","acplugins/uss-search/js/uss-search"],function(e){e.init()});