/*! lp-unified-window 10.46.1 2025-12-08 14:53 */ function LocalizationHelper(e){var a,t={"he-IL":!0,"ar-AE":!0},o={LTR:"lp_ltr",RTL:"lp_rtl"};function s(e){return!0===t[e]}return a=e.util,{applyDirOnElement:function(e,t,i){var n=s(i)?"RTL":"LTR",i=s(i)?"LTR":"RTL";(function(e,t){var i="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿Ⰰ-﬜﷾-﹯﻽-￿",n="֑-߿יִ-﷽ﹰ-ﻼ";e="rtl"===e.toLowerCase()?new RegExp("^[^"+n+"]*["+i+"]"):new RegExp("^[^"+i+"]*["+n+"]");return!e.test(t)})(n,t)?(a.addClass(e,o[n]),a.removeClass(e,o[i])):(a.addClass(e,o[i]),a.removeClass(e,o[n]))},isLanguageRTL:s}}function SurveyManager(s){var a,o,t,r,l,d,c,u,p,h,g;return!!(this!==window&&s&&s.rootElem&&s.survey)&&(t=s&&s.startTabIndex||500,r=N(),l=[],d=[],c=new lpTag.taglets.SurveyLogic(s.survey),u={question:"q_",checkbox:"cb_",radioButton:"rb_",select:"sel_",textArea:"txar_",input:"txt_",label:"lbl_"},p="error",h={info:"lp_survey_info",error:"lp_error",success:"lp_success"},g=(function(e){for(var t=document.createDocumentFragment(),i=0;i(new Date).getMilliseconds(),d.inSample)&&(window.lpTaglogListeners.push(function(e,t,i){var n;t&&o[t]<=d.level&&p&&-1===a.indexOf(s,i)&&(n=t,n={accountId:lpTag.site,appVersion:lpTag.taglets.lpUnifiedWindow.v,context:"webMessaging",immediate:!0,logLevel:t,msg:t+" : "+i+" : "+e,time:(new Date).toISOString(),trace:!1,url:window.location.href},u.push(n))}),f())},error:h,info:function(e,t){i(e,"INFO",t||n)},debug:function(e,t){i(e,"DEBUG",t||n)},setLogLevel:g,logLevels:o,events:t,triggerEvent:function(e){switch(e){case t.APP_STARTED:p=!0;break;case t.APP_ENDED:p=!1}},loggosLogging:d,loggosLogQueue:u}})(),window.lpTag=window.lpTag||{},window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{},lpTag.unifiedWindow.apps={AUTHENTICATION:"authenticationDelegate",STEP_UP:"stepUpManager",CHAT:"API",CHAT_STATE:"ChatStateManager",APPLICATION:"EmbeddedWindowApplication",HEARTBEAT:"HeartBeatManager",UISTATE:"UIStateManager",UNIFIED_WINDOW:"lpUnifiedWindow",SECURE_FORM:"leSecureForm",WINDOW_SDK:"windowSDK",COBROWSE:"cobrowse",RICH_CONTENT:"richContent",FILE_SHARE:"fileShare",QUICK_REPLIES:"quickReplies",MAVEN_PAY:"mavenPay",DATE_PICKER:"datePicker",SCHEDULE_LIST:"scheduleList"},window.lpTag=window.lpTag||{},window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{},lpTag.unifiedWindow.events={chat:{ERROR:"error",INITIALIZED:"initialized",BLOD:"blueLightOfDeath(Ended)",CHATTING:"chatting",STATE:"state",CONVERSATION_STATE:"conversationState",DIALOG_STATE:"dialogState",CONVERSATION_CLOSED:"conversationClosed",CHAT_INFO:"chatInfo",USER_INFO:"userInfo",USER_LEFT:"userLeft",ENGAGEMENT_DATA:"engagementData",LINE:"line",COLLABORATION:"collaboration",SECURE_FORM:"leSecureForm",FINISHED_EVENTS_BULK:"finishEventsBulk",AGENT_TYPING:"agentIsTyping",AVAILABILITY:"availability",SURVEY_ERROR:"surveyError",SURVEY_SERVER_ERROR:"surveyServerError",EMAIL_TRANSCRIPT_SUCCESS:"emailTranscriptSuccess",EMAIL_TRANSCRIPT_ERROR:"emailTranscriptError",AUTHENTICATION_ERROR:"authenticationError",START_CHAT_INFO:"startChatInfo",TTR_INFO:"ttrInfo",CSAT_INFO:"csatInfo",BRAND_INFO:"brandInfoReceived",CONVERSATION_OWNER_BRAND_INFO:"conversationOwnerBrandInfoReceived",CONVERSATION_CONTENT:"conversationContent",SUBSCRIBE_MESSAGING_EVENTS_RESPONSE:"subscribeMessagingEventsResponse",CONVERSATION_HISTORY:"conversationHistory",NEW_CONVERSATION_REQUESTED:"newConversationRequested",NEW_CONVERSATION_CREATED:"newConversationCreated",MULTIPLE_CHANNELS_REQUESTED:"multipleChannelsRequested",SESSION_DATA:"sessionData",NO_SESSION:"noSession",FAILED_START_CONVERSATION:"failedStartConversation",FORGET_ME:"forgetMe",SET_REFRESH_MODEL_DELAY:"setRefreshModelDelaySec",CLOSE_WINDOW_FORGET_ME:"closeWindowForgetMe",DELETE_CONVERSATION_SUBSCRIPTION:"onDeletedSubscriptionFromConversation",CONVERSATION_STEP_UP:"onConversationStepUp",SIGNAL_OUT:"SIGNAL_OUT",SIGNAL_IN:"SIGNAL_IN"},socket:{CONNECTED:"socketConnected",INITIALIZED:"socketInitialized",DISCONNECTED:"socketDisconnected",NON_RESPONSIVE:"socketNonResponsive",PING_SUCCESS:"pingSuccess"},application:{PROCESSING:"processing",OFFLINE_SURVEY:"offlineSurvey",PRE_CHAT_SURVEY:"preChatSurvey",POST_CHAT_SURVEY:"postChatSurvey",PRE_SMS_FORM:"preSmsForm",PRE_SMS_FORM_EXIT:"preSmsFormExit",END_CHAT:"endChat",END_SURVEY:"endSurvey",ENDED:"appEnded",INITIALIZED:"appInitialized",DO_HARAKIRI:"doHaraKiri(Seppuku)"},heartBeat:{INIT:"init",FAILED:"failed",RESUMED:"resumed"},uiState:{POP_OUT:"popOut",EMBEDDED_CHANGED:"embeddedChanged",MAXIMIZED:"maximized",MINIMIZED:"minimized",ACTIONS_TOGGLE:"actionsToggle",SEND_BUTTON:"sendButton",INPUT:"input",PAPER_PLANE_BUTTON:"paperPlaneButton",FOCUS_CHANGE_EVENT:"focusChanged",EMOJI_FOCUS_ON_CLICK:"emojiFocus"},chatState:{ENDED:"ended"},unifiedWindow:{MAXIMIZE:"maximize"},viewController:{INITIATE_END_CHAT:"endChatInitiate",CLICKED:"clicked",DIALOG:"dialog",DIALOG_CLOSED:"dialogClosed",DIALOG_STATE_CHANGED:"dialogStateChanged",SLIDER_CLOSED:"sliderClosed",PREPARE_SLIDER_CLOSED_TIMEOUT:"prepareSliderCloseTimeout",SLIDER_VIEW_CHANGE:"sliderViewChange",CLOSE_ACTIONS:"closeActions",VISITOR_HAS_TYPED:"visitorHasTyped",MAXIMIZE_VISIBLE:"maximizeVisible",MINIMIZE_VISIBLE:"minimizeVisible",LINE_ADDED:"lineAdded",LINES_VIEWED:"linesViewed",CONVERSATIONS_VIEWED:"conversationsViewed",RETRY_GET_HISTORY:"retryGetHistory",END_OF_HISTORY:"endOfHistory",CB_OFFER:"cbOffer",THANK_YOU_PAGE:"thankYouPage",SHOW_FORGET_ME:"forgetMeDialog",CLOSE_WINDOW_FORGET_ME:"closeWindowForgetMe",LINE_UPDATE:"lineUpdate",UPDATE_TIME_STAMP:"updateTimeStamp",UPDATE_ACCESSIBILITY_MESSAGE:"updateAccessibilityMessage",SCROLL_CONVERSATION_TO_BOTTOM:"scrollConversationToBottom",FLUTTER_OPEN:"flutterOpen",FLUTTER_CLOSE:"flutterClose",FLUTTER_IS_CLOSED:"flutterIsClosed",FLUTTER_STYLE_UPDATE:"flutterStyleUpdate",DATE_PICKER_SHOW:"DatePickerShow",ADD_PRODUCT_DETAILS:"addProductDetails",SCHEDULE_LIST_SHOW:"ScheduleListShow",HISTORY_TRY_NEXT:"historyTryNext"},coBrowseEvents:{OFFERED:"cobrowseOffered",ACCEPTED:"cobrowseAccepted",DECLINE:"cobrowseDeclined",TIMEOUT:"cobrowseTimeout",INVITED:"cobrowseInvited",STARTED:"sessionStarted",RESUME:"sessionResume",ERROR:"sessionError",CANCELED:"cobrowseCanceled",DIALOG_CREATED:"cobrowseDialogCreated",RENDER_CALL_SCREEN:"cobrowseRenderCallScreen",SLIDER_OPENED:"sliderOpened",MAXIMIZE:"maximize"},widgetSDK:{INIT:"init",PARTICIPANTS:"participants",MESSAGES:"messages",WIDGET_AREA_STATE:"widgetAreaState",CONVERSATION_STATE:"conversationState",CONVERSATION_INFO:"conversationInfo",ENGAGEMENT_INFO:"engagementInfo",NOTIFICATION:"notification",VISITOR_TYPING:"visitorTyping",AGENT_TYPING:"agentTyping",DISPOSED_WIDGET_ID:"disposedWidgetID",INITIATED_WIDGET_ID:"initiatedWidgetID",WIDGET_NOTIFICATION:"widgetNotification"},imageShare:{IMAGE_SELECTED:"imageSelected",FILE_UPLOAD_URL_READY:"fileUrlGenerated",FILE_DONE_UPLOADED:"fileUploaded",FILE_UPLOAD_RETRY:"fileUploadRetry",FILE_DOWNLOAD_REQUEST:"fileDownloadRequest",SHOW_PREVIEW:"showPreview",OVERLAY_CLOSED:"overlayClosed",IMAGE_PREVIEW_CLOSED:"ImagePreviewClosed",IMAGE_PREVIEW_SHOW:"ImagePreviewShow",FILE_VALIDATION:"fileValidation"},richContent:{DISABLE_RICH_CONTENT:"disableRichContent",UPDATE_RICH_CONTENT_LINE:"updateRCLine"},wrapperWindowExtender:{WINDOW_SCALE_SET:"windowScaleSet"},accessibility:{SET_INPUT_FOCUS:"setInputFocus"}},lpTag.unifiedWindow.publicEvents=lpTag.unifiedWindow.publicEvents||{API:{state:[{appName:"lpUnifiedWindow",eventName:"state",data:{state:"data"}},{appName:"ChatAPIV3",eventName:"state",data:"data"}],chatInfo:{appName:"lpUnifiedWindow",eventName:"conversationInfo",data:{agentName:"data.agentName",agentId:"data.agentId",conversationId:"data.rtSessionId",state:"data.chatState",monitoringSessionId:"data.monitoringSessionId",visitorId:"data.visitorId",skill:"data.skill",skillName:"data.skillName",engagementId:"data.engagementId",campaignId:"data.campaignId",language:"data.language",engagementName:"data.engagementName"}}}},lpTag.unifiedWindow.SurveyType={PRE_CHAT:"PreChatSurvey",EXIT_CHAT:"ExitSurvey",OFFLINE:"OfflineSurvey",CSAT:"CSAT",PRE_SMS:"PreSmsSurvey"},window.lpTag=window.lpTag||{},window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{},lpTag.unifiedWindow.consts={dialog:{actions:{CONFIRM:"confirm",CANCEL:"cancel"}},views:{TOP_MENU:"topMenu",ACTION_MENU:"actionMenu"},chatEvents:{LINE:"line",INFO:"info",COBROWSE:"cobrowse",SECURE_FORM:"leSecureForm",RICH_CONTENT:"richContent",FILE_SHARING:"hosted/file",MAVEN_PAY:"mavenPay"},errorTypes:{CONNECTION_UNAVAILABLE:"CONNECTION_UNAVAILABLE",AUTH_ERROR:"AUTH_ERROR",FAILED_START_CONVERSATION_ERROR:"FAILED_START_CONVERSATION_ERROR"},authErrorsTypes:{EXPIRED:"expired",INVALID_SESSION:"invalidSession",LOGOUT:"logout"},SecureForm:{LINK_CLICKED:"secureFormClicked",HIDE_CONVO:"hideMessagingConversation"},RichContent:{ACTION:"richContentAction",RICH_CONTENT_LINE:"rich-content",RICH_CONTENT_TYPE:"richcontent",LINK_CLICKED:"richContentLinkClicked"},engagementContainerClass:"LPMcontainer",reCaptchaContainerClass:"reCaptchaContainer",authConnectorTypes:{S2S:0,OAUTH_IMPLICIT:1,OAUTH_CODE:2,STEP_UP:3},defaultRedirectUri:"https://liveperson.net",slider:{viewType:{widgetSDKView:"widgetSDKView",PCIFormView:"pciFormView",CoBrowseInvite:"cobrowseInviteView",CoBrowseCallConnecting:"cobrowseCallConnectingView",RichContentLinkAction:"richContentLinkAction",MavenPayLinkView:"MavenPayLinkView"}},widgetSDK:{WIDGET_NAME:"widgetName",AGENT:"agent",AGENT_ID:"agentId",VISITOR:"visitor",VISITOR_ID:"visitorId",SESSION_ID:"sessionId",MONTORING_SESSION_ID:"monitoringSessionId",ACCOUNT_ID:"accountId",CHANNEL_TYPE_MESSAGING:"messaging",CHANNEL_TYPE_CHAT:"chat",contentType:{text:"text/message",richContent:"text/richContent"}},csatStatus:{FILLED:"FILLED",PARTIALLY_FILLED:"PARTIALLY_FILLED",SKIPPED:"SKIPPED",EMPTY:"EMPTY"},coBrowse:{acceptedCoBrowseModes:["view","shared","follow","VIDEO_CALL","VOICE_CALL"],coBrowseChannelName:"COBROWSE"},engagementTypes:{CHAT_ENGAGEMENT:"chat",MESSAGING_ENGAGEMENT:"messaging"},richContentActionTypes:{LINK:"link",NAVIGATE:"navigate",PUBLISH_TEXT:"publishText",CAROUSEL_OFFSET_CHANGE:"carouselOffsetChange",CHECKED:"checked",SUBMIT_AS_TEXT:"submitAsText",DATE_PICKER:"datePicker",SCHEDULE_SLOT_LIST:"scheduleSlotList",ADD_TO_CART:"addToCart"},fileSharing:{fileAttributes:{TYPE:"type",SIZE:"size"},fallbackThumbnail:{URI:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEYAAABaCAYAAAAFOiBkAAAAAXNSR0IArs4c6QAACf9JREFUeAHtXelzFMcVf7u6FnQAlkDoQAe7qwuBHISQQSIFCGRIikDssp2kqLjs2FWO+ZB/If9CPqeKipNUOR9CiEOEAVsWBowBGxuD0YEudEvoAq/uA/J+rZ3JaLSjnVnNrIw0jxptT0/P6+5fv37d/fpN4yAVNTU1Fc7MzLzL0ceePXuWwpdLlWRF3Docjgm+ergy5yIjI//s8Xi+V1bMId0wAFENDQ1/4vu3ExMTI+Pj4yOio6OJX5aSrKhfri9NTU2Rz+ebHRwcnOHKnc7Nzf0D13caFRW19oNS7XK5StLS0lyM4IoCIVhluIdQV1fXBNNXDE4FwHHiJUgKQMnMzFx1oKD+EATUHRj4ew05/Drla7fbHbPaJAWgKAmS09zcPMk47HJC0UKnrHZQABAwABbABF3pGBStErnVHPZjcczJijcFo49NcwgAC2ACYFwrdUgOpbGBBTARo1IoDFb6OzYwGi1sA2MDo4GARrQtMTYwGghoRNsSowGMZcvop0+f0hfXv6Ta2loaGRnVyD706Li4WCooKKCyvXvI6TS/fS0DBqDcuvVV6DUP8ibAlvjvKy8Lktr4Y/Oh9pcBkhIOsiofy4CxovsEAtqqfCzrSoEqoY7LyMigA/t/KqJrLl+h9vZ2dZJlu7dMYvTUCKDExcWJSwJIz3vhSLOswISjgqHmsazAoPuMjIyIC+EfEy2rjoFO+eCvf/8x4SGXZVmBkUsRIBAREUGvvnJC7Gv988xZmp2dDZDKuqhl6UpZWZm0YcOGRWu1c+dPaOPGjZSUlEQIh5vCDozX66Gf/+wovf7aq7R169aA9U1IiKdiBRgIIy6cFFZg0D32vFQq6oetiqNHKqm4eOeC+u7bV05IKxHCiAsnhRWYF4t2EG9PzKvfS6W7qeLgAXkhmJWZSbjUpBWvTmfWfdiAWbNmjaauyMvLpePHj1FsbOyikqGWJLNACMQnbMCU7i6hxfavUlNS6Ne/emNRXaLWPYEqZFZcWIBBhQoK8oOWOSYm+MYfRiiXKyYor6UmCAsws7NPaWxsbKllFe+PjY+bwicYE8smeLCwSSaB0dFR+ssHfwtWlpCeIx8ryDKJgdkxHGRVPpZJDGyxoHDYfK1oAMuAgYEatlgr7LFWAKHmaVlXUmf0vN3bwGi0mA2MDYwGAhrRtsTYwGggoBFtS4wNjAYCGtG2xNjAaCCgEW1LjAYwpq+VsLPY3d1DcBzasiVdmCuRd29vH01MTgS058Is0ffoEW1OTqa1a9fKRTXCq7X1ofgWAHmaQaYCc+fOd3T58yvzNscqKg4SjODXv7xBPT09dOr99xaUu6Ozk6qqPqZfnjjOWyrZ4rkRXjfZQenatS+o8vAh0RgLMgghwjRgWlpaqfqzGsrI2EIAIyY6hh62PSSvx2O4WEZ4QRKvs/dWbk4Obd9eaDgvrRdMA+YqtxjoyMuV8hbJthCNVXp5TU9PU9X5j4UbyeHDFVp1DCneFOU7MzNL/F2h2E5V7xsZLZURXpDQx48fU2XlIYqJMddAbgow4+Nj+GKDkpM3GcVhQXq9vCYnJ+n+/Tk/v+am5gV8lhphCjDwioLFrrOza6nlEd1CDy80BHQKlPWd7+7iY88l561kYAow+MYnmYfaJ0+eiC4lZYDCQw8YIb28oqKi6OCB/XToUAUhfPHSp4RuaBZFnDp16o9wt1gqJSQkUG1dHTXz6ORg6RkYGKDPr1ylwYFBys7Oorr6BqEPIA1d3d3ylZSUKOIbG5soPy9PuIfo4YW5D/a9Y/iLNGzA1dbWiWlCoH1vo3VD2U0blTIzM+jE8V/QZzWXqYYvEBRxEc9hJMJXqlevXpNuxW9ujnfePW708FK+VLRjB9Uz8Ldvf8PDtpc2b96sfBxS2MHbG8/y84Nvnxrhzh92c3KHKVupZvLSW4c6lnzTJEaZKX/YrbxdUthMXkYKYoryNZLh85LWBkajpWxgNIDRpWM6OjppeibwfCQ6KprS09MEe5gaunkoHhwcYgegBEpNTdGcqrexj6+D/2HRqSQM5VOTU2KIb2ltpXiePGI64WNzRn9/vzKpCK9ft46POhkRJoe0tFT5OcwYL7BnKOY4ILih9Pb10Ub2AtWzbNEFzMVLn4jJm5yrIgB30zd/e5Iwr/j3R+fY7tIrP4XrGDw0A9lI7t69Rw8eNNK777wtQMRLOM/lzJl/UQp7V8Hl9ezZj4TD0dEjL1N7WztduHhJ5i0FdhUX09DwEHV0dND7v39PAIRn/+Gy7C3bQ9JC9ls2idy4cZNOnvyNecDA9XSWpQH04Yf/4EnYC3SEPS5BkX7vygsXLtHQ0JCwqUAK+rh1qs5foP9Wnad3fveW3HLiJf6DAgOYhoYHVFKyS0Rjkjc9PUPbC7XNB8g3NfX/kuHixWNzSwvBVPGwrY08brew+/zg8wneEjB8yodogORN+tZzunQMusWG9evF5XA4KYpdUaV7iGVf3yNRKLd7q1i7wFWVD+ihMm4xiHA9V15NkAhY65TPMHPG8Oz1etTJ5fv4uHg5b5QBTo8AAzPqJv9iEmCD2ljKMA/CUqW/f4BtQ26ZT7CArq4UjEn/wFzfT0+fb1ZElwA9Hh5ewAIVyWdvzdvffEvD/DySdQF0GWbK8OvFOisQwVYDMEClu3eJBgCYWzhvSA303IPGRtEdYTFsZLCmpiZF+sUAFwkUf3RJjCJ9wODkxFzGUJRKkhTf1FRgxS15Q0Fq6urqBRiFhduULBaEcWSWdPlPkhJpvDkeGmf/PHwnCWVcWloilDafICQkCdIJKdZLpkiMpOWh9bOzs+S8fT/4RHjdugQ5ThnYtAnfCiQKXYB43AfTAeVlZQtGMrzrcXuourqGbty8JUZCLCaxgMVHq5C+7UEABw8lmSIxMDnAXKC2iXx//77Ia7GWgnKE9Q9X4bbFpUVZcHU4NnatmB7gKxXoOnRHPohLdC0AY6QbgbcpEgOJyONC1NXX0yefVlM6iyzmKbCwQTGmpGivdvPz8+gKr7hRET2L2XruGpBMiTCHgvM0KMfr5cbpphz/ih3lQt5DQ8MsZRnSK7p+TQEGOVVWHiZnhFPYRTBHgRf4i0VFtN//MahWaTDXgdjDZqvHsfnevXnn+FF5+V4ZGEgFtmmUNpnc3Bzq630kf6ugVQ51vOlmB4jt6OgYmyhj1Xlp3sN+i664mEu95suqB5geKDft0LVwGeFtidkBFTQCCuplpoVfCQp4o4viMkqmKF+jmT4P6W1gNFrJBsYGRgMBjWhbYmxgNBDQiHby8DqBuYdNcwgAC2ACYHpgObNpDgFgAUygY875+HhoG5g5BPxYnHNG8kHiODMb26ernYABsAAmTv/p6qdxZvZqB8aPwWlgYh+mztIASQEoTPJh6gIYSAprY/v4ffXx+8ouZP+HDXNo/A/VKuq403VhBwAAAABJRU5ErkJggg==",TYPE:"image/png",HEIGHT:90,WIDTH:70}},googleMapsUrl:"https://www.google.com/maps/search/?api=1&",externalTargets:{SMS:0},MavenPay:{LINK_CLICKED:"mavenPayClicked"},stepUpInWaitingState:{appName:"stepUpInWaitingState",storageKey:"-stepUpDataInWaitingState"},messageTypes:{secureForm:"leSecureForm"},fifteenMinutesInMS:9e5,logs:{segments:{SF:"SecureForms"}}},window.lpTag=window.lpTag||{},window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{},lpTag.unifiedWindow.hooks={BEFORE_SUBMIT_SURVEY:"BEFORE_SUBMIT_SURVEY",BEFORE_WELCOME_MESSAGE:"BEFORE_WELCOME_MESSAGE",AFTER_GET_SURVEY:"AFTER_GET_SURVEY",BEFORE_SEND_VISITOR_LINE:"BEFORE_SEND_VISITOR_LINE",AFTER_GET_LINES:"AFTER_GET_LINES",AFTER_LOAD_SURVEY:"AFTER_LOAD_SURVEY",AFTER_SUBMIT_SURVEY:"AFTER_SUBMIT_SURVEY",AFTER_ABANDONED_SURVEY:"AFTER_ABANDONED_SURVEY",ON_WINDOW_CLOSED:"ON_WINDOW_CLOSED",ON_ADD_TO_CART:"ON_ADD_TO_CART"},window.lpTag=window.lpTag||{},lpTag.unifiedWindow=lpTag.unifiedWindow||{},lpTag.unifiedWindow.CsatDataGenerator=function(e){return{id:0,title:"",header:"",questions:{question:[{type:"CSAT",validationType:"csat",label:e.translate("csatRatingQuestion"),id:0,order:0,mandatory:!1}]}}},lpTag.unifiedWindow.contentTypes={TEXT_PLAIN:"text/plain",EXTERNAL_FILE:"external/file",HOSTED_FILE:"hosted/file",SECURE_FORM_INVITATION:"forms/secure-invitation",SECURE_FORM_SUBMISSION:"forms/secure-submission",SECURE_FORM_UPDATE:"forms/secure-update"},lpTag.unifiedWindow.MessageTypes={CONTENT:"ContentEvent",RICH_CONTENT:"RichContentEvent"},window.lpTag=window.lpTag||{},window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{},lpTag.unifiedWindow.structuredContentTypes=lpTag.unifiedWindow.structuredContentTypes||{QUICK_REPLIES:"quickReplies",BUTTON:"button",LIST:"list"},window.lpTag=window.lpTag||{},window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{},lpTag.unifiedWindow.State={INIT:"init",INITIALIZED:"initialised",PRE_CHAT:"preChat",REQUESTED:"startChat",CHATTING:"chatting",POST_CHAT:"postChat",PRE_SMS:"preSms",OFFLINE:"offline",WAITING:"waiting",PENDING:"pending",ENDED:"ended",NOT_FOUND:"notfound",APP_ENDED:"applicationEnded",ERROR:"error",RESUME:"resume",PAUSED:"paused",RESUME_PAUSED:"resumepaused",AUTH_ERROR:"authenticationError",CONNECTION_ISSUE:"connectionIssue",RESTART_AUTHENTICATION:"restartAuthentication",STEP_UP_AUTH:"stepUpAuth",INTERACTIVE:"interactive"},lpTag.unifiedWindow.Priority=(function(){var e=lpTag.unifiedWindow.State,t={},i=0;return t[e.INIT]=i++,t[e.INITIALIZED]=i++,t[e.PRE_CHAT]=2,t[e.OFFLINE]=i++,t[e.REQUESTED]=i++,t[e.WAITING]=4,t[e.PENDING]=4,t[e.RESUME]=4,t[e.PAUSED]=4,t[e.RESUME_PAUSED]=4,t[e.CHATTING]=i++,t[e.ENDED]=i++,t[e.POST_CHAT]=i++,t[e.NOT_FOUND]=i++,t[e.ERROR]=+i,t[e.APP_ENDED]=9,t})(),lpTag.unifiedWindow.MessageState={ERROR:"ERROR",PENDING:"PENDING",SENT:"SENT",VIEWED:"VIEWED",ACCEPT:"ACCEPT",READ:"READ",FAILED:"FAILED"},lpTag.unifiedWindow.MessagePriority=(function(){var e=lpTag.unifiedWindow.MessageState,t={},i=0;return t[e.ERROR]=0,t[e.PENDING]=i++,t[e.SENT]=i++,t[e.VIEWED]=i++,t[e.ACCEPT]=i++,t[e.READ]=i++,t[e.READ]=+i,t[e.FAILED]=6,t})(),lpTag.unifiedWindow.secureFormStates={SEND:"send",RECEIVED:"received",VIEWED:"viewed",VIEWED_ON_ANOTHER_TAB:"viewedOnAnotherTab",ABORTED:"aborted",SUBMIT:"submit",ERROR:"error"},lpTag.unifiedWindow.richContentStates={ACTION_EVENT:"actionEvent",PUBLISH_TEXT:"publishText",DISPLAYED:"contentDisplayed",SUBMIT_AS_TEXT:"submitAsText"},lpTag.unifiedWindow.quickRepliesStates={ACTION_EVENT:"actionEvent",PUBLISH_TEXT:"publishText"},window.lpTag=window.lpTag||{},window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{},lpTag.unifiedWindow.welcomeMessageStates=lpTag.unifiedWindow.welcomeMessageStates||{showTiming:{FIRST_TIME:"FIRST_TIME",EVERY_TIME:"EVERY_TIME"}},window.lpTag=window.lpTag||{},lpTag.unifiedWindow=lpTag.unifiedWindow||{},lpTag.unifiedWindow.ChatModelPath=lpTag.unifiedWindow.ChatModelPath||function(){var e,t;lpTag.unifiedWindow.chatModelPath||(e={name:"chatModel"},t=window.liveperson.uiframework.latest.LPModel,e.LINES=t.createPath("chat.lines",null,e.name),e.SECURE_FORMS=t.createPath("chat.secureForms",null,e.name),e.AGENT_NAME=t.createPath("chat.agentName",null,e.name),e.VISITOR_NAME=t.createPath("chat.visitorName",null,e.name),e.PARTICIPANTS=t.createPath("chat.participants",null,e.name),e.AGENT_ID=t.createPath("chat.agentId",null,e.name),e.CHAT_ID=t.createPath("chat.chatId",null,e.name),e.CURRENT_DIALOG_TYPE=t.createPath("chat.currentDialogType",null,e.name),e.AGENT_IS_TYPING=t.createPath("chat.agentIsTyping",null,e.name),e.SURVEYS_PRECHAT=t.createPath("chat.surveys.preChat",null,e.name),e.SURVEYS_EXIT=t.createPath("chat.surveys.exit",null,e.name),e.SURVEYS_OFFLINE=t.createPath("chat.surveys.offline",null,e.name),e.TTR=t.createPath("chat.ttr",null,e.name),e.TRANSCRIPT_LOADED=t.createPath("chat.transcriptLoaded",null,e.name),e.SDK_NOTIFICATIONS=t.createPath("windowsdk.notifications",null,e.name),e.SDK_BUTTON_ENABLE=t.createPath("windowsdk.buttonEnable",null,e.name),e.SURVEYS_PRESMS=t.createPath("chat.surveys.preSms",null,e.name),lpTag.unifiedWindow.chatModelPath=e)},window.lpTag=window.lpTag||{},lpTag.unifiedWindow=lpTag.unifiedWindow||{},lpTag.unifiedWindow.UIModelPath=lpTag.unifiedWindow.UIModelPath||function(){var e,t;lpTag.unifiedWindow.uiModelPath||(e={name:"uiModel"},t=window.liveperson.uiframework.latest.LPModel,e.STATE=t.createPath("chat.state",null,e.name),e.CONVERSATION_DATA=t.createPath("chat.conversationData",null,e.name),e.AGENT_PICTURE_URL=t.createPath("chat.agentPicUrl",null,e.name),e.VISITOR_TYPING=t.createPath("chat.isVisitorTyping",null,e.name),e.WINDOW_MAXIMIZED=t.createPath("window.maximized",null,e.name),e.ACTIONS_VISIBLE=t.createPath("window.actionsVisible",null,e.name),e.EMOJI_VISIBLE=t.createPath("window.emojisVisible",null,e.name),e.TOP_MENU_VISIBLE=t.createPath("window.topMenuVisible",null,e.name),e.WINDOW_POSITION=t.createPath("window.position",null,e.name),e.WINDOW_SOUND=t.createPath("window.sound",null,e.name),e.EMOJI_MENU=t.createPath("window.emojiMenu",null,e.name),e.WINDOW_EMBEDDED=t.createPath("window.embedded",null,e.name),e.LAST_LINE_VIEWED=t.createPath("window.lastLineViewed",null,e.name),e.ACTION_POPOUT_ENABLE=t.createPath("popout.enable",null,e.name),e.SECURE_FORMS_TAB_HANDLER=t.createPath("collaboration.secureFormsTabHandler",null,e.name),e.IDNV_DATA=t.createPath("collaboration.idnvData",null,e.name),e.WIDGET_SLIDER_VISIBLE=t.createPath("windowsdk.sliderVisible",null,e.name),e.SELECTED_WIDGET_ID=t.createPath("windowsdk.selectedWidgetId",null,e.name),e.DISPOSED_WIDGETS_IDS=t.createPath("windowsdk.disposedWidgetsIds",null,e.name),e.INITIATED_WIDGETS_IDS=t.createPath("windowsdk.InitiatedWidgetsIds",null,e.name),e.WIDGETS_NOTIICATIONS=t.createPath("windowsdk.widgetsNotifications",null,e.name),e.STEP_UP_STATE=t.createPath("chat.stepUpState",null,e.name),e.PRE_SMS_CONTEXT=t.createPath("chat.preSmsContext",null,e.name),e.LAST_VIEWED_TAB=t.createPath("tabs.lastViewedTab",null,e.name),e.TAB_LIST=t.createPath("tabs.list",null,e.name),e.SECURE_FORMS_INVITATIONS=t.createPath("collaboration.sfInvMapping",null,e.name),lpTag.unifiedWindow.uiModelPath=e)},window.lpTag=window.lpTag||{},lpTag.unifiedWindow=lpTag.unifiedWindow||{},lpTag.unifiedWindow.WidgetModelPath=lpTag.unifiedWindow.WidgetModelPath||function(){var e,t;lpTag.unifiedWindow.widgetModelPath||(e={name:"WidgetModelPath"},t=window.liveperson.uiframework.latest.LPModel,e.CONVERSATION_ID=t.createPath("conversation.id",null,e.name),e.SESSION_ID=t.createPath("conversation.sessionId",null,e.name),e.DIALOGS=t.createPath("conversation.dialogs",null,e.name),e.WINDOW_UI=t.createPath("ui.window",null,e.name),lpTag.unifiedWindow.widgetModelPath=e)},window.lpTag=window.lpTag||{},lpTag.unifiedWindow=lpTag.unifiedWindow||{},lpTag.unifiedWindow.ChatDelegate=lpTag.unifiedWindow.ChatDelegate||function(o,a){var s,n,r,l,d="ChatDelegate",c=lpTag.unifiedWindow.apps.CHAT,i=lpTag.unifiedWindow.apps.UNIFIED_WINDOW,u=lpTag.unifiedWindow.log,p=lpTag.unifiedWindow.State,h=lpTag.unifiedWindow.events.chat,g=(lpTag.taglets.postmessage,0),f=1,t=!1,m={state:p.INTERACTIVE,agent:!1,visitor:!1,bindId:null},v={},w=["line","leCollaboration"],_="@type",C="leCollaboration",T=lpTag.unifiedWindow.applicationUtils,b=lpTag.unifiedWindow.consts.errorTypes;function E(e){r&&r(e||{})}function y(e){l&&l(e||{})}function S(e){o&&("string"==typeof o.svid&&(e.LETagVisitorId=o.svid),"string"==typeof o.ssid&&(e.LETagSessionId=o.ssid),"string"==typeof o.scid)&&(e.LETagContextId=o.scid)}function I(e,t,i){e&&(e.success=t,e.error=i,s.sendCollaboration(e)),u.info("sendCollaboration="+JSON.stringify(e),d)}function N(){s.cancelSurvey()}function x(e,t){n=e,p.NOT_FOUND===n&&(n=p.APP_ENDED),a.trigger({appName:c,eventName:h.STATE,data:n,global:!0}),p.CHATTING===n&&a.trigger({appName:i,eventName:h.ENGAGEMENT_DATA,global:!0,data:{engagementName:o.ename,state:n}}),!t&&p.WAITING!==n&&p.ENDED!==n||(v.chatState=n,M()),p.ENDED===n&&a.trigger({appName:c,eventName:h.BLOD,data:{engagementName:o.ename}})}function A(e){"object"==typeof e&&((v=v||{}).agentName=e&&e.agentName||"",v.agentId=e&&e.agentId||"",v.agentPictureUrl=e&&e.agentPictureUrl||"",v.skillName=e&&e.skillName||"",v.rtSessionId=e&&e.rtSessionId||v.rtSessionId||"",v.chatState=e&&e.chatState||v.chatState||"",v.monitoringSessionId=o&&o.ssid||v.monitoringSessionId||"",v.visitorId=o&&o.svid||v.visitorId||"",v.visitorName=e&&e.visitorName||v.visitorName||"",v.skill=o&&o.skill||v.skill||"",v.engagementId=o&&o.eid||v.engagementId||"",v.campaignId=o&&o.cid||v.campaignId||"",v.language=o&&o.lang||v.language||"",v.engagementName=o&&o.ename||v.engagementName||"",v.lastUpdate=e.lastUpdate||v.lastUpdate||"",M())}function M(){a.trigger({appName:c,eventName:h.CHAT_INFO,data:v})}function L(e){!e||e.error||"ERROR"===e?a.trigger({appName:c,eventName:h.ERROR,data:{errorType:b.CONNECTION_UNAVAILABLE}}):t||(window.recaptchaRendererV2&&s.isCaptchaV2Supported&&s.isCaptchaV2Supported()?(window.recaptchaRenderer=window.recaptchaRendererV2,window.recaptchaRenderer.renderCaptcha(o),window.recaptchaRendererV1.removeFromPage()):window.recaptchaRendererV1&&(window.recaptchaRenderer=window.recaptchaRendererV1),x(p.INIT),a.trigger({appName:c,eventName:h.INITIALIZED}),t=!0)}function D(e){for(var t,i=Array.isArray(e)?e:[e],n=0;ni&&(i=e[n].csat.endTs,t=e[n]);return t})(e.data||e);e&&e.csat&&l.trigger({appName:u,eventName:v.CSAT_INFO,data:e})}function pe(e,t){E.id=e,E.isActive=!0,b.rtSessionId=E.id,t&&t.conversationDetails&&((e=t.conversationDetails.skillId)&&"-1"!==e?b.skill=e:"number"==typeof b.skill?b.skill=b.skill+"":b.skill=void 0)}function he(e){e.dialogId?(y.id=e.dialogId,y.isActive=!0):e.conversation&&(e=e.conversation.conversationDetails&&e.conversation.conversationDetails.dialogs)&&0m[l])&&e(m[t],m[g.ENDED])&&x(0,t,!0)}function Z(){u.info("_tryInitResume",c),J(function(e,t){return e<=t})}function Q(){u.info("_tryEndResume",c),J(function(e,t){return t=m[r]&&r!==t)&&x(0,t)}}))}function ee(e){u.info("_handleNewStateFromModel newState= "+e.newValue,c);var t=l&&r!==l?l:r;if(o.isInitialized()){var i=!1;if(t){if(t!==e.newValue){if(m[t]>m[e.newValue])return;if(t===g.PRE_CHAT)return void o.reInit()}}else i=!0;x(0,e.newValue,i)}}function x(e,t,i){if(r!==t)switch(r=t){case g.INIT:break;case g.INITIALIZED:oe();break;case g.PRE_CHAT:A(i);break;case g.WAITING:case g.RESUME:case g.PAUSED:case g.RESUME_PAUSED:case g.CHATTING:break;case g.ENDED:Ee();break;case g.POST_CHAT:i&&Ee();break;case g.OFFLINE:A(i);break;case g.NOT_FOUND:case g.ERROR:Se();break;case g.APP_ENDED:u.info("_disposeApplication",c),o.disposeVisitor(),n.trigger({appName:c,eventName:p.chatState.ENDED}),Y();break;default:A(i)}}function A(e){e&&oe({resuming:!0})}function te(e){u.info("_submitFinalSurveyCallback: data="+JSON.stringify(e),c),_=!1,e&&e.error&&5===e.error.internalCode?n.trigger({appName:c,eventName:p.chat.SURVEY_ERROR,data:e}):e&&e.error&&10===e.error.internalCode?Ie()&&L({isInvalid:!0}):N(null,g.APP_ENDED)}function ie(e){u.info("_submitFinalSurveyError: data="+JSON.stringify(e),c),_=!1,n.trigger({appName:"survey",eventName:p.chat.SURVEY_SERVER_ERROR,data:e})}function M(e){if(e&&e.error){if(32===e.error.internalCode)return O(),void u.info("_startChatChatError:getOfflineSurvey. internalCode: 32",c);if(5===e.error.internalCode)return void n.trigger({appName:c,eventName:p.chat.SURVEY_ERROR,data:e});if(10===e.error.internalCode)return void(Ie()&&L({isInvalid:!0}))}P(e)}function ne(e){n.trigger({appName:c,eventName:p.chat.EMAIL_TRANSCRIPT_SUCCESS,data:e})}function ae(e){n.trigger({appName:c,eventName:p.chat.EMAIL_TRANSCRIPT_ERROR,data:e})}function oe(e){e=e||{},u.info("_handleInit",c),(!e.resuming&&Ie()?L:se)()}function L(e){e=e||{},window.recaptchaRenderer.showCaptcha({isInvalid:e.isInvalid,themer:a.themer,translator:a.translator,callback:se})}function se(){V.engConf.isOffline?(O(),u.info("_handleInitContinue:getOfflineSurvey. uiState.engConf.isOffline: true",c)):a.conf.unifiedConf.skipAvailabilityCheck?de({availability:!0}):o.getAvailability(de,P)}function re(e){e?(u.info("resumingPolling",c),o.resumePolling()):(u.info("stopPolling",c),o.stopPolling())}function le(e){var t;e.agentPictureUrl&&e.agentName&&((t=s.get(v.AGENT_PICTURE_URL)||{})[e.agentName]=e.agentPictureUrl,s.modify(v.AGENT_PICTURE_URL,t)),e.skillName&&(U=e.skillName)}function de(e){u.info("_availabilitySuccess data="+JSON.stringify(e),c),e&&e.availability?T&&!ce()?(u.info("_startAuthentication",c),ue({context:"onload"}),a.authenticationManager.authenticate(pe,he)):R()&&a.unAuthUserTriesAuth?he(void 0):C?o.getPreChatSurvey(me,ve):o.startChat(null,D,M):(O(),u.info("_availabilitySuccess:getOfflineSurvey. availability: false",c))}function ce(){return s.get(v.STATE)===g.PRE_CHAT&&s.get(v.CONVERSATION_DATA)}function ue(e){u.info("_triggerProcessingEvent data="+JSON.stringify(e),c),n.trigger({appName:f.UNIFIED_WINDOW,eventName:p.application.PROCESSING,data:e})}function pe(e){var t;u.info("_startConversation data="+JSON.stringify(e),c),e&&e.ssoKey&&(t=G(),C&&o.getPreChatSurvey(me,P),t&&i!==g.OFFLINE&&!ce()?o.startChat({conversationData:t},D,M):(t={domain:a.conf.unifiedConf.domain,appKey:a.keys.appKey,connectorId:a.conf.authConf.connector.id,ssoKey:e.ssoKey,redirectUri:e.redirect_uri||null,engConf:a.conf.engConf},o.startConversation(t,C?function(e){u.info("_startConversationSuccess data="+JSON.stringify(e),c),s.modify(v.CONVERSATION_DATA,e)}:function(e){u.info("_startConversationSuccess data="+JSON.stringify(e),c),o.startChat({conversationData:e},D,M)},ge)))}function he(e){u.info("_ssoKeyError data="+JSON.stringify(e),c),fe()}function ge(e){u.info("_startConversationError data="+JSON.stringify(e),c),fe()}function fe(){(r!==g.PRE_CHAT||R()&&a.unAuthUserTriesAuth)&&(O(),u.info("_authenticationErrorCallback:getOfflineSurvey.",c))}function D(e){n.trigger({appName:c,eventName:p.chat.START_CHAT_INFO,data:e.info}),u.info("_startChatSuccess data="+JSON.stringify(e),c)}function me(e){u.info("_getPreChatSuccess data="+JSON.stringify(e),c),e&&e.survey?Te(p.application.PRE_CHAT_SURVEY,w.SURVEYS_PRECHAT,e.survey):o.startChat(null,D,M)}function ve(e){u.info("_getPreChatError data="+JSON.stringify(e),c),o.startChat(null,D,M)}function O(){o.getOfflineSurvey(we,P)}function we(e){u.info("_getOfflineSurveyCallback data="+JSON.stringify(e),c),e&&!e.error&&e.survey?Te(p.application.OFFLINE_SURVEY,w.SURVEYS_OFFLINE,e.survey):P()}function _e(e){u.info("_getPostChatSurveyCallback, survey="+JSON.stringify(e),c),e&&!e.error&&e.survey?Te(p.application.POST_CHAT_SURVEY,w.SURVEYS_EXIT,e.survey):P()}function Ce(e){u.info("_getExitSurveyError, survey="+JSON.stringify(e),c),N(null,g.APP_ENDED)}function Te(e,t,i){i&&i.questions&&i.questions.question&&i.questions.question.forEach(function(e){e.label=lpTag.HtmlSanitizerUtils&&lpTag.HtmlSanitizerUtils.sanitizeHtml(e.label).cleanText,e.entry&&e.entry.forEach(function(e){e.displayValue=lpTag.HtmlSanitizerUtils&&lpTag.HtmlSanitizerUtils.sanitizeHtml(e.displayValue).cleanText})}),lpTag.hooks&&lpTag.hooks.exec&&(i=(e=lpTag.hooks.exec({name:lpTag.unifiedWindow.hooks.AFTER_GET_SURVEY,data:{surveyType:e,surveyData:i}}))&&e.data&&e.data.surveyData||i),B.modify(t,i)}function be(e){u.info("_stateListener state="+e,c),N(null,e)}function P(e){u.info("_changeToError err= "+JSON.stringify(e),c),N(e,h.ERROR)}function Ee(){u.info("_checkForPostChatSurvey",c),!(function(){var e;e=!(!b&&F.skill===U)&&(!0===k.postChatSurveyOnNonInteractiveChat||o.isInteractive());return e})()?N(null,g.APP_ENDED):o.getExitSurvey(b,_e,Ce)}function ye(){o.setVisitorTyping(!1),o.endChat(null,P)}function Se(){u.info("_handleError",c),N(null,g.APP_ENDED)}function Ie(){return window.recaptchaRenderer}function R(){var e=a&&a.conf&&a.conf.unifiedConf,t=e&&e.external,e=e&&e.authPostVerificationLiveChat;return!t&&e}o=E.apiDelegate,a=E.appContext,n=E.events,a.conf.authConf&&(T=!0),y=(i=s.get(lpTag.unifiedWindow.uiModelPath.STATE))===g.CHATTING||i===g.PRE_CHAT||i===g.OFFLINE||i===g.WAITING,R()&&T&&y&&!a.conf.unifiedConf.external?a.authenticationManager.authenticate(function(e){a.unAuthUserTriesAuth=!e||!e.ssoKey,S()},function(){a.unAuthUserTriesAuth=!0,S()}):S(),this.emailTranscript=function(e,t){e&&o.emailTranscript(e,t,ne,ae)},this.getCurrentState=z,this.getOTK=function(e,t){return o.getOTK(e,t)},this.richContentRequest=function(e,t){u.info("richContentRequest info: "+JSON.stringify(e),c),o.richContentRequest(e,t=t||[])},this.secureFormRequest=function(e,t,i,n){return o.secureFormRequest(e,t,i,n)},this.getOtkJson=function(e){return JSON.stringify({siteId:lpTag.site,chatId:o.getSessionKey&&o.getSessionKey()})},this.dispose=Y},window.lpTag=window.lpTag||{},lpTag.unifiedWindow=lpTag.unifiedWindow||{},lpTag.unifiedWindow.SMSDeflectionManager=lpTag.unifiedWindow.SMSDeflectionManager||function(e,t,i,n){var r,a,o,l,s=lpTag.unifiedWindow.apps.CHAT,d=lpTag.unifiedWindow.events.chat,c=lpTag.unifiedWindow.chatModelPath,u=lpTag.unifiedWindow.uiModelPath,p=lpTag.unifiedWindow.apps,h=lpTag.unifiedWindow.events,g=t.chatModel,f=t.uiModel,m=i.engConf||{},v=lpTag.unifiedWindow.consts,w=lpTag.HtmlSanitizerUtils&&lpTag.HtmlSanitizerUtils.sanitizeHtml||function(e){return{cleanText:e}},t=(l=new lpTag.unifiedWindow.helpers.SMSFormHelper,n);function _(){r.getPreSMSForm(function(e){e.error?b():(f.modify(u.STATE,lpTag.unifiedWindow.State.PRE_SMS),g.modify(c.SURVEYS_PRESMS,l.transform(e)))},function(e){b()})}function C(t){var e,i,n,a,o,s;t&&t.survey?(e=m.externalTargets&&m.externalTargets[v.externalTargets.SMS]&&m.externalTargets[v.externalTargets.SMS].brandIdentifier,o=g.get(c.SURVEYS_PRESMS),i=l.getAnswerOfType(o,t.survey.question,l.TYPES.PHONE_NUMBER),n=l.getAnswerOfType(o,t.survey.question,l.TYPES.FIRST_NAME),a=l.getAnswerOfType(o,t.survey.question,l.TYPES.LAST_NAME),o=l.getAnswerOfType(o,t.survey.question,l.TYPES.MESSAGE),i&&e?(s={Body:o?w(o.answer).cleanText:"",From:i.answer,To:e,context:{engagementId:m.eid,campaignId:m.cid,visitorId:m.svid,visitorFirstName:w(n).cleanText?n.answer:"",visitorLastName:a?w(a.answer).cleanText:""}},m.skillId&&(s.context.skillId=m.skillId),r.submitPreSMSForm(s,function(e){f.modify(u.PRE_SMS_CONTEXT,s),f.modify(u.STATE,lpTag.unifiedWindow.State.APP_ENDED),y(t.survey,"success"),E()},function(){b(),y(t.survey,"fail")})):b()):(f.modify(u.STATE,lpTag.unifiedWindow.State.APP_ENDED),E())}function T(){E(),o.trigger({appName:s,eventName:h.viewController.INITIATE_END_CHAT})}function b(){f.modify(u.STATE,lpTag.unifiedWindow.State.CONNECTION_ISSUE)}function E(){o.unbind({appName:s,eventName:d.INITIALIZED,func:_}),o.unbind({appName:p.UNIFIED_WINDOW,eventName:h.application.PRE_SMS_FORM,func:C})}function y(e,t){lpTag.hooks&&lpTag.hooks.exec&&lpTag.hooks.exec({name:lpTag.unifiedWindow.hooks.AFTER_SUBMIT_SURVEY,data:{context:a,surveyType:lpTag.unifiedWindow.SurveyType.PRE_SMS,surveyData:e,status:t}})}r=t.apiDelegate,a=t.appContext,(o=t.events).bind({appName:s,eventName:d.INITIALIZED,func:_}),o.bind({appName:p.UNIFIED_WINDOW,eventName:h.application.PRE_SMS_FORM,func:C}),o.bind({appName:p.UNIFIED_WINDOW,eventName:h.application.PRE_SMS_FORM_EXIT,func:T}),r.initialize()},window.lpTag=window.lpTag||{},lpTag.unifiedWindow=lpTag.unifiedWindow||{},lpTag.unifiedWindow.ConversationManager=lpTag.unifiedWindow.ConversationManager||function(V,n,a,$){var F,B,v,U,H,z,j,G,q,r,w,l,d,o,K,Y,s,t,c,u,X,J,Z,Q,p="ConversationManager",h=lpTag.unifiedWindow.apps.CHAT,g=lpTag.unifiedWindow.log,f=lpTag.unifiedWindow.events,m=lpTag.unifiedWindow.uiModelPath,_=lpTag.unifiedWindow.chatModelPath,C=f.chat,ee=f.viewController,T=lpTag.unifiedWindow.State,te=lpTag.unifiedWindow.apps,b=lpTag.unifiedWindow.consts,E=lpTag.unifiedWindow.consts.chatEvents,e=lpTag.unifiedWindow.events.socket,y=lpTag.AMSStatics.conversation.states,S=lpTag.AMSStatics.dialog,I=lpTag.unifiedWindow.secureFormStates,ie=lpTag.AMSStatics.participant.roles,ne=lpTag.unifiedWindow.consts.errorTypes,ae=lpTag.unifiedWindow.consts.authErrorsTypes,oe=lpTag.unifiedWindow.MessageState,N=lpTag.unifiedWindow.contentTypes,se=lpTag.unifiedWindow.MessageTypes,re=lpTag.unifiedWindow.settingsIDs,le=lpTag.unifiedWindow.structuredContentTypes,de=lpTag.unifiedWindow.quickRepliesStates,ce=lpTag.unifiedWindow.welcomeMessageStates,ue=0,pe=4,he=2,ge=3,x=null,A={SYSTEM:"system",AGENT:"agent",VISITOR:"visitor"},fe=!1,me=!1,ve=15e3,we=null,_e=3e5,Ce=lpTag.AMSStatics.dialog.closeReasons,Te=!1,be=!1,Ee=!1,M={},L={},D={},O={},ye={},P={},R=lpTag.unifiedWindow.applicationUtils,Se=[],Ie="@id",Ne=!1,xe=!1,Ae={},Me={},k=[],Le=(lpTag.csds,{csds:{acCdnDomain:"acCdnDomain",acCdnDomainConsumerSdk:"acCdnDomainConsumerSdk",leCdnDomain:"leCdnDomain"},storage:{unauthStorage:{key:"-unAuthJWT",name:"unAuthMessaging"},stepUpStorage:{appName:"StepUP",valueKeys:{lastActiveConvo:"lastActiveConvo"}}}}),De=!1,i=(Me[E.SECURE_FORM]=!0,$),Oe=(g.info("init",p),l=n.uiModel,d=n.chatModel,F=i.stepUpManager,n=i.canEnableOfflineFlow,i);function Pe(){r.unbind({appName:"SessionManager",eventName:C.NO_SESSION,func:Kt}),r.unbind({appName:h,eventName:e.CONNECTED,func:Be}),r.unbind({appName:h,eventName:e.INITIALIZED,func:Ue}),r.unbind({appName:h,eventName:e.DISCONNECTED,func:ze}),r.unbind({appName:h,eventName:e.NON_RESPONSIVE,func:je}),r.unbind({appName:h,eventName:e.PING_SUCCESS,func:He}),r.unbind({appName:h,eventName:C.USER_INFO,func:Je}),r.unbind({appName:h,eventName:C.USER_LEFT,func:Ze}),r.unbind({appName:te.UNIFIED_WINDOW,eventName:f.application.POST_CHAT_SURVEY,func:Bt}),r.unbind({appName:te.UNIFIED_WINDOW,eventName:f.application.END_CHAT,func:zt}),r.unbind({appName:h,eventName:C.CONVERSATION_STATE,func:ct}),r.unbind({appName:h,eventName:C.DIALOG_STATE,func:ut}),r.unbind({appName:h,eventName:C.CONVERSATION_CONTENT,func:Tt}),r.unbind({appName:h,eventName:C.SUBSCRIBE_MESSAGING_EVENTS_RESPONSE,func:bt}),r.unbind({appName:h,eventName:C.CONVERSATION_HISTORY,func:Rt}),r.unbind({appName:h,eventName:C.CSAT_INFO,func:ot}),r.unbind({appName:"*",eventName:C.AUTHENTICATION_ERROR,func:rt}),r.unbind({appName:h,eventName:C.NEW_CONVERSATION_REQUESTED,func:qt}),r.unbind({appName:"*",eventName:ee.CONVERSATIONS_VIEWED,func:kt}),r.unbind({appName:"*",eventName:ee.RETRY_GET_HISTORY,func:yt}),r.unbind({appName:"*",eventName:C.FORGET_ME,func:st}),r.unbind({appName:"*",eventName:"pendingLineSet",func:Ve}),r.unbind({appName:"AMSClient",eventName:C.CONVERSATION_STEP_UP,func:$e}),lpTag.events&&lpTag.events.unbind({appName:"*",eventName:C.SIGNAL_OUT,func:We})}function Re(e){(t=e)?(g.info("authenticate with data: "+JSON.stringify(t),p),t.type=t.type||R.getPropertyFromObject($,"appContext.conf.authConf.stepUpConnector.type")||R.getPropertyFromObject($,"appContext.conf.authConf.connector.type"),Xe(t)):(g.info("authenticate - error - no authentication data",p),lt())}function ke(e){var t=L[e];return M[t]&&M[t].dialogs[e].state===S.states.OPEN}function We(e){var t=w&&w.conf&&w.conf.unifiedConf;t&&!t.isSignalEnabled||o&&"function"==typeof o.sendSignaledEvent&&o.sendSignaledEvent(e.payload)}function Ve(e){Z=!!e.serverPendingLineExists}function $e(){var e=w&&w.conf&&w.conf.unifiedConf;e&&(e.isConvoSteppedUp=!0)}function Fe(){K={agent:!1,visitor:!1}}function Be(){g.info("_handleSocketConnected",p),F.sendStepUp(),He(),Ge()}function Ue(){g.info("_handleSocketInitialized",p),Te?qe(q):me||(me=!0,r.trigger({appName:h,eventName:C.INITIALIZED}),be=!0,o.getMyUserProfile(),o.getBrandProfile(),W(T.REQUESTED,null))}function He(){fe&&(fe=!1,j.state===T.CONNECTION_ISSUE&&(j.state=S.states.OPEN),U)&&l.get(m.STATE)===T.CONNECTION_ISSUE&&(j.dialogId=z,ut(j),W(U))}function ze(){g.info("_handleSocketDisconnected",p),xe=!0,D={},q=null,G||fe||(G=setTimeout(function(){je()},ve))}function je(){var e=w&&w.reportLog||function(){};fe||(fe=!0,D={},H=mt(),z=ft(),M[H]&&M[H].dialogs&&M[H].dialogs[z]&&(j=lpTag.unifiedWindow.applicationUtils.clone(M[H].dialogs[z])),ct({convId:mt(),state:T.CONNECTION_ISSUE}),ut({dialogId:ft(),state:T.CONNECTION_ISSUE}),Ge(),U=l.get(m.STATE),be?(g.info("Connection issue detected - ",p),e(b.logs.segments.SF,"Connection issue detected - may affect secure forms.",{logLevel:"ERROR"}),W(T.CONNECTION_ISSUE)):dt())}function Ge(){clearTimeout(G),G=null}function qe(e){e&&o.unsubscribeConversations(e),o.subscribeConversations(et)}function Ke(){!w.conf.unifiedConf.poppedOut&&!w.conf.unifiedConf.external||w.conf.unifiedConf.connectorsSfConfig&&w.conf.unifiedConf.connectorsSfConfig.isFormSubmitted?Ye(Xe):Te?W(T.RESTART_AUTHENTICATION,null):window.location.href=w.appConfigurationManager.getExternalResourceURL(w.conf.engConf,w.conf.unifiedConf,w.conf.unifiedConf.poppedOut)}function Ye(e){pe<=ue?lt():(ue++,g.info("_restartAuthentication",p),w.authenticationManager.reAuthenticate(e,Ye.bind(this,e)))}function Xe(e){g.info("_ssoKeySuccess data="+JSON.stringify(e),p);var t=e&&e.ssoKey||null,i=e&&e.redirect_uri||null,n=e&&e.type||R.getPropertyFromObject(w,"conf.authConf.stepUpConnector.type")||R.getPropertyFromObject(w,"conf.authConf.connector.type")||null,e=e&&e.code_verifier,a=F&&F.getStepUpFailedStatus();R.getPropertyFromObject(w,"conf.engConf.allowUnauthMsg")?o.createMessagingInstance({authCode:t,redirect_uri:i,authType:n,pingTimeout:ve,forceNewConfig:a,blockHistory:De}):o.createMessagingInstance({authCode:t,redirect_uri:i,authType:n,pingTimeout:ve,forceNewConfig:a,codeVerifier:e})}function Je(e){var t=e;if(t){var e={id:t.userId,type:(function(e){var t;if("string"==typeof e.type)switch(e.type){case"CONTROLLER":t=A.SYSTEM;break;case"CONSUMER":t=A.VISITOR;break;default:t=A.AGENT}else t=e.role?A.AGENT:A.VISITOR;return t})(t),name:t.name,imgUrl:t.imgUrl},i=!1;switch(e.name||(e.type===A.VISITOR?e.name=t.firstName||t.lastName?t.firstName+" "+t.lastName:w.translator.translate("you"):e.name=w.translator.translate("agent")),!(function(e,t){var i=d.get(_.PARTICIPANTS)||{};i[e.id]=e,d.modify(_.PARTICIPANTS,i),t&&t.dialogId&&(e=L[t.dialogId])&&M[e]&&(i=M[e].dialogs[t.dialogId])&&i.participants&&(i.participants.some(function(e){return e.id===t.userId})||i.participants.push({id:t.userId,role:t.type}))})(e,t),e.type){case A.VISITOR:d.get(_.VISITOR_NAME)||(i=!0);break;case A.AGENT:Qe(t)&&(i=!0)}i&&at(e)}Te||(qe(q),me=!(Te=!0))}function Ze(t){var e,i;Qe(t)&&nt(),t&&t.dialogId&&(e=L[t.dialogId])&&M[e]&&(e=M[e].dialogs[t.dialogId])&&e.participants&&(i=e.participants.some(function(e){return e.id===t.pid}))&&"number"==typeof(i=e.participants.indexOf(i))&&e.participants.splice(i,1)}function Qe(e){return e&&(e.type===ie.ASSIGNED_AGENT||e.type===ie.AGENT)&&e.dialogId&&ke(e.dialogId)}function et(e){ue=0,q=e.subscriptionId}function tt(){var e=w.themer&&w.themer.getStyle("openingMessage","text"),i={source:A.AGENT,by:w.translator.translate("info"),isWelcomeMessage:!0};if((u=w.conf.windowConf&&w.conf.windowConf.welcomeMessage)?(w.shouldWelcomeMessageBeSent=!0,i.text=u.text,u.quickReplies&&0=ge?(Et(n,!0),!(function(e){return e=L[e],M[e].state===y.OPEN})(a)?(It(),0===Object.keys(D).length&&ye[ht(v[0].convId)]&&It(w.conf.unifiedConf.failedToLoadHistory=!0)):dt()):(P[a]?P[a].retries++:P[a]={retries:1},Vt(a)!==n&&Et(n))):(t=D[e.reqId].dialogId,i=1,R.isEmpty(P)||P[t]&&(i=P[t].retries,delete P[t]),a=D[e.reqId].resubscribe,Et(e.reqId),delete ye[t],n=setTimeout(function(){P[t]||(P[t]={retries:i}),Tt({dialogId:t})},we),O[t]={dialogId:t,timeoutId:n,resubscribe:a}))}function Et(e,t){t&&D[e]&&D[e].dialogId&&(ye[D[e].dialogId]=D[e],t=St(t=D[e].dialogId,!1),M[t].returnedDialogs.allDialogsSuccessful=!1),delete D[e]}function yt(e){if(R.isEmpty(ye))kt(e);else for(var t in ye)ye.hasOwnProperty(t)&&Vt(t)}function St(e,t){var i;return e?((i=L[e])&&M[i]&&(M[i].returnedDialogs||(M[i].returnedDialogs={allDialogsSuccessful:!1}),M[i].returnedDialogs[e]||(M[i].returnedDialogs[e]={}),M[i].returnedDialogs[e].successful=t),i):null}function It(e){var t;(0===Object.keys(D).length&&0===Object.keys(O).length||e)&&(e=ft()?T.CHATTING:T.WAITING,t=(function(){var s,r=[];Array.isArray(Se)&&Se.forEach(function(e,t){var i,n,a=i=(function(e){var t=e&&e.event||{};{if(t.type!==se.RICH_CONTENT){var i=e,n=i&&i.event||{},a=w&&w.reportLog||function(){};switch(!(function(e){return!(!Ae[e.sequence]||e.state!==oe.VIEWED&&e.state!==oe.ERROR)})(i)||(n.contentType=N.SECURE_FORM_UPDATE),n.contentType){case N.HOSTED_FILE:return(function(e,t){return{type:t,subType:"REGULAR",fileData:e,textType:"file"}})(n.message,N.HOSTED_FILE);case N.EXTERNAL_FILE:return At(w.translator.translate("transcriptForPhotoSharingImage"),E.LINE);case N.TEXT_PLAIN:return At(n.message||"",E.LINE,n.quickReplies);case N.SECURE_FORM_INVITATION:return g.info("Secure form invitation content. Data - "+JSON.stringify(i),p),a(b.logs.segments.SF,"Secure form invitation content.",{logLevel:"INFO",logData:i,onlyCurrentConv:!0}),Mt(i,I.SEND);case N.SECURE_FORM_SUBMISSION:return g.info("Secure form submission content. Data - "+JSON.stringify(i),p),a(b.logs.segments.SF,"Secure form submission content.",{logLevel:"INFO",logData:i,onlyCurrentConv:!0}),Mt(i,I.SUBMIT);case N.SECURE_FORM_UPDATE:return g.info("Secure form update content. Data - "+JSON.stringify(i),p),a(b.logs.segments.SF,"Secure form update content.",{logLevel:"INFO",logData:i}),Mt(i,i.state);default:return At("string"==typeof n.message?n.message:"",E.LINE)}return}return At(t.content,E.RICH_CONTENT,t.quickReplies)}})(n=e),o=Lt(n)||{},a=(a[Ie]=n.sequence,a.sequenceId=n.sequence,a.originatorId=o.id,a.by=o.name,a.source=o.type,a.time=n.serverTimestamp,a.convId=n.dialogId,a.track=(function(e){var t=L[e.dialogId];if(xt(e)&&x&&v[x]&&t===v[x].convId&&e.dialogId===(function(e){if(M[e]&&M[e].dialogs&&M[e].sortedDialogIds)for(var t=0;ti);a++)n.push(e[a]);return n})(e)).length&&(Wt(e,0,e.length-1,!1),v=e.concat(v),x+=e.length);return e})(e),0<(n=(function(e){var t,i;return t=v&&0=b.fifteenMinutesInMS?Q:b.fifteenMinutesInMS,g=Date.now()-Q,f=M[c].endTime&&M[c].endTimet?i.nextOn-t:null:i.nextOff&&i.nextOff>t?i.nextOff-t:null);"number"==typeof n&&(e=Math.min(n+v,36e5),o&&clearTimeout(o),o=setTimeout(f.isEmpty(i)?E:y,e));return a})(i.delay,n,t),i})(g.brandInfo,g.shiftStatus),i=(function(e){return{isUrgent:e.ttrType===d.urgent,isPrioritized:e.ttrType===d.prioritized,isManual:!!e.manualETTR}})(g.urgencyInfo),e=t,e={isUrgent:(i=i).isUrgent,markUrgencyEnabled:!t.onOffHours&&!i.isManual&&!i.isPrioritized},n.modify(c.TTR,e))}function y(){t.getShiftStatus({success:S,error:S})}function S(e){var t=e&&e.body;(m=!f.isEmpty(t)&&200===e.statusCode&&200===e.responseCode)&&(g.shiftStatus=t),E()}e=e,p.info("init",s),"object"==typeof e?(a=e.events,n=e.lpModel,i=e.lppModel,t=e.conversationManager,e.features,a.bind({appName:r,eventName:l.BRAND_INFO,func:T}),_(),i.bind(u.STATE,C),n.bind(c.TRANSCRIPT_LOADED,E)):p.error("init: missing mandatory dependencies.",s),this.dispose=function(){a.unbind({appName:r,eventName:l.BRAND_INFO,func:T}),i.unbind(u.STATE,C),n.unbind(c.TRANSCRIPT_LOADED,E),w()}},window.lpTag=window.lpTag||{},lpTag.unifiedWindow=lpTag.unifiedWindow||{},lpTag.unifiedWindow.HeartBeatManager=lpTag.unifiedWindow.HeartBeatManager||function(e,t){var i,n,a,o,s,r,l,d,c,u,p,h,g,f,m,v=lpTag.unifiedWindow.log,w=lpTag.unifiedWindow.apps,_=w.HEARTBEAT,C=lpTag.unifiedWindow.events,T="UIHeartBeatEmbedded",b="UIHeartBeatPopOut",k=6e4,W=15e3,V=15e3,$=2e3,E=1e3,y=w.UNIFIED_WINDOW;function S(e){v.info("_stop ,preserveTimestamps: "+e,_),c=!0,v.info("_clearTimeouts",_),l&&clearTimeout(l),u&&clearTimeout(u),a||e||(v.info("_clearTimestamps",_),M(),L()),d=!1}function I(e){v.info("_start, preserveTimestamps: "+e,_),i=(new Date).getTime(),S(e),v.info("_resolveApps: initializing apps value - poppedOut = "+a,_),s=a?(o=T,b):(o=b,T),v.info("_resolveApps: resolvedGetApp = "+o+", resolvedSetApp = "+s,_),v.info("_startBeating",_),d=!(c=!1),O(B),P()}function N(e){v.debug("_handleEmbeddedStateChange: embedded="+e,_),e?S():I(!0)}function x(){A(a?C.heartBeat.FAILED:C.application.DO_HARAKIRI)}function A(e,t){f.trigger({appName:_,eventName:e,data:t})}function M(e){v.info("_initPopOutBeat: "+JSON.stringify(e),_),e&&e.timestamp||(v.info("_initPopOutBeat: initializing popout beat value",_),lpTag.taglets.lpSecureStorage.setValue({key:r,site:n,app:y,value:R(0),success:D,error:D,appName:b,domain:m,firstParty:!0}))}function L(){lpTag.taglets.lpSecureStorage.setValue({key:r,site:n,app:y,value:R(0),success:D,error:D,appName:T,domain:m,firstParty:!0})}function F(e){v.info("_initEmbeddedBeat: data="+JSON.stringify(e),_),e&&e.timestamp||(v.info("_initEmbeddedBeat: initializing embedded beat value",_),L())}function D(){v.info("_emptyCallback",_)}function O(e){v.info("_getBeat: got beat",_),l&&clearTimeout(l),c||(a||g.visibilitySupported()&&!g.isHidden()?lpTag.taglets.lpSecureStorage.getValue({key:r,site:n,app:y,success:e,appName:o,domain:m,firstParty:!0}):l=setTimeout(U(e),E))}function B(e){v.info("_validateBeat: data="+JSON.stringify(e),_);var t=(new Date).getTime();c||(!(a||e&&e.timestamp)&&W{{text}}',c={attrs:{type:"data-lp-collab-type",payload:"data-lp-collab-payload",action:"data-lp-action",questionType:"idnv_question",answerType:"idnv_answer"},states:{PENDING:"pending",CANCELLED:"cancelled",SUBMITTED:"submitted",SKIPPED:"skipped"}};function u(e){return p(n.translator.dictionary.getString("idnvFormCancelled"),e,!1)}function p(e,t,i){var n;return i&&(n=c.attrs.action+'="mask"'),o.injectTextObj(d,{payload:t,mask:n,text:e})}function h(e,t){a.modify(l.IDNV_DATA.path+"."+e+".state",t)}function g(e){n.transcriptManager.sendLineSkipLocal({text:e},{error:function(){n.events.trigger({appName:"tooltip",eventName:"show",data:{text:n.translator.translate("idnvSendLineError"),tooltipTimeout:s}})}})}function f(e){var e=e.match(//g);return e&&e[0]&&(e=(function(e,t){var i=new RegExp(t+"=[\"']*[^\"' >]+"),e=e.match(i),i=new RegExp(t+"=[\"' ]*");e=e&&0)/g;function w(){l.trigger({appName:lpTag.unifiedWindow.apps.WINDOW_SDK,eventName:g.widgetSDK.INIT})}function _(e){var t=s.get(lpTag.unifiedWindow.uiModelPath.INITIATED_WIDGETS_IDS)||{};t[e]=!0,s.modify(lpTag.unifiedWindow.uiModelPath.INITIATED_WIDGETS_IDS,t),o.modify(lpTag.unifiedWindow.chatModelPath.SDK_BUTTON_ENABLE,!0)}function C(){var e=s.get(lpTag.unifiedWindow.uiModelPath.INITIATED_WIDGETS_IDS),t=s.get(lpTag.unifiedWindow.uiModelPath.DISPOSED_WIDGETS_IDS);if(t&&e)for(var i in t)e[i]=!1;return e||{}}function T(e){"number"==typeof e&&0<=e&&o.modify(lpTag.unifiedWindow.chatModelPath.SDK_NOTIFICATIONS,e)}function b(e){var t,i,n;e&&(c=e.rtSessionId&&!c?e.rtSessionId:c)&&(t=e,n=r.get(h.CONVERSATION_ID),i=r.get(h.SESSION_ID),!n&&t.rtSessionId&&r.modify(h.CONVERSATION_ID,t.rtSessionId),!i&&t.monitoringSessionId&&r.modify(h.SESSION_ID,t.monitoringSessionId),E(e,I(c)),e.agentName&&e.agentId||e.visitorId&&e.visitorName)&&((n=e).agentName&&n.agentId&&y({id:n.agentId,name:n.agentName,type:d.AGENT,imgPath:p.getPropertyFromObject(a,"conf.windowConf.agentUrl")||"",description:p.getPropertyFromObject(a,"conf.windowConf.description")||""}),n.visitorId)&&n.visitorName&&y({id:n.visitorId,name:n.visitorName,type:d.VISITOR})}function E(e,t){var i=r.get(h.CONVERSATION_ID),n=r.get(h.SESSION_ID),a=!1;t&&e&&(e.state&&t.state!==R(e.state)&&(t.state=R(e.state),a=!0),!t.startTime&&e.lastUpdate&&(t.startTime=e.lastUpdate,a=!0),e.skill&&(!t.skill||t.skill.name!==e.skill&&t.skill.id!==e.skill)&&(t.skill=u?{name:"",id:e.skill}:{name:e.skill,id:""},a=!0),e.typing&&(t.typing=e.typing,a=!0),a)&&(r.modify(h.DIALOGS,[t],"id"),l.trigger({appName:lpTag.unifiedWindow.apps.WINDOW_SDK,eventName:g.widgetSDK.CONVERSATION_INFO,data:{conversationId:i,sessionId:n,dialogId:t.id,startTime:t.startTime,state:t.state,dialogType:t.dialogType,channelType:t.channelType,skill:t.skill,typing:t.typing}}))}function y(e){for(var t,i=I(c),n=!1,a=0;a"));return t})(e.text),i.originator={type:e.source,name:e.by},i.state=e.state;break;case g.chat.CHAT_INFO:}return i})(e,g.chat.LINE);n&&(t=n,!(i=I(c))||i.state!==lpTag.WindowSDKAPI.states.ACCEPTED&&i.state!==lpTag.LPWidgetSDK.API.states.IN_QUEUE||(t.originator&&(t.originator.type===d.VISITOR?m.visitor=!0:t.originator.type===d.AGENT&&(m.agent=!0)),m.agent&&m.visitor&&E({state:lpTag.LPWidgetSDK.API.states.INTERACTIVE},i)),(t=I(e.convId))&&(t.messages.push(n),r.modify(h.DIALOGS,[t],"id")),l.trigger({appName:lpTag.unifiedWindow.apps.WINDOW_SDK,eventName:g.widgetSDK.MESSAGES,data:n}))}function R(e){var t=lpTag.unifiedWindow.State,i=lpTag.LPWidgetSDK.API.states;switch(e){case t.PRE_CHAT:return i.PRE_CONVERSATION;case t.WAITING:case t.REQUESTED:return i.PENDING;case t.CHATTING:return u?i.IN_QUEUE:i.ACCEPTED;case t.POST_CHAT:return i.POST_CONVERSATION;case t.ENDED:return i.CONVERSATION_ENDED;case t.OFFLINE:return i.OFFLINE;case t.ERROR:case t.NOT_FOUND:return i.ERROR;default:return e}}e=e,n.info("init",i),o=e.lpModel,s=e.lppModel,r=e.wsdkModel,lpTag.LPWidgetSDK.API,t=e.events,l=e.windowSDKEvents,a=e.appContext,d=lpTag.unifiedWindow.consts.widgetSDK,u=p.getPropertyFromObject(a,"conf.engConf.async"),lpTag.unifiedWindow.State,(function(){t.bind({appName:"*",eventName:g.widgetSDK.INIT,context:this,func:w}),f.push(t.bind({appName:"*",eventName:g.widgetSDK.VISITOR_TYPING,context:this,func:D})),f.push(t.bind({appName:"*",eventName:g.chat.LINE,context:this,func:P})),f.push(t.bind({appName:"*",eventName:g.chat.CHAT_INFO,context:this,func:b})),f.push(t.bind({appName:"*",eventName:g.chat.STATE,func:N})),f.push(t.bind({appName:"slider",eventName:g.viewController.SLIDER_VIEW_CHANGE,context:this,func:x})),f.push(t.bind({appName:"slider",eventName:g.viewController.SLIDER_CLOSED,context:this,func:A})),f.push(t.bind({appName:"WrapperWindowExtender",eventName:g.viewController.MINIMIZE_VISIBLE,context:this,func:function(){O(!1)}})),f.push(t.bind({appName:"WrapperWindowExtender",eventName:g.viewController.MAXIMIZE_VISIBLE,context:this,func:function(){O(!0)}})),l.bind({appName:lpTag.unifiedWindow.apps.WINDOW_SDK,eventName:lpTag.unifiedWindow.events.widgetSDK.NOTIFICATION,context:this,func:T}),l.bind({appName:lpTag.unifiedWindow.apps.WINDOW_SDK,eventName:lpTag.unifiedWindow.events.widgetSDK.INITIATED_WIDGET_ID,context:this,func:_}),o.bind(lpTag.unifiedWindow.chatModelPath.AGENT_IS_TYPING,L)})(),this.dispose=function(){n.info("dispose",i),f.forEach(function(e){t.unbind(e)}),l.unbind({appName:lpTag.unifiedWindow.apps.WINDOW_SDK,eventName:lpTag.unifiedWindow.events.widgetSDK.NOTIFICATION,context:this,func:T})},this.getWidgetsStatus=C,this.getLastShownWidgetId=function(){var e=s.get(lpTag.unifiedWindow.uiModelPath.SELECTED_WIDGET_ID),t=s.get(lpTag.unifiedWindow.uiModelPath.WIDGET_SLIDER_VISIBLE);if(e&&t)return e},this.getWidgetsNotifications=function(){return s.get(lpTag.unifiedWindow.uiModelPath.WIDGETS_NOTIICATIONS)||{}},this.getLastSliderState=function(){return s.get(lpTag.unifiedWindow.uiModelPath.WIDGET_SLIDER_VISIBLE)},this.isWindowMaximized=function(){return s.get(lpTag.unifiedWindow.uiModelPath.WINDOW_MAXIMIZED)},this.setWIdgetsNotifications=function(e){s.removeKey(lpTag.unifiedWindow.uiModelPath.WIDGETS_NOTIICATIONS),s.modify(lpTag.unifiedWindow.uiModelPath.WIDGETS_NOTIICATIONS,e)},this.handleWidgetDisposal=function(e){var t,i,n=s.get(lpTag.unifiedWindow.uiModelPath.DISPOSED_WIDGETS_IDS)||{},a=!1;for(i in n[e]=!1,s.modify(lpTag.unifiedWindow.uiModelPath.DISPOSED_WIDGETS_IDS,n),t=C())if(!0===t[i]){a=!0;break}a||o.modify(lpTag.unifiedWindow.chatModelPath.SDK_BUTTON_ENABLE,!1)},this.onWidgetStateChanged=function(e){s.modify(lpTag.unifiedWindow.uiModelPath.WIDGET_SLIDER_VISIBLE,e)}},window.lpTag=window.lpTag||{},window.lpTag.unifiedWindow.AuthenticationManager=window.lpTag.unifiedWindow.AuthenticationManager||function(e){var d,c="AuthenticationManager",u=lpTag.unifiedWindow.log,p=lpTag.taglets.authenticator,h=lpTag.taglets.lpUtil;function g(){var e=d.conf.authConf&&(d.conf.authConf.stepUpConnector||d.conf.authConf.connector),e=d.conf.unifiedConf.useOAuth2Standard||e&&e.configuration&&e.configuration.rfcCompliance;return d.conf.authConf&&d.conf.authConf.redirect_uri?d.conf.authConf.redirect_uri:e&&d.conf.unifiedConf.external?location.protocol+"//"+location.host+location.pathname:lpTag.unifiedWindow.consts.defaultRedirectUri}function f(t){return function(e){e&&(e.redirect_uri=e.redirect_uri||g()),t(e)}}d=e.appContext,this.authenticate=function(e,t){u.info("authenticate",c);var i,n,a,o=d.conf.unifiedConf.authToken||d.conf.unifiedConf.poppedOut,s=d.conf.engConf.async&&d.conf.authConf&&d.conf.authConf.ssoKey,r=d.conf.authConf&&(d.conf.authConf.stepUpConnector||d.conf.authConf.connector),l=r&&r.configuration&&r.configuration.pkceEnabled;p?(i=g(),n=d.conf.uiState&&d.conf.uiState.chat&&"restartAuthentication"===d.conf.uiState.chat.state,a=decodeURIComponent(window.location.href),l&&(o||s)&&n&&d.conf.unifiedConf.external&&!a.match('"pkce_reauthentication":1')?(n=d.pkceManager.getExternalWindowURLForPKCE(d),window.location.href=n):o?h.runCallback(e,null,{ssoKey:d.conf.unifiedConf.authToken,redirect_uri:i}):s?h.runCallback(e,null,{ssoKey:d.conf.authConf.ssoKey,redirect_uri:i}):d.conf.unifiedConf.pkceRedirectUrl?d.pkceManager.generatePKCE(function(e){e&&(localStorage.setItem("cv",e.code_verifier),window.location.href=d.conf.unifiedConf.pkceRedirectUrl+"&code_challenge="+e.code_challenge+"&code_challenge_method=S256")}):(!(function(e){e=e&&e.configuration;return!e||"lpTag.taglets.unAuthMessaging"===e.jsContext&&"lpTag.taglets.unAuthMessaging.lpUnauthFunction"===e.jsMethodName})(r)&&d.conf.unifiedConf.connectors&&d.conf.unifiedConf.connectors.length&&(a=(function(){var i,e=window.lpTag.identities&&lpTag.identities.safeIdentities||[],t=d.conf.unifiedConf.connectors,n=e.filter(function(e){var e=e.acr,t=parseInt(e,10);return 1!==e.length||0!==t});n.length&&t.forEach(function(t){n.forEach(function(e){t.configuration.issuer===e.iss&&(i=t)})});return i})())&&(r=a),l?d.pkceManager.runPKCE(r,function(){p.getSSOKey(r,f(e),t)}):p.getSSOKey(r,f(e),t))):(u.error("Not authenticator",c),h.runCallback(t))},this.reAuthenticate=function(e,t){var i;u.info("reAuthenticate",c),p&&((i=d.conf.authConf&&(d.conf.authConf.stepUpConnector||d.conf.authConf.connector))&&i.configuration&&i.configuration.pkceEnabled?d.pkceManager.runPKCE(i,function(){p.getSSOKey(i,f(e),t)}):p.getSSOKey(i,f(e),t))},this.isErroneous=function(){if(p)return p.isErroneous();u.error("Not authenticator",c)},this.dispose=function(){u.info("dispose",c)}},window.lpTag=window.lpTag||{},window.lpTag.unifiedWindow.StepUpManager=window.lpTag.unifiedWindow.StepUpManager||function(e){var o,s,r,t,i,n,l,d,a,c=lpTag.unifiedWindow.log,u=lpTag.taglets.authenticator,p=lpTag.unifiedWindow.events.chat,h=window.lpTag.taglets.lpSecureStorage,g="StepUpManager",f={},m=!1,v={success:null,fallback:null,error:function(){c.error("failed to stepup, auth error",g),setTimeout(B,0)}},w="onBehalf",_="sub",k="exp",C={outOfAuthArea:-1,noStepUp:0,stepUp:1,alreadySteppedUp:2,stepUpEnded:3,failedStepUp:4},T={},W={idpVersion:"3.0"},b={csds:{idp:"idp",leCdnDomain:"leCdnDomain"},storage:{unauthStorage:{key:"-unAuthJWT",name:"unAuthMessaging"},stepUpStorage:{appName:"StepUP",valueKeys:{lastActiveConvo:"lastActiveConvo",jwt:"-stepUpJWT",lastStepUpState:"lastStepUpState"}}}},E={};function V(e){var t=null;"OPEN"===e.state&&e.convId&&(t=e.convId),h.setValue({app:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,key:b.storage.stepUpStorage.valueKeys.lastActiveConvo,appName:b.storage.stepUpStorage.appName,site:E.accountId,value:t,domain:E.secureStorageLocation,success:function(e){c.debug("stored last unauth convo data",g)},error:function(e){c.debug("failed to store last unauth convo data",g)},firstParty:!0}),"CLOSE"===e.state&&(r=C.stepUpEnded,n.modify(lpTag.unifiedWindow.uiModelPath.STEP_UP_STATE,r))}function y(){var e,t="https://"+(m?s.unified.acCdnDomainConsumerSdk:s.unified.acCdnDomain)+"/api/account/"+s.unified.accountId+"/configuration/le-connectors/all-connectors",i=s.unified&&s.unified.connectors,n=(lpTag.identities&&lpTag.identities.safeIdentities||[]).filter(function(e){return"LivePerson"!==e.iss}),a=m?lpTag.taglets.fetch:lpTag.taglets.jsonp;f.authConnector=null,f.unauthConnector=null,i&&i.length?(i.forEach(function(t){O(t)?f.unauthConnector=t:(e=t,n.length&&n.forEach(function(e){t.configuration.issuer===e.iss&&(f.authConnector=t)}))}),f.authConnector||e&&(f.authConnector=e),A()):a.issueCall({url:t,timeout:5e3,retries:0,credentials:m?"omit":void 0,cache:m&&d?d:void 0,success:function(e){(m?e&&e.body:e).forEach(function(e){f[O(e)?"unauthConnector":"authConnector"]=e}),A()},error:function(e){c.info("_getConfiguration - ERROR FROM SERVER",g),e&&e.cspOrNetworkError&&(m=!1,y())}})}function S(t,i){var e=E.authenticationLocation,n=m?lpTag.taglets.fetch:lpTag.taglets.postmessage,a={lp_jwt:t},e=(i.redirect_uri&&(a.redirect_uri=i.redirect_uri),f.authConnector.type===lpTag.unifiedWindow.consts.authConnectorTypes.OAUTH_IMPLICIT?a.id_token=i.ssoKey:a.code=i.ssoKey,i.code_verifier&&(a.code_verifier=i.code_verifier),{url:e,method:"POST",success:function(e){var e=e.body.token,t=L(e,[w,_]),t=(T.unAuthConsuemrId=t[w],T.authConsumerId=t[_],l=e,o&&o.conf);t&&t.authConf&&(t.authConf.stepUpConnector=f.authConnector),t&&t.engConf&&(t.engConf.stepUpConnector=f.authConnector),i.ssoKey&&i.redirect_uri&&window.lpTag.taglets.lpSecureStorage.setValue({app:"monitoringSDK",appName:"lp_monitoringSDK",site:lpTag&&lpTag.site,domain:E.secureStorageLocation,success:function(){},error:function(e){c.error("Error when setting data for SMT - "+e,g)},firstParty:!0,key:"lpsmtAuth",value:{tkn:e,code:i.ssoKey}}),v.success(l)},error:function(e){c.error("failed to get onbehalf jwt from IDP",g),e&&e.cspOrNetworkError?(m=!1,S(t,i)):v.fallback()},data:a});m?(e.headers=e.headers||{},e.headers["Content-Type"]="application/json"):lpTag.taglets.postmessage.isValidRequest(e)||R(),n.issueCall(e)}function I(n){return function(e){var i={},t=f.authConnector&&f.authConnector&&f.authConnector.configuration.pkceEnabled;"object"==typeof e?(i.ssoKey=e.ssoKey,i.redirect_uri=e.redirect_uri):i.ssoKey=e,t?o.pkceManager.getPKCEFromSecureStorage(function(e){e&&e.code_verifier&&(i.code_verifier=e.code_verifier),o.pkceManager.removePKCEFromSecureStorage(),S(n,i)},function(e){c.error("Error when getting PKCE data from storage - "+e,g),S(n,i)}):i.redirect_uri?window.lpTag.taglets.lpSecureStorage.getValue({app:"monitoringSDK",appName:"lp_monitoringSDK",key:"lpsmtAuth",site:lpTag&&lpTag.site,domain:E.secureStorageLocation,success:function(e){var t;e&&e.tkn?(t=L(e.tkn,[k]))&&t.exp&&Date.now()<1e3*t.exp&&v.success(e.tkn):S(n,i)},error:function(e){c.error("Error when getting lpsmtAuth from storage - "+e,g),S(n,i)},firstParty:!0}):S(n,i)}}function $(e){var t=e.body.token,e=f.authConnector&&f.authConnector.configuration.pkceEnabled;o&&o.pkceManager&&e?o.pkceManager.runPKCE(f.authConnector,function(){u.getSSOKey(f.authConnector,I(t),N)}):u.getSSOKey(f.authConnector,I(t),N)}function N(e){c.error("Step up failed to auth with auth connector",g),v.fallback()}function x(t){var e=m?lpTag.taglets.fetch:lpTag.taglets.postmessage,i={url:E.unauthJwtLocation,method:"POST",data:{id_token:t},error:function(e){e&&e.cspOrNetworkError?(m=!1,x(t)):v.fallback()},success:$};m?(i.headers=i.headers||{},i.headers["Content-Type"]="application/json"):lpTag.taglets.postmessage.isValidRequest(i)||R(),e.issueCall(i)}function A(){var e,t;E.authenticationLocation=D(E.idpDomain,{accountId:E.accountId,connectorId:f.authConnector.id}),E.unauthJwtLocation=D(E.idpDomain,{accountId:E.accountId,connectorId:f.unauthConnector.id}),e=b.storage.unauthStorage.key,t=b.storage.unauthStorage.name,window.lpTag.taglets.lpSecureStorage.getValue({key:e,site:E.accountId,app:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,success:function(e){var t,i,n,a=lpTag.taglets.lpSecureStorage;"function"==typeof a.isFirstPartyStorageFeatureEnabled&&(t=a.isFirstPartyStorageFeatureEnabled()),e&&t?(i=e,a=b.storage.unauthStorage.key,n=b.storage.unauthStorage.name,window.lpTag.taglets.lpSecureStorage.getValue({key:a,site:E.accountId,app:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,success:function(e){x(P(i)W&&((e=k.clone(w.TAB_LIST)).path=e.path+"."+s[l],c.removeKey(e),s[l]==o)&&c.modify(w.LAST_VIEWED_TAB,"");n()})}function B(){return y.getStorageType(n).lpUnifiedWindow!==y.storageTypes.SESSIONSTORAGE}function O(){var e=function(){var e=0,t=a.get(_.LINES)||[],i=c.get(w.LAST_LINE_VIEWED);if(i)for(var n=t.length-1;0<=n;n--){if(t[n]["@id"]===i["@id"]&&t[n].convId===i.convId)return e;isNaN(t[n]["@id"])||"agent"!==t[n].source||t[n].history||e++}return 0}.call(this),t=void 0===C||C!==e,i=v&&v.isHidden();t&&(i&&0i["@id"]&&t.convId===i.convId&&"agent"===t.source&&!t.update||(function(e,t){if(e.convId!==t.convId&&"agent"===e.source&&!e.update)return 0===e["@id"]&&c.modify(w.LAST_LINE_VIEWED,{"@id":e["@id"],localId:e.localId,convId:e.convId}),1})(n[s],a))||o&&(1>>g,0>>g)*s,d[b+1]=(O*h>>>g)*s,d[b+2]=(P*h>>>g)*s):d[b]=d[b+1]=d[b+2]=0,0===M&&(_[R]=((n=R+p)]+)>((?:.(?!\\<\\/a\\>))*.)","gim")},href:{regexp:new RegExp("href=\"(.*?)\"|href='(.*?)'","gim")},link:{regexp:new RegExp("(?:(?:https?|ftp|file):\\/\\/|www\\.|ftp\\.)(?:\\([-A-Z0-9+&@#/%=~_|$?!:,.]*\\)|[-A-Z0-9+&@#/%=~_|$?!:,.])*(?:\\([-A-Z0-9+&@#/%=~_|$?!:,.]*\\)|[A-Z0-9+&@#/%=~_|$])","gim")}},o=[],s=[];function r(e){var t=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9"];return t.slice(0,e).map(function(e){return t[Math.random()*t.length|0]}).join("")}function d(e){var t;try{t=lpTag.HtmlSanitizerUtils.sanitizeAndCleanHtml(e)}catch(e){lpTag.unifiedWindow.log.error("_htmlSanitization",e),t=""}return t}function c(e){var t=document.createElement("textarea"),i=(t.innerHTML=e,t.value),t=(t.remove(),i.replace(/[^a-zA-Z0-9.\/:-]/gim,"")),i=-1===e.indexOf("://")&&-1===e.indexOf("www.");return e=-1"===i[o+2]&&(i=i.slice(0,o)+i.slice(o+3)),n.innerHTML+=t,e=c(e).trim(),n.innerHTML+=""+e+""}),i=d(i=i.slice(o)),n.innerHTML+=i,n.children)for(var t=0;t'+e.noun+"";t=t.replace(l.markdownInsideAll.regexp,e)})}var r;return t},textContainsMarkDownSyntax:function(e){return e.match(l.markdownToHtml.regexp)},sanitizeTextFromHTML:d,textContainsAHREFSyntax:function(e){return e.match(l.anchorTagRegex.regexp)}}},window.lpTag=window.lpTag||{},window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{},(function(){var l;lpTag.unifiedWindow.BaseViewController=window.liveperson.uiframework.latest.ViewController.extend({ControllerName:"BaseViewController",logger:lpTag.unifiedWindow.log,util:lpTag.taglets.lpUtil,uiPath:lpTag.unifiedWindow.uiModelPath,chatPath:lpTag.unifiedWindow.chatModelPath,EventName:lpTag.unifiedWindow.events,appConsts:lpTag.unifiedWindow.consts,VCEvents:lpTag.unifiedWindow.events.viewController,State:lpTag.unifiedWindow.State,prefixPlaceHolder:"{{PREFIX}}",customAnimationDurations:{},animationClasses:{bounce:"lpBounceClass",shakeX:"lpShakeXClass",shakeY:"lpShakeYClass"},LPReadNotificationsTypes:{none:{value:"none"},visual:{value:"visual",templates:{PENDING:"{{iconTitle}}",SENT:"{{iconTitle}}",ACCEPT:"{{iconTitle}}",READ:"{{iconTitle}}",ERROR:"{{iconTitle}}",image_ERROR:"{{iconTitle}}", image_RETRY:"{{iconTitle}}"}},text:{value:"text"}},initialize:function(e){this.uiPath=lpTag.unifiedWindow.uiModelPath,this.chatPath=lpTag.unifiedWindow.chatModelPath,this.appContext=e.appContext,e.appContext&&e.appContext.timeStampManager&&(this.timeStampManager=e.appContext.timeStampManager,this.timeStampGroupingEnabled=this.timeStampManager.timeStampGroupingEnabled()),l.enableStrictCspMode=!!(this.appContext&&this.appContext.conf&&this.appContext.conf.unifiedConf&&this.appContext.conf.unifiedConf.enableStrictCspMode),l.animationCreated||l.enableStrictCspMode||!this.appContext.deviceDetector.isAnimationSupported()||(l.animationPrefix=this.appContext.deviceDetector.getAnimationData().preFix,l.animationsSupported=!0,l.cssAnimation=document.createElement("style"),l.cssAnimation.type="text/css",document.getElementsByTagName("head")[0].appendChild(l.cssAnimation),this.createDefaultAnimations())},render:function(){l.enableStrictCspMode&&this.customize(this.view)}}),(l=lpTag.unifiedWindow.BaseViewController.prototype).templateString=function(e,t){e=window.liveperson.uiframework.latest.ViewController.prototype.templateString.call(this,e,t);return e=l.enableStrictCspMode?(function(e){"string"==typeof e&&(e=(e=e.replace(/(<[^>]+) style=".*?"/gi,"$1")).replace(/<[^>]+ style=".*?" \/>/gi,function(e){return e.replace(/ style=".*?"/gi,"")}));return e})(e):this.customize(e)},l.createDefaultAnimations=function(){l.animationCreated||(this.createKeyframe(this.animationClasses.bounce,[{percent:0,animate:this.prefixPlaceHolder+"transform: scale(1, 1);"},{percent:40,animate:this.prefixPlaceHolder+"transform: scale(1.15, 1.1);"},{percent:100,animate:this.prefixPlaceHolder+"transform: scale(1, 1);"}],500),this.createKeyframe(this.animationClasses.shakeX,[{percent:0,animate:this.prefixPlaceHolder+"transform: translateX(0px);"},{percent:20,animate:this.prefixPlaceHolder+"transform: translateX(-15px);"},{percent:40,animate:this.prefixPlaceHolder+"transform: translateX(15px); "},{percent:60,animate:this.prefixPlaceHolder+"transform: translateX(-10px);"},{percent:80,animate:this.prefixPlaceHolder+"transform: translateX(10px);"},{percent:100,animate:this.prefixPlaceHolder+"transform: translateX(0px);"}],400),this.createKeyframe(this.animationClasses.shakeY,[{percent:0,animate:this.prefixPlaceHolder+"transform: translateY(0px);"},{percent:20,animate:this.prefixPlaceHolder+"transform: translateY(-15px);"},{percent:40,animate:this.prefixPlaceHolder+"transform: translateY(15px); "},{percent:60,animate:this.prefixPlaceHolder+"transform: translateY(-10px);"},{percent:80,animate:this.prefixPlaceHolder+"transform: translateY(10px);"},{percent:100,animate:this.prefixPlaceHolder+"transform: translateY(0px);"}],400),l.animationCreated=!0)},l.createKeyframe=function(e,t,i){if(l.cssAnimation){for(var n="."+e+" {"+l.animationPrefix+"animation: lpanim_"+e+" "+i/1e3+"s 0s 1 ease-in-out;}@"+l.animationPrefix+"keyframes lpanim_"+e+" {",a=0;at[i]?1:0}):t},cloneObj:function(e){return JSON.parse(JSON.stringify(e))},isEmptyLiteral:function(e){for(var t in e)return!1;return!0},isSameObject:g,addClassByArray:function e(t,i){var n;if(h(i))for(var a=0;a":">",'"':""","'":"'","/":"/","`":"`","=":"="};if(e)return e.replace(/[&<>"'`=/]/g,function(e){return t[e]})},createDateFromString:function(e){var t=new Date(e);return isNaN(t)&&(t=new Date,(e=e.match(/(\d+)-(\d+)-(\d+)T(\d+):(\d+):(\d+)([.])(\d+)([+-])(\d+):(\d+)/))&&12==e.length&&(t.setUTCFullYear(parseInt(e[1],10)),t.setUTCMonth(parseInt(e[2],10)-1),t.setUTCDate(parseInt(e[3],10)),t.setUTCHours(parseInt(e[4],10)-parseInt(e[9]+"1",10)*parseInt(e[10],10)),t.setUTCMinutes(parseInt(e[5],10)-parseInt(e[9]+"1",10)*parseInt(e[11],10)),t.setUTCSeconds(parseInt(e[6],10))),e=null),t},formatDay:function(e,t,i,n,a,o){var s,r,l,d,c=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],u=["Sun","Mon","Tues","Wed","Thurs","Fri","Sat"];if(t)for(var p=0,h=c.length;p{"use strict";var i={566:function(e){var n=Object.prototype.hasOwnProperty,h="~";function i(){}function o(e,t,i){this.fn=e,this.context=t,this.once=i||!1}function a(e,t,i,n,a){if("function"!=typeof i)throw TypeError("The listener must be a function");i=new o(i,n||e,a),n=h?h+t:t;return e._events[n]?e._events[n].fn?e._events[n]=[e._events[n],i]:e._events[n].push(i):(e._events[n]=i,e._eventsCount++),e}function l(e,t){0==--e._eventsCount?e._events=new i:delete e._events[t]}function t(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(h=!1)),t.prototype.eventNames=function(){var e,t,i=[];if(0===this._eventsCount)return i;for(t in e=this._events)n.call(e,t)&&i.push(h?t.slice(1):t);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},t.prototype.listeners=function(e){var e=h?h+e:e,t=this._events[e];if(!t)return[];if(t.fn)return[t.fn];for(var i=0,n=t.length,a=Array(n);i{var t=e&&e.__esModule?()=>e.default:()=>e;return y.d(t,{a:t}),t},y.d=(e,t)=>{for(var i in t)y.o(t,i)&&!y.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},y.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var S={};{y.d(S,{default:()=>E});var I,N=y(566),x=y.n(N);function bt(){for(var e=arguments.length,t=Array(e),i=0;i/gm),p=e(/\$\{[\w\W]*/gm),h=e(/^data-[\-\w.\u00B7-\uFFFF]+$/),g=e(/^aria-[\-\w]+$/),gt=e(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),f=e(/^(?:\w+script|data):/i),v=e(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ft=e(/^html$/i);var It=Object.freeze({__proto__:null,ARIA_ATTR:g,ATTR_WHITESPACE:v,CUSTOM_ELEMENT:e(/^[a-z][.\w]*(-[.\w]+)+$/i),DATA_ATTR:h,DOCTYPE_NAME:ft,ERB_EXPR:u,IS_ALLOWED_URI:gt,IS_SCRIPT_OR_DATA:f,MUSTACHE_EXPR:c,TMPLIT_EXPR:p});function Nt(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}}let mt={element:1,text:3,progressingInstruction:7,comment:8,document:9};var M=(function R(){let c,e=0R(e);if(u.version="3.2.6",u.removed=[],!e||!e.document||e.document.nodeType!==mt.document||!e.Element)return u.isSupported=!1,u;let a=e["document"],k=a,W=k.currentScript,{DocumentFragment:V,HTMLTemplateElement:$,Node:F,Element:B,NodeFilter:t,NamedNodeMap:U=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:H,DOMParser:z,trustedTypes:p}=e,i=B.prototype,j=St(i,"cloneNode"),G=St(i,"remove"),q=St(i,"nextSibling"),K=St(i,"childNodes"),s=St(i,"parentNode");var Y;"function"==typeof $&&(Y=a.createElement("template")).content&&Y.content.ownerDocument&&(a=Y.content.ownerDocument);function X(e){return e instanceof RegExp||e instanceof Function}function J(){let e=0e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+t+" could not be created."),null}})(p,W):c)&&"string"==typeof d&&(d=c.createHTML(""));qe&&qe(e),o=e}}function h(e,t){try{Ze(u.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Ze(u.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(T||b)try{O(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}}function Z(e){let t=null,i=null;ye?e=""+e:(n=tt(e,/^[\r\n\t ]+/),i=n&&n[0]),"application/xhtml+xml"===L&&x===N&&(e=''+e+"");var n=c?c.createHTML(e):e;if(x===N)try{t=(new z).parseFromString(n,L)}catch(e){}if(!t||!t.documentElement){t=ie.createDocument(x,"template",null);try{t.documentElement.innerHTML=Oe?d:n}catch(e){}}return n=t.body||t.documentElement,e&&i&&n.insertBefore(a.createTextNode(i),n.childNodes[0]||null),x===N?oe.call(t,C?"html":"body")[0]:C?t.documentElement:n}function Q(e){return ne.call(e.ownerDocument||e,e,t.SHOW_ELEMENT|t.SHOW_COMMENT|t.SHOW_TEXT|t.SHOW_PROCESSING_INSTRUCTION|t.SHOW_CDATA_SECTION,null)}function ee(e){return e instanceof H&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof U)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)}function te(e){return"function"==typeof F&&e instanceof F}let d="",{implementation:ie,createNodeIterator:ne,createDocumentFragment:ae,getElementsByTagName:oe}=a,se=k["importNode"],g=Nt(),{MUSTACHE_EXPR:re,ERB_EXPR:le,TMPLIT_EXPR:de,DATA_ATTR:ce,ARIA_ATTR:ue,IS_SCRIPT_OR_DATA:pe,ATTR_WHITESPACE:he,CUSTOM_ELEMENT:ge}=(u.isSupported="function"==typeof Ge&&"function"==typeof s&&ie&&void 0!==ie.createHTMLDocument,It),fe=It["IS_ALLOWED_URI"],f=null,me=Et({},[...ot,...st,...rt,...lt,...dt]),m=null,ve=Et({},[...ct,...ut,...pt,...ht]),r=Object.seal(Ke(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),v=null,we=null,_e=!0,Ce=!0,Te=!1,be=!0,w=!1,_=!0,C=!1,Ee=!1,ye=!1,T=!1,b=!1,E=!1,Se=!0,Ie=!1,Ne=!0,y=!1,n={},l=null,xe=Et({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ae=null,Me=Et({},["audio","video","img","source","image","track"]),Le=null,De=Et({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),S="http://www.w3.org/1998/Math/MathML",I="http://www.w3.org/2000/svg",N="http://www.w3.org/1999/xhtml",x=N,Oe,Pe=null,Re=Et({},[S,I,N],et),A=Et({},["mi","mo","mn","ms","mtext"]),M=Et({},["annotation-xml"]),ke=Et({},["title","style","font","a","script"]),L=null,We=["application/xhtml+xml","text/html"],D=null,o=null,Ve=a.createElement("form"),$e=Et({},[...st,...rt,...Ct]),Fe=Et({},[...lt,...Tt]),O=function(t){Ze(u.removed,{element:t});try{s(t).removeChild(t)}catch(e){G(t)}};function P(e,t,i){Ye(e,e=>{e.call(u,t,i,o)})}function Be(t){let i=null;if(P(g.beforeSanitizeElements,t,null),!ee(t)){var e=D(t.nodeName);if(P(g.uponSanitizeElement,t,{tagName:e,allowedTags:f}),!(_&&t.hasChildNodes()&&!te(t.firstElementChild)&&at(/<[/\w!]/g,t.innerHTML)&&at(/<[/\w!]/g,t.textContent)||t.nodeType===mt.progressingInstruction||_&&t.nodeType===mt.comment&&at(/<[/\w]/g,t.data))){if(f[e]&&!v[e])return t instanceof B&&!(function(e){let t=s(e);t&&t.tagName||(t={namespaceURI:x,tagName:"template"});var i=Qe(e.tagName),n=Qe(t.tagName);return!!Pe[e.namespaceURI]&&(e.namespaceURI===I?t.namespaceURI===N?"svg"===i:t.namespaceURI===S?"svg"===i&&("annotation-xml"===n||A[n]):!!$e[i]:e.namespaceURI===S?t.namespaceURI===N?"math"===i:t.namespaceURI===I?"math"===i&&M[n]:!!Fe[i]:e.namespaceURI===N?(t.namespaceURI!==I||!!M[n])&&(t.namespaceURI!==S||!!A[n])&&!Fe[i]&&(ke[i]||!$e[i]):"application/xhtml+xml"===L&&!!Pe[e.namespaceURI])})(t)||("noscript"===e||"noembed"===e||"noframes"===e)&&at(/<\/no(script|embed|frames)/i,t.innerHTML)?O(t):(w&&t.nodeType===mt.text&&(i=t.textContent,Ye([re,le,de],e=>{i=it(i,e," ")}),t.textContent!==i)&&(Ze(u.removed,{element:t.cloneNode()}),t.textContent=i),P(g.afterSanitizeElements,t,null));if(!v[e]&&je(e)&&(r.tagNameCheck instanceof RegExp&&at(r.tagNameCheck,e)||r.tagNameCheck instanceof Function&&r.tagNameCheck(e)))return;if(Ne&&!l[e]){var n=s(t)||t.parentNode,a=K(t)||t.childNodes;if(a&&n)for(let e=a.length-1;0<=e;--e){var o=j(a[e],!0);o.__removalCount=(t.__removalCount||0)+1,n.insertBefore(o,q(t))}}}}O(t)}function Ue(e,t,i){if(Se&&("id"===t||"name"===t)&&(i in a||i in Ve))return!1;if((!Ce||we[t]||!at(ce,t))&&(!_e||!at(ue,t)))if(!m[t]||we[t]){if(!(je(e)&&(r.tagNameCheck instanceof RegExp&&at(r.tagNameCheck,e)||r.tagNameCheck instanceof Function&&r.tagNameCheck(e))&&(r.attributeNameCheck instanceof RegExp&&at(r.attributeNameCheck,t)||r.attributeNameCheck instanceof Function&&r.attributeNameCheck(t))||"is"===t&&r.allowCustomizedBuiltInElements&&(r.tagNameCheck instanceof RegExp&&at(r.tagNameCheck,i)||r.tagNameCheck instanceof Function&&r.tagNameCheck(i))))return!1}else if(!Le[t]&&!at(fe,it(i,he,""))&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==wt(i,"data:")||!Ae[e])&&(!Te||at(pe,it(i,he,"")))&&i)return!1;return!0}function He(r){P(g.beforeSanitizeAttributes,r,null);var l=r["attributes"];if(l&&!ee(r)){let o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:m,forceKeepAttr:void 0},s=l.length;for(;s--;){let{name:t,namespaceURI:e,value:i}=l[s],n=D(t),a="value"===t?i:_t(i);if(o.attrName=n,o.attrValue=a,o.keepAttr=!0,o.forceKeepAttr=void 0,P(g.uponSanitizeAttribute,r,o),a=o.attrValue,!Ie||"id"!==n&&"name"!==n||(h(t,r),a="user-content-"+a),_&&at(/((--!?|])>)|<\/(style|title)/i,a))h(t,r);else if(!o.forceKeepAttr)if(!o.keepAttr||!be&&at(/\/>/i,a))h(t,r);else{w&&Ye([re,le,de],e=>{a=it(a,e," ")});var d=D(r.nodeName);if(Ue(d,n,a)){if(c&&"object"==typeof p&&"function"==typeof p.getAttributeType&&!e)switch(p.getAttributeType(d,n)){case"TrustedHTML":a=c.createHTML(a);break;case"TrustedScriptURL":a=c.createScriptURL(a)}if(a!==i)try{e?r.setAttributeNS(e,t,a):r.setAttribute(t,a),ee(r)?O(r):Je(u.removed)}catch(e){h(t,r)}}else h(t,r)}}P(g.afterSanitizeAttributes,r,null)}}function ze(e){var t,i=Q(e);for(P(g.beforeSanitizeShadowDOM,e,null);t=i.nextNode();)P(g.uponSanitizeShadowNode,t,null),Be(t),He(t),t.content instanceof V&&ze(t.content);P(g.afterSanitizeShadowDOM,e,null)}let je=function(e){return"annotation-xml"!==e&&tt(e,ge)};return u.sanitize=function(e){let t=1\n"+l),w&&Ye([re,le,de],e=>{l=it(l,e," ")}),c&&E?c.createHTML(l):l},u.setConfig=function(){var e=0{if(void 0===t[e])throw Error(`Missing configuration: ${e} is a mandatory for element of type `+t.type)})},isString:e=>e instanceof String||"string"==typeof e,isObject:e=>null!==e&&"object"==typeof e,isLayout:e=>0<=w.indexOf(e),normalizeHtmlText(e){let t=e;return t=e?t.replace(/(?:\r\n|\r|\n)/g,"
"):t},escapeHtml(e){let t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return e.replace(/[&<>"'`=/]/g,e=>t[e])},htmlToElement(e){var t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild},hasClass:(e,t)=>e.classList&&e.classList.contains?e.classList.contains(t):!!e.className.match(RegExp(`(\\s|^)${t}(\\s|$)`)),addClass(e,t){e.classList?e.classList.add(t):this.hasClass(e,t)||(e.className+=" "+t)},removeClass(e,t){e.classList?e.classList.remove(t):this.hasClass(e,t)&&(t=RegExp(`(\\s|^)${t}(\\s|$)`),e.className=e.className.replace(t," "))},generateRandomId:()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),appendAttributesFromObject(t,i){Object.keys(i).forEach(e=>{t.setAttribute(e,i[e])})}};function L(){return(L=Object.assign||function(e){for(var t=1;t{e&&i&&i.preventDefault&&i.preventDefault(),a.actions instanceof Array&&a.actions.forEach(e=>{var t={actionData:e,metadata:a.metadata,uiEvent:i};o&&(t.groupID=o),n&&(t.formEl=n),this.events.emit(e.type,t)})}}constructor(e){this.elements={},this.elements={},this.events=e,this.set(t.TEXT,e=>{var t=document.createElement("div"),i=document.createElement("span"),n=e.tooltip?m.escapeHtml(e.tooltip):"",a=(t.className="lp-json-pollock-element-text",e.rtl&&(t.dir="rtl",m.addClass(t,"direction-rtl")),m.styleToCss(e.style)),a=m.extractFromStyles(a,"background-color");return t.setAttribute("style",a.extractedStyle),i.innerHTML=m.normalizeHtmlText(M.sanitize(e.text)),i.setAttribute("style",a.style),i.setAttribute("title",n),e.accessibility&&e.accessibility.web?m.appendAttributesFromObject(i,e.accessibility.web):i.setAttribute("aria-label",n),t.appendChild(i),t}),this.set(t.BUTTON,s=>{var e,t,i,n=document.createElement("div");n.className="lp-json-pollock-element-button",s.rtl&&(n.dir="rtl",m.addClass(n,"direction-rtl"));let r=document.createElement("button"),a=s.customSettings&&s.customSettings.blockSCWhenNotLastMsg,l=(r.innerHTML=m.normalizeHtmlText(M.sanitize(s.title)),s.subtitle&&((e=document.createElement("span")).className="lp-json-pollock-element-button-subtitle",e.innerHTML=m.normalizeHtmlText(M.sanitize(s.subtitle)),r.appendChild(e)),s.tooltip&&(r.title=s.tooltip,r.setAttribute("aria-label",s.tooltip)),a&&(r.setAttribute("disabled","true"),r.classList.add("lp-json-pollock-element-submit-button-disabled")),s.accessibility&&s.accessibility.web&&m.appendAttributesFromObject(r,s.accessibility.web),s.click);return l&&l.actions&&!a&&(s.ref?r.onclick=(e,t)=>{let i,n=[],a=(function e(t){return t?t.classList.contains("lp-json-pollock")?t:e(t.parentNode):void 0})(r);if(!a)throw Error("Cannot find root element selected!");switch(s.ref.type){case"carouselSelect":i=`[data-carousel-name=${s.ref.name}] [data-selected]`;break;case"accordionSelect":i=`[data-accordion-name=${s.ref.name}] [data-accordion-body][data-selected]`;break;default:throw Error("Invalid config ref type is used for the button! Type: "+s.ref.type)}var o=Array.from(a.querySelectorAll(i));if(0===o.length)throw Error("No items has selected!");o=o.map(e=>JSON.parse(e.getAttribute("data-metadata")||"[]")).reduce((e,t)=>[...e,...t],[]);return n.push(...o),this.wrapAction(L({},l,{metadata:n}))(e,t)}:r.onclick=this.wrapAction(s.click)),"button"!==s.class?(s.style&&(e=m.styleToCss(s.style),e=m.extractFromStyles(e,"background-color"),r.style.cssText=e.style,n.setAttribute("style",e.extractedStyle)),n.appendChild(r)):((e=document.createElement("div")).className="lp-json-pollock-element-button-button",m.addClass(e,"class-button"),s.style&&(t=m.styleToCss(s.style),t=m.extractFromStyles(t,"background-color"),r.style.cssText=t.style,e.setAttribute("style",t.extractedStyle),""!==(i=m.styleToBorder(s.style)))&&e.setAttribute("style",t.extractedStyle+" "+i),e.appendChild(r),n.appendChild(e)),n}),this.set(t.SUBMITBUTTON,e=>{var t=document.createElement("div"),i=(t.className="lp-json-pollock-element-submit-button",e.rtl&&(t.dir="rtl",m.addClass(t,"direction-rtl")),document.createElement("input")),n=e.customSettings&&e.customSettings.blockSCWhenNotLastMsg;return i.type="submit",i.value=m.normalizeHtmlText(e.title),(e.disabled||n)&&(i.disabled=!0,i.classList.add("lp-json-pollock-element-submit-button-disabled")),e.tooltip&&(i.title=e.tooltip,i.setAttribute("aria-label",e.tooltip)),e.style&&(n=m.styleToCss(e.style),n=m.extractFromStyles(n,"background-color"),t.setAttribute("style",n.extractedStyle),i.style.cssText=n.style),e.accessibility&&e.accessibility.web&&m.appendAttributesFromObject(i,e.accessibility.web),e.click&&e.click.actions&&(i.onclick=this.wrapAction(e.click,!0)),t.appendChild(i),t}),this.set(t.CHECKBOX,e=>{let t=m.generateRandomId(),n=document.createElement("div"),i=(n.className="lp-json-pollock-element-checkbox",document.createElement("input")),a=m.normalizeHtmlText(M.sanitize(e.text)),o=e.customSettings&&e.customSettings.blockSCWhenNotLastMsg;i.type="checkbox",i.className="lp-json-pollock-element-checkbox-input",i.id=t;var s,r=document.createElement("label"),l=(r.className="lp-json-pollock-element-checkbox-label",r.innerHTML+=a,r.setAttribute("for",t),e.rtl&&(r.dir="rtl",m.addClass(r,"direction-rtl")),e.tooltip&&(r.title=e.tooltip,r.setAttribute("aria-label",e.tooltip)),o&&i.setAttribute("disabled","true"),e.borderLine&&((l=document.createElement("div")).className="lp-json-pollock-border-element",e.borderColor&&(l.style.borderColor=e.borderColor),n.appendChild(l)),e.accessibility&&e.accessibility.web&&m.appendAttributesFromObject(r,e.accessibility.web),document.createElement("div"));return l.className="lp-json-pollock-element-checkbox-wrapper",e.rtl&&(l.dir="rtl",m.addClass(l,"direction-rtl")),e.style&&(e=m.styleToCss(e.style),s=m.extractFromStyles(e,"background-color"),r.style.cssText=e,l.setAttribute("style",s.extractedStyle)),l.appendChild(i),l.appendChild(r),n.appendChild(l),n.afterRender=(e,t)=>{var i=n.getElementsByTagName("input")[0];e.click&&e.click.actions&&!o&&(i.onclick=this.wrapAction(e.click,!1,t.parentElement.getAttribute(d)))},n}),this.set(t.CHECKLIST,e=>{var t=document.createElement("div");return t.className="lp-json-pollock-layout-checklist",t.setAttribute("role","group"),e.padding&&(e=e.padding,t.style.margin=e/2+"px 0px"),t}),this.set(t.SECTION,e=>{var t,i=document.createElement("div");return i.className="lp-json-pollock-layout-section",e.padding&&(t=e.padding,i.style.margin=t/2+"px 0px"),e.sectionID&&i.setAttribute(d,e.sectionID),e.accessibility&&e.accessibility.web&&m.appendAttributesFromObject(i,e.accessibility.web),i}),this.set(t.SECTIONLIST,()=>{var e=document.createElement("div");return e.className="lp-json-pollock-layout-sectionList",e}),this.set(t.BUTTONLIST,()=>{var e=document.createElement("div");return e.className="lp-json-pollock-layout-buttonList",e}),this.set(t.LIST,()=>{let o=document.createElement("form");return o.className="lp-json-pollock-layout lp-json-pollock-layout-form",o.afterRender=()=>{var t=o.querySelectorAll("input");if(0{t.call(this,e,o)}}}var n=o.querySelectorAll("button");if(0{let t=document.createElement("div"),i=(t.className="lp-json-pollock-element-image loading",e.rtl&&(t.dir="rtl",m.addClass(t,"direction-rtl")),document.createElement("img"));return i.src=e.url,e.tooltip&&e.tooltip.length&&(t.title=e.tooltip),e.alt&&e.alt.length?i.setAttribute("alt",e.alt):(i.setAttribute("alt",""),i.setAttribute("role","presentation")),e.style&&(i.style.cssText=m.styleToCss(e.style)),e.caption&&(t.innerHTML+=`${M.sanitize(e.caption)}`),e.accessibility&&e.accessibility.web&&m.appendAttributesFromObject(i,e.accessibility.web),i.onload=()=>{m.removeClass(t,"loading")},i.onerror=()=>{m.removeClass(t,"loading"),m.addClass(t,"error"),t.title="fail to load image",i.style.display="none"},e.click&&e.click.actions&&(i.onclick=this.wrapAction(e.click)),t.appendChild(i),t}),this.set(t.MAP,t=>{var e=t.accessibility&&t.accessibility.web,i=document.createElement("div");return i.className="lp-json-pollock-element-map",t.tooltip&&(i.title=t.tooltip,i.setAttribute("aria-label",t.tooltip)),t.style&&(i.style.cssText=m.styleToCss(t.style)),e&&m.appendAttributesFromObject(i,t.accessibility.web),e&&e.tabindex||i.setAttribute("tabindex","0"),i.onkeydown=e=>{13!==e.keyCode&&32!==e.keyCode||(e.preventDefault(),window.open(`https://www.google.com/maps/search/?api=1&query=${t.la},`+t.lo,"_blank"))},t.click&&t.click.actions?i.onclick=this.wrapAction(t.click):i.onclick=()=>{window.open(`https://www.google.com/maps/search/?api=1&query=${t.la},`+t.lo,"_blank")},i}),this.set(t.VERTICAL,i=>{var n=document.createElement("div");if(n.className="lp-json-pollock-layout lp-json-pollock-layout-vertical","borderLess"===i.border?m.addClass(n,"lp-json-pollock-layout-borderLess"):"dropShadow"===i.border&&m.addClass(n,"lp-json-pollock-layout-dropShadow"),"enable"===i.scroll)if(m.addClass(n,"lp-json-pollock-layout-vertical-scroll"),i.style&&i.style.size){let e=i.style["size"],t=100;"medium"===e?t=300:"large"===e&&(t=500),n.setAttribute("style",`height: ${t}px`)}else n.setAttribute("style","height: 100px");return i.accessibility&&i.accessibility.web&&m.appendAttributesFromObject(n,i.accessibility.web),i.metadata&&n.setAttribute("data-metadata",JSON.stringify(i.metadata)),n}),this.set(t.TABS,r=>{let e=r["elements"],o=document.createElement("div"),n=document.createElement("div"),l=(o.appendChild(n),""),d="",c="",s="";if(r.style){let e=r.style.color,t=r.style["background-color"],i=r.style["color-active"],n=r.style["background-color-active"],a=r.style["color-hover"],o=r.style["background-color-hover"],s=1;r.style.size&&("small"===r.style.size?s=1:"medium"===r.style.size?s=2:"large"===r.style.size&&(s=3)),l+=(e?`color: ${e}; `:"")+(e?`border-bottom: ${s}px solid ${e}; `:"")+(t?`background-color: ${t}; `:""),d+=(i?`color: ${i}; `:"")+(i?`border-bottom: ${s}px solid ${i}; `:"")+(n?`background-color: ${n}; `:""),c+=(a?`color: ${a}; `:"")+(a?`border-bottom: ${s}px solid ${a}; `:"")+(o?`background-color: ${o}; `:"")}let a=e=>{var t=o.children,i=t[0].children,n=[];for(let e=1;e{e.style.display="none"}),e){for(let e=0;e{let t=e["tag"],i=document.createElement("button");i.className="lp-json-pollock-element-tab-button",r.style&&r.style.size?i.className+=" lp-json-pollock-element-tab-button-size-"+r.style.size:i.className+=" lp-json-pollock-element-tab-button-size-small",l&&(i.style.cssText=l),c&&(s=i.style.cssText,i.addEventListener("mouseover",()=>{s=i.style.cssText,i.style.cssText=c},!1),i.addEventListener("mouseout",()=>{i.style.cssText=s},!1)),i.id=t,i.textContent=t,i.onclick=e=>{a.call(this,e)},n.appendChild(i)}),o.afterRender=()=>{a()},o}),this.set(t.CAROUSEL,a=>{let i,n=a.padding||0,o=0,s=document.createElement("button"),r=document.createElement("button"),l=document.createElement("div"),d=document.createElement("div"),c=document.createElement("div"),u=0;if(s.setAttribute("type","button"),s.setAttribute("aria-label","Previous"),r.setAttribute("type","button"),r.setAttribute("aria-label","Next"),d.setAttribute("aria-live","polite"),d.setAttribute("aria-atomic","true"),s.innerHTML='',r.innerHTML='',a.accessibility&&a.accessibility.web&&m.appendAttributesFromObject(l,a.accessibility.web),a.style){let e=m.styleToCss(a.style),t=m.extractFromStyles(e,"background-color"),i=""+t.extractedStyle,n=m.styleToBorder(a.style);""!==n&&(i+=" "+n);var a=m.styleToButton(a.style),a=(""!==a&&(i+=" "+a),r.setAttribute("style",""+i),s.setAttribute("style",""+i),r.querySelector(".lp-json-pollock-layout-carousel-arrow-icon")),p=s.querySelector(".lp-json-pollock-layout-carousel-arrow-icon");a&&a.setAttribute("style",t.style),p&&p.setAttribute("style",t.style)}function h(e){i&&i[u]&&(o=-1*i[u].offsetLeft+"px",u===i.length-1&&(o=-1*(i[u].offsetLeft-(l.offsetWidth-i[u].offsetWidth))+"px"),this&&this.events&&this.events.emit("carouselOffsetChange",{offset:o,prevOffset:c.style.left,uiEvent:e}),c.style.left=o)}function g(){var e=`Item ${u+1} of `+i.length;d.setAttribute("aria-label",e)}function f(e){var t=(function e(t){if(t)return t.getAttribute("data-carousel-index")||e(t.parentNode)})(e.target);t&&(l.scrollLeft=0,t)&&u!==parseInt(t,10)&&(u=parseInt(t,10),h.call(this,e))}return s.style.visibility="visible",l.afterRender=()=>{if(l.childNodes.length){for(let e=0;e{l.offsetWidth>c.offsetWidth&&(s.style.visibility="hidden",r.style.visibility="hidden"),i=c.children,"rtl"===window.getComputedStyle(r).direction&&(s.style.visibility="visible",r.style.visibility="visible",u=i.length-1,i=[].slice.call(i,0).reverse(),o=-1*(i[u].offsetLeft-(l.offsetWidth-i[u].offsetWidth))+"px",c.style.left=o)},0),r.onclick=e=>{!function(e){u===i.length-1?u=0:u+=1,g(),h.call(this,e)}.call(this,e)},s.onclick=e=>{!function(e){0===u?u=i.length-1:--u,g(),h.call(this,e)}.call(this,e)}}},l}),this.set(t.CAROUSELSELECT,n=>{let a=n.padding||0,o=document.createElement("div"),e=document.createElement("div");function i(e,t){t?(e.setAttribute("data-selected","true"),e.classList.add("lp-json-pollock-layout-selected"),n.style&&n.style["border-color-selected"]&&(e.style.borderColor=n.style["border-color-selected"])):(e.removeAttribute("data-selected"),e.classList.remove("lp-json-pollock-layout-selected"),e.style.borderColor="")}function s(e){let t=(function e(t){return t&&"BUTTON"!==t.tagName?null!==t.getAttribute("data-carousel-index")?t:e(t.parentNode):void 0})(e.target);t&&("single"===n.selectMode.type&&t.parentNode&&Array.from(t.parentNode.querySelectorAll("[data-carousel-index][data-selected]")).filter(e=>e!==t).forEach(e=>{i(e,!1)}),i(t,"true"!==t.dataset.selected))}var t;return n.accessibility&&n.accessibility.web&&m.appendAttributesFromObject(o,n.accessibility.web),n.style&&(t=m.styleToCss(n.style),t=m.extractFromStyles(t,"background-color"),e.style.cssText=t.style,e.setAttribute("style",t.extractedStyle)),o.afterRender=()=>{var t=o.children.length;if(t){for(let e=0;e{let u=c.padding||0,p=document.createElement("div"),e=document.createElement("div"),h=m.htmlToElement('');function g(e){var e=e.target,t="INPUT"===e.tagName,e=(function e(t){return null!==t.getAttribute("data-accordion-index")?t:e(t.parentNode)})(e);if(e){var i=e.querySelector(".lp-json-pollock-layout-accordion-checkbox"),n=e.querySelector(".lp-json-pollock-layout-accordion-header"),a=e.querySelector(".lp-json-pollock-layout-accordion"),e=e.querySelector(".lp-json-pollock-layout-accordion-arrow");if(t)return i&&a?((t="true"===i.dataset.selected)?(i.removeAttribute("data-selected"),i.checked=!1):(i.setAttribute("data-selected","true"),i.checked=!0),void(t?a.removeAttribute("data-selected"):a.setAttribute("data-selected","true"))):void 0;n&&a&&((i="true"===a.dataset.open)?(a.setAttribute("data-open","false"),a.classList.add("lp-json-pollock-layout-accordion-folded")):(a.setAttribute("data-open","true"),a.classList.remove("lp-json-pollock-layout-accordion-folded")),i?(e.classList.add("close"),e.classList.remove("open")):(e.classList.add("open"),e.classList.remove("close")))}}var t;return c.accessibility&&c.accessibility.web&&m.appendAttributesFromObject(p,c.accessibility.web),c.style&&(t=m.styleToCss(c.style),t=m.extractFromStyles(t,"background-color"),e.style.cssText=t.style,e.setAttribute("style",t.extractedStyle)),p.afterRender=()=>{var t=p.children.length;if(t){for(let e=0;e{let t=document.createElement("div");return t.className="lp-json-pollock-layout lp-json-pollock-layout-horizontal","borderLess"===e.border?m.addClass(t,"lp-json-pollock-layout-borderLess"):"dropShadow"===e.border?m.addClass(t,"lp-json-pollock-layout-dropShadow"):void 0!==e.borderLine&&!1===e.borderLine&&"border"!==e.border&&m.addClass(t,"lp-json-pollock-layout-borderLess"),e.accessibility&&e.accessibility.web&&m.appendAttributesFromObject(t,e.accessibility.web),e.metadata&&t.setAttribute("data-metadata",JSON.stringify(e.metadata)),t.afterRender=()=>{if(t.childNodes.length){let i=e.percentages,n=100/t.childNodes.length;i&&0e+t,0))/(t.childNodes.length-i.length)),Array.prototype.forEach.call(t.childNodes,(e,t)=>{t=i&&i[t]||n;e.style.width=t+"%"})}},t})}}D.TYPES=t;class O extends Error{constructor(e,t){super(e),this.errors=[],this.errors=t}}class P{init(e){e&&(Object.prototype.hasOwnProperty.call(e,"maxAllowedElements")&&(!isNaN(e.maxAllowedElements)&&0this.maxAllowedElements)){let i=a,e=this.provider.get(t.type);e&&(o=e(t),o=this.onAfterElementRendered?this.onAfterElementRendered(o,t):o)&&(n.appendChild(o),Array.isArray(t.elements)&&t.elements.forEach(e=>{var t=this.provider.get(e.type);t&&(t(e).classList.contains("lp-json-pollock-layout")||(i+=1),this.renderElement(e,o,i))}),o.afterRender)&&o.afterRender.call(o,t,n)}}render(e){var e=m.isString(e)?JSON.parse(e):e,t=(this.validate(e),document.createDocumentFragment()),i=document.createElement("div");return i.className="lp-json-pollock",m.isLayout(e.type)||(i.className+=" lp-json-pollock-single-element"),t.appendChild(i),this.renderElement(e,i),t}validate(e){if(!m.isObject(e))throw new O("JsonPollock::validte - input is not an object");if(this.schemaValidator){e=this.schemaValidator.validate(e);if(!e.valid)throw new O("Schema validation error, see 'errors' for more details",e.errors)}}registerAction(e,t){this.events.on(e,e=>t(e))}unregisterAction(e){this.events.removeListener(e)}unregisterAllActions(){this.events.removeAllListeners()}registerElement(e,t){this.provider.set(e,t)}constructor(e){this.events=new(x())("json-pollock"),this.provider=new D(this.events),this.maxAllowedElements=50,this.schemaValidator=e}}P.TEMPLATE_TYPES=D.TYPES;let i=new P,_=i.init.bind(i),C=i.render.bind(i),T=i.registerAction.bind(i),b=i.unregisterAction.bind(i),E={init:_,render:C,registerAction:T,unregisterAction:b,unregisterAllActions:i.unregisterAllActions.bind(i),version:"2.4.0",TEMPLATE_TYPES:P.TEMPLATE_TYPES}}this.JsonPollock=S.default})()}.call(window.lpTag),window.lpTag=window.lpTag||{},function(){function n(e){var t;return(a[e]||(t=a[e]={i:e,l:!1,exports:{}},i[e].call(t.exports,t,t.exports,n),t.l=!0,t)).exports}var i,a;this.chips=(i=[function(e,t){e=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=e)},function(e,t,i){function f(e,t,i){var n,a,o,s=e&f.F,r=e&f.G,l=e&f.S,d=e&f.P,c=e&f.B,u=e&f.W,p=r?v:v[t]||(v[t]={}),h=p.prototype,g=r?m:l?m[t]:(m[t]||{}).prototype;for(n in i=r?t:i)(a=!s&&g&&void 0!==g[n])&&C(p,n)||(o=(a?g:i)[n],p[n]=r&&"function"!=typeof g[n]?i[n]:c&&a?w(o,m):u&&g[n]==o?(function(n){function e(e,t,i){if(this instanceof n){switch(arguments.length){case 0:return new n;case 1:return new n(e);case 2:return new n(e,t)}return new n(e,t,i)}return n.apply(this,arguments)}return e.prototype=n.prototype,e})(o):d&&"function"==typeof o?w(Function.call,o):o,d&&((p.virtual||(p.virtual={}))[n]=o,e&f.R)&&h&&!h[n]&&_(h,n,o))}var m=i(5),v=i(0),w=i(9),_=i(8),C=i(11);f.F=1,f.G=2,f.S=4,f.P=8,f.B=16,f.W=32,f.U=64,f.R=128,e.exports=f},function(e,t,i){var n=i(37)("wks"),a=i(24),o=i(5).Symbol,s="function"==typeof o;(e.exports=function(e){return n[e]||(n[e]=s&&o[e]||(s?o:a)("Symbol."+e))}).store=n},function(e,t,i){e.exports=!i(10)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,i){var n=i(7),a=i(53),o=i(39),s=Object.defineProperty;t.f=i(3)?Object.defineProperty:function(e,t,i){if(n(e),t=o(t,!0),n(i),a)try{return s(e,t,i)}catch(e){}if("get"in i||"set"in i)throw TypeError("Accessors not supported!");return"value"in i&&(e[t]=i.value),e}},function(e,t){e=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,i){var n=i(6);e.exports=function(e){if(n(e))return e;throw TypeError(e+" is not an object!")}},function(e,t,i){var n=i(4),a=i(17);e.exports=i(3)?function(e,t,i){return n.f(e,t,a(1,i))}:function(e,t,i){return e[t]=i,e}},function(e,t,i){var o=i(50);e.exports=function(n,a,e){if(o(n),void 0===a)return n;switch(e){case 1:return function(e){return n.call(a,e)};case 2:return function(e,t){return n.call(a,e,t)};case 3:return function(e,t,i){return n.call(a,e,t,i)}}return function(){return n.apply(a,arguments)}}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){var i={}.hasOwnProperty;e.exports=function(e,t){return i.call(e,t)}},function(e,t,i){var n=i(32),a=i(30);e.exports=function(e){return n(a(e))}},function(e,t){e.exports={}},function(e,t,i){var n=i(30);e.exports=function(e){return Object(n(e))}},function(e,t,i){var n=i(61),a=i(31);e.exports=Object.keys||function(e){return n(e,a)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,i){"use strict";var n=i(122)(!0);i(33)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e=this._t,t=this._i;return t>=e.length?{value:void 0,done:!0}:(e=n(e,t),this._i+=e.length,{value:e,done:!1})})},function(e,t,i){var u=i(9),p=i(56),h=i(54),g=i(7),f=i(23),m=i(42),v={},w={};(t=e.exports=function(e,t,i,n,a){var o,s,r,l,a=a?function(){return e}:m(e),d=u(i,n,t?2:1),c=0;if("function"!=typeof a)throw TypeError(e+" is not iterable!");if(h(a)){for(o=f(e.length);cdocument.F=Object<\/script>"),e.close(),l=e.F;t--;)delete l.prototype[s[t]];return l()};e.exports=Object.create||function(e,t){var i;return null!==e?(n.prototype=a(e),i=new n,n.prototype=null,i[r]=e):i=l(),void 0===t?i:o(i,t)}},function(e,t,i){var n=i(4).f,a=i(11),o=i(2)("toStringTag");e.exports=function(e,t,i){e&&!a(e=i?e:e.prototype,o)&&n(e,o,{configurable:!0,value:t})}},function(e,t,i){var n=i(38),a=Math.min;e.exports=function(e){return 0t.right||e.topt.bottom},u=function(e,t,i){var e=e.getBoundingClientRect(),t=t.getBoundingClientRect(),i=t.width*i,n=void 0,a=void 0;return e.leftt.right&&(n=e.right-t.right,a=Math.ceil),-1*a(n/i)}},function(e,t,i){e.exports={default:i(90),__esModule:!0}},function(e,t,i){e.exports={default:i(94),__esModule:!0}},function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=n(i(80)),o=n(i(77)),s=n(i(49));t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,s.default)(t)));e.prototype=(0,o.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.default?(0,a.default)(e,t):e.__proto__=t)}},function(e,t,i){"use strict";t.__esModule=!0;var i=i(49),n=i&&i.__esModule?i:{default:i};t.default=function(e,t){if(e)return!t||"object"!==(void 0===t?"undefined":(0,n.default)(t))&&"function"!=typeof t?e:t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}},function(e,t,i){"use strict";t.__esModule=!0;var i=i(72),n=i&&i.__esModule?i:{default:i};t.default=function(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);ta;)!s(n,i=t[a++])||~l(o,i)||o.push(i);return o}},function(e,t,i){var a=i(8);e.exports=function(e,t,i){for(var n in t)i&&e[n]?e[n]=t[n]:a(e,n,t[n]);return e}},function(e,t,i){e.exports=i(8)},function(e,t,i){var n=i(6);e.exports=function(e,t){if(n(e)&&e._t===t)return e;throw TypeError("Incompatible receiver, "+t+" required!")}},function(e,t){},function(e,t,i){"use strict";i=i(68);t.a=i.a},function(e,t){},function(e,t,i){"use strict";var n=i(48),l=i.n(n),n=i(45),u=i.n(n),n=i(26),p=i.n(n),n=i(27),n=i.n(n),a=i(47),h=i.n(a),a=i(46),a=i.n(a),o=i(69),s=i(70),r=i(43),a=(o=o.a,a()(g,o),n()(g,[{key:"render",value:function(){var e,t=0a&&(n=i.slice(0,a-1),e=(e=[]).concat.apply(e,l()(i.slice(a-1))),n.push(e),i=n),this.renderer=new this.RendererClass({events:this,rows:i,itemCharLimit:s,rowWrap:o,accessibility:r,direction:t}),this.detach(),this.attach(this.renderer.render())}},{key:"attach",value:function(e){this.el.appendChild(e)}},{key:"detach",value:function(){var e=this.el.querySelector(".chips-wrapper");e&&this.el.removeChild(e)}},{key:"dispose",value:function(){this.clear(),this.detach()}},{key:"readonly",value:function(){var e=!(0e;return l.i(p.d)("li",{attrs:{class:"chips-item-container"},style:{"margin-top":this.rowWrap?"10px":0}},[l.i(p.d)("button",{attrs:u()({class:"chips-item"},a.web),domProps:u()({},"string"==typeof t&&{textContent:r?""+t.substr(0,e):t},"string"==typeof n&&{title:n}),style:u()({},"string"==typeof o.color&&{color:o.color},"string"==typeof o["background-color"]&&{backgroundColor:o["background-color"]},"string"==typeof o["border-color"]&&{borderColor:o["border-color"]},"string"==typeof o["color-hover"]&&{colorHover:o["color-hover"]},"string"==typeof o["background-color-hover"]&&{backgroundColorHover:o["background-color-hover"]},"string"==typeof o["border-color-hover"]&&{borderColorHover:o["border-color-hover"]},c()(o["border-radius"])&&{borderRadius:o["border-radius"]+"px"},o.bold&&{fontWeight:"bold"},o.italic&&{fontStyle:"italic"},o["font-family"]&&{fontFamily:o["font-family"]},-1!==["small","medium","large"].indexOf(o.size)&&{fontSize:{small:"10px",medium:"12px",large:"15px"}[o.size]}),on:u()({},s&&{click:function(e){i.isReadOnly?e.preventDefault():s.actions.forEach(function(e){return i.events.dispatch("action:"+e.type,{action:e,metadata:s.metadata})})},focus:function(e){var e=e.target,t=i.refs.wrapper;t.scrollLeft=0,l.i(p.e)(e,t)&&(e=l.i(p.f)(e,t,i.stepRatio),i.renderOffset(e))}},{mouseenter:function(e){i.setHoverStyle(e.target,o,!0)},mouseleave:function(e){i.setHoverStyle(e.target,o,!1)}})})],[].concat(d()(r&&[l.i(p.d)("span",{domProps:{innerHTML:"…"}})])))}},{key:"setHoverStyle",value:function(e,t,i){i?(e.style.backgroundColor=t["background-color-hover"],e.style.color=t["color-hover"],e.style.borderColor=t["border-color-hover"]):(e.style.backgroundColor=t["background-color"]||"",e.style.color=t.color||"",e.style.borderColor=t["border-color"]||"")}}]),t.a={StructuredContentButton:h}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(67),n=(i.n(n),i(66));t.default=n.a},function(e,t,i){e.exports={default:i(85),__esModule:!0}},function(e,t,i){e.exports={default:i(86),__esModule:!0}},function(e,t,i){e.exports={default:i(87),__esModule:!0}},function(e,t,i){e.exports={default:i(88),__esModule:!0}},function(e,t,i){e.exports={default:i(89),__esModule:!0}},function(e,t,i){e.exports={default:i(91),__esModule:!0}},function(e,t,i){e.exports={default:i(92),__esModule:!0}},function(e,t,i){e.exports={default:i(93),__esModule:!0}},function(e,t,i){e.exports={default:i(95),__esModule:!0}},function(e,t,i){e.exports={default:i(96),__esModule:!0}},function(e,t,i){e.exports={default:i(97),__esModule:!0}},function(e,t,i){"use strict";t.__esModule=!0;i=i(44),i=i&&i.__esModule?i:{default:i};t.default=i.default||function(e){for(var t=1;ts;)o.call(e,n=a[s++])&&t.push(n);return t}},function(e,t,i){i=i(5).document;e.exports=i&&i.documentElement},function(e,t,i){var n=i(6),a=Math.floor;e.exports=function(e){return!n(e)&&isFinite(e)&&a(e)===e}},function(e,t,i){"use strict";var n=i(21),a=i(17),o=i(22),s={};i(8)(s,i(2)("iterator"),function(){return this}),e.exports=function(e,t,i){e.prototype=n(s,{next:a(1,i)}),o(e,t+" Iterator")}},function(e,t,i){var o=i(2)("iterator"),s=!1;try{var n=[7][o]();n.return=function(){s=!0},Array.from(n,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!s)return!1;var i=!1;try{var n=[7],a=n[o]();a.next=function(){return{done:i=!0}},n[o]=function(){return a},e(n)}catch(e){}return i}},function(e,t,i){"use strict";var p=i(3),h=i(15),g=i(35),f=i(16),m=i(14),v=i(32),a=Object.assign;e.exports=!a||i(10)(function(){var e={},t={},i=Symbol(),n="abcdefghijklmnopqrst";return e[i]=7,n.split("").forEach(function(e){t[e]=e}),7!=a({},e)[i]||Object.keys(a({},t)).join("")!=n})?function(e,t){for(var i=m(e),n=arguments.length,a=1,o=g.f,s=f.f;a=e.length?(this._t=void 0,a(1)):a(0,"keys"==t?i:"values"==t?e[i]:[i,e[i]])},"values"),o.Arguments=o.Array,n("keys"),n("values"),n("entries")},function(e,t,i){"use strict";var n=i(104),a=i(64);e.exports=i(106)("Map",function(e){return function(){return e(this,0a;)l(x,t=i[a++])||t==I||t==V||n.push(t);return n}function s(e){for(var t,i=e===M,n=J(i?A:v(e)),a=[],o=0;n.length>o;)!l(x,t=n[o++])||i&&!l(M,t)||a.push(x[t]);return a}var r=e(5),l=e(11),d=e(3),c=e(1),u=e(63),V=e(34).KEY,p=e(10),h=e(37),g=e(22),$=e(24),f=e(2),F=e(41),B=e(40),U=e(108),H=e(55),m=e(7),z=e(6),j=e(14),v=e(12),w=e(39),_=e(17),C=e(21),G=e(115),q=e(58),T=e(35),K=e(4),Y=e(15),X=q.f,b=K.f,J=G.f,E=r.Symbol,y=r.JSON,S=y&&y.stringify,I=f("_hidden"),Z=f("toPrimitive"),Q={}.propertyIsEnumerable,N=h("symbol-registry"),x=h("symbols"),A=h("op-symbols"),M=Object.prototype,h="function"==typeof E&&!!T.f,L=r.QObject,D=!L||!L.prototype||!L.prototype.findChild,O=d&&p(function(){return 7!=C(b({},"a",{get:function(){return b(this,"a",{value:7}).a}})).a})?function(e,t,i){var n=X(M,t);n&&delete M[t],b(e,t,i),n&&e!==M&&b(M,t,n)}:b,P=h&&"symbol"==typeof E.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof E},R=function(e,t,i){return e===M&&R(A,t,i),m(e),t=w(t,!0),m(i),(l(x,t)?(i.enumerable?(l(e,I)&&e[I][t]&&(e[I][t]=!1),i=C(i,{enumerable:_(0,!1)})):(l(e,I)||b(e,I,_(1,{})),e[I][t]=!0),O):b)(e,t,i)};h||(u((E=function(){if(this instanceof E)throw TypeError("Symbol is not a constructor!");var t=$(0te;)f(ee[te++]);for(var ie=Y(f.store),ne=0;ie.length>ne;)B(ie[ne++]);c(c.S+c.F*!h,"Symbol",{for:function(e){return l(N,e+="")?N[e]:N[e]=E(e)},keyFor:function(e){if(!P(e))throw TypeError(e+" is not a symbol!");for(var t in N)if(N[t]===e)return t},useSetter:function(){D=!0},useSimple:function(){D=!1}}),c(c.S+c.F*!h,"Object",{create:function(e,t){return void 0===t?C(e):i(C(e),t)},defineProperty:R,defineProperties:i,getOwnPropertyDescriptor:a,getOwnPropertyNames:o,getOwnPropertySymbols:s});L=p(function(){T.f(1)});c(c.S+c.F*L,"Object",{getOwnPropertySymbols:function(e){return T.f(j(e))}}),y&&c(c.S+c.F*(!h||p(function(){var e=E();return"[null]"!=S([e])||"{}"!=S({a:e})||"{}"!=S(Object(e))})),"JSON",{stringify:function(e){for(var t,i,n=[e],a=1;at[1]?1:e[1]=n.length)break;t=n[o++]}else{if((o=n.next()).done)break;t=o.value}var s=U(t);s&&(i+=s)}return i}function H(e){for(var t,i,n,a="",o=e.split(""),s=Array.isArray(o),r=0,o=s?o:o[Symbol.iterator]();;){if(s){if(r>=o.length)break;t=o[r++]}else{if((r=o.next()).done)break;t=r.value}a+=(n=a,("+"!==(i=t)?U(i):n?void 0:"+")||"")}return a}function p(e,t){return(function e(t,i,n){var a=n.type(i),o=a&&a.possibleLengths()||n.possibleLengths();if(!o)return"IS_POSSIBLE";if("FIXED_LINE_OR_MOBILE"===i){if(!n.type("FIXED_LINE"))return e(t,"MOBILE",n);n=n.type("MOBILE");n&&(o=(function(e,t){for(var i,n=e.slice(),a=t,o=Array.isArray(a),s=0,a=o?a:a[Symbol.iterator]();;){if(o){if(s>=a.length)break;i=a[s++]}else{if((s=a.next()).done)break;i=s.value}var r=i;e.indexOf(r)<0&&n.push(r)}return n.sort(function(e,t){return e-t})})(o,n.possibleLengths()))}else if(i&&!a)return"INVALID_LENGTH";n=t.length,i=o[0];return i===n?"IS_POSSIBLE":n=n.length)break;i=n[o++]}else{if((o=n.next()).done)break;i=o.value}var s=i;if(0=s.length)break;o=s[l++]}else{if((l=s.next()).done)break;o=l.value}var d=o;if(a.country(d),a.leadingDigits()){if(n&&0===n.search(a.leadingDigits()))return d}else if(c({phone:n,country:d},void 0,a.metadata))return d}return}}function _(e,t,i){t=(function(n){for(var e=1;e=r.length)break;o=r[d++]}else{if((d=r.next()).done)break;o=d.value}var c=(function(e){if(Array.isArray(e))return e})(c=o.split("="))||(function(e){var t=[],i=!0,n=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(i=(o=s.next()).done)&&(t.push(o.value),2!==t.length);i=!0);}catch(e){n=!0,a=e}finally{try{i||null==s.return||s.return()}finally{if(n)throw a}}return t})(c)||(function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")})(),u=c[0],p=c[1];switch(u){case"tel":n=p;break;case"ext":a=p;break;case"phone-context":"+"===p[0]&&(n=p+n)}}return B(n)?(s={number:n},a&&(s.ext=a),s):{}}return(s=(function(e,t,i){if(e){if(!(250>=1,e+=e;return i+e}function oe(e,t){")"===e[t]&&t++;for(var i=e.slice(0,t),n=[],a=0;ai.length?{overflow:!0}:(a=t.join(""),0===i.indexOf(a)?t.length===i.length?{match:!0,matchedChars:t}:{partialMatch:!0}:0===a.indexOf(i)?{match:!0,matchedChars:t.slice(0,i.length)}:void 0)}if(Array.isArray(i)){for(var o=t.slice(),s=0;s=c.length)break;d=c[p++]}else{if((p=c.next()).done)break;d=p.value}var h=e(t,d,n);if(h){if(h.overflow)return h;if(h.match)return{match:!0,matchedChars:h.matchedChars};h.partialMatch&&(l=!0)}}return l?{partialMatch:!0}:void 0;case"[]":var g,f=i.args,m=Array.isArray(f),v=0;for(f=m?f:f[Symbol.iterator]();;){if(m){if(v>=f.length)break;g=f[v++]}else{if((v=f.next()).done)break;g=v.value}var w=g;if(t[0]===w)return 1===t.length?{match:!0,matchedChars:t}:n?{overflow:!0}:{match:!0,matchedChars:[w]}}return;default:throw new Error("Unsupported instruction tree: ".concat(i))}})(e.split(""),this.matchTree,!0);if(e&&e.match&&delete e.matchedChars,!e||!e.overflow||t)return e}}]),Oe=E,Pe=new RegExp("(\\||\\(\\?\\:|\\)|\\[|\\])"),de(y,[{key:"parse",value:function(e){if(this.context=[{or:!0,instructions:[]}],this.parsePattern(e),1!==this.context.length)throw new Error("Non-finalized contexts left when pattern parse ended");var e=this.context[0],t=e.branches,e=e.instructions;if(t)return[{op:"|",args:t.concat([e])}];if(0===e.length)throw new Error("Pattern is required");return e}},{key:"startContext",value:function(e){this.context.push(e)}},{key:"endContext",value:function(){this.context.pop()}},{key:"getContext",value:function(){return this.context[this.context.length-1]}},{key:"parsePattern",value:function(e){if(!e)throw new Error("Empty pattern passed");var t=e.match(Pe);if(t){var i=t[1],n=e.slice(0,t.index),t=e.slice(t.index+i.length);switch(i){case"(?:":n&&this.parsePattern(n),this.startContext({or:!0,instructions:[],branches:[]});break;case")":if(!this.getContext().or)throw new Error('")" operator must be preceded by "(?:" operator');if(n&&this.parsePattern(n),0===this.getContext().instructions.length)throw new Error('No instructions found after "|" operator in an "or" group');var a=this.getContext().branches;a.push(this.getContext().instructions),this.endContext(),this.getContext().instructions.push({op:"|",args:a});break;case"|":if(!this.getContext().or)throw new Error('"|" operator can only be used inside "or" groups');if(n&&this.parsePattern(n),!this.getContext().branches){if(1!==this.context.length)throw new Error('"branches" not found in an "or" group context');this.getContext().branches=[]}this.getContext().branches.push(this.getContext().instructions),this.getContext().instructions=[];break;case"[":n&&this.parsePattern(n),this.startContext({oneOfSet:!0});break;case"]":if(!this.getContext().oneOfSet)throw new Error('"]" operator must be preceded by "[" operator');this.endContext(),this.getContext().instructions.push({op:"[]",args:(function(e){for(var t=[],i=0;i=s.length)break;o=s[l++]}else{if((l=s.next()).done)break;o=l.value}var d=o,c=(function(e,t,i){var n=i.metadata,a=i.shouldTryNationalPrefixFormattingRule,i=i.getSeparatorAfterNationalPrefix;if(new RegExp("^(?:".concat(t.pattern(),")$")).test(e.nationalSignificantNumber)){a=(n={metadata:n,shouldTryNationalPrefixFormattingRule:a,getSeparatorAfterNationalPrefix:i}).metadata,i=n.shouldTryNationalPrefixFormattingRule,n=n.getSeparatorAfterNationalPrefix;if(e.nationalSignificantNumber,e.international,e.nationalPrefix,e.carrierCode,i(t)){i=se(e,t,{useNationalPrefixFormattingRule:!0,getSeparatorAfterNationalPrefix:n,metadata:a});if(i)return i}return se(e,t,{useNationalPrefixFormattingRule:!1,getSeparatorAfterNationalPrefix:n,metadata:a})}})(t,d,{metadata:this.metadata,shouldTryNationalPrefixFormattingRule:function(e){return a.shouldTryNationalPrefixFormattingRule(e,{international:t.international,nationalPrefix:t.nationalPrefix})},getSeparatorAfterNationalPrefix:this.getSeparatorAfterNationalPrefix});if(c)return this.resetFormat(),this.chosenFormat=d,this.setNationalNumberTemplate(c.replace(/\d/g,"x"),t),this.populatedNationalNumberTemplate=c,this.populatedNationalNumberTemplatePosition=this.template.lastIndexOf("x"),c}return this.formatNationalNumberWithNextDigits(e,t)}},{key:"formatNationalNumberWithNextDigits",value:function(e,t){var i=this.chosenFormat,n=this.chooseFormat(t);if(n)return n===i?this.formatNextNationalNumberDigits(e):this.formatNextNationalNumberDigits(t.getNationalDigits())}},{key:"narrowDownMatchingFormats",value:function(e){var t=this,i=e.nationalSignificantNumber,n=e.nationalPrefix,a=e.international,o=i,s=o.length-3;s<0&&(s=0),this.matchingFormats=this.matchingFormats.filter(function(e){return t.formatSuits(e,a,n)&&t.formatMatches(e,o,s)}),this.chosenFormat&&-1===this.matchingFormats.indexOf(this.chosenFormat)&&this.resetFormat()}},{key:"formatSuits",value:function(e,t,i){return!(i&&!e.usesNationalPrefix()&&!e.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!t&&!i&&e.nationalPrefixIsMandatoryWhenFormattingInNationalFormat())}},{key:"formatMatches",value:function(e,t,i){var n=e.leadingDigitsPatterns().length;if(0===n)return!0;i=Math.min(i,n-1);n=e.leadingDigitsPatterns()[i];if(t.length<3)try{return void 0!==new Oe(n).match(t,{allowOverflow:!0})}catch(e){return console.error(e),!0}return new RegExp("^(".concat(n,")")).test(t)}},{key:"getFormatFormat",value:function(e,t){return t?e.internationalFormat():e.format()}},{key:"chooseFormat",value:function(e){var i,n=this,a=this.matchingFormats.slice(),o=Array.isArray(a),s=0;e:for(a=o?a:a[Symbol.iterator]();;)switch((function(){if(o){if(s>=a.length)return"break";i=a[s++]}else{if((s=a.next()).done)return"break";i=s.value}var t=i;return n.chosenFormat===t?"break":Ve.test(n.getFormatFormat(t,e.international))?n.createTemplateForFormat(t,e)?(n.chosenFormat=t,"break"):(n.matchingFormats=n.matchingFormats.filter(function(e){return e!==t}),"continue"):"continue"})()){case"break":break e;case"continue":continue}return this.chosenFormat||this.resetFormat(),this.chosenFormat}},{key:"createTemplateForFormat",value:function(e,t){return!(0<=e.pattern().indexOf("|"))&&(e=this.getTemplateForFormat(e,t))?(this.setNationalNumberTemplate(e,t),!0):void 0}},{key:"getInternationalPrefixBeforeCountryCallingCode",value:function(e,t){var i=e.IDDPrefix,e=e.missingPlus;return i?t&&!1===t.spacing?i:i+" ":e?"":"+"}},{key:"getTemplate",value:function(e){if(this.template){for(var t=-1,i=0,n=e.international?this.getInternationalPrefixBeforeCountryCallingCode(e,{spacing:!1}):"";is.length)){var r=new RegExp("^"+o+"$"),i=i.replace(/\d/g,"9");r.test(i)&&(s=i);var l,d=this.getFormatFormat(e,n);if(this.shouldTryNationalPrefixFormattingRule(e,{international:n,nationalPrefix:a})){r=d.replace(ye,e.nationalPrefixFormattingRule());if(u(e.nationalPrefixFormattingRule())===(a||"")+u("$1")&&(d=r,l=!0,a))for(var c=a.length;0=n.length)break;i=n[o++]}else{if((o=n.next()).done)break;i=o.value}var s=i;if(e.slice(t+1).search(P)<0)return;t=e.search(P),e=e.replace(P,s)}return[e,t]})(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition);if(e)return this.populatedNationalNumberTemplate=e[0],this.populatedNationalNumberTemplatePosition=e[1],oe(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition+1);this.resetFormat()}}],n=0;nthis.countryCodeMaxLen&&(this.countryCodeMaxLen=t.length),this.countryCodes.hasOwnProperty(t)||(this.countryCodes[t]=[]);for(var n=0;n"))+"
"))+"".concat(o.name,""))+"+".concat(o.dialCode,"")+"";this.countryList.insertAdjacentHTML("beforeend",n)}},{key:"_setInitialState",value:function(){var e=this.telInput.getAttribute("value"),t=this.telInput.value,t=!e||"+"!==e.charAt(0)||t&&"+"===t.charAt(0)?t:e,e=this._getDialCode(t),i=this._isRegionlessNanp(t),n=this.options,a=n.initialCountry,o=n.nationalMode,s=n.autoHideDialCode,n=n.separateDialCode;e&&!i?this._updateFlagFromNumber(t):"auto"!==a&&(a?this._setFlag(a.toLowerCase()):e&&i?this._setFlag("us"):(this.defaultCountry=(this.preferredCountries.length?this.preferredCountries:this.countries)[0].iso2,t||this._setFlag(this.defaultCountry)),t||o||s||n||(this.telInput.value="+".concat(this.selectedCountryData.dialCode))),t&&this._updateValFromNumber(t)}},{key:"_initListeners",value:function(){this._initKeyListeners(),this.options.autoHideDialCode&&this._initBlurListeners(),this.options.allowDropdown&&this._initDropdownListeners(),this.hiddenInput&&this._initHiddenInputListener()}},{key:"_initHiddenInputListener",value:function(){var e=this;this._handleHiddenInputSubmit=function(){e.hiddenInput.value=e.getNumber()},this.telInput.form&&this.telInput.form.addEventListener("submit",this._handleHiddenInputSubmit)}},{key:"_getClosestLabel",value:function(){for(var e=this.telInput;e&&"LABEL"!==e.tagName;)e=e.parentNode;return e}},{key:"_initDropdownListeners",value:function(){var t=this,e=(this._handleLabelClick=function(e){t.countryList.classList.contains("iti__hide")?t.telInput.focus():e.preventDefault()},this._getClosestLabel());e&&e.addEventListener("click",this._handleLabelClick),this._handleClickSelectedFlag=function(){!t.countryList.classList.contains("iti__hide")||t.telInput.disabled||t.telInput.readOnly||t._showDropdown()},this.selectedFlag.addEventListener("click",this._handleClickSelectedFlag),this._handleFlagsContainerKeydown=function(e){t.countryList.classList.contains("iti__hide")&&-1!==["ArrowUp","Up","ArrowDown","Down"," ","Enter"].indexOf(e.key)&&(e.preventDefault(),e.stopPropagation(),t._showDropdown()),"Tab"===e.key&&t._closeDropdown()},this.flagsContainer.addEventListener("keydown",this._handleFlagsContainerKeydown)}},{key:"_initRequests",value:function(){var e=this;this.options.utilsScript&&!window.lpIntlTelInputUtils?window.lpIntlTelInputGlobals.documentReady()?window.lpIntlTelInputGlobals.loadUtils(this.options.utilsScript):window.addEventListener("load",function(){window.lpIntlTelInputGlobals.loadUtils(e.options.utilsScript)}):this.resolveUtilsScriptPromise(),"auto"===this.options.initialCountry?this._loadAutoCountry():this.resolveAutoCountryPromise()}},{key:"_loadAutoCountry",value:function(){window.lpIntlTelInputGlobals.autoCountry?this.handleAutoCountry():window.lpIntlTelInputGlobals.startedLoadingAutoCountry||(window.lpIntlTelInputGlobals.startedLoadingAutoCountry=!0,"function"==typeof this.options.geoIpLookup&&this.options.geoIpLookup(function(e){window.lpIntlTelInputGlobals.autoCountry=e.toLowerCase(),setTimeout(function(){return u("handleAutoCountry")})},function(){return u("rejectAutoCountryPromise")}))}},{key:"_initKeyListeners",value:function(){var e=this;this._handleKeyupEvent=function(){e._updateFlagFromNumber(e.telInput.value)&&e._triggerCountryChange()},this.telInput.addEventListener("keyup",this._handleKeyupEvent),this._handleClipboardEvent=function(){setTimeout(e._handleKeyupEvent)},this.telInput.addEventListener("cut",this._handleClipboardEvent),this.telInput.addEventListener("paste",this._handleClipboardEvent)}},{key:"_cap",value:function(e){var t=this.telInput.getAttribute("maxlength");return t&&e.length>t?e.substr(0,t):e}},{key:"_initBlurListeners",value:function(){var e=this;this._handleSubmitOrBlurEvent=function(){e._removeEmptyDialCode()},this.telInput.form&&this.telInput.form.addEventListener("submit",this._handleSubmitOrBlurEvent),this.telInput.addEventListener("blur",this._handleSubmitOrBlurEvent)}},{key:"_removeEmptyDialCode",value:function(){var e;"+"!==this.telInput.value.charAt(0)||(e=this._getNumeric(this.telInput.value))&&this.selectedCountryData.dialCode!==e||(this.telInput.value="")}},{key:"_getNumeric",value:function(e){return e.replace(/\D/g,"")}},{key:"_trigger",value:function(e){var t=document.createEvent("Event");t.initEvent(e,!0,!0),this.telInput.dispatchEvent(t)}},{key:"_showDropdown",value:function(){this.countryList.classList.remove("iti__hide"),this.selectedFlag.setAttribute("aria-expanded","true"),this._setDropdownPosition(),this.activeItem&&(this._highlightListItem(this.activeItem,!1),this._scrollTo(this.activeItem,!0)),this._bindDropdownListeners(),this.dropdownArrow.classList.add("iti__arrow--up"),this._trigger("open:countrydropdown")}},{key:"_toggleClass",value:function(e,t,i){i&&!e.classList.contains(t)?e.classList.add(t):!i&&e.classList.contains(t)&&e.classList.remove(t)}},{key:"_setDropdownPosition",value:function(){var e,t,i,n,a,o=this;this.options.dropdownContainer&&this.options.dropdownContainer.appendChild(this.dropdown),this.isMobile||(e=this.telInput.getBoundingClientRect(),n=window.pageYOffset||document.documentElement.scrollTop,t=e.top+n,a=this.countryList.offsetHeight,i=t+this.telInput.offsetHeight+a|<[^ $€£A-Za-z0-9/!](.*?)>/gi,r=/<(\s*)?SCRIPT\b[^>]*(\s*)?>|<(\s*)?FRAMESET\b[^>]*(\s*)?>|<(\s*)?FRAME\b[^>]*(\s*)?>|<(\s*)?BODY\b[^>]*(\s*)?>/gi,l=/ONERROR(\s*)=(\s*)["']?((?:.(?!["']?\s+(?:\S+)=|[>"']))+.)["']?|ONLOAD(\s*)=(\s*)["']?((?:.(?!["']?\s+(?:\S+)=|[>"']))+.)["']?|ONTOGGLE(\s*)=(\s*)["']?((?:.(?!["']?\s+(?:\S+)=|[>"']))+.)["']?|ONRATECHANGE(\s*)=(\s*)["']?((?:.(?!["']?\s+(?:\S+)=|[>"']))+.)["']|ONLOADSTART(\s*)=(\s*)["']?((?:.(?!["']?\s+(?:\S+)=|[>"']))+.)["']?|ONLOADEND(\s*)=(\s*)["']?((?:.(?!["']?\s+(?:\S+)=|[>"']))+.)["']?/gi,w=/\[.]/gi,c=/(((ftp|http|https):\/\/)|www[.])(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-/]))?/gi,u=e.HREF_URI_REGEX=/ href="(((ftp|http|https):\/\/)|www[.])(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@\-/]))?"/g,p=function(e){var t=(e.match(u)||[]).pop()||"$1";return e.replace(u,` href="${encodeURIComponent(t)}"`)},h=(e.encodeHref=p,/(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/gi),_=/<((\s)?[a-z%]+)\s*[^/]*?/gi,C="SCRIPT/FRAMESET/FRAME/BODY",T="ONERROR_ONLOAD_ONTOGGLE_ONRATECHANGE_ONLOADEND",b={ELEMENT:"element",ATTRIBUTE:"attribute",ATTRIBUTE_VALUE:"attribute_value",STYLE_ATTRIBUTE:"style_attribute",MARKER:"marker",NOT_WELLFORMED:"not_wellformed_html"},E=(function(){function i(e,t){n(this,i);this.cleanText=e;this.errors=t}return t(i,[{key:"sanitized",get:function(){return this.errors.length>0}}])})();function y(e){var t=e;var i=[];var n=e;if(n!=="")n=M(n);var a=W(n);o(a);a=V(a.cleanText);o(a);a=$(a.cleanText);o(a);a=k(a.cleanText);o(a);a=L(a.cleanText);o(a);a=D(a.cleanText);o(a);function o(e){if(e.errors.length>0)Array.prototype.push.apply(i,e.errors)}return{sanitized:i.length>0,cleanText:i.length>0?a.cleanText:t,errors:i}}function S(e,t){var i=t&&t.uri_regex&&P(t.uri_regex)?t.uri_regex:c;var n=t&&t.email_regex&&P(t.email_regex)?t.email_regex:h;var a=N(e);for(var o=0;o");return a.innerHTML}function I(e,t){t=t||{};t=A(t);var i=y(e);var n=i.cleanText;var a=N(n);var o="";if(t==={})o=a.innerText;else{x(a,t);o=a.innerHTML}return o}function N(e){return Object.assign(document.createElement("div"),{innerHTML:p(e)})}function x(e,r){var t=Array.prototype.slice.call(e.childNodes);t.forEach(function(e){if(e.hasChildNodes())x(e,r);if(e.nodeType!==3){var t=e.tagName.toLowerCase();if(typeof r[t]==="undefined"){if(e.parentNode)e.outerHTML=e.innerHTML}else{var i=r[t];var n=[];for(var a=0;a$&")}return e||""}function F(e,t){if(e)e=e.replace(t,function(e){var t=e.match(/^www\./i);var i=t?`http://${e.replace(/www\./i,"")}`:e;return`${e}`});return e}})(t),e.lpTag=e.lpTag||{},e.lpTag.HtmlSanitizerUtils=t})("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:this),window.lpTag=window.lpTag||{},lpTag.unifiedWindow=lpTag.unifiedWindow||{},lpTag.unifiedWindow.ThemeConfiguratorFactory=function(e,t){t=t||{};var i=lpTag.unifiedWindow.ThemeConfigurationTranslator,n=lpTag.unifiedWindow.ThemeConfigurator,a=lpTag.unifiedWindow.applicationUtils;return t.clone=void 0===t.clone||t.clone,new n(e=(e=t.clone?a.clone(e||{}):e)&&"2.0"!==e.v?(new i).translate(e):e)},window.lpTag=window.lpTag||{},lpTag.unifiedWindow=lpTag.unifiedWindow||{},lpTag.unifiedWindow.ThemeConfiguration=lpTag.unifiedWindow.ThemeConfiguration||{},lpTag.unifiedWindow.ThemeConfiguration.styleInference={mainArea:{"background-color":[{target:"surveyArea"},{target:"dialogArea"},{target:"transcriptArea"}]},transcript_message:{"font-family":[{target:"surveyArea"},{target:"dialogArea"}],color:[{target:"cancel_button"},{target:"surveyArea"},{target:"dialogArea"}]},top:{"background-color":[{target:"button"},{target:"close_survey_button"},{target:"star",prop:"color"}]},top_text:{color:[{target:"button"},{target:"close_survey_button"}]},transcript_bubble_agent:{"border-color":[{target:"transcript_bubble_agentArrowBorder",prop:"border-right-color",override:!0}],"background-color":[{target:"transcript_bubble_agentArrow",prop:"border-right-color",override:!0}]},transcript_bubble_visitor:{"border-color":[{target:"transcript_bubble_visitorArrowBorder",prop:"border-left-color",override:!0}],"background-color":[{target:"transcript_bubble_visitorArrow",prop:"border-left-color",override:!0}]},input:{"border-radius":[{target:"mainArea"},{target:"maximizedWindow"},{target:"surveyArea"},{target:"dialogArea"},{target:"actionsMenu"},{target:"sliderMaximizedWindow"}]}},lpTag.unifiedWindow.ThemeConfiguration.options={ICON_SET:{name:"icon_set",query:'[data-lp-type="icon"]',values:{DARK:{name:"dark",cssClass:"lp_icon-dark"},BRIGHT:{name:"bright",cssClass:"lp_icon-white"}}},MINIMIZE_ICON:{name:"minimize_icon",query:'[data-lp-point="minimize_icon"]',values:{DEFAULT:{name:"default",cssClass:"lp_minimize-icon"},CHEVRON:{name:"chevron",cssClass:"lp_chevron-icon"}}},LOCATION:{name:"location",values:{TOP_LEFT:{name:"top_left",cssClass:"lp_top-left"},TOP_RIGHT:{name:"top_right",cssClass:"lp_top-right"},MIDDLE_RIGHT:{name:"middle_right",cssClass:"lp_middle-right"},BOTTOM_RIGHT:{name:"bottom_right",cssClass:"lp_bottom-right"},BOTTOM_LEFT:{name:"bottom_left",cssClass:"lp_bottom-left"},MIDDLE_LEFT:{name:"middle_left",cssClass:"lp_middle-left"}}},TOP_TEXT:{name:"top_text"},TRANSCRIPT_BUBBLE_VISITOR_TEXT:{name:"transcript_bubble_visitor_text"},TRANSCRIPT_BUBBLE_AGENT_TEXT:{name:"transcript_bubble_agent_text"},TRANSCRIPT_TIME:{name:"transcript_time"},TRANSCRIPT_MESSAGE:{name:"transcript_message"},INPUT_TEXT:{name:"input_text"},ACTIONSMENU_ACTIONITEM_TEXT:{name:"actionsMenu_actionItem_text"},TRANSCRIPT_BUBBLE_RICH_CONTENT:{name:"transcript_bubble_rich_content"},TRANSCRIPT_BUBBLE_VISITOR_PARENT:{name:"transcript_bubble_visitor_parent",query:'[data-lp-cust-id = "transcript_bubble_visitor"]',values:{DEFAULT:{name:"default",cssClass:"lp_chat_line"},HARMONY:{name:"harmony",cssClass:"lp_harmony_chat_line"},CURVY:{name:"curvy",cssClass:"lp_new_chat_line"}}},TRANSCRIPT_BUBBLE_VISITOR_ARROW_BORDER_PARENT:{name:"transcript_bubble_visitor_parent",query:'[data-lp-cust-id = "transcript_bubble_visitorArrowBorder"]',values:{DEFAULT:{name:"default",cssClass:"lp_chat_arrow_border"},HARMONY:{name:"harmony",cssClass:"lpHide"},CURVY:{name:"curvy",cssClass:"lpHide"}}},TRANSCRIPT_BUBBLE_VISITOR_ARROW_PARENT:{name:"transcript_bubble_visitor_parent",query:'[data-lp-cust-id = "transcript_bubble_visitorArrow"]',values:{DEFAULT:{name:"default",cssClass:"lp_chat_arrow"},HARMONY:{name:"harmony",cssClass:"lpHide"},CURVY:{name:"curvy",cssClass:"lpHide"}}},TRANSCRIPT_BUBBLE_AGENT_PARENT:{name:"transcript_bubble_agent_parent",query:'[data-lp-cust-id = "transcript_bubble_agent"]',values:{DEFAULT:{name:"default",cssClass:"lp_chat_line"},HARMONY:{name:"harmony",cssClass:"lp_harmony_chat_line"},CURVY:{name:"curvy",cssClass:"lp_new_chat_line"}}},TRANSCRIPT_BUBBLE_AGENT_ARROW_BORDER_PARENT:{name:"transcript_bubble_agent_parent",query:'[data-lp-cust-id = "transcript_bubble_agentArrowBorder"]',values:{DEFAULT:{name:"default",cssClass:"lp_chat_arrow_border"},HARMONY:{name:"harmony",cssClass:"lpHide"},CURVY:{name:"curvy",cssClass:"lpHide"}}},TRANSCRIPT_BUBBLE_AGENT_ARROW_PARENT:{name:"transcript_bubble_agent_parent",query:'[data-lp-cust-id = "transcript_bubble_agentArrow"]',values:{DEFAULT:{name:"default",cssClass:"lp_chat_arrow"},HARMONY:{name:"harmony",cssClass:"lpHide"},CURVY:{name:"curvy",cssClass:"lpHide"}}}},window.lpTag=window.lpTag||{},lpTag.unifiedWindow=lpTag.unifiedWindow||{},lpTag.unifiedWindow.ThemeConfigurationTranslator=function(){var r=lpTag.unifiedWindow.ThemeConfigurator,l=lpTag.unifiedWindow.ThemeConfiguration,a=lpTag.unifiedWindow.AWCUtils;function d(e,t,i,n){a.isStyleColorProperty(t)?n.setStyle(e,t,"{{colors."+i+"}}"):"image"===t?n.setProperty(e,"src",i):"font"===t?n.setStyle(e,t,"{{fonts."+i+"}}"):n.setStyle(e,t,i)}function c(e){if(e)return-1]+) style=".*?"/gi,"$1")).replace(/<[^>]+ style=".*?" \/>/gi,function(e){return e.replace(/ style=".*?"/gi,"")}));return e})(e)),u(e=o.createDomContainer(e),t),e.innerHTML},processDomEl:u,getStyle:function(e,t){return _.getStyle(e,t)}}},window.lpTag=window.lpTag||{},lpTag.unifiedWindow=lpTag.unifiedWindow||{},lpTag.unifiedWindow.defaultStyle={v:"2.0",config:{logo:{attrs:{style:{"text-align":"left","background-color":"{{colors.3}}"}}},transcript_time:{attrs:{style:{color:"{{colors.6}}","font-style":"normal","font-family":"{{fonts.1}}","font-weight":"normal"}}},transcript_bubble_visitor:{attrs:{style:{"background-color":"{{colors.3}}","border-color":"{{colors.4}}"}}},actionsMenu_actionItem_text:{attrs:{style:{color:"{{colors.7}}","font-style":"normal","font-family":"{{fonts.1}}","font-weight":"normal"}}},input_text:{attrs:{style:{color:"{{colors.2}}","font-style":"normal","font-family":"{{fonts.1}}","font-weight":"normal"}}},transcript_bubble_agent_text:{attrs:{style:{color:"{{colors.3}}","font-style":"normal","font-family":"{{fonts.1}}","font-weight":"normal"}}},agent:{attrs:{style:{"background-color":"{{colors.3}}"}}},transcript_message:{attrs:{style:{color:"{{colors.6}}","font-style":"normal","font-family":"{{fonts.1}}","font-weight":"normal"}}},transcript_bubble_visitor_text:{attrs:{style:{color:"{{colors.5}}","font-style":"normal","font-family":"{{fonts.1}}","font-weight":"normal"}}},transcript_bubble_visitorArrowBorder:{attrs:{style:{"border-left-color":"{{colors.4}}"}}},transcript_bubble_agent:{attrs:{style:{"background-color":"{{colors.1}}","border-color":"{{colors.4}}"}}},mainArea:{attrs:{style:{"background-color":"{{colors.3}}"}}},transcript_bubble_agentArrowBorder:{attrs:{style:{"border-right-color":"{{colors.4}}"}}},input:{attrs:{style:{color:"{{colors.6}}","font-style":"normal","background-color":"{{colors.3}}","font-family":"{{fonts.1}}","font-weight":"normal"}},options:{icon_set:"dark"}},transcript_bubble_visitorArrow:{attrs:{style:{"border-left-color":"{{colors.3}}"}}},actionsMenu:{attrs:{style:{"background-color":"{{colors.3}}"}}},action:{options:{icon_set:"dark"}},top_text:{attrs:{style:{color:"{{colors.3}}","font-style":"normal","font-family":"{{fonts.1}}","font-weight":"normal"}}},transcript_bubble_agentArrow:{attrs:{style:{"border-right-color":"{{colors.1}}"}}},top:{attrs:{style:{"background-color":"{{colors.1}}"}},options:{icon_set:"bright"}}},meta:{colors:{3:"#FFFFFF",2:"#000000",1:"#0363ad",7:"#6d6e71",6:"#6D6E70",5:"#404041",4:"#b6b6b6",8:"#134cd1"},fonts:{1:"Arial,Helvetica,sans-serif"}}},window.lpTag=window.lpTag||{},lpTag.unifiedWindow=lpTag.unifiedWindow||{},lpTag.unifiedWindow.AWCUtils=(function(){var i=lpTag.unifiedWindow.applicationUtils;function s(e,t,i,n,a,o){var s,r,l,d;return t=c(t,["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"]),i=c(i,["Sun","Mon","Tues","Wed","Thurs","Fri","Sat"]),e?(s=(e="Date"!==e.constructor?(function(e){var t=new Date(e);isNaN(t)&&(t=new Date,(e=e.match(/(\d+)-(\d+)-(\d+)T(\d+):(\d+):(\d+)([.])(\d+)([+-])(\d+):(\d+)/))&&12==e.length&&(t.setUTCFullYear(parseInt(e[1],10)),t.setUTCMonth(parseInt(e[2],10)-1),t.setUTCDate(parseInt(e[3],10)),t.setUTCHours(parseInt(e[4],10)-parseInt(e[9]+"1",10)*parseInt(e[10],10)),t.setUTCMinutes(parseInt(e[5],10)-parseInt(e[9]+"1",10)*parseInt(e[11],10)),t.setUTCSeconds(parseInt(e[6],10))),e=null);return t})(e):e).getMonth(),r=e.getDate(),l=e.getDay(),e=e.getFullYear(),o&&null!==o&&"object"==typeof o?(d="",o.weekDay&&(d+=i[l]+", "),d+=t[s]+("string"==typeof n?n:" ")+r+("string"==typeof a?a:""),o.year&&(d+=" "+e),o.harmony?i[l]+", "+r+" "+t[s]+" "+e:d):t[s]+("string"==typeof n?n:" ")+r+("string"==typeof a?a:"")):""}function c(e,t){if(e){for(var i=0,n=t.length;i