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

//rgbcolor.js had to be removed because no valid license was found for that file

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

define("acplugins/tracked-send/js/tool/ac-tracked-send",["plugins-common/ac-plugins"],function(e){e.TrackedSend||(e.TrackedSend={});var i=e.TrackedSend.Tool;return i||(i=e.TrackedSend.Tool={}),i.PLUGIN_ID||(i.PLUGIN_ID="send"),i}),define("acplugins/tracked-send/js/tool/ops/plugin/finding-upload-folder-op",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","core/utils/http-util","core/ops/op"],function(e,i,t){i.FindingUploadFolderOp=e.Op.extend({run:function(){{var i,s,o,n;this.options}return i=e.baseFilesUrisModel.getSendApiUri()+"find_upload_folder",s="POST",o=t.getRequestHeaders(s),o["Content-Type"]="application/json",n=$.ajax(i,{type:s,headers:o,success:this._successHandler,failure:this._errorHandler})},_successHandler:function(e){this.id=e.id||$.parseJSON(e).id,this.persistence=e.persistence||$.parseJSON(e).persistence},_errorHandler:function(e,t,s){LOG.error("/find_upload_folder failed, called from FindingUploadFolderOp, textStatus="+t+", errorThrown="+s,{logServer:!0,plugin:i.PLUGIN_ID})}})}),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/tool/ops/plugin/getting-authenticated-models-op",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","i18n!acplugins/tracked-send/js/nls/ui-strings","i18n!core/nls/ui-strings","core/ops/op"],function(e,i){i.GettingAuthenticatedModelsOp=e.Op.extend({run:function(){var i,t=this.options;return i=t.sendFilesUiModel.get("enable_autocomplete"),i&&t.autoCCollection.fetchAll(),e.Util.isCEF()?$.when(t.brandingModel.fetch({global:!1}),t.limitsModel.fetch({global:!1})):$.when(t.brandingModel.fetch(),t.limitsModel.fetch())}})}),define("acplugins/tracked-send/js/tool/ops/plugin/mocking-unauthenticated-session-op",["core/ac-core","app/ac-app","acplugins/tracked-send/js/tool/ac-tracked-send","i18n!acplugins/tracked-send/js/nls/ui-strings","i18n!core/nls/ui-strings","core/utils/ajax-util","core/ops/op"],function(e,i,t,s,o,n){t.MockingUnauthenticatedSessionOp=e.Op.extend({run:function(){var e=this.options;return n.addGlobalAjaxHandlers({ajaxSend:this._onAjaxSend}),i.Handling401ErrorOp.prototype.run=_.bind(function(){this._isAuthenticated||alert("Made API call!")},this),e.appApi.sessionApi.isSignedIn=this._isSignedIn,e.appApi.sessionApi.ensureSignedIn=this._ensureSignedIn,this._isAuthenticated=!1,this._getResolvedPromise()},_onAjaxSend:function(e,i){this._isAuthenticated||i.setRequestHeader("Authorization","")},_isSignedIn:function(){return this._isAuthenticated},_ensureSignedIn:function(){var e=$.Deferred();return _.delay(_.bind(function(){this._isAuthenticated=!0,e.resolve()},this),5e3),e.promise()}})}),define("acplugins/tracked-send/js/utils/ts-utils",[],function(){var e={extractRootUrl:function(e){var i=document.createElement("a");return i.href=e,i.protocol+"//"+i.host}};return e}),define("acplugins/tracked-send/js/utils/sc-constants",["plugins-common/ac-plugins"],function(e){e.TrackedSend||(e.TrackedSend={});var i=e.TrackedSend;return i.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 "},i.ScConstants}),define("acplugins/tracked-send/js/tool/models/ui/customize-recipient-page-dialog-ui-model",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","core/models/model"],function(e,i){return i.CustomizeRecipientPageDialogUiModel=e.UiModel.extend({initialize:function(i,t){e.UiModel.prototype.initialize.call(this,i,t)},defaults:{use_saved:!0,renditionAvailable:!1},recognized:{logo:{type:"string",optional:!1},color:{type:"string",optional:!1},use_saved:{type:"boolean",optional:!0},renditionAvailable:{type:"boolean",optional:!1},customize_recipient_page_color:{type:"boolean",optional:!0},user_action_id:{type:"string",optional:!0},user_action_name:{type:"string",optional:!0}},allowedImageMimetypes:["application/pdf","application/postscript","application/illustrator","application/x-photoshop","image/bmp","image/gif","image/jpeg","image/jpg","image/pjpeg","image/png","image/svg+xml","image/tiff","image/vnd.adobe.photoshop","image/x-png"],allowedImageExtensions:[".ai",".bmp",".eps",".gif",".jpeg",".jpg",".pdf",".png",".ps",".psd",".svg",".tiff"]}),i.CustomizeRecipientPageDialogUiModel}),define("acplugins/tracked-send/js/tool/models/autocomplete-model",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","core/models/model"],function(e,i){return i.AutocompleteModel=e.Model.extend({idAttribute:"email",initialize:function(i,t){e.Model.prototype.initialize.call(this,i,t),this.rootUrl="",t.collection&&(this.rootUrl=t.collection.rootUrl),t.rootUrl&&(this.rootUrl=t.rootUrl)},url:function(){return this.rootUrl+"a/api/autoc/emails"}}),i.AutocompleteModel}),define("acplugins/tracked-send/js/tool/collections/autocomplete-collection",["acplugins/tracked-send/js/tool/ac-tracked-send","core/utils/http-util","acplugins/tracked-send/js/tool/models/autocomplete-model"],function(e,i){return e.AutocompleteCollection=Backbone.Collection.extend({model:e.AutocompleteModel,initialize:function(e,i){Backbone.Collection.prototype.initialize.call(this,e,i),this.rootUrl=i.rootUrl,this.set({models:[]})},url:function(){return this.rootUrl+"/a/api/autoc/email"},fetch:function(e){return e=i.customizeOptions("GET",e),Backbone.Collection.prototype.fetch.call(this,e)},fetchNext:function(){var e={};return this.next_context&&(e.data=_.extend({},{context:this.next_context,sofar:this.length},e.data)),e.global=!1,e.remove=!1,this.fetch(e)},fetchAll:function(){this.fetchNext().then(_.bind(this.fetchComplete,this))},fetchComplete:function(){this.next_context&&this.fetchAll()},parse:function(e){e.emails;return this.next_context=e.next_context,e.emails},setRUrl:function(e){this.rootUrl=e}}),e.AutocompleteCollection}),define("acplugins/tracked-send/js/tool/ops/plugin/starting-plugin-op",["core/ac-core","files/ac-files","acplugins/tracked-send/js/tool/ac-tracked-send","acplugins/tracked-send/js/utils/ts-utils","acplugins/tracked-send/js/utils/sc-constants","core/ops/op","acplugins/tracked-send/js/tool/models/ui/customize-recipient-page-dialog-ui-model","acplugins/tracked-send/js/tool/collections/autocomplete-collection"],function(e,i,t,s,o){t.StartingPluginOp=e.Op.extend({run:function(){var o,n=e.modelFactory,l=e.uiModelFactory,a=i.uiModelFactory,r=t.modelFactory,c=this.options;e.Util.isCEF()||(o=c.appApi.baseFilesUrisApi.getSendApiUri(),o=s.extractRootUrl(o)),_.extend(c,{baseUrisModel:n.create("BaseUrisModel"),folderModel:n.create("FolderModel"),sessionModel:n.create("SessionModel"),collectionsUiModel:l.create("CollectionsUiModel"),selectionUiModel:l.create("SelectionUiModel"),dialogsUiModel:l.create("DialogsUiModel"),folderUiModel:l.create("FolderUiModel"),fullPreviewUiModel:l.create("FullPreviewUiModel"),menusUiModel:l.create("MenusUiModel"),searchUiModel:l.create("SearchUiModel"),sortUiModel:l.create("SortUiModel"),filesUiModel:a.create("FilesUiModel"),brandingModel:r.create("UsersMeBrandingModel",void 0,c),permanentLogoId:""}),c.autoCCollection=new t.AutocompleteCollection([],{rootUrl:o}),this._registerDropHandler(c.rootView.$el)},_registerDropHandler:function(e){var i=this.options,s=i.appApi.siteCatalystApi;e.bind("drop dragover",function(e){e.preventDefault()}),e.on("drop",function(e){var n=e.originalEvent.dataTransfer.files,l=n.length,a=o["11_OR_MORE"];1===l&&(a=o[1]),l>1&&6>l&&(a=o["2_TO_5"]),l>5&&11>l&&(a=o["6_TO_10"]),s.logScEvent([o.TOOLS,o.SHARE,o.DRAG_FILES,a]),t.opFactory.create("AddFilesOp",_.extend({},i,{uiModel:i.sendFilesUiModel,selectionApi:i.appApi.selectionApi,appApi:i.appApi})).run({localFiles:n}).then(function(){i.sendFilesUiModel.set({active_view:"workflow"})})})}})}),define("acplugins/tracked-send/js/tool/ops/plugin/showing-sign-in-op",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","i18n!acplugins/tracked-send/js/nls/ui-strings","i18n!core/nls/ui-strings","core/ops/op"],function(e,i){i.ShowingSignInOp=e.Op.extend({run:function(){return this._getResolvedPromise()}})}),define("acplugins/tracked-send/js/tool/ops/desktop-getting-subscription-levels-op",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","acplugins/tracked-send/js/utils/ts-utils","core/ops/op"],function(e,i,t){i.DesktopGettingSubscriptionLevels=e.Op.extend({run:function(){return this.validateRegistry().then(_.bind(function(){return this.readFromRegistry()},this),_.bind(function(){return this.options.appApi.sessionApi.ensureSignedIn().then(_.bind(function(){return this.authenticatingFirstTime()},this))},this))},authenticatingFirstTime:function(){return this.options.appApi.sessionApi.ensureSignedIn().then(_.bind(function(){return this.preModelFetchValues(),i.opFactory.create("GettingAuthenticatedModelsOp",this.options).run().then(_.bind(function(){return this.setModelValues(),this.writeToRegistry()},this))},this),_.bind(function(){return $.Deferred().reject().promise()},this))},setModelValues:function(){var i,t,s=e.Features.getFeature("enable_sender_survey"),o=!1,n=!1,l=this.options.appApi.usersMeApi.getUserCohorts();this._uiModel=this.options.sendFilesUiModel.set({limits_model:this.options.limitsModel}),i=this._uiModel.get("limits_model"),t=i.get("can_custom_brand"),l&&"enabled"===l["ts-sender-survey"]&&(o=!0),this._uiModel.set({customize_recipient_page:n,customize_recipient_page_enabled:t,enable_sender_survey:s&&o}),this.options.sendFilesUiModel=this._uiModel,this.options.sendFilesUiModel.initializeFromCohorts(l)},setModelValuesFromRegistry:function(){var e,i,t=this.registryResponse.Features.enableSenderSurvey,s=!1,o="true"===this.registryResponse.Branding.buttonEnabled?!0:!1,n=this.getCohortsFromRegistryResponse();this.options.limitsModel.set({can_custom_brand:this.registryResponse.Limits.canCustomBrand,can_send_to_individuals:this.registryResponse.Limits.canSendPersonalized,can_send_av:this.registryResponse.Limits.canSendAV,account_type:this.registryResponse.User.accountType}),this._uiModel=this.options.sendFilesUiModel.set({limits_model:this.options.limitsModel}),this.options.brandingModel.set({logo:this.registryResponse.Branding.logo?!0:""}),e=this._uiModel.get("limits_model"),i=e.get("can_custom_brand"),n&&"enabled"===n["ts-sender-survey"]&&(s=!0),this._uiModel.set({customize_recipient_page:o,customize_recipient_page_enabled:i,enable_sender_survey:t&&s}),this.options.sendFilesUiModel=this._uiModel,this.options.sendFilesUiModel.initializeFromCohorts(n),this.populateAutoCCollectionFromRegistry()},preModelFetchValues:function(){var e,i;e=this.options.appApi.baseFilesUrisApi.getSendApiUri(),e=t.extractRootUrl(e),i=this.options.appApi.baseFilesUrisApi.getAlternateUploadUri(),this.options.rootUrl=e,this.options.uploadUrl=i,this.options.limitsModel.setRUrl(this.options.rootUrl),this.options.brandingModel.setRUrl(this.options.rootUrl),this.options.autoCCollection.setRUrl(this.options.rootUrl)},readFromRegistry:function(){return this.options.appApi.rnaApi.then(_.bind(function(e){var i={prefName:"SendTrack"};return e.registryAPI.getRegistryContents(i).then(_.bind(function(e){return this.registryResponse=JSON.parse(e),this.setModelValuesFromRegistry(),this.options.readRegistry=!0,$.Deferred().resolve().promise()},this),_.bind(function(){return $.Deferred().reject().promise()},this))},this),_.bind(function(){return $.Deferred().reject().promise()},this))},writeToRegistry:function(){var e=this.makeRegistryHierarchy(),i=JSON.stringify(e),t={prefName:"SendTrack",data:i};return this.options.appApi.rnaApi.then(_.bind(function(e){e.registryAPI.setRegistryContents(t).then(_.bind(function(e){return e?$.Deferred().resolve().promise():$.Deferred().reject().promise()},this),_.bind(function(){return $.Deferred().reject().promise()},this))},this),_.bind(function(){return $.Deferred().reject().promise()},this))},validateRegistry:function(){return this.options.readRegistry?this.options.appApi.rnaApi.then(_.bind(function(e){var i={prefName:"SendTrack"};return e.registryAPI.checkIfRegistryExists(i).then(_.bind(function(e){return e?$.Deferred().resolve().promise():$.Deferred().reject().promise()},this),_.bind(function(){return $.Deferred().reject().promise()},this))},this),_.bind(function(){return $.Deferred().reject().promise()},this)):$.Deferred().reject().promise()},makeRegistryHierarchy:function(){var i=this.options.sendFilesUiModel,t=this.options.brandingModel,s=i.get("limits_model"),o=this.options.appApi.usersMeApi.getUserCohorts(),n={Limits:{canCustomBrand:s.get("can_custom_brand"),canSendAV:s.get("can_send_av"),canSendPersonalized:s.get("can_send_to_individuals")},Branding:{buttonEnabled:!1,logo:t.get("logo")?!0:!1},Cohorts:{respondBackOptions:_.isUndefined(o["ts-respond-back-1"])?"disabled":o["ts-respond-back-1"],chickletsEnabled:_.isUndefined(o["ts-chicklets"])?"enabled":o["ts-chicklets"]},Features:{enableSenderSurvey:e.Features.getFeature("enable_sender_survey")?!0:!1},User:{accountType:_.isUndefined(this.options.appApi.usersMeApi.getUserIdentity().account_type)?"":this.options.appApi.usersMeApi.getUserIdentity().account_type,Email:_.isUndefined(this.options.appApi.usersMeApi.getUserIdentity().email)?"":this.options.appApi.usersMeApi.getUserIdentity().email,addressList:this.getEmailAddressListString()}};return n},getEmailAddressListString:function(){var e="";return _.each(this.options.autoCCollection.models,function(i){(_.isUndefined(i.get("isLocalContact"))||i.get("isLocalContact")===!1)&&(e+=i.id,e+=";")}),!_.isUndefined(this.options.recipientsAreFinalized)&&this.options.recipientsAreFinalized&&_.each(this.options.recipients,function(i){i&&-1===e.search(i)&&(e+=i,e+=";")}),e},populateAutoCCollectionFromRegistry:function(){var e,i=this.options.autoCCollection;_.isUndefined(this.registryResponse.User)||_.isUndefined(this.registryResponse.User.addressList)||(e=this.registryResponse.User.addressList.split(";"),e.pop(),_.each(e,function(e){i.add({email:e,isLocalContact:!1})}))},getCohortsFromRegistryResponse:function(){var e=[];return _.isUndefined(this.registryResponse.Cohorts)||(e["ts-respond-back-1"]=this.registryResponse.Cohorts.respondBackOptions,e["ts-chicklets"]=this.registryResponse.Cohorts.chickletsEnabled),e}})}),define("acplugins/tracked-send/js/tool/ops/desktop-fetching-autocomplete-list-op",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","acplugins/tracked-send/js/utils/ts-utils","core/ops/op"],function(e,i,t){i.DesktopFetchingAutocompleteListOp=e.Op.extend({run:function(){var e,i=this.options.sendFilesUiModel.get("enable_autocomplete");return i?this.options.appApi.sessionApi.ensureSignedIn().then(_.bind(function(){return e=this.options.appApi.baseFilesUrisApi.getSendApiUri(),e=t.extractRootUrl(e),this.options.rootUrl=e,this.options.autoCCollection.setRUrl(this.options.rootUrl),this.options.autoCCollection.fetchAll(),this._getResolvedPromise()
},this)):void 0}})}),define("acplugins/tracked-send/js/tool/ops/desktop-do-upload-op",["core/ac-core","core/utils/file-types","acplugins/tracked-send/js/tool/ac-tracked-send"],function(e,i,t){t.DesktopDoUploadOp=e.Op.extend({run:function(){function i(e,i,t){this.notificationUiModel.updateUploadedValue(e,t);var s=this.notificationUiModel.get("combinedSize"),o=this.notificationUiModel.get("uploadedSize");this.notificationUiModel.set({progress:parseInt(o/s*100,10)})}var t={localFile:this.options.file};this._fileNo=this.options.fileNo;var s=t.localFile,o="auto_rename",n=this._fileNo,l=this.options.parentId,a="managed",r=_.extend(this.options,{rnaFile:s._proxy,uploadType:a,onDuplicateName:o,ignoreContentType:!0,fileNo:n,parentID:l,progressCB:_.bind(i,this.options),showBezel:!1}),c=e.opFactory.create("UploadingFileOp",r);return c.run()}})}),define("acplugins/tracked-send/js/tool/ops/op-factory",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","acplugins/tracked-send/js/tool/ops/plugin/finding-upload-folder-op","acplugins/tracked-send/js/tool/ops/plugin/getting-authenticated-models-op","acplugins/tracked-send/js/tool/ops/plugin/mocking-unauthenticated-session-op","acplugins/tracked-send/js/tool/ops/plugin/starting-plugin-op","acplugins/tracked-send/js/tool/ops/plugin/showing-sign-in-op","acplugins/tracked-send/js/tool/ops/desktop-getting-subscription-levels-op","acplugins/tracked-send/js/tool/ops/desktop-fetching-autocomplete-list-op","acplugins/tracked-send/js/tool/ops/desktop-do-upload-op"],function(e,i){i.OpFactory=e.Op.extend({create:function(e,t){var s=i[e];return s?new s(t):void LOG(0,"AcTrackedSend.OpFactory.create: Unrecognized class: "+e)}})}),define("acplugins/tracked-send/js/tool/templates/tracked-send-template",[],function(){return'<div class="tracked-send-tool-welcome"></div>    <div class="tracked-send-tool-workflow"></div>'}),define("acplugins/tracked-send/js/tool/models/version-model",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","core/models/model"],function(e,i){return i.VersionModel=e.Model.extend({url:function(){return e.getBaseFilesUrl()+"a/version"}}),i.VersionModel}),define("acplugins/tracked-send/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"]}},i=[{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:i}}),define("acplugins/tracked-send/js/tool/models/limits-model",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","i18n!acplugins/tracked-send/js/nls/ui-strings","core/models/model"],function(e,i,t){i.LimitsModel=e.Model.extend({initialize:function(i,t){e.Model.prototype.initialize.call(this,i,t),this.rootUrl="",t.rootUrl&&(this.rootUrl=t.rootUrl),t.usersMeApi&&(this.usersMeApi=t.usersMeApi)},url:function(){return e.Util.isCEF()?this.rootUrl+"/a/api/users/me/limits":this.rootUrl+"/a/api/users/me/limits?view_mode="+this._viewMode()},setRUrl:function(e){this.rootUrl=e},resetValues:function(){var i;e.Util.isCEF()?e.Util.isReader()?i=t.READER_GO_URL:e.Util.isAcrobat()&&(i=t.ACROBAT_GO_URL):i="https://www.acrobat.com/adobesend/en/pricing.html?promoid=KQMMS",this.set({can_send_to_individuals:!1,can_send_av:!1,can_custom_brand:!1,av_mimetypes:["application/mxf","application/ogg","application/vnd.rn-realmedia"],av_extensions:["aac","aic","aif","aiff","asf","asx","au","avi","avs","dif","divx","dv","flv","f4v","lsf","lsx","mkv","m3u","m4a","m4p","m4v","mov","movie","mp2","mp3","mp4","mpe","mpeg","mpg","mpga","mxu","ogg","qt","ra","ram","rm","snd","vob","wav","wma","wmv"],max_files:50,max_recipients:250,max_subject_length:1e3,max_message_length:1e3,upgrade_url:i},{rootUrl:void 0,usersMeApi:void 0})},parse:function(i){return i.hasOwnProperty("account_type")||(i.account_type=e.Util.isCEF()?this.usersMeApi.getUserIdentity().account_type:"adobeid"),i},_viewMode:function(){var e="web";return i.selector.routerArgs&&i.selector.routerArgs.ticket?e="jts":"enabled"===this.usersMeApi.getUserCohorts()["ts-a12-ui"]&&(e="cef"),e}})}),define("acplugins/tracked-send/js/tool/models/disallowed-file-model",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","core/models/model"],function(e,i){i.DisallowedFileModel=e.Model.extend({})}),define("acplugins/tracked-send/js/tool/models/file-metadata-model",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","core/models/model"],function(e,i){i.FileMetadataModel=e.Model.extend({url:function(){return Ac.baseFilesUrisModel.getApiUri()+"assets/"+encodeURIComponent(this.get("id"))+"/metadata"}})}),define("acplugins/tracked-send/js/tool/collections/file-metadata-collection",["acplugins/tracked-send/js/tool/ac-tracked-send","acplugins/tracked-send/js/tool/models/file-metadata-model"],function(e){e.FileMetadataCollection=Backbone.Collection.extend({model:e.FileMetadataModel})}),define("acplugins/tracked-send/js/tool/models/email-addr-model",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","core/models/model"],function(e,i){i.EmailAddrModel=e.Model.extend({})}),define("acplugins/tracked-send/js/tool/collections/email-addr-collection",["acplugins/tracked-send/js/tool/ac-tracked-send","acplugins/tracked-send/js/tool/models/email-addr-model"],function(e){return e.EmailAddrCollection=Backbone.Collection.extend({model:e.EmailAddrModel}),e.EmailAddrCollection}),define("acplugins/tracked-send/js/tool/models/ui/send-files-ui-model",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","core/utils/action-ids","core/models/ui/ui-model","acplugins/tracked-send/js/tool/models/disallowed-file-model","acplugins/tracked-send/js/tool/collections/file-metadata-collection","acplugins/tracked-send/js/tool/collections/email-addr-collection"],function(e,i,t){i.SendFilesUiModel=e.UiModel.extend({closeTheBrowserUrl:"https://acrobatoauth.adobe.com/?acro_reader=acro_close",audioVideoMimetypes:["application/mxf","application/ogg","application/vnd.rn-realmedia"],audioVideoExtensions:["aac","aic","aif","aiff","asf","asx","au","avi","avs","dif","dv","lsf","lsx","m3u","m4a","m4p","m4v","mov","movie","mp2","mp3","mp4","mpe","mpeg","mpg","mpga","mxu","ogg","qt","ra","ram","rm","snd","wav","wma","wmv"],recognized:{active:{type:"boolean",optional:!1},active_view:{type:"string",optional:!1,choices:["welcome","workflow","success"]},disallowed_files:{type:"array",optional:!0},display_individual_ipm:{type:"boolean",optional:!0},display_individual_help:{type:"boolean",optional:!0},email_addr_collection:{type:"object",optional:!0},local_file_objects:{type:"array",optional:!0},metadata_collection:{type:"object",optional:!0},parcel:{type:"object",optional:!0},is_public:{type:"boolean",optional:!1},is_individual:{type:"boolean",optional:!1},allow_comments_enabled:{type:"boolean",optional:!0},allow_comments:{type:"boolean",optional:!0},customize_recipient_page_enabled:{type:"boolean",optional:!1},customize_recipient_page:{type:"boolean",optional:!0},enable_autocomplete:{type:"boolean",optional:!1},enable_autoc_arrows:{type:"boolean",optional:!1},enable_sender_survey:{type:"boolean",optional:!0},initial_subject:{type:"string",optional:!0},initial_message:{type:"string",optional:!0},limits_model:{type:"object",optional:!1},view_mode:{type:"string",optional:!1,choices:["web","jts","cef"]},user_action_id:{type:"string",optional:!0},user_action_name:{type:"string",optional:!0},local_branding_file:{type:"array",optional:!0},enable_form_send:{type:"boolean",optional:!1},direct_to_workflow:{type:"string",optional:!1},respond_back_options_enabled:{type:"boolean",optional:!1},reader_mailto_enabled:{type:"boolean",optional:!1},include_message:{type:"boolean",optional:!0},respond_back:{type:"boolean",optional:!0},show_mailto_in_jts:{type:"boolean",optional:!1},connectors_api:{type:"object",optional:!1},show_address_book:{type:"boolean",optional:!1},autocomplete_scroll:{type:"boolean",optional:!1},autocomplete_eventual_click:{type:"boolean",optional:!1},autocomplete_immediate_click:{type:"boolean",optional:!1},autocomplete_avoided:{type:"boolean",optional:!1},autocomplete_local_contacts_imported:{type:"boolean",optional:!1}},defaults:{active_view:"welcome",active:!1,disallowed_files:[],enable_autocomplete:!0,enable_autoc_arrows:!0,local_file_objects:[],is_public:!0,is_individual:!1,view_mode:"web",allow_comments_enabled:!0,allow_comments:!1,customize_recipient_page_enabled:!1,enable_form_send:!0,direct_to_workflow:"original",respond_back_options_enabled:!1,include_message:!1,respond_back:!1,reader_mailto_enabled:!1,show_mailto_in_jts:!1,show_address_book:!1,autocomplete_scroll:!1,autocomplete_eventual_click:!1,autocomplete_immediate_click:!1,autocomplete_avoided:!1,autocomplete_local_contacts_imported:!1},initialize:function(){var t,s;e.UiModel.prototype.initialize.call(this),t=new i.FileMetadataCollection,s=new i.EmailAddrCollection,this.set({metadata_collection:t,email_addr_collection:s})},initializeFromCohorts:function(e){e&&(e["ts-direct-to-workflow-view"]&&this.set({direct_to_workflow:e["ts-direct-to-workflow-view"]}),e["ts-respond-back-1"]&&this.set({respond_back_options_enabled:"enabled"===e["ts-respond-back-1"]}),e["ts-reader-mailto"]&&this.set({reader_mailto_enabled:"enabled"===e["ts-reader-mailto"]}),e["ts-a12-ui"]&&"enabled"===e["ts-a12-ui"]&&this.set({view_mode:"cef"}),e["ts-address-book"]&&this.set({show_address_book:"enabled"===e["ts-address-book"]}),e["ts-autocomplete"]&&this.set({enable_autocomplete:"enabled"===e["ts-autocomplete"]}),e["ts-autoc-arrows"]&&this.set({enable_autoc_arrows:"enabled"===e["ts-autoc-arrows"]}))},resetTodefaults:function(){this.set({active:!0,active_view:"welcome",is_public:!0,is_individual:!1,allow_comments:!1,allow_comments_enabled:!1,customize_recipient_page_enabled:!1,success_dlg_version:"original",url_to_clipboard:"original",direct_to_workflow:"original",respond_back_options_enabled:!1,reader_mailto_enabled:!1,enable_form_send:!0,show_address_book:!1,autocomplete_local_contacts_imported:!1}),this.get("metadata_collection").reset(),this.get("email_addr_collection").reset(),this.set("disallowed_files",[],{silent:!0}),this.set("local_file_objects",[],{silent:!0}),this.resetAutocomplete()},resetAutocomplete:function(){this.set({autocomplete_avoided:!1,autocomplete_scroll:!1,autocomplete_immediate_click:!1,autocomplete_eventual_click:!1})},close:function(){this.set({active:!0,active_view:"welcome",is_public:!0,is_individual:!1}),this.get("metadata_collection").reset(),this.get("email_addr_collection").reset(),this.set("disallowed_files",[],{silent:!0}),this.set("local_file_objects",[],{silent:!0})},addFilesToCollection:function(e,s,o){var n,l,a,r=this.get("metadata_collection"),c=[],d=this.get("limits_model"),p=d.get("can_send_av"),h=this.get("local_file_objects").length+r.length,u=d.get("max_files"),g=[],E=this.get("enable_form_send");return!o&&e.length+h>u?(a=u-h,n=e.slice(0,a),l=e.slice(a,e.length),_.each(l,function(e){var t=new i.DisallowedFileModel({name:e,reason:"over-limit"});g.push(t)})):n=e,_.each(n,function(e){var s,o=new i.FileMetadataModel({id:e,global:!1}),n=this.get("connectors_api");s=o.fetch({global:!1}),r.add(o),s.then(_.bind(function(e){var s,o;!E&&this.isFormType(e.get("content_type"))?o="form":!p&&this.isAudioVideoType(e.get("content_type"))?o="audio-video":n.isActionRestrictedOnItems(e,t.SEND)&&(o="non-native"),o&&(r.remove(e),s=new i.DisallowedFileModel({name:e.get("name"),source:e.get("source"),reason:o}),g.push(s))},this,o)),s.fail(_.bind(function(e,i,t){404===t.status&&e.remove(i)},this,r,o)),c.push(s)},this),$.when.apply(null,c).done(_.bind(function(){g=g.concat(this.get("disallowed_files")),this.set("disallowed_files",g,{silent:s})},this)),c},addFileObjects:function(e){var i=this.get("local_file_objects"),t=i.concat(e);this.set("local_file_objects",t),this.trigger("change:local_file_objects")},setBrandingFileObjects:function(e){this.set("local_branding_file",e)},removeFileObjects:function(e){var i,t,s,o,n,l,a,r,c=this.get("local_file_objects"),d=[];for(n=0,l=c.length;l>n;n+=1){for(i=c[n],o=!1,a=0,r=e.length;r>a;a+=1)if(t=e[a],s=Object.prototype.toString.call(t),"[object File]"===s){if(i.name===t.name){o=!0;break}}else if(i.value===t.value){o=!0;break}o||d.push(i)}this.set("local_file_objects",d),this.trigger("change:local_file_objects")},removeLocalFile:function(e){var i,t,s,o,n,l,a,r,c=this.get("local_file_objects"),d=[];for(n=0,l=c.length;l>n;n+=1){for(i=c[n],o=!1,a=0,r=e.length;r>a;a+=1)if(t=e[a],s=Object.prototype.toString.call(t),i&&i===t){o=!0;break}o||d.push(i)}this.set("local_file_objects",d),this.trigger("change:local_file_objects")},isAudioVideoType:function(e){return e&&("audio/"===e.substring(0,6)||"video/"===e.substring(0,6)||_.contains(this.audioVideoMimetypes,e))},isFormType:function(e){return e&&"application/vnd.adobe.form.fillsign"===e},hasAudioVideoExt:function(e){var i=e.split(".").pop();return _.contains(this.audioVideoExtensions,i)},parseEmailArray:function(e){var t=/^\S+@\S+\.\S+$/,s=/[\]\)\"\'\}]$/,o=_.reduce(e,function(e,o){var n,l,a,r=o,c=o.match(/\s*<(\S+)>/);return(o=$.trim(o))?(c?(r=c[1],l=o.substring(0,c.index),l=l.replace(/^\s+/,"")):r=$.trim(r),a=r.match(t)?!0:!1,a&&(a=r.match(s)?!1:!0),n=new i.EmailAddrModel({email:r,friendly:l,valid:a}),e.push(n),e):e},[]);return o},addRecipientsToCollection:function(e){var i=this.get("email_addr_collection");i.add(e,{silent:!0}),i.trigger("set",{})},setRecipientsCollection:function(e,i){var t=this.get("email_addr_collection");t.set(e,{silent:!0}),t.trigger("set",i)}})}),define("acplugins/tracked-send/js/tool/templates/welcome-view-template",[],function(){return'<div class="tracked-send-title-spacer theme-text"></div>	<h1 class="tracked-send-title theme-text"><%= SHARE_TITLE %></h1>   <div class="tracked-send-welcome-text instruction-text theme-text">       <%= SHARE_WELCOME %>   </div>   <button class="tracked-send-select-files-btn control-button theme-button theme-button-label" tabindex="0"><%= SHARE_SELECT_FILES %></button>   <div><a href="<%= SHARE_VIEW_SHARED_FILES_URL %>" class="tracked-send-view-shared-btn theme-hyperlink"><%= SHARE_VIEW_SHARED_FILES %></a></div>'}),define("acplugins/tracked-send/js/tool/ops/add-files-op",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","i18n!acplugins/tracked-send/js/nls/ui-strings","acplugins/tracked-send/js/tool/models/disallowed-file-model"],function(e,i,t){i.AddFilesOp=e.Op.extend({handleRejects:function(){var e=this.options.appApi.displayApi,i=this.options.appApi.dialogApi;e.showModal(!0),i.displayTextAlert(i.SEVERITY_ERROR,t.ADD_FILES_REJECTED_TITLE,t.ADD_FILES_REJECTED_MESSAGE)},run:function(e){var t,s=this.options.selectionApi;return e?(this._processSelectedFiles(e),this._getResolvedPromise()):(t={dialog:{singleFileSelection:!1},plugin:{filter:{rejectedFilesCallback:_.bind(this.handleRejects,this)}}},s.selectFiles(i.PLUGIN_ID,t).then(this._processSelectedFiles))},_processSelectedFiles:function(e){var t=this.options.uiModel,s=e.localFiles,o=[],n=_.map(e.localFileInputs,function(e){return e[0]}),l=[],a=[],r=e.uploadedFileAttrs,c=e.uploadedFileIds,d=t.get("limits_model"),p=d.get("can_send_av"),h=t.get("metadata_collection").length+t.get("local_file_objects").length,u=d.get("max_files");t.set("disallowed_files",[],{silent:!0}),r&&(c=_.keys(r)),c&&t.addFilesToCollection(c),s.length>0?(_.each(s,function(e){var s;e.type?t.isAudioVideoType(e.type)&&!p&&(s=new i.DisallowedFileModel({name:e.name,reason:"audio-video"})):t.hasAudioVideoExt(e.name)&&!p&&(s=new i.DisallowedFileModel({name:e.name,reason:"audio-video"})),s?a.push(s):(h+=1,u>=h?o.push(e):(s=new i.DisallowedFileModel({name:e.name,reason:"over-limit"}),a.push(s)))}),t.addFileObjects(o)):n.length>0&&(_.each(n,function(e){var s;t.hasAudioVideoExt(e.value)?s=new i.DisallowedFileModel({name:e.value,reason:"audio-video"}):(h+=1,u>=h?l.push(e):s=new i.DisallowedFileModel({name:e.value,reason:"over-limit"})),s&&a.push(s)}),t.addFileObjects(l)),(s.length>0||n.length>0)&&(a=a.concat(t.get("disallowed_files")),t.set("disallowed_files",a))}})}),define("acplugins/tracked-send/js/tool/ops/desktop-add-files-op",["core/ac-core","core/utils/file-types","acplugins/tracked-send/js/tool/ac-tracked-send","i18n!acplugins/tracked-send/js/nls/ui-strings","acplugins/tracked-send/js/tool/models/disallowed-file-model"],function(e,i,t,s){t.DesktopAddFilesOp=e.Op.extend({run:function(){this.fileFormats=[],this.mimeTypes=[],this.promises=[];var e={windowTitle:s.READER_FILESELECT_WINDOW_TITLE,actionButton:s.READER_FILESELECT_CONTINUE_BUTTON,filterDesc:s.ALL_SUPPORTED_FILES,allowMultiple:!0,chooseFolder:!1,allowNewFolder:!1,allowBHSelection:!0,extnList:this.fileFormats,mimeTypes:this.mimeTypes,showCustomOpenDialog:!0},i=$.Deferred();return this.options.appApi.rnaApi.then(_.bind(function(s){return s.selectFiles(e).then(_.bind(function(e,s){var o,n=this.options.uiModel,l=e.localFiles,a=[],r=_.map(e.localFileInputs,function(e){return e[0]}),c=[],d=[],p=e.uploadedFileAttrs,h=e.uploadedFileIds,u=n.get("limits_model"),g=n.get("metadata_collection").length+n.get("local_file_objects").length,E=g,S=u.get("max_files");n.set("disallowed_files",[],{silent:!0}),p&&(h=_.keys(p)),h.length>0?(this.options.appApi.sessionApi.ensureSignedIn().then(_.bind(function(){t.opFactory.create("DesktopGettingSubscriptionLevels",this.options).run().always(_.bind(function(){n.addFilesToCollection(h)},this))},this)),E+=h.length):n.addFilesToCollection(h),l.length>0?_.each(l,_.bind(function(e){var i;S>g?_.isEmpty(e.get("ext"))?this.showError():(g+=1,a.push(e)):(i=new t.DisallowedFileModel({name:e.name,reason:"over-limit"}),d.push(i))},this)):r.length>0&&_.each(r,_.bind(function(e){var i;S>g?_.isEmpty(e.get("ext"))?this.showError():(g+=1,a.push(e)):i=new t.DisallowedFileModel({name:e.value,reason:"over-limit"}),i&&d.push(i)},this)),a&&_.each(a,_.bind(function(e){o=e.invoke("determineFileSource"),o.then(_.bind(function(i){if("root"===i||"unsupported"===i||"local"===i||"desktop_sharepoint"===i||"native"===i||"native_v2"===i)c.push(e);else{var s;s=new t.DisallowedFileModel({name:e.get("name"),source:i,reason:"non-native"}),d.push(s)}},this),_.bind(function(){c.push(e)},this)),this.promises.push(o)},this)),$.when.apply($,this.promises).always(_.bind(function(){n.addFileObjects(c),(l.length>0||r.length>0)&&(d=d.concat(n.get("disallowed_files")),n.set("disallowed_files",d)),g>0||E>0?i.resolve(s):i.reject()
},this))},this),_.bind(function(){return i.reject().promise()},this))},this),_.bind(function(){return i.reject().promise()},this)),i.promise()},showError:function(){var e=this.options.appApi.dialogApi;e.displayTextAlert(e.SEVERITY_ERROR,s.ADD_FILES_REJECTED_TITLE,s.ADD_FILES_REJECTED_MESSAGE)}})}),define("acplugins/tracked-send/js/tool/views/welcome-view",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","acplugins/tracked-send/js/tool/templates/welcome-view-template","i18n!acplugins/tracked-send/js/nls/ui-strings","acplugins/tracked-send/js/utils/sc-constants","acplugins/tracked-send/js/tool/ops/add-files-op","acplugins/tracked-send/js/tool/ops/desktop-add-files-op"],function(e,i,t,s,o){i.WelcomeView=e.View.extend({events:{"click .tracked-send-select-files-btn":"_onClickSelectFiles","click .tracked-send-view-shared-btn":"_onClickViewSharedFiles","keydown .tracked-send-view-shared-btn":"_onClickViewSharedFiles"},initialize:function(){e.View.prototype.initialize.call(this),this._template=_.template(t),this._addUiModelEventListeners()},render:function(){return e.View.prototype.render.call(this),0===this.$el.children().length&&(this.$el.html(this._template({SHARE_TITLE:s.SHARE_TITLE,SHARE_WELCOME:s.SHARE_WELCOME,SHARE_SELECT_FILES:s.SHARE_SELECT_FILES,SHARE_VIEW_SHARED_FILES:s.SHARE_VIEW_SHARED_FILES,SHARE_VIEW_SHARED_FILES_URL:"/sentfiles"})),this._initWrappers()),e.Util.isCEF()&&(this.$(".tracked-send-view-shared-btn").hide(),this.$(".tracked-send-select-files-btn").addClass("draw-button-focus-outline")),this._renderChildViews(),this},_initWrappers:function(){},_renderChildViews:function(){},_addUiModelEventListeners:function(){},_onClickSelectFiles:function(){var t,s,n=this.options.appApi.selectionApi,l=this.options.sendFilesUiModel,a=this.options.appApi;this.options.appApi.siteCatalystApi.logScEvent([o.TOOLS,o.SHARE,o.SELECT_FILES,o.CLICKED]),t=_.extend({},this.options,{uiModel:l,selectionApi:n,appApi:a}),s=e.Util.isCEF()?new i.DesktopAddFilesOp(t):new i.AddFilesOp(t),s.run().then(function(){l.set({active_view:"workflow"})})},_onClickViewSharedFiles:function(i){if("keydown"===i.type&&13!==i.which&&32!==i.which)return!0;if(i.preventDefault(),e.Util.isCEF())this.options.appApi.rnaApi.done(function(e){e.selectLeftRailItem("sentfiles")});else{var t="sentfiles";this.options.appApi.siteCatalystApi.logScEvent([o.TOOLS,o.SHARE,o.VIEW_ALL_SHARED_FILES,o.CLICKED]),this.options.appApi.routerApi.navigate(t,{trigger:!0})}},_onClickWorkflow:function(){var e=this.options.sendFilesUiModel;e.set({active_view:"workflow"})}})}),define("acplugins/tracked-send/js/tool/templates/workflow-view-template",[],function(){return'<div class="share-tool-frame">    <div class="share-heading share-selected-files-heading theme-text" role="heading" aria-level="2" id="share-heading"><%= SELECTED_FILES %></div>   <button class="share-add-more-files button-light-blue-small addfile theme-hyperlink theme-hoverable" tabindex="-1"><%= ADD_MORE_FILES %></button>   <ul class="share-files-list" role="grid" aria-labelledby="share-heading"></ul>   <div class="share-files-list-empty">       <div class="share-files-no-files-selected">            <div class="share-files-instruction-container">                <div class="instruction-text"><%= SHARE_NO_FILES_SELECTED %></div>                <div class="instruction-text"><%= SHARE_CLICK_TO_ADD_FILES %></div>            </div>       </div>   </div>   <div class="share-choice-block">       <div class="share-choice-line">          <label for="share-world">               <input type="radio" id="share-world" name="share-choice" class="share-world share-check-box core-radio-button" />               <div class="share-check-box core-radio-button" role="presentation" aria-hidden="true"></div>               <div class="share-choice share-world theme-header-text" role="presentation">                   <%= SHARE_CHOICE_WORLD %>                   <span class="share-choice-explain share-world theme-text"><%= SHARE_CHOICE_WORLD_EXPLAIN %></span>              </div>          </label>       </div>       <div class="share-choice-line">           <label for="share-individual">               <input type="radio" id="share-individual" name="share-choice" class="share-individual share-check-box core-radio-button" />               <div class="share-check-box core-radio-button" role="presentation" aria-hidden="true"></div>               <div class="share-choice share-individual theme-header-text" role="presentation">                   <%= SHARE_CHOICE_INDIVIDUAL %>                   <span class="share-choice-explain share-individual theme-text"><%= SHARE_CHOICE_INDIVIDUAL_EXPLAIN %></span>               </div>           </label>       </div>   </div>   <div class="invitation">       <div class="share-heading-wrapper">           <div class="share-heading share-send-to-heading title-text theme-text"><label for="share-address-input"><%= SHARE_WITH_HEADING %></label></div>           <div class="share-address-book theme-hyperlink hidden" tabindex="0" role="link"><%= SHARE_ADDRESS_BOOK %></div>       </div>       <div class="share-address-wrapper">       </div>       <div class="share-heading title-text share-subject-heading theme-text"><%= SHARE_SUBJECT_MSG_HEADING %></div>       <input type="text" maxlength="1000" class="share-subject-input ui-theme theme-container theme-text" aria-label = "<%= SHARE_INITIAL_SUBJECT_ARIA_LABEL %>" value="<%= SHARE_INITIAL_SUBJECT %>" id="share-subject-input"/>       <textarea type="text" maxlength="1000" class="share-message-input theme-text" id="share-message-input" aria-label="<%= SHARE_MESSAGE_HEADING_ARIA_LABEL %>"><%= SHARE_MESSAGE_PROMPT %>       </textarea>   </div>   <div class="share-button-bar">       <button class="share-files-button control-button theme-button theme-button-label" tabindex="-1"><%= SHARE_BUTTON %></button>       <button class="share-cancel control-button button-grey ui-theme theme-text" tabindex="-1"><%= SHARE_CANCEL %></button>   </div>       <div class="share-individual-upsell ui-theme theme-container" role="complimentary">           <div role="group" aria-labelledby="recipient-page-headline">               <div class="recipient-page-headline-container">                   <div class="recipient-page-headline ui-theme theme-container theme-text" id="recipient-page-headline" role="heading" aria-level="3"><%= SHARE_RECIPIENT_PAGE_HEADLINE %></div>                   <div class="recipient-page-rule"></div>               </div>               <div class="share-choice-line share-allow-comments-line">                   <input type="checkbox" id="share-allow-comments" name="share-allow-comments" class="share-allow-comments share-check-box core-checkbox" />                   <div class="share-check-box core-checkbox" aria-hidden="true"></div>                   <div class="share-choice">                       <label for="share-allow-comments"><%= SHARE_CHOICE_ALLOW_COMMENTS %></label>                   </div>               </div>               <div class="share-choice-line share-customize-recipient-page-line">                   <input type="checkbox" id="share-customize-recipient-page" name="share-customize-recipient-page" tabindex="-1" class="share-customize-recipient-page share-check-box core-checkbox" />                   <div class="share-check-box core-checkbox" aria-hidden="true"></div>                   <div class="share-choice share-customize-choice theme-text">                       <label for="share-customize-recipient-page"><%= SHARE_CHOICE_CUSTOMIZE_RECIPIENT_PAGE %></label>                       <a class="branding-button theme-hyperlink" tabindex="-1" role="link" href="javascript:void(0)">(<%= SHARE_CHOICE_CUSTOMIZE_RECIPIENT_PAGE_EDIT %>)</a>                   </div>               </div>               <div class="share-choice-line share-respond-back-line">                   <input type="checkbox" id="share-respond-back" name="share-respond-back" tabindex="-1" class="share-respond-back share-check-box core-checkbox" />                   <div class="share-check-box core-checkbox" aria-hidden="true"></div>                   <div class="share-choice share-respond-back-choice theme-text">                       <label for="share-respond-back "><%= SHARE_CHOICE_RESPOND_BACK %></label>                   </div>               </div>           </div>           <div class="share-individual-upsell-content" role="group" aria-labelledby="upsell-headline">               <div class="upsell-headline ui-theme theme-container" id="upsell-headline" role="heading" aria-level="3"><%= SEND_UPSELL_HEADLINE %></div>               <div class="upsell-rule"></div>               <div class="mboxDefault theme-text" id="Acom_Send_Workflow_Bullets">                   <ul>                       <li><%= SEND_UPSELL_POINT_1 %></li>                       <li><%= SEND_UPSELL_POINT_2 %></li>                       <li><%= SEND_UPSELL_POINT_3 %></li>                   </ul>               </div>                <button class="upsell-learn-more theme-text"><%= SEND_UPSELL_LEARN_MORE %></button>                <button class="upsell-now control-button theme-button theme-button-label"><%= SEND_UPSELL_NOW %></button>                <button class="upsell-later theme-text"><%= SEND_UPSELL_LATER %></button>       </div></div>   <a role="link" class="survey-link share-control-link theme-hyperlink" style="display:none;"><%= SURVEY_LINK %></a></div><div class="tracked-send-offline-view ui-theme theme-container"></div>'}),define("acplugins/tracked-send/js/tool/templates/list-item-template",[],function(){return'<li class="share-file-list-item theme-hoverable" role="row">    <span role="rowheader">        <span role="img"              aria-label="<%= icon_desc %>"              class="share-file-list-icon collection-item-thumb            <%= icon_class %>"></span>        <span class="share-file-list-name theme-text"              id="share-file-list-name-<%= asset_id %>">            <%= name %></span>    </span>    <span role="gridcell"          aria-labelledby="share-file-list-name-<%= asset_id %>">        <button class="share-file-list-close core-remove-x"                data-asset-id="<%= asset_id %>"                data-list-index="<%= list_index %>"                title="<%= remove %>"                aria-label="<%= ariaRemoveLabel %>"></button>    </span></li>'}),define("acplugins/tracked-send/js/tool/ops/update-ipm-op",["core/utils/cookie-util"],function(e){return function(i){if("function"==typeof mboxDefine&&"function"==typeof mboxUpdate&&"object"==typeof mboxFactories){var t,s=i.appApi.routerApi.getQueryParams(),o=i.appApi.usersMeApi.getUserIdentity(),n=i.appApi.usersMeApi.getUserSubscriptions().subscriptions;n||(n=[{subscription_level:"Free",subscription_name:"unauthenticated"}]),t=["language="+o.user_lang,"subscriptionlevel="+n[0].subscription_level,"subscriptionName="+n[0].subscription_name,"countryCode="+o.country_code,"previousLoginDate="+e.getCookie("History_previousLoginDate")||"","upgradeFromSku="+e.getCookie("History_upgradeFromSku")||"","marketingContext="+e.getCookie("marketingContext")||"","bizSource="+n[0].biz_source,"firstTimeUser="+o.first_time||"true"],s.ipmtest&&t.push("ipmtest="+s.ipmtest),s.isAdobeTest&&t.push("isAdobeTest="+s.isAdobeTest),_.isArray(i.args)&&(t=i.override?i.args:_.union(t,i.args)),_.each(i.mboxIds,function(e){i.mboxGlobal||mboxDefine(e,e),mboxUpdate.apply(e,[e].concat(t))})}}}),define("acplugins/tracked-send/js/tool/ops/get-from-addressbook-op",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","core/ops/op"],function(e,i){return i.GetFromAddressbookOp=e.Op.extend({run:function(){var e=$.Deferred();return this.options.appApi.rnaApi.done(_.bind(function(i){i.stApi.resolveAddressBookApi().then(_.bind(function(i){i._addEventListener("custom:onAddressesAdded",_.bind(function(i,t){var s=t.params;s.length?e.resolve(s):e.reject()},this))},this),_.bind(function(){e.reject()},this))},this)),e.promise()}}),i.GetFromAddressbookOp}),define("acplugins/tracked-send/js/tool/templates/email-addr-view-template",[],function(){return' <div class="share-heading title-text share-address-heading" style="display:none">  <label for="share-address-input"><%= SHARE_ADDRESS_HEADING %></label></div><div class="share-address-box"></div><div class="share-autocomplete-box"></div><div role="alert" class="sharing-email-error sharing-info-bubble red"     style="display:none"></div><div role="alert" class="share-address-help-msg hide"     id="share-address-help-msg">    <%= SHARE_INDIVIDUAL_HELP %>    <button class="share-address-help-msg-close core-remove-x">        <span class="hidden-accessible"><%= CLOSE %></span>    </button></div> '}),define("acplugins/tracked-send/js/tool/templates/email-error-template",[],function(){return"<%= emailErrorHeading %><br />              <%- badEmails %>"}),define("acplugins/tracked-send/js/tool/templates/chicklet-edit-template",[],function(){return' <div role="list" aria-live="polite" aria-atomic="false"     aria-relevant="text"     class="share-email-chicklet-list"></div><div class="share-address-input-container">    <input type="text" class="share-address-input ui-theme theme-container theme-text"           placeholder="<%= SHARE_ADDRESS_PROMPT %>"           id="share-address-input"           aria-autocomplete="list"           aria-label="<%= SHARE_ADDRESS_PROMPT %>"           aria-owns="share-auto-c-list" autocomplete="false" />    <div class="share-address-input-mask"></div></div><button class="core-help-icon share-address-help" aria-label="<%= SHARE_INDIVIDUAL_HELP %>"        aria-describedby="share-address-help-msg"></button> '}),define("acplugins/tracked-send/js/tool/views/chicklet-input-container",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send"],function(e,i){return i.ChickletInputContainer=e.View.extend({initialize:function(){e.View.prototype.initialize.call(this)},render:function(){var i=this.$inputContainer;e.View.prototype.render.call(this),i||this._initWrappers(),this._minimizeInputFieldWidth(),this._maximizeInputFieldWidth()},_initWrappers:function(){this.$inputContainer=this.$el,this.$inputField=this.$(".share-address-input")},_minimizeInputFieldWidth:function(){var e=this.$inputContainer;e.css("width",e.css("min-width"))},_maximizeInputFieldWidth:function(){var e,i=this.$inputContainer,t=i.position();t&&(e=i.outerWidth()-i.width(),i.width(i.parent().width()-t.left-1-e))}}),i.ChickletInputContainer}),define("acplugins/tracked-send/js/tool/views/chicklet-edit-control",["core/ac-core","core/utils/view-util","acplugins/tracked-send/js/tool/ac-tracked-send","acplugins/tracked-send/js/tool/templates/chicklet-edit-template","i18n!acplugins/tracked-send/js/nls/ui-strings","acplugins/tracked-send/js/tool/views/chicklet-input-container","core/views/input-placeholder-view"],function(e,i,t,s,o,n){return t.ChickletEditControl=e.View.extend({events:{"focus .share-address-input":"_onInputFocus","blur .share-address-input":"_onInputBlur",scroll:"_onScroll"},initialize:function(){e.View.prototype.initialize.call(this),this._template=_.template(s)},render:function(){e.View.prototype.render.call(this),0===this.$el.children().length&&(this.$el.html(this._template({SHARE_ADDRESS_PROMPT:o.SHARE_ADDRESS_PROMPT,SHARE_INDIVIDUAL_HELP:o.SHARE_INDIVIDUAL_HELP})),this._initWrappers()),this._renderChildViews()},val:function(){return this.$input.val()||""},hasText:function(){return this._input.hasText()},setValue:function(e){this.$input.val(e)},enable:function(e){e?(this.$input.removeAttr("disabled"),this.$helpButton.removeAttr("disabled"),this.$inputMask.hide()):(this.$input.attr({disabled:"disabled"}),this.$helpButton.attr({disabled:"disabled"}),this.$inputMask.show())},focus:function(e){var t=this.$input.is(":disabled");t&&(e=!1),i.descendantHasFocus(".share-individual:checked,.share-email-chicklet,.share-address-input,.share-address-help-msg-close")||(e=!1),e&&this._scrollElementIntoView(this.$inputContainer),this._isFocus=e},clear:function(){this.$input.val("")},processRecipients:function(e){var i,t,s;i=this._getChickletViews(),this.markChickletsToRemove(i),e.each(_.bind(function(e){this.renderChicklet(e)},this)),i=this._getChickletViews(),this.removeMarkedChicklets(i),this.focus(!0),this._chickletInputContainer.render(),this._input.enablePrompt(0===e.length).render(),t=e.findWhere({valid:!1}),t?(s=this.getChildViewById(t.cid),this._scrollElementIntoView(s.$item)):this._scrollElementIntoView(this.$inputContainer)},markChickletsToRemove:function(e){_.each(e,_.bind(function(e){e.options.toRemove=!0},this))},removeMarkedChicklets:function(e){_.each(e,_.bind(function(e){e.options.toRemove&&this.removeChildView(e)},this))},renderChicklet:function(e){var i=this.getChildViewById(e.cid);return i?void delete i.options.toRemove:void this._renderChildView("_recipEmailView_"+e.cid,t.EmailChickletView,this.$chickletList,{childViewId:e.cid,model:e})},removeLastChicklet:function(){var e,i,t,s;e=this._getChickletViews(),0!==e.lenth&&(i=this.$chickletList.children(":last"),t=i.data("id"),s=_.find(e,function(e){return e.model.cid===t?!0:!1}),s&&s.removeChicklet())},_initWrappers:function(){this.$inputContainer=this.$(".share-address-input-container"),this.$input=this.$(".share-address-input"),this.$inputMask=this.$(".share-address-input-mask"),this.$helpButton=this.$(".share-address-help"),this.$chickletList=this.$(".share-email-chicklet-list")},_renderChildViews:function(){this._renderChildView("_chickletInputContainer",n,this.$inputContainer),this._renderChildView("_input",e.InputPlaceholderView,this.$input)},_getChickletViews:function(){var e;return e=_.filter(this.getChildViews(),function(e){return e instanceof t.EmailChickletView?!0:!1})},_scrollElementIntoView:function(e){var i=e.position().top,t=e.height(),s=this.$el.height();if(0>i||i+t>s){var o=this.$el.scrollTop(),n=i-(s-t)/2;this.$el.scrollTop(Math.max(o+n,0))}},_onInputFocus:function(){this.$el.addClass("focus")},_onInputBlur:function(){this.$el.removeClass("focus")},_onScroll:function(){var e=this.$helpButton,i=this.$el.scrollTop();e.css("top",i+"px")}}),t.ChickletEditControl}),define("acplugins/tracked-send/js/tool/templates/autocomplete-template",[],function(){return' <div class="share-auto-c-list"     role="listbox" id="share-auto-c-list"></div> '}),define("acplugins/tracked-send/js/tool/views/autocomplete-view",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","acplugins/tracked-send/js/tool/templates/autocomplete-template","acplugins/tracked-send/js/utils/sc-constants"],function(e,i,t,s){return i.AutocompleteView=e.View.extend({events:{"mousedown .share-auto-address":"_onAddressClick"},initialize:function(){var i,s=this.options,o=s.autoCCollection;e.View.prototype.initialize.call(this),this._template=_.template(t),this._addressTemplate=_.template("<div class='share-auto-address <%=specialClass%>'     title='<%-email %>'     role='option' id='<%=id%>' tabindex='-1'     aria-selected='<%=ariaSelected%>'><%-email%></div>"),this._localAddressTemplate=_.template("<div class='share-auto-address <%=specialClass%>' title='<%-email %>' ><%-name%> &lt;<%-email%>&gt; </div>"),this._editControl=s.editControl,i=new Backbone.Collection,this.filteredCollection=i,i.on("all",_.debounce(_.bind(this._onFilteredCChange,this),50)),o.on("all",_.debounce(_.bind(this._onCollectionChange,this),300))},render:function(){return e.View.prototype.render.call(this),0===this.$el.children().length&&(this.$el.html(this._template()),this._initWrappers(),this.$autoCList.on("scroll",this._onAddressScroll),e.Util.isCEF()&&this.$autoCList.css("overflow","auto")),this._renderAddressList(),this},setFilter:function(e){e&&(e=$.trim(e.toLowerCase()),e.length<3&&(e=void 0)),e||(this.selectedID=void 0),this.fragment=e,this._updateFilteredCollection()},makeChoice:function(e){{var i,t;this.options,this.options.sendFilesUiModel}return e||1!==this.filteredCollection.length?this.selectedID&&(i=this.filteredCollection.get(this.selectedID)):i=this.filteredCollection.at(0),i&&(t=i.get("email"),this._insertEmail(t)),i},selectDown:function(){var i,t,s,o=this.filteredCollection,n=this.selectedID,l=this.$autoCList.scrollTop(),a=$(".share-auto-address").height(),r=6,c=6;e.Util.isCEF&&(r=o.length),s=this.options.sendFilesUiModel.get("enable_autoc_arrows"),s&&(n?(r>o.length&&(r=o.length),t=o.get(n),i=o.indexOf(t),-1===i?n=void 0:(r>i&&(i+=1,r>c&&this._keyboardScrollTo(l+a)),i>=r?n=void 0:(t=o.at(i),n=t?t.id:void 0))):(t=o.at(0),t?(n=t.id,this._keyboardScrollTo(0)):n=void 0),this.selectedID=n,this._renderAddressList())},selectUp:function(){var i,t,s,o=this.filteredCollection,n=this.selectedID,l=this.$autoCList.scrollTop(),a=6,r=6,c=$(".share-auto-address").height();e.Util.isCEF&&(a=o.length),s=this.options.sendFilesUiModel.get("enable_autoc_arrows"),s&&(n?(t=o.get(n),i=o.indexOf(t),-1===i?n=void 0:(i>=0&&(i-=1,a>r&&this._keyboardScrollTo(l-c)),0>i?n=void 0:(t=o.at(i),n=t?t.id:void 0))):(a>o.length&&(a=o.length),a-=1,t=o.at(a),t?(n=t.id,a>r&&this._keyboardScrollTo(a*c)):n=void 0),this.selectedID=n,this._renderAddressList())},_keyboardScrollTo:function(i){e.Util.isCEF()&&(this.$autoCList.stop(!0,!0),this.$autoCList.animate({scrollTop:i},"fast"))},_initWrappers:function(){this.$autoCList=this.$(".share-auto-c-list")},_renderAddressList:function(){var e,i,t=this.filteredCollection,s=this.$autoCList,o=this.selectedID;e=this._localAddressTemplate,i=this._addressTemplate,t.length&&this.$el.show(),s.empty(),t.each(function(t){var n,l="";t.id===o&&(l="selected"),n=_.isUndefined(t.get("name"))||""===t.get("name")?i({email:t.get("email"),specialClass:l,id:_.uniqueId("share-auto-address-"),ariaSelected:""===l?"false":"true"}):e({name:t.get("name"),email:t.get("email"),specialClass:l,id:_.uniqueId("share-auto-address-"),ariaSelected:""===l?"false":"true"}),s.append(n)}),t.length||this.$el.hide()},_updateFilteredCollection:function(){var e,i=this.options.autoCCollection,t=this.filteredCollection,s=[],o="",n="",l=!1;return e=this.fragment,e&&e.length&&(s=i.filter(function(i){return n=i.get("email"),l=0===n.indexOf(e),l===!1&&(o=i.get("name"),void 0!==o&&(o=o.toLowerCase(),l=0===o.indexOf(e.toLowerCase()))),l})),t.set(s),s},_onFilteredCChange:function(){this._renderAddressList()},_onCollectionChange:function(){this._renderAddressList()},_onAddressClick:function(e){var i,t=$(e.target),o=this.options,n=this.options.sendFilesUiModel;i=t.attr("title"),this._insertEmail(i),n.get("autocomplete_eventual_click")||(o.appApi.siteCatalystApi.logScEvent([s.TOOLS,s.SHARE,s.EMAIL,s.AUTOCOMPLETE,s.EVENTUAL_CLICK]),n.set("autocomplete_eventual_click",!0),n.set("autocomplete_avoided",!0)),n.get("autocomplete_immediate_click")||(o.appApi.siteCatalystApi.logScEvent([s.TOOLS,s.SHARE,s.EMAIL,s.AUTOCOMPLETE,s.IMMEDIATE_CLICK]),n.set("autocomplete_immediate_click",!0))},_onAddressScroll:function(){var e=this.options,i=this.options.sendFilesUiModel;i.get("autocomplete_scroll")||(e.appApi.siteCatalystApi.logScEvent([s.TOOLS,s.SHARE,s.EMAIL,s.AUTOCOMPLETE,s.SCROLL]),i.set("autocomplete_scroll",!0),i.set("autocomplete_immediate_click",!0),i.set("autocomplete_avoided",!0))},_insertEmail:function(e){this.options.emailView._setRecipientsFromText(e),this.setFilter(void 0),_.delay(_.bind(function(){this._editControl.focus(!0)},this),10)}}),i.AutocompleteView}),define("acplugins/tracked-send/js/tool/templates/email-chicklet-view-template",[],function(){return' <div role="listitem" class="share-email-chicklet">    <div class="share-chicklet-label" id="<%= viewId %>-label">        <%- label %>    </div>    <button class="share-chicklet-remove-btn core-remove-x"            aria-labelledby="<%= viewId %>-remove-label                              <%= viewId %>-label">       <span class="hidden-accessible"             id="<%= viewId %>-remove-label">           <%= REMOVE %>       </span>    </button></div> '}),define("acplugins/tracked-send/js/tool/views/email-chicklet-view",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","acplugins/tracked-send/js/tool/templates/email-chicklet-view-template","i18n!acplugins/tracked-send/js/nls/ui-strings","core/utils/truncate","core/utils/css-util"],function(e,i,t,s,o,n){return i.EmailChickletView=e.View.extend({initialize:function(){e.View.prototype.initialize.call(this),this._template=_.template(t)},render:function(){var i,o=this.$el,n=this.$item,l=this.model;return e.View.prototype.render.call(this),n||(i=_.template(t)({label:l.get("email"),viewId:_.uniqueId("email-chicklet-"),REMOVE:s.SHARE_REMOVE}),o.append(i),n=o.children().last(),this.$item=n,this.$item.data("id",l.cid),this._initWrappers(),this._addDomEventListeners()),this._truncateText(),l.get("valid")||n.addClass("invalid"),this},remove:function(){return this.$item.remove(),this.stopListening(),this},removeChicklet:function(){var e,i=this.model;this._triggerViewEvent("CHICKLET_REMOVED",{model:this.model}),e=i.collection,e.remove(i)},_initWrappers:function(){var e=this.$item;this.$removeBtn=e.find(".share-chicklet-remove-btn"),this.$label=e.find(".share-chicklet-label")},_truncateText:function(){var e=this.$label,i=this._chicklet_max_width;i||(i=n.getCssNum(e,"max-width"),this._chicklet_max_width=i),o.truncateElementText(e,i)},_addDomEventListeners:function(){this.$removeBtn.on("click",this._onRemoveClick)},_onRemoveClick:function(e){this._consumeEvent(e),this.$item.parents(".disabled").length||this.removeChicklet()}}),i.EmailChickletView}),define("acplugins/tracked-send/js/tool/views/email-addr-view",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","acplugins/tracked-send/js/tool/templates/email-addr-view-template","acplugins/tracked-send/js/tool/templates/email-error-template","i18n!acplugins/tracked-send/js/nls/ui-strings","i18n!core/nls/ui-strings","acplugins/tracked-send/js/tool/views/chicklet-edit-control","acplugins/tracked-send/js/tool/views/autocomplete-view","acplugins/tracked-send/js/utils/sc-constants","acplugins/tracked-send/js/tool/views/email-chicklet-view"],function(e,i,t,s,o,n,l,a,r){return i.EmailAddrView=e.View.extend({events:{"input .share-address-input":"_onRecipientsInput","paste .share-address-input":"_onRecipientsPaste","blur  .share-address-input":"_onRecipientsBlur","click .share-address-help":"_onShareAddrHelp","click .share-address-help-msg-close":"_onShareAddrMsgClose","click .share-address-box":"_onShareAddressClick"},initialize:function(){e.View.prototype.initialize.call(this),this._template=_.template(t),this._emailErrorTemplate=_.template(s),this._addUiModelEventListeners(),this._addKeyEventListener()},render:function(){var i;return e.View.prototype.render.call(this),0===this.$el.children().length&&(this.$el.html(this._template({SHARE_ADDRESS_HEADING:o.SHARE_ADDRESS_HEADING,SHARE_ADDRESS_PROMPT:o.SHARE_ADDRESS_PROMPT,SHARE_INDIVIDUAL_HELP:o.SHARE_INDIVIDUAL_HELP,CLOSE:n.CLOSE})),this._initWrappers(),i=document.createElement("input"),void 0!==i.placeholder?this.$addressHeading.hide():this.$addressHeading.show(),e.Util.isCEF()&&(this.$addressHelpMsg.css("z-index","1000"),this.$autocompleteBox.css("z-index","1001"))),this._renderChildViews(),this._updateEmailFields(),this._processRecipients(!0),this},stopListening:function(i,t,s){e.View.prototype.stopListening.call(this,i,t,s),this.applyMethodRecursively("undelegateEvents"),this._removeUiModelEventListeners()},_initWrappers:function(){this.$addressHeading=this.$(".share-address-heading"),this.$addressBox=this.$(".share-address-box"),this.$emailErrorBubble=this.$(".sharing-email-error"),this.$addressHelpMsg=this.$(".share-address-help-msg"),this.$autocompleteBox=this.$(".share-autocomplete-box")},_renderChildViews:function(){var e,i=this.options.sendFilesUiModel;this._renderChildView("_chickletEditControl",l,this.$addressBox),i.get("enable_autocomplete")?(e=_.extend({},this.options,{editControl:this._chickletEditControl,emailView:this}),this.$autocompleteBox.show(),this._renderChildView("_autocompleteControl",a,this.$autocompleteBox,e)):(this._autocompleteControl&&this.removeChildView(this._autocompleteControl),this.$autocompleteBox.hide())},_updateEmailFields:function(){var e=this.options.sendFilesUiModel,i=e.get("is_individual");i?(this.$el.removeClass("disabled"),this.$addressHeading.removeAttr("disabled"),this._chickletEditControl.enable(!0)):(this.$el.addClass("disabled"),this.$addressHeading.attr({disabled:"disabled"}),this._chickletEditControl.enable(!1))},_processRecipients:function(e){var i=this.options.sendFilesUiModel.get("email_addr_collection");e&&this._chickletEditControl.processRecipients(i)},_removeChicklets:function(){this._chickletEditControl.removeChicklets()},_renderChicklet:function(e){this._chickletEditControl.renderChicklet(e)},_showEmailErrors:function(e){var i,t,s=this.options.sendFilesUiModel.get("is_individual");0!==e.length&&s?(i=e.length>1?o.SHARE_EMAIL_INVALID_PLURAL:o.SHARE_EMAIL_INVALID_SINGULAR,t=this._emailErrorTemplate({emailErrorHeading:i,badEmails:e}),this.$emailErrorBubble.html(t),this.$emailErrorBubble.show()):(this.$emailErrorBubble.hide(),this.$emailErrorBubble.text(""))},_addUiModelEventListeners:function(){var e=this.options.sendFilesUiModel;e.get("email_addr_collection").on("all",this._onRecipientsChange),e.on("change:display_individual_help",this._onIndividualHelpChange),e.on("change:enable_autocomplete",this._onEnableAutocompleteChange)},_removeUiModelEventListeners:function(){var e=this.options.sendFilesUiModel;e.get("email_addr_collection").off("all",this._onRecipientsChange),e.off("change:display_individual_help",this._onIndividualHelpChange),e.off("change:enable_autocomplete",this._onEnableAutocompleteChange)},_onViewEvent:function(i,t){"CHICKLET_REMOVED"===i&&this._onChickletRemoved(),e.View.prototype._onViewEvent.call(this,i,t)},_onRecipientsChange:function(){this._onDebouncedRecipientsChange()},_onDebouncedRecipientsChange:function(){this._processRecipients(!0)},_onIndividualHelpChange:function(){var e=this.options.sendFilesUiModel,i=e.get("display_individual_help");i?this.$addressHelpMsg.fadeIn(250):this.$addressHelpMsg.fadeOut(250)},_onEnableAutocompleteChange:function(){this._renderChildViews()},_addKeyEventListener:function(){this.options.appApi.keyApi.pushKeyHandler(this)},_removeKeyEventListener:function(){this.options.appApi.keyApi.popKeyHandler(this)},_onKeyDown:function(e){var i=!1,t=e.which,s=!1,o=this._chickletEditControl.$input;return this._chickletEditControl._input._hasFocus()?(32===t?(i=!0,_.defer(_.bind(function(){this._setRecipientModels(!0)},this))):13===t?this._autocompleteControl&&(this._autocompleteControl.makeChoice(!0)||_.defer(_.bind(function(){this._setRecipientModels()},this))):9===t?this._autocompleteControl&&!e.shiftKey&&this._autocompleteControl.makeChoice()&&(i=!0):8===t?this._chickletEditControl.hasText()||(this._chickletEditControl.removeLastChicklet(),i=!0):40===t?this._autocompleteControl&&(this._autocompleteControl.selectDown(),s=!0,i=!0):38===t?this._autocompleteControl&&(this._autocompleteControl.selectUp(),s=!0,i=!0):27===t&&this._autocompleteControl&&(i=!0),s?o.attr("aria-activedescendant",this._autocompleteControl.$(".selected").attr("id")):o.removeAttr("aria-activedescendant"),i&&this._consumeEvent(e),i):i},_onKeyPress:function(e){var i=!1,t=e.which;return this._chickletEditControl._input._hasFocus()?(32===t?(i=!0,_.defer(_.bind(function(){this._setRecipientModels(!0)},this))):13===t&&this._autocompleteControl&&(this._autocompleteControl.makeChoice()||_.defer(_.bind(function(){this._setRecipientModels()},this))),i):i},_onKeyup:function(e){var i=!1,t=e.which;return this._chickletEditControl._input._hasFocus()?(32===t&&(i=!0,_.defer(_.bind(function(){this._setRecipientModels(!0)},this))),i):i},_onRecipientsInput:function(){var e;this._autocompleteControl&&(e=this._chickletEditControl.val(),this._autocompleteControl.setFilter(e))},_onRecipientsPaste:function(){_.defer(_.bind(function(){this._setRecipientModels(),this._autocompleteControl.setFilter(void 0)},this))},_onRecipientsBlur:function(){return this._setRecipientModels(),this._autocompleteControl&&this._autocompleteControl.setFilter(void 0),!0
},_setRecipientModels:function(e){var i=this._chickletEditControl.val();_.isUndefined(e)||!e||i.match(/.*@.*/)||(i+=" "),this._setRecipientsFromText(i)},_setRecipientsFromText:function(i){var t,s,o=this.options,n=o.sendFilesUiModel;return e.Util.isCEF()&&i.match(/.+\s$/)&&0!==this._autocompleteControl.filteredCollection.length&&!i.match(/.*@.*|.+\s\s$/)?void this._chickletEditControl.setValue(i):(this._chickletEditControl.clear(),i=i.replace(/(\r\n|\n|\r)/gm,""),t=i.split(i.match(/(<\S+>)/)?/\s*[,;]+\s*/:/\s*[,;\s]+\s*/),s=n.parseEmailArray(t),void(s.length>0&&(n.addRecipientsToCollection(s),o.appApi.siteCatalystApi.logScEvent([r.TOOLS,r.SHARE,r.EMAIL,r.CHICKLET_ADDED]),n.get("autocomplete_avoided")||(o.appApi.siteCatalystApi.logScEvent([r.TOOLS,r.SHARE,r.EMAIL,r.AUTOCOMPLETE,r.AVOIDED]),n.set("autocomplete_avoided",!0)))))},_onShareAddrHelp:function(){var e=this.options.sendFilesUiModel;e.set({display_individual_help:!0})},_onShareAddrMsgClose:function(){var e=this.options.sendFilesUiModel;e.set({display_individual_help:!1}),this._chickletEditControl.focus(!0)},_onShareAddressClick:function(){this._chickletEditControl.focus(!0)},_onChickletRemoved:function(){this._chickletEditControl.focus(!0)}}),i.EmailAddrView}),define("acplugins/tracked-send/js/tool/models/branding-logo-asset-model",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","core/utils/crypto-util"],function(e,i,t){i.BrandingLogoAssetModel=e.Model.extend({initialize:function(i,t){e.Model.prototype.initialize.call(this,i,t),this.options=t,this.rootUrl=t.rootUrl,this.downloadUrl=t.appApi.baseFilesUrisApi.getDownloadUri()},getUnmanagedUrl:function(e){var i,s,o=encodeURIComponent(this.get("id")),n=t.getRandomString(),l=this.options.customizeRecipientPageDialogUiModel.get("user_action_name"),a=[];return a.push("x-user-action-id="+n),a.push("x-user-action-name="+l),a.push("x-user-engagement=passive"),i=a.join("&"),s=this.downloadUrl+"unmanaged/"+encodeURIComponent(o)+"?dlticket="+encodeURIComponent(e)+"&"+i},getRenditionUrl:function(){var e,i,t=encodeURIComponent(this.get("id")),s=this.options.customizeRecipientPageDialogUiModel.get("user_action_id"),o=this.options.customizeRecipientPageDialogUiModel.get("user_action_name"),n=(new Date).getTime(),l=[];return l.push("x-user-action-id="+s),l.push("x-user-action-name="+o),l.push("x-user-engagement=active"),l.push("ts="+n),e="/?"+l.join("&"),i=this.rootUrl+"/a/api/branding/logo/"+t+e}})}),define("acplugins/tracked-send/js/tool/models/users-me-branding-model",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","core/utils/http-util","core/models/model"],function(e,i,t){return i.UsersMeBrandingModel=e.Model.extend({initialize:function(i,t){e.Model.prototype.initialize.call(this,i,t),this.rootUrl=t.rootUrl},url:function(){return this.rootUrl+"/a/api/users/me/branding"},setRUrl:function(e){this.rootUrl=e},toJSON:function(){return{enabled:this.get("enabled"),logo:this.get("logo"),color:this.get("color")}},customizeOptions:function(e,i){var s=t.customizeOptions(e,i);return s.headers.Accept="application/json",s.headers["Content-Type"]="application/json",s}}),i.UsersMeBrandingModel}),define("acplugins/tracked-send/js/tool/ops/do-upload-op",["core/ac-core","files/ac-files","acplugins/tracked-send/js/tool/ac-tracked-send","core/utils/http-util","jquery.fileupload","jquery.iframe-transport","files/views/file-upload-progress-view","core/models/file-upload-model"],function(e,i,t,s){t.DoUploadOp=e.Op.extend({stripName:function(e){return e.replace(/^.*[\\\/]/,"")},initializePostMessageHandler:function(e){var i=function(i){var t,s,o,n,l=JSON.parse(i.data);"ts-complete-file-upload"===l.name&&(t=JSON.parse(l.response),-1!==_.indexOf([200,201,204],t.status)?s="success":(s="error",t.status=t.body.error.code),o=t.body.id,n=t.id,"success"===s?e.that.uploadSuccess(e,e.localFiles[n],e.deferred_map[n],{id:o}):e.that.uploadError(e,e.deferred_map[n],t))};e.that.onReceiveMessage=_.bind(i,this);var t=window.addEventListener?"addEventListener":"attachEvent",s=window.addEventListener?"message":"onmessage";window[t](s,e.that.onReceiveMessage,!1)},continueHandler:function(e){var i,t,s,o=e.sendFilesUiModel;e.isBrandingUpload||(s=o.get("disallowed_files").length),this._removeFileUploadEventListeners(e.$widget);try{e.$widget.fileupload("destroy")}catch(n){}return e.displayApi.showModal(!1),e.displayApi.showSpinner(!1),this._closeProgressView(),e.that.postMessageHandlerInitialized&&(i=window.removeEventListener?"removeEventListener":"detachEvent",t=window.removeEventListener?"message":"onmessage",window[i](t,e.that.onReceiveMessage,!1)),s&&!e.isBrandingUpload&&o.trigger("change:disallowed_files"),$.Deferred().resolve().promise()},uploadSuccess:function(e,i,t,s){var o,n;e.isBrandingUpload?(e.usePOSTforPUT&&_.isObject(s)||!e.usePOSTforPUT)&&(e.customizeRecipientPageDialogUiModel.set("logo",e.tempLogo),t.resolve()):s.id&&(o=[s.id],e.sendFilesUiModel.removeFileObjects([i]),n=e.sendFilesUiModel.addFilesToCollection(o,!0,!0),$.when.apply($,n).then(function(){t.resolve()}))},uploadError:function(e,i,t){200===t.status&&(t.status=500,t.statusText="Unknown error - IE8 or IE9"),this.options.appApi.errorApi.enqueueAjaxError(t),i.reject()},_openProgressView:function(){var s,o,n=this.options,l=n.appApi,a=l.statusMenuApi,r=this.options.brandingUpload&&this.options.brandingUpload===!0;return n=_.extend({},n,{parentView:n.rootView,fileUploadModel:new e.FileUploadModel(n)}),delete n.el,s=this._progressView=new i.FileUploadProgressView(n),r?(o=n.sendFilesUiModel.get("local_branding_file"),s.setFiles(o)):s.setFiles(n.localFiles),a.showStatusMenuItem(t.PLUGIN_ID).then(function(e){s.setElement(e)}),a.setStatus(t.PLUGIN_ID,{status:l.statusMenuApi.STATUS_BUSY}),a.addStatusChangeCallback(t.PLUGIN_ID,this._onStatusChange),s},_onStatusChange:function(e){var i=this.options.appApi.statusMenuApi;e===i.STATUS_IDLE&&_.delay(function(){i.showMenu(!1)},300)},_closeProgressView:function(){var e=this.options,i=e.appApi.statusMenuApi;this._progressView&&(this._progressView.close(),this._progressView=void 0),i.setStatus(t.PLUGIN_ID,{status:e.appApi.statusMenuApi.STATUS_IDLE}),i.hideStatusMenuItem(t.PLUGIN_ID),i.removeStatusChangeCallback(t.PLUGIN_ID,this._onStatusChange)},_addFileUploadEventListeners:function(e){e.on("fileuploadstart",this._onFileUploadStart).on("fileuploadstop",this._onFileUploadStop).on("fileuploadprogressall",this._onFileUploadProgressAll)},_removeFileUploadEventListeners:function(e){e.off("fileuploadstart",this._onFileUploadStart).off("fileuploadstop",this._onFileUploadStop).off("fileuploadprogressall",this._onFileUploadProgressAll)},_onFileUploadStart:function(){this._progressView=this._openProgressView()},_onFileUploadStop:function(){this._closeProgressView()},_onFileUploadProgressAll:function(e,i){this._progressView&&this._progressView.setProgressAll(i.loaded,i.total)},_makeFileUploadFunction:function(e,i,t){return function(s){var o=_.bind(e.that.uploadSuccess,e.that,e,e.localFiles[t],s),n=_.bind(e.that.uploadError,e.that,e,s);e.$widget.fileupload("send",i).then(o,n)}},run:function(){var i,t,o,n,l,a,r,c,d,p,h,u=[],g={that:this,rootUrl:this.options.rootUrl,uploadUrl:this.options.uploadUrl+"assets",displayApi:this.options.displayApi,localFiles:this.options.localFiles,sendFilesUiModel:this.options.uiModel,customizeRecipientPageDialogUiModel:this.options.customizeRecipientPageDialogUiModel,parentId:this.options.parentId,uploadObjectType:null,headers:null,deferred_map:{},isBrandingUpload:!1,usePOSTforPUT:!1},E=this.options.brandingUpload&&this.options.brandingUpload===!0,S=[];if(E?_.extend(g,{uploadUrl:this.options.uploadUrl+"unmanaged",localFiles:this.options.sendFilesUiModel.get("local_branding_file"),$widget:$(".customize-recipient-page-logo-holder"),isBrandingUpload:E,numFiles:1,displayApi:this.options.appApi.displayApi,tempLogo:this.options.brandingModel.get("temp_logo")}):_.extend(g,{numFiles:this.options.localFiles.length,$widget:$(".share-files-list")}),0===g.numFiles)return $.Deferred().resolve().promise();for(g.displayApi.showModal(!0),g.displayApi.showSpinner(!1),this._addFileUploadEventListeners(g.$widget),g.$widget.fileupload(),g.headers=s.getRequestHeaders("POST",{includeCsrf:!0},!1),delete g.headers["Content-Type"],g.isBrandingUpload?(t=this.options.customizeRecipientPageDialogUiModel.get("user_action_id"),o=this.options.customizeRecipientPageDialogUiModel.get("user_action_name")):(t=this.options.uiModel.get("user_action_id"),o=this.options.uiModel.get("user_action_name")),t&&(g.headers["x-user-action-id"]=t,g.headers["x-user-action-name"]=o),g.uploadObjectType=Object.prototype.toString.call(g.localFiles[0]),g.usePOSTforPUT="[object File]"!==g.uploadObjectType,g.usePOSTforPUT&&(this.postMessageHandlerInitialized=!0,this.initializePostMessageHandler(g)),n=0,l=g.numFiles;l>n;n+=1)g.isBrandingUpload?(p=g.usePOSTforPUT?"POST":"PUT",a="temp_logo.png",h=g.uploadUrl+"/"+g.tempLogo,g.headers["x-user-engagement"]="active"):(a=g.localFiles[n].name||g.localFiles[n].value,d=JSON.stringify({ignore_content_type:!0,parent_id:g.parentId,on_dup_name:"auto_rename",name:this.stripName(a)}),S=[{name:"metadata",value:d}],p="POST",h=g.uploadUrl),i={global:!1,paramName:"file",dataType:"json",type:p,url:h,multipart:!0,formData:S,headers:g.headers,xhrFields:{withCredentials:!0}},"[object File]"===g.uploadObjectType?i.files=[g.localFiles[n]]:(i.fileInput=$(g.localFiles[n]),i.dataType="html",i.url+="?redirect_uri="+encodeURIComponent(Ac.baseFilesUrisModel.get("cloud_do_not_use")+"complete_file_upload_ts/1.0/"+n),i.formData.push({name:"csrftoken",value:e.Util.getCookie("csrftoken")}),i.headers=null),r=$.Deferred(this._makeFileUploadFunction(g,i,n)),g.deferred_map[n]=r,u.push(r);return c=$.when.apply($,u),c.then(_.bind(g.that.continueHandler,g.that,g),_.bind(g.that.continueHandler,g.that,g)),c}})}),define("acplugins/tracked-send/js/tool/models/ui/notification-ui-model",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","core/models/ui/ui-model","acplugins/tracked-send/js/tool/models/disallowed-file-model","acplugins/tracked-send/js/tool/collections/file-metadata-collection","acplugins/tracked-send/js/tool/collections/email-addr-collection"],function(e,i){i.NotificationUiModel=e.UiModel.extend({recognized:{progress:{type:"number",optional:!1},combinedSize:{type:"number",optional:!1},asset_id:{type:"string",optional:!1},notification:{type:"object",optional:!1},uploadedSize:{type:"number",optional:!1},arrayOfFileSizes:{type:"array",optional:!1},totalFiles:{type:"number",optional:!1}},defaults:{asset_id:"",progress:0,combinedSize:0,uploadedSize:0,arrayOfFileSizes:[],totalFiles:0},updateUploadedValue:function(e,i){var t=this._getUpdatedUploadArray(e,i);this.set({arrayOfFileSizes:t}),this._calculateUploadedSize()},_getUpdatedUploadArray:function(e,i){var t=[],s=0;for(s=0;s<this.get("totalFiles");s++)t[s]=s===i?parseInt(e,10):parseInt(this.get("arrayOfFileSizes")[s],10);return t},_calculateUploadedSize:function(){var e=0,i=0;for(e=0;e<this.get("totalFiles");e++)isNaN(this.get("arrayOfFileSizes")[e])||(i=parseInt(i,10)+parseInt(this.get("arrayOfFileSizes")[e],10));this.set({uploadedSize:parseInt(i,10)})}})}),define("acplugins/tracked-send/js/tool/ops/begin-desktop-upload-op",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","i18n!acplugins/tracked-send/js/nls/ui-strings","acplugins/tracked-send/js/tool/models/ui/notification-ui-model"],function(e,i,t){var s=0,o={NOT_STARTED:-1,FAILED:0,IN_PROGRESS:1,COMPLETED:2};i.BeginDesktopUploadOp=e.Op.extend({run:function(){if(this.options.localFiles.length>0){var e,s,n,l,a,r=0,c=[],d=0,p=0,h=$.Deferred(),u={localFiles:this.options.localFiles};for(l=0,a=u.localFiles.length;a>l;l+=1)r+=u.localFiles[l].get("size"),p++;for(e=new i.NotificationUiModel({progress:0,asset_id:"",notification:{},combinedSize:r,totalFiles:p}),this.options=_.extend(this.options,{notificationUiModel:e}),n=p>1?p+" "+t.FILES:u.localFiles[0].name||u.localFiles[0].get("name"),this._setUpNotificationProcess(n),this.options.notificationUiModel.on("change:progress",_.bind(function(){var e=this.options.notificationUiModel,i=e.get("notification");i&&i.invoke&&i.invoke("setProperty",{progress:this.options.notificationUiModel.get("progress")})},this)),l=0,a=u.localFiles.length;a>l;l+=1){this.options.file=u.localFiles[l],d=l,this.options=_.extend(this.options,{fileNo:d}),s=i.opFactory.create("DesktopDoUploadOp",this.options);var g=s.run();g.then(_.bind(function(e){this._setAssetIdValue(e,this.options)},this)),c.push(g)}return $.when.apply($,c).then(_.bind(function(){var e=this.options.notificationUiModel.get("notification");e.invoke("setProperty",{operationType:"Upload",state:o.COMPLETED,progress:100}),this.options.appApi.rnaApi.done(_.bind(function(i){i.notificationAPI.removeNotification(e.get("notificationID")),i.stApi.setSendTrackWorkflowInProgress(!1)},this)),this.options.appApi.displayApi.showModal(!1),h.resolve()},this),_.bind(function(){var e=this.options.notificationUiModel.get("notification");this.options.appApi.rnaApi.done(_.bind(function(i){i.notificationAPI.removeNotification(e.get("notificationID")),i.stApi.setSendTrackWorkflowInProgress(!1)},this)),this.options.appApi.displayApi.showModal(!1),h.reject()},this)),this._clearAssetIdValue(),h}return this._getResolvedPromise()},_setAssetIdValue:function(e,i){i.assetIdarray[s]=e.id,s++},_clearAssetIdValue:function(){s=0},_setUpNotificationProcess:function(e){this.userData={customMessage:e,notificationHeading:t.UPLOADING_TO_SEND},this.options.appApi.rnaApi.done(_.bind(function(e){e.stApi.setSendTrackWorkflowInProgress(!0),e.rnaServicesAPI.showServicesProgressWidget(!0,!0,"busy",!0),e.notificationAPI.createNotification({state:o.NOT_STARTED,userData:JSON.stringify(this.userData),progress:0,description:"send"}).then(_.bind(function(e){this.options.notificationUiModel.set({notification:e})},this)).always(_.bind(function(){var e=this.options.notificationUiModel.get("notification"),i=e.get("notificationID");this.options.appApi.rnaApi.done(function(e){e.stApi.setNotificationId(i)}),e.invoke("setProperty",{operationType:"Upload",state:o.IN_PROGRESS})},this))},this))}})}),define("acplugins/tracked-send/js/tool/ops/share-files-op",["core/ac-core","i18n!core/nls/ui-strings","i18n!acplugins/tracked-send/js/nls/ui-strings","acplugins/tracked-send/js/tool/ac-tracked-send","core/utils/http-util"],function(e,i,t,s,o){s.ShareFilesOp=e.Op.extend({run:function(){var e,s,n,l,a,r,c,d,p=this.options,h=_.clone(p.recipients),u=p.appApi.dialogApi;return l=p.files.map(function(e){var i={id:e.id||e.get("id"),name:e.get("name"),content_type:e.content_type||e.get("content_type"),size:e.get("size")};return i}),p.is_public&&h.push("PARCEL_PUBLIC_SHARING"),e=p.rootUrl+"/a/api/parcels",s="POST",n={files:l,recipients:h,email_subject:p.email_subject,can_make_comments:p.can_make_comments,branding_enabled:p.is_branding},p.email_message&&(n.email_message=p.email_message),p.uiModel.get("respond_back_options_enabled")&&(n.include_message=!0,n.respond_back=p.uiModel.get("respond_back")),a=JSON.stringify(n),r=o.getRequestHeaders(s),r["Content-Type"]="application/json",c=p.uiModel.get("user_action_id"),d=p.uiModel.get("user_action_name"),c&&(r["x-user-action-id"]=c,r["x-user-action-name"]=d,r["x-user-engagement"]="active"),this.options.displayApi.showModal(!0),this.options.displayApi.showSpinner(!0),$.ajax(e,{data:a,dataType:"json",complete:_.bind(function(){this.options.displayApi.showSpinner(!1)},this),error:_.bind(function(e){function s(e){var s,l={SendLimitExceeded:t.SHARE_ERROR_SEND_LIMIT_EXCEEDED,UnsupportedSharingMimeType:t.SHARE_ERROR_UNSUPPORTED_SHARING_MIME_TYPE,RecipientsNotAllowed:t.SHARE_ERROR_RECIPIENTS_NOT_ALLOWED,CannotConvertFormTimeout:t.SHARE_ERROR_CANNOT_CONVERT_FORM_TIMEOUT,CannotConvertFormRestrictedEditPermission:t.SHARE_ERROR_CANNOT_CONVERT_FORM_RESTRICTION,CannotConvertFormServerError:t.SHARE_ERROR_CANNOT_CONVERT_FORM,CannotConvertFormInvalidParameter:t.SHARE_ERROR_CANNOT_CONVERT_FORM},a={SendLimitExceeded:t.SHARE_ERROR_SEND_LIMIT_EXCEEDED_TITLE,UnsupportedSharingMimeType:i.ERROR,RecipientsNotAllowed:i.ERROR,CannotConvertFormTimeout:i.ERROR,CannotConvertFormRestrictedEditPermission:i.ERROR,CannotConvertFormServerError:i.ERROR,CannotConvertFormInvalidParameter:i.ERROR};try{s=JSON.parse(e.responseText).error.code}catch(r){}s&&(o=l[s],n=a[s])}var o,n;this.options.displayApi.showModal(!1),this.options.displayApi.showSpinner(!1),s(e),o?u.displayTextAlert(u.SEVERITY_ERROR,n,o,i.CLOSE):this.options.appApi.errorApi.enqueueAjaxError(e)},this),global:!1,headers:r,type:s})}})}),define("acplugins/tracked-send/js/tool/templates/customize-recipient-page-dlg-template",[],function(){return'<div class="customize-recipient-page-dlg">       <div class="customize-recipient-page-info">           <div class="customize-recipient-page-description">               <%= CUSTOMIZE_RECIPIENT_PAGE_DIALOG_DESCRIPTION %>           </div>       </div>       <div class="customize-recipient-page-interaction">           <div class="customize-recipient-page-fake-header">               <button class="customize-recipient-page-logo-btn branding-control-button">                   <div class="customize-recipient-page-logo-btn-inner"><%= CUSTOMIZE_RECIPIENT_PAGE_ADD_LOGO %></div>               </button>               <div class="customize-recipient-page-logo-holder">                   <div class="customize-recipient-page-logo-wrapper">                       <img class="customize-recipient-page-logo-img" />                   </div>                   <button class="customize-recipient-page-logo-removal"                           title="<%= CUSTOMIZE_RECIPIENT_PAGE_REMOVE_LOGO %>"                           aria-label="<%= CUSTOMIZE_RECIPIENT_PAGE_REMOVE_LOGO %>">                       <div class="customize-recipient-page-logo-removal-x1"></div>                       <div class="customize-recipient-page-logo-removal-x2"></div>                   </button>               </div>               <button class="customize-recipient-page-menu-btn customize-recipient-page-color-btn menu-btn" aria-haspopup="true">                   <div class="customize-recipient-page-menu-btn-label"><%= CUSTOMIZE_RECIPIENT_PAGE_CHOOSE_COLOR %></div>                   <div class="customize-recipient-page-menu-btn-triangle"></div>               </button>           </div>           <div role="dialog" class="customize-recipient-page-color-menu core-menu-border"></div>       </div>       <div class="customize-recipient-page-btn-bar">           <button class="customize-recipient-page-save-btn control-button disabled">               <%= CUSTOMIZE_RECIPIENT_PAGE_SAVE %>           </button>           <button class="customize-recipient-page-close-btn control-button ui-theme theme-text button-grey">               <%= CUSTOMIZE_RECIPIENT_PAGE_CLOSE %>           </button>       </div>   </div>'}),define("acplugins/tracked-send/js/tool/templates/customize-recipient-page-color-menu-template",[],function(){return'<div class="customize-recipient-page-color-picker">       <ul class="customize-recipient-page-color-grid"           role="listbox"           aria-label="<%= CUSTOMIZE_RECIPIENT_PAGE_CHOOSE_COLOR %>">       <% for(var color in colors) { %>           <li class="customize-recipient-page-color-cell"               style="background-color:<%= colors[color] %> !important"               data-background-color="<%= colors[color] %>"               role="option" title="<%= colors[color] %>"               aria-label="<%= colors[color] %>"></li>       <% } %>       </ul>       <input class="customize-recipient-page-color-text-input"              maxlength="7" type="text" name="BackgroundColor"              placeholder="#f5f5f5"              aria-label="<%= CUSTOMIZE_RECIPIENT_PAGE_CHOOSE_COLOR %>"/>   </div><div class="menu-nub-grey"></div>'}),define("acplugins/tracked-send/js/tool/views/customize-recipient-page-color-menu-view",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","acplugins/tracked-send/js/tool/templates/customize-recipient-page-color-menu-template","i18n!acplugins/tracked-send/js/nls/ui-strings","acplugins/tracked-send/js/utils/sc-constants","core/utils/event-util","core/views/view","core/views/menu-view","app/views/account-menu-plugins-view"],function(e,i,t,s,o,n){var l=["#B20000","#B25900","#B2B200","#008C00","#00698C","#003A9A","#46008C","#333333","#FF0000","#FF8000","#E0D200","#00D400","#00A3D9","#265CFF","#6D00D9","#666666","#FF7373","#FFA64D","#FFFF73","#73FF73","#4DD2FF","#7396FF","#A64DFF","#AAAAAA","#FFBFBF","#FFDFBF","#FFFFBF","#BFFFBF","#BFFFFF","#BFCFFF","#DFBFFF","#FFFFFF"];i.CustomizeRecipientPageColorMenuView=e.MenuView.extend({events:function(){return _.extend({},e.DialogView.prototype.events,{"keydown   .customize-recipient-page-color-text-input":"_onInputKeyDown","keyup   .customize-recipient-page-color-text-input":"_onInputKeyUp","click   .customize-recipient-page-color-text-input":"_onColorInputClick","click   .customize-recipient-page-color-cell":"_onColorWellClick"})},initialize:function(){e.MenuView.prototype.initialize.call(this),this._uiModel=this.options.uiModel},render:function(){e.MenuView.prototype.render.call(this),0===this.$el.children().length&&(this.$el.html(_.template(t)({colors:l,CUSTOMIZE_RECIPIENT_PAGE_CHOOSE_COLOR:s.CUSTOMIZE_RECIPIENT_PAGE_CHOOSE_COLOR})),this._initWrappers());var i=this.$colorInput,o=this.$colorWells;this._uiModel.get("color")?this.$colorInput.val(this._uiModel.get("color")):_.has(this.$colorInput.get(0),"placeholder")||this.$colorInput.val("#f5f5f5");var n=o.filter("[data-background-color='"+i.val()+"']");return o.not(n).attr({tabindex:-1,"aria-selected":!1}),0===n.length?void o.first().attr("tabindex",0):void n.attr({tabindex:0,"aria-selected":!0})},open:function(){var i=e.MenuView.prototype.open.call(this);return this.$el.addClass("shown"),i},close:function(){e.MenuView.prototype.close.call(this,void 0,{doNotEmpty:!0}),this.$el.removeClass("shown")},_initWrappers:function(){e.MenuView.prototype._initWrappers.call(this),this.$colorWells=$(".customize-recipient-page-color-cell"),this.$colorInput=$(".customize-recipient-page-color-text-input")},_closedByClick:function(i){e.MenuView.prototype._closedByClick.call(this,i),this._consumeEvent(i)},_onBodyClick:function(e){0===n.getEventTarget(e).closest(this.$el).length&&(this.close(),this._closedByClick(e))},_onColorInputClick:function(){this.options.appApi.siteCatalystApi.logScEvent([o.TOOLS,o.SHARE,o.BRANDING,o.COLOR_INPUT])},_onColorWellClick:function(e){var i=e.target.getAttribute("data-background-color");this.$colorInput.val(i),this._uiModel.set({color:i}),this.options.appApi.siteCatalystApi.logScEvent([o.TOOLS,o.SHARE,o.BRANDING,o.COLOR_WELL]),this.close(),this._closedByClick(e)},_onInputKeyDown:function(e){13===e.keyCode&&(this.close(),this._closedByClick(e))},_onInputKeyUp:function(){var e;(/^#[0-9A-Fa-f]{6}$/.test(this.$colorInput.val())||/^#[0-9A-Fa-f]{3}$/.test(this.$colorInput.val()))&&(e=this.$colorInput.val(),this._uiModel.set({color:e})),(/^[0-9A-Fa-f]{6}$/.test(this.$colorInput.val())||/^[0-9A-Fa-f]{3}$/.test(this.$colorInput.val()))&&(e="#"+this.$colorInput.val(),this.$colorInput.val(e),this._uiModel.set({color:e}))},_onFocusIn:function(e){var i=$(e.target);return clearTimeout(this._timeoutId),i.is(".customize-recipient-page-color-cell")&&(this.$colorWells.not(i).attr("tabindex",-1),i.attr("tabindex",0)),!0}})}),define("acplugins/tracked-send/js/tool/ops/add-logo-file-op",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","i18n!acplugins/tracked-send/js/nls/ui-strings","acplugins/tracked-send/js/tool/models/disallowed-file-model"],function(e,i,t){i.AddLogoFileOp=e.Op.extend({run:function(){var e=this.options,s=e.selectionApi,o=e.customizeRecipientPageDialogUiModel,n={dialog:{singleFileSelection:!0},plugin:{filter:{extensions:o.allowedImageExtensions,mimeTypes:o.allowedImageMimetypes,queryLabel:t.CUSTOMIZE_RECIPIENT_PAGE_FILE_FILTERING_LABEL,rejectedFilesCallback:_.bind(function(){this.options.appApi.displayApi.showModal(!0),this.options.appApi.dialogApi.displayTextAlert(this.options.appApi.dialogApi.SEVERITY_ERROR,t.CUSTOMIZE_RECIPIENT_PAGE_UNSUPPORTED_LOGO_TITLE,t.CUSTOMIZE_RECIPIENT_PAGE_UNSUPPORTED_LOGO_FORMAT)},this)}}};return s.selectFiles(i.PLUGIN_ID,n).done(_.bind(function(i){var t=i.localFiles,s=_.map(i.localFileInputs,function(e){return e[0]}),o=i.uploadedFileAttrs,n=i.uploadedFileIds;o&&(n=_.keys(o)),n.length>0?e.logoModel.set("logo",n[0]):e.logoModel.set("logo",void 0),t.length>0?this.options.sendFilesUiModel.setBrandingFileObjects(t):s.length>0&&this.options.sendFilesUiModel.setBrandingFileObjects(s)},this))}})}),define("acplugins/tracked-send/js/tool/views/customize-recipient-page-dlg-view",["core/ac-core","files/ac-files","acplugins/tracked-send/js/tool/ac-tracked-send","acplugins/tracked-send/js/tool/templates/customize-recipient-page-dlg-template","i18n!acplugins/tracked-send/js/nls/ui-strings","acplugins/tracked-send/js/utils/sc-constants","core/utils/image-loader","core/utils/crypto-util","core/views/dialog-view","acplugins/tracked-send/js/tool/views/customize-recipient-page-color-menu-view","acplugins/tracked-send/js/tool/ops/add-logo-file-op","acplugins/tracked-send/js/tool/ops/do-upload-op","acplugins/tracked-send/js/tool/models/ui/customize-recipient-page-dialog-ui-model","acplugins/tracked-send/js/tool/models/branding-logo-asset-model"],function(e,i,t,s,o,n,l,a){t.CustomizeRecipientPageDlgView=e.DialogView.extend({events:function(){return _.extend({},e.DialogView.prototype.events,{"click .customize-recipient-page-save-btn":"_onClickSave","click .customize-recipient-page-close-btn":"_onClickClose","click .customize-recipient-page-logo-btn":"_onLogoClick","click .customize-recipient-page-logo-img":"_onLogoClick","click .customize-recipient-page-logo-removal":"_onRemoveLogo","click .customize-recipient-page-color-btn":"_onColorClick"})},initialize:function(){var i=this.options;e.DialogView.prototype.initialize.call(this),this._template=_.template(s),this.brandingModel=this.options.brandingModel,this._uiModel=new t.CustomizeRecipientPageDialogUiModel(void 0,i),this.brandingModel.get("color")&&this._uiModel.set({color:this.brandingModel.get("color")}),this._uiModel.set({logo:this.brandingModel.get("logo")}),this._addUiModelEventListeners(),this._uiModel.set({logo:this.brandingModel.get("logo"),user_action_id:a.getRandomString(),user_action_name:"Share:Branding"})},render:function(){return this.options.title=o.CUSTOMIZE_RECIPIENT_PAGE_DIALOG_TITLE,e.DialogView.prototype.render.call(this),this._appendToDialog(this._template({CUSTOMIZE_RECIPIENT_PAGE_DIALOG_DESCRIPTION:o.CUSTOMIZE_RECIPIENT_PAGE_DIALOG_DESCRIPTION,CUSTOMIZE_RECIPIENT_PAGE_ADD_LOGO:o.CUSTOMIZE_RECIPIENT_PAGE_ADD_LOGO,CUSTOMIZE_RECIPIENT_PAGE_CHOOSE_COLOR:o.CUSTOMIZE_RECIPIENT_PAGE_CHOOSE_COLOR,CUSTOMIZE_RECIPIENT_PAGE_CLOSE:o.CUSTOMIZE_RECIPIENT_PAGE_CLOSE,CUSTOMIZE_RECIPIENT_PAGE_SAVE:o.CUSTOMIZE_RECIPIENT_PAGE_SAVE,CUSTOMIZE_RECIPIENT_PAGE_REMOVE_LOGO:o.CUSTOMIZE_RECIPIENT_PAGE_REMOVE_LOGO})),this._initWrappers(),this._adjustDialogWidth(),this._center(),this._onLogoChange(),this._renderChildViews(),this._updateFakeHeader(),this._updateSaveButton(),this},close:function(i,t){var s=this.options.brandingModel.get("logo");i||this.options.appApi.siteCatalystApi.logScEvent([n.TOOLS,n.SHARE,n.BRANDING,n.LOGO_CANCEL]),(""===s||null===s)&&this.options.sendFilesUiModel.set({customize_recipient_page:!1}),e.DialogView.prototype.close.call(this,i,t)},_renderChildViews:function(){var e=this.options;this._renderColorMenuView(e)},_renderColorMenuView:function(){this._renderChildView("_colorView",t.CustomizeRecipientPageColorMenuView,this.$colorMenu,{animate:!1,uiModel:this._uiModel,triggerEl:this.$colorMenuBtn})},_updateSaveButton:function(){var e=this.options.brandingModel.get("logo"),i=this.options.brandingModel.get("color"),t=this._uiModel.get("logo"),s=this._uiModel.get("color"),o=!1;s&&i!==s&&(o=!0),t&&e!==t&&(o=!0),t||(o=!1),o?this.$saveButton.removeClass("disabled").prop("disabled",!1):this.$saveButton.addClass("disabled").prop("disabled",!0)},_onLogoChange:function(){var i,t=this._uiModel.get("logo"),s=this._uiModel.get("use_saved");if(t&&s){var o,n=this.options,l=e.opFactory;o=l.create("GettingDownloadTicketOp",n),o.run(!0,t).pipe(_.bind(function(e){i=this._getBrandingLogoUnmanagedUrl(t,e.download_ticket),this._loadImage(i)},this))}else t&&(i=this._getBrandingLogoAssetRenditionUrl(t),this._loadImage(i))},_getBrandingLogoAssetRenditionUrl:function(e){var i,s,o={id:e};return s=_.extend({},this.options,{customizeRecipientPageDialogUiModel:this._uiModel}),i=new t.BrandingLogoAssetModel({},s),i.set(o),i.getRenditionUrl()},_getBrandingLogoUnmanagedUrl:function(e,i){var s,o,n={id:e};return o=_.extend({},this.options,{customizeRecipientPageDialogUiModel:this._uiModel}),s=new t.BrandingLogoAssetModel({},o),s.set(n),s.getUnmanagedUrl(i)},_loadImage:function(e){var i=this._uiModel.get("logo"),t=this._uiModel.get("use_saved");l.loadImage(this.$logoImg,e,void 0,!0).done(_.bind(function(){this._uiModel.set({renditionAvailable:!0}),this._switchLogoAndButton(),this._updateSaveButton()},this)).fail(_.bind(function(){this.options.appApi.displayApi.showModal(!0),this.options.appApi.dialogApi.displayTextAlert(this.options.appApi.dialogApi.SEVERITY_ERROR,o.CUSTOMIZE_RECIPIENT_PAGE_UNSUPPORTED_LOGO_TITLE,o.CUSTOMIZE_RECIPIENT_PAGE_UNSUPPORTED_LOGO_FORMAT)},this)),i&&!t&&this._uiModel.set({user_action_id:a.getRandomString()})},_onClickSave:function(){var e=this.options.brandingModel;this.$saveButton.hasClass("disabled")||(this.options.appApi.siteCatalystApi.logScEvent([n.TOOLS,n.SHARE,n.BRANDING,n.LOGO_SAVE]),e.set({logo:this._uiModel.get("logo"),color:this._uiModel.get("color")}),e.save().done(_.bind(function(){this.close(!0)},this)).fail(_.bind(function(e){this.close(!1),this.options.appApi.errorApi.enqueueAjaxError(e),LOG(0,"AcTrackedSend.CustomizeRecipientPageDlg._onClickSave.fail: "+e.status+" fail")},this)))},_onClickClose:function(){this.close(!1)},_onLogoClick:function(){var e,i,s=this.options.appApi.selectionApi,o=this._uiModel;this.options.appApi.siteCatalystApi.logScEvent([n.TOOLS,n.SHARE,n.BRANDING,n.LOGO_BUTTON]),this._uiModel.set({use_saved:!1,logo:"",renditionAvailable:!1});var l=new Backbone.Model;e=_.extend({},this.options,{logoModel:l,uiModel:this.options.sendFilesUiModel,selectionApi:s,brandingUpload:!0,uploadUrl:this.options.appApi.baseFilesUrisApi.getUploadUri(),customizeRecipientPageDialogUiModel:this._uiModel}),i=new t.AddLogoFileOp(e),i.run().done(_.bind(function(){var i=e.logoModel.get("logo");if(i)this.render(),o.set({logo:i});else{var s=new t.DoUploadOp(e);this.render(),s.run().then(_.bind(function(){this._onLogoClickFinish(e)},this),_.bind(function(){this._onLogoError(e)},this))}},this)).fail(_.bind(function(){this.render()},this))},_onLogoClickFinish:function(){this.options.appApi.displayApi.showModal(!0)},_onLogoError:function(){this.options.appApi.displayApi.showModal(!0),this.options.appApi.dialogApi.displayTextAlert(this.options.appApi.dialogApi.SEVERITY_ERROR,o.SHARE_UPLOAD_ERROR_TITLE,o.SHARE_UPLOAD_ERROR_MSG)},_onRemoveLogo:function(){this._uiModel.set({logo:"",renditionAvailable:!1}),this._switchLogoAndButton(),this._updateSaveButton()},_switchLogoAndButton:function(){this._uiModel.get("logo")&&this._uiModel.get("renditionAvailable")?(this.$logoBtn.hide(),this.$logoHolder.show()):(this.$logoHolder.hide(),this.$logoBtn.show())},_onColorClick:function(){this.options.appApi.siteCatalystApi.logScEvent([n.TOOLS,n.SHARE,n.BRANDING,n.COLOR_MENU_BUTTON]),this.$colorMenu.css("top",this.$fakeHeader.position().top+this.$fakeHeader.outerHeight()+"px"),this._colorView.toggle()},_updateFakeHeader:function(){this._switchLogoAndButton()},_adjustDialogWidth:function(){this.$dlg.width(442)},_addUiModelEventListeners:function(){var e=this._uiModel;e.on("change:logo",this._onLogoChange)},_initWrappers:function(){e.DialogView.prototype._initWrappers.call(this),this.$fakeHeader=$(".customize-recipient-page-fake-header"),this.$logoBtn=$(".customize-recipient-page-logo-btn"),this.$logoBtnLabel=$(".customize-recipient-page-logo-btn-inner"),this.$colorMenuBtn=$(".customize-recipient-page-color-btn"),this.$colorMenuLabel=$(".customize-recipient-page-menu-btn-label"),this.$colorMenuTriangle=$(".customize-recipient-page-menu-btn-triangle"),this.$logoDelete=$(".customize-recipient-page-logo-removal"),this.$logoDeleteX1=$(".customize-recipient-page-logo-removal-x1"),this.$logoDeleteX2=$(".customize-recipient-page-logo-removal-x2"),this.$logoHolder=$(".customize-recipient-page-logo-holder"),this.$saveButton=$(".customize-recipient-page-save-btn"),this.$colorMenu=$(".customize-recipient-page-color-menu"),this.$logoImg=$(".customize-recipient-page-logo-img")
},_onKeyDown:function(i){switch(i.which){case 32:case 40:if(this.$colorMenuBtn.is(i.target))return this.$colorMenuBtn.trigger("click"),!0}return e.DialogView.prototype._onKeyDown.call(this,i)},_onKeyUp:function(e){return 32===e.which&&this.$colorMenuBtn.is(e.target)?(this._consumeEvent(e),!0):!1}})}),define("acplugins/tracked-send/js/tool/ops/customize-recipient-page-op",["core/ac-core","app/ac-app","acplugins/tracked-send/js/tool/ac-tracked-send","acplugins/tracked-send/js/tool/views/customize-recipient-page-dlg-view"],function(e,i,t){t.CustomizeRecipientPageOp=e.Op.extend({run:function(){var e,s=this.options;return s.parentView||(s.parentView=i.viewMgr),delete s.el,e=new t.CustomizeRecipientPageDlgView(s),e.open()}})}),define("acplugins/tracked-send/js/tool/templates/tracked-send-offline-view-template",[],function(){return'<div class="icon"></div><div class="title theme-text"><%= title %></div><div class="content theme-text"><%= content %></div><div class="ok-button control-button theme-button theme-button-label" role="button" aria-label="<%= ok_button_label %>" tabindex = "0"><%= ok_button %></div>'}),define("acplugins/tracked-send/js/tool/views/tracked-send-offline-view",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","i18n!files/nls/ui-strings","acplugins/tracked-send/js/tool/templates/tracked-send-offline-view-template"],function(e,i,t,s){i.TrackedSendOfflineView=e.View.extend({_offline_display_location:19,_offline_display_context:155,initialize:function(){e.View.prototype.initialize.call(this),this._template=_.template(s),this.options.appApi.rnaApi.done(_.bind(function(e){e.getIPMMessage([this._offline_display_location,this._offline_display_context]).done(_.bind(function(e){this.offlineTitle=e.get("title"),this.offlineContent=e.get("content"),this.acceptLabel=e.get("acceptLabel"),this.$el.empty(),this.render()},this))},this))},events:function(){return _.extend({},e.View.prototype.events,{"click .ok-button":"_onOKButtonClick"})},render:function(){return e.View.prototype.render.call(this),0===this.$el.children().length&&(this.$el.html(this._template({title:this.offlineTitle?this.offlineTitle:"",content:this.offlineContent?this.offlineContent:"",ok_button:this.acceptLabel?this.acceptLabel:"",ok_button_label:this._getAriaLabel()||t.FILE_OFFLINE_ARIA_LABEL})),this.$el.addClass("unselectable"),this._initWrappers()),this},_initWrappers:function(){this.$title=this.$(".title"),this.$content=this.$(".content"),this.$ok_button=this.$(".ok-button")},_onOKButtonClick:function(){this.$el.hide(),this.options.appApi.networkConnectivityApi.resetNetworkStatusToOnline()},_getAriaLabel:function(){return this.offlineTitle+this.acceptLabel}})}),define("acplugins/tracked-send/js/tool/views/workflow-view",["core/ac-core","files/ac-files","acplugins/tracked-send/js/tool/ac-tracked-send","acplugins/tracked-send/js/tool/templates/workflow-view-template","acplugins/tracked-send/js/tool/templates/list-item-template","i18n!acplugins/tracked-send/js/nls/ui-strings","i18n!files/nls/ui-strings","acplugins/tracked-send/js/utils/sc-constants","core/utils/file-types","core/utils/truncate","acplugins/tracked-send/js/tool/ops/update-ipm-op","acplugins/tracked-send/js/utils/ts-utils","acplugins/tracked-send/js/tool/ops/get-from-addressbook-op","acplugins/tracked-send/js/tool/views/email-addr-view","acplugins/tracked-send/js/tool/models/email-addr-model","acplugins/tracked-send/js/tool/models/branding-logo-asset-model","acplugins/tracked-send/js/tool/models/users-me-branding-model","acplugins/tracked-send/js/tool/ops/add-files-op","acplugins/tracked-send/js/tool/ops/do-upload-op","acplugins/tracked-send/js/tool/ops/desktop-do-upload-op","acplugins/tracked-send/js/tool/ops/begin-desktop-upload-op","acplugins/tracked-send/js/tool/ops/share-files-op","acplugins/tracked-send/js/tool/ops/desktop-getting-subscription-levels-op","acplugins/tracked-send/js/tool/ops/desktop-fetching-autocomplete-list-op","acplugins/tracked-send/js/tool/ops/customize-recipient-page-op","acplugins/tracked-send/js/tool/views/tracked-send-offline-view"],function(e,i,t,s,o,n,l,a,r,c,d,p,h){t.WorkflowView=e.View.extend({events:{"click .share-files-button":"_onShareClickDebounced","click .share-cancel":"_onCancelClick","click .share-add-more-files":"_onAddMoreClick","click .share-file-list-close":"_onRemoveAssetClick","click .share-world":"_onShareWorldIndividualClick","click .share-individual":"_onShareWorldIndividualClick","click .share-address-wrapper":"_onAddressWrapperClick","click .share-address-book":"_onAddressBookClick","keyup .share-subject-input":"_onSubjectKeyup","click .upsell-close":"_onCloseUpsell","click .upsell-later":"_onCloseUpsell","click .upsell-learn-more":"_onUpsell","click .upsell-now":"_onUpsell","click .share-allow-comments":"_onShareAllowComments","click .share-customize-recipient-page":"_onShareCustomizeRecipientPage","click .branding-button":"_onBrandingClick","click .share-respond-back":"_onRespondBackClick","click .survey-link":"_onSurveyClicked"},initialize:function(){e.View.prototype.initialize.call(this),this._template=_.template(s),this._itemTemplate=_.template(o),this._addUiModelEventListeners(),this._addKeyEventListener(),this._addFocusEventListener(),e.Util.isCEF()&&this._addAppApiCallbacks(),"workflow"===this.options.sendFilesUiModel.get("active_view")&&this._showingWorkflow()},render:function(){var i,t=this.options.sendFilesUiModel;return e.View.prototype.render.call(this),0===this.$el.children().length&&(this.$el.html(this._template({SELECTED_FILES:n.SELECTED_FILES,ADD_MORE_FILES:n.ADD_MORE_FILES,SHARE_WITH_HEADING:n.SHARE_WITH_HEADING,SHARE_ADDRESS_BOOK:n.SHARE_ADDRESS_BOOK,SHARE_AV_ERROR:n.SHARE_AV_ERROR,SHARE_CHOICE_WORLD:n.SHARE_CHOICE_WORLD,SHARE_CHOICE_WORLD_EXPLAIN:n.SHARE_CHIOCE_WORLD_EXPLAIN,SHARE_CHOICE_INDIVIDUAL:n.SHARE_CHOICE_INDIVIDUAL,SHARE_CHOICE_INDIVIDUAL_EXPLAIN:n.SHARE_CHOICE_INDIVIDUAL_EXPLAIN,SHARE_CHOICE_ALLOW_COMMENTS:n.SHARE_CHOICE_ALLOW_COMMENTS,SHARE_CHOICE_CUSTOMIZE_RECIPIENT_PAGE:n.SHARE_CHOICE_CUSTOMIZE_RECIPIENT_PAGE,SHARE_CHOICE_CUSTOMIZE_RECIPIENT_PAGE_EDIT:n.SHARE_CHOICE_CUSTOMIZE_RECIPIENT_PAGE_EDIT,SHARE_ADDRESS_HEADING:n.SHARE_ADDRESS_HEADING,SHARE_ADDRESS_PROMPT:n.SHARE_ADDRESS_PROMPT,SHARE_SUBJECT_HEADING:n.SHARE_SUBJECT_HEADING,SHARE_SUBJECT_MSG_HEADING:n.SHARE_SUBJECT_MSG_HEADING,SHARE_INITIAL_SUBJECT:n.SHARE_INITIAL_SUBJECT,SHARE_INITIAL_SUBJECT_ARIA_LABEL:this._getSubjectInitialAriaLabel(),SHARE_MESSAGE_HEADING:n.SHARE_MESSAGE_HEADING,SHARE_MESSAGE_HEADING_ARIA_LABEL:this._getMessageInitialAriaLabel(),SHARE_MESSAGE_PROMPT:n.SHARE_MESSAGE_PROMPT,SHARE_BUTTON:n.SHARE_BUTTON,SHARE_CANCEL:n.SHARE_CANCEL,SHARE_RECIPIENT_PAGE_HEADLINE:n.SHARE_RECIPIENT_PAGE_HEADLINE,SHARE_CHOICE_INCLUDE_MESSAGE:n.SHARE_CHOICE_INCLUDE_MESSAGE,SEND_UPSELL_HEADLINE:n.SEND_UPSELL_HEADLINE,SEND_UPSELL_POINT_1:n.SEND_UPSELL_POINT_1,SEND_UPSELL_POINT_2:n.SEND_UPSELL_POINT_2,SEND_UPSELL_POINT_3:n.SEND_UPSELL_POINT_3,SEND_UPSELL_LATER:n.SEND_UPSELL_LATER,SEND_UPSELL_NOW:n.SEND_UPSELL_NOW,SEND_UPSELL_LEARN_MORE:n.SEND_UPSELL_LEARN_MORE,SHARE_INDIVIDUAL_HELP:n.SHARE_INDIVIDUAL_HELP,SEND_UPSELL_UPGRADE_REQUIRED:n.SEND_UPSELL_UPGRADE_REQUIRED,SHARE_NO_FILES_SELECTED:n.SHARE_NO_FILES_SELECTED,SHARE_CLICK_TO_ADD_FILES:n.SHARE_CLICK_TO_ADD_FILES,SHARE_CHOICE_RESPOND_BACK:n.SHARE_CHOICE_RESPOND_BACK,SURVEY_LINK:n.SURVEY_LINK})),this._initWrappers(),this._renderAllIpmContent(),i=document.createElement("input"),i.placeHolder?this.$addressHeading.hide():this.$addressHeading.show(),this.options.includeInTabOrder=!1,t.get("active")||e.Util.isCEF()?this.$(".share-individual-upsell").show():t.on("change:active",this._onActiveChange),!t.get("active")&&e.Util.isCEF()&&this.options.appApi.sessionApi.isSignedInReader()?t.on("change:active",this._onActiveChange):this.$(".share-individual-upsell").show()),e.Util.isCEF()&&(this.$(".share-tool-frame").addClass("unselectable"),this._updateIPM()),"option2"===this.options.sendFilesUiModel.get("direct_to_workflow")&&this.$el.addClass("direct-to-workflow-option2"),this._renderChildViews(),this._updateFields(),t.get("is_public")&&this._toggleSubjectAndMessageVisibility(!1),this._computeIPMTop(),this._updateCheckboxStatus(),this._updateButtonStatus(),this._handleDisallowedFiles(),this},_computeIPMTop:function(){this.$shareIndividualIpm.css("top",this.$filesList.height()+85+"px")},_initWrappers:function(){this.$body=$("body"),this.$shareToolFrame=this.$(".share-tool-frame"),this.$filesList=this.$(".share-files-list"),this.$emptyFilesList=this.$(".share-files-list-empty"),this.$addMoreFilesBtn=this.$(".share-add-more-files"),this.$addressHeading=this.$(".share-address-heading"),this.$addressList=this.$(".share-address-input"),this.$subjectHeading=this.$(".share-subject-heading"),this.$sendToHeading=this.$(".share-send-to-heading"),this.$subjectInput=this.$(".share-subject-input"),this.$messageHeading=this.$(".share-message-heading"),this.$messageInput=this.$(".share-message-input"),this.$shareButton=this.$(".share-files-button"),this.$cancelButton=this.$(".share-cancel"),this.$publicRadioButton=this.$(".share-world"),this.$individualRadioButton=this.$(".share-individual"),this.$allowCommentsCheckbox=this.$(".share-allow-comments"),this.$customizeRecipientPageCheckbox=this.$(".share-customize-recipient-page"),this.$allowCommentsLine=this.$(".share-allow-comments-line"),this.$customizeRecipientPageLine=this.$(".share-customize-recipient-page-line"),this.$includeMessageLine=this.$(".share-include-message-line"),this.$includeMessageCheckbox=this.$(".share-include-message"),this.$respondBackLine=this.$(".share-respond-back-line"),this.$respondBackCheckbox=this.$(".share-respond-back"),this.$emailErrorBubble=this.$(".sharing-email-error"),this.$shareIndividualIpm=this.$(".share-individual-upsell"),this.$shareIndividualIpmContent=this.$(".share-individual-upsell-content"),this.$shareAddrWrapper=this.$(".share-address-wrapper"),this.$upsellNow=this.$(".upsell-now"),this.$upsellLater=this.$(".upsell-later"),this.$upsellLearnMore=this.$(".upsell-learn-more"),this.$upsellHeadline=this.$(".upsell-headline"),this.$upsellRule=this.$(".upsell-rule"),this.$upsellBullets=this.$(".upsell-bullets"),this.$recipientPageHeadlineContainer=this.$(".recipient-page-headline-container"),this.$surveyButton=this.$(".survey-link"),this.$addressBookBtn=this.$(".share-address-book"),this.$invitation=this.$(".invitation"),this.$offlineView=this.$(".tracked-send-offline-view")},_renderChildViews:function(){this._renderFileList(),this._renderEmailAddrView()},_renderAllIpmContent:function(){d({mboxIds:["Acom_Send_Workflow_Bullets"],appApi:this.options.appApi})},_renderFileList:function(){var i,t=this.$filesList,s=this.$emptyFilesList,o=this.options.sendFilesUiModel,l=o.get("local_file_objects"),a=o.get("metadata_collection"),d=o.get("enable_form_send"),p=o.get("direct_to_workflow"),h=o.get("view_mode");"option2"===p&&"jts"!==h&&(0===l.length&&0===a.length?(t.hide(),s.show()):(t.show(),s.hide())),t.empty(),_.each(l,function(i,s){var o,l,a,r,c=Object.prototype.toString.call(i);"[object File]"===c?(o=i.name,l=this._getFileObjIconClass(i)):e.Util.isCEF()&&"[object Object]"===c?(o=i.get("name"),l=this._getFileObjIconClass(i),a=this._getFileObjIconDesc(i)):(o=i.value.replace(/^.*(\\|\/|\:)/,""),l=this._getFileInputIconClass(o),a=this._getFileInputIconDesc(o)),o&&(o=_.escape(o)),r=this._itemTemplate({icon_class:l,icon_desc:a,name:o,asset_id:"",list_index:s,remove:n.SHARE_REMOVE,ariaRemoveLabel:this._getRemoveAriaLabel(o)}),o&&t.append(r)},this),a.each(_.bind(function(e){var i=e.get("name");d&&r.isFormMimeType(e.get("content_type"))&&(i=i.substring(0,i.length-5)+".pdf");var s=this._itemTemplate({icon_class:this._getIconClass(e),icon_desc:this._getIconDesc(e),name:i,asset_id:e.get("id"),list_index:"",remove:n.SHARE_REMOVE,ariaRemoveLabel:this._getRemoveAriaLabel(i)});e.get("name")&&t.append(s)},this)),_.each(this.$(".share-file-list-name"),function(e){i=$(e),c.truncateElementText(i)}),this.options.includeInTabOrder||this.$(".share-file-list-close").attr("tabindex","-1")},_getRemoveAriaLabel:function(e){return _.template(n.GENERIC_ARIA_LABEL_STRING,{prefix:e,suffix:n.SHARE_REMOVE})},_getSubjectInitialAriaLabel:function(){return this._getAriaLabelForDesktop(n.SHARE_SUBJECT_MSG_HEADING,n.SHARE_INITIAL_SUBJECT)},_getMessageInitialAriaLabel:function(){return this._getAriaLabelForDesktop(n.SHARE_MESSAGE_HEADING,n.SHARE_MESSAGE_PROMPT)},_getAriaLabelForDesktop:function(e,i){return _.template(n.GENERIC_ARIA_LABEL_STRING,{prefix:e,suffix:i})},_renderEmailAddrView:function(e){var i=t.EmailAddrView;this._renderChildView("_emailAddrView",i,this.$shareAddrWrapper,e)},_renderOfflineView:function(){this._renderChildView("_filesOfflineView",t.TrackedSendOfflineView,this.$offlineView)},_addAppApiCallbacks:function(){this.options.appApi.networkConnectivityApi.addNetworkConnectivtyChangeCallback(this._onConnectionChanged)},_onConnectionChanged:function(e,i){if(i)this.$offlineView.hide(),this.options.appApi.displayApi.showModal(!1),this.$shareToolFrame.show(),this._showingWorkflow(),this.render();else{if(this.options.appApi.displayApi.showModal(!1),this.options.notificationUiModel){var t=this.options.notificationUiModel.get("notification");t&&this.options.appApi.rnaApi.done(_.bind(function(e){e.notificationAPI.removeNotification(t.get("notificationID")),e.stApi.setSendTrackWorkflowInProgress(!1)},this))}this.$offlineView.show(),this._renderOfflineView()}},_updateIPM:function(){this.options.appApi.sessionApi.isSignedInReader()?this.options.appApi.networkConnectivityApi.isOnline()?(this.$offlineView.hide(),this._displayIPMToUser&&("adobeid"===this.options.sendFilesUiModel.get("limits_model").get("account_type")?(this.$(".share-individual-upsell").show(),this.$shareIndividualIpmContent.show()):this.options.sendFilesUiModel.get("limits_model").get("account_type")&&(this.options.isType2OR3=!0,this._type2or3Error()),this._displayIPMToUser=!1)):(this.$offlineView.show(),this._renderOfflineView()):(this.$offlineView.hide(),this._displayIPMToUser&&(this.$(".share-individual-upsell").show(),this.$shareIndividualIpmContent.show(),this._displayIPMToUser=!1))},_havePendingFileMetadata:function(){var e=this.options.sendFilesUiModel,i=e.get("metadata_collection"),t=i.where({name:void 0});return t.length>0},_updateFields:function(){var i,t,s=this.options.sendFilesUiModel,o=s.get("limits_model");i=s.get("initial_subject"),i&&(this.$subjectInput.val(i),s.unset("initial_subject",{silent:!0})),t=s.get("initial_message"),t&&(this.$messageInput.val(t),s.unset("initial_message",{silent:!0})),s.get("allow_comments_enabled")?this.$allowCommentsLine.show():this.$allowCommentsLine.hide(),s.get("customize_recipient_page_enabled")?this.$customizeRecipientPageLine.show():this.$customizeRecipientPageLine.hide(),s.get("enable_sender_survey")&&!e.Util.isCEF()?this.$surveyButton.show():this.$surveyButton.hide(),s.get("show_address_book")||e.Util.isCEF()?this.$addressBookBtn.removeClass("hidden"):this.$addressBookBtn.addClass("hidden"),s.get("respond_back_options_enabled")?(this.$includeMessageLine.show(),this.$respondBackLine.show()):(this.$includeMessageLine.hide(),this.$respondBackLine.hide()),s.get("allow_comments_enabled")||s.get("customize_recipient_page_enabled")||s.get("respond_back_options_enabled")?this.$recipientPageHeadlineContainer.show():this.$recipientPageHeadlineContainer.hide(),(o.get("can_send_av")&&o.get("can_send_to_individuals")||o.get("account_type")&&"adobeid"!==o.get("account_type"))&&(this.$shareIndividualIpmContent.hide(),o.get("account_type")&&"adobeid"!==o.get("account_type")&&(this.options.isType2OR3=!0),s.get("customize_recipient_page_enabled")||s.get("allow_comments_enabled")||s.get("respond_back_options_enabled")?this.$shareIndividualIpm.show():this.$shareIndividualIpm.hide())},_getInitialSubject:function(){var e=this.options.sendFilesUiModel;return e.get("initial_subject")||n.SHARE_INITIAL_SUBJECT},_getInitialMessage:function(){var e=this.options.sendFilesUiModel;return e.get("initial_message")||n.SHARE_MESSAGE_PROMPT},_getIconClass:function(i){var t,s,o;return t=e.Util.isCEF()?r.getFileMimeType(e.Util.getExtension(i.get("name"))):i.get("content_type"),o=r.getFileInfo(t,i.get("name")),s=o.iconCls||""},_getFileObjIconClass:function(i){var t,s,o,n;return e.Util.isCEF()?(t=r.getFileMimeType(e.Util.getExtension(i.get("name"))),s=i.get("name")):(t=i.type,s=i.name),n=r.getFileInfo(t,s),o=n.iconCls||""},_getIconDesc:function(e){var i,t=r.getFileInfo(e.get("content_type"),e.get("name"));return i=t.desc||""},_getFileObjIconDesc:function(i){var t,s,o,n;return e.Util.isCEF()?(t=r.getFileMimeType(e.Util.getExtension(i.get("name"))),s=i.get("name")):(t=i.type,s=i.name),n=r.getFileInfo(t,s),o=n.desc||""},_getFileInputIconClass:function(e){var i,t=r.getFileInfo("",e);return i=t.iconCls||""},_getFileInputIconDesc:function(e){var i,t=r.getFileInfo("",e);return i=t.desc||""},_getSubjectText:function(){var e=this.$subjectInput.val();return e},_isSubjectDefault:function(){return this._isInputDefault(this.$subjectInput)},_getMessageText:function(){var e=this.$messageInput.val();return e},_isMessageDefault:function(){return this._isInputDefault(this.$messageInput)},_isInputDefault:function(e){var i=e.val(),t=e.prop("defaultValue");return i===t},_toggleCheckboxStatus:function(i,t){t?i.addClass("selected").filter(":radio, :checkbox").prop("checked",!0).attr("checked","checked").next(".core-checkbox, .core-radio-button").addClass("selected"):i.removeClass("selected").filter(":radio, :checkbox").prop("checked",!1).removeAttr("checked").next(".core-checkbox, .core-radio-button").removeClass("selected"),e.Util.isIE8()&&e.ViewUtil.detachAndReattachElement(i.next())},_updateCheckboxStatus:function(){var e,i,t,s,o,n,l=this.options.sendFilesUiModel;e=l.get("is_public"),i=l.get("is_individual"),t=l.get("allow_comments"),s=l.get("customize_recipient_page"),o=l.get("include_message"),n=l.get("respond_back"),this._toggleCheckboxStatus(this.$publicRadioButton,e),this._toggleCheckboxStatus(this.$individualRadioButton,i),this._toggleCheckboxStatus(this.$allowCommentsCheckbox,t),this._toggleCheckboxStatus(this.$customizeRecipientPageCheckbox,s),this._toggleCheckboxStatus(this.$includeMessageCheckbox,o),this._toggleCheckboxStatus(this.$respondBackCheckbox,n)},_handleModalMessageDisplay:function(e,i){var t=this.options.sendFilesUiModel,s=t.get(e);s?(i.fadeIn(250),_.defer(_.bind(function(){this.$body.on("click",this._onBodyClick)},this))):i.fadeOut(250)},_handleModalMessageClick:function(e,i,t){var s={};$(i).is(t)||(this.$body.off("click",this._onBodyClick),s[e]=!1,this.options.sendFilesUiModel.set(s))},_onIndividualIpmChange:function(e,i,t){var s=t.callback;i?(this.$upsellHeadline.addClass("upsell-headline-highlighted"),this.$upsellRule.addClass("upsell-rule-highlighted"),this.$upsellLearnMore.hide(),this.$upsellNow.slideDown(),this.$upsellNow.promise().done(_.bind(function(){this.$upsellLater.show(),s&&s()},this))):(this.$upsellHeadline.removeClass("upsell-headline-highlighted"),this.$upsellRule.removeClass("upsell-rule-highlighted"),this.$upsellLater.hide(),this.$upsellNow.slideUp(),this.$upsellNow.promise().done(_.bind(function(){this.$upsellLearnMore.show(),s&&s()},this)))},_onSurveyClicked:function(){this.options.appApi.siteCatalystApi.logScEvent([a.TOOLS,a.SUR,a.SURVEY_LINK]),this.options.sendFilesUiModel.get("enable_sender_survey")&&this.options.appApi.routerApi.navigate("survey/sender_survey",{trigger:!0})},_updateButtonStatus:function(){var e=!0,i=this.options.sendFilesUiModel,t=i.get("metadata_collection"),s=i.get("local_file_objects"),o=i.get("is_individual"),l=i.get("email_addr_collection"),a=i.get("is_public");e&&0===t.length&&0===s.length&&(e=!1),e&&a===!1&&o===!1&&(e=!1),e&&o&&(0===l.length?e=!1:l.each(function(i){var t=i.get("valid");t||(e=!1)})),e?this.$shareButton.removeClass("disabled").removeAttr("disabled"):this.$shareButton.addClass("disabled").attr("disabled","disabled"),this.$shareButton.text(!o&&a?n.SHARE_BUTTON_LINK:n.SHARE_BUTTON),a?this.$invitation.hide():this.$invitation.show()},_handleDisallowedFiles:function(){this._debouncedHandleDisallowedFiles||(this._debouncedHandleDisallowedFiles=_.debounce(this._onDebouncedHandleDisallowedFiles,1e3)),this._debouncedHandleDisallowedFiles()},_onDebouncedHandleDisallowedFiles:function(){var i,t,s,o,l,r,c,d,p,h,u,g,E,S=this.options,m=S.sendFilesUiModel,A=m.get("disallowed_files"),f=m.get("enable_form_send"),C=!1,v=S.appApi.dialogApi,R=S.appApi.connectorsApi;g=$.Deferred(),0!==A.length&&(i=_.filter(A,function(e){return"audio-video"===e.get("reason")}),t=f?[]:_.filter(A,function(e){return"form"===e.get("reason")}),s=_.filter(A,function(e){return"over-limit"===e.get("reason")}),o=_.filter(A,function(e){return"non-native"===e.get("reason")}),i.length?(C=!0,r=t.length?n.SHARE_AV_FORMS_ERROR:n.SHARE_AV_ERROR):t.length&&(r=n.SHARE_FORMS_ERROR),(r===n.SHARE_FORMS_ERROR||r===n.SHARE_AV_FORMS_ERROR)&&this.options.appApi.siteCatalystApi.logScEvent([a.TOOLS,a.SHARE,a.ATTEMPTED_TO_SHARE_FORM]),C&&(r+=n.SHARE_AV_UPGRADE_MESSAGE),s.length&&(l=m.get("limits_model").get("max_files"),i.length||t.length?(d=_.template(n.SHARE_OVER_LIMIT_APPEND_ERROR,{limit:l}),r+=d):(d=_.template(n.SHARE_OVER_LIMIT_ERROR,{limit:l}),r=d)),c=n.SEND_UPSELL_UPGRADE_REQUIRED,o.length&&(i.length||t.length||s.length?(r+=n.SHARE_NON_NATIVE_APPEND_ERROR,g.resolve()):(r=n.SHARE_NON_NATIVE_ERROR_DEFAULT,c=n.SHARE_NON_NATIVE_ERROR_HEADING,_.each(A,function(e){h=e.get("source")}),E=$.Deferred(),h?(e.Util.isCEF()?S.appApi.rnaApi.done(_.bind(function(e){e.getConnectorsUIHelperData(!1,!1).then(_.bind(function(){p=R.getConnectorsUiHelpers(h)},this)).always(function(){E.resolve()})},this)):(p=R.getConnectorsUiHelpers(h),E.resolve()),E.done(_.bind(function(){p&&(u=p.label),u&&(r=_.template(n.SHARE_NON_NATIVE_ERROR,{connectorLabel:u})),g.resolve()},this))):g.resolve())),g.done(_.bind(function(){C&&!this.options.isType2OR3?v.displayHtmlAlert(v.SEVERITY_WARNING,c,r,n.SEND_UPSELL_NOW,n.SEND_UPSELL_LATER).then(_.bind(function(){this._onUpsell()},this)):C&&this.options.isType2OR3?this._type2or3Error():v.displayTextAlert(v.SEVERITY_WARNING,c,r),m.set("disallowed_files",[],{silent:!0}),S.appApi.siteCatalystApi.logScEvent([a.TOOLS,a.SHARE,a.FILES_SHARED_DLG,a.DISALLOWED,a.WARNING,a.SHOWN])},this)))},_type2or3Error:function(){var e=this.options.appApi.dialogApi,i=this.options.sendFilesUiModel.get("limits_model");if("adobeid"!==i.get("account_type")){var t=n.COULD_NOT_SEND,s=n.ENTERPRISE_USERS_ACCESS_ERROR;e.displayHtmlAlert(e.SEVERITY_WARNING,t,s,n.SHARE_SUCCESS_CLOSE)}},_displayTooManyRecipients:function(e,i){var t=this.options.appApi.dialogApi,s=n.SHARE_TOO_MANY_DLG_TITLE,o=_.template(n.SHARE_TOO_MANU_DLG_MESSAGE,{numRecipients:e,maxRecipients:i});t.displayTextAlert(t.SEVERITY_WARNING,s,o)},_displayNoAccessToUser:function(e){var i,t,s=this.options.appApi.dialogApi;i=n.COULD_NOT_SEND,t="UserEncrypted"===e?l.ENCRYPTION_KEY_DISABLED_MESSAGE:n.ENTERPRISE_USERS_ACCESS_ERROR,s.displayTextAlert(s.SEVERITY_WARNING,i,t)},_addUiModelEventListeners:function(){var e=this.options.sendFilesUiModel;e.on("change:disallowed_files",this._onModelChange),e.on("change:initial_subject",this._onModelChange),e.on("change:initial_message",this._onModelChange),e.on("change:show_address_book",this._onModelChange),e.on("change:local_file_objects",this._onFilesChange),e.get("email_addr_collection").on("all",this._onRecipientsChange),e.on("change:is_individual",this._onRecipientsChange),e.on("change:allow_comments",this._onModelChange),e.on("change:customize_recipient_page",this._onModelChange),e.on("change:respond_back",this._onModelChange),e.on("change:display_individual_ipm",this._onIndividualIpmChange),e.get("metadata_collection").on("all",this._onFilesChange),e.on("change:active_view",this._onActiveViewChange),this.options.limitsModel.on("change",this._onModelChange)},_onBrandingClickDebounced:function(){this._debouncedBrandingClick||(this._debouncedBrandingClick=_.debounce(this._onBrandingClick,1e3,!0)),this._debouncedBrandingClick()},_onBrandingClick:function(){var i,s,o,l=this.options.sendFilesUiModel,r=new t.CustomizeRecipientPageOp(this.options),c=!1,d={},p=l.get("view_mode"),h=document.createElement("a");return e.Util.isCEF()?e.Util.isReader()?this.options.appApi.siteCatalystApi.logScEvent([a.TOOLS,a.SHARE,a.BRANDING,a.CLICK_BRANDING_IN_READER]):e.Util.isAcrobat()&&this.options.appApi.siteCatalystApi.logScEvent([a.TOOLS,a.SHARE,a.BRANDING,a.CLICK_BRANDING_IN_ACROBAT]):this.options.appApi.siteCatalystApi.logScEvent([a.TOOLS,a.SHARE,a.BRANDING,a.CLICK_BRANDING]),"web"===p?(h.href=this.options.appApi.baseCloudUrisApi.getApiUri(),s=h.protocol+"//"+h.host+"/send",r.run().then(_.bind(function(){this._onCustomizeSuccess(c)},this),_.bind(function(){this._onCustomizeFail()},this)),i=$.Deferred().promise().resolve()):(e.Util.isCEF()&&(d.okButtonClass="branding-aria-label"),this.options.appApi.siteCatalystApi.logScEvent([a.TOOLS,a.SHARE,a.BRANDING,a.EDIT_BRANDING_ONLINE]),o="cef"===p?n.S_T_CUSTOMIZE_RECIPIENT_PAGE_DIALOG_USE_WEB_MSG:n.CUSTOMIZE_RECIPIENT_PAGE_DIALOG_USE_WEB_MSG,i=this.options.appApi.dialogApi.displayHtmlAlert(!1,n.CUSTOMIZE_RECIPIENT_PAGE_DIALOG_NOT_AVAILABLE,_.template(o,{targetUrl:s,buttonName:n.CUSTOMIZE_RECIPIENT_PAGE_DIALOG_USE_WEB_OK}),n.CUSTOMIZE_RECIPIENT_PAGE_DIALOG_USE_WEB_OK,n.CUSTOMIZE_RECIPIENT_PAGE_CLOSE,d).then(_.bind(function(){this.options.appApi.siteCatalystApi.logScEvent([a.TOOLS,a.SHARE,a.BRANDING,a.EDIT_BRANDING_ONLINE,a.CONTINUE]),this.options.appApi.sessionApi.ensureSignedIn().done(_.bind(function(){e.opFactory.create("GettingSsoUriOp",this.options).run("send").done(function(e){e&&window.open(e.uri)})},this))},this,s),_.bind(function(){this.options.appApi.siteCatalystApi.logScEvent([a.TOOLS,a.SHARE,a.BRANDING,a.EDIT_BRANDING_ONLINE,a.CANCEL])},this)),e.Util.isCEF()&&$(".branding-aria-label").attr("aria-label",this._getAriaLabelForDesktop(n.CUSTOMIZE_RECIPIENT_PAGE_DIALOG_NOT_AVAILABLE,n.CUSTOMIZE_RECIPIENT_PAGE_DIALOG_USE_WEB_OK))),this.options.brandingModel.get("logo")||(l.set({customize_recipient_page:!1}),c=!0),i},_onCustomizeSuccess:function(e){var i=this.options.sendFilesUiModel;e&&i.set({customize_recipient_page:!0})},_onCustomizeFail:function(){LOG(0,"workflow-view CustomizeRecipientPageOp failed")},_onFilesChange:function(){this._onDebouncedFilesChange||(this._onDebouncedFilesChange=_.debounce(this.render,200)),this._onDebouncedFilesChange()},_onModelChange:function(){this.render()},_onRecipientsChange:function(){this._updateButtonStatus()},_onActiveViewChange:function(e,i){"workflow"===i&&this._showingWorkflow()},_onActiveChange:function(e,i){i&&this.$shareIndividualIpm.show()},_onRemoveAssetClick:function(e){var i,t,s,o=$(e.target),n=this.options.sendFilesUiModel,l=n.get("metadata_collection"),a=_.clone(n.get("local_file_objects"));i=o.data("asset-id"),i?(s=l.get(i),l.remove(s)):(t=o.data("list-index"),a.splice(t,1),n.set("local_file_objects",a))},_postSignInFunction:function(){var e,i,t=this.options,s=this.options.is_public,o=this.options.recipients,n=this.options.sendFilesUiModel.get("is_individual");return i=this.options.appApi.baseFilesUrisApi.getAlternateUploadUri(),this.options.appApi.siteCatalystApi.logScEvent([a.TOOLS,a.SHARE,a.SHARE_BUTTON,"async"]),this._logSharingParams(s,n,o),e=this.options.appApi.baseFilesUrisApi.getSendApiUri(),e=p.extractRootUrl(e),t={rootUrl:e,uploadUrl:i}},_reorderCollections:function(e){var i=[],t=$.Deferred(),s=0,o=[],n=this.options.sendFilesUiModel,l=n.get("limits_model"),r=0;if(!this.options.localFiles.length)return t.resolve().promise();if(this.avFlag=!1,this.formFlag=!1,_.each(this.options.localFiles,_.bind(function(t){var a;"postUpload"===e&&(t.id=this.options.assetIdarray[s],this.options.sendFilesUiModel.removeLocalFile([t]),a=this.options.sendFilesUiModel.addFilesToCollection([t.id]),i.push(a[0]),s++),"preUpload"===e&&(_.isEmpty(t.get("ext"))?(this.options.sendFilesUiModel.removeLocalFile([t]),a=this._showErrorDialogMsg("noExtension"),i.push(a)):_.isEmpty(t.get("assetId"))||this.options.bHFileIsDirty?!l.get("can_send_av")&&n.hasAudioVideoExt(t.get("ext"))?(this.avFlag=!0,o[r++]=t,a=$.Deferred().resolve().promise(),i.push(a)):n.get("enable_form_send")||"form"!==t.get("ext")?(a=$.Deferred().resolve().promise(),i.push(a)):(this.formFlag=!0,o[r++]=t,a=$.Deferred().resolve().promise(),i.push(a)):(this.options.sendFilesUiModel.removeLocalFile([t]),a=this.options.sendFilesUiModel.addFilesToCollection([t.get("assetId")]),i.push(a[0])))},this)),o.length){var c;this.options.appApi.siteCatalystApi.logScEvent([a.TOOLS,a.SHARE,a.FILES_SHARED_DLG,a.DISALLOWED,a.WARNING,a.SHOWN]),c=this.options.isType2OR3?this._showErrorDialogMsg("type2or3",o):this.avFlag&&!this.formFlag?this._showErrorDialogMsg("avError",o):!this.avFlag&&this.formFlag?this._showErrorDialogMsg("fileTypeError",o,"formError"):this._showErrorDialogMsg("fileTypeError",o,"avFormError"),i.push(c)}return $.when.apply($,i).then(_.bind(function(){this.options.localFiles=this.options.sendFilesUiModel.get("local_file_objects"),this.options.files=this.options.sendFilesUiModel.get("metadata_collection"),t.resolve()},this),_.bind(function(){t.reject()},this)),t.promise()},_showErrorDialogMsg:function(e,i,t){{var s,o,l=this.options.appApi.dialogApi;this.options.sendFilesUiModel.get("limits_model")}if("noExtension"===e)return s=n.ADD_FILES_REJECTED_TITLE,o=n.ADD_FILES_REJECTED_MESSAGE,l.displayHtmlAlert(l.SEVERITY_WARNING,s,o,n.SHARE_SUCCESS_CLOSE);if("avError"===e)return s=n.SEND_UPSELL_UPGRADE_REQUIRED,o=n.SHARE_AV_ERROR+n.SHARE_AV_UPGRADE_MESSAGE,l.displayHtmlAlert(l.SEVERITY_WARNING,s,o,n.SEND_UPSELL_NOW,n.SEND_UPSELL_LATER).then(_.bind(function(){return this._onUpsell(),$.Deferred().reject().promise()},this),_.bind(function(){return _.each(i,_.bind(function(e){this.options.sendFilesUiModel.removeLocalFile([e])},this)),$.Deferred().reject().promise()},this));if("type2or3"===e){var s=n.COULD_NOT_SEND,o=n.ENTERPRISE_USERS_ACCESS_ERROR;return l.displayHtmlAlert(l.SEVERITY_WARNING,s,o,n.SHARE_SUCCESS_CLOSE).then(_.bind(function(){return _.each(i,_.bind(function(e){this.options.sendFilesUiModel.removeLocalFile([e])},this)),$.Deferred().reject().promise()},this))}return"fileTypeError"===e?(s=n.SEND_UPSELL_UPGRADE_REQUIRED,"formError"===t?(o=n.SHARE_FORMS_ERROR_DESKTOP,this.options.appApi.siteCatalystApi.logScEvent([a.TOOLS,a.SHARE,a.ATTEMPTED_TO_SHARE_FORM])):"avFormError"===t&&(o=n.SHARE_AV_FORMS_ERROR+n.SHARE_AV_UPGRADE_MESSAGE),l.displayHtmlAlert(l.SEVERITY_WARNING,s,o,n.SHARE_SUCCESS_CLOSE).then(_.bind(function(){return _.each(i,_.bind(function(e){this.options.sendFilesUiModel.removeLocalFile([e])},this)),$.Deferred().reject().promise()},this))):void 0},_onShareClickDebounced:function(){e.Util.isCEF()?(this._debouncedShareClick||(this._debouncedShareClick=_.debounce(this._onShareClick,1e3,!0)),this._debouncedShareClick()):this._onShareClick()},_onShareClick:function(){var i,s,o,n,l,r,c,d,p,h,u,g,E,S,m=[],A=[];return this.$shareButton.hasClass("disabled")?void this.options.appApi.siteCatalystApi.logScEvent([a.TOOLS,a.SHARE,a.SHARE_BUTTON,a.DISABLED]):(this.options.appApi.siteCatalystApi.logScEvent([a.TOOLS,a.SHARE,a.SHARE_BUTTON,a.CLICKED]),s=this.options.sendFilesUiModel,o=s.get("metadata_collection"),c=s.get("local_file_objects"),n=s.get("is_public"),l=s.get("is_individual"),h=s.get("customize_recipient_page"),l&&(r=s.get("email_addr_collection"),m=r.map(function(e){return e.get("friendly")?e.get("friendly")+" <"+e.get("email")+">":e.get("email")}),S=s.get("allow_comments")),d=this._getSubjectText(),p=this._getMessageText(),void((e.Util.isCEF()||this._checkMaximumRecipients(m)!==!1)&&(i={uiModel:s,files:o,localFiles:c,recipients:m,is_public:n,can_make_comments:S,email_subject:d,email_message:p,displayApi:this.options.appApi.displayApi,appApi:this.options.appApi,rootView:this.options.rootView,is_branding:h,sendFilesUiModel:this.options.sendFilesUiModel,assetIdarray:A},e.Util.isCEF()&&(i=_.extend({},i,{recipientsAreFinalized:!0})),u=_.bind(function(){var i,s,o=this.options;
e.Util.isCEF()?this._reorderCollections("preUpload").then(_.bind(function(){o=this.options,i=new t.BeginDesktopUploadOp(o),E=new t.FindingUploadFolderOp(o),s=_.bind(function(){o.parentId=E.id,_.isUndefined(E.persistence)||(o.persistence=E.persistence),i.run().then(_.bind(function(){this._onShareClickFinish(o)},this),_.bind(function(){this._onShareError(o)},this))},this),c.length?E.run().then(s):s()},this)):(i=new t.DoUploadOp(o),E=new t.FindingUploadFolderOp(o),s=_.bind(function(){o.parentId=E.id,_.isUndefined(E.persistence)||(o.persistence=E.persistence),i.run().then(_.bind(function(){this._onShareClickFinish(o)},this),_.bind(function(){this._onShareError(o)},this))},this),c.length?E.run().then(s):s())},this),g=_.bind(function(e){e?this.options.sendFilesUiModel.set({active_view:"restriction"}):u()},this),this.options=_.extend({},this.options,i),e.Util.isCEF()?(this.options.appApi.networkConnectivityApi.isOnline()||(this.$offlineView.show(),this._renderOfflineView()),this._fetchingSubscriptionWait(!0),this.options.appApi.sessionApi.ensureSignedIn().then(_.bind(function(){this._resolveRecipientsAddressesList(this.options.recipients).always(_.bind(function(){this.options=_.extend({},this.options,this._postSignInFunction()),this.options.readRegistry=!1,this._checkMaximumRecipients(this.options.recipients)!==!1&&t.opFactory.create("DesktopGettingSubscriptionLevels",this.options).run().then(_.bind(function(){this._fetchingSubscriptionWait(!1),this.options.appApi.displayApi.showModal(!0);var e=this.options.appApi.rnaApi;e.done(_.bind(function(e){g(e.isFeatRunning()?e.stApi.isSendTrackRestrictionsEnabled():this.options.limitsModel.get("restrictions"))},this))},this),_.bind(function(){this._fetchingSubscriptionWait(!1)},this))},this))},this),_.bind(function(e){this._fetchingSubscriptionWait(!1),e&&"NoAccessToPdfServices"===e.errorString&&this._displayNoAccessToUser(e.errorCode)},this))):this.options.appApi.sessionApi.isSignedIn()?u():this.options.appApi.sessionApi.ensureSignedIn().then(_.bind(function(){t.opFactory.create("GettingAuthenticatedModelsOp",this.options).run().then(u)},this)))))},_onShareClickFinish:function(i){var s,o,n=this.options.brandingModel;this.options=_.extend({},this.options,i),this._reorderCollections("postUpload").then(_.bind(function(){this.options.files.length&&(s=new t.ShareFilesOp(i),s.run().then(_.bind(function(e){var i;i=_.bind(function(e){var i;e&&(i=$.trim(e.toLowerCase()),this.options.autoCCollection.add({email:i}))},this),_.each(this.options.recipients,i),n.fetch().always(_.bind(function(){this.options.sendFilesUiModel.set({active_view:"success",parcel:e.parcel}),this._resetPageToDefault(),this._logFormShareSuccess()},this))},this),_.bind(function(i){n.fetch().always(_.bind(function(){try{o=JSON.parse(i.responseText).error.code}catch(e){}o&&0===o.indexOf("CannotConvertForm")&&this._logFormShareError(o)},this)),e.Util.isCEF()&&(this._resetPageToDefault(),this.options.sendFilesUiModel.close())},this)))},this))},_onShareError:function(){this.options.appApi.dialogApi.displayTextAlert(this.options.appApi.dialogApi.SEVERITY_ERROR,n.SHARE_UPLOAD_ERROR_TITLE,n.SHARE_UPLOAD_ERROR_MSG)},_onCancelClick:function(){var e=this.options.sendFilesUiModel;this.$addMoreFilesBtn.attr("tabindex","-1"),this.options.includeInTabOrder=!1,"jts"===e.get("view_mode")&&window.open(e.closeTheBrowserUrl,"_self"),this.options.appApi.siteCatalystApi.logScEvent([a.TOOLS,a.SHARE,a.CANCEL]),e.close(),this._resetPageToDefault()},_resetPageToDefault:function(){this.$emailErrorBubble.hide(),this._resetInputToDefault(this.$subjectInput),this._resetInputToDefault(this.$addressList),this._resetInputToDefault(this.$messageInput)},_resetInputToDefault:function(e){e.val(function(){return this.defaultValue})},_onAddMoreClick:function(){var i,s,o=this.options.appApi.selectionApi,n=this.options.sendFilesUiModel,l=this.options.appApi;this.options.appApi.siteCatalystApi.logScEvent([a.TOOLS,a.SHARE,a.ADD_FILES_TO_SHARE]),i=_.extend({},this.options,{uiModel:n,selectionApi:o,appApi:l}),s=e.Util.isCEF()?new t.DesktopAddFilesOp(i):new t.AddFilesOp(i),s.run()},_onShareIndividualClickDebounced:function(i){e.Util.isCEF()?(this._debouncedShareIndividualClick||(this._debouncedShareIndividualClick=_.debounce(this._onShareWorldIndividualClick,500,!0)),this._debouncedShareIndividualClick(i)):this._onShareWorldIndividualClick(i)},_onShareWorldIndividualClick:function(e){var i=$(e.target),t=this.options,s=t.limitsModel.get("can_send_to_individuals"),o=[a.TOOLS,a.SHARE,a.SHARE_WITH];return i.hasClass("share-world")?(o.push(a.PUBLIC),i=this.$(".share-world.share-check-box")):(o.push(a.PERSONAL),i=this.$(".share-individual.share-check-box")),o.push(i.hasClass("selected")?a.UNCHECKED:a.CHECKED),t.appApi.siteCatalystApi.logScEvent(o),this._toggleTabOrderStatus(!0),this._handleCheckboxClick(i),s?void 0:!1},_onAddressWrapperClick:function(){this.$individualRadioButton.hasClass("selected")||(this.options.appApi.siteCatalystApi.logScEvent([a.TOOLS,a.SHARE,a.EMAIL,a.DISABLED,a.CLICKED]),this._handleCheckboxClick(this.$individualRadioButton))},_onAddressBookClick:function(){var e=this.options.limitsModel;if(this.options.appApi.siteCatalystApi.logScEvent([a.TOOLS,a.SHARE,a.ADDRESS_BOOK,a.CLICKED]),this._onAddressWrapperClick(),e.get("can_send_to_individuals")){var i,t,s;this.options.appApi.siteCatalystApi.logScEvent([a.TOOLS,a.SHARE,a.ADDRESS_BOOK,a.SHOWN]),s=_.extend({},this.options),t=new h(s),i=t.run(),i.then(_.bind(function(e){this.options.appApi.siteCatalystApi.logScEvent([a.TOOLS,a.SHARE,a.ADDRESS_BOOK,a.SUCCESS]),this._emailAddrView._setRecipientsFromText(e)},this),_.bind(function(){this.options.appApi.siteCatalystApi.logScEvent([a.TOOLS,a.SHARE,a.ADDRESS_BOOK,a.CANCEL])},this))}else this.options.appApi.siteCatalystApi.logScEvent([a.TOOLS,a.SHARE,a.ADDRESS_BOOK,a.IPM])},_handleCheckboxClick:function(i){var s=this.options,o=s.sendFilesUiModel,n=s.limitsModel,l=n.get("can_send_to_individuals"),r=i.hasClass("share-world"),c=this._getResolvedPromise();i.hasClass("selected")?o.set(r?{is_public:!0}:{is_individual:!0}):r?(o.set({is_public:!0}),o.set({is_individual:!1}),this._toggleSubjectAndMessageVisibility(!1)):(l||(this.options.readRegistry=!1,this._showingWorkflow(!0),l=n.get("can_send_to_individuals")),l?(this._displayIPMToUser=!1,o.set({is_individual:!0}),o.set({is_public:!1}),e.Util.isCEF()&&o.get("autocomplete_local_contacts_imported")===!1&&(c=this._importLocalEmailContacts(),c.then(_.bind(function(){o.set({autocomplete_local_contacts_imported:!0})},this))),e.Util.isCEF()&&t.opFactory.create("DesktopFetchingAutocompleteListOp",this.options).run(),this._toggleSubjectAndMessageVisibility(!0)):((e.Util.isCEF()&&!this.options.appApi.sessionApi.isSignedInReader()||this._subscriptionsFetchedFirstTime)&&(this._displayIPMToUser=!0),o.get("display_individual_ipm")?o.set({display_individual_ipm:!1},{callback:_.bind(function(){this.set({display_individual_ipm:!0})},o)}):o.set({display_individual_ipm:!0}),s.appApi.siteCatalystApi.logScEvent([a.TOOLS,a.SHARE,a.SHARE_WITH,a.PERSONAL,a.IPM,a.SHOWN]))),this.render()},_toggleSubjectAndMessageVisibility:function(e){e?(this.$(".share-heading-wrapper").show(),this.$(".share-address-input-container").show(),this.$(".share-address-wrapper").show(),this.$subjectHeading.show(),this.$subjectInput.show(),this.$messageHeading.show(),this.$messageInput.show()):(this.$(".share-heading-wrapper").hide(),this.$(".share-address-input-container").hide(),this.$(".share-address-wrapper").hide(),this.$subjectHeading.hide(),this.$subjectInput.hide(),this.$messageHeading.hide(),this.$messageInput.hide())},_onShareAllowComments:function(e){var i=this.options,t=i.sendFilesUiModel,s=$(e.target);t.set({allow_comments:!s.hasClass("selected")})},_onRespondBackClick:function(e){var i=this.options,t=i.sendFilesUiModel,s=$(e.target),o=!s.hasClass("selected");t.set({respond_back:o}),this.options.appApi.siteCatalystApi.logScEvent([a.TOOLS,a.SHARE,a.INCLUDE_REPLY_TO,o?a.CHECKED:a.UNCHECKED])},_onShareCustomizeRecipientPage:function(i){var s=this.options,o=s.sendFilesUiModel,n=$(i.target),l=s.brandingModel.get("logo");this.options.appApi.siteCatalystApi.logScEvent(n.hasClass("selected")?[a.TOOLS,a.SHARE,a.BRANDING,a.TURN_OFF_BRANDING]:[a.TOOLS,a.SHARE,a.BRANDING,a.TURN_ON_BRANDING]),e.Util.isCEF()?""===l||null===l?this.options.appApi.sessionApi.ensureSignedIn().then(_.bind(function(){this.options.readRegistry=!1,t.opFactory.create("DesktopGettingSubscriptionLevels",this.options).run().then(_.bind(function(){l=this.options.brandingModel.get("logo"),""===l||null===l?this._onBrandingClickDebounced():this.options.sendFilesUiModel.set({customize_recipient_page:!n.hasClass("selected")})},this))},this),_.bind(function(e){e&&"NoAccessToPdfServices"==e.errorString&&this._displayNoAccessToUser(e.errorCode)},this)):o.set({customize_recipient_page:!n.hasClass("selected")}):(o.set({customize_recipient_page:!n.hasClass("selected")}),(""===l||null===l)&&this._onBrandingClick())},_onSubjectKeyup:function(e){this._debouncedSubjectKeyup||(this._debouncedSubjectKeyup=_.debounce(this._onDebouncedSubjectKeyup,50)),this._debouncedSubjectKeyup(e)},_onDebouncedSubjectKeyup:function(){this._updateButtonStatus()},_onCloseUpsell:function(e){var i=[a.TOOLS,a.SHARE,a.SHARE_WITH,a.PERSONAL,a.IPM],t=this.options.sendFilesUiModel;e.target===$(".upsell-later").get(0)?(i.push(a.LATER),i.push(a.CLICKED)):i.push(a.CLOSE),this.options.appApi.siteCatalystApi.logScEvent(i),this.$body.off("click",this._onBodyClick),t.set({display_individual_ipm:!1})},_onUpsell:function(i){var t=this.options.limitsModel,s=t.get("upgrade_url");this.options.appApi.siteCatalystApi.logScEvent([a.TOOLS,a.SHARE,a.SHARE_WITH,a.PERSONAL,a.IPM,a.UPGRADE,a.CLICKED]),this.options.appApi.rnaApi.done(_.bind(function(e){e.openDecoratedUrl(s)},this)),e.Util.isCEF()&&this.options.appApi.sessionApi.ensureSignedIn(),i&&this._onCloseUpsell(i)},_toggleTabOrderStatus:function(e){e&&(this.$addMoreFilesBtn.attr("tabindex","0"),this.$(".share-file-list-close").attr("tabindex","0"),this.options.includeInTabOrder=!0,this.$shareButton.attr("tabindex","0"),this.$cancelButton.attr("tabindex","0"),this.$addMoreFilesBtn.attr("tabindex","0"),this.$customizeRecipientPageCheckbox.attr("tabindex","0"),this.$customizeRecipientPageCheckbox.attr("tabindex","0"),this.$(".branding-button").attr("tabindex","0"),this.$respondBackCheckbox.attr("tabindex","0"))},_onKeyDown:function(e){if(27===e.which)return this._onCancelClick(),!0;if(32===e.which||13===e.which){if($(e.target).click(),e.target===this.$subjectInput[0]||e.target===this.$messageInput[0])return!0;e.preventDefault()}else 9===e.which?(e.target===this.$shareButton[0]||$(":focus")[0]===this.$(".share-world")[0])&&this._toggleTabOrderStatus(!0):40===e.which&&this._toggleTabOrderStatus(!0);return!1},_showingWorkflow:function(i){var s=this.options,o=s.limitsModel,n=s.sendFilesUiModel;if(n.resetAutocomplete(),e.Util.isCEF()){if(this.$(".share-individual-upsell").hide(),this._userSignedIn=this.options.appApi.sessionApi.isSignedInReader(),this._userConnected=this.options.appApi.networkConnectivityApi.isOnline(),this._userSignedIn&&this._userConnected)t.opFactory.create("DesktopGettingSubscriptionLevels",this.options).run().then(_.bind(function(){this._subscriptionsFetchedFirstTime=!0,this.render(),o.get("can_send_av")&&o.get("can_send_to_individuals")},this),_.bind(function(e){if(i&&e&&"NoAccessToPdfServices"==e.errorString)this._displayNoAccessToUser(e.errorCode);else if(this._subscriptionsFetchedFirstTime=!0,this.render(),o.get("can_send_av")&&o.get("can_send_to_individuals"))return},this));else if(o.get("can_send_av")&&o.get("can_send_to_individuals"))return}else if(o.get("can_send_av")&&o.get("can_send_to_individuals"))return},_fetchingSubscriptionWait:function(e){e?(this.$fullOverlay=this.options.appApi.displayApi.showFullOverlay(!0),this.$fullOverlay.addClass("progress-fetch-subscription")):(this.$fullOverlay.removeClass("progress-fetch-subscription"),this.options.appApi.displayApi.showFullOverlay(!1))},_parcelHasForms:function(){var e,i,t,s=!1;return e=this.options.sendFilesUiModel,i=e.get("metadata_collection"),t=e.get("enable_form_send"),t&&(s=i.some(function(e){return r.isFormMimeType(e.get("content_type"))})),s},_importLocalEmailContacts:function(){return this.options.appApi.rnaApi.then(_.bind(function(e){return e.stApi.getOutlookAutoCompleteListAtIdleAPI().then(_.bind(function(e){return e._addEventListener("custom:onOutlookAddressesFetchComplete",_.bind(function(e,i){var t=i.params,s=t.split(";"),o="",n="",l=-1,a=this.options.autoCCollection;s.pop(),_.each(s,function(e){l=_.lastIndexOf(e,"<"),-1===l?(n=e,o=""):(n=e.substring(l+1),o=e.substring(0,l)),">"===_.last(n)&&(n=n.slice(0,-1))," "===_.last(o)&&(o=o.slice(0,-1)),a.get(n)&&a.remove(n),a.add({email:n,name:o,isLocalContact:!0})})},this)),$.Deferred().resolve().promise()},this),_.bind(function(){return $.Deferred().reject().promise()},this))},this),_.bind(function(){return $.Deferred().reject().promise()},this))},_resolveRecipientsAddressesList:function(e){return this.options.appApi.rnaApi.then(_.bind(function(i){return _.isUndefined(e)||0===e.length?this._getResolvedPromise():i.stApi.getResolvedEmailAddressesListAPI(e).then(_.bind(function(e){var i;return 0===e.length?$.Deferred().reject().promise():(i=e.split(";"),i.pop(),this.options.recipients=[],_.each(i,_.bind(function(e){-1!==e.indexOf("@")&&this.options.recipients.push(e)},this)),$.Deferred().resolve().promise())},this),_.bind(function(){return $.Deferred().reject().promise()},this))},this),_.bind(function(){return $.Deferred().reject().promise()},this))},_checkMaximumRecipients:function(e){var i,t=this.options.sendFilesUiModel,s=t.get("limits_model"),o=!1;return e&&(i=s.get("max_recipients"),e.length>i?this._displayTooManyRecipients(e.length,i):o=!0),o},_logSharingParams:function(e,i,t){var s,o,n,l,r=this.options.appApi.siteCatalystApi;e&&r.logScEvent([a.TOOLS,a.SHARE,a.SHARE_WITH,a.PUBLIC]),l=this._isSubjectDefault()?a.DEFAULT:a.ENTERED,r.logScEvent([a.TOOLS,a.SHARE,a.SUBJECT,l]),i&&(o=[a.TOOLS,a.SHARE,a.SHARE_WITH,a.PERSONAL],r.logScEvent(o),s=t.length,n=1===s?a[1]:5>=s?a["2_TO_5"]:10>=s?a["6_TO_10"]:a["11_OR_MORE"],o.push(n),r.logScEvent(o),l=this._isMessageDefault()?a.DEFAULT:a.ENTERED,r.logScEvent([a.TOOLS,a.SHARE,a.MESSAGE,l])),this._logFormShareStarted()},_logFormShareStarted:function(){var e,i,t=this.options.appApi.siteCatalystApi;this._parcelHasForms()&&(e=[a.TOOLS,a.FSS,a.FORM,a.OUTPUT,a.SAVE_TO_PDF,a["1_STARTED"],a.SEND_TAB],i=e.join(":"),t.logScEvent(e,{featureType:i}))},_logFormShareSuccess:function(){var e,i,t,s=this.options.appApi.siteCatalystApi;this._parcelHasForms()&&(e=[a.TOOLS,a.FSS,a.FORM,a.OUTPUT,a.SAVE_TO_PDF,a["2_COMPLETED"],a.SEND_TAB],i=e.join(":"),t=[a.TOOLS,a.FSS,a.FORM,a.COMPLETED].join(":"),s.logScEvent(e,{featureType:i,sectionName:t}))},_logFormShareError:function(e){var i,t,s,o=this.options.appApi.siteCatalystApi;if(this._parcelHasForms()){var n="ServerError";switch(e){case"CannotConvertFormTimeout":n="TimeOut";break;case"CannotConvertFormRestrictedEditPermission":n="PermSet"}i=[a.TOOLS,a.FSS,a.FORM,a.OUTPUT,a.SAVE_TO_PDF,a.ERROR,n,a.SEND_TAB],t=i.join(":"),s=[a.TOOLS,a.FSS,a.FORM,a.OUTPUT,a.SAVE_TO_PDF,a.ERROR].join(":"),o.logScEvent(i,{featureType:t,sectionName:s})}}})}),define("acplugins/tracked-send/js/tool/templates/success-dlg-template",[],function(){return'<div class="send-file-success-dlg">       <div class="send-files-public-link-info send-files-info">           <div class="send-files-title-box">               <!-- The acro_invitation query parameter is needed for acrobat to support the link in jump-t0-send -->               <a class="send-files-email-link" href="mailto:?subject=<%=emailLinkSubject%>&body=<%=emailBody%>&acro_invitation=<%=public_url%>">                   <%= SHARE_EMAIL_LINK_BUTTON %>               </a>           </div>           <div class="send-files-description">               <%= SHARE_PUBLIC_LINK_INSTRUCTIONS %>           </div>           <input type="text" class="send-files-public-url" value="<%= public_url %>" readonly="readonly" id="send-files-public-url" />           <div class="share-clipboard-message" style="display:none;">               <%= SHARE_CLIPBOARD_MESSAGE %>           </div>           <div class="share-clipboard-copied" style="display:none;">               <%= SHARE_CLIPBOARD_COPIED %>           </div>           <div class="share-clipboard-helper-container">               <input type="text" class="share-clipboard-helper" readonly="readonly" value="<%= public_url %>"></input>           </div>       </div>       <div class="send-files-invitations-info send-files-info">           <div class="send-files-title-box">               <div class="send-files-title"><%=SHARE_INVITATIONS_HEADING%></div>           </div>           <div class="send-files-description">               <%=SHARE_INVITATIONS_MESSAGE%>           </div>       </div>       <div class="send-files-no-copy-or-email-warning" role="alert">               <%=SHARE_PUBLIC_LINK_NO_COPY_OR_EMAIL_WARNING%>       </div>       <div class="send-files-success-btn-bar">           <button class="send-files-success-close-btn control-button ui-theme theme-text button-grey">               <%=SHARE_SUCCESS_CLOSE%>           </button>       </div>   </div>'}),define("acplugins/tracked-send/js/tool/views/success-dlg-view",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","acplugins/tracked-send/js/tool/templates/success-dlg-template","i18n!acplugins/tracked-send/js/nls/ui-strings","acplugins/tracked-send/js/utils/sc-constants","core/utils/util","core/views/dialog-view"],function(e,i,t,s,o,n){i.SuccessDlgView=e.DialogView.extend({events:function(){return _.extend({},e.DialogView.prototype.events,{"click .send-files-success-close-btn":"_onClickClose","click .send-files-public-url":"_onClickPublicUrl","click .send-files-email-link":"_onClickEmailLink","select .send-files-public-url":"_logUrlSelect"})},initialize:function(){e.DialogView.prototype.initialize.call(this),this._template=_.template(this._getTemplate()),this._loggingDurationOp=new i.LoggingDurationOp({siteCatalystApi:this.options.appApi.siteCatalystApi}),this.firstTime=!0},render:function(){var i=this.options.sendFilesUiModel;this.options.title=s.SHARE_SUCCESS_DLG_TITLE,e.DialogView.prototype.render.call(this),this._parcelInfo=this._parseParcel(),this._appendToDialog(this._template(this._getTemplateParameters())),this._initWrappers(),this._updateDisplay(this._parcelInfo),"jts"===this.options.sendFilesUiModel.get("view_mode")?(this.$dlg.addClass("acrobat"),this.$(".dialog-close-btn").hide(),i.get("reader_mailto_enabled")&&i.get("show_mailto_in_jts")&&this.$(".send-files-email-link").show()):this._center(),this._logDlgOpen(this._parcelInfo),this.firstTime&&(this._logCohorts(),this.firstTime=!1)},close:function(i,t){var s=this.options.appApi.siteCatalystApi,n=this.options.sendFilesUiModel;e.Util.isCEF()?(this._logOnClose(),this.options.appApi.rnaApi.done(_.bind(function(s){e.DialogView.prototype.close.call(this,i,t),s.invokeMethod({methodName:"executeAppUICommand",methodArgs:""})},this))):(this._linkCopiedTimeout&&clearTimeout(this._linkCopiedTimeout),s.logScEvent([o.TOOLS,o.SHARE,o.FILES_SHARED_DLG,this._scDlgType,o.CLOSE]),this._warnedBeforeClosing()&&(this._loggingDurationOp.run([o.TOOLS,o.SHARE,o.FILES_SHARED_DLG,this._scDlgType]),n.close(),e.DialogView.prototype.close.call(this,i,t)))},_initWrappers:function(){e.DialogView.prototype._initWrappers.call(this),this.$sendEmail=this.$(".send-files-email-link"),this.$publicInfo=this.$(".send-files-public-link-info"),this.$inviteInfo=this.$(".send-files-invitations-info"),this.$publicUrl=this.$(".send-files-public-url"),this.$closeBtn=this.$(".send-files-success-close-btn"),this.$clipboardMsg=this.$(".share-clipboard-message"),this.$clipboardCopied=this.$(".share-clipboard-copied"),this.$cbHelper=this.$(".share-clipboard-helper"),this.$cbHelperContainer=this.$(".share-clipboard-helper-container")},_getTemplate:function(){return t},_getTemplateParameters:function(){var e={SHARE_PUBLIC_LINK_HEADING:s.SHARE_PUBLIC_LINK_HEADING,SHARE_EMAIL_LINK_BUTTON:s.SHARE_EMAIL_LINK_BUTTON,SHARE_PUBLIC_LINK_MESSAGE:s.SHARE_PUBLIC_LINK_MESSAGE,SHARE_CLIPBOARD_MESSAGE:s.SHARE_CLIPBOARD_MESSAGE,SHARE_CLIPBOARD_COPIED:s.SHARE_CLIPBOARD_COPIED,SHARE_INVITATIONS_HEADING:s.SHARE_INVITATIONS_HEADING,SHARE_INVITATIONS_MESSAGE:s.SHARE_INVITATIONS_MESSAGE,SHARE_SUCCESS_CLOSE:s.SHARE_SUCCESS_CLOSE,SHARE_PUBLIC_LINK_NO_COPY_OR_EMAIL_WARNING:s.SHARE_PUBLIC_LINK_NO_COPY_OR_EMAIL_WARNING,SHARE_PUBLIC_LINK_INSTRUCTIONS:s.SHARE_PUBLIC_LINK_INSTRUCTIONS,emailLinkSubject:encodeURIComponent(this._parcelInfo.publicSubject),emailBody:this._parcelInfo.publicBody,public_url:this._parcelInfo.publicUrl};return e},_warnedBeforeClosing:function(){var e;return this._logUrlHighlight||this._logEmailClick||this._logUrlCopyKey||this.$(".send-files-success-close-btn").text()===s.SHARE_SUCCESS_CONTINUE||!this._parcelInfo.publicUrl?e=!0:(this.$(".send-files-no-copy-or-email-warning").show(),this.$(".send-files-success-close-btn").text(s.SHARE_SUCCESS_CONTINUE),e=!1,this.options.appApi.siteCatalystApi.logScEvent([o.TOOLS,o.SHARE,o.FILES_SHARED_DLG,this._scDlgType,o.WARNED_BEFORE_CLOSING])),e},_parseParcel:function(){var e,i,t,o,n,l=this.options.sendFilesUiModel,a="";return"cef"===this.options.sendFilesUiModel.get("view_mode")?(o=s.S_T_FILE_EMAIL_BODY,n=s.S_T_FILES_EMAIL_BODY):(o=s.SHARE_FILE_EMAIL_BODY,n=s.SHARE_FILES_EMAIL_BODY),e=l.get("parcel"),i=this._getPublicUrl(e.invitations),t=_.find(e.invitations,function(e){return"PARCEL_PUBLIC_SHARING"!==e.recipient_email})?!0:!1,a=1===e.files.length?o:n,a=encodeURIComponent(a)+"%0D%0A%0D%0A",a+=i,{publicUrl:i,publicSubject:e.email_subject,publicBody:a,hasPrivate:t}},_updateDisplay:function(e){e.publicUrl?this.$publicInfo.show():this.$publicInfo.hide(),e.hasPrivate?this.$inviteInfo.show():this.$inviteInfo.hide()},_getPublicUrl:function(e){var i,t;return t=_.find(e,function(e){return"PARCEL_PUBLIC_SHARING"===e.recipient_email}),t&&(i=t.preview_url),i},_onClickClose:function(){var i=this.options.sendFilesUiModel;e.Util.isCEF()||"jts"===i.get("view_mode")&&window.open(i.closeTheBrowserUrl,"_self"),this.close(!1)},_onClickPublicUrl:function(){this.$publicUrl.select()},_onClickEmailLink:function(){var i=encodeURIComponent(this._parcelInfo.publicSubject),t=this._parcelInfo.publicBody;if(e.Util.isCEF()){var s=[decodeURIComponent(i),decodeURIComponent(t)];this.options.appApi.rnaApi.done(_.bind(function(e){e.stApi.launchMailToUrl(s)},this)),this.$sendEmail.removeAttr("href")}this._logClickEmailLink()},_logClickEmailLink:function(){var e=this.options.appApi.siteCatalystApi;e.logScEvent([o.TOOLS,o.SHARE,o.FILES_SHARED_DLG,this._scDlgType,o.EMAIL_LINK]),this._logEmailClick=!0},_logUrlSelect:function(){var e=this.options.appApi.siteCatalystApi;this._logUrlHighlight||(e.logScEvent([o.TOOLS,o.SHARE,o.FILES_SHARED_DLG,this._scDlgType,o.URL_HIGHLIGHT]),this._logUrlHighlight=!0)},_logDlgOpen:function(e){var i=this.options.appApi.siteCatalystApi;void 0===this._scDlgType&&(this._scDlgType=e.publicUrl&&e.hasPrivate?o.PERSONAL_AND_PUBLIC:e.publicUrl?o.PUBLIC:o.PERSONAL,i.logScEvent([o.TOOLS,o.SHARE,o.FILES_SHARED_DLG,this._scDlgType,o.SHOWN]))},_logCohorts:function(){var e,i,t=this.options;e=t.appApi.usersMeApi.getUserCohorts(),i=e["ts-success-dlg-2"],"original"!==i&&"option1"!==i&&(i="nocohort"),this._logCohortName("ts-success-dlg-2",i),i=e["ts-public-url-copy"]||"nocohort",n.isTouchDevice()&&(i="nocohort"),this._logCohortName("ts-public-url-copy",i)},_logCohortName:function(i,t){var s=this.options.appApi.siteCatalystApi;s.logScEvent(e.Util.isCEF?[o.TOOLS,o.SHARE,o.FILES_SHARED_DLG,this._scDlgType,i,t]:[o.TOOLS,o.SHARE,o.FILES_SHARED_DLG,i,t])},_logViewSentFilesEvent:function(){this.options.appApi.siteCatalystApi.logScEvent([o.TOOLS,o.SHARE,o.VIEW_ALL_SHARED_FILES,o.CLICKED])},_logOnClose:function(){var e=this.options.appApi.siteCatalystApi,i=this.options.sendFilesUiModel;e.logScEvent([o.TOOLS,o.SHARE,o.FILES_SHARED_DLG,this._scDlgType,o.CLOSE]),this._warnedBeforeClosing()&&this._loggingDurationOp.run([o.TOOLS,o.SHARE,o.FILES_SHARED_DLG,this._scDlgType]),this._loggingDurationOp.run([o.TOOLS,o.SHARE,i.get("active_view"),o.SHOWN])}})}),define("acplugins/tracked-send/js/tool/templates/desktop-success-dialog-template",[],function(){return'<div class="send-file-success-dlg">       <div class="send-files-public-link-info send-files-info">           <div class="send-files-title-box">               <div class="send-files-title theme-text">                   <label for="send-files-public-url theme-text"><%=SHARE_PUBLIC_LINK_HEADING%></label>               </div>               <a class="send-files-email-link control-button button-light-blue-small theme-hyperlink theme-hoverable" href="mailto:?subject=<%=emailLinkSubject%>&body=<%=emailBody%>&acro_invitation=<%=public_url%>">                   <%= SHARE_EMAIL_LINK_BUTTON %>               </a>               <button class="send-files-copy-link control-button button-light-blue-small theme-hyperlink theme-hoverable">                   <%= SHARE_COPY_LINK_BUTTON %>               </button>           </div>           <div class="send-files-description theme-text">               <%= SHARE_PUBLIC_LINK_MESSAGE %>           </div>           <input type="text" class="send-files-public-url ui-theme theme-container theme-text" value="<%= public_url %>" readonly="readonly" id="send-files-public-url" />           <div role="alert" class="share-clipboard-message" style="display:none;">               <%= SHARE_CLIPBOARD_MESSAGE %>           </div>           <div role="alert" class="share-clipboard-copied" style="display:none;">               <%= SHARE_CLIPBOARD_COPIED %>           </div>           <div class="share-clipboard-helper-container">               <input type="text" class="share-clipboard-helper" readonly="readonly" value="<%= public_url %>" />           </div>       </div>       <div class="send-files-invitations-info send-files-info">           <div class="send-files-title-box">               <div class="send-files-title theme-text"><%=SHARE_INVITATIONS_HEADING%></div>           </div>           <div class="send-files-description theme-text">               <%=SHARE_INVITATIONS_MESSAGE%>           </div>       </div>       <div class="send-files-success-btn-bar">           <div class="sent-files-link">               <a role="link" class="send-files-sent-link theme-hyperlink" aria-label="<%=SHARE_SUCCESS_SENT_LINK_ARIA_LABEL%>" tabindex="0">                   <%=SHARE_SUCCESS_SENT_LINK%>               </a>               <div class="sent-files-footer-text theme-text">                   <%=SHARE_SUCCESS_SENT_LINK_FOOTER%>               </div>           </div>           <button class="send-files-success-close-btn control-button button-grey ui-theme theme-text">               <%=SHARE_SUCCESS_CLOSE%>           </button>       </div>   </div>'}),define("acplugins/tracked-send/js/tool/views/desktop-success-dialog-view",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","acplugins/tracked-send/js/tool/templates/desktop-success-dialog-template","i18n!acplugins/tracked-send/js/nls/ui-strings","core/utils/util","core/utils/css-util","acplugins/tracked-send/js/tool/views/success-dlg-view","core/ac-core"],function(e,i,t,s,o,n){i.DesktopSuccessDialogView=i.SuccessDlgView.extend({events:function(){return _.extend({},i.SuccessDlgView.prototype.events(),{"click .send-files-copy-link":"_onClickCopyLink","click .send-files-sent-link":"_onClickSentLink"})},initialize:function(){i.SuccessDlgView.prototype.initialize.call(this),this.changedWidth=!1},render:function(){i.SuccessDlgView.prototype.render.call(this),this.changedWidth||(this._resizeDialogWidth(),this.changedWidth=!0),this.$(".generic-dialog").addClass("unselectable"),this.$(".send-files-success-close-btn").attr("aria-label",this._getSuccessDialogAriaLabel()),this.$(".send-files-email-link").attr("aria-label",this._getEmailLinkAriaLabel())},_getTemplate:function(){return t},_getTemplateParameters:function(){var e={SHARE_PUBLIC_LINK_HEADING:s.SHARE_PUBLIC_LINK_HEADING_DESKTOP,SHARE_EMAIL_LINK_BUTTON:s.SHARE_EMAIL_LINK_BUTTON,SHARE_COPY_LINK_BUTTON:s.SHARE_COPY_LINK_BUTTON,SHARE_PUBLIC_LINK_MESSAGE:s.SHARE_PUBLIC_LINK_MESSAGE,SHARE_CLIPBOARD_MESSAGE:s.SHARE_CLIPBOARD_MESSAGE,SHARE_CLIPBOARD_COPIED:s.SHARE_CLIPBOARD_COPIED,SHARE_INVITATIONS_HEADING:s.SHARE_INVITATIONS_HEADING,SHARE_INVITATIONS_MESSAGE:s.SHARE_INVITATIONS_MESSAGE,SHARE_SUCCESS_CLOSE:s.SHARE_SUCCESS_CLOSE,SHARE_SUCCESS_SENT_LINK:s.SHARE_SUCCESS_SENT_LINK,SHARE_SUCCESS_SENT_LINK_FOOTER:s.SHARE_SUCCESS_SENT_LINK_FOOTER,SHARE_SUCCESS_SENT_LINK_ARIA_LABEL:this._getSentLinkAriaLabel(),emailLinkSubject:encodeURIComponent(this._parcelInfo.publicSubject),emailBody:this._parcelInfo.publicBody,public_url:this._parcelInfo.publicUrl};return o.isMac()&&(e.SHARE_CLIPBOARD_MESSAGE=s.SHARE_CLIPBOARD_MESSAGE_MAC),e},_initWrappers:function(){i.SuccessDlgView.prototype._initWrappers.call(this),this.$sentFilesLink=this.$(".send-files-sent-link"),this.$copyLink=this.$(".send-files-copy-link")},_onClickSentLink:function(){var i="sentfiles";this._logViewSentFilesEvent(),this.options.appApi.rnaApi.done(_.bind(function(t){t.isRunningInBrowser()?this.options.appApi.sessionApi.ensureSignedIn().done(_.bind(function(){e.opFactory.create("GettingSsoUriOp",this.options).run(i).done(function(e){e&&window.open(e.uri)})},this)):t.selectLeftRailItem("sentfiles")},this))},_onClickCopyLink:function(){this._onClickPublicUrl(),this.$(".send-files-public-url").focus(),this.options.appApi.rnaApi.done(_.bind(function(e){e.cefBrowserApi({methodName:"handleViewEvent",parameters:["CopyEvent",{}]})},this))},_resizeDialogWidth:function(){var e;this.$(".generic-dialog").width("480px"),e=this.$(".generic-dialog").width()+n.getPaddingWidth(this.$(".generic-dialog")),this.$(".generic-dialog").css("margin-left",-e/2)},_getSuccessDialogAriaLabel:function(){return this._getAriaLabelForDesktop(s.SHARE_SUCCESS_DLG_TITLE,s.SHARE_SUCCESS_CLOSE)},_getEmailLinkAriaLabel:function(){return this._getAriaLabelForDesktop(s.SHARE_SUCCESS_DLG_TITLE,s.SHARE_EMAIL_LINK_BUTTON)},_getSentLinkAriaLabel:function(){return this._getAriaLabelForDesktop(s.SHARE_SUCCESS_DLG_TITLE,this._getAriaLabelForDesktop(s.SHARE_SUCCESS_SENT_LINK,s.SHARE_SUCCESS_SENT_LINK_FOOTER))},_getAriaLabelForDesktop:function(e,i){return _.template(s.GENERIC_ARIA_LABEL_STRING,{prefix:e,suffix:i})}})}),define("acplugins/tracked-send/js/tool/templates/tracked-send-restriction-template",[],function(){return'<%= message %><a class="send-track-restriction-learn-more" role="link"  tabindex="0"><%= link %></a>.<button class="send-track-restriction-close-btn control-button button-grey ui-theme theme-text tracked-send-restriction-dialog-close">               <%= closeBtn %>           </button>'}),define("acplugins/tracked-send/js/tool/views/tracked-send-restriction-view",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","acplugins/tracked-send/js/tool/templates/tracked-send-restriction-template","i18n!acplugins/tracked-send/js/nls/ui-strings","core/utils/util","core/utils/css-util","core/views/dialog-view","core/ac-core"],function(e,i,t,s){i.DesktopSentTrackRestrictionDialogView=e.DialogView.extend({events:function(){return _.extend({},e.DialogView.prototype.events,{"click .send-track-restriction-learn-more":"_sendTrackRestrictionLearnMore","click .send-track-restriction-close-btn":"_closeDialog"})},initialize:function(){e.DialogView.prototype.initialize.call(this)},_sendTrackRestrictionLearnMore:function(){this.options.appApi.rnaApi.then(_.bind(function(e){return e.stApi.launchSendTrackRestrictionsLearnMoreUrl()}))},render:function(){this.options.appApi,this.options.sendFilesUiModel;this.options.title=s.ENTERPRISE_RESTRICTIONS_ENFORCED,e.DialogView.prototype.render.call(this),this._appendToDialog(_.template(t)({message:s.ENTERPRISE_USERS_SHARING_ACCESS,link:s.SEND_UPSELL_LEARN_MORE,closeBtn:s.SHARE_SUCCESS_CLOSE})),this.$(".generic-dialog").addClass("tracked-send-restriction-dialog"),this.$(".dialog-close-btn").hide(),this.$(".dialog-icon").addClass("dialog-icon-common sev-warning"),this._initWrappers()
},_closeDialog:function(){this.options.appApi.rnaApi.done(_.bind(function(i){e.DialogView.prototype.close.call(this,!1),i.invokeMethod({methodName:"executeAppUICommand",methodArgs:""})},this))},_initWrappers:function(){e.DialogView.prototype._initWrappers.call(this)}})}),define("acplugins/tracked-send/js/home-view/ac-tracked-send",["plugins-common/ac-plugins"],function(e){e.TrackedSend||(e.TrackedSend={});var i=e.TrackedSend.Home;return i||(i=e.TrackedSend.Home={}),i.CachedData={},i.PLUGIN_ID||(i.PLUGIN_ID="sentfiles"),i}),define("acplugins/tracked-send/js/home-view/models/parcel-model",["core/ac-core","acplugins/tracked-send/js/home-view/ac-tracked-send","core/utils/http-util","core/models/model"],function(e,i,t){return i.ParcelModel=e.Model.extend({initialize:function(i,t){e.Model.prototype.initialize.call(this,i,t),this.rootUrl="",this.idAttribute="parcel_id",t.collection&&(this.rootUrl=t.collection.rootUrl),t.rootUrl&&(this.rootUrl=t.rootUrl)},url:function(){var e=this.id;return this.rootUrl+"/a/api/parcels/"+encodeURIComponent(e)},getRenditionUrl:function(e,i,s){var o=Ac.baseFilesUrisModel.getRenditionUri()+"assets/"+encodeURIComponent(e)+"/"+i;return o+="?"+t.getClientIdQueryParam(),s&&(o+="&page="+s),o},idAttribute:"parcel_id",parse:function(e){return e.parcels?e.parcels[0]:e},getRecipients:function(){var e,i=this.get("invitations");return e=_.map(i,function(e){return e.recipient_email})},getViews:function(){return this.get("events").filter(function(e){return"parcel_view"===e.event_type})},isActive:function(){return this.get("is_active")},getNumHits:function(){var e=this.countEventTypes();return e.parcel_view||0},countEventTypes:function(){var e;return e=_.reduce(this.get("invitations"),function(e,i){var t=i.event_counts;return t&&(e=_.reduce(t,function(e,i,t){return e.hasOwnProperty(t)||(e[t]=0),e[t]+=i,e},e)),e},{})},getSingleFileInfo:function(){var e=this.get("resources");return e&&1===e.length?e[0]:void 0},getSingleFileId:function(){var e=this.getSingleFileInfo();return e?e.asset_id:void 0},isSingleFileNotPreviewable:function(){var e,i=this.getSingleFileInfo();return i?(e=i.content_type,"application/zip"===e):!1}}),i.ParcelModel}),define("acplugins/tracked-send/js/tool/ops/add-parcel-op",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","acplugins/tracked-send/js/home-view/models/parcel-model"],function(e,i,t){i.AddParcelOp=e.Op.extend({run:function(){var e,i=this.options.parcelId,s=this.options.rootUrl;return e=new t({parcel_id:i},{rootUrl:s}),this.parcelModel=e,e.fetch().then(_.bind(this._parcelRecieved,this))},_parcelRecieved:function(){var e,i,t,s,o=this.options.uiModel;e=this.parcelModel.get("email_subject"),i=this.parcelModel.get("email_message"),o.set({initial_subject:e,initial_message:i}),t=this.parcelModel.get("resources"),s=_.map(t,function(e){return e.asset_id}),o.addFilesToCollection(s)}})}),define("acplugins/tracked-send/js/tool/models/ticket-data-model",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","core/models/model"],function(e,i){return i.TicketDataModel=e.Model.extend({initialize:function(i,t){e.Model.prototype.initialize.call(this,i,t),this.rootUrl="",t.collection&&(this.rootUrl=t.collection.rootUrl),t.rootUrl&&(this.rootUrl=t.rootUrl)},url:function(){return this.rootUrl+"/a/api/private/ticket_data/"+encodeURIComponent(this.id)},idAttribute:"ticket_id",parse:function(e){return e}}),i.TicketDataModel}),define("acplugins/tracked-send/js/tool/ops/add-ticket-data-op",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","acplugins/tracked-send/js/tool/models/ticket-data-model"],function(e,i,t){i.AddTicketDataOp=e.Op.extend({run:function(){var e,i=this.options.ticketId,s=this.options.rootUrl;return e=new t({ticket_id:i},{rootUrl:s}),this.ticketDataModel=e,e.fetch().then(_.bind(this._ticketDataReceived,this))},_ticketDataReceived:function(){var e=this.options.uiModel,i=this.ticketDataModel,t=i.get("resources"),s=i.get("email_subject"),o=i.get("email_message"),n=i.get("recipients"),l=e.parseEmailArray(n),a=i.get("user_action_id"),r=i.get("user_action_name"),c={initial_subject:s,initial_message:o,recipients:l,user_action_id:a,user_action_name:r};i.get("show_mailto_in_jts")&&(c.show_mailto_in_jts=!0),0===l.length?(c.is_public=!0,c.is_individual=!1):(c.is_public=!1,c.is_individual=!0),e.set(c),e.addFilesToCollection(t),e.addRecipientsToCollection(l)}})}),define("acplugins/tracked-send/js/utils/ops/logging-duration-op",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","acplugins/tracked-send/js/utils/sc-constants"],function(e,i,t){i.LoggingDurationOp=e.Op.extend({initialize:function(){e.Op.prototype.initialize.call(this),this.reset()},reset:function(){this._openTime=new Date},run:function(e){this._logOpenTime(e)},_convertMsecsToBucket:function(e){var i=t["121_OR_MORE"];return 1999>=e?i=t[1]:5999>=e?i=t["2_TO_5"]:10999>=e?i=t["6_TO_10"]:20999>=e?i=t["11_TO_20"]:40999>=e?i=t["21_TO_40"]:120999>=e&&(i=t["41_TO_120"]),i},_logOpenTime:function(e){var i=Math.abs(new Date-this._openTime);e||(e=[]),this.options.siteCatalystApi.logScEvent(e.concat([t.DURATION,this._convertMsecsToBucket(i)]))}})}),define("acplugins/tracked-send/js/tool/views/tracked-send-tool-view",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","acplugins/tracked-send/js/tool/templates/tracked-send-template","acplugins/tracked-send/js/utils/sc-constants","acplugins/tracked-send/js/tool/models/version-model","core/utils/crypto-util","acplugins/tracked-send/js/utils/sharing","acplugins/tracked-send/js/utils/ts-utils","core/utils/css-util","i18n!acplugins/tracked-send/js/nls/ui-strings","core/views/plugin-content-view","acplugins/tracked-send/js/tool/ops/op-factory","acplugins/tracked-send/js/tool/models/limits-model","acplugins/tracked-send/js/tool/models/ui/send-files-ui-model","acplugins/tracked-send/js/tool/views/welcome-view","acplugins/tracked-send/js/tool/views/workflow-view","acplugins/tracked-send/js/tool/views/success-dlg-view","acplugins/tracked-send/js/tool/views/desktop-success-dialog-view","acplugins/tracked-send/js/tool/views/tracked-send-restriction-view","acplugins/tracked-send/js/tool/ops/add-parcel-op","acplugins/tracked-send/js/tool/ops/add-ticket-data-op","acplugins/tracked-send/js/tool/ops/desktop-getting-subscription-levels-op","acplugins/tracked-send/js/utils/ops/logging-duration-op"],function(e,i,t,s,o,n,l,a,r,c){return i.ToolView=e.PluginContentView.extend({initialize:function(){e.PluginContentView.prototype.initialize.call(this),e.Util.isCEF()&&r.loadCss("static/js/plugins/tracked-send/js/plugins/tracked-send/css/desktop-tool-view.css"),i.plugin=this},render:function(){var i=this.$el;e.PluginContentView.prototype.render.call(this),0===i.children().length&&(i.html(_.template(t)),this._initWrappers()),e.Util.isCEF()&&this.$(".tracked-send-tool-welcome").addClass("unselectable"),this.switchViews(),this._renderChildViews()},initPlugin:function(){var t,s,o=this.options;e.Util.isCEF()?(this._addAppApiCallbacks(),this.options.appApi.sessionApi.isSignedInReader()&&(this.isInitial=!0),e.Util.isReader()?s=c.READER_GO_URL:e.Util.isAcrobat()&&(s=c.ACROBAT_GO_URL)):(s="https://www.acrobat.com/adobesend/en/pricing.html?promoid=KQMMS",t=this.options.appApi.baseFilesUrisApi.getSendApiUri(),t=a.extractRootUrl(t),o.rootUrl=t,o.limitsModel.set({rootUrl:o.rootUrl})),o.limitsModel=new i.LimitsModel({can_send_to_individuals:!1,can_send_av:!1,can_custom_brand:!1,av_mimetypes:["application/mxf","application/ogg","application/vnd.rn-realmedia"],av_extensions:["aac","aic","aif","aiff","asf","asx","au","avi","avs","dif","divx","dv","flv","f4v","lsf","lsx","mkv","m3u","m4a","m4p","m4v","mov","movie","mp2","mp3","mp4","mpe","mpeg","mpg","mpga","mxu","ogg","qt","ra","ram","rm","snd","vob","wav","wma","wmv"],max_files:50,max_recipients:250,max_subject_length:1e3,max_message_length:1e3,upgrade_url:s},{rootUrl:o.rootUrl,usersMeApi:this.options.appApi.usersMeApi});var n=e.CommentUtil.isCommentingEnabled(this.options);return this._uiModel=new i.SendFilesUiModel({limits_model:o.limitsModel,connectors_api:this.options.appApi.connectorsApi,allow_comments_enabled:n}),o.sendFilesUiModel=this._uiModel,e.Util.isCEF()&&o.sendFilesUiModel.set({view_mode:"cef"}),this._addUiModelEventListeners(),this._loggingDurationOp=new i.LoggingDurationOp({siteCatalystApi:o.appApi.siteCatalystApi}),this._loggingViewDurationOp=new i.LoggingDurationOp({siteCatalystApi:o.appApi.siteCatalystApi}),o.appApi.siteCatalystApi.register("sharing",l),this._getResolvedPromise()},selectPlugin:function(){var t,o,l,a,r=this.options.appApi.routerApi,c=this.options.appApi.displayApi.applyUIThemeStyles(this.$el);return e.Util.isCEF()||this._addListenerForUnload(),this._loggingViewDurationOp.reset(),this._loggingDurationOp.reset(),this.options.appApi.siteCatalystApi.logScEvent([s.TOOLS,s.SHARE,s.SHOWN]),e.Util.isCEF()?this.options.appApi.siteCatalystApi.logScEvent([s.TOOLS,s.SHARE,s.CLICKED]):this.options.sendFilesUiModel.initializeFromCohorts(this.options.appApi.usersMeApi.getUserCohorts()),r.currentPathStartsWith("send/jump")||r.navigate(i.PLUGIN_ID),t=this._startPlugin(),e.Util.isCEF()?(this._activeView=void 0,this.options.readRegistry=!0,a=this._fetchActiveDocument()):(this._activeView=this._uiModel.get("active_view"),a=$.Deferred().resolve().promise()),this._processRouterArgs(),o=this._uiModel.get("active_view"),this.options.appApi.siteCatalystApi.logScEvent([s.TOOLS,s.SHARE,o,s.SHOWN]),this._logCohorts(),a.then(_.bind(function(){return l=this._activeView,t.then(_.bind(function(){var i=e.Features.getFeature("enable_sender_survey"),t=this._uiModel.get("limits_model"),s=t.get("can_custom_brand"),o=this.options.brandingModel.get("enabled"),a=!1,r=this.options.appApi.usersMeApi.getUserCohorts();r&&"enabled"===r["ts-sender-survey"]&&(a=!0),e.Util.isCEF()&&(o=!1),this._uiModel.set({active:!0,user_action_id:n.getRandomString(),user_action_name:"Share:ShareButton",customize_recipient_page:o,customize_recipient_page_enabled:s,enable_sender_survey:i&&a}),c.then(_.bind(function(){this.render(),e.Util.isCEF()&&("workflow"===l?$(".share-world").focus():$(".tracked-send-select-files-btn").focus(),this._uiModel.set({active_view:l}))},this))},this))},this))},deselectPlugin:function(){this._loggingDurationOp.run([s.TOOLS,s.SHARE,s.SHOWN]),this._removeListenerForUnload(),this._uiModel.set({active:!1})},getSiteCatalystName:function(){return s.SHARE},_addAppApiCallbacks:function(){this.options.appApi.sessionApi.addSignedInChangeCallback(this._onSignedInChange)},_onSignedInChange:function(e,t){t?this.isInitial?(this.isInitial=!1,this._logCohorts()):(this.options.readRegistry=!1,i.opFactory.create("DesktopGettingSubscriptionLevels",this.options).run().always(_.bind(function(){this.render(),this._logCohorts()},this))):(this.options.readRegistry=!1,this.isInitial=!1,this.options.limitsModel.resetValues(),this.options.sendFilesUiModel.set({limits_model:this.options.limitsModel}),this.options.sendFilesUiModel.resetTodefaults(),this.options.autoCCollection.reset())},switchViews:function(){var e=this._uiModel.get("active_view");"workflow"===e?(this.$workflow.show(),this.$welcome.hide()):"welcome"===e&&(this.$welcome.show(),this.$workflow.hide())},getPluginVersionList:function(){var e=this.options,i=[],t=$.Deferred(),s=this._versionModel;return s||(s=this._versionModel=new o(e)),s.get("version")?(i.push(s.get("version")),t.resolve()):s.fetch().then(function(){i.push(s.get("version")),t.resolve()}),t.promise(i)},_startPlugin:function(){var t,s=this.options,o=this._gettingAuthenticatedModelsPromise;return o||(i.opFactory.create("StartingPluginOp",this.options).run(),t=s.appApi.usersMeApi.getUserCohorts(),t&&"enabled"===t["ts-simulate-unauthenticated"]&&i.opFactory.create("MockingUnauthenticatedSessionOp",s).run(),o=this._gettingAuthenticatedModelsPromise=!e.Util.isCEF()&&s.appApi.sessionApi.isSignedIn()?i.opFactory.create("GettingAuthenticatedModelsOp",s).run():this._getResolvedPromise()),o},_initWrappers:function(){this.$welcome=this.$(".tracked-send-tool-welcome"),this.$workflow=this.$(".tracked-send-tool-workflow")},_renderChildViews:function(){var e=this.options;this._renderWorkflowView(e),this._renderWelcomeView(e)},_renderWelcomeView:function(e){this._renderChildView("_welcomeView",i.WelcomeView,this.$welcome,e)},_renderWorkflowView:function(e){this._renderChildView("_workflowView",i.WorkflowView,this.$workflow,e)},_fetchActiveDocument:function(){var t,s,o,n,l,r,c,d,p,h,u=(i.selector.routerArgs,$.Deferred()),g=[];return this.options.appApi.rnaApi.then(_.bind(function(E){t=E.stApi.getSendTrackAppLauncherWithParcel(),d=E.stApi.getSendTrackAppLauncherWithAssets(),p=E.stApi.getSendTrackAppLauncherWithModels(),d?(this.options.appApi.displayApi.showSpinner(!0),c=JSON.parse(d),r=$.map(c,function(e){return e}),this._activeView="workflow",this.options.appApi.sessionApi.ensureSignedIn().then(_.bind(function(){i.opFactory.create("DesktopGettingSubscriptionLevels",this.options).run().always(_.bind(function(){this._uiModel.addFilesToCollection(r)},this)),this.options.appApi.displayApi.showSpinner(!1),u.resolve().promise()},this),_.bind(function(){this.options.appApi.displayApi.showSpinner(!1)},this))):p?(this.options.appApi.displayApi.showSpinner(!0),this._activeView="workflow",p.length>0&&(_.each(p,function(i){h=new e.LocalItemModel(void 0,{_proxy:i._proxy}),g.push(h)}),this._uiModel.addFileObjects(g),u.resolve().promise()),this.options.appApi.displayApi.showSpinner(!1)):t?(this.options.appApi.displayApi.showSpinner(!0),this._activeView="workflow",this.options.appApi.sessionApi.ensureSignedIn().then(_.bind(function(){s=this.options.appApi.baseFilesUrisApi.getSendApiUri(),s=a.extractRootUrl(s),this.options.rootUrl=s,this.options.appApi.displayApi.showSpinner(!1),this._gettingAuthenticatedModelsPromise.then(_.bind(function(){n=this.options.rootUrl,l=new i.AddParcelOp({uiModel:this._uiModel,parcelId:t,rootUrl:n}),i.opFactory.create("DesktopGettingSubscriptionLevels",this.options).run().always(_.bind(function(){l.run()},this)),u.resolve().promise()},this))},this),_.bind(function(){this.options.appApi.displayApi.showSpinner(!1)},this))):(o=E.getOpenedFile(),_.isEmpty(o)?(this._activeView="welcome",u.resolve().promise()):(this._activeView="workflow",this.options.appApi.rnaApi.done(_.bind(function(){o.invoke("determineFileSource").then(_.bind(function(e){if("root"===e||"unsupported"===e||"local"===e||"desktop_sharepoint"===e||"native"===e||"native_v2"===e)this._uiModel.addFileObjects(o);else{var t,s=[];t=new i.DisallowedFileModel({name:o.get("name"),source:e,reason:"non-native"}),s.push(t),this._uiModel.set("disallowed_files",s,{silent:!1})}},this),_.bind(function(){this._uiModel.addFileObjects(o)},this))},this)),this._isDirty(o,E).then(_.bind(function(){this.options.bHFileIsDirty=!1,u.resolve().promise()},this),_.bind(function(){this.options.bHFileIsDirty=!0,u.resolve().promise()},this))))},this)),u.promise()},_isDirty:function(e,i){return i.rnaServicesAPI.isDirtyApi(e._proxy).then(_.bind(function(e){return e?$.Deferred().reject().promise():$.Deferred().resolve().promise()},this),_.bind(function(){return $.Deferred().reject().promise()},this))},_renderSuccessView:function(){var t,s=_.extend({},this.options,{sendFilesUiModel:this._uiModel,parentView:this._welcomeView});return delete s.el,t=e.Util.isCEF()?new i.DesktopSuccessDialogView(s):new i.SuccessDlgView(s),t.open(s.parentView)},_renderRestrictionView:function(){var t,s=_.extend({},this.options,{sendFilesUiModel:this._uiModel,parentView:this._workflowView});return delete s.el,e.Util.isCEF()&&(t=new i.DesktopSentTrackRestrictionDialogView(s)),t.render()},_hideFrameworkChrome:function(){var e=this.options.appApi.displayApi;e.showFrameworkChrome(!1),_.defer(function(){$(".share-selected-files-heading").hide(),$(".share-add-more-files").hide(),$(".share-files-list").hide()})},_processRouterArgs:function(){var e,t,s,o,n,l=i.selector.routerArgs,a=this.options.appApi.selectionApi,r=[],c=[];l?(t=l.parcelID,s=l.fileID,o=l.ticket,s?(this._uiModel.set({active_view:"workflow"}),this._gettingAuthenticatedModelsPromise.then(_.bind(function(){c=[s],this._uiModel.addFilesToCollection(c)},this))):t?(this._uiModel.set({active_view:"workflow"}),this._gettingAuthenticatedModelsPromise.then(_.bind(function(){var e,s;e=this.options.rootUrl,s=new i.AddParcelOp({uiModel:this._uiModel,parcelId:t,rootUrl:e}),s.run()},this))):o&&(this._hideFrameworkChrome(),this._uiModel.set({active_view:"workflow",view_mode:"jts"}),this._gettingAuthenticatedModelsPromise.then(_.bind(function(){var e,t;e=this.options.rootUrl,t=new i.AddTicketDataOp({uiModel:this._uiModel,ticketId:o,rootUrl:e}),t.run()},this))),delete i.selector.routerArgs):(e=a.getSelectedItemModels(),e&&(r=_.filter(e,function(e){return"file"===e.get("object_type")})),r.length>0&&(c=_.map(r,function(e){return e.id})),n=_.bind(function(){a.setSelectedItemModels([]),this._uiModel.addFilesToCollection(c),this._uiModel.set({active_view:"workflow"})},this),c.length>0?this._gettingAuthenticatedModelsPromise?this._gettingAuthenticatedModelsPromise.then(n):n():"welcome"===this._uiModel.get("active_view")&&"original"!==this._uiModel.get("direct_to_workflow")&&(this._gettingAuthenticatedModelsPromise?this._gettingAuthenticatedModelsPromise.then(_.bind(function(){this._uiModel.set({active_view:"workflow"})},this)):this._uiModel.set({active_view:"workflow"})))},_addListenerForUnload:function(){$(window).on("beforeunload",this._unloadHandler)},_removeListenerForUnload:function(){$(window).off("beforeunload",this._unloadHandler)},_unloadHandler:function(){var i=this.options.sendFilesUiModel,t=i.get("active_view");e.Util.isCEF()||(this._loggingViewDurationOp.run([s.TOOLS,s.SHARE,t,s.BROWSER_CLOSE]),this._snooze(500))},_snooze:function(e){var i,t=(new Date).getTime();for(i=0;1e7>i&&!((new Date).getTime()-t>e);i+=1);},_addUiModelEventListeners:function(){this._uiModel.on("change:active_view",this._onActiveViewChange)},_onActiveViewChange:function(e,i){this._logChangeOfView(e,i),this.render(),"success"===i&&this._renderSuccessView(),"restriction"===i&&this._renderRestrictionView()},_logChangeOfView:function(e,i){var t=e.previous("active_view");this._loggingViewDurationOp.run([s.TOOLS,s.SHARE,t,s.SHOWN]),this._loggingViewDurationOp.reset(),this.options.appApi.siteCatalystApi.logScEvent([s.TOOLS,s.SHARE,i,s.SHOWN])},_logCohorts:function(){var i,t,o,n=this.options;i="ts-direct-to-workflow-view",t=n.appApi.usersMeApi.getUserCohorts(),t[i]&&(o=t[i],this.options.appApi.siteCatalystApi.logScEvent([s.TOOLS,s.SHARE,i,o])),(this.options.sendFilesUiModel.get("show_address_book")||e.Util.isCEF())&&this.options.appApi.siteCatalystApi.logScEvent([s.TOOLS,s.SHARE,s.ADDRESS_BOOK,s.ENABLED])}}),i.ToolView}),define("acplugins/tracked-send/js/tool/models/model-factory",["core/ac-core","acplugins/tracked-send/js/tool/ac-tracked-send","core/models/model","acplugins/tracked-send/js/tool/models/users-me-branding-model"],function(e,i){i.ModelFactory=e.Model.extend({create:function(e,t,s){var o=i[e];return o?new o(t,s):void LOG(0,"AcTrackedSend.ModelFactor.create: Unrecognized class: "+e)}})}),define("acplugins/tracked-send/js/tool/tracked-send",["acplugins/tracked-send/js/tool/ac-tracked-send","acplugins/tracked-send/js/tool/ops/op-factory","acplugins/tracked-send/js/tool/views/tracked-send-tool-view","acplugins/tracked-send/js/tool/models/model-factory"],function(e){_.extend(e,{init:function(){e.opFactory=new e.OpFactory,e.modelFactory=new e.ModelFactory}})}),define("acplugins/tracked-send/js/tool/plugin",["acplugins/tracked-send/js/tool/ac-tracked-send","acplugins/tracked-send/js/tool/tracked-send"],function(e){e.init()});