@kindly/react-chat 2.76.4 → 2.76.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +776 -781
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,47 +1,5 @@
|
|
|
1
1
|
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("prop-types"),require("pusher-js"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","prop-types","pusher-js","react-dom"],t):"object"==typeof exports?exports.kindlyChat=t(require("react"),require("prop-types"),require("pusher-js"),require("react-dom")):e.kindlyChat=t(e.react,e["prop-types"],e["pusher-js"],e["react-dom"])}(self,(e,t,n,r)=>(()=>{var o={
|
|
3
|
-
&:focus-within {
|
|
4
|
-
outline: 1px solid
|
|
5
|
-
${e=>{let{theme:t}=e;return(0,o.w5)(t.panelBackground,"rgba(255, 255, 255, 0.8)","rgba(0, 0, 0, 0.8)")}};
|
|
6
|
-
}
|
|
7
|
-
`,i=r.Ay.div`
|
|
8
|
-
padding: 12px;
|
|
9
|
-
box-shadow:
|
|
10
|
-
0px 0px 1px rgba(0, 0, 0, 0.24),
|
|
11
|
-
0px 2px 6px rgba(0, 0, 0, 0.04);
|
|
12
|
-
border-radius: 6px;
|
|
13
|
-
margin: 3px 0 2px;
|
|
14
|
-
background: ${e=>{let{theme:t}=e;return t.panelBackground}};
|
|
15
|
-
background-color: ${e=>{let{theme:t}=e;return t.panelBackground}};
|
|
16
|
-
`,l=r.Ay.form`
|
|
17
|
-
display: flex;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
flex: 1;
|
|
20
|
-
${e=>{let{isSubmitted:t}=e;return t?"*:invalid {\n border: 1px solid var(--panel-background-white-black-contrast-1743170834);\n }":"*:invalid {\n border: 1px solid transparent;\n }"}}
|
|
21
|
-
`,s=r.Ay.div`
|
|
22
|
-
font-size: var(--_kindlychat-font-size-p);
|
|
23
|
-
font-weight: 500;
|
|
24
|
-
display: flex;
|
|
25
|
-
align-items: center;
|
|
26
|
-
color: var(--panel-background-white-black-contrast-1743170834);
|
|
27
|
-
& > svg {
|
|
28
|
-
margin-right: 4px;
|
|
29
|
-
& > path {
|
|
30
|
-
stroke: var(--panel-background-white-black-contrast-1743170834);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
`,c=r.Ay.div`
|
|
34
|
-
display: flex;
|
|
35
|
-
flex-direction: row;
|
|
36
|
-
align-self: flex-end;
|
|
37
|
-
justify-content: flex-end;
|
|
38
|
-
margin-top: 16px;
|
|
39
|
-
& > button {
|
|
40
|
-
&:last-child {
|
|
41
|
-
margin-left: 12px;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
`},167:(e,t,n)=>{"use strict";n.d(t,{$A:()=>s,B3:()=>u,CE:()=>d,HD:()=>p,I$:()=>m,Zw:()=>f,dl:()=>g});var r=n(3864),o=n(5047),a=n(4927),i=n(8905),l=n(6538);const s=56,c=r.Ay.div`
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("prop-types"),require("pusher-js"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","prop-types","pusher-js","react-dom"],t):"object"==typeof exports?exports.kindlyChat=t(require("react"),require("prop-types"),require("pusher-js"),require("react-dom")):e.kindlyChat=t(e.react,e["prop-types"],e["pusher-js"],e["react-dom"])}(self,(e,t,n,r)=>(()=>{var o={167:(e,t,n)=>{"use strict";n.d(t,{$A:()=>s,B3:()=>u,CE:()=>d,HD:()=>p,I$:()=>m,Zw:()=>f,dl:()=>g});var r=n(3864),o=n(5047),a=n(4927),i=n(8905),l=n(6538);const s=56,c=r.Ay.div`
|
|
45
3
|
display: flex;
|
|
46
4
|
align-items: center;
|
|
47
5
|
`,u=(0,r.Ay)(c)`
|
|
@@ -124,62 +82,192 @@
|
|
|
124
82
|
font: inherit;
|
|
125
83
|
color: inherit;
|
|
126
84
|
cursor: pointer;
|
|
127
|
-
`},493:(e,t,n)=>{"use strict";var r=n(4713),o=n(262),a=n(6281),i=n(4674),l=n(9258),s=n(8655),c=TypeError,u=s("toPrimitive");e.exports=function(e,t){if(!o(e)||a(e))return e;var n,s=i(e,u);if(s){if(void 0===t&&(t="default"),n=r(s,e,t),!o(n)||a(n))return n;throw new c("Can't convert object to primitive value")}return void 0===t&&(t="number"),l(e,t)}},534:(e,t,n)=>{"use strict";n.d(t,{n:()=>o,m:()=>r});const r={default:"'IBMPlex', 'Helvetica Neue', Helvetica, Arial, sans-serif",KindlySans:"KindlySans"},o="\n@font-face {\n font-family: 'KindlySans';\n src: url(http://localhost:8081/src/assets/fonts/KindlySans-Regular.65d6f01a87841a240c37cd04c52f3c2f.otf) format('OpenType');\n}\n\n@font-face {\n font-family: 'IBMPlex';\n font-weight: 400;\n src: url(http://localhost:8081/src/assets/fonts/IBMPlexSans-Regular.2c412e2f77ae69aa2154613095be7130.ttf) format('truetype');\n}\n\n@font-face {\n font-family: 'IBMPlex';\n font-weight: 500;\n src: url(http://localhost:8081/src/assets/fonts/IBMPlexSans-Medium.c4877bdfa15aef22d9255288b16899c5.ttf) format('truetype');\n}\n"},541:(e,t,n)=>{"use strict";n.d(t,{Kq:()=>ee,Ng:()=>Q,Pj:()=>oe,d4:()=>ce,vA:()=>ue,wA:()=>ie});var r=n(9155),o=n(5919),a=r.version.startsWith("19"),i=Symbol.for(a?"react.transitional.element":"react.element"),l=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),p=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),v=f,y=g;function x(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:a,areStatePropsEqual:i}){let l,s,c,u,d,p=!1;return function(f,h){return p?function(p,f){const h=!a(f,s),m=!o(p,l,f,s);return l=p,s=f,h&&m?(c=e(l,s),t.dependsOnOwnProps&&(u=t(r,s)),d=n(c,u,s),d):h?(e.dependsOnOwnProps&&(c=e(l,s)),t.dependsOnOwnProps&&(u=t(r,s)),d=n(c,u,s),d):m?function(){const t=e(l,s),r=!i(t,c);return c=t,r&&(d=n(c,u,s)),d}():d}(f,h):(l=f,s=h,c=e(l,s),u=t(r,s),d=n(c,u,s),p=!0,d)}}function w(e){return function(t){const n=e(t);function r(){return n}return r.dependsOnOwnProps=!1,r}}function E(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function k(e,t){return function(t,{displayName:n}){const r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e,void 0)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=E(e);let o=r(t,n);return"function"==typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=E(o),o=r(t,n)),o},r}}function _(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function A(e,t,n){return{...n,...e,...t}}function T(e){e()}var S={notify(){},get:()=>[]};function C(e,t){let n,r=S,o=0,a=!1;function i(){c.onStateChange&&c.onStateChange()}function l(){o++,n||(n=t?t.addNestedSub(i):e.subscribe(i),r=function(){let e=null,t=null;return{clear(){e=null,t=null},notify(){T(()=>{let t=e;for(;t;)t.callback(),t=t.next})},get(){const t=[];let n=e;for(;n;)t.push(n),n=n.next;return t},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){r&&null!==e&&(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}())}function s(){o--,n&&0===o&&(n(),n=void 0,r.clear(),r=S)}const c={addNestedSub:function(e){l();const t=r.subscribe(e);let n=!1;return()=>{n||(n=!0,t(),s())}},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:i,isSubscribed:function(){return a},trySubscribe:function(){a||(a=!0,l())},tryUnsubscribe:function(){a&&(a=!1,s())},getListeners:()=>r};return c}var $=(()=>!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement))(),O=(()=>"undefined"!=typeof navigator&&"ReactNative"===navigator.product)(),I=(()=>$||O?r.useLayoutEffect:r.useEffect)();function L(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function M(e,t){if(L(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!L(e[n[r]],t[n[r]]))return!1;return!0}var N={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},R={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},P={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},D={[v]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[y]:P};function j(e){return function(e){if("object"==typeof e&&null!==e){const{$$typeof:t}=e;switch(t){case i:switch(e=e.type){case s:case u:case c:case h:case m:return e;default:switch(e=e&&e.$$typeof){case p:case f:case b:case g:case d:return e;default:return t}}case l:return t}}}(e)===g?P:D[e.$$typeof]||N}var F=Object.defineProperty,z=Object.getOwnPropertyNames,B=Object.getOwnPropertySymbols,H=Object.getOwnPropertyDescriptor,U=Object.getPrototypeOf,V=Object.prototype;function G(e,t){if("string"!=typeof t){if(V){const n=U(t);n&&n!==V&&G(e,n)}let n=z(t);B&&(n=n.concat(B(t)));const r=j(e),o=j(t);for(let a=0;a<n.length;++a){const i=n[a];if(!(R[i]||o&&o[i]||r&&r[i])){const n=H(t,i);try{F(e,i,n)}catch(e){}}}}return e}var W=Symbol.for("react-redux-context"),q="undefined"!=typeof globalThis?globalThis:{};function K(){if(!r.createContext)return{};const e=q[W]??=new Map;let t=e.get(r.createContext);return t||(t=r.createContext(null),e.set(r.createContext,t)),t}var Y=K(),X=[null,null];function Z(e,t,n,r,o,a){e.current=r,n.current=!1,o.current&&(o.current=null,a())}function J(e,t){return e===t}var Q=function(e,t,n,{pure:o,areStatesEqual:a=J,areOwnPropsEqual:i=M,areStatePropsEqual:l=M,areMergedPropsEqual:s=M,forwardRef:c=!1,context:u=Y}={}){const d=u,p=function(e){return e?"function"==typeof e?k(e):_(e,"mapStateToProps"):w(()=>({}))}(e),f=function(e){return e&&"object"==typeof e?w(t=>function(e,t){const n={};for(const r in e){const o=e[r];"function"==typeof o&&(n[r]=(...e)=>t(o(...e)))}return n}(e,t)):e?"function"==typeof e?k(e):_(e,"mapDispatchToProps"):w(e=>({dispatch:e}))}(t),h=function(e){return e?"function"==typeof e?function(e){return function(t,{displayName:n,areMergedPropsEqual:r}){let o,a=!1;return function(t,n,i){const l=e(t,n,i);return a?r(l,o)||(o=l):(a=!0,o=l),o}}}(e):_(e,"mergeProps"):()=>A}(n),m=Boolean(e);return e=>{const t=e.displayName||e.name||"Component",n=`Connect(${t})`,o={shouldHandleStateChanges:m,displayName:n,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:p,initMapDispatchToProps:f,initMergeProps:h,areStatesEqual:a,areStatePropsEqual:l,areOwnPropsEqual:i,areMergedPropsEqual:s};function u(t){const[n,a,i]=r.useMemo(()=>{const{reactReduxForwardedRef:e,...n}=t;return[t.context,e,n]},[t]),l=r.useMemo(()=>d,[n,d]),s=r.useContext(l),c=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch),u=Boolean(s)&&Boolean(s.store),p=c?t.store:s.store,f=u?s.getServerState:p.getState,h=r.useMemo(()=>function(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...o}){return x(t(e,o),n(e,o),r(e,o),e,o)}(p.dispatch,o),[p]),[g,b]=r.useMemo(()=>{if(!m)return X;const e=C(p,c?void 0:s.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[p,c,s]),v=r.useMemo(()=>c?s:{...s,subscription:g},[c,s,g]),y=r.useRef(void 0),w=r.useRef(i),E=r.useRef(void 0),k=r.useRef(!1),_=r.useRef(!1),A=r.useRef(void 0);I(()=>(_.current=!0,()=>{_.current=!1}),[]);const T=r.useMemo(()=>()=>E.current&&i===w.current?E.current:h(p.getState(),i),[p,i]),S=r.useMemo(()=>e=>g?function(e,t,n,r,o,a,i,l,s,c,u){if(!e)return()=>{};let d=!1,p=null;const f=()=>{if(d||!l.current)return;const e=t.getState();let n,f;try{n=r(e,o.current)}catch(e){f=e,p=e}f||(p=null),n===a.current?i.current||c():(a.current=n,s.current=n,i.current=!0,u())};return n.onStateChange=f,n.trySubscribe(),f(),()=>{if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}(m,p,g,h,w,y,k,_,E,b,e):()=>{},[g]);var $,O;let L;$=Z,O=[w,y,k,i,E,b],I(()=>$(...O),undefined);try{L=r.useSyncExternalStore(S,T,f?()=>h(f(),i):T)}catch(e){throw A.current&&(e.message+=`\nThe error may be correlated with this previous error:\n${A.current.stack}\n\n`),e}I(()=>{A.current=void 0,E.current=void 0,y.current=L});const M=r.useMemo(()=>r.createElement(e,{...L,ref:a}),[a,e,L]);return r.useMemo(()=>m?r.createElement(l.Provider,{value:v},M):M,[l,M,v])}const g=r.memo(u);if(g.WrappedComponent=e,g.displayName=u.displayName=n,c){const t=r.forwardRef(function(e,t){return r.createElement(g,{...e,reactReduxForwardedRef:t})});return t.displayName=n,t.WrappedComponent=e,G(t,e)}return G(g,e)}},ee=function(e){const{children:t,context:n,serverState:o,store:a}=e,i=r.useMemo(()=>{const e=C(a);return{store:a,subscription:e,getServerState:o?()=>o:void 0}},[a,o]),l=r.useMemo(()=>a.getState(),[a]);I(()=>{const{subscription:e}=i;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),l!==a.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[i,l]);const s=n||Y;return r.createElement(s.Provider,{value:i},t)};function te(e=Y){return function(){return r.useContext(e)}}var ne=te();function re(e=Y){const t=e===Y?ne:te(e),n=()=>{const{store:e}=t();return e};return Object.assign(n,{withTypes:()=>n}),n}var oe=re();function ae(e=Y){const t=e===Y?oe:re(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var ie=ae(),le=(e,t)=>e===t;function se(e=Y){const t=e===Y?ne:te(e),n=(e,n={})=>{const{equalityFn:a=le}="function"==typeof n?{equalityFn:n}:n,i=t(),{store:l,subscription:s,getServerState:c}=i,u=(r.useRef(!0),r.useCallback({[e.name]:t=>e(t)}[e.name],[e])),d=(0,o.useSyncExternalStoreWithSelector)(s.addNestedSub,l.getState,c||l.getState,u,a);return r.useDebugValue(d),d};return Object.assign(n,{withTypes:()=>n}),n}var ce=se(),ue=T},587:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(824),o=n(7094);let a;const i=e=>{let{trigger:t,control:n,name:i,setError:l,clearErrors:s}=e;const{errors:c,isSubmitted:u}=n?(0,r.lN)({name:i,control:n}):{errors:{},isSubmitted:!1};return e=>{var r;if(!n)return;const d={...c},p=e.target;if(null!=p&&p.validationMessage&&(null===(r=c[i])||void 0===r?void 0:r.message)!==(null==p?void 0:p.validationMessage)&&l?l(`browser_error_${i}`,{type:o.k1.BROWSER,message:p.validationMessage},{shouldFocus:!0}):s&&s(`browser_error_${i}`),u&&t){const e=d[`browser_error_${i}`];"email"===p.type&&!e&&p.value.endsWith(".")?a=setTimeout(()=>{t(i)},1e3):(a&&clearTimeout(a),t(i))}}}},649:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(9749),o=n.n(r);const a="kindly-chat-utm",i=Object.freeze(["CONTENT","SOURCE","MEDIUM","CAMPAIGN","TERM"]);function l(){const e=new URLSearchParams(window.location.search);let t=Array.from(e.entries()).reduce((e,t)=>{let[n,r]=t;return"UTM_"===n.toUpperCase().substring(0,4)&&o()(i).call(i,n.toUpperCase().substring(4))?{...e,[n]:r}:e},{});if(0===Object.keys(t).length){const e=window.sessionStorage.getItem(a);t=e?JSON.parse(e):null}else window.sessionStorage.setItem(a,JSON.stringify(t));return t}},701:(e,t,n)=>{"use strict";var r=n(6100),o=n(2137),a=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return a(o(e),t)}},748:(e,t,n)=>{"use strict";n.d(t,{A:()=>u}),n(1949);var r=n(9155),o=n.n(r),a=n(6289),i=n(3399),l=n(587),s=n(7094),c=n(9576);const u=function(e){let{name:t,label:n,control:r,validators:u,register:d,id:p,value:f,isLast:h,inputType:m,...g}=e,b={};u&&(b=(0,c.G8)(u));const v=(0,l.A)({name:t,control:r}),{ref:y,onChange:x,...w}=d?d(t,b):{};return o().createElement(o().Fragment,null,o().createElement(a.hl,{htmlFor:p},o().createElement(a.eo,Object.assign({ref:y,name:t,type:m,id:p,value:f},(0,c.NR)(b),w&&{...w},{onChange:e=>{null==x||x(e),v(e)}},g)),o().createElement(a.r6,{inputType:m,isForm:!!d},o().createElement(a.FC,{inputType:m,viewBox:"0 0 24 24"},m===s.cJ.CHECKBOX?o().createElement("polyline",{points:"20 6 9 17 4 12"}):o().createElement("circle",{cx:"12",cy:"13",r:"5"}))),n&&o().createElement(a.Ko,{isForm:!!d},n)),h&&o().createElement(i.A,{name:t,control:r}))}},814:(e,t,n)=>{"use strict";var r=n(2769),o=n(459),a=TypeError;e.exports=function(e){if(r(e))return e;throw new a(o(e)+" is not a function")}},824:(e,t,n)=>{"use strict";n.d(t,{FH:()=>L,lN:()=>$,mN:()=>Te,xI:()=>M});var r=n(9155),o=e=>"checkbox"===e.type,a=e=>e instanceof Date,i=e=>null==e;const l=e=>"object"==typeof e;var s=e=>!i(e)&&!Array.isArray(e)&&l(e)&&!a(e),c=e=>s(e)&&e.target?o(e.target)?e.target.checked:e.target.value:e,u=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),d=e=>{const t=e.constructor&&e.constructor.prototype;return s(t)&&t.hasOwnProperty("isPrototypeOf")},p="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function f(e){let t;const n=Array.isArray(e),r="undefined"!=typeof FileList&&e instanceof FileList;if(e instanceof Date)t=new Date(e);else{if(p&&(e instanceof Blob||r)||!n&&!s(e))return e;if(t=n?[]:{},n||d(e))for(const n in e)e.hasOwnProperty(n)&&(t[n]=f(e[n]));else t=e}return t}var h=e=>/^\w*$/.test(e),m=e=>void 0===e,g=e=>Array.isArray(e)?e.filter(Boolean):[],b=e=>g(e.replace(/["|']|\]/g,"").split(/\.|\[/)),v=(e,t,n)=>{if(!t||!s(e))return n;const r=(h(t)?[t]:b(t)).reduce((e,t)=>i(e)?e:e[t],e);return m(r)||r===e?m(e[t])?n:e[t]:r},y=e=>"boolean"==typeof e,x=(e,t,n)=>{let r=-1;const o=h(t)?[t]:b(t),a=o.length,i=a-1;for(;++r<a;){const t=o[r];let a=n;if(r!==i){const n=e[t];a=s(n)||Array.isArray(n)?n:isNaN(+o[r+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=a,e=e[t]}};const w={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},E={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},k="pattern",_="required",A=r.createContext(null);A.displayName="HookFormContext";const T=()=>r.useContext(A);var S=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(o,a,{get:()=>{const o=a;return t._proxyFormState[o]!==E.all&&(t._proxyFormState[o]=!r||E.all),n&&(n[o]=!0),e[o]}});return o};const C="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;function $(e){const t=T(),{control:n=t.control,disabled:o,name:a,exact:i}=e||{},[l,s]=r.useState(n._formState),c=r.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return C(()=>n._subscribe({name:a,formState:c.current,exact:i,callback:e=>{!o&&s({...n._formState,...e})}}),[a,o,i]),r.useEffect(()=>{c.current.isValid&&n._setValid(!0)},[n]),r.useMemo(()=>S(l,n,c.current,!1),[l,n])}var O=e=>"string"==typeof e,I=(e,t,n,r,o)=>O(e)?(r&&t.watch.add(e),v(n,e,o)):Array.isArray(e)?e.map(e=>(r&&t.watch.add(e),v(n,e))):(r&&(t.watchAll=!0),n);function L(e){const t=T(),{control:n=t.control,name:o,defaultValue:a,disabled:i,exact:l}=e||{},s=r.useRef(a),[c,u]=r.useState(n._getWatch(o,s.current));return C(()=>n._subscribe({name:o,formState:{values:!0},exact:l,callback:e=>!i&&u(I(o,n._names,e.values||n._formValues,!1,s.current))}),[o,n,i,l]),r.useEffect(()=>n._removeUnmounted()),c}const M=e=>e.render(function(e){const t=T(),{name:n,disabled:o,control:a=t.control,shouldUnregister:i}=e,l=u(a._names.array,n),s=L({control:a,name:n,defaultValue:v(a._formValues,n,v(a._defaultValues,n,e.defaultValue)),exact:!0}),d=$({control:a,name:n,exact:!0}),p=r.useRef(e),h=r.useRef(a.register(n,{...e.rules,value:s,...y(e.disabled)?{disabled:e.disabled}:{}})),g=r.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!v(d.errors,n)},isDirty:{enumerable:!0,get:()=>!!v(d.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!v(d.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!v(d.validatingFields,n)},error:{enumerable:!0,get:()=>v(d.errors,n)}}),[d,n]),b=r.useCallback(e=>h.current.onChange({target:{value:c(e),name:n},type:w.CHANGE}),[n]),E=r.useCallback(()=>h.current.onBlur({target:{value:v(a._formValues,n),name:n},type:w.BLUR}),[n,a._formValues]),k=r.useCallback(e=>{const t=v(a._fields,n);t&&e&&(t._f.ref={focus:()=>e.focus&&e.focus(),select:()=>e.select&&e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})},[a._fields,n]),_=r.useMemo(()=>({name:n,value:s,...y(o)||d.disabled?{disabled:d.disabled||o}:{},onChange:b,onBlur:E,ref:k}),[n,o,d.disabled,b,E,k,s]);return r.useEffect(()=>{const e=a._options.shouldUnregister||i;a.register(n,{...p.current.rules,...y(p.current.disabled)?{disabled:p.current.disabled}:{}});const t=(e,t)=>{const n=v(a._fields,e);n&&n._f&&(n._f.mount=t)};if(t(n,!0),e){const e=f(v(a._options.defaultValues,n));x(a._defaultValues,n,e),m(v(a._formValues,n))&&x(a._formValues,n,e)}return!l&&a.register(n),()=>{(l?e&&!a._state.action:e)?a.unregister(n):t(n,!1)}},[n,a,l,i]),r.useEffect(()=>{a._setDisabledField({disabled:o,name:n})},[o,n,a]),r.useMemo(()=>({field:_,formState:d,fieldState:g}),[_,d,g])}(e));var N=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},R=e=>Array.isArray(e)?e:[e],P=()=>{let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}},D=e=>i(e)||!l(e);function j(e,t,n=new WeakSet){if(D(e)||D(t))return e===t;if(a(e)&&a(t))return e.getTime()===t.getTime();const r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const i of r){const r=e[i];if(!o.includes(i))return!1;if("ref"!==i){const e=t[i];if(a(r)&&a(e)||s(r)&&s(e)||Array.isArray(r)&&Array.isArray(e)?!j(r,e,n):r!==e)return!1}}return!0}var F=e=>s(e)&&!Object.keys(e).length,z=e=>"file"===e.type,B=e=>"function"==typeof e,H=e=>{if(!p)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},U=e=>"select-multiple"===e.type,V=e=>"radio"===e.type,G=e=>V(e)||o(e),W=e=>H(e)&&e.isConnected;function q(e,t){const n=Array.isArray(t)?t:h(t)?[t]:b(t),r=1===n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=m(e)?r++:e[t[r++]];return e}(e,n),o=n.length-1,a=n[o];return r&&delete r[a],0!==o&&(s(r)&&F(r)||Array.isArray(r)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!m(e[t]))return!1;return!0}(r))&&q(e,n.slice(0,-1)),e}var K=e=>{for(const t in e)if(B(e[t]))return!0;return!1};function Y(e,t={}){const n=Array.isArray(e);if(s(e)||n)for(const n in e)Array.isArray(e[n])||s(e[n])&&!K(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Y(e[n],t[n])):i(e[n])||(t[n]=!0);return t}function X(e,t,n){const r=Array.isArray(e);if(s(e)||r)for(const r in e)Array.isArray(e[r])||s(e[r])&&!K(e[r])?m(t)||D(n[r])?n[r]=Array.isArray(e[r])?Y(e[r],[]):{...Y(e[r])}:X(e[r],i(t)?{}:t[r],n[r]):n[r]=!j(e[r],t[r]);return n}var Z=(e,t)=>X(e,t,Y(t));const J={value:!1,isValid:!1},Q={value:!0,isValid:!0};var ee=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!m(e[0].attributes.value)?m(e[0].value)||""===e[0].value?Q:{value:e[0].value,isValid:!0}:Q:J}return J},te=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>m(e)?e:t?""===e?NaN:e?+e:e:n&&O(e)?new Date(e):r?r(e):e;const ne={isValid:!1,value:null};var re=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,ne):ne;function oe(e){const t=e.ref;return z(t)?t.files:V(t)?re(e.refs).value:U(t)?[...t.selectedOptions].map(({value:e})=>e):o(t)?ee(e.refs).value:te(m(t.value)?e.ref.value:t.value,e)}var ae=(e,t,n,r)=>{const o={};for(const n of e){const e=v(t,n);e&&x(o,n,e._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},ie=e=>e instanceof RegExp,le=e=>m(e)?e:ie(e)?e.source:s(e)?ie(e.value)?e.value.source:e.value:e,se=e=>({isOnSubmit:!e||e===E.onSubmit,isOnBlur:e===E.onBlur,isOnChange:e===E.onChange,isOnAll:e===E.all,isOnTouch:e===E.onTouched});const ce="AsyncFunction";var ue=e=>!!e&&!!e.validate&&!!(B(e.validate)&&e.validate.constructor.name===ce||s(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===ce)),de=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),pe=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));const fe=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const n=v(e,o);if(n){const{_f:e,...a}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],o)&&!r)return!0;if(e.ref&&t(e.ref,e.name)&&!r)return!0;if(fe(a,t))break}else if(s(a)&&fe(a,t))break}}};function he(e,t,n){const r=v(e,n);if(r||h(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const r=o.join("."),a=v(t,r),i=v(e,r);if(a&&!Array.isArray(a)&&n!==r)return{name:n};if(i&&i.type)return{name:r,error:i};if(i&&i.root&&i.root.type)return{name:`${r}.root`,error:i.root};o.pop()}return{name:n}}var me=(e,t,n,r)=>{n(e);const{name:o,...a}=e;return F(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(e=>t[e]===(!r||E.all))},ge=(e,t,n)=>!e||!t||e===t||R(e).some(e=>e&&(n?e===t:e.startsWith(t)||t.startsWith(e))),be=(e,t,n,r,o)=>!o.isOnAll&&(!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:!(n?r.isOnChange:o.isOnChange)||e),ve=(e,t)=>!g(v(e,t)).length&&q(e,t),ye=(e,t,n)=>{const r=R(v(e,n));return x(r,"root",t[n]),x(e,n,r),e},xe=e=>O(e);function we(e,t,n="validate"){if(xe(e)||Array.isArray(e)&&e.every(xe)||y(e)&&!e)return{type:n,message:xe(e)?e:"",ref:t}}var Ee=e=>s(e)&&!ie(e)?e:{value:e,message:""},ke=async(e,t,n,r,a,l)=>{const{ref:c,refs:u,required:d,maxLength:p,minLength:f,min:h,max:g,pattern:b,validate:x,name:w,valueAsNumber:E,mount:A}=e._f,T=v(n,w);if(!A||t.has(w))return{};const S=u?u[0]:c,C=e=>{a&&S.reportValidity&&(S.setCustomValidity(y(e)?"":e||""),S.reportValidity())},$={},I=V(c),L=o(c),M=I||L,R=(E||z(c))&&m(c.value)&&m(T)||H(c)&&""===c.value||""===T||Array.isArray(T)&&!T.length,P=N.bind(null,w,r,$),D=(e,t,n,r="maxLength",o="minLength")=>{const a=e?t:n;$[w]={type:e?r:o,message:a,ref:c,...P(e?r:o,a)}};if(l?!Array.isArray(T)||!T.length:d&&(!M&&(R||i(T))||y(T)&&!T||L&&!ee(u).isValid||I&&!re(u).isValid)){const{value:e,message:t}=xe(d)?{value:!!d,message:d}:Ee(d);if(e&&($[w]={type:_,message:t,ref:S,...P(_,t)},!r))return C(t),$}if(!(R||i(h)&&i(g))){let e,t;const n=Ee(g),o=Ee(h);if(i(T)||isNaN(T)){const r=c.valueAsDate||new Date(T),a=e=>new Date((new Date).toDateString()+" "+e),i="time"==c.type,l="week"==c.type;O(n.value)&&T&&(e=i?a(T)>a(n.value):l?T>n.value:r>new Date(n.value)),O(o.value)&&T&&(t=i?a(T)<a(o.value):l?T<o.value:r<new Date(o.value))}else{const r=c.valueAsNumber||(T?+T:T);i(n.value)||(e=r>n.value),i(o.value)||(t=r<o.value)}if((e||t)&&(D(!!e,n.message,o.message,"max","min"),!r))return C($[w].message),$}if((p||f)&&!R&&(O(T)||l&&Array.isArray(T))){const e=Ee(p),t=Ee(f),n=!i(e.value)&&T.length>+e.value,o=!i(t.value)&&T.length<+t.value;if((n||o)&&(D(n,e.message,t.message),!r))return C($[w].message),$}if(b&&!R&&O(T)){const{value:e,message:t}=Ee(b);if(ie(e)&&!T.match(e)&&($[w]={type:k,message:t,ref:c,...P(k,t)},!r))return C(t),$}if(x)if(B(x)){const e=we(await x(T,n),S);if(e&&($[w]={...e,...P("validate",e.message)},!r))return C(e.message),$}else if(s(x)){let e={};for(const t in x){if(!F(e)&&!r)break;const o=we(await x[t](T,n),S,t);o&&(e={...o,...P(t,o.message)},C(o.message),r&&($[w]=e))}if(!F(e)&&($[w]={ref:S,...e},!r))return $}return C(!0),$};const _e={mode:E.onSubmit,reValidateMode:E.onChange,shouldFocusError:!0};function Ae(e={}){let t,n={..._e,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:B(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},l={},d=(s(n.defaultValues)||s(n.values))&&f(n.defaultValues||n.values)||{},h=n.shouldUnregister?{}:f(d),b={action:!1,mount:!1,watch:!1},k={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},_=0;const A={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let T={...A};const S={array:P(),state:P()},C=n.criteriaMode===E.all,$=async e=>{if(!n.disabled&&(A.isValid||T.isValid||e)){const e=n.resolver?F((await D()).errors):await V(l,!0);e!==r.isValid&&S.state.next({isValid:e})}},L=(e,t)=>{!n.disabled&&(A.isValidating||A.validatingFields||T.isValidating||T.validatingFields)&&((e||Array.from(k.mount)).forEach(e=>{e&&(t?x(r.validatingFields,e,t):q(r.validatingFields,e))}),S.state.next({validatingFields:r.validatingFields,isValidating:!F(r.validatingFields)}))},M=(e,t,n,r)=>{const o=v(l,e);if(o){const a=v(h,e,m(n)?v(d,e):n);m(a)||r&&r.defaultChecked||t?x(h,e,t?a:oe(o._f)):X(e,a),b.mount&&$()}},N=(e,t,o,a,i)=>{let l=!1,s=!1;const c={name:e};if(!n.disabled){if(!o||a){(A.isDirty||T.isDirty)&&(s=r.isDirty,r.isDirty=c.isDirty=K(),l=s!==c.isDirty);const n=j(v(d,e),t);s=!!v(r.dirtyFields,e),n?q(r.dirtyFields,e):x(r.dirtyFields,e,!0),c.dirtyFields=r.dirtyFields,l=l||(A.dirtyFields||T.dirtyFields)&&s!==!n}if(o){const t=v(r.touchedFields,e);t||(x(r.touchedFields,e,o),c.touchedFields=r.touchedFields,l=l||(A.touchedFields||T.touchedFields)&&t!==o)}l&&i&&S.state.next(c)}return l?c:{}},D=async e=>{L(e,!0);const t=await n.resolver(h,n.context,ae(e||k.mount,l,n.criteriaMode,n.shouldUseNativeValidation));return L(e),t},V=async(e,t,o={valid:!0})=>{for(const a in e){const i=e[a];if(i){const{_f:e,...l}=i;if(e){const l=k.array.has(e.name),s=i._f&&ue(i._f);s&&A.validatingFields&&L([a],!0);const c=await ke(i,k.disabled,h,C,n.shouldUseNativeValidation&&!t,l);if(s&&A.validatingFields&&L([a]),c[e.name]&&(o.valid=!1,t))break;!t&&(v(c,e.name)?l?ye(r.errors,c,e.name):x(r.errors,e.name,c[e.name]):q(r.errors,e.name))}!F(l)&&await V(l,t,o)}}return o.valid},K=(e,t)=>!n.disabled&&(e&&t&&x(h,e,t),!j(ie(),d)),Y=(e,t,n)=>I(e,k,{...b.mount?h:m(t)?d:O(e)?{[e]:t}:t},n,t),X=(e,t,n={})=>{const r=v(l,e);let a=t;if(r){const n=r._f;n&&(!n.disabled&&x(h,e,te(t,n)),a=H(n.ref)&&i(t)?"":t,U(n.ref)?[...n.ref.options].forEach(e=>e.selected=a.includes(e.value)):n.refs?o(n.ref)?n.refs.forEach(e=>{e.defaultChecked&&e.disabled||(Array.isArray(a)?e.checked=!!a.find(t=>t===e.value):e.checked=a===e.value||!!a)}):n.refs.forEach(e=>e.checked=e.value===a):z(n.ref)?n.ref.value="":(n.ref.value=a,n.ref.type||S.state.next({name:e,values:f(h)})))}(n.shouldDirty||n.shouldTouch)&&N(e,a,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&re(e)},J=(e,t,n)=>{for(const r in t){if(!t.hasOwnProperty(r))return;const o=t[r],i=e+"."+r,c=v(l,i);(k.array.has(e)||s(o)||c&&!c._f)&&!a(o)?J(i,o,n):X(i,o,n)}},Q=(e,t,n={})=>{const o=v(l,e),a=k.array.has(e),s=f(t);x(h,e,s),a?(S.array.next({name:e,values:f(h)}),(A.isDirty||A.dirtyFields||T.isDirty||T.dirtyFields)&&n.shouldDirty&&S.state.next({name:e,dirtyFields:Z(d,h),isDirty:K(e,s)})):!o||o._f||i(s)?X(e,s,n):J(e,s,n),pe(e,k)&&S.state.next({...r}),S.state.next({name:b.mount?e:void 0,values:f(h)})},ee=async e=>{b.mount=!0;const o=e.target;let i=o.name,s=!0;const u=v(l,i),d=e=>{s=Number.isNaN(e)||a(e)&&isNaN(e.getTime())||j(e,v(h,i,e))},p=se(n.mode),m=se(n.reValidateMode);if(u){let a,g;const b=o.type?oe(u._f):c(e),E=e.type===w.BLUR||e.type===w.FOCUS_OUT,O=!de(u._f)&&!n.resolver&&!v(r.errors,i)&&!u._f.deps||be(E,v(r.touchedFields,i),r.isSubmitted,m,p),I=pe(i,k,E);x(h,i,b),E?(u._f.onBlur&&u._f.onBlur(e),t&&t(0)):u._f.onChange&&u._f.onChange(e);const M=N(i,b,E),R=!F(M)||I;if(!E&&S.state.next({name:i,type:e.type,values:f(h)}),O)return(A.isValid||T.isValid)&&("onBlur"===n.mode?E&&$():E||$()),R&&S.state.next({name:i,...I?{}:M});if(!E&&I&&S.state.next({...r}),n.resolver){const{errors:e}=await D([i]);if(d(b),s){const t=he(r.errors,l,i),n=he(e,l,t.name||i);a=n.error,i=n.name,g=F(e)}}else L([i],!0),a=(await ke(u,k.disabled,h,C,n.shouldUseNativeValidation))[i],L([i]),d(b),s&&(a?g=!1:(A.isValid||T.isValid)&&(g=await V(l,!0)));s&&(u._f.deps&&re(u._f.deps),((e,o,a,i)=>{const l=v(r.errors,e),s=(A.isValid||T.isValid)&&y(o)&&r.isValid!==o;var c;if(n.delayError&&a?(c=()=>((e,t)=>{x(r.errors,e,t),S.state.next({errors:r.errors})})(e,a),t=e=>{clearTimeout(_),_=setTimeout(c,e)},t(n.delayError)):(clearTimeout(_),t=null,a?x(r.errors,e,a):q(r.errors,e)),(a?!j(l,a):l)||!F(i)||s){const t={...i,...s&&y(o)?{isValid:o}:{},errors:r.errors,name:e};r={...r,...t},S.state.next(t)}})(i,g,a,M))}},ne=(e,t)=>{if(v(r.errors,t)&&e.focus)return e.focus(),1},re=async(e,t={})=>{let o,a;const i=R(e);if(n.resolver){const t=await(async e=>{const{errors:t}=await D(e);if(e)for(const n of e){const e=v(t,n);e?x(r.errors,n,e):q(r.errors,n)}else r.errors=t;return t})(m(e)?e:i);o=F(t),a=e?!i.some(e=>v(t,e)):o}else e?(a=(await Promise.all(i.map(async e=>{const t=v(l,e);return await V(t&&t._f?{[e]:t}:t)}))).every(Boolean),(a||r.isValid)&&$()):a=o=await V(l);return S.state.next({...!O(e)||(A.isValid||T.isValid)&&o!==r.isValid?{}:{name:e},...n.resolver||!e?{isValid:o}:{},errors:r.errors}),t.shouldFocus&&!a&&fe(l,ne,e?i:k.mount),a},ie=e=>{const t={...b.mount?h:d};return m(e)?t:O(e)?v(t,e):e.map(e=>v(t,e))},ce=(e,t)=>({invalid:!!v((t||r).errors,e),isDirty:!!v((t||r).dirtyFields,e),error:v((t||r).errors,e),isValidating:!!v(r.validatingFields,e),isTouched:!!v((t||r).touchedFields,e)}),xe=(e,t,n)=>{const o=(v(l,e,{_f:{}})._f||{}).ref,a=v(r.errors,e)||{},{ref:i,message:s,type:c,...u}=a;x(r.errors,e,{...u,...t,ref:o}),S.state.next({name:e,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&o&&o.focus&&o.focus()},we=e=>S.state.subscribe({next:t=>{ge(e.name,t.name,e.exact)&&me(t,e.formState||A,Ie,e.reRenderRoot)&&e.callback({values:{...h},...r,...t})}}).unsubscribe,Ee=(e,t={})=>{for(const o of e?R(e):k.mount)k.mount.delete(o),k.array.delete(o),t.keepValue||(q(l,o),q(h,o)),!t.keepError&&q(r.errors,o),!t.keepDirty&&q(r.dirtyFields,o),!t.keepTouched&&q(r.touchedFields,o),!t.keepIsValidating&&q(r.validatingFields,o),!n.shouldUnregister&&!t.keepDefaultValue&&q(d,o);S.state.next({values:f(h)}),S.state.next({...r,...t.keepDirty?{isDirty:K()}:{}}),!t.keepIsValid&&$()},Ae=({disabled:e,name:t})=>{(y(e)&&b.mount||e||k.disabled.has(t))&&(e?k.disabled.add(t):k.disabled.delete(t))},Te=(e,t={})=>{let r=v(l,e);const o=y(t.disabled)||y(n.disabled);return x(l,e,{...r||{},_f:{...r&&r._f?r._f:{ref:{name:e}},name:e,mount:!0,...t}}),k.mount.add(e),r?Ae({disabled:y(t.disabled)?t.disabled:n.disabled,name:e}):M(e,!0,t.value),{...o?{disabled:t.disabled||n.disabled}:{},...n.progressive?{required:!!t.required,min:le(t.min),max:le(t.max),minLength:le(t.minLength),maxLength:le(t.maxLength),pattern:le(t.pattern)}:{},name:e,onChange:ee,onBlur:ee,ref:o=>{if(o){Te(e,t),r=v(l,e);const n=m(o.value)&&o.querySelectorAll&&o.querySelectorAll("input,select,textarea")[0]||o,a=G(n),i=r._f.refs||[];if(a?i.find(e=>e===n):n===r._f.ref)return;x(l,e,{_f:{...r._f,...a?{refs:[...i.filter(W),n,...Array.isArray(v(d,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),M(e,!1,void 0,n)}else r=v(l,e,{}),r._f&&(r._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!u(k.array,e)||!b.action)&&k.unMount.add(e)}}},Se=()=>n.shouldFocusError&&fe(l,ne,k.mount),Ce=(e,t)=>async o=>{let a;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let i=f(h);if(S.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await D();r.errors=e,i=f(t)}else await V(l);if(k.disabled.size)for(const e of k.disabled)q(i,e);if(q(r.errors,"root"),F(r.errors)){S.state.next({errors:{}});try{await e(i,o)}catch(e){a=e}}else t&&await t({...r.errors},o),Se(),setTimeout(Se);if(S.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:F(r.errors)&&!a,submitCount:r.submitCount+1,errors:r.errors}),a)throw a},$e=(e,t={})=>{const o=e?f(e):d,a=f(o),i=F(e),s=i?d:a;if(t.keepDefaultValues||(d=o),!t.keepValues){if(t.keepDirtyValues){const e=new Set([...k.mount,...Object.keys(Z(d,h))]);for(const t of Array.from(e))v(r.dirtyFields,t)?x(s,t,v(h,t)):Q(t,v(s,t))}else{if(p&&m(e))for(const e of k.mount){const t=v(l,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(H(e)){const t=e.closest("form");if(t){t.reset();break}}}}if(t.keepFieldsRef)for(const e of k.mount)Q(e,v(s,e));else l={}}h=n.shouldUnregister?t.keepDefaultValues?f(d):{}:f(s),S.array.next({values:{...s}}),S.state.next({values:{...s}})}k={mount:t.keepDirtyValues?k.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},b.mount=!A.isValid||!!t.keepIsValid||!!t.keepDirtyValues,b.watch=!!n.shouldUnregister,S.state.next({submitCount:t.keepSubmitCount?r.submitCount:0,isDirty:!i&&(t.keepDirty?r.isDirty:!(!t.keepDefaultValues||j(e,d))),isSubmitted:!!t.keepIsSubmitted&&r.isSubmitted,dirtyFields:i?{}:t.keepDirtyValues?t.keepDefaultValues&&h?Z(d,h):r.dirtyFields:t.keepDefaultValues&&e?Z(d,e):t.keepDirty?r.dirtyFields:{},touchedFields:t.keepTouched?r.touchedFields:{},errors:t.keepErrors?r.errors:{},isSubmitSuccessful:!!t.keepIsSubmitSuccessful&&r.isSubmitSuccessful,isSubmitting:!1})},Oe=(e,t)=>$e(B(e)?e(h):e,t),Ie=e=>{r={...r,...e}},Le={control:{register:Te,unregister:Ee,getFieldState:ce,handleSubmit:Ce,setError:xe,_subscribe:we,_runSchema:D,_focusError:Se,_getWatch:Y,_getDirty:K,_setValid:$,_setFieldArray:(e,t=[],o,a,i=!0,s=!0)=>{if(a&&o&&!n.disabled){if(b.action=!0,s&&Array.isArray(v(l,e))){const t=o(v(l,e),a.argA,a.argB);i&&x(l,e,t)}if(s&&Array.isArray(v(r.errors,e))){const t=o(v(r.errors,e),a.argA,a.argB);i&&x(r.errors,e,t),ve(r.errors,e)}if((A.touchedFields||T.touchedFields)&&s&&Array.isArray(v(r.touchedFields,e))){const t=o(v(r.touchedFields,e),a.argA,a.argB);i&&x(r.touchedFields,e,t)}(A.dirtyFields||T.dirtyFields)&&(r.dirtyFields=Z(d,h)),S.state.next({name:e,isDirty:K(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else x(h,e,t)},_setDisabledField:Ae,_setErrors:e=>{r.errors=e,S.state.next({errors:r.errors,isValid:!1})},_getFieldArray:e=>g(v(b.mount?h:d,e,n.shouldUnregister?v(d,e,[]):[])),_reset:$e,_resetDefaultValues:()=>B(n.defaultValues)&&n.defaultValues().then(e=>{Oe(e,n.resetOptions),S.state.next({isLoading:!1})}),_removeUnmounted:()=>{for(const e of k.unMount){const t=v(l,e);t&&(t._f.refs?t._f.refs.every(e=>!W(e)):!W(t._f.ref))&&Ee(e)}k.unMount=new Set},_disableForm:e=>{y(e)&&(S.state.next({disabled:e}),fe(l,(t,n)=>{const r=v(l,n);r&&(t.disabled=r._f.disabled||e,Array.isArray(r._f.refs)&&r._f.refs.forEach(t=>{t.disabled=r._f.disabled||e}))},0,!1))},_subjects:S,_proxyFormState:A,get _fields(){return l},get _formValues(){return h},get _state(){return b},set _state(e){b=e},get _defaultValues(){return d},get _names(){return k},set _names(e){k=e},get _formState(){return r},get _options(){return n},set _options(e){n={...n,...e}}},subscribe:e=>(b.mount=!0,T={...T,...e.formState},we({...e,formState:T})),trigger:re,register:Te,handleSubmit:Ce,watch:(e,t)=>B(e)?S.state.subscribe({next:n=>e(Y(void 0,t),n)}):Y(e,t,!0),setValue:Q,getValues:ie,reset:Oe,resetField:(e,t={})=>{v(l,e)&&(m(t.defaultValue)?Q(e,f(v(d,e))):(Q(e,t.defaultValue),x(d,e,f(t.defaultValue))),t.keepTouched||q(r.touchedFields,e),t.keepDirty||(q(r.dirtyFields,e),r.isDirty=t.defaultValue?K(e,f(v(d,e))):K()),t.keepError||(q(r.errors,e),A.isValid&&$()),S.state.next({...r}))},clearErrors:e=>{e&&R(e).forEach(e=>q(r.errors,e)),S.state.next({errors:e?r.errors:{}})},unregister:Ee,setError:xe,setFocus:(e,t={})=>{const n=v(l,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&(e.focus(),t.shouldSelect&&B(e.select)&&e.select())}},getFieldState:ce};return{...Le,formControl:Le}}function Te(e={}){const t=r.useRef(void 0),n=r.useRef(void 0),[o,a]=r.useState({isDirty:!1,isValidating:!1,isLoading:B(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:B(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:o},e.defaultValues&&!B(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:n,...r}=Ae(e);t.current={...r,formState:o}}const i=t.current.control;return i._options=e,C(()=>{const e=i._subscribe({formState:i._proxyFormState,callback:()=>a({...i._formState}),reRenderRoot:!0});return a(e=>({...e,isReady:!0})),i._formState.isReady=!0,e},[i]),r.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),r.useEffect(()=>{e.mode&&(i._options.mode=e.mode),e.reValidateMode&&(i._options.reValidateMode=e.reValidateMode)},[i,e.mode,e.reValidateMode]),r.useEffect(()=>{e.errors&&(i._setErrors(e.errors),i._focusError())},[i,e.errors]),r.useEffect(()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,e.shouldUnregister]),r.useEffect(()=>{if(i._proxyFormState.isDirty){const e=i._getDirty();e!==o.isDirty&&i._subjects.state.next({isDirty:e})}},[i,o.isDirty]),r.useEffect(()=>{e.values&&!j(e.values,n.current)?(i._reset(e.values,{keepFieldsRef:!0,...i._options.resetOptions}),n.current=e.values,a(e=>({...e}))):i._resetDefaultValues()},[i,e.values]),r.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=S(o,i),t.current}},1003:(e,t,n)=>{"use strict";var r=n(8099),o=n(8900),a=n(2769),i=function(e){return a(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?i(r[e])||i(o[e]):r[e]&&r[e][t]||o[e]&&o[e][t]}},1005:(e,t,n)=>{"use strict";var r=n(3273),o=n(4574),a=n(8130),i=function(e){return function(t,n,i){var l=r(t),s=a(l);if(0===s)return!e&&-1;var c,u=o(i,s);if(e&&n!=n){for(;s>u;)if((c=l[u++])!=c)return!0}else for(;s>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:i(!0),indexOf:i(!1)}},1019:(e,t,n)=>{"use strict";n(3855);var r=n(2856);e.exports=r("String","includes")},1085:(e,t,n)=>{"use strict";e.exports=n(3335)},1112:(e,t,n)=>{"use strict";n.d(t,{Du:()=>s,Mb:()=>u,cL:()=>c,mw:()=>d});var r=n(2221),o=n(4851),a=n(7243),i=n(6079),l=n(7173);const s=e=>async t=>{const n=await e;200===(null==n?void 0:n.status)&&(t({type:l.nz,...n}),t((0,i.uK)()))},c=()=>(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:i}}=t();e((0,a.et)(`${i}/chatbubble/${r.Ak}/takeover_cancel/`,{method:"POST",...(0,o.A)({token:n})})),e({type:l.MM})},u=()=>(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:i}}=t();e({type:l.c6}),e((0,a.et)(`${i}/chatbubble/${r.Ak}/user_started_typing/`,{method:"POST",...(0,o.A)({token:n})}))},d=()=>(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:i}}=t();e({type:l.we}),e((0,a.et)(`${i}/chatbubble/${r.Ak}/user_stopped_typing/`,{method:"POST",...(0,o.A)({token:n})}))}},1121:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(2009);const o=e=>{let{buttons:t=[],...n}=e;return{...n,buttons:t.map(r.A)}}},1139:(e,t,n)=>{"use strict";var r=n(8407),o=String;e.exports=function(e){if("Symbol"===r(e))throw new TypeError("Cannot convert a Symbol value to a string");return o(e)}},1203:e=>{"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},1268:(e,t,n)=>{"use strict";var r=n(6100),o=0,a=Math.random(),i=r(1.1.toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+i(++o+a,36)}},1318:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(9749),o=n.n(r);const a=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(e).reduce((e,n)=>{let[r,a]=n;return{...e,...o()(t).call(t,r)?{}:{[r]:a}}},{})}}},1328:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(541),o=n(1695);function a(){var e;const{supportedLanguages:t}=window.__KINDLY_SETTINGS__,{includeDisabledLanguages:n}=(0,r.d4)(o.Od),{currentLanguage:a}=(0,r.d4)(o.$P),i=null===(e=t.find(e=>{let{is_primary:t}=e;return t}))||void 0===e?void 0:e.code;if(!i)throw new Error("No primary language found in supported languages");const l=t.filter(e=>{let{is_active:t}=e;return t});return{primaryLanguageCode:i,currentLanguageCode:a,supportedLanguages:n?t:l}}},1330:(e,t,n)=>{"use strict";var r=n(5024),o=n(1203);e.exports=r&&o(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},1346:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(9155),o=n.n(r);function a(e){let{title:t="File attachment",...n}=e;return o().createElement("svg",Object.assign({width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),o().createElement("title",null,t),o().createElement("path",{d:"m19.25 11.951-6.117 5.91c-1.917 1.852-5.027 1.852-6.945 0a4.632 4.632 0 0 1 .018-6.729L8.36 9.075m0 0 .493-.471m-.493.47 3.491-3.372c1.313-1.268 3.44-1.268 4.752 0a3.17 3.17 0 0 1-.012 4.603l-3.238 3.095M8.36 9.075l-.417.403m5.41 3.922.367-.354m-.367.354-2.47 2.387a1.86 1.86 0 0 1-2.565 0 1.711 1.711 0 0 1 0-2.479l4.727-4.566",stroke:"#6A778A",strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}))}},1395:(e,t,n)=>{"use strict";var r=n(6100),o=n(1203),a=n(9932),i=Object,l=r("".split);e.exports=o(function(){return!i("z").propertyIsEnumerable(0)})?function(e){return"String"===a(e)?l(e,""):i(e)}:i},1605:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var r=n(9749),o=n.n(r),a=(n(1949),n(9155)),i=n.n(a),l=n(3864),s=n(8905),c=n(6538);const u=l.Ay.div`
|
|
85
|
+
`},493:(e,t,n)=>{"use strict";var r=n(4713),o=n(262),a=n(6281),i=n(4674),l=n(9258),s=n(8655),c=TypeError,u=s("toPrimitive");e.exports=function(e,t){if(!o(e)||a(e))return e;var n,s=i(e,u);if(s){if(void 0===t&&(t="default"),n=r(s,e,t),!o(n)||a(n))return n;throw new c("Can't convert object to primitive value")}return void 0===t&&(t="number"),l(e,t)}},526:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>v});var r=n(9155),o=n.n(r);const a=e=>(0,r.isValidElement)(e)&&(e=>(0,r.isValidElement)(e)&&Boolean(e.props.children))(e)&&r.Children.toArray(e.props.children).reduce((e,t)=>e||(0,r.isValidElement)(t),!1),i=(e,t)=>r.Children.toArray(e).map((e,n,o)=>(0,r.isValidElement)(e)&&a(e)?t((0,r.cloneElement)(e,{...e.props,children:i(e.props.children,t)})):t(e,n,o)),l=i;var s=n(824),c=n(3864);n(1949);const u=function(e){let{width:t=24,height:n=24,color:r="#333"}=e;return o().createElement("svg",{width:t,height:n,viewBox:"0 0 24 24",fill:"none"},o().createElement("path",{d:"m10.75 8.75 3.5 3.25-3.5 3.25",stroke:r,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))};var d=n(9223),p=n(8905),f=n(1435),h=n(3435),m=n(881),g=n(5814);const b=(e,t)=>o().cloneElement(e,t),v=function(e){let{defaultValues:t,children:n,onSubmit:a,shouldUnregister:i,clearOnSubmit:v=!1,className:y,sendButtonTitle:x="Submit",cancelButtonTitle:w="Cancel",ariaLabel:E,onCancel:k}=e;const{register:_,handleSubmit:A,getValues:T,reset:S,control:$,setError:C,trigger:O,clearErrors:I,setValue:L,formState:{isSubmitting:M,isSubmitted:N}}=(0,s.mN)({...t&&{defaultValues:t},...i&&{shouldUnregister:!0},mode:"onSubmit",reValidateMode:"onChange"}),{buttonText:R}=(0,r.useContext)(c.Dx)||{buttonText:p.Tj.white},P=async e=>{if(void 0!==Object.values(e).find(e=>!!e))try{await a(e,C),v&&S()}catch(e){throw S(),e}};return o().createElement(m.lV,{onSubmit:A(P),"aria-label":E,$isSubmitted:N,className:y,onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),e.metaKey||e.ctrlKey?A(P)():e.target.click())},noValidate:!0},l(n,e=>e?o().isValidElement(e)?(e=>{var t,n,r,a,i,l;return e?null!=e&&null!==(t=e.props)&&void 0!==t&&t.name?e.props.hasController?o().createElement(s.xI,Object.assign({key:e.key,control:$,render:t=>b(e,{...e.props,...t}),rules:(0,g.G8)(e.props.validators)},e.props)):b(e,{register:_,setError:C,clearErrors:I,trigger:O,control:$,...e.type&&"string"!=typeof e.type&&e.type.name===f.ZH.name&&{setValue:L}}):(null!=e&&e.type&&"string"!=typeof e.type?e.type.name:null)===h.A.name?b(e,{placeholder:null===(n=e.props)||void 0===n||null===(r=n.children)||void 0===r||null===(a=r[0])||void 0===a||null===(i=a.props)||void 0===i?void 0:i.placeholder_text,...!(null!==(l=e.props)&&void 0!==l&&l.htmlFor)&&{htmlFor:e.props.slug}}):e:null})(e):e:null),o().createElement(m.dg,null,o().createElement(d.A,{disabled:M,onClick:()=>{const e=T();k&&k(e)},text:w,isSecondaryButton:!0}),o().createElement(d.A,{type:"submit",icon:o().createElement(u,{color:R,width:16,height:16}),loading:M,text:x,"data-testid":"form-submit-button"})))}},534:(e,t,n)=>{"use strict";n.d(t,{n:()=>o,m:()=>r});const r={default:"'IBMPlex', 'Helvetica Neue', Helvetica, Arial, sans-serif",KindlySans:"KindlySans"},o="\n@font-face {\n font-family: 'KindlySans';\n src: url(http://localhost:8081/src/assets/fonts/KindlySans-Regular.65d6f01a87841a240c37cd04c52f3c2f.otf) format('OpenType');\n}\n\n@font-face {\n font-family: 'IBMPlex';\n font-weight: 400;\n src: url(http://localhost:8081/src/assets/fonts/IBMPlexSans-Regular.2c412e2f77ae69aa2154613095be7130.ttf) format('truetype');\n}\n\n@font-face {\n font-family: 'IBMPlex';\n font-weight: 500;\n src: url(http://localhost:8081/src/assets/fonts/IBMPlexSans-Medium.c4877bdfa15aef22d9255288b16899c5.ttf) format('truetype');\n}\n"},541:(e,t,n)=>{"use strict";n.d(t,{Kq:()=>ee,Ng:()=>Q,Pj:()=>oe,d4:()=>ce,vA:()=>ue,wA:()=>ie});var r=n(9155),o=n(5919),a=r.version.startsWith("19"),i=Symbol.for(a?"react.transitional.element":"react.element"),l=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),p=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),v=f,y=g;function x(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:a,areStatePropsEqual:i}){let l,s,c,u,d,p=!1;return function(f,h){return p?function(p,f){const h=!a(f,s),m=!o(p,l,f,s);return l=p,s=f,h&&m?(c=e(l,s),t.dependsOnOwnProps&&(u=t(r,s)),d=n(c,u,s),d):h?(e.dependsOnOwnProps&&(c=e(l,s)),t.dependsOnOwnProps&&(u=t(r,s)),d=n(c,u,s),d):m?function(){const t=e(l,s),r=!i(t,c);return c=t,r&&(d=n(c,u,s)),d}():d}(f,h):(l=f,s=h,c=e(l,s),u=t(r,s),d=n(c,u,s),p=!0,d)}}function w(e){return function(t){const n=e(t);function r(){return n}return r.dependsOnOwnProps=!1,r}}function E(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function k(e,t){return function(t,{displayName:n}){const r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e,void 0)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=E(e);let o=r(t,n);return"function"==typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=E(o),o=r(t,n)),o},r}}function _(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function A(e,t,n){return{...n,...e,...t}}function T(e){e()}var S={notify(){},get:()=>[]};function $(e,t){let n,r=S,o=0,a=!1;function i(){c.onStateChange&&c.onStateChange()}function l(){o++,n||(n=t?t.addNestedSub(i):e.subscribe(i),r=function(){let e=null,t=null;return{clear(){e=null,t=null},notify(){T(()=>{let t=e;for(;t;)t.callback(),t=t.next})},get(){const t=[];let n=e;for(;n;)t.push(n),n=n.next;return t},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){r&&null!==e&&(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}())}function s(){o--,n&&0===o&&(n(),n=void 0,r.clear(),r=S)}const c={addNestedSub:function(e){l();const t=r.subscribe(e);let n=!1;return()=>{n||(n=!0,t(),s())}},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:i,isSubscribed:function(){return a},trySubscribe:function(){a||(a=!0,l())},tryUnsubscribe:function(){a&&(a=!1,s())},getListeners:()=>r};return c}var C=(()=>!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement))(),O=(()=>"undefined"!=typeof navigator&&"ReactNative"===navigator.product)(),I=(()=>C||O?r.useLayoutEffect:r.useEffect)();function L(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function M(e,t){if(L(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!L(e[n[r]],t[n[r]]))return!1;return!0}var N={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},R={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},P={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},D={[v]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[y]:P};function j(e){return function(e){if("object"==typeof e&&null!==e){const{$$typeof:t}=e;switch(t){case i:switch(e=e.type){case s:case u:case c:case h:case m:return e;default:switch(e=e&&e.$$typeof){case p:case f:case b:case g:case d:return e;default:return t}}case l:return t}}}(e)===g?P:D[e.$$typeof]||N}var F=Object.defineProperty,z=Object.getOwnPropertyNames,B=Object.getOwnPropertySymbols,H=Object.getOwnPropertyDescriptor,U=Object.getPrototypeOf,V=Object.prototype;function G(e,t){if("string"!=typeof t){if(V){const n=U(t);n&&n!==V&&G(e,n)}let n=z(t);B&&(n=n.concat(B(t)));const r=j(e),o=j(t);for(let a=0;a<n.length;++a){const i=n[a];if(!(R[i]||o&&o[i]||r&&r[i])){const n=H(t,i);try{F(e,i,n)}catch(e){}}}}return e}var W=Symbol.for("react-redux-context"),q="undefined"!=typeof globalThis?globalThis:{};function K(){if(!r.createContext)return{};const e=q[W]??=new Map;let t=e.get(r.createContext);return t||(t=r.createContext(null),e.set(r.createContext,t)),t}var Y=K(),X=[null,null];function Z(e,t,n,r,o,a){e.current=r,n.current=!1,o.current&&(o.current=null,a())}function J(e,t){return e===t}var Q=function(e,t,n,{pure:o,areStatesEqual:a=J,areOwnPropsEqual:i=M,areStatePropsEqual:l=M,areMergedPropsEqual:s=M,forwardRef:c=!1,context:u=Y}={}){const d=u,p=function(e){return e?"function"==typeof e?k(e):_(e,"mapStateToProps"):w(()=>({}))}(e),f=function(e){return e&&"object"==typeof e?w(t=>function(e,t){const n={};for(const r in e){const o=e[r];"function"==typeof o&&(n[r]=(...e)=>t(o(...e)))}return n}(e,t)):e?"function"==typeof e?k(e):_(e,"mapDispatchToProps"):w(e=>({dispatch:e}))}(t),h=function(e){return e?"function"==typeof e?function(e){return function(t,{displayName:n,areMergedPropsEqual:r}){let o,a=!1;return function(t,n,i){const l=e(t,n,i);return a?r(l,o)||(o=l):(a=!0,o=l),o}}}(e):_(e,"mergeProps"):()=>A}(n),m=Boolean(e);return e=>{const t=e.displayName||e.name||"Component",n=`Connect(${t})`,o={shouldHandleStateChanges:m,displayName:n,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:p,initMapDispatchToProps:f,initMergeProps:h,areStatesEqual:a,areStatePropsEqual:l,areOwnPropsEqual:i,areMergedPropsEqual:s};function u(t){const[n,a,i]=r.useMemo(()=>{const{reactReduxForwardedRef:e,...n}=t;return[t.context,e,n]},[t]),l=r.useMemo(()=>d,[n,d]),s=r.useContext(l),c=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch),u=Boolean(s)&&Boolean(s.store),p=c?t.store:s.store,f=u?s.getServerState:p.getState,h=r.useMemo(()=>function(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...o}){return x(t(e,o),n(e,o),r(e,o),e,o)}(p.dispatch,o),[p]),[g,b]=r.useMemo(()=>{if(!m)return X;const e=$(p,c?void 0:s.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[p,c,s]),v=r.useMemo(()=>c?s:{...s,subscription:g},[c,s,g]),y=r.useRef(void 0),w=r.useRef(i),E=r.useRef(void 0),k=r.useRef(!1),_=r.useRef(!1),A=r.useRef(void 0);I(()=>(_.current=!0,()=>{_.current=!1}),[]);const T=r.useMemo(()=>()=>E.current&&i===w.current?E.current:h(p.getState(),i),[p,i]),S=r.useMemo(()=>e=>g?function(e,t,n,r,o,a,i,l,s,c,u){if(!e)return()=>{};let d=!1,p=null;const f=()=>{if(d||!l.current)return;const e=t.getState();let n,f;try{n=r(e,o.current)}catch(e){f=e,p=e}f||(p=null),n===a.current?i.current||c():(a.current=n,s.current=n,i.current=!0,u())};return n.onStateChange=f,n.trySubscribe(),f(),()=>{if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}(m,p,g,h,w,y,k,_,E,b,e):()=>{},[g]);var C,O;let L;C=Z,O=[w,y,k,i,E,b],I(()=>C(...O),undefined);try{L=r.useSyncExternalStore(S,T,f?()=>h(f(),i):T)}catch(e){throw A.current&&(e.message+=`\nThe error may be correlated with this previous error:\n${A.current.stack}\n\n`),e}I(()=>{A.current=void 0,E.current=void 0,y.current=L});const M=r.useMemo(()=>r.createElement(e,{...L,ref:a}),[a,e,L]);return r.useMemo(()=>m?r.createElement(l.Provider,{value:v},M):M,[l,M,v])}const g=r.memo(u);if(g.WrappedComponent=e,g.displayName=u.displayName=n,c){const t=r.forwardRef(function(e,t){return r.createElement(g,{...e,reactReduxForwardedRef:t})});return t.displayName=n,t.WrappedComponent=e,G(t,e)}return G(g,e)}},ee=function(e){const{children:t,context:n,serverState:o,store:a}=e,i=r.useMemo(()=>{const e=$(a);return{store:a,subscription:e,getServerState:o?()=>o:void 0}},[a,o]),l=r.useMemo(()=>a.getState(),[a]);I(()=>{const{subscription:e}=i;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),l!==a.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[i,l]);const s=n||Y;return r.createElement(s.Provider,{value:i},t)};function te(e=Y){return function(){return r.useContext(e)}}var ne=te();function re(e=Y){const t=e===Y?ne:te(e),n=()=>{const{store:e}=t();return e};return Object.assign(n,{withTypes:()=>n}),n}var oe=re();function ae(e=Y){const t=e===Y?oe:re(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var ie=ae(),le=(e,t)=>e===t;function se(e=Y){const t=e===Y?ne:te(e),n=(e,n={})=>{const{equalityFn:a=le}="function"==typeof n?{equalityFn:n}:n,i=t(),{store:l,subscription:s,getServerState:c}=i,u=(r.useRef(!0),r.useCallback({[e.name]:t=>e(t)}[e.name],[e])),d=(0,o.useSyncExternalStoreWithSelector)(s.addNestedSub,l.getState,c||l.getState,u,a);return r.useDebugValue(d),d};return Object.assign(n,{withTypes:()=>n}),n}var ce=se(),ue=T},587:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(824),o=n(9272);let a;const i=e=>{let{trigger:t,control:n,name:i,setError:l,clearErrors:s}=e;const{errors:c,isSubmitted:u}=n?(0,r.lN)({name:i,control:n}):{errors:{},isSubmitted:!1};return e=>{var r;if(!n)return;const d={...c},p=e.target;if(null!=p&&p.validationMessage&&(null===(r=c[i])||void 0===r?void 0:r.message)!==(null==p?void 0:p.validationMessage)&&l?l(`browser_error_${i}`,{type:o.k1.BROWSER,message:p.validationMessage},{shouldFocus:!0}):s&&s(`browser_error_${i}`),u&&t){const e=d[`browser_error_${i}`];"email"===p.type&&!e&&p.value.endsWith(".")?a=setTimeout(()=>{t(i)},1e3):(a&&clearTimeout(a),t(i))}}}},649:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(9749),o=n.n(r);const a="kindly-chat-utm",i=Object.freeze(["CONTENT","SOURCE","MEDIUM","CAMPAIGN","TERM"]);function l(){const e=new URLSearchParams(window.location.search);let t=Array.from(e.entries()).reduce((e,t)=>{let[n,r]=t;return"UTM_"===n.toUpperCase().substring(0,4)&&o()(i).call(i,n.toUpperCase().substring(4))?{...e,[n]:r}:e},{});if(0===Object.keys(t).length){const e=window.sessionStorage.getItem(a);t=e?JSON.parse(e):null}else window.sessionStorage.setItem(a,JSON.stringify(t));return t}},701:(e,t,n)=>{"use strict";var r=n(6100),o=n(2137),a=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return a(o(e),t)}},814:(e,t,n)=>{"use strict";var r=n(2769),o=n(459),a=TypeError;e.exports=function(e){if(r(e))return e;throw new a(o(e)+" is not a function")}},824:(e,t,n)=>{"use strict";n.d(t,{FH:()=>L,lN:()=>C,mN:()=>Te,xI:()=>M});var r=n(9155),o=e=>"checkbox"===e.type,a=e=>e instanceof Date,i=e=>null==e;const l=e=>"object"==typeof e;var s=e=>!i(e)&&!Array.isArray(e)&&l(e)&&!a(e),c=e=>s(e)&&e.target?o(e.target)?e.target.checked:e.target.value:e,u=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),d=e=>{const t=e.constructor&&e.constructor.prototype;return s(t)&&t.hasOwnProperty("isPrototypeOf")},p="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function f(e){let t;const n=Array.isArray(e),r="undefined"!=typeof FileList&&e instanceof FileList;if(e instanceof Date)t=new Date(e);else{if(p&&(e instanceof Blob||r)||!n&&!s(e))return e;if(t=n?[]:{},n||d(e))for(const n in e)e.hasOwnProperty(n)&&(t[n]=f(e[n]));else t=e}return t}var h=e=>/^\w*$/.test(e),m=e=>void 0===e,g=e=>Array.isArray(e)?e.filter(Boolean):[],b=e=>g(e.replace(/["|']|\]/g,"").split(/\.|\[/)),v=(e,t,n)=>{if(!t||!s(e))return n;const r=(h(t)?[t]:b(t)).reduce((e,t)=>i(e)?e:e[t],e);return m(r)||r===e?m(e[t])?n:e[t]:r},y=e=>"boolean"==typeof e,x=(e,t,n)=>{let r=-1;const o=h(t)?[t]:b(t),a=o.length,i=a-1;for(;++r<a;){const t=o[r];let a=n;if(r!==i){const n=e[t];a=s(n)||Array.isArray(n)?n:isNaN(+o[r+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=a,e=e[t]}};const w={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},E={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},k="pattern",_="required",A=r.createContext(null);A.displayName="HookFormContext";const T=()=>r.useContext(A);var S=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(o,a,{get:()=>{const o=a;return t._proxyFormState[o]!==E.all&&(t._proxyFormState[o]=!r||E.all),n&&(n[o]=!0),e[o]}});return o};const $="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;function C(e){const t=T(),{control:n=t.control,disabled:o,name:a,exact:i}=e||{},[l,s]=r.useState(n._formState),c=r.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return $(()=>n._subscribe({name:a,formState:c.current,exact:i,callback:e=>{!o&&s({...n._formState,...e})}}),[a,o,i]),r.useEffect(()=>{c.current.isValid&&n._setValid(!0)},[n]),r.useMemo(()=>S(l,n,c.current,!1),[l,n])}var O=e=>"string"==typeof e,I=(e,t,n,r,o)=>O(e)?(r&&t.watch.add(e),v(n,e,o)):Array.isArray(e)?e.map(e=>(r&&t.watch.add(e),v(n,e))):(r&&(t.watchAll=!0),n);function L(e){const t=T(),{control:n=t.control,name:o,defaultValue:a,disabled:i,exact:l}=e||{},s=r.useRef(a),[c,u]=r.useState(n._getWatch(o,s.current));return $(()=>n._subscribe({name:o,formState:{values:!0},exact:l,callback:e=>!i&&u(I(o,n._names,e.values||n._formValues,!1,s.current))}),[o,n,i,l]),r.useEffect(()=>n._removeUnmounted()),c}const M=e=>e.render(function(e){const t=T(),{name:n,disabled:o,control:a=t.control,shouldUnregister:i}=e,l=u(a._names.array,n),s=L({control:a,name:n,defaultValue:v(a._formValues,n,v(a._defaultValues,n,e.defaultValue)),exact:!0}),d=C({control:a,name:n,exact:!0}),p=r.useRef(e),h=r.useRef(a.register(n,{...e.rules,value:s,...y(e.disabled)?{disabled:e.disabled}:{}})),g=r.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!v(d.errors,n)},isDirty:{enumerable:!0,get:()=>!!v(d.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!v(d.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!v(d.validatingFields,n)},error:{enumerable:!0,get:()=>v(d.errors,n)}}),[d,n]),b=r.useCallback(e=>h.current.onChange({target:{value:c(e),name:n},type:w.CHANGE}),[n]),E=r.useCallback(()=>h.current.onBlur({target:{value:v(a._formValues,n),name:n},type:w.BLUR}),[n,a._formValues]),k=r.useCallback(e=>{const t=v(a._fields,n);t&&e&&(t._f.ref={focus:()=>e.focus&&e.focus(),select:()=>e.select&&e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})},[a._fields,n]),_=r.useMemo(()=>({name:n,value:s,...y(o)||d.disabled?{disabled:d.disabled||o}:{},onChange:b,onBlur:E,ref:k}),[n,o,d.disabled,b,E,k,s]);return r.useEffect(()=>{const e=a._options.shouldUnregister||i;a.register(n,{...p.current.rules,...y(p.current.disabled)?{disabled:p.current.disabled}:{}});const t=(e,t)=>{const n=v(a._fields,e);n&&n._f&&(n._f.mount=t)};if(t(n,!0),e){const e=f(v(a._options.defaultValues,n));x(a._defaultValues,n,e),m(v(a._formValues,n))&&x(a._formValues,n,e)}return!l&&a.register(n),()=>{(l?e&&!a._state.action:e)?a.unregister(n):t(n,!1)}},[n,a,l,i]),r.useEffect(()=>{a._setDisabledField({disabled:o,name:n})},[o,n,a]),r.useMemo(()=>({field:_,formState:d,fieldState:g}),[_,d,g])}(e));var N=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},R=e=>Array.isArray(e)?e:[e],P=()=>{let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}},D=e=>i(e)||!l(e);function j(e,t,n=new WeakSet){if(D(e)||D(t))return e===t;if(a(e)&&a(t))return e.getTime()===t.getTime();const r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const i of r){const r=e[i];if(!o.includes(i))return!1;if("ref"!==i){const e=t[i];if(a(r)&&a(e)||s(r)&&s(e)||Array.isArray(r)&&Array.isArray(e)?!j(r,e,n):r!==e)return!1}}return!0}var F=e=>s(e)&&!Object.keys(e).length,z=e=>"file"===e.type,B=e=>"function"==typeof e,H=e=>{if(!p)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},U=e=>"select-multiple"===e.type,V=e=>"radio"===e.type,G=e=>V(e)||o(e),W=e=>H(e)&&e.isConnected;function q(e,t){const n=Array.isArray(t)?t:h(t)?[t]:b(t),r=1===n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=m(e)?r++:e[t[r++]];return e}(e,n),o=n.length-1,a=n[o];return r&&delete r[a],0!==o&&(s(r)&&F(r)||Array.isArray(r)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!m(e[t]))return!1;return!0}(r))&&q(e,n.slice(0,-1)),e}var K=e=>{for(const t in e)if(B(e[t]))return!0;return!1};function Y(e,t={}){const n=Array.isArray(e);if(s(e)||n)for(const n in e)Array.isArray(e[n])||s(e[n])&&!K(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Y(e[n],t[n])):i(e[n])||(t[n]=!0);return t}function X(e,t,n){const r=Array.isArray(e);if(s(e)||r)for(const r in e)Array.isArray(e[r])||s(e[r])&&!K(e[r])?m(t)||D(n[r])?n[r]=Array.isArray(e[r])?Y(e[r],[]):{...Y(e[r])}:X(e[r],i(t)?{}:t[r],n[r]):n[r]=!j(e[r],t[r]);return n}var Z=(e,t)=>X(e,t,Y(t));const J={value:!1,isValid:!1},Q={value:!0,isValid:!0};var ee=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!m(e[0].attributes.value)?m(e[0].value)||""===e[0].value?Q:{value:e[0].value,isValid:!0}:Q:J}return J},te=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>m(e)?e:t?""===e?NaN:e?+e:e:n&&O(e)?new Date(e):r?r(e):e;const ne={isValid:!1,value:null};var re=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,ne):ne;function oe(e){const t=e.ref;return z(t)?t.files:V(t)?re(e.refs).value:U(t)?[...t.selectedOptions].map(({value:e})=>e):o(t)?ee(e.refs).value:te(m(t.value)?e.ref.value:t.value,e)}var ae=(e,t,n,r)=>{const o={};for(const n of e){const e=v(t,n);e&&x(o,n,e._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},ie=e=>e instanceof RegExp,le=e=>m(e)?e:ie(e)?e.source:s(e)?ie(e.value)?e.value.source:e.value:e,se=e=>({isOnSubmit:!e||e===E.onSubmit,isOnBlur:e===E.onBlur,isOnChange:e===E.onChange,isOnAll:e===E.all,isOnTouch:e===E.onTouched});const ce="AsyncFunction";var ue=e=>!!e&&!!e.validate&&!!(B(e.validate)&&e.validate.constructor.name===ce||s(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===ce)),de=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),pe=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));const fe=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const n=v(e,o);if(n){const{_f:e,...a}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],o)&&!r)return!0;if(e.ref&&t(e.ref,e.name)&&!r)return!0;if(fe(a,t))break}else if(s(a)&&fe(a,t))break}}};function he(e,t,n){const r=v(e,n);if(r||h(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const r=o.join("."),a=v(t,r),i=v(e,r);if(a&&!Array.isArray(a)&&n!==r)return{name:n};if(i&&i.type)return{name:r,error:i};if(i&&i.root&&i.root.type)return{name:`${r}.root`,error:i.root};o.pop()}return{name:n}}var me=(e,t,n,r)=>{n(e);const{name:o,...a}=e;return F(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(e=>t[e]===(!r||E.all))},ge=(e,t,n)=>!e||!t||e===t||R(e).some(e=>e&&(n?e===t:e.startsWith(t)||t.startsWith(e))),be=(e,t,n,r,o)=>!o.isOnAll&&(!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:!(n?r.isOnChange:o.isOnChange)||e),ve=(e,t)=>!g(v(e,t)).length&&q(e,t),ye=(e,t,n)=>{const r=R(v(e,n));return x(r,"root",t[n]),x(e,n,r),e},xe=e=>O(e);function we(e,t,n="validate"){if(xe(e)||Array.isArray(e)&&e.every(xe)||y(e)&&!e)return{type:n,message:xe(e)?e:"",ref:t}}var Ee=e=>s(e)&&!ie(e)?e:{value:e,message:""},ke=async(e,t,n,r,a,l)=>{const{ref:c,refs:u,required:d,maxLength:p,minLength:f,min:h,max:g,pattern:b,validate:x,name:w,valueAsNumber:E,mount:A}=e._f,T=v(n,w);if(!A||t.has(w))return{};const S=u?u[0]:c,$=e=>{a&&S.reportValidity&&(S.setCustomValidity(y(e)?"":e||""),S.reportValidity())},C={},I=V(c),L=o(c),M=I||L,R=(E||z(c))&&m(c.value)&&m(T)||H(c)&&""===c.value||""===T||Array.isArray(T)&&!T.length,P=N.bind(null,w,r,C),D=(e,t,n,r="maxLength",o="minLength")=>{const a=e?t:n;C[w]={type:e?r:o,message:a,ref:c,...P(e?r:o,a)}};if(l?!Array.isArray(T)||!T.length:d&&(!M&&(R||i(T))||y(T)&&!T||L&&!ee(u).isValid||I&&!re(u).isValid)){const{value:e,message:t}=xe(d)?{value:!!d,message:d}:Ee(d);if(e&&(C[w]={type:_,message:t,ref:S,...P(_,t)},!r))return $(t),C}if(!(R||i(h)&&i(g))){let e,t;const n=Ee(g),o=Ee(h);if(i(T)||isNaN(T)){const r=c.valueAsDate||new Date(T),a=e=>new Date((new Date).toDateString()+" "+e),i="time"==c.type,l="week"==c.type;O(n.value)&&T&&(e=i?a(T)>a(n.value):l?T>n.value:r>new Date(n.value)),O(o.value)&&T&&(t=i?a(T)<a(o.value):l?T<o.value:r<new Date(o.value))}else{const r=c.valueAsNumber||(T?+T:T);i(n.value)||(e=r>n.value),i(o.value)||(t=r<o.value)}if((e||t)&&(D(!!e,n.message,o.message,"max","min"),!r))return $(C[w].message),C}if((p||f)&&!R&&(O(T)||l&&Array.isArray(T))){const e=Ee(p),t=Ee(f),n=!i(e.value)&&T.length>+e.value,o=!i(t.value)&&T.length<+t.value;if((n||o)&&(D(n,e.message,t.message),!r))return $(C[w].message),C}if(b&&!R&&O(T)){const{value:e,message:t}=Ee(b);if(ie(e)&&!T.match(e)&&(C[w]={type:k,message:t,ref:c,...P(k,t)},!r))return $(t),C}if(x)if(B(x)){const e=we(await x(T,n),S);if(e&&(C[w]={...e,...P("validate",e.message)},!r))return $(e.message),C}else if(s(x)){let e={};for(const t in x){if(!F(e)&&!r)break;const o=we(await x[t](T,n),S,t);o&&(e={...o,...P(t,o.message)},$(o.message),r&&(C[w]=e))}if(!F(e)&&(C[w]={ref:S,...e},!r))return C}return $(!0),C};const _e={mode:E.onSubmit,reValidateMode:E.onChange,shouldFocusError:!0};function Ae(e={}){let t,n={..._e,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:B(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},l={},d=(s(n.defaultValues)||s(n.values))&&f(n.defaultValues||n.values)||{},h=n.shouldUnregister?{}:f(d),b={action:!1,mount:!1,watch:!1},k={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},_=0;const A={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let T={...A};const S={array:P(),state:P()},$=n.criteriaMode===E.all,C=async e=>{if(!n.disabled&&(A.isValid||T.isValid||e)){const e=n.resolver?F((await D()).errors):await V(l,!0);e!==r.isValid&&S.state.next({isValid:e})}},L=(e,t)=>{!n.disabled&&(A.isValidating||A.validatingFields||T.isValidating||T.validatingFields)&&((e||Array.from(k.mount)).forEach(e=>{e&&(t?x(r.validatingFields,e,t):q(r.validatingFields,e))}),S.state.next({validatingFields:r.validatingFields,isValidating:!F(r.validatingFields)}))},M=(e,t,n,r)=>{const o=v(l,e);if(o){const a=v(h,e,m(n)?v(d,e):n);m(a)||r&&r.defaultChecked||t?x(h,e,t?a:oe(o._f)):X(e,a),b.mount&&C()}},N=(e,t,o,a,i)=>{let l=!1,s=!1;const c={name:e};if(!n.disabled){if(!o||a){(A.isDirty||T.isDirty)&&(s=r.isDirty,r.isDirty=c.isDirty=K(),l=s!==c.isDirty);const n=j(v(d,e),t);s=!!v(r.dirtyFields,e),n?q(r.dirtyFields,e):x(r.dirtyFields,e,!0),c.dirtyFields=r.dirtyFields,l=l||(A.dirtyFields||T.dirtyFields)&&s!==!n}if(o){const t=v(r.touchedFields,e);t||(x(r.touchedFields,e,o),c.touchedFields=r.touchedFields,l=l||(A.touchedFields||T.touchedFields)&&t!==o)}l&&i&&S.state.next(c)}return l?c:{}},D=async e=>{L(e,!0);const t=await n.resolver(h,n.context,ae(e||k.mount,l,n.criteriaMode,n.shouldUseNativeValidation));return L(e),t},V=async(e,t,o={valid:!0})=>{for(const a in e){const i=e[a];if(i){const{_f:e,...l}=i;if(e){const l=k.array.has(e.name),s=i._f&&ue(i._f);s&&A.validatingFields&&L([a],!0);const c=await ke(i,k.disabled,h,$,n.shouldUseNativeValidation&&!t,l);if(s&&A.validatingFields&&L([a]),c[e.name]&&(o.valid=!1,t))break;!t&&(v(c,e.name)?l?ye(r.errors,c,e.name):x(r.errors,e.name,c[e.name]):q(r.errors,e.name))}!F(l)&&await V(l,t,o)}}return o.valid},K=(e,t)=>!n.disabled&&(e&&t&&x(h,e,t),!j(ie(),d)),Y=(e,t,n)=>I(e,k,{...b.mount?h:m(t)?d:O(e)?{[e]:t}:t},n,t),X=(e,t,n={})=>{const r=v(l,e);let a=t;if(r){const n=r._f;n&&(!n.disabled&&x(h,e,te(t,n)),a=H(n.ref)&&i(t)?"":t,U(n.ref)?[...n.ref.options].forEach(e=>e.selected=a.includes(e.value)):n.refs?o(n.ref)?n.refs.forEach(e=>{e.defaultChecked&&e.disabled||(Array.isArray(a)?e.checked=!!a.find(t=>t===e.value):e.checked=a===e.value||!!a)}):n.refs.forEach(e=>e.checked=e.value===a):z(n.ref)?n.ref.value="":(n.ref.value=a,n.ref.type||S.state.next({name:e,values:f(h)})))}(n.shouldDirty||n.shouldTouch)&&N(e,a,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&re(e)},J=(e,t,n)=>{for(const r in t){if(!t.hasOwnProperty(r))return;const o=t[r],i=e+"."+r,c=v(l,i);(k.array.has(e)||s(o)||c&&!c._f)&&!a(o)?J(i,o,n):X(i,o,n)}},Q=(e,t,n={})=>{const o=v(l,e),a=k.array.has(e),s=f(t);x(h,e,s),a?(S.array.next({name:e,values:f(h)}),(A.isDirty||A.dirtyFields||T.isDirty||T.dirtyFields)&&n.shouldDirty&&S.state.next({name:e,dirtyFields:Z(d,h),isDirty:K(e,s)})):!o||o._f||i(s)?X(e,s,n):J(e,s,n),pe(e,k)&&S.state.next({...r}),S.state.next({name:b.mount?e:void 0,values:f(h)})},ee=async e=>{b.mount=!0;const o=e.target;let i=o.name,s=!0;const u=v(l,i),d=e=>{s=Number.isNaN(e)||a(e)&&isNaN(e.getTime())||j(e,v(h,i,e))},p=se(n.mode),m=se(n.reValidateMode);if(u){let a,g;const b=o.type?oe(u._f):c(e),E=e.type===w.BLUR||e.type===w.FOCUS_OUT,O=!de(u._f)&&!n.resolver&&!v(r.errors,i)&&!u._f.deps||be(E,v(r.touchedFields,i),r.isSubmitted,m,p),I=pe(i,k,E);x(h,i,b),E?(u._f.onBlur&&u._f.onBlur(e),t&&t(0)):u._f.onChange&&u._f.onChange(e);const M=N(i,b,E),R=!F(M)||I;if(!E&&S.state.next({name:i,type:e.type,values:f(h)}),O)return(A.isValid||T.isValid)&&("onBlur"===n.mode?E&&C():E||C()),R&&S.state.next({name:i,...I?{}:M});if(!E&&I&&S.state.next({...r}),n.resolver){const{errors:e}=await D([i]);if(d(b),s){const t=he(r.errors,l,i),n=he(e,l,t.name||i);a=n.error,i=n.name,g=F(e)}}else L([i],!0),a=(await ke(u,k.disabled,h,$,n.shouldUseNativeValidation))[i],L([i]),d(b),s&&(a?g=!1:(A.isValid||T.isValid)&&(g=await V(l,!0)));s&&(u._f.deps&&re(u._f.deps),((e,o,a,i)=>{const l=v(r.errors,e),s=(A.isValid||T.isValid)&&y(o)&&r.isValid!==o;var c;if(n.delayError&&a?(c=()=>((e,t)=>{x(r.errors,e,t),S.state.next({errors:r.errors})})(e,a),t=e=>{clearTimeout(_),_=setTimeout(c,e)},t(n.delayError)):(clearTimeout(_),t=null,a?x(r.errors,e,a):q(r.errors,e)),(a?!j(l,a):l)||!F(i)||s){const t={...i,...s&&y(o)?{isValid:o}:{},errors:r.errors,name:e};r={...r,...t},S.state.next(t)}})(i,g,a,M))}},ne=(e,t)=>{if(v(r.errors,t)&&e.focus)return e.focus(),1},re=async(e,t={})=>{let o,a;const i=R(e);if(n.resolver){const t=await(async e=>{const{errors:t}=await D(e);if(e)for(const n of e){const e=v(t,n);e?x(r.errors,n,e):q(r.errors,n)}else r.errors=t;return t})(m(e)?e:i);o=F(t),a=e?!i.some(e=>v(t,e)):o}else e?(a=(await Promise.all(i.map(async e=>{const t=v(l,e);return await V(t&&t._f?{[e]:t}:t)}))).every(Boolean),(a||r.isValid)&&C()):a=o=await V(l);return S.state.next({...!O(e)||(A.isValid||T.isValid)&&o!==r.isValid?{}:{name:e},...n.resolver||!e?{isValid:o}:{},errors:r.errors}),t.shouldFocus&&!a&&fe(l,ne,e?i:k.mount),a},ie=e=>{const t={...b.mount?h:d};return m(e)?t:O(e)?v(t,e):e.map(e=>v(t,e))},ce=(e,t)=>({invalid:!!v((t||r).errors,e),isDirty:!!v((t||r).dirtyFields,e),error:v((t||r).errors,e),isValidating:!!v(r.validatingFields,e),isTouched:!!v((t||r).touchedFields,e)}),xe=(e,t,n)=>{const o=(v(l,e,{_f:{}})._f||{}).ref,a=v(r.errors,e)||{},{ref:i,message:s,type:c,...u}=a;x(r.errors,e,{...u,...t,ref:o}),S.state.next({name:e,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&o&&o.focus&&o.focus()},we=e=>S.state.subscribe({next:t=>{ge(e.name,t.name,e.exact)&&me(t,e.formState||A,Ie,e.reRenderRoot)&&e.callback({values:{...h},...r,...t})}}).unsubscribe,Ee=(e,t={})=>{for(const o of e?R(e):k.mount)k.mount.delete(o),k.array.delete(o),t.keepValue||(q(l,o),q(h,o)),!t.keepError&&q(r.errors,o),!t.keepDirty&&q(r.dirtyFields,o),!t.keepTouched&&q(r.touchedFields,o),!t.keepIsValidating&&q(r.validatingFields,o),!n.shouldUnregister&&!t.keepDefaultValue&&q(d,o);S.state.next({values:f(h)}),S.state.next({...r,...t.keepDirty?{isDirty:K()}:{}}),!t.keepIsValid&&C()},Ae=({disabled:e,name:t})=>{(y(e)&&b.mount||e||k.disabled.has(t))&&(e?k.disabled.add(t):k.disabled.delete(t))},Te=(e,t={})=>{let r=v(l,e);const o=y(t.disabled)||y(n.disabled);return x(l,e,{...r||{},_f:{...r&&r._f?r._f:{ref:{name:e}},name:e,mount:!0,...t}}),k.mount.add(e),r?Ae({disabled:y(t.disabled)?t.disabled:n.disabled,name:e}):M(e,!0,t.value),{...o?{disabled:t.disabled||n.disabled}:{},...n.progressive?{required:!!t.required,min:le(t.min),max:le(t.max),minLength:le(t.minLength),maxLength:le(t.maxLength),pattern:le(t.pattern)}:{},name:e,onChange:ee,onBlur:ee,ref:o=>{if(o){Te(e,t),r=v(l,e);const n=m(o.value)&&o.querySelectorAll&&o.querySelectorAll("input,select,textarea")[0]||o,a=G(n),i=r._f.refs||[];if(a?i.find(e=>e===n):n===r._f.ref)return;x(l,e,{_f:{...r._f,...a?{refs:[...i.filter(W),n,...Array.isArray(v(d,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),M(e,!1,void 0,n)}else r=v(l,e,{}),r._f&&(r._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!u(k.array,e)||!b.action)&&k.unMount.add(e)}}},Se=()=>n.shouldFocusError&&fe(l,ne,k.mount),$e=(e,t)=>async o=>{let a;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let i=f(h);if(S.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await D();r.errors=e,i=f(t)}else await V(l);if(k.disabled.size)for(const e of k.disabled)q(i,e);if(q(r.errors,"root"),F(r.errors)){S.state.next({errors:{}});try{await e(i,o)}catch(e){a=e}}else t&&await t({...r.errors},o),Se(),setTimeout(Se);if(S.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:F(r.errors)&&!a,submitCount:r.submitCount+1,errors:r.errors}),a)throw a},Ce=(e,t={})=>{const o=e?f(e):d,a=f(o),i=F(e),s=i?d:a;if(t.keepDefaultValues||(d=o),!t.keepValues){if(t.keepDirtyValues){const e=new Set([...k.mount,...Object.keys(Z(d,h))]);for(const t of Array.from(e))v(r.dirtyFields,t)?x(s,t,v(h,t)):Q(t,v(s,t))}else{if(p&&m(e))for(const e of k.mount){const t=v(l,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(H(e)){const t=e.closest("form");if(t){t.reset();break}}}}if(t.keepFieldsRef)for(const e of k.mount)Q(e,v(s,e));else l={}}h=n.shouldUnregister?t.keepDefaultValues?f(d):{}:f(s),S.array.next({values:{...s}}),S.state.next({values:{...s}})}k={mount:t.keepDirtyValues?k.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},b.mount=!A.isValid||!!t.keepIsValid||!!t.keepDirtyValues,b.watch=!!n.shouldUnregister,S.state.next({submitCount:t.keepSubmitCount?r.submitCount:0,isDirty:!i&&(t.keepDirty?r.isDirty:!(!t.keepDefaultValues||j(e,d))),isSubmitted:!!t.keepIsSubmitted&&r.isSubmitted,dirtyFields:i?{}:t.keepDirtyValues?t.keepDefaultValues&&h?Z(d,h):r.dirtyFields:t.keepDefaultValues&&e?Z(d,e):t.keepDirty?r.dirtyFields:{},touchedFields:t.keepTouched?r.touchedFields:{},errors:t.keepErrors?r.errors:{},isSubmitSuccessful:!!t.keepIsSubmitSuccessful&&r.isSubmitSuccessful,isSubmitting:!1})},Oe=(e,t)=>Ce(B(e)?e(h):e,t),Ie=e=>{r={...r,...e}},Le={control:{register:Te,unregister:Ee,getFieldState:ce,handleSubmit:$e,setError:xe,_subscribe:we,_runSchema:D,_focusError:Se,_getWatch:Y,_getDirty:K,_setValid:C,_setFieldArray:(e,t=[],o,a,i=!0,s=!0)=>{if(a&&o&&!n.disabled){if(b.action=!0,s&&Array.isArray(v(l,e))){const t=o(v(l,e),a.argA,a.argB);i&&x(l,e,t)}if(s&&Array.isArray(v(r.errors,e))){const t=o(v(r.errors,e),a.argA,a.argB);i&&x(r.errors,e,t),ve(r.errors,e)}if((A.touchedFields||T.touchedFields)&&s&&Array.isArray(v(r.touchedFields,e))){const t=o(v(r.touchedFields,e),a.argA,a.argB);i&&x(r.touchedFields,e,t)}(A.dirtyFields||T.dirtyFields)&&(r.dirtyFields=Z(d,h)),S.state.next({name:e,isDirty:K(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else x(h,e,t)},_setDisabledField:Ae,_setErrors:e=>{r.errors=e,S.state.next({errors:r.errors,isValid:!1})},_getFieldArray:e=>g(v(b.mount?h:d,e,n.shouldUnregister?v(d,e,[]):[])),_reset:Ce,_resetDefaultValues:()=>B(n.defaultValues)&&n.defaultValues().then(e=>{Oe(e,n.resetOptions),S.state.next({isLoading:!1})}),_removeUnmounted:()=>{for(const e of k.unMount){const t=v(l,e);t&&(t._f.refs?t._f.refs.every(e=>!W(e)):!W(t._f.ref))&&Ee(e)}k.unMount=new Set},_disableForm:e=>{y(e)&&(S.state.next({disabled:e}),fe(l,(t,n)=>{const r=v(l,n);r&&(t.disabled=r._f.disabled||e,Array.isArray(r._f.refs)&&r._f.refs.forEach(t=>{t.disabled=r._f.disabled||e}))},0,!1))},_subjects:S,_proxyFormState:A,get _fields(){return l},get _formValues(){return h},get _state(){return b},set _state(e){b=e},get _defaultValues(){return d},get _names(){return k},set _names(e){k=e},get _formState(){return r},get _options(){return n},set _options(e){n={...n,...e}}},subscribe:e=>(b.mount=!0,T={...T,...e.formState},we({...e,formState:T})),trigger:re,register:Te,handleSubmit:$e,watch:(e,t)=>B(e)?S.state.subscribe({next:n=>e(Y(void 0,t),n)}):Y(e,t,!0),setValue:Q,getValues:ie,reset:Oe,resetField:(e,t={})=>{v(l,e)&&(m(t.defaultValue)?Q(e,f(v(d,e))):(Q(e,t.defaultValue),x(d,e,f(t.defaultValue))),t.keepTouched||q(r.touchedFields,e),t.keepDirty||(q(r.dirtyFields,e),r.isDirty=t.defaultValue?K(e,f(v(d,e))):K()),t.keepError||(q(r.errors,e),A.isValid&&C()),S.state.next({...r}))},clearErrors:e=>{e&&R(e).forEach(e=>q(r.errors,e)),S.state.next({errors:e?r.errors:{}})},unregister:Ee,setError:xe,setFocus:(e,t={})=>{const n=v(l,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&(e.focus(),t.shouldSelect&&B(e.select)&&e.select())}},getFieldState:ce};return{...Le,formControl:Le}}function Te(e={}){const t=r.useRef(void 0),n=r.useRef(void 0),[o,a]=r.useState({isDirty:!1,isValidating:!1,isLoading:B(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:B(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:o},e.defaultValues&&!B(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:n,...r}=Ae(e);t.current={...r,formState:o}}const i=t.current.control;return i._options=e,$(()=>{const e=i._subscribe({formState:i._proxyFormState,callback:()=>a({...i._formState}),reRenderRoot:!0});return a(e=>({...e,isReady:!0})),i._formState.isReady=!0,e},[i]),r.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),r.useEffect(()=>{e.mode&&(i._options.mode=e.mode),e.reValidateMode&&(i._options.reValidateMode=e.reValidateMode)},[i,e.mode,e.reValidateMode]),r.useEffect(()=>{e.errors&&(i._setErrors(e.errors),i._focusError())},[i,e.errors]),r.useEffect(()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,e.shouldUnregister]),r.useEffect(()=>{if(i._proxyFormState.isDirty){const e=i._getDirty();e!==o.isDirty&&i._subjects.state.next({isDirty:e})}},[i,o.isDirty]),r.useEffect(()=>{e.values&&!j(e.values,n.current)?(i._reset(e.values,{keepFieldsRef:!0,...i._options.resetOptions}),n.current=e.values,a(e=>({...e}))):i._resetDefaultValues()},[i,e.values]),r.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=S(o,i),t.current}},881:(e,t,n)=>{"use strict";n.d(t,{_H:()=>i,dg:()=>c,jq:()=>a,lV:()=>l,zE:()=>s});var r=n(3864),o=n(6538);const a=r.AH`
|
|
86
|
+
&:focus-within {
|
|
87
|
+
outline: 1px solid
|
|
88
|
+
${e=>{let{theme:t}=e;return(0,o.w5)(t.panelBackground,"rgba(255, 255, 255, 0.8)","rgba(0, 0, 0, 0.8)")}};
|
|
89
|
+
}
|
|
90
|
+
`,i=r.Ay.div`
|
|
91
|
+
padding: 12px;
|
|
92
|
+
box-shadow:
|
|
93
|
+
0px 0px 1px rgba(0, 0, 0, 0.24),
|
|
94
|
+
0px 2px 6px rgba(0, 0, 0, 0.04);
|
|
95
|
+
border-radius: 6px;
|
|
96
|
+
margin: 3px 0 2px;
|
|
97
|
+
background: ${e=>{let{theme:t}=e;return t.panelBackground}};
|
|
98
|
+
background-color: ${e=>{let{theme:t}=e;return t.panelBackground}};
|
|
99
|
+
`,l=r.Ay.form`
|
|
128
100
|
display: flex;
|
|
129
101
|
flex-direction: column;
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
margin: 0;
|
|
135
|
-
}
|
|
136
|
-
`,d=l.Ay.label`
|
|
137
|
-
font-size: var(--_kindlychat-font-size-sm);
|
|
138
|
-
margin: 4px 0;
|
|
102
|
+
flex: 1;
|
|
103
|
+
${e=>{let{$isSubmitted:t}=e;return t?"*:invalid {\n border: 1px solid var(--panel-background-white-black-contrast-1743170834);\n }":"*:invalid {\n border: 1px solid transparent;\n }"}}
|
|
104
|
+
`,s=r.Ay.div`
|
|
105
|
+
font-size: var(--_kindlychat-font-size-p);
|
|
139
106
|
font-weight: 500;
|
|
107
|
+
display: flex;
|
|
108
|
+
align-items: center;
|
|
140
109
|
color: var(--panel-background-white-black-contrast-1743170834);
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
110
|
+
& > svg {
|
|
111
|
+
margin-right: 4px;
|
|
112
|
+
& > path {
|
|
113
|
+
stroke: var(--panel-background-white-black-contrast-1743170834);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
`,c=r.Ay.div`
|
|
117
|
+
display: flex;
|
|
118
|
+
flex-direction: row;
|
|
119
|
+
align-self: flex-end;
|
|
120
|
+
justify-content: flex-end;
|
|
121
|
+
margin-top: 16px;
|
|
122
|
+
& > button {
|
|
123
|
+
&:last-child {
|
|
124
|
+
margin-left: 12px;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
`},1003:(e,t,n)=>{"use strict";var r=n(8099),o=n(8900),a=n(2769),i=function(e){return a(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?i(r[e])||i(o[e]):r[e]&&r[e][t]||o[e]&&o[e][t]}},1005:(e,t,n)=>{"use strict";var r=n(3273),o=n(4574),a=n(8130),i=function(e){return function(t,n,i){var l=r(t),s=a(l);if(0===s)return!e&&-1;var c,u=o(i,s);if(e&&n!=n){for(;s>u;)if((c=l[u++])!=c)return!0}else for(;s>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:i(!0),indexOf:i(!1)}},1019:(e,t,n)=>{"use strict";n(3855);var r=n(2856);e.exports=r("String","includes")},1085:(e,t,n)=>{"use strict";e.exports=n(3335)},1112:(e,t,n)=>{"use strict";n.d(t,{Du:()=>s,Mb:()=>u,cL:()=>c,mw:()=>d});var r=n(2221),o=n(4851),a=n(7243),i=n(6079),l=n(7173);const s=e=>async t=>{const n=await e;200===(null==n?void 0:n.status)&&(t({type:l.nz,...n}),t((0,i.uK)()))},c=()=>(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:i}}=t();e((0,a.et)(`${i}/chatbubble/${r.Ak}/takeover_cancel/`,{method:"POST",...(0,o.A)({token:n})})),e({type:l.MM})},u=()=>(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:i}}=t();e({type:l.c6}),e((0,a.et)(`${i}/chatbubble/${r.Ak}/user_started_typing/`,{method:"POST",...(0,o.A)({token:n})}))},d=()=>(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:i}}=t();e({type:l.we}),e((0,a.et)(`${i}/chatbubble/${r.Ak}/user_stopped_typing/`,{method:"POST",...(0,o.A)({token:n})}))}},1121:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(2009);const o=e=>{let{buttons:t=[],...n}=e;return{...n,buttons:t.map(r.A)}}},1139:(e,t,n)=>{"use strict";var r=n(8407),o=String;e.exports=function(e){if("Symbol"===r(e))throw new TypeError("Cannot convert a Symbol value to a string");return o(e)}},1203:e=>{"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},1268:(e,t,n)=>{"use strict";var r=n(6100),o=0,a=Math.random(),i=r(1.1.toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+i(++o+a,36)}},1318:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(9749),o=n.n(r);const a=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(e).reduce((e,n)=>{let[r,a]=n;return{...e,...o()(t).call(t,r)?{}:{[r]:a}}},{})}}},1328:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(541),o=n(1695);function a(){var e;const{supportedLanguages:t}=window.__KINDLY_SETTINGS__,{includeDisabledLanguages:n}=(0,r.d4)(o.Od),{currentLanguage:a}=(0,r.d4)(o.$P),i=null===(e=t.find(e=>{let{is_primary:t}=e;return t}))||void 0===e?void 0:e.code;if(!i)throw new Error("No primary language found in supported languages");const l=t.filter(e=>{let{is_active:t}=e;return t});return{primaryLanguageCode:i,currentLanguageCode:a,supportedLanguages:n?t:l}}},1330:(e,t,n)=>{"use strict";var r=n(5024),o=n(1203);e.exports=r&&o(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},1346:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(9155),o=n.n(r);function a(e){let{title:t="File attachment",...n}=e;return o().createElement("svg",Object.assign({width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),o().createElement("title",null,t),o().createElement("path",{d:"m19.25 11.951-6.117 5.91c-1.917 1.852-5.027 1.852-6.945 0a4.632 4.632 0 0 1 .018-6.729L8.36 9.075m0 0 .493-.471m-.493.47 3.491-3.372c1.313-1.268 3.44-1.268 4.752 0a3.17 3.17 0 0 1-.012 4.603l-3.238 3.095M8.36 9.075l-.417.403m5.41 3.922.367-.354m-.367.354-2.47 2.387a1.86 1.86 0 0 1-2.565 0 1.711 1.711 0 0 1 0-2.479l4.727-4.566",stroke:"#6A778A",strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}))}},1395:(e,t,n)=>{"use strict";var r=n(6100),o=n(1203),a=n(9932),i=Object,l=r("".split);e.exports=o(function(){return!i("z").propertyIsEnumerable(0)})?function(e){return"String"===a(e)?l(e,""):i(e)}:i},1435:(e,t,n)=>{"use strict";n.d(t,{Gb:()=>r.A,cS:()=>E.A,ZH:()=>Q,pd:()=>x,l6:()=>S,Ap:()=>w.A,TM:()=>ee.A});var r=n(9662),o=n(9155),a=n.n(o),i=n(824),l=n(3864),s=n(492),c=n(8905),u=n(6538),d=n(881);const p=l.Ay.div`
|
|
148
128
|
position: relative;
|
|
149
129
|
display: flex;
|
|
150
|
-
`,
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
${e=>{let{
|
|
130
|
+
`,f=l.Ay.div`
|
|
131
|
+
padding: 0 4px;
|
|
132
|
+
position: absolute;
|
|
133
|
+
top: 50%;
|
|
134
|
+
transform: translateY(-50%);
|
|
135
|
+
font-size: var(--_kindlychat-font-size-p);
|
|
136
|
+
display: ${e=>{let{$show:t}=e;return t?"block;":"none;"}}
|
|
137
|
+
${e=>{let{$adornmentPosition:t}=e;return"start"===t?"\n left: 10px;\n ":"\n left: auto;\n right: 10px;\n "}};
|
|
138
|
+
`,h=l.Ay.input`
|
|
139
|
+
${e=>{let{theme:t}=e;return(0,s.Mo)(t.panelBackground,.08)}}
|
|
157
140
|
color: var(--panel-background-white-black-contrast-1743170834);
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
max-height: unset;
|
|
165
|
-
`}
|
|
166
|
-
|
|
167
|
-
${e=>{let{$hasMaxLength:t}=e;if(t)return"padding-bottom: 24px;"}}
|
|
141
|
+
padding: 10px 16px;
|
|
142
|
+
${e=>{let{$adornmentWidth:t,$adornmentPosition:n,$hasMaxLength:r}=e;if("end"===n&&!r&&t)return`padding-right: ${t+10}px;`;if("start"===n&&t){let e=`padding-left: ${t+10}px;`;return r&&(e+="padding-right: 48px;"),e}return r?"padding-right: 56px;":void 0}}
|
|
143
|
+
font-size: var(--_kindlychat-font-size-p);
|
|
144
|
+
border-radius: 18px;
|
|
145
|
+
border: 1px solid transparent;
|
|
146
|
+
flex: 1;
|
|
168
147
|
|
|
169
148
|
&:focus {
|
|
170
149
|
color: var(--panel-background-white-black-contrast-1743170834);
|
|
171
150
|
box-shadow: none;
|
|
172
151
|
border: 1px solid
|
|
173
|
-
${e=>{let{theme:t}=e;return(0,
|
|
152
|
+
${e=>{let{theme:t}=e;return(0,u.w5)(t.panelBackground,"rgba(255, 255, 255, 0.12)","rgba(0, 0, 0, 0.12)")}};
|
|
174
153
|
|
|
175
154
|
${s.sF}
|
|
176
155
|
}
|
|
177
156
|
|
|
178
157
|
&::placeholder {
|
|
179
|
-
color: ${e=>{let{theme:t}=e;return(0,
|
|
158
|
+
color: ${e=>{let{theme:t}=e;return(0,u.w5)(t.panelBackground,"#FFF","#000")}};
|
|
180
159
|
opacity: 0.5;
|
|
181
160
|
}
|
|
182
|
-
|
|
161
|
+
|
|
162
|
+
&::-webkit-outer-spin-button,
|
|
163
|
+
&::-webkit-inner-spin-button {
|
|
164
|
+
appearance: none;
|
|
165
|
+
margin: 0;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
&[type='number'] {
|
|
169
|
+
-moz-appearance: textfield; /* stylelint-disable-line property-no-vendor-prefix */
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/* For iOS so it won't zoom, increases to ~16px */
|
|
173
|
+
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
174
|
+
text-size-adjust: ${(0,s.L9)(c.J.p)}%;
|
|
175
|
+
${d.jq}
|
|
176
|
+
`;var m=n(9416),g=n(8020),b=n(587),v=n(8780),y=n(5814);const x=function(e){var t,n,r,l,s;let{autoComplete:c="off",name:u,type:d="text",register:x,validators:w,control:E,id:k,setError:_,clearErrors:A,trigger:T,adornment:S,adornmentPosition:$="end",...C}=e;const O=(0,y.G8)(w),I=(0,o.useRef)(null),{ref:L,onChange:M,...N}=x?x(u,O):{},[,R]=(0,o.useState)(!1),{errors:P,isSubmitted:D}=(0,i.lN)({name:u,control:E}),j=(0,b.A)({name:u,trigger:T,control:E,setError:_,clearErrors:A});return a().createElement(a().Fragment,null,a().createElement(p,null,S&&a().createElement(f,{ref:e=>{I.current=e,R(!0)},$show:!(null!==(t=O.maxLength)&&void 0!==t&&t.value&&"end"===$),$adornmentPosition:$},S),a().createElement(h,Object.assign({autoComplete:c,name:u,type:d.toLowerCase(),$adornmentPosition:$,$adornmentWidth:null===(n=I.current)||void 0===n?void 0:n.clientWidth,$hasMaxLength:!(null===(r=O.maxLength)||void 0===r||!r.value),id:k||u},(0,y.NR)(O),N&&{...N},{onChange:e=>{null==M||M(e),j(e)},ref:L,"aria-errormessage":`error_${u}`,"aria-invalid":!(0,v.A)(P)&&D},C)),!(null===(l=O.maxLength)||void 0===l||!l.value)&&E&&u&&a().createElement(m.A,{fieldName:u,control:E,maxLength:null===(s=O.maxLength)||void 0===s?void 0:s.value})),a().createElement(g.A,{control:E,name:u}))};var w=n(4044),E=n(9910),k=n(368);const _=l.Ay.div`
|
|
177
|
+
position: relative;
|
|
178
|
+
display: flex;
|
|
179
|
+
`,A=l.Ay.select`
|
|
180
|
+
background-color: ${e=>{let{theme:t}=e;return(0,s.Mo)(t.panelBackground,.08)}};
|
|
181
|
+
color: ${e=>{let{theme:t,$isPlaceholder:n}=e;return n?(0,u.w5)(t.panelBackground,"rgba(255, 255, 255, 0.46)","rgba(0, 0, 0, 0.46)"):(0,u.w5)(t.panelBackground,"#FFFFFF","#000000")}};
|
|
182
|
+
padding: 9px 16px;
|
|
183
|
+
padding-right: 42px;
|
|
184
|
+
border-radius: 18px;
|
|
185
|
+
border: 1px solid transparent;
|
|
186
|
+
outline: none;
|
|
187
|
+
flex: 1;
|
|
188
|
+
display: inline-block;
|
|
189
|
+
appearance: none;
|
|
190
|
+
text-indent: 1px;
|
|
191
|
+
text-overflow: '';
|
|
192
|
+
max-width: 100%;
|
|
193
|
+
|
|
194
|
+
& option {
|
|
195
|
+
color: initial;
|
|
196
|
+
}
|
|
197
|
+
${d.jq}
|
|
198
|
+
`,T=l.Ay.div`
|
|
199
|
+
position: absolute;
|
|
200
|
+
right: 20px;
|
|
201
|
+
top: 6px;
|
|
202
|
+
width: 10px;
|
|
203
|
+
height: 6px;
|
|
204
|
+
pointer-events: none;
|
|
205
|
+
user-select: none;
|
|
206
|
+
|
|
207
|
+
svg path {
|
|
208
|
+
stroke: ${e=>{let{theme:t}=e;return(0,u.w5)(t.panelBackground,"#FFFFFF","#000000")}};
|
|
209
|
+
}
|
|
210
|
+
`,S=function(e){let{name:t,register:n,validators:r,control:o,id:l,setError:s,clearErrors:c,trigger:u,options:d,...p}=e;const f=(0,y.G8)(r),{ref:h,onChange:m,...v}=n?n(t,f):{},x=(0,i.FH)({name:t,control:o}),w=(0,b.A)({name:t,trigger:u,control:o,setError:s,clearErrors:c});return a().createElement(a().Fragment,null,a().createElement(_,null,a().createElement(A,Object.assign({name:t,type:"select",$isPlaceholder:""===x,id:l||t},(0,y.NR)(f),v&&{...v},{onChange:e=>{null==m||m(e),w(e)},ref:h},p),p.placeholder&&a().createElement("option",{value:"",disabled:!0,hidden:!0},p.placeholder),null==d?void 0:d.map((e,n)=>a().createElement("option",{key:`select-${t}-${e.id||n}`,value:e.value},e.label))),a().createElement(T,null,a().createElement(k.A,{color:"#445265"}))),a().createElement(g.A,{control:o,name:t}))};var $=n(9749),C=n.n($),O=n(541),I=n(5256),L=n(9405),M=n(7355),N=n(2221),R=n(491),P=n(1328),D=n(9886),j=n(1695),F=n(3699),z=n(6064);const B=l.Ay.div`
|
|
211
|
+
position: relative;
|
|
212
|
+
display: flex;
|
|
213
|
+
flex-direction: column;
|
|
214
|
+
`,H=l.Ay.label`
|
|
215
|
+
padding: ${e=>{let{$hasError:t}=e;return t?13:24}}px;
|
|
216
|
+
display: flex;
|
|
217
|
+
flex-direction: column;
|
|
218
|
+
align-items: center;
|
|
219
|
+
justify-content: center;
|
|
220
|
+
cursor: pointer;
|
|
221
|
+
flex: 1;
|
|
222
|
+
border-radius: 6px;
|
|
223
|
+
color: var(--panel-background-white-black-contrast-1743170834);
|
|
224
|
+
border: 1px dashed
|
|
225
|
+
${e=>{let{theme:t}=e;return(0,u.w5)(t.panelBackground,t.buttonBackground,"rgba(0, 0, 0, 0.12)")}};
|
|
226
|
+
${e=>{let{$hasError:t}=e;return t&&l.AH`
|
|
227
|
+
background-color: #f9ef94 !important;
|
|
228
|
+
border: 1px solid #f9ef94 !important;
|
|
229
|
+
`}}
|
|
230
|
+
${d.jq}
|
|
231
|
+
${e=>{let{theme:t,$isOver:n}=e;return n&&(0,s.Mo)(t.panelBackground,.08)}}
|
|
232
|
+
`,U=l.Ay.span`
|
|
233
|
+
font-size: var(--_kindlychat-font-size-sm);
|
|
234
|
+
font-weight: 500;
|
|
235
|
+
pointer-events: none;
|
|
236
|
+
line-height: 16px;
|
|
237
|
+
`,V=l.Ay.input`
|
|
238
|
+
width: 0.1px;
|
|
239
|
+
height: 0.1px;
|
|
240
|
+
opacity: 0;
|
|
241
|
+
overflow: hidden;
|
|
242
|
+
position: absolute;
|
|
243
|
+
z-index: -1;
|
|
244
|
+
`,G=l.Ay.span`
|
|
245
|
+
color: ${e=>{let{theme:t}=e;return t.buttonBackground}};
|
|
246
|
+
`,W=l.Ay.div`
|
|
247
|
+
margin-top: 8px;
|
|
248
|
+
display: flex;
|
|
249
|
+
flex-direction: row;
|
|
250
|
+
font-size: var(--_kindlychat-font-size-sm);
|
|
251
|
+
color: var(--panel-background-white-black-contrast-1743170834);
|
|
252
|
+
& svg > path {
|
|
253
|
+
stroke: var(--panel-background-white-black-contrast-1743170834);
|
|
254
|
+
}
|
|
255
|
+
`,q=l.Ay.div`
|
|
256
|
+
display: flex;
|
|
257
|
+
flex-direction: column;
|
|
258
|
+
& > div {
|
|
259
|
+
word-break: normal;
|
|
260
|
+
overflow-wrap: anywhere;
|
|
261
|
+
}
|
|
262
|
+
`,K=l.Ay.div`
|
|
263
|
+
font-size: var(--_kindlychat-font-size-sm);
|
|
264
|
+
`,Y=l.Ay.div`
|
|
265
|
+
display: flex;
|
|
266
|
+
flex-direction: row;
|
|
267
|
+
align-items: center;
|
|
268
|
+
margin-bottom: 4px;
|
|
269
|
+
line-height: 16px;
|
|
270
|
+
`;var X=n(8043);const Z=e=>{if(e.length){const t=new DataTransfer;return e.forEach(e=>{t.items.add(e)}),t}},J=(e,t)=>{let[...n]=e,[...r]=t;const o=n;return r.forEach(e=>{o.some(t=>e.name===t.name&&e.size===t.size)||o.push(e)}),o},Q=function(e){var t,n,r,l;let{name:s,label:c,register:u,validators:d,control:p,id:f,setError:h,trigger:m,setValue:x,clearErrors:w,accept:E=N.oY,...k}=e;const{text:_}=(0,O.d4)(j.Od),{currentLanguageCode:A}=(0,P.A)(),T=(0,y.G8)(d),S=(0,o.useRef)(null),$=(0,o.useCallback)(e=>e.length>5?"You can upload up to 5 files at a time.":"",[]),Q=(0,o.useCallback)(e=>{if(e.length){const t=E.split(",").map(e=>e.replace("/*",""));if([...e].some(e=>!t.some(t=>e.name.endsWith(t))&&!C()(t).call(t,e.type.substring(0,e.type.indexOf("/")))))return`${(0,z.A)(_.file_supported_types,A)}: ${E}`}return""},[E,A,_.file_supported_types]),ee=(0,o.useCallback)(e=>e.length&&[...e].some(e=>e.size/F.aO>F.UN)?`${(0,z.A)(_.file_maximum_size,A)}: ${(0,F.B$)(F.UN*F.aO)}`:"",[A,_.file_maximum_size]),{ref:te,...ne}=u?u(s,T):{ref:void 0},re=(0,o.useRef)(null),{errors:oe,isSubmitted:ae}=(0,i.lN)({name:s,control:p}),ie=(0,D.A)(oe),le=(0,b.A)({name:s,trigger:m,control:p,setError:h,clearErrors:w}),[,se]=(0,o.useState)(null),[ce,ue]=(0,o.useState)([]),[de,pe]=(0,o.useState)(!1);return(0,R.A)("dragover",e=>{e.preventDefault()},re.current),(0,R.A)("dragenter",e=>{e.preventDefault(),pe(!0)},re.current),(0,R.A)("dragleave",e=>{e.preventDefault(),pe(!1)},re.current),(0,R.A)("drop",e=>{e.preventDefault();const t=J(ce,e.dataTransfer.files),n=Q(e.dataTransfer.files)||$(t)||ee(e.dataTransfer.files);if(n)return null==h?void 0:h(s,{type:"custom",message:n});oe[s]&&(null==w||w(s)),ue(t);const r=Z(t);return null==x||x(s,null==r?void 0:r.files,{shouldValidate:!0}),S.current&&null!=r&&r.files.length&&(S.current.files=r.files),pe(!1),!0},re.current),(0,R.A)("change",e=>{e.preventDefault();const t=J(ce,e.target.files),n=$(t)||ee(e.target.files);if(n)return null==h?void 0:h(s,{type:"custom",message:n});oe[s]&&(null==w||w(s)),ue(t);const r=Z(t);return S.current&&null!=r&&r.files.length&&(S.current.files=r.files),le(e),!0},S.current),a().createElement(a().Fragment,null,a().createElement(B,null,a().createElement(H,{"aria-describedby":f||s,ref:e=>{re.current=e,se(void 0)},$hasError:(null==oe?void 0:oe[s])&&"required"!==(null==oe||null===(t=oe[s])||void 0===t?void 0:t.type),$isOver:de,htmlFor:f||s},(null===(n=oe||ie)||void 0===n||null===(r=n[s])||void 0===r?void 0:r.message)&&a().createElement(Y,null,a().createElement(I.Fc,{width:18,height:18}),a().createElement(K,null,null===(l=(oe||ie)[s])||void 0===l?void 0:l.message)),a().createElement(U,null,(e=>e.split(/\[(.*?)\]/).map((e,t)=>t%2!=0?a().createElement(G,{key:`file-${e}`},e):a().createElement("span",{key:`file-${e}`}," ",e)))(c)),a().createElement(V,Object.assign({multiple:!0,accept:E,name:s,type:"file",id:f||s},(0,y.NR)(T),ne&&{...ne},{ref:e=>{S.current=e,te&&te(e)},"aria-errormessage":`error_${s}`,"aria-invalid":!(0,v.A)(oe)&&ae,"aria-hidden":"true"},k))),a().createElement(W,null,(0,z.A)(_.file_limitation,A),a().createElement(M.A,{text:a().createElement(q,null,a().createElement("div",null,(0,z.A)(_.file_maximum_size,A),": ",(0,F.B$)(F.UN*F.aO)),a().createElement("div",null,(0,z.A)(_.file_supported_types,A),": ",E)),position:"top"},a().createElement(L.A,{width:18,height:18})))),a().createElement(g.A,{control:p,name:s}),ce.map((e,t)=>a().createElement(X.A,{key:`${e.name}-${e.size}}`,file:e,onRemove:()=>{const e=[...ce];e.splice(t,1),ue(e),null==x||x(s,e.length?e:void 0,{shouldValidate:!0})}})))};var ee=n(3950)},1623:(e,t,n)=>{"use strict";n.d(t,{Y_:()=>f,kS:()=>m,fe:()=>h,mR:()=>g,vJ:()=>d,NS:()=>p});var r=n(4851);const o=(e,t)=>{const{type:n}=e;let r;return"Form"===n?r=(e=>{let{title:t,body_text:n,input_label:r,input_placeholder:o,languageCode:a}=e;return{sections:[{title:t[a],description:n[a]},{form:{input:{label:r[a],placeholder:o[a],required:!0},button:{title:"Send skjema",icon:"icon",type:"submit"}}}]}})({...e,languageCode:t}):"Product"===n?r=(e=>{var t;let{title:n,body_text:r,button_text:o,button_link:a,carousel_title:i,image_carousel:l,languageCode:s}=e;return{sections:[{title:n[s],description:r[s],buttons:[{label:o[s],value:a[s],button_type:"link",is_active:!0}]},{products:{title:i[s],items:null===(t=l[s])||void 0===t?void 0:t.map(e=>{let{title:t,alt_text:n,description:r,image_url:o,product_url:a,link_text:i,link_url:l,price:s}=e;return{title:t,image:o,linkText:i,linkUrl:l,productUrl:a,altText:n,description:r,price:s}})}}]}})({...e,languageCode:t}):"Text"===n?r=(e=>{let{title:t,body_text:n,link_text:r,link_location:o,languageCode:a}=e;return{sections:[{title:t[a],description:n[a]},{link:{text:r[a],location:o[a]}}]}})({...e,languageCode:t}):"Multiple choice"===n?r=(e=>{let{title:t,body_text:n,button_blocks:r,languageCode:o}=e;return{sections:[{title:t[o],description:n[o]},{choices:{buttons:r.map(e=>{let{button_text:t,dialogue_id:n}=e;return{text:t[o],triggerDialogue:n}})}}]}})({...e,languageCode:t}):"Custom"===n&&(r={}),r};var a=n(5564),i=n(7243),l=n(2221),s=n(2366),c=n(7173);const u=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=t.find(e=>{let{is_primary:t}=e;return t}),o=n||r.code;return e.enabled[o]},d=e=>{let{slug:t,eventType:n,label:o}=e;return async(e,d)=>{if(!t||!n)return;const{supportedLanguages:p}=window.__KINDLY_SETTINGS__,{nudges:f}=d().bot,{currentLanguage:h}=d().chatbubble,m=(e=>{var t,n,r,o,a;return[...null!==(t=null==e?void 0:e.form_nudges)&&void 0!==t?t:[],...null!==(n=null==e?void 0:e.custom_nudges)&&void 0!==n?n:[],...null!==(r=null==e?void 0:e.product_nudges)&&void 0!==r?r:[],...null!==(o=null==e?void 0:e.text_nudges)&&void 0!==o?o:[],...null!==(a=null==e?void 0:e.multiple_choice_nudges)&&void 0!==a?a:[]]})(f),g=m.find(e=>e.slug===t&&u(e,p,h));g&&(e({type:c.wX,slug:t}),n!==c.MO&&n!==c.oE||await e((e=>{let{targetNudge:t,eventType:n,label:o,currentLanguage:c}=e;return async(e,u)=>{const{botKey:d}=u().chatbubble,{PAT_HOST:p}=u().environment,{token:f}=u().connection,h=await e((0,a.z5)());e((0,i.et)(`${p}/chatbubble/${l.Ak}/nudge/`,{method:"POST",body:{session_id:(0,s.U)(),nudge_id:t.id,action:n,type:t.type,label:o||null,language_code:c},...(0,r.A)({botKey:d,token:f},{withCurrentUrl:!0,extra:h})}))}})({targetNudge:g,eventType:n,label:o,currentLanguage:h})))}},p=e=>(t,n)=>{const{show:r,slug:o}=n().nudge;r&&t(d({slug:o,eventType:c.MO,label:e}))},f=(e,t)=>(n,r)=>{const{show:o,isCustom:a,slug:i,trackEvent:l}=r().nudge;if(o){if(n({type:c.X2}),a){const e=document.getElementById("kindly-custom-nudge");e&&e.parentNode.removeChild(e)}l&&n(d({slug:i,eventType:e?c.MO:c.X2,label:t}))}},h=e=>{let{nudgeLayout:t,slug:n,trackEvent:r}=e;return(e,a)=>{var i,s,p,f,h,m,g;const{supportedLanguages:b}=window.__KINDLY_SETTINGS__,{nudges:v}=a().bot,{currentLanguage:y}=a().chatbubble,{show:x}=a().pushMessages,w=null==t?void 0:t.language;let E,k=null!==(i=null==t?void 0:t.webhook)&&void 0!==i?i:null,_=null!==(s=null==t?void 0:t.dialogueId)&&void 0!==s?s:null,A=t;const T=b.find(e=>{let{is_primary:t}=e;return t}),S=[...null!==(p=null==v?void 0:v.form_nudges)&&void 0!==p?p:[],...null!==(f=null==v?void 0:v.custom_nudges)&&void 0!==f?f:[],...null!==(h=null==v?void 0:v.product_nudges)&&void 0!==h?h:[],...null!==(m=null==v?void 0:v.text_nudges)&&void 0!==m?m:[],...null!==(g=null==v?void 0:v.multiple_choice_nudges)&&void 0!==g?g:[]],$=w||y||T.code,C=n||t.slug;if(C){var O,I,L,M,N,R,P;if(E=S.filter(e=>e.slug===C)[0],void 0===E)return;if(_=null!==(O=null===(I=E)||void 0===I?void 0:I.dialogue_id)&&void 0!==O?O:_,k=null!==(L=null===(M=E)||void 0===M?void 0:M.webhook)&&void 0!==L?L:k,A=o(E,$),A.sections=[...null!==(N=null===(R=A)||void 0===R?void 0:R.sections)&&void 0!==N?N:[],...null!==(P=null==t?void 0:t.sections)&&void 0!==P?P:[]],A.backdrop=null==t?void 0:t.backdrop,!u(E,b,$))return void console.warn("Nudge is disabled for the current language:",$)}else console.error("Please set up a nudge in the platform to get a slug!");r&&e(d({slug:C,eventType:c.wv})),x&&e({type:c.a_}),e({slug:C,type:c.wv,nudgeLayout:A,dialogue:_,webhook:k,nudgeType:l.MK.TEMPLATE,trackEvent:r})}},m=e=>{let{content:t,slug:n,onRendered:r,trackEvent:o}=e;return(e,a)=>{const{show:i}=a().pushMessages;o&&e(d({slug:n,eventType:c.un})),i&&e({type:c.a_}),e({type:c.un,content:t,slug:n,onRendered:r,nudgeType:l.MK.CUSTOM})}},g=e=>{let{nudge:t,languageCode:n}=e;return e=>{const{autopopup_time:r}=t,a=o(t,n);r<=0||(r&&0!==r?setTimeout(()=>e({type:c.wv,nudgeLayout:a,slug:t.slug}),r):e({type:c.wv,nudgeLayout:a,slug:t.slug}))}}},1695:(e,t,n)=>{"use strict";n.d(t,{$P:()=>l,Cv:()=>o,DZ:()=>m,FI:()=>s,G0:()=>g,Hk:()=>p,MA:()=>r,Od:()=>i,cA:()=>c,o3:()=>d,qV:()=>f,sr:()=>h,uF:()=>a,uO:()=>u,zD:()=>b});const r=e=>{let{agent:t}=e;return t},o=e=>{let{alerts:t}=e;return t},a=e=>{let{announcement:t}=e;return t},i=e=>{let{bot:t}=e;return t},l=e=>{let{chatbubble:t}=e;return t},s=e=>{let{connection:t}=e;return t},c=e=>{let{environment:t}=e;return t},u=e=>{let{messages:{forms:t}}=e;return t},d=e=>{let{chatbubble:{globalIconsState:t}}=e;return t},p=e=>{let{inChatNotification:t}=e;return t},f=e=>{let{inspector:t}=e;return t},h=e=>{let{local:t}=e;return t},m=e=>{let{messages:t}=e;return t},g=e=>{let{nudge:t}=e;return t},b=e=>{let{pushMessages:t}=e;return t}},1726:(e,t,n)=>{"use strict";var r=n(5161);e.exports=r},1780:(e,t,n)=>{"use strict";var r=n(1203);e.exports=!r(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},1847:(e,t,n)=>{"use strict";n.d(t,{A:()=>C});var r=n(9749),o=n.n(r),a=(n(1949),n(9155)),i=n.n(a),l=n(541),s=n(3864),c=n(6367),u=n(5256),d=n(2221),p=n(6253),f=(n(5644),n(7050),n(1872)),h=n(1695),m=n(2009),g=n(5353),b=n(7811);const v=s.Ay.div`
|
|
183
271
|
width: 100%;
|
|
184
272
|
position: relative;
|
|
185
273
|
text-align: left;
|
|
@@ -187,7 +275,7 @@
|
|
|
187
275
|
&& path {
|
|
188
276
|
fill: none;
|
|
189
277
|
}
|
|
190
|
-
`;var x=n(9223),w=n(
|
|
278
|
+
`;var x=n(9223),w=n(9662),E=n(4044);const{EXTERNAL_LINK:k,EMAIL:_,PHONE:A,CHECKBOX:T,SLIDER:S}=d.lP;function $(e,t){t?window.open(e,t):window.location.href=e}const C=function(e){var t,n,r;let{button:C,setCheckboxValue:O,checked:I,chatMessage:L,disabled:M=!1,handlers:N=null,isNudge:R=!1,onClick:P=null,submitButtonsList:D}=e;const j=(0,l.wA)(),F=(0,b.A)(C.button_type),{chatMessages:z,buttonClicks:B}=(0,l.d4)(h.DZ)||[],H=(0,l.d4)(h.$P)||[],{buttonText:U}=(0,a.useContext)(s.Dx),V=(0,l.Pj)(),G=o()(t=[k,A,_]).call(t,F),W=o()(n=[T]).call(n,F),q=o()(r=[S]).call(r,F),K=Boolean((Array.isArray(I)?I:[]).find(e=>e.id===C.id)),Y=C.open_in_new_tab||void 0===C.open_in_new_tab?"_blank":"_self",X=(0,a.useRef)(D);let Z="";F===A&&(Z="tel:"),F===_&&(Z="mailto:");const J=(0,a.useCallback)(e=>{e.preventDefault();const t=V.getState(),{token:n}=t.connection,{PAT_HOST:r}=t.environment,{attachments:o}=t.messages,a=z.map(e=>(0,g.A)(e,o,r,n)),i=(0,g.A)(L,o,r,n);if((0,c.fz)({event:e,handlers:N,buttonType:F,button:(0,m.A)(C),lastMessage:i,chatLog:a,renderedBy:null==H?void 0:H.renderedBy}))return;"function"==typeof P&&P(),R||j((0,f.Bd)(C,L,I,X.current));const{href:l,target:s}=e.currentTarget;l&&(s&&"_self"!==s?$(l,s):setTimeout(()=>{$(l,s)},250))},[F,L,z,C,j,N,I,X,P,null==H?void 0:H.renderedBy,R,V]),Q=(0,p.A)(J,3e3),ee=(null!=B?B:[]).find(e=>{let{chatMessageId:t,buttonId:n}=e;return t===(null==L?void 0:L.id)&&n===C.id}),te=(0,a.useCallback)(()=>{O(C)},[C,O]);return(0,a.useEffect)(()=>{ee&&W&&!K&&O(C)},[ee,W,C,O,K]),q&&null!=C&&C.slider_details?i().createElement("div",null,i().createElement(E.A,{name:`slider_${C.id}`,onChange:e=>{const t=parseFloat(e);var n;t&&Array.isArray(X.current)&&(null===(n=X.current)||void 0===n||n.map(e=>e.id===C.id?(e.slider_details.value=t,e):e))},from:C.slider_details.from_value,to:C.slider_details.to_value,value:C.slider_details.value,step:C.slider_details.step_value,affix:C.slider_details.affix,affixValue:C.slider_details.affix_value,ariaLabel:C.label})):i().createElement(x.A,Object.assign({cy:"message-button",isCheckbox:W,type:"button"},G&&{href:`${Z}${F===k?(ne=C.value,null!=ne&&ne.match(/^https?:\/\//i)?ne:`http://${ne}`):C.value}`,target:`${F!==k||R?"_self":Y}`},W&&{style:{backgroundColor:"transparent",background:"transparent"},role:"checkbox","aria-label":C.label,"aria-checked":K?"true":"false"},{icon:F===k&&R&&i().createElement(u.fl,null)||F===k&&!R&&i().createElement(y,{color:U,size:20}),disabled:M,onClick:e=>W?te():G?J(e):Q(e),hasBeenClicked:ee}),W&&i().createElement(v,null,i().createElement(w.A,{disabled:!0,"aria-disabled":!0,inputType:d.lP.CHECKBOX,name:`checkbox-${C.id}`,id:C.id,checked:K,label:C.label})),W?"":C.label);var ne}},1872:(e,t,n)=>{"use strict";n.d(t,{oI:()=>A.oI,B:()=>m.B,UB:()=>m.UB,cL:()=>r.cL,g4:()=>m.g4,Ss:()=>f,Bd:()=>_.Bd,Rh:()=>m.Rh,eG:()=>m.eG,mN:()=>m.mN,mg:()=>g.mg,fk:()=>g.fk,XO:()=>g.XO,_e:()=>m._e,Fe:()=>k.F,pK:()=>a,Y_:()=>T.Y_,gQ:()=>A.gQ,wQ:()=>m.wQ,ky:()=>m.ky,VK:()=>m.VK,z5:()=>l.z5,SD:()=>E,gm:()=>l.gm,UJ:()=>g.UJ,qf:()=>g.qf,Rm:()=>c.Rm,Mm:()=>m.Mm,ZS:()=>m.ZS,lQ:()=>m.lQ,tM:()=>_.tM,aP:()=>_.aP,Zn:()=>_.Zn,j3:()=>_.j3,Ln:()=>m.Ln,L4:()=>m.L4,zn:()=>m.zn,Bu:()=>_.Bu,nI:()=>m.nI,F3:()=>b,pA:()=>_.pA,Aw:()=>x,tD:()=>w,dm:()=>d,Dc:()=>i,kS:()=>T.kS,ob:()=>m.ob,cC:()=>k.c,fe:()=>T.fe,i1:()=>m.i1,VP:()=>A.VP,mR:()=>T.mR,Z4:()=>m.Z4,zX:()=>c.zX,y2:()=>_.y2,V$:()=>m.V$,uz:()=>v,yM:()=>h,vJ:()=>T.vJ,qJ:()=>_.qJ,et:()=>c.et,zh:()=>_.zh,YK:()=>p,m8:()=>c.m8,R7:()=>c.R7,Mb:()=>r.Mb,mw:()=>r.mw});var r=n(1112),o=n(7173);const a=()=>e=>{e({type:o.u2})},i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return n=>{n({type:o.YU,payload:{text:e}}),t>0&&setTimeout(()=>n({type:o.nW}),t)}};var l=n(5564),s=n(4851),c=n(7243),u=n(2221);const d=e=>t=>{t({type:o.mw,splitTestLabel:e})},p=()=>e=>{e({type:o.Q0})},f=()=>e=>{e({type:o.Tc})},h=(e,t)=>async(n,r)=>{const{PAT_HOST:o}=r().environment,{botKey:a,currentLanguage:i}=r().chatbubble,{token:d}=r().connection,p=await n((0,l.z5)());n((0,c.et)(`${o}/chatbubble/${u.Ak}/conversion/`,{method:"POST",body:{split:e||"X",is_order:t,language_code:i},...(0,s.A)({botKey:a,token:d},{withCurrentUrl:!0,extra:p})}))};var m=n(8628),g=n(8483);const b=e=>({type:o.ye,chatMessageId:e}),v=()=>({type:o.vK});var y=n(332);const x=e=>t=>{t({type:y.s,context:e})},w=e=>(t,n)=>{if("string"!=typeof e)throw new Error("label needs to be a string, received "+typeof e);t({type:y.T,label:e});const{connection:{token:r},environment:{PAT_HOST:o},local:{labels:a}}=n();r&&t((0,c.et)(`${o}/chatbubble/${u.Ak}/update_labels`,{method:"POST",body:{labels:a},...(0,s.A)({token:r})}))},E=()=>async(e,t)=>{const{connection:{token:n,botKey:r},environment:{PAT_HOST:o},local:{context:a}}=t();let i={...a};if(n){const t=await e((0,c.et)(`${o}/chatbubble/${u.Ak}/context`,{method:"get",...(0,s.A)({token:n,botKey:r})}));null!=t&&t.data&&(i={...t.data,...i})}return i};var k=n(2633),_=n(4703),A=n(9483),T=n(1623)},1949:e=>{"use strict";e.exports=t},1966:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(9155);function o(e){return e.touches||e.originalEvent.touches}let a=null;const i=e=>{let{setIndex:t,index:n,carousel:i}=e;return{handleTouchStart:(0,r.useCallback)(e=>{const t=o(e)[0];a=t.clientX},[]),handleTouchMove:(0,r.useCallback)(e=>{if(!a)return;const r=o(e)[0].clientX;t(a-r>5?n+1:n-1,i),a=null},[i,n,t]),handleTouchEnd:(0,r.useCallback)(()=>{a=null},[])}}},2009:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(7811),o=n(3211);const a=e=>{let{button_type:t,...n}=e;return{...n,button_type:(0,o.A)(t),category:(0,r.A)(t)}}},2137:(e,t,n)=>{"use strict";var r=n(5426),o=Object;e.exports=function(e){return o(r(e))}},2146:e=>{e.exports=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;for(var l=Object.prototype.hasOwnProperty.bind(t),s=0;s<a.length;s++){var c=a[s];if(!l(c))return!1;var u=e[c],d=t[c];if(!1===(o=n?n.call(r,u,d,c):void 0)||void 0===o&&u!==d)return!1}return!0}},2154:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>Ee});var r=n(1949),o=n.n(r),a=n(9155),i=n.n(a),l=n(541),s=n(3864);const c=s.Ay.div`
|
|
191
279
|
display: block;
|
|
192
280
|
top: -100vh;
|
|
193
281
|
left: -100vw;
|
|
@@ -220,7 +308,7 @@
|
|
|
220
308
|
line-height: 22px;
|
|
221
309
|
margin: 0 0 16px 0;
|
|
222
310
|
color: #0069ff;
|
|
223
|
-
`;var S=n(7173)
|
|
311
|
+
`;var S=n(7173),$=n(1623);const C=function(e){let{buttons:t,slug:n}=e;const r=(0,l.wA)(),o=t.length>0,s=(0,a.useCallback)(()=>{r((0,$.vJ)({slug:n,eventType:S.MO}))},[r,n]);return o?i().createElement(k,null,t.map((e,t)=>i().createElement(E.A,{button:e,key:`${e.value}-${t}`,isNudge:!0,onClick:s}))):null},O=function(e){let{title:t,description:n,link:r,slug:o}=e;const s=(0,l.wA)(),c=(0,a.useCallback)(e=>{e.preventDefault(),s((0,$.vJ)({slug:o,eventType:S.MO})),window.location.href=e.target.getAttribute("href")},[o]);return i().createElement(k,null,t&&i().createElement(_,null,t),n&&i().createElement(A,null,n),(null==r?void 0:r.location)&&(null==r?void 0:r.text)&&i().createElement(T,{href:r.location,onClick:c},r.text))};var I=n(492);const L=s.Ay.div`
|
|
224
312
|
margin: 24px;
|
|
225
313
|
display: flex;
|
|
226
314
|
flex-direction: column;
|
|
@@ -292,7 +380,7 @@
|
|
|
292
380
|
height: 1px;
|
|
293
381
|
width: 100%;
|
|
294
382
|
background: rgba(0, 0, 0, 0.1);
|
|
295
|
-
`;var V=n(9223);const G=function(e){let{choices:t,slug:n}=e;const r=(0,l.wA)(),{primaryLanguageCode:o,currentLanguageCode:a}=(0,h.A)(),{buttons:s}=t;return i().createElement(i().Fragment,null,i().createElement(U,null),i().createElement(H,null,s.map(e=>{let{text:t,triggerDialogue:l}=e;return i().createElement(V.A,{color:!0,key:`${t}-${l}`,text:t,onClick:()=>{return e=l,r((0,p.zh)(e,{openChat:!0,languageCode:a||o})),void r((0
|
|
383
|
+
`;var V=n(9223);const G=function(e){let{choices:t,slug:n}=e;const r=(0,l.wA)(),{primaryLanguageCode:o,currentLanguageCode:a}=(0,h.A)(),{buttons:s}=t;return i().createElement(i().Fragment,null,i().createElement(U,null),i().createElement(H,null,s.map(e=>{let{text:t,triggerDialogue:l}=e;return i().createElement(V.A,{color:!0,key:`${t}-${l}`,text:t,onClick:()=>{return e=l,r((0,p.zh)(e,{openChat:!0,languageCode:a||o})),void r((0,$.vJ)({slug:n,eventType:S.MO,label:e}));var e}})})))};var W=n(1966),q=n(8905),K=n(534);const Y=s.Ay.a`
|
|
296
384
|
text-decoration: none;
|
|
297
385
|
color: initial;
|
|
298
386
|
cursor: pointer;
|
|
@@ -407,7 +495,7 @@
|
|
|
407
495
|
@media ${q.jO.maxPhone} {
|
|
408
496
|
margin: 16px 24px;
|
|
409
497
|
}
|
|
410
|
-
`;var ue=n(6421);const de=function(e){var t,n;let{section:r,onProductClick:o}=e;const{width:l}=(()=>{const[e,t]=(0,a.useState)({width:void 0,height:void 0});return(0,a.useEffect)(()=>{function e(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",e),e(),()=>window.removeEventListener("resize",e)},[]),e})(),s=parseInt(q.mb.phone.replace("px",""),10),c=null!==(t=null==r?void 0:r.items)&&void 0!==t?t:[],u=null!==(n=null==r?void 0:r.title)&&void 0!==n&&n,{setIndex:d,imageIndex:p,carouselPosition:f}=(e=>{let{windowWidth:t,phoneWidth:n,ignoreDesktop:r=!0}=e;const[o,i]=(0,a.useState)(0),[l,s]=(0,a.useState)(0);return(0,a.useEffect)(()=>{t>=n&&r&&s(0)},[t,n,l,r]),{setIndex:(0,a.useCallback)((e,r)=>{if(t>=n)return;if(e<0||e>=r.length)return;const o=-217*e;i(e),s(o)},[t,n]),imageIndex:o,carouselPosition:l}})({windowWidth:l,phoneWidth:s}),{handleTouchStart:h,handleTouchMove:m,handleTouchEnd:g}=(0,W.A)({carousel:c,index:p,setIndex:d});return i().createElement(le,null,u&&i().createElement(ce,null,u),i().createElement(se,{active:l<s},i().createElement(ue.A,{carouselPosition:f,onTouchStart:h,onTouchMove:m,onTouchEnd:g},c.map(e=>i().createElement(ie,{product:e,key:e.id,onProductClick:o})))))},pe=e=>e||{location:"",text:""};function fe(e){var t,n;let{section:r,slug:o,onProductClick:a,onNewsletterSubmit:s}=e;const c=(0,l.wA)(),u=null!==(t=null==r?void 0:r.title)&&void 0!==t?t:"",d=null!==(n=null==r?void 0:r.description)&&void 0!==n?n:"",p=null==r?void 0:r.buttons,f=null==r?void 0:r.products,h=null==r?void 0:r.choices,m=null==r?void 0:r.form,g=null==r?void 0:r.link,b=null==r?void 0:r.html;return i().createElement(i().Fragment,null,(u||d||g)&&i().createElement(O,{title:u,description:d,link:pe(g),slug:o}),p&&i().createElement(
|
|
498
|
+
`;var ue=n(6421);const de=function(e){var t,n;let{section:r,onProductClick:o}=e;const{width:l}=(()=>{const[e,t]=(0,a.useState)({width:void 0,height:void 0});return(0,a.useEffect)(()=>{function e(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",e),e(),()=>window.removeEventListener("resize",e)},[]),e})(),s=parseInt(q.mb.phone.replace("px",""),10),c=null!==(t=null==r?void 0:r.items)&&void 0!==t?t:[],u=null!==(n=null==r?void 0:r.title)&&void 0!==n&&n,{setIndex:d,imageIndex:p,carouselPosition:f}=(e=>{let{windowWidth:t,phoneWidth:n,ignoreDesktop:r=!0}=e;const[o,i]=(0,a.useState)(0),[l,s]=(0,a.useState)(0);return(0,a.useEffect)(()=>{t>=n&&r&&s(0)},[t,n,l,r]),{setIndex:(0,a.useCallback)((e,r)=>{if(t>=n)return;if(e<0||e>=r.length)return;const o=-217*e;i(e),s(o)},[t,n]),imageIndex:o,carouselPosition:l}})({windowWidth:l,phoneWidth:s}),{handleTouchStart:h,handleTouchMove:m,handleTouchEnd:g}=(0,W.A)({carousel:c,index:p,setIndex:d});return i().createElement(le,null,u&&i().createElement(ce,null,u),i().createElement(se,{active:l<s},i().createElement(ue.A,{carouselPosition:f,onTouchStart:h,onTouchMove:m,onTouchEnd:g},c.map(e=>i().createElement(ie,{product:e,key:e.id,onProductClick:o})))))},pe=e=>e||{location:"",text:""};function fe(e){var t,n;let{section:r,slug:o,onProductClick:a,onNewsletterSubmit:s}=e;const c=(0,l.wA)(),u=null!==(t=null==r?void 0:r.title)&&void 0!==t?t:"",d=null!==(n=null==r?void 0:r.description)&&void 0!==n?n:"",p=null==r?void 0:r.buttons,f=null==r?void 0:r.products,h=null==r?void 0:r.choices,m=null==r?void 0:r.form,g=null==r?void 0:r.link,b=null==r?void 0:r.html;return i().createElement(i().Fragment,null,(u||d||g)&&i().createElement(O,{title:u,description:d,link:pe(g),slug:o}),p&&i().createElement(C,{buttons:p,slug:o}),h&&i().createElement(G,{choices:h,slug:o}),f&&i().createElement(de,{section:f,onProductClick:(e,t)=>{if(null!=t&&t.productUrl?c((0,$.vJ)({slug:o,eventType:S.MO,label:t.productUrl})):console.warn("Could not track cta click with label:",t.productUrl),"function"==typeof a)try{a(e,t)}catch(e){console.error(e)}}}),m&&i().createElement(B,{form:m,onNewsletterSubmit:s,slug:o}),b&&i().createElement(w,{html:b,slug:o}))}const he=e=>{var t;let{layout:n,slug:r,onProductClick:o,onNewsletterSubmit:a}=e;return(null!==(t=null==n?void 0:n.sections)&&void 0!==t?t:[]).map((e,t)=>i().createElement(fe,{key:`section-${t}`,section:e,slug:null!=r?r:null,onProductClick:o,onNewsletterSubmit:a}))};var me=n(3249),ge=n(4927);const be=s.Ay.div`
|
|
411
499
|
right: 20px;
|
|
412
500
|
bottom: ${e=>{let{bubbleHidden:t}=e;return t?"30px":"100px"}};
|
|
413
501
|
z-index: 10;
|
|
@@ -495,7 +583,7 @@
|
|
|
495
583
|
left: 4px;
|
|
496
584
|
}
|
|
497
585
|
}
|
|
498
|
-
`,we=function(e){let{bubbleHidden:t,show:n,slug:r,layout:o,onDismiss:a,onProductClick:l,onNewsletterSubmit:s}=e;return i().createElement(be,{bubbleHidden:t,"aria-hidden":n?"false":"true","data-testid":"nudge-container","data-cy":"nudge-container","data-story":"NudgeContainer"},i().createElement(xe,null),i().createElement(ye,{"aria-label":"Dismiss pushMessage",title:"Dismiss pushMessage",onClick:a,type:"button","data-testid":"close-nudge-button","data-cy":"close-nudge-button"},i().createElement(y.US,{width:25,height:25})),i().createElement(ve,null,i().createElement(he,{layout:o,slug:r,onProductClick:l,onNewsletterSubmit:s})))},Ee=function(e){var t;let{hidden:n,layout:r,onDismiss:o,onProductClick:s,onNewsletterSubmit:c}=e;const{show:h,nudgeType:m,slug:g}=(0,l.d4)(f.G0),b=null!==(t=null==r?void 0:r.backdrop)&&void 0!==t&&t,y=(0,l.wA)(),x=(0,a.useCallback)(e=>{if(e.stopPropagation(),y((0,p.Y_)()),"function"==typeof o)try{o(e)}catch(e){console.error(e)}},[o,y]);return i().createElement(i().Fragment,null,b&&i().createElement(u,{backdrop:b,onClick:x}),m===d.MK.TEMPLATE&&i().createElement(we,{show:h,layout:r,slug:g,onDismiss:x,onProductClick:s,onNewsletterSubmit:c,bubbleHidden:n}),m===d.MK.CUSTOM&&i().createElement(v,null))}},2221:(e,t,n)=>{"use strict";n.d(t,{Ak:()=>r.Ak,DP:()=>g,Gi:()=>s,Ii:()=>x,Je:()=>w,Jm:()=>y,Lb:()=>o,Le:()=>d,M3:()=>m,MK:()=>u,Ns:()=>f,OT:()=>h,RT:()=>i,T5:()=>l,bF:()=>b,bS:()=>a,dT:()=>r.dT,fl:()=>r.fl,gH:()=>r.gH,lP:()=>c,oY:()=>E,rc:()=>v,sl:()=>p});var r=n(9292);const o=Object.freeze({NONE:"NONE",COLOR:"COLOR",PICTURE:"PICTURE"}),a=Object.freeze({USER:"USER",BOT:"BOT",WEBHOOK:"WEBHOOK",AGENT:"AGENT",SYSTEM:"SYSTEM",EXTERNAL:"EXTERNAL"}),i=Object.freeze({HANDOVER_POLL_INTERVAL_MS:3500,HANDOVER_REQUEST_POLL_INTERVAL_MS:1e4,REPLY_TIMEOUT_MS:4e3,REPLY_TIMEOUT_MAX_ATTEMPTS:3,REPLY_TIMEOUT_MS_MULTIPLIER:2}),l=Object.freeze({1e3:"250",800:"178",600:"124"}),s=Object.freeze({GREETING:"GREETING",FALLBACK:"FALLBACK",PATTERN_MATCH:"PATTERN_MATCH",KEYWORD_EXACT_MATCH:"KEYWORD_EXACT_MATCH",KEYWORD_MENTION:"KEYWORD_MENTION",SAMPLE_MATCH:"SAMPLE_MATCH",TRIGGER_DIALOGUE:"TRIGGER_DIALOGUE",FALLBACK_SUGGESTION:"FALLBACK_SUGGESTION",ZODIAC:"ZODIAC",MIMIR:"MIMIR",WEBHOOK:"WEBHOOK"}),c=Object.freeze({QUICK_REPLY:"QUICK_REPLY",EXTERNAL_LINK:"EXTERNAL_LINK",EMAIL:"EMAIL",PHONE:"PHONE",HANDOVER_REQUEST:"HANDOVER_REQUEST",PRIVACY_EXPORT:"PRIVACY_EXPORT",PRIVACY_DELETE:"PRIVACY_DELETE",DIALOGUE_TRIGGER:"DIALOGUE_TRIGGER",SUGGESTION_DIALOGUE_TRIGGER:"SUGGESTION_DIALOGUE_TRIGGER",CONTACT_DETAILS:"CONTACT_DETAILS",UPLOAD_ATTACHMENT:"UPLOAD_ATTACHMENT",CHECKBOX:"CHECKBOX",SUBMIT:"SUBMIT",edit_contact_details:"edit_contact_details",SLIDER:"SLIDER"}),u=Object.freeze({TEMPLATE:"TEMPLATE",CUSTOM:"CUSTOM"}),d=Object.freeze({CLEAN:"CLEAN",ERROR:"ERROR",INFECTED:"INFECTED",PROCESSING:"PROCESSING"}),p=Object.freeze({IMAGE:"image",PDF:"pdf",TEXT:"text"}),f=(Object.freeze({DISABLED:"DISABLED",PLATFORM:"PLATFORM",EXTERNAL:"EXTERNAL"}),Object.freeze({PRIDE:"PRIDE",EASTER:"EASTER",CHRISTMAS:"CHRISTMAS"})),h=Object.freeze({NO_SPLIT:"X",SPLIT_A:"A",SPLIT_B:"B"}),m=18e5,g=5e3,b=Object.freeze({bottom:"16px",right:"16px"}),v=Object.freeze({PREFIX:"PREFIX",SUFFIX:"SUFFIX"}),y=Object.freeze({MAINTENANCE:"MAINTENANCE",LANGUAGE_SWITCH:"LANGUAGE_SWITCH"}),x=(Object.freeze({WEBHOOK:"WEBHOOK",PLUGIN:"PLUGIN",STANDARD:"STANDARD"}),Object.freeze({HORIZONTAL:"HORIZONTAL",VERTICAL:"VERTICAL"})),w=Object.freeze({CUSTOM_INTEGRATION:"app",EMAIL:"email",FB_MESSENGER:"facebook",SDK_ANDROID:"android",SDK_IOS:"ios",SLACK:"slack",TEST:"test",WEB:"web",WEB_MOBILE:"mobile"}),E=[".pdf",".heic","image/*","text/html","text/csv","text/xml","text/json","text/markdown","text/calendar","text/plain","text/tab-separated-values"].join(",")},2244:(e,t,n)=>{"use strict";n.d(t,{A:()=>s}),n(1949);var r=n(9155),o=n.n(r),a=n(748),i=n(6289);function l(e){let{name:t,control:n,options:r,validators:l,register:s,inputType:c}=e;return o().createElement(o().Fragment,null,r.map((e,u)=>o().createElement(i.B2,{key:`${e.value}_${u}`},o().createElement(a.A,{inputType:c,validators:l,register:s,value:e.value,label:e.label,id:e.id,name:t,control:n,isLast:u===r.length-1}))))}n(7094);const s=o().memo(l)},2279:(e,t,n)=>{"use strict";n.d(t,{l:()=>o});var r=n(2221);const o=(e,t,n)=>{if(e.storagePath&&e.status===r.Le.CLEAN)return`${t}/chatbubble/${r.Ak}/attachment/${e.storagePath}?token=${n}`}},2366:(e,t,n)=>{"use strict";n.d(t,{B:()=>o,U:()=>a});var r=n(5279);const o="kindly-chat-browser-id",a=()=>{const e=localStorage.getItem(o);if(!e){const e=(0,r.A)();return localStorage.setItem(o,e),e}return e}},2628:(e,t,n)=>{"use strict";n.d(t,{A:()=>Je,u:()=>Ze});var r,o="user-agent",a="",i="function",l="undefined",s="object",c="string",u="browser",d="cpu",p="device",f="engine",h="os",m="result",g="name",b="type",v="vendor",y="version",x="architecture",w="major",E="model",k="console",_="mobile",A="tablet",T="smarttv",S="wearable",C="xr",$="embedded",O="inapp",I="brands",L="formFactors",M="fullVersionList",N="platform",R="platformVersion",P="bitness",D="sec-ch-ua",j=D+"-full-version-list",F=D+"-arch",z=D+"-"+P,B=D+"-form-factors",H=D+"-"+_,U=D+"-"+E,V=D+"-"+N,G=V+"-version",W=[I,M,_,E,N,R,x,L,P],q="Amazon",K="Apple",Y="ASUS",X="BlackBerry",Z="Google",J="Huawei",Q="Lenovo",ee="Honor",te="LG",ne="Microsoft",re="Motorola",oe="Nvidia",ae="OnePlus",ie="OPPO",le="Samsung",se="Sharp",ce="Sony",ue="Xiaomi",de="Zebra",pe="Chrome",fe="Chromium",he="Chromecast",me="Edge",ge="Firefox",be="Opera",ve="Facebook",ye="Sogou",xe="Mobile ",we=" Browser",Ee="Windows",ke=typeof window!==l&&window.navigator?window.navigator:void 0,_e=ke&&ke.userAgentData?ke.userAgentData:void 0,Ae=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},Te=function(e,t){if(typeof e===s&&e.length>0){for(var n in e)if(Oe(t)==Oe(e[n]))return!0;return!1}return!!Ce(e)&&Oe(t)==Oe(e)},Se=function(e,t){for(var n in e)return/^(browser|cpu|device|engine|os)$/.test(n)||!!t&&Se(e[n])},Ce=function(e){return typeof e===c},$e=function(e){if(e){for(var t=[],n=Me(/\\?\"/g,e).split(","),r=0;r<n.length;r++)if(n[r].indexOf(";")>-1){var o=Re(n[r]).split(";v=");t[r]={brand:o[0],version:o[1]}}else t[r]=Re(n[r]);return t}},Oe=function(e){return Ce(e)?e.toLowerCase():e},Ie=function(e){return Ce(e)?Me(/[^\d\.]/g,e).split(".")[0]:void 0},Le=function(e){for(var t in e){var n=e[t];typeof n==s&&2==n.length?this[n[0]]=n[1]:this[n]=void 0}return this},Me=function(e,t){return Ce(t)?t.replace(e,a):t},Ne=function(e){return Me(/\\?\"/g,e)},Re=function(e,t){if(Ce(e))return e=Me(/^\s\s*/,e),typeof t===l?e:e.substring(0,500)},Pe=function(e,t){if(e&&t)for(var n,r,o,a,l,c,u=0;u<t.length&&!l;){var d=t[u],p=t[u+1];for(n=r=0;n<d.length&&!l&&d[n];)if(l=d[n++].exec(e))for(o=0;o<p.length;o++)c=l[++r],typeof(a=p[o])===s&&a.length>0?2===a.length?typeof a[1]==i?this[a[0]]=a[1].call(this,c):this[a[0]]=a[1]:a.length>=3&&(typeof a[1]!==i||a[1].exec&&a[1].test?3==a.length?this[a[0]]=c?c.replace(a[1],a[2]):void 0:4==a.length?this[a[0]]=c?a[3].call(this,c.replace(a[1],a[2])):void 0:a.length>4&&(this[a[0]]=c?a[3].apply(this,[c.replace(a[1],a[2])].concat(a.slice(4))):void 0):a.length>3?this[a[0]]=c?a[1].apply(this,a.slice(2)):void 0:this[a[0]]=c?a[1].call(this,c,a[2]):void 0):this[a]=c||void 0;u+=2}},De=function(e,t){for(var n in t)if(typeof t[n]===s&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(Te(t[n][r],e))return"?"===n?void 0:n}else if(Te(t[n],e))return"?"===n?void 0:n;return t.hasOwnProperty("*")?t["*"]:e},je={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2",8.1:"6.3",10:["6.4","10.0"],NT:""},Fe={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},ze={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},Be={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[y,[g,xe+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[y,[g,me+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[y,[g,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[g,y],[/opios[\/ ]+([\w\.]+)/i],[y,[g,be+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[y,[g,be+" GX"]],[/\bopr\/([\w\.]+)/i],[y,[g,be]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[y,[g,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[y,[g,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i,/(heytap|ovi|115|surf)browser\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[g,y],[/quark(?:pc)?\/([-\w\.]+)/i],[y,[g,"Quark"]],[/\bddg\/([\w\.]+)/i],[y,[g,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[y,[g,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[y,[g,"WeChat"]],[/konqueror\/([\w\.]+)/i],[y,[g,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[y,[g,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[y,[g,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[y,[g,"Smart "+Q+we]],[/(avast|avg)\/([\w\.]+)/i],[[g,/(.+)/,"$1 Secure"+we],y],[/\bfocus\/([\w\.]+)/i],[y,[g,ge+" Focus"]],[/\bopt\/([\w\.]+)/i],[y,[g,be+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[y,[g,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[y,[g,"Dolphin"]],[/coast\/([\w\.]+)/i],[y,[g,be+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[y,[g,"MIUI"+we]],[/fxios\/([\w\.-]+)/i],[y,[g,xe+ge]],[/\bqihoobrowser\/?([\w\.]*)/i],[y,[g,"360"]],[/\b(qq)\/([\w\.]+)/i],[[g,/(.+)/,"$1Browser"],y],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[g,/(.+)/,"$1"+we],y],[/samsungbrowser\/([\w\.]+)/i],[y,[g,le+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[y,[g,ye+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[g,ye+" Mobile"],y],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[g,y],[/(lbbrowser|rekonq)/i],[g],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[y,g],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[g,ve],y,[b,O]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[g,y,[b,O]],[/\bgsa\/([\w\.]+) .*safari\//i],[y,[g,"GSA"],[b,O]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[y,[g,"TikTok"],[b,O]],[/\[(linkedin)app\]/i],[g,[b,O]],[/(chromium)[\/ ]([-\w\.]+)/i],[g,y],[/headlesschrome(?:\/([\w\.]+)| )/i],[y,[g,pe+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[y,[g,me+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[g,pe+" WebView"],y],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[y,[g,"Android"+we]],[/chrome\/([\w\.]+) mobile/i],[y,[g,xe+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[g,y],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[y,[g,xe+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[g,xe+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[y,g],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[g,[y,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[g,y],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[g,xe+ge],y],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[g,"Netscape"],y],[/(wolvic|librewolf)\/([\w\.]+)/i],[g,y],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[y,[g,ge+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[g,[y,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[g,[y,/[^\d\.]+./,a]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[x,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[x,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[x,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[x,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[x,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[x,/ower/,a,Oe]],[/ sun4\w[;\)]/i],[[x,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[x,Oe]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[E,[v,le],[b,A]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[E,[v,le],[b,_]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[E,[v,K],[b,_]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[E,[v,K],[b,A]],[/(macintosh);/i],[E,[v,K]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[E,[v,se],[b,_]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[E,[v,ee],[b,A]],[/honor([-\w ]+)[;\)]/i],[E,[v,ee],[b,_]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[E,[v,J],[b,A]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[E,[v,J],[b,_]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[E,/_/g," "],[v,ue],[b,A]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[E,/_/g," "],[v,ue],[b,_]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-k]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[E,[v,ae],[b,_]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[E,[v,ie],[b,_]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[E,[v,De,{OnePlus:["203","304","403","404","413","415"],"*":ie}],[b,A]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[E,[v,"BLU"],[b,_]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[E,[v,"Vivo"],[b,_]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[E,[v,"Realme"],[b,_]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[E,[v,Q],[b,A]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[E,[v,Q],[b,_]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[E,[v,re],[b,_]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[E,[v,re],[b,A]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[E,[v,te],[b,A]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[E,[v,te],[b,_]],[/(nokia) (t[12][01])/i],[v,E,[b,A]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[E,/_/g," "],[b,_],[v,"Nokia"]],[/(pixel (c|tablet))\b/i],[E,[v,Z],[b,A]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[E,[v,Z],[b,_]],[/(google) (pixelbook( go)?)/i],[v,E],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[E,[v,ce],[b,_]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[E,"Xperia Tablet"],[v,ce],[b,A]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[E,[v,q],[b,A]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[E,/(.+)/g,"Fire Phone $1"],[v,q],[b,_]],[/(playbook);[-\w\),; ]+(rim)/i],[E,v,[b,A]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[E,[v,X],[b,_]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[E,[v,Y],[b,A]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[E,[v,Y],[b,_]],[/(nexus 9)/i],[E,[v,"HTC"],[b,A]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[v,[E,/_/g," "],[b,_]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[E,[v,"TCL"],[b,A]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[E,[v,"TCL"],[b,_]],[/(itel) ((\w+))/i],[[v,Oe],E,[b,De,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[E,[v,"Acer"],[b,A]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[E,[v,"Meizu"],[b,_]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[E,[v,"Ulefone"],[b,_]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[E,[v,"Energizer"],[b,_]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[E,[v,"Cat"],[b,_]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[E,[v,"Smartfren"],[b,_]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[E,[v,"Nothing"],[b,_]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[E,[v,"Archos"],[b,A]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[E,[v,"Archos"],[b,_]],[/; (n159v)/i],[E,[v,"HMD"],[b,_]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[v,E,[b,A]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i],[v,E,[b,_]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[v,E,[b,A]],[/(surface duo)/i],[E,[v,ne],[b,A]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[E,[v,"Fairphone"],[b,_]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[E,[v,oe],[b,A]],[/(sprint) (\w+)/i],[v,E,[b,_]],[/(kin\.[onetw]{3})/i],[[E,/\./g," "],[v,ne],[b,_]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[E,[v,de],[b,A]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[E,[v,de],[b,_]],[/smart-tv.+(samsung)/i],[v,[b,T]],[/hbbtv.+maple;(\d+)/i],[[E,/^/,"SmartTV"],[v,le],[b,T]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[v,E,[b,T]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[v,te],[b,T]],[/(apple) ?tv/i],[v,[E,K+" TV"],[b,T]],[/crkey.*devicetype\/chromecast/i],[[E,he+" Third Generation"],[v,Z],[b,T]],[/crkey.*devicetype\/([^/]*)/i],[[E,/^/,"Chromecast "],[v,Z],[b,T]],[/fuchsia.*crkey/i],[[E,he+" Nest Hub"],[v,Z],[b,T]],[/crkey/i],[[E,he],[v,Z],[b,T]],[/(portaltv)/i],[E,[v,ve],[b,T]],[/droid.+aft(\w+)( bui|\))/i],[E,[v,q],[b,T]],[/(shield \w+ tv)/i],[E,[v,oe],[b,T]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[E,[v,se],[b,T]],[/(bravia[\w ]+)( bui|\))/i],[E,[v,ce],[b,T]],[/(mi(tv|box)-?\w+) bui/i],[E,[v,ue],[b,T]],[/Hbbtv.*(technisat) (.*);/i],[v,E,[b,T]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[v,/.+\/(\w+)/,"$1",De,{LG:"lge"}],[E,Re],[b,T]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[E,[b,T]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:|large screen[\w ]+safari)\b/i],[[b,T]],[/(playstation \w+)/i],[E,[v,ce],[b,k]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[E,[v,ne],[b,k]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i],[v,E,[b,k]],[/droid.+; (shield)( bui|\))/i],[E,[v,oe],[b,k]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[E,[v,le],[b,S]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[v,E,[b,S]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[E,[v,ie],[b,S]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[E,[v,K],[b,S]],[/(opwwe\d{3})/i],[E,[v,ae],[b,S]],[/(moto 360)/i],[E,[v,re],[b,S]],[/(smartwatch 3)/i],[E,[v,ce],[b,S]],[/(g watch r)/i],[E,[v,te],[b,S]],[/droid.+; (wt63?0{2,3})\)/i],[E,[v,de],[b,S]],[/droid.+; (glass) \d/i],[E,[v,Z],[b,C]],[/(pico) (4|neo3(?: link|pro)?)/i],[v,E,[b,C]],[/(quest( \d| pro)?s?).+vr/i],[E,[v,ve],[b,C]],[/mobile vr; rv.+firefox/i],[[b,C]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[v,[b,$]],[/(aeobc)\b/i],[E,[v,q],[b,$]],[/(homepod).+mac os/i],[E,[v,K],[b,$]],[/windows iot/i],[[b,$]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[E,[b,De,{mobile:"Mobile",xr:"VR","*":A}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[b,A]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[b,_]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[E,[v,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[y,[g,me+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[g,y],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[y,[g,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[g,y],[/ladybird\//i],[[g,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[y,g]],os:[[/(windows nt) (6\.[23]); arm/i],[[g,/N/,"R"],[y,De,je]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[g,y],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[y,/(;|\))/g,"",De,je],[g,Ee]],[/(windows ce)\/?([\d\.]*)/i],[g,y],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[y,/_/g,"."],[g,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[g,"macOS"],[y,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[y,[g,he+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[y,[g,he+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[y,[g,he+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[y,[g,he+" Linux"]],[/crkey\/([\d\.]+)/i],[y,[g,he]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[y,g],[/(ubuntu) ([\w\.]+) like android/i],[[g,/(.+)/,"$1 Touch"],y],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[g,y],[/\(bb(10);/i],[y,[g,X]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[y,[g,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[y,[g,ge+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[y,[g,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[y,De,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[g,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[y,[g,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[g,"Chrome OS"],y],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[g,y],[/(sunos) ?([\d\.]*)/i],[[g,"Solaris"],y],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[g,y]]},He=(Le.call((r={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}}).init,[[u,[g,y,w,b]],[d,[x]],[p,[b,E,v]],[f,[g,y]],[h,[g,y]]]),Le.call(r.isIgnore,[[u,[y,w]],[f,[y]],[h,[y]]]),Le.call(r.isIgnoreRgx,[[u,/ ?browser$/i],[h,/ ?os$/i]]),Le.call(r.toString,[[u,[g,y]],[d,[x]],[p,[v,E]],[f,[g,y]],[h,[g,y]]]),r),Ue=function(e,t){var n=He.init[t],r=He.isIgnore[t]||0,o=He.isIgnoreRgx[t]||0,i=He.toString[t]||0;function s(){Le.call(this,n)}return s.prototype.getItem=function(){return e},s.prototype.withClientHints=function(){return _e?_e.getHighEntropyValues(W).then(function(t){return e.setCH(new Ve(t,!1)).parseCH().get()}):e.parseCH().get()},s.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=m&&(s.prototype.is=function(e){var t=!1;for(var n in this)if(this.hasOwnProperty(n)&&!Te(r,n)&&Oe(o?Me(o,this[n]):this[n])==Oe(o?Me(o,e):e)){if(t=!0,e!=l)break}else if(e==l&&t){t=!t;break}return t},s.prototype.toString=function(){var e=a;for(var t in i)typeof this[i[t]]!==l&&(e+=(e?" ":a)+this[i[t]]);return e||l}),_e||(s.prototype.then=function(e){var t=this,n=function(){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e])};n.prototype={is:s.prototype.is,toString:s.prototype.toString};var r=new n;return e(r),r}),new s};function Ve(e,t){if(e=e||{},Le.call(this,W),t)Le.call(this,[[I,$e(e[D])],[M,$e(e[j])],[_,/\?1/.test(e[H])],[E,Ne(e[U])],[N,Ne(e[V])],[R,Ne(e[G])],[x,Ne(e[F])],[L,$e(e[B])],[P,Ne(e[z])]]);else for(var n in e)this.hasOwnProperty(n)&&typeof e[n]!==l&&(this[n]=e[n])}function Ge(e,t,n,r){return this.get=function(e){return e?this.data.hasOwnProperty(e)?this.data[e]:void 0:this.data},this.set=function(e,t){return this.data[e]=t,this},this.setCH=function(e){return this.uaCH=e,this},this.detectFeature=function(){if(ke&&ke.userAgent==this.ua)switch(this.itemType){case u:ke.brave&&typeof ke.brave.isBrave==i&&this.set(g,"Brave");break;case p:!this.get(b)&&_e&&_e[_]&&this.set(b,_),"Macintosh"==this.get(E)&&ke&&typeof ke.standalone!==l&&ke.maxTouchPoints&&ke.maxTouchPoints>2&&this.set(E,"iPad").set(b,A);break;case h:!this.get(g)&&_e&&_e[N]&&this.set(g,_e[N]);break;case m:var e=this.data,t=function(t){return e[t].getItem().detectFeature().get()};this.set(u,t(u)).set(d,t(d)).set(p,t(p)).set(f,t(f)).set(h,t(h))}return this},this.parseUA=function(){return this.itemType!=m&&Pe.call(this.data,this.ua,this.rgxMap),this.itemType==u&&this.set(w,Ie(this.get(y))),this},this.parseCH=function(){var e=this.uaCH,t=this.rgxMap;switch(this.itemType){case u:case f:var n,r=e[M]||e[I];if(r)for(var o in r){var a=r[o].brand||r[o],i=r[o].version;this.itemType==u&&!/not.a.brand/i.test(a)&&(!n||/Chrom/.test(n)&&a!=fe||n==me&&/WebView2/.test(a))&&(a=De(a,ze),(n=this.get(g))&&!/Chrom/.test(n)&&/Chrom/.test(a)||this.set(g,a).set(y,i).set(w,Ie(i)),n=a),this.itemType==f&&a==fe&&this.set(y,i)}break;case d:var l=e[x];l&&(l&&"64"==e[P]&&(l+="64"),Pe.call(this.data,l+";",t));break;case p:if(e[_]&&this.set(b,_),e[E]&&(this.set(E,e[E]),!this.get(b)||!this.get(v))){var s={};Pe.call(s,"droid 9; "+e[E]+")",t),!this.get(b)&&s.type&&this.set(b,s.type),!this.get(v)&&s.vendor&&this.set(v,s.vendor)}if(e[L]){var c;if("string"!=typeof e[L])for(var k=0;!c&&k<e[L].length;)c=De(e[L][k++],Fe);else c=De(e[L],Fe);this.set(b,c)}break;case h:var A=e[N];if(A){var T=e[R];A==Ee&&(T=parseInt(Ie(T),10)>=13?"11":"10"),this.set(g,A).set(y,T)}this.get(g)==Ee&&"Xbox"==e[E]&&this.set(g,"Xbox").set(y,void 0);break;case m:var S=this.data,C=function(t){return S[t].getItem().setCH(e).parseCH().get()};this.set(u,C(u)).set(d,C(d)).set(p,C(p)).set(f,C(f)).set(h,C(h))}return this},Le.call(this,[["itemType",e],["ua",t],["uaCH",r],["rgxMap",n],["data",Ue(this,e)]]),this}function We(e,t,n){if(typeof e===s?(Se(e,!0)?(typeof t===s&&(n=t),t=e):(n=e,t=void 0),e=void 0):typeof e!==c||Se(t,!0)||(n=t,t=void 0),n&&typeof n.append===i){var r={};n.forEach(function(e,t){r[t]=e}),n=r}if(!(this instanceof We))return new We(e,t,n).getResult();var l=typeof e===c?e:n&&n[o]?n[o]:ke&&ke.userAgent?ke.userAgent:a,g=new Ve(n,!0),b=t?function(e,t){var n={},r=t;if(!Se(t))for(var o in r={},t)for(var a in t[o])r[a]=t[o][a].concat(r[a]?r[a]:[]);for(var i in e)n[i]=r[i]&&r[i].length%2==0?r[i].concat(e[i]):e[i];return n}(Be,t):Be,v=function(e){return e==m?function(){return new Ge(e,l,b,g).set("ua",l).set(u,this.getBrowser()).set(d,this.getCPU()).set(p,this.getDevice()).set(f,this.getEngine()).set(h,this.getOS()).get()}:function(){return new Ge(e,l,b[e],g).parseUA().get()}};return Le.call(this,[["getBrowser",v(u)],["getCPU",v(d)],["getDevice",v(p)],["getEngine",v(f)],["getOS",v(h)],["getResult",v(m)],["getUA",function(){return l}],["setUA",function(e){return Ce(e)&&(l=e.length>500?Re(e,500):e),this}]]).setUA(l),this}We.VERSION="2.0.4",We.BROWSER=Ae([g,y,w,b]),We.CPU=Ae([x]),We.DEVICE=Ae([E,v,b,k,_,T,A,S,$]),We.ENGINE=We.OS=Ae([g,y]);const qe=We(),Ke=qe.withFeatureCheck(),Ye=Ke instanceof Promise;if(Ye){const e=new Error("ua-parser-js withFeatureCheck returned a Promise, which is not supported in this context.");setTimeout(()=>{throw e},0)}const Xe=Ye?Ke:qe,Ze=async()=>"iPad"===(null==Xe?void 0:Xe.device.model)||"iPhone"===(null==Xe?void 0:Xe.device.model),Je=()=>"mobile"===(null==Xe?void 0:Xe.device.type)||"tablet"===(null==Xe?void 0:Xe.device.type)},2633:(e,t,n)=>{"use strict";n.d(t,{F:()=>a,c:()=>o});var r=n(7173);const o=(e,t)=>(n,o)=>{var a,i;const{content:l,buttonHref:s,buttonText:c,icon:u,once:d}=e,p=null===(a=o().inChatNotification)||void 0===a||null===(i=a.notifications)||void 0===i?void 0:i.find(e=>e.id===t);p?l!==p.content&&n({type:r.MN,content:l,buttonHref:s,buttonText:c,icon:u,once:d,id:t}):n({type:r.vP,content:l,buttonHref:s,buttonText:c,icon:u,once:d,id:t})},a=e=>(t,n)=>{var o,a;const i=null===(o=n().inChatNotification)||void 0===o||null===(a=o.notifications)||void 0===a?void 0:a.find(t=>t.id===e);i&&(i.once?t({type:r.oZ,id:e}):t({type:r.nG,id:e}))}},2769:e=>{"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},2856:(e,t,n)=>{"use strict";var r=n(8900),o=n(8099);e.exports=function(e,t){var n=o[e+"Prototype"],a=n&&n[t];if(a)return a;var i=r[e],l=i&&i.prototype;return l&&l[t]}},2927:(e,t,n)=>{"use strict";function r(e){let{messageSentTime:t,persistStateLifespan:n}=e;if(t){if(-1===n)return!0;if(0!==n){const e=new Date(t);return new Date(e.getTime()+1e3*n)>new Date}}return!1}n.d(t,{A:()=>r})},3057:e=>{"use strict";e.exports=function(e){return null==e}},3169:(e,t,n)=>{"use strict";n.d(t,{EE:()=>d,Ef:()=>h,T3:()=>p,Tu:()=>f,rK:()=>m});var r=n(3864),o=n(534),a=n(4927),i=n(8905),l=n(6538);const s=r.AH`
|
|
586
|
+
`,we=function(e){let{bubbleHidden:t,show:n,slug:r,layout:o,onDismiss:a,onProductClick:l,onNewsletterSubmit:s}=e;return i().createElement(be,{bubbleHidden:t,"aria-hidden":n?"false":"true","data-testid":"nudge-container","data-cy":"nudge-container","data-story":"NudgeContainer"},i().createElement(xe,null),i().createElement(ye,{"aria-label":"Dismiss pushMessage",title:"Dismiss pushMessage",onClick:a,type:"button","data-testid":"close-nudge-button","data-cy":"close-nudge-button"},i().createElement(y.US,{width:25,height:25})),i().createElement(ve,null,i().createElement(he,{layout:o,slug:r,onProductClick:l,onNewsletterSubmit:s})))},Ee=function(e){var t;let{hidden:n,layout:r,onDismiss:o,onProductClick:s,onNewsletterSubmit:c}=e;const{show:h,nudgeType:m,slug:g}=(0,l.d4)(f.G0),b=null!==(t=null==r?void 0:r.backdrop)&&void 0!==t&&t,y=(0,l.wA)(),x=(0,a.useCallback)(e=>{if(e.stopPropagation(),y((0,p.Y_)()),"function"==typeof o)try{o(e)}catch(e){console.error(e)}},[o,y]);return i().createElement(i().Fragment,null,b&&i().createElement(u,{backdrop:b,onClick:x}),m===d.MK.TEMPLATE&&i().createElement(we,{show:h,layout:r,slug:g,onDismiss:x,onProductClick:s,onNewsletterSubmit:c,bubbleHidden:n}),m===d.MK.CUSTOM&&i().createElement(v,null))}},2221:(e,t,n)=>{"use strict";n.d(t,{Ak:()=>r.Ak,DP:()=>g,Gi:()=>s,Ii:()=>x,Je:()=>w,Jm:()=>y,Lb:()=>o,Le:()=>d,M3:()=>m,MK:()=>u,Ns:()=>f,OT:()=>h,RT:()=>i,T5:()=>l,bF:()=>b,bS:()=>a,dT:()=>r.dT,fl:()=>r.fl,gH:()=>r.gH,lP:()=>c,oY:()=>E,rc:()=>v,sl:()=>p});var r=n(9292);const o=Object.freeze({NONE:"NONE",COLOR:"COLOR",PICTURE:"PICTURE"}),a=Object.freeze({USER:"USER",BOT:"BOT",WEBHOOK:"WEBHOOK",AGENT:"AGENT",SYSTEM:"SYSTEM",EXTERNAL:"EXTERNAL"}),i=Object.freeze({HANDOVER_POLL_INTERVAL_MS:3500,HANDOVER_REQUEST_POLL_INTERVAL_MS:1e4,REPLY_TIMEOUT_MS:4e3,REPLY_TIMEOUT_MAX_ATTEMPTS:3,REPLY_TIMEOUT_MS_MULTIPLIER:2}),l=Object.freeze({1e3:"250",800:"178",600:"124"}),s=Object.freeze({GREETING:"GREETING",FALLBACK:"FALLBACK",PATTERN_MATCH:"PATTERN_MATCH",KEYWORD_EXACT_MATCH:"KEYWORD_EXACT_MATCH",KEYWORD_MENTION:"KEYWORD_MENTION",SAMPLE_MATCH:"SAMPLE_MATCH",TRIGGER_DIALOGUE:"TRIGGER_DIALOGUE",FALLBACK_SUGGESTION:"FALLBACK_SUGGESTION",ZODIAC:"ZODIAC",MIMIR:"MIMIR",WEBHOOK:"WEBHOOK",INTENT_MATCH:"INTENT_MATCH"}),c=Object.freeze({QUICK_REPLY:"QUICK_REPLY",EXTERNAL_LINK:"EXTERNAL_LINK",EMAIL:"EMAIL",PHONE:"PHONE",HANDOVER_REQUEST:"HANDOVER_REQUEST",PRIVACY_EXPORT:"PRIVACY_EXPORT",PRIVACY_DELETE:"PRIVACY_DELETE",DIALOGUE_TRIGGER:"DIALOGUE_TRIGGER",SUGGESTION_DIALOGUE_TRIGGER:"SUGGESTION_DIALOGUE_TRIGGER",CONTACT_DETAILS:"CONTACT_DETAILS",UPLOAD_ATTACHMENT:"UPLOAD_ATTACHMENT",CHECKBOX:"CHECKBOX",SUBMIT:"SUBMIT",edit_contact_details:"edit_contact_details",SLIDER:"SLIDER"}),u=Object.freeze({TEMPLATE:"TEMPLATE",CUSTOM:"CUSTOM"}),d=Object.freeze({CLEAN:"CLEAN",ERROR:"ERROR",INFECTED:"INFECTED",PROCESSING:"PROCESSING"}),p=Object.freeze({IMAGE:"image",PDF:"pdf",TEXT:"text"}),f=(Object.freeze({DISABLED:"DISABLED",PLATFORM:"PLATFORM",EXTERNAL:"EXTERNAL"}),Object.freeze({PRIDE:"PRIDE",EASTER:"EASTER",CHRISTMAS:"CHRISTMAS"})),h=Object.freeze({NO_SPLIT:"X",SPLIT_A:"A",SPLIT_B:"B"}),m=18e5,g=5e3,b=Object.freeze({bottom:"16px",right:"16px"}),v=Object.freeze({PREFIX:"PREFIX",SUFFIX:"SUFFIX"}),y=Object.freeze({MAINTENANCE:"MAINTENANCE",LANGUAGE_SWITCH:"LANGUAGE_SWITCH"}),x=(Object.freeze({WEBHOOK:"WEBHOOK",PLUGIN:"PLUGIN",STANDARD:"STANDARD"}),Object.freeze({HORIZONTAL:"HORIZONTAL",VERTICAL:"VERTICAL"})),w=Object.freeze({CUSTOM_INTEGRATION:"app",EMAIL:"email",FB_MESSENGER:"facebook",SDK_ANDROID:"android",SDK_IOS:"ios",SLACK:"slack",TEST:"test",WEB:"web",WEB_MOBILE:"mobile"}),E=[".pdf",".heic","image/*","text/html","text/csv","text/xml","text/json","text/markdown","text/calendar","text/plain","text/tab-separated-values"].join(",")},2279:(e,t,n)=>{"use strict";n.d(t,{l:()=>o});var r=n(2221);const o=(e,t,n)=>{if(e.storagePath&&e.status===r.Le.CLEAN)return`${t}/chatbubble/${r.Ak}/attachment/${e.storagePath}?token=${n}`}},2366:(e,t,n)=>{"use strict";n.d(t,{B:()=>o,U:()=>a});var r=n(5279);const o="kindly-chat-browser-id",a=()=>{const e=localStorage.getItem(o);if(!e){const e=(0,r.A)();return localStorage.setItem(o,e),e}return e}},2628:(e,t,n)=>{"use strict";n.d(t,{A:()=>Je,u:()=>Ze});var r,o="user-agent",a="",i="function",l="undefined",s="object",c="string",u="browser",d="cpu",p="device",f="engine",h="os",m="result",g="name",b="type",v="vendor",y="version",x="architecture",w="major",E="model",k="console",_="mobile",A="tablet",T="smarttv",S="wearable",$="xr",C="embedded",O="inapp",I="brands",L="formFactors",M="fullVersionList",N="platform",R="platformVersion",P="bitness",D="sec-ch-ua",j=D+"-full-version-list",F=D+"-arch",z=D+"-"+P,B=D+"-form-factors",H=D+"-"+_,U=D+"-"+E,V=D+"-"+N,G=V+"-version",W=[I,M,_,E,N,R,x,L,P],q="Amazon",K="Apple",Y="ASUS",X="BlackBerry",Z="Google",J="Huawei",Q="Lenovo",ee="Honor",te="LG",ne="Microsoft",re="Motorola",oe="Nvidia",ae="OnePlus",ie="OPPO",le="Samsung",se="Sharp",ce="Sony",ue="Xiaomi",de="Zebra",pe="Chrome",fe="Chromium",he="Chromecast",me="Edge",ge="Firefox",be="Opera",ve="Facebook",ye="Sogou",xe="Mobile ",we=" Browser",Ee="Windows",ke=typeof window!==l&&window.navigator?window.navigator:void 0,_e=ke&&ke.userAgentData?ke.userAgentData:void 0,Ae=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},Te=function(e,t){if(typeof e===s&&e.length>0){for(var n in e)if(Oe(t)==Oe(e[n]))return!0;return!1}return!!$e(e)&&Oe(t)==Oe(e)},Se=function(e,t){for(var n in e)return/^(browser|cpu|device|engine|os)$/.test(n)||!!t&&Se(e[n])},$e=function(e){return typeof e===c},Ce=function(e){if(e){for(var t=[],n=Me(/\\?\"/g,e).split(","),r=0;r<n.length;r++)if(n[r].indexOf(";")>-1){var o=Re(n[r]).split(";v=");t[r]={brand:o[0],version:o[1]}}else t[r]=Re(n[r]);return t}},Oe=function(e){return $e(e)?e.toLowerCase():e},Ie=function(e){return $e(e)?Me(/[^\d\.]/g,e).split(".")[0]:void 0},Le=function(e){for(var t in e){var n=e[t];typeof n==s&&2==n.length?this[n[0]]=n[1]:this[n]=void 0}return this},Me=function(e,t){return $e(t)?t.replace(e,a):t},Ne=function(e){return Me(/\\?\"/g,e)},Re=function(e,t){if($e(e))return e=Me(/^\s\s*/,e),typeof t===l?e:e.substring(0,500)},Pe=function(e,t){if(e&&t)for(var n,r,o,a,l,c,u=0;u<t.length&&!l;){var d=t[u],p=t[u+1];for(n=r=0;n<d.length&&!l&&d[n];)if(l=d[n++].exec(e))for(o=0;o<p.length;o++)c=l[++r],typeof(a=p[o])===s&&a.length>0?2===a.length?typeof a[1]==i?this[a[0]]=a[1].call(this,c):this[a[0]]=a[1]:a.length>=3&&(typeof a[1]!==i||a[1].exec&&a[1].test?3==a.length?this[a[0]]=c?c.replace(a[1],a[2]):void 0:4==a.length?this[a[0]]=c?a[3].call(this,c.replace(a[1],a[2])):void 0:a.length>4&&(this[a[0]]=c?a[3].apply(this,[c.replace(a[1],a[2])].concat(a.slice(4))):void 0):a.length>3?this[a[0]]=c?a[1].apply(this,a.slice(2)):void 0:this[a[0]]=c?a[1].call(this,c,a[2]):void 0):this[a]=c||void 0;u+=2}},De=function(e,t){for(var n in t)if(typeof t[n]===s&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(Te(t[n][r],e))return"?"===n?void 0:n}else if(Te(t[n],e))return"?"===n?void 0:n;return t.hasOwnProperty("*")?t["*"]:e},je={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2",8.1:"6.3",10:["6.4","10.0"],NT:""},Fe={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},ze={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},Be={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[y,[g,xe+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[y,[g,me+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[y,[g,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[g,y],[/opios[\/ ]+([\w\.]+)/i],[y,[g,be+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[y,[g,be+" GX"]],[/\bopr\/([\w\.]+)/i],[y,[g,be]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[y,[g,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[y,[g,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i,/(heytap|ovi|115|surf)browser\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[g,y],[/quark(?:pc)?\/([-\w\.]+)/i],[y,[g,"Quark"]],[/\bddg\/([\w\.]+)/i],[y,[g,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[y,[g,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[y,[g,"WeChat"]],[/konqueror\/([\w\.]+)/i],[y,[g,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[y,[g,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[y,[g,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[y,[g,"Smart "+Q+we]],[/(avast|avg)\/([\w\.]+)/i],[[g,/(.+)/,"$1 Secure"+we],y],[/\bfocus\/([\w\.]+)/i],[y,[g,ge+" Focus"]],[/\bopt\/([\w\.]+)/i],[y,[g,be+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[y,[g,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[y,[g,"Dolphin"]],[/coast\/([\w\.]+)/i],[y,[g,be+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[y,[g,"MIUI"+we]],[/fxios\/([\w\.-]+)/i],[y,[g,xe+ge]],[/\bqihoobrowser\/?([\w\.]*)/i],[y,[g,"360"]],[/\b(qq)\/([\w\.]+)/i],[[g,/(.+)/,"$1Browser"],y],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[g,/(.+)/,"$1"+we],y],[/samsungbrowser\/([\w\.]+)/i],[y,[g,le+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[y,[g,ye+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[g,ye+" Mobile"],y],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[g,y],[/(lbbrowser|rekonq)/i],[g],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[y,g],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[g,ve],y,[b,O]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[g,y,[b,O]],[/\bgsa\/([\w\.]+) .*safari\//i],[y,[g,"GSA"],[b,O]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[y,[g,"TikTok"],[b,O]],[/\[(linkedin)app\]/i],[g,[b,O]],[/(chromium)[\/ ]([-\w\.]+)/i],[g,y],[/headlesschrome(?:\/([\w\.]+)| )/i],[y,[g,pe+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[y,[g,me+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[g,pe+" WebView"],y],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[y,[g,"Android"+we]],[/chrome\/([\w\.]+) mobile/i],[y,[g,xe+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[g,y],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[y,[g,xe+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[g,xe+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[y,g],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[g,[y,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[g,y],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[g,xe+ge],y],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[g,"Netscape"],y],[/(wolvic|librewolf)\/([\w\.]+)/i],[g,y],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[y,[g,ge+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[g,[y,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[g,[y,/[^\d\.]+./,a]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[x,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[x,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[x,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[x,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[x,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[x,/ower/,a,Oe]],[/ sun4\w[;\)]/i],[[x,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[x,Oe]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[E,[v,le],[b,A]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[E,[v,le],[b,_]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[E,[v,K],[b,_]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[E,[v,K],[b,A]],[/(macintosh);/i],[E,[v,K]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[E,[v,se],[b,_]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[E,[v,ee],[b,A]],[/honor([-\w ]+)[;\)]/i],[E,[v,ee],[b,_]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[E,[v,J],[b,A]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[E,[v,J],[b,_]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[E,/_/g," "],[v,ue],[b,A]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[E,/_/g," "],[v,ue],[b,_]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-k]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[E,[v,ae],[b,_]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[E,[v,ie],[b,_]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[E,[v,De,{OnePlus:["203","304","403","404","413","415"],"*":ie}],[b,A]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[E,[v,"BLU"],[b,_]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[E,[v,"Vivo"],[b,_]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[E,[v,"Realme"],[b,_]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[E,[v,Q],[b,A]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[E,[v,Q],[b,_]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[E,[v,re],[b,_]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[E,[v,re],[b,A]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[E,[v,te],[b,A]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[E,[v,te],[b,_]],[/(nokia) (t[12][01])/i],[v,E,[b,A]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[E,/_/g," "],[b,_],[v,"Nokia"]],[/(pixel (c|tablet))\b/i],[E,[v,Z],[b,A]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[E,[v,Z],[b,_]],[/(google) (pixelbook( go)?)/i],[v,E],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[E,[v,ce],[b,_]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[E,"Xperia Tablet"],[v,ce],[b,A]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[E,[v,q],[b,A]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[E,/(.+)/g,"Fire Phone $1"],[v,q],[b,_]],[/(playbook);[-\w\),; ]+(rim)/i],[E,v,[b,A]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[E,[v,X],[b,_]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[E,[v,Y],[b,A]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[E,[v,Y],[b,_]],[/(nexus 9)/i],[E,[v,"HTC"],[b,A]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[v,[E,/_/g," "],[b,_]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[E,[v,"TCL"],[b,A]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[E,[v,"TCL"],[b,_]],[/(itel) ((\w+))/i],[[v,Oe],E,[b,De,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[E,[v,"Acer"],[b,A]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[E,[v,"Meizu"],[b,_]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[E,[v,"Ulefone"],[b,_]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[E,[v,"Energizer"],[b,_]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[E,[v,"Cat"],[b,_]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[E,[v,"Smartfren"],[b,_]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[E,[v,"Nothing"],[b,_]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[E,[v,"Archos"],[b,A]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[E,[v,"Archos"],[b,_]],[/; (n159v)/i],[E,[v,"HMD"],[b,_]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[v,E,[b,A]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i],[v,E,[b,_]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[v,E,[b,A]],[/(surface duo)/i],[E,[v,ne],[b,A]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[E,[v,"Fairphone"],[b,_]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[E,[v,oe],[b,A]],[/(sprint) (\w+)/i],[v,E,[b,_]],[/(kin\.[onetw]{3})/i],[[E,/\./g," "],[v,ne],[b,_]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[E,[v,de],[b,A]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[E,[v,de],[b,_]],[/smart-tv.+(samsung)/i],[v,[b,T]],[/hbbtv.+maple;(\d+)/i],[[E,/^/,"SmartTV"],[v,le],[b,T]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[v,E,[b,T]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[v,te],[b,T]],[/(apple) ?tv/i],[v,[E,K+" TV"],[b,T]],[/crkey.*devicetype\/chromecast/i],[[E,he+" Third Generation"],[v,Z],[b,T]],[/crkey.*devicetype\/([^/]*)/i],[[E,/^/,"Chromecast "],[v,Z],[b,T]],[/fuchsia.*crkey/i],[[E,he+" Nest Hub"],[v,Z],[b,T]],[/crkey/i],[[E,he],[v,Z],[b,T]],[/(portaltv)/i],[E,[v,ve],[b,T]],[/droid.+aft(\w+)( bui|\))/i],[E,[v,q],[b,T]],[/(shield \w+ tv)/i],[E,[v,oe],[b,T]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[E,[v,se],[b,T]],[/(bravia[\w ]+)( bui|\))/i],[E,[v,ce],[b,T]],[/(mi(tv|box)-?\w+) bui/i],[E,[v,ue],[b,T]],[/Hbbtv.*(technisat) (.*);/i],[v,E,[b,T]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[v,/.+\/(\w+)/,"$1",De,{LG:"lge"}],[E,Re],[b,T]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[E,[b,T]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:|large screen[\w ]+safari)\b/i],[[b,T]],[/(playstation \w+)/i],[E,[v,ce],[b,k]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[E,[v,ne],[b,k]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i],[v,E,[b,k]],[/droid.+; (shield)( bui|\))/i],[E,[v,oe],[b,k]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[E,[v,le],[b,S]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[v,E,[b,S]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[E,[v,ie],[b,S]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[E,[v,K],[b,S]],[/(opwwe\d{3})/i],[E,[v,ae],[b,S]],[/(moto 360)/i],[E,[v,re],[b,S]],[/(smartwatch 3)/i],[E,[v,ce],[b,S]],[/(g watch r)/i],[E,[v,te],[b,S]],[/droid.+; (wt63?0{2,3})\)/i],[E,[v,de],[b,S]],[/droid.+; (glass) \d/i],[E,[v,Z],[b,$]],[/(pico) (4|neo3(?: link|pro)?)/i],[v,E,[b,$]],[/(quest( \d| pro)?s?).+vr/i],[E,[v,ve],[b,$]],[/mobile vr; rv.+firefox/i],[[b,$]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[v,[b,C]],[/(aeobc)\b/i],[E,[v,q],[b,C]],[/(homepod).+mac os/i],[E,[v,K],[b,C]],[/windows iot/i],[[b,C]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[E,[b,De,{mobile:"Mobile",xr:"VR","*":A}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[b,A]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[b,_]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[E,[v,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[y,[g,me+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[g,y],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[y,[g,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[g,y],[/ladybird\//i],[[g,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[y,g]],os:[[/(windows nt) (6\.[23]); arm/i],[[g,/N/,"R"],[y,De,je]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[g,y],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[y,/(;|\))/g,"",De,je],[g,Ee]],[/(windows ce)\/?([\d\.]*)/i],[g,y],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[y,/_/g,"."],[g,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[g,"macOS"],[y,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[y,[g,he+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[y,[g,he+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[y,[g,he+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[y,[g,he+" Linux"]],[/crkey\/([\d\.]+)/i],[y,[g,he]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[y,g],[/(ubuntu) ([\w\.]+) like android/i],[[g,/(.+)/,"$1 Touch"],y],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[g,y],[/\(bb(10);/i],[y,[g,X]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[y,[g,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[y,[g,ge+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[y,[g,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[y,De,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[g,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[y,[g,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[g,"Chrome OS"],y],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[g,y],[/(sunos) ?([\d\.]*)/i],[[g,"Solaris"],y],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[g,y]]},He=(Le.call((r={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}}).init,[[u,[g,y,w,b]],[d,[x]],[p,[b,E,v]],[f,[g,y]],[h,[g,y]]]),Le.call(r.isIgnore,[[u,[y,w]],[f,[y]],[h,[y]]]),Le.call(r.isIgnoreRgx,[[u,/ ?browser$/i],[h,/ ?os$/i]]),Le.call(r.toString,[[u,[g,y]],[d,[x]],[p,[v,E]],[f,[g,y]],[h,[g,y]]]),r),Ue=function(e,t){var n=He.init[t],r=He.isIgnore[t]||0,o=He.isIgnoreRgx[t]||0,i=He.toString[t]||0;function s(){Le.call(this,n)}return s.prototype.getItem=function(){return e},s.prototype.withClientHints=function(){return _e?_e.getHighEntropyValues(W).then(function(t){return e.setCH(new Ve(t,!1)).parseCH().get()}):e.parseCH().get()},s.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=m&&(s.prototype.is=function(e){var t=!1;for(var n in this)if(this.hasOwnProperty(n)&&!Te(r,n)&&Oe(o?Me(o,this[n]):this[n])==Oe(o?Me(o,e):e)){if(t=!0,e!=l)break}else if(e==l&&t){t=!t;break}return t},s.prototype.toString=function(){var e=a;for(var t in i)typeof this[i[t]]!==l&&(e+=(e?" ":a)+this[i[t]]);return e||l}),_e||(s.prototype.then=function(e){var t=this,n=function(){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e])};n.prototype={is:s.prototype.is,toString:s.prototype.toString};var r=new n;return e(r),r}),new s};function Ve(e,t){if(e=e||{},Le.call(this,W),t)Le.call(this,[[I,Ce(e[D])],[M,Ce(e[j])],[_,/\?1/.test(e[H])],[E,Ne(e[U])],[N,Ne(e[V])],[R,Ne(e[G])],[x,Ne(e[F])],[L,Ce(e[B])],[P,Ne(e[z])]]);else for(var n in e)this.hasOwnProperty(n)&&typeof e[n]!==l&&(this[n]=e[n])}function Ge(e,t,n,r){return this.get=function(e){return e?this.data.hasOwnProperty(e)?this.data[e]:void 0:this.data},this.set=function(e,t){return this.data[e]=t,this},this.setCH=function(e){return this.uaCH=e,this},this.detectFeature=function(){if(ke&&ke.userAgent==this.ua)switch(this.itemType){case u:ke.brave&&typeof ke.brave.isBrave==i&&this.set(g,"Brave");break;case p:!this.get(b)&&_e&&_e[_]&&this.set(b,_),"Macintosh"==this.get(E)&&ke&&typeof ke.standalone!==l&&ke.maxTouchPoints&&ke.maxTouchPoints>2&&this.set(E,"iPad").set(b,A);break;case h:!this.get(g)&&_e&&_e[N]&&this.set(g,_e[N]);break;case m:var e=this.data,t=function(t){return e[t].getItem().detectFeature().get()};this.set(u,t(u)).set(d,t(d)).set(p,t(p)).set(f,t(f)).set(h,t(h))}return this},this.parseUA=function(){return this.itemType!=m&&Pe.call(this.data,this.ua,this.rgxMap),this.itemType==u&&this.set(w,Ie(this.get(y))),this},this.parseCH=function(){var e=this.uaCH,t=this.rgxMap;switch(this.itemType){case u:case f:var n,r=e[M]||e[I];if(r)for(var o in r){var a=r[o].brand||r[o],i=r[o].version;this.itemType==u&&!/not.a.brand/i.test(a)&&(!n||/Chrom/.test(n)&&a!=fe||n==me&&/WebView2/.test(a))&&(a=De(a,ze),(n=this.get(g))&&!/Chrom/.test(n)&&/Chrom/.test(a)||this.set(g,a).set(y,i).set(w,Ie(i)),n=a),this.itemType==f&&a==fe&&this.set(y,i)}break;case d:var l=e[x];l&&(l&&"64"==e[P]&&(l+="64"),Pe.call(this.data,l+";",t));break;case p:if(e[_]&&this.set(b,_),e[E]&&(this.set(E,e[E]),!this.get(b)||!this.get(v))){var s={};Pe.call(s,"droid 9; "+e[E]+")",t),!this.get(b)&&s.type&&this.set(b,s.type),!this.get(v)&&s.vendor&&this.set(v,s.vendor)}if(e[L]){var c;if("string"!=typeof e[L])for(var k=0;!c&&k<e[L].length;)c=De(e[L][k++],Fe);else c=De(e[L],Fe);this.set(b,c)}break;case h:var A=e[N];if(A){var T=e[R];A==Ee&&(T=parseInt(Ie(T),10)>=13?"11":"10"),this.set(g,A).set(y,T)}this.get(g)==Ee&&"Xbox"==e[E]&&this.set(g,"Xbox").set(y,void 0);break;case m:var S=this.data,$=function(t){return S[t].getItem().setCH(e).parseCH().get()};this.set(u,$(u)).set(d,$(d)).set(p,$(p)).set(f,$(f)).set(h,$(h))}return this},Le.call(this,[["itemType",e],["ua",t],["uaCH",r],["rgxMap",n],["data",Ue(this,e)]]),this}function We(e,t,n){if(typeof e===s?(Se(e,!0)?(typeof t===s&&(n=t),t=e):(n=e,t=void 0),e=void 0):typeof e!==c||Se(t,!0)||(n=t,t=void 0),n&&typeof n.append===i){var r={};n.forEach(function(e,t){r[t]=e}),n=r}if(!(this instanceof We))return new We(e,t,n).getResult();var l=typeof e===c?e:n&&n[o]?n[o]:ke&&ke.userAgent?ke.userAgent:a,g=new Ve(n,!0),b=t?function(e,t){var n={},r=t;if(!Se(t))for(var o in r={},t)for(var a in t[o])r[a]=t[o][a].concat(r[a]?r[a]:[]);for(var i in e)n[i]=r[i]&&r[i].length%2==0?r[i].concat(e[i]):e[i];return n}(Be,t):Be,v=function(e){return e==m?function(){return new Ge(e,l,b,g).set("ua",l).set(u,this.getBrowser()).set(d,this.getCPU()).set(p,this.getDevice()).set(f,this.getEngine()).set(h,this.getOS()).get()}:function(){return new Ge(e,l,b[e],g).parseUA().get()}};return Le.call(this,[["getBrowser",v(u)],["getCPU",v(d)],["getDevice",v(p)],["getEngine",v(f)],["getOS",v(h)],["getResult",v(m)],["getUA",function(){return l}],["setUA",function(e){return $e(e)&&(l=e.length>500?Re(e,500):e),this}]]).setUA(l),this}We.VERSION="2.0.4",We.BROWSER=Ae([g,y,w,b]),We.CPU=Ae([x]),We.DEVICE=Ae([E,v,b,k,_,T,A,S,C]),We.ENGINE=We.OS=Ae([g,y]);const qe=We(),Ke=qe.withFeatureCheck(),Ye=Ke instanceof Promise;if(Ye){const e=new Error("ua-parser-js withFeatureCheck returned a Promise, which is not supported in this context.");setTimeout(()=>{throw e},0)}const Xe=Ye?Ke:qe,Ze=async()=>"iPad"===(null==Xe?void 0:Xe.device.model)||"iPhone"===(null==Xe?void 0:Xe.device.model),Je=()=>"mobile"===(null==Xe?void 0:Xe.device.type)||"tablet"===(null==Xe?void 0:Xe.device.type)},2633:(e,t,n)=>{"use strict";n.d(t,{F:()=>a,c:()=>o});var r=n(7173);const o=(e,t)=>(n,o)=>{var a,i;const{content:l,buttonHref:s,buttonText:c,icon:u,once:d}=e,p=null===(a=o().inChatNotification)||void 0===a||null===(i=a.notifications)||void 0===i?void 0:i.find(e=>e.id===t);p?l!==p.content&&n({type:r.MN,content:l,buttonHref:s,buttonText:c,icon:u,once:d,id:t}):n({type:r.vP,content:l,buttonHref:s,buttonText:c,icon:u,once:d,id:t})},a=e=>(t,n)=>{var o,a;const i=null===(o=n().inChatNotification)||void 0===o||null===(a=o.notifications)||void 0===a?void 0:a.find(t=>t.id===e);i&&(i.once?t({type:r.oZ,id:e}):t({type:r.nG,id:e}))}},2769:e=>{"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},2856:(e,t,n)=>{"use strict";var r=n(8900),o=n(8099);e.exports=function(e,t){var n=o[e+"Prototype"],a=n&&n[t];if(a)return a;var i=r[e],l=i&&i.prototype;return l&&l[t]}},2927:(e,t,n)=>{"use strict";function r(e){let{messageSentTime:t,persistStateLifespan:n}=e;if(t){if(-1===n)return!0;if(0!==n){const e=new Date(t);return new Date(e.getTime()+1e3*n)>new Date}}return!1}n.d(t,{A:()=>r})},3057:e=>{"use strict";e.exports=function(e){return null==e}},3169:(e,t,n)=>{"use strict";n.d(t,{EE:()=>d,Ef:()=>h,T3:()=>p,Tu:()=>f,rK:()=>m});var r=n(3864),o=n(534),a=n(4927),i=n(8905),l=n(6538);const s=r.AH`
|
|
499
587
|
box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2) inset;
|
|
500
588
|
@supports (background-color: hsl(from black h s l)) {
|
|
501
589
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
@@ -505,21 +593,21 @@
|
|
|
505
593
|
filter: brightness(0.9);
|
|
506
594
|
}
|
|
507
595
|
`,c=r.AH`
|
|
508
|
-
--button-background-1741866936: ${e=>{let{theme:t
|
|
509
|
-
--button-color-1741866936: ${e=>{let{theme:t
|
|
596
|
+
--button-background-1741866936: ${e=>{let{theme:t,$isCheckbox:n,$isSecondaryButton:r}=e;return((e,t,n)=>t?e.panelBackground:n?e.secondaryButtonBackground:e.buttonBackground)(t,n,r)}};
|
|
597
|
+
--button-color-1741866936: ${e=>{let{theme:t,$isCheckbox:n,$isSecondaryButton:r}=e;return((e,t,n)=>t?(0,l.w5)(e.panelBackground,i.AV.light,i.AV.dark):n?(0,l.w5)(e.secondaryButtonBackground,i.AV.light,i.AV.dark):e.buttonText)(t,n,r)}};
|
|
510
598
|
|
|
511
599
|
position: relative;
|
|
512
600
|
display: flex;
|
|
513
601
|
font-weight: normal;
|
|
514
602
|
color: var(--button-color-1741866936);
|
|
515
603
|
background-color: var(--button-background-1741866936);
|
|
516
|
-
box-shadow: ${e=>{let{flat:t
|
|
604
|
+
box-shadow: ${e=>{let{$flat:t,$disabled:n}=e;return t||n?"none":"0 1px 4px 0 rgba(0, 0, 0, 0.08)"}};
|
|
517
605
|
opacity: ${e=>{let{$loading:t}=e;return t?.6:1}};
|
|
518
|
-
justify-content: ${e=>{let{isCheckbox:t}=e;return t?"flex-start":"center"}};
|
|
606
|
+
justify-content: ${e=>{let{$isCheckbox:t}=e;return t?"flex-start":"center"}};
|
|
519
607
|
align-items: center;
|
|
520
608
|
text-align: center;
|
|
521
609
|
transition: all 0.2s ease;
|
|
522
|
-
${e=>e
|
|
610
|
+
${e=>e.$selected&&s}
|
|
523
611
|
outline: none;
|
|
524
612
|
|
|
525
613
|
@media (pointer: coarse) {
|
|
@@ -552,7 +640,7 @@
|
|
|
552
640
|
|
|
553
641
|
font-family: ${e=>{let{theme:t}=e;return t.customFont?t.customFont:o.m.default}};
|
|
554
642
|
& svg {
|
|
555
|
-
margin-left: ${e=>{let{isCheckbox:t}=e;return t?"0px":"6px"}};
|
|
643
|
+
margin-left: ${e=>{let{$isCheckbox:t}=e;return t?"0px":"6px"}};
|
|
556
644
|
}
|
|
557
645
|
`,d=r.Ay.span`
|
|
558
646
|
display: flex;
|
|
@@ -694,234 +782,40 @@
|
|
|
694
782
|
animation-name: ${d}
|
|
695
783
|
`,r.AH`
|
|
696
784
|
animation: 1.8s ${h} infinite 0.3s;
|
|
697
|
-
`},3273:(e,t,n)=>{"use strict";var r=n(1395),o=n(5426);e.exports=function(e){return r(o(e))}},3313:(e,t,n)=>{"use strict";n.d(t,{CB:()=>r,Eg:()=>h,FZ:()=>m,HW:()=>d,M2:()=>o,MO:()=>y,Q4:()=>b,SO:()=>k,TF:()=>g,XM:()=>w,Xu:()=>u,YR:()=>v,d$:()=>p,d7:()=>c,hn:()=>l,kA:()=>i,nX:()=>_,nm:()=>s,t1:()=>f,uA:()=>x,uS:()=>a,wM:()=>E});const r="START_OVER",o="SET_LANGUAGE",a="CLOSE_CHATBUBBLE",i="OPEN_CHATBUBBLE",l="POPPED_UP",s="SET_STARTED_AT",c="SET_HAS_REQUESTED_GREETING",u="SET_CURRENT_MODAL",d="SET_USER_IS_IDLE",p="SET_CHAT_HAS_STARTED",f="HIDE_CONTACT_DETAILS",h="SHOW_CONTACT_DETAILS",m="ATTACHMENT_BUTTON_CLICKED",g="SET_ATTACHMENT_FILES",b="CLEAR_ATTACHMENT_FILES",v="ATTACHMENT_PROMPT_SHOWED",y="SET_ERROR",x="SET_GLOBAL_ICONS_STATE",w="SET_CHAT_FULL_WINDOW",E="DISPLAY_OVERLAY_VIEW",k="CLOSE_OVERLAY_VIEW",_="SHOW_PREVIOUS_OVERLAY_VIEW"},3335:(e,t,n)=>{"use strict";var r=n(9155),o=Symbol.for("react.element"),a=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,n){var r,s={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===s[r]&&(s[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:s,_owner:i.current}}},
|
|
785
|
+
`},3273:(e,t,n)=>{"use strict";var r=n(1395),o=n(5426);e.exports=function(e){return r(o(e))}},3313:(e,t,n)=>{"use strict";n.d(t,{CB:()=>r,Eg:()=>h,FZ:()=>m,HW:()=>d,M2:()=>o,MO:()=>y,Q4:()=>b,SO:()=>k,TF:()=>g,XM:()=>w,Xu:()=>u,YR:()=>v,d$:()=>p,d7:()=>c,hn:()=>l,kA:()=>i,nX:()=>_,nm:()=>s,t1:()=>f,uA:()=>x,uS:()=>a,wM:()=>E});const r="START_OVER",o="SET_LANGUAGE",a="CLOSE_CHATBUBBLE",i="OPEN_CHATBUBBLE",l="POPPED_UP",s="SET_STARTED_AT",c="SET_HAS_REQUESTED_GREETING",u="SET_CURRENT_MODAL",d="SET_USER_IS_IDLE",p="SET_CHAT_HAS_STARTED",f="HIDE_CONTACT_DETAILS",h="SHOW_CONTACT_DETAILS",m="ATTACHMENT_BUTTON_CLICKED",g="SET_ATTACHMENT_FILES",b="CLEAR_ATTACHMENT_FILES",v="ATTACHMENT_PROMPT_SHOWED",y="SET_ERROR",x="SET_GLOBAL_ICONS_STATE",w="SET_CHAT_FULL_WINDOW",E="DISPLAY_OVERLAY_VIEW",k="CLOSE_OVERLAY_VIEW",_="SHOW_PREVIOUS_OVERLAY_VIEW"},3335:(e,t,n)=>{"use strict";var r=n(9155),o=Symbol.for("react.element"),a=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,n){var r,s={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===s[r]&&(s[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:s,_owner:i.current}}},3435:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var r=n(9749),o=n.n(r),a=n(9155),i=n.n(a),l=n(3864),s=n(8905),c=n(6538);const u=l.Ay.div`
|
|
698
786
|
display: flex;
|
|
699
|
-
flex-direction:
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
font-size: var(--_kindlychat-font-size-sm);
|
|
703
|
-
${e=>{let{show:t}=e;return t&&"margin-top: 4px;"}}
|
|
704
|
-
right: 0;
|
|
705
|
-
left: auto;
|
|
706
|
-
color: var(--panel-background-white-black-contrast-1743170834);
|
|
707
|
-
max-height: ${e=>{let{show:t}=e;return t?"120px":"0px"}};
|
|
708
|
-
opacity: ${e=>{let{show:t}=e;return t?1:0}};
|
|
709
|
-
transition:
|
|
710
|
-
max-height 1s ease,
|
|
711
|
-
opacity 240ms ease ${e=>{let{show:t}=e;return t?"480ms":0}};
|
|
787
|
+
flex-direction: column;
|
|
788
|
+
margin-top: 16px;
|
|
789
|
+
position: relative;
|
|
712
790
|
|
|
713
|
-
|
|
714
|
-
|
|
791
|
+
&.no-margin {
|
|
792
|
+
margin: 0;
|
|
715
793
|
}
|
|
716
|
-
`,s=function(e){let{width:t=24,height:n=24,color:r="#333"}=e;return o().createElement("svg",{width:n,height:t,viewBox:"0 0 24 24",fill:"none"},o().createElement("path",{d:"M4.952 16.354l5.263-10.497c.738-1.472 2.839-1.472 3.576 0l5.258 10.497a2 2 0 01-1.788 2.896H6.741a2 2 0 01-1.789-2.896z",stroke:r,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M12 10v2",stroke:r,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M12.5 16a.5.5 0 11-1 0 .5.5 0 011 0z",stroke:r}))};var c=n(7094);const u=function(e){var t,n,r,u,d;let{name:p,control:f}=e;const{errors:h,isSubmitted:m}=(0,a.lN)({name:p,control:f}),g=(null===(t=h[p])||void 0===t?void 0:t.type)!==c.k1.CUSTOM&&((null===(n=h[p])||void 0===n?void 0:n.message)||(null===(r=h[`browser_error_${p}`])||void 0===r?void 0:r.message)||(null===(u=h[p])||void 0===u||null===(d=u.ref)||void 0===d?void 0:d.validationMessage));return o().createElement(l,{show:g&&m,id:`error_${p}`},o().createElement(s,{width:16,height:16,color:i.Tj.errorColor}),g)}},3514:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(9155),o=n(541),a=n(1695);function i(){const{nudges:e}=(0,o.d4)(a.Od);return(0,r.useMemo)(()=>{var t,n,r,o,a;return[...null!==(t=null==e?void 0:e.form_nudges)&&void 0!==t?t:[],...null!==(n=null==e?void 0:e.custom_nudges)&&void 0!==n?n:[],...null!==(r=null==e?void 0:e.product_nudges)&&void 0!==r?r:[],...null!==(o=null==e?void 0:e.text_nudges)&&void 0!==o?o:[],...null!==(a=null==e?void 0:e.multiple_choice_nudges)&&void 0!==a?a:[]]},[e])}},3531:(e,t,n)=>{"use strict";var r=n(8900).navigator,o=r&&r.userAgent;e.exports=o?String(o):""},3699:(e,t,n)=>{"use strict";n.d(t,{B$:()=>l,Bu:()=>c,TA:()=>s,UN:()=>i,aO:()=>a});var r=n(2221);const o=["Bytes","kB","MB","GB"],a=1024,i=5*a,l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(0===e)return"0 Bytes";const n=Math.floor(Math.log(e)/Math.log(a));return`${parseFloat((e/a**n).toFixed(t))} ${o[n]}`},s=e=>new Promise((t,n)=>{const o=e.size/a;if(o>i)return void n(new Error(`The file must be less than ${l(i*a)}`));const s=new FileReader;s.readAsDataURL(e),s.onload=()=>t({url:s.result,file:e,sizeKb:o,name:e.name,type:e.type,status:r.Le.PROCESSING,sender:r.bS.USER}),s.onabort=()=>n(new Error(s.error))}),c=e=>new Promise((t,n)=>{const r=new FileReader;r.readAsArrayBuffer(e),r.onload=()=>t(r.result),r.onabort=()=>n(new Error(r.error))})},3753:(e,t,n)=>{"use strict";var r=n(4871),o=n(8900),a=n(7525),i="__core-js_shared__",l=e.exports=o[i]||a(i,{});(l.versions||(l.versions=[])).push({version:"3.43.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.43.0/LICENSE",source:"https://github.com/zloirock/core-js"})},3855:(e,t,n)=>{"use strict";var r=n(9098),o=n(6100),a=n(5947),i=n(5426),l=n(1139),s=n(4240),c=o("".indexOf);r({target:"String",proto:!0,forced:!s("includes")},{includes:function(e){return!!~c(l(i(this)),l(a(e)),arguments.length>1?arguments[1]:void 0)}})},3864:(e,t,n)=>{"use strict";n.d(t,{Dx:()=>jt,NP:()=>zt,DU:()=>Xt,AH:()=>Gt,Ay:()=>Kt,i7:()=>Zt,DP:()=>Ft});var r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};function o(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var a=n(9155),i=n.n(a),l=n(2146),s=n.n(l),c="-ms-",u="-moz-",d="-webkit-",p="comm",f="rule",h="decl",m="@keyframes",g=Math.abs,b=String.fromCharCode,v=Object.assign;function y(e){return e.trim()}function x(e,t){return(e=t.exec(e))?e[0]:e}function w(e,t,n){return e.replace(t,n)}function E(e,t,n){return e.indexOf(t,n)}function k(e,t){return 0|e.charCodeAt(t)}function _(e,t,n){return e.slice(t,n)}function A(e){return e.length}function T(e){return e.length}function S(e,t){return t.push(e),e}function C(e,t){return e.filter(function(e){return!x(e,t)})}var $=1,O=1,I=0,L=0,M=0,N="";function R(e,t,n,r,o,a,i,l){return{value:e,root:t,parent:n,type:r,props:o,children:a,line:$,column:O,length:i,return:"",siblings:l}}function P(e,t){return v(R("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function D(e){for(;e.root;)e=P(e.root,{children:[e]});S(e,e.siblings)}function j(){return M=L>0?k(N,--L):0,O--,10===M&&(O=1,$--),M}function F(){return M=L<I?k(N,L++):0,O++,10===M&&(O=1,$++),M}function z(){return k(N,L)}function B(){return L}function H(e,t){return _(N,e,t)}function U(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function V(e){return y(H(L-1,q(91===e?e+2:40===e?e+1:e)))}function G(e){for(;(M=z())&&M<33;)F();return U(e)>2||U(M)>3?"":" "}function W(e,t){for(;--t&&F()&&!(M<48||M>102||M>57&&M<65||M>70&&M<97););return H(e,B()+(t<6&&32==z()&&32==F()))}function q(e){for(;F();)switch(M){case e:return L;case 34:case 39:34!==e&&39!==e&&q(M);break;case 40:41===e&&q(e);break;case 92:F()}return L}function K(e,t){for(;F()&&e+M!==57&&(e+M!==84||47!==z()););return"/*"+H(t,L-1)+"*"+b(47===e?e:F())}function Y(e){for(;!U(z());)F();return H(e,L)}function X(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function Z(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case h:return e.return=e.return||e.value;case p:return"";case m:return e.return=e.value+"{"+X(e.children,r)+"}";case f:if(!A(e.value=e.props.join(",")))return""}return A(n=X(e.children,r))?e.return=e.value+"{"+n+"}":""}function J(e,t,n){switch(function(e,t){return 45^k(e,0)?(((t<<2^k(e,0))<<2^k(e,1))<<2^k(e,2))<<2^k(e,3):0}(e,t)){case 5103:return d+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return d+e+e;case 4789:return u+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return d+e+u+e+c+e+e;case 5936:switch(k(e,t+11)){case 114:return d+e+c+w(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return d+e+c+w(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return d+e+c+w(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return d+e+c+e+e;case 6165:return d+e+c+"flex-"+e+e;case 5187:return d+e+w(e,/(\w+).+(:[^]+)/,d+"box-$1$2"+c+"flex-$1$2")+e;case 5443:return d+e+c+"flex-item-"+w(e,/flex-|-self/g,"")+(x(e,/flex-|baseline/)?"":c+"grid-row-"+w(e,/flex-|-self/g,""))+e;case 4675:return d+e+c+"flex-line-pack"+w(e,/align-content|flex-|-self/g,"")+e;case 5548:return d+e+c+w(e,"shrink","negative")+e;case 5292:return d+e+c+w(e,"basis","preferred-size")+e;case 6060:return d+"box-"+w(e,"-grow","")+d+e+c+w(e,"grow","positive")+e;case 4554:return d+w(e,/([^-])(transform)/g,"$1"+d+"$2")+e;case 6187:return w(w(w(e,/(zoom-|grab)/,d+"$1"),/(image-set)/,d+"$1"),e,"")+e;case 5495:case 3959:return w(e,/(image-set\([^]*)/,d+"$1$`$1");case 4968:return w(w(e,/(.+:)(flex-)?(.*)/,d+"box-pack:$3"+c+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+d+e+e;case 4200:if(!x(e,/flex-|baseline/))return c+"grid-column-align"+_(e,t)+e;break;case 2592:case 3360:return c+w(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(e,n){return t=n,x(e.props,/grid-\w+-end/)})?~E(e+(n=n[t].value),"span",0)?e:c+w(e,"-start","")+e+c+"grid-row-span:"+(~E(n,"span",0)?x(n,/\d+/):+x(n,/\d+/)-+x(e,/\d+/))+";":c+w(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(e){return x(e.props,/grid-\w+-start/)})?e:c+w(w(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return w(e,/(.+)-inline(.+)/,d+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(A(e)-1-t>6)switch(k(e,t+1)){case 109:if(45!==k(e,t+4))break;case 102:return w(e,/(.+:)(.+)-([^]+)/,"$1"+d+"$2-$3$1"+u+(108==k(e,t+3)?"$3":"$2-$3"))+e;case 115:return~E(e,"stretch",0)?J(w(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return w(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,n,r,o,a,i,l){return c+n+":"+r+l+(o?c+n+"-span:"+(a?i:+i-+r)+l:"")+e});case 4949:if(121===k(e,t+6))return w(e,":",":"+d)+e;break;case 6444:switch(k(e,45===k(e,14)?18:11)){case 120:return w(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+d+(45===k(e,14)?"inline-":"")+"box$3$1"+d+"$2$3$1"+c+"$2box$3")+e;case 100:return w(e,":",":"+c)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return w(e,"scroll-","scroll-snap-")+e}return e}function Q(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case h:return void(e.return=J(e.value,e.length,n));case m:return X([P(e,{value:w(e.value,"@","@"+d)})],r);case f:if(e.length)return function(e,t){return e.map(t).join("")}(n=e.props,function(t){switch(x(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":D(P(e,{props:[w(t,/:(read-\w+)/,":-moz-$1")]})),D(P(e,{props:[t]})),v(e,{props:C(n,r)});break;case"::placeholder":D(P(e,{props:[w(t,/:(plac\w+)/,":"+d+"input-$1")]})),D(P(e,{props:[w(t,/:(plac\w+)/,":-moz-$1")]})),D(P(e,{props:[w(t,/:(plac\w+)/,c+"input-$1")]})),D(P(e,{props:[t]})),v(e,{props:C(n,r)})}return""})}}function ee(e){return function(e){return N="",e}(te("",null,null,null,[""],e=function(e){return $=O=1,I=A(N=e),L=0,[]}(e),0,[0],e))}function te(e,t,n,r,o,a,i,l,s){for(var c=0,u=0,d=i,p=0,f=0,h=0,m=1,v=1,y=1,x=0,_="",T=o,C=a,$=r,O=_;v;)switch(h=x,x=F()){case 40:if(108!=h&&58==k(O,d-1)){-1!=E(O+=w(V(x),"&","&\f"),"&\f",g(c?l[c-1]:0))&&(y=-1);break}case 34:case 39:case 91:O+=V(x);break;case 9:case 10:case 13:case 32:O+=G(h);break;case 92:O+=W(B()-1,7);continue;case 47:switch(z()){case 42:case 47:S(re(K(F(),B()),t,n,s),s);break;default:O+="/"}break;case 123*m:l[c++]=A(O)*y;case 125*m:case 59:case 0:switch(x){case 0:case 125:v=0;case 59+u:-1==y&&(O=w(O,/\f/g,"")),f>0&&A(O)-d&&S(f>32?oe(O+";",r,n,d-1,s):oe(w(O," ","")+";",r,n,d-2,s),s);break;case 59:O+=";";default:if(S($=ne(O,t,n,c,u,o,l,_,T=[],C=[],d,a),a),123===x)if(0===u)te(O,t,$,$,T,a,d,l,C);else switch(99===p&&110===k(O,3)?100:p){case 100:case 108:case 109:case 115:te(e,$,$,r&&S(ne(e,$,$,0,0,o,l,_,o,T=[],d,C),C),o,C,d,l,r?T:C);break;default:te(O,$,$,$,[""],C,0,l,C)}}c=u=f=0,m=y=1,_=O="",d=i;break;case 58:d=1+A(O),f=h;default:if(m<1)if(123==x)--m;else if(125==x&&0==m++&&125==j())continue;switch(O+=b(x),x*m){case 38:y=u>0?1:(O+="\f",-1);break;case 44:l[c++]=(A(O)-1)*y,y=1;break;case 64:45===z()&&(O+=V(F())),p=z(),u=d=A(_=O+=Y(B())),x++;break;case 45:45===h&&2==A(O)&&(m=0)}}return a}function ne(e,t,n,r,o,a,i,l,s,c,u,d){for(var p=o-1,h=0===o?a:[""],m=T(h),b=0,v=0,x=0;b<r;++b)for(var E=0,k=_(e,p+1,p=g(v=i[b])),A=e;E<m;++E)(A=y(v>0?h[E]+" "+k:w(k,/&\f/g,h[E])))&&(s[x++]=A);return R(e,t,n,0===o?f:l,s,c,u,d)}function re(e,t,n,r){return R(e,t,n,p,b(M),_(e,2,-2),0,r)}function oe(e,t,n,r,o){return R(e,t,n,h,_(e,0,r),_(e,r+1,-1),r,o)}var ae={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},ie=n(9907),le=void 0!==ie&&void 0!==ie.env&&(ie.env.REACT_APP_SC_ATTR||ie.env.SC_ATTR)||"data-styled",se="active",ce="data-styled-version",ue="6.1.19",de="/*!sc*/\n",pe="undefined"!=typeof window&&"undefined"!=typeof document,fe=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:void 0!==ie&&void 0!==ie.env&&void 0!==ie.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==ie.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==ie.env.REACT_APP_SC_DISABLE_SPEEDY&&ie.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==ie&&void 0!==ie.env&&void 0!==ie.env.SC_DISABLE_SPEEDY&&""!==ie.env.SC_DISABLE_SPEEDY&&"false"!==ie.env.SC_DISABLE_SPEEDY&&ie.env.SC_DISABLE_SPEEDY),he={},me=(new Set,Object.freeze([])),ge=Object.freeze({});function be(e,t,n){return void 0===n&&(n=ge),e.theme!==n.theme&&e.theme||t||n.theme}var ve=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),ye=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,xe=/(^-|-$)/g;function we(e){return e.replace(ye,"-").replace(xe,"")}var Ee=/(a)(d)/gi,ke=52,_e=function(e){return String.fromCharCode(e+(e>25?39:97))};function Ae(e){var t,n="";for(t=Math.abs(e);t>ke;t=t/ke|0)n=_e(t%ke)+n;return(_e(t%ke)+n).replace(Ee,"$1-$2")}var Te,Se=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Ce=function(e){return Se(5381,e)};function $e(e){return Ae(Ce(e)>>>0)}function Oe(e){return"string"==typeof e&&!0}var Ie="function"==typeof Symbol&&Symbol.for,Le=Ie?Symbol.for("react.memo"):60115,Me=Ie?Symbol.for("react.forward_ref"):60112,Ne={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Re={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Pe={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},De=((Te={})[Me]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Te[Le]=Pe,Te);function je(e){return("type"in(t=e)&&t.type.$$typeof)===Le?Pe:"$$typeof"in e?De[e.$$typeof]:Ne;var t}var Fe=Object.defineProperty,ze=Object.getOwnPropertyNames,Be=Object.getOwnPropertySymbols,He=Object.getOwnPropertyDescriptor,Ue=Object.getPrototypeOf,Ve=Object.prototype;function Ge(e,t,n){if("string"!=typeof t){if(Ve){var r=Ue(t);r&&r!==Ve&&Ge(e,r,n)}var o=ze(t);Be&&(o=o.concat(Be(t)));for(var a=je(e),i=je(t),l=0;l<o.length;++l){var s=o[l];if(!(s in Re||n&&n[s]||i&&s in i||a&&s in a)){var c=He(t,s);try{Fe(e,s,c)}catch(e){}}}}return e}function We(e){return"function"==typeof e}function qe(e){return"object"==typeof e&&"styledComponentId"in e}function Ke(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function Ye(e,t){if(0===e.length)return"";for(var n=e[0],r=1;r<e.length;r++)n+=t?t+e[r]:e[r];return n}function Xe(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function Ze(e,t,n){if(void 0===n&&(n=!1),!n&&!Xe(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=Ze(e[r],t[r]);else if(Xe(t))for(var r in t)e[r]=Ze(e[r],t[r]);return e}function Je(e,t){Object.defineProperty(e,"toString",{value:t})}function Qe(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var et=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)if((o<<=1)<0)throw Qe(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var a=r;a<o;a++)this.groupSizes[a]=0}for(var i=this.indexOfGroup(e+1),l=(a=0,t.length);a<l;a++)this.tag.insertRule(i,t[a])&&(this.groupSizes[e]++,i++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,a=r;a<o;a++)t+="".concat(this.tag.getRule(a)).concat(de);return t},e}(),tt=new Map,nt=new Map,rt=1,ot=function(e){if(tt.has(e))return tt.get(e);for(;nt.has(rt);)rt++;var t=rt++;return tt.set(e,t),nt.set(t,e),t},at=function(e,t){rt=t+1,tt.set(e,t),nt.set(t,e)},it="style[".concat(le,"][").concat(ce,'="').concat(ue,'"]'),lt=new RegExp("^".concat(le,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),st=function(e,t,n){for(var r,o=n.split(","),a=0,i=o.length;a<i;a++)(r=o[a])&&e.registerName(t,r)},ct=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split(de),o=[],a=0,i=r.length;a<i;a++){var l=r[a].trim();if(l){var s=l.match(lt);if(s){var c=0|parseInt(s[1],10),u=s[2];0!==c&&(at(u,c),st(e,u,s[3]),e.getTag().insertRules(c,o)),o.length=0}else o.push(l)}}},ut=function(e){for(var t=document.querySelectorAll(it),n=0,r=t.length;n<r;n++){var o=t[n];o&&o.getAttribute(le)!==se&&(ct(e,o),o.parentNode&&o.parentNode.removeChild(o))}};function dt(){return n.nc}var pt=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){var t=Array.from(e.querySelectorAll("style[".concat(le,"]")));return t[t.length-1]}(n),a=void 0!==o?o.nextSibling:null;r.setAttribute(le,se),r.setAttribute(ce,ue);var i=dt();return i&&r.setAttribute("nonce",i),n.insertBefore(r,a),r},ft=function(){function e(e){this.element=pt(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}throw Qe(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),ht=function(){function e(e){this.element=pt(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),mt=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),gt=pe,bt={isServer:!pe,useCSSOMInjection:!fe},vt=function(){function e(e,t,n){void 0===e&&(e=ge),void 0===t&&(t={});var o=this;this.options=r(r({},bt),e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&pe&>&&(gt=!1,ut(this)),Je(this,function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return nt.get(e)}(n);if(void 0===o)return"continue";var a=e.names.get(o),i=t.getGroup(n);if(void 0===a||!a.size||0===i.length)return"continue";var l="".concat(le,".g").concat(n,'[id="').concat(o,'"]'),s="";void 0!==a&&a.forEach(function(e){e.length>0&&(s+="".concat(e,","))}),r+="".concat(i).concat(l,'{content:"').concat(s,'"}').concat(de)},a=0;a<n;a++)o(a);return r}(o)})}return e.registerId=function(e){return ot(e)},e.prototype.rehydrate=function(){!this.server&&pe&&ut(this)},e.prototype.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(r(r({},this.options),t),this.gs,n&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new mt(n):t?new ft(n):new ht(n)}(this.options),new et(e)));var e},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(ot(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(ot(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(ot(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),yt=/&/g,xt=/^\s*\/\/.*$/gm;function wt(e,t){return e.map(function(e){return"rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map(function(e){return"".concat(t," ").concat(e)})),Array.isArray(e.children)&&"@keyframes"!==e.type&&(e.children=wt(e.children,t)),e})}function Et(e){var t,n,r,o=void 0===e?ge:e,a=o.options,i=void 0===a?ge:a,l=o.plugins,s=void 0===l?me:l,c=function(e,r,o){return o.startsWith(n)&&o.endsWith(n)&&o.replaceAll(n,"").length>0?".".concat(t):e},u=s.slice();u.push(function(e){e.type===f&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(yt,n).replace(r,c))}),i.prefix&&u.push(Q),u.push(Z);var d=function(e,o,a,l){void 0===o&&(o=""),void 0===a&&(a=""),void 0===l&&(l="&"),t=l,n=o,r=new RegExp("\\".concat(n,"\\b"),"g");var s=e.replace(xt,""),c=ee(a||o?"".concat(a," ").concat(o," { ").concat(s," }"):s);i.namespace&&(c=wt(c,i.namespace));var d,p,f,h=[];return X(c,(d=u.concat((f=function(e){return h.push(e)},function(e){e.root||(e=e.return)&&f(e)})),p=T(d),function(e,t,n,r){for(var o="",a=0;a<p;a++)o+=d[a](e,t,n,r)||"";return o})),h};return d.hash=s.length?s.reduce(function(e,t){return t.name||Qe(15),Se(e,t.name)},5381).toString():"",d}var kt=new vt,_t=Et(),At=i().createContext({shouldForwardProp:void 0,styleSheet:kt,stylis:_t}),Tt=(At.Consumer,i().createContext(void 0));function St(){return(0,a.useContext)(At)}function Ct(e){var t=(0,a.useState)(e.stylisPlugins),n=t[0],r=t[1],o=St().styleSheet,l=(0,a.useMemo)(function(){var t=o;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.sheet,e.target,o]),c=(0,a.useMemo)(function(){return Et({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:n})},[e.enableVendorPrefixes,e.namespace,n]);(0,a.useEffect)(function(){s()(n,e.stylisPlugins)||r(e.stylisPlugins)},[e.stylisPlugins]);var u=(0,a.useMemo)(function(){return{shouldForwardProp:e.shouldForwardProp,styleSheet:l,stylis:c}},[e.shouldForwardProp,l,c]);return i().createElement(At.Provider,{value:u},i().createElement(Tt.Provider,{value:c},e.children))}var $t=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=_t);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,Je(this,function(){throw Qe(12,String(n.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=_t),this.name+e.hash},e}(),Ot=function(e){return e>="A"&&e<="Z"};function It(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;Ot(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var Lt=function(e){return null==e||!1===e||""===e},Mt=function(e){var t,n,r=[];for(var a in e){var i=e[a];e.hasOwnProperty(a)&&!Lt(i)&&(Array.isArray(i)&&i.isCss||We(i)?r.push("".concat(It(a),":"),i,";"):Xe(i)?r.push.apply(r,o(o(["".concat(a," {")],Mt(i),!1),["}"],!1)):r.push("".concat(It(a),": ").concat((t=a,null==(n=i)||"boolean"==typeof n||""===n?"":"number"!=typeof n||0===n||t in ae||t.startsWith("--")?String(n).trim():"".concat(n,"px")),";")))}return r};function Nt(e,t,n,r){return Lt(e)?[]:qe(e)?[".".concat(e.styledComponentId)]:We(e)?!We(o=e)||o.prototype&&o.prototype.isReactComponent||!t?[e]:Nt(e(t),t,n,r):e instanceof $t?n?(e.inject(n,r),[e.getName(r)]):[e]:Xe(e)?Mt(e):Array.isArray(e)?Array.prototype.concat.apply(me,e.map(function(e){return Nt(e,t,n,r)})):[e.toString()];var o}function Rt(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(We(n)&&!qe(n))return!1}return!0}var Pt=Ce(ue),Dt=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&Rt(e),this.componentId=t,this.baseHash=Se(Pt,t),this.baseStyle=n,vt.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))r=Ke(r,this.staticRulesId);else{var o=Ye(Nt(this.rules,e,t,n)),a=Ae(Se(this.baseHash,o)>>>0);if(!t.hasNameForId(this.componentId,a)){var i=n(o,".".concat(a),void 0,this.componentId);t.insertRules(this.componentId,a,i)}r=Ke(r,a),this.staticRulesId=a}else{for(var l=Se(this.baseHash,n.hash),s="",c=0;c<this.rules.length;c++){var u=this.rules[c];if("string"==typeof u)s+=u;else if(u){var d=Ye(Nt(u,e,t,n));l=Se(l,d+c),s+=d}}if(s){var p=Ae(l>>>0);t.hasNameForId(this.componentId,p)||t.insertRules(this.componentId,p,n(s,".".concat(p),void 0,this.componentId)),r=Ke(r,p)}}return r},e}(),jt=i().createContext(void 0);function Ft(){var e=(0,a.useContext)(jt);if(!e)throw Qe(18);return e}function zt(e){var t=i().useContext(jt),n=(0,a.useMemo)(function(){return function(e,t){if(!e)throw Qe(14);if(We(e))return e(t);if(Array.isArray(e)||"object"!=typeof e)throw Qe(8);return t?r(r({},t),e):e}(e.theme,t)},[e.theme,t]);return e.children?i().createElement(jt.Provider,{value:n},e.children):null}jt.Consumer;var Bt={};function Ht(e,t,n){var o=qe(e),l=e,s=!Oe(e),c=t.attrs,u=void 0===c?me:c,d=t.componentId,p=void 0===d?function(e,t){var n="string"!=typeof e?"sc":we(e);Bt[n]=(Bt[n]||0)+1;var r="".concat(n,"-").concat($e(ue+n+Bt[n]));return t?"".concat(t,"-").concat(r):r}(t.displayName,t.parentComponentId):d,f=t.displayName,h=void 0===f?function(e){return Oe(e)?"styled.".concat(e):"Styled(".concat(function(e){return e.displayName||e.name||"Component"}(e),")")}(e):f,m=t.displayName&&t.componentId?"".concat(we(t.displayName),"-").concat(t.componentId):t.componentId||p,g=o&&l.attrs?l.attrs.concat(u).filter(Boolean):u,b=t.shouldForwardProp;if(o&&l.shouldForwardProp){var v=l.shouldForwardProp;if(t.shouldForwardProp){var y=t.shouldForwardProp;b=function(e,t){return v(e,t)&&y(e,t)}}else b=v}var x=new Dt(n,m,o?l.componentStyle:void 0);function w(e,t){return function(e,t,n){var o=e.attrs,l=e.componentStyle,s=e.defaultProps,c=e.foldedComponentIds,u=e.styledComponentId,d=e.target,p=i().useContext(jt),f=St(),h=e.shouldForwardProp||f.shouldForwardProp,m=be(t,p,s)||ge,g=function(e,t,n){for(var o,a=r(r({},t),{className:void 0,theme:n}),i=0;i<e.length;i+=1){var l=We(o=e[i])?o(a):o;for(var s in l)a[s]="className"===s?Ke(a[s],l[s]):"style"===s?r(r({},a[s]),l[s]):l[s]}return t.className&&(a.className=Ke(a.className,t.className)),a}(o,t,m),b=g.as||d,v={};for(var y in g)void 0===g[y]||"$"===y[0]||"as"===y||"theme"===y&&g.theme===m||("forwardedAs"===y?v.as=g.forwardedAs:h&&!h(y,b)||(v[y]=g[y]));var x=function(e,t){var n=St();return e.generateAndInjectStyles(t,n.styleSheet,n.stylis)}(l,g),w=Ke(c,u);return x&&(w+=" "+x),g.className&&(w+=" "+g.className),v[Oe(b)&&!ve.has(b)?"class":"className"]=w,n&&(v.ref=n),(0,a.createElement)(b,v)}(E,e,t)}w.displayName=h;var E=i().forwardRef(w);return E.attrs=g,E.componentStyle=x,E.displayName=h,E.shouldForwardProp=b,E.foldedComponentIds=o?Ke(l.foldedComponentIds,l.styledComponentId):"",E.styledComponentId=m,E.target=o?l.target:e,Object.defineProperty(E,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=o?function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,o=t;r<o.length;r++)Ze(e,o[r],!0);return e}({},l.defaultProps,e):e}}),Je(E,function(){return".".concat(E.styledComponentId)}),s&&Ge(E,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),E}function Ut(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n}new Set;var Vt=function(e){return Object.assign(e,{isCss:!0})};function Gt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(We(e)||Xe(e))return Vt(Nt(Ut(me,o([e],t,!0))));var r=e;return 0===t.length&&1===r.length&&"string"==typeof r[0]?Nt(r):Vt(Nt(Ut(r,t)))}function Wt(e,t,n){if(void 0===n&&(n=ge),!t)throw Qe(1,t);var a=function(r){for(var a=[],i=1;i<arguments.length;i++)a[i-1]=arguments[i];return e(t,n,Gt.apply(void 0,o([r],a,!1)))};return a.attrs=function(o){return Wt(e,t,r(r({},n),{attrs:Array.prototype.concat(n.attrs,o).filter(Boolean)}))},a.withConfig=function(o){return Wt(e,t,r(r({},n),o))},a}var qt=function(e){return Wt(Ht,e)},Kt=qt;ve.forEach(function(e){Kt[e]=qt(e)});var Yt=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Rt(e),vt.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,r){var o=r(Ye(Nt(this.rules,t,n,r)),""),a=this.componentId+e;n.insertRules(a,a,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,r){e>2&&vt.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function Xt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var a=Gt.apply(void 0,o([e],t,!1)),l="sc-global-".concat($e(JSON.stringify(a))),s=new Yt(a,l),c=function(e){var t=St(),n=i().useContext(jt),r=i().useRef(t.styleSheet.allocateGSInstance(l)).current;return t.styleSheet.server&&u(r,e,t.styleSheet,n,t.stylis),i().useLayoutEffect(function(){if(!t.styleSheet.server)return u(r,e,t.styleSheet,n,t.stylis),function(){return s.removeStyles(r,t.styleSheet)}},[r,e,t.styleSheet,n,t.stylis]),null};function u(e,t,n,o,a){if(s.isStatic)s.renderStyles(e,he,n,a);else{var i=r(r({},t),{theme:be(t,o,c.defaultProps)});s.renderStyles(e,i,n,a)}}return i().memo(c)}function Zt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Ye(Gt.apply(void 0,o([e],t,!1))),a=$e(r);return new $t(a,r)}(function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var n=dt(),r=Ye([n&&'nonce="'.concat(n,'"'),"".concat(le,'="true"'),"".concat(ce,'="').concat(ue,'"')].filter(Boolean)," ");return"<style ".concat(r,">").concat(t,"</style>")},this.getStyleTags=function(){if(e.sealed)throw Qe(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw Qe(2);var n=e.instance.toString();if(!n)return[];var o=((t={})[le]="",t[ce]=ue,t.dangerouslySetInnerHTML={__html:n},t),a=dt();return a&&(o.nonce=a),[i().createElement("style",r({},o,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new vt({isServer:!0}),this.sealed=!1}e.prototype.collectStyles=function(e){if(this.sealed)throw Qe(2);return i().createElement(Ct,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw Qe(3)}})(),"__sc-".concat(le,"__")},3949:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(null,arguments)}n.d(t,{A:()=>v});var o=n(9155),a=n.n(o),i=o.useLayoutEffect,l=function(e,t){"function"!=typeof e?e.current=t:e(t)},s={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},c=function(e){Object.keys(s).forEach(function(t){e.style.setProperty(t,s[t],"important")})},u=null,d=function(e,t){var n=e.scrollHeight;return"border-box"===t.sizingStyle.boxSizing?n+t.borderSize:n-t.paddingSize},p=function(){},f=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],h=!!document.documentElement.currentStyle;function m(e,t,n){var r,l,s=(r=n,l=a().useRef(r),i(function(){l.current=r}),l);o.useLayoutEffect(function(){var n=function(e){return s.current(e)};if(e)return e.addEventListener(t,n),function(){return e.removeEventListener(t,n)}},[])}var g=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],b=function(e,t){var n,i=e.cacheMeasurements,s=e.maxRows,b=e.minRows,v=e.onChange,y=void 0===v?p:v,x=e.onHeightChange,w=void 0===x?p:x,E=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,g),k=void 0!==E.value,_=o.useRef(null),A=function(e,t){var n=a().useRef();return a().useCallback(function(r){e.current=r,n.current&&l(n.current,null),n.current=t,t&&l(t,r)},[t])}(_,t),T=o.useRef(0),S=o.useRef(),C=function(){var e=_.current,t=i&&S.current?S.current:function(e){var t=window.getComputedStyle(e);if(null===t)return null;var n,r=(n=t,f.reduce(function(e,t){return e[t]=n[t],e},{})),o=r.boxSizing;return""===o?null:(h&&"border-box"===o&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px"),{sizingStyle:r,paddingSize:parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),borderSize:parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth)})}(e);if(t){S.current=t;var n=function(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=1/0),u||((u=document.createElement("textarea")).setAttribute("tabindex","-1"),u.setAttribute("aria-hidden","true"),c(u)),null===u.parentNode&&document.body.appendChild(u);var o=e.paddingSize,a=e.borderSize,i=e.sizingStyle,l=i.boxSizing;Object.keys(i).forEach(function(e){var t=e;u.style[t]=i[t]}),c(u),u.value=t;var s=d(u,e);u.value=t,s=d(u,e),u.value="x";var p=u.scrollHeight-o,f=p*n;"border-box"===l&&(f=f+o+a),s=Math.max(f,s);var h=p*r;return"border-box"===l&&(h=h+o+a),[s=Math.min(h,s),p]}(t,e.value||e.placeholder||"x",b,s),r=n[0],o=n[1];T.current!==r&&(T.current=r,e.style.setProperty("height",r+"px","important"),w(r,{rowHeight:o}))}};return o.useLayoutEffect(C),function(e,t){m(document.body,"reset",function(n){e.current.form===n.target&&t()})}(_,function(){if(!k){var e=_.current.value;requestAnimationFrame(function(){var t=_.current;t&&e!==t.value&&C()})}}),m(window,"resize",C),n=C,m(document.fonts,"loadingdone",n),o.createElement("textarea",r({},E,{onChange:function(e){k||C(),y(e)},ref:A}))},v=o.forwardRef(b)},3999:(e,t,n)=>{"use strict";var r=n(5024),o=n(9989),a=n(480);e.exports=r?function(e,t,n){return o.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},4047:(e,t,n)=>{"use strict";var r=n(9155),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=r.useSyncExternalStore,i=r.useRef,l=r.useEffect,s=r.useMemo,c=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=i(null);if(null===d.current){var p={hasValue:!1,value:null};d.current=p}else p=d.current;d=s(function(){function e(e){if(!l){if(l=!0,a=e,e=r(e),void 0!==u&&p.hasValue){var t=p.value;if(u(t,e))return i=t}return i=e}if(t=i,o(a,e))return t;var n=r(e);return void 0!==u&&u(t,n)?(a=e,t):(a=e,i=n)}var a,i,l=!1,s=void 0===n?null:n;return[function(){return e(t())},null===s?void 0:function(){return e(s())}]},[t,n,r,u]);var f=a(e,d[0],d[1]);return l(function(){p.hasValue=!0,p.value=f},[f]),c(f),f}},4142:(e,t,n)=>{"use strict";n.d(t,{S:()=>l});var r=n(7251),o=n(2221),a=n(1872),i=n(4851);const l=(0,r.zD)("feedback/sendToPat",async(e,t)=>{let{getState:n,dispatch:r,rejectWithValue:l}=t;const{connection:{token:s},environment:{PAT_HOST:c}}=n();try{const t=await r((0,a.et)(`${c}/chatbubble/${o.Ak}/feedback`,{method:"POST",body:{feedback:e},...(0,i.A)({token:s})}));if(!t.ok)throw new Error(`Feedback submission failed with status: ${t.status}`);return t.data.data.id}catch(e){return l(e.message)}})},4240:(e,t,n)=>{"use strict";var r=n(8655)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(e){}}return!1}},4311:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(9155),o=n(541),a=n(1695),i=n(9337),l=n(1328);function s(){const{text:e}=(0,o.d4)(a.Od),{currentLanguageCode:t}=(0,l.A)();return(0,r.useMemo)(()=>(0,i.A)(e,t),[t,e])}},4317:(e,t,n)=>{"use strict";var r=n(6100);e.exports=r({}.isPrototypeOf)},4399:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e?n(e)?e.length?"array":"void":typeof e:"void"};var n=Array.isArray||(Array.isArray=function(e){return""+e!==e&&"[object Array]"==={}.toString.call(e)});e.exports=t.default},4490:(e,t,n)=>{"use strict";function r(e,t){return"number"!=typeof(null==e?void 0:e.length)||e.length!==(null==t?void 0:t.length)?(console.error("Trying to zip non-array of arrays of unequal length"),[]):e.map((e,n)=>[e,t[n]])}n.d(t,{A:()=>r})},4499:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=(e,t,n)=>{var r;return null!==(r=t.split(".").reduce((e,t)=>e?e[t]:void 0,e))&&void 0!==r?r:n}},4517:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n={};return t.forEach(function(t){var r=e[t];r&&(n[t]=r)}),n},e.exports=t.default},4543:(e,t,n)=>{"use strict";var r=n(5024),o=n(4713),a=n(7161),i=n(480),l=n(3273),s=n(5341),c=n(701),u=n(9665),d=Object.getOwnPropertyDescriptor;t.f=r?d:function(e,t){if(e=l(e),t=s(t),u)try{return d(e,t)}catch(e){}if(c(e,t))return i(!o(a.f,e,t),e[t])}},4572:(e,t,n)=>{"use strict";var r=n(9344),o=n(814),a=n(1780),i=r(r.bind);e.exports=function(e,t){return o(e),void 0===t?e:a?i(e,t):function(){return e.apply(t,arguments)}}},4574:(e,t,n)=>{"use strict";var r=n(9903),o=Math.max,a=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):a(n,t)}},4603:(e,t,n)=>{"use strict";var r=n(5547),o=n(1203),a=n(8900).String;e.exports=!!Object.getOwnPropertySymbols&&!o(function(){var e=Symbol("symbol detection");return!a(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41})},4674:(e,t,n)=>{"use strict";var r=n(814),o=n(3057);e.exports=function(e,t){var n=e[t];return o(n)?void 0:r(n)}},4703:(e,t,n)=>{"use strict";n.d(t,{Bd:()=>L,Bu:()=>_,Zn:()=>C,aP:()=>E,j3:()=>M,pA:()=>R,qJ:()=>P,tM:()=>k,y2:()=>A,zh:()=>$});var r=n(541),o=n(5279),a=n(7094),i=n(2221),l=n(4851),s=n(7958),c=n(3699),u=n(1318),d=n(5173),p=n(4490),f=n(1112),h=n(5564),m=n(8628),g=n(8483),b=n(7243),v=n(7811),y=n(6079),x=n(7173);const w=e=>{const{PAT_HOST:t}=e().environment,{local:n,chatbubble:{botKey:r},connection:{token:o},messages:{forms:a}}=e();return{token:o,PAT_HOST:t,botKey:r,local:n,forms:a}},E=(e,t,n)=>(r,o)=>{const{botKey:a}=w(o);r((0,b.zX)(a,!0)),localStorage.setItem("kindly-chat-restart-message",JSON.stringify({message:e,exchangeId:t,newContext:n}))},k=(e,t)=>async(n,r)=>{const{PAT_HOST:o,token:a}=w(r),s=await n((0,h.z5)()),{headers:c}=(0,l.A)({token:a},{withCurrentUrl:!0,extra:s}),u={message:e,temporaryId:t},p=await n((0,b.et)(`${o}/chatbubble/${i.Ak}/message/`,{method:"POST",body:u,headers:c},{onError:e=>{var r;n({type:x.pz,temporaryId:t,status:null==e||null===(r=e.response)||void 0===r?void 0:r.status})}}));(0,d.A)(p)||(n({type:x.pz,...p.data}),n((0,y.uK)()))},_=e=>t=>{t({type:x.QA,formData:e})},A=function(e,t,n){let{responsePromise:s,tempId:c}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},u=arguments.length>4?arguments[4]:void 0,p=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return async(f,v)=>{const{PAT_HOST:E}=w(v);let{token:k,local:A,forms:T}=w(v);if(!k){if(!await f((0,g.mg)({shouldGreet:!1})))return;const{shouldOpenChat:e}=p;(0,r.vA)(()=>{f({type:x.d7,hasRequestedGreeting:!0}),e&&(f((0,m.mN)()),f((0,m.lQ)({source:"programmatic"})))}),({token:k,local:A,forms:T}=w(v))}const S=await f((0,h.z5)()),{headers:C}=(0,l.A)({token:k},{withCurrentUrl:!0,extra:S});T&&Object.values(T).forEach(e=>{if((null==e?void 0:e.formSubmitState)===a.KN.ACTIVE){const t={submission_id:e.formSubmissionId,context:e.formValue,state:a.KN.UNANSWERED};f((0,b.et)(`${E}/chatbubble/${i.Ak}/form/submit`,{method:"POST",body:t,headers:C})),f(_({...e,formSubmitState:a.KN.UNANSWERED}))}});const $=c||`tempId-${(0,o.A)()}`;f({type:x.tq,data:{id:$,created:(new Date).toISOString(),message:e,buttonType:u}}),f((0,b.TP)((new Date).toISOString()));const O={message:e,exchange_id:t,temporaryId:$,new_context:{...A.context,...n||{}}},I=s?await s:await f((0,b.et)(`${E}/chatbubble/${i.Ak}/message/`,{method:"POST",body:O,headers:C},{onError:e=>{var t,n;console.error(`/chatbubble/${i.Ak}/message returned ${null==e||null===(t=e.response)||void 0===t?void 0:t.status}`),f({type:x.pz,temporaryId:$,status:null==e||null===(n=e.response)||void 0===n?void 0:n.status}),f({type:x.wk})}}));(0,d.A)(I)||(f({type:x.pz,...I.data}),f((0,y.uK)()))}},T=e=>({...e,temporaryId:`tempId-${(0,o.A)()}`}),S=e=>{let{temporaryId:t}=e;return t},C=()=>async(e,t)=>{var n;const{bot:{id:r},chatbubble:{chatId:a,attachments:s},connection:{token:f},environment:{PAT_HOST:m}}=t(),g=await e((0,h.z5)()),{headers:v}=(0,l.A)({token:f},{extra:g}),y=`tempId-${(0,o.A)()}`,w=s.files.map(T).map((0,u.A)("file"));e({type:x.Os,data:{attachments:w}}),e({type:x.Q4}),e({type:x.tq,data:{id:y,created:(new Date).toISOString(),attachment_ids:w.map(S),message:""}}),e((0,b.TP)((new Date).toISOString()));const E=(t,n)=>{var r;e({type:x.pz,temporaryId:y,status:null==t||null===(r=t.response)||void 0===r?void 0:r.status}),n?e({type:x.wP,attachment:{...n,status:i.Le.ERROR}}):w.forEach(t=>e({type:x.wP,attachment:{...t,status:i.Le.ERROR}}))},k=w.map((0,u.A)("file","url")),_=`${m}/chatbubble/${i.Ak}/attachment/create`,A={attachments:k,temporaryChatMessageId:y},C=await e((0,b.et)(_,{method:"POST",body:A,headers:v},{onError:e=>E(e)}));if((0,d.A)(C)||!Array.isArray(null==C||null===(n=C.data)||void 0===n?void 0:n.attachments))return;const[$,O]=C.data.attachments.reduce((t,n)=>{let[r,o]=t,{id:a,temporary_id:i,upload_url:l}=n;return e({type:x.wP,attachment:{temporaryId:i,id:a}}),[[...r,a],[...o,l]]},[[],[]]),I={"x-goog-upload-bot-id":r,"x-goog-upload-chat-id":a},L=(0,p.A)(s.files,O).map(async t=>{let[{file:n,...r},o]=t;const a=await(0,c.Bu)(n),i={...I,"Content-Type":n.type};return await e((0,b.et)(o,{method:"PUT",body:a,headers:i},{onError:e=>E(e,r)}))}),M=await Promise.all(L);if(M.some(e=>void 0===e))return;if(M.some(d.A))return;const N=`${m}/chatbubble/${i.Ak}/attachment/uploads-complete`,R={attachmentIds:$,temporaryChatMessageId:y,exchangeId:s.exchangeId};e((0,b.TP)((new Date).toISOString())),await e((0,b.et)(N,{method:"POST",body:R,headers:v},{onError:e=>E(e)}))},$=function(e){let{openChat:t,languageCode:n,tempId:r,responsePromise:a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return async(s,c)=>{const{connection:{token:u},chatbubble:{currentLanguage:p},local:{context:f}}=c(),{PAT_HOST:h}=c().environment;if(!u){const r={triggerDialogueSlug:e,languageCode:n,openChat:t};return s((0,g.XO)(r)),s((0,m.mN)()),void(t&&s((0,m.lQ)({source:"programmatic"})))}if(n&&n!==p){const e="Tried to trigger a dialogue in another language on an existing chat";s((0,b.Rm)({message:e,level:"error",extra:{languageCode:n,currentLanguage:p}}))}const v=r||(0,o.A)();s({type:x.IM,data:{id:v,created:(new Date).toISOString(),exchangeId:e}}),s((0,b.TP)((new Date).toISOString()));const w={exchange_id:e,temporaryId:v,new_context:{...f}},{headers:E}=(0,l.A)({token:u},{withCurrentUrl:!0}),k=a?await a:await s((0,b.et)(`${h}/chatbubble/${i.Ak}/trigger/`,{method:"POST",body:w,headers:E}));k&&!(0,d.A)(k)&&(t&&s((0,m.lQ)({source:"programmatic"})),s((0,y.uK)()))}},O=(e,t)=>n=>{n({type:x.Y6,buttonClick:{chatMessageId:e.id,buttonId:t.id,time:(new Date).toISOString()}})},I=(e,t,n)=>async(r,o)=>{const{connection:{token:a},environment:{PAT_HOST:s,VERSION:c}}=o(),u=await r((0,h.z5)()),{headers:d}=(0,l.A)({token:a},{withCurrentUrl:!0,extra:u}),p={method:"POST",body:{button:t,chatMessage:e,temporaryId:n,version:c},headers:d};return r((0,b.et)(`${s}/chatbubble/${i.Ak}/button/click/`,p))},L=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return async(a,l)=>{const{environment:{VERSION:s},messages:{chatMessages:c},chatbubble:{currentLanguage:u},local:d}=l(),p=(0,v.A)(e.button_type),h=`tempId-${(0,o.A)()}`,g={};r.length>0&&r.forEach(e=>{var r,o,l;e.button_type===i.lP.SLIDER.toLowerCase()&&null!==(r=e.slider_details)&&void 0!==r&&r.value?(g[null===(o=e.label)||void 0===o?void 0:o.toLowerCase()]=null===(l=e.slider_details)||void 0===l?void 0:l.value,a(O(a,t))):e.button_type===i.lP.CHECKBOX.toLowerCase()&&n.find(t=>t.id===e.id)?(g[e.value]=e.value,a(O(t,e)),a(I(t,e,h))):g[e.value]=""});const y=a(I(t,{...e,new_context:{...d.context,...g||{}}},h));switch(a({type:x.Y6,buttonClick:{chatMessageId:t.id,buttonId:e.id||e._id,time:(new Date).toISOString()}}),p){case i.lP.QUICK_REPLY:{const n={responsePromise:y,tempId:h};a(A(e.value,t.exchange_id,e.new_context,n,e.button_type));break}case i.lP.HANDOVER_REQUEST:if(!((e,t)=>!!t.find(t=>{let{buttons:n=[]}=t;return!!n.find(t=>{let{language_code:n,button_type:r}=t;return n===e&&(0,v.A)(r)===i.lP.HANDOVER_REQUEST})}))(u,c)){const e={version:s};a((0,b.Rm)({message:"Requested handover with no button",level:"error",extra:e}))}a((0,f.Du)(y));break;case i.lP.DIALOGUE_TRIGGER:case i.lP.SUGGESTION_DIALOGUE_TRIGGER:a($(e.value,{tempId:h,responsePromise:y}));break;case i.lP.PRIVACY_EXPORT:a((0,m.VK)({responsePromise:y}));break;case i.lP.PRIVACY_DELETE:a((0,m._e)({responsePromise:y}));break;case i.lP.CONTACT_DETAILS:a((0,m.V$)(e));break;case i.lP.UPLOAD_ATTACHMENT:a((0,m.jz)(e))}}},M=(e,t)=>async(n,r)=>{const{connection:{token:a},environment:{PAT_HOST:s,VERSION:c}}=r(),u=`tempId-${(0,o.A)()}`,p=e.contact_details.contact_type,f={...e,button_type:i.lP.edit_contact_details};n({type:x.tq,data:{id:u,created:(new Date).toISOString(),message:t,buttons:[f],isContactDetails:!0}});const m=await n((0,h.z5)()),{headers:g}=(0,l.A)({token:a},{withCurrentUrl:!0,extra:m}),v={contactType:p,value:t,version:c,buttons:[f],temporaryId:u},y=await n((0,b.et)(`${s}/chatbubble/${i.Ak}/button/contact-details/`,{method:"POST",body:v,headers:g}));(0,d.A)(y)||n({type:x.pz,...y.data})},N=(0,s.A)(async(e,t,n)=>{let{id:r,index:o}=e;const{connection:{token:a},environment:{PAT_HOST:s,VERSION:c}}=n(),u=await t((0,h.z5)()),{headers:d}=(0,l.A)({token:a},{withCurrentUrl:!0,extra:u}),p={chatMessageId:r,version:c};t({type:x.kU,id:r,index:o}),t((0,b.et)(`${s}/chatbubble/${i.Ak}/message-seen`,{method:"PATCH",body:p,headers:d}))},1500,(e,t)=>{const[{index:n}]=e,[{index:r}]=t;return n>r?e:t}),R=(e,t)=>(n,r)=>N({id:e,index:t},n,r),P=e=>{let{url:t,messageId:n}=e;return async(e,r)=>{const{botKey:o}=r().chatbubble,{PAT_HOST:a}=r().environment,{token:s}=r().connection,c=await e((0,h.z5)());e((0,b.et)(`${a}/chatbubble/${i.Ak}/message/reference-click/${n}`,{method:"POST",body:{url:t},...(0,l.A)({botKey:o,token:s},{withCurrentUrl:!0,extra:c})}))}}},4713:(e,t,n)=>{"use strict";var r=n(1780),o=Function.prototype.call;e.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},4851:(e,t,n)=>{"use strict";function r(e){let{token:t,botKey:n,jwt:r}=e,{withCurrentUrl:o,withVersion:a,extra:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{headers:{...t?{"kindly-chatbubble-token":t}:{},...n?{"kindly-bot-key":n}:{},...r?{Authorization:`Bearer ${r}`}:{},...o?{"Current-Url":window.location.href}:{},...a?{"kindly-chat-version":"2.76.4"}:{},...i}}}n.d(t,{A:()=>r})},4871:e=>{"use strict";e.exports=!0},4904:(e,t,n)=>{"use strict";var r={};r[n(8655)("toStringTag")]="z",e.exports="[object z]"===String(r)},4927:(e,t,n)=>{"use strict";n.d(t,{$n:()=>p,A0:()=>f,Bi:()=>c,D7:()=>b,N_:()=>u,hF:()=>g,k5:()=>d});var r=n(3864),o=n(6538),a=n(2628),i=n(534),l=n(492),s=n(8905);const c=r.Ay.button`
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
`,
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
border-radius: 6px;
|
|
730
|
-
font-weight: normal;
|
|
731
|
-
background: none;
|
|
732
|
-
cursor: pointer;
|
|
733
|
-
text-transform: none;
|
|
734
|
-
|
|
735
|
-
transition: all 0.2s ease;
|
|
736
|
-
`,p=r.Ay.button`
|
|
737
|
-
${d}
|
|
738
|
-
${l.sF}
|
|
739
|
-
`,f=r.Ay.div`
|
|
740
|
-
position: relative;
|
|
741
|
-
overflow: ${e=>{let{$hasFiles:t}=e;return t?"visible":"hidden"}};
|
|
742
|
-
max-height: 83px;
|
|
743
|
-
min-height: ${e=>{let{$initialHeight:t}=e;return`${t+1}px`}};
|
|
744
|
-
height: ${e=>e.$active?e.$targetHeight:e.$initialHeight}px;
|
|
745
|
-
width: 100%;
|
|
746
|
-
min-width: 0;
|
|
747
|
-
`,h=r.AH`
|
|
748
|
-
max-height: 41px;
|
|
749
|
-
overflow: hidden;
|
|
750
|
-
white-space: nowrap;
|
|
751
|
-
text-overflow: ellipsis;
|
|
752
|
-
`,m=r.AH`
|
|
753
|
-
${e=>!e.$active&&"max-height: 44px;"};
|
|
754
|
-
font-size: ${s.J.input};
|
|
755
|
-
`,g=r.AH`
|
|
756
|
-
position: relative;
|
|
757
|
-
z-index: 2;
|
|
758
|
-
margin-bottom: 0;
|
|
759
|
-
color: ${e=>{let{theme:t}=e;return(0,o.w5)(t.background,"#FFFFFF","#000000")}};
|
|
760
|
-
font-size: var(--_kindlychat-font-size-p);
|
|
761
|
-
line-height: 20px;
|
|
762
|
-
padding: 7px 50px 8px 16px;
|
|
763
|
-
${e=>{let{theme:t}=e;return(0,l.Mo)(t.background,.08)}}
|
|
764
|
-
background-image: none;
|
|
765
|
-
resize: none; /* stylelint-disable-line */
|
|
766
|
-
box-shadow: none;
|
|
767
|
-
border-radius: 18px;
|
|
768
|
-
max-height: 83px;
|
|
769
|
-
font-family: ${i.m.default};
|
|
770
|
-
width: 100%;
|
|
771
|
-
min-height: 0;
|
|
772
|
-
border: 1px solid transparent;
|
|
773
|
-
|
|
774
|
-
transition: transform 0.3s ease;
|
|
775
|
-
${e=>e.$hide&&"transform: translateY(-60px)"};
|
|
776
|
-
${e=>!e.$active&&h};
|
|
777
|
-
|
|
778
|
-
@media ${s.jO.maxTablet} {
|
|
779
|
-
${m}
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
${(0,a.A)()&&m}
|
|
783
|
-
|
|
784
|
-
&:focus {
|
|
785
|
-
color: ${e=>{let{theme:t}=e;return(0,o.w5)(t.background,"#FFFFFF","#000000")}};
|
|
786
|
-
box-shadow: none;
|
|
787
|
-
border: 1px solid
|
|
788
|
-
${e=>{let{theme:t}=e;return(0,o.w5)(t.background,"rgba(255, 255, 255, 0.12)","rgba(0, 0, 0, 0.12)")}};
|
|
789
|
-
|
|
790
|
-
${l.sF}
|
|
791
|
-
}
|
|
792
|
-
|
|
793
|
-
&:focus-visible {
|
|
794
|
-
outline: none;
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
::placeholder {
|
|
798
|
-
color: ${e=>{let{theme:t}=e;return(0,o.w5)(t.background,"#FFF","#000")}};
|
|
799
|
-
opacity: 0.5;
|
|
800
|
-
}
|
|
801
|
-
`,b=r.AH`
|
|
802
|
-
position: relative;
|
|
803
|
-
|
|
804
|
-
&:before {
|
|
805
|
-
content: '';
|
|
806
|
-
left: 0;
|
|
807
|
-
right: 20px;
|
|
808
|
-
top: -15px;
|
|
809
|
-
z-index: 1;
|
|
810
|
-
height: 20px;
|
|
811
|
-
position: absolute;
|
|
812
|
-
background: linear-gradient(
|
|
813
|
-
0deg,
|
|
814
|
-
${e=>e.theme.background} 0%,
|
|
815
|
-
${e=>e.theme.background} 25%,
|
|
816
|
-
rgba(248, 248, 248, 0) 100%
|
|
817
|
-
);
|
|
818
|
-
|
|
819
|
-
opacity: 1;
|
|
820
|
-
transition: opacity linear 300ms;
|
|
821
|
-
|
|
822
|
-
${e=>{let{$inspectorOpen:t}=e;return t?"height: 0":""}}
|
|
823
|
-
}
|
|
824
|
-
`},4935:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=()=>{}},4953:e=>{"use strict";e.exports=n},5013:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=e=>e.replace(/_\w/g,e=>e[1].toUpperCase())},5024:(e,t,n)=>{"use strict";var r=n(1203);e.exports=!r(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},5047:(e,t,n)=>{"use strict";n.d(t,{H2:()=>s,H3:()=>c,H5:()=>u,cp:()=>d,fz:()=>i,mt:()=>l});var r=n(3864),o=n(534),a=n(8905);const i=r.Ay.p`
|
|
825
|
-
color: ${a.Tj.darkColor};
|
|
826
|
-
font-size: var(--_kindlychat-font-size-p);
|
|
827
|
-
font-weight: normal;
|
|
828
|
-
line-height: 20px;
|
|
829
|
-
font-family: ${o.m.default};
|
|
830
|
-
word-break: normal;
|
|
831
|
-
overflow-wrap: anywhere;
|
|
832
|
-
`,l=(0,r.Ay)(i)`
|
|
833
|
-
font-size: var(--_kindlychat-font-size-xs);
|
|
834
|
-
opacity: 0.6;
|
|
835
|
-
`,s=r.Ay.h2`
|
|
836
|
-
color: ${a.Tj.darkColor};
|
|
837
|
-
font-size: var(--_kindlychat-font-size-h2);
|
|
838
|
-
font-weight: normal;
|
|
839
|
-
margin: 0 0 30px;
|
|
840
|
-
line-height: 30px;
|
|
841
|
-
font-family: ${o.m.default};
|
|
842
|
-
`,c=r.Ay.h3`
|
|
843
|
-
color: ${a.Tj.darkColor};
|
|
844
|
-
font-size: var(--_kindlychat-font-size-h3);
|
|
845
|
-
font-weight: normal;
|
|
846
|
-
line-height: 30px;
|
|
847
|
-
margin: 0 0 15px;
|
|
848
|
-
font-family: ${o.m.default};
|
|
849
|
-
`,u=(r.Ay.h4`
|
|
850
|
-
color: ${a.Tj.darkColor};
|
|
851
|
-
font-size: var(--_kindlychat-font-size-h4);
|
|
852
|
-
font-weight: normal;
|
|
853
|
-
margin: 0 0 10px;
|
|
854
|
-
font-family: ${o.m.default};
|
|
855
|
-
`,r.Ay.h5`
|
|
856
|
-
color: ${a.Tj.darkColor};
|
|
857
|
-
font-size: var(--_kindlychat-font-size-m);
|
|
858
|
-
font-weight: normal;
|
|
859
|
-
margin: 0 0 10px;
|
|
860
|
-
line-height: 24px;
|
|
861
|
-
font-family: ${o.m.default};
|
|
862
|
-
`),d=(r.Ay.h6`
|
|
863
|
-
color: ${a.Tj.darkColor};
|
|
864
|
-
font-size: var(--font-size-h6);
|
|
865
|
-
font-weight: normal;
|
|
866
|
-
margin: 0 0 10px;
|
|
867
|
-
font-family: ${o.m.default};
|
|
868
|
-
`,r.Ay.span`
|
|
869
|
-
color: ${a.Tj.primaryColor};
|
|
870
|
-
font-family: ${o.m.KindlySans};
|
|
871
|
-
opacity: 1;
|
|
872
|
-
|
|
873
|
-
a {
|
|
874
|
-
color: ${a.Tj.primaryColor};
|
|
875
|
-
text-decoration: none;
|
|
876
|
-
|
|
877
|
-
&:hover,
|
|
878
|
-
&:focus,
|
|
879
|
-
&:active,
|
|
880
|
-
&:visited {
|
|
881
|
-
color: ${a.Tj.primaryColor};
|
|
882
|
-
}
|
|
883
|
-
}
|
|
884
|
-
`)},5161:(e,t,n)=>{"use strict";var r=n(4317),o=n(8341),a=n(1019),i=Array.prototype,l=String.prototype;e.exports=function(e){var t=e.includes;return e===i||r(i,e)&&t===i.includes?o:"string"==typeof e||e===l||r(l,e)&&t===l.includes?a:t}},5173:(e,t,n)=>{"use strict";function r(e){const t=null==e?void 0:e.status;return Boolean(t&&!(t>=200&&t<=299))}n.d(t,{A:()=>r})},5256:(e,t,n)=>{"use strict";n.d(t,{Fc:()=>x,A6:()=>a,fl:()=>i,US:()=>l,gp:()=>m,WI:()=>v,Gr:()=>b,V$:()=>c,bM:()=>s,T4:()=>y,U:()=>f,qY:()=>g,gR:()=>u,fN:()=>h,qx:()=>d,Ze:()=>p});var r=n(9155),o=n.n(r);const a=function(e){let{fill:t="none",stroke:n="white",...r}=e;return o().createElement("svg",Object.assign({width:"24",height:"25",viewBox:"0 0 24 25",fill:t,xmlns:"http://www.w3.org/2000/svg"},r),o().createElement("path",{d:"M14.25 7.73999L8.75 12.99L14.25 18.24",stroke:n,strokeWidth:"1.5",strokeLinecap:"square"}))},i=function(e){let{fill:t="none",stroke:n="white",...r}=e;return o().createElement("svg",Object.assign({width:"24",height:"25",viewBox:"0 0 24 25",fill:t,xmlns:"http://www.w3.org/2000/svg"},r),o().createElement("path",{d:"M9.75 7.73999L15.25 12.99L9.75 18.24",stroke:n,strokeWidth:"1.5",strokeLinecap:"square"}))};function l(e){let{color:t,...n}=e;return o().createElement("svg",Object.assign({},n,{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),o().createElement("path",{d:"M17.25 6.75L6.75 17.25",stroke:t||"#445265",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M6.75 6.75L17.25 17.25",stroke:t||"#445265",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))}n(1949);const s=function(e){let{width:t="16px",height:n="12px",fill:r="rgb(0, 105, 255)"}=e;return o().createElement("svg",{width:t,height:n,viewBox:"0 0 16 12"},o().createElement("path",{d:"M8 12c3.6 0 6.4-3.1 7.6-4.9.5-.7.5-1.6 0-2.3C14.4 3.1 11.6 0 8 0 4.4 0 1.6 3.1.4 4.9c-.5.7-.5 1.6 0 2.2C1.6 8.9 4.4 12 8 12zm0-9c1.7 0 3 1.3 3 3S9.7 9 8 9 5 7.7 5 6s1.3-3 3-3z",fill:r}))},c=function(e){let{width:t="16px",height:n="16px",fill:r="rgb(0, 105, 255)"}=e;return o().createElement("svg",{width:t,height:n},o().createElement("g",{fill:r},o().createElement("path",{d:"M14.6 5.6l-8.2 8.2c.5.1 1.1.2 1.6.2 3.6 0 6.4-3.1 7.6-4.9.5-.7.5-1.6 0-2.3-.2-.3-.6-.7-1-1.2zM14.3.3L11.6 3C10.5 2.4 9.3 2 8 2 4.4 2 1.6 5.1.4 6.9c-.5.7-.5 1.6 0 2.2.5.8 1.4 1.8 2.4 2.7L.3 14.3c-.4.4-.4 1 0 1.4.2.2.4.3.7.3.3 0 .5-.1.7-.3l14-14c.4-.4.4-1 0-1.4-.4-.4-1-.4-1.4 0zm-9 9C5.1 8.9 5 8.5 5 8c0-1.7 1.3-3 3-3 .5 0 .9.1 1.3.3l-4 4z"})))},u=function(e){let{...t}=e;return o().createElement("svg",Object.assign({},t,{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),o().createElement("path",{d:"M18.25 12.25L5.75 12.25",stroke:"#445265",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))},d=function(e){return o().createElement("svg",Object.assign({},e,{fill:"none",xmlns:"http://www.w3.org/2000/svg"}),o().createElement("g",{clipPath:"url(#a)",stroke:"#6A778A",strokeWidth:"1.5",strokeLinecap:"square"},o().createElement("path",{d:"M4.75 4.75 19.25 12l-14.5 7.25L8.25 12l-3.5-7.25ZM8.5 12h2.75"})),o().createElement("defs",null,o().createElement("clipPath",{id:"a"},o().createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"}))))},p=function(e){return o().createElement("svg",Object.assign({},e,{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),o().createElement("path",{d:"M5.62117 14.9627L6.72197 15.1351C7.53458 15.2623 8.11491 16.0066 8.05506 16.8451L7.97396 17.9816C7.95034 18.3127 8.12672 18.6244 8.41885 18.7686L9.23303 19.1697C9.52516 19.3139 9.87399 19.2599 10.1126 19.0352L10.9307 18.262C11.5339 17.6917 12.4646 17.6917 13.0685 18.262L13.8866 19.0352C14.1252 19.2608 14.4733 19.3139 14.7662 19.1697L15.5819 18.7678C15.8733 18.6244 16.0489 18.3135 16.0253 17.9833L15.9441 16.8451C15.8843 16.0066 16.4646 15.2623 17.2772 15.1351L18.378 14.9627C18.6985 14.9128 18.9568 14.6671 19.0292 14.3433L19.23 13.4428C19.3025 13.119 19.1741 12.7831 18.9064 12.5962L17.9875 11.9526C17.3095 11.4774 17.1024 10.5495 17.5119 9.82051L18.067 8.83299C18.2284 8.54543 18.2017 8.18538 17.9993 7.92602L17.4363 7.2035C17.2339 6.94413 16.8969 6.83701 16.5867 6.93447L15.5221 7.26794C14.7355 7.51441 13.8969 7.1012 13.5945 6.31908L13.1866 5.26148C13.0669 4.95218 12.7748 4.7492 12.4496 4.75L11.5472 4.75242C11.222 4.75322 10.9307 4.95782 10.8126 5.26793L10.4149 6.31344C10.1157 7.1004 9.27319 7.51683 8.4842 7.26874L7.37553 6.92078C7.0645 6.82251 6.72591 6.93044 6.52355 7.19142L5.96448 7.91474C5.76212 8.17652 5.73771 8.53738 5.90228 8.82493L6.47 9.81487C6.88812 10.5446 6.68339 11.4814 6.00149 11.9591L5.0936 12.5954C4.82588 12.7831 4.69754 13.119 4.76998 13.442L4.97077 14.3425C5.04242 14.6671 5.30069 14.9128 5.62117 14.9627Z",stroke:"#445265",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M13.5911 10.4089C14.4696 11.2875 14.4696 12.7125 13.5911 13.5911C12.7125 14.4696 11.2875 14.4696 10.4089 13.5911C9.53036 12.7125 9.53036 11.2875 10.4089 10.4089C11.2875 9.53036 12.7125 9.53036 13.5911 10.4089Z",stroke:"#445265",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))},f=function(e){let{crop:t=!1,...n}=e;const o=t?"4 4 16 16":"0 0 24 24";return r.createElement("svg",Object.assign({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:o},n),r.createElement("path",{d:"M12.75 19.25L16 12.75L19.25 19.25",stroke:"#333",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("path",{d:"M14 17.25H18",stroke:"#333",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("path",{d:"M4.75 6.75H13.25",stroke:"#333",strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),r.createElement("path",{d:"M9 6.5V4.75",stroke:"#333",strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),r.createElement("path",{d:"M11.25 6.75C11.25 6.75 11.25 9.25 9.25 11.25C7.25 13.25 4.75 13.25 4.75 13.25",stroke:"#333",strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),r.createElement("path",{d:"M12.25 13.25C12.25 13.25 9.75 13.25 7.75 11.25C7.34551 10.8455 6.75 9.75 6.75 9.75",stroke:"#333",strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}))},h=function(e){return o().createElement("svg",Object.assign({},e,{viewBox:"0 0 15 15",xmlns:"https://www.w3.org/2000/svg"}),o().createElement("path",{d:"M8.7.2l.7 6.4 2.1-2.1A5.01 5.01 0 018 13a5.01 5.01 0 01-3.5-8.5c.6-.6 1.4-1.1 2.3-1.3l-.6-1.9C5 1.6 3.9 2.2 3 3.1A7.06 7.06 0 003 13c1.3 1.3 3.1 2 4.9 2 1.9 0 3.6-.7 4.9-2 2.7-2.7 2.7-7.1 0-9.9L15 .9 8.7.2z",fill:"#0069ff",fillRule:"evenodd"}))},m=function(e){return o().createElement("svg",Object.assign({},e,{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),o().createElement("path",{d:"M3.16675 4.49998V11.5C3.16675 12.2364 3.7637 12.8333 4.50008 12.8333H11.5001C12.2365 12.8333 12.8334 12.2364 12.8334 11.5V4.49998C12.8334 3.7636 12.2365 3.16665 11.5001 3.16665H4.50008C3.7637 3.16665 3.16675 3.7636 3.16675 4.49998Z",stroke:"white",strokeLinecap:"square"}),o().createElement("path",{d:"M5.16675 8.49999V10.8333H7.50008",stroke:"white",strokeLinecap:"square"}),o().createElement("path",{d:"M10.8333 7.49999V5.16666H8.5",stroke:"white",strokeLinecap:"square"}))},g=function(e){let{color:t="white",...n}=e;return o().createElement("svg",Object.assign({},n,{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),o().createElement("path",{d:"M11.1667 8.83333L12.0001 8C13.1047 6.89539 13.1047 5.10456 12.0001 3.99999C10.8955 2.89543 9.10468 2.89543 8.00008 3.99999L7.16675 4.83333",stroke:t,strokeLinecap:"square",strokeLinejoin:"round"}),o().createElement("path",{d:"M4.83315 7.16666L3.99981 8C2.89525 9.1046 2.89525 10.8954 3.99981 12C5.10438 13.1046 6.89521 13.1046 7.99981 12L8.83315 11.1667",stroke:t,strokeLinecap:"square",strokeLinejoin:"round"}),o().createElement("path",{d:"M9.5 6.5L6.5 9.5",stroke:t,strokeLinecap:"square",strokeLinejoin:"round"}))};function b(e){let{size:t=24,color:n="#333",className:r}=e;return o().createElement("svg",{width:t,height:t,className:r,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o().createElement("title",null,"External link, opens in a new tab"),o().createElement("path",{d:"M17.25 15.25V6.75H8.75",stroke:n,strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),o().createElement("path",{d:"M17 7L6.75 17.25",stroke:n,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))}const v=function(e){return o().createElement("svg",Object.assign({},e,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),o().createElement("path",{d:"M6.87348 6.87347C9.70478 4.04217 14.2952 4.04217 17.1265 6.87347C19.9578 9.70477 19.9578 14.2952 17.1265 17.1265C14.2952 19.9578 9.70478 19.9578 6.87348 17.1265C4.04218 14.2952 4.04218 9.70477 6.87348 6.87347Z",stroke:"#141414",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M14.2981 9.7019L9.7019 14.2981",stroke:"#141414",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M14.2981 14.2981L9.7019 9.7019",stroke:"#141414",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))},y=function(e){let{color:t,...n}=e;return o().createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),o().createElement("g",{clipPath:"url(#clip0_519_2415)"},o().createElement("path",{d:"M19.1139 19.1612C18.2263 19.2692 17.4673 19.4161 16.704 19.4427C15.4118 19.4878 14.1095 19.5471 12.8248 19.4387C10.2337 19.2202 7.90467 18.3755 6.23998 16.1792C3.04902 11.9685 5.4046 5.64697 10.5428 4.64327C14.6026 3.85025 18.3702 6.42302 19.0886 10.5352C19.4999 12.8902 18.8789 14.9851 17.3057 16.7773C17.2046 16.8925 17.1038 17.0077 16.9725 17.1577C17.8893 18.0155 18.6031 18.6834 19.1139 19.1612Z",stroke:t,strokeWidth:"1.5"})),o().createElement("defs",null,o().createElement("clipPath",{id:"clip0_519_2415"},o().createElement("rect",{width:"24",height:"24",fill:t}))))},x=function(e){return o().createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),o().createElement("path",{d:"M12 15H12.01",stroke:"#333333",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M5.41136 10.4033L10.4033 5.41136C11.2852 4.52955 12.7148 4.52955 13.5967 5.41136L18.5886 10.4033C19.4705 11.2852 19.4705 12.7148 18.5886 13.5967L13.5967 18.5886C12.7148 19.4705 11.2852 19.4705 10.4033 18.5886L5.41136 13.5967C4.52955 12.7148 4.52955 11.2852 5.41136 10.4033Z",stroke:"#333333",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M12 8.75V12.25",stroke:"#333333",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))}},5279:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});const r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let o;const a=new Uint8Array(16),i=[];for(let e=0;e<256;++e)i.push((e+256).toString(16).slice(1));const l=function(e,t,n){if(r.randomUUID&&!t&&!e)return r.randomUUID();const l=(e=e||{}).random??e.rng?.()??function(){if(!o){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");o=crypto.getRandomValues.bind(crypto)}return o(a)}();if(l.length<16)throw new Error("Random bytes length must be >= 16");if(l[6]=15&l[6]|64,l[8]=63&l[8]|128,t){if((n=n||0)<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=l[e];return t}return function(e,t=0){return(i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]).toLowerCase()}(l)}},5341:(e,t,n)=>{"use strict";var r=n(493),o=n(6281);e.exports=function(e){var t=r(e,"string");return o(t)?t:t+""}},5353:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(2279),o=n(1121);const a=(e,t,n,a)=>{const i=[o.A,e=>((e,t,n,o)=>{let{attachment_ids:a=[],...i}=e;return{...i,attachments:(a||[]).map(e=>{return t.find((n=e,function(){let{id:e,temporaryId:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:void 0,temporaryId:void 0};return e===n||t===n}));var n}).filter(e=>void 0!==e).map(e=>({...e,url:(0,r.l)(e,n,o)}))}})(e,t,n,a)];return i.reduce((e,t)=>t(e),e||{})}},5426:(e,t,n)=>{"use strict";var r=n(3057),o=TypeError;e.exports=function(e){if(r(e))throw new o("Can't call method on "+e);return e}},5545:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(9155),o=n.n(r),a=n(3864),i=n(3249);const l=a.Ay.div`
|
|
885
|
-
display: flex;
|
|
886
|
-
align-items: center;
|
|
887
|
-
justify-content: center;
|
|
888
|
-
border-radius: 100px;
|
|
889
|
-
transition: all cubic-bezier(0.61, 0.1, 0.42, 0.9) 150ms;
|
|
890
|
-
min-height: 18px;
|
|
891
|
-
background-color: transparent;
|
|
892
|
-
${e=>{let{minHeight:t}=e;return t&&`min-height: ${t}px;`}}
|
|
893
|
-
`,s=a.Ay.span`
|
|
894
|
-
width: 6px;
|
|
895
|
-
height: 6px;
|
|
896
|
-
opacity: 0;
|
|
897
|
-
border-radius: 50%;
|
|
898
|
-
background: ${e=>e.theme.buttonText};
|
|
899
|
-
background-color: ${e=>e.theme.buttonText};
|
|
900
|
-
|
|
901
|
-
&:nth-of-type(1) {
|
|
902
|
-
animation: 1s ${i.Zm} infinite 0.3s;
|
|
903
|
-
}
|
|
904
|
-
&:nth-of-type(2) {
|
|
905
|
-
margin: 0 5px;
|
|
906
|
-
animation: 1s ${i.Zm} infinite 0.6s;
|
|
907
|
-
}
|
|
908
|
-
&:nth-of-type(3) {
|
|
909
|
-
animation: 1s ${i.Zm} infinite 0.9s;
|
|
910
|
-
}
|
|
911
|
-
`;function c(e){let{loading:t=!1,isCheckbox:n=!1,flat:r,minHeight:a}=e;return o().createElement(l,{minHeight:a,flat:r,isCheckbox:n,$loading:t},o().createElement(s,null),o().createElement(s,null),o().createElement(s,null))}},5546:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function o(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){var n=r({key:"redux",merge:i.default,slicer:a.default,serialize:JSON.stringify,deserialize:JSON.parse},t),o=n.key,l=n.merge,s=n.slicer,c=n.serialize,u=n.deserialize;return function(t){return function(n,r,a){"function"==typeof r&&void 0===a&&(a=r,r=void 0);var i=void 0,d=void 0;try{i=u(localStorage.getItem(o)),d=l(r,i)}catch(e){console.warn("Failed to retrieve initialize state from localStorage:",e)}var p=t(n,d,a),f=s(e);return p.subscribe(function(){var e=p.getState(),t=f(e);try{localStorage.setItem(o,c(t))}catch(e){console.warn("Unable to persist state to localStorage:",e)}}),p}}};var a=o(n(8639)),i=o(n(7487));e.exports=t.default},5547:(e,t,n)=>{"use strict";var r,o,a=n(8900),i=n(3531),l=a.process,s=a.Deno,c=l&&l.versions||s&&s.version,u=c&&c.v8;u&&(o=(r=u.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&i&&(!(r=i.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=i.match(/Chrome\/(\d+)/))&&(o=+r[1]),e.exports=o},5564:(e,t,n)=>{"use strict";n.d(t,{$u:()=>d,z5:()=>p,gm:()=>u,JL:()=>c});var r=n(2221),o=n(4851);var a=n(7243),i=n(7173);const l=()=>({type:i.zZ});let s=null;const c=()=>async(e,t)=>{if(!s)return;const{connection:{token:n},environment:{PAT_HOST:l}}=t(),{headers:c}=(0,o.A)({token:n},{withCurrentUrl:!0}),{data:u,status:d}=await e((0,a.et)(`${l}/chatbubble/${r.Ak}/auth/identify`,{method:"POST",headers:c,body:s}));200===d&&e({type:i.qQ,...u})},u=e=>async(t,n)=>{s=e;const{connection:{token:r}}=n();r&&t(c())},d=()=>async(e,t)=>{const{chatbubble:{chatId:n},connection:{token:s},environment:{PAT_HOST:c}}=t(),{getAuthToken:u}=window.__KINDLY_SETTINGS__;if(!n||!u)return void e(l());let d;try{d=await u(n)}catch(e){console.error("Chatbubble auth failed:",e),d=null}if(!d)return void e(l());const{headers:p}=(0,o.A)({jwt:d,token:s},{withCurrentUrl:!0}),f=await e((0,a.et)(`${c}/chatbubble/${r.Ak}/auth/chat`,{method:"POST",headers:p},{onError:()=>e(l())}));null!=f&&f.data&&e({type:i.K_,token:d,avatarUrl:f.data.avatar_url,fullName:f.data.full_name})},p=()=>async(e,t)=>{const{auth:{isAuthenticated:n,isRefreshing:r,token:o}}=t();if(!n)return null;if(r)return await new Promise(e=>{setTimeout(e,200)}),p()(e,t);const{getAuthToken:a}=window.__KINDLY_SETTINGS__;a&&function(e){const t=function(e){if(!e)return null;const t=e.match(/^[A-Za-z0-9-_=]+\.([A-Za-z0-9-_=]+)\.?[A-Za-z0-9-_.+/=]*$/);if(!t)return null;try{return JSON.parse(window.atob(t[1]))}catch(e){return null}}(e);return!t||t.exp-Math.floor((new Date).getTime()/1e3)<30}(o)&&(e({type:i.Rk}),await e(d()),e({type:i.dp}));const{auth:l}=t();return l.isAuthenticated?{Authorization:`Bearer ${l.token}`}:null}},5644:(e,t,n)=>{"use strict";var r=n(1949),o=n.n(r),a=n(2221),i=n(3211);o().shape({button_type:o().oneOf([...Object.values(a.lP),...Object.values(a.lP).map(i.A)]).isRequired,is_active:o().bool,label:o().string.isRequired,value:o().string,new_context:o().object,index:o().number,language_code:o().string,open_in_new_tab:o().bool})},5767:(e,t,n)=>{"use strict";n.d(t,{ot:()=>A,n_:()=>w,Ay:()=>T,WG:()=>y,CJ:()=>b,GY:()=>k,wm:()=>x,zp:()=>_,m9:()=>E});var r=n(9749),o=n.n(r);var a=e=>Array.isArray(e)?e:[e];Symbol(),Object.getPrototypeOf({});var i="undefined"!=typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function l(){return{s:0,v:void 0,o:null,p:null}}function s(e,t={}){let n={s:0,v:void 0,o:null,p:null};const{resultEqualityCheck:r}=t;let o,a=0;function s(){let t=n;const{length:s}=arguments;for(let e=0,n=s;e<n;e++){const n=arguments[e];if("function"==typeof n||"object"==typeof n&&null!==n){let e=t.o;null===e&&(t.o=e=new WeakMap);const r=e.get(n);void 0===r?(t=l(),e.set(n,t)):t=r}else{let e=t.p;null===e&&(t.p=e=new Map);const r=e.get(n);void 0===r?(t=l(),e.set(n,t)):t=r}}const c=t;let u;if(1===t.s)u=t.v;else if(u=e.apply(null,arguments),a++,r){const e=o?.deref?.()??o;null!=e&&r(e,u)&&(u=e,0!==a&&a--),o="object"==typeof u&&null!==u||"function"==typeof u?new i(u):u}return c.s=1,c.v=u,u}return s.clearCache=()=>{n={s:0,v:void 0,o:null,p:null},s.resetResultsCount()},s.resultsCount=()=>a,s.resetResultsCount=()=>{a=0},s}function c(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r=0,o=0,i={},l=e.pop();"object"==typeof l&&(i=l,l=e.pop()),function(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}(l,`createSelector expects an output function after the inputs, but received: [${typeof l}]`);const c={...n,...i},{memoize:u,memoizeOptions:d=[],argsMemoize:p=s,argsMemoizeOptions:f=[],devModeChecks:h={}}=c,m=a(d),g=a(f),b=function(e){const t=Array.isArray(e[0])?e[0]:e;return function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(e=>"function"==typeof e)){const n=e.map(e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e).join(", ");throw new TypeError(`${t}[${n}]`)}}(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}(e),v=u(function(){return r++,l.apply(null,arguments)},...m),y=p(function(){o++;const e=function(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}(b,arguments);return t=v.apply(null,e),t},...g);return Object.assign(y,{resultFunc:l,memoizedResultFunc:v,dependencies:b,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:u,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var u=c(s),d=Object.assign((e,t=u)=>{!function(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const n=Object.keys(e);return t(n.map(t=>e[t]),(...e)=>e.reduce((e,t,r)=>(e[n[r]]=t,e),{}))},{withTypes:()=>d}),p=n(7251),f=n(3313),h=n(7523),m=n(4142);const g={feedbacksAlreadyDisplayed:[],feedbackToSubmit:null},b=u([e=>e.feedback.feedbacksAlreadyDisplayed,e=>e.feedback.feedbackToSubmit],(e,t)=>({feedbacksAlreadyDisplayed:e,feedbackToSubmit:t})),v=(0,p.Z0)({name:"feedback",initialState:g,reducers:{initializeFeedback:(e,t)=>{var n;e.feedbackToSubmit={id:null,rating_system:t.payload.ratingSystem,trigger_type:t.payload.triggerType,form_title:t.payload.formTitle,currentStep:t.payload.step,index:null,rating:null,sentiment:null,buttons_chosen:[],freeform_text:null},o()(n=e.feedbacksAlreadyDisplayed).call(n,t.payload.triggerType)||e.feedbacksAlreadyDisplayed.push(t.payload.triggerType)},setRating:(e,t)=>{e.feedbackToSubmit&&(e.feedbackToSubmit.index=t.payload.index,e.feedbackToSubmit.rating=t.payload.rating,e.feedbackToSubmit.sentiment=t.payload.sentiment)},clearRating:e=>{e.feedbackToSubmit&&(e.feedbackToSubmit.index=null,e.feedbackToSubmit.rating=null,e.feedbackToSubmit.sentiment=null)},toggleCommentButton:(e,t)=>{if(!e.feedbackToSubmit)return;const{buttons_chosen:n}=e.feedbackToSubmit;o()(n).call(n,t.payload)?e.feedbackToSubmit.buttons_chosen=n.filter(e=>e!==t.payload):n.push(t.payload)},setFreeformText:(e,t)=>{e.feedbackToSubmit&&(e.feedbackToSubmit.freeform_text=t.payload)},setStep:(e,t)=>{e.feedbackToSubmit&&(e.feedbackToSubmit.currentStep=t.payload)},clearFeedbackToSubmit:e=>{e.feedbackToSubmit=null}},extraReducers:e=>{e.addCase(m.S.fulfilled,(e,t)=>{e.feedbackToSubmit&&(e.feedbackToSubmit.id=t.payload)}),e.addCase(m.S.rejected,e=>{e.feedbackToSubmit=null}),e.addMatcher(e=>{var t;return o()(t=[f.CB,h.ny]).call(t,e.type)},()=>g)}}),{initializeFeedback:y,setRating:x,clearRating:w,toggleCommentButton:E,setFreeformText:k,setStep:_,clearFeedbackToSubmit:A}=v.actions,T=v.reducer},5777:e=>{"use strict";var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?n:t)(r)}},5919:(e,t,n)=>{"use strict";e.exports=n(4047)},5947:(e,t,n)=>{"use strict";var r=n(7752),o=TypeError;e.exports=function(e){if(r(e))throw new o("The method doesn't accept regular expressions");return e}},5960:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>ye,jL:()=>xe,GV:()=>we});var r={};n.r(r),n.d(r,{agent:()=>I,alerts:()=>M,announcement:()=>R,auth:()=>D,bot:()=>h.Ay,connection:()=>F,environment:()=>b,inChatNotification:()=>H,inspector:()=>V,local:()=>q,messages:()=>ae,nudge:()=>le,pushMessages:()=>ue});var o=n(7251),a=n(541),i=n(5546),l=n.n(i);const s=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){return t.reverse().slice(1).reduce((e,t)=>t(e),t[0](...arguments))}};var c=n(6249);function u(e,t,n){return(0,c.A)(e,function(e,t){return e.split(".").reverse().reduce((e,n,r)=>0===r?{[n]:t}:{[n]:e},{})}(t,n))}var d=n(4499),p=n(2628),f=n(2221),h=n(9100),m=n(7173);const g={PAT_HOST:"https://bot.kindly.ai",PUSHER_KEY:"0d15baa2a7308d71e79d",STATUS_PAGE:"https://status.kindly.ai",KINDLY_CHAT_URL:"http://localhost:8081",SAGE_HOST:"https://sage.kindly.ai",SETTINGS_HOST:"https://chat.kindlycdn.com",VERSION:"dev"},b=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,t=arguments.length>1?arguments[1]:void 0;return t.type===m.$o?{...e,...t.env}:e};var v=n(4142);const y={active:!1,allGreetingsHideInput:!1,attachments:{exchangeId:null,buttonClicked:null,files:[]},botKey:null,chatHasStarted:!1,chatId:null,contactDetailsButton:null,currentLanguage:"en",currentlyPoppedUp:!1,error:null,globalIconsState:{seenDelayedPages:[],open:!0},hasRequestedGreeting:!1,hideInputField:!1,inPlatform:!1,isChatFullWindow:!1,currentModal:null,overlayViews:[],previouslyPoppedUp:!1,renderedBy:"REACT",shownNudges:[],startedAt:null,uploadButtonWasClicked:null,userIsIdle:!1},x=(0,o.Z0)({name:"chatBubble",initialState:y,reducers:{},extraReducers:e=>e.addCase(m.tr,(e,t)=>{e.error=t.payload.error}).addCase(m.M2,(e,t)=>{e.currentLanguage=t.payload.code}).addCase(m.CB,(e,t)=>{e.botKey=t.payload.botKey||e.botKey,e.chatId=y.chatId,e.error=y.error,e.currentModal=y.currentModal,e.overlayViews=y.overlayViews,e.hideInputField=y.hideInputField,e.userIsIdle=y.userIsIdle}).addCase(m.ny,(e,t)=>{e.chatId=t.payload.chatId,e.allGreetingsHideInput=t.payload.allGreetingsHideInput,e.currentModal=y.currentModal,e.overlayViews=y.overlayViews}).addCase(m.d$,(e,t)=>{e.chatHasStarted=t.payload.chatHasStarted,e.userIsIdle=!t.payload.chatHasStarted&&e.userIsIdle}).addCase(m.tq,(e,t)=>{const n=e.hideInputField&&"USER"===t.payload.data.sender;e.chatHasStarted=!0,e.hideInputField=!!n||t.payload.data.chatbubble_hide_input_field}).addCase(m.kA,e=>{e.active=!0,e.userIsIdle=!1}).addCase(m.uS,e=>{e.active=!1}).addCase(m.hn,e=>{e.previouslyPoppedUp=!0,e.currentlyPoppedUp=!0}).addCase(m.IM,e=>e).addCase(m.d7,(e,t)=>{e.hasRequestedGreeting=t.payload.hasRequestedGreeting}).addCase(m.nm,(e,t)=>{e.startedAt=t.payload.startedAt}).addCase(m.HW,(e,t)=>{e.userIsIdle=t.payload.userIsIdle}).addCase(m.Eg,(e,t)=>{e.contactDetailsButton=t.payload.button}).addCase(m.t1,e=>{e.contactDetailsButton=null}).addCase(m.wX,(e,t)=>{e.shownNudges=(e.shownNudges||[]).concat(t.payload.slug)}).addCase(m.FZ,(e,t)=>{e.attachments.buttonClicked=(+new Date).toString(),e.attachments.exchangeId=t.payload.button.value}).addCase(m.TF,(e,t)=>{e.attachments.files=t.payload.files}).addCase(m.Q4,e=>{e.attachments.exchangeId=null,e.attachments.buttonClicked=null,e.attachments.files=[]}).addCase(m.YR,e=>{e.attachments.buttonClicked=null}).addCase(m.Kd,(e,t)=>{e.shownNudges=(e.shownNudges||[]).filter(e=>e!==t.payload.slug)}).addCase(m.uA,(e,t)=>{e.globalIconsState={...e.globalIconsState,...t.payload.state}}).addCase(m.Xu,(e,t)=>{e.currentModal=t.payload.currentModal}).addCase(m.XM,(e,t)=>{e.isChatFullWindow=t.payload.isChatFullWindow}).addCase(m.wM,(e,t)=>{e.overlayViews=[...e.overlayViews,t.payload.view]}).addCase(m.SO,e=>{e.overlayViews=[]}).addCase(m.nX,e=>{e.overlayViews=e.overlayViews.slice(0,-1)}).addCase(v.S.rejected,e=>{e.currentModal=null,e.overlayViews=e.overlayViews.filter(e=>"FEEDBACK"!==e)})}).reducer,w=(e,t)=>{var n;return{...h.ue,id:e.id,name:e.name,avatar:e.avatar,botName:e.name,botAvatar:e.avatar,chatbubbleTextEnabled:e.use_chatbubble_text,includeDisabledLanguages:e.includeDisabledLanguages,startOverText:e.start_over_text,welcomePage:e.welcomePage,welcomePageType:t?f.Lb.NONE:e.welcomePage.type,maintenanceAlert:e.maintenance_alert,maintenanceAlertEnabled:!t&&((null===(n=e.maintenance_alert)||void 0===n?void 0:n.alert_enabled)||!1),pushGreetingsEnabled:!t&&e.use_push_greetings,pushGreetings:e.push_greetings,tabNotification:e.tab_notification,bubbleNotification:e.bubble_notification,typingIndicator:e.typing_indicator,typingDuration:e.typing_duration,disabledTransports:e.disabled_transports,text:e.text,bubbleSize:e.bubble_size,isTextDirectionRtl:e.text_right_to_left,realtimeAnalytics:e.chatbubble.realtime_analytics,inputLimitEnabled:e.chatbubble.input_limit_enabled,inputLimit:e.chatbubble.input_limit||140,hideHeader:e.hideHeader||!1,bubbleAvatar:e.chatbubble.icon_avatar_image||e.bubbleAvatar||null,position:{...f.bF,...e.position},offsetHeight:e.offsetHeight||"205px",fullscreenMode:e.fullscreenMode||!1,zIndex:e.zIndex||f.DP,persistStateLifespan:t?-1:e.chatbubble.persist_state_lifespan_seconds,showTakeoverQueue:e.show_takeover_queue,bubbleOutline:e.use_bubble_outline,seasonalAppearance:e.seasonal_appearance,nudges:e.nudges||[],handoverMode:e.handover_mode,splitTestEnabled:e.split_test_enabled,conversionPageUrl:e.conversion_page_url,whitelabelEnabled:e.whitelabel_enabled}};function E(e){let{botKey:t,settings:n,settings:{context:r,inPlatform:o,admin:a,environment:i},initialChatLanguage:l}=e;return{bot:w(n,o),chatbubble:{...y,botKey:t,inPlatform:o,admin:a,renderedBy:n.renderedBy||"REACT",currentLanguage:l},local:{context:r,labels:[]},environment:{...g,VERSION:"2.76.4",...i}}}const k=(e,t,n)=>{const{currentLanguage:r}=t;return n[r]||n.en};var _=n(6079);const A=Object.freeze({WARNING:"WARNING",CRITICAL:"CRITICAL"}),T=Object.freeze({OFFLINE:{en:"You seem to be offline, please check your internet connection",nb:"Du ser ut til å være frakoblet internett, vennligst sjekk tilgangen din"},WEBSOCKET_DOWN:{en:"There seems to be an issue with the connection, attempting to reconnect...",nb:"Det ser ut til å være et problem med tilkoblingen. Prøver å koble opp igjen..."}});var S=n(8069),C=n(1872);let $;const O={name:void 0,isTyping:!1,userIsTyping:!1,takenOver:!1,takeoverClosed:!0,requestedHandoverAt:void 0,hasHadHandover:!1,supportsAttachment:!1,handoverWaitTimeEstimate:void 0},I=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case m.tq:return{...e,name:t.data.name||e.name,isTyping:!1};case m.M_:return{...e,isTyping:!0};case m.MU:return{...e,isTyping:!1};case m.c6:return{...e,userIsTyping:!0};case m.we:return{...e,userIsTyping:!1};case m.II:{const n=Boolean(t.data.requested_handover_at&&!t.data.taken_over),r=Boolean(t.data.taken_over&&!e.takenOver),o=Boolean(!t.data.taken_over&&e.requestedHandoverAt),a=Boolean(!t.data.taken_over&&e.takenOver),i=Boolean(t.data.supports_attachment),l=t.data.requested_handover_at,s=t.data.handover_wait_time_estimate,c=t.data.handover_queue_position;return n?{...e,requestedHandoverAt:l,takenOver:!1,takeoverClosed:!1,handoverWaitTimeEstimate:s,handoverQueuePosition:c}:r?{...e,requestedHandoverAt:void 0,takenOver:!0,isTyping:!1,hasHadHandover:!0,supportsAttachment:i,takeoverClosed:!1,handoverWaitTimeEstimate:void 0,handoverQueuePosition:void 0}:a||o?{...e,requestedHandoverAt:void 0,takenOver:!1,isTyping:!1,supportsAttachment:void 0,handoverWaitTimeEstimate:void 0,handoverQueuePosition:void 0}:e}case m.nz:return{...e,requestedHandoverAt:void 0===t.data.requested_handover_at?e.requestedHandoverAt:t.data.requested_handover_at,takeoverClosed:Boolean(t.data.closed)};case m.AQ:return{...e,handoverWaitTimeEstimate:t.data.handover_wait_time_estimate,handoverQueuePosition:t.data.handover_queue_position};case m.MM:return{...e,requestedHandoverAt:void 0,handoverWaitTimeEstimate:void 0,handoverQueuePosition:void 0};case m.nh:return{...e,hasHadHandover:!1,requestedHandoverAt:void 0,handoverWaitTimeEstimate:void 0,handoverQueuePosition:void 0};case m.CB:return{...e,hasHadHandover:!1,requestedHandoverAt:void 0};default:return e}},L={showTabNotification:!1,showBubbleNotification:!1},M=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:L,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case m.tq:return t.data.from_bot&&"SYSTEM"!==t.data.sender?{...e,showTabNotification:!0}:e;case m.Wh:return{...e,showTabNotification:!0};case m.Zb:return{...e,showBubbleNotification:!0};case m.u2:return{...L};default:return e}},N={show:!1,text:null,url:null,type:null},R=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:N,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case m.YU:return{text:t.payload.text,type:t.payload.alertType,url:t.payload.url,show:!0};case m.nW:return N;default:return e}},P={isAuthenticated:!1,token:null,avatarUrl:null,fullName:null,isRefreshing:!1},D=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case m.K_:return{...e,isAuthenticated:!0,token:t.token,avatarUrl:t.avatarUrl,fullName:t.fullName};case m.qQ:return{...e,avatarUrl:t.avatar_url,fullName:t.full_name,email:t.email,phoneNumber:t.phone_number,userId:t.user_id};case m.zZ:return{...e,...P};case m.Rk:return{...e,isRefreshing:!0};case m.dp:return{...e,isRefreshing:!1};default:return e}},j={token:null,connected:!0,pusherConnected:!1,connectTriggerConfig:void 0},F=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:j,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case m.ny:return{...e,token:t.token};case m.CB:return{...e,token:null};case m._Y:return{...e,connected:!0};case m._N:return{...e,connected:!1};case m.mz:return e;case m.kP:return{...e,pusherConnected:!1};case m.VZ:return"message"===t.event?{...e,pusherConnected:!0}:e;case m.zT:return{...e,connectTriggerConfig:t.triggerConfig};default:return e}},z={notifications:[]},B={content:"",dismissed:!1,once:!1},H=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:z,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case m.vP:return{...e,notifications:[...e.notifications,{...B,id:t.id,buttonText:t.buttonText,buttonHref:t.buttonHref,content:t.content,icon:t.icon,once:t.once}]};case m.MN:{const n=e.notifications.findIndex(e=>e.id===t.id);if(-1===n)return e;const r=[...e.notifications];return r[n]={content:t.content,buttonHref:t.buttonHref,buttonText:t.buttonText,icon:t.icon,once:t.once,id:t.id},{...e,notifications:r}}case m.nG:return{...e,notifications:e.notifications.filter(e=>e.id!==t.id)};case m.oZ:{const n=e.notifications.find(e=>e.id===t.id);return{...e,notifications:[...e.notifications.filter(e=>e.id!==t.id),{...n,dismissed:!0}]}}default:return e}},U={inspectorOpen:!1,currentMessageId:null},V=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:U,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case m.ye:return{...e,currentMessageId:t.chatMessageId};case m.vK:return{...e,inspectorOpen:!e.inspectorOpen};default:return e}};var G=n(332);const W={context:{},labels:[]},q=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:W,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case G.s:return{...e,context:{...e.context,...t.context}};case G.T:return{...e,labels:[...new Set([...e.labels,t.label])]};case m.CB:return{...e,labels:[]};default:return e}};var K=n(9749),Y=n.n(K),X=n(467),Z=n(5013);const J=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(e).reduce((e,t)=>{let[n,r]=t;return{...e,[(0,Z.A)(n)]:r}},{})};var Q=n(7720),ee=n(8172);const te={chatMessages:[],buttonClicks:[],attachments:[],messageSentTime:null,lastMessageSeen:null},ne=e=>{let{id:t}=e;return t},re=e=>{let{temporaryId:t,id:n}=e;return e=>{let{temporaryId:r,id:o}=e;return n===o||t===r}},oe=(e,t,n)=>e.map(e=>t(e)?n(e):e),ae=function(){var e,t,n,r;let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te,a=arguments.length>1?arguments[1]:void 0;switch(a.type){case m.tq:{const{chatMessages:e}=o,{data:t}=a;if((0,Q.A)(e)(t)){const n={...t};return n.key||=n.id,u(o,"chatMessages",[...e,n])}const n=e.findIndex(e=>{let{id:n}=e;return n===t.id});if(t.key||=t.id,-1===n)return o;const r=[...e.slice(0,n),t,...e.slice(n+1)];return{...o,chatMessages:r}}case m.CB:return te;case m.fg:{const{chatbubble_temporary_id:e,id:t}=a.data,n=n=>{var r;let{id:o}=n;return Y()(r=[e,t]).call(r,o)},r=e=>({...e,message:a.data.message});return{...o,chatMessages:oe(o.chatMessages,n,r)}}case m.se:return{...o,messageSentTime:a.messageSentTime};case m.pz:{var i;const{created:e,id:t,temporaryId:n}=a,{chatMessages:r}=o,l=null!==(i=null==a?void 0:a.status)&&void 0!==i?i:null,s=r.findIndex(e=>{let{id:t}=e;return t===n});if(s<0)return o;const c=r[s],u={...c,created:e||c.created,id:t||c.id,status:l},d=r.map((e,t)=>t!==s?e:u);return{...o,chatMessages:d}}case m.jE:{const{chatMessageId:e,chatMessageTempId:t,patternContextMatch:n}=a.data,r=n=>{let{id:r}=n;return r===e||r===t},i=e=>({...e,pattern_context_match:n});return{...o,chatMessages:oe(o.chatMessages,r,i)}}case m.Y6:var l;return(0,X.A)(o.buttonClicks)(a.buttonClick)?{...o,buttonClicks:[...null!==(l=o.buttonClicks)&&void 0!==l?l:[],a.buttonClick]}:o;case m.kU:return{...o,lastMessageSeen:(0,ee.A)(a,["id","index"])};case m.Os:return{...o,attachments:[...null!==(e=o.attachments)&&void 0!==e?e:[],...(null===(t=a.data)||void 0===t||null===(n=t.attachments)||void 0===n?void 0:n.map(J))||[]]};case m.wP:{const e=J(a.attachment),t=re(e),n=t=>({...t,...e});return{...o,attachments:oe(o.attachments,t,n)}}case m.tS:{var s;const{attachments:e=[],temporaryChatMessageId:t,chatMessageId:n}=a.data,r=e.map(J),i=(null!==(s=o.attachments)&&void 0!==s?s:[]).map(e=>{const t=r.find(re(e));return t?{...e,...t}:e});let l=o.chatMessages;if(t&&n){const e=e=>{let{id:n}=e;return n===t},a=e=>({...e,id:n,attachment_ids:r.map(ne)});l=oe(o.chatMessages,e,a)}return{...o,attachments:i,chatMessages:l}}case m.QA:return null!==(r=a.formData)&&void 0!==r&&r.formKey?{...o,forms:{...o.forms,[a.formData.formKey]:a.formData}}:o;default:return o}},ie={slug:null,show:!1,isCustom:!1,dialogue:null,webhook:null,content:null,onRendered:null,nudgeLayout:{},nudgeType:f.MK.TEMPLATE,hasBeenDismissed:!1},le=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ie,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case m.X2:return{...e,show:!1,nudgeLayout:{},hasBeenDismissed:!0};case m.wv:return{...e,show:!0,slug:t.slug,dialogue:t.dialogue,webhook:t.webhook,nudgeLayout:t.nudgeLayout,nudgeType:f.MK.TEMPLATE,trackEvent:t.trackEvent,hasBeenDismissed:!1};case m.un:return{...e,show:!0,isCustom:!0,slug:t.slug,content:t.content,nudgeLayout:{},onRendered:t.onRendered,nudgeType:f.MK.CUSTOM,trackEvent:t.trackEvent,hasBeenDismissed:!1};default:return e}};var se=n(9483);const ce={show:!1,text:null,agent:null,dismissed:!1,type:se.oI.MESSAGE,dismissedMessages:[]},ue=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ce,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case m.II:return t.data.taken_over&&!e.taken_over?{...e,show:!0,agent:{name:t.data.name,avatar:t.data.avatar},text:void 0,type:se.oI.HANDOVER}:e;case m.tq:return(0,p.A)()||!t.data.from_bot||"SYSTEM"===t.data.sender||"greeting"===t.data.exchange_type?e:{...e,show:!0,text:t.data.message,type:se.oI.MESSAGE};case m.l:return{...e,show:!0,text:t.pushMessageText,dismissed:!1,type:t.pushMessageType,dismissedMessages:[...e.dismissedMessages,t.pushMessageTitle]};case m.a_:return{...e,show:!1,dismissed:!0};case m.a1:return ce;default:return e}};var de=n(5767);const pe=e=>{let{url:t,...n}=e;return(t||"").startsWith("data:")?n:{...n,url:t}},fe=e=>e?()=>e=>({bot:{splitTestLabel:e.bot.splitTestLabel,splitLabelTimestamp:e.bot.splitLabelTimestamp,hasInteraction:e.bot.hasInteraction},chatbubble:{active:!1,previouslyPoppedUp:e.chatbubble.previouslyPoppedUp,shownNudges:e.chatbubble.shownNudges},pushMessages:{dismissedMessages:e.pushMessages.dismissedMessages},agent:{name:e.agent.name}}):()=>e=>({alerts:{showBubbleNotification:e.alerts.showBubbleNotification},agent:{name:e.agent.name,takenOver:e.agent.takenOver,supportsAttachment:e.agent.supportsAttachment},bot:{splitTestLabel:e.bot.splitTestLabel,splitLabelTimestamp:e.bot.splitLabelTimestamp,hasInteraction:e.bot.hasInteraction},chatbubble:{...e.chatbubble,admin:void 0,currentlyPoppedUp:y.currentlyPoppedUp,allGreetingsHideInput:y.allGreetingsHideInput,contactDetailsButton:y.contactDetailsButton,attachments:y.attachments,isChatFullWindow:void 0,overlayViews:e.chatbubble.overlayViews.filter(e=>"FEEDBACK"===e),shownNudges:e.chatbubble.shownNudges,renderedBy:void 0},connection:{token:e.connection.token,connected:!0,pusherConnected:!1},feedback:{...e.feedback},local:{labels:e.local.labels},messages:{forms:e.messages.forms,chatMessages:e.messages.chatMessages,buttonClicks:e.messages.buttonClicks,attachments:(e.messages.attachments||[]).map(pe),messageSentTime:e.messages.messageSentTime,lastMessageSeen:e.messages.lastMessageSeen},pushMessages:{dismissedMessages:e.pushMessages.dismissedMessages}}),he=e=>t=>{let{active:n}=t.chatbubble;const r=(0,p.A)();return e.isFromMultitab||(n=t.chatbubble.active&&(Boolean(e.chatbubble.keep_open&&!r)||Boolean(e.chatbubble.keep_open_mobile&&r))),(0,c.A)(t,{chatbubble:{active:n,wasActiveOnLoad:n}})},me=e=>{var t;if((0,d.A)(e,"bot.includeDisabledLanguages",!1))return e;const n=null==e||null===(t=e.chatbubble)||void 0===t?void 0:t.currentLanguage,r=window.__KINDLY_SETTINGS__.supportedLanguages.some(e=>{let{code:t}=e;return t===n}),o=window.__KINDLY_SETTINGS__.supportedLanguages.find(e=>{let{is_primary:t}=e;return t});if(!o)throw new Error("Impossible state: primary language not found");return r?e:(0,c.A)(e,{chatbubble:{currentLanguage:o.code}})},ge=e=>{let{inPlatform:t,botKey:n}=e;return(e=>(t,n)=>{return r=(0,c.A)(t,n),e.reduce((e,t)=>{let[n,r]=t;return u(e,n,r)},r);var r})([["chatbubble.inPlatform",t],["chatbubble.botKey",n]].filter(e=>{let[,t]=e;return void 0!==t}))},be=e=>t=>{var n,r;const o=null==t||null===(n=t.messages)||void 0===n?void 0:n.chatMessages.filter(e=>e.from_bot).pop(),a=null!==(r=null==o?void 0:o.chat_live_translation_language_code)&&void 0!==r?r:null==o?void 0:o.chat_language_code,i=null!=a?a:e;return(0,c.A)(t,{chatbubble:{currentLanguage:i}})},ve=[e=>t=>n=>n.type===m.tq&&n.data.from_bot?(e.dispatch((0,_.MY)()),(0,_.CM)(),t(n)):t(n),e=>t=>n=>{switch(n.type){case m._N:return((e,t,n,r)=>{const{announcement:o,bot:a,chatbubble:i}=t;if(o.show)return n(r);const l={text:k(0,i,e),alertType:A.WARNING};return n({type:m.YU,payload:l}),n(r)})(T.OFFLINE,e.getState(),t,n);case m._Y:{const{announcement:r,connection:o}=e.getState();return r.show&&t({type:m.nW}),o.connected||e.dispatch((0,_.S4)()),t(n)}default:return t(n)}},e=>t=>async n=>{const{agent:{takenOver:r},chatbubble:{currentLanguage:o}}=e.getState();if(n.type===m.II){const{handoverConversationFeedback:t,preloadFeedbackImages:a}=(0,S.A)(o);r&&!1===n.data.taken_over&&t&&(a("handover_conversation"),e.dispatch((0,C.ob)()))}if(n.type!==m.tq)return t(n);const{from_bot:a,sender:i,was_anonymized:l,exchange_type:s,triggered_chat_start:c,chat_language_code:u,chat_live_translation_language_code:d}=n.data,h=d||u;if(n.type===m.tq&&(0,p.A)()&&a&&i!==f.bS.SYSTEM&&e.dispatch({type:m.Zb}),"greeting"===s||c)o!==h&&t({type:m.M2,code:h});else if(a&&h&&o!==h){var g;const{text:n}=e.getState().bot,r=null===(g=n.language_switch_notification)||void 0===g?void 0:g[h];r&&e.dispatch((0,C.cC)({content:r,buttonText:void 0,buttonHref:void 0,icon:"language"},f.Jm.LANGUAGE_SWITCH)),t({type:m.M2,code:u})}if(a||!l)return t(n);t({type:m.fg,data:n.data})},e=>t=>async n=>{var r;return n.type===m.A8&&(clearTimeout($),$=setTimeout(()=>{e.getState().bot.isTyping&&t({type:m.wk})},1e3*((null===(r=n.data)||void 0===r?void 0:r.TTL)||10))),n.type===m.wk&&clearTimeout($),t(n)},()=>e=>t=>{e("payload"in t?t:{...t,payload:{...t}})}];function ye(e){let{botKey:t,settings:n,persist:a=!0,initialChatLanguage:i,initialStateModifier:u}=e;const{inPlatform:d}=n,p=!n.inPlatform&&0===n.chatbubble.persist_state_lifespan_seconds,f=`kindly-chat-${t}`,h=fe(p),m=s(me,be(i),he(n),ge({inPlatform:d,botKey:t})),g=a?l()(null,{key:f,slicer:h,merge:m}):e=>e;let b=E({botKey:t,settings:n,initialChatLanguage:i});return u&&(b=(0,c.A)(b,u)),(0,o.U1)({reducer:{...r,feedback:de.Ay,chatbubble:x},preloadedState:b,middleware:e=>e().concat(...ve),enhancers:e=>e().concat(g),devTools:!1})}const xe=a.wA.withTypes(),we=a.d4.withTypes()},6057:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(){let e=arguments.length>1?arguments[1]:void 0;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce((t,n)=>{var r;return{...t,[e(n)]:[...null!==(r=t[e(n)])&&void 0!==r?r:[],n]}},{})}},6064:(e,t,n)=>{"use strict";function r(e,t){if(!e)return;const n=[t,"en"].find(t=>t&&e[t]);return n?e[n]:void 0}n.d(t,{A:()=>r})},6079:(e,t,n)=>{"use strict";n.d(t,{CM:()=>E,Tk:()=>g,MY:()=>k,S4:()=>y,yh:()=>A,Zk:()=>S,Mk:()=>T,f2:()=>_,uK:()=>x});var r=n(9749),o=n.n(r),a=n(2221),i=n(467),l=n(4851),s=n(6057),c=n(7720),u=n(7173),d=n(7243);const p=[],f=[],h=[];let m=0;const g=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.length||([...p,...f].forEach(e=>{clearInterval(e)}),p.length=0,f.length=0,h.forEach(e=>{clearTimeout(e)}),h.length=0,m=0),o()(t).call(t,"handoverRequestPollIntervalIds")&&(p.forEach(e=>{clearInterval(e)}),p.length=0),o()(t).call(t,"handoverPollIntervalIds")&&(f.forEach(e=>{clearInterval(e)}),f.length=0),o()(t).call(t,"replyTimeoutIds")&&(h.forEach(e=>{clearTimeout(e)}),h.length=0,m=0)},b=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(e).reduce((e,t)=>{let[n,r]=t;return{...e,[n.replace(/_\w/g,e=>e[1].toUpperCase())]:r}},{})},v=e=>{let{status:t}=e;return t!==a.Le.PROCESSING},y=()=>async(e,t)=>{const{agent:{takenOver:n,requestedHandoverAt:r,handoverWaitTimeEstimate:o,handoverQueuePosition:p},chatbubble:{startedAt:f,chatHasStarted:h,botKey:m},connection:{token:g},environment:{PAT_HOST:y},messages:{attachments:x,buttonClicks:E,chatMessages:k,messageSentTime:_}}=t();if(!g||!h)return;const[A]=k.filter(e=>{let{from_bot:t}=e;return t}).slice(-1),[T]=x.filter(v).slice(-1),S=((e,t)=>{let{created:n}=e,{created:r}=t;return n&&r?new Date(n)>new Date(r)?n:r:n||r})(null!=A?A:{},null!=T?T:{})||_||f||(new Date).toISOString(),C=await e((0,d.et)(`${y}/chatbubble/${a.Ak}/latest?timestamp=${S}`,{method:"GET",...(0,l.A)({token:g})},{onError:t=>{var n;403===(null===(n=t.response)||void 0===n?void 0:n.status)?(console.warn(`/chatbubble/${a.Ak}/latest returned 403, starting new chat`),e({type:u.tr,error:403}),e((0,d.zX)(m,!0))):console.error(t)}}));if(!C||!C.data)return;const{chatMessages:$,buttonClicks:O=[],takenOver:I,requestedHandoverAt:L,attachments:M,externalHandoverState:N,handoverWaitTimeEstimate:R,handoverQueuePosition:P}=C.data,D=(0,c.A)(k),j=(0,i.A)(E),F=$.filter(D),z=O.map(b).filter(j),B=F.length>0;var H,U;e((e=>async(t,n)=>{if((null==e?void 0:e.length)>0)return;const{attachments:r=[]}=n().messages,{newAttachments:o=[],updated:i=[]}=(0,s.A)(function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).filter(e=>{let{sender:t,status:n}=e;return t===a.bS.USER||n===a.Le.CLEAN})}(e),e=>r.find((e=>{let{id:t,temporaryId:n}=e;return e=>{let{id:r,temporaryId:o}=e;return t&&t===r||n&&n===o}})(e))?"updated":"newAttachments");o.length>0&&t({type:u.Os,data:{attachments:o}}),i.length>0&&t({type:u.tS,data:{attachments:i}})})(M)),e(w(B)),n!==I&&e({type:u.II,data:{taken_over:I,supports_attachment:null==N?void 0:N.supports_attachment,requested_handover_at:L}}),r!==L&&e({type:u.nz,data:{requested_handover_at:L,handover_wait_time_estimate:R,handover_queue_position:P}}),o===R&&p===P||e({type:u.AQ,data:{handover_wait_time_estimate:R,handover_queue_position:P}}),(H=F,U="created",(H||[]).slice().sort((e,t)=>e[U]<t[U]?-1:1)).forEach(t=>{e({type:u.tq,data:t})}),z.forEach(t=>e({type:u.Y6,buttonClick:t}))},x=()=>e=>{if(g("replyTimeoutIds"),f.length)return;const t=setTimeout(()=>e(y()),a.RT.REPLY_TIMEOUT_MS);h.push(t),m=1},w=e=>t=>{if(g("replyTimeoutIds"),0===m)return;if(e||!(m<a.RT.REPLY_TIMEOUT_MAX_ATTEMPTS))return void(e||console.error(`Reply timeout failed more than ${a.RT.REPLY_TIMEOUT_MAX_ATTEMPTS} times`));const n=a.RT.REPLY_TIMEOUT_MS*a.RT.REPLY_TIMEOUT_MS_MULTIPLIER**m,r=setTimeout(()=>t(y()),n);h.push(r),m+=1},E=()=>g("replyTimeoutIds"),k=()=>e=>{if(f.length){g("handoverPollIntervalIds");const t=setInterval(()=>e(y()),a.RT.HANDOVER_POLL_INTERVAL_MS);p.push(t)}if(p.length){g("handoverRequestPollIntervalIds");const t=setInterval(()=>e(y()),a.RT.HANDOVER_REQUEST_POLL_INTERVAL_MS);p.push(t)}},_=()=>e=>{if(g(),f.length)return;const t=setInterval(()=>e(y()),a.RT.HANDOVER_POLL_INTERVAL_MS);f.push(t)},A=()=>g("handoverPollIntervalIds"),T=()=>e=>{if(p.length)return;const t=setInterval(()=>e(y()),a.RT.HANDOVER_REQUEST_POLL_INTERVAL_MS);p.push(t)},S=()=>g("handoverRequestPollIntervalIds")},6100:(e,t,n)=>{"use strict";var r=n(1780),o=Function.prototype,a=o.call,i=r&&o.bind.bind(a,a);e.exports=r?i:function(e){return function(){return a.apply(e,arguments)}}},6249:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(8089),o=n.n(r);const a=(e,t)=>o()({},e,t)},6253:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(9155);const o=(e,t)=>{const n=(0,r.useRef)();return(0,r.useCallback)(r=>{var o;new Date-n.current<t?null==r||null===(o=r.preventDefault)||void 0===o||o.call(r):(e(r),n.current=new Date)},[t,e])}},6281:(e,t,n)=>{"use strict";var r=n(1003),o=n(2769),a=n(4317),i=n(7460),l=Object;e.exports=i?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return o(t)&&a(t.prototype,l(e))}},6289:(e,t,n)=>{"use strict";n.d(t,{B2:()=>d,FC:()=>i,Ko:()=>u,eo:()=>c,hl:()=>s,r6:()=>l});var r=n(3864),o=n(6538),a=n(7094);const i=r.Ay.svg`
|
|
912
|
-
fill: ${e=>{let{inputType:t,theme:n}=e;return t===a.cJ.CHECKBOX?"none":n.buttonText}};
|
|
794
|
+
`,d=l.Ay.label`
|
|
795
|
+
font-size: var(--_kindlychat-font-size-sm);
|
|
796
|
+
margin: 4px 0;
|
|
797
|
+
font-weight: 500;
|
|
798
|
+
color: var(--panel-background-white-black-contrast-1743170834);
|
|
799
|
+
`,p=l.Ay.div`
|
|
800
|
+
font-weight: 400;
|
|
801
|
+
line-height: 16px;
|
|
802
|
+
margin-top: 4px;
|
|
803
|
+
font-size: var(--_kindlychat-font-size-sm);
|
|
804
|
+
color: ${e=>{let{theme:t}=e;return(0,c.w5)(t.panelBackground,"#FFFFFF",s.qd.textColorLight)}};
|
|
805
|
+
`;var f=n(824),h=n(1435);const m=[h.pd.name,h.Gb.name,h.Ap.name,f.xI.name,h.cS.name,h.l6.name,h.ZH.name,h.TM.name],g=function(e){let{className:t,children:n,label:r=null,htmlFor:a=null,helperText:l=null,required:s=!1}=e;const c=i().Children.toArray(n);(!c.length||c.length>1)&&console.error(`InputWrapper is expecting one child node. Received ${c.length}`);const f=c[0];if(f&&"function"==typeof f.type){const e=f.type.displayName||f.type.name;null!=m&&o()(m).call(m,e)||console.error(`InputWrapper child can only be one of the following: ${m.join(", ")}`)}return i().createElement(u,{className:t},r&&i().createElement(d,{htmlFor:a||""},r,s?i().createElement(i().Fragment,null,"*"):""),n,l&&i().createElement(p,null,l))}},3514:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(9155),o=n(541),a=n(1695);function i(){const{nudges:e}=(0,o.d4)(a.Od);return(0,r.useMemo)(()=>{var t,n,r,o,a;return[...null!==(t=null==e?void 0:e.form_nudges)&&void 0!==t?t:[],...null!==(n=null==e?void 0:e.custom_nudges)&&void 0!==n?n:[],...null!==(r=null==e?void 0:e.product_nudges)&&void 0!==r?r:[],...null!==(o=null==e?void 0:e.text_nudges)&&void 0!==o?o:[],...null!==(a=null==e?void 0:e.multiple_choice_nudges)&&void 0!==a?a:[]]},[e])}},3531:(e,t,n)=>{"use strict";var r=n(8900).navigator,o=r&&r.userAgent;e.exports=o?String(o):""},3699:(e,t,n)=>{"use strict";n.d(t,{B$:()=>l,Bu:()=>c,TA:()=>s,UN:()=>i,aO:()=>a});var r=n(2221);const o=["Bytes","kB","MB","GB"],a=1024,i=5*a,l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(0===e)return"0 Bytes";const n=Math.floor(Math.log(e)/Math.log(a));return`${parseFloat((e/a**n).toFixed(t))} ${o[n]}`},s=e=>new Promise((t,n)=>{const o=e.size/a;if(o>i)return void n(new Error(`The file must be less than ${l(i*a)}`));const s=new FileReader;s.readAsDataURL(e),s.onload=()=>t({url:s.result,file:e,sizeKb:o,name:e.name,type:e.type,status:r.Le.PROCESSING,sender:r.bS.USER}),s.onabort=()=>n(new Error(s.error))}),c=e=>new Promise((t,n)=>{const r=new FileReader;r.readAsArrayBuffer(e),r.onload=()=>t(r.result),r.onabort=()=>n(new Error(r.error))})},3753:(e,t,n)=>{"use strict";var r=n(4871),o=n(8900),a=n(7525),i="__core-js_shared__",l=e.exports=o[i]||a(i,{});(l.versions||(l.versions=[])).push({version:"3.43.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.43.0/LICENSE",source:"https://github.com/zloirock/core-js"})},3755:(e,t,n)=>{"use strict";n.d(t,{B2:()=>d,FC:()=>i,Ko:()=>u,eo:()=>c,hl:()=>s,r6:()=>l});var r=n(3864),o=n(6538),a=n(9272);const i=r.Ay.svg`
|
|
806
|
+
fill: ${e=>{let{$inputType:t,theme:n}=e;return t===a.cJ.CHECKBOX?"none":n.buttonText}};
|
|
913
807
|
stroke: ${e=>{let{theme:t}=e;return t.buttonText}};
|
|
914
808
|
stroke-width: 2px;
|
|
915
809
|
position: relative;
|
|
916
810
|
top: -1px;
|
|
917
811
|
`,l=r.Ay.div`
|
|
918
812
|
display: inline-block;
|
|
919
|
-
width: ${e=>{let{inputType:t}=e;return t===a.cJ.CHECKBOX?"16px":"18px"}};
|
|
920
|
-
height: ${e=>{let{inputType:t}=e;return t===a.cJ.CHECKBOX?"16px":"18px"}};
|
|
921
|
-
border-radius: ${e=>{let{inputType:t}=e;return t===a.cJ.CHECKBOX?"3px":"50%"}};
|
|
813
|
+
width: ${e=>{let{$inputType:t}=e;return t===a.cJ.CHECKBOX?"16px":"18px"}};
|
|
814
|
+
height: ${e=>{let{$inputType:t}=e;return t===a.cJ.CHECKBOX?"16px":"18px"}};
|
|
815
|
+
border-radius: ${e=>{let{$inputType:t}=e;return t===a.cJ.CHECKBOX?"3px":"50%"}};
|
|
922
816
|
background: transparent;
|
|
923
817
|
border: 1px solid
|
|
924
|
-
${e=>{let{theme:t
|
|
818
|
+
${e=>{let{theme:t,$isForm:n}=e;return n?(0,o.w5)(t.panelBackground,"rgba(255,255,255, 0.2)","rgba(0,0,0, 0.2)"):(0,o.w5)(t.background,"rgba(255,255,255, 0.2)","rgba(0,0,0, 0.2)")}};
|
|
925
819
|
${e=>{let{theme:{buttonBackground:t}}=e;return(0,o.SW)(t)?"filter: brightness(0.7);":"filter: opacity(0.3);"}};
|
|
926
820
|
|
|
927
821
|
${i} {
|
|
@@ -937,7 +831,7 @@
|
|
|
937
831
|
|
|
938
832
|
&:hover > ${l} {
|
|
939
833
|
border: 1px solid
|
|
940
|
-
${e=>{let{theme:t
|
|
834
|
+
${e=>{let{theme:t,$isForm:n}=e;return n?(0,o.w5)(t.panelBackground,"rgba(255,255,255, 1)","rgba(0,0,0, 1)"):(0,o.w5)(t.background,"rgba(255,255,255, 1)","rgba(0,0,0, 1)")}};
|
|
941
835
|
}
|
|
942
836
|
`,c=r.Ay.input`
|
|
943
837
|
height: 16px;
|
|
@@ -967,371 +861,325 @@
|
|
|
967
861
|
font-size: var(--_kindlychat-font-size-p);
|
|
968
862
|
font-weight: 400;
|
|
969
863
|
margin: 0 28px;
|
|
970
|
-
color: ${e=>{let{theme:t
|
|
864
|
+
color: ${e=>{let{theme:t,$isForm:n}=e;return n?"var(--panel-background-white-black-contrast-1743170834)":(0,o.w5)(t.background,"#FFFFFF","#000000")}};
|
|
971
865
|
`,d=r.Ay.div`
|
|
972
866
|
margin-top: 12px;
|
|
973
867
|
display: flex;
|
|
974
868
|
flex-direction: column;
|
|
975
869
|
align-items: flex-start;
|
|
976
|
-
`},6367:(e,t,n)=>{"use strict";n.d(t,{GJ:()=>i,NY:()=>s,fz:()=>c,n6:()=>d,tf:()=>u});const r=["load","message"],o="See https://docs.kindly.ai/api/chat#handlers for how to switch.",a=function(e,t,n,a){var i,l;let s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(-1!==r.indexOf(e)&&Boolean(a)&&function(e,t,n){const r=`on${t.charAt(0).toUpperCase()+t.slice(1)}`;if("function"!=typeof e)return void console.warn(`Provided setting '${r}' is not a function.`);console.warn(`kindlyOptions.${r} is deprecated in favor of standard event handlers. ${o}`);const a=Object.values(n);try{e(...a)}catch(e){console.error(e)}}(a,e,t),"API"!==n)return!0;if(null===(i=window)||void 0===i||null===(l=i.kindlyChat)||void 0===l||!l.APIRoot)return console.warn("No APIRoot when rendered using kindly-chat API"),!0;"message"===e&&window.kindlyChat.APIRoot.dispatchEvent(new CustomEvent("onMessage",{detail:t}));const c=`kindly:${e}`;return window.kindlyChat.APIRoot.dispatchEvent(new CustomEvent(c,{detail:t,bubbles:!0,cancelable:s}))};function i(e,t,n,r){e&&a("message",{newMessage:e,chatLog:t},r,n)}let l=!1;function s(e){!1===l&&(l=!0,a("load",{settings:e},null==e?void 0:e.renderedBy,null==e?void 0:e.onLoad))}const c=e=>{let{button:t,buttonType:n,chatLog:r,event:a,handlers:i,lastMessage:l,renderedBy:s}=e,c=!1;const u=null==i?void 0:i[n];if(u){console.warn(`kindlyOptions.buttonHandlers is deprecated in favor of standard event handlers. ${o}`);try{c=Boolean(u(a,t,l,r,n))}catch(e){console.error(e)}}var d;return"API"===s&&(c=!(null!==(d=window.kindlyChat)&&void 0!==d&&d.APIRoot.dispatchEvent(new CustomEvent("kindly:buttonclick",{detail:{button:t,lastMessage:l,chatLog:r,buttonType:n},bubbles:!0,cancelable:!0})))),c};function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{source:n="user",storeState:r}=arguments.length>2?arguments[2]:void 0;const{chatbubble:{chatId:o,renderedBy:i}}=r,l={...t,chatId:o,source:n,type:e};return a("ui",l,i,void 0,!1)}const d=e=>{var t;let{type:n,icon:r,renderedBy:o}=e;return"API"!==o||!(null!==(t=window.kindlyChat)&&void 0!==t&&t.APIRoot.dispatchEvent(new CustomEvent("kindly:globalicon",{detail:{type:n,icon:r},bubbles:!0,cancelable:!0})))}},6421:(e,t,n)=>{"use strict";n.d(t,{A:()=>i}),n(1949);var r=n(9155),o=n.n(r);const a=n(3864).Ay.div`
|
|
977
|
-
transition: all 0.3s ease-in-out;
|
|
978
|
-
`,i=function(e){let{children:t,carouselPosition:n,onTouchEnd:r,onTouchMove:i,onTouchStart:l}=e;return o().createElement(a,{onTouchStart:l,onTouchEnd:r,onTouchMove:i,style:{transform:`translateX(${n}px)`}},t)}},6538:(e,t,n)=>{"use strict";function r(e,t,n){return o(e)?n:t}function o(e){let t=e;l(e)&&(t=function(e){const t=e.indexOf(",")>-1?",":" ";let n=(+(e=e.substr(4).split(")")[0].split(t))[0]).toString(16),r=(+e[1]).toString(16),o=(+e[2]).toString(16);return 1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),1===o.length&&(o=`0${o}`),`#${n}${r}${o}`}(e)),s(e)&&(t=a(e));const n="#"===t.charAt(0)?t.substring(1,7):t,r=[parseInt(n.substring(0,2),16)/255,parseInt(n.substring(2,4),16)/255,parseInt(n.substring(4,6),16)/255].map(e=>e<=.03928?e/12.92:((e+.055)/1.055)**2.4);return.2126*r[0]+.7152*r[1]+.0722*r[2]>.179}function a(e){return e.replace(i,(e,t,n,r)=>`#${t}${t}${n}${n}${r}${r}`)}n.d(t,{J7:()=>c,SW:()=>o,w5:()=>r});const i=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,l=e=>e.match(/^rgb/),s=e=>e.match(i);function c(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:120;const r=u(e),o=u(t);return Math.sqrt((r[0]-o[0])**2+(r[1]-o[1])**2+(r[2]-o[2])**2)<=n}function u(e){if(l(e))return e.match(/\d+/g).map(Number);let t="#"===e.charAt(0)?e.substring(1):e;return s(e)&&(t=a(t).substring(1)),[parseInt(t.substring(0,2),16),parseInt(t.substring(2,4),16),parseInt(t.substring(4,6),16)]}},6804:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>k});var r=n(9155),o=n.n(r),a=n(541),i=n(5256),l=n(1328),s=n(1872),c=n(1695),u=n(3864),d=n(3249),p=n(4927),f=n(8905);const h=u.Ay.div`
|
|
979
|
-
display: flex;
|
|
980
|
-
flex-direction: row;
|
|
981
|
-
position: absolute;
|
|
982
|
-
bottom: 4px;
|
|
983
|
-
padding-right: 12px;
|
|
984
|
-
right: calc(100% - 12px);
|
|
985
|
-
background: #fff;
|
|
986
|
-
background-color: #fff;
|
|
987
|
-
box-shadow: 0px 1px 5px 0px ${f.Tj.shadowColorDark};
|
|
988
|
-
border-radius: 7px;
|
|
989
|
-
|
|
990
|
-
${e=>!e.$active&&u.AH`
|
|
991
|
-
transform: scale(0);
|
|
992
|
-
transform-origin: right;
|
|
993
|
-
opacity: 0;
|
|
994
|
-
pointer-events: none;
|
|
995
|
-
user-select: none;
|
|
996
|
-
`};
|
|
997
|
-
`,m=u.Ay.div`
|
|
998
|
-
z-index: 1;
|
|
999
|
-
bottom: 2px;
|
|
1000
|
-
transition: all 0.2s ease;
|
|
1001
|
-
display: flex;
|
|
1002
|
-
flex-direction: row;
|
|
1003
|
-
|
|
1004
|
-
${e=>e.$active&&e.$fullscreenMode&&"z-index: -1;"}
|
|
1005
|
-
|
|
1006
|
-
${e=>!e.$active&&u.AH`
|
|
1007
|
-
transform: scale(0);
|
|
1008
|
-
transform-origin: right;
|
|
1009
|
-
opacity: 0;
|
|
1010
|
-
pointer-events: none;
|
|
1011
|
-
user-select: none;
|
|
1012
|
-
`};
|
|
1013
|
-
`,g=u.Ay.div`
|
|
1014
|
-
padding: 2px;
|
|
1015
|
-
border-radius: 7px;
|
|
1016
|
-
z-index: 1;
|
|
1017
|
-
display: flex;
|
|
1018
|
-
min-width: max-content;
|
|
1019
|
-
justify-content: center;
|
|
1020
|
-
|
|
1021
|
-
${d.JP};
|
|
1022
|
-
`,b=(0,u.Ay)(p.N_)`
|
|
1023
|
-
color: #757575;
|
|
1024
|
-
margin: 0;
|
|
1025
|
-
cursor: pointer;
|
|
1026
|
-
font-size: var(--_kindlychat-font-size-sm);
|
|
1027
|
-
font-weight: 500;
|
|
1028
|
-
text-decoration: none;
|
|
1029
|
-
|
|
1030
|
-
&:hover {
|
|
1031
|
-
text-decoration: underline;
|
|
1032
|
-
}
|
|
1033
|
-
`,v=u.Ay.div`
|
|
1034
|
-
display: flex;
|
|
1035
|
-
padding: 2px;
|
|
1036
|
-
align-items: center;
|
|
1037
|
-
justify-content: space-between;
|
|
1038
|
-
`,y=(0,u.Ay)(p.$n)`
|
|
1039
|
-
display: flex;
|
|
1040
|
-
position: relative;
|
|
1041
|
-
align-items: center;
|
|
1042
|
-
padding: 12px;
|
|
1043
|
-
transition: all 0.15s ease;
|
|
1044
|
-
&:hover {
|
|
1045
|
-
background: #${f.Tj.grayColor};
|
|
1046
|
-
background-color: #${f.Tj.grayColor};
|
|
1047
|
-
svg path {
|
|
1048
|
-
fill: #000;
|
|
1049
|
-
}
|
|
1050
|
-
|
|
1051
|
-
&:after {
|
|
1052
|
-
border-left-color: #000;
|
|
1053
|
-
}
|
|
1054
|
-
}
|
|
1055
|
-
|
|
1056
|
-
${e=>e.$active&&`\n background: #${f.Tj.grayColor};\n background-color: #${f.Tj.grayColor};\n `}
|
|
1057
|
-
|
|
1058
|
-
${e=>e.$tail&&"\n &:after {\n content: '';\n position: absolute;\n right: -6px;\n top: 50%;\n transform: translateY(-50%);\n width: 0;\n height: 0;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-left: 6px solid #ccc;\n }\n "}
|
|
1059
|
-
`;var x=n(6253),w=n(4703);const E=1e3;function k(e){let{active:t}=e;const[n,u]=(0,r.useState)(!1),{botKey:d,admin:p}=(0,a.d4)(c.$P),{supportedLanguages:f}=(0,l.A)(),{fullscreenMode:k}=(0,a.d4)(c.Od),{inspectorOpen:_}=(0,a.d4)(c.qV),A=(0,a.wA)(),T=(0,r.useCallback)(()=>{A((0,s.uz)())},[A]);return function(){var e,t;const n=(0,a.wA)(),{admin:o}=(0,a.d4)(c.$P),{chatMessages:i}=(0,a.d4)(c.DZ)||[],l=null===(e=i.filter(e=>!(null!=e&&e.from_bot)).slice(-1))||void 0===e||null===(t=e[0])||void 0===t?void 0:t.message,s=(0,x.A)(e=>{n((0,w.y2)(e))},E),u=(0,r.useCallback)(e=>{e.altKey&&"KeyR"===e.code&&l&&s(l)},[l,s]);(0,r.useEffect)(()=>{if(o)return window.addEventListener("keydown",u,!0),()=>window.removeEventListener("keydown",u,!0)},[u,o])}(),o().createElement(h,{$active:t},n&&t&&o().createElement(g,null,f.map(e=>o().createElement(y,{key:e.code,title:`Restart ${e.name_local}`,onClick:()=>{return t=e.code,A((0,s.L4)(t)),void u(!1);var t}},o().createElement(b,null,e.code.toUpperCase())))),o().createElement(m,{$active:t,$hasInspector:p,$fullscreenMode:k},p&&o().createElement(v,null,o().createElement(y,{onClick:T,title:_?"Close chat inspector":"Open chat inspector"},_?o().createElement(i.V$,null):o().createElement(i.bM,null))),o().createElement(v,null,o().createElement(y,{title:"Restart chat",onClick:()=>{f.length>1?u(!n):A((0,s.zX)(d,!0))},$active:n,$tail:f.length>1},o().createElement(i.fN,{width:15,height:15})))))}},7e3:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=(e,t)=>Boolean((e=>{const t=e.replace(/\./g,"\\.").replace(/\*/g,".*").replace(/\//g,"\\/").replace(/\?/g,"\\?");return new RegExp(t,"i")})(t).test(e))},7013:(e,t,n)=>{"use strict";var r=n(1780),o=Function.prototype,a=o.apply,i=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?i.bind(a):function(){return i.apply(a,arguments)})},7050:(e,t,n)=>{"use strict";var r=n(1949),o=n.n(r),a=n(2221);const i=o().arrayOf(o().shape({selected:o().bool.isRequired,_id:o().string.isRequired,score:o().number.isRequired,sample:o().string.isRequired}));o().shape({message:o().string,from_bot:o().bool,image_carousel:o().arrayOf(o().object),exchange_type:o().string,exchange_id:o().string,avatar:o().string,sender:o().oneOf(Object.values(a.bS)),skill_subscription_id:o().number,bot_id:o().number,score:o().number,title:o().string,reply_candidates:i,is_followup:o().bool,handler:o().oneOf(Object.values(a.Gi)),new_context:o().objectOf(o().string)})},7094:(e,t,n)=>{"use strict";n.d(t,{KN:()=>o,ZF:()=>a,cJ:()=>r,k1:()=>i});const r={TEXT:"TEXT",CHECKBOX:"CHECKBOX",RANGE:"RANGE",EMAIL:"EMAIL",NUMBER:"NUMBER",SELECT:"SELECT",RADIO:"RADIO",FILE:"FILE",TEXTAREA:"TEXTAREA"},o={ACTIVE:"ACTIVE",SUBMITTED:"SUBMITTED",CANCELED:"CANCELED",UNANSWERED:"UNANSWERED",ERRORED:"ERRORED"},a={PATTERN:"pattern",REQUIRED:"required",MAX_LENGTH:"max_length",MIN_LENGTH:"min_length",min:"min",max:"max"},i={CUSTOM:"custom",BROWSER:"browser"}},7161:(e,t)=>{"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);t.f=o?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},7173:(e,t,n)=>{"use strict";n.d(t,{M_:()=>r,MU:()=>o,nW:()=>g,YU:()=>m,fg:()=>j,FZ:()=>C.FZ,YR:()=>C.YR,K_:()=>y,A8:()=>E,wk:()=>k,Y6:()=>F,Q4:()=>C.Q4,Tc:()=>A,uS:()=>C.uS,SO:()=>C.SO,_Y:()=>$._Y,zT:()=>$.zT,wX:()=>ee,MO:()=>J,nG:()=>N,_N:()=>$._N,Kd:()=>te,oZ:()=>M,u2:()=>h,X2:()=>Y,a_:()=>ne,wM:()=>C.wM,dp:()=>w,II:()=>l,MM:()=>i,nz:()=>a,t1:()=>C.t1,qQ:()=>v,tS:()=>z,E7:()=>S,Os:()=>B,tq:()=>H,ny:()=>$.ny,kA:()=>C.kA,$o:()=>O,jE:()=>R,hn:()=>C.hn,mz:()=>$.mz,kP:()=>$.kP,VZ:()=>$.VZ,MN:()=>L,nh:()=>u,a1:()=>oe,oE:()=>Q,TF:()=>C.TF,XM:()=>C.XM,d$:()=>C.d$,Xu:()=>C.Xu,tr:()=>C.MO,QA:()=>U,uA:()=>C.uA,d7:()=>C.d7,ye:()=>P,M2:()=>C.M2,kU:()=>V,se:()=>G,mw:()=>_,nm:()=>C.nm,HW:()=>C.HW,Zb:()=>f,Eg:()=>C.Eg,un:()=>Z,vP:()=>I,wv:()=>X,nX:()=>C.nX,l:()=>re,Wh:()=>p,CB:()=>C.CB,Rk:()=>x,vK:()=>D,IM:()=>W,zZ:()=>b,wP:()=>q,pz:()=>K,AQ:()=>d,Q0:()=>T,c6:()=>s,we:()=>c});const r="AGENT_STARTED_TYPING",o="AGENT_STOPPED_TYPING",a="HANDOVER_REQUESTED",i="HANDOVER_CANCELLED",l="HANDOVER",s="USER_STARTED_TYPING",c="USER_STOPPED_TYPING",u="RESET_HAS_HAD_HANDOVER",d="UPDATE_HANDOVER_QUEUE",p="SHOW_TAB_NOTIFICATION",f="SHOW_BUBBLE_NOTIFICATION",h="DISMISS_NOTIFICATIONS",m="ANNOUNCEMENT_SHOW",g="ANNOUNCEMENT_HIDE",b="UNAUTHENTICATED",v="IDENTIFIED",y="AUTHENTICATED",x="START_REFRESHING",w="END_REFRESHING",E="BOT_STARTED_TYPING",k="BOT_STOPPED_TYPING",_="SET_SPLIT_TEST_LABEL",A="CLEAR_SPLIT_TEST_LABEL",T="UPDATE_SPLIT_LABEL_TIMEOUT",S="MIMIR_STARTED_SEARCHING";var C=n(3313),$=n(7523);const O="ENVIRONMENT_OVERRIDE",I="SHOW_IN_CHAT_NOTIFICATION",L="REPLACE_IN_CHAT_NOTIFICATION",M="DISMISS_IN_CHAT_NOTIFICATION",N="DELETE_IN_CHAT_NOTIFICATION",R="PATTERN_CONTEXT_MATCH",P="SET_INSPECTED_CHAT_MESSAGE",D="TOGGLE_INSPECTOR",j="ANONYMIZED_MESSAGE",F="BUTTON_CLICK",z="MESSAGE_ATTACHMENTS_UPDATED",B="NEW_ATTACHMENTS",H="NEW_MESSAGE",U="SET_FORM",V="SET_LAST_MESSAGE_SEEN",G="SET_MESSAGE_SENT_TIME",W="TRIGGER_DIALOGUE",q="UPDATE_ATTACHMENT",K="UPDATE_CHAT_MESSAGE",Y="DISMISS_NUDGE",X="SHOW_NUDGE",Z="SHOW_CUSTOM_NUDGE",J="CTA_CLICK",Q="SESSION_COMPLETION",ee="COUNT_NUDGE",te="DISCOUNT_NUDGE",ne="DISMISS_PUSH_MESSAGE",re="SHOW_PUSH_MESSAGE",oe="RESET_PUSH_MESSAGES"},7235:(e,t,n)=>{"use strict";var r=n(262),o=String,a=TypeError;e.exports=function(e){if(r(e))return e;throw new a(o(e)+" is not an object")}},7243:(e,t,n)=>{"use strict";n.d(t,{Rm:()=>w,TP:()=>E,zX:()=>m,Cy:()=>y,et:()=>v,DT:()=>x,m8:()=>h,R7:()=>f});var r=n(9749),o=n.n(r),a=n(2221),i=n(2366),l=n(4851),s=n(9292),c=n(8172),u=n(9313),d=n(2633),p=n(7173);const f=e=>async(t,n)=>{const{connection:{token:r},environment:{PAT_HOST:o}}=n();return r?fetch(`${o}/chatbubble/${a.Ak}/user_left/`,{method:"PATCH",...(0,l.A)({token:r,botKey:e})}):null},h=()=>async(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:r},auth:{fullName:o}}=t();return n?fetch(`${r}/chatbubble/${a.Ak}/handover_cancel/`,{method:"POST",body:JSON.stringify({source:o}),...(0,l.A)({token:n},{extra:{"Content-Type":"application/json"}})}):null},m=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return async(n,r)=>{const{agent:{takenOver:o,requestedHandoverAt:i}}=r();i?n({type:p.MM}):o&&n({type:p.II,data:{taken_over:!1}}),n({type:p.a1}),n(f(e)),n({type:p.wk});try{(0,u.Zf)(),t||n({type:p.uS})}catch(e){console.warn(e)}finally{n((0,d.F)(a.Jm.LANGUAGE_SWITCH)),n({type:p.CB,botKey:e,keepOpen:t}),t||setTimeout(()=>n({type:p.d$,chatHasStarted:!1}),300)}}},g=Object.freeze({MAX:3,TIMEOUT_MS:2e3,TIMEOUT_MULTIPLIER:2,RESPONSE_STATUSES:[401,403]});let b=0;const v=function(e,t){let{onError:n,restartOnError:r}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return async a=>{if(!e)return console.error("Tried to call transport without supplying url"),null;if(!t.method)return console.error("Tried to call transport without supplying method"),null;t.headers={"kindly-chat-version":"2.76.4",[i.B]:(0,i.U)(),...t.headers||{}};try{const n=await fetch(e,{...t,...t.body&&{body:t.body instanceof ArrayBuffer?t.body:JSON.stringify(t.body)},headers:{"Content-Type":"application/json",...t.headers&&{...t.headers}}});if(!(t.body instanceof ArrayBuffer)){const e=await n.json();return{status:n.status,statusText:n.statusText,ok:n.ok,data:e}}return n}catch(e){return n?n(e,t):r?a(((e,t)=>function(n){var r,a,i,l;if(!e.response||!o()(r=g.RESPONSE_STATUSES).call(r,null===(a=e.response)||void 0===a?void 0:a.status))return console.error(e),null;if(b+=1,b>g.MAX)return console.error(`${t.url} returned ${null===(l=e.response)||void 0===l?void 0:l.status}, max chats restarts exceeded`),null;console.warn(`${t.url} returned ${null===(i=e.response)||void 0===i?void 0:i.status}, starting new chat`);const s=g.TIMEOUT_MS*g.TIMEOUT_MULTIPLIER**(b-1);return setTimeout(()=>n((e,t)=>{const{botKey:n}=t().chatbubble;e(m(n,!0))}),s),null})(e,t)):null}}},y=e=>{const t=`private-chatbubble-${e}`;(0,u.B1)(t,"mimir-started-searching",p.E7),(0,u.B1)(t,"agent_started_typing",p.M_),(0,u.B1)(t,"agent_stopped_typing",p.MU),(0,u.B1)(t,"message-attachments-updated",p.tS),(0,u.B1)(t,"message",p.tq),(0,u.B1)(t,"bot_started_typing",p.A8),(0,u.B1)(t,"bot_stopped_typing",p.wk),(0,u.B1)(t,"new-attachments",p.Os),(0,u.B1)(t,"pattern-context-match",p.jE),(0,u.B1)(t,"takeover",p.II)},x=e=>{const t=`private-chatbubble-${e}`;(0,u.al)(t,"mimir-started-searching",p.E7),(0,u.al)(t,"agent_started_typing",p.M_),(0,u.al)(t,"agent_stopped_typing",p.MU),(0,u.al)(t,"message-attachments-updated",p.tS),(0,u.al)(t,"message",p.tq),(0,u.al)(t,"bot_started_typing",p.A8),(0,u.al)(t,"bot_stopped_typing",p.wk),(0,u.al)(t,"new-attachments",p.Os),(0,u.al)(t,"pattern-context-match",p.jE),(0,u.al)(t,"takeover",p.II)},w=e=>{let{message:t,error:n,level:r="info",extra:o={}}=e;return(e,i)=>{var u;const d=i(),{connection:{token:p},environment:{PAT_HOST:f},chatbubble:{chatId:h}}=d,m={tags:{chat_id:h,bot_id:null===(u=d.bot)||void 0===u?void 0:u.id}},g=(e=>{var t,n;let{level:r="info",error:o,message:a,reduxState:i,extra:l}=e;a||null!=o&&o.message||(console.error("Attempted to log without message"),a="No error message provided");const u=(0,c.A)(i||{},s.W$),d={version:"2.76.4",release:"2.76.4",userAgent:navigator.userAgent,state:i?JSON.stringify(u):void 0,...l},p={message:null!==(t=a)&&void 0!==t?t:null==o?void 0:o.message,name:null==o?void 0:o.name,stack:null==o?void 0:o.stack,code:null==o?void 0:o.code,signal:null==o?void 0:o.signal,filename:null==o?void 0:o.filename};return{message:null!==(n=a)&&void 0!==n?n:null==o?void 0:o.message,level:r,extra:d,error:p}})({level:r,error:n,message:t,reduxState:d,extra:{...(b=o,JSON.parse(JSON.stringify(b,(e,t)=>void 0===t?"undefined 🤷♂️":t))),...m}});var b;e(v(`${f}/chatbubble/${a.Ak}/log`,{method:"POST",body:g,...(0,l.A)({token:p},{withCurrentUrl:!0})}))}},E=e=>t=>{t({type:p.se,messageSentTime:e})}},7251:(e,t,n)=>{"use strict";function r(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}n.d(t,{U1:()=>de,zD:()=>ye,Z0:()=>Ae});var o=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),a=()=>Math.random().toString(36).substring(7).split("").join("."),i={INIT:`@@redux/INIT${a()}`,REPLACE:`@@redux/REPLACE${a()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${a()}`};function l(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function s(e,t,n){if("function"!=typeof e)throw new Error(r(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(r(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(r(1));return n(s)(e,t)}let a=e,c=t,u=new Map,d=u,p=0,f=!1;function h(){d===u&&(d=new Map,u.forEach((e,t)=>{d.set(t,e)}))}function m(){if(f)throw new Error(r(3));return c}function g(e){if("function"!=typeof e)throw new Error(r(4));if(f)throw new Error(r(5));let t=!0;h();const n=p++;return d.set(n,e),function(){if(t){if(f)throw new Error(r(6));t=!1,h(),d.delete(n),u=null}}}function b(e){if(!l(e))throw new Error(r(7));if(void 0===e.type)throw new Error(r(8));if("string"!=typeof e.type)throw new Error(r(17));if(f)throw new Error(r(9));try{f=!0,c=a(c,e)}finally{f=!1}return(u=d).forEach(e=>{e()}),e}return b({type:i.INIT}),{dispatch:b,subscribe:g,getState:m,replaceReducer:function(e){if("function"!=typeof e)throw new Error(r(10));a=e,b({type:i.REPLACE})},[o]:function(){const e=g;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(r(11));function n(){const e=t;e.next&&e.next(m())}return n(),{unsubscribe:e(n)}},[o](){return this}}}}}function c(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function u(e){return({dispatch:t,getState:n})=>r=>o=>"function"==typeof o?o(t,n,e):r(o)}var d=u(),p=u,f=Symbol.for("immer-nothing"),h=Symbol.for("immer-draftable"),m=Symbol.for("immer-state");function g(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var b=Object.getPrototypeOf;function v(e){return!!e&&!!e[m]}function y(e){return!!e&&(w(e)||Array.isArray(e)||!!e[h]||!!e.constructor?.[h]||T(e)||S(e))}var x=Object.prototype.constructor.toString();function w(e){if(!e||"object"!=typeof e)return!1;const t=b(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===x}function E(e,t){0===k(e)?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function k(e){const t=e[m];return t?t.type_:Array.isArray(e)?1:T(e)?2:S(e)?3:0}function _(e,t){return 2===k(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function A(e,t,n){const r=k(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function T(e){return e instanceof Map}function S(e){return e instanceof Set}function C(e){return e.copy_||e.base_}function $(e,t){if(T(e))return new Map(e);if(S(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=w(e);if(!0===t||"class_only"===t&&!n){const t=Object.getOwnPropertyDescriptors(e);delete t[m];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const o=n[r],a=t[o];!1===a.writable&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[o]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[o]})}return Object.create(b(e),t)}{const t=b(e);if(null!==t&&n)return{...e};const r=Object.create(t);return Object.assign(r,e)}}function O(e,t=!1){return L(e)||v(e)||!y(e)||(k(e)>1&&(e.set=e.add=e.clear=e.delete=I),Object.freeze(e),t&&Object.entries(e).forEach(([e,t])=>O(t,!0))),e}function I(){g(2)}function L(e){return Object.isFrozen(e)}var M,N={};function R(e){const t=N[e];return t||g(0),t}function P(){return M}function D(e,t){t&&(R("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function j(e){F(e),e.drafts_.forEach(B),e.drafts_=null}function F(e){e===M&&(M=e.parent_)}function z(e){return M={drafts_:[],parent_:M,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function B(e){const t=e[m];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function H(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[m].modified_&&(j(t),g(4)),y(e)&&(e=U(t,e),t.parent_||G(t,e)),t.patches_&&R("Patches").generateReplacementPatches_(n[m].base_,e,t.patches_,t.inversePatches_)):e=U(t,n,[]),j(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==f?e:void 0}function U(e,t,n){if(L(t))return t;const r=t[m];if(!r)return E(t,(o,a)=>V(e,r,t,o,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return G(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let o=t,a=!1;3===r.type_&&(o=new Set(t),t.clear(),a=!0),E(o,(o,i)=>V(e,r,t,o,i,n,a)),G(e,t,!1),n&&e.patches_&&R("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function V(e,t,n,r,o,a,i){if(v(o)){const i=U(e,o,a&&t&&3!==t.type_&&!_(t.assigned_,r)?a.concat(r):void 0);if(A(n,r,i),!v(i))return;e.canAutoFreeze_=!1}else i&&n.add(o);if(y(o)&&!L(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;U(e,o),t&&t.scope_.parent_||"symbol"==typeof r||!Object.prototype.propertyIsEnumerable.call(n,r)||G(e,o)}}function G(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&O(t,n)}var W={get(e,t){if(t===m)return e;const n=C(e);if(!_(n,t))return function(e,t,n){const r=Y(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}(e,n,t);const r=n[t];return e.finalized_||!y(r)?r:r===K(e.base_,t)?(Z(e),e.copy_[t]=J(r,e)):r},has:(e,t)=>t in C(e),ownKeys:e=>Reflect.ownKeys(C(e)),set(e,t,n){const r=Y(C(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=K(C(e),t),i=r?.[m];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(((o=n)===(a=r)?0!==o||1/o==1/a:o!=o&&a!=a)&&(void 0!==n||_(e.base_,t)))return!0;Z(e),X(e)}var o,a;return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==K(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,Z(e),X(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=C(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty(){g(11)},getPrototypeOf:e=>b(e.base_),setPrototypeOf(){g(12)}},q={};function K(e,t){const n=e[m];return(n?C(n):e)[t]}function Y(e,t){if(!(t in e))return;let n=b(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=b(n)}}function X(e){e.modified_||(e.modified_=!0,e.parent_&&X(e.parent_))}function Z(e){e.copy_||(e.copy_=$(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function J(e,t){const n=T(e)?R("MapSet").proxyMap_(e,t):S(e)?R("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:P(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=W;n&&(o=[r],a=q);const{revoke:i,proxy:l}=Proxy.revocable(o,a);return r.draft_=l,r.revoke_=i,l}(e,t);return(t?t.scope_:P()).drafts_.push(n),n}function Q(e){if(!y(e)||L(e))return e;const t=e[m];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=$(e,t.scope_.immer_.useStrictShallowCopy_)}else n=$(e,!0);return E(n,(e,t)=>{A(n,e,Q(t))}),t&&(t.finalized_=!1),n}E(W,(e,t)=>{q[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),q.deleteProperty=function(e,t){return q.set.call(this,e,t,void 0)},q.set=function(e,t,n){return W.set.call(this,e[0],t,n,e[0])};var ee=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const r=this;return function(e=n,...o){return r.produce(e,e=>t.call(this,e,...o))}}let r;if("function"!=typeof t&&g(6),void 0!==n&&"function"!=typeof n&&g(7),y(e)){const o=z(this),a=J(e,void 0);let i=!0;try{r=t(a),i=!1}finally{i?j(o):F(o)}return D(o,n),H(r,o)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===f&&(r=void 0),this.autoFreeze_&&O(r,!0),n){const t=[],o=[];R("Patches").generateReplacementPatches_(e,r,t,o),n(t,o)}return r}g(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){var t;y(e)||g(8),v(e)&&(v(t=e)||g(10),e=Q(t));const n=z(this),r=J(e,void 0);return r[m].isManual_=!0,F(n),r}finishDraft(e,t){const n=e&&e[m];n&&n.isManual_||g(9);const{scope_:r}=n;return D(r,t),H(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=R("Patches").applyPatches_;return v(e)?r(e,t):this.produce(e,e=>r(e,t))}},te=ee.produce;ee.produceWithPatches.bind(ee),ee.setAutoFreeze.bind(ee),ee.setUseStrictShallowCopy.bind(ee),ee.applyPatches.bind(ee),ee.createDraft.bind(ee),ee.finishDraft.bind(ee),n(9907);var ne="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?c:c.apply(null,arguments)},re=("undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__,e=>e&&"function"==typeof e.match);function oe(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error(Ce(0));return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>function(e){return l(e)&&"type"in e&&"string"==typeof e.type}(t)&&t.type===e,n}var ae=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function ie(e){return y(e)?te(e,()=>{}):e}function le(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}var se=()=>function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:o=!0}=e??{};let a=new ae;return t&&("boolean"==typeof t?a.push(d):a.push(p(t.extraArgument))),a},ce=e=>t=>{setTimeout(t,e)},ue=e=>function(t){const{autoBatch:n=!0}=t??{};let r=new ae(e);return n&&r.push(((e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,a=!1,i=!1;const l=new Set,s="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:ce(10):"callback"===e.type?e.queueNotification:ce(e.timeout),c=()=>{i=!1,a&&(a=!1,l.forEach(e=>e()))};return Object.assign({},r,{subscribe(e){const t=r.subscribe(()=>o&&e());return l.add(e),()=>{t(),l.delete(e)}},dispatch(e){try{return o=!e?.meta?.RTK_autoBatch,a=!o,a&&(i||(i=!0,s(c))),r.dispatch(e)}finally{o=!0}}})})("object"==typeof n?n:void 0)),r};function de(e){const t=se(),{reducer:n,middleware:o,devTools:a=!0,duplicateMiddlewareCheck:u=!0,preloadedState:d,enhancers:p}=e||{};let f,h;if("function"==typeof n)f=n;else{if(!l(n))throw new Error(Ce(1));f=function(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const o=t[r];"function"==typeof e[o]&&(n[o]=e[o])}const o=Object.keys(n);let a;try{!function(e){Object.keys(e).forEach(t=>{const n=e[t];if(void 0===n(void 0,{type:i.INIT}))throw new Error(r(12));if(void 0===n(void 0,{type:i.PROBE_UNKNOWN_ACTION()}))throw new Error(r(13))})}(n)}catch(e){a=e}return function(e={},t){if(a)throw a;let i=!1;const l={};for(let a=0;a<o.length;a++){const s=o[a],c=n[s],u=e[s],d=c(u,t);if(void 0===d)throw t&&t.type,new Error(r(14));l[s]=d,i=i||d!==u}return i=i||o.length!==Object.keys(e).length,i?l:e}}(n)}h="function"==typeof o?o(t):t();let m=c;a&&(m=ne({trace:!1,..."object"==typeof a&&a}));const g=function(...e){return t=>(n,o)=>{const a=t(n,o);let i=()=>{throw new Error(r(15))};const l={getState:a.getState,dispatch:(e,...t)=>i(e,...t)},s=e.map(e=>e(l));return i=c(...s)(a.dispatch),{...a,dispatch:i}}}(...h),b=ue(g);return s(f,d,m(..."function"==typeof p?p(b):b()))}function pe(e){const t={},n=[];let r;const o={addCase(e,n){const r="string"==typeof e?e:e.type;if(!r)throw new Error(Ce(28));if(r in t)throw new Error(Ce(29));return t[r]=n,o},addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),o),addDefaultCase:e=>(r=e,o)};return e(o),[t,n,r]}function fe(...e){return t=>e.some(e=>((e,t)=>re(e)?e.match(t):e(t))(e,t))}var he=["name","message","stack","code"],me=class{constructor(e,t){this.payload=e,this.meta=t}_type},ge=class{constructor(e,t){this.payload=e,this.meta=t}_type},be=e=>{if("object"==typeof e&&null!==e){const t={};for(const n of he)"string"==typeof e[n]&&(t[n]=e[n]);return t}return{message:String(e)}},ve="External signal was aborted",ye=(()=>{function e(e,t,n){const r=oe(e+"/fulfilled",(e,t,n,r)=>({payload:e,meta:{...r||{},arg:n,requestId:t,requestStatus:"fulfilled"}})),o=oe(e+"/pending",(e,t,n)=>({payload:void 0,meta:{...n||{},arg:t,requestId:e,requestStatus:"pending"}})),a=oe(e+"/rejected",(e,t,r,o,a)=>({payload:o,error:(n&&n.serializeError||be)(e||"Rejected"),meta:{...a||{},arg:r,requestId:t,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===e?.name,condition:"ConditionError"===e?.name}}));return Object.assign(function(e,{signal:i}={}){return(l,s,c)=>{const u=n?.idGenerator?n.idGenerator(e):((e=21)=>{let t="",n=e;for(;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t})(),d=new AbortController;let p,f;function h(e){f=e,d.abort()}i&&(i.aborted?h(ve):i.addEventListener("abort",()=>h(ve),{once:!0}));const m=async function(){let i;try{let a=n?.condition?.(e,{getState:s,extra:c});if(null!==(m=a)&&"object"==typeof m&&"function"==typeof m.then&&(a=await a),!1===a||d.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const g=new Promise((e,t)=>{p=()=>{t({name:"AbortError",message:f||"Aborted"})},d.signal.addEventListener("abort",p)});l(o(u,e,n?.getPendingMeta?.({requestId:u,arg:e},{getState:s,extra:c}))),i=await Promise.race([g,Promise.resolve(t(e,{dispatch:l,getState:s,extra:c,requestId:u,signal:d.signal,abort:h,rejectWithValue:(e,t)=>new me(e,t),fulfillWithValue:(e,t)=>new ge(e,t)})).then(t=>{if(t instanceof me)throw t;return t instanceof ge?r(t.payload,u,e,t.meta):r(t,u,e)})])}catch(t){i=t instanceof me?a(null,u,e,t.payload,t.meta):a(t,u,e)}finally{p&&d.signal.removeEventListener("abort",p)}var m;return n&&!n.dispatchConditionRejection&&a.match(i)&&i.meta.condition||l(i),i}();return Object.assign(m,{abort:h,requestId:u,arg:e,unwrap:()=>m.then(xe)})}},{pending:o,rejected:a,fulfilled:r,settled:fe(a,r),typePrefix:e})}return e.withTypes=()=>e,e})();function xe(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var we=Symbol.for("rtk-slice-createasyncthunk");function Ee(e,t){return`${e}/${t}`}function ke({creators:e}={}){const t=e?.asyncThunk?.[we];return function(e){const{name:n,reducerPath:r=n}=e;if(!n)throw new Error(Ce(11));const o=("function"==typeof e.reducers?e.reducers(function(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}()):e.reducers)||{},a=Object.keys(o),i={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(e,t){const n="string"==typeof e?e:e.type;if(!n)throw new Error(Ce(12));if(n in i.sliceCaseReducersByType)throw new Error(Ce(13));return i.sliceCaseReducersByType[n]=t,l},addMatcher:(e,t)=>(i.sliceMatchers.push({matcher:e,reducer:t}),l),exposeAction:(e,t)=>(i.actionCreators[e]=t,l),exposeCaseReducer:(e,t)=>(i.sliceCaseReducersByName[e]=t,l)};function s(){const[t={},n=[],r]="function"==typeof e.extraReducers?pe(e.extraReducers):[e.extraReducers],o={...t,...i.sliceCaseReducersByType};return function(e){let t,[a,l,s]=pe(e=>{for(let t in o)e.addCase(t,o[t]);for(let t of i.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)});if("function"==typeof e)t=()=>ie(e());else{const n=ie(e);t=()=>n}function c(e=t(),n){let r=[a[n.type],...l.filter(({matcher:e})=>e(n)).map(({reducer:e})=>e)];return 0===r.filter(e=>!!e).length&&(r=[s]),r.reduce((e,t)=>{if(t){if(v(e)){const r=t(e,n);return void 0===r?e:r}if(y(e))return te(e,e=>t(e,n));{const r=t(e,n);if(void 0===r){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}}return e},e)}return c.getInitialState=t,c}(e.initialState)}a.forEach(r=>{const a=o[r],i={reducerName:r,type:Ee(n,r),createNotation:"function"==typeof e.reducers};!function(e){return"asyncThunk"===e._reducerDefinitionType}(a)?function({type:e,reducerName:t,createNotation:n},r,o){let a,i;if("reducer"in r){if(n&&!function(e){return"reducerWithPrepare"===e._reducerDefinitionType}(r))throw new Error(Ce(17));a=r.reducer,i=r.prepare}else a=r;o.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?oe(e,i):oe(e))}(i,a,l):function({type:e,reducerName:t},n,r,o){if(!o)throw new Error(Ce(18));const{payloadCreator:a,fulfilled:i,pending:l,rejected:s,settled:c,options:u}=n,d=o(e,a,u);r.exposeAction(t,d),i&&r.addCase(d.fulfilled,i),l&&r.addCase(d.pending,l),s&&r.addCase(d.rejected,s),c&&r.addMatcher(d.settled,c),r.exposeCaseReducer(t,{fulfilled:i||Te,pending:l||Te,rejected:s||Te,settled:c||Te})}(i,a,l,t)});const c=e=>e,u=new Map,d=new WeakMap;let p;function f(e,t){return p||(p=s()),p(e,t)}function h(){return p||(p=s()),p.getInitialState()}function m(t,n=!1){function r(e){let o=e[t];return void 0===o&&n&&(o=le(d,r,h)),o}function o(t=c){const r=le(u,n,()=>new WeakMap);return le(r,t,()=>{const r={};for(const[o,a]of Object.entries(e.selectors??{}))r[o]=_e(a,t,()=>le(d,t,h),n);return r})}return{reducerPath:t,getSelectors:o,get selectors(){return o(r)},selectSlice:r}}const g={name:n,reducer:f,actions:i.actionCreators,caseReducers:i.sliceCaseReducersByName,getInitialState:h,...m(r),injectInto(e,{reducerPath:t,...n}={}){const o=t??r;return e.inject({reducerPath:o,reducer:f},n),{...g,...m(o,!0)}}};return g}}function _e(e,t,n,r){function o(o,...a){let i=t(o);return void 0===i&&r&&(i=n()),e(i,...a)}return o.unwrapped=e,o}var Ae=ke();function Te(){}var{assign:Se}=Object;function Ce(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}Symbol.for("rtk-state-proxy-original")},7339:(e,t,n)=>{"use strict";n.d(t,{Gb:()=>r.A,cS:()=>E.A,ZH:()=>Q,pd:()=>x,l6:()=>S,Ap:()=>w.A,TM:()=>ee.A});var r=n(748),o=(n(1949),n(9155)),a=n.n(o),i=n(824),l=n(3864),s=n(492),c=n(8905),u=n(6538),d=n(107);const p=l.Ay.div`
|
|
870
|
+
`},3855:(e,t,n)=>{"use strict";var r=n(9098),o=n(6100),a=n(5947),i=n(5426),l=n(1139),s=n(4240),c=o("".indexOf);r({target:"String",proto:!0,forced:!s("includes")},{includes:function(e){return!!~c(l(i(this)),l(a(e)),arguments.length>1?arguments[1]:void 0)}})},3864:(e,t,n)=>{"use strict";n.d(t,{Dx:()=>jt,NP:()=>zt,DU:()=>Xt,AH:()=>Gt,Ay:()=>Kt,i7:()=>Zt,DP:()=>Ft});var r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};function o(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var a=n(9155),i=n.n(a),l=n(2146),s=n.n(l),c="-ms-",u="-moz-",d="-webkit-",p="comm",f="rule",h="decl",m="@keyframes",g=Math.abs,b=String.fromCharCode,v=Object.assign;function y(e){return e.trim()}function x(e,t){return(e=t.exec(e))?e[0]:e}function w(e,t,n){return e.replace(t,n)}function E(e,t,n){return e.indexOf(t,n)}function k(e,t){return 0|e.charCodeAt(t)}function _(e,t,n){return e.slice(t,n)}function A(e){return e.length}function T(e){return e.length}function S(e,t){return t.push(e),e}function $(e,t){return e.filter(function(e){return!x(e,t)})}var C=1,O=1,I=0,L=0,M=0,N="";function R(e,t,n,r,o,a,i,l){return{value:e,root:t,parent:n,type:r,props:o,children:a,line:C,column:O,length:i,return:"",siblings:l}}function P(e,t){return v(R("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function D(e){for(;e.root;)e=P(e.root,{children:[e]});S(e,e.siblings)}function j(){return M=L>0?k(N,--L):0,O--,10===M&&(O=1,C--),M}function F(){return M=L<I?k(N,L++):0,O++,10===M&&(O=1,C++),M}function z(){return k(N,L)}function B(){return L}function H(e,t){return _(N,e,t)}function U(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function V(e){return y(H(L-1,q(91===e?e+2:40===e?e+1:e)))}function G(e){for(;(M=z())&&M<33;)F();return U(e)>2||U(M)>3?"":" "}function W(e,t){for(;--t&&F()&&!(M<48||M>102||M>57&&M<65||M>70&&M<97););return H(e,B()+(t<6&&32==z()&&32==F()))}function q(e){for(;F();)switch(M){case e:return L;case 34:case 39:34!==e&&39!==e&&q(M);break;case 40:41===e&&q(e);break;case 92:F()}return L}function K(e,t){for(;F()&&e+M!==57&&(e+M!==84||47!==z()););return"/*"+H(t,L-1)+"*"+b(47===e?e:F())}function Y(e){for(;!U(z());)F();return H(e,L)}function X(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function Z(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case h:return e.return=e.return||e.value;case p:return"";case m:return e.return=e.value+"{"+X(e.children,r)+"}";case f:if(!A(e.value=e.props.join(",")))return""}return A(n=X(e.children,r))?e.return=e.value+"{"+n+"}":""}function J(e,t,n){switch(function(e,t){return 45^k(e,0)?(((t<<2^k(e,0))<<2^k(e,1))<<2^k(e,2))<<2^k(e,3):0}(e,t)){case 5103:return d+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return d+e+e;case 4789:return u+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return d+e+u+e+c+e+e;case 5936:switch(k(e,t+11)){case 114:return d+e+c+w(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return d+e+c+w(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return d+e+c+w(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return d+e+c+e+e;case 6165:return d+e+c+"flex-"+e+e;case 5187:return d+e+w(e,/(\w+).+(:[^]+)/,d+"box-$1$2"+c+"flex-$1$2")+e;case 5443:return d+e+c+"flex-item-"+w(e,/flex-|-self/g,"")+(x(e,/flex-|baseline/)?"":c+"grid-row-"+w(e,/flex-|-self/g,""))+e;case 4675:return d+e+c+"flex-line-pack"+w(e,/align-content|flex-|-self/g,"")+e;case 5548:return d+e+c+w(e,"shrink","negative")+e;case 5292:return d+e+c+w(e,"basis","preferred-size")+e;case 6060:return d+"box-"+w(e,"-grow","")+d+e+c+w(e,"grow","positive")+e;case 4554:return d+w(e,/([^-])(transform)/g,"$1"+d+"$2")+e;case 6187:return w(w(w(e,/(zoom-|grab)/,d+"$1"),/(image-set)/,d+"$1"),e,"")+e;case 5495:case 3959:return w(e,/(image-set\([^]*)/,d+"$1$`$1");case 4968:return w(w(e,/(.+:)(flex-)?(.*)/,d+"box-pack:$3"+c+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+d+e+e;case 4200:if(!x(e,/flex-|baseline/))return c+"grid-column-align"+_(e,t)+e;break;case 2592:case 3360:return c+w(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(e,n){return t=n,x(e.props,/grid-\w+-end/)})?~E(e+(n=n[t].value),"span",0)?e:c+w(e,"-start","")+e+c+"grid-row-span:"+(~E(n,"span",0)?x(n,/\d+/):+x(n,/\d+/)-+x(e,/\d+/))+";":c+w(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(e){return x(e.props,/grid-\w+-start/)})?e:c+w(w(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return w(e,/(.+)-inline(.+)/,d+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(A(e)-1-t>6)switch(k(e,t+1)){case 109:if(45!==k(e,t+4))break;case 102:return w(e,/(.+:)(.+)-([^]+)/,"$1"+d+"$2-$3$1"+u+(108==k(e,t+3)?"$3":"$2-$3"))+e;case 115:return~E(e,"stretch",0)?J(w(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return w(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,n,r,o,a,i,l){return c+n+":"+r+l+(o?c+n+"-span:"+(a?i:+i-+r)+l:"")+e});case 4949:if(121===k(e,t+6))return w(e,":",":"+d)+e;break;case 6444:switch(k(e,45===k(e,14)?18:11)){case 120:return w(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+d+(45===k(e,14)?"inline-":"")+"box$3$1"+d+"$2$3$1"+c+"$2box$3")+e;case 100:return w(e,":",":"+c)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return w(e,"scroll-","scroll-snap-")+e}return e}function Q(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case h:return void(e.return=J(e.value,e.length,n));case m:return X([P(e,{value:w(e.value,"@","@"+d)})],r);case f:if(e.length)return function(e,t){return e.map(t).join("")}(n=e.props,function(t){switch(x(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":D(P(e,{props:[w(t,/:(read-\w+)/,":-moz-$1")]})),D(P(e,{props:[t]})),v(e,{props:$(n,r)});break;case"::placeholder":D(P(e,{props:[w(t,/:(plac\w+)/,":"+d+"input-$1")]})),D(P(e,{props:[w(t,/:(plac\w+)/,":-moz-$1")]})),D(P(e,{props:[w(t,/:(plac\w+)/,c+"input-$1")]})),D(P(e,{props:[t]})),v(e,{props:$(n,r)})}return""})}}function ee(e){return function(e){return N="",e}(te("",null,null,null,[""],e=function(e){return C=O=1,I=A(N=e),L=0,[]}(e),0,[0],e))}function te(e,t,n,r,o,a,i,l,s){for(var c=0,u=0,d=i,p=0,f=0,h=0,m=1,v=1,y=1,x=0,_="",T=o,$=a,C=r,O=_;v;)switch(h=x,x=F()){case 40:if(108!=h&&58==k(O,d-1)){-1!=E(O+=w(V(x),"&","&\f"),"&\f",g(c?l[c-1]:0))&&(y=-1);break}case 34:case 39:case 91:O+=V(x);break;case 9:case 10:case 13:case 32:O+=G(h);break;case 92:O+=W(B()-1,7);continue;case 47:switch(z()){case 42:case 47:S(re(K(F(),B()),t,n,s),s);break;default:O+="/"}break;case 123*m:l[c++]=A(O)*y;case 125*m:case 59:case 0:switch(x){case 0:case 125:v=0;case 59+u:-1==y&&(O=w(O,/\f/g,"")),f>0&&A(O)-d&&S(f>32?oe(O+";",r,n,d-1,s):oe(w(O," ","")+";",r,n,d-2,s),s);break;case 59:O+=";";default:if(S(C=ne(O,t,n,c,u,o,l,_,T=[],$=[],d,a),a),123===x)if(0===u)te(O,t,C,C,T,a,d,l,$);else switch(99===p&&110===k(O,3)?100:p){case 100:case 108:case 109:case 115:te(e,C,C,r&&S(ne(e,C,C,0,0,o,l,_,o,T=[],d,$),$),o,$,d,l,r?T:$);break;default:te(O,C,C,C,[""],$,0,l,$)}}c=u=f=0,m=y=1,_=O="",d=i;break;case 58:d=1+A(O),f=h;default:if(m<1)if(123==x)--m;else if(125==x&&0==m++&&125==j())continue;switch(O+=b(x),x*m){case 38:y=u>0?1:(O+="\f",-1);break;case 44:l[c++]=(A(O)-1)*y,y=1;break;case 64:45===z()&&(O+=V(F())),p=z(),u=d=A(_=O+=Y(B())),x++;break;case 45:45===h&&2==A(O)&&(m=0)}}return a}function ne(e,t,n,r,o,a,i,l,s,c,u,d){for(var p=o-1,h=0===o?a:[""],m=T(h),b=0,v=0,x=0;b<r;++b)for(var E=0,k=_(e,p+1,p=g(v=i[b])),A=e;E<m;++E)(A=y(v>0?h[E]+" "+k:w(k,/&\f/g,h[E])))&&(s[x++]=A);return R(e,t,n,0===o?f:l,s,c,u,d)}function re(e,t,n,r){return R(e,t,n,p,b(M),_(e,2,-2),0,r)}function oe(e,t,n,r,o){return R(e,t,n,h,_(e,0,r),_(e,r+1,-1),r,o)}var ae={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},ie=n(9907),le=void 0!==ie&&void 0!==ie.env&&(ie.env.REACT_APP_SC_ATTR||ie.env.SC_ATTR)||"data-styled",se="active",ce="data-styled-version",ue="6.1.19",de="/*!sc*/\n",pe="undefined"!=typeof window&&"undefined"!=typeof document,fe=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:void 0!==ie&&void 0!==ie.env&&void 0!==ie.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==ie.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==ie.env.REACT_APP_SC_DISABLE_SPEEDY&&ie.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==ie&&void 0!==ie.env&&void 0!==ie.env.SC_DISABLE_SPEEDY&&""!==ie.env.SC_DISABLE_SPEEDY&&"false"!==ie.env.SC_DISABLE_SPEEDY&&ie.env.SC_DISABLE_SPEEDY),he={},me=(new Set,Object.freeze([])),ge=Object.freeze({});function be(e,t,n){return void 0===n&&(n=ge),e.theme!==n.theme&&e.theme||t||n.theme}var ve=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),ye=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,xe=/(^-|-$)/g;function we(e){return e.replace(ye,"-").replace(xe,"")}var Ee=/(a)(d)/gi,ke=52,_e=function(e){return String.fromCharCode(e+(e>25?39:97))};function Ae(e){var t,n="";for(t=Math.abs(e);t>ke;t=t/ke|0)n=_e(t%ke)+n;return(_e(t%ke)+n).replace(Ee,"$1-$2")}var Te,Se=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},$e=function(e){return Se(5381,e)};function Ce(e){return Ae($e(e)>>>0)}function Oe(e){return"string"==typeof e&&!0}var Ie="function"==typeof Symbol&&Symbol.for,Le=Ie?Symbol.for("react.memo"):60115,Me=Ie?Symbol.for("react.forward_ref"):60112,Ne={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Re={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Pe={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},De=((Te={})[Me]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Te[Le]=Pe,Te);function je(e){return("type"in(t=e)&&t.type.$$typeof)===Le?Pe:"$$typeof"in e?De[e.$$typeof]:Ne;var t}var Fe=Object.defineProperty,ze=Object.getOwnPropertyNames,Be=Object.getOwnPropertySymbols,He=Object.getOwnPropertyDescriptor,Ue=Object.getPrototypeOf,Ve=Object.prototype;function Ge(e,t,n){if("string"!=typeof t){if(Ve){var r=Ue(t);r&&r!==Ve&&Ge(e,r,n)}var o=ze(t);Be&&(o=o.concat(Be(t)));for(var a=je(e),i=je(t),l=0;l<o.length;++l){var s=o[l];if(!(s in Re||n&&n[s]||i&&s in i||a&&s in a)){var c=He(t,s);try{Fe(e,s,c)}catch(e){}}}}return e}function We(e){return"function"==typeof e}function qe(e){return"object"==typeof e&&"styledComponentId"in e}function Ke(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function Ye(e,t){if(0===e.length)return"";for(var n=e[0],r=1;r<e.length;r++)n+=t?t+e[r]:e[r];return n}function Xe(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function Ze(e,t,n){if(void 0===n&&(n=!1),!n&&!Xe(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=Ze(e[r],t[r]);else if(Xe(t))for(var r in t)e[r]=Ze(e[r],t[r]);return e}function Je(e,t){Object.defineProperty(e,"toString",{value:t})}function Qe(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var et=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)if((o<<=1)<0)throw Qe(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var a=r;a<o;a++)this.groupSizes[a]=0}for(var i=this.indexOfGroup(e+1),l=(a=0,t.length);a<l;a++)this.tag.insertRule(i,t[a])&&(this.groupSizes[e]++,i++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,a=r;a<o;a++)t+="".concat(this.tag.getRule(a)).concat(de);return t},e}(),tt=new Map,nt=new Map,rt=1,ot=function(e){if(tt.has(e))return tt.get(e);for(;nt.has(rt);)rt++;var t=rt++;return tt.set(e,t),nt.set(t,e),t},at=function(e,t){rt=t+1,tt.set(e,t),nt.set(t,e)},it="style[".concat(le,"][").concat(ce,'="').concat(ue,'"]'),lt=new RegExp("^".concat(le,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),st=function(e,t,n){for(var r,o=n.split(","),a=0,i=o.length;a<i;a++)(r=o[a])&&e.registerName(t,r)},ct=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split(de),o=[],a=0,i=r.length;a<i;a++){var l=r[a].trim();if(l){var s=l.match(lt);if(s){var c=0|parseInt(s[1],10),u=s[2];0!==c&&(at(u,c),st(e,u,s[3]),e.getTag().insertRules(c,o)),o.length=0}else o.push(l)}}},ut=function(e){for(var t=document.querySelectorAll(it),n=0,r=t.length;n<r;n++){var o=t[n];o&&o.getAttribute(le)!==se&&(ct(e,o),o.parentNode&&o.parentNode.removeChild(o))}};function dt(){return n.nc}var pt=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){var t=Array.from(e.querySelectorAll("style[".concat(le,"]")));return t[t.length-1]}(n),a=void 0!==o?o.nextSibling:null;r.setAttribute(le,se),r.setAttribute(ce,ue);var i=dt();return i&&r.setAttribute("nonce",i),n.insertBefore(r,a),r},ft=function(){function e(e){this.element=pt(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}throw Qe(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),ht=function(){function e(e){this.element=pt(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),mt=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),gt=pe,bt={isServer:!pe,useCSSOMInjection:!fe},vt=function(){function e(e,t,n){void 0===e&&(e=ge),void 0===t&&(t={});var o=this;this.options=r(r({},bt),e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&pe&>&&(gt=!1,ut(this)),Je(this,function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return nt.get(e)}(n);if(void 0===o)return"continue";var a=e.names.get(o),i=t.getGroup(n);if(void 0===a||!a.size||0===i.length)return"continue";var l="".concat(le,".g").concat(n,'[id="').concat(o,'"]'),s="";void 0!==a&&a.forEach(function(e){e.length>0&&(s+="".concat(e,","))}),r+="".concat(i).concat(l,'{content:"').concat(s,'"}').concat(de)},a=0;a<n;a++)o(a);return r}(o)})}return e.registerId=function(e){return ot(e)},e.prototype.rehydrate=function(){!this.server&&pe&&ut(this)},e.prototype.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(r(r({},this.options),t),this.gs,n&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new mt(n):t?new ft(n):new ht(n)}(this.options),new et(e)));var e},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(ot(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(ot(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(ot(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),yt=/&/g,xt=/^\s*\/\/.*$/gm;function wt(e,t){return e.map(function(e){return"rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map(function(e){return"".concat(t," ").concat(e)})),Array.isArray(e.children)&&"@keyframes"!==e.type&&(e.children=wt(e.children,t)),e})}function Et(e){var t,n,r,o=void 0===e?ge:e,a=o.options,i=void 0===a?ge:a,l=o.plugins,s=void 0===l?me:l,c=function(e,r,o){return o.startsWith(n)&&o.endsWith(n)&&o.replaceAll(n,"").length>0?".".concat(t):e},u=s.slice();u.push(function(e){e.type===f&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(yt,n).replace(r,c))}),i.prefix&&u.push(Q),u.push(Z);var d=function(e,o,a,l){void 0===o&&(o=""),void 0===a&&(a=""),void 0===l&&(l="&"),t=l,n=o,r=new RegExp("\\".concat(n,"\\b"),"g");var s=e.replace(xt,""),c=ee(a||o?"".concat(a," ").concat(o," { ").concat(s," }"):s);i.namespace&&(c=wt(c,i.namespace));var d,p,f,h=[];return X(c,(d=u.concat((f=function(e){return h.push(e)},function(e){e.root||(e=e.return)&&f(e)})),p=T(d),function(e,t,n,r){for(var o="",a=0;a<p;a++)o+=d[a](e,t,n,r)||"";return o})),h};return d.hash=s.length?s.reduce(function(e,t){return t.name||Qe(15),Se(e,t.name)},5381).toString():"",d}var kt=new vt,_t=Et(),At=i().createContext({shouldForwardProp:void 0,styleSheet:kt,stylis:_t}),Tt=(At.Consumer,i().createContext(void 0));function St(){return(0,a.useContext)(At)}function $t(e){var t=(0,a.useState)(e.stylisPlugins),n=t[0],r=t[1],o=St().styleSheet,l=(0,a.useMemo)(function(){var t=o;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.sheet,e.target,o]),c=(0,a.useMemo)(function(){return Et({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:n})},[e.enableVendorPrefixes,e.namespace,n]);(0,a.useEffect)(function(){s()(n,e.stylisPlugins)||r(e.stylisPlugins)},[e.stylisPlugins]);var u=(0,a.useMemo)(function(){return{shouldForwardProp:e.shouldForwardProp,styleSheet:l,stylis:c}},[e.shouldForwardProp,l,c]);return i().createElement(At.Provider,{value:u},i().createElement(Tt.Provider,{value:c},e.children))}var Ct=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=_t);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,Je(this,function(){throw Qe(12,String(n.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=_t),this.name+e.hash},e}(),Ot=function(e){return e>="A"&&e<="Z"};function It(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;Ot(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var Lt=function(e){return null==e||!1===e||""===e},Mt=function(e){var t,n,r=[];for(var a in e){var i=e[a];e.hasOwnProperty(a)&&!Lt(i)&&(Array.isArray(i)&&i.isCss||We(i)?r.push("".concat(It(a),":"),i,";"):Xe(i)?r.push.apply(r,o(o(["".concat(a," {")],Mt(i),!1),["}"],!1)):r.push("".concat(It(a),": ").concat((t=a,null==(n=i)||"boolean"==typeof n||""===n?"":"number"!=typeof n||0===n||t in ae||t.startsWith("--")?String(n).trim():"".concat(n,"px")),";")))}return r};function Nt(e,t,n,r){return Lt(e)?[]:qe(e)?[".".concat(e.styledComponentId)]:We(e)?!We(o=e)||o.prototype&&o.prototype.isReactComponent||!t?[e]:Nt(e(t),t,n,r):e instanceof Ct?n?(e.inject(n,r),[e.getName(r)]):[e]:Xe(e)?Mt(e):Array.isArray(e)?Array.prototype.concat.apply(me,e.map(function(e){return Nt(e,t,n,r)})):[e.toString()];var o}function Rt(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(We(n)&&!qe(n))return!1}return!0}var Pt=$e(ue),Dt=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&Rt(e),this.componentId=t,this.baseHash=Se(Pt,t),this.baseStyle=n,vt.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))r=Ke(r,this.staticRulesId);else{var o=Ye(Nt(this.rules,e,t,n)),a=Ae(Se(this.baseHash,o)>>>0);if(!t.hasNameForId(this.componentId,a)){var i=n(o,".".concat(a),void 0,this.componentId);t.insertRules(this.componentId,a,i)}r=Ke(r,a),this.staticRulesId=a}else{for(var l=Se(this.baseHash,n.hash),s="",c=0;c<this.rules.length;c++){var u=this.rules[c];if("string"==typeof u)s+=u;else if(u){var d=Ye(Nt(u,e,t,n));l=Se(l,d+c),s+=d}}if(s){var p=Ae(l>>>0);t.hasNameForId(this.componentId,p)||t.insertRules(this.componentId,p,n(s,".".concat(p),void 0,this.componentId)),r=Ke(r,p)}}return r},e}(),jt=i().createContext(void 0);function Ft(){var e=(0,a.useContext)(jt);if(!e)throw Qe(18);return e}function zt(e){var t=i().useContext(jt),n=(0,a.useMemo)(function(){return function(e,t){if(!e)throw Qe(14);if(We(e))return e(t);if(Array.isArray(e)||"object"!=typeof e)throw Qe(8);return t?r(r({},t),e):e}(e.theme,t)},[e.theme,t]);return e.children?i().createElement(jt.Provider,{value:n},e.children):null}jt.Consumer;var Bt={};function Ht(e,t,n){var o=qe(e),l=e,s=!Oe(e),c=t.attrs,u=void 0===c?me:c,d=t.componentId,p=void 0===d?function(e,t){var n="string"!=typeof e?"sc":we(e);Bt[n]=(Bt[n]||0)+1;var r="".concat(n,"-").concat(Ce(ue+n+Bt[n]));return t?"".concat(t,"-").concat(r):r}(t.displayName,t.parentComponentId):d,f=t.displayName,h=void 0===f?function(e){return Oe(e)?"styled.".concat(e):"Styled(".concat(function(e){return e.displayName||e.name||"Component"}(e),")")}(e):f,m=t.displayName&&t.componentId?"".concat(we(t.displayName),"-").concat(t.componentId):t.componentId||p,g=o&&l.attrs?l.attrs.concat(u).filter(Boolean):u,b=t.shouldForwardProp;if(o&&l.shouldForwardProp){var v=l.shouldForwardProp;if(t.shouldForwardProp){var y=t.shouldForwardProp;b=function(e,t){return v(e,t)&&y(e,t)}}else b=v}var x=new Dt(n,m,o?l.componentStyle:void 0);function w(e,t){return function(e,t,n){var o=e.attrs,l=e.componentStyle,s=e.defaultProps,c=e.foldedComponentIds,u=e.styledComponentId,d=e.target,p=i().useContext(jt),f=St(),h=e.shouldForwardProp||f.shouldForwardProp,m=be(t,p,s)||ge,g=function(e,t,n){for(var o,a=r(r({},t),{className:void 0,theme:n}),i=0;i<e.length;i+=1){var l=We(o=e[i])?o(a):o;for(var s in l)a[s]="className"===s?Ke(a[s],l[s]):"style"===s?r(r({},a[s]),l[s]):l[s]}return t.className&&(a.className=Ke(a.className,t.className)),a}(o,t,m),b=g.as||d,v={};for(var y in g)void 0===g[y]||"$"===y[0]||"as"===y||"theme"===y&&g.theme===m||("forwardedAs"===y?v.as=g.forwardedAs:h&&!h(y,b)||(v[y]=g[y]));var x=function(e,t){var n=St();return e.generateAndInjectStyles(t,n.styleSheet,n.stylis)}(l,g),w=Ke(c,u);return x&&(w+=" "+x),g.className&&(w+=" "+g.className),v[Oe(b)&&!ve.has(b)?"class":"className"]=w,n&&(v.ref=n),(0,a.createElement)(b,v)}(E,e,t)}w.displayName=h;var E=i().forwardRef(w);return E.attrs=g,E.componentStyle=x,E.displayName=h,E.shouldForwardProp=b,E.foldedComponentIds=o?Ke(l.foldedComponentIds,l.styledComponentId):"",E.styledComponentId=m,E.target=o?l.target:e,Object.defineProperty(E,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=o?function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,o=t;r<o.length;r++)Ze(e,o[r],!0);return e}({},l.defaultProps,e):e}}),Je(E,function(){return".".concat(E.styledComponentId)}),s&&Ge(E,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),E}function Ut(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n}new Set;var Vt=function(e){return Object.assign(e,{isCss:!0})};function Gt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(We(e)||Xe(e))return Vt(Nt(Ut(me,o([e],t,!0))));var r=e;return 0===t.length&&1===r.length&&"string"==typeof r[0]?Nt(r):Vt(Nt(Ut(r,t)))}function Wt(e,t,n){if(void 0===n&&(n=ge),!t)throw Qe(1,t);var a=function(r){for(var a=[],i=1;i<arguments.length;i++)a[i-1]=arguments[i];return e(t,n,Gt.apply(void 0,o([r],a,!1)))};return a.attrs=function(o){return Wt(e,t,r(r({},n),{attrs:Array.prototype.concat(n.attrs,o).filter(Boolean)}))},a.withConfig=function(o){return Wt(e,t,r(r({},n),o))},a}var qt=function(e){return Wt(Ht,e)},Kt=qt;ve.forEach(function(e){Kt[e]=qt(e)});var Yt=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Rt(e),vt.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,r){var o=r(Ye(Nt(this.rules,t,n,r)),""),a=this.componentId+e;n.insertRules(a,a,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,r){e>2&&vt.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function Xt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var a=Gt.apply(void 0,o([e],t,!1)),l="sc-global-".concat(Ce(JSON.stringify(a))),s=new Yt(a,l),c=function(e){var t=St(),n=i().useContext(jt),r=i().useRef(t.styleSheet.allocateGSInstance(l)).current;return t.styleSheet.server&&u(r,e,t.styleSheet,n,t.stylis),i().useLayoutEffect(function(){if(!t.styleSheet.server)return u(r,e,t.styleSheet,n,t.stylis),function(){return s.removeStyles(r,t.styleSheet)}},[r,e,t.styleSheet,n,t.stylis]),null};function u(e,t,n,o,a){if(s.isStatic)s.renderStyles(e,he,n,a);else{var i=r(r({},t),{theme:be(t,o,c.defaultProps)});s.renderStyles(e,i,n,a)}}return i().memo(c)}function Zt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Ye(Gt.apply(void 0,o([e],t,!1))),a=Ce(r);return new Ct(a,r)}(function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var n=dt(),r=Ye([n&&'nonce="'.concat(n,'"'),"".concat(le,'="true"'),"".concat(ce,'="').concat(ue,'"')].filter(Boolean)," ");return"<style ".concat(r,">").concat(t,"</style>")},this.getStyleTags=function(){if(e.sealed)throw Qe(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw Qe(2);var n=e.instance.toString();if(!n)return[];var o=((t={})[le]="",t[ce]=ue,t.dangerouslySetInnerHTML={__html:n},t),a=dt();return a&&(o.nonce=a),[i().createElement("style",r({},o,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new vt({isServer:!0}),this.sealed=!1}e.prototype.collectStyles=function(e){if(this.sealed)throw Qe(2);return i().createElement($t,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw Qe(3)}})(),"__sc-".concat(le,"__")},3949:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(null,arguments)}n.d(t,{A:()=>v});var o=n(9155),a=n.n(o),i=o.useLayoutEffect,l=function(e,t){"function"!=typeof e?e.current=t:e(t)},s={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},c=function(e){Object.keys(s).forEach(function(t){e.style.setProperty(t,s[t],"important")})},u=null,d=function(e,t){var n=e.scrollHeight;return"border-box"===t.sizingStyle.boxSizing?n+t.borderSize:n-t.paddingSize},p=function(){},f=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],h=!!document.documentElement.currentStyle;function m(e,t,n){var r,l,s=(r=n,l=a().useRef(r),i(function(){l.current=r}),l);o.useLayoutEffect(function(){var n=function(e){return s.current(e)};if(e)return e.addEventListener(t,n),function(){return e.removeEventListener(t,n)}},[])}var g=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],b=function(e,t){var n,i=e.cacheMeasurements,s=e.maxRows,b=e.minRows,v=e.onChange,y=void 0===v?p:v,x=e.onHeightChange,w=void 0===x?p:x,E=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,g),k=void 0!==E.value,_=o.useRef(null),A=function(e,t){var n=a().useRef();return a().useCallback(function(r){e.current=r,n.current&&l(n.current,null),n.current=t,t&&l(t,r)},[t])}(_,t),T=o.useRef(0),S=o.useRef(),$=function(){var e=_.current,t=i&&S.current?S.current:function(e){var t=window.getComputedStyle(e);if(null===t)return null;var n,r=(n=t,f.reduce(function(e,t){return e[t]=n[t],e},{})),o=r.boxSizing;return""===o?null:(h&&"border-box"===o&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px"),{sizingStyle:r,paddingSize:parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),borderSize:parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth)})}(e);if(t){S.current=t;var n=function(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=1/0),u||((u=document.createElement("textarea")).setAttribute("tabindex","-1"),u.setAttribute("aria-hidden","true"),c(u)),null===u.parentNode&&document.body.appendChild(u);var o=e.paddingSize,a=e.borderSize,i=e.sizingStyle,l=i.boxSizing;Object.keys(i).forEach(function(e){var t=e;u.style[t]=i[t]}),c(u),u.value=t;var s=d(u,e);u.value=t,s=d(u,e),u.value="x";var p=u.scrollHeight-o,f=p*n;"border-box"===l&&(f=f+o+a),s=Math.max(f,s);var h=p*r;return"border-box"===l&&(h=h+o+a),[s=Math.min(h,s),p]}(t,e.value||e.placeholder||"x",b,s),r=n[0],o=n[1];T.current!==r&&(T.current=r,e.style.setProperty("height",r+"px","important"),w(r,{rowHeight:o}))}};return o.useLayoutEffect($),function(e,t){m(document.body,"reset",function(n){e.current.form===n.target&&t()})}(_,function(){if(!k){var e=_.current.value;requestAnimationFrame(function(){var t=_.current;t&&e!==t.value&&$()})}}),m(window,"resize",$),n=$,m(document.fonts,"loadingdone",n),o.createElement("textarea",r({},E,{onChange:function(e){k||$(),y(e)},ref:A}))},v=o.forwardRef(b)},3950:(e,t,n)=>{"use strict";n.d(t,{A:()=>x});var r=n(9155),o=n.n(r),a=n(824),i=n(3949),l=n(3864),s=n(492),c=n(4927),u=n(8905),d=n(6538),p=n(2628);const f=l.Ay.div`
|
|
1060
871
|
position: relative;
|
|
1061
872
|
display: flex;
|
|
1062
|
-
`,
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
${e=>{let{adornmentPosition:t}=e;return"start"===t?"\n left: 10px;\n ":"\n left: auto;\n right: 10px;\n "}};
|
|
1070
|
-
`,h=l.Ay.input`
|
|
1071
|
-
${e=>{let{theme:t}=e;return(0,s.Mo)(t.panelBackground,"0.08")}}
|
|
873
|
+
`,h=(0,l.Ay)(i.A)`
|
|
874
|
+
${c.hF}
|
|
875
|
+
max-height: unset;
|
|
876
|
+
white-space: unset;
|
|
877
|
+
text-overflow: unset;
|
|
878
|
+
padding-right: unset;
|
|
879
|
+
${e=>{let{theme:t}=e;return(0,s.Mo)(t.panelBackground,.08)}}
|
|
1072
880
|
color: var(--panel-background-white-black-contrast-1743170834);
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
881
|
+
min-height: ${e=>{let{$minHeight:t}=e;return t}}px;
|
|
882
|
+
outline-offset: -4px;
|
|
883
|
+
@media ${u.jO.maxTablet} {
|
|
884
|
+
max-height: unset;
|
|
885
|
+
}
|
|
886
|
+
${(0,p.A)()&&l.AH`
|
|
887
|
+
max-height: unset;
|
|
888
|
+
`}
|
|
889
|
+
|
|
890
|
+
${e=>{let{$hasMaxLength:t}=e;if(t)return"padding-bottom: 24px;"}}
|
|
1079
891
|
|
|
1080
892
|
&:focus {
|
|
1081
893
|
color: var(--panel-background-white-black-contrast-1743170834);
|
|
1082
894
|
box-shadow: none;
|
|
1083
895
|
border: 1px solid
|
|
1084
|
-
${e=>{let{theme:t}=e;return(0,
|
|
896
|
+
${e=>{let{theme:t}=e;return(0,d.w5)(t.panelBackground,"rgba(255, 255, 255, 0.12)","rgba(0, 0, 0, 0.12)")}};
|
|
1085
897
|
|
|
1086
898
|
${s.sF}
|
|
1087
899
|
}
|
|
1088
900
|
|
|
1089
901
|
&::placeholder {
|
|
1090
|
-
color: ${e=>{let{theme:t}=e;return(0,
|
|
902
|
+
color: ${e=>{let{theme:t}=e;return(0,d.w5)(t.panelBackground,"#FFF","#000")}};
|
|
1091
903
|
opacity: 0.5;
|
|
1092
904
|
}
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
}
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
905
|
+
`;var m=n(9416),g=n(8020),b=n(587),v=n(8780),y=n(5814);const x=function(e){var t,n,r;let{autoComplete:i="off",name:l,register:s,validators:c,control:u,id:d,setError:p,clearErrors:x,trigger:w,...E}=e;const k=(0,y.G8)(c),{ref:_,onChange:A,...T}=s?s(l,k):{},{errors:S,isSubmitted:$}=(0,a.lN)({name:l,control:u}),C=(0,b.A)({name:l,trigger:w,control:u,setError:p,clearErrors:x});return o().createElement(o().Fragment,null,o().createElement(f,null,o().createElement(h,Object.assign({autoComplete:i,name:l,minRows:2,$hasMaxLength:!(null===(t=k.maxLength)||void 0===t||!t.value),id:d||l},(0,y.NR)(k),T&&{...T},{onChange:e=>{null==A||A(e),C(e)},ref:_,"aria-errormessage":`error_${l}`,"aria-invalid":!(0,v.A)(S)&&$},E)),!(null===(n=k.maxLength)||void 0===n||!n.value)&&u&&l&&o().createElement(m.A,{position:"bottom",fieldName:l,control:u,maxLength:null===(r=k.maxLength)||void 0===r?void 0:r.value})),o().createElement(g.A,{control:u,name:l}))}},3999:(e,t,n)=>{"use strict";var r=n(5024),o=n(9989),a=n(480);e.exports=r?function(e,t,n){return o.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},4044:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var r=n(9155),o=n.n(r),a=n(2221),i=n(3864),l=n(6538);const s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=e.replace("#","");return 3===n.length&&(n=`${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`),t>1&&t<=100&&(t/=100),`rgba(${parseInt(n.substring(0,2),16)},${parseInt(n.substring(2,4),16)},${parseInt(n.substring(4,6),16)},${t})`};var c=n(881);const u=i.Ay.div`
|
|
906
|
+
display: flex;
|
|
907
|
+
flex-direction: column;
|
|
908
|
+
position: relative;
|
|
909
|
+
width: 100%;
|
|
910
|
+
${e=>{let{$isForm:t}=e;return t?"padding: 12px 0 16px;":i.AH`
|
|
911
|
+
border-radius: 6px;
|
|
912
|
+
padding: 12px 12px 16px 12px;
|
|
913
|
+
box-shadow: 0px 1px 5px 1px rgba(0, 0, 0, 0.08);
|
|
914
|
+
`}}
|
|
915
|
+
background-color: ${e=>{let{theme:t}=e;return t.panelBackground}};
|
|
916
|
+
`,d=i.Ay.div`
|
|
917
|
+
padding: 0px 8px 0px 0px;
|
|
918
|
+
font-size: var(--_kindlychat-font-size-p);
|
|
919
|
+
`,p=i.Ay.div`
|
|
920
|
+
position: relative;
|
|
921
|
+
flex: 1;
|
|
922
|
+
display: flex;
|
|
923
|
+
align-items: center;
|
|
924
|
+
flex-direction: row;
|
|
925
|
+
margin-bottom: 12px;
|
|
926
|
+
color: ${e=>{let{theme:t,$isForm:n}=e;return n?"var(--panel-background-white-black-contrast-1743170834)":(0,l.w5)(t.background,"#FFFFFF","#000000")}};
|
|
927
|
+
`,f=i.Ay.span`
|
|
928
|
+
display: flex;
|
|
929
|
+
padding: 4px;
|
|
930
|
+
align-items: center;
|
|
931
|
+
justify-content: center;
|
|
932
|
+
font-size: var(--_kindlychat-font-size-p);
|
|
933
|
+
`,h=i.Ay.div`
|
|
1109
934
|
position: relative;
|
|
1110
935
|
display: flex;
|
|
1111
|
-
`,A=l.Ay.select`
|
|
1112
|
-
background-color: ${e=>{let{theme:t}=e;return(0,s.Mo)(t.panelBackground,"0.08")}};
|
|
1113
|
-
color: ${e=>{let{theme:t,isPlaceholder:n}=e;return n?(0,u.w5)(t.panelBackground,"rgba(255, 255, 255, 0.46)","rgba(0, 0, 0, 0.46)"):(0,u.w5)(t.panelBackground,"#FFFFFF","#000000")}};
|
|
1114
|
-
padding: 9px 16px;
|
|
1115
|
-
padding-right: 42px;
|
|
1116
|
-
border-radius: 18px;
|
|
1117
|
-
border: 1px solid transparent;
|
|
1118
|
-
outline: none;
|
|
1119
936
|
flex: 1;
|
|
1120
|
-
|
|
937
|
+
border: 1px solid
|
|
938
|
+
${e=>{let{theme:t}=e;return(0,l.w5)(t.panelBackground,"rgba(255,255,255, 0.08)","rgba(0,0,0, 0.08)")}};
|
|
939
|
+
border-radius: 25px;
|
|
940
|
+
`,m=i.AH`
|
|
941
|
+
height: 20px;
|
|
942
|
+
width: 20px;
|
|
943
|
+
border-radius: 50%;
|
|
944
|
+
background: ${e=>{let{theme:t}=e;return t.buttonBackground}};
|
|
945
|
+
cursor: pointer;
|
|
1121
946
|
appearance: none;
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
947
|
+
margin-top: -6px;
|
|
948
|
+
border: 1px solid rgba(0, 0, 0, 0.2);
|
|
949
|
+
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.08);
|
|
950
|
+
`,g=(e,t,n)=>(e-n)/(t-n)*100,b=i.Ay.input.attrs(e=>{let{theme:t,value:n,max:r,min:o}=e;return{style:{background:`linear-gradient(to right, ${t.buttonBackground} 0%, ${t.buttonBackground} ${g(n,r,o)}%, ${s((0,l.w5)(t.panelBackground,"#FFFFFF","#000000"),.08)} ${g(n,r,o)}%, ${s((0,l.w5)(t.panelBackground,"#FFFFFF","#000000"),.08)} 100%)`}}})`
|
|
951
|
+
cursor: pointer;
|
|
952
|
+
${c.jq}
|
|
953
|
+
&[type='range'] {
|
|
954
|
+
appearance: none;
|
|
955
|
+
width: 100%;
|
|
956
|
+
border-radius: 25px;
|
|
957
|
+
height: 8px;
|
|
958
|
+
margin: 0;
|
|
1125
959
|
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
right: 20px;
|
|
1133
|
-
top: 6px;
|
|
1134
|
-
width: 10px;
|
|
1135
|
-
height: 6px;
|
|
1136
|
-
pointer-events: none;
|
|
1137
|
-
user-select: none;
|
|
960
|
+
&::-webkit-slider-thumb {
|
|
961
|
+
${m}
|
|
962
|
+
}
|
|
963
|
+
&::-moz-range-thumb {
|
|
964
|
+
${m}
|
|
965
|
+
}
|
|
1138
966
|
|
|
1139
|
-
|
|
1140
|
-
|
|
967
|
+
&::-webkit-slider-runnable-track {
|
|
968
|
+
width: 100%;
|
|
969
|
+
height: 8px;
|
|
970
|
+
cursor: pointer;
|
|
971
|
+
border-radius: 25px;
|
|
972
|
+
}
|
|
1141
973
|
}
|
|
1142
|
-
`,S=function(e){let{name:t,register:n,validators:r,control:o,id:l,setError:s,clearErrors:c,trigger:u,options:d,...p}=e;const f=(0,y.G8)(r),{ref:h,onChange:m,...v}=n?n(t,f):{},x=(0,i.FH)({name:t,control:o}),w=(0,b.A)({name:t,trigger:u,control:o,setError:s,clearErrors:c});return a().createElement(a().Fragment,null,a().createElement(_,null,a().createElement(A,Object.assign({name:t,type:"select",isPlaceholder:""===x,id:l||t},(0,y.NR)(f),v&&{...v},{onChange:e=>{null==m||m(e),w(e)},ref:h},p),p.placeholder&&a().createElement("option",{value:"",disabled:!0,hidden:!0},p.placeholder),null==d?void 0:d.map((e,n)=>a().createElement("option",{key:`select-${t}-${e.id||n}`,value:e.value},e.label))),a().createElement(T,null,a().createElement(k.A,{color:"#445265"}))),a().createElement(g.A,{control:o,name:t}))};var C=n(9749),$=n.n(C),O=n(541),I=n(5256),L=n(9405),M=n(7355),N=n(2221),R=n(491),P=n(1328),D=n(9886),j=n(1695),F=n(3699),z=n(6064);const B=l.Ay.div`
|
|
1143
|
-
|
|
1144
|
-
display: flex;
|
|
1145
|
-
flex-direction: column;
|
|
1146
|
-
`,H=l.Ay.label`
|
|
1147
|
-
padding: ${e=>{let{$hasError:t}=e;return t?13:24}}px;
|
|
1148
|
-
display: flex;
|
|
1149
|
-
flex-direction: column;
|
|
1150
|
-
align-items: center;
|
|
1151
|
-
justify-content: center;
|
|
974
|
+
`,v=function(e){let{from:t,to:n,value:i=1,affix:l,affixValue:s,step:c=1,onChange:m,name:g,field:v,ariaLabel:y,validators:x,hasController:w}=e;const E=(0,r.useMemo)(()=>{var e;const n=parseFloat(t);return Number.isNaN(n)?null==x||null===(e=x.find(e=>void 0!==e.min&&null!==e.min))||void 0===e?void 0:e.min:n},[t,x]),k=(0,r.useMemo)(()=>{var e;const t=parseFloat(n);return Number.isNaN(t)?null==x||null===(e=x.find(e=>void 0!==e.max&&null!==e.max))||void 0===e?void 0:e.max:t},[n,x]),[_,A]=(0,r.useState)(((e,t,n)=>t<e?e+n:t)(c,i,E));return o().createElement(u,{$isForm:!!w},o().createElement(p,{$isForm:!!w},l===a.rc.PREFIX&&o().createElement(d,null,s),o().createElement(f,null,_),l===a.rc.SUFFIX&&o().createElement(d,null,s)),o().createElement(h,null,o().createElement(b,{type:"range",name:g,step:c,min:E,max:k,value:_,onChange:e=>{var t;null!=e&&null!==(t=e.target)&&void 0!==t&&t.value&&(m&&m(e.target.value),null!=v&&v.onChange&&v.onChange(e),A(e.target.value))},"aria-label":y})))}},4047:(e,t,n)=>{"use strict";var r=n(9155),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=r.useSyncExternalStore,i=r.useRef,l=r.useEffect,s=r.useMemo,c=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=i(null);if(null===d.current){var p={hasValue:!1,value:null};d.current=p}else p=d.current;d=s(function(){function e(e){if(!l){if(l=!0,a=e,e=r(e),void 0!==u&&p.hasValue){var t=p.value;if(u(t,e))return i=t}return i=e}if(t=i,o(a,e))return t;var n=r(e);return void 0!==u&&u(t,n)?(a=e,t):(a=e,i=n)}var a,i,l=!1,s=void 0===n?null:n;return[function(){return e(t())},null===s?void 0:function(){return e(s())}]},[t,n,r,u]);var f=a(e,d[0],d[1]);return l(function(){p.hasValue=!0,p.value=f},[f]),c(f),f}},4142:(e,t,n)=>{"use strict";n.d(t,{S:()=>l});var r=n(7251),o=n(2221),a=n(1872),i=n(4851);const l=(0,r.zD)("feedback/sendToPat",async(e,t)=>{let{getState:n,dispatch:r,rejectWithValue:l}=t;const{connection:{token:s},environment:{PAT_HOST:c}}=n();try{const t=await r((0,a.et)(`${c}/chatbubble/${o.Ak}/feedback`,{method:"POST",body:{feedback:e},...(0,i.A)({token:s})}));if(!t.ok)throw new Error(`Feedback submission failed with status: ${t.status}`);return t.data.data.id}catch(e){return l(e.message)}})},4240:(e,t,n)=>{"use strict";var r=n(8655)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(e){}}return!1}},4311:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(9155),o=n(541),a=n(1695),i=n(9337),l=n(1328);function s(){const{text:e}=(0,o.d4)(a.Od),{currentLanguageCode:t}=(0,l.A)();return(0,r.useMemo)(()=>(0,i.A)(e,t),[t,e])}},4317:(e,t,n)=>{"use strict";var r=n(6100);e.exports=r({}.isPrototypeOf)},4399:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e?n(e)?e.length?"array":"void":typeof e:"void"};var n=Array.isArray||(Array.isArray=function(e){return""+e!==e&&"[object Array]"==={}.toString.call(e)});e.exports=t.default},4490:(e,t,n)=>{"use strict";function r(e,t){return"number"!=typeof(null==e?void 0:e.length)||e.length!==(null==t?void 0:t.length)?(console.error("Trying to zip non-array of arrays of unequal length"),[]):e.map((e,n)=>[e,t[n]])}n.d(t,{A:()=>r})},4499:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=(e,t,n)=>{var r;return null!==(r=t.split(".").reduce((e,t)=>e?e[t]:void 0,e))&&void 0!==r?r:n}},4517:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n={};return t.forEach(function(t){var r=e[t];r&&(n[t]=r)}),n},e.exports=t.default},4543:(e,t,n)=>{"use strict";var r=n(5024),o=n(4713),a=n(7161),i=n(480),l=n(3273),s=n(5341),c=n(701),u=n(9665),d=Object.getOwnPropertyDescriptor;t.f=r?d:function(e,t){if(e=l(e),t=s(t),u)try{return d(e,t)}catch(e){}if(c(e,t))return i(!o(a.f,e,t),e[t])}},4572:(e,t,n)=>{"use strict";var r=n(9344),o=n(814),a=n(1780),i=r(r.bind);e.exports=function(e,t){return o(e),void 0===t?e:a?i(e,t):function(){return e.apply(t,arguments)}}},4574:(e,t,n)=>{"use strict";var r=n(9903),o=Math.max,a=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):a(n,t)}},4603:(e,t,n)=>{"use strict";var r=n(5547),o=n(1203),a=n(8900).String;e.exports=!!Object.getOwnPropertySymbols&&!o(function(){var e=Symbol("symbol detection");return!a(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41})},4674:(e,t,n)=>{"use strict";var r=n(814),o=n(3057);e.exports=function(e,t){var n=e[t];return o(n)?void 0:r(n)}},4703:(e,t,n)=>{"use strict";n.d(t,{Bd:()=>L,Bu:()=>_,Zn:()=>$,aP:()=>E,j3:()=>M,pA:()=>R,qJ:()=>P,tM:()=>k,y2:()=>A,zh:()=>C});var r=n(541),o=n(5279),a=n(9272),i=n(2221),l=n(4851),s=n(7958),c=n(3699),u=n(1318),d=n(5173),p=n(4490),f=n(1112),h=n(5564),m=n(8628),g=n(8483),b=n(7243),v=n(7811),y=n(6079),x=n(7173);const w=e=>{const{PAT_HOST:t}=e().environment,{local:n,chatbubble:{botKey:r},connection:{token:o},messages:{forms:a}}=e();return{token:o,PAT_HOST:t,botKey:r,local:n,forms:a}},E=(e,t,n)=>(r,o)=>{const{botKey:a}=w(o);r((0,b.zX)(a,!0)),localStorage.setItem("kindly-chat-restart-message",JSON.stringify({message:e,exchangeId:t,newContext:n}))},k=(e,t)=>async(n,r)=>{const{PAT_HOST:o,token:a}=w(r),s=await n((0,h.z5)()),{headers:c}=(0,l.A)({token:a},{withCurrentUrl:!0,extra:s}),u={message:e,temporaryId:t},p=await n((0,b.et)(`${o}/chatbubble/${i.Ak}/message/`,{method:"POST",body:u,headers:c},{onError:e=>{var r;n({type:x.pz,temporaryId:t,status:null==e||null===(r=e.response)||void 0===r?void 0:r.status})}}));(0,d.A)(p)||(n({type:x.pz,...p.data}),n((0,y.uK)()))},_=e=>t=>{t({type:x.QA,formData:e})},A=function(e,t,n){let{responsePromise:s,tempId:c}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},u=arguments.length>4?arguments[4]:void 0,p=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return async(f,v)=>{const{PAT_HOST:E}=w(v);let{token:k,local:A,forms:T}=w(v);if(!k){if(!await f((0,g.mg)({shouldGreet:!1})))return;const{shouldOpenChat:e}=p;(0,r.vA)(()=>{f({type:x.d7,hasRequestedGreeting:!0}),e&&(f((0,m.mN)()),f((0,m.lQ)({source:"programmatic"})))}),({token:k,local:A,forms:T}=w(v))}const S=await f((0,h.z5)()),{headers:$}=(0,l.A)({token:k},{withCurrentUrl:!0,extra:S});T&&Object.values(T).forEach(e=>{if((null==e?void 0:e.formSubmitState)===a.KN.ACTIVE){const t={submission_id:e.formSubmissionId,context:e.formValue,state:a.KN.UNANSWERED};f((0,b.et)(`${E}/chatbubble/${i.Ak}/form/submit`,{method:"POST",body:t,headers:$})),f(_({...e,formSubmitState:a.KN.UNANSWERED}))}});const C=c||`tempId-${(0,o.A)()}`;f({type:x.tq,data:{id:C,created:(new Date).toISOString(),message:e,buttonType:u}}),f((0,b.TP)((new Date).toISOString()));const O={message:e,exchange_id:t,temporaryId:C,new_context:{...A.context,...n||{}}},I=s?await s:await f((0,b.et)(`${E}/chatbubble/${i.Ak}/message/`,{method:"POST",body:O,headers:$},{onError:e=>{var t,n;console.error(`/chatbubble/${i.Ak}/message returned ${null==e||null===(t=e.response)||void 0===t?void 0:t.status}`),f({type:x.pz,temporaryId:C,status:null==e||null===(n=e.response)||void 0===n?void 0:n.status}),f({type:x.wk})}}));(0,d.A)(I)||(f({type:x.pz,...I.data}),f((0,y.uK)()))}},T=e=>({...e,temporaryId:`tempId-${(0,o.A)()}`}),S=e=>{let{temporaryId:t}=e;return t},$=()=>async(e,t)=>{var n;const{bot:{id:r},chatbubble:{chatId:a,attachments:s},connection:{token:f},environment:{PAT_HOST:m}}=t(),g=await e((0,h.z5)()),{headers:v}=(0,l.A)({token:f},{extra:g}),y=`tempId-${(0,o.A)()}`,w=s.files.map(T).map((0,u.A)("file"));e({type:x.Os,data:{attachments:w}}),e({type:x.Q4}),e({type:x.tq,data:{id:y,created:(new Date).toISOString(),attachment_ids:w.map(S),message:""}}),e((0,b.TP)((new Date).toISOString()));const E=(t,n)=>{var r;e({type:x.pz,temporaryId:y,status:null==t||null===(r=t.response)||void 0===r?void 0:r.status}),n?e({type:x.wP,attachment:{...n,status:i.Le.ERROR}}):w.forEach(t=>e({type:x.wP,attachment:{...t,status:i.Le.ERROR}}))},k=w.map((0,u.A)("file","url")),_=`${m}/chatbubble/${i.Ak}/attachment/create`,A={attachments:k,temporaryChatMessageId:y},$=await e((0,b.et)(_,{method:"POST",body:A,headers:v},{onError:e=>E(e)}));if((0,d.A)($)||!Array.isArray(null==$||null===(n=$.data)||void 0===n?void 0:n.attachments))return;const[C,O]=$.data.attachments.reduce((t,n)=>{let[r,o]=t,{id:a,temporary_id:i,upload_url:l}=n;return e({type:x.wP,attachment:{temporaryId:i,id:a}}),[[...r,a],[...o,l]]},[[],[]]),I={"x-goog-upload-bot-id":r,"x-goog-upload-chat-id":a},L=(0,p.A)(s.files,O).map(async t=>{let[{file:n,...r},o]=t;const a=await(0,c.Bu)(n),i={...I,"Content-Type":n.type};return await e((0,b.et)(o,{method:"PUT",body:a,headers:i},{onError:e=>E(e,r)}))}),M=await Promise.all(L);if(M.some(e=>void 0===e))return;if(M.some(d.A))return;const N=`${m}/chatbubble/${i.Ak}/attachment/uploads-complete`,R={attachmentIds:C,temporaryChatMessageId:y,exchangeId:s.exchangeId};e((0,b.TP)((new Date).toISOString())),await e((0,b.et)(N,{method:"POST",body:R,headers:v},{onError:e=>E(e)}))},C=function(e){let{openChat:t,languageCode:n,tempId:r,responsePromise:a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return async(s,c)=>{const{connection:{token:u},chatbubble:{currentLanguage:p},local:{context:f}}=c(),{PAT_HOST:h}=c().environment;if(!u){const r={triggerDialogueSlug:e,languageCode:n,openChat:t};return s((0,g.XO)(r)),s((0,m.mN)()),void(t&&s((0,m.lQ)({source:"programmatic"})))}if(n&&n!==p){const e="Tried to trigger a dialogue in another language on an existing chat";s((0,b.Rm)({message:e,level:"error",extra:{languageCode:n,currentLanguage:p}}))}const v=r||(0,o.A)();s({type:x.IM,data:{id:v,created:(new Date).toISOString(),exchangeId:e}}),s((0,b.TP)((new Date).toISOString()));const w={exchange_id:e,temporaryId:v,new_context:{...f}},{headers:E}=(0,l.A)({token:u},{withCurrentUrl:!0}),k=a?await a:await s((0,b.et)(`${h}/chatbubble/${i.Ak}/trigger/`,{method:"POST",body:w,headers:E}));k&&!(0,d.A)(k)&&(t&&s((0,m.lQ)({source:"programmatic"})),s((0,y.uK)()))}},O=(e,t)=>n=>{n({type:x.Y6,buttonClick:{chatMessageId:e.id,buttonId:t.id,time:(new Date).toISOString()}})},I=(e,t,n)=>async(r,o)=>{const{connection:{token:a},environment:{PAT_HOST:s,VERSION:c}}=o(),u=await r((0,h.z5)()),{headers:d}=(0,l.A)({token:a},{withCurrentUrl:!0,extra:u}),p={method:"POST",body:{button:t,chatMessage:e,temporaryId:n,version:c},headers:d};return r((0,b.et)(`${s}/chatbubble/${i.Ak}/button/click/`,p))},L=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return async(a,l)=>{const{environment:{VERSION:s},messages:{chatMessages:c},chatbubble:{currentLanguage:u},local:d}=l(),p=(0,v.A)(e.button_type),h=`tempId-${(0,o.A)()}`,g={};r.length>0&&r.forEach(e=>{var r,o,l;e.button_type===i.lP.SLIDER.toLowerCase()&&null!==(r=e.slider_details)&&void 0!==r&&r.value?(g[null===(o=e.label)||void 0===o?void 0:o.toLowerCase()]=null===(l=e.slider_details)||void 0===l?void 0:l.value,a(O(a,t))):e.button_type===i.lP.CHECKBOX.toLowerCase()&&n.find(t=>t.id===e.id)?(g[e.value]=e.value,a(O(t,e)),a(I(t,e,h))):g[e.value]=""});const y=a(I(t,{...e,new_context:{...d.context,...g||{}}},h));switch(a({type:x.Y6,buttonClick:{chatMessageId:t.id,buttonId:e.id||e._id,time:(new Date).toISOString()}}),p){case i.lP.QUICK_REPLY:{const n={responsePromise:y,tempId:h};a(A(e.value,t.exchange_id,e.new_context,n,e.button_type));break}case i.lP.HANDOVER_REQUEST:if(!((e,t)=>!!t.find(t=>{let{buttons:n=[]}=t;return!!n.find(t=>{let{language_code:n,button_type:r}=t;return n===e&&(0,v.A)(r)===i.lP.HANDOVER_REQUEST})}))(u,c)){const e={version:s};a((0,b.Rm)({message:"Requested handover with no button",level:"error",extra:e}))}a((0,f.Du)(y));break;case i.lP.DIALOGUE_TRIGGER:case i.lP.SUGGESTION_DIALOGUE_TRIGGER:a(C(e.value,{tempId:h,responsePromise:y}));break;case i.lP.PRIVACY_EXPORT:a((0,m.VK)({responsePromise:y}));break;case i.lP.PRIVACY_DELETE:a((0,m._e)({responsePromise:y}));break;case i.lP.CONTACT_DETAILS:a((0,m.V$)(e));break;case i.lP.UPLOAD_ATTACHMENT:a((0,m.jz)(e))}}},M=(e,t)=>async(n,r)=>{const{connection:{token:a},environment:{PAT_HOST:s,VERSION:c}}=r(),u=`tempId-${(0,o.A)()}`,p=e.contact_details.contact_type,f={...e,button_type:i.lP.edit_contact_details};n({type:x.tq,data:{id:u,created:(new Date).toISOString(),message:t,buttons:[f],isContactDetails:!0}});const m=await n((0,h.z5)()),{headers:g}=(0,l.A)({token:a},{withCurrentUrl:!0,extra:m}),v={contactType:p,value:t,version:c,buttons:[f],temporaryId:u},y=await n((0,b.et)(`${s}/chatbubble/${i.Ak}/button/contact-details/`,{method:"POST",body:v,headers:g}));(0,d.A)(y)||n({type:x.pz,...y.data})},N=(0,s.A)(async(e,t,n)=>{let{id:r,index:o}=e;const{connection:{token:a},environment:{PAT_HOST:s,VERSION:c}}=n(),u=await t((0,h.z5)()),{headers:d}=(0,l.A)({token:a},{withCurrentUrl:!0,extra:u}),p={chatMessageId:r,version:c};t({type:x.kU,id:r,index:o}),t((0,b.et)(`${s}/chatbubble/${i.Ak}/message-seen`,{method:"PATCH",body:p,headers:d}))},1500,(e,t)=>{const[{index:n}]=e,[{index:r}]=t;return n>r?e:t}),R=(e,t)=>(n,r)=>N({id:e,index:t},n,r),P=e=>{let{url:t,messageId:n}=e;return async(e,r)=>{const{botKey:o}=r().chatbubble,{PAT_HOST:a}=r().environment,{token:s}=r().connection,c=await e((0,h.z5)());e((0,b.et)(`${a}/chatbubble/${i.Ak}/message/reference-click/${n}`,{method:"POST",body:{url:t},...(0,l.A)({botKey:o,token:s},{withCurrentUrl:!0,extra:c})}))}}},4713:(e,t,n)=>{"use strict";var r=n(1780),o=Function.prototype.call;e.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},4851:(e,t,n)=>{"use strict";function r(e){let{token:t,botKey:n,jwt:r}=e,{withCurrentUrl:o,withVersion:a,extra:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{headers:{...t?{"kindly-chatbubble-token":t}:{},...n?{"kindly-bot-key":n}:{},...r?{Authorization:`Bearer ${r}`}:{},...o?{"Current-Url":window.location.href}:{},...a?{"kindly-chat-version":"2.76.7"}:{},...i}}}n.d(t,{A:()=>r})},4871:e=>{"use strict";e.exports=!0},4904:(e,t,n)=>{"use strict";var r={};r[n(8655)("toStringTag")]="z",e.exports="[object z]"===String(r)},4927:(e,t,n)=>{"use strict";n.d(t,{$n:()=>p,A0:()=>f,Bi:()=>c,D7:()=>b,N_:()=>u,hF:()=>g,k5:()=>d});var r=n(3864),o=n(6538),a=n(2628),i=n(534),l=n(492),s=n(8905);const c=r.Ay.button`
|
|
975
|
+
all: unset;
|
|
1152
976
|
cursor: pointer;
|
|
1153
|
-
|
|
977
|
+
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
978
|
+
outline: revert;
|
|
979
|
+
`,u=r.Ay.a`
|
|
980
|
+
text-decoration: underline;
|
|
981
|
+
cursor: pointer;
|
|
982
|
+
|
|
983
|
+
${l.sF}
|
|
984
|
+
`,d=r.AH`
|
|
985
|
+
border: 0;
|
|
986
|
+
text-align: center;
|
|
1154
987
|
border-radius: 6px;
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
${d
|
|
1163
|
-
${
|
|
1164
|
-
`,
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
width:
|
|
1171
|
-
|
|
1172
|
-
|
|
988
|
+
font-weight: normal;
|
|
989
|
+
background: none;
|
|
990
|
+
cursor: pointer;
|
|
991
|
+
text-transform: none;
|
|
992
|
+
|
|
993
|
+
transition: all 0.2s ease;
|
|
994
|
+
`,p=r.Ay.button`
|
|
995
|
+
${d}
|
|
996
|
+
${l.sF}
|
|
997
|
+
`,f=r.Ay.div`
|
|
998
|
+
position: relative;
|
|
999
|
+
overflow: ${e=>{let{$hasFiles:t}=e;return t?"visible":"hidden"}};
|
|
1000
|
+
max-height: 83px;
|
|
1001
|
+
min-height: ${e=>{let{$initialHeight:t}=e;return`${t+1}px`}};
|
|
1002
|
+
height: ${e=>e.$active?e.$targetHeight:e.$initialHeight}px;
|
|
1003
|
+
width: 100%;
|
|
1004
|
+
min-width: 0;
|
|
1005
|
+
`,h=r.AH`
|
|
1006
|
+
max-height: 41px;
|
|
1173
1007
|
overflow: hidden;
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
`,
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
color:
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1008
|
+
white-space: nowrap;
|
|
1009
|
+
text-overflow: ellipsis;
|
|
1010
|
+
`,m=r.AH`
|
|
1011
|
+
${e=>!e.$active&&"max-height: 44px;"};
|
|
1012
|
+
font-size: ${s.J.input};
|
|
1013
|
+
`,g=r.AH`
|
|
1014
|
+
position: relative;
|
|
1015
|
+
z-index: 2;
|
|
1016
|
+
margin-bottom: 0;
|
|
1017
|
+
color: ${e=>{let{theme:t}=e;return(0,o.w5)(t.background,"#FFFFFF","#000000")}};
|
|
1018
|
+
font-size: var(--_kindlychat-font-size-p);
|
|
1019
|
+
line-height: 20px;
|
|
1020
|
+
padding: 7px 50px 8px 16px;
|
|
1021
|
+
${e=>{let{theme:t}=e;return(0,l.Mo)(t.background,.08)}}
|
|
1022
|
+
background-image: none;
|
|
1023
|
+
resize: none; /* stylelint-disable-line */
|
|
1024
|
+
box-shadow: none;
|
|
1025
|
+
border-radius: 18px;
|
|
1026
|
+
max-height: 83px;
|
|
1027
|
+
font-family: ${i.m.default};
|
|
1028
|
+
width: 100%;
|
|
1029
|
+
min-height: 0;
|
|
1030
|
+
border: 1px solid transparent;
|
|
1031
|
+
|
|
1032
|
+
transition: transform 0.3s ease;
|
|
1033
|
+
${e=>e.$hide&&"transform: translateY(-60px)"};
|
|
1034
|
+
${e=>!e.$active&&h};
|
|
1035
|
+
|
|
1036
|
+
@media ${s.jO.maxTablet} {
|
|
1037
|
+
${m}
|
|
1193
1038
|
}
|
|
1194
|
-
`,K=l.Ay.div`
|
|
1195
|
-
font-size: var(--_kindlychat-font-size-sm);
|
|
1196
|
-
`,Y=l.Ay.div`
|
|
1197
|
-
display: flex;
|
|
1198
|
-
flex-direction: row;
|
|
1199
|
-
align-items: center;
|
|
1200
|
-
margin-bottom: 4px;
|
|
1201
|
-
line-height: 16px;
|
|
1202
|
-
`;var X=n(8043);const Z=e=>{if(e.length){const t=new DataTransfer;return e.forEach(e=>{t.items.add(e)}),t}},J=(e,t)=>{let[...n]=e,[...r]=t;const o=n;return r.forEach(e=>{o.some(t=>e.name===t.name&&e.size===t.size)||o.push(e)}),o},Q=function(e){var t,n,r,l;let{name:s,label:c,register:u,validators:d,control:p,id:f,setError:h,trigger:m,setValue:x,clearErrors:w,accept:E=N.oY,...k}=e;const{text:_}=(0,O.d4)(j.Od),{currentLanguageCode:A}=(0,P.A)(),T=(0,y.G8)(d),S=(0,o.useRef)(null),C=(0,o.useCallback)(e=>e.length>5?"You can upload up to 5 files at a time.":"",[]),Q=(0,o.useCallback)(e=>{if(e.length){const t=E.split(",").map(e=>e.replace("/*",""));if([...e].some(e=>!t.some(t=>e.name.endsWith(t))&&!$()(t).call(t,e.type.substring(0,e.type.indexOf("/")))))return`${(0,z.A)(_.file_supported_types,A)}: ${E}`}return""},[E,A,_.file_supported_types]),ee=(0,o.useCallback)(e=>e.length&&[...e].some(e=>e.size/F.aO>F.UN)?`${(0,z.A)(_.file_maximum_size,A)}: ${(0,F.B$)(F.UN*F.aO)}`:"",[A,_.file_maximum_size]),{ref:te,...ne}=u?u(s,T):{ref:void 0},re=(0,o.useRef)(null),{errors:oe,isSubmitted:ae}=(0,i.lN)({name:s,control:p}),ie=(0,D.A)(oe),le=(0,b.A)({name:s,trigger:m,control:p,setError:h,clearErrors:w}),[,se]=(0,o.useState)(null),[ce,ue]=(0,o.useState)([]),[de,pe]=(0,o.useState)(!1);return(0,R.A)("dragover",e=>{e.preventDefault()},re.current),(0,R.A)("dragenter",e=>{e.preventDefault(),pe(!0)},re.current),(0,R.A)("dragleave",e=>{e.preventDefault(),pe(!1)},re.current),(0,R.A)("drop",e=>{e.preventDefault();const t=J(ce,e.dataTransfer.files),n=Q(e.dataTransfer.files)||C(t)||ee(e.dataTransfer.files);if(n)return h(s,{type:"custom",message:n});oe[s]&&w(s),ue(t);const r=Z(t);return x(s,null==r?void 0:r.files,{shouldValidate:!0}),S.current&&null!=r&&r.files.length&&(S.current.files=r.files),pe(!1),!0},re.current),(0,R.A)("change",e=>{e.preventDefault();const t=J(ce,e.target.files),n=C(t)||ee(e.target.files);if(n)return h(s,{type:"custom",message:n});oe[s]&&w(s),ue(t);const r=Z(t);return S.current&&null!=r&&r.files.length&&(S.current.files=r.files),le(e),!0},S.current),a().createElement(a().Fragment,null,a().createElement(B,null,a().createElement(H,{"aria-describedby":f||s,ref:e=>{re.current=e,se(void 0)},$hasError:(null==oe?void 0:oe[s])&&"required"!==(null==oe||null===(t=oe[s])||void 0===t?void 0:t.type),$isOver:de,htmlFor:f||s},(null===(n=oe||ie)||void 0===n||null===(r=n[s])||void 0===r?void 0:r.message)&&a().createElement(Y,null,a().createElement(I.Fc,{width:18,height:18}),a().createElement(K,null,null===(l=(oe||ie)[s])||void 0===l?void 0:l.message)),a().createElement(U,null,(e=>e.split(/\[(.*?)\]/).map((e,t)=>t%2!=0?a().createElement(G,{key:`file-${e}`},e):a().createElement("span",{key:`file-${e}`}," ",e)))(c)),a().createElement(V,Object.assign({multiple:!0,accept:E,name:s,type:"file",id:f||s},(0,y.NR)(T),ne&&{...ne},{ref:e=>{S.current=e,te&&te(e)},"aria-errormessage":`error_${s}`,"aria-invalid":!(0,v.A)(oe)&&ae,"aria-hidden":"true"},k))),a().createElement(W,null,(0,z.A)(_.file_limitation,A),a().createElement(M.A,{text:a().createElement(q,null,a().createElement("div",null,(0,z.A)(_.file_maximum_size,A),": ",(0,F.B$)(F.UN*F.aO)),a().createElement("div",null,(0,z.A)(_.file_supported_types,A),": ",E)),position:"top"},a().createElement(L.A,{width:18,height:18})))),a().createElement(g.A,{control:p,name:s}),ce.map((e,t)=>a().createElement(X.A,{key:`${e.name}-${e.size}}`,file:e,onRemove:()=>{const e=[...ce];e.splice(t,1),ue(e),x(s,e.length?e:void 0,{shouldValidate:!0})}})))};var ee=n(1830)},7355:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(9155),o=n.n(r),a=n(3864),i=n(6538);const l=a.Ay.div`
|
|
1203
|
-
visibility: hidden;
|
|
1204
|
-
padding: 4px 8px;
|
|
1205
|
-
font-size: var(--_kindlychat-font-size-sm);
|
|
1206
|
-
background-color: ${e=>{let{theme:t}=e;return(0,i.w5)(t.background,"rgba(255, 255, 255, 0.9)","rgba(0, 0, 0, 0.9)")}};
|
|
1207
|
-
color: ${e=>{let{theme:t}=e;return(0,i.w5)(t.background,"rgba(0, 0, 0, 0.8)","rgba(255, 255, 255, 0.8)")}};
|
|
1208
|
-
border-radius: 6px;
|
|
1209
|
-
z-index: 99999;
|
|
1210
1039
|
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
align-items: center;
|
|
1221
|
-
position: relative;
|
|
1222
|
-
&:hover ${l} {
|
|
1223
|
-
visibility: visible;
|
|
1040
|
+
${(0,a.A)()&&m}
|
|
1041
|
+
|
|
1042
|
+
&:focus {
|
|
1043
|
+
color: ${e=>{let{theme:t}=e;return(0,o.w5)(t.background,"#FFFFFF","#000000")}};
|
|
1044
|
+
box-shadow: none;
|
|
1045
|
+
border: 1px solid
|
|
1046
|
+
${e=>{let{theme:t}=e;return(0,o.w5)(t.background,"rgba(255, 255, 255, 0.12)","rgba(0, 0, 0, 0.12)")}};
|
|
1047
|
+
|
|
1048
|
+
${l.sF}
|
|
1224
1049
|
}
|
|
1225
|
-
`,c=function(e){let{children:t,text:n,position:a="top",testId:i="tooltip"}=e;const c=(0,r.useRef)(null);return(0,r.useEffect)(()=>{!function(){var e,t;const n=window.document.getElementById("chat-body-container")||window.kindlyChat.shadowRoot.getElementById("chat-body-container"),r=null===(e=c.current)||void 0===e?void 0:e.getBoundingClientRect(),o=null==n?void 0:n.getBoundingClientRect();if(!r||!n)return;const{x:a,y:i,left:l,width:s,height:u}=r||{x:0,y:0,left:0,width:0,height:0},{x:d,y:p,width:f,height:h=0}=o||{x:0,y:0,width:0,height:0};if(null===(t=c.current)||void 0===t||t.style.setProperty("max-width",f-40+"px"),a+s>d+f){var m;const e=d+f,t=Math.abs(e-l-40);null===(m=c.current)||void 0===m||m.style.setProperty("right",`-${t}px`)}else{var g,b;null===(g=c.current)||void 0===g||g.style.setProperty("left","50%"),null===(b=c.current)||void 0===b||b.style.setProperty("transform","translateX(-50%)")}var v,y,x,w;i-p<u&&(null===(v=c.current)||void 0===v||v.style.setProperty("top","100%"),null===(y=c.current)||void 0===y||y.style.setProperty("bottom","auto")),i+u>p+h&&(null===(x=c.current)||void 0===x||x.style.setProperty("top","auto"),null===(w=c.current)||void 0===w||w.style.setProperty("bottom","100%"))}()},[a]),o().createElement(s,{"data-testid":i},t,o().createElement(l,{ref:c,"data-testid":`${i}-text`,$position:a},n))}},7460:(e,t,n)=>{"use strict";var r=n(4603);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7487:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.default=function(e,t){return t?n({},e,t):e},e.exports=t.default},7498:(e,t,n)=>{"use strict";n.d(t,{A:()=>k});var r=n(9155),o=n.n(r),a=n(541),i=n(1872),l=n(5256),s=n(9223),c=n(3864),u=n(8905);const d=c.AH`
|
|
1226
|
-
border-radius: 100px;
|
|
1227
|
-
background-color: ${u.Tj.grayColor};
|
|
1228
|
-
`,p=c.Ay.div`
|
|
1229
|
-
height: 100%;
|
|
1230
|
-
width: 100%;
|
|
1231
|
-
display: grid;
|
|
1232
|
-
background-color: #fff;
|
|
1233
|
-
grid-template-rows: 55px 1fr 70px;
|
|
1234
|
-
`,f=c.Ay.div`
|
|
1235
|
-
padding: 10px 20px;
|
|
1236
|
-
display: grid;
|
|
1237
|
-
align-items: center;
|
|
1238
|
-
grid-template-columns: 30px 1fr 40px;
|
|
1239
|
-
box-shadow: 0px 3px 4px -1px ${u.Tj.shadowColor};
|
|
1240
|
-
`,h=c.Ay.div`
|
|
1241
|
-
height: 20px;
|
|
1242
|
-
width: 110px;
|
|
1243
|
-
margin-left: 20px;
|
|
1244
1050
|
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
flex-direction: column;
|
|
1249
|
-
align-items: center;
|
|
1250
|
-
justify-content: center;
|
|
1251
|
-
text-align: center;
|
|
1051
|
+
&:focus-visible {
|
|
1052
|
+
outline: none;
|
|
1053
|
+
}
|
|
1252
1054
|
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1055
|
+
::placeholder {
|
|
1056
|
+
color: ${e=>{let{theme:t}=e;return(0,o.w5)(t.background,"#FFF","#000")}};
|
|
1057
|
+
opacity: 0.5;
|
|
1058
|
+
}
|
|
1059
|
+
`,b=r.AH`
|
|
1060
|
+
position: relative;
|
|
1258
1061
|
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1062
|
+
&:before {
|
|
1063
|
+
content: '';
|
|
1064
|
+
left: 0;
|
|
1065
|
+
right: 20px;
|
|
1066
|
+
top: -15px;
|
|
1067
|
+
z-index: 1;
|
|
1068
|
+
height: 20px;
|
|
1069
|
+
position: absolute;
|
|
1070
|
+
background: linear-gradient(
|
|
1071
|
+
0deg,
|
|
1072
|
+
${e=>e.theme.background} 0%,
|
|
1073
|
+
${e=>e.theme.background} 25%,
|
|
1074
|
+
rgba(248, 248, 248, 0) 100%
|
|
1075
|
+
);
|
|
1263
1076
|
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
display: flex;
|
|
1267
|
-
align-items: center;
|
|
1268
|
-
padding: 15px 0;
|
|
1269
|
-
margin: 0 20px;
|
|
1270
|
-
border-top: 1px solid ${u.Tj.grayColor};
|
|
1271
|
-
`,y=c.Ay.div`
|
|
1272
|
-
height: 40px;
|
|
1273
|
-
width: 100%;
|
|
1274
|
-
margin-right: 20px;
|
|
1077
|
+
opacity: 1;
|
|
1078
|
+
transition: opacity linear 300ms;
|
|
1275
1079
|
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
padding: 8px 12px;
|
|
1281
|
-
gap: 8px;
|
|
1282
|
-
margin-top: 8px;
|
|
1283
|
-
border-radius: 6px;
|
|
1284
|
-
border: ${e=>{let{theme:t}=e;return`1px solid ${(0,c.w5)(t.panelBackground,"rgba(255, 255, 255, 0.08)","rgba(0, 0, 0, 0.08)")}`}};
|
|
1285
|
-
`,d=s.Ay.div`
|
|
1286
|
-
display: flex;
|
|
1287
|
-
flex-direction: column;
|
|
1288
|
-
flex: 1;
|
|
1289
|
-
`,p=s.Ay.div`
|
|
1080
|
+
${e=>{let{$inspectorOpen:t}=e;return t?"height: 0":""}}
|
|
1081
|
+
}
|
|
1082
|
+
`},4935:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=()=>{}},4953:e=>{"use strict";e.exports=n},5013:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=e=>e.replace(/_\w/g,e=>e[1].toUpperCase())},5024:(e,t,n)=>{"use strict";var r=n(1203);e.exports=!r(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},5047:(e,t,n)=>{"use strict";n.d(t,{H2:()=>s,H3:()=>c,H5:()=>u,cp:()=>d,fz:()=>i,mt:()=>l});var r=n(3864),o=n(534),a=n(8905);const i=r.Ay.p`
|
|
1083
|
+
color: ${a.Tj.darkColor};
|
|
1290
1084
|
font-size: var(--_kindlychat-font-size-p);
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1085
|
+
font-weight: normal;
|
|
1086
|
+
line-height: 20px;
|
|
1087
|
+
font-family: ${o.m.default};
|
|
1088
|
+
word-break: normal;
|
|
1089
|
+
overflow-wrap: anywhere;
|
|
1090
|
+
`,l=(0,r.Ay)(i)`
|
|
1091
|
+
font-size: var(--_kindlychat-font-size-xs);
|
|
1092
|
+
opacity: 0.6;
|
|
1093
|
+
`,s=r.Ay.h2`
|
|
1094
|
+
color: ${a.Tj.darkColor};
|
|
1095
|
+
font-size: var(--_kindlychat-font-size-h2);
|
|
1096
|
+
font-weight: normal;
|
|
1097
|
+
margin: 0 0 30px;
|
|
1098
|
+
line-height: 30px;
|
|
1099
|
+
font-family: ${o.m.default};
|
|
1100
|
+
`,c=r.Ay.h3`
|
|
1101
|
+
color: ${a.Tj.darkColor};
|
|
1102
|
+
font-size: var(--_kindlychat-font-size-h3);
|
|
1103
|
+
font-weight: normal;
|
|
1104
|
+
line-height: 30px;
|
|
1105
|
+
margin: 0 0 15px;
|
|
1106
|
+
font-family: ${o.m.default};
|
|
1107
|
+
`,u=(r.Ay.h4`
|
|
1108
|
+
color: ${a.Tj.darkColor};
|
|
1109
|
+
font-size: var(--_kindlychat-font-size-h4);
|
|
1110
|
+
font-weight: normal;
|
|
1111
|
+
margin: 0 0 10px;
|
|
1112
|
+
font-family: ${o.m.default};
|
|
1113
|
+
`,r.Ay.h5`
|
|
1114
|
+
color: ${a.Tj.darkColor};
|
|
1115
|
+
font-size: var(--_kindlychat-font-size-m);
|
|
1116
|
+
font-weight: normal;
|
|
1117
|
+
margin: 0 0 10px;
|
|
1118
|
+
line-height: 24px;
|
|
1119
|
+
font-family: ${o.m.default};
|
|
1120
|
+
`),d=(r.Ay.h6`
|
|
1121
|
+
color: ${a.Tj.darkColor};
|
|
1122
|
+
font-size: var(--font-size-h6);
|
|
1123
|
+
font-weight: normal;
|
|
1124
|
+
margin: 0 0 10px;
|
|
1125
|
+
font-family: ${o.m.default};
|
|
1126
|
+
`,r.Ay.span`
|
|
1127
|
+
color: ${a.Tj.primaryColor};
|
|
1128
|
+
font-family: ${o.m.KindlySans};
|
|
1129
|
+
opacity: 1;
|
|
1130
|
+
|
|
1131
|
+
a {
|
|
1132
|
+
color: ${a.Tj.primaryColor};
|
|
1133
|
+
text-decoration: none;
|
|
1134
|
+
|
|
1135
|
+
&:hover,
|
|
1136
|
+
&:focus,
|
|
1137
|
+
&:active,
|
|
1138
|
+
&:visited {
|
|
1139
|
+
color: ${a.Tj.primaryColor};
|
|
1306
1140
|
}
|
|
1307
1141
|
}
|
|
1308
|
-
`,m=s.Ay.div`
|
|
1142
|
+
`)},5161:(e,t,n)=>{"use strict";var r=n(4317),o=n(8341),a=n(1019),i=Array.prototype,l=String.prototype;e.exports=function(e){var t=e.includes;return e===i||r(i,e)&&t===i.includes?o:"string"==typeof e||e===l||r(l,e)&&t===l.includes?a:t}},5173:(e,t,n)=>{"use strict";function r(e){const t=null==e?void 0:e.status;return Boolean(t&&!(t>=200&&t<=299))}n.d(t,{A:()=>r})},5256:(e,t,n)=>{"use strict";n.d(t,{Fc:()=>x,A6:()=>a,fl:()=>i,US:()=>l,gp:()=>m,WI:()=>v,Gr:()=>b,V$:()=>c,bM:()=>s,T4:()=>y,U:()=>f,qY:()=>g,gR:()=>u,fN:()=>h,qx:()=>d,Ze:()=>p});var r=n(9155),o=n.n(r);const a=function(e){let{fill:t="none",stroke:n="white",...r}=e;return o().createElement("svg",Object.assign({width:"24",height:"25",viewBox:"0 0 24 25",fill:t,xmlns:"http://www.w3.org/2000/svg"},r),o().createElement("path",{d:"M14.25 7.73999L8.75 12.99L14.25 18.24",stroke:n,strokeWidth:"1.5",strokeLinecap:"square"}))},i=function(e){let{fill:t="none",stroke:n="white",...r}=e;return o().createElement("svg",Object.assign({width:"24",height:"25",viewBox:"0 0 24 25",fill:t,xmlns:"http://www.w3.org/2000/svg"},r),o().createElement("path",{d:"M9.75 7.73999L15.25 12.99L9.75 18.24",stroke:n,strokeWidth:"1.5",strokeLinecap:"square"}))};function l(e){let{color:t,...n}=e;return o().createElement("svg",Object.assign({},n,{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),o().createElement("path",{d:"M17.25 6.75L6.75 17.25",stroke:t||"#445265",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M6.75 6.75L17.25 17.25",stroke:t||"#445265",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))}n(1949);const s=function(e){let{width:t="16px",height:n="12px",fill:r="rgb(0, 105, 255)"}=e;return o().createElement("svg",{width:t,height:n,viewBox:"0 0 16 12"},o().createElement("path",{d:"M8 12c3.6 0 6.4-3.1 7.6-4.9.5-.7.5-1.6 0-2.3C14.4 3.1 11.6 0 8 0 4.4 0 1.6 3.1.4 4.9c-.5.7-.5 1.6 0 2.2C1.6 8.9 4.4 12 8 12zm0-9c1.7 0 3 1.3 3 3S9.7 9 8 9 5 7.7 5 6s1.3-3 3-3z",fill:r}))},c=function(e){let{width:t="16px",height:n="16px",fill:r="rgb(0, 105, 255)"}=e;return o().createElement("svg",{width:t,height:n},o().createElement("g",{fill:r},o().createElement("path",{d:"M14.6 5.6l-8.2 8.2c.5.1 1.1.2 1.6.2 3.6 0 6.4-3.1 7.6-4.9.5-.7.5-1.6 0-2.3-.2-.3-.6-.7-1-1.2zM14.3.3L11.6 3C10.5 2.4 9.3 2 8 2 4.4 2 1.6 5.1.4 6.9c-.5.7-.5 1.6 0 2.2.5.8 1.4 1.8 2.4 2.7L.3 14.3c-.4.4-.4 1 0 1.4.2.2.4.3.7.3.3 0 .5-.1.7-.3l14-14c.4-.4.4-1 0-1.4-.4-.4-1-.4-1.4 0zm-9 9C5.1 8.9 5 8.5 5 8c0-1.7 1.3-3 3-3 .5 0 .9.1 1.3.3l-4 4z"})))},u=function(e){let{...t}=e;return o().createElement("svg",Object.assign({},t,{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),o().createElement("path",{d:"M18.25 12.25L5.75 12.25",stroke:"#445265",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))},d=function(e){return o().createElement("svg",Object.assign({},e,{fill:"none",xmlns:"http://www.w3.org/2000/svg"}),o().createElement("g",{clipPath:"url(#a)",stroke:"#6A778A",strokeWidth:"1.5",strokeLinecap:"square"},o().createElement("path",{d:"M4.75 4.75 19.25 12l-14.5 7.25L8.25 12l-3.5-7.25ZM8.5 12h2.75"})),o().createElement("defs",null,o().createElement("clipPath",{id:"a"},o().createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"}))))},p=function(e){return o().createElement("svg",Object.assign({},e,{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),o().createElement("path",{d:"M5.62117 14.9627L6.72197 15.1351C7.53458 15.2623 8.11491 16.0066 8.05506 16.8451L7.97396 17.9816C7.95034 18.3127 8.12672 18.6244 8.41885 18.7686L9.23303 19.1697C9.52516 19.3139 9.87399 19.2599 10.1126 19.0352L10.9307 18.262C11.5339 17.6917 12.4646 17.6917 13.0685 18.262L13.8866 19.0352C14.1252 19.2608 14.4733 19.3139 14.7662 19.1697L15.5819 18.7678C15.8733 18.6244 16.0489 18.3135 16.0253 17.9833L15.9441 16.8451C15.8843 16.0066 16.4646 15.2623 17.2772 15.1351L18.378 14.9627C18.6985 14.9128 18.9568 14.6671 19.0292 14.3433L19.23 13.4428C19.3025 13.119 19.1741 12.7831 18.9064 12.5962L17.9875 11.9526C17.3095 11.4774 17.1024 10.5495 17.5119 9.82051L18.067 8.83299C18.2284 8.54543 18.2017 8.18538 17.9993 7.92602L17.4363 7.2035C17.2339 6.94413 16.8969 6.83701 16.5867 6.93447L15.5221 7.26794C14.7355 7.51441 13.8969 7.1012 13.5945 6.31908L13.1866 5.26148C13.0669 4.95218 12.7748 4.7492 12.4496 4.75L11.5472 4.75242C11.222 4.75322 10.9307 4.95782 10.8126 5.26793L10.4149 6.31344C10.1157 7.1004 9.27319 7.51683 8.4842 7.26874L7.37553 6.92078C7.0645 6.82251 6.72591 6.93044 6.52355 7.19142L5.96448 7.91474C5.76212 8.17652 5.73771 8.53738 5.90228 8.82493L6.47 9.81487C6.88812 10.5446 6.68339 11.4814 6.00149 11.9591L5.0936 12.5954C4.82588 12.7831 4.69754 13.119 4.76998 13.442L4.97077 14.3425C5.04242 14.6671 5.30069 14.9128 5.62117 14.9627Z",stroke:"#445265",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M13.5911 10.4089C14.4696 11.2875 14.4696 12.7125 13.5911 13.5911C12.7125 14.4696 11.2875 14.4696 10.4089 13.5911C9.53036 12.7125 9.53036 11.2875 10.4089 10.4089C11.2875 9.53036 12.7125 9.53036 13.5911 10.4089Z",stroke:"#445265",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))},f=function(e){let{crop:t=!1,...n}=e;const o=t?"4 4 16 16":"0 0 24 24";return r.createElement("svg",Object.assign({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:o},n),r.createElement("path",{d:"M12.75 19.25L16 12.75L19.25 19.25",stroke:"#333",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("path",{d:"M14 17.25H18",stroke:"#333",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("path",{d:"M4.75 6.75H13.25",stroke:"#333",strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),r.createElement("path",{d:"M9 6.5V4.75",stroke:"#333",strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),r.createElement("path",{d:"M11.25 6.75C11.25 6.75 11.25 9.25 9.25 11.25C7.25 13.25 4.75 13.25 4.75 13.25",stroke:"#333",strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),r.createElement("path",{d:"M12.25 13.25C12.25 13.25 9.75 13.25 7.75 11.25C7.34551 10.8455 6.75 9.75 6.75 9.75",stroke:"#333",strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}))},h=function(e){return o().createElement("svg",Object.assign({},e,{viewBox:"0 0 15 15",xmlns:"https://www.w3.org/2000/svg"}),o().createElement("path",{d:"M8.7.2l.7 6.4 2.1-2.1A5.01 5.01 0 018 13a5.01 5.01 0 01-3.5-8.5c.6-.6 1.4-1.1 2.3-1.3l-.6-1.9C5 1.6 3.9 2.2 3 3.1A7.06 7.06 0 003 13c1.3 1.3 3.1 2 4.9 2 1.9 0 3.6-.7 4.9-2 2.7-2.7 2.7-7.1 0-9.9L15 .9 8.7.2z",fill:"#0069ff",fillRule:"evenodd"}))},m=function(e){return o().createElement("svg",Object.assign({},e,{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),o().createElement("path",{d:"M3.16675 4.49998V11.5C3.16675 12.2364 3.7637 12.8333 4.50008 12.8333H11.5001C12.2365 12.8333 12.8334 12.2364 12.8334 11.5V4.49998C12.8334 3.7636 12.2365 3.16665 11.5001 3.16665H4.50008C3.7637 3.16665 3.16675 3.7636 3.16675 4.49998Z",stroke:"white",strokeLinecap:"square"}),o().createElement("path",{d:"M5.16675 8.49999V10.8333H7.50008",stroke:"white",strokeLinecap:"square"}),o().createElement("path",{d:"M10.8333 7.49999V5.16666H8.5",stroke:"white",strokeLinecap:"square"}))},g=function(e){let{color:t="white",...n}=e;return o().createElement("svg",Object.assign({},n,{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),o().createElement("path",{d:"M11.1667 8.83333L12.0001 8C13.1047 6.89539 13.1047 5.10456 12.0001 3.99999C10.8955 2.89543 9.10468 2.89543 8.00008 3.99999L7.16675 4.83333",stroke:t,strokeLinecap:"square",strokeLinejoin:"round"}),o().createElement("path",{d:"M4.83315 7.16666L3.99981 8C2.89525 9.1046 2.89525 10.8954 3.99981 12C5.10438 13.1046 6.89521 13.1046 7.99981 12L8.83315 11.1667",stroke:t,strokeLinecap:"square",strokeLinejoin:"round"}),o().createElement("path",{d:"M9.5 6.5L6.5 9.5",stroke:t,strokeLinecap:"square",strokeLinejoin:"round"}))};function b(e){let{size:t=24,color:n="#333",className:r}=e;return o().createElement("svg",{width:t,height:t,className:r,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o().createElement("title",null,"External link, opens in a new tab"),o().createElement("path",{d:"M17.25 15.25V6.75H8.75",stroke:n,strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),o().createElement("path",{d:"M17 7L6.75 17.25",stroke:n,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))}const v=function(e){return o().createElement("svg",Object.assign({},e,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),o().createElement("path",{d:"M6.87348 6.87347C9.70478 4.04217 14.2952 4.04217 17.1265 6.87347C19.9578 9.70477 19.9578 14.2952 17.1265 17.1265C14.2952 19.9578 9.70478 19.9578 6.87348 17.1265C4.04218 14.2952 4.04218 9.70477 6.87348 6.87347Z",stroke:"#141414",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M14.2981 9.7019L9.7019 14.2981",stroke:"#141414",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M14.2981 14.2981L9.7019 9.7019",stroke:"#141414",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))},y=function(e){let{color:t,...n}=e;return o().createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),o().createElement("g",{clipPath:"url(#clip0_519_2415)"},o().createElement("path",{d:"M19.1139 19.1612C18.2263 19.2692 17.4673 19.4161 16.704 19.4427C15.4118 19.4878 14.1095 19.5471 12.8248 19.4387C10.2337 19.2202 7.90467 18.3755 6.23998 16.1792C3.04902 11.9685 5.4046 5.64697 10.5428 4.64327C14.6026 3.85025 18.3702 6.42302 19.0886 10.5352C19.4999 12.8902 18.8789 14.9851 17.3057 16.7773C17.2046 16.8925 17.1038 17.0077 16.9725 17.1577C17.8893 18.0155 18.6031 18.6834 19.1139 19.1612Z",stroke:t,strokeWidth:"1.5"})),o().createElement("defs",null,o().createElement("clipPath",{id:"clip0_519_2415"},o().createElement("rect",{width:"24",height:"24",fill:t}))))},x=function(e){return o().createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),o().createElement("path",{d:"M12 15H12.01",stroke:"#333333",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M5.41136 10.4033L10.4033 5.41136C11.2852 4.52955 12.7148 4.52955 13.5967 5.41136L18.5886 10.4033C19.4705 11.2852 19.4705 12.7148 18.5886 13.5967L13.5967 18.5886C12.7148 19.4705 11.2852 19.4705 10.4033 18.5886L5.41136 13.5967C4.52955 12.7148 4.52955 11.2852 5.41136 10.4033Z",stroke:"#333333",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M12 8.75V12.25",stroke:"#333333",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))}},5279:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});const r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let o;const a=new Uint8Array(16),i=[];for(let e=0;e<256;++e)i.push((e+256).toString(16).slice(1));const l=function(e,t,n){if(r.randomUUID&&!t&&!e)return r.randomUUID();const l=(e=e||{}).random??e.rng?.()??function(){if(!o){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");o=crypto.getRandomValues.bind(crypto)}return o(a)}();if(l.length<16)throw new Error("Random bytes length must be >= 16");if(l[6]=15&l[6]|64,l[8]=63&l[8]|128,t){if((n=n||0)<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=l[e];return t}return function(e,t=0){return(i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]).toLowerCase()}(l)}},5341:(e,t,n)=>{"use strict";var r=n(493),o=n(6281);e.exports=function(e){var t=r(e,"string");return o(t)?t:t+""}},5353:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(2279),o=n(1121);const a=(e,t,n,a)=>{const i=[o.A,e=>((e,t,n,o)=>{let{attachment_ids:a=[],...i}=e;return{...i,attachments:(a||[]).map(e=>{return t.find((n=e,function(){let{id:e,temporaryId:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:void 0,temporaryId:void 0};return e===n||t===n}));var n}).filter(e=>void 0!==e).map(e=>({...e,url:(0,r.l)(e,n,o)}))}})(e,t,n,a)];return i.reduce((e,t)=>t(e),e||{})}},5426:(e,t,n)=>{"use strict";var r=n(3057),o=TypeError;e.exports=function(e){if(r(e))throw new o("Can't call method on "+e);return e}},5545:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(9155),o=n.n(r),a=n(3864),i=n(3249);const l=a.Ay.div`
|
|
1309
1143
|
display: flex;
|
|
1310
|
-
flex-direction: row;
|
|
1311
|
-
justify-content: center;
|
|
1312
1144
|
align-items: center;
|
|
1313
|
-
|
|
1314
|
-
|
|
1145
|
+
justify-content: center;
|
|
1146
|
+
border-radius: 100px;
|
|
1147
|
+
transition: all cubic-bezier(0.61, 0.1, 0.42, 0.9) 150ms;
|
|
1148
|
+
min-height: 18px;
|
|
1149
|
+
background-color: transparent;
|
|
1150
|
+
${e=>{let{$minHeight:t}=e;return t&&`min-height: ${t}px;`}}
|
|
1151
|
+
`,s=a.Ay.span`
|
|
1152
|
+
width: 6px;
|
|
1153
|
+
height: 6px;
|
|
1154
|
+
opacity: 0;
|
|
1155
|
+
border-radius: 50%;
|
|
1156
|
+
background: ${e=>e.theme.buttonText};
|
|
1157
|
+
background-color: ${e=>e.theme.buttonText};
|
|
1315
1158
|
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1159
|
+
&:nth-of-type(1) {
|
|
1160
|
+
animation: 1s ${i.Zm} infinite 0.3s;
|
|
1161
|
+
}
|
|
1162
|
+
&:nth-of-type(2) {
|
|
1163
|
+
margin: 0 5px;
|
|
1164
|
+
animation: 1s ${i.Zm} infinite 0.6s;
|
|
1320
1165
|
}
|
|
1321
|
-
`,g=function(e){let{file:t,canRemove:n=!0,onRemove:r}=e;return o().createElement(u,null,o().createElement(h,null,o().createElement(i.A,{title:"attachment"})),o().createElement(d,null,o().createElement(p,null,t.name),o().createElement(f,null,(0,l.B$)(t.size))),n&&o().createElement(m,{onClick:r},o().createElement(a.US,{width:24,height:24})))}},8069:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const r=new Set;function o(e){var t,n;const{feedbackSettings:o}=window.__KINDLY_SETTINGS__,a=null==o||null===(t=o[e])||void 0===t?void 0:t.forms.find(e=>"bot_conversation"===e.trigger_type&&e.is_active),i=null==o||null===(n=o[e])||void 0===n?void 0:n.forms.find(e=>"handover_conversation"===e.trigger_type&&e.is_active);return{botConversationFeedback:a,handoverConversationFeedback:i,preloadFeedbackImages:e=>{const t="bot_conversation"===e?a:i;t&&t.rating_scale.edit_labels.forEach(e=>{if(r.has(e.image))return;const t=new Image;t.src=e.image,r.add(t.src)})}}}},8089:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",o=9007199254740991,a="[object Arguments]",i="[object Function]",l="[object Object]",s=/^\[object .+?Constructor\]$/,c=/^(?:0|[1-9]\d*)$/,u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u[a]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u[i]=u["[object Map]"]=u["[object Number]"]=u[l]=u["[object RegExp]"]=u["[object Set]"]=u["[object String]"]=u["[object WeakMap]"]=!1;var d,p,f,h="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,m="object"==typeof self&&self&&self.Object===Object&&self,g=h||m||Function("return this")(),b=t&&!t.nodeType&&t,v=b&&e&&!e.nodeType&&e,y=v&&v.exports===b,x=y&&h.process,w=function(){try{return v&&v.require&&v.require("util").types||x&&x.binding&&x.binding("util")}catch(e){}}(),E=w&&w.isTypedArray,k=Array.prototype,_=Function.prototype,A=Object.prototype,T=g["__core-js_shared__"],S=_.toString,C=A.hasOwnProperty,$=(d=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+d:"",O=A.toString,I=S.call(Object),L=RegExp("^"+S.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),M=y?g.Buffer:void 0,N=g.Symbol,R=g.Uint8Array,P=(M&&M.allocUnsafe,p=Object.getPrototypeOf,f=Object,function(e){return p(f(e))}),D=Object.create,j=A.propertyIsEnumerable,F=k.splice,z=N?N.toStringTag:void 0,B=function(){try{var e=le(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),H=M?M.isBuffer:void 0,U=Math.max,V=Date.now,G=le(g,"Map"),W=le(Object,"create"),q=function(){function e(){}return function(t){if(!ye(t))return{};if(D)return D(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function K(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Y(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function X(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Z(e){var t=this.__data__=new Y(e);this.size=t.size}function J(e,t,n){(void 0!==n&&!pe(e[t],n)||void 0===n&&!(t in e))&&te(e,t,n)}function Q(e,t,n){var r=e[t];C.call(e,t)&&pe(r,n)&&(void 0!==n||t in e)||te(e,t,n)}function ee(e,t){for(var n=e.length;n--;)if(pe(e[n][0],t))return n;return-1}function te(e,t,n){"__proto__"==t&&B?B(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}K.prototype.clear=function(){this.__data__=W?W(null):{},this.size=0},K.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},K.prototype.get=function(e){var t=this.__data__;if(W){var n=t[e];return n===r?void 0:n}return C.call(t,e)?t[e]:void 0},K.prototype.has=function(e){var t=this.__data__;return W?void 0!==t[e]:C.call(t,e)},K.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=W&&void 0===t?r:t,this},Y.prototype.clear=function(){this.__data__=[],this.size=0},Y.prototype.delete=function(e){var t=this.__data__,n=ee(t,e);return!(n<0||(n==t.length-1?t.pop():F.call(t,n,1),--this.size,0))},Y.prototype.get=function(e){var t=this.__data__,n=ee(t,e);return n<0?void 0:t[n][1]},Y.prototype.has=function(e){return ee(this.__data__,e)>-1},Y.prototype.set=function(e,t){var n=this.__data__,r=ee(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},X.prototype.clear=function(){this.size=0,this.__data__={hash:new K,map:new(G||Y),string:new K}},X.prototype.delete=function(e){var t=ie(this,e).delete(e);return this.size-=t?1:0,t},X.prototype.get=function(e){return ie(this,e).get(e)},X.prototype.has=function(e){return ie(this,e).has(e)},X.prototype.set=function(e,t){var n=ie(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Z.prototype.clear=function(){this.__data__=new Y,this.size=0},Z.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Z.prototype.get=function(e){return this.__data__.get(e)},Z.prototype.has=function(e){return this.__data__.has(e)},Z.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Y){var r=n.__data__;if(!G||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new X(r)}return n.set(e,t),this.size=n.size,this};function ne(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":z&&z in Object(e)?function(e){var t=C.call(e,z),n=e[z];try{e[z]=void 0;var r=!0}catch(e){}var o=O.call(e);return r&&(t?e[z]=n:delete e[z]),o}(e):function(e){return O.call(e)}(e)}function re(e){return xe(e)&&ne(e)==a}function oe(e,t,n,r,o){e!==t&&function(e,t,n){for(var r=-1,o=Object(e),a=n(e),i=a.length;i--;){var l=a[++r];if(!1===t(o[l],l,o))break}}(t,function(a,i){if(o||(o=new Z),ye(a))!function(e,t,n,r,o,a,i){var s=ue(e,n),c=ue(t,n),u=i.get(c);if(u)J(e,n,u);else{var d,p,f,h,m,g=a?a(s,c,n+"",e,t,i):void 0,b=void 0===g;if(b){var v=he(c),y=!v&&ge(c),x=!v&&!y&&we(c);g=c,v||y||x?he(s)?g=s:xe(m=s)&&me(m)?g=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(s):y?(b=!1,g=function(e){return e.slice()}(c)):x?(b=!1,h=new(f=(d=c).buffer).constructor(f.byteLength),new R(h).set(new R(f)),p=h,g=new d.constructor(p,d.byteOffset,d.length)):g=[]:function(e){if(!xe(e)||ne(e)!=l)return!1;var t=P(e);if(null===t)return!0;var n=C.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&S.call(n)==I}(c)||fe(c)?(g=s,fe(s)?g=function(e){return function(e,t,n){var r=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var i=t[o],l=void 0;void 0===l&&(l=e[i]),r?te(n,i,l):Q(n,i,l)}return n}(e,Ee(e))}(s):ye(s)&&!be(s)||(g=function(e){return"function"!=typeof e.constructor||ce(e)?{}:q(P(e))}(c))):b=!1}b&&(i.set(c,g),o(g,c,r,a,i),i.delete(c)),J(e,n,g)}}(e,t,i,n,oe,r,o);else{var s=r?r(ue(e,i),a,i+"",e,t,o):void 0;void 0===s&&(s=a),J(e,i,s)}},Ee)}var ae=B?function(e,t){return B(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:Ae;function ie(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function le(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!ye(e)||function(e){return!!$&&$ in e}(e))&&(be(e)?L:s).test(function(e){if(null!=e){try{return S.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function se(e,t){var n=typeof e;return!!(t=null==t?o:t)&&("number"==n||"symbol"!=n&&c.test(e))&&e>-1&&e%1==0&&e<t}function ce(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||A)}function ue(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var de=function(e){var t=0,n=0;return function(){var r=V(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ae);function pe(e,t){return e===t||e!=e&&t!=t}var fe=re(function(){return arguments}())?re:function(e){return xe(e)&&C.call(e,"callee")&&!j.call(e,"callee")},he=Array.isArray;function me(e){return null!=e&&ve(e.length)&&!be(e)}var ge=H||function(){return!1};function be(e){if(!ye(e))return!1;var t=ne(e);return t==i||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ve(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function ye(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function xe(e){return null!=e&&"object"==typeof e}var we=E?function(e){return function(t){return e(t)}}(E):function(e){return xe(e)&&ve(e.length)&&!!u[ne(e)]};function Ee(e){return me(e)?function(e,t){var n=he(e),r=!n&&fe(e),o=!n&&!r&&ge(e),a=!n&&!r&&!o&&we(e),i=n||r||o||a,l=i?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],s=l.length;for(var c in e)!t&&!C.call(e,c)||i&&("length"==c||o&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||se(c,s))||l.push(c);return l}(e,!0):function(e){if(!ye(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=ce(e),n=[];for(var r in e)("constructor"!=r||!t&&C.call(e,r))&&n.push(r);return n}(e)}var ke,_e=(ke=function(e,t,n){oe(e,t,n)},function(e,t){return de(function(e,t,n){return t=U(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,a=U(r.length-t,0),i=Array(a);++o<a;)i[o]=r[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=r[o];return l[t]=n(i),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,l)}}(e,t,Ae),e+"")}(function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,a=r>2?t[2]:void 0;for(o=ke.length>3&&"function"==typeof o?(r--,o):void 0,a&&function(e,t,n){if(!ye(n))return!1;var r=typeof t;return!!("number"==r?me(n)&&se(t,n.length):"string"==r&&t in n)&&pe(n[t],e)}(t[0],t[1],a)&&(o=r<3?void 0:o,r=1),e=Object(e);++n<r;){var i=t[n];i&&ke(e,i,n)}return e}));function Ae(e){return e}e.exports=_e},8099:e=>{"use strict";e.exports={}},8130:(e,t,n)=>{"use strict";var r=n(8146);e.exports=function(e){return r(e.length)}},8137:e=>{"use strict";e.exports=function(){}},8141:(e,t,n)=>{"use strict";var r=n(3753);e.exports=function(e,t){return r[e]||(r[e]=t||{})}},8146:(e,t,n)=>{"use strict";var r=n(9903),o=Math.min;e.exports=function(e){var t=r(e);return t>0?o(t,9007199254740991):0}},8172:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(9749),o=n.n(r);function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.entries(e).reduce((e,n)=>{let[r,a]=n;return{...e,...o()(t).call(t,r)?{[r]:a}:{}}},{})}},8309:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>Ws});var r=n(9155),o=n.n(r),a=n(3864),i=n(8905);const l=a.Ay.div`
|
|
1166
|
+
&:nth-of-type(3) {
|
|
1167
|
+
animation: 1s ${i.Zm} infinite 0.9s;
|
|
1168
|
+
}
|
|
1169
|
+
`;function c(e){let{loading:t=!1,isCheckbox:n=!1,flat:r,minHeight:a}=e;return o().createElement(l,{$minHeight:a,$flat:r,$isCheckbox:n,$loading:t},o().createElement(s,null),o().createElement(s,null),o().createElement(s,null))}},5546:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function o(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){var n=r({key:"redux",merge:i.default,slicer:a.default,serialize:JSON.stringify,deserialize:JSON.parse},t),o=n.key,l=n.merge,s=n.slicer,c=n.serialize,u=n.deserialize;return function(t){return function(n,r,a){"function"==typeof r&&void 0===a&&(a=r,r=void 0);var i=void 0,d=void 0;try{i=u(localStorage.getItem(o)),d=l(r,i)}catch(e){console.warn("Failed to retrieve initialize state from localStorage:",e)}var p=t(n,d,a),f=s(e);return p.subscribe(function(){var e=p.getState(),t=f(e);try{localStorage.setItem(o,c(t))}catch(e){console.warn("Unable to persist state to localStorage:",e)}}),p}}};var a=o(n(8639)),i=o(n(7487));e.exports=t.default},5547:(e,t,n)=>{"use strict";var r,o,a=n(8900),i=n(3531),l=a.process,s=a.Deno,c=l&&l.versions||s&&s.version,u=c&&c.v8;u&&(o=(r=u.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&i&&(!(r=i.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=i.match(/Chrome\/(\d+)/))&&(o=+r[1]),e.exports=o},5564:(e,t,n)=>{"use strict";n.d(t,{$u:()=>d,z5:()=>p,gm:()=>u,JL:()=>c});var r=n(2221),o=n(4851);var a=n(7243),i=n(7173);const l=()=>({type:i.zZ});let s=null;const c=()=>async(e,t)=>{if(!s)return;const{connection:{token:n},environment:{PAT_HOST:l}}=t(),{headers:c}=(0,o.A)({token:n},{withCurrentUrl:!0}),{data:u,status:d}=await e((0,a.et)(`${l}/chatbubble/${r.Ak}/auth/identify`,{method:"POST",headers:c,body:s}));200===d&&e({type:i.qQ,...u})},u=e=>async(t,n)=>{s=e;const{connection:{token:r}}=n();r&&t(c())},d=()=>async(e,t)=>{const{chatbubble:{chatId:n},connection:{token:s},environment:{PAT_HOST:c}}=t(),{getAuthToken:u}=window.__KINDLY_SETTINGS__;if(!n||!u)return void e(l());let d;try{d=await u(n)}catch(e){console.error("Chatbubble auth failed:",e),d=null}if(!d)return void e(l());const{headers:p}=(0,o.A)({jwt:d,token:s},{withCurrentUrl:!0}),f=await e((0,a.et)(`${c}/chatbubble/${r.Ak}/auth/chat`,{method:"POST",headers:p},{onError:()=>e(l())}));null!=f&&f.data&&e({type:i.K_,token:d,avatarUrl:f.data.avatar_url,fullName:f.data.full_name})},p=()=>async(e,t)=>{const{auth:{isAuthenticated:n,isRefreshing:r,token:o}}=t();if(!n)return null;if(r)return await new Promise(e=>{setTimeout(e,200)}),p()(e,t);const{getAuthToken:a}=window.__KINDLY_SETTINGS__;a&&function(e){const t=function(e){if(!e)return null;const t=e.match(/^[A-Za-z0-9-_=]+\.([A-Za-z0-9-_=]+)\.?[A-Za-z0-9-_.+/=]*$/);if(!t)return null;try{return JSON.parse(window.atob(t[1]))}catch(e){return null}}(e);return!t||t.exp-Math.floor((new Date).getTime()/1e3)<30}(o)&&(e({type:i.Rk}),await e(d()),e({type:i.dp}));const{auth:l}=t();return l.isAuthenticated?{Authorization:`Bearer ${l.token}`}:null}},5644:(e,t,n)=>{"use strict";var r=n(1949),o=n.n(r),a=n(2221),i=n(3211);o().shape({button_type:o().oneOf([...Object.values(a.lP),...Object.values(a.lP).map(i.A)]).isRequired,is_active:o().bool,label:o().string.isRequired,value:o().string,new_context:o().object,index:o().number,language_code:o().string,open_in_new_tab:o().bool})},5767:(e,t,n)=>{"use strict";n.d(t,{ot:()=>A,n_:()=>w,Ay:()=>T,WG:()=>y,CJ:()=>b,GY:()=>k,wm:()=>x,zp:()=>_,m9:()=>E});var r=n(9749),o=n.n(r);var a=e=>Array.isArray(e)?e:[e];Symbol(),Object.getPrototypeOf({});var i="undefined"!=typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function l(){return{s:0,v:void 0,o:null,p:null}}function s(e,t={}){let n={s:0,v:void 0,o:null,p:null};const{resultEqualityCheck:r}=t;let o,a=0;function s(){let t=n;const{length:s}=arguments;for(let e=0,n=s;e<n;e++){const n=arguments[e];if("function"==typeof n||"object"==typeof n&&null!==n){let e=t.o;null===e&&(t.o=e=new WeakMap);const r=e.get(n);void 0===r?(t=l(),e.set(n,t)):t=r}else{let e=t.p;null===e&&(t.p=e=new Map);const r=e.get(n);void 0===r?(t=l(),e.set(n,t)):t=r}}const c=t;let u;if(1===t.s)u=t.v;else if(u=e.apply(null,arguments),a++,r){const e=o?.deref?.()??o;null!=e&&r(e,u)&&(u=e,0!==a&&a--),o="object"==typeof u&&null!==u||"function"==typeof u?new i(u):u}return c.s=1,c.v=u,u}return s.clearCache=()=>{n={s:0,v:void 0,o:null,p:null},s.resetResultsCount()},s.resultsCount=()=>a,s.resetResultsCount=()=>{a=0},s}function c(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r=0,o=0,i={},l=e.pop();"object"==typeof l&&(i=l,l=e.pop()),function(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}(l,`createSelector expects an output function after the inputs, but received: [${typeof l}]`);const c={...n,...i},{memoize:u,memoizeOptions:d=[],argsMemoize:p=s,argsMemoizeOptions:f=[],devModeChecks:h={}}=c,m=a(d),g=a(f),b=function(e){const t=Array.isArray(e[0])?e[0]:e;return function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(e=>"function"==typeof e)){const n=e.map(e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e).join(", ");throw new TypeError(`${t}[${n}]`)}}(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}(e),v=u(function(){return r++,l.apply(null,arguments)},...m),y=p(function(){o++;const e=function(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}(b,arguments);return t=v.apply(null,e),t},...g);return Object.assign(y,{resultFunc:l,memoizedResultFunc:v,dependencies:b,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:u,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var u=c(s),d=Object.assign((e,t=u)=>{!function(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const n=Object.keys(e);return t(n.map(t=>e[t]),(...e)=>e.reduce((e,t,r)=>(e[n[r]]=t,e),{}))},{withTypes:()=>d}),p=n(7251),f=n(3313),h=n(7523),m=n(4142);const g={feedbacksAlreadyDisplayed:[],feedbackToSubmit:null},b=u([e=>e.feedback.feedbacksAlreadyDisplayed,e=>e.feedback.feedbackToSubmit],(e,t)=>({feedbacksAlreadyDisplayed:e,feedbackToSubmit:t})),v=(0,p.Z0)({name:"feedback",initialState:g,reducers:{initializeFeedback:(e,t)=>{var n;e.feedbackToSubmit={id:null,rating_system:t.payload.ratingSystem,trigger_type:t.payload.triggerType,form_title:t.payload.formTitle,currentStep:t.payload.step,index:null,rating:null,sentiment:null,buttons_chosen:[],freeform_text:null},o()(n=e.feedbacksAlreadyDisplayed).call(n,t.payload.triggerType)||e.feedbacksAlreadyDisplayed.push(t.payload.triggerType)},setRating:(e,t)=>{e.feedbackToSubmit&&(e.feedbackToSubmit.index=t.payload.index,e.feedbackToSubmit.rating=t.payload.rating,e.feedbackToSubmit.sentiment=t.payload.sentiment)},clearRating:e=>{e.feedbackToSubmit&&(e.feedbackToSubmit.index=null,e.feedbackToSubmit.rating=null,e.feedbackToSubmit.sentiment=null)},toggleCommentButton:(e,t)=>{if(!e.feedbackToSubmit)return;const{buttons_chosen:n}=e.feedbackToSubmit;o()(n).call(n,t.payload)?e.feedbackToSubmit.buttons_chosen=n.filter(e=>e!==t.payload):n.push(t.payload)},setFreeformText:(e,t)=>{e.feedbackToSubmit&&(e.feedbackToSubmit.freeform_text=t.payload)},setStep:(e,t)=>{e.feedbackToSubmit&&(e.feedbackToSubmit.currentStep=t.payload)},clearFeedbackToSubmit:e=>{e.feedbackToSubmit=null}},extraReducers:e=>{e.addCase(m.S.fulfilled,(e,t)=>{e.feedbackToSubmit&&(e.feedbackToSubmit.id=t.payload)}),e.addCase(m.S.rejected,e=>{e.feedbackToSubmit=null}),e.addMatcher(e=>{var t;return o()(t=[f.CB,h.ny]).call(t,e.type)},()=>g)}}),{initializeFeedback:y,setRating:x,clearRating:w,toggleCommentButton:E,setFreeformText:k,setStep:_,clearFeedbackToSubmit:A}=v.actions,T=v.reducer},5777:e=>{"use strict";var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?n:t)(r)}},5814:(e,t,n)=>{"use strict";n.d(t,{Bq:()=>u,G8:()=>s,NR:()=>c});var r=n(9749),o=n.n(r),a=n(5013),i=n(9272);const l={maximum:"max",minimum:"min"},s=e=>{const t={},n=e.map(e=>{const t=Object.keys(e);for(let n=0;n<t.length;n+=1){const r=t[n];if(r&&l[r]){const t=Object.getOwnPropertyDescriptor(e,r);if(t){const n=Object.defineProperty(e,l[r],t);return delete n[r],n}}}return e});for(let e=0;e<n.length;e+=1){var r;const l=Object.keys(n[e]),s=null===(r=n[e].texts)||void 0===r?void 0:r.text;l.forEach(r=>{var l;o()(l=Object.values(i.ZF)).call(l,r)&&(t[(0,a.A)(r)]={value:n[e][r],...s&&{message:s}})})}return t},c=e=>{if("object"!=typeof e)return{};const t={};return Object.entries(e).forEach(e=>{let[n,r]=e;r&&"object"==typeof r&&"value"in r&&!("text"in r)&&(t[n]=r.value)}),t},u=e=>{const t=[...e.validators||[]];return e.required&&t.push({required:e.required,text:e.texts.required_text}),t}},5919:(e,t,n)=>{"use strict";e.exports=n(4047)},5947:(e,t,n)=>{"use strict";var r=n(7752),o=TypeError;e.exports=function(e){if(r(e))throw new o("The method doesn't accept regular expressions");return e}},5960:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>ye,jL:()=>xe,GV:()=>we});var r={};n.r(r),n.d(r,{agent:()=>I,alerts:()=>M,announcement:()=>R,auth:()=>D,bot:()=>h.Ay,connection:()=>F,environment:()=>b,inChatNotification:()=>H,inspector:()=>V,local:()=>q,messages:()=>ae,nudge:()=>le,pushMessages:()=>ue});var o=n(7251),a=n(541),i=n(5546),l=n.n(i);const s=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){return t.reverse().slice(1).reduce((e,t)=>t(e),t[0](...arguments))}};var c=n(6249);function u(e,t,n){return(0,c.A)(e,function(e,t){return e.split(".").reverse().reduce((e,n,r)=>0===r?{[n]:t}:{[n]:e},{})}(t,n))}var d=n(4499),p=n(2628),f=n(2221),h=n(9100),m=n(7173);const g={PAT_HOST:"https://bot.kindly.ai",PUSHER_KEY:"0d15baa2a7308d71e79d",STATUS_PAGE:"https://status.kindly.ai",KINDLY_CHAT_URL:"http://localhost:8081",SAGE_HOST:"https://sage.kindly.ai",SETTINGS_HOST:"https://chat.kindlycdn.com",VERSION:"dev"},b=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,t=arguments.length>1?arguments[1]:void 0;return t.type===m.$o?{...e,...t.env}:e};var v=n(4142);const y={active:!1,allGreetingsHideInput:!1,attachments:{exchangeId:null,buttonClicked:null,files:[]},botKey:null,chatHasStarted:!1,chatId:null,contactDetailsButton:null,currentLanguage:"en",currentlyPoppedUp:!1,error:null,globalIconsState:{seenDelayedPages:[],open:!0},hasRequestedGreeting:!1,hideInputField:!1,inPlatform:!1,isChatFullWindow:!1,currentModal:null,overlayViews:[],previouslyPoppedUp:!1,renderedBy:"REACT",shownNudges:[],startedAt:null,uploadButtonWasClicked:null,userIsIdle:!1},x=(0,o.Z0)({name:"chatBubble",initialState:y,reducers:{},extraReducers:e=>e.addCase(m.tr,(e,t)=>{e.error=t.payload.error}).addCase(m.M2,(e,t)=>{e.currentLanguage=t.payload.code}).addCase(m.CB,(e,t)=>{e.botKey=t.payload.botKey||e.botKey,e.chatId=y.chatId,e.error=y.error,e.currentModal=y.currentModal,e.overlayViews=y.overlayViews,e.hideInputField=y.hideInputField,e.userIsIdle=y.userIsIdle}).addCase(m.ny,(e,t)=>{e.chatId=t.payload.chatId,e.allGreetingsHideInput=t.payload.allGreetingsHideInput,e.currentModal=y.currentModal,e.overlayViews=y.overlayViews}).addCase(m.d$,(e,t)=>{e.chatHasStarted=t.payload.chatHasStarted,e.userIsIdle=!t.payload.chatHasStarted&&e.userIsIdle}).addCase(m.tq,(e,t)=>{const n=e.hideInputField&&"USER"===t.payload.data.sender;e.chatHasStarted=!0,e.hideInputField=!!n||t.payload.data.chatbubble_hide_input_field}).addCase(m.kA,e=>{e.active=!0,e.userIsIdle=!1}).addCase(m.uS,e=>{e.active=!1}).addCase(m.hn,e=>{e.previouslyPoppedUp=!0,e.currentlyPoppedUp=!0}).addCase(m.IM,e=>e).addCase(m.d7,(e,t)=>{e.hasRequestedGreeting=t.payload.hasRequestedGreeting}).addCase(m.nm,(e,t)=>{e.startedAt=t.payload.startedAt}).addCase(m.HW,(e,t)=>{e.userIsIdle=t.payload.userIsIdle}).addCase(m.Eg,(e,t)=>{e.contactDetailsButton=t.payload.button}).addCase(m.t1,e=>{e.contactDetailsButton=null}).addCase(m.wX,(e,t)=>{e.shownNudges=(e.shownNudges||[]).concat(t.payload.slug)}).addCase(m.FZ,(e,t)=>{e.attachments.buttonClicked=(+new Date).toString(),e.attachments.exchangeId=t.payload.button.value}).addCase(m.TF,(e,t)=>{e.attachments.files=t.payload.files}).addCase(m.Q4,e=>{e.attachments.exchangeId=null,e.attachments.buttonClicked=null,e.attachments.files=[]}).addCase(m.YR,e=>{e.attachments.buttonClicked=null}).addCase(m.Kd,(e,t)=>{e.shownNudges=(e.shownNudges||[]).filter(e=>e!==t.payload.slug)}).addCase(m.uA,(e,t)=>{e.globalIconsState={...e.globalIconsState,...t.payload.state}}).addCase(m.Xu,(e,t)=>{e.currentModal=t.payload.currentModal}).addCase(m.XM,(e,t)=>{e.isChatFullWindow=t.payload.isChatFullWindow}).addCase(m.wM,(e,t)=>{e.overlayViews=[...e.overlayViews,t.payload.view]}).addCase(m.SO,e=>{e.overlayViews=[]}).addCase(m.nX,e=>{e.overlayViews=e.overlayViews.slice(0,-1)}).addCase(v.S.rejected,e=>{e.currentModal=null,e.overlayViews=e.overlayViews.filter(e=>"FEEDBACK"!==e)})}).reducer,w=(e,t)=>{var n;return{...h.ue,id:e.id,name:e.name,avatar:e.avatar,botName:e.name,botAvatar:e.avatar,chatbubbleTextEnabled:e.use_chatbubble_text,includeDisabledLanguages:e.includeDisabledLanguages,startOverText:e.start_over_text,welcomePage:e.welcomePage,welcomePageType:t?f.Lb.NONE:e.welcomePage.type,maintenanceAlert:e.maintenance_alert,maintenanceAlertEnabled:!t&&((null===(n=e.maintenance_alert)||void 0===n?void 0:n.alert_enabled)||!1),pushGreetingsEnabled:!t&&e.use_push_greetings,pushGreetings:e.push_greetings,tabNotification:e.tab_notification,bubbleNotification:e.bubble_notification,typingIndicator:e.typing_indicator,typingDuration:e.typing_duration,disabledTransports:e.disabled_transports,text:e.text,bubbleSize:e.bubble_size,isTextDirectionRtl:e.text_right_to_left,realtimeAnalytics:e.chatbubble.realtime_analytics,inputLimitEnabled:e.chatbubble.input_limit_enabled,inputLimit:e.chatbubble.input_limit||140,hideHeader:e.hideHeader||!1,bubbleAvatar:e.chatbubble.icon_avatar_image||e.bubbleAvatar||null,position:{...f.bF,...e.position},offsetHeight:e.offsetHeight||"205px",fullscreenMode:e.fullscreenMode||!1,zIndex:e.zIndex||f.DP,persistStateLifespan:t?-1:e.chatbubble.persist_state_lifespan_seconds,showTakeoverQueue:e.show_takeover_queue,bubbleOutline:e.use_bubble_outline,seasonalAppearance:e.seasonal_appearance,nudges:e.nudges||[],handoverMode:e.handover_mode,splitTestEnabled:e.split_test_enabled,conversionPageUrl:e.conversion_page_url,whitelabelEnabled:e.whitelabel_enabled}};function E(e){let{botKey:t,settings:n,settings:{context:r,inPlatform:o,admin:a,environment:i},initialChatLanguage:l}=e;return{bot:w(n,o),chatbubble:{...y,botKey:t,inPlatform:o,admin:a,renderedBy:n.renderedBy||"REACT",currentLanguage:l},local:{context:r,labels:[]},environment:{...g,VERSION:"2.76.7",...i}}}const k=(e,t,n)=>{const{currentLanguage:r}=t;return n[r]||n.en};var _=n(6079);const A=Object.freeze({WARNING:"WARNING",CRITICAL:"CRITICAL"}),T=Object.freeze({OFFLINE:{en:"You seem to be offline, please check your internet connection",nb:"Du ser ut til å være frakoblet internett, vennligst sjekk tilgangen din"},WEBSOCKET_DOWN:{en:"There seems to be an issue with the connection, attempting to reconnect...",nb:"Det ser ut til å være et problem med tilkoblingen. Prøver å koble opp igjen..."}});var S=n(8411),$=n(1872);let C;const O={name:void 0,isTyping:!1,userIsTyping:!1,takenOver:!1,takeoverClosed:!0,requestedHandoverAt:void 0,hasHadHandover:!1,supportsAttachment:!1,handoverWaitTimeEstimate:void 0},I=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case m.tq:return{...e,name:t.data.name||e.name,isTyping:!1};case m.M_:return{...e,isTyping:!0};case m.MU:return{...e,isTyping:!1};case m.c6:return{...e,userIsTyping:!0};case m.we:return{...e,userIsTyping:!1};case m.II:{const n=Boolean(t.data.requested_handover_at&&!t.data.taken_over),r=Boolean(t.data.taken_over&&!e.takenOver),o=Boolean(!t.data.taken_over&&e.requestedHandoverAt),a=Boolean(!t.data.taken_over&&e.takenOver),i=Boolean(t.data.supports_attachment),l=t.data.requested_handover_at,s=t.data.handover_wait_time_estimate,c=t.data.handover_queue_position;return n?{...e,requestedHandoverAt:l,takenOver:!1,takeoverClosed:!1,handoverWaitTimeEstimate:s,handoverQueuePosition:c}:r?{...e,requestedHandoverAt:void 0,takenOver:!0,isTyping:!1,hasHadHandover:!0,supportsAttachment:i,takeoverClosed:!1,handoverWaitTimeEstimate:void 0,handoverQueuePosition:void 0}:a||o?{...e,requestedHandoverAt:void 0,takenOver:!1,isTyping:!1,supportsAttachment:void 0,handoverWaitTimeEstimate:void 0,handoverQueuePosition:void 0}:e}case m.nz:return{...e,requestedHandoverAt:void 0===t.data.requested_handover_at?e.requestedHandoverAt:t.data.requested_handover_at,takeoverClosed:Boolean(t.data.closed)};case m.AQ:return{...e,handoverWaitTimeEstimate:t.data.handover_wait_time_estimate,handoverQueuePosition:t.data.handover_queue_position};case m.MM:return{...e,requestedHandoverAt:void 0,handoverWaitTimeEstimate:void 0,handoverQueuePosition:void 0};case m.nh:return{...e,hasHadHandover:!1,requestedHandoverAt:void 0,handoverWaitTimeEstimate:void 0,handoverQueuePosition:void 0};case m.CB:return{...e,hasHadHandover:!1,requestedHandoverAt:void 0};default:return e}},L={showTabNotification:!1,showBubbleNotification:!1},M=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:L,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case m.tq:return t.data.from_bot&&"SYSTEM"!==t.data.sender?{...e,showTabNotification:!0}:e;case m.Wh:return{...e,showTabNotification:!0};case m.Zb:return{...e,showBubbleNotification:!0};case m.u2:return{...L};default:return e}},N={show:!1,text:null,url:null,type:null},R=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:N,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case m.YU:return{text:t.payload.text,type:t.payload.alertType,url:t.payload.url,show:!0};case m.nW:return N;default:return e}},P={isAuthenticated:!1,token:null,avatarUrl:null,fullName:null,isRefreshing:!1},D=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case m.K_:return{...e,isAuthenticated:!0,token:t.token,avatarUrl:t.avatarUrl,fullName:t.fullName};case m.qQ:return{...e,avatarUrl:t.avatar_url,fullName:t.full_name,email:t.email,phoneNumber:t.phone_number,userId:t.user_id};case m.zZ:return{...e,...P};case m.Rk:return{...e,isRefreshing:!0};case m.dp:return{...e,isRefreshing:!1};default:return e}},j={token:null,connected:!0,pusherConnected:!1,connectTriggerConfig:void 0},F=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:j,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case m.ny:return{...e,token:t.token};case m.CB:return{...e,token:null};case m._Y:return{...e,connected:!0};case m._N:return{...e,connected:!1};case m.mz:return e;case m.kP:return{...e,pusherConnected:!1};case m.VZ:return"message"===t.event?{...e,pusherConnected:!0}:e;case m.zT:return{...e,connectTriggerConfig:t.triggerConfig};default:return e}},z={notifications:[]},B={content:"",dismissed:!1,once:!1},H=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:z,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case m.vP:return{...e,notifications:[...e.notifications,{...B,id:t.id,buttonText:t.buttonText,buttonHref:t.buttonHref,content:t.content,icon:t.icon,once:t.once}]};case m.MN:{const n=e.notifications.findIndex(e=>e.id===t.id);if(-1===n)return e;const r=[...e.notifications];return r[n]={content:t.content,buttonHref:t.buttonHref,buttonText:t.buttonText,icon:t.icon,once:t.once,id:t.id},{...e,notifications:r}}case m.nG:return{...e,notifications:e.notifications.filter(e=>e.id!==t.id)};case m.oZ:{const n=e.notifications.find(e=>e.id===t.id);return{...e,notifications:[...e.notifications.filter(e=>e.id!==t.id),{...n,dismissed:!0}]}}default:return e}},U={inspectorOpen:!1,currentMessageId:null},V=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:U,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case m.ye:return{...e,currentMessageId:t.chatMessageId};case m.vK:return{...e,inspectorOpen:!e.inspectorOpen};default:return e}};var G=n(332);const W={context:{},labels:[]},q=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:W,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case G.s:return{...e,context:{...e.context,...t.context}};case G.T:return{...e,labels:[...new Set([...e.labels,t.label])]};case m.CB:return{...e,labels:[]};default:return e}};var K=n(9749),Y=n.n(K),X=n(467),Z=n(5013);const J=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(e).reduce((e,t)=>{let[n,r]=t;return{...e,[(0,Z.A)(n)]:r}},{})};var Q=n(7720),ee=n(8172);const te={chatMessages:[],buttonClicks:[],attachments:[],messageSentTime:null,lastMessageSeen:null},ne=e=>{let{id:t}=e;return t},re=e=>{let{temporaryId:t,id:n}=e;return e=>{let{temporaryId:r,id:o}=e;return n===o||t===r}},oe=(e,t,n)=>e.map(e=>t(e)?n(e):e),ae=function(){var e,t,n,r;let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te,a=arguments.length>1?arguments[1]:void 0;switch(a.type){case m.tq:{const{chatMessages:e}=o,{data:t}=a;if((0,Q.A)(e)(t)){const n={...t};return n.key||=n.id,u(o,"chatMessages",[...e,n])}const n=e.findIndex(e=>{let{id:n}=e;return n===t.id});if(t.key||=t.id,-1===n)return o;const r=[...e.slice(0,n),t,...e.slice(n+1)];return{...o,chatMessages:r}}case m.CB:return te;case m.fg:{const{chatbubble_temporary_id:e,id:t}=a.data,n=n=>{var r;let{id:o}=n;return Y()(r=[e,t]).call(r,o)},r=e=>({...e,message:a.data.message});return{...o,chatMessages:oe(o.chatMessages,n,r)}}case m.se:return{...o,messageSentTime:a.messageSentTime};case m.pz:{var i;const{created:e,id:t,temporaryId:n}=a,{chatMessages:r}=o,l=null!==(i=null==a?void 0:a.status)&&void 0!==i?i:null,s=r.findIndex(e=>{let{id:t}=e;return t===n});if(s<0)return o;const c=r[s],u={...c,created:e||c.created,id:t||c.id,status:l},d=r.map((e,t)=>t!==s?e:u);return{...o,chatMessages:d}}case m.jE:{const{chatMessageId:e,chatMessageTempId:t,patternContextMatch:n}=a.data,r=n=>{let{id:r}=n;return r===e||r===t},i=e=>({...e,pattern_context_match:n});return{...o,chatMessages:oe(o.chatMessages,r,i)}}case m.Y6:var l;return(0,X.A)(o.buttonClicks)(a.buttonClick)?{...o,buttonClicks:[...null!==(l=o.buttonClicks)&&void 0!==l?l:[],a.buttonClick]}:o;case m.kU:return{...o,lastMessageSeen:(0,ee.A)(a,["id","index"])};case m.Os:return{...o,attachments:[...null!==(e=o.attachments)&&void 0!==e?e:[],...(null===(t=a.data)||void 0===t||null===(n=t.attachments)||void 0===n?void 0:n.map(J))||[]]};case m.wP:{const e=J(a.attachment),t=re(e),n=t=>({...t,...e});return{...o,attachments:oe(o.attachments,t,n)}}case m.tS:{var s;const{attachments:e=[],temporaryChatMessageId:t,chatMessageId:n}=a.data,r=e.map(J),i=(null!==(s=o.attachments)&&void 0!==s?s:[]).map(e=>{const t=r.find(re(e));return t?{...e,...t}:e});let l=o.chatMessages;if(t&&n){const e=e=>{let{id:n}=e;return n===t},a=e=>({...e,id:n,attachment_ids:r.map(ne)});l=oe(o.chatMessages,e,a)}return{...o,attachments:i,chatMessages:l}}case m.QA:return null!==(r=a.formData)&&void 0!==r&&r.formKey?{...o,forms:{...o.forms,[a.formData.formKey]:a.formData}}:o;default:return o}},ie={slug:null,show:!1,isCustom:!1,dialogue:null,webhook:null,content:null,onRendered:null,nudgeLayout:{},nudgeType:f.MK.TEMPLATE,hasBeenDismissed:!1},le=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ie,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case m.X2:return{...e,show:!1,nudgeLayout:{},hasBeenDismissed:!0};case m.wv:return{...e,show:!0,slug:t.slug,dialogue:t.dialogue,webhook:t.webhook,nudgeLayout:t.nudgeLayout,nudgeType:f.MK.TEMPLATE,trackEvent:t.trackEvent,hasBeenDismissed:!1};case m.un:return{...e,show:!0,isCustom:!0,slug:t.slug,content:t.content,nudgeLayout:{},onRendered:t.onRendered,nudgeType:f.MK.CUSTOM,trackEvent:t.trackEvent,hasBeenDismissed:!1};default:return e}};var se=n(9483);const ce={show:!1,text:null,agent:null,dismissed:!1,type:se.oI.MESSAGE,dismissedMessages:[]},ue=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ce,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case m.II:return t.data.taken_over&&!e.taken_over?{...e,show:!0,agent:{name:t.data.name,avatar:t.data.avatar},text:void 0,type:se.oI.HANDOVER}:e;case m.tq:return(0,p.A)()||!t.data.from_bot||"SYSTEM"===t.data.sender||"greeting"===t.data.exchange_type?e:{...e,show:!0,text:t.data.message,type:se.oI.MESSAGE};case m.l:return{...e,show:!0,text:t.pushMessageText,dismissed:!1,type:t.pushMessageType,dismissedMessages:[...e.dismissedMessages,t.pushMessageTitle]};case m.a_:return{...e,show:!1,dismissed:!0};case m.a1:return ce;default:return e}};var de=n(5767);const pe=e=>{let{url:t,...n}=e;return(t||"").startsWith("data:")?n:{...n,url:t}},fe=e=>e?()=>e=>({bot:{splitTestLabel:e.bot.splitTestLabel,splitLabelTimestamp:e.bot.splitLabelTimestamp,hasInteraction:e.bot.hasInteraction},chatbubble:{active:!1,previouslyPoppedUp:e.chatbubble.previouslyPoppedUp,shownNudges:e.chatbubble.shownNudges},pushMessages:{dismissedMessages:e.pushMessages.dismissedMessages},agent:{name:e.agent.name}}):()=>e=>({alerts:{showBubbleNotification:e.alerts.showBubbleNotification},agent:{name:e.agent.name,takenOver:e.agent.takenOver,supportsAttachment:e.agent.supportsAttachment},bot:{splitTestLabel:e.bot.splitTestLabel,splitLabelTimestamp:e.bot.splitLabelTimestamp,hasInteraction:e.bot.hasInteraction},chatbubble:{...e.chatbubble,admin:void 0,currentlyPoppedUp:y.currentlyPoppedUp,allGreetingsHideInput:y.allGreetingsHideInput,contactDetailsButton:y.contactDetailsButton,attachments:y.attachments,isChatFullWindow:void 0,overlayViews:e.chatbubble.overlayViews.filter(e=>"FEEDBACK"===e),shownNudges:e.chatbubble.shownNudges,renderedBy:void 0},connection:{token:e.connection.token,connected:!0,pusherConnected:!1},feedback:{...e.feedback},local:{labels:e.local.labels},messages:{forms:e.messages.forms,chatMessages:e.messages.chatMessages,buttonClicks:e.messages.buttonClicks,attachments:(e.messages.attachments||[]).map(pe),messageSentTime:e.messages.messageSentTime,lastMessageSeen:e.messages.lastMessageSeen},pushMessages:{dismissedMessages:e.pushMessages.dismissedMessages}}),he=e=>t=>{let{active:n}=t.chatbubble;const r=(0,p.A)();return e.isFromMultitab||(n=t.chatbubble.active&&(Boolean(e.chatbubble.keep_open&&!r)||Boolean(e.chatbubble.keep_open_mobile&&r))),(0,c.A)(t,{chatbubble:{active:n,wasActiveOnLoad:n}})},me=e=>{var t;if((0,d.A)(e,"bot.includeDisabledLanguages",!1))return e;const n=null==e||null===(t=e.chatbubble)||void 0===t?void 0:t.currentLanguage,r=window.__KINDLY_SETTINGS__.supportedLanguages.some(e=>{let{code:t}=e;return t===n}),o=window.__KINDLY_SETTINGS__.supportedLanguages.find(e=>{let{is_primary:t}=e;return t});if(!o)throw new Error("Impossible state: primary language not found");return r?e:(0,c.A)(e,{chatbubble:{currentLanguage:o.code}})},ge=e=>{let{inPlatform:t,botKey:n}=e;return(e=>(t,n)=>{return r=(0,c.A)(t,n),e.reduce((e,t)=>{let[n,r]=t;return u(e,n,r)},r);var r})([["chatbubble.inPlatform",t],["chatbubble.botKey",n]].filter(e=>{let[,t]=e;return void 0!==t}))},be=e=>t=>{var n,r;const o=null==t||null===(n=t.messages)||void 0===n?void 0:n.chatMessages.filter(e=>e.from_bot).pop(),a=null!==(r=null==o?void 0:o.chat_live_translation_language_code)&&void 0!==r?r:null==o?void 0:o.chat_language_code,i=null!=a?a:e;return(0,c.A)(t,{chatbubble:{currentLanguage:i}})},ve=[e=>t=>n=>n.type===m.tq&&n.data.from_bot?(e.dispatch((0,_.MY)()),(0,_.CM)(),t(n)):t(n),e=>t=>n=>{switch(n.type){case m._N:return((e,t,n,r)=>{const{announcement:o,bot:a,chatbubble:i}=t;if(o.show)return n(r);const l={text:k(0,i,e),alertType:A.WARNING};return n({type:m.YU,payload:l}),n(r)})(T.OFFLINE,e.getState(),t,n);case m._Y:{const{announcement:r,connection:o}=e.getState();return r.show&&t({type:m.nW}),o.connected||e.dispatch((0,_.S4)()),t(n)}default:return t(n)}},e=>t=>async n=>{const{agent:{takenOver:r},chatbubble:{currentLanguage:o}}=e.getState();if(n.type===m.II){const{handoverConversationFeedback:t,preloadFeedbackImages:a}=(0,S.A)(o);r&&!1===n.data.taken_over&&t&&(a("handover_conversation"),e.dispatch((0,$.ob)(t)))}if(n.type!==m.tq)return t(n);const{from_bot:a,sender:i,was_anonymized:l,exchange_type:s,triggered_chat_start:c,chat_language_code:u,chat_live_translation_language_code:d}=n.data,h=d||u;if(n.type===m.tq&&(0,p.A)()&&a&&i!==f.bS.SYSTEM&&e.dispatch({type:m.Zb}),"greeting"===s||c)o!==h&&t({type:m.M2,code:h});else if(a&&h&&o!==h){var g;const{text:n}=e.getState().bot,r=null===(g=n.language_switch_notification)||void 0===g?void 0:g[h];r&&e.dispatch((0,$.cC)({content:r,buttonText:void 0,buttonHref:void 0,icon:"language"},f.Jm.LANGUAGE_SWITCH)),t({type:m.M2,code:u})}if(a||!l)return t(n);t({type:m.fg,data:n.data})},e=>t=>async n=>{var r;return n.type===m.A8&&(clearTimeout(C),C=setTimeout(()=>{e.getState().bot.isTyping&&t({type:m.wk})},1e3*((null===(r=n.data)||void 0===r?void 0:r.TTL)||10))),n.type===m.wk&&clearTimeout(C),t(n)},()=>e=>t=>{e("payload"in t?t:{...t,payload:{...t}})}];function ye(e){let{botKey:t,settings:n,persist:a=!0,initialChatLanguage:i,initialStateModifier:u}=e;const{inPlatform:d}=n,p=!n.inPlatform&&0===n.chatbubble.persist_state_lifespan_seconds,f=`kindly-chat-${t}`,h=fe(p),m=s(me,be(i),he(n),ge({inPlatform:d,botKey:t})),g=a?l()(null,{key:f,slicer:h,merge:m}):e=>e;let b=E({botKey:t,settings:n,initialChatLanguage:i});return u&&(b=(0,c.A)(b,u)),(0,o.U1)({reducer:{...r,feedback:de.Ay,chatbubble:x},preloadedState:b,middleware:e=>e().concat(...ve),enhancers:e=>e().concat(g),devTools:!1})}const xe=a.wA.withTypes(),we=a.d4.withTypes()},5976:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>Ws});var r=n(9155),o=n.n(r),a=n(3864),i=n(8905);const l=a.Ay.div`
|
|
1322
1170
|
font-size: var(--_kindlychat-font-size-m);
|
|
1323
1171
|
text-align: initial;
|
|
1324
1172
|
line-height: 18px;
|
|
1325
1173
|
-webkit-font-smoothing: antialiased;
|
|
1326
1174
|
-moz-osx-font-smoothing: grayscale;
|
|
1327
1175
|
height: 100%;
|
|
1328
|
-
z-index: ${e=>e
|
|
1176
|
+
z-index: ${e=>e.$zIndex+5};
|
|
1329
1177
|
|
|
1330
1178
|
@media ${i.jO.maxTablet} {
|
|
1331
1179
|
max-height: unset;
|
|
1332
1180
|
}
|
|
1333
1181
|
|
|
1334
|
-
${e=>{let{inspectorOpen:t}=e;return t&&"display: flex; flex-direction: row-reverse;"}}
|
|
1182
|
+
${e=>{let{$inspectorOpen:t}=e;return t&&"display: flex; flex-direction: row-reverse;"}}
|
|
1335
1183
|
`;var s=n(2221),c=n(541),u=n(1695),d=n(5047);const p=a.Ay.div`
|
|
1336
1184
|
margin: 20px;
|
|
1337
1185
|
display: flex;
|
|
@@ -1402,7 +1250,7 @@
|
|
|
1402
1250
|
&:hover {
|
|
1403
1251
|
color: rgb(0, 105, 255);
|
|
1404
1252
|
}
|
|
1405
|
-
`,x=()=>{},w=function(){return o().createElement(o().Fragment,null,o().createElement(p,null,o().createElement(d.H5,null,"No messages yet!")),o().createElement(m,{spaceBetween:!0},o().createElement(h,{disabled:!0,onClick:x},"Show previous"),o().createElement(h,{disabled:!0,onClick:x},"Show next")))};n(7050);var E=n(1949),k=n.n(E);const _=function(e){let{patternContextMatch:t}=e;const[n,r]=Object.entries(t)[0];return o().createElement(p,null,o().createElement(d.H5,null,"Slot / Pattern context"),o().createElement(m,null,o().createElement(g,null,n),o().createElement("span",null,r)))},A=e=>{let{botId:t,exchangeType:n,exchangeId:r}=e;return t&&n&&r?`/bot/${t}/build/${("usersays"===n?"dialogue":n).replace("_","-")}/${r}`:null};var T=n(9749),S=n.n(T);const{SAMPLE_MATCH:C,
|
|
1253
|
+
`,x=()=>{},w=function(){return o().createElement(o().Fragment,null,o().createElement(p,null,o().createElement(d.H5,null,"No messages yet!")),o().createElement(m,{spaceBetween:!0},o().createElement(h,{disabled:!0,onClick:x},"Show previous"),o().createElement(h,{disabled:!0,onClick:x},"Show next")))};n(7050);var E=n(1949),k=n.n(E);const _=function(e){let{patternContextMatch:t}=e;const[n,r]=Object.entries(t)[0];return o().createElement(p,null,o().createElement(d.H5,null,"Slot / Pattern context"),o().createElement(m,null,o().createElement(g,null,n),o().createElement("span",null,r)))},A=e=>{let{botId:t,exchangeType:n,exchangeId:r}=e;return t&&n&&r?`/bot/${t}/build/${("usersays"===n?"dialogue":n).replace("_","-")}/${r}`:null};var T=n(9749),S=n.n(T);const{SAMPLE_MATCH:$,KEYWORD_EXACT_MATCH:C,KEYWORD_MENTION:O,PATTERN_MATCH:I,ZODIAC:L}=s.Gi,M=e=>(null!=e?e:"").toLowerCase().replace(/[-_]/g," "),N=function(e){var t,n,r;let{handler:a,score:i,exchangeType:l,sender:c,fromWebhook:u,label:d}=e;return"string"==typeof d?o().createElement(v,null,d):S()(t=[$,L]).call(t,a)&&i?o().createElement(v,{filled:!0,title:"Confidence score"},`${Math.round(100*i)} %`):S()(n=Object.values(s.Gi)).call(n,a)?o().createElement(v,null,(e=>{switch(e){case $:case L:return"sample";case I:return"pattern";case C:case O:return"keyword";default:return M(e)}})(a)):u?o().createElement(v,null,"webhook"):"string"==typeof l?o().createElement(v,null,M(l)):S()(r=Object.values(s.bS)).call(r,c)?o().createElement(v,null,M(c)):null};var R=n(492);const P=a.Ay.span`
|
|
1406
1254
|
${R.uh}
|
|
1407
1255
|
`;function D(){return o().createElement(P,null,"(opens in a new tab)")}const j=function(e){let{children:t,url:n}=e;return n?o().createElement(y,{target:"_blank",rel:"noopener noreferrer",href:n},t,o().createElement(D,null)):t},F=function(e){let{replyCandidates:t,botId:n}=e;const a=(0,r.useMemo)(()=>t.filter(e=>{let{selected:t,sample:n,title:r}=e;return!t&&(n||r)}),[t]);return 0===(null==a?void 0:a.length)?null:o().createElement(p,null,o().createElement(d.H5,null,"Potential dialogues"),a.map(e=>{let{_id:t,score:r,sample:a,title:i,dialogue_id:l}=e;return o().createElement(j,{key:`reply-candidate-${t}`,url:A({botId:n,exchangeType:"usersays",exchangeId:l})},o().createElement(m,null,o().createElement(N,{handler:s.Gi.SAMPLE_MATCH,score:r}),o().createElement(b,null),o().createElement("span",null,a||i)))}))};k().oneOfType([k().node,k().arrayOf(k().node)]);const z=function(e){let{botId:t,exchangeType:n,exchangeId:r,children:a}=e;const i=A({botId:t,exchangeType:n,exchangeId:r});return o().createElement(j,{url:i},o().createElement(m,null,a))},B=(e,t)=>`${(e||"").slice(0,t)}${(null==e?void 0:e.length)>t?"...":""}`,H=function(e){let{fromBot:t,fromWebhook:n,handler:r,score:a,title:i,message:l,exchangeType:s,exchangeId:c,botId:u,isFollowup:f,sender:h}=e;return o().createElement(p,null,o().createElement(d.H5,null,"Message info"),t&&o().createElement(m,{spaceBetween:!0},i&&o().createElement(z,{botId:u,exchangeType:s,exchangeId:c},o().createElement(b,null),o().createElement("span",null,B(i,40))),!i&&o().createElement("span",null,B(l,40)),o().createElement(m,null,o().createElement(N,{handler:r,score:a,exchangeType:s,exchangeId:c,sender:h,fromWebhook:n}),f&&o().createElement(N,{exchangeType:"followup"}))),!t&&o().createElement(m,{spaceBetween:!0},B(l,40),o().createElement(N,{label:"user"})))},U=function(e){let{chatMessage:{message:t,score:n,title:r,handler:a,sender:i,from_bot:l,bot_id:s,from_webhook:c,reply_candidates:u,exchange_type:d,exchange_id:p,is_followup:h,pattern_context_match:m}}=e;const g=Object.keys(m||{}).length>0;return o().createElement(o().Fragment,null,o().createElement(H,{handler:a,fromBot:l,fromWebhook:c,score:n,title:r,message:t,exchangeType:d,exchangeId:p,botId:s,isFollowup:h,sender:i}),o().createElement(f,null),g&&o().createElement(o().Fragment,null,o().createElement(_,{patternContextMatch:m}),o().createElement(f,null)),(null==u?void 0:u.length)>1&&o().createElement(o().Fragment,null,o().createElement(F,{replyCandidates:u,botId:s}),o().createElement(f,null)))};var V=n(9886),G=n(1872),W=n(3249),q=n(2628);const K=a.i7`
|
|
1408
1256
|
0% {
|
|
@@ -1565,8 +1413,8 @@
|
|
|
1565
1413
|
left: 0;
|
|
1566
1414
|
}
|
|
1567
1415
|
`,xe=a.Ay.div`
|
|
1568
|
-
${e=>e
|
|
1569
|
-
${e=>{let{inspected:t}=e;return t&&ye}};
|
|
1416
|
+
${e=>e.$fromBot?ve:be};
|
|
1417
|
+
${e=>{let{$inspected:t}=e;return t&&ye}};
|
|
1570
1418
|
&:nth-child(1) {
|
|
1571
1419
|
padding-top: 10px;
|
|
1572
1420
|
}
|
|
@@ -1590,7 +1438,7 @@
|
|
|
1590
1438
|
display: block;
|
|
1591
1439
|
width: 100%;
|
|
1592
1440
|
${e=>e.$isLastGroupMessage&&"margin-bottom: 16px;"}
|
|
1593
|
-
`;function _e(e){let{fromBot:t,created:n,shouldShowTime:r,children:a,inspected:i,disclaimerComponent:l,isLastGroupMessage:c}=e;const{currentLanguageCode:u}=(0,pe.A)();return o().createElement(xe,{fromBot:t
|
|
1441
|
+
`;function _e(e){let{fromBot:t,created:n,shouldShowTime:r,children:a,inspected:i,disclaimerComponent:l,isLastGroupMessage:c}=e;const{currentLanguageCode:u}=(0,pe.A)();return o().createElement(xe,{$fromBot:t,$inspected:i,"data-testid":s.gH},o().createElement(ke,{$isLastGroupMessage:c},l,r&&o().createElement(we,null,o().createElement(Ee,null,function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";const r=fe(e),o=new Date,a=r.toDateString()===o.toDateString(),i=t||n||"en",l=(e,t)=>{const n=t?{hour:"2-digit",minute:"2-digit"}:{day:"numeric",month:"short"};return t?r.toLocaleTimeString(e,n):r.toLocaleDateString(e,n)};try{return l(i,a)}catch(e){return l(n,a)}}(n,u))),a))}var Ae=n(1346);const Te=function(e){return o().createElement("svg",Object.assign({},e,{version:"1.1",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}),o().createElement("title",null,"Unsuccessful upload"),o().createElement("g",{fill:"none",fillRule:"evenodd"},o().createElement("g",{transform:"translate(-1128 -635)",fill:"#7B7B7B",fillRule:"nonzero"},o().createElement("path",{d:"m1152 637.67v8.7867l-4-4.0133-5.3333 5.3467-5.3333-5.3333-5.3333 5.3333-4-4.0133v-6.1067c0-1.4667 1.2-2.6667 2.6667-2.6667h18.667c1.4667 0 2.6667 1.2 2.6667 2.6667zm-4 8.56 4 4.0133v6.0933c0 1.4667-1.2 2.6667-2.6667 2.6667h-18.667c-1.4667 0-2.6667-1.2-2.6667-2.6667v-8.7733l4 3.9867 5.3333-5.3333 5.3333 5.3333 5.3333-5.32z"}))))},Se=function(e){return o().createElement("svg",Object.assign({},e,{version:"1.1",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}),o().createElement("title",null,"Loading image upload"),o().createElement("g",{fill:"none",fillRule:"evenodd"},o().createElement("g",{transform:"translate(-685 -659)",fill:"#7B7B7B",fillRule:"nonzero"},o().createElement("g",{transform:"translate(685 659)"},o().createElement("path",{d:"m15.67 9.414c-0.12139-0.24299-0.36467-0.40135-0.636-0.414-0.27276-0.023426-0.53433 0.11351-0.6705 0.351l-3.2505 5.199-2.3325-2.331c-0.16117-0.15568-0.38102-0.23533-0.6045-0.219-0.22394 0.02231-0.42603 0.144-0.5505 0.3315l-3 4.5c-0.1548 0.23022-0.16988 0.52708-0.039197 0.7718 0.13068 0.24471 0.38578 0.3973 0.6632 0.39671h13.5c0.26005 0 0.50153-0.13472 0.63814-0.35599 0.13661-0.22127 0.14886-0.49752 0.032357-0.73001l-3.75-7.5z"}),o().createElement("path",{d:"m21 0h-18c-1.6569 0-3 1.3431-3 3v18c0 1.6569 1.3431 3 3 3h18c1.6569 0 3-1.3431 3-3v-18c0-1.6569-1.3431-3-3-3zm-18 21v-18h18v18h-18z"}),o().createElement("circle",{cx:"7.5",cy:"7.5",r:"1.5"})))))};var $e=n(9514),Ce=n(6367),Oe=n(5256);function Ie(e){let{color:t="black",...n}=e;return o().createElement("svg",Object.assign({},n,{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),o().createElement("path",{d:"M12 4.75V6.25",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M17.1265 6.87347L16.0659 7.93413",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M19.25 12L17.75 12",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M17.1265 17.1265L16.0659 16.0659",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M12 17.75V19.25",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M7.93413 16.0659L6.87347 17.1265",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M6.24997 12L4.74997 12",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M7.93413 7.93413L6.87347 6.87347",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))}const Le=a.Ay.button`
|
|
1594
1442
|
position: absolute;
|
|
1595
1443
|
top: 24px;
|
|
1596
1444
|
right: 24px;
|
|
@@ -1644,7 +1492,7 @@
|
|
|
1644
1492
|
width: calc(100% + 50px); /* use calc to make it ignore padding on parent */
|
|
1645
1493
|
|
|
1646
1494
|
> div {
|
|
1647
|
-
${e=>e
|
|
1495
|
+
${e=>e.$active&&"\n position: relative;\n width: 100000%;\n display: flex;\n "};
|
|
1648
1496
|
}
|
|
1649
1497
|
`,Ve=a.Ay.div`
|
|
1650
1498
|
position: relative;
|
|
@@ -1793,8 +1641,8 @@
|
|
|
1793
1641
|
|
|
1794
1642
|
${R.sF}
|
|
1795
1643
|
|
|
1796
|
-
${e=>{let{next:t}=e;return t?"right: 10px;":"left: 10px;"}}
|
|
1797
|
-
${e=>{let{disabled:t}=e;return t&&"display: none"}};
|
|
1644
|
+
${e=>{let{$next:t}=e;return t?"right: 10px;":"left: 10px;"}}
|
|
1645
|
+
${e=>{let{$disabled:t}=e;return t&&"display: none"}};
|
|
1798
1646
|
|
|
1799
1647
|
${ze}
|
|
1800
1648
|
`,et=(0,a.Ay)(Oe.A6)`
|
|
@@ -1892,14 +1740,14 @@
|
|
|
1892
1740
|
margin: 8px 0px;
|
|
1893
1741
|
padding: 10px 8px;
|
|
1894
1742
|
align-self: center;
|
|
1895
|
-
background: ${e=>"image"===e
|
|
1896
|
-
background-color: ${e=>"image"===e
|
|
1743
|
+
background: ${e=>"image"===e.$loadingType?"transparent":e.theme.botMessageBackground};
|
|
1744
|
+
background-color: ${e=>"image"===e.$loadingType?"transparent":e.theme.botMessageBackground};
|
|
1897
1745
|
`,dt=a.Ay.span`
|
|
1898
1746
|
height: 3px;
|
|
1899
1747
|
width: 3px;
|
|
1900
1748
|
margin: 0 2px;
|
|
1901
|
-
background: ${e=>{let{theme:t
|
|
1902
|
-
background-color: ${e=>{let{theme:t
|
|
1749
|
+
background: ${e=>{let{theme:t,$loadingType:n}=e;return"image"===n?"#fff":(0,he.w5)(t.botMessageBackground,"#FFF","#000")}};
|
|
1750
|
+
background-color: ${e=>{let{theme:t,$loadingType:n}=e;return"image"===n?"#fff":(0,he.w5)(t.botMessageBackground,"#FFF","#000")}};
|
|
1903
1751
|
display: block;
|
|
1904
1752
|
opacity: 1;
|
|
1905
1753
|
border-radius: 100px;
|
|
@@ -1930,7 +1778,7 @@
|
|
|
1930
1778
|
align-items: center;
|
|
1931
1779
|
`,mt=a.Ay.div`
|
|
1932
1780
|
display: inline-block;
|
|
1933
|
-
`;function gt(e){let{loadingType:t,text:n,botName:r}=e;return o().createElement(ct,{"data-testid":s.dT},o().createElement(ut,{loadingType:t},o().createElement(dt,{loadingType:t}),o().createElement(dt,{loadingType:t}),o().createElement(dt,{loadingType:t})),n&&o().createElement(pt,null,o().createElement(ht,null,o().createElement(lt,{width:16,height:16}))," ",o().createElement(mt,null,o().createElement(ft,null,r)," ",n)))}function bt(e){let{imageWidth:t,imageHeight:n,hasCaption:r}=e;return o().createElement(He,{title:"Loading image...",$imageWidth:t,$imageHeight:n?Number(n):void 0,$hasCaption:r},o().createElement(gt,{loadingType:"image"}),o().createElement("div",null,"Loading image"))}const vt=a.i7`
|
|
1781
|
+
`;function gt(e){let{loadingType:t,text:n,botName:r}=e;return o().createElement(ct,{"data-testid":s.dT},o().createElement(ut,{$loadingType:t},o().createElement(dt,{$loadingType:t}),o().createElement(dt,{$loadingType:t}),o().createElement(dt,{$loadingType:t})),n&&o().createElement(pt,null,o().createElement(ht,null,o().createElement(lt,{width:16,height:16}))," ",o().createElement(mt,null,o().createElement(ft,null,r)," ",n)))}function bt(e){let{imageWidth:t,imageHeight:n,hasCaption:r}=e;return o().createElement(He,{title:"Loading image...",$imageWidth:t,$imageHeight:n?Number(n):void 0,$hasCaption:r},o().createElement(gt,{loadingType:"image"}),o().createElement("div",null,"Loading image"))}const vt=a.i7`
|
|
1934
1782
|
from {
|
|
1935
1783
|
background-position: 0%;
|
|
1936
1784
|
}
|
|
@@ -1974,7 +1822,7 @@
|
|
|
1974
1822
|
div:nth-child(3) {
|
|
1975
1823
|
z-index: 1;
|
|
1976
1824
|
}
|
|
1977
|
-
`,xt=function(e){let{loading:t,children:n,opacity:a=.6}=e;const[i,l]=(0,r.useState)(!t);return(0,r.useEffect)(()=>{i||t||setTimeout(()=>l(!0),300)},[i,t]),i?null:o().createElement(yt,{finished:!t,hideTransitionLength:.3,opacity:a},o().createElement("div",null),o().createElement("div",null),o().createElement("div",null,n))},wt={link:o().createElement(ot,{size:20}),dialogue_trigger:o().createElement(Ie,null)};function Et(e){var t,n,a,i;let{image:l,first:d,isCarousel:p,fromBot:f,inView:h,imageWidth:m,imageHeight:g,loading:b}=e;const[v,y]=Re(),x=(0,c.wA)(),{chatMessages:w}=(0,c.d4)(u.DZ)||[],E=(0,c.d4)(u.$P)||[],[k,_]=(0,r.useState)(!1),A=(0,r.useRef)(null),T=m===s.T5[600],S=e=>t=>{const n=w.map(De.A),r=n[n.length-1];(0
|
|
1825
|
+
`,xt=function(e){let{loading:t,children:n,opacity:a=.6}=e;const[i,l]=(0,r.useState)(!t);return(0,r.useEffect)(()=>{i||t||setTimeout(()=>l(!0),300)},[i,t]),i?null:o().createElement(yt,{finished:!t,hideTransitionLength:.3,opacity:a},o().createElement("div",null),o().createElement("div",null),o().createElement("div",null,n))},wt={link:o().createElement(ot,{size:20}),dialogue_trigger:o().createElement(Ie,null)};function Et(e){var t,n,a,i;let{image:l,first:d,isCarousel:p,fromBot:f,inView:h,imageWidth:m,imageHeight:g,loading:b}=e;const[v,y]=Re(),x=(0,c.wA)(),{chatMessages:w}=(0,c.d4)(u.DZ)||[],E=(0,c.d4)(u.$P)||[],[k,_]=(0,r.useState)(!1),A=(0,r.useRef)(null),T=m===s.T5[600],S=e=>t=>{const n=w.map(De.A),r=n[n.length-1];(0,Ce.fz)({event:t,button:(0,Pe.A)(e),buttonType:e.button_type,chatLog:n,lastMessage:r,renderedBy:null==E?void 0:E.renderedBy})||(x((0,G.Bd)(e,r)),"link"===e.button_type&&setTimeout(()=>window.open(e.value,"_blank"),500))},$=Boolean((null===(t=l.title)||void 0===t?void 0:t.trim())||(null===(n=l.description)||void 0===n?void 0:n.trim())),C=null!=l&&l.newTab?"_blank":"_self",O=l.buttons||[],I=l.description&&(null===(a=l.description)||void 0===a?void 0:a.length)>100?l.description.slice(0,100).concat("..."):l.description;return(0,r.useEffect)(()=>{var e,t;k&&(null===(e=A.current)||void 0===e||e.close(),null===(t=A.current)||void 0===t||t.showModal())},[k]),o().createElement(o().Fragment,null,k&&(0,$e.createPortal)(o().createElement(Me,{onClick:()=>_(!1),ref:A},o().createElement(Le,{onClick:()=>_(!1),autoFocus:!0},o().createElement(Oe.US,{width:"30",height:"30"})),o().createElement(Ne,{src:l.imageUrl})),((null===(i=window.kindlyChat)||void 0===i?void 0:i.shadowRoot)||window.document).getElementById("chatContainer")),o().createElement(Ve,{$first:d,ref:v,$imageWidth:m,$imageHeight:g,$isCarousel:p,$fromBot:f,inert:h?void 0:"true"},o().createElement(xt,{loading:b},"Uploading"),l.linkUrl?o().createElement(We,{$imageWidth:m,$imageHeight:g,hidden:!y,href:l.linkUrl,target:C,$isCarousel:p},o().createElement(Ke,{src:l.imageUrl,alt:l.altText,tabIndex:0,$carousel:p,$fromBot:f,$imageWidth:m,$imageHeight:g}),l.linkUrl&&o().createElement(nt,null),l.linkUrl&&o().createElement(rt,{width:16,height:16})):o().createElement(qe,{$imageWidth:m,$imageHeight:g,hidden:!y,$isCarousel:p},o().createElement(Ke,{src:l.imageUrl,alt:l.altText,tabIndex:-1,$carousel:p,$fromBot:f,$imageWidth:m,$imageHeight:g})),!b&&o().createElement(at,{"data-testid":"enlarge-image-button","aria-label":"Enlarge image",onClick:()=>_(!0),$inView:h}),!b&&o().createElement(it,null),!y&&o().createElement(bt,{imageWidth:m,imageHeight:g,hasCaption:$}),$&&o().createElement(Ye,null,l.title&&o().createElement(Xe,{$imageWidth:m,$imageHeight:g},l.title),I&&o().createElement(Ze,{$imageWidth:m,$imageHeight:g},I)),!T&&O.map(e=>o().createElement(Je,{key:e.id,title:e.label,onClick:S(e),$inView:h},o().createElement("span",null,e.label),wt[e.button_type]))))}const kt=function(){let{type:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(null!=e?e:"").split("/");return(null==t?void 0:t[0])===s.sl.IMAGE?s.sl.IMAGE:(null==t?void 0:t[1])===s.sl.PDF?s.sl.PDF:t.slice(-1)[0]};var _t=n(534);const At=e=>{let{fromUser:t,$hasError:n,theme:r}=e;return n?i.Tj.grayColor:t?r.userMessageBackground:r.botMessageBackground},Tt=a.Ay.div`
|
|
1978
1826
|
position: relative;
|
|
1979
1827
|
text-align: center;
|
|
1980
1828
|
cursor: pointer;
|
|
@@ -2031,7 +1879,7 @@
|
|
|
2031
1879
|
background-position: center center;
|
|
2032
1880
|
background-repeat: no-repeat;
|
|
2033
1881
|
background-size: cover;
|
|
2034
|
-
|
|
1882
|
+
`,$t=a.Ay.div`
|
|
2035
1883
|
width: 175px;
|
|
2036
1884
|
height: 175px;
|
|
2037
1885
|
position: relative;
|
|
@@ -2045,10 +1893,10 @@
|
|
|
2045
1893
|
width: 24px;
|
|
2046
1894
|
z-index: 2;
|
|
2047
1895
|
}
|
|
2048
|
-
|
|
1896
|
+
`,Ct=a.Ay.div`
|
|
2049
1897
|
display: flex;
|
|
2050
1898
|
justify-content: ${e=>{let{fromUser:t}=e;return t?"flex-end":"flex-start"}};
|
|
2051
|
-
`;function Ot(e){let{avatar:t}=e;const n=t?{backgroundImage:`url(${t})`}:{};return t?o().createElement(St,{style:n}):null}var It=n(2279);const Lt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{token:t}=(0,c.d4)(u.FI),{PAT_HOST:n}=(0,c.d4)(u.cA);return(0,It.l)(e,n,t)};function Mt(e){var t;let{attachment:n,avatar:r,chatMessageStatus:a}=e;const i=n.sender===s.bS.USER,l=kt(n)===s.sl.IMAGE,c=Boolean(a)||n.status===s.Le.ERROR||n.status===s.Le.INFECTED,u=Lt(n),d=!u,p={imageUrl:null!=u?u:"",altText:`Image ${n.name||`from ${null!==(t=null==n?void 0:n.sender)&&void 0!==t?t:"agent"}`}`};return l?o().createElement(
|
|
1899
|
+
`;function Ot(e){let{avatar:t}=e;const n=t?{backgroundImage:`url(${t})`}:{};return t?o().createElement(St,{style:n}):null}var It=n(2279);const Lt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{token:t}=(0,c.d4)(u.FI),{PAT_HOST:n}=(0,c.d4)(u.cA);return(0,It.l)(e,n,t)};function Mt(e){var t;let{attachment:n,avatar:r,chatMessageStatus:a}=e;const i=n.sender===s.bS.USER,l=kt(n)===s.sl.IMAGE,c=Boolean(a)||n.status===s.Le.ERROR||n.status===s.Le.INFECTED,u=Lt(n),d=!u,p={imageUrl:null!=u?u:"",altText:`Image ${n.name||`from ${null!==(t=null==n?void 0:n.sender)&&void 0!==t?t:"agent"}`}`};return l?o().createElement(Ct,{fromUser:i},o().createElement(Ot,{avatar:r}),!c&&!d&&o().createElement(Et,{image:p,fromBot:!i,isCarousel:!1,imageWidth:"250",inView:!0,first:!1,loading:n.status===s.Le.PROCESSING}),!c&&d&&o().createElement($t,{isImage:l},o().createElement(Se,null),o().createElement(xt,{loading:!0})),c&&o().createElement($t,null,o().createElement(Te,null))):o().createElement(Ct,{fromUser:i},o().createElement(Ot,{avatar:r}),o().createElement(Tt,{fromUser:i,$loading:d,$hasError:c},o().createElement(Ae.A,{height:10}),o().createElement(xt,{loading:!c&&d,opacity:.35}),!c&&!d&&o().createElement("a",{href:u,target:"_blank",rel:"noopener noreferrer"},n.name,o().createElement(D,null)),!c&&d&&o().createElement("span",null,"Uploading"),c&&o().createElement(Te,null)))}var Nt=n(1847),Rt=n(1966),Pt=n(6421);const Dt=140;function jt(e){let{chatMessage:t,imageCarousel:n}=e;const[a,i]=(0,r.useState)(0),[l,c]=(0,r.useState)(0),u=s.T5[t.image_carousel_size||1e3],[d,p]=(0,r.useState)(Dt.toString());(0,r.useEffect)(()=>{let e=!0;if(null!=n&&n.length){const t=new Image;t.src=n[0].imageUrl,t.onload=()=>{const n=t.width/u,r=t.height/n;e&&p(r.toString())}}return()=>{e=!1}},[n,p,u]);const f=(0,r.useMemo)(()=>u===s.T5[800]?102:u===s.T5[600]?96:30,[u]),h=e=>u===s.T5[600]&&a===e-1||a===e,m=(0,r.useCallback)((e,t)=>{if(e<0||e>=t.length)return;let n=0;n=e>=t.length-1?-(e*u-f):-(e*u+5*e),i(e),c(n)},[u,f]),{handleTouchStart:g,handleTouchMove:b,handleTouchEnd:v}=(0,Rt.A)({carousel:n,index:a,setIndex:m}),y=(0,r.useCallback)(e=>{e&&setTimeout(()=>{e.scrollLeft=0},100)},[]);return o().createElement(Ue,{$active:n.length>1,ref:y},o().createElement(Pt.A,{carouselPosition:l,onTouchStart:g,onTouchMove:b,onTouchEnd:v},n.map((e,r)=>o().createElement(Et,{key:e.id||r,first:0===r,image:e,fromBot:t.from_bot,isCarousel:n.length>1,inView:h(r),imageWidth:u,imageHeight:d}))),o().createElement(Qe,{$previous:!0,$disabled:a<=0,"aria-label":"Go to previous image",onClick:()=>m(a-1,n)}),o().createElement(et,{disabled:a<=0}),o().createElement(Qe,{$next:!0,$disabled:a>=n.length-1,"aria-label":"Go to next image",onClick:()=>m(a+1,n)}),o().createElement(tt,{disabled:a>=n.length-1}))}const Ft=a.Ay.button`
|
|
2052
1900
|
display: block;
|
|
2053
1901
|
background: none;
|
|
2054
1902
|
background-color: transparent;
|
|
@@ -2060,7 +1908,7 @@
|
|
|
2060
1908
|
cursor: pointer;
|
|
2061
1909
|
padding: 0;
|
|
2062
1910
|
${R.sF}
|
|
2063
|
-
`,zt=function(e){let{button:t}=e;const n=(0,c.wA)(),a=(0,r.useCallback)(()=>n((0,G.V$)(t)),[t,n]);return o().createElement(Ft,{onClick:a},t.contact_details.edit_text)},{entries:Bt,setPrototypeOf:Ht,isFrozen:Ut,getPrototypeOf:Vt,getOwnPropertyDescriptor:Gt}=Object;let{freeze:Wt,seal:qt,create:Kt}=Object,{apply:Yt,construct:Xt}="undefined"!=typeof Reflect&&Reflect;Wt||(Wt=function(e){return e}),qt||(qt=function(e){return e}),Yt||(Yt=function(e,t,n){return e.apply(t,n)}),Xt||(Xt=function(e,t){return new e(...t)});const Zt=fn(Array.prototype.forEach),Jt=fn(Array.prototype.lastIndexOf),Qt=fn(Array.prototype.pop),en=fn(Array.prototype.push),tn=fn(Array.prototype.splice),nn=fn(String.prototype.toLowerCase),rn=fn(String.prototype.toString),on=fn(String.prototype.match),an=fn(String.prototype.replace),ln=fn(String.prototype.indexOf),sn=fn(String.prototype.trim),cn=fn(Object.prototype.hasOwnProperty),un=fn(RegExp.prototype.test),dn=(pn=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Xt(pn,t)});var pn;function fn(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return Yt(e,t,r)}}function hn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:nn;Ht&&Ht(e,null);let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(Ut(t)||(t[r]=e),o=e)}e[o]=!0}return e}function mn(e){for(let t=0;t<e.length;t++)cn(e,t)||(e[t]=null);return e}function gn(e){const t=Kt(null);for(const[n,r]of Bt(e))cn(e,n)&&(Array.isArray(r)?t[n]=mn(r):r&&"object"==typeof r&&r.constructor===Object?t[n]=gn(r):t[n]=r);return t}function bn(e,t){for(;null!==e;){const n=Gt(e,t);if(n){if(n.get)return fn(n.get);if("function"==typeof n.value)return fn(n.value)}e=Vt(e)}return function(){return null}}const vn=Wt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),yn=Wt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),xn=Wt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),wn=Wt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),En=Wt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),kn=Wt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),_n=Wt(["#text"]),An=Wt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Tn=Wt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Sn=Wt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Cn=Wt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),$n=qt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),On=qt(/<%[\w\W]*|[\w\W]*%>/gm),In=qt(/\$\{[\w\W]*/gm),Ln=qt(/^data-[\-\w.\u00B7-\uFFFF]+$/),Mn=qt(/^aria-[\-\w]+$/),Nn=qt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Rn=qt(/^(?:\w+script|data):/i),Pn=qt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Dn=qt(/^html$/i),jn=qt(/^[a-z][.\w]*(-[.\w]+)+$/i);var Fn=Object.freeze({__proto__:null,ARIA_ATTR:Mn,ATTR_WHITESPACE:Pn,CUSTOM_ELEMENT:jn,DATA_ATTR:Ln,DOCTYPE_NAME:Dn,ERB_EXPR:On,IS_ALLOWED_URI:Nn,IS_SCRIPT_OR_DATA:Rn,MUSTACHE_EXPR:$n,TMPLIT_EXPR:In});const zn=function(){return"undefined"==typeof window?null:window};var Bn=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:zn();const n=t=>e(t);if(n.version="3.2.6",n.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return n.isSupported=!1,n;let{document:r}=t;const o=r,a=o.currentScript,{DocumentFragment:i,HTMLTemplateElement:l,Node:s,Element:c,NodeFilter:u,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:p,DOMParser:f,trustedTypes:h}=t,m=c.prototype,g=bn(m,"cloneNode"),b=bn(m,"remove"),v=bn(m,"nextSibling"),y=bn(m,"childNodes"),x=bn(m,"parentNode");if("function"==typeof l){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let w,E="";const{implementation:k,createNodeIterator:_,createDocumentFragment:A,getElementsByTagName:T}=r,{importNode:S}=o;let C={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof Bt&&"function"==typeof x&&k&&void 0!==k.createHTMLDocument;const{MUSTACHE_EXPR:$,ERB_EXPR:O,TMPLIT_EXPR:I,DATA_ATTR:L,ARIA_ATTR:M,IS_SCRIPT_OR_DATA:N,ATTR_WHITESPACE:R,CUSTOM_ELEMENT:P}=Fn;let{IS_ALLOWED_URI:D}=Fn,j=null;const F=hn({},[...vn,...yn,...xn,...En,..._n]);let z=null;const B=hn({},[...An,...Tn,...Sn,...Cn]);let H=Object.seal(Kt(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}})),U=null,V=null,G=!0,W=!0,q=!1,K=!0,Y=!1,X=!0,Z=!1,J=!1,Q=!1,ee=!1,te=!1,ne=!1,re=!0,oe=!1,ae=!0,ie=!1,le={},se=null;const ce=hn({},["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"]);let ue=null;const de=hn({},["audio","video","img","source","image","track"]);let pe=null;const fe=hn({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),he="http://www.w3.org/1998/Math/MathML",me="http://www.w3.org/2000/svg",ge="http://www.w3.org/1999/xhtml";let be=ge,ve=!1,ye=null;const xe=hn({},[he,me,ge],rn);let we=hn({},["mi","mo","mn","ms","mtext"]),Ee=hn({},["annotation-xml"]);const ke=hn({},["title","style","font","a","script"]);let _e=null;const Ae=["application/xhtml+xml","text/html"];let Te=null,Se=null;const Ce=r.createElement("form"),$e=function(e){return e instanceof RegExp||e instanceof Function},Oe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Se||Se!==e){if(e&&"object"==typeof e||(e={}),e=gn(e),_e=-1===Ae.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Te="application/xhtml+xml"===_e?rn:nn,j=cn(e,"ALLOWED_TAGS")?hn({},e.ALLOWED_TAGS,Te):F,z=cn(e,"ALLOWED_ATTR")?hn({},e.ALLOWED_ATTR,Te):B,ye=cn(e,"ALLOWED_NAMESPACES")?hn({},e.ALLOWED_NAMESPACES,rn):xe,pe=cn(e,"ADD_URI_SAFE_ATTR")?hn(gn(fe),e.ADD_URI_SAFE_ATTR,Te):fe,ue=cn(e,"ADD_DATA_URI_TAGS")?hn(gn(de),e.ADD_DATA_URI_TAGS,Te):de,se=cn(e,"FORBID_CONTENTS")?hn({},e.FORBID_CONTENTS,Te):ce,U=cn(e,"FORBID_TAGS")?hn({},e.FORBID_TAGS,Te):gn({}),V=cn(e,"FORBID_ATTR")?hn({},e.FORBID_ATTR,Te):gn({}),le=!!cn(e,"USE_PROFILES")&&e.USE_PROFILES,G=!1!==e.ALLOW_ARIA_ATTR,W=!1!==e.ALLOW_DATA_ATTR,q=e.ALLOW_UNKNOWN_PROTOCOLS||!1,K=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,X=!1!==e.SAFE_FOR_XML,Z=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,Q=e.FORCE_BODY||!1,re=!1!==e.SANITIZE_DOM,oe=e.SANITIZE_NAMED_PROPS||!1,ae=!1!==e.KEEP_CONTENT,ie=e.IN_PLACE||!1,D=e.ALLOWED_URI_REGEXP||Nn,be=e.NAMESPACE||ge,we=e.MATHML_TEXT_INTEGRATION_POINTS||we,Ee=e.HTML_INTEGRATION_POINTS||Ee,H=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&$e(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(H.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&$e(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(H.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(H.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(W=!1),te&&(ee=!0),le&&(j=hn({},_n),z=[],!0===le.html&&(hn(j,vn),hn(z,An)),!0===le.svg&&(hn(j,yn),hn(z,Tn),hn(z,Cn)),!0===le.svgFilters&&(hn(j,xn),hn(z,Tn),hn(z,Cn)),!0===le.mathMl&&(hn(j,En),hn(z,Sn),hn(z,Cn))),e.ADD_TAGS&&(j===F&&(j=gn(j)),hn(j,e.ADD_TAGS,Te)),e.ADD_ATTR&&(z===B&&(z=gn(z)),hn(z,e.ADD_ATTR,Te)),e.ADD_URI_SAFE_ATTR&&hn(pe,e.ADD_URI_SAFE_ATTR,Te),e.FORBID_CONTENTS&&(se===ce&&(se=gn(se)),hn(se,e.FORBID_CONTENTS,Te)),ae&&(j["#text"]=!0),Z&&hn(j,["html","head","body"]),j.table&&(hn(j,["tbody"]),delete U.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw dn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw dn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=e.TRUSTED_TYPES_POLICY,E=w.createHTML("")}else void 0===w&&(w=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(h,a)),null!==w&&"string"==typeof E&&(E=w.createHTML(""));Wt&&Wt(e),Se=e}},Ie=hn({},[...yn,...xn,...wn]),Le=hn({},[...En,...kn]),Me=function(e){en(n.removed,{element:e});try{x(e).removeChild(e)}catch(t){b(e)}},Ne=function(e,t){try{en(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){en(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ee||te)try{Me(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Re=function(e){let t=null,n=null;if(Q)e="<remove></remove>"+e;else{const t=on(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===_e&&be===ge&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=w?w.createHTML(e):e;if(be===ge)try{t=(new f).parseFromString(o,_e)}catch(e){}if(!t||!t.documentElement){t=k.createDocument(be,"template",null);try{t.documentElement.innerHTML=ve?E:o}catch(e){}}const a=t.body||t.documentElement;return e&&n&&a.insertBefore(r.createTextNode(n),a.childNodes[0]||null),be===ge?T.call(t,Z?"html":"body")[0]:Z?t.documentElement:a},Pe=function(e){return _.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},De=function(e){return e instanceof p&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},je=function(e){return"function"==typeof s&&e instanceof s};function Fe(e,t,r){Zt(e,e=>{e.call(n,t,r,Se)})}const ze=function(e){let t=null;if(Fe(C.beforeSanitizeElements,e,null),De(e))return Me(e),!0;const r=Te(e.nodeName);if(Fe(C.uponSanitizeElement,e,{tagName:r,allowedTags:j}),X&&e.hasChildNodes()&&!je(e.firstElementChild)&&un(/<[/\w!]/g,e.innerHTML)&&un(/<[/\w!]/g,e.textContent))return Me(e),!0;if(7===e.nodeType)return Me(e),!0;if(X&&8===e.nodeType&&un(/<[/\w]/g,e.data))return Me(e),!0;if(!j[r]||U[r]){if(!U[r]&&He(r)){if(H.tagNameCheck instanceof RegExp&&un(H.tagNameCheck,r))return!1;if(H.tagNameCheck instanceof Function&&H.tagNameCheck(r))return!1}if(ae&&!se[r]){const t=x(e)||e.parentNode,n=y(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r){const o=g(n[r],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,v(e))}}return Me(e),!0}return e instanceof c&&!function(e){let t=x(e);t&&t.tagName||(t={namespaceURI:be,tagName:"template"});const n=nn(e.tagName),r=nn(t.tagName);return!!ye[e.namespaceURI]&&(e.namespaceURI===me?t.namespaceURI===ge?"svg"===n:t.namespaceURI===he?"svg"===n&&("annotation-xml"===r||we[r]):Boolean(Ie[n]):e.namespaceURI===he?t.namespaceURI===ge?"math"===n:t.namespaceURI===me?"math"===n&&Ee[r]:Boolean(Le[n]):e.namespaceURI===ge?!(t.namespaceURI===me&&!Ee[r])&&!(t.namespaceURI===he&&!we[r])&&!Le[n]&&(ke[n]||!Ie[n]):!("application/xhtml+xml"!==_e||!ye[e.namespaceURI]))}(e)?(Me(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!un(/<\/no(script|embed|frames)/i,e.innerHTML)?(Y&&3===e.nodeType&&(t=e.textContent,Zt([$,O,I],e=>{t=an(t,e," ")}),e.textContent!==t&&(en(n.removed,{element:e.cloneNode()}),e.textContent=t)),Fe(C.afterSanitizeElements,e,null),!1):(Me(e),!0)},Be=function(e,t,n){if(re&&("id"===t||"name"===t)&&(n in r||n in Ce))return!1;if(W&&!V[t]&&un(L,t));else if(G&&un(M,t));else if(!z[t]||V[t]){if(!(He(e)&&(H.tagNameCheck instanceof RegExp&&un(H.tagNameCheck,e)||H.tagNameCheck instanceof Function&&H.tagNameCheck(e))&&(H.attributeNameCheck instanceof RegExp&&un(H.attributeNameCheck,t)||H.attributeNameCheck instanceof Function&&H.attributeNameCheck(t))||"is"===t&&H.allowCustomizedBuiltInElements&&(H.tagNameCheck instanceof RegExp&&un(H.tagNameCheck,n)||H.tagNameCheck instanceof Function&&H.tagNameCheck(n))))return!1}else if(pe[t]);else if(un(D,an(n,R,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==ln(n,"data:")||!ue[e])if(q&&!un(N,an(n,R,"")));else if(n)return!1;return!0},He=function(e){return"annotation-xml"!==e&&on(e,P)},Ue=function(e){Fe(C.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||De(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z,forceKeepAttr:void 0};let o=t.length;for(;o--;){const a=t[o],{name:i,namespaceURI:l,value:s}=a,c=Te(i),u=s;let d="value"===i?u:sn(u);if(r.attrName=c,r.attrValue=d,r.keepAttr=!0,r.forceKeepAttr=void 0,Fe(C.uponSanitizeAttribute,e,r),d=r.attrValue,!oe||"id"!==c&&"name"!==c||(Ne(i,e),d="user-content-"+d),X&&un(/((--!?|])>)|<\/(style|title)/i,d)){Ne(i,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){Ne(i,e);continue}if(!K&&un(/\/>/i,d)){Ne(i,e);continue}Y&&Zt([$,O,I],e=>{d=an(d,e," ")});const p=Te(e.nodeName);if(Be(p,c,d)){if(w&&"object"==typeof h&&"function"==typeof h.getAttributeType)if(l);else switch(h.getAttributeType(p,c)){case"TrustedHTML":d=w.createHTML(d);break;case"TrustedScriptURL":d=w.createScriptURL(d)}if(d!==u)try{l?e.setAttributeNS(l,i,d):e.setAttribute(i,d),De(e)?Me(e):Qt(n.removed)}catch(t){Ne(i,e)}}else Ne(i,e)}Fe(C.afterSanitizeAttributes,e,null)},Ve=function e(t){let n=null;const r=Pe(t);for(Fe(C.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)Fe(C.uponSanitizeShadowNode,n,null),ze(n),Ue(n),n.content instanceof i&&e(n.content);Fe(C.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,a=null,l=null,c=null;if(ve=!e,ve&&(e="\x3c!--\x3e"),"string"!=typeof e&&!je(e)){if("function"!=typeof e.toString)throw dn("toString is not a function");if("string"!=typeof(e=e.toString()))throw dn("dirty is not a string, aborting")}if(!n.isSupported)return e;if(J||Oe(t),n.removed=[],"string"==typeof e&&(ie=!1),ie){if(e.nodeName){const t=Te(e.nodeName);if(!j[t]||U[t])throw dn("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof s)r=Re("\x3c!----\x3e"),a=r.ownerDocument.importNode(e,!0),1===a.nodeType&&"BODY"===a.nodeName||"HTML"===a.nodeName?r=a:r.appendChild(a);else{if(!ee&&!Y&&!Z&&-1===e.indexOf("<"))return w&&ne?w.createHTML(e):e;if(r=Re(e),!r)return ee?null:ne?E:""}r&&Q&&Me(r.firstChild);const u=Pe(ie?e:r);for(;l=u.nextNode();)ze(l),Ue(l),l.content instanceof i&&Ve(l.content);if(ie)return e;if(ee){if(te)for(c=A.call(r.ownerDocument);r.firstChild;)c.appendChild(r.firstChild);else c=r;return(z.shadowroot||z.shadowrootmode)&&(c=S.call(o,c,!0)),c}let d=Z?r.outerHTML:r.innerHTML;return Z&&j["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&un(Dn,r.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+d),Y&&Zt([$,O,I],e=>{d=an(d,e," ")}),w&&ne?w.createHTML(d):d},n.setConfig=function(){Oe(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},n.clearConfig=function(){Se=null,J=!1},n.isValidAttribute=function(e,t,n){Se||Oe({});const r=Te(e),o=Te(t);return Be(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&en(C[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=Jt(C[e],t);return-1===n?void 0:tn(C[e],n,1)[0]}return Qt(C[e])},n.removeHooks=function(e){C[e]=[]},n.removeAllHooks=function(){C={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();const Hn=["form","input"],Un=["target"],Vn=["action"],Gn=e=>Bn.sanitize(e,{ADD_ATTR:Un,FORBID_ATTR:Vn,FORBID_TAGS:Hn,USE_PROFILES:{svg:!1,svgFilters:!1,mathMl:!1,html:!0}}),Wn=function(e){return o().createElement("div",{dangerouslySetInnerHTML:{__html:Gn(e)}})},qn=a.i7`
|
|
1911
|
+
`,zt=function(e){let{button:t}=e;const n=(0,c.wA)(),a=(0,r.useCallback)(()=>n((0,G.V$)(t)),[t,n]);return o().createElement(Ft,{onClick:a},t.contact_details.edit_text)},{entries:Bt,setPrototypeOf:Ht,isFrozen:Ut,getPrototypeOf:Vt,getOwnPropertyDescriptor:Gt}=Object;let{freeze:Wt,seal:qt,create:Kt}=Object,{apply:Yt,construct:Xt}="undefined"!=typeof Reflect&&Reflect;Wt||(Wt=function(e){return e}),qt||(qt=function(e){return e}),Yt||(Yt=function(e,t,n){return e.apply(t,n)}),Xt||(Xt=function(e,t){return new e(...t)});const Zt=fn(Array.prototype.forEach),Jt=fn(Array.prototype.lastIndexOf),Qt=fn(Array.prototype.pop),en=fn(Array.prototype.push),tn=fn(Array.prototype.splice),nn=fn(String.prototype.toLowerCase),rn=fn(String.prototype.toString),on=fn(String.prototype.match),an=fn(String.prototype.replace),ln=fn(String.prototype.indexOf),sn=fn(String.prototype.trim),cn=fn(Object.prototype.hasOwnProperty),un=fn(RegExp.prototype.test),dn=(pn=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Xt(pn,t)});var pn;function fn(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return Yt(e,t,r)}}function hn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:nn;Ht&&Ht(e,null);let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(Ut(t)||(t[r]=e),o=e)}e[o]=!0}return e}function mn(e){for(let t=0;t<e.length;t++)cn(e,t)||(e[t]=null);return e}function gn(e){const t=Kt(null);for(const[n,r]of Bt(e))cn(e,n)&&(Array.isArray(r)?t[n]=mn(r):r&&"object"==typeof r&&r.constructor===Object?t[n]=gn(r):t[n]=r);return t}function bn(e,t){for(;null!==e;){const n=Gt(e,t);if(n){if(n.get)return fn(n.get);if("function"==typeof n.value)return fn(n.value)}e=Vt(e)}return function(){return null}}const vn=Wt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),yn=Wt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),xn=Wt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),wn=Wt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),En=Wt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),kn=Wt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),_n=Wt(["#text"]),An=Wt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Tn=Wt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Sn=Wt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),$n=Wt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Cn=qt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),On=qt(/<%[\w\W]*|[\w\W]*%>/gm),In=qt(/\$\{[\w\W]*/gm),Ln=qt(/^data-[\-\w.\u00B7-\uFFFF]+$/),Mn=qt(/^aria-[\-\w]+$/),Nn=qt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Rn=qt(/^(?:\w+script|data):/i),Pn=qt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Dn=qt(/^html$/i),jn=qt(/^[a-z][.\w]*(-[.\w]+)+$/i);var Fn=Object.freeze({__proto__:null,ARIA_ATTR:Mn,ATTR_WHITESPACE:Pn,CUSTOM_ELEMENT:jn,DATA_ATTR:Ln,DOCTYPE_NAME:Dn,ERB_EXPR:On,IS_ALLOWED_URI:Nn,IS_SCRIPT_OR_DATA:Rn,MUSTACHE_EXPR:Cn,TMPLIT_EXPR:In});const zn=function(){return"undefined"==typeof window?null:window};var Bn=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:zn();const n=t=>e(t);if(n.version="3.2.6",n.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return n.isSupported=!1,n;let{document:r}=t;const o=r,a=o.currentScript,{DocumentFragment:i,HTMLTemplateElement:l,Node:s,Element:c,NodeFilter:u,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:p,DOMParser:f,trustedTypes:h}=t,m=c.prototype,g=bn(m,"cloneNode"),b=bn(m,"remove"),v=bn(m,"nextSibling"),y=bn(m,"childNodes"),x=bn(m,"parentNode");if("function"==typeof l){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let w,E="";const{implementation:k,createNodeIterator:_,createDocumentFragment:A,getElementsByTagName:T}=r,{importNode:S}=o;let $={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof Bt&&"function"==typeof x&&k&&void 0!==k.createHTMLDocument;const{MUSTACHE_EXPR:C,ERB_EXPR:O,TMPLIT_EXPR:I,DATA_ATTR:L,ARIA_ATTR:M,IS_SCRIPT_OR_DATA:N,ATTR_WHITESPACE:R,CUSTOM_ELEMENT:P}=Fn;let{IS_ALLOWED_URI:D}=Fn,j=null;const F=hn({},[...vn,...yn,...xn,...En,..._n]);let z=null;const B=hn({},[...An,...Tn,...Sn,...$n]);let H=Object.seal(Kt(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}})),U=null,V=null,G=!0,W=!0,q=!1,K=!0,Y=!1,X=!0,Z=!1,J=!1,Q=!1,ee=!1,te=!1,ne=!1,re=!0,oe=!1,ae=!0,ie=!1,le={},se=null;const ce=hn({},["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"]);let ue=null;const de=hn({},["audio","video","img","source","image","track"]);let pe=null;const fe=hn({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),he="http://www.w3.org/1998/Math/MathML",me="http://www.w3.org/2000/svg",ge="http://www.w3.org/1999/xhtml";let be=ge,ve=!1,ye=null;const xe=hn({},[he,me,ge],rn);let we=hn({},["mi","mo","mn","ms","mtext"]),Ee=hn({},["annotation-xml"]);const ke=hn({},["title","style","font","a","script"]);let _e=null;const Ae=["application/xhtml+xml","text/html"];let Te=null,Se=null;const $e=r.createElement("form"),Ce=function(e){return e instanceof RegExp||e instanceof Function},Oe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Se||Se!==e){if(e&&"object"==typeof e||(e={}),e=gn(e),_e=-1===Ae.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Te="application/xhtml+xml"===_e?rn:nn,j=cn(e,"ALLOWED_TAGS")?hn({},e.ALLOWED_TAGS,Te):F,z=cn(e,"ALLOWED_ATTR")?hn({},e.ALLOWED_ATTR,Te):B,ye=cn(e,"ALLOWED_NAMESPACES")?hn({},e.ALLOWED_NAMESPACES,rn):xe,pe=cn(e,"ADD_URI_SAFE_ATTR")?hn(gn(fe),e.ADD_URI_SAFE_ATTR,Te):fe,ue=cn(e,"ADD_DATA_URI_TAGS")?hn(gn(de),e.ADD_DATA_URI_TAGS,Te):de,se=cn(e,"FORBID_CONTENTS")?hn({},e.FORBID_CONTENTS,Te):ce,U=cn(e,"FORBID_TAGS")?hn({},e.FORBID_TAGS,Te):gn({}),V=cn(e,"FORBID_ATTR")?hn({},e.FORBID_ATTR,Te):gn({}),le=!!cn(e,"USE_PROFILES")&&e.USE_PROFILES,G=!1!==e.ALLOW_ARIA_ATTR,W=!1!==e.ALLOW_DATA_ATTR,q=e.ALLOW_UNKNOWN_PROTOCOLS||!1,K=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,X=!1!==e.SAFE_FOR_XML,Z=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,Q=e.FORCE_BODY||!1,re=!1!==e.SANITIZE_DOM,oe=e.SANITIZE_NAMED_PROPS||!1,ae=!1!==e.KEEP_CONTENT,ie=e.IN_PLACE||!1,D=e.ALLOWED_URI_REGEXP||Nn,be=e.NAMESPACE||ge,we=e.MATHML_TEXT_INTEGRATION_POINTS||we,Ee=e.HTML_INTEGRATION_POINTS||Ee,H=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ce(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(H.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ce(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(H.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(H.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(W=!1),te&&(ee=!0),le&&(j=hn({},_n),z=[],!0===le.html&&(hn(j,vn),hn(z,An)),!0===le.svg&&(hn(j,yn),hn(z,Tn),hn(z,$n)),!0===le.svgFilters&&(hn(j,xn),hn(z,Tn),hn(z,$n)),!0===le.mathMl&&(hn(j,En),hn(z,Sn),hn(z,$n))),e.ADD_TAGS&&(j===F&&(j=gn(j)),hn(j,e.ADD_TAGS,Te)),e.ADD_ATTR&&(z===B&&(z=gn(z)),hn(z,e.ADD_ATTR,Te)),e.ADD_URI_SAFE_ATTR&&hn(pe,e.ADD_URI_SAFE_ATTR,Te),e.FORBID_CONTENTS&&(se===ce&&(se=gn(se)),hn(se,e.FORBID_CONTENTS,Te)),ae&&(j["#text"]=!0),Z&&hn(j,["html","head","body"]),j.table&&(hn(j,["tbody"]),delete U.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw dn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw dn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=e.TRUSTED_TYPES_POLICY,E=w.createHTML("")}else void 0===w&&(w=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(h,a)),null!==w&&"string"==typeof E&&(E=w.createHTML(""));Wt&&Wt(e),Se=e}},Ie=hn({},[...yn,...xn,...wn]),Le=hn({},[...En,...kn]),Me=function(e){en(n.removed,{element:e});try{x(e).removeChild(e)}catch(t){b(e)}},Ne=function(e,t){try{en(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){en(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ee||te)try{Me(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Re=function(e){let t=null,n=null;if(Q)e="<remove></remove>"+e;else{const t=on(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===_e&&be===ge&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=w?w.createHTML(e):e;if(be===ge)try{t=(new f).parseFromString(o,_e)}catch(e){}if(!t||!t.documentElement){t=k.createDocument(be,"template",null);try{t.documentElement.innerHTML=ve?E:o}catch(e){}}const a=t.body||t.documentElement;return e&&n&&a.insertBefore(r.createTextNode(n),a.childNodes[0]||null),be===ge?T.call(t,Z?"html":"body")[0]:Z?t.documentElement:a},Pe=function(e){return _.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},De=function(e){return e instanceof p&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},je=function(e){return"function"==typeof s&&e instanceof s};function Fe(e,t,r){Zt(e,e=>{e.call(n,t,r,Se)})}const ze=function(e){let t=null;if(Fe($.beforeSanitizeElements,e,null),De(e))return Me(e),!0;const r=Te(e.nodeName);if(Fe($.uponSanitizeElement,e,{tagName:r,allowedTags:j}),X&&e.hasChildNodes()&&!je(e.firstElementChild)&&un(/<[/\w!]/g,e.innerHTML)&&un(/<[/\w!]/g,e.textContent))return Me(e),!0;if(7===e.nodeType)return Me(e),!0;if(X&&8===e.nodeType&&un(/<[/\w]/g,e.data))return Me(e),!0;if(!j[r]||U[r]){if(!U[r]&&He(r)){if(H.tagNameCheck instanceof RegExp&&un(H.tagNameCheck,r))return!1;if(H.tagNameCheck instanceof Function&&H.tagNameCheck(r))return!1}if(ae&&!se[r]){const t=x(e)||e.parentNode,n=y(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r){const o=g(n[r],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,v(e))}}return Me(e),!0}return e instanceof c&&!function(e){let t=x(e);t&&t.tagName||(t={namespaceURI:be,tagName:"template"});const n=nn(e.tagName),r=nn(t.tagName);return!!ye[e.namespaceURI]&&(e.namespaceURI===me?t.namespaceURI===ge?"svg"===n:t.namespaceURI===he?"svg"===n&&("annotation-xml"===r||we[r]):Boolean(Ie[n]):e.namespaceURI===he?t.namespaceURI===ge?"math"===n:t.namespaceURI===me?"math"===n&&Ee[r]:Boolean(Le[n]):e.namespaceURI===ge?!(t.namespaceURI===me&&!Ee[r])&&!(t.namespaceURI===he&&!we[r])&&!Le[n]&&(ke[n]||!Ie[n]):!("application/xhtml+xml"!==_e||!ye[e.namespaceURI]))}(e)?(Me(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!un(/<\/no(script|embed|frames)/i,e.innerHTML)?(Y&&3===e.nodeType&&(t=e.textContent,Zt([C,O,I],e=>{t=an(t,e," ")}),e.textContent!==t&&(en(n.removed,{element:e.cloneNode()}),e.textContent=t)),Fe($.afterSanitizeElements,e,null),!1):(Me(e),!0)},Be=function(e,t,n){if(re&&("id"===t||"name"===t)&&(n in r||n in $e))return!1;if(W&&!V[t]&&un(L,t));else if(G&&un(M,t));else if(!z[t]||V[t]){if(!(He(e)&&(H.tagNameCheck instanceof RegExp&&un(H.tagNameCheck,e)||H.tagNameCheck instanceof Function&&H.tagNameCheck(e))&&(H.attributeNameCheck instanceof RegExp&&un(H.attributeNameCheck,t)||H.attributeNameCheck instanceof Function&&H.attributeNameCheck(t))||"is"===t&&H.allowCustomizedBuiltInElements&&(H.tagNameCheck instanceof RegExp&&un(H.tagNameCheck,n)||H.tagNameCheck instanceof Function&&H.tagNameCheck(n))))return!1}else if(pe[t]);else if(un(D,an(n,R,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==ln(n,"data:")||!ue[e])if(q&&!un(N,an(n,R,"")));else if(n)return!1;return!0},He=function(e){return"annotation-xml"!==e&&on(e,P)},Ue=function(e){Fe($.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||De(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z,forceKeepAttr:void 0};let o=t.length;for(;o--;){const a=t[o],{name:i,namespaceURI:l,value:s}=a,c=Te(i),u=s;let d="value"===i?u:sn(u);if(r.attrName=c,r.attrValue=d,r.keepAttr=!0,r.forceKeepAttr=void 0,Fe($.uponSanitizeAttribute,e,r),d=r.attrValue,!oe||"id"!==c&&"name"!==c||(Ne(i,e),d="user-content-"+d),X&&un(/((--!?|])>)|<\/(style|title)/i,d)){Ne(i,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){Ne(i,e);continue}if(!K&&un(/\/>/i,d)){Ne(i,e);continue}Y&&Zt([C,O,I],e=>{d=an(d,e," ")});const p=Te(e.nodeName);if(Be(p,c,d)){if(w&&"object"==typeof h&&"function"==typeof h.getAttributeType)if(l);else switch(h.getAttributeType(p,c)){case"TrustedHTML":d=w.createHTML(d);break;case"TrustedScriptURL":d=w.createScriptURL(d)}if(d!==u)try{l?e.setAttributeNS(l,i,d):e.setAttribute(i,d),De(e)?Me(e):Qt(n.removed)}catch(t){Ne(i,e)}}else Ne(i,e)}Fe($.afterSanitizeAttributes,e,null)},Ve=function e(t){let n=null;const r=Pe(t);for(Fe($.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)Fe($.uponSanitizeShadowNode,n,null),ze(n),Ue(n),n.content instanceof i&&e(n.content);Fe($.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,a=null,l=null,c=null;if(ve=!e,ve&&(e="\x3c!--\x3e"),"string"!=typeof e&&!je(e)){if("function"!=typeof e.toString)throw dn("toString is not a function");if("string"!=typeof(e=e.toString()))throw dn("dirty is not a string, aborting")}if(!n.isSupported)return e;if(J||Oe(t),n.removed=[],"string"==typeof e&&(ie=!1),ie){if(e.nodeName){const t=Te(e.nodeName);if(!j[t]||U[t])throw dn("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof s)r=Re("\x3c!----\x3e"),a=r.ownerDocument.importNode(e,!0),1===a.nodeType&&"BODY"===a.nodeName||"HTML"===a.nodeName?r=a:r.appendChild(a);else{if(!ee&&!Y&&!Z&&-1===e.indexOf("<"))return w&&ne?w.createHTML(e):e;if(r=Re(e),!r)return ee?null:ne?E:""}r&&Q&&Me(r.firstChild);const u=Pe(ie?e:r);for(;l=u.nextNode();)ze(l),Ue(l),l.content instanceof i&&Ve(l.content);if(ie)return e;if(ee){if(te)for(c=A.call(r.ownerDocument);r.firstChild;)c.appendChild(r.firstChild);else c=r;return(z.shadowroot||z.shadowrootmode)&&(c=S.call(o,c,!0)),c}let d=Z?r.outerHTML:r.innerHTML;return Z&&j["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&un(Dn,r.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+d),Y&&Zt([C,O,I],e=>{d=an(d,e," ")}),w&&ne?w.createHTML(d):d},n.setConfig=function(){Oe(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},n.clearConfig=function(){Se=null,J=!1},n.isValidAttribute=function(e,t,n){Se||Oe({});const r=Te(e),o=Te(t);return Be(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&en($[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=Jt($[e],t);return-1===n?void 0:tn($[e],n,1)[0]}return Qt($[e])},n.removeHooks=function(e){$[e]=[]},n.removeAllHooks=function(){$={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();const Hn=["form","input"],Un=["target"],Vn=["action"],Gn=e=>Bn.sanitize(e,{ADD_ATTR:Un,FORBID_ATTR:Vn,FORBID_TAGS:Hn,USE_PROFILES:{svg:!1,svgFilters:!1,mathMl:!1,html:!0}}),Wn=function(e){return o().createElement("div",{dangerouslySetInnerHTML:{__html:Gn(e)}})},qn=a.i7`
|
|
2064
1912
|
0% {
|
|
2065
1913
|
opacity: 0;
|
|
2066
1914
|
transform: translateY(6px);
|
|
@@ -2094,9 +1942,9 @@
|
|
|
2094
1942
|
transform: scale(1);
|
|
2095
1943
|
}
|
|
2096
1944
|
`,Yn=a.AH`
|
|
2097
|
-
${e=>{let{isSystemMessage:t}=e;return(0,W.qL)(t?1200:600)}};
|
|
1945
|
+
${e=>{let{$isSystemMessage:t}=e;return(0,W.qL)(t?1200:600)}};
|
|
2098
1946
|
text-rendering: optimizeLegibility;
|
|
2099
|
-
animation-name: ${e=>{let{isSystemMessage:t}=e;return t?Kn:qn}};
|
|
1947
|
+
animation-name: ${e=>{let{$isSystemMessage:t}=e;return t?Kn:qn}};
|
|
2100
1948
|
`,Xn=a.Ay.div`
|
|
2101
1949
|
display: block;
|
|
2102
1950
|
width: 100%;
|
|
@@ -2104,8 +1952,8 @@
|
|
|
2104
1952
|
display: flex;
|
|
2105
1953
|
flex-direction: column;
|
|
2106
1954
|
${Yn};
|
|
2107
|
-
${e=>!e
|
|
2108
|
-
${e=>e
|
|
1955
|
+
${e=>!e.$fromBot&&"display: block; "};
|
|
1956
|
+
${e=>e.$hasSiblings&&"margin-bottom: 8px;"}
|
|
2109
1957
|
|
|
2110
1958
|
@media (prefers-reduced-motion) {
|
|
2111
1959
|
animation: none;
|
|
@@ -2113,8 +1961,8 @@
|
|
|
2113
1961
|
`,Jn=a.Ay.div`
|
|
2114
1962
|
display: flex;
|
|
2115
1963
|
flex-direction: column;
|
|
2116
|
-
${e=>{let{fromBot:t}=e;return t?"align-items: flex-start":"align-items: flex-end"}};
|
|
2117
|
-
${e=>e
|
|
1964
|
+
${e=>{let{$fromBot:t}=e;return t?"align-items: flex-start":"align-items: flex-end"}};
|
|
1965
|
+
${e=>e.$hasSiblings&&"margin-bottom: 8px;"}
|
|
2118
1966
|
sup {
|
|
2119
1967
|
position: relative;
|
|
2120
1968
|
vertical-align: top;
|
|
@@ -2139,15 +1987,15 @@
|
|
|
2139
1987
|
}
|
|
2140
1988
|
`,er=a.Ay.div`
|
|
2141
1989
|
display: inline-flex;
|
|
2142
|
-
${e=>{let{orientation:t}=e;return t===s.Ii.VERTICAL&&"width: 240px;"}}
|
|
1990
|
+
${e=>{let{$orientation:t}=e;return t===s.Ii.VERTICAL&&"width: 240px;"}}
|
|
2143
1991
|
max-width: 100%;
|
|
2144
|
-
flex-direction: ${e=>{let{orientation:t}=e;return t===s.Ii.HORIZONTAL?"row":"column"}};
|
|
2145
|
-
${e=>{let{nextMessageType:t}=e;return t===s.bS.SYSTEM&&"margin-bottom: 16px;"}}
|
|
1992
|
+
flex-direction: ${e=>{let{$orientation:t}=e;return t===s.Ii.HORIZONTAL?"row":"column"}};
|
|
1993
|
+
${e=>{let{$nextMessageType:t}=e;return t===s.bS.SYSTEM&&"margin-bottom: 16px;"}}
|
|
2146
1994
|
margin-bottom: 6px;
|
|
2147
1995
|
flex-wrap: wrap;
|
|
2148
1996
|
gap: 6px;
|
|
2149
1997
|
${Yn};
|
|
2150
|
-
${e=>e
|
|
1998
|
+
${e=>e.$hasSuggestion&&Qn}
|
|
2151
1999
|
|
|
2152
2000
|
@media (prefers-reduced-motion) {
|
|
2153
2001
|
animation: none;
|
|
@@ -2223,12 +2071,12 @@
|
|
|
2223
2071
|
word-break: normal;
|
|
2224
2072
|
overflow-wrap: anywhere;
|
|
2225
2073
|
|
|
2226
|
-
${e=>e
|
|
2227
|
-
${e=>e
|
|
2228
|
-
${e=>e
|
|
2074
|
+
${e=>e.$clickable&&"cursor: pointer;"}
|
|
2075
|
+
${e=>e.$fromBot?nr:tr}
|
|
2076
|
+
${e=>e.$fromAgent&&rr}
|
|
2229
2077
|
|
|
2230
2078
|
/* This is a hacky solution that should be changed in the future (14.10.2019) */
|
|
2231
|
-
${e=>e
|
|
2079
|
+
${e=>e.$hasSuggestion?or:""}
|
|
2232
2080
|
${R.sF}
|
|
2233
2081
|
|
|
2234
2082
|
p {
|
|
@@ -2319,7 +2167,7 @@
|
|
|
2319
2167
|
font-size: 0.7em;
|
|
2320
2168
|
bottom: 0.33em;
|
|
2321
2169
|
position: relative;
|
|
2322
|
-
`;function br(e){let{references:t,onReferenceClick:n}=e;const{reference_list_title:r,read_more_text:a}=(0,dr.A)(),i=t.map(e=>e.url),l=e=>{n(e.currentTarget.href)};return o().createElement(o().Fragment,null,o().createElement(pr,null,r),o().createElement(fr,null,i.map((e,t)=>o().createElement(hr,{key:e,href:e,target:"_blank",rel:"noopener noreferrer",onClick:l},o().createElement(gr,null,t+1),o().createElement(mr,null,a),o().createElement(Oe.Gr,null),o().createElement(D,null)))))}const vr=[s.bS.WEBHOOK,s.bS.AGENT];function yr(e){let{children:t,chatMessage:n,hasSuggestion:r=!1}=e;const{bot_id:a,exchange_id:i}=n,l="usersays"===n.exchange_type?"dialogue":n.exchange_type,s=`/workspace/${a}/build/${null==l?void 0:l.replace("_","-")}/${i}`;return o().createElement(lr,{fromBot:n.from_bot
|
|
2170
|
+
`;function br(e){let{references:t,onReferenceClick:n}=e;const{reference_list_title:r,read_more_text:a}=(0,dr.A)(),i=t.map(e=>e.url),l=e=>{n(e.currentTarget.href)};return o().createElement(o().Fragment,null,o().createElement(pr,null,r),o().createElement(fr,null,i.map((e,t)=>o().createElement(hr,{key:e,href:e,target:"_blank",rel:"noopener noreferrer",onClick:l},o().createElement(gr,null,t+1),o().createElement(mr,null,a),o().createElement(Oe.Gr,null),o().createElement(D,null)))))}const vr=[s.bS.WEBHOOK,s.bS.AGENT];function yr(e){let{children:t,chatMessage:n,hasSuggestion:r=!1}=e;const{bot_id:a,exchange_id:i}=n,l="usersays"===n.exchange_type?"dialogue":n.exchange_type,s=`/workspace/${a}/build/${null==l?void 0:l.replace("_","-")}/${i}`;return o().createElement(lr,{$fromBot:n.from_bot,$hasSuggestion:r,$clickable:!0,role:"link",tabIndex:0,href:s},t)}function xr(e){let{references:t,onReferenceClick:n}=e;return o().createElement(o().Fragment,null,o().createElement(cr,null),o().createElement(sr,null,o().createElement(br,{references:t,onReferenceClick:n})))}function wr(e){var t;let{chatMessage:n,editContactDetailsButton:r,hasSuggestion:a=!1,lineIndex:i,messageLine:l,numLines:d,preface:p,references:f=[]}=e;const h=(0,c.wA)(),{inPlatform:m}=(0,c.d4)(u.$P),{isTextDirectionRtl:g}=(0,c.d4)(u.Od),b=g?"rtl":void 0,v=m&&n.from_bot&&n.exchange_type&&!S()(t=vr).call(t,n.sender),y=f.length>0,x=n.sender===s.bS.AGENT,w=i===d-1,E=n.from_bot,k=o().createElement("p",null,o().createElement("strong",null,p)),_=e=>{h((0,G.qJ)({url:e,messageId:n.id}))};return v?o().createElement(yr,{chatMessage:n,hasSuggestion:a},p&&k,o().createElement(sr,null,E?Wn(l):l),w&&y&&o().createElement(xr,{references:f,onReferenceClick:_})):o().createElement(ir,{dir:b,$fromAgent:x,$fromBot:E,$hasSuggestion:a},o().createElement(sr,null,p&&k,x&&o().createElement(ur,{style:{backgroundImage:`url(${n.avatar})`}}),E?Wn(l):l,w&&r&&o().createElement(zt,{button:r})),w&&y&&o().createElement(xr,{references:f,onReferenceClick:_}))}k().shape({id:k().string,temporaryId:k().string,url:k().string,type:k().string.isRequired,name:k().string.isRequired,file:k().object,sizeKb:k().number.isRequired,storagePath:k().string,status:k().oneOf(Object.values(s.Le)),sender:k().oneOf(Object.values(s.bS))});const Er=a.Ay.div`
|
|
2323
2171
|
display: flex;
|
|
2324
2172
|
white-space: nowrap;
|
|
2325
2173
|
font-size: var(--_kindlychat-font-size-sm);
|
|
@@ -2342,7 +2190,7 @@
|
|
|
2342
2190
|
cursor: pointer;
|
|
2343
2191
|
|
|
2344
2192
|
${R.sF}
|
|
2345
|
-
`,Ar=function(e){let{chatMessage:t,attachments:n}=e;const a=(0,c.wA)(),i=Boolean(t.message),l=(null==n?void 0:n.length)>0,s=(0,r.useCallback)(()=>{i&&a((0,G.tM)(t.message,t.id))},[t,a,i]),u=(0,r.useCallback)(()=>{i?a((0,G.aP)(t.message,t.id)):l&&a((0,G.zX)())},[t,a,l,i]);return t.status>=500?o().createElement(Er,null,l?"Upload failed":"Message not delivered"," ",o().createElement(kr,null,!l&&o().createElement(o().Fragment,null,o().createElement(_r,{onClick:s},"Try again"),o().createElement(_r,{onClick:u},"Restart chat")))):429===t.status?o().createElement(Er,null,"Too many messages, please slow down."," ",o().createElement(kr,null,o().createElement(_r,{onClick:s},"Try again"))):o().createElement(Er,null,"An error occurred. ",o().createElement(_r,{onClick:u},"Restart chat"))},Tr=function(e){let{preface:t,message:n,chatMessage:r,numLines:a,buttonHandlers:i,buttons:l=[]}=e;return o().createElement(o().Fragment,null,o().createElement(Jn,{fromBot:!0},o().createElement(wr,{chatMessage:r,hasSuggestion:!0,lineIndex:0,messageLine:n,numLines:a,preface:t})),o().createElement(er,{hasSuggestion:!0},l.map(e=>o().createElement(Nt.A,{key:`suggestion-button-${e.id}`,button:e,chatMessage:r,type:"button",handlers:i,hasSuggestion:!0}))))};function Sr(e){let{color:t="#333333",size:n=24}=e;return o().createElement("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o().createElement("path",{d:"M6.75012 4.75C5.64555 4.75 4.75012 5.64543 4.75012 6.75V14.25C4.75012 15.3546 5.64555 16.25 6.75012 16.25H10.7501C11.3024 16.25 11.7501 16.6977 11.7501 17.25V19.25L14.9057 16.6955C15.2617 16.4073 15.706 16.25 16.1641 16.25H17.2501C18.3547 16.25 19.2501 15.3546 19.2501 14.25V6.75C19.2501 5.64543 18.3547 4.75 17.2501 4.75H6.75012Z",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M9 8.90015H14.95",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M11.9751 8.725V7.5",stroke:t,strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),o().createElement("path",{d:"M13.55 8.90015C13.55 8.90015 13.55 10.6501 12.15 12.0501C10.75 13.4501 9 13.4501 9 13.4501",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M14.2504 13.4502C14.2504 13.4502 12.5004 13.4502 11.1004 12.0502C10.8172 11.7671 10.4004 11.0002 10.4004 11.0002",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))}const
|
|
2193
|
+
`,Ar=function(e){let{chatMessage:t,attachments:n}=e;const a=(0,c.wA)(),i=Boolean(t.message),l=(null==n?void 0:n.length)>0,s=(0,r.useCallback)(()=>{i&&a((0,G.tM)(t.message,t.id))},[t,a,i]),u=(0,r.useCallback)(()=>{i?a((0,G.aP)(t.message,t.id)):l&&a((0,G.zX)())},[t,a,l,i]);return t.status>=500?o().createElement(Er,null,l?"Upload failed":"Message not delivered"," ",o().createElement(kr,null,!l&&o().createElement(o().Fragment,null,o().createElement(_r,{onClick:s},"Try again"),o().createElement(_r,{onClick:u},"Restart chat")))):429===t.status?o().createElement(Er,null,"Too many messages, please slow down."," ",o().createElement(kr,null,o().createElement(_r,{onClick:s},"Try again"))):o().createElement(Er,null,"An error occurred. ",o().createElement(_r,{onClick:u},"Restart chat"))},Tr=function(e){let{preface:t,message:n,chatMessage:r,numLines:a,buttonHandlers:i,buttons:l=[]}=e;return o().createElement(o().Fragment,null,o().createElement(Jn,{$fromBot:!0},o().createElement(wr,{chatMessage:r,hasSuggestion:!0,lineIndex:0,messageLine:n,numLines:a,preface:t})),o().createElement(er,{$hasSuggestion:!0},l.map(e=>o().createElement(Nt.A,{key:`suggestion-button-${e.id}`,button:e,chatMessage:r,type:"button",handlers:i,hasSuggestion:!0}))))};function Sr(e){let{color:t="#333333",size:n=24}=e;return o().createElement("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o().createElement("path",{d:"M6.75012 4.75C5.64555 4.75 4.75012 5.64543 4.75012 6.75V14.25C4.75012 15.3546 5.64555 16.25 6.75012 16.25H10.7501C11.3024 16.25 11.7501 16.6977 11.7501 17.25V19.25L14.9057 16.6955C15.2617 16.4073 15.706 16.25 16.1641 16.25H17.2501C18.3547 16.25 19.2501 15.3546 19.2501 14.25V6.75C19.2501 5.64543 18.3547 4.75 17.2501 4.75H6.75012Z",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M9 8.90015H14.95",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M11.9751 8.725V7.5",stroke:t,strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),o().createElement("path",{d:"M13.55 8.90015C13.55 8.90015 13.55 10.6501 12.15 12.0501C10.75 13.4501 9 13.4501 9 13.4501",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M14.2504 13.4502C14.2504 13.4502 12.5004 13.4502 11.1004 12.0502C10.8172 11.7671 10.4004 11.0002 10.4004 11.0002",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))}const $r=function(e){let{color:t="#6A778A",...n}=e;return o().createElement("svg",Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),o().createElement("g",{clipPath:"url(#clip0_144_28508)"},o().createElement("path",{d:"M6.5 5.83398L8.83333 8.00065M8.83333 8.00065L6.5 10.1673M8.83333 8.00065H3",stroke:t,strokeLinecap:"square"}),o().createElement("path",{d:"M6.5 3.16602H11.5C12.2364 3.16602 12.8333 3.76297 12.8333 4.49935V11.4993C12.8333 12.2357 12.2364 12.8327 11.5 12.8327H6.5",stroke:t,strokeLinecap:"square",strokeLinejoin:"round"})),o().createElement("defs",null,o().createElement("clipPath",{id:"clip0_144_28508"},o().createElement("rect",{width:"16",height:"16",fill:"white"}))))},Cr=function(e){let{color:t="#6A778A",...n}=e;return o().createElement("svg",Object.assign({width:"15",height:"14",viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),o().createElement("path",{d:"M9.6875 5.10352L11.7292 6.99935L9.6875 8.89518",stroke:t,strokeWidth:"1.05",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M11.583 7H6.77051",stroke:t,strokeWidth:"1.04973",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M9.39551 2.77148H4.43717C3.79284 2.77148 3.27051 3.29382 3.27051 3.93815V10.0632C3.27051 10.7075 3.79284 11.2298 4.43717 11.2298H9.39551",stroke:t,strokeWidth:"1.04973",strokeLinecap:"round",strokeLinejoin:"round"}))},Or=function(e){let{color:t="#6A778A",...n}=e;return o().createElement("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),o().createElement("path",{d:"M4.36766 10.3092L4.04067 10.72L4.36766 10.3092ZM7.14551 11.7529C7.43546 11.7529 7.67051 11.5178 7.67051 11.2279C7.67051 10.9379 7.43546 10.7029 7.14551 10.7029V11.7529ZM10.7038 7.14453C10.7038 7.43448 10.9389 7.66953 11.2288 7.66953C11.5188 7.66953 11.7538 7.43448 11.7538 7.14453H10.7038ZM7.14551 9.7112C7.43546 9.7112 7.67051 9.47615 7.67051 9.1862C7.67051 8.89625 7.43546 8.6612 7.14551 8.6612V9.7112ZM9.54134 11.2279L9.13802 11.564C9.25642 11.706 9.44083 11.7753 9.62349 11.7464C9.80615 11.7175 9.96011 11.5946 10.0288 11.4228L9.54134 11.2279ZM11.6146 8.95896C11.8113 8.74591 11.798 8.41376 11.5849 8.21709C11.3719 8.02043 11.0397 8.03371 10.8431 8.24677L11.6146 8.95896ZM9.00716 9.76677C8.82154 9.54402 8.49049 9.51393 8.26774 9.69955C8.045 9.88517 8.0149 10.2162 8.20052 10.439L9.00716 9.76677ZM3.29551 6.9987C3.29551 4.95298 4.95395 3.29453 6.99967 3.29453V2.24453C4.37405 2.24453 2.24551 4.37308 2.24551 6.9987H3.29551ZM6.99967 3.29453C9.0454 3.29453 10.7038 4.95298 10.7038 6.9987H11.7538C11.7538 4.37308 9.62529 2.24453 6.99967 2.24453V3.29453ZM7.78717 6.41536C7.78717 6.85028 7.43459 7.20286 6.99967 7.20286V8.25286C8.01449 8.25286 8.83717 7.43018 8.83717 6.41536H7.78717ZM6.99967 7.20286C6.56476 7.20286 6.21217 6.85028 6.21217 6.41536H5.16217C5.16217 7.43018 5.98486 8.25286 6.99967 8.25286V7.20286ZM6.21217 6.41536C6.21217 5.98045 6.56476 5.62786 6.99967 5.62786V4.57786C5.98486 4.57786 5.16217 5.40055 5.16217 6.41536H6.21217ZM6.99967 5.62786C7.43459 5.62786 7.78717 5.98045 7.78717 6.41536H8.83717C8.83717 5.40055 8.01449 4.57786 6.99967 4.57786V5.62786ZM4.74663 10.6726C5.3153 10.0794 6.11405 9.7112 6.99967 9.7112V8.6612C5.81624 8.6612 4.74718 9.15479 3.9887 9.94589L4.74663 10.6726ZM6.99967 10.7029C6.1277 10.7029 5.32737 10.4022 4.69465 9.89849L4.04067 10.72C4.85255 11.3663 5.8817 11.7529 6.99967 11.7529V10.7029ZM4.69465 9.89849C3.84111 9.21898 3.29551 8.17271 3.29551 6.9987H2.24551C2.24551 8.50608 2.94767 9.84981 4.04067 10.72L4.69465 9.89849ZM6.99967 11.7529H7.14551V10.7029H6.99967V11.7529ZM10.7038 6.9987V7.14453H11.7538V6.9987H10.7038ZM6.99967 9.7112H7.14551V8.6612H6.99967V9.7112ZM10.0288 11.4228C10.2872 10.7769 10.6811 10.1608 11.0197 9.69804C11.1875 9.46874 11.3383 9.28164 11.4465 9.15264C11.5005 9.08822 11.5438 9.03852 11.5729 9.00553C11.5875 8.98904 11.5985 8.97675 11.6056 8.9689C11.6091 8.96497 11.6117 8.96216 11.6132 8.9605C11.614 8.95966 11.6145 8.95912 11.6147 8.95886C11.6148 8.95873 11.6149 8.95867 11.6149 8.95869C11.6149 8.9587 11.6148 8.95873 11.6148 8.95877C11.6148 8.95879 11.6147 8.95884 11.6147 8.95885C11.6147 8.9589 11.6146 8.95896 11.2288 8.60286C10.8431 8.24677 10.843 8.24683 10.8429 8.2469C10.8429 8.24693 10.8428 8.24701 10.8428 8.24707C10.8427 8.24719 10.8426 8.24733 10.8424 8.24748C10.8421 8.2478 10.8418 8.24819 10.8413 8.24865C10.8405 8.24957 10.8394 8.2508 10.838 8.25231C10.8352 8.25534 10.8314 8.25955 10.8266 8.26489C10.8169 8.27558 10.8032 8.29085 10.7859 8.31043C10.7513 8.34958 10.7022 8.40608 10.642 8.4779C10.5217 8.62136 10.3561 8.82683 10.1723 9.078C9.80778 9.57623 9.35803 10.2725 9.05389 11.0329L10.0288 11.4228ZM8.20052 10.439L9.13802 11.564L9.94466 10.8918L9.00716 9.76677L8.20052 10.439Z",fill:t}))},Ir=a.Ay.div`
|
|
2346
2194
|
width: 100%;
|
|
2347
2195
|
display: flex;
|
|
2348
2196
|
flex-direction: column;
|
|
@@ -2372,11 +2220,11 @@
|
|
|
2372
2220
|
min-width: 20px;
|
|
2373
2221
|
display: inline;
|
|
2374
2222
|
}
|
|
2375
|
-
`,Nr=function(e){let{chatMessage:t}=e,n=null;switch(t.system_dialogue_message_type.toLowerCase()){case"start":n=o().createElement(
|
|
2223
|
+
`,Nr=function(e){let{chatMessage:t}=e,n=null;switch(t.system_dialogue_message_type.toLowerCase()){case"start":n=o().createElement($r,{width:16,height:16});break;case"end":n=o().createElement(Cr,{width:16,height:16});break;case"agent_assigned":n=o().createElement(Or,{width:16,height:16});break;case"live_translation_start":case"live_translation_end":n=o().createElement(Sr,{size:16})}return o().createElement(Ir,null,o().createElement(Lr,null,o().createElement(Mr,null,n,Wn(t.event_message))))},Rr="\n background: black;\n border-radius: 15px;\n",Pr=a.Ay.iframe`
|
|
2376
2224
|
${Rr}
|
|
2377
2225
|
`,Dr=a.Ay.video`
|
|
2378
2226
|
${Rr}
|
|
2379
|
-
`,jr=function(e){let{source:t}=e;const n=t.split(".").pop();return o().createElement(Dr,{width:"240",controls:!0,"data-chromatic":"ignore"},o().createElement("source",{src:t,type:`video/${n}`}),"Your browser does not support HTML5 video.")},Fr=function(e){let{source:t}=e;const n=t.match(/^(?:https?:\/\/)?(www\.)?vimeo.com\/(\d+)($|\/)/);return n?o().createElement(Pr,{src:`https://player.vimeo.com/video/${n[2]}?title=0&byline=0&portrait=0`,width:"240",height:"auto",frameBorder:"0",allow:"autoplay; fullscreen",allowFullScreen:!0,"data-chromatic":"ignore",title:"Vimeo video player"}):null},zr=e=>e.replace("?t=","?start=").replace("&t=","&start="),Br=function(e){let{source:t}=e;const n=(e=>{const t=e.toLowerCase();let n=e;return S()(t).call(t,"youtube.com")?(n=e.replace("&","?"),n=zr(n),n.split("v=")[1]):S()(t).call(t,"youtu.be")?(n=zr(e),n.split("youtu.be/")[1]):n})(t);return o().createElement(Pr,{width:"240",height:"auto",src:`https://www.youtube-nocookie.com/embed/${n}`,frameBorder:"0",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,"data-chromatic":"ignore",title:"YouTube video player"})},Hr=function(e){let{source:t}=e;return S()(t).call(t,"youtube.com")||S()(t).call(t,"youtu.be")?o().createElement(Br,{source:t}):S()(t).call(t,"vimeo.com")?o().createElement(Fr,{source:t}):o().createElement(jr,{source:t})},Ur=e=>{let{root:t=null,threshold:n=1,onChange:o,skip:a=!1}=e;const[i,l]=(0,r.useState)(null),s=(0,r.useRef)(null);return(0,r.useEffect)(()=>{if(a)return;s.current&&s.current.disconnect(),s.current=new IntersectionObserver(o,{root:t,threshold:n});const{current:e}=s;return i&&e.observe(i),()=>e.disconnect()},[i,t,o,a,n]),l};function Vr(e,t){if(!t||!t.length)return e;const n=Array.from(e);let r=0;return t.flatMap((e,t)=>e.offsets.map(e=>({offset:e,number:t+1}))).sort((e,t)=>e.offset-t.offset).forEach(e=>{let{offset:t,number:o}=e;const a=r+t,i=`<sup>${o}</sup>`;n.splice(a,0,...Array.from(i)),r+=i.length}),n.join("")}var Gr=n(6057),Wr=n(3699),qr=n(
|
|
2227
|
+
`,jr=function(e){let{source:t}=e;const n=t.split(".").pop();return o().createElement(Dr,{width:"240",controls:!0,"data-chromatic":"ignore"},o().createElement("source",{src:t,type:`video/${n}`}),"Your browser does not support HTML5 video.")},Fr=function(e){let{source:t}=e;const n=t.match(/^(?:https?:\/\/)?(www\.)?vimeo.com\/(\d+)($|\/)/);return n?o().createElement(Pr,{src:`https://player.vimeo.com/video/${n[2]}?title=0&byline=0&portrait=0`,width:"240",height:"auto",frameBorder:"0",allow:"autoplay; fullscreen",allowFullScreen:!0,"data-chromatic":"ignore",title:"Vimeo video player"}):null},zr=e=>e.replace("?t=","?start=").replace("&t=","&start="),Br=function(e){let{source:t}=e;const n=(e=>{const t=e.toLowerCase();let n=e;return S()(t).call(t,"youtube.com")?(n=e.replace("&","?"),n=zr(n),n.split("v=")[1]):S()(t).call(t,"youtu.be")?(n=zr(e),n.split("youtu.be/")[1]):n})(t);return o().createElement(Pr,{width:"240",height:"auto",src:`https://www.youtube-nocookie.com/embed/${n}`,frameBorder:"0",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,"data-chromatic":"ignore",title:"YouTube video player"})},Hr=function(e){let{source:t}=e;return S()(t).call(t,"youtube.com")||S()(t).call(t,"youtu.be")?o().createElement(Br,{source:t}):S()(t).call(t,"vimeo.com")?o().createElement(Fr,{source:t}):o().createElement(jr,{source:t})},Ur=e=>{let{root:t=null,threshold:n=1,onChange:o,skip:a=!1}=e;const[i,l]=(0,r.useState)(null),s=(0,r.useRef)(null);return(0,r.useEffect)(()=>{if(a)return;s.current&&s.current.disconnect(),s.current=new IntersectionObserver(o,{root:t,threshold:n});const{current:e}=s;return i&&e.observe(i),()=>e.disconnect()},[i,t,o,a,n]),l};function Vr(e,t){if(!t||!t.length)return e;const n=Array.from(e);let r=0;return t.flatMap((e,t)=>e.offsets.map(e=>({offset:e,number:t+1}))).sort((e,t)=>e.offset-t.offset).forEach(e=>{let{offset:t,number:o}=e;const a=r+t,i=`<sup>${o}</sup>`;n.splice(a,0,...Array.from(i)),r+=i.length}),n.join("")}var Gr=n(6057),Wr=n(3699),qr=n(1435),Kr=n(9910),Yr=n(3950),Xr=n(5279),Zr=n(4851),Jr=n(1318),Qr=n(5173),eo=n(4490);const to=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"SUBMITTED";return async(r,o)=>{const{connection:{token:a}}=o(),{PAT_HOST:i}=o().environment,{headers:l}=(0,Zr.A)({token:a},{withCurrentUrl:!0}),c={submission_id:e,context:t,state:n};return r((0,G.et)(`${i}/chatbubble/${s.Ak}/form/submit`,{method:"POST",body:c,headers:l}))}},no=e=>({...e,temporaryId:`tempId-${(0,Xr.A)()}`});var ro=n(3435),oo=n(881),ao=n(9272),io=function(e){return e.TEXT="TEXT",e.CHECKBOX="CHECKBOX",e.RANGE="RANGE",e.EMAIL="EMAIL",e.NUMBER="NUMBER",e.SELECT="SELECT",e.RADIO="RADIO",e}(io||{});const lo=e=>{var t;const n={};return null!==(t=e.fields)&&void 0!==t&&t.length&&e.fields.forEach(e=>{var t,r;null!==(t=e.attributes)&&void 0!==t&&t.default_value&&(n[e.slug]=e.attributes.default_value),e.input_type!==io.SELECT||null!==(r=e.attributes)&&void 0!==r&&r.default_value||(n[e.slug]="")}),n},so=e=>{let t=0;return e.fields.forEach(e=>{var n,r;if(e.input_type===ao.cJ.RANGE)t+=92;else if(e.input_type===ao.cJ.SELECT)t+=51;else if(e.input_type===ao.cJ.FILE)t+=113;else if(e.input_type===ao.cJ.CHECKBOX||e.input_type===ao.cJ.RADIO){var o;t+=30*((null===(o=e.attributes)||void 0===o?void 0:o.options.length)||1)+16}else t+=53;null!==(n=e.texts)&&void 0!==n&&n.label&&(t+=26),null!==(r=e.texts)&&void 0!==r&&r.help_text&&(t+=20)}),t+=48,t};var co=n(5814);const uo=a.Ay.div`
|
|
2380
2228
|
display: flex;
|
|
2381
2229
|
flex-direction: column;
|
|
2382
2230
|
`,po=a.Ay.div`
|
|
@@ -2401,7 +2249,7 @@
|
|
|
2401
2249
|
display: flex;
|
|
2402
2250
|
align-items: flex-start;
|
|
2403
2251
|
`,bo=a.Ay.div`
|
|
2404
|
-
padding: ${e=>{let{affix:t}=e;return"PREFIX"===t?"0 6px 0 0":"0 0 0 6px"}};
|
|
2252
|
+
padding: ${e=>{let{$affix:t}=e;return"PREFIX"===t?"0 6px 0 0":"0 0 0 6px"}};
|
|
2405
2253
|
`,vo=a.Ay.div`
|
|
2406
2254
|
margin-top: 8px;
|
|
2407
2255
|
`,yo=a.Ay.div`
|
|
@@ -2409,7 +2257,7 @@
|
|
|
2409
2257
|
flex-direction: column;
|
|
2410
2258
|
`,xo=a.Ay.div`
|
|
2411
2259
|
flex: 1;
|
|
2412
|
-
`;var wo=n(8043);function Eo(e){return function(t,n){return t===e&&n?o().createElement(bo,{affix:t},n):null}}const ko=Eo("PREFIX"),_o=Eo("SUFFIX"),Ao=function(e){let{state:t,message:n,data:r}=e;return o().createElement(uo,null,t!==ao.KN.SUBMITTED&&n&&o().createElement(po,null,n),t===ao.KN.SUBMITTED&&r.length>0&&o().createElement(fo,null,r.map(e=>e.value?o().createElement(ho,{key:e.name},o().createElement(mo,null,e.label),o().createElement(go,null,ko(e.affix,e.affixValue),function(e){return e.type===ao.cJ.FILE?o().createElement(xo,null,e.files.map(t=>o().createElement(wo.A,{key:`${t.name}-${e.type}-${t.size}`,file:t,canRemove:!1}))):Array.isArray(e.value)?o().createElement(yo,null,e.value.map(e=>o().createElement(vo,{key:e.name},e.label))):e.value}(e),_o(e.affix,e.affixValue))):null)))},To=function(e){let{width:t=24,height:n=24,color:r="#333"}=e;return o().createElement("svg",{width:t,height:n,viewBox:"0 0 24 24",fill:"none"},o().createElement("path",{d:"M6.5 6a.5.5 0 11-1 0 .5.5 0 011 0zM6.5 12a.5.5 0 11-1 0 .5.5 0 011 0zM6.5 18a.5.5 0 11-1 0 .5.5 0 011 0z",stroke:r,strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M9.75 6h8.5M9.75 12h8.5M9.75 18h8.5",stroke:r,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))};var So=n(5545);const Co=o().lazy(()=>Promise.resolve().then(n.bind(n,9758))),$o=e=>"object"==typeof e&&e.length&&e.every(e=>"[object File]"===Object.prototype.toString.call(e)),Oo=function(e){var t,n,a,i,l,d,p,f,h;let{chatMessageId:m,formData:g,onSubmit:b,onCancel:v}=e;const y=(0,c.wA)(),x=(0,c.d4)(u.uO),{text:w}=(0,c.d4)(u.Od),{current:E}=(0,r.useRef)(`${g.id}_submission_${g.submission_id}`);let{current:k}=(0,r.useRef)(0);const{currentLanguageCode:_}=(0,pe.A)();(0,r.useEffect)(()=>{var e,t,n;null==g||!g.id||null!=x&&x[E]?(null==x||null===(e=x[E])||void 0===e?void 0:e.formSubmitState)!==ao.KN.UNANSWERED||null!=x&&null!==(t=x[E])&&void 0!==t&&t.formCompleteMessage||!g.texts.unanswered_text||y((0,G.Bu)({...x[E],formCompleteMessage:g.texts.unanswered_text})):y((0,G.Bu)({formId:g.id,formSubmissionId:g.submission_id,formSubmitState:ao.KN.ACTIVE,formCompleteMessage:"",formKey:E,formValue:(null==x||null===(n=x[E])||void 0===n?void 0:n.formValue)||g.fields.reduce((e,t)=>({...e,[`${t.slug}`]:""}),{})}))},[y,g,_,x,E]);const A=(0,r.useCallback)(e=>{var t,n,r,o,a;return e.input_type===ao.cJ.SELECT?(null===(r=e.attributes.options.find(t=>{var n,r;return t.value===(null==x||null===(n=x[E])||void 0===n||null===(r=n.formValue)||void 0===r?void 0:r[e.slug])}))||void 0===r?void 0:r.label)||(null==x||null===(o=x[E])||void 0===o||null===(a=o.formValue)||void 0===a?void 0:a[e.slug]):null==x||null===(t=x[E])||void 0===t||null===(n=t.formValue)||void 0===n?void 0:n[e.slug]},[E,x]);return o().createElement(oo._H,null,(null===(t=g.texts)||void 0===t?void 0:t.title)&&o().createElement(oo.zE,null,o().createElement(To,{width:20,height:20})," ",null===(n=g.texts)||void 0===n?void 0:n.title),(null==x||null===(a=x[E])||void 0===a?void 0:a.formSubmitState)&&(null==x||null===(i=x[E])||void 0===i?void 0:i.formSubmitState)!==ao.KN.ACTIVE&&o().createElement(Ao,{state:x[E].formSubmitState,message:x[E].formCompleteMessage,data:(()=>{var e,t;if(null!=g&&g.fields&&(null==x||null===(e=x[E])||void 0===e?void 0:e.formSubmitState)===ao.KN.SUBMITTED&&null!=x&&null!==(t=x[E])&&void 0!==t&&t.formValue)return g.fields.reduce((e,t)=>{var n,r,o,a,i;return t.input_type!==ao.cJ.CHECKBOX&&t.input_type!==ao.cJ.RADIO||null===(n=t.attributes)||void 0===n||!n.options?[...e,{affix:t.affix,affixValue:t.texts.affix_value,name:t.slug,label:null===(r=t.texts)||void 0===r?void 0:r.label,type:t.input_type,value:A(t),files:null==x||null===(o=x[E])||void 0===o||null===(a=o.formFiles)||void 0===a?void 0:a[t.slug]}]:[...e,{name:`${t.input_type===ao.cJ.CHECKBOX?"checkbox":"radio"}_list_${t.slug}`,label:null===(i=t.texts)||void 0===i?void 0:i.label,value:t.attributes.options.reduce((e,n)=>{var r,o;const a=null==x||null===(r=x[E])||void 0===r||null===(o=r.formValue)||void 0===o?void 0:o[t.slug];return(null==a?void 0:a.length)>0&&S()(a).call(a,n.value)?[...e||[],{name:n.value,label:n.label,value:n.value}]:e},null)}]},[]).sort(e=>e.order)})()}),o().createElement(r.Suspense,{fallback:o().createElement(So.A,{minHeight:so(g)})},(!(null!=x&&x[E])||(null==x||null===(l=x[E])||void 0===l?void 0:l.formSubmitState)===ao.KN.ACTIVE)&&o().createElement(Co,{onCancel:async e=>{var t;return v&&v(e),await y(to(g.submission_id,null==x?void 0:x[E].formValue,ao.KN.CANCELED)),await y((0,G.zh)(g.cancel_dialogue_id,{languageCode:_})),y((0,G.Bu)({formKey:E,formId:g.id,formSubmitState:ao.KN.CANCELED,formCompleteMessage:null===(t=g.texts)||void 0===t?void 0:t.cancel_text,formValue:e}))},defaultValues:lo(g),onSubmit:async(e,t)=>{b&&b(e);let n={};Object.entries(e).filter(e=>{let[t,n]=e;return Array.isArray(n)?!!n.length:"object"==typeof n&&null!==n?!!Object.keys(n).length:!!n}).forEach(e=>{let[t,r]=e;r instanceof FileList?n[t]=Array.from(r):n[t]=r});const r=function(e){const t={};return Object.keys(e).forEach(n=>{$o(e[n])&&(t[n]=e[n])}),t}(n),o=Object.values(n).filter(e=>{let[...t]=e;return $o(t)}).map(e=>{let[...t]=e;return t.length?t.flat():t}).flat();if(o.length){let e=!1;const i=()=>{e=!0},l=await Promise.all(o.map(Wr.TA)),c=await y((e=>{let{chatMessageId:t,files:n,onError:r}=e;return async(e,o)=>{var a;const{bot:{id:i},chatbubble:{chatId:l},connection:{token:c},environment:{PAT_HOST:u}}=o(),d=await e((0,G.z5)()),{headers:p}=(0,Zr.A)({token:c},{extra:d}),f=n.map(no).map((0,Jr.A)("file")),h=f.map((0,Jr.A)("url")),m=`${u}/chatbubble/${s.Ak}/attachment/create`,g={attachments:h},b=await e((0,G.et)(m,{method:"POST",body:g,headers:p}));if((0,Qr.A)(b)||!Array.isArray(null==b||null===(a=b.data)||void 0===a?void 0:a.attachments))return r(new Error("Failed to upload")),[];const{attachments:v}=b.data;if(v.sort((e,t)=>f.findIndex(t=>t.temporaryId===e.temporaryId)-f.findIndex(e=>e.temporaryId===t.temporaryId)),v.length!==n.length)return r(new Error("Failed to upload")),[];const[y,x]=v.reduce((e,t)=>{let[n,r]=e,{id:o,upload_url:a}=t;return[[...n,o],[...r,a]]},[[],[]]),w={"x-goog-upload-bot-id":i,"x-goog-upload-chat-id":l},E=(0,eo.A)(n,x).map(async t=>{let[{file:n},r]=t;const o=await(0,Wr.Bu)(n),a={...w,"Content-Type":n.type};return await e((0,G.et)(r,{method:"PUT",body:o,headers:a},{onError:e=>new Error(e)}))});if((await Promise.all(E)).some(Qr.A))return r(new Error("Failed to upload")),[];const k=`${u}/chatbubble/${s.Ak}/attachment/uploads-complete`,_={attachmentIds:y,chatMessageId:t,exchangeId:h[0].exchangeId};return await e((0,G.et)(k,{method:"POST",body:_,headers:p},{onError:()=>r(new Error("Failed to upload"))})),y}})({chatMessageId:m,files:l,onError:i}));try{const e=function(e,t){if(Object.values(e).reduce((e,t)=>e+t.length,0)!==t.length)throw new Error("Mismatched lengths between file objects and attachment IDs");const n={};let r=0;return Object.entries(e).forEach(e=>{let[o,a]=e;n[o]=a.map((e,n)=>t[r+n]).join(","),r+=a.length}),n}(r,c);n={...n,...e}}catch(e){i(e)}if(e){var a;if(k>=3)return y((0,G.Bu)({formKey:E,formId:g.id,formSubmitState:ao.KN.ERRORED,formCompleteMessage:null===(a=g.texts)||void 0===a?void 0:a.error_text,formValue:n}));const e=Object.keys(r);return e.length&&e.forEach(e=>{var n;t(e,{type:"custom",message:null===(n=w.upload_file_failed)||void 0===n?void 0:n[_]})}),void(k+=1)}}var i;return null===await y(to(g.submission_id,n))?y((0,G.Bu)({formKey:E,formId:g.id,formSubmitState:ao.KN.ERRORED,formCompleteMessage:null===(i=g.texts)||void 0===i?void 0:i.error_text,formValue:n})):(await y((0,G.zh)(g.submit_dialogue_id,{languageCode:_})),y((0,G.Bu)({formKey:E,formId:g.id,formSubmitState:ao.KN.SUBMITTED,formValue:n,formFiles:Object.fromEntries(Object.entries(r).map(e=>{let[t,n]=e;return[t,n.map(e=>({name:e.name,size:e.size,type:e.type,lastModified:e.lastModified}))]}))})))},ariaLabel:null===(d=g.texts)||void 0===d?void 0:d.title,sendButtonTitle:null===(p=g.texts)||void 0===p?void 0:p.submit_button_text,cancelButtonTitle:null===(f=g.texts)||void 0===f?void 0:f.cancel_button_text},null===(h=g.fields)||void 0===h?void 0:h.map((e,t)=>{var n,r,a,i;return o().createElement(ro.A,{className:0!==t||null!==(n=g.texts)&&void 0!==n&&n.title?void 0:"no-margin",key:`form_field_${E}_${e.order}`,helperText:null===(r=e.texts)||void 0===r?void 0:r.help_text,required:e.required,hasTitle:null===(a=g.texts)||void 0===a?void 0:a.title,label:null===(i=e.texts)||void 0===i?void 0:i.label,slug:e.slug},(e=>{var t,n,r,a,i,l,s,c;if(e)switch(e.input_type){case ao.cJ.CHECKBOX:case ao.cJ.RADIO:return o().createElement(Kr.A,{name:e.slug,inputType:e.input_type,options:null===(t=e.attributes)||void 0===t?void 0:t.options,validators:(0,co.Bq)(e)});case ao.cJ.RANGE:return o().createElement(qr.Ap,{hasController:!0,value:parseFloat(null==x||null===(n=x[E])||void 0===n||null===(r=n.formValue)||void 0===r?void 0:r[e.slug])||(null===(a=e.attributes)||void 0===a?void 0:a.default_value)||e.step,name:e.slug,step:null===(i=e.attributes)||void 0===i?void 0:i.step,affix:e.affix,affixValue:null===(l=e.texts)||void 0===l?void 0:l.affix_value,validators:(0,co.Bq)(e),ariaLabel:null===(s=e.texts)||void 0===s?void 0:s.label});case ao.cJ.SELECT:return o().createElement(qr.l6,{options:null===(c=e.attributes)||void 0===c?void 0:c.options,placeholder:e.texts.placeholder_text,validators:(0,co.Bq)(e),name:e.slug});case ao.cJ.FILE:return o().createElement(qr.ZH,{label:e.texts.placeholder_text,validators:(0,co.Bq)(e),name:e.slug});case ao.cJ.TEXTAREA:return o().createElement(Yr.A,{placeholder:e.texts.placeholder_text,validators:(0,co.Bq)(e),name:e.slug});default:return o().createElement(qr.pd,{placeholder:e.texts.placeholder_text,type:e.input_type,adornment:e.affix&&e.texts.affix_value?e.texts.affix_value:void 0,adornmentPosition:"PREFIX"===e.affix?"start":"end",validators:(0,co.Bq)(e),name:e.slug})}return null})(e))}))))},Io=e=>e,Lo=e=>{let{button_type:t}=e;return t===s.lP.edit_contact_details?"editContactDetails":"regularButtons"},Mo=e=>function(){let{id:t,temporaryId:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:void 0,temporaryId:void 0};return t===e||n===e},No=e=>e?e.reduce((e,t)=>{let{offset:n,url:r}=t;const o=e.find(e=>e.url===r);return o?o.offsets.push(n):e.push({offsets:[n],url:r}),e},[]).sort((e,t)=>Math.min(...e.offsets)-Math.min(...t.offsets)):[];function Ro(e){var t,n,a,i,l;let{chatMessage:d,buttonHandlers:p,messageCounter:f,nextMessageType:h}=e;const m=(0,c.wA)(),[g,b]=(0,r.useState)([]),{lastMessageSeen:v,attachments:y=[]}=(0,c.d4)(u.DZ),x=d.sender?d.sender===s.bS.USER:!d.from_bot,w=No(d.message_references),E=d.from_bot&&d.handler!==s.Gi.MIMIR?function(e){const t="%%%SPLIT_HERE%%%",n=(new DOMParser).parseFromString(e,"text/html"),r=Array.from(n.body.querySelectorAll("br"));return r.length<3?[e]:(r.forEach((e,o)=>{var a,i,l,s;e.nextSibling===r[o+1]&&(null===(a=r[o+1])||void 0===a?void 0:a.nextSibling)===r[o+2]&&(null===(i=e.parentNode)||void 0===i||i.insertBefore(n.createTextNode(t),e),e.remove(),null===(l=r[o+1])||void 0===l||l.remove(),null===(s=r[o+2])||void 0===s||s.remove())}),n.body.innerHTML.split(t))}(d.message||"").flatMap(e=>e.split(/\n\s*\n/)).map(e=>e.trim()).filter(e=>""!==e):[Vr(d.message||"",w)],{regularButtons:k,editContactDetails:_}=(0,r.useMemo)(()=>(0,Gr.A)(d.buttons,Lo),[d.buttons]),A=(0,r.useMemo)(()=>{var e;return null==d||null===(e=d.buttons)||void 0===e?void 0:e.filter(e=>e.button_type===s.lP.CHECKBOX.toLowerCase()||e.button_type===s.lP.SLIDER.toLowerCase())},[d]),T=(null==d?void 0:d.image_carousel)||(null==d?void 0:d.video_source),S=null==d||null===(t=d.buttons)||void 0===t?void 0:t.filter(e=>e.button_type===s.lP.CHECKBOX.toLowerCase()),C=(0,r.useCallback)(e=>{let[{isIntersecting:t}]=e;!t||(null==v?void 0:v.index)>=f||m((0,G.pA)(d.id,f))},[d.id,m,v,f]),$=Ur({onChange:C,threshold:.95,skip:x}),O=(0,r.useCallback)(e=>{const t=g.find(t=>t.id===e.id);b(t?g.filter(t=>t.id!==e.id):[...g,e])},[g]),I=(0,r.useMemo)(()=>{var e,t;return[...null!==(e=d.attachments)&&void 0!==e?e:[],...(null!==(t=d.attachment_ids)&&void 0!==t?t:[]).map(e=>y.find(Mo(e))).filter(Io)]},[y,d.attachments,d.attachment_ids]),L=Boolean(d.message||(null==I?void 0:I.length)||(null===(n=d.buttons)||void 0===n?void 0:n.length)||(null===(a=d.image_carousel)||void 0===a?void 0:a.length));return o().createElement(Xn,{ref:$,"data-testid":s.fl},o().createElement(Zn,{fromBot:d.from_bot,hasSiblings:S},d.sender===s.bS.SYSTEM&&d.event_message&&o().createElement(Nr,{chatMessage:d}),o().createElement(Jn,{fromBot:d.from_bot,hasSiblings:T},E.map((e,t)=>e?o().createElement(wr,{key:`chatMessage-${t}`,chatMessage:d,messageLine:e,lineIndex:t,numLines:E.length,editContactDetailsButton:null==_?void 0:_[0],references:w}):null)),(null===(i=d.image_carousel)||void 0===i?void 0:i.length)>0&&o().createElement("div",null,o().createElement(jt,{imageCarousel:d.image_carousel,chatMessage:d})),I.map(e=>o().createElement("div",{key:e.id},o().createElement(Mt,{attachment:e,avatar:d.avatar,chatMessageStatus:d.status}))),d.video_source&&o().createElement(Hr,{source:d.video_source}),(null===(l=d.form)||void 0===l?void 0:l.fields)&&o().createElement(Oo,{chatMessageId:d.id,formData:d.form})),(null==k?void 0:k.length)>0&&o().createElement(er,{orientation:d.buttons_display_orientation||s.Ii.VERTICAL,nextMessageType:h},k.map(e=>o().createElement(Nt.A,{key:e.id,button:e,chatMessage:d,handlers:p,checked:g,setCheckboxValue:O,submitButtonsList:A}))),((null==d?void 0:d.suggestions)||[]).map(e=>{let{preface:t,message:n,buttons:r}=e;return o().createElement(Tr,{key:d.key,chatMessage:d,numLines:E.length,preface:t,message:n,buttons:r})}),L&&d.status&&o().createElement(Ar,{chatMessage:d,attachments:I}))}var Po=n(368);function Do(e){e&&(e.scrollTop=e.scrollHeight,setTimeout(()=>{e.scrollTop=e.scrollHeight},1))}const jo=a.i7`
|
|
2260
|
+
`;var wo=n(8043);function Eo(e){return function(t,n){return t===e&&n?o().createElement(bo,{$affix:t},n):null}}const ko=Eo("PREFIX"),_o=Eo("SUFFIX"),Ao=function(e){let{state:t,message:n,data:r=[]}=e;return o().createElement(uo,null,t!==ao.KN.SUBMITTED&&n&&o().createElement(po,null,n),t===ao.KN.SUBMITTED&&r.length>0&&o().createElement(fo,null,r.map(e=>e.value?o().createElement(ho,{key:e.name},o().createElement(mo,null,e.label),o().createElement(go,null,ko(e.affix,e.affixValue),function(e){return e.type===ao.cJ.FILE&&e.files?o().createElement(xo,null,e.files.map(t=>o().createElement(wo.A,{key:`${t.name}-${e.type}-${t.size}`,file:t,canRemove:!1}))):Array.isArray(e.value)?o().createElement(yo,null,e.value.map(e=>o().createElement(vo,{key:e.name},e.label))):e.value}(e),_o(e.affix,e.affixValue))):null)))},To=function(e){let{width:t=24,height:n=24,color:r="#333"}=e;return o().createElement("svg",{width:t,height:n,viewBox:"0 0 24 24",fill:"none"},o().createElement("path",{d:"M6.5 6a.5.5 0 11-1 0 .5.5 0 011 0zM6.5 12a.5.5 0 11-1 0 .5.5 0 011 0zM6.5 18a.5.5 0 11-1 0 .5.5 0 011 0z",stroke:r,strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M9.75 6h8.5M9.75 12h8.5M9.75 18h8.5",stroke:r,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))};var So=n(5545);const $o=o().lazy(()=>Promise.resolve().then(n.bind(n,526))),Co=e=>"object"==typeof e&&e.length&&e.every(e=>"[object File]"===Object.prototype.toString.call(e)),Oo=function(e){var t,n,a,i,l,d,p,f,h;let{chatMessageId:m,formData:g,onSubmit:b,onCancel:v}=e;const y=(0,c.wA)(),x=(0,c.d4)(u.uO),{text:w}=(0,c.d4)(u.Od),{current:E}=(0,r.useRef)(`${g.id}_submission_${g.submission_id}`);let{current:k}=(0,r.useRef)(0);const{currentLanguageCode:_}=(0,pe.A)();(0,r.useEffect)(()=>{var e,t,n;null==g||!g.id||null!=x&&x[E]?(null==x||null===(e=x[E])||void 0===e?void 0:e.formSubmitState)!==ao.KN.UNANSWERED||null!=x&&null!==(t=x[E])&&void 0!==t&&t.formCompleteMessage||!g.texts.unanswered_text||y((0,G.Bu)({...x[E],formCompleteMessage:g.texts.unanswered_text})):y((0,G.Bu)({formId:g.id,formSubmissionId:g.submission_id,formSubmitState:ao.KN.ACTIVE,formCompleteMessage:"",formKey:E,formValue:(null==x||null===(n=x[E])||void 0===n?void 0:n.formValue)||g.fields.reduce((e,t)=>({...e,[`${t.slug}`]:""}),{})}))},[y,g,_,x,E]);const A=(0,r.useCallback)(e=>{var t,n,r,o,a;return e.input_type===ao.cJ.SELECT?(null===(r=e.attributes.options.find(t=>{var n,r;return t.value===(null==x||null===(n=x[E])||void 0===n||null===(r=n.formValue)||void 0===r?void 0:r[e.slug])}))||void 0===r?void 0:r.label)||(null==x||null===(o=x[E])||void 0===o||null===(a=o.formValue)||void 0===a?void 0:a[e.slug]):null==x||null===(t=x[E])||void 0===t||null===(n=t.formValue)||void 0===n?void 0:n[e.slug]},[E,x]);return o().createElement(oo._H,null,(null===(t=g.texts)||void 0===t?void 0:t.title)&&o().createElement(oo.zE,null,o().createElement(To,{width:20,height:20})," ",null===(n=g.texts)||void 0===n?void 0:n.title),(null==x||null===(a=x[E])||void 0===a?void 0:a.formSubmitState)&&(null==x||null===(i=x[E])||void 0===i?void 0:i.formSubmitState)!==ao.KN.ACTIVE&&o().createElement(Ao,{state:x[E].formSubmitState,message:x[E].formCompleteMessage,data:(()=>{var e,t;if(null!=g&&g.fields&&(null==x||null===(e=x[E])||void 0===e?void 0:e.formSubmitState)===ao.KN.SUBMITTED&&null!=x&&null!==(t=x[E])&&void 0!==t&&t.formValue)return g.fields.reduce((e,t)=>{var n,r,o,a,i;return t.input_type!==ao.cJ.CHECKBOX&&t.input_type!==ao.cJ.RADIO||null===(n=t.attributes)||void 0===n||!n.options?[...e,{affix:t.affix,affixValue:t.texts.affix_value,name:t.slug,label:null===(r=t.texts)||void 0===r?void 0:r.label,type:t.input_type,value:A(t),files:null==x||null===(o=x[E])||void 0===o||null===(a=o.formFiles)||void 0===a?void 0:a[t.slug]}]:[...e,{name:`${t.input_type===ao.cJ.CHECKBOX?"checkbox":"radio"}_list_${t.slug}`,label:null===(i=t.texts)||void 0===i?void 0:i.label,value:t.attributes.options.reduce((e,n)=>{var r,o;const a=null==x||null===(r=x[E])||void 0===r||null===(o=r.formValue)||void 0===o?void 0:o[t.slug];return(null==a?void 0:a.length)>0&&S()(a).call(a,n.value)?[...e||[],{name:n.value,label:n.label,value:n.value}]:e},null)}]},[]).sort((e,t)=>(e.order||0)-(t.order||0))})()}),o().createElement(r.Suspense,{fallback:o().createElement(So.A,{minHeight:so(g)})},(!(null!=x&&x[E])||(null==x||null===(l=x[E])||void 0===l?void 0:l.formSubmitState)===ao.KN.ACTIVE)&&o().createElement($o,{onCancel:async e=>{var t;return v&&v(e),await y(to(g.submission_id,null==x?void 0:x[E].formValue,ao.KN.CANCELED)),await y((0,G.zh)(g.cancel_dialogue_id,{languageCode:_})),y((0,G.Bu)({formKey:E,formId:g.id,formSubmitState:ao.KN.CANCELED,formCompleteMessage:null===(t=g.texts)||void 0===t?void 0:t.cancel_text,formValue:e}))},defaultValues:lo(g),onSubmit:async(e,t)=>{b&&b(e);let n={};Object.entries(e).filter(e=>{let[t,n]=e;return Array.isArray(n)?!!n.length:"object"==typeof n&&null!==n?!!Object.keys(n).length:!!n}).forEach(e=>{let[t,r]=e;r instanceof FileList?n[t]=Array.from(r):n[t]=r});const r=function(e){const t={};return Object.keys(e).forEach(n=>{Co(e[n])&&(t[n]=e[n])}),t}(n),o=Object.values(n).filter(e=>Co(e)).map(e=>Array.isArray(e)&&e.length?e.flat():e).flat();if(o.length){let e=!1;const i=()=>{e=!0},l=await Promise.all(o.map(e=>(0,Wr.TA)(e))),c=await y((e=>{let{chatMessageId:t,files:n,onError:r}=e;return async(e,o)=>{var a;const{bot:{id:i},chatbubble:{chatId:l},connection:{token:c},environment:{PAT_HOST:u}}=o(),d=await e((0,G.z5)()),{headers:p}=(0,Zr.A)({token:c},{extra:d}),f=n.map(no).map((0,Jr.A)("file")),h=f.map((0,Jr.A)("url")),m=`${u}/chatbubble/${s.Ak}/attachment/create`,g={attachments:h},b=await e((0,G.et)(m,{method:"POST",body:g,headers:p}));if((0,Qr.A)(b)||!Array.isArray(null==b||null===(a=b.data)||void 0===a?void 0:a.attachments))return r(new Error("Failed to upload")),[];const{attachments:v}=b.data;if(v.sort((e,t)=>f.findIndex(t=>t.temporaryId===e.temporaryId)-f.findIndex(e=>e.temporaryId===t.temporaryId)),v.length!==n.length)return r(new Error("Failed to upload")),[];const[y,x]=v.reduce((e,t)=>{let[n,r]=e,{id:o,upload_url:a}=t;return[[...n,o],[...r,a]]},[[],[]]),w={"x-goog-upload-bot-id":i,"x-goog-upload-chat-id":l},E=(0,eo.A)(n,x).map(async t=>{let[{file:n},r]=t;const o=await(0,Wr.Bu)(n),a={...w,"Content-Type":n.type};return await e((0,G.et)(r,{method:"PUT",body:o,headers:a},{onError:e=>new Error(e)}))});if((await Promise.all(E)).some(Qr.A))return r(new Error("Failed to upload")),[];const k=`${u}/chatbubble/${s.Ak}/attachment/uploads-complete`,_={attachmentIds:y,chatMessageId:t,exchangeId:h[0].exchangeId};return await e((0,G.et)(k,{method:"POST",body:_,headers:p},{onError:()=>r(new Error("Failed to upload"))})),y}})({chatMessageId:m,files:l,onError:i}));try{const e=function(e,t){if(Object.values(e).reduce((e,t)=>e+t.length,0)!==t.length)throw new Error("Mismatched lengths between file objects and attachment IDs");const n={};let r=0;return Object.entries(e).forEach(e=>{let[o,a]=e;n[o]=a.map((e,n)=>t[r+n]).join(","),r+=a.length}),n}(r,c);n={...n,...e}}catch(e){i()}if(e){var a;if(k>=3)return y((0,G.Bu)({formKey:E,formId:g.id,formSubmitState:ao.KN.ERRORED,formCompleteMessage:null===(a=g.texts)||void 0===a?void 0:a.error_text,formValue:n}));const e=Object.keys(r);return e.length&&e.forEach(e=>{var n;t(e,{type:"custom",message:null===(n=w.upload_file_failed)||void 0===n?void 0:n[_]})}),void(k+=1)}}var i;return null===await y(to(g.submission_id,n))?y((0,G.Bu)({formKey:E,formId:g.id,formSubmitState:ao.KN.ERRORED,formCompleteMessage:null===(i=g.texts)||void 0===i?void 0:i.error_text,formValue:n})):(await y((0,G.zh)(g.submit_dialogue_id,{languageCode:_})),y((0,G.Bu)({formKey:E,formId:g.id,formSubmitState:ao.KN.SUBMITTED,formValue:n,formFiles:Object.fromEntries(Object.entries(r).map(e=>{let[t,n]=e;return[t,n.map(e=>({name:e.name,size:e.size,type:e.type,lastModified:e.lastModified}))]}))})))},ariaLabel:null===(d=g.texts)||void 0===d?void 0:d.title,sendButtonTitle:null===(p=g.texts)||void 0===p?void 0:p.submit_button_text,cancelButtonTitle:null===(f=g.texts)||void 0===f?void 0:f.cancel_button_text},null===(h=g.fields)||void 0===h?void 0:h.map((e,t)=>{var n,r,a;return o().createElement(ro.A,{className:0!==t||null!==(n=g.texts)&&void 0!==n&&n.title?void 0:"no-margin",key:`form_field_${E}_${e.order}`,helperText:null===(r=e.texts)||void 0===r?void 0:r.help_text,required:e.required,label:null===(a=e.texts)||void 0===a?void 0:a.label},(e=>{var t,n,r,a,i,l,s,c;if(e)switch(e.input_type){case ao.cJ.CHECKBOX:case ao.cJ.RADIO:return o().createElement(Kr.A,{name:e.slug,inputType:e.input_type,options:null===(t=e.attributes)||void 0===t?void 0:t.options,validators:(0,co.Bq)(e)});case ao.cJ.RANGE:return o().createElement(qr.Ap,{hasController:!0,value:parseFloat(null==x||null===(n=x[E])||void 0===n||null===(r=n.formValue)||void 0===r?void 0:r[e.slug])||(null===(a=e.attributes)||void 0===a?void 0:a.default_value)||e.step,name:e.slug,step:null===(i=e.attributes)||void 0===i?void 0:i.step,affix:e.affix,affixValue:null===(l=e.texts)||void 0===l?void 0:l.affix_value,validators:(0,co.Bq)(e),ariaLabel:null===(s=e.texts)||void 0===s?void 0:s.label});case ao.cJ.SELECT:return o().createElement(qr.l6,{options:null===(c=e.attributes)||void 0===c?void 0:c.options,placeholder:e.texts.placeholder_text,validators:(0,co.Bq)(e),name:e.slug});case ao.cJ.FILE:return o().createElement(qr.ZH,{label:e.texts.placeholder_text,validators:(0,co.Bq)(e),name:e.slug});case ao.cJ.TEXTAREA:return o().createElement(Yr.A,{placeholder:e.texts.placeholder_text,validators:(0,co.Bq)(e),name:e.slug});default:return o().createElement(qr.pd,{placeholder:e.texts.placeholder_text,type:e.input_type,adornment:e.affix&&e.texts.affix_value?e.texts.affix_value:void 0,adornmentPosition:"PREFIX"===e.affix?"start":"end",validators:(0,co.Bq)(e),name:e.slug})}return null})(e))}))))},Io=e=>e,Lo=e=>{let{button_type:t}=e;return t===s.lP.edit_contact_details?"editContactDetails":"regularButtons"},Mo=e=>function(){let{id:t,temporaryId:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:void 0,temporaryId:void 0};return t===e||n===e},No=e=>e?e.reduce((e,t)=>{let{offset:n,url:r}=t;const o=e.find(e=>e.url===r);return o?o.offsets.push(n):e.push({offsets:[n],url:r}),e},[]).sort((e,t)=>Math.min(...e.offsets)-Math.min(...t.offsets)):[];function Ro(e){var t,n,a,i,l;let{chatMessage:d,buttonHandlers:p,messageCounter:f,nextMessageType:h}=e;const m=(0,c.wA)(),[g,b]=(0,r.useState)([]),{lastMessageSeen:v,attachments:y=[]}=(0,c.d4)(u.DZ),x=d.sender?d.sender===s.bS.USER:!d.from_bot,w=No(d.message_references),E=d.from_bot&&d.handler!==s.Gi.MIMIR?function(e){const t="%%%SPLIT_HERE%%%",n=(new DOMParser).parseFromString(e,"text/html"),r=Array.from(n.body.querySelectorAll("br"));return r.length<3?[e]:(r.forEach((e,o)=>{var a,i,l,s;e.nextSibling===r[o+1]&&(null===(a=r[o+1])||void 0===a?void 0:a.nextSibling)===r[o+2]&&(null===(i=e.parentNode)||void 0===i||i.insertBefore(n.createTextNode(t),e),e.remove(),null===(l=r[o+1])||void 0===l||l.remove(),null===(s=r[o+2])||void 0===s||s.remove())}),n.body.innerHTML.split(t))}(d.message||"").flatMap(e=>e.split(/\n\s*\n/)).map(e=>e.trim()).filter(e=>""!==e):[Vr(d.message||"",w)],{regularButtons:k,editContactDetails:_}=(0,r.useMemo)(()=>(0,Gr.A)(d.buttons,Lo),[d.buttons]),A=(0,r.useMemo)(()=>{var e;return null==d||null===(e=d.buttons)||void 0===e?void 0:e.filter(e=>e.button_type===s.lP.CHECKBOX.toLowerCase()||e.button_type===s.lP.SLIDER.toLowerCase())},[d]),T=(null==d?void 0:d.image_carousel)||(null==d?void 0:d.video_source),S=null==d||null===(t=d.buttons)||void 0===t?void 0:t.filter(e=>e.button_type===s.lP.CHECKBOX.toLowerCase()),$=(0,r.useCallback)(e=>{let[{isIntersecting:t}]=e;!t||(null==v?void 0:v.index)>=f||m((0,G.pA)(d.id,f))},[d.id,m,v,f]),C=Ur({onChange:$,threshold:.95,skip:x}),O=(0,r.useCallback)(e=>{const t=g.find(t=>t.id===e.id);b(t?g.filter(t=>t.id!==e.id):[...g,e])},[g]),I=(0,r.useMemo)(()=>{var e,t;return[...null!==(e=d.attachments)&&void 0!==e?e:[],...(null!==(t=d.attachment_ids)&&void 0!==t?t:[]).map(e=>y.find(Mo(e))).filter(Io)]},[y,d.attachments,d.attachment_ids]),L=Boolean(d.message||(null==I?void 0:I.length)||(null===(n=d.buttons)||void 0===n?void 0:n.length)||(null===(a=d.image_carousel)||void 0===a?void 0:a.length));return o().createElement(Xn,{ref:C,"data-testid":s.fl},o().createElement(Zn,{$fromBot:d.from_bot,$hasSiblings:S},d.sender===s.bS.SYSTEM&&d.event_message&&o().createElement(Nr,{chatMessage:d}),o().createElement(Jn,{$fromBot:d.from_bot,$hasSiblings:T},E.map((e,t)=>e?o().createElement(wr,{key:`chatMessage-${t}`,chatMessage:d,messageLine:e,lineIndex:t,numLines:E.length,editContactDetailsButton:null==_?void 0:_[0],references:w}):null)),(null===(i=d.image_carousel)||void 0===i?void 0:i.length)>0&&o().createElement("div",null,o().createElement(jt,{imageCarousel:d.image_carousel,chatMessage:d})),I.map(e=>o().createElement("div",{key:e.id},o().createElement(Mt,{attachment:e,avatar:d.avatar,chatMessageStatus:d.status}))),d.video_source&&o().createElement(Hr,{source:d.video_source}),(null===(l=d.form)||void 0===l?void 0:l.fields)&&o().createElement(Oo,{chatMessageId:d.id,formData:d.form})),(null==k?void 0:k.length)>0&&o().createElement(er,{$orientation:d.buttons_display_orientation||s.Ii.VERTICAL,$nextMessageType:h},k.map(e=>o().createElement(Nt.A,{key:e.id,button:e,chatMessage:d,handlers:p,checked:g,setCheckboxValue:O,submitButtonsList:A}))),((null==d?void 0:d.suggestions)||[]).map(e=>{let{preface:t,message:n,buttons:r}=e;return o().createElement(Tr,{key:d.key,chatMessage:d,numLines:E.length,preface:t,message:n,buttons:r})}),L&&d.status&&o().createElement(Ar,{chatMessage:d,attachments:I}))}var Po=n(368);function Do(e){e&&(e.scrollTop=e.scrollHeight,setTimeout(()=>{e.scrollTop=e.scrollHeight},1))}const jo=a.i7`
|
|
2413
2261
|
0% {
|
|
2414
2262
|
opacity: 0;
|
|
2415
2263
|
transform: translateY(8px);
|
|
@@ -2626,7 +2474,7 @@
|
|
|
2626
2474
|
stroke: ${e=>(0,he.J7)(e.theme.background,e.theme.buttonBackground)?e.theme.buttonText:e.theme.buttonBackground};
|
|
2627
2475
|
}
|
|
2628
2476
|
}
|
|
2629
|
-
|
|
2477
|
+
`,$a=a.Ay.button`
|
|
2630
2478
|
${Sa};
|
|
2631
2479
|
z-index: 15;
|
|
2632
2480
|
padding: 0px;
|
|
@@ -2640,7 +2488,7 @@
|
|
|
2640
2488
|
}
|
|
2641
2489
|
|
|
2642
2490
|
${e=>{let{disabled:t}=e;return t&&"\n cursor: default;\n opacity: 0.3;\n &:hover {\n opacity: 0.3;\n }\n "}};
|
|
2643
|
-
|
|
2491
|
+
`,Ca=a.Ay.div`
|
|
2644
2492
|
position: absolute;
|
|
2645
2493
|
right: ${e=>{let{$isTextDirectionRtl:t}=e;return t?"auto":"12px"}};
|
|
2646
2494
|
left: ${e=>{let{$isTextDirectionRtl:t}=e;return t?"12px":"auto"}};
|
|
@@ -2670,7 +2518,7 @@
|
|
|
2670
2518
|
stroke: ${e=>{let{theme:t}=e;return(0,he.w5)(t.background,"rgba(255, 255, 255, 0.64)","rgba(0, 0, 0, 0.64)")}};
|
|
2671
2519
|
}
|
|
2672
2520
|
}
|
|
2673
|
-
`,Oa=5;function Ia(e){let{accept:t=s.oY,multiple:n=!0,setMessage:a}=e;const i=(0,xa.jL)(),{isTextDirectionRtl:l}=(0,xa.GV)(u.Od),{takenOver:c,supportsAttachment:d}=(0,xa.GV)(e=>{let{agent:t}=e;return t}),{attachments:p}=(0,xa.GV)(e=>{let{chatbubble:t}=e;return t}),f=(0,r.useRef)(null),h=c&&d||(0,q.A)()&&(null==p?void 0:p.exchangeId),m=(0,r.useCallback)(()=>{f.current&&(f.current.value="",f.current.click())},[f]);return(0,r.useEffect)(()=>{p.buttonClicked&&(i((0,G.B)()),m())},[p.buttonClicked,i,m]),o().createElement(
|
|
2521
|
+
`,Oa=5;function Ia(e){let{accept:t=s.oY,multiple:n=!0,setMessage:a}=e;const i=(0,xa.jL)(),{isTextDirectionRtl:l}=(0,xa.GV)(u.Od),{takenOver:c,supportsAttachment:d}=(0,xa.GV)(e=>{let{agent:t}=e;return t}),{attachments:p}=(0,xa.GV)(e=>{let{chatbubble:t}=e;return t}),f=(0,r.useRef)(null),h=c&&d||(0,q.A)()&&(null==p?void 0:p.exchangeId),m=(0,r.useCallback)(()=>{f.current&&(f.current.value="",f.current.click())},[f]);return(0,r.useEffect)(()=>{p.buttonClicked&&(i((0,G.B)()),m())},[p.buttonClicked,i,m]),o().createElement(Ca,{hidden:!h,$isTextDirectionRtl:l},h&&o().createElement(ie.$n,{onClick:e=>{e.preventDefault(),e.stopPropagation(),m()},"data-testid":"composer-file-upload-button"},o().createElement(Ae.A,null)),o().createElement("input",{ref:f,hidden:!0,type:"file",accept:t,multiple:n,onChange:async e=>{let{target:t}=e;try{var n;if(a(""),(null===(n=t.files)||void 0===n?void 0:n.length)>Oa)return void i((0,G.Dc)(`You can upload up to ${Oa} files at a time`,3500));const e=await Promise.all(Array.from(t.files).map(Wr.TA));i((0,G.Ln)(e))}catch(e){i((0,G.Dc)(e.message.replace(/^Error: ?/i,""),3500))}},style:{display:"none"}}))}const La=a.Ay.div`
|
|
2674
2522
|
display: flex;
|
|
2675
2523
|
align-items: center;
|
|
2676
2524
|
font-size: var(--_kindlychat-font-size-sm);
|
|
@@ -2748,7 +2596,7 @@
|
|
|
2748
2596
|
display: flex;
|
|
2749
2597
|
align-items: center;
|
|
2750
2598
|
margin-left: 4px;
|
|
2751
|
-
`;const Da=(e,t)=>{const n=e.slice();return n.splice(t,1),n};function ja(){const e=(0,xa.jL)(),{attachments:{files:t}}=(0,xa.GV)(e=>{let{chatbubble:t}=e;return t});return o().createElement(La,null,t.map((n,r)=>o().createElement(Ma,{key:`uploaded-image-${n.name}-${r}`},o().createElement(Pa,{file:n}),o().createElement(ie.$n,{onClick:n=>{n.preventDefault(),(n=>{e((0,G.Ln)(Da(t,n)))})(r)}},o().createElement(Oe.US,{width:11,height:11,color:"#FFF"})))),1===(null==t?void 0:t.length)&&o().createElement("span",null,t[0].name))}let Fa;const za=37,Ba=1e3,Ha=1e3;function Ua(e){let{active:t,chatHasStarted:n,currentlyPoppedUp:a=!1,bodyRef:i,inert:l}=e;const[s,c]=(0,r.useState)(za),[d,p]=(0,r.useState)(!1),[f,h]=(0,r.useState)(""),[m,g]=(0,r.useState)(0),b=(0,r.useRef)(null);(0,r.useEffect)(()=>{(t||n)&&!(0,q.A)()&&!a&&b.current&&b.current.focus()},[t,n,a]);const v=(0,xa.jL)(),{inputLimitEnabled:y,inputLimit:x,isTextDirectionRtl:w}=(0,xa.GV)(u.Od),{allGreetingsHideInput:E,attachments:{files:k},hideInputField:_}=(0,xa.GV)(e=>{let{chatbubble:t}=e;return t}),{takenOver:A,userIsTyping:T}=(0,xa.GV)(e=>{let{agent:t}=e;return t}),{connected:S}=(0,xa.GV)(e=>{let{connection:t}=e;return t}),{chatMessages
|
|
2599
|
+
`;const Da=(e,t)=>{const n=e.slice();return n.splice(t,1),n};function ja(){const e=(0,xa.jL)(),{attachments:{files:t}}=(0,xa.GV)(e=>{let{chatbubble:t}=e;return t});return o().createElement(La,null,t.map((n,r)=>o().createElement(Ma,{key:`uploaded-image-${n.name}-${r}`},o().createElement(Pa,{file:n}),o().createElement(ie.$n,{onClick:n=>{n.preventDefault(),(n=>{e((0,G.Ln)(Da(t,n)))})(r)}},o().createElement(Oe.US,{width:11,height:11,color:"#FFF"})))),1===(null==t?void 0:t.length)&&o().createElement("span",null,t[0].name))}let Fa;const za=37,Ba=1e3,Ha=1e3;function Ua(e){let{active:t,chatHasStarted:n,currentlyPoppedUp:a=!1,bodyRef:i,inert:l}=e;const[s,c]=(0,r.useState)(za),[d,p]=(0,r.useState)(!1),[f,h]=(0,r.useState)(""),[m,g]=(0,r.useState)(0),b=(0,r.useRef)(null);(0,r.useEffect)(()=>{(t||n)&&!(0,q.A)()&&!a&&b.current&&b.current.focus()},[t,n,a]);const v=(0,xa.jL)(),{inputLimitEnabled:y,inputLimit:x,isTextDirectionRtl:w}=(0,xa.GV)(u.Od),{allGreetingsHideInput:E,attachments:{files:k},hideInputField:_}=(0,xa.GV)(e=>{let{chatbubble:t}=e;return t}),{takenOver:A,userIsTyping:T}=(0,xa.GV)(e=>{let{agent:t}=e;return t}),{connected:S}=(0,xa.GV)(e=>{let{connection:t}=e;return t}),{chatMessages:$}=(0,xa.GV)(e=>{let{messages:t}=e;return t}),{inspectorOpen:C}=(0,xa.GV)(e=>{let{inspector:t}=e;return t}),O=w?"rtl":void 0,I=_&&!A&&0===k.length,L=!A&&y,M=L?x:Ba,N=!f&&0===k.length,R=0===f.length&&0===k.length,P=!S||I||E&&0===$.length||f.length>M||N||!n,{placeholder:D,disabled_input_text:j}=(0,dr.A)(),F=e=>{if(e.preventDefault(),e.stopPropagation(),T&&v((0,G.mw)()),P)return!1;if(!f.trim()&&0===k.length)return!1;if(k.length>0)v((0,G.Zn)());else{const e=(new Date).getTime();if(!(e-m>Ha))return!1;g(e),v((0,G.y2)(f.trim()))}return h(""),!0};return(0,ya.A)("touchend",async e=>{var t;(0,q.u)()&&(d&&"chat-box-composer"!==e.target.id&&"BUTTON"!==e.target.tagName&&(null===(t=b.current)||void 0===t||t.blur(),e.preventDefault()),"chat-box-composer"===e.target.id&&(e.target.focus(),e.stopPropagation(),e.preventDefault()))}),o().createElement(Ea,{dir:O,inert:l?"":void 0},o().createElement("form",{autoComplete:"off",action:"#",onSubmit:F},o().createElement(ka,{$submitHidden:R},o().createElement(ie.A0,{$initialHeight:za,$targetHeight:s,$active:!N,$hasFiles:(null==k?void 0:k.length)>0},0===k.length&&o().createElement(o().Fragment,null,o().createElement(Aa,{"data-testid":"chat-box-composer","aria-hidden":n?"false":"true","aria-label":D,name:"message",$hide:I,disabled:!n||I,$active:!N,ref:b,placeholder:D,onChange:e=>{const{value:t}=e.target;A&&(e=>{const t=e.length>0;clearTimeout(Fa),!T&&t?v((0,G.Mb)()):T&&!t&&v((0,G.mw)()),Fa=setTimeout(()=>{v((0,G.mw)())},5e3)})(t),h(t),la(i.current)&&setTimeout(()=>{Do(i.current)},5)},value:f,onFocus:()=>p(!0),onBlur:()=>p(!1),onMouseDown:()=>{d||la(i.current)||Do(i.current)},onHeightChange:c,$minHeight:za,enterKeyHint:"send",onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||F(e)}}),o().createElement(_a,Object.assign({$hide:_},!_&&{inert:""}),j)),o().createElement(ja,null),L&&o().createElement(va,{inputMax:M,inputLength:f.length,composerHeight:s,composerHeightInitial:za}),o().createElement(Ia,{setMessage:h})),o().createElement(Ta,{$hidden:R,$isTextDirectionRtl:!!w},o().createElement($a,{"data-testid":"composer-submit","aria-hidden":P,$active:!P,disabled:P,role:"button",onClick:F,title:"Send message",onMouseDown:e=>{e.preventDefault()}},o().createElement(Oe.qx,{width:24,height:24}))))))}const Va=function(e){return o().createElement("svg",Object.assign({},e,{viewBox:"0 0 82 82",xmlns:"http://www.w3.org/2000/svg"}),o().createElement("title",null,"Bot Avatar"),o().createElement("g",{transform:"translate(1 1)",fill:"none",fillRule:"evenodd"},o().createElement("circle",{stroke:"#F3F3F4",strokeWidth:"2",fill:"#FFF",cx:"40",cy:"40",r:"40"}),o().createElement("path",{d:"M30.64 35.4a4.27 4.27 0 11-8.54 0 4.27 4.27 0 018.54 0M50.17 35.4a4.27 4.27 0 108.54 0 4.27 4.27 0 00-8.54 0",fill:"#000"}),o().createElement("path",{d:"M29.42 60.83a17.42 17.42 0 0022.38 0",stroke:"#DA3CFF",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M16 29.03a12.39 12.39 0 0113.15-5.31 12.24 12.24 0 019.45 10.49v15.64h5.47M44.88 23.2H64",stroke:"#0069FF",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"})))};var Ga=n(8411),Wa=n(167);function qa(e){let{handleXButtonClick:t,settingsButtonRef:n}=e;const a=(0,xa.jL)(),{name:i,avatar:l,fullscreenMode:s,isTextDirectionRtl:c}=(0,xa.GV)(u.Od),{chatHasStarted:d,currentLanguage:p,overlayViews:f}=(0,xa.GV)(e=>{let{chatbubble:t}=e;return t}),{botConversationFeedback:h}=(0,Ga.A)(p),m=c?"rtl":void 0,g=f[f.length-1],b=!g||"FEEDBACK"===g,v=s&&h||b&&!s,y=()=>{a((0,G.Rh)())};return x=e=>{const{activeElement:t}=document;if(!t)return;const{tagName:n}=t;"Escape"===e.code&&"BODY"===n&&y(),"Escape"===e.code&&"BODY"!==n&&t instanceof HTMLElement&&t.blur()},(0,r.useEffect)(()=>(window.addEventListener("keydown",x,!0),()=>window.removeEventListener("keydown",x,!0)),[x]),d?o().createElement(Wa.B3,{dir:m,"data-testid":"chat-box-header"},o().createElement(Wa.CE,null,l?o().createElement(Wa.dl,{avatar:l,"aria-hidden":"true",alt:""}):o().createElement(Va,{height:30,alt:"","aria-hidden":"true"}),o().createElement(Wa.Zw,{$isTextDirectionRtl:c,"aria-label":`Chat bot ${i||"Kindly"}`},i||"Kindly")),o().createElement(Wa.HD,null,b&&o().createElement(Wa.I$,{"aria-label":"Open settings",title:"Open settings",type:"button",onClick:()=>{a((0,G.wQ)("GENERIC"))},"data-testid":"chat-settings-button",ref:n},o().createElement(Oe.Ze,{width:24,height:24})),b&&!s&&o().createElement(Wa.I$,{"aria-label":"Minimize chat",title:"Minimize chat",type:"button",onClick:y,"data-testid":"minimize-chat-button","data-cy":"minimize-chat-button"},o().createElement(Oe.gR,{width:24,height:24})),v&&o().createElement(Wa.I$,{"aria-label":"End chat",title:"End chat",type:"button",onClick:t,"data-testid":"end-chat-button","data-cy":"end-chat-button",$isTextDirectionRtl:c},o().createElement(Oe.US,{width:24,height:24})))):null;var x}var Ka=n(8628);const Ya=a.Ay.div`
|
|
2752
2600
|
overflow: hidden;
|
|
2753
2601
|
position: absolute;
|
|
2754
2602
|
inset: 0;
|
|
@@ -2882,7 +2730,7 @@
|
|
|
2882
2730
|
position: unset;
|
|
2883
2731
|
align-items: center;
|
|
2884
2732
|
}
|
|
2885
|
-
`;function pi(e){let{endChat:t}=e;const{whitelabelEnabled:n}=(0,xa.GV)(u.Od),{currentLanguageCode:r}=(0,pe.A)(),{preloadFeedbackImages:a}=(0,Ga.A)(r),l=(0,xa.jL)(),s=(0,dr.A)(),{back_to_chat_button:c,cancel_chat_button:p,cancel_chat_text:f}=s;return o().createElement(li,null,o().createElement(si,null,o().createElement(ci,null,o().createElement(d.H2,null,f)),o().createElement(ui,null,o().createElement(ni.A,{style:i.Nz,"aria-label":p,title:p,onClick:t,onMouseEnter:()=>{a("bot_conversation")},type:"button",text:p,cy:"cancel-chat-button",autoFocus:!0}),o().createElement(ie.N_,{"aria-label":c,title:c,onClick:()=>{l((0,Ka.eG)())},onKeyUp:e=>{"Enter"===e.key&&l((0,Ka.eG)())},type:"button",tabIndex:0},"‹ ",c)),o().createElement(di,null,!n&&o().createElement(ii,null))))}function fi(e){let{color:t="#232F41"}=e;return o().createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o().createElement("path",{d:"M6.83317 4.5L3.1665 8L6.83317 11.5",stroke:t,strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),o().createElement("path",{d:"M12.8335 8H3.3335",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))}function hi(e){let{color:t="#232F41"}=e;return o().createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o().createElement("path",{d:"M9.1665 4.5L12.8332 8L9.1665 11.5",stroke:t,strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),o().createElement("path",{d:"M12.6665 8H3.1665",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))}var mi=n(4142),gi=n(5767);const bi=window.matchMedia("(prefers-reduced-motion: reduce)").matches,vi="startViewTransition"in document;async function yi(e){if(bi||!vi)return void e();const t=document;return await t.startViewTransition(()=>{(0
|
|
2733
|
+
`;function pi(e){let{endChat:t}=e;const{whitelabelEnabled:n}=(0,xa.GV)(u.Od),{currentLanguageCode:r}=(0,pe.A)(),{preloadFeedbackImages:a}=(0,Ga.A)(r),l=(0,xa.jL)(),s=(0,dr.A)(),{back_to_chat_button:c,cancel_chat_button:p,cancel_chat_text:f}=s;return o().createElement(li,null,o().createElement(si,null,o().createElement(ci,null,o().createElement(d.H2,null,f)),o().createElement(ui,null,o().createElement(ni.A,{style:i.Nz,"aria-label":p,title:p,onClick:t,onMouseEnter:()=>{a("bot_conversation")},type:"button",text:p,cy:"cancel-chat-button",autoFocus:!0}),o().createElement(ie.N_,{"aria-label":c,title:c,onClick:()=>{l((0,Ka.eG)())},onKeyUp:e=>{"Enter"===e.key&&l((0,Ka.eG)())},type:"button",tabIndex:0},"‹ ",c)),o().createElement(di,null,!n&&o().createElement(ii,null))))}function fi(e){let{color:t="#232F41"}=e;return o().createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o().createElement("path",{d:"M6.83317 4.5L3.1665 8L6.83317 11.5",stroke:t,strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),o().createElement("path",{d:"M12.8335 8H3.3335",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))}function hi(e){let{color:t="#232F41"}=e;return o().createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o().createElement("path",{d:"M9.1665 4.5L12.8332 8L9.1665 11.5",stroke:t,strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),o().createElement("path",{d:"M12.6665 8H3.1665",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))}var mi=n(4142),gi=n(5767);const bi=window.matchMedia("(prefers-reduced-motion: reduce)").matches,vi="startViewTransition"in document;async function yi(e){if(bi||!vi)return void e();const t=document;return await t.startViewTransition(()=>{(0,$e.flushSync)(e)})}var xi=n(3169);const wi=a.i7`
|
|
2886
2734
|
0% {
|
|
2887
2735
|
opacity: 0;
|
|
2888
2736
|
transform: translateY(4px);
|
|
@@ -2945,7 +2793,7 @@
|
|
|
2945
2793
|
flex-direction: column;
|
|
2946
2794
|
align-items: center;
|
|
2947
2795
|
}
|
|
2948
|
-
|
|
2796
|
+
`,$i=a.Ay.button`
|
|
2949
2797
|
${R.AF}
|
|
2950
2798
|
|
|
2951
2799
|
display: flex;
|
|
@@ -2954,11 +2802,11 @@
|
|
|
2954
2802
|
flex-direction: column;
|
|
2955
2803
|
align-items: center;
|
|
2956
2804
|
justify-content: center;
|
|
2957
|
-
opacity: ${e=>{let{wasChoiceMade:t
|
|
2805
|
+
opacity: ${e=>{let{$wasChoiceMade:t,$isSelected:n}=e;return t&&!n?.5:1}};
|
|
2958
2806
|
transition:
|
|
2959
2807
|
scale 0.2s,
|
|
2960
2808
|
opacity 0.2s;
|
|
2961
|
-
scale: ${e=>{let{isSelected:t}=e;return t?1.1:1}};
|
|
2809
|
+
scale: ${e=>{let{$isSelected:t}=e;return t?1.1:1}};
|
|
2962
2810
|
cursor: pointer;
|
|
2963
2811
|
user-select: none;
|
|
2964
2812
|
word-break: normal;
|
|
@@ -2971,7 +2819,7 @@
|
|
|
2971
2819
|
@media only screen and (min-width: 361px) {
|
|
2972
2820
|
width: 65px;
|
|
2973
2821
|
}
|
|
2974
|
-
|
|
2822
|
+
`,Ci=a.Ay.img`
|
|
2975
2823
|
width: 24px;
|
|
2976
2824
|
height: 24px;
|
|
2977
2825
|
`,Oi=a.Ay.span`
|
|
@@ -2994,10 +2842,10 @@
|
|
|
2994
2842
|
padding: 8px 12px;
|
|
2995
2843
|
color: var(--button-text-color-1728655827);
|
|
2996
2844
|
background-color: ${e=>{let{theme:t}=e;return t.secondaryButtonBackground}}; /* fallback for relative color syntax and oklch() */
|
|
2997
|
-
background-color: ${e=>{let{isSelected:t,theme:n}=e;return t?"var(--button-selected-background-color-1728655827)":n.secondaryButtonBackground}};
|
|
2845
|
+
background-color: ${e=>{let{$isSelected:t,theme:n}=e;return t?"var(--button-selected-background-color-1728655827)":n.secondaryButtonBackground}};
|
|
2998
2846
|
border-radius: 6px;
|
|
2999
2847
|
box-shadow: ${i.FR.button};
|
|
3000
|
-
translate: ${e=>{let{isSelected:t}=e;return t?"0 -2px":"0 0"}};
|
|
2848
|
+
translate: ${e=>{let{$isSelected:t}=e;return t?"0 -2px":"0 0"}};
|
|
3001
2849
|
transition:
|
|
3002
2850
|
background-color 0.2s,
|
|
3003
2851
|
translate 0.2s;
|
|
@@ -3072,10 +2920,10 @@
|
|
|
3072
2920
|
|
|
3073
2921
|
view-transition-name: 'progress-dots-1723461511841';
|
|
3074
2922
|
`,Hi=a.Ay.span`
|
|
3075
|
-
width: ${e=>{let{isActive:t}=e;return t?"10px":"6px"}};
|
|
3076
|
-
height: ${e=>{let{isActive:t}=e;return t?"10px":"6px"}};
|
|
2923
|
+
width: ${e=>{let{$isActive:t}=e;return t?"10px":"6px"}};
|
|
2924
|
+
height: ${e=>{let{$isActive:t}=e;return t?"10px":"6px"}};
|
|
3077
2925
|
border-radius: 50%;
|
|
3078
|
-
background-color: ${e=>{let{isDotBeforeOrEqualCurrentStep:t,theme:n}=e;return t?`${n.buttonBackground}`:`${i.CM[20]}`}};
|
|
2926
|
+
background-color: ${e=>{let{$isDotBeforeOrEqualCurrentStep:t,theme:n}=e;return t?`${n.buttonBackground}`:`${i.CM[20]}`}};
|
|
3079
2927
|
transition:
|
|
3080
2928
|
width 0.3s,
|
|
3081
2929
|
height 0.3s,
|
|
@@ -3095,7 +2943,7 @@
|
|
|
3095
2943
|
overflow: hidden;
|
|
3096
2944
|
white-space: nowrap;
|
|
3097
2945
|
text-overflow: ellipsis;
|
|
3098
|
-
`,Wi=window.__KINDLY_SETTINGS__.fullscreenMode;function qi(e){var t,n,l;let{feedbackToSubmit:s,isFullHeight:u,endChat:d,shouldEndChat:p=!1,inert:f}=e;const h=(0,xa.jL)(),m=(0,c.Pj)().getState(),{currentLanguageCode:g}=(0,pe.A)(),{botConversationFeedback:b,handoverConversationFeedback:v}=(0,Ga.A)(g),y="bot_conversation"===s.trigger_type?b:v,x=(0,dr.A)(),{start_over_button:w}=x,{buttonText:E,secondaryButtonBackground:k}=(0,r.useContext)(a.Dx),_=(0,r.useMemo)(()=>(0,he.w5)(k,i.AV.light,i.AV.dark),[k]),A="external_feedback"===y.feedback_type,T=[...null!=y&&y.rating_scale?["RATING_SCALE"]:[],...null!=y&&null!==(t=y.predefined_buttons)&&void 0!==t&&t.enable_step?["PREDEFINED_BUTTONS"]:[],...null!=y&&null!==(n=y.free_form)&&void 0!==n&&n.enable_step?["FREEFORM_TEXT"]:[],"THANK_YOU"]
|
|
2946
|
+
`,Wi=window.__KINDLY_SETTINGS__.fullscreenMode;function qi(e){var t,n,l;let{feedbackToSubmit:s,isFullHeight:u,endChat:d,shouldEndChat:p=!1,inert:f}=e;const h=(0,xa.jL)(),m=(0,c.Pj)().getState(),{currentLanguageCode:g}=(0,pe.A)(),{botConversationFeedback:b,handoverConversationFeedback:v}=(0,Ga.A)(g),y="bot_conversation"===s.trigger_type?b:v,x=(0,dr.A)(),{start_over_button:w}=x,{buttonText:E,secondaryButtonBackground:k}=(0,r.useContext)(a.Dx),_=(0,r.useMemo)(()=>(0,he.w5)(k,i.AV.light,i.AV.dark),[k]),A="external_feedback"===y.feedback_type,T=[...null!=y&&y.rating_scale?["RATING_SCALE"]:[],...null!=y&&null!==(t=y.predefined_buttons)&&void 0!==t&&t.enable_step?["PREDEFINED_BUTTONS"]:[],...null!=y&&null!==(n=y.free_form)&&void 0!==n&&n.enable_step?["FREEFORM_TEXT"]:[],"THANK_YOU"],$=s.currentStep,C=$?T.indexOf($):0,O=y.predefined_buttons.use_sentiment_buttons&&null!==(l=s.sentiment)&&void 0!==l?l:"no_sentiment";(0,r.useEffect)(()=>{if(!$)return;const e=T[0]===$;(0,Ce.tf)("show-feedback",{value:{feedbackType:$}},{storeState:m,source:e?"programmatic":"user"})},[$,m]);const I=e=>{(0,Ce.tf)("dismiss-feedback",{value:{feedbackType:$}},{storeState:m,source:e}),h((0,Ka.zn)(null)),h((0,gi.ot)())},L=()=>{(0,Ce.tf)("restart-chat",void 0,{storeState:m}),h((0,Ka.ky)(!0))};return A?o().createElement(ki,{$isFullHeight:!!u,$justifyCenter:!0},!u&&o().createElement(Ai,{onClick:()=>I("user")},o().createElement(Oe.US,{color:"black",height:28,width:28})),o().createElement(Ti,{$isFullHeight:!!u},y.headline),o().createElement(_i,{onClick:()=>{p&&(null==d||d("programmatic")),h((0,Ka.zn)(null)),h((0,gi.ot)())},href:y.url_for_feedback,target:"_blank",rel:"noreferrer"},y.button_label)):o().createElement(ki,Object.assign({"aria-live":"polite",$isFullHeight:!!u},f&&{inert:""}),!u&&o().createElement(Ai,{onClick:()=>I("user")},o().createElement(Oe.US,{color:"black",height:28,width:28})),(()=>{var e;switch($){case"RATING_SCALE":return o().createElement(o().Fragment,null,o().createElement(Ti,{$isFullHeight:Boolean(u)},y.rating_scale.title),o().createElement(Si,null,y.rating_scale.edit_labels.map((e,t)=>{const n=0===t;return o().createElement($i,Object.assign({key:e.id,$isSelected:s.index===t,"aria-pressed":s.index===t,"aria-label":e.rating,$wasChoiceMade:"number"==typeof s.index,onClick:()=>{return n=t,r=e.rating,o=e.sentiment,void(s.index===n?h((0,gi.n_)()):h((0,gi.wm)({index:n,rating:r,sentiment:o})));var n,r,o}},n&&{autoFocus:!0}),o().createElement(Ci,{src:e.image,alt:e.rating}),e.show_rating&&o().createElement(Oi,null,e.rating))})));case"PREDEFINED_BUTTONS":return o().createElement(o().Fragment,null,o().createElement(Ti,{$isFullHeight:!!u},y.predefined_buttons.sentiments[O].title),o().createElement(Ii,null,y.predefined_buttons.sentiments[O].buttons.map((e,t)=>{var n,r;const a=0===t;return o().createElement(Mi,Object.assign({key:e.id,$isSelected:null===(n=s.buttons_chosen)||void 0===n?void 0:S()(n).call(n,e.text),"aria-pressed":null===(r=s.buttons_chosen)||void 0===r?void 0:S()(r).call(r,e.text),onClick:()=>{return t=e.text,void h((0,gi.m9)(t));var t}},a&&{autoFocus:!0}),e.text)})));case"FREEFORM_TEXT":return o().createElement(o().Fragment,null,o().createElement(Ti,{$isFullHeight:!!u,id:"feedback-freeform-title-1739894771"},y.free_form.title),o().createElement(Ri,{value:null!==(e=s.freeform_text)&&void 0!==e?e:"",onChange:e=>{return t=e.target.value,void h((0,gi.GY)(t));var t},placeholder:y.free_form.placeholder,"aria-labelledby":"feedback-freeform-title-1739894771",autoFocus:!0}));case"THANK_YOU":return o().createElement(Ui,null,o().createElement(Ti,{$isFullHeight:!!u},y.thanks_text),Wi&&o().createElement(Vi,{"aria-label":w,title:w,onClick:L,type:"button",$loading:!1},o().createElement(Gi,null,w)));default:return null}})(),"THANK_YOU"!==$?o().createElement(Pi,{$isFullHeight:u},C>0&&o().createElement(Fi,{onClick:()=>{yi(()=>{const e=T[C-1];e&&h((0,gi.zp)(e))})}},o().createElement(fi,{color:_}),y.back_button),o().createElement(Bi,null,T.slice(0,-1).map((e,t)=>o().createElement(Hi,{key:e,$isActive:C===t,$isDotBeforeOrEqualCurrentStep:C>=t}))),o().createElement(zi,{onClick:async()=>{yi(()=>{(async()=>{(0,Ce.tf)("submit-feedback",{value:{feedbackType:$,feedbackValue:s}},{storeState:m}),await h((0,mi.S)(s))})();const e=T[C+1];e&&(h((0,gi.zp)(e)),"THANK_YOU"!==e||Wi||setTimeout(()=>{p?(null==d||d("programmatic"),h((0,Ka.zn)(null))):I("programmatic"),h((0,gi.ot)())},4e3))})},disabled:"RATING_SCALE"===$&&"number"!=typeof s.index||"PREDEFINED_BUTTONS"===$&&!s.buttons_chosen.length},$===T[T.length-2]?o().createElement(o().Fragment,null,y.send_button,o().createElement(hi,{color:E})):o().createElement(o().Fragment,null,y.next_button,o().createElement(hi,{color:E})))):o().createElement(o().Fragment,null,u&&o().createElement(ii,{shouldAutoFocus:!0})))}const Ki=a.i7`
|
|
3099
2947
|
0% {
|
|
3100
2948
|
opacity: 0;
|
|
3101
2949
|
}
|
|
@@ -3118,7 +2966,7 @@
|
|
|
3118
2966
|
animation-delay: 50ms;
|
|
3119
2967
|
animation-name: ${Yi};
|
|
3120
2968
|
`,a.AH`
|
|
3121
|
-
${e=>e
|
|
2969
|
+
${e=>e.$fullHeight?"top: 0; height: 100%;":"top: 55px; height: calc(100% - 55px); border-bottom-right-radius: 6px; border-bottom-left-radius: 6px"};
|
|
3122
2970
|
`),Zi=a.Ay.div`
|
|
3123
2971
|
width: 100%;
|
|
3124
2972
|
overflow: hidden;
|
|
@@ -3203,7 +3051,7 @@
|
|
|
3203
3051
|
flex-direction: column;
|
|
3204
3052
|
align-items: center;
|
|
3205
3053
|
}
|
|
3206
|
-
`;function al(e){let{textContent:t}=e;const n=(0,c.wA)(),r=(0,c.Pj)().getState(),{chat_deleted_header:a,back_to_chat_button:i}=t,l=()=>{(0
|
|
3054
|
+
`;function al(e){let{textContent:t}=e;const n=(0,c.wA)(),r=(0,c.Pj)().getState(),{chat_deleted_header:a,back_to_chat_button:i}=t,l=()=>{(0,Ce.tf)("restart-chat",void 0,{storeState:r}),n((0,G.ky)(!0))};return o().createElement(nl,null,o().createElement(d.H3,null,a),o().createElement(xi.Ef,{"aria-label":i,title:i,onClick:l,onKeyUp:e=>{"Enter"===e.key&&l()},type:"button","data-testid":"back-to-chat-option",autoFocus:!0,$loading:!1},o().createElement(rl,null,i)))}const il=a.Ay.div`
|
|
3207
3055
|
max-width: 100%;
|
|
3208
3056
|
flex-direction: column;
|
|
3209
3057
|
display: flex;
|
|
@@ -3217,7 +3065,7 @@
|
|
|
3217
3065
|
margin-top: 0;
|
|
3218
3066
|
}
|
|
3219
3067
|
}
|
|
3220
|
-
`;function ll(e){let{textContent:t,onNavigateBack:n}=e;const r=(0,c.Pj)().getState(),a=(0,c.wA)(),{back_to_chat_button:l,delete_text:s,delete_button:u}=t;return o().createElement(o().Fragment,null,o().createElement(nl,null,o().createElement(d.H3,null,s)),o().createElement(il,null,o().createElement(ni.A,{style:i.Nz,"aria-label":u,title:u,onClick:()=>{(0
|
|
3068
|
+
`;function ll(e){let{textContent:t,onNavigateBack:n}=e;const r=(0,c.Pj)().getState(),a=(0,c.wA)(),{back_to_chat_button:l,delete_text:s,delete_button:u}=t;return o().createElement(o().Fragment,null,o().createElement(nl,null,o().createElement(d.H3,null,s)),o().createElement(il,null,o().createElement(ni.A,{style:i.Nz,"aria-label":u,title:u,onClick:()=>{(0,Ce.tf)("delete-chat",void 0,{storeState:r}),a((0,G._e)())},type:"button",text:u,cy:"confirm-delete-chat",autoFocus:!0}),o().createElement(Ji,{"aria-label":l,title:l,onClick:()=>n(),onKeyUp:e=>{"Enter"===e.key&&n()},type:"button",tabIndex:0},"‹ ",l)))}const sl=a.Ay.div`
|
|
3221
3069
|
height: 100%;
|
|
3222
3070
|
display: flex;
|
|
3223
3071
|
flex-direction: column;
|
|
@@ -3239,9 +3087,9 @@
|
|
|
3239
3087
|
font-size: var(--_kindlychat-font-size-m);
|
|
3240
3088
|
margin: 0 0 10px;
|
|
3241
3089
|
line-height: 24px;
|
|
3242
|
-
`;function dl(e){let{textContent:t,onNavigateBack:n}=e;const r=(0,c.Pj)().getState(),a=(0,c.wA)(),{back_to_chat_button:i,download_button:l,download_format_text:s}=t,u=e=>{(0
|
|
3090
|
+
`;function dl(e){let{textContent:t,onNavigateBack:n}=e;const r=(0,c.Pj)().getState(),a=(0,c.wA)(),{back_to_chat_button:i,download_button:l,download_format_text:s}=t,u=e=>{(0,Ce.tf)("download-chat",void 0,{storeState:r}),a((0,G.VK)({},e))};return o().createElement(o().Fragment,null,o().createElement(nl,null,o().createElement(ul,null,s)),o().createElement(sl,null,o().createElement(cl,null,o().createElement(xi.Ef,{"aria-label":`${l} (HTML)`,title:`${l} (HTML)`,onClick:()=>u("html"),type:"button","data-testid":"download-chat-html",autoFocus:!0,$isSecondaryButton:!0,$loading:!1},o().createElement(rl,null,`${l} (HTML)`)),o().createElement(xi.Ef,{"aria-label":`${l} (JSON)`,title:`${l} (JSON)`,onClick:()=>u("json"),type:"button","data-testid":"download-chat-json",$isSecondaryButton:!0,$loading:!1},o().createElement(rl,null,`${l} (JSON)`))),o().createElement(Ji,{"aria-label":i,title:i,onClick:n,onKeyUp:e=>{"Enter"===e.key&&n()},type:"button",tabIndex:0},"‹ ",i)))}const pl=a.Ay.div`
|
|
3243
3091
|
width: 100%;
|
|
3244
|
-
height: ${e=>e
|
|
3092
|
+
height: ${e=>e.$long?"180px":"210px"};
|
|
3245
3093
|
background: ${e=>e.theme.headerBackground};
|
|
3246
3094
|
background-color: ${e=>e.theme.headerBackground};
|
|
3247
3095
|
|
|
@@ -3267,7 +3115,7 @@
|
|
|
3267
3115
|
vertical-align: middle;
|
|
3268
3116
|
}
|
|
3269
3117
|
}
|
|
3270
|
-
`;function hl(){const{supportedLanguages:e}=(0,pe.A)(),t=(0,c.wA)(),n=(0,c.Pj)().getState(),r=e.length>1,{back_to_chat_button:a,change_language_button:i,download_button:l,delete_button:s,start_over_button:u}=(0,dr.A)(),d=e=>()=>{t((0,G.wQ)(e))};return o().createElement(o().Fragment,null,o().createElement(pl,{long:r}),o().createElement(fl,null,r&&o().createElement(xi.Ef,{"aria-label":i,title:i,onClick:d("SELECT_LANGUAGE"),type:"button","data-testid":"change-language-option"
|
|
3118
|
+
`;function hl(){const{supportedLanguages:e}=(0,pe.A)(),t=(0,c.wA)(),n=(0,c.Pj)().getState(),r=e.length>1,{back_to_chat_button:a,change_language_button:i,download_button:l,delete_button:s,start_over_button:u}=(0,dr.A)(),d=e=>()=>{t((0,G.wQ)(e))};return o().createElement(o().Fragment,null,o().createElement(pl,{$long:r}),o().createElement(fl,null,r&&o().createElement(xi.Ef,{"aria-label":i,title:i,onClick:d("SELECT_LANGUAGE"),type:"button","data-testid":"change-language-option",$isSecondaryButton:!0,autoFocus:r},o().createElement(rl,null,o().createElement(Oe.U,{width:16,height:16,crop:!0}),i)),o().createElement(xi.Ef,{"aria-label":u,title:u,onClick:()=>{(0,Ce.tf)("restart-chat",void 0,{storeState:n}),t((0,G.ky)(!0))},type:"button","data-testid":"restart-chat-option",$isSecondaryButton:!0,autoFocus:!r},o().createElement(rl,null,u)),o().createElement(xi.Ef,{"aria-label":s,title:s,onClick:d("DELETE_CHAT_CONFIRMATION"),type:"button","data-testid":"delete-chat-option",$isSecondaryButton:!0},o().createElement(rl,null,s)),o().createElement(xi.Ef,{"aria-label":l,title:l,onClick:d("SELECT_DOWNLOAD"),type:"button","data-testid":"download-chat-option",$isSecondaryButton:!0},o().createElement(rl,null,l)),o().createElement(xi.Ef,{"aria-label":a,title:a,onClick:()=>{t((0,G.eG)())},type:"button","data-testid":"back-to-chat-option"},o().createElement(rl,null,a))))}const ml=a.Ay.fieldset`
|
|
3271
3119
|
border: none;
|
|
3272
3120
|
background-color: transparent;
|
|
3273
3121
|
height: 100%;
|
|
@@ -3307,7 +3155,7 @@
|
|
|
3307
3155
|
display: inline-block;
|
|
3308
3156
|
vertical-align: middle;
|
|
3309
3157
|
}
|
|
3310
|
-
`;function yl(e){let{onNavigateBack:t}=e;const{back_to_chat_button:n,change_language_button:a,confirm_action_button:l}=(0,dr.A)(),{currentLanguageCode:s,supportedLanguages:u}=(0,pe.A)(),[d,p]=(0,r.useState)(s),f=u.find(e=>{let{code:t}=e;return t===s}),h=u.find(e=>{let{code:t}=e;return t===d}),m=(0,c.Pj)().getState(),g=(0,c.wA)();return o().createElement(o().Fragment,null,o().createElement(nl,null,o().createElement(vl,null,o().createElement(Oe.U,{width:50,height:50}),a)),o().createElement(ml,null,o().createElement(gl,null,u.map((e,t)=>{const n=0===t;return o().createElement(ni.A,{key:e.code,"aria-label":e.name_local,title:e.name_local,onClick:()=>p(e.code),text:e.name_local,"aria-checked":e.code===d,selected:e.code===d,role:"radio",cy:`${e.code}-button`,autoFocus:n,isSecondaryButton:!0})})),o().createElement(bl,null,d!==s&&o().createElement(ni.A,{style:i.Nz,"aria-label":l,title:l,onClick:()=>{(0
|
|
3158
|
+
`;function yl(e){let{onNavigateBack:t}=e;const{back_to_chat_button:n,change_language_button:a,confirm_action_button:l}=(0,dr.A)(),{currentLanguageCode:s,supportedLanguages:u}=(0,pe.A)(),[d,p]=(0,r.useState)(s),f=u.find(e=>{let{code:t}=e;return t===s}),h=u.find(e=>{let{code:t}=e;return t===d}),m=(0,c.Pj)().getState(),g=(0,c.wA)();return o().createElement(o().Fragment,null,o().createElement(nl,null,o().createElement(vl,null,o().createElement(Oe.U,{width:50,height:50}),a)),o().createElement(ml,null,o().createElement(gl,null,u.map((e,t)=>{const n=0===t;return o().createElement(ni.A,{key:e.code,"aria-label":e.name_local,title:e.name_local,onClick:()=>p(e.code),text:e.name_local,"aria-checked":e.code===d,selected:e.code===d,role:"radio",cy:`${e.code}-button`,autoFocus:n,isSecondaryButton:!0})})),o().createElement(bl,null,d!==s&&o().createElement(ni.A,{style:i.Nz,"aria-label":l,title:l,onClick:()=>{(0,Ce.tf)("change-language",{value:{languageCode:d,languageName:(null==h?void 0:h.name_english)||d,previousLanguageCode:s,previousLanguageName:(null==f?void 0:f.name_english)||s}},{storeState:m}),g((0,G.L4)(d,{skipRestart:!0})),t()},type:"submit",text:l}),o().createElement(Ji,{"aria-label":n,title:n,onClick:t,onKeyUp:e=>{"Enter"===e.key&&t()},tabIndex:0,type:"button"},"‹ ",n))))}var xl=n(4935);const wl=a.Ay.div`
|
|
3311
3159
|
position: relative;
|
|
3312
3160
|
width: fit-content;
|
|
3313
3161
|
|
|
@@ -3354,7 +3202,7 @@
|
|
|
3354
3202
|
`,Tl=a.AH`
|
|
3355
3203
|
background-size: cover;
|
|
3356
3204
|
background-position: center;
|
|
3357
|
-
background-image: url(${e=>e
|
|
3205
|
+
background-image: url(${e=>e.$welcomePageImage});
|
|
3358
3206
|
`,Sl=a.Ay.div`
|
|
3359
3207
|
flex: 1;
|
|
3360
3208
|
height: 100%;
|
|
@@ -3362,8 +3210,8 @@
|
|
|
3362
3210
|
padding: 18px 18px 0;
|
|
3363
3211
|
background: ${e=>e.theme.headerBackground};
|
|
3364
3212
|
background-color: ${e=>e.theme.headerBackground};
|
|
3365
|
-
${e=>e
|
|
3366
|
-
|
|
3213
|
+
${e=>e.$welcomePageImage&&Tl};
|
|
3214
|
+
`,$l=a.Ay.div`
|
|
3367
3215
|
flex: 1;
|
|
3368
3216
|
padding: 15px 30px 30px;
|
|
3369
3217
|
border-top: 5px solid ${e=>e.theme.headerBackground};
|
|
@@ -3371,7 +3219,7 @@
|
|
|
3371
3219
|
@media ${i.jO.maxTablet} {
|
|
3372
3220
|
padding: 30px;
|
|
3373
3221
|
}
|
|
3374
|
-
|
|
3222
|
+
`,Cl=a.Ay.div`
|
|
3375
3223
|
height: 100%;
|
|
3376
3224
|
display: flex;
|
|
3377
3225
|
flex-direction: column;
|
|
@@ -3432,7 +3280,7 @@
|
|
|
3432
3280
|
strong {
|
|
3433
3281
|
font-weight: 500;
|
|
3434
3282
|
}
|
|
3435
|
-
`,Nl=(e,t)=>({header:(0,qo.A)(e.header,t),text:(0,qo.A)(e.text,t),start_button:(0,qo.A)(e.start_button,t)});function Rl(){const{fullscreenMode:e}=window.__KINDLY_SETTINGS__,t=(0,xa.jL)(),n=(0,c.Pj)().getState(),[a,l]=(0,r.useState)(!1),{currentLanguageCode:s,supportedLanguages:d}=(0,pe.A)(),{welcomePage:p,welcomePageType:f,isTextDirectionRtl:h}=(0,xa.GV)(u.Od),{active:m}=(0,xa.GV)(e=>{let{chatbubble:t}=e;return t}),{labels:g}=(0,xa.GV)(e=>{let{local:t}=e;return t}),b=!e,v=h?"rtl":void 0,y=(0,r.useCallback)(e=>{e&&m&&setTimeout(()=>{e.focus()},0)},[m]),x=p?Nl(p,s):{header:"",text:"",start_button:""};return o().createElement(Al,null,o().createElement(Sl,{welcomePageImage:"PICTURE"===f&&p.image},b&&o().createElement(Wa.I$,{"aria-label":"Close chat",title:"Close chat",type:"button",onClick:()=>{t((0,G.Rh)())},"data-testid":"close-chat-button"},o().createElement(Oe.US,{width:25,height:25}))),o().createElement(
|
|
3283
|
+
`,Nl=(e,t)=>({header:(0,qo.A)(e.header,t),text:(0,qo.A)(e.text,t),start_button:(0,qo.A)(e.start_button,t)});function Rl(){const{fullscreenMode:e}=window.__KINDLY_SETTINGS__,t=(0,xa.jL)(),n=(0,c.Pj)().getState(),[a,l]=(0,r.useState)(!1),{currentLanguageCode:s,supportedLanguages:d}=(0,pe.A)(),{welcomePage:p,welcomePageType:f,isTextDirectionRtl:h}=(0,xa.GV)(u.Od),{active:m}=(0,xa.GV)(e=>{let{chatbubble:t}=e;return t}),{labels:g}=(0,xa.GV)(e=>{let{local:t}=e;return t}),b=!e,v=h?"rtl":void 0,y=(0,r.useCallback)(e=>{e&&m&&setTimeout(()=>{e.focus()},0)},[m]),x=p?Nl(p,s):{header:"",text:"",start_button:""};return o().createElement(Al,null,o().createElement(Sl,{$welcomePageImage:"PICTURE"===f&&p.image},b&&o().createElement(Wa.I$,{"aria-label":"Close chat",title:"Close chat",type:"button",onClick:()=>{t((0,G.Rh)())},"data-testid":"close-chat-button"},o().createElement(Oe.US,{width:25,height:25}))),o().createElement($l,null,o().createElement(Cl,{dir:v},o().createElement("div",null,d.length>1&&o().createElement(_l,{icon:!0,name:"language-select","data-testid":"language-select",value:s,onChange:e=>{return n=e.target.value,void t((0,G.L4)(n));var n},"aria-label":"Select a language"},d.map(e=>o().createElement("option",{key:e.code,label:e.name_local,value:e.code},e.name_local))),o().createElement(Ol,null,o().createElement(Ll,null,x.header),o().createElement(Ml,null,Wn(x.text)))),o().createElement(Il,null,o().createElement(ni.A,{style:i.Nz,cy:"start-chat-button",type:"button",title:x.start_button||"Start chat",onClick:()=>{l(!0),(0,Ce.tf)("welcome-page-start-chat",void 0,{storeState:n}),t((0,G.L4)(s,{skipRestart:g.length>0})),t((0,G.mN)())},loading:a,ref:y},x.start_button||"Start chat")))))}function Pl(e){var t,n;let{endChat:r,feedbackToSubmit:a}=e;const i=(0,c.wA)(),{hideHeader:l}=(0,c.d4)(u.Od),{whitelabelEnabled:s}=(0,c.d4)(u.Od),d=(0,dr.A)(),{overlayViews:p}=(0,c.d4)(u.$P),f=p[p.length-1],h=l||"WELCOME_PAGE"===f,m=()=>{i((0,G.i1)())};return o().createElement(Zi,{$fullHeight:h},"WELCOME_PAGE"===f&&o().createElement(Rl,null),S()(t=["GENERIC","SELECT_DOWNLOAD","SELECT_LANGUAGE","DELETED_CHAT","DELETE_CHAT_CONFIRMATION"]).call(t,f)&&o().createElement(Qi,null,S()(n=["GENERIC","SELECT_DOWNLOAD","SELECT_LANGUAGE"]).call(n,f)?o().createElement(el,null,"GENERIC"===f&&o().createElement(hl,null),"SELECT_DOWNLOAD"===f&&o().createElement(dl,{textContent:d,onNavigateBack:m}),"SELECT_LANGUAGE"===f&&o().createElement(yl,{onNavigateBack:m})):o().createElement(tl,null,"DELETE_CHAT_CONFIRMATION"===f&&o().createElement(ll,{onNavigateBack:m,textContent:d}),"DELETED_CHAT"===f&&o().createElement(al,{textContent:d})),o().createElement(ol,null,!s&&o().createElement(ii,null))),"CANCEL_CHAT"===f&&o().createElement(pi,{endChat:r}),"FEEDBACK"===f&&a&&o().createElement(qi,{isFullHeight:!0,shouldEndChat:!0,feedbackToSubmit:a,endChat:r}),"ABOUT_CHAT"===f&&o().createElement(ti,null))}const Dl=a.Ay.div`
|
|
3436
3284
|
display: flex;
|
|
3437
3285
|
flex-direction: column;
|
|
3438
3286
|
align-items: center;
|
|
@@ -3496,7 +3344,7 @@
|
|
|
3496
3344
|
}
|
|
3497
3345
|
`,Hl=a.Ay.input`
|
|
3498
3346
|
${ie.hF}
|
|
3499
|
-
`,Ul=Object.freeze({EMAIL:"email",PHONE:"phone_number"});function Vl(e,t){const n=(0,c.wA)(),{contactDetailsButton:l,currentModal:s}=(0,c.d4)(u.$P),[d,p]=(0,r.useState)(""),[f,h]=(0,r.useState)(!1),m=(0,r.useRef)(),g=(0,a.DP)(),b=l.contact_details.contact_type,{label:v,placeholder:y}=l.contact_details,x=(0,r.useMemo)(()=>(0,he.w5)(g.background,i.Tj.grayColor,i.Tj.darkColor),[g.background]),w=()=>{n((0,G.V$)())};return o().createElement(Dl,{ref:t,inert:s?"":void 0},o().createElement("span",null),o().createElement(jl,{hasSubmitted:f},o().createElement(zl,null,b&&o().createElement(Fl,{"aria-label":"Cancel entering details",title:"Cancel entering details",type:"button",onClick:w,"data-testid":"minimize-chat-button","data-cy":"minimize-chat-button",mobileOnly:!0},o().createElement(Oe.US,{width:25,height:12,color:x})),v),o().createElement(Bl,null,o().createElement(ie.A0,null,o().createElement(Hl,{onChange:e=>{p(e.target.value)},value:d,type:b===Ul.EMAIL?"email":"tel",ref:m,placeholder:y,required:!0})),o().createElement(
|
|
3347
|
+
`,Ul=Object.freeze({EMAIL:"email",PHONE:"phone_number"});function Vl(e,t){const n=(0,c.wA)(),{contactDetailsButton:l,currentModal:s}=(0,c.d4)(u.$P),[d,p]=(0,r.useState)(""),[f,h]=(0,r.useState)(!1),m=(0,r.useRef)(),g=(0,a.DP)(),b=l.contact_details.contact_type,{label:v,placeholder:y}=l.contact_details,x=(0,r.useMemo)(()=>(0,he.w5)(g.background,i.Tj.grayColor,i.Tj.darkColor),[g.background]),w=()=>{n((0,G.V$)())};return o().createElement(Dl,{ref:t,inert:s?"":void 0},o().createElement("span",null),o().createElement(jl,{hasSubmitted:f},o().createElement(zl,null,b&&o().createElement(Fl,{"aria-label":"Cancel entering details",title:"Cancel entering details",type:"button",onClick:w,"data-testid":"minimize-chat-button","data-cy":"minimize-chat-button",mobileOnly:!0},o().createElement(Oe.US,{width:25,height:12,color:x})),v),o().createElement(Bl,null,o().createElement(ie.A0,null,o().createElement(Hl,{onChange:e=>{p(e.target.value)},value:d,type:b===Ul.EMAIL?"email":"tel",ref:m,placeholder:y,required:!0})),o().createElement($a,{onClick:e=>{var t,r;return h(!0),!(null==m||null===(t=m.current)||void 0===t||null===(r=t.validity)||void 0===r||!r.valid||(e.preventDefault(),n((0,G.j3)(l,d)),w(),1))},type:"submit",$active:!0,title:"Send your "+(b===Ul.EMAIL?"email address":"phone number"),"data-testid":"send-contact-details-button"},o().createElement(Oe.qx,{width:24,height:24})))))}const Gl=(0,r.forwardRef)(Vl);var Wl=n(7498);const ql=a.Ay.div`
|
|
3500
3348
|
left: 0;
|
|
3501
3349
|
right: 0;
|
|
3502
3350
|
top: ${Wa.$A}px;
|
|
@@ -3602,18 +3450,11 @@
|
|
|
3602
3450
|
right: 0;
|
|
3603
3451
|
top: 0;
|
|
3604
3452
|
|
|
3605
|
-
${e=>{const t=e
|
|
3453
|
+
${e=>{const t=e.$quantity-1===e.$index;return`\n transition:\n top 150ms ease,\n scale 200ms ease ${t?0:100}ms,\n ${!t&&"max-height 100ms ease 100ms"};\n top: ${8*e.$index+(e.$hasTopMargin?0:55)}px;\n scale: ${1-.05*(e.$quantity-1-e.$index)};\n ${!t&&"\n max-height: 10px;\n overflow: hidden;\n "}\n `}};
|
|
3606
3454
|
|
|
3607
3455
|
${cs};
|
|
3608
3456
|
|
|
3609
|
-
/* inert "polyfill" */
|
|
3610
3457
|
&[inert] {
|
|
3611
|
-
pointer-events: none;
|
|
3612
|
-
cursor: default;
|
|
3613
|
-
}
|
|
3614
|
-
|
|
3615
|
-
&[inert],
|
|
3616
|
-
&[inert] * {
|
|
3617
3458
|
user-select: none;
|
|
3618
3459
|
}
|
|
3619
3460
|
`,ds=a.Ay.div`
|
|
@@ -3673,11 +3514,11 @@
|
|
|
3673
3514
|
svg {
|
|
3674
3515
|
vertical-align: sub;
|
|
3675
3516
|
}
|
|
3676
|
-
`,bs=function(e){let{children:t,href:n,fallback:r,...a}=e;const i=(l=(0,c.wA)(),{"#settings/language-select":{icon:o().createElement(Oe.Ze,{width:16,height:16}),onClick:()=>{l((0,G.wQ)("SELECT_LANGUAGE")),l((0,G.Fe)(s.Jm.LANGUAGE_SWITCH))}}})[n];var l;return i?o().createElement(gs,Object.assign({},a,{onClick:i.onClick}),i.icon," ",t):r||null},vs={language:Oe.U};function ys(){const{chatHasStarted:e,overlayViews:t}=(0,c.d4)(u.$P),n=ls(e?0:ms),{notifications:r}=(0,c.d4)(u.Hk),a=t.length>0,i=r.filter(e=>!e.dismissed).slice(-3),l=(0,c.wA)(),s=a,d=e=>t=>{t.stopPropagation(),l((0,G.Fe)(e))};if(null==i||!i.length)return null;const p=i.length;return n(()=>o().createElement(o().Fragment,null,i.map((e,t)=>{let{id:n,content:r,buttonHref:a,buttonText:i,icon:l}=e;const c=t===p-1,u=c?void 0:-1,f=vs[l];return o().createElement(us,{"aria-live":c?"polite":void 0,"aria-atomic":c?"true":void 0,"aria-hidden":c?void 0:"true",inert:c?void 0:"
|
|
3517
|
+
`,bs=function(e){let{children:t,href:n,fallback:r,...a}=e;const i=(l=(0,c.wA)(),{"#settings/language-select":{icon:o().createElement(Oe.Ze,{width:16,height:16}),onClick:()=>{l((0,G.wQ)("SELECT_LANGUAGE")),l((0,G.Fe)(s.Jm.LANGUAGE_SWITCH))}}})[n];var l;return i?o().createElement(gs,Object.assign({},a,{onClick:i.onClick}),i.icon," ",t):r||null},vs={language:Oe.U};function ys(){const{chatHasStarted:e,overlayViews:t}=(0,c.d4)(u.$P),n=ls(e?0:ms),{notifications:r}=(0,c.d4)(u.Hk),a=t.length>0,i=r.filter(e=>!e.dismissed).slice(-3),l=(0,c.wA)(),s=a,d=e=>t=>{t.stopPropagation(),l((0,G.Fe)(e))};if(null==i||!i.length)return null;const p=i.length;return n(()=>o().createElement(o().Fragment,null,i.map((e,t)=>{let{id:n,content:r,buttonHref:a,buttonText:i,icon:l}=e;const c=t===p-1,u=c?void 0:-1,f=vs[l];return o().createElement(us,{"aria-live":c?"polite":void 0,"aria-atomic":c?"true":void 0,"aria-hidden":c?void 0:"true",inert:c?void 0:"",role:c?"alert":void 0,tabIndex:u,$hasTopMargin:s,$index:t,$quantity:p,key:n},f&&o().createElement(ds,null,o().createElement(f,{width:24,height:24})),o().createElement(ps,null,function(e){if(!e)return null;const t=[];let n=0;function r(e){e.length>0&&(t.push(o().createElement("span",{key:n},e)),n+=e.length)}const a=/\[([^\\\]]+(?:\\.[^\\\]]*)*)\]\(([^)]+)\)/g;let i=a.exec(e);for(;null!==i;){const l=i[1],s=i[2];r(e.substring(n,i.index)),t.push(o().createElement(bs,{key:n+i.index,href:s,fallback:`[${l}](${s})`},l)),n=i.index+i[0].length,i=a.exec(e)}return r(e.substring(n)),t}(r),a&&i&&o().createElement(fs,{href:a,tabIndex:u,isSecondaryButton:!0},i)),o().createElement(hs,{"aria-label":"Dismiss notification",title:"Dismiss notification",onClick:d(n),disabled:!c,type:"button"},o().createElement(Oe.WI,null)))})))}var xs=n(5353);const ws=(e,t)=>{let{botId:n,currentLanguage:r,chatId:o}=t;return e.from_bot||e.sender||!e.id.startsWith("tempId-")?e:{botId:n,chatId:o,chat_source:(0,q.A)()?s.Je.WEB_MOBILE:s.Je.WEB,currentLanguage:r,from_bot:!1,sender:s.bS.USER,...(0,Jr.A)("buttonType","buttons")(e)}},{focusTrapOnFullView:Es}=window.__KINDLY_SETTINGS__,ks=["SCRIPT","STYLE","LINK","META"],_s=()=>{var e;const t=Array.from(document.body.children),n=window.document.getElementById(null===(e=window.kindlyChat)||void 0===e?void 0:e.API_NODE_ID);n&&t.forEach(e=>{e.contains(n)||S()(ks).call(ks,e.tagName)||e.hasAttribute("inert")||(e.setAttribute("inert",""),e.setAttribute("data-kindly-inert",""))})},As=()=>{document.querySelectorAll("[data-kindly-inert]").forEach(e=>{e.removeAttribute("inert"),e.removeAttribute("data-kindly-inert")})};function Ts(e){let{color:t="#0D0D0D"}=e;return o().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},o().createElement("path",{d:"M15.75 8.75L19.25 12L15.75 15.25",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M19 12H10.75",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M15.25 4.75H6.75C5.64543 4.75 4.75 5.64543 4.75 6.75V17.25C4.75 18.3546 5.64543 19.25 6.75 19.25H15.25",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))}const Ss=(0,a.Ay)(Ei)`
|
|
3677
3518
|
display: flex;
|
|
3678
3519
|
gap: 24px;
|
|
3679
3520
|
flex-direction: column;
|
|
3680
|
-
|
|
3521
|
+
`,$s=a.Ay.div`
|
|
3681
3522
|
display: flex;
|
|
3682
3523
|
gap: 8px;
|
|
3683
3524
|
flex-direction: column;
|
|
@@ -3686,7 +3527,7 @@
|
|
|
3686
3527
|
> p {
|
|
3687
3528
|
margin: 0;
|
|
3688
3529
|
}
|
|
3689
|
-
|
|
3530
|
+
`,Cs=a.Ay.h3`
|
|
3690
3531
|
margin: 0;
|
|
3691
3532
|
display: flex;
|
|
3692
3533
|
gap: 4px;
|
|
@@ -3700,76 +3541,228 @@
|
|
|
3700
3541
|
> button {
|
|
3701
3542
|
flex: 1;
|
|
3702
3543
|
}
|
|
3703
|
-
`;function Is(e){let{handleCancel:t,handleEndHumanChat:n,descriptionText:r,titleText:a,cancelButtonText:i,confirmButtonText:l}=e;return o().createElement(Ss,null,o().createElement(Cs,null,o().createElement($s,null,o().createElement(Ts,{color:"var(--panel-background-white-black-contrast-1743170834)"}),a),o().createElement("p",null,r)),o().createElement(Os,null,o().createElement(ni.A,{isSecondaryButton:!0,onClick:t},i),o().createElement(ni.A,{onClick:n},l)))}const Ls=e=>{const t=(0,V.A)(e),n=(e||[]).length;return(0,r.useMemo)(()=>n&&n!==(t||[]).length&&e[n-1],[e,n,t])};function Ms(e){var t;let{buttonHandlers:n,onMessage:a=null}=e;const i=(0,c.Pj)(),l=(0,xa.jL)(),s=(0,r.useRef)(null),d=(0,r.useRef)(null),p=(0,r.useRef)(null),{hideHeader:f,fullscreenMode:h,offsetHeight:m,id:g}=(0,xa.GV)(u.Od),{active:b,chatHasStarted:v,currentlyPoppedUp:y,contactDetailsButton:x,currentLanguage:w,currentModal:E,overlayViews:k,isChatFullWindow:_}=(0,xa.GV)(e=>{let{chatbubble:t}=e;return t}),{chatMessages:A}=(0,xa.GV)(e=>{let{messages:t}=e;return t}),{takenOver:T}=(0,xa.GV)(e=>{let{agent:t}=e;return t}),{feedbackToSubmit:C,feedbacksAlreadyDisplayed:$}=(0,xa.GV)(gi.CJ),O=Ls(A),{cancel_button:I,user_end_handover_button_text:L,user_end_handover_modal_title_text:M,user_end_handover_modal_description_text:N}=(0,dr.A)(),[R,P]=(0,r.useState)(!0);(0,r.useEffect)(()=>{if(R)return void P(!1);if(!O)return;const e=i.getState(),{chatMessages:t,attachments:n}=e.messages,{chatId:r,renderedBy:o}=e.chatbubble,{token:l}=e.connection,{PAT_HOST:s}=e.environment,c=t.map(e=>(0,xs.A)(e,n,s,l)),u=(0,xs.A)(O,n,s,l);(0,$e.GJ)(ws(u,{botId:g,currentLanguage:w,chatId:r}),c,a,o)},[R,a,O,g,i,A.length]);const D=A.length>=3,j=k[k.length-1],{botConversationFeedback:F,handoverConversationFeedback:z}=(0,Ga.A)(w),B=null===(t=null==F?void 0:F.allow_bot_feedback_after_handover_feedback)||void 0===t||t,H=F&&!S()($).call($,"bot_conversation")&&(!S()($).call($,"handover_conversation")||B),U=z&&T?z:H?F:null,V=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"user";U&&"CANCEL_CHAT"===j&&D?(l((0,gi.WG)({ratingSystem:U.rating_scale.rating_system,triggerType:U.trigger_type,formTitle:U.form_title,step:"RATING_SCALE"})),l((0,G.wQ)("FEEDBACK"))):((0,$e.tf)("end-chat",void 0,{storeState:i.getState(),source:e}),l((0,G.ky)(h)),l((0,G.zn)(null)))};return function(e){const{isChatFullWindow:t,renderedBy:n}=(0,c.d4)(u.$P),o=(0,r.useRef)();(0,r.useEffect)(()=>{if(e.current&&Es&&"API"===n)return o.current!==t&&(o.current=t,t?_s():As()),As},[e,t])}(p),o().createElement(oe,{"aria-live":"polite","data-cy":"chat-box","data-testid":"chat-box",ref:p,$active:b,$chatHasStarted:v,$fullscreen:!!h,$isChatFullWindow:_,$offsetHeight:m},o().createElement(Wl.A,{errorPoint:"inside ChatBoxContainer"},!f&&o().createElement(qa,{handleXButtonClick:()=>{"CANCEL_CHAT"!==j&&"FEEDBACK"!==j?l((0,G.wQ)("CANCEL_CHAT")):V()},settingsButtonRef:d}),!!j&&o().createElement(Pl,{endChat:V,feedbackToSubmit:C}),o().createElement(ue,null),o().createElement(is,null),o().createElement(ys,null),o().createElement(fa,{bodyRef:s,buttonHandlers:n,inert:!!j||!!E}),x?o().createElement(Gl,null):o().createElement(Ua,{active:b,chatHasStarted:v,currentlyPoppedUp:y,bodyRef:s,inert:!!j||!!E}),"END_HANDOVER"===E&&o().createElement(Is,{handleCancel:()=>l((0,G.zn)(null)),handleEndHumanChat:async()=>{await l((0,G.m8)()),l((0,G.zn)(null))},titleText:null!=M?M:"",descriptionText:null!=N?N:"",cancelButtonText:null!=I?I:"",confirmButtonText:null!=L?L:""}),"handover_conversation"===(null==C?void 0:C.trigger_type)&&"FEEDBACK_END_HANDOVER"===E&&o().createElement(qi,{feedbackToSubmit:C})))}Ms.displayName="KindlyChatBox";var Ns=n(9308);const Rs=(e,t)=>Object.entries(e).filter(e=>{let[t,n]=e;return"object"==typeof n}).reduce((e,n)=>{let[r,o]=n;return{...e,[r]:(0,qo.A)(o,t)}},{}),Ps=Object.freeze({en:e=>`New message from ${e}`,nb:e=>`Ny melding fra ${e}`,sv:e=>`Nytt meddelande från ${e}`}),Ds=Object.freeze({en:"An agent joined the conversation",nb:"En agent ble med i samtalen",sv:"En agent gick med i samtalet"});let js=!1;function Fs(e){const t=document.title;let n;n||js||(js=!0,n=setInterval(()=>{document.title=document.title===e?t:e},1e3),window.addEventListener("mousemove",function e(){clearInterval(n),document.title=t,n=null,js=!1,window.removeEventListener("mousemove",e)}))}var zs=n(6079);const Bs=()=>{const{takenOver:e,requestedHandoverAt:t}=(0,c.d4)(u.MA),n=(0,V.A)(e),o=(0,V.A)(t),a=(0,c.wA)(),i=Boolean(t),l=Boolean(o);(0,r.useEffect)(()=>{e&&!n?a((0,zs.f2)()):!e&&n&&(0,zs.yh)(),i&&!l?a((0,zs.Mk)()):!i&&l&&(0,zs.Zk)()},[a,l,n,i,e])};var Hs=n(4703),Us=n(4499),Vs=n(7811);const Gs=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(e).reduce((e,t)=>{let[n,r]=t;return{...e,[(0,Vs.A)(n)]:r}},{})};function Ws(e){let{settings:t}=e;const n=(0,xa.jL)(),{currentLanguageCode:a}=(0,pe.A)(),{inspectorOpen:i}=(0,xa.GV)(e=>{let{inspector:t}=e;return t}),{chatMessages:d}=(0,xa.GV)(e=>{let{messages:t}=e;return t}),p=(0,r.useRef)(null),f=(0,V.A)(d),h=localStorage.getItem("kindly-chat-restart-message"),m=(0,Us.A)(t,"zIndex",s.DP);(0,r.useEffect)(()=>{if(0===(null==f?void 0:f.length)&&1===(null==d?void 0:d.length)&&h){const{message:e,exchangeId:t,newContext:r}=JSON.parse(h);localStorage.removeItem("kindly-chat-restart-message"),n((0,Hs.y2)(e,t,r))}},[n,d,f,h]),function(){const{tabNotification:e,name:t}=(0,c.d4)(u.Od),{showTabNotification:n}=(0,c.d4)(u.Cv),{currentLanguageCode:o}=(0,pe.A)(),{takenOver:a}=(0,c.d4)(u.MA),{agent:i}=(0,c.d4)(u.zD),l=(0,V.A)(a);(0,r.useEffect)(()=>{var r;e&&n&&Fs((null!==(r=null==Ps?void 0:Ps[o])&&void 0!==r?r:Ps.en)(t||"Kindly"))},[o,e,n,t]),(0,r.useEffect)(()=>{const e=Boolean(null==i?void 0:i.name);var t;l!==a&&a&&e&&Fs(null!==(t=null==Ds?void 0:Ds[o])&&void 0!==t?t:Ds.en)},[a,i,l,o])}(),function(){const e=(0,c.wA)(),{currentLanguage:t,active:n}=(0,c.d4)(u.$P),{maintenanceAlertEnabled:o,maintenanceAlert:a}=(0,c.d4)(u.Od);(0,r.useEffect)(()=>{if(!n||!o)return;const{text_content:r,link_location:i,link_text:l}=Rs(a,t);e((0,G.cC)({content:r,buttonText:l,buttonHref:i,once:!0},s.Jm.MAINTENANCE))},[n,t,e,a,o])}(),Bs(),function(e){const t=(0,c.wA)(),n=(0,r.useRef)(!1);(0,r.useEffect)(()=>{const r=e.current;if(!r)return;const o=document.body||document.documentElement,a=()=>{const e=function(e){if(!e)return!1;const{width:t,height:n}=e.getBoundingClientRect();return t===window.innerWidth&&n===window.innerHeight}(r);e!==n.current&&(n.current=e,(e=>{t((0,Ka.w7)(e)),e?o.classList.add("kindly-overflow-hidden"):o.classList.remove("kindly-overflow-hidden")})(e))};setTimeout(()=>a(),Ns.X+10);const i=new ResizeObserver(a);return i.observe(r),()=>{t((0,Ka.w7)(!1)),o.classList.remove("kindly-overflow-hidden"),i.disconnect()}},[t,e])}(p),function(e){const t=(0,r.useCallback)(t=>{e&&"Tab"===t.key&&e.current.classList.add("using-tab")},[e]),n=(0,r.useCallback)(()=>{e&&e.current.classList.remove("using-tab")},[e]);(0,r.useEffect)(()=>(document.body.addEventListener("keyup",t),document.body.addEventListener("mousedown",n),()=>{document.body.removeEventListener("keyup",t),document.body.removeEventListener("mousedown",n)}),[t,n])}(p),function(){const e=(0,xa.jL)(),{chatHasStarted:t}=(0,xa.GV)(e=>{let{chatbubble:t}=e;return t}),{welcomePageType:n}=(0,xa.GV)(u.Od);(0,r.useEffect)(()=>{!t&&n!==s.Lb.NONE&&e((0,G.wQ)("WELCOME_PAGE"))},[t,n,e])}();const g=(0,r.useMemo)(()=>Gs(t.buttonHandlers),[t.buttonHandlers]);return o().createElement(l,{id:"chatContainer",ref:p,className:"chat-container",role:"complementary",zIndex:m,"data-testid":"chat-box-container",lang:a,inspectorOpen:i},o().createElement(Ms,{buttonHandlers:g,onMessage:t.onMessage}),i&&o().createElement(ae,null))}},8341:(e,t,n)=>{"use strict";n(7603);var r=n(2856);e.exports=r("Array","includes")},8407:(e,t,n)=>{"use strict";var r=n(4904),o=n(2769),a=n(9932),i=n(8655)("toStringTag"),l=Object,s="Arguments"===a(function(){return arguments}());e.exports=r?a:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=l(e),i))?n:s?a(t):"Object"===(r=a(t))&&o(t.callee)?"Arguments":r}},8483:(e,t,n)=>{"use strict";n.d(t,{UJ:()=>u,XO:()=>h,fk:()=>p,mg:()=>f,qf:()=>d});var r=n(2221),o=n(4851),a=n(9313),i=n(5564),l=n(7243),s=n(7173);const c="pusherTransportEncrypted",u=()=>(e,t)=>{const{connected:n}=t().connection;n||e({type:s._Y})},d=()=>(e,t)=>{const{connected:n}=t().connection;n&&e({type:s._N})},p=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return async n=>{const r=JSON.parse(window.localStorage.getItem(c));t.indexOf("ws")<0&&r&&"ws"!==r.transport&&window.localStorage.removeItem(c),await n((0,i.JL)()),await n((0,i.$u)()),(0,a.Xs)({channelAuthorization:{headers:{"kindly-chatbubble-token":e,"Current-Url":window.location.href}},disabledTransports:t}),(0,l.Cy)(e)}},f=function(){let{triggerDialogueSlug:e,languageCode:t,shouldGreet:n=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async(i,c)=>{var u,d,f;const{local:{context:h,labels:m},chatbubble:{botKey:g,currentLanguage:b,disabledTransports:v},environment:{PAT_HOST:y},bot:{includeDisabledLanguages:x}}=c();i({type:s.d7,hasRequestedGreeting:n}),n&&i({type:s.A8});const w=(new Date).toISOString(),E=await i((0,l.et)(`${y}/chatbubble/${r.Ak}/connect`,{method:"POST",body:{labels:m,context:h,language_code:t||b,trigger_dialogue_slug:e,include_disabled_languages:x,should_greet:n,include_greeting:!0,tz:null===Intl||void 0===Intl||null===(u=Intl.DateTimeFormat)||void 0===u||null===(d=u.call(Intl))||void 0===d||null===(f=d.resolvedOptions())||void 0===f?void 0:f.timeZone},...(0,o.A)({botKey:g},{withCurrentUrl:!0,withVersion:!0})}));if(!E)return i({type:s.wk}),!1;const{pusherConnected:k}=c().connection;if(k)try{(0,a.Zf)()}catch(e){console.warn(e)}const{token:_,chat_id:A,created:T,all_greetings_hide_input:S,greeting:C,live_translation_system_dialogue:$}=E.data;return i({type:s.wk}),i({type:s.ny,token:_,chatId:A,allGreetingsHideInput:S}),i({type:s.nm,startedAt:T}),i((0,l.TP)(w)),$&&i({type:s.tq,data:$}),C&&i({type:s.tq,data:C}),i(p(_,v)),!0}},h=e=>t=>t({type:s.zT,triggerConfig:e})},8625:(e,t,n)=>{"use strict";n.d(t,{A:()=>v}),n(1949);var r=n(9155),o=n.n(r),a=n(2221),i=n(3864),l=n(6538);const s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=e.replace("#","");return 3===n.length&&(n=`${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`),t>1&&t<=100&&(t/=100),`rgba(${parseInt(n.substring(0,2),16)},${parseInt(n.substring(2,4),16)},${parseInt(n.substring(4,6),16)},${t})`};var c=n(107);const u=i.Ay.div`
|
|
3544
|
+
`;function Is(e){let{handleCancel:t,handleEndHumanChat:n,descriptionText:r,titleText:a,cancelButtonText:i,confirmButtonText:l}=e;return o().createElement(Ss,null,o().createElement($s,null,o().createElement(Cs,null,o().createElement(Ts,{color:"var(--panel-background-white-black-contrast-1743170834)"}),a),o().createElement("p",null,r)),o().createElement(Os,null,o().createElement(ni.A,{isSecondaryButton:!0,onClick:t},i),o().createElement(ni.A,{onClick:n},l)))}const Ls=e=>{const t=(0,V.A)(e),n=(e||[]).length;return(0,r.useMemo)(()=>n&&n!==(t||[]).length&&e[n-1],[e,n,t])};function Ms(e){var t;let{buttonHandlers:n,onMessage:a=null}=e;const i=(0,c.Pj)(),l=(0,xa.jL)(),s=(0,r.useRef)(null),d=(0,r.useRef)(null),p=(0,r.useRef)(null),{hideHeader:f,fullscreenMode:h,offsetHeight:m,id:g}=(0,xa.GV)(u.Od),{active:b,chatHasStarted:v,currentlyPoppedUp:y,contactDetailsButton:x,currentLanguage:w,currentModal:E,overlayViews:k,isChatFullWindow:_}=(0,xa.GV)(e=>{let{chatbubble:t}=e;return t}),{chatMessages:A}=(0,xa.GV)(e=>{let{messages:t}=e;return t}),{takenOver:T}=(0,xa.GV)(e=>{let{agent:t}=e;return t}),{feedbackToSubmit:$,feedbacksAlreadyDisplayed:C}=(0,xa.GV)(gi.CJ),O=Ls(A),{cancel_button:I,user_end_handover_button_text:L,user_end_handover_modal_title_text:M,user_end_handover_modal_description_text:N}=(0,dr.A)(),[R,P]=(0,r.useState)(!0);(0,r.useEffect)(()=>{if(R)return void P(!1);if(!O)return;const e=i.getState(),{chatMessages:t,attachments:n}=e.messages,{chatId:r,renderedBy:o}=e.chatbubble,{token:l}=e.connection,{PAT_HOST:s}=e.environment,c=t.map(e=>(0,xs.A)(e,n,s,l)),u=(0,xs.A)(O,n,s,l);(0,Ce.GJ)(ws(u,{botId:g,currentLanguage:w,chatId:r}),c,a,o)},[R,a,O,g,i,A.length]);const D=A.length>=3,j=k[k.length-1],{botConversationFeedback:F,handoverConversationFeedback:z}=(0,Ga.A)(w),B=null===(t=null==F?void 0:F.allow_bot_feedback_after_handover_feedback)||void 0===t||t,H=F&&!S()(C).call(C,"bot_conversation")&&(!S()(C).call(C,"handover_conversation")||B),U=z&&T?z:H?F:null,V=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"user";U&&"CANCEL_CHAT"===j&&D?(l((0,gi.WG)({ratingSystem:U.rating_scale.rating_system,triggerType:U.trigger_type,formTitle:U.form_title,step:"RATING_SCALE"})),l((0,G.wQ)("FEEDBACK"))):((0,Ce.tf)("end-chat",void 0,{storeState:i.getState(),source:e}),l((0,G.ky)(h)),l((0,G.zn)(null)))};return function(e){const{isChatFullWindow:t,renderedBy:n}=(0,c.d4)(u.$P),o=(0,r.useRef)();(0,r.useEffect)(()=>{if(e.current&&Es&&"API"===n)return o.current!==t&&(o.current=t,t?_s():As()),As},[e,t])}(p),o().createElement(oe,{"aria-live":"polite","data-cy":"chat-box","data-testid":"chat-box",ref:p,$active:b,$chatHasStarted:v,$fullscreen:!!h,$isChatFullWindow:_,$offsetHeight:m},o().createElement(Wl.A,{errorPoint:"inside ChatBoxContainer"},!f&&o().createElement(qa,{handleXButtonClick:()=>{"CANCEL_CHAT"!==j&&"FEEDBACK"!==j?l((0,G.wQ)("CANCEL_CHAT")):V()},settingsButtonRef:d}),!!j&&o().createElement(Pl,{endChat:V,feedbackToSubmit:$}),o().createElement(ue,null),o().createElement(is,null),o().createElement(ys,null),o().createElement(fa,{bodyRef:s,buttonHandlers:n,inert:!!j||!!E}),x?o().createElement(Gl,null):o().createElement(Ua,{active:b,chatHasStarted:v,currentlyPoppedUp:y,bodyRef:s,inert:!!j||!!E}),"END_HANDOVER"===E&&o().createElement(Is,{handleCancel:()=>l((0,G.zn)(null)),handleEndHumanChat:async()=>{await l((0,G.m8)()),l((0,G.zn)(null))},titleText:null!=M?M:"",descriptionText:null!=N?N:"",cancelButtonText:null!=I?I:"",confirmButtonText:null!=L?L:""}),"handover_conversation"===(null==$?void 0:$.trigger_type)&&"FEEDBACK_END_HANDOVER"===E&&o().createElement(qi,{feedbackToSubmit:$})))}Ms.displayName="KindlyChatBox";var Ns=n(9308);const Rs=(e,t)=>Object.entries(e).filter(e=>{let[t,n]=e;return"object"==typeof n}).reduce((e,n)=>{let[r,o]=n;return{...e,[r]:(0,qo.A)(o,t)}},{}),Ps=Object.freeze({en:e=>`New message from ${e}`,nb:e=>`Ny melding fra ${e}`,sv:e=>`Nytt meddelande från ${e}`}),Ds=Object.freeze({en:"An agent joined the conversation",nb:"En agent ble med i samtalen",sv:"En agent gick med i samtalet"});let js=!1;function Fs(e){const t=document.title;let n;n||js||(js=!0,n=setInterval(()=>{document.title=document.title===e?t:e},1e3),window.addEventListener("mousemove",function e(){clearInterval(n),document.title=t,n=null,js=!1,window.removeEventListener("mousemove",e)}))}var zs=n(6079);const Bs=()=>{const{takenOver:e,requestedHandoverAt:t}=(0,c.d4)(u.MA),n=(0,V.A)(e),o=(0,V.A)(t),a=(0,c.wA)(),i=Boolean(t),l=Boolean(o);(0,r.useEffect)(()=>{e&&!n?a((0,zs.f2)()):!e&&n&&(0,zs.yh)(),i&&!l?a((0,zs.Mk)()):!i&&l&&(0,zs.Zk)()},[a,l,n,i,e])};var Hs=n(4703),Us=n(4499),Vs=n(7811);const Gs=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(e).reduce((e,t)=>{let[n,r]=t;return{...e,[(0,Vs.A)(n)]:r}},{})};function Ws(e){let{settings:t}=e;const n=(0,xa.jL)(),{currentLanguageCode:a}=(0,pe.A)(),{inspectorOpen:i}=(0,xa.GV)(e=>{let{inspector:t}=e;return t}),{chatMessages:d}=(0,xa.GV)(e=>{let{messages:t}=e;return t}),p=(0,r.useRef)(null),f=(0,V.A)(d),h=localStorage.getItem("kindly-chat-restart-message"),m=(0,Us.A)(t,"zIndex",s.DP);(0,r.useEffect)(()=>{if(0===(null==f?void 0:f.length)&&1===(null==d?void 0:d.length)&&h){const{message:e,exchangeId:t,newContext:r}=JSON.parse(h);localStorage.removeItem("kindly-chat-restart-message"),n((0,Hs.y2)(e,t,r))}},[n,d,f,h]),function(){const{tabNotification:e,name:t}=(0,c.d4)(u.Od),{showTabNotification:n}=(0,c.d4)(u.Cv),{currentLanguageCode:o}=(0,pe.A)(),{takenOver:a}=(0,c.d4)(u.MA),{agent:i}=(0,c.d4)(u.zD),l=(0,V.A)(a);(0,r.useEffect)(()=>{var r;e&&n&&Fs((null!==(r=null==Ps?void 0:Ps[o])&&void 0!==r?r:Ps.en)(t||"Kindly"))},[o,e,n,t]),(0,r.useEffect)(()=>{const e=Boolean(null==i?void 0:i.name);var t;l!==a&&a&&e&&Fs(null!==(t=null==Ds?void 0:Ds[o])&&void 0!==t?t:Ds.en)},[a,i,l,o])}(),function(){const e=(0,c.wA)(),{currentLanguage:t,active:n}=(0,c.d4)(u.$P),{maintenanceAlertEnabled:o,maintenanceAlert:a}=(0,c.d4)(u.Od);(0,r.useEffect)(()=>{if(!n||!o)return;const{text_content:r,link_location:i,link_text:l}=Rs(a,t);e((0,G.cC)({content:r,buttonText:l,buttonHref:i,once:!0},s.Jm.MAINTENANCE))},[n,t,e,a,o])}(),Bs(),function(e){const t=(0,c.wA)(),n=(0,r.useRef)(!1);(0,r.useEffect)(()=>{const r=e.current;if(!r)return;const o=document.body||document.documentElement,a=()=>{const e=function(e){if(!e)return!1;const{width:t,height:n}=e.getBoundingClientRect();return t===window.innerWidth&&n===window.innerHeight}(r);e!==n.current&&(n.current=e,(e=>{t((0,Ka.w7)(e)),e?o.classList.add("kindly-overflow-hidden"):o.classList.remove("kindly-overflow-hidden")})(e))};setTimeout(()=>a(),Ns.X+10);const i=new ResizeObserver(a);return i.observe(r),()=>{t((0,Ka.w7)(!1)),o.classList.remove("kindly-overflow-hidden"),i.disconnect()}},[t,e])}(p),function(e){const t=(0,r.useCallback)(t=>{e&&"Tab"===t.key&&e.current.classList.add("using-tab")},[e]),n=(0,r.useCallback)(()=>{e&&e.current.classList.remove("using-tab")},[e]);(0,r.useEffect)(()=>(document.body.addEventListener("keyup",t),document.body.addEventListener("mousedown",n),()=>{document.body.removeEventListener("keyup",t),document.body.removeEventListener("mousedown",n)}),[t,n])}(p),function(){const e=(0,xa.jL)(),{chatHasStarted:t}=(0,xa.GV)(e=>{let{chatbubble:t}=e;return t}),{welcomePageType:n}=(0,xa.GV)(u.Od);(0,r.useEffect)(()=>{!t&&n!==s.Lb.NONE&&e((0,G.wQ)("WELCOME_PAGE"))},[t,n,e])}();const g=(0,r.useMemo)(()=>Gs(t.buttonHandlers),[t.buttonHandlers]);return o().createElement(l,{id:"chatContainer",ref:p,className:"chat-container",role:"complementary",$zIndex:m,"data-testid":"chat-box-container",lang:a,$inspectorOpen:i},o().createElement(Ms,{buttonHandlers:g,onMessage:t.onMessage}),i&&o().createElement(ae,null))}},6057:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(){let e=arguments.length>1?arguments[1]:void 0;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce((t,n)=>{var r;return{...t,[e(n)]:[...null!==(r=t[e(n)])&&void 0!==r?r:[],n]}},{})}},6064:(e,t,n)=>{"use strict";function r(e,t){if(!e)return;const n=[t,"en"].find(t=>t&&e[t]);return n?e[n]:void 0}n.d(t,{A:()=>r})},6079:(e,t,n)=>{"use strict";n.d(t,{CM:()=>E,Tk:()=>g,MY:()=>k,S4:()=>y,yh:()=>A,Zk:()=>S,Mk:()=>T,f2:()=>_,uK:()=>x});var r=n(9749),o=n.n(r),a=n(2221),i=n(467),l=n(4851),s=n(6057),c=n(7720),u=n(7173),d=n(7243);const p=[],f=[],h=[];let m=0;const g=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.length||([...p,...f].forEach(e=>{clearInterval(e)}),p.length=0,f.length=0,h.forEach(e=>{clearTimeout(e)}),h.length=0,m=0),o()(t).call(t,"handoverRequestPollIntervalIds")&&(p.forEach(e=>{clearInterval(e)}),p.length=0),o()(t).call(t,"handoverPollIntervalIds")&&(f.forEach(e=>{clearInterval(e)}),f.length=0),o()(t).call(t,"replyTimeoutIds")&&(h.forEach(e=>{clearTimeout(e)}),h.length=0,m=0)},b=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(e).reduce((e,t)=>{let[n,r]=t;return{...e,[n.replace(/_\w/g,e=>e[1].toUpperCase())]:r}},{})},v=e=>{let{status:t}=e;return t!==a.Le.PROCESSING},y=()=>async(e,t)=>{const{agent:{takenOver:n,requestedHandoverAt:r,handoverWaitTimeEstimate:o,handoverQueuePosition:p},chatbubble:{startedAt:f,chatHasStarted:h,botKey:m},connection:{token:g},environment:{PAT_HOST:y},messages:{attachments:x,buttonClicks:E,chatMessages:k,messageSentTime:_}}=t();if(!g||!h)return;const[A]=k.filter(e=>{let{from_bot:t}=e;return t}).slice(-1),[T]=x.filter(v).slice(-1),S=((e,t)=>{let{created:n}=e,{created:r}=t;return n&&r?new Date(n)>new Date(r)?n:r:n||r})(null!=A?A:{},null!=T?T:{})||_||f||(new Date).toISOString(),$=await e((0,d.et)(`${y}/chatbubble/${a.Ak}/latest?timestamp=${S}`,{method:"GET",...(0,l.A)({token:g})},{onError:t=>{var n;403===(null===(n=t.response)||void 0===n?void 0:n.status)?(console.warn(`/chatbubble/${a.Ak}/latest returned 403, starting new chat`),e({type:u.tr,error:403}),e((0,d.zX)(m,!0))):console.error(t)}}));if(!$||!$.data)return;const{chatMessages:C,buttonClicks:O=[],takenOver:I,requestedHandoverAt:L,attachments:M,externalHandoverState:N,handoverWaitTimeEstimate:R,handoverQueuePosition:P}=$.data,D=(0,c.A)(k),j=(0,i.A)(E),F=C.filter(D),z=O.map(b).filter(j),B=F.length>0;var H,U;e((e=>async(t,n)=>{if((null==e?void 0:e.length)>0)return;const{attachments:r=[]}=n().messages,{newAttachments:o=[],updated:i=[]}=(0,s.A)(function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).filter(e=>{let{sender:t,status:n}=e;return t===a.bS.USER||n===a.Le.CLEAN})}(e),e=>r.find((e=>{let{id:t,temporaryId:n}=e;return e=>{let{id:r,temporaryId:o}=e;return t&&t===r||n&&n===o}})(e))?"updated":"newAttachments");o.length>0&&t({type:u.Os,data:{attachments:o}}),i.length>0&&t({type:u.tS,data:{attachments:i}})})(M)),e(w(B)),n!==I&&e({type:u.II,data:{taken_over:I,supports_attachment:null==N?void 0:N.supports_attachment,requested_handover_at:L}}),r!==L&&e({type:u.nz,data:{requested_handover_at:L,handover_wait_time_estimate:R,handover_queue_position:P}}),o===R&&p===P||e({type:u.AQ,data:{handover_wait_time_estimate:R,handover_queue_position:P}}),(H=F,U="created",(H||[]).slice().sort((e,t)=>e[U]<t[U]?-1:1)).forEach(t=>{e({type:u.tq,data:t})}),z.forEach(t=>e({type:u.Y6,buttonClick:t}))},x=()=>e=>{if(g("replyTimeoutIds"),f.length)return;const t=setTimeout(()=>e(y()),a.RT.REPLY_TIMEOUT_MS);h.push(t),m=1},w=e=>t=>{if(g("replyTimeoutIds"),0===m)return;if(e||!(m<a.RT.REPLY_TIMEOUT_MAX_ATTEMPTS))return void(e||console.error(`Reply timeout failed more than ${a.RT.REPLY_TIMEOUT_MAX_ATTEMPTS} times`));const n=a.RT.REPLY_TIMEOUT_MS*a.RT.REPLY_TIMEOUT_MS_MULTIPLIER**m,r=setTimeout(()=>t(y()),n);h.push(r),m+=1},E=()=>g("replyTimeoutIds"),k=()=>e=>{if(f.length){g("handoverPollIntervalIds");const t=setInterval(()=>e(y()),a.RT.HANDOVER_POLL_INTERVAL_MS);p.push(t)}if(p.length){g("handoverRequestPollIntervalIds");const t=setInterval(()=>e(y()),a.RT.HANDOVER_REQUEST_POLL_INTERVAL_MS);p.push(t)}},_=()=>e=>{if(g(),f.length)return;const t=setInterval(()=>e(y()),a.RT.HANDOVER_POLL_INTERVAL_MS);f.push(t)},A=()=>g("handoverPollIntervalIds"),T=()=>e=>{if(p.length)return;const t=setInterval(()=>e(y()),a.RT.HANDOVER_REQUEST_POLL_INTERVAL_MS);p.push(t)},S=()=>g("handoverRequestPollIntervalIds")},6100:(e,t,n)=>{"use strict";var r=n(1780),o=Function.prototype,a=o.call,i=r&&o.bind.bind(a,a);e.exports=r?i:function(e){return function(){return a.apply(e,arguments)}}},6249:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(8089),o=n.n(r);const a=(e,t)=>o()({},e,t)},6253:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(9155);const o=(e,t)=>{const n=(0,r.useRef)();return(0,r.useCallback)(r=>{var o;new Date-n.current<t?null==r||null===(o=r.preventDefault)||void 0===o||o.call(r):(e(r),n.current=new Date)},[t,e])}},6281:(e,t,n)=>{"use strict";var r=n(1003),o=n(2769),a=n(4317),i=n(7460),l=Object;e.exports=i?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return o(t)&&a(t.prototype,l(e))}},6367:(e,t,n)=>{"use strict";n.d(t,{GJ:()=>i,NY:()=>s,fz:()=>c,n6:()=>d,tf:()=>u});const r=["load","message"],o="See https://docs.kindly.ai/api/chat#handlers for how to switch.",a=function(e,t,n,a){var i,l;let s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(-1!==r.indexOf(e)&&Boolean(a)&&function(e,t,n){const r=`on${t.charAt(0).toUpperCase()+t.slice(1)}`;if("function"!=typeof e)return void console.warn(`Provided setting '${r}' is not a function.`);console.warn(`kindlyOptions.${r} is deprecated in favor of standard event handlers. ${o}`);const a=Object.values(n);try{e(...a)}catch(e){console.error(e)}}(a,e,t),"API"!==n)return!0;if(null===(i=window)||void 0===i||null===(l=i.kindlyChat)||void 0===l||!l.APIRoot)return console.warn("No APIRoot when rendered using kindly-chat API"),!0;"message"===e&&window.kindlyChat.APIRoot.dispatchEvent(new CustomEvent("onMessage",{detail:t}));const c=`kindly:${e}`;return window.kindlyChat.APIRoot.dispatchEvent(new CustomEvent(c,{detail:t,bubbles:!0,cancelable:s}))};function i(e,t,n,r){e&&a("message",{newMessage:e,chatLog:t},r,n)}let l=!1;function s(e){!1===l&&(l=!0,a("load",{settings:e},null==e?void 0:e.renderedBy,null==e?void 0:e.onLoad))}const c=e=>{let{button:t,buttonType:n,chatLog:r,event:a,handlers:i,lastMessage:l,renderedBy:s}=e,c=!1;const u=null==i?void 0:i[n];if(u){console.warn(`kindlyOptions.buttonHandlers is deprecated in favor of standard event handlers. ${o}`);try{c=Boolean(u(a,t,l,r,n))}catch(e){console.error(e)}}var d;return"API"===s&&(c=!(null!==(d=window.kindlyChat)&&void 0!==d&&d.APIRoot.dispatchEvent(new CustomEvent("kindly:buttonclick",{detail:{button:t,lastMessage:l,chatLog:r,buttonType:n},bubbles:!0,cancelable:!0})))),c};function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{source:n="user",storeState:r}=arguments.length>2?arguments[2]:void 0;const{chatbubble:{chatId:o,renderedBy:i}}=r,l={...t,chatId:o,source:n,type:e};return a("ui",l,i,void 0,!1)}const d=e=>{var t;let{type:n,icon:r,renderedBy:o}=e;return"API"!==o||!(null!==(t=window.kindlyChat)&&void 0!==t&&t.APIRoot.dispatchEvent(new CustomEvent("kindly:globalicon",{detail:{type:n,icon:r},bubbles:!0,cancelable:!0})))}},6421:(e,t,n)=>{"use strict";n.d(t,{A:()=>i}),n(1949);var r=n(9155),o=n.n(r);const a=n(3864).Ay.div`
|
|
3545
|
+
transition: all 0.3s ease-in-out;
|
|
3546
|
+
`,i=function(e){let{children:t,carouselPosition:n,onTouchEnd:r,onTouchMove:i,onTouchStart:l}=e;return o().createElement(a,{onTouchStart:l,onTouchEnd:r,onTouchMove:i,style:{transform:`translateX(${n}px)`}},t)}},6538:(e,t,n)=>{"use strict";function r(e,t,n){return o(e)?n:t}function o(e){let t=e;l(e)&&(t=function(e){const t=e.indexOf(",")>-1?",":" ";let n=(+(e=e.substr(4).split(")")[0].split(t))[0]).toString(16),r=(+e[1]).toString(16),o=(+e[2]).toString(16);return 1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),1===o.length&&(o=`0${o}`),`#${n}${r}${o}`}(e)),s(e)&&(t=a(e));const n="#"===t.charAt(0)?t.substring(1,7):t,r=[parseInt(n.substring(0,2),16)/255,parseInt(n.substring(2,4),16)/255,parseInt(n.substring(4,6),16)/255].map(e=>e<=.03928?e/12.92:((e+.055)/1.055)**2.4);return.2126*r[0]+.7152*r[1]+.0722*r[2]>.179}function a(e){return e.replace(i,(e,t,n,r)=>`#${t}${t}${n}${n}${r}${r}`)}n.d(t,{J7:()=>c,SW:()=>o,w5:()=>r});const i=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,l=e=>e.match(/^rgb/),s=e=>e.match(i);function c(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:120;const r=u(e),o=u(t);return Math.sqrt((r[0]-o[0])**2+(r[1]-o[1])**2+(r[2]-o[2])**2)<=n}function u(e){if(l(e))return e.match(/\d+/g).map(Number);let t="#"===e.charAt(0)?e.substring(1):e;return s(e)&&(t=a(t).substring(1)),[parseInt(t.substring(0,2),16),parseInt(t.substring(2,4),16),parseInt(t.substring(4,6),16)]}},6804:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>k});var r=n(9155),o=n.n(r),a=n(541),i=n(5256),l=n(1328),s=n(1872),c=n(1695),u=n(3864),d=n(3249),p=n(4927),f=n(8905);const h=u.Ay.div`
|
|
3704
3547
|
display: flex;
|
|
3705
|
-
flex-direction:
|
|
3706
|
-
position:
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3548
|
+
flex-direction: row;
|
|
3549
|
+
position: absolute;
|
|
3550
|
+
bottom: 4px;
|
|
3551
|
+
padding-right: 12px;
|
|
3552
|
+
right: calc(100% - 12px);
|
|
3553
|
+
background: #fff;
|
|
3554
|
+
background-color: #fff;
|
|
3555
|
+
box-shadow: 0px 1px 5px 0px ${f.Tj.shadowColorDark};
|
|
3556
|
+
border-radius: 7px;
|
|
3557
|
+
|
|
3558
|
+
${e=>!e.$active&&u.AH`
|
|
3559
|
+
transform: scale(0);
|
|
3560
|
+
transform-origin: right;
|
|
3561
|
+
opacity: 0;
|
|
3562
|
+
pointer-events: none;
|
|
3563
|
+
user-select: none;
|
|
3564
|
+
`};
|
|
3565
|
+
`,m=u.Ay.div`
|
|
3566
|
+
z-index: 1;
|
|
3567
|
+
bottom: 2px;
|
|
3568
|
+
transition: all 0.2s ease;
|
|
3569
|
+
display: flex;
|
|
3570
|
+
flex-direction: row;
|
|
3571
|
+
|
|
3572
|
+
${e=>e.$active&&e.$fullscreenMode&&"z-index: -1;"}
|
|
3573
|
+
|
|
3574
|
+
${e=>!e.$active&&u.AH`
|
|
3575
|
+
transform: scale(0);
|
|
3576
|
+
transform-origin: right;
|
|
3577
|
+
opacity: 0;
|
|
3578
|
+
pointer-events: none;
|
|
3579
|
+
user-select: none;
|
|
3580
|
+
`};
|
|
3581
|
+
`,g=u.Ay.div`
|
|
3582
|
+
padding: 2px;
|
|
3583
|
+
border-radius: 7px;
|
|
3584
|
+
z-index: 1;
|
|
3585
|
+
display: flex;
|
|
3586
|
+
min-width: max-content;
|
|
3587
|
+
justify-content: center;
|
|
3588
|
+
|
|
3589
|
+
${d.JP};
|
|
3590
|
+
`,b=(0,u.Ay)(p.N_)`
|
|
3591
|
+
color: #757575;
|
|
3592
|
+
margin: 0;
|
|
3593
|
+
cursor: pointer;
|
|
3594
|
+
font-size: var(--_kindlychat-font-size-sm);
|
|
3595
|
+
font-weight: 500;
|
|
3596
|
+
text-decoration: none;
|
|
3597
|
+
|
|
3598
|
+
&:hover {
|
|
3599
|
+
text-decoration: underline;
|
|
3600
|
+
}
|
|
3601
|
+
`,v=u.Ay.div`
|
|
3602
|
+
display: flex;
|
|
3603
|
+
padding: 2px;
|
|
3604
|
+
align-items: center;
|
|
3605
|
+
justify-content: space-between;
|
|
3606
|
+
`,y=(0,u.Ay)(p.$n)`
|
|
3720
3607
|
display: flex;
|
|
3608
|
+
position: relative;
|
|
3721
3609
|
align-items: center;
|
|
3610
|
+
padding: 12px;
|
|
3611
|
+
transition: all 0.15s ease;
|
|
3612
|
+
&:hover {
|
|
3613
|
+
background: #${f.Tj.grayColor};
|
|
3614
|
+
background-color: #${f.Tj.grayColor};
|
|
3615
|
+
svg path {
|
|
3616
|
+
fill: #000;
|
|
3617
|
+
}
|
|
3618
|
+
|
|
3619
|
+
&:after {
|
|
3620
|
+
border-left-color: #000;
|
|
3621
|
+
}
|
|
3622
|
+
}
|
|
3623
|
+
|
|
3624
|
+
${e=>e.$active&&`\n background: #${f.Tj.grayColor};\n background-color: #${f.Tj.grayColor};\n `}
|
|
3625
|
+
|
|
3626
|
+
${e=>e.$tail&&"\n &:after {\n content: '';\n position: absolute;\n right: -6px;\n top: 50%;\n transform: translateY(-50%);\n width: 0;\n height: 0;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-left: 6px solid #ccc;\n }\n "}
|
|
3627
|
+
`;var x=n(6253),w=n(4703);const E=1e3;function k(e){let{active:t}=e;const[n,u]=(0,r.useState)(!1),{botKey:d,admin:p}=(0,a.d4)(c.$P),{supportedLanguages:f}=(0,l.A)(),{fullscreenMode:k}=(0,a.d4)(c.Od),{inspectorOpen:_}=(0,a.d4)(c.qV),A=(0,a.wA)(),T=(0,r.useCallback)(()=>{A((0,s.uz)())},[A]);return function(){var e,t;const n=(0,a.wA)(),{admin:o}=(0,a.d4)(c.$P),{chatMessages:i}=(0,a.d4)(c.DZ)||[],l=null===(e=i.filter(e=>!(null!=e&&e.from_bot)).slice(-1))||void 0===e||null===(t=e[0])||void 0===t?void 0:t.message,s=(0,x.A)(e=>{n((0,w.y2)(e))},E),u=(0,r.useCallback)(e=>{e.altKey&&"KeyR"===e.code&&l&&s(l)},[l,s]);(0,r.useEffect)(()=>{if(o)return window.addEventListener("keydown",u,!0),()=>window.removeEventListener("keydown",u,!0)},[u,o])}(),o().createElement(h,{$active:t},n&&t&&o().createElement(g,null,f.map(e=>o().createElement(y,{key:e.code,title:`Restart ${e.name_local}`,onClick:()=>{return t=e.code,A((0,s.L4)(t)),void u(!1);var t}},o().createElement(b,null,e.code.toUpperCase())))),o().createElement(m,{$active:t,$hasInspector:p,$fullscreenMode:k},p&&o().createElement(v,null,o().createElement(y,{onClick:T,title:_?"Close chat inspector":"Open chat inspector"},_?o().createElement(i.V$,null):o().createElement(i.bM,null))),o().createElement(v,null,o().createElement(y,{title:"Restart chat",onClick:()=>{f.length>1?u(!n):A((0,s.zX)(d,!0))},$active:n,$tail:f.length>1},o().createElement(i.fN,{width:15,height:15})))))}},7e3:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=(e,t)=>Boolean((e=>{const t=e.replace(/\./g,"\\.").replace(/\*/g,".*").replace(/\//g,"\\/").replace(/\?/g,"\\?");return new RegExp(t,"i")})(t).test(e))},7013:(e,t,n)=>{"use strict";var r=n(1780),o=Function.prototype,a=o.apply,i=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?i.bind(a):function(){return i.apply(a,arguments)})},7050:(e,t,n)=>{"use strict";var r=n(1949),o=n.n(r),a=n(2221);const i=o().arrayOf(o().shape({selected:o().bool.isRequired,_id:o().string.isRequired,score:o().number.isRequired,sample:o().string.isRequired}));o().shape({message:o().string,from_bot:o().bool,image_carousel:o().arrayOf(o().object),exchange_type:o().string,exchange_id:o().string,avatar:o().string,sender:o().oneOf(Object.values(a.bS)),skill_subscription_id:o().number,bot_id:o().number,score:o().number,title:o().string,reply_candidates:i,is_followup:o().bool,handler:o().oneOf(Object.values(a.Gi)),new_context:o().objectOf(o().string)})},7161:(e,t)=>{"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);t.f=o?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},7173:(e,t,n)=>{"use strict";n.d(t,{M_:()=>r,MU:()=>o,nW:()=>g,YU:()=>m,fg:()=>j,FZ:()=>$.FZ,YR:()=>$.YR,K_:()=>y,A8:()=>E,wk:()=>k,Y6:()=>F,Q4:()=>$.Q4,Tc:()=>A,uS:()=>$.uS,SO:()=>$.SO,_Y:()=>C._Y,zT:()=>C.zT,wX:()=>ee,MO:()=>J,nG:()=>N,_N:()=>C._N,Kd:()=>te,oZ:()=>M,u2:()=>h,X2:()=>Y,a_:()=>ne,wM:()=>$.wM,dp:()=>w,II:()=>l,MM:()=>i,nz:()=>a,t1:()=>$.t1,qQ:()=>v,tS:()=>z,E7:()=>S,Os:()=>B,tq:()=>H,ny:()=>C.ny,kA:()=>$.kA,$o:()=>O,jE:()=>R,hn:()=>$.hn,mz:()=>C.mz,kP:()=>C.kP,VZ:()=>C.VZ,MN:()=>L,nh:()=>u,a1:()=>oe,oE:()=>Q,TF:()=>$.TF,XM:()=>$.XM,d$:()=>$.d$,Xu:()=>$.Xu,tr:()=>$.MO,QA:()=>U,uA:()=>$.uA,d7:()=>$.d7,ye:()=>P,M2:()=>$.M2,kU:()=>V,se:()=>G,mw:()=>_,nm:()=>$.nm,HW:()=>$.HW,Zb:()=>f,Eg:()=>$.Eg,un:()=>Z,vP:()=>I,wv:()=>X,nX:()=>$.nX,l:()=>re,Wh:()=>p,CB:()=>$.CB,Rk:()=>x,vK:()=>D,IM:()=>W,zZ:()=>b,wP:()=>q,pz:()=>K,AQ:()=>d,Q0:()=>T,c6:()=>s,we:()=>c});const r="AGENT_STARTED_TYPING",o="AGENT_STOPPED_TYPING",a="HANDOVER_REQUESTED",i="HANDOVER_CANCELLED",l="HANDOVER",s="USER_STARTED_TYPING",c="USER_STOPPED_TYPING",u="RESET_HAS_HAD_HANDOVER",d="UPDATE_HANDOVER_QUEUE",p="SHOW_TAB_NOTIFICATION",f="SHOW_BUBBLE_NOTIFICATION",h="DISMISS_NOTIFICATIONS",m="ANNOUNCEMENT_SHOW",g="ANNOUNCEMENT_HIDE",b="UNAUTHENTICATED",v="IDENTIFIED",y="AUTHENTICATED",x="START_REFRESHING",w="END_REFRESHING",E="BOT_STARTED_TYPING",k="BOT_STOPPED_TYPING",_="SET_SPLIT_TEST_LABEL",A="CLEAR_SPLIT_TEST_LABEL",T="UPDATE_SPLIT_LABEL_TIMEOUT",S="MIMIR_STARTED_SEARCHING";var $=n(3313),C=n(7523);const O="ENVIRONMENT_OVERRIDE",I="SHOW_IN_CHAT_NOTIFICATION",L="REPLACE_IN_CHAT_NOTIFICATION",M="DISMISS_IN_CHAT_NOTIFICATION",N="DELETE_IN_CHAT_NOTIFICATION",R="PATTERN_CONTEXT_MATCH",P="SET_INSPECTED_CHAT_MESSAGE",D="TOGGLE_INSPECTOR",j="ANONYMIZED_MESSAGE",F="BUTTON_CLICK",z="MESSAGE_ATTACHMENTS_UPDATED",B="NEW_ATTACHMENTS",H="NEW_MESSAGE",U="SET_FORM",V="SET_LAST_MESSAGE_SEEN",G="SET_MESSAGE_SENT_TIME",W="TRIGGER_DIALOGUE",q="UPDATE_ATTACHMENT",K="UPDATE_CHAT_MESSAGE",Y="DISMISS_NUDGE",X="SHOW_NUDGE",Z="SHOW_CUSTOM_NUDGE",J="CTA_CLICK",Q="SESSION_COMPLETION",ee="COUNT_NUDGE",te="DISCOUNT_NUDGE",ne="DISMISS_PUSH_MESSAGE",re="SHOW_PUSH_MESSAGE",oe="RESET_PUSH_MESSAGES"},7235:(e,t,n)=>{"use strict";var r=n(262),o=String,a=TypeError;e.exports=function(e){if(r(e))return e;throw new a(o(e)+" is not an object")}},7243:(e,t,n)=>{"use strict";n.d(t,{Rm:()=>w,TP:()=>E,zX:()=>m,Cy:()=>y,et:()=>v,DT:()=>x,m8:()=>h,R7:()=>f});var r=n(9749),o=n.n(r),a=n(2221),i=n(2366),l=n(4851),s=n(9292),c=n(8172),u=n(9313),d=n(2633),p=n(7173);const f=e=>async(t,n)=>{const{connection:{token:r},environment:{PAT_HOST:o}}=n();return r?fetch(`${o}/chatbubble/${a.Ak}/user_left/`,{method:"PATCH",...(0,l.A)({token:r,botKey:e})}):null},h=()=>async(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:r},auth:{fullName:o}}=t();return n?fetch(`${r}/chatbubble/${a.Ak}/handover_cancel/`,{method:"POST",body:JSON.stringify({source:o}),...(0,l.A)({token:n},{extra:{"Content-Type":"application/json"}})}):null},m=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return async(n,r)=>{const{agent:{takenOver:o,requestedHandoverAt:i}}=r();i?n({type:p.MM}):o&&n({type:p.II,data:{taken_over:!1}}),n({type:p.a1}),n(f(e)),n({type:p.wk});try{(0,u.Zf)(),t||n({type:p.uS})}catch(e){console.warn(e)}finally{n((0,d.F)(a.Jm.LANGUAGE_SWITCH)),n({type:p.CB,botKey:e,keepOpen:t}),t||setTimeout(()=>n({type:p.d$,chatHasStarted:!1}),300)}}},g=Object.freeze({MAX:3,TIMEOUT_MS:2e3,TIMEOUT_MULTIPLIER:2,RESPONSE_STATUSES:[401,403]});let b=0;const v=function(e,t){let{onError:n,restartOnError:r}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return async a=>{if(!e)return console.error("Tried to call transport without supplying url"),null;if(!t.method)return console.error("Tried to call transport without supplying method"),null;t.headers={"kindly-chat-version":"2.76.7",[i.B]:(0,i.U)(),...t.headers||{}};try{const n=await fetch(e,{...t,...t.body&&{body:t.body instanceof ArrayBuffer?t.body:JSON.stringify(t.body)},headers:{"Content-Type":"application/json",...t.headers&&{...t.headers}}});if(!(t.body instanceof ArrayBuffer)){const e=await n.json();return{status:n.status,statusText:n.statusText,ok:n.ok,data:e}}return n}catch(e){return n?n(e,t):r?a(((e,t)=>function(n){var r,a,i,l;if(!e.response||!o()(r=g.RESPONSE_STATUSES).call(r,null===(a=e.response)||void 0===a?void 0:a.status))return console.error(e),null;if(b+=1,b>g.MAX)return console.error(`${t.url} returned ${null===(l=e.response)||void 0===l?void 0:l.status}, max chats restarts exceeded`),null;console.warn(`${t.url} returned ${null===(i=e.response)||void 0===i?void 0:i.status}, starting new chat`);const s=g.TIMEOUT_MS*g.TIMEOUT_MULTIPLIER**(b-1);return setTimeout(()=>n((e,t)=>{const{botKey:n}=t().chatbubble;e(m(n,!0))}),s),null})(e,t)):null}}},y=e=>{const t=`private-chatbubble-${e}`;(0,u.B1)(t,"mimir-started-searching",p.E7),(0,u.B1)(t,"agent_started_typing",p.M_),(0,u.B1)(t,"agent_stopped_typing",p.MU),(0,u.B1)(t,"message-attachments-updated",p.tS),(0,u.B1)(t,"message",p.tq),(0,u.B1)(t,"bot_started_typing",p.A8),(0,u.B1)(t,"bot_stopped_typing",p.wk),(0,u.B1)(t,"new-attachments",p.Os),(0,u.B1)(t,"pattern-context-match",p.jE),(0,u.B1)(t,"takeover",p.II)},x=e=>{const t=`private-chatbubble-${e}`;(0,u.al)(t,"mimir-started-searching",p.E7),(0,u.al)(t,"agent_started_typing",p.M_),(0,u.al)(t,"agent_stopped_typing",p.MU),(0,u.al)(t,"message-attachments-updated",p.tS),(0,u.al)(t,"message",p.tq),(0,u.al)(t,"bot_started_typing",p.A8),(0,u.al)(t,"bot_stopped_typing",p.wk),(0,u.al)(t,"new-attachments",p.Os),(0,u.al)(t,"pattern-context-match",p.jE),(0,u.al)(t,"takeover",p.II)},w=e=>{let{message:t,error:n,level:r="info",extra:o={}}=e;return(e,i)=>{var u;const d=i(),{connection:{token:p},environment:{PAT_HOST:f},chatbubble:{chatId:h}}=d,m={tags:{chat_id:h,bot_id:null===(u=d.bot)||void 0===u?void 0:u.id}},g=(e=>{var t,n;let{level:r="info",error:o,message:a,reduxState:i,extra:l}=e;a||null!=o&&o.message||(console.error("Attempted to log without message"),a="No error message provided");const u=(0,c.A)(i||{},s.W$),d={version:"2.76.7",release:"2.76.7",userAgent:navigator.userAgent,state:i?JSON.stringify(u):void 0,...l},p={message:null!==(t=a)&&void 0!==t?t:null==o?void 0:o.message,name:null==o?void 0:o.name,stack:null==o?void 0:o.stack,code:null==o?void 0:o.code,signal:null==o?void 0:o.signal,filename:null==o?void 0:o.filename};return{message:null!==(n=a)&&void 0!==n?n:null==o?void 0:o.message,level:r,extra:d,error:p}})({level:r,error:n,message:t,reduxState:d,extra:{...(b=o,JSON.parse(JSON.stringify(b,(e,t)=>void 0===t?"undefined 🤷♂️":t))),...m}});var b;e(v(`${f}/chatbubble/${a.Ak}/log`,{method:"POST",body:g,...(0,l.A)({token:p},{withCurrentUrl:!0})}))}},E=e=>t=>{t({type:p.se,messageSentTime:e})}},7251:(e,t,n)=>{"use strict";function r(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}n.d(t,{U1:()=>de,zD:()=>ye,Z0:()=>Ae});var o=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),a=()=>Math.random().toString(36).substring(7).split("").join("."),i={INIT:`@@redux/INIT${a()}`,REPLACE:`@@redux/REPLACE${a()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${a()}`};function l(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function s(e,t,n){if("function"!=typeof e)throw new Error(r(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(r(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(r(1));return n(s)(e,t)}let a=e,c=t,u=new Map,d=u,p=0,f=!1;function h(){d===u&&(d=new Map,u.forEach((e,t)=>{d.set(t,e)}))}function m(){if(f)throw new Error(r(3));return c}function g(e){if("function"!=typeof e)throw new Error(r(4));if(f)throw new Error(r(5));let t=!0;h();const n=p++;return d.set(n,e),function(){if(t){if(f)throw new Error(r(6));t=!1,h(),d.delete(n),u=null}}}function b(e){if(!l(e))throw new Error(r(7));if(void 0===e.type)throw new Error(r(8));if("string"!=typeof e.type)throw new Error(r(17));if(f)throw new Error(r(9));try{f=!0,c=a(c,e)}finally{f=!1}return(u=d).forEach(e=>{e()}),e}return b({type:i.INIT}),{dispatch:b,subscribe:g,getState:m,replaceReducer:function(e){if("function"!=typeof e)throw new Error(r(10));a=e,b({type:i.REPLACE})},[o]:function(){const e=g;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(r(11));function n(){const e=t;e.next&&e.next(m())}return n(),{unsubscribe:e(n)}},[o](){return this}}}}}function c(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function u(e){return({dispatch:t,getState:n})=>r=>o=>"function"==typeof o?o(t,n,e):r(o)}var d=u(),p=u,f=Symbol.for("immer-nothing"),h=Symbol.for("immer-draftable"),m=Symbol.for("immer-state");function g(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var b=Object.getPrototypeOf;function v(e){return!!e&&!!e[m]}function y(e){return!!e&&(w(e)||Array.isArray(e)||!!e[h]||!!e.constructor?.[h]||T(e)||S(e))}var x=Object.prototype.constructor.toString();function w(e){if(!e||"object"!=typeof e)return!1;const t=b(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===x}function E(e,t){0===k(e)?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function k(e){const t=e[m];return t?t.type_:Array.isArray(e)?1:T(e)?2:S(e)?3:0}function _(e,t){return 2===k(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function A(e,t,n){const r=k(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function T(e){return e instanceof Map}function S(e){return e instanceof Set}function $(e){return e.copy_||e.base_}function C(e,t){if(T(e))return new Map(e);if(S(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=w(e);if(!0===t||"class_only"===t&&!n){const t=Object.getOwnPropertyDescriptors(e);delete t[m];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const o=n[r],a=t[o];!1===a.writable&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[o]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[o]})}return Object.create(b(e),t)}{const t=b(e);if(null!==t&&n)return{...e};const r=Object.create(t);return Object.assign(r,e)}}function O(e,t=!1){return L(e)||v(e)||!y(e)||(k(e)>1&&(e.set=e.add=e.clear=e.delete=I),Object.freeze(e),t&&Object.entries(e).forEach(([e,t])=>O(t,!0))),e}function I(){g(2)}function L(e){return Object.isFrozen(e)}var M,N={};function R(e){const t=N[e];return t||g(0),t}function P(){return M}function D(e,t){t&&(R("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function j(e){F(e),e.drafts_.forEach(B),e.drafts_=null}function F(e){e===M&&(M=e.parent_)}function z(e){return M={drafts_:[],parent_:M,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function B(e){const t=e[m];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function H(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[m].modified_&&(j(t),g(4)),y(e)&&(e=U(t,e),t.parent_||G(t,e)),t.patches_&&R("Patches").generateReplacementPatches_(n[m].base_,e,t.patches_,t.inversePatches_)):e=U(t,n,[]),j(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==f?e:void 0}function U(e,t,n){if(L(t))return t;const r=t[m];if(!r)return E(t,(o,a)=>V(e,r,t,o,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return G(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let o=t,a=!1;3===r.type_&&(o=new Set(t),t.clear(),a=!0),E(o,(o,i)=>V(e,r,t,o,i,n,a)),G(e,t,!1),n&&e.patches_&&R("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function V(e,t,n,r,o,a,i){if(v(o)){const i=U(e,o,a&&t&&3!==t.type_&&!_(t.assigned_,r)?a.concat(r):void 0);if(A(n,r,i),!v(i))return;e.canAutoFreeze_=!1}else i&&n.add(o);if(y(o)&&!L(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;U(e,o),t&&t.scope_.parent_||"symbol"==typeof r||!Object.prototype.propertyIsEnumerable.call(n,r)||G(e,o)}}function G(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&O(t,n)}var W={get(e,t){if(t===m)return e;const n=$(e);if(!_(n,t))return function(e,t,n){const r=Y(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}(e,n,t);const r=n[t];return e.finalized_||!y(r)?r:r===K(e.base_,t)?(Z(e),e.copy_[t]=J(r,e)):r},has:(e,t)=>t in $(e),ownKeys:e=>Reflect.ownKeys($(e)),set(e,t,n){const r=Y($(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=K($(e),t),i=r?.[m];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(((o=n)===(a=r)?0!==o||1/o==1/a:o!=o&&a!=a)&&(void 0!==n||_(e.base_,t)))return!0;Z(e),X(e)}var o,a;return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==K(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,Z(e),X(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=$(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty(){g(11)},getPrototypeOf:e=>b(e.base_),setPrototypeOf(){g(12)}},q={};function K(e,t){const n=e[m];return(n?$(n):e)[t]}function Y(e,t){if(!(t in e))return;let n=b(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=b(n)}}function X(e){e.modified_||(e.modified_=!0,e.parent_&&X(e.parent_))}function Z(e){e.copy_||(e.copy_=C(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function J(e,t){const n=T(e)?R("MapSet").proxyMap_(e,t):S(e)?R("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:P(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=W;n&&(o=[r],a=q);const{revoke:i,proxy:l}=Proxy.revocable(o,a);return r.draft_=l,r.revoke_=i,l}(e,t);return(t?t.scope_:P()).drafts_.push(n),n}function Q(e){if(!y(e)||L(e))return e;const t=e[m];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=C(e,t.scope_.immer_.useStrictShallowCopy_)}else n=C(e,!0);return E(n,(e,t)=>{A(n,e,Q(t))}),t&&(t.finalized_=!1),n}E(W,(e,t)=>{q[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),q.deleteProperty=function(e,t){return q.set.call(this,e,t,void 0)},q.set=function(e,t,n){return W.set.call(this,e[0],t,n,e[0])};var ee=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const r=this;return function(e=n,...o){return r.produce(e,e=>t.call(this,e,...o))}}let r;if("function"!=typeof t&&g(6),void 0!==n&&"function"!=typeof n&&g(7),y(e)){const o=z(this),a=J(e,void 0);let i=!0;try{r=t(a),i=!1}finally{i?j(o):F(o)}return D(o,n),H(r,o)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===f&&(r=void 0),this.autoFreeze_&&O(r,!0),n){const t=[],o=[];R("Patches").generateReplacementPatches_(e,r,t,o),n(t,o)}return r}g(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){var t;y(e)||g(8),v(e)&&(v(t=e)||g(10),e=Q(t));const n=z(this),r=J(e,void 0);return r[m].isManual_=!0,F(n),r}finishDraft(e,t){const n=e&&e[m];n&&n.isManual_||g(9);const{scope_:r}=n;return D(r,t),H(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=R("Patches").applyPatches_;return v(e)?r(e,t):this.produce(e,e=>r(e,t))}},te=ee.produce;ee.produceWithPatches.bind(ee),ee.setAutoFreeze.bind(ee),ee.setUseStrictShallowCopy.bind(ee),ee.applyPatches.bind(ee),ee.createDraft.bind(ee),ee.finishDraft.bind(ee),n(9907);var ne="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?c:c.apply(null,arguments)},re=("undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__,e=>e&&"function"==typeof e.match);function oe(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error($e(0));return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>function(e){return l(e)&&"type"in e&&"string"==typeof e.type}(t)&&t.type===e,n}var ae=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function ie(e){return y(e)?te(e,()=>{}):e}function le(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}var se=()=>function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:o=!0}=e??{};let a=new ae;return t&&("boolean"==typeof t?a.push(d):a.push(p(t.extraArgument))),a},ce=e=>t=>{setTimeout(t,e)},ue=e=>function(t){const{autoBatch:n=!0}=t??{};let r=new ae(e);return n&&r.push(((e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,a=!1,i=!1;const l=new Set,s="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:ce(10):"callback"===e.type?e.queueNotification:ce(e.timeout),c=()=>{i=!1,a&&(a=!1,l.forEach(e=>e()))};return Object.assign({},r,{subscribe(e){const t=r.subscribe(()=>o&&e());return l.add(e),()=>{t(),l.delete(e)}},dispatch(e){try{return o=!e?.meta?.RTK_autoBatch,a=!o,a&&(i||(i=!0,s(c))),r.dispatch(e)}finally{o=!0}}})})("object"==typeof n?n:void 0)),r};function de(e){const t=se(),{reducer:n,middleware:o,devTools:a=!0,duplicateMiddlewareCheck:u=!0,preloadedState:d,enhancers:p}=e||{};let f,h;if("function"==typeof n)f=n;else{if(!l(n))throw new Error($e(1));f=function(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const o=t[r];"function"==typeof e[o]&&(n[o]=e[o])}const o=Object.keys(n);let a;try{!function(e){Object.keys(e).forEach(t=>{const n=e[t];if(void 0===n(void 0,{type:i.INIT}))throw new Error(r(12));if(void 0===n(void 0,{type:i.PROBE_UNKNOWN_ACTION()}))throw new Error(r(13))})}(n)}catch(e){a=e}return function(e={},t){if(a)throw a;let i=!1;const l={};for(let a=0;a<o.length;a++){const s=o[a],c=n[s],u=e[s],d=c(u,t);if(void 0===d)throw t&&t.type,new Error(r(14));l[s]=d,i=i||d!==u}return i=i||o.length!==Object.keys(e).length,i?l:e}}(n)}h="function"==typeof o?o(t):t();let m=c;a&&(m=ne({trace:!1,..."object"==typeof a&&a}));const g=function(...e){return t=>(n,o)=>{const a=t(n,o);let i=()=>{throw new Error(r(15))};const l={getState:a.getState,dispatch:(e,...t)=>i(e,...t)},s=e.map(e=>e(l));return i=c(...s)(a.dispatch),{...a,dispatch:i}}}(...h),b=ue(g);return s(f,d,m(..."function"==typeof p?p(b):b()))}function pe(e){const t={},n=[];let r;const o={addCase(e,n){const r="string"==typeof e?e:e.type;if(!r)throw new Error($e(28));if(r in t)throw new Error($e(29));return t[r]=n,o},addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),o),addDefaultCase:e=>(r=e,o)};return e(o),[t,n,r]}function fe(...e){return t=>e.some(e=>((e,t)=>re(e)?e.match(t):e(t))(e,t))}var he=["name","message","stack","code"],me=class{constructor(e,t){this.payload=e,this.meta=t}_type},ge=class{constructor(e,t){this.payload=e,this.meta=t}_type},be=e=>{if("object"==typeof e&&null!==e){const t={};for(const n of he)"string"==typeof e[n]&&(t[n]=e[n]);return t}return{message:String(e)}},ve="External signal was aborted",ye=(()=>{function e(e,t,n){const r=oe(e+"/fulfilled",(e,t,n,r)=>({payload:e,meta:{...r||{},arg:n,requestId:t,requestStatus:"fulfilled"}})),o=oe(e+"/pending",(e,t,n)=>({payload:void 0,meta:{...n||{},arg:t,requestId:e,requestStatus:"pending"}})),a=oe(e+"/rejected",(e,t,r,o,a)=>({payload:o,error:(n&&n.serializeError||be)(e||"Rejected"),meta:{...a||{},arg:r,requestId:t,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===e?.name,condition:"ConditionError"===e?.name}}));return Object.assign(function(e,{signal:i}={}){return(l,s,c)=>{const u=n?.idGenerator?n.idGenerator(e):((e=21)=>{let t="",n=e;for(;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t})(),d=new AbortController;let p,f;function h(e){f=e,d.abort()}i&&(i.aborted?h(ve):i.addEventListener("abort",()=>h(ve),{once:!0}));const m=async function(){let i;try{let a=n?.condition?.(e,{getState:s,extra:c});if(null!==(m=a)&&"object"==typeof m&&"function"==typeof m.then&&(a=await a),!1===a||d.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const g=new Promise((e,t)=>{p=()=>{t({name:"AbortError",message:f||"Aborted"})},d.signal.addEventListener("abort",p)});l(o(u,e,n?.getPendingMeta?.({requestId:u,arg:e},{getState:s,extra:c}))),i=await Promise.race([g,Promise.resolve(t(e,{dispatch:l,getState:s,extra:c,requestId:u,signal:d.signal,abort:h,rejectWithValue:(e,t)=>new me(e,t),fulfillWithValue:(e,t)=>new ge(e,t)})).then(t=>{if(t instanceof me)throw t;return t instanceof ge?r(t.payload,u,e,t.meta):r(t,u,e)})])}catch(t){i=t instanceof me?a(null,u,e,t.payload,t.meta):a(t,u,e)}finally{p&&d.signal.removeEventListener("abort",p)}var m;return n&&!n.dispatchConditionRejection&&a.match(i)&&i.meta.condition||l(i),i}();return Object.assign(m,{abort:h,requestId:u,arg:e,unwrap:()=>m.then(xe)})}},{pending:o,rejected:a,fulfilled:r,settled:fe(a,r),typePrefix:e})}return e.withTypes=()=>e,e})();function xe(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var we=Symbol.for("rtk-slice-createasyncthunk");function Ee(e,t){return`${e}/${t}`}function ke({creators:e}={}){const t=e?.asyncThunk?.[we];return function(e){const{name:n,reducerPath:r=n}=e;if(!n)throw new Error($e(11));const o=("function"==typeof e.reducers?e.reducers(function(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}()):e.reducers)||{},a=Object.keys(o),i={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(e,t){const n="string"==typeof e?e:e.type;if(!n)throw new Error($e(12));if(n in i.sliceCaseReducersByType)throw new Error($e(13));return i.sliceCaseReducersByType[n]=t,l},addMatcher:(e,t)=>(i.sliceMatchers.push({matcher:e,reducer:t}),l),exposeAction:(e,t)=>(i.actionCreators[e]=t,l),exposeCaseReducer:(e,t)=>(i.sliceCaseReducersByName[e]=t,l)};function s(){const[t={},n=[],r]="function"==typeof e.extraReducers?pe(e.extraReducers):[e.extraReducers],o={...t,...i.sliceCaseReducersByType};return function(e){let t,[a,l,s]=pe(e=>{for(let t in o)e.addCase(t,o[t]);for(let t of i.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)});if("function"==typeof e)t=()=>ie(e());else{const n=ie(e);t=()=>n}function c(e=t(),n){let r=[a[n.type],...l.filter(({matcher:e})=>e(n)).map(({reducer:e})=>e)];return 0===r.filter(e=>!!e).length&&(r=[s]),r.reduce((e,t)=>{if(t){if(v(e)){const r=t(e,n);return void 0===r?e:r}if(y(e))return te(e,e=>t(e,n));{const r=t(e,n);if(void 0===r){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}}return e},e)}return c.getInitialState=t,c}(e.initialState)}a.forEach(r=>{const a=o[r],i={reducerName:r,type:Ee(n,r),createNotation:"function"==typeof e.reducers};!function(e){return"asyncThunk"===e._reducerDefinitionType}(a)?function({type:e,reducerName:t,createNotation:n},r,o){let a,i;if("reducer"in r){if(n&&!function(e){return"reducerWithPrepare"===e._reducerDefinitionType}(r))throw new Error($e(17));a=r.reducer,i=r.prepare}else a=r;o.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?oe(e,i):oe(e))}(i,a,l):function({type:e,reducerName:t},n,r,o){if(!o)throw new Error($e(18));const{payloadCreator:a,fulfilled:i,pending:l,rejected:s,settled:c,options:u}=n,d=o(e,a,u);r.exposeAction(t,d),i&&r.addCase(d.fulfilled,i),l&&r.addCase(d.pending,l),s&&r.addCase(d.rejected,s),c&&r.addMatcher(d.settled,c),r.exposeCaseReducer(t,{fulfilled:i||Te,pending:l||Te,rejected:s||Te,settled:c||Te})}(i,a,l,t)});const c=e=>e,u=new Map,d=new WeakMap;let p;function f(e,t){return p||(p=s()),p(e,t)}function h(){return p||(p=s()),p.getInitialState()}function m(t,n=!1){function r(e){let o=e[t];return void 0===o&&n&&(o=le(d,r,h)),o}function o(t=c){const r=le(u,n,()=>new WeakMap);return le(r,t,()=>{const r={};for(const[o,a]of Object.entries(e.selectors??{}))r[o]=_e(a,t,()=>le(d,t,h),n);return r})}return{reducerPath:t,getSelectors:o,get selectors(){return o(r)},selectSlice:r}}const g={name:n,reducer:f,actions:i.actionCreators,caseReducers:i.sliceCaseReducersByName,getInitialState:h,...m(r),injectInto(e,{reducerPath:t,...n}={}){const o=t??r;return e.inject({reducerPath:o,reducer:f},n),{...g,...m(o,!0)}}};return g}}function _e(e,t,n,r){function o(o,...a){let i=t(o);return void 0===i&&r&&(i=n()),e(i,...a)}return o.unwrapped=e,o}var Ae=ke();function Te(){}var{assign:Se}=Object;function $e(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}Symbol.for("rtk-state-proxy-original")},7355:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(9155),o=n.n(r),a=n(3864),i=n(6538);const l=a.Ay.div`
|
|
3628
|
+
visibility: hidden;
|
|
3629
|
+
padding: 4px 8px;
|
|
3630
|
+
font-size: var(--_kindlychat-font-size-sm);
|
|
3631
|
+
background-color: ${e=>{let{theme:t}=e;return(0,i.w5)(t.background,"rgba(255, 255, 255, 0.9)","rgba(0, 0, 0, 0.9)")}};
|
|
3632
|
+
color: ${e=>{let{theme:t}=e;return(0,i.w5)(t.background,"rgba(0, 0, 0, 0.8)","rgba(255, 255, 255, 0.8)")}};
|
|
3633
|
+
border-radius: 6px;
|
|
3634
|
+
z-index: 99999;
|
|
3635
|
+
|
|
3636
|
+
/* Position the tooltip */
|
|
3637
|
+
position: absolute;
|
|
3638
|
+
width: max-content;
|
|
3639
|
+
word-break: normal;
|
|
3640
|
+
overflow-wrap: anywhere;
|
|
3641
|
+
${e=>{let{$position:t}=e;switch(t){case"top":default:return"bottom: 100%;";case"bottom":return"top: 100%;"}}}
|
|
3642
|
+
`,s=a.Ay.div`
|
|
3643
|
+
display: flex;
|
|
3722
3644
|
flex-direction: row;
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3645
|
+
align-items: center;
|
|
3646
|
+
position: relative;
|
|
3647
|
+
&:hover ${l} {
|
|
3648
|
+
visibility: visible;
|
|
3649
|
+
}
|
|
3650
|
+
`,c=function(e){let{children:t,text:n,position:a="top",testId:i="tooltip"}=e;const c=(0,r.useRef)(null);return(0,r.useEffect)(()=>{!function(){var e,t;const n=window.document.getElementById("chat-body-container")||window.kindlyChat.shadowRoot.getElementById("chat-body-container"),r=null===(e=c.current)||void 0===e?void 0:e.getBoundingClientRect(),o=null==n?void 0:n.getBoundingClientRect();if(!r||!n)return;const{x:a,y:i,left:l,width:s,height:u}=r||{x:0,y:0,left:0,width:0,height:0},{x:d,y:p,width:f,height:h=0}=o||{x:0,y:0,width:0,height:0};if(null===(t=c.current)||void 0===t||t.style.setProperty("max-width",f-40+"px"),a+s>d+f){var m;const e=d+f,t=Math.abs(e-l-40);null===(m=c.current)||void 0===m||m.style.setProperty("right",`-${t}px`)}else{var g,b;null===(g=c.current)||void 0===g||g.style.setProperty("left","50%"),null===(b=c.current)||void 0===b||b.style.setProperty("transform","translateX(-50%)")}var v,y,x,w;i-p<u&&(null===(v=c.current)||void 0===v||v.style.setProperty("top","100%"),null===(y=c.current)||void 0===y||y.style.setProperty("bottom","auto")),i+u>p+h&&(null===(x=c.current)||void 0===x||x.style.setProperty("top","auto"),null===(w=c.current)||void 0===w||w.style.setProperty("bottom","100%"))}()},[a]),o().createElement(s,{"data-testid":i},t,o().createElement(l,{ref:c,"data-testid":`${i}-text`,$position:a},n))}},7460:(e,t,n)=>{"use strict";var r=n(4603);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7487:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.default=function(e,t){return t?n({},e,t):e},e.exports=t.default},7498:(e,t,n)=>{"use strict";n.d(t,{A:()=>k});var r=n(9155),o=n.n(r),a=n(541),i=n(1872),l=n(5256),s=n(9223),c=n(3864),u=n(8905);const d=c.AH`
|
|
3651
|
+
border-radius: 100px;
|
|
3652
|
+
background-color: ${u.Tj.grayColor};
|
|
3653
|
+
`,p=c.Ay.div`
|
|
3654
|
+
height: 100%;
|
|
3655
|
+
width: 100%;
|
|
3656
|
+
display: grid;
|
|
3657
|
+
background-color: #fff;
|
|
3658
|
+
grid-template-rows: 55px 1fr 70px;
|
|
3659
|
+
`,f=c.Ay.div`
|
|
3660
|
+
padding: 10px 20px;
|
|
3661
|
+
display: grid;
|
|
3662
|
+
align-items: center;
|
|
3663
|
+
grid-template-columns: 30px 1fr 40px;
|
|
3664
|
+
box-shadow: 0px 3px 4px -1px ${u.Tj.shadowColor};
|
|
3665
|
+
`,h=c.Ay.div`
|
|
3666
|
+
height: 20px;
|
|
3667
|
+
width: 110px;
|
|
3668
|
+
margin-left: 20px;
|
|
3669
|
+
|
|
3670
|
+
${d}
|
|
3671
|
+
`,m=c.Ay.div`
|
|
3726
3672
|
display: flex;
|
|
3727
|
-
|
|
3673
|
+
flex-direction: column;
|
|
3728
3674
|
align-items: center;
|
|
3729
3675
|
justify-content: center;
|
|
3676
|
+
text-align: center;
|
|
3677
|
+
|
|
3678
|
+
width: 210px;
|
|
3679
|
+
margin: auto;
|
|
3680
|
+
`,g=c.Ay.span`
|
|
3730
3681
|
font-size: var(--_kindlychat-font-size-p);
|
|
3731
|
-
|
|
3732
|
-
|
|
3682
|
+
margin: 16px 0 24px 0;
|
|
3683
|
+
|
|
3684
|
+
${e=>e.heading&&"font-size: var(--_kindlychat-font-size-h4); font-weight: 400;\n margin: 0"};
|
|
3685
|
+
`,b=c.Ay.div`
|
|
3686
|
+
height: ${e=>e.size}px;
|
|
3687
|
+
min-width: ${e=>e.size}px;
|
|
3688
|
+
|
|
3689
|
+
${d}
|
|
3690
|
+
`,v=c.Ay.div`
|
|
3733
3691
|
display: flex;
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
border-
|
|
3738
|
-
`,
|
|
3739
|
-
height:
|
|
3740
|
-
width:
|
|
3741
|
-
|
|
3742
|
-
background: ${e=>{let{theme:t}=e;return t.buttonBackground}};
|
|
3743
|
-
cursor: pointer;
|
|
3744
|
-
appearance: none;
|
|
3745
|
-
margin-top: -6px;
|
|
3746
|
-
border: 1px solid rgba(0, 0, 0, 0.2);
|
|
3747
|
-
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.08);
|
|
3748
|
-
`,g=(e,t,n)=>(e-n)/(t-n)*100,b=i.Ay.input.attrs(e=>{let{theme:t,value:n,max:r,min:o}=e;return{style:{background:`linear-gradient(to right, ${t.buttonBackground} 0%, ${t.buttonBackground} ${g(n,r,o)}%, ${s((0,l.w5)(t.panelBackground,"#FFFFFF","#000000"),.08)} ${g(n,r,o)}%, ${s((0,l.w5)(t.panelBackground,"#FFFFFF","#000000"),.08)} 100%)`}}})`
|
|
3749
|
-
cursor: pointer;
|
|
3750
|
-
${c.jq}
|
|
3751
|
-
&[type='range'] {
|
|
3752
|
-
appearance: none;
|
|
3753
|
-
width: 100%;
|
|
3754
|
-
border-radius: 25px;
|
|
3755
|
-
height: 8px;
|
|
3756
|
-
margin: 0;
|
|
3692
|
+
align-items: center;
|
|
3693
|
+
padding: 15px 0;
|
|
3694
|
+
margin: 0 20px;
|
|
3695
|
+
border-top: 1px solid ${u.Tj.grayColor};
|
|
3696
|
+
`,y=c.Ay.div`
|
|
3697
|
+
height: 40px;
|
|
3698
|
+
width: 100%;
|
|
3699
|
+
margin-right: 20px;
|
|
3757
3700
|
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3701
|
+
${d}
|
|
3702
|
+
`;var x=n(167);const w=function(){const e=(0,a.wA)(),t=(0,r.useCallback)(()=>{e((0,i.ky)())},[e]);return o().createElement(p,null,o().createElement(f,null,o().createElement(b,{size:30}),o().createElement(h,null),o().createElement(x.I$,{"aria-label":"Close chat",title:"Close chat",type:"button",onClick:t,"data-testid":"close-chat-button"},o().createElement(l.US,{width:25,height:25}))),o().createElement(m,null,o().createElement(g,{heading:!0},"Oh no..."),o().createElement(g,null,"We were unable to load the chat. Please refresh or try again later."),o().createElement(s.A,{onClick:t,color:!0},"Refresh chat")),o().createElement(v,null,o().createElement(y,null),o().createElement(b,{size:40})))};class E extends r.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return e?{hasError:!0}:{}}componentDidCatch(e,t){var n;const{dispatch:r,errorPoint:o}=this.props,a=`Component tree crashed ${o}: ${e.message}`,l={errorName:e.name,errorMessage:e.message,errorStack:e.stack,point:o,componentStack:null==t||null===(n=t.componentStack)||void 0===n?void 0:n.trim()};r((0,i.Rm)({message:a,error:e,extra:l,level:"error"}))}render(){const{hasError:e}=this.state,{children:t,displayError:n}=this.props;return e&&n?o().createElement(w,null):e?null:t}}const k=(0,a.Ng)()(E)},7523:(e,t,n)=>{"use strict";n.d(t,{VZ:()=>r.Vq,_N:()=>a,_Y:()=>o,kP:()=>r._N,mz:()=>r._Y,ny:()=>i,zT:()=>l});var r=n(9313);const o="CONNECTED",a="DISCONNECTED",i="NEW_TOKEN",l="CONNECT_WITH_TRIGGER"},7525:(e,t,n)=>{"use strict";var r=n(8900),o=Object.defineProperty;e.exports=function(e,t){try{o(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},7603:(e,t,n)=>{"use strict";var r=n(9098),o=n(1005).includes,a=n(1203),i=n(8137);r({target:"Array",proto:!0,forced:a(function(){return!Array(1).includes()})},{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),i("includes")},7720:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=e=>t=>{let{id:n,chatbubble_temporary_id:r}=t;return!e.find(e=>{let{id:t}=e;return n===t||r===t})}},7752:(e,t,n)=>{"use strict";var r=n(262),o=n(9932),a=n(8655)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[a])?!!t:"RegExp"===o(e))}},7811:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(2221);const o=e=>{const t=(null!=e?e:"").toUpperCase();return"LINK"===t?r.lP.EXTERNAL_LINK:"TAKEOVER_REQUEST"===t?r.lP.HANDOVER_REQUEST:t}},7958:(e,t,n)=>{"use strict";function r(e,t,n){let r=null,o=[];const a=function(){for(var a=arguments.length,i=new Array(a),l=0;l<a;l++)i[l]=arguments[l];n&&o.push(i),r&&clearTimeout(r),r=setTimeout(()=>{if(n){const t=o.slice(1).reduce((e,t)=>n(t,e),o[0]);e(...t),o=[]}else e(...i)},t)};return a.cancel=()=>{r&&clearTimeout(r),o=[]},a}n.d(t,{A:()=>r})},8020:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(9155),o=n.n(r),a=n(824),i=n(8905);const l=n(3864).Ay.div`
|
|
3703
|
+
display: flex;
|
|
3704
|
+
flex-direction: row;
|
|
3705
|
+
justify-content: flex-start;
|
|
3706
|
+
align-items: flex-start;
|
|
3707
|
+
font-size: var(--_kindlychat-font-size-sm);
|
|
3708
|
+
${e=>{let{$show:t}=e;return t&&"margin-top: 4px;"}}
|
|
3709
|
+
right: 0;
|
|
3710
|
+
left: auto;
|
|
3711
|
+
color: var(--panel-background-white-black-contrast-1743170834);
|
|
3712
|
+
max-height: ${e=>{let{$show:t}=e;return t?"120px":"0px"}};
|
|
3713
|
+
opacity: ${e=>{let{$show:t}=e;return t?1:0}};
|
|
3714
|
+
transition:
|
|
3715
|
+
max-height 1s ease,
|
|
3716
|
+
opacity 240ms ease ${e=>{let{$show:t}=e;return t?"480ms":0}};
|
|
3717
|
+
|
|
3718
|
+
svg path {
|
|
3719
|
+
stroke: var(--panel-background-white-black-contrast-1743170834);
|
|
3720
|
+
}
|
|
3721
|
+
`;n(1949);const s=function(e){let{width:t=24,height:n=24,color:r="#333"}=e;return o().createElement("svg",{width:n,height:t,viewBox:"0 0 24 24",fill:"none"},o().createElement("path",{d:"M4.952 16.354l5.263-10.497c.738-1.472 2.839-1.472 3.576 0l5.258 10.497a2 2 0 01-1.788 2.896H6.741a2 2 0 01-1.789-2.896z",stroke:r,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M12 10v2",stroke:r,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M12.5 16a.5.5 0 11-1 0 .5.5 0 011 0z",stroke:r}))};var c=n(9272);const u=function(e){var t,n,r,u;let{name:d,control:p}=e;const{errors:f,isSubmitted:h}=(0,a.lN)({name:d,control:p}),m=(null===(t=f[d])||void 0===t?void 0:t.type)!==c.k1.CUSTOM&&((null===(n=f[d])||void 0===n?void 0:n.message)||(null===(r=f[`browser_error_${d}`])||void 0===r?void 0:r.message)||(null!==(u=f[d])&&void 0!==u&&u.ref&&"validationMessage"in f[d].ref?f[d].ref.validationMessage:void 0));return o().createElement(l,{$show:Boolean(m&&h),id:`error_${d}`},o().createElement(s,{width:16,height:16,color:i.Tj.errorColor}),"string"==typeof m?m:"")}},8043:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var r=n(9155),o=n.n(r),a=n(5256),i=n(1346),l=n(3699),s=n(3864),c=n(6538);const u=s.Ay.div`
|
|
3722
|
+
display: flex;
|
|
3723
|
+
flex-direction: row;
|
|
3724
|
+
padding: 8px 12px;
|
|
3725
|
+
gap: 8px;
|
|
3726
|
+
margin-top: 8px;
|
|
3727
|
+
border-radius: 6px;
|
|
3728
|
+
border: ${e=>{let{theme:t}=e;return`1px solid ${(0,c.w5)(t.panelBackground,"rgba(255, 255, 255, 0.08)","rgba(0, 0, 0, 0.08)")}`}};
|
|
3729
|
+
`,d=s.Ay.div`
|
|
3730
|
+
display: flex;
|
|
3731
|
+
flex-direction: column;
|
|
3732
|
+
flex: 1;
|
|
3733
|
+
`,p=s.Ay.div`
|
|
3734
|
+
font-size: var(--_kindlychat-font-size-p);
|
|
3735
|
+
color: var(--panel-background-white-black-contrast-1743170834);
|
|
3736
|
+
font-weight: 450;
|
|
3737
|
+
word-break: break-all;
|
|
3738
|
+
`,f=s.Ay.div`
|
|
3739
|
+
font-size: var(--_kindlychat-font-size-sm);
|
|
3740
|
+
color: ${e=>{let{theme:t}=e;return(0,c.w5)(t.panelBackground,"rgba(255, 255, 255, 0.8)","rgba(0, 0, 0, 0.8)")}};
|
|
3741
|
+
`,h=s.Ay.div`
|
|
3742
|
+
display: flex;
|
|
3743
|
+
flex-direction: row;
|
|
3744
|
+
justify-content: center;
|
|
3745
|
+
align-items: center;
|
|
3746
|
+
padding: 6px;
|
|
3747
|
+
& svg {
|
|
3748
|
+
& > path {
|
|
3749
|
+
stroke: ${e=>{let{theme:t}=e;return(0,c.w5)(t.panelBackground,"rgba(255, 255, 255, 0.8)","rgba(0, 0, 0, 0.8)")}};
|
|
3763
3750
|
}
|
|
3751
|
+
}
|
|
3752
|
+
`,m=s.Ay.div`
|
|
3753
|
+
display: flex;
|
|
3754
|
+
flex-direction: row;
|
|
3755
|
+
justify-content: center;
|
|
3756
|
+
align-items: center;
|
|
3757
|
+
font-size: calc(var(--_kindlychat-font-size-m) * 1.25);
|
|
3758
|
+
cursor: pointer;
|
|
3764
3759
|
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
cursor: pointer;
|
|
3769
|
-
border-radius: 25px;
|
|
3760
|
+
& svg {
|
|
3761
|
+
& > path {
|
|
3762
|
+
stroke: ${e=>{let{theme:t}=e;return(0,c.w5)(t.panelBackground,"rgba(255, 255, 255, 0.8)","rgba(0, 0, 0, 0.8)")}};
|
|
3770
3763
|
}
|
|
3771
3764
|
}
|
|
3772
|
-
`,v=function(e){let{from:t,to:n,value:i=1,affix:l,affixValue:s,step:c=1,onChange:m,name:g,field:v,ariaLabel:y,validators:x,hasController:w}=e;const E=(0,r.useMemo)(()=>{var e;const n=parseFloat(t);return Number.isNaN(n)?null==x||null===(e=x.find(e=>void 0!==e.min&&null!==e.min))||void 0===e?void 0:e.min:n},[t,x]),k=(0,r.useMemo)(()=>{var e;const t=parseFloat(n);return Number.isNaN(t)?null==x||null===(e=x.find(e=>void 0!==e.max&&null!==e.max))||void 0===e?void 0:e.max:t},[n,x]),[_,A]=(0,r.useState)(((e,t,n)=>t<e?e+n:t)(c,i,E));return o().createElement(u,{isForm:!!w},o().createElement(p,{isForm:!!w},l===a.rc.PREFIX&&o().createElement(d,null,s),o().createElement(f,null,_),l===a.rc.SUFFIX&&o().createElement(d,null,s)),o().createElement(h,null,o().createElement(b,{type:"range",name:g,step:c,min:E,max:k,value:_,onChange:e=>{var t;null!=e&&null!==(t=e.target)&&void 0!==t&&t.value&&(m&&m(e.target.value),null!=v&&v.onChange&&v.onChange(e),A(e.target.value))},"aria-label":y})))}},8628:(e,t,n)=>{"use strict";n.d(t,{jz:()=>k,B:()=>A,UB:()=>y,g4:()=>f,Rh:()=>m,eG:()=>d,mN:()=>O,_e:()=>L,wQ:()=>u,ky:()=>g,VK:()=>I,Mm:()=>w,ZS:()=>x,lQ:()=>v,Ln:()=>_,L4:()=>h,w7:()=>$,zn:()=>S,nI:()=>T,ob:()=>C,i1:()=>p,Z4:()=>b,V$:()=>E});var r=n(6367),o=n(2221),a=n(2366),i=n(4851),l=n(9313),s=n(7243),c=n(7173);const u=e=>(t,n)=>{const r=n().chatbubble.overlayViews[n().chatbubble.overlayViews.length-1];e&&r!==e&&t({type:c.wM,view:e})},d=()=>e=>{e({type:c.SO})},p=()=>e=>{e({type:c.nX})},f=e=>t=>{t({type:c.CB,botKey:e})},h=function(e){let{skipRestart:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return async(n,r)=>{const{botKey:a,chatHasStarted:l}=r().chatbubble,{takenOver:u}=r().agent,{token:d}=r().connection,{PAT_HOST:p}=r().environment;if(n({type:c.M2,code:e}),t||!l||u){if(l&&!await n((0,s.et)(`${p}/chatbubble/${o.Ak}/language_switch/`,{method:"POST",body:{languageCode:e},headers:(0,i.A)({token:d}).headers}))){const{currentLanguage:e}=r().chatbubble;n({type:c.M2,code:e})}}else n((0,s.zX)(a,!0))}},m=function(){let{source:e="user"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(t,n)=>{(0,r.tf)("close-chatbubble",void 0,{storeState:n(),source:e}),t({type:c.uS})}},g=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(t,n)=>{const{chatbubble:{botKey:r}}=n();t((0,s.zX)(r,e)),t(d());try{(0,l.Zf)()}catch(e){console.error(e)}}},b=()=>(e,t)=>{const{agent:{takenOver:n},connection:{token:r},environment:{PAT_HOST:a},chatbubble:{chatHasStarted:l,hasRequestedGreeting:u},local:{labels:d}}=t();l||e({type:c.d$,chatHasStarted:!0}),!u&&!n&&(null==d?void 0:d.length)>0&&e(((e,t)=>async n=>{n({type:c.d7,hasRequestedGreeting:!0}),await n((0,s.et)(`${t}/chatbubble/${o.Ak}/manual_greet/`,{method:"POST",...(0,i.A)({token:e})}))})(r,a))},v=function(){let{source:e="user"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(t,n)=>{const{pushMessages:a,alerts:i,bot:l,nudge:s,chatbubble:{chatHasStarted:u},bot:{welcomePageType:d}}=n(),p=!u&&d!==o.Lb.NONE;(0,r.tf)("open-chatbubble",{value:{nextPage:p?"welcome-page":"chat"}},{storeState:n(),source:e}),a.show&&t({type:c.a_}),s.show&&t({type:c.X2}),(i.showTabNotification||i.showBubbleNotification)&&t({type:c.u2}),t({type:c.kA}),l.welcomePage&&l.welcomePageType!==o.Lb.NONE||t(b())}},y=()=>(e,t)=>{const{active:n,previouslyPoppedUp:r}=t().chatbubble;n||r||(e(v({source:"programmatic"})),e({type:c.hn}))},x=()=>e=>{e({type:c.HW,userIsIdle:!0})},w=e=>(e,t)=>{const{userIsIdle:n}=t().chatbubble;n&&e({type:c.HW,userIsIdle:!1})},E=e=>(t,n)=>{var r,o;const{chatbubble:{contactDetailsButton:a}}=n();(null==a||null===(r=a.contact_details)||void 0===r?void 0:r.contact_type)===(null==e||null===(o=e.contact_details)||void 0===o?void 0:o.contact_type)?t({type:c.t1}):t({type:c.Eg,button:e})},k=e=>t=>{t({type:c.FZ,button:e})},_=e=>t=>{0===e.length?t({type:c.Q4}):t({type:c.TF,files:e})},A=()=>e=>{e({type:c.YR})},T=e=>t=>{t({type:c.uA,state:e})},S=e=>t=>{t({type:c.Xu,currentModal:e})},C=()=>(e,t)=>{setTimeout(()=>{const{chatbubble:{chatHasStarted:n}}=t();n&&e(S("FEEDBACK_END_HANDOVER"))},2e3)},$=e=>t=>{t({type:c.XM,isChatFullWindow:e})},O=()=>e=>{e(d()),e(b())},I=function(){let{responsePromise:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"html";return async(n,r)=>{let l=e?await e:null;if(!l){const{connection:{token:e},environment:{PAT_HOST:n}}=r(),s=`${n}/chatbubble/${o.Ak}/privacy/export/${t}`,{headers:c}=(0,i.A)({token:e}),u={method:"GET",headers:{...c,"kindly-chat-version":"2.76.4",[a.B]:(0,a.U)()}};l=await(async(e,t)=>{let n;return fetch(e,{...t,headers:{"Content-Type":"application/json","kindly-chat-version":"2.76.4",[a.B]:(0,a.U)(),...t.headers},body:JSON.stringify(t.body)}).then(e=>{if(!e.ok)throw new Error(e.statusText);const t=e.headers.get("Content-Disposition");return n=t.split(/;(.+)/)[1].split(/=(.+)/)[1],n=n.toLowerCase().startsWith("utf-8''")?decodeURIComponent(n.replace(/utf-8''/i,"")):n.replace(/['"]/g,""),e.blob()}).then(e=>{var t;const r=window.URL.createObjectURL(e),o=((null===(t=window.kindlyChat)||void 0===t?void 0:t.shadowRoot)||window.document).getElementById("chatContainer"),a=document.createElement("a");a.href=r,a.download=n,o.appendChild(a),a.click(),a.remove()})})(s,u)}}},L=function(){let{responsePromise:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async(t,n)=>{const{connection:{token:r},chatbubble:{botKey:a},environment:{PAT_HOST:l}}=n(),d=`${l}/chatbubble/${o.Ak}/privacy/delete/`,p=e?await e:await t((0,s.et)(d,{method:"DELETE",...(0,i.A)({token:r})}));200===(null==p?void 0:p.status)&&(t({type:c.CB,botKey:a,keepOpen:!0}),t(u("DELETED_CHAT")))}}},8639:(e,t,n)=>{"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){switch((0,a.default)(e)){case"void":return function(e){return e};case"string":return function(t){return(0,o.default)(t,[e])};case"array":return function(t){return(0,o.default)(t,e)};default:return console.error("Invalid paths argument, should be of type String, Array or Void")}};var o=r(n(4517)),a=r(n(4399));e.exports=t.default},8655:(e,t,n)=>{"use strict";var r=n(8900),o=n(8141),a=n(701),i=n(1268),l=n(4603),s=n(7460),c=r.Symbol,u=o("wks"),d=s?c.for||c:c&&c.withoutSetter||i;e.exports=function(e){return a(u,e)||(u[e]=l&&a(c,e)?c[e]:d("Symbol."+e)),u[e]}},8696:(e,t,n)=>{"use strict";var r=n(1203),o=n(2769),a=/#|\.prototype\./,i=function(e,t){var n=s[l(e)];return n===u||n!==c&&(o(t)?r(t):!!t)},l=i.normalize=function(e){return String(e).replace(a,".").toLowerCase()},s=i.data={},c=i.NATIVE="N",u=i.POLYFILL="P";e.exports=i},8780:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=e=>0===Object.keys(e).length},8900:function(e,t,n){"use strict";var r=function(e){return e&&e.Math===Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},8905:(e,t,n)=>{"use strict";n.d(t,{AV:()=>i,CM:()=>o,FR:()=>f,HM:()=>h,J:()=>l,Nl:()=>p,Nz:()=>d,Tj:()=>r,jO:()=>c,mb:()=>s,qd:()=>a,vI:()=>u});const r={darkColor:"#2c2c2c",primaryColor:"#0069ff",grayColor:"#edeeef",errorColor:"#fa4d1e",warningColor:"#ffca3a",successColor:"#50e39b",shadowColor:"rgba(0, 0, 0, 0.15)",shadowColorDark:"rgba(0, 0, 0, 0.3)",borderColorLight:"#ebebeb",borderColorDarkGray:"#d2d5d7",white:"#ffffff"},o={0:"#f7fafc",5:"#f4f7fa",10:"#f1f4f8",15:"#edf0f4",20:"#e8ecf1",30:"#dbe0e6",40:"#c8cfd8",50:"#afb8c4",60:"#8f9aaa",70:"#6a778a",80:"#445265",90:"#232f41",100:"#0c141f"},a={textColor:"#333333",textColorLight:"#757575"},i={dark:"#0D0D0D",light:"#F2F2F2"},l={extraSmall:"var(--_kindlychat-font-size-xs)",small:"var(--_kindlychat-font-size-sm)",p:"var(--_kindlychat-font-size-p)",h2:"var(--_kindlychat-font-size-h2)",h3:"var(--_kindlychat-font-size-h3)",h4:"var(--_kindlychat-font-size-h4)",h5:"var(--_kindlychat-font-size-m)",input:"var(--_kindlychat-font-size-input)"},s={tablet:"768px",phone:"500px"},c={minTablet:`(min-width: calc(${s.tablet} + 1px))`,maxTablet:`(max-width: ${s.tablet})`,maxPhone:`(max-width: ${s.phone})`,maxPhoneHeight:"(max-height: 760px)"},u={headerIndex:"15",overlayIndex:"20",contextMenuIndex:"30"},d={minWidth:190},p={icon:"10px",wrapper:"6px"},f={button:"0px 1px 4px 0px rgba(0, 0, 0, 0.08)",level2:"0px 4px 8px 0px rgba(0, 0, 0, 0.04), 0px 0px 1px 0px rgba(0, 0, 0, 0.16), 0px 8px 48px 0px rgba(0, 0, 0, 0.06)"},h={sunglow:"#FFF1CC",sunglowDark:"#4D3800",pomegranate:"#FFD7CC",pomegranateDark:"#4D1000"}},9098:(e,t,n)=>{"use strict";var r=n(8900),o=n(7013),a=n(9344),i=n(2769),l=n(4543).f,s=n(8696),c=n(8099),u=n(4572),d=n(3999),p=n(701);n(3753);var f=function(e){var t=function(n,r,a){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,a)}return o(e,this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var n,o,h,m,g,b,v,y,x,w=e.target,E=e.global,k=e.stat,_=e.proto,A=E?r:k?r[w]:r[w]&&r[w].prototype,T=E?c:c[w]||d(c,w,{})[w],S=T.prototype;for(m in t)o=!(n=s(E?m:w+(k?".":"#")+m,e.forced))&&A&&p(A,m),b=T[m],o&&(v=e.dontCallGetSet?(x=l(A,m))&&x.value:A[m]),g=o&&v?v:t[m],(n||_||typeof b!=typeof g)&&(y=e.bind&&o?u(g,r):e.wrap&&o?f(g):_&&i(g)?a(g):g,(e.sham||g&&g.sham||b&&b.sham)&&d(y,"sham",!0),d(T,m,y),_&&(p(c,h=w+"Prototype")||d(c,h,{}),d(c[h],m,g),e.real&&S&&(n||!S[m])&&d(S,m,g)))}},9100:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>l,cT:()=>a,ue:()=>i});var r=n(2221),o=n(7173);const a={KINDLY_GPT:"kindly-gpt"},i={id:null,name:"",avatar:"",botName:"",botAvatar:"",text:null,startOverText:"Start over",placeholder:"",typingIndicator:!1,typingDuration:"",isTyping:!1,typingType:void 0,realtimeAnalytics:!1,inputLimitEnabled:!1,inputLimit:140,welcomePage:null,welcomePageType:r.Lb.COLOR,pushGreetingsEnabled:!1,pushGreetings:[],tabNotification:!0,bubbleNotification:!0},l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case o.CB:return{...e,name:e.botName,avatar:e.botAvatar,splitLabelTimestamp:Date.now()};case o.A8:var n;return{...e,isTyping:e.typingIndicator,typingType:null===(n=t.data)||void 0===n?void 0:n.type};case o.wk:return{...e,isTyping:!1,typingType:void 0};case o.tq:return{...e,hasInteraction:!0,splitLabelTimestamp:Date.now()};case o.mw:return{...e,splitLabelTimestamp:Date.now(),splitTestLabel:t.splitTestLabel};case o.Q0:return{...e,splitLabelTimestamp:Date.now()};case o.Tc:return{...e,splitTestLabel:null,hasInteraction:null,splitLabelTimestamp:null};default:return e}}},9155:t=>{"use strict";t.exports=e},9223:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(9155),o=n.n(r),a=n(4935),i=n(3169),l=n(5545);function s(e,t){const{href:n,target:r,children:s,icon:c,text:u,loading:d=!1,isCheckbox:p=!1,type:f="button",onClick:h=a.A,cy:m,...g}=e,b=e=>{d?e.preventDefault():h(e)};return n?o().createElement(i.rK,Object.assign({ref:t,href:n,target:r,isCheckbox:p,onClick:b,$loading:d},g),d?o().createElement(l.A,{flat:g.flat,isCheckbox:p,loading:d}):o().createElement(i.EE,null,o().createElement(i.T3,null,s||u),o().createElement(i.Tu,null,c))):o().createElement(i.Ef,Object.assign({ref:t,onClick:b,isCheckbox:p,type:f,$loading:d,"data-testid":m},g),d?o().createElement(l.A,{flat:g.flat,isCheckbox:p,loading:d}):o().createElement(i.EE,null,o().createElement(i.T3,null,s||u),o().createElement(i.Tu,null,c)))}const c=o().forwardRef(s);c.displayName="Button";const u=c},9258:(e,t,n)=>{"use strict";var r=n(4713),o=n(2769),a=n(262),i=TypeError;e.exports=function(e,t){var n,l;if("string"===t&&o(n=e.toString)&&!a(l=r(n,e)))return l;if(o(n=e.valueOf)&&!a(l=r(n,e)))return l;if("string"!==t&&o(n=e.toString)&&!a(l=r(n,e)))return l;throw new i("Can't convert object to primitive value")}},9292:(e,t,n)=>{"use strict";n.d(t,{Ak:()=>r,W$:()=>o,dT:()=>l,fl:()=>i,gH:()=>a});const r="v2",o=Object.freeze(["agent","alerts","bot","chatbubble","nudge"]),a="chat-group",i="message-block",l="typing-indicator"},9308:(e,t,n)=>{"use strict";n.d(t,{X:()=>Be,A:()=>Ue});var r=n(4953),o=n.n(r),a=n(9155),i=n.n(a),l=n(541),s=n(5256),c=n(3864),u=n(4311),d=n(1872),p=n(1695),f=n(8905),h=n(4499),m=n(6538),g=n(3249);const b=c.AH`
|
|
3765
|
+
`,g=function(e){let{file:t,canRemove:n=!0,onRemove:r}=e;return o().createElement(u,null,o().createElement(h,null,o().createElement(i.A,{title:"attachment"})),o().createElement(d,null,o().createElement(p,null,t.name),o().createElement(f,null,(0,l.B$)(t.size))),n&&o().createElement(m,{onClick:r},o().createElement(a.US,{width:24,height:24})))}},8089:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",o=9007199254740991,a="[object Arguments]",i="[object Function]",l="[object Object]",s=/^\[object .+?Constructor\]$/,c=/^(?:0|[1-9]\d*)$/,u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u[a]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u[i]=u["[object Map]"]=u["[object Number]"]=u[l]=u["[object RegExp]"]=u["[object Set]"]=u["[object String]"]=u["[object WeakMap]"]=!1;var d,p,f,h="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,m="object"==typeof self&&self&&self.Object===Object&&self,g=h||m||Function("return this")(),b=t&&!t.nodeType&&t,v=b&&e&&!e.nodeType&&e,y=v&&v.exports===b,x=y&&h.process,w=function(){try{return v&&v.require&&v.require("util").types||x&&x.binding&&x.binding("util")}catch(e){}}(),E=w&&w.isTypedArray,k=Array.prototype,_=Function.prototype,A=Object.prototype,T=g["__core-js_shared__"],S=_.toString,$=A.hasOwnProperty,C=(d=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+d:"",O=A.toString,I=S.call(Object),L=RegExp("^"+S.call($).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),M=y?g.Buffer:void 0,N=g.Symbol,R=g.Uint8Array,P=(M&&M.allocUnsafe,p=Object.getPrototypeOf,f=Object,function(e){return p(f(e))}),D=Object.create,j=A.propertyIsEnumerable,F=k.splice,z=N?N.toStringTag:void 0,B=function(){try{var e=le(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),H=M?M.isBuffer:void 0,U=Math.max,V=Date.now,G=le(g,"Map"),W=le(Object,"create"),q=function(){function e(){}return function(t){if(!ye(t))return{};if(D)return D(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function K(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Y(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function X(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Z(e){var t=this.__data__=new Y(e);this.size=t.size}function J(e,t,n){(void 0!==n&&!pe(e[t],n)||void 0===n&&!(t in e))&&te(e,t,n)}function Q(e,t,n){var r=e[t];$.call(e,t)&&pe(r,n)&&(void 0!==n||t in e)||te(e,t,n)}function ee(e,t){for(var n=e.length;n--;)if(pe(e[n][0],t))return n;return-1}function te(e,t,n){"__proto__"==t&&B?B(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}K.prototype.clear=function(){this.__data__=W?W(null):{},this.size=0},K.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},K.prototype.get=function(e){var t=this.__data__;if(W){var n=t[e];return n===r?void 0:n}return $.call(t,e)?t[e]:void 0},K.prototype.has=function(e){var t=this.__data__;return W?void 0!==t[e]:$.call(t,e)},K.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=W&&void 0===t?r:t,this},Y.prototype.clear=function(){this.__data__=[],this.size=0},Y.prototype.delete=function(e){var t=this.__data__,n=ee(t,e);return!(n<0||(n==t.length-1?t.pop():F.call(t,n,1),--this.size,0))},Y.prototype.get=function(e){var t=this.__data__,n=ee(t,e);return n<0?void 0:t[n][1]},Y.prototype.has=function(e){return ee(this.__data__,e)>-1},Y.prototype.set=function(e,t){var n=this.__data__,r=ee(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},X.prototype.clear=function(){this.size=0,this.__data__={hash:new K,map:new(G||Y),string:new K}},X.prototype.delete=function(e){var t=ie(this,e).delete(e);return this.size-=t?1:0,t},X.prototype.get=function(e){return ie(this,e).get(e)},X.prototype.has=function(e){return ie(this,e).has(e)},X.prototype.set=function(e,t){var n=ie(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Z.prototype.clear=function(){this.__data__=new Y,this.size=0},Z.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Z.prototype.get=function(e){return this.__data__.get(e)},Z.prototype.has=function(e){return this.__data__.has(e)},Z.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Y){var r=n.__data__;if(!G||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new X(r)}return n.set(e,t),this.size=n.size,this};function ne(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":z&&z in Object(e)?function(e){var t=$.call(e,z),n=e[z];try{e[z]=void 0;var r=!0}catch(e){}var o=O.call(e);return r&&(t?e[z]=n:delete e[z]),o}(e):function(e){return O.call(e)}(e)}function re(e){return xe(e)&&ne(e)==a}function oe(e,t,n,r,o){e!==t&&function(e,t,n){for(var r=-1,o=Object(e),a=n(e),i=a.length;i--;){var l=a[++r];if(!1===t(o[l],l,o))break}}(t,function(a,i){if(o||(o=new Z),ye(a))!function(e,t,n,r,o,a,i){var s=ue(e,n),c=ue(t,n),u=i.get(c);if(u)J(e,n,u);else{var d,p,f,h,m,g=a?a(s,c,n+"",e,t,i):void 0,b=void 0===g;if(b){var v=he(c),y=!v&&ge(c),x=!v&&!y&&we(c);g=c,v||y||x?he(s)?g=s:xe(m=s)&&me(m)?g=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(s):y?(b=!1,g=function(e){return e.slice()}(c)):x?(b=!1,h=new(f=(d=c).buffer).constructor(f.byteLength),new R(h).set(new R(f)),p=h,g=new d.constructor(p,d.byteOffset,d.length)):g=[]:function(e){if(!xe(e)||ne(e)!=l)return!1;var t=P(e);if(null===t)return!0;var n=$.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&S.call(n)==I}(c)||fe(c)?(g=s,fe(s)?g=function(e){return function(e,t,n){var r=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var i=t[o],l=void 0;void 0===l&&(l=e[i]),r?te(n,i,l):Q(n,i,l)}return n}(e,Ee(e))}(s):ye(s)&&!be(s)||(g=function(e){return"function"!=typeof e.constructor||ce(e)?{}:q(P(e))}(c))):b=!1}b&&(i.set(c,g),o(g,c,r,a,i),i.delete(c)),J(e,n,g)}}(e,t,i,n,oe,r,o);else{var s=r?r(ue(e,i),a,i+"",e,t,o):void 0;void 0===s&&(s=a),J(e,i,s)}},Ee)}var ae=B?function(e,t){return B(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:Ae;function ie(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function le(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!ye(e)||function(e){return!!C&&C in e}(e))&&(be(e)?L:s).test(function(e){if(null!=e){try{return S.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function se(e,t){var n=typeof e;return!!(t=null==t?o:t)&&("number"==n||"symbol"!=n&&c.test(e))&&e>-1&&e%1==0&&e<t}function ce(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||A)}function ue(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var de=function(e){var t=0,n=0;return function(){var r=V(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ae);function pe(e,t){return e===t||e!=e&&t!=t}var fe=re(function(){return arguments}())?re:function(e){return xe(e)&&$.call(e,"callee")&&!j.call(e,"callee")},he=Array.isArray;function me(e){return null!=e&&ve(e.length)&&!be(e)}var ge=H||function(){return!1};function be(e){if(!ye(e))return!1;var t=ne(e);return t==i||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ve(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function ye(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function xe(e){return null!=e&&"object"==typeof e}var we=E?function(e){return function(t){return e(t)}}(E):function(e){return xe(e)&&ve(e.length)&&!!u[ne(e)]};function Ee(e){return me(e)?function(e,t){var n=he(e),r=!n&&fe(e),o=!n&&!r&&ge(e),a=!n&&!r&&!o&&we(e),i=n||r||o||a,l=i?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],s=l.length;for(var c in e)!t&&!$.call(e,c)||i&&("length"==c||o&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||se(c,s))||l.push(c);return l}(e,!0):function(e){if(!ye(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=ce(e),n=[];for(var r in e)("constructor"!=r||!t&&$.call(e,r))&&n.push(r);return n}(e)}var ke,_e=(ke=function(e,t,n){oe(e,t,n)},function(e,t){return de(function(e,t,n){return t=U(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,a=U(r.length-t,0),i=Array(a);++o<a;)i[o]=r[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=r[o];return l[t]=n(i),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,l)}}(e,t,Ae),e+"")}(function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,a=r>2?t[2]:void 0;for(o=ke.length>3&&"function"==typeof o?(r--,o):void 0,a&&function(e,t,n){if(!ye(n))return!1;var r=typeof t;return!!("number"==r?me(n)&&se(t,n.length):"string"==r&&t in n)&&pe(n[t],e)}(t[0],t[1],a)&&(o=r<3?void 0:o,r=1),e=Object(e);++n<r;){var i=t[n];i&&ke(e,i,n)}return e}));function Ae(e){return e}e.exports=_e},8099:e=>{"use strict";e.exports={}},8130:(e,t,n)=>{"use strict";var r=n(8146);e.exports=function(e){return r(e.length)}},8137:e=>{"use strict";e.exports=function(){}},8141:(e,t,n)=>{"use strict";var r=n(3753);e.exports=function(e,t){return r[e]||(r[e]=t||{})}},8146:(e,t,n)=>{"use strict";var r=n(9903),o=Math.min;e.exports=function(e){var t=r(e);return t>0?o(t,9007199254740991):0}},8172:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(9749),o=n.n(r);function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.entries(e).reduce((e,n)=>{let[r,a]=n;return{...e,...o()(t).call(t,r)?{[r]:a}:{}}},{})}},8341:(e,t,n)=>{"use strict";n(7603);var r=n(2856);e.exports=r("Array","includes")},8407:(e,t,n)=>{"use strict";var r=n(4904),o=n(2769),a=n(9932),i=n(8655)("toStringTag"),l=Object,s="Arguments"===a(function(){return arguments}());e.exports=r?a:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=l(e),i))?n:s?a(t):"Object"===(r=a(t))&&o(t.callee)?"Arguments":r}},8411:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const r=new Set;function o(e){var t,n;const{feedbackSettings:o}=window.__KINDLY_SETTINGS__,a=null==o||null===(t=o[e])||void 0===t?void 0:t.forms.find(e=>"bot_conversation"===e.trigger_type&&e.is_active),i=null==o||null===(n=o[e])||void 0===n?void 0:n.forms.find(e=>"handover_conversation"===e.trigger_type&&e.is_active);return{botConversationFeedback:a,handoverConversationFeedback:i,preloadFeedbackImages:e=>{const t="bot_conversation"===e?a:i;t&&t.rating_scale.edit_labels.forEach(e=>{if(r.has(e.image))return;const t=new Image;t.src=e.image,r.add(t.src)})}}}},8483:(e,t,n)=>{"use strict";n.d(t,{UJ:()=>u,XO:()=>h,fk:()=>p,mg:()=>f,qf:()=>d});var r=n(2221),o=n(4851),a=n(9313),i=n(5564),l=n(7243),s=n(7173);const c="pusherTransportEncrypted",u=()=>(e,t)=>{const{connected:n}=t().connection;n||e({type:s._Y})},d=()=>(e,t)=>{const{connected:n}=t().connection;n&&e({type:s._N})},p=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return async n=>{const r=JSON.parse(window.localStorage.getItem(c));t.indexOf("ws")<0&&r&&"ws"!==r.transport&&window.localStorage.removeItem(c),await n((0,i.JL)()),await n((0,i.$u)()),(0,a.Xs)({channelAuthorization:{headers:{"kindly-chatbubble-token":e,"Current-Url":window.location.href}},disabledTransports:t}),(0,l.Cy)(e)}},f=function(){let{triggerDialogueSlug:e,languageCode:t,shouldGreet:n=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async(i,c)=>{var u,d,f;const{local:{context:h,labels:m},chatbubble:{botKey:g,currentLanguage:b,disabledTransports:v},environment:{PAT_HOST:y},bot:{includeDisabledLanguages:x}}=c();i({type:s.d7,hasRequestedGreeting:n}),n&&i({type:s.A8});const w=(new Date).toISOString(),E=await i((0,l.et)(`${y}/chatbubble/${r.Ak}/connect`,{method:"POST",body:{labels:m,context:h,language_code:t||b,trigger_dialogue_slug:e,include_disabled_languages:x,should_greet:n,include_greeting:!0,tz:null===Intl||void 0===Intl||null===(u=Intl.DateTimeFormat)||void 0===u||null===(d=u.call(Intl))||void 0===d||null===(f=d.resolvedOptions())||void 0===f?void 0:f.timeZone},...(0,o.A)({botKey:g},{withCurrentUrl:!0,withVersion:!0})}));if(!E)return i({type:s.wk}),!1;const{pusherConnected:k}=c().connection;if(k)try{(0,a.Zf)()}catch(e){console.warn(e)}const{token:_,chat_id:A,created:T,all_greetings_hide_input:S,greeting:$,live_translation_system_dialogue:C}=E.data;return i({type:s.wk}),i({type:s.ny,token:_,chatId:A,allGreetingsHideInput:S}),i({type:s.nm,startedAt:T}),i((0,l.TP)(w)),C&&i({type:s.tq,data:C}),$&&i({type:s.tq,data:$}),i(p(_,v)),!0}},h=e=>t=>t({type:s.zT,triggerConfig:e})},8628:(e,t,n)=>{"use strict";n.d(t,{jz:()=>_,B:()=>T,UB:()=>x,g4:()=>h,Rh:()=>g,eG:()=>p,mN:()=>I,_e:()=>M,wQ:()=>d,ky:()=>b,VK:()=>L,Mm:()=>E,ZS:()=>w,lQ:()=>y,Ln:()=>A,L4:()=>m,w7:()=>O,zn:()=>$,nI:()=>S,ob:()=>C,i1:()=>f,Z4:()=>v,V$:()=>k});var r=n(6367),o=n(2221),a=n(2366),i=n(4851),l=n(9313),s=n(7243),c=n(7173),u=n(5767);const d=e=>(t,n)=>{const r=n().chatbubble.overlayViews[n().chatbubble.overlayViews.length-1];e&&r!==e&&t({type:c.wM,view:e})},p=()=>e=>{e({type:c.SO})},f=()=>e=>{e({type:c.nX})},h=e=>t=>{t({type:c.CB,botKey:e})},m=function(e){let{skipRestart:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return async(n,r)=>{const{botKey:a,chatHasStarted:l}=r().chatbubble,{takenOver:u}=r().agent,{token:d}=r().connection,{PAT_HOST:p}=r().environment;if(n({type:c.M2,code:e}),t||!l||u){if(l&&!await n((0,s.et)(`${p}/chatbubble/${o.Ak}/language_switch/`,{method:"POST",body:{languageCode:e},headers:(0,i.A)({token:d}).headers}))){const{currentLanguage:e}=r().chatbubble;n({type:c.M2,code:e})}}else n((0,s.zX)(a,!0))}},g=function(){let{source:e="user"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(t,n)=>{(0,r.tf)("close-chatbubble",void 0,{storeState:n(),source:e}),t({type:c.uS})}},b=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(t,n)=>{const{chatbubble:{botKey:r}}=n();t((0,s.zX)(r,e)),t(p());try{(0,l.Zf)()}catch(e){console.error(e)}}},v=()=>(e,t)=>{const{agent:{takenOver:n},connection:{token:r},environment:{PAT_HOST:a},chatbubble:{chatHasStarted:l,hasRequestedGreeting:u},local:{labels:d}}=t();l||e({type:c.d$,chatHasStarted:!0}),!u&&!n&&(null==d?void 0:d.length)>0&&e(((e,t)=>async n=>{n({type:c.d7,hasRequestedGreeting:!0}),await n((0,s.et)(`${t}/chatbubble/${o.Ak}/manual_greet/`,{method:"POST",...(0,i.A)({token:e})}))})(r,a))},y=function(){let{source:e="user"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(t,n)=>{const{pushMessages:a,alerts:i,bot:l,nudge:s,chatbubble:{chatHasStarted:u},bot:{welcomePageType:d}}=n(),p=!u&&d!==o.Lb.NONE;(0,r.tf)("open-chatbubble",{value:{nextPage:p?"welcome-page":"chat"}},{storeState:n(),source:e}),a.show&&t({type:c.a_}),s.show&&t({type:c.X2}),(i.showTabNotification||i.showBubbleNotification)&&t({type:c.u2}),t({type:c.kA}),l.welcomePage&&l.welcomePageType!==o.Lb.NONE||t(v())}},x=()=>(e,t)=>{const{active:n,previouslyPoppedUp:r}=t().chatbubble;n||r||(e(y({source:"programmatic"})),e({type:c.hn}))},w=()=>e=>{e({type:c.HW,userIsIdle:!0})},E=e=>(e,t)=>{const{userIsIdle:n}=t().chatbubble;n&&e({type:c.HW,userIsIdle:!1})},k=e=>(t,n)=>{var r,o;const{chatbubble:{contactDetailsButton:a}}=n();(null==a||null===(r=a.contact_details)||void 0===r?void 0:r.contact_type)===(null==e||null===(o=e.contact_details)||void 0===o?void 0:o.contact_type)?t({type:c.t1}):t({type:c.Eg,button:e})},_=e=>t=>{t({type:c.FZ,button:e})},A=e=>t=>{0===e.length?t({type:c.Q4}):t({type:c.TF,files:e})},T=()=>e=>{e({type:c.YR})},S=e=>t=>{t({type:c.uA,state:e})},$=e=>t=>{t({type:c.Xu,currentModal:e})},C=e=>(t,n)=>{setTimeout(()=>{const{chatbubble:{chatHasStarted:r}}=n();r&&(t((0,u.WG)({ratingSystem:e.rating_scale.rating_system,triggerType:e.trigger_type,formTitle:e.form_title,step:"RATING_SCALE"})),t($("FEEDBACK_END_HANDOVER")))},2e3)},O=e=>t=>{t({type:c.XM,isChatFullWindow:e})},I=()=>e=>{e(p()),e(v())},L=function(){let{responsePromise:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"html";return async(n,r)=>{let l=e?await e:null;if(!l){const{connection:{token:e},environment:{PAT_HOST:n}}=r(),s=`${n}/chatbubble/${o.Ak}/privacy/export/${t}`,{headers:c}=(0,i.A)({token:e}),u={method:"GET",headers:{...c,"kindly-chat-version":"2.76.7",[a.B]:(0,a.U)()}};l=await(async(e,t)=>{let n;return fetch(e,{...t,headers:{"Content-Type":"application/json","kindly-chat-version":"2.76.7",[a.B]:(0,a.U)(),...t.headers},body:JSON.stringify(t.body)}).then(e=>{if(!e.ok)throw new Error(e.statusText);const t=e.headers.get("Content-Disposition");return n=t.split(/;(.+)/)[1].split(/=(.+)/)[1],n=n.toLowerCase().startsWith("utf-8''")?decodeURIComponent(n.replace(/utf-8''/i,"")):n.replace(/['"]/g,""),e.blob()}).then(e=>{var t;const r=window.URL.createObjectURL(e),o=((null===(t=window.kindlyChat)||void 0===t?void 0:t.shadowRoot)||window.document).getElementById("chatContainer"),a=document.createElement("a");a.href=r,a.download=n,o.appendChild(a),a.click(),a.remove()})})(s,u)}}},M=function(){let{responsePromise:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async(t,n)=>{const{connection:{token:r},chatbubble:{botKey:a},environment:{PAT_HOST:l}}=n(),u=`${l}/chatbubble/${o.Ak}/privacy/delete/`,p=e?await e:await t((0,s.et)(u,{method:"DELETE",...(0,i.A)({token:r})}));200===(null==p?void 0:p.status)&&(t({type:c.CB,botKey:a,keepOpen:!0}),t(d("DELETED_CHAT")))}}},8639:(e,t,n)=>{"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){switch((0,a.default)(e)){case"void":return function(e){return e};case"string":return function(t){return(0,o.default)(t,[e])};case"array":return function(t){return(0,o.default)(t,e)};default:return console.error("Invalid paths argument, should be of type String, Array or Void")}};var o=r(n(4517)),a=r(n(4399));e.exports=t.default},8655:(e,t,n)=>{"use strict";var r=n(8900),o=n(8141),a=n(701),i=n(1268),l=n(4603),s=n(7460),c=r.Symbol,u=o("wks"),d=s?c.for||c:c&&c.withoutSetter||i;e.exports=function(e){return a(u,e)||(u[e]=l&&a(c,e)?c[e]:d("Symbol."+e)),u[e]}},8696:(e,t,n)=>{"use strict";var r=n(1203),o=n(2769),a=/#|\.prototype\./,i=function(e,t){var n=s[l(e)];return n===u||n!==c&&(o(t)?r(t):!!t)},l=i.normalize=function(e){return String(e).replace(a,".").toLowerCase()},s=i.data={},c=i.NATIVE="N",u=i.POLYFILL="P";e.exports=i},8780:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=e=>0===Object.keys(e).length},8900:function(e,t,n){"use strict";var r=function(e){return e&&e.Math===Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},8905:(e,t,n)=>{"use strict";n.d(t,{AV:()=>i,CM:()=>o,FR:()=>f,HM:()=>h,J:()=>l,Nl:()=>p,Nz:()=>d,Tj:()=>r,jO:()=>c,mb:()=>s,qd:()=>a,vI:()=>u});const r={darkColor:"#2c2c2c",primaryColor:"#0069ff",grayColor:"#edeeef",errorColor:"#fa4d1e",warningColor:"#ffca3a",successColor:"#50e39b",shadowColor:"rgba(0, 0, 0, 0.15)",shadowColorDark:"rgba(0, 0, 0, 0.3)",borderColorLight:"#ebebeb",borderColorDarkGray:"#d2d5d7",white:"#ffffff"},o={0:"#f7fafc",5:"#f4f7fa",10:"#f1f4f8",15:"#edf0f4",20:"#e8ecf1",30:"#dbe0e6",40:"#c8cfd8",50:"#afb8c4",60:"#8f9aaa",70:"#6a778a",80:"#445265",90:"#232f41",100:"#0c141f"},a={textColor:"#333333",textColorLight:"#757575"},i={dark:"#0D0D0D",light:"#F2F2F2"},l={extraSmall:"var(--_kindlychat-font-size-xs)",small:"var(--_kindlychat-font-size-sm)",p:"var(--_kindlychat-font-size-p)",h2:"var(--_kindlychat-font-size-h2)",h3:"var(--_kindlychat-font-size-h3)",h4:"var(--_kindlychat-font-size-h4)",h5:"var(--_kindlychat-font-size-m)",input:"var(--_kindlychat-font-size-input)"},s={tablet:"768px",phone:"500px"},c={minTablet:`(min-width: calc(${s.tablet} + 1px))`,maxTablet:`(max-width: ${s.tablet})`,maxPhone:`(max-width: ${s.phone})`,maxPhoneHeight:"(max-height: 760px)"},u={headerIndex:"15",overlayIndex:"20",contextMenuIndex:"30"},d={minWidth:190},p={icon:"10px",wrapper:"6px"},f={button:"0px 1px 4px 0px rgba(0, 0, 0, 0.08)",level2:"0px 4px 8px 0px rgba(0, 0, 0, 0.04), 0px 0px 1px 0px rgba(0, 0, 0, 0.16), 0px 8px 48px 0px rgba(0, 0, 0, 0.06)"},h={sunglow:"#FFF1CC",sunglowDark:"#4D3800",pomegranate:"#FFD7CC",pomegranateDark:"#4D1000"}},9098:(e,t,n)=>{"use strict";var r=n(8900),o=n(7013),a=n(9344),i=n(2769),l=n(4543).f,s=n(8696),c=n(8099),u=n(4572),d=n(3999),p=n(701);n(3753);var f=function(e){var t=function(n,r,a){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,a)}return o(e,this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var n,o,h,m,g,b,v,y,x,w=e.target,E=e.global,k=e.stat,_=e.proto,A=E?r:k?r[w]:r[w]&&r[w].prototype,T=E?c:c[w]||d(c,w,{})[w],S=T.prototype;for(m in t)o=!(n=s(E?m:w+(k?".":"#")+m,e.forced))&&A&&p(A,m),b=T[m],o&&(v=e.dontCallGetSet?(x=l(A,m))&&x.value:A[m]),g=o&&v?v:t[m],(n||_||typeof b!=typeof g)&&(y=e.bind&&o?u(g,r):e.wrap&&o?f(g):_&&i(g)?a(g):g,(e.sham||g&&g.sham||b&&b.sham)&&d(y,"sham",!0),d(T,m,y),_&&(p(c,h=w+"Prototype")||d(c,h,{}),d(c[h],m,g),e.real&&S&&(n||!S[m])&&d(S,m,g)))}},9100:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>l,cT:()=>a,ue:()=>i});var r=n(2221),o=n(7173);const a={KINDLY_GPT:"kindly-gpt"},i={id:null,name:"",avatar:"",botName:"",botAvatar:"",text:null,startOverText:"Start over",placeholder:"",typingIndicator:!1,typingDuration:"",isTyping:!1,typingType:void 0,realtimeAnalytics:!1,inputLimitEnabled:!1,inputLimit:140,welcomePage:null,welcomePageType:r.Lb.COLOR,pushGreetingsEnabled:!1,pushGreetings:[],tabNotification:!0,bubbleNotification:!0},l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case o.CB:return{...e,name:e.botName,avatar:e.botAvatar,splitLabelTimestamp:Date.now()};case o.A8:var n;return{...e,isTyping:e.typingIndicator,typingType:null===(n=t.data)||void 0===n?void 0:n.type};case o.wk:return{...e,isTyping:!1,typingType:void 0};case o.tq:return{...e,hasInteraction:!0,splitLabelTimestamp:Date.now()};case o.mw:return{...e,splitLabelTimestamp:Date.now(),splitTestLabel:t.splitTestLabel};case o.Q0:return{...e,splitLabelTimestamp:Date.now()};case o.Tc:return{...e,splitTestLabel:null,hasInteraction:null,splitLabelTimestamp:null};default:return e}}},9155:t=>{"use strict";t.exports=e},9223:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(9155),o=n.n(r),a=n(4935),i=n(3169),l=n(5545);function s(e,t){const{href:n,target:r,children:s,icon:c,text:u,loading:d=!1,isCheckbox:p=!1,type:f="button",onClick:h=a.A,cy:m,isSecondaryButton:g=!1,flat:b,disabled:v,selected:y,...x}=e,w=e=>{d?e.preventDefault():h(e)};return n?o().createElement(i.rK,Object.assign({ref:t,href:n,target:r,$isCheckbox:p,onClick:w,$loading:d,$isSecondaryButton:g},x),d?o().createElement(l.A,{flat:x.flat,isCheckbox:p,loading:d}):o().createElement(i.EE,null,o().createElement(i.T3,null,s||u),o().createElement(i.Tu,null,c))):o().createElement(i.Ef,Object.assign({ref:t,onClick:w,$isCheckbox:p,type:f,$loading:d,"data-testid":m,$isSecondaryButton:g,$flat:b,$disabled:v,$selected:y},x),d?o().createElement(l.A,{flat:x.flat,isCheckbox:p,loading:d}):o().createElement(i.EE,null,o().createElement(i.T3,null,s||u),o().createElement(i.Tu,null,c)))}const c=o().forwardRef(s);c.displayName="Button";const u=c},9258:(e,t,n)=>{"use strict";var r=n(4713),o=n(2769),a=n(262),i=TypeError;e.exports=function(e,t){var n,l;if("string"===t&&o(n=e.toString)&&!a(l=r(n,e)))return l;if(o(n=e.valueOf)&&!a(l=r(n,e)))return l;if("string"!==t&&o(n=e.toString)&&!a(l=r(n,e)))return l;throw new i("Can't convert object to primitive value")}},9272:(e,t,n)=>{"use strict";n.d(t,{KN:()=>o,ZF:()=>a,cJ:()=>r,k1:()=>i});const r={TEXT:"TEXT",CHECKBOX:"CHECKBOX",RANGE:"RANGE",EMAIL:"EMAIL",NUMBER:"NUMBER",SELECT:"SELECT",RADIO:"RADIO",FILE:"FILE",TEXTAREA:"TEXTAREA"},o={ACTIVE:"ACTIVE",SUBMITTED:"SUBMITTED",CANCELED:"CANCELED",UNANSWERED:"UNANSWERED",ERRORED:"ERRORED"},a={PATTERN:"pattern",REQUIRED:"required",MAX_LENGTH:"max_length",MIN_LENGTH:"min_length",min:"min",max:"max"},i={CUSTOM:"custom",BROWSER:"browser"}},9292:(e,t,n)=>{"use strict";n.d(t,{Ak:()=>r,W$:()=>o,dT:()=>l,fl:()=>i,gH:()=>a});const r="v2",o=Object.freeze(["agent","alerts","bot","chatbubble","nudge"]),a="chat-group",i="message-block",l="typing-indicator"},9308:(e,t,n)=>{"use strict";n.d(t,{X:()=>Be,A:()=>Ue});var r=n(4953),o=n.n(r),a=n(9155),i=n.n(a),l=n(541),s=n(5256),c=n(3864),u=n(4311),d=n(1872),p=n(1695),f=n(8905),h=n(4499),m=n(6538),g=n(3249);const b=c.AH`
|
|
3773
3766
|
& > div,
|
|
3774
3767
|
& > svg {
|
|
3775
3768
|
z-index: 3;
|
|
@@ -3789,7 +3782,7 @@
|
|
|
3789
3782
|
top: 0;
|
|
3790
3783
|
width: 100%;
|
|
3791
3784
|
height: 100%;
|
|
3792
|
-
background-color: ${e=>{let{background:t}=e;return t||""}};
|
|
3785
|
+
background-color: ${e=>{let{$background:t}=e;return t||""}};
|
|
3793
3786
|
border-radius: 48px;
|
|
3794
3787
|
transition: all 0.2s ease;
|
|
3795
3788
|
}
|
|
@@ -3825,13 +3818,13 @@
|
|
|
3825
3818
|
@media ${f.jO.maxPhone} {
|
|
3826
3819
|
&:before {
|
|
3827
3820
|
border-radius: 0px;
|
|
3828
|
-
${e=>{let{isLast:t}=e;return t&&"border-top-left-radius: 48px; border-bottom-left-radius: 48px;"}}
|
|
3821
|
+
${e=>{let{$isLast:t}=e;return t&&"border-top-left-radius: 48px; border-bottom-left-radius: 48px;"}}
|
|
3829
3822
|
}
|
|
3830
3823
|
&:focus,
|
|
3831
3824
|
&:active {
|
|
3832
3825
|
&:after {
|
|
3833
3826
|
border-radius: 0px;
|
|
3834
|
-
${e=>{let{isLast:t}=e;return t&&"border-top-left-radius: 48px; border-bottom-left-radius: 48px;"}}
|
|
3827
|
+
${e=>{let{$isLast:t}=e;return t&&"border-top-left-radius: 48px; border-bottom-left-radius: 48px;"}}
|
|
3835
3828
|
}
|
|
3836
3829
|
}
|
|
3837
3830
|
}
|
|
@@ -3853,7 +3846,7 @@
|
|
|
3853
3846
|
transition: border 240ms;
|
|
3854
3847
|
cursor: pointer;
|
|
3855
3848
|
height: 100%;
|
|
3856
|
-
color: ${e=>{let{background:t}=e;return(0,m.w5)(t||"","#F2F2F2","#0D0D0D")}};
|
|
3849
|
+
color: ${e=>{let{$background:t}=e;return(0,m.w5)(t||"","#F2F2F2","#0D0D0D")}};
|
|
3857
3850
|
${b}
|
|
3858
3851
|
/* stylelint-disable-next-line media-query-no-invalid */
|
|
3859
3852
|
@media ${f.jO.maxPhone} {
|
|
@@ -3861,7 +3854,7 @@
|
|
|
3861
3854
|
box-shadow: none;
|
|
3862
3855
|
border-right: 1px solid rgba(0, 0, 0, 0.08);
|
|
3863
3856
|
border-radius: 0px;
|
|
3864
|
-
${e=>{let{isLast:t}=e;return t&&"border-top-left-radius: 48px; border-bottom-left-radius: 48px;"}}
|
|
3857
|
+
${e=>{let{$isLast:t}=e;return t&&"border-top-left-radius: 48px; border-bottom-left-radius: 48px;"}}
|
|
3865
3858
|
}
|
|
3866
3859
|
`,y=c.Ay.div`
|
|
3867
3860
|
margin-right: 8px;
|
|
@@ -3881,7 +3874,7 @@
|
|
|
3881
3874
|
&::-webkit-scrollbar {
|
|
3882
3875
|
display: none;
|
|
3883
3876
|
}
|
|
3884
|
-
${e=>{let{open:t
|
|
3877
|
+
${e=>{let{$open:t,$iconsCount:n}=e;return t?c.AH`
|
|
3885
3878
|
gap: 8px;
|
|
3886
3879
|
max-height: ${n?56*n:0}px;
|
|
3887
3880
|
opacity: 1;
|
|
@@ -3899,12 +3892,14 @@
|
|
|
3899
3892
|
@media ${f.jO.maxPhone} {
|
|
3900
3893
|
flex-direction: row;
|
|
3901
3894
|
gap: 0 !important;
|
|
3902
|
-
max-width: calc(
|
|
3895
|
+
max-width: calc(
|
|
3896
|
+
100vw - ${e=>{let{$buttonWidth:t}=e;return(t||0)+148}}px
|
|
3897
|
+
);
|
|
3903
3898
|
overflow-x: auto;
|
|
3904
3899
|
transform-origin: right;
|
|
3905
3900
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
3906
3901
|
overscroll-behavior: none;
|
|
3907
|
-
${e=>{let{open:t}=e;return!t&&c.AH`
|
|
3902
|
+
${e=>{let{$open:t}=e;return!t&&c.AH`
|
|
3908
3903
|
max-width: 0;
|
|
3909
3904
|
`}}
|
|
3910
3905
|
}
|
|
@@ -3922,7 +3917,7 @@
|
|
|
3922
3917
|
position: relative;
|
|
3923
3918
|
transition: all 300ms ease;
|
|
3924
3919
|
transition-timing-function: cubic-bezier(0.05, 0.38, 0.49, 1);
|
|
3925
|
-
${e=>{let{open:t}=e;return t?c.AH`
|
|
3920
|
+
${e=>{let{$open:t}=e;return t?c.AH`
|
|
3926
3921
|
gap: 8px;
|
|
3927
3922
|
`:c.AH`
|
|
3928
3923
|
gap: 0px;
|
|
@@ -3957,7 +3952,7 @@
|
|
|
3957
3952
|
border: 0;
|
|
3958
3953
|
width: 28px;
|
|
3959
3954
|
height: 28px;
|
|
3960
|
-
background-color: ${e=>{let{background:t}=e;return t||""}};
|
|
3955
|
+
background-color: ${e=>{let{$background:t}=e;return t||""}};
|
|
3961
3956
|
box-shadow: ${f.FR.level2};
|
|
3962
3957
|
z-index: 2;
|
|
3963
3958
|
cursor: pointer;
|
|
@@ -3971,7 +3966,7 @@
|
|
|
3971
3966
|
@media ${f.jO.maxPhone} {
|
|
3972
3967
|
align-self: center;
|
|
3973
3968
|
min-width: 28px;
|
|
3974
|
-
margin-right: ${e=>{let{open:t}=e;return t?"8px;":"16px"}};
|
|
3969
|
+
margin-right: ${e=>{let{$open:t}=e;return t?"8px;":"16px"}};
|
|
3975
3970
|
}
|
|
3976
3971
|
`;var A=n(534),T=n(4927);const S=c.Ay.div`
|
|
3977
3972
|
z-index: ${e=>e.$zIndex};
|
|
@@ -3992,7 +3987,7 @@
|
|
|
3992
3987
|
@media ${f.jO.maxPhone} {
|
|
3993
3988
|
margin-left: 16px;
|
|
3994
3989
|
}
|
|
3995
|
-
|
|
3990
|
+
`,$=c.Ay.div`
|
|
3996
3991
|
width: max-content;
|
|
3997
3992
|
max-width: 360px;
|
|
3998
3993
|
|
|
@@ -4003,7 +3998,7 @@
|
|
|
4003
3998
|
width: unset;
|
|
4004
3999
|
max-width: 100%;
|
|
4005
4000
|
}
|
|
4006
|
-
|
|
4001
|
+
`,C=c.Ay.div`
|
|
4007
4002
|
display: flex;
|
|
4008
4003
|
cursor: pointer;
|
|
4009
4004
|
align-items: center;
|
|
@@ -4055,7 +4050,7 @@
|
|
|
4055
4050
|
`,M=c.Ay.div`
|
|
4056
4051
|
display: flex;
|
|
4057
4052
|
flex-direction: column;
|
|
4058
|
-
`;function N(e){let{agent:t}=e;const{agent_joined_text:n}=(0,u.A)();return i().createElement(
|
|
4053
|
+
`;function N(e){let{agent:t}=e;const{agent_joined_text:n}=(0,u.A)();return i().createElement(C,null,i().createElement(O,{style:{backgroundImage:`url(${t.avatar})`}}),i().createElement(I,null,i().createElement("span",null,t.name||"An agent")," ",n))}function R(e){let{text:t}=e;return i().createElement(C,null,i().createElement(I,{dangerouslySetInnerHTML:{__html:t}}))}const P=function(e){let{settings:t}=e;const{bubbleSize:n}=(0,l.d4)(p.Od),{agent:r,show:o,text:u,type:g}=(0,l.d4)(p.zD),b=(0,l.wA)(),v=(0,h.A)(t,"zIndex",15),y=(0,c.DP)(),x=(0,a.useMemo)(()=>(0,m.w5)(y.background||y.buttonBackground||"#fff",f.AV.light,f.AV.dark),[y.background,y.buttonBackground]);return null===u?null:i().createElement(M,null,i().createElement(L,{"aria-label":"Dismiss pushMessage",title:"Dismiss pushMessage",onClick:e=>{e.stopPropagation(),b((0,d.gQ)())},type:"button",$zIndex:v},i().createElement(s.US,{color:x,width:20,height:20})),i().createElement(S,{$bubbleSize:n,"aria-hidden":o?"false":"true","aria-label":"Chat bot push message",onClick:()=>b((0,d.lQ)()),role:"complementary",$zIndex:v},i().createElement($,null,g===d.oI.MESSAGE&&i().createElement(R,{text:u}),g===d.oI.HANDOVER&&i().createElement(N,{agent:r}))))};var D=n(2221);const j=c.AH`
|
|
4059
4054
|
width: ${e=>{let{$globalIconsOpen:t,$active:n,$showGlobalIcons:r,$isGlobalIconsDelayed:o}=e;return t&&void 0!==o&&!o||t&&r&&o||n?"36px":"44px"}};
|
|
4060
4055
|
height: ${e=>{let{$globalIconsOpen:t,$active:n,$showGlobalIcons:r,$isGlobalIconsDelayed:o}=e;return t&&void 0!==o&&!o||t&&r&&o||n?"36px":"44px"}};
|
|
4061
4056
|
object-fit: cover;
|
|
@@ -4211,12 +4206,12 @@
|
|
|
4211
4206
|
top: 0px;
|
|
4212
4207
|
`,ve=c.Ay.div`
|
|
4213
4208
|
position: fixed;
|
|
4214
|
-
bottom: calc(${e=>{var t;let{position:n}=e;return`${null!==(t=null==n?void 0:n.bottom)&&void 0!==t?t:D.bF.bottom}`}});
|
|
4215
|
-
right: calc(${e=>{var t;let{position:n}=e;return`${null!==(t=null==n?void 0:n.right)&&void 0!==t?t:D.bF.right}`}});
|
|
4216
|
-
${e=>{let{fullscreen:t
|
|
4217
|
-
z-index: ${e=>(e
|
|
4209
|
+
bottom: calc(${e=>{var t;let{$position:n}=e;return`${null!==(t=null==n?void 0:n.bottom)&&void 0!==t?t:D.bF.bottom}`}});
|
|
4210
|
+
right: calc(${e=>{var t;let{$position:n}=e;return`${null!==(t=null==n?void 0:n.right)&&void 0!==t?t:D.bF.right}`}});
|
|
4211
|
+
${e=>{let{$fullscreen:t,$active:n}=e;return t&&n&&be}}
|
|
4212
|
+
z-index: ${e=>(e.$zIndex||0)+5};
|
|
4218
4213
|
|
|
4219
|
-
${e=>{let{active:t}=e;return t&&(0,me.A)()&&be}}
|
|
4214
|
+
${e=>{let{$active:t}=e;return t&&(0,me.A)()&&be}}
|
|
4220
4215
|
|
|
4221
4216
|
font-family: ${e=>{let{theme:t}=e;return null!=t&&t.customFont?t.customFont:A.m.default}};
|
|
4222
4217
|
|
|
@@ -4228,7 +4223,7 @@
|
|
|
4228
4223
|
${e=>{let{theme:t}=e;return(null==t?void 0:t.customFont)&&`font-family: ${t.customFont}`}};
|
|
4229
4224
|
}
|
|
4230
4225
|
|
|
4231
|
-
${e=>{let{active:t
|
|
4226
|
+
${e=>{let{$active:t,$chatHasStarted:n}=e;return t&&!n&&c.AH`
|
|
4232
4227
|
@media ${f.jO.maxTablet} {
|
|
4233
4228
|
bottom: 2.5%;
|
|
4234
4229
|
top: 2.5%;
|
|
@@ -4239,7 +4234,7 @@
|
|
|
4239
4234
|
}
|
|
4240
4235
|
`}}
|
|
4241
4236
|
|
|
4242
|
-
${e=>{let{active:t
|
|
4237
|
+
${e=>{let{$active:t,$chatHasStarted:n}=e;return t&&n&&c.AH`
|
|
4243
4238
|
@media ${f.jO.maxTablet} {
|
|
4244
4239
|
bottom: 0;
|
|
4245
4240
|
top: 0;
|
|
@@ -4254,7 +4249,7 @@
|
|
|
4254
4249
|
flex-direction: row;
|
|
4255
4250
|
justify-content: flex-end;
|
|
4256
4251
|
position: relative;
|
|
4257
|
-
${e=>{let{active:t}=e;return t&&c.AH`
|
|
4252
|
+
${e=>{let{$active:t}=e;return t&&c.AH`
|
|
4258
4253
|
@media ${f.jO.maxTablet} {
|
|
4259
4254
|
opacity: 0;
|
|
4260
4255
|
user-select: none;
|
|
@@ -4265,7 +4260,7 @@
|
|
|
4265
4260
|
margin-bottom: 24px;
|
|
4266
4261
|
transform-origin: bottom right;
|
|
4267
4262
|
height: 100%;
|
|
4268
|
-
${e=>{let{active:t
|
|
4263
|
+
${e=>{let{$active:t,$fullscreenMode:n,$duration:r=300}=e;return n?"":t?c.AH`
|
|
4269
4264
|
transform: scale(1) translateY(0);
|
|
4270
4265
|
opacity: 1;
|
|
4271
4266
|
transition: ${r}ms ease;
|
|
@@ -4276,11 +4271,11 @@
|
|
|
4276
4271
|
`}}
|
|
4277
4272
|
transition-timing-function: cubic-bezier(0.05, 0.38, 0.49, 1);
|
|
4278
4273
|
@media ${f.jO.maxPhone} {
|
|
4279
|
-
${e=>{let{active:t}=e;return!t&&"width: 0;"}}
|
|
4274
|
+
${e=>{let{$active:t}=e;return!t&&"width: 0;"}}
|
|
4280
4275
|
}
|
|
4281
4276
|
|
|
4282
4277
|
@media ${f.jO.maxTablet} {
|
|
4283
|
-
${e=>{let{active:t
|
|
4278
|
+
${e=>{let{$active:t,$chatHasStarted:n}=e;return t&&!n&&c.AH`
|
|
4284
4279
|
border-radius: 6px;
|
|
4285
4280
|
overflow: hidden;
|
|
4286
4281
|
`}}
|
|
@@ -4304,8 +4299,8 @@
|
|
|
4304
4299
|
|
|
4305
4300
|
@media ${f.jO.maxPhone} {
|
|
4306
4301
|
gap: 0px;
|
|
4307
|
-
${e=>{let{showGlobalIcons:t}=e;return t&&"grid-template-columns: auto auto;"}}
|
|
4308
|
-
${e=>{let{showGlobalIcons:t
|
|
4302
|
+
${e=>{let{$showGlobalIcons:t}=e;return t&&"grid-template-columns: auto auto;"}}
|
|
4303
|
+
${e=>{let{$showGlobalIcons:t,$globalIconsOpen:n}=e;return t&&n&&"\n &::before { \n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n content: '';\n background: rgba(0, 0, 0, 0.1);\n filter: blur(100px);\n }"}}
|
|
4309
4304
|
}
|
|
4310
4305
|
`,ke=c.Ay.button`
|
|
4311
4306
|
all: unset;
|
|
@@ -4331,12 +4326,12 @@
|
|
|
4331
4326
|
&:focus-visible {
|
|
4332
4327
|
outline: 1px solid #0066cc;
|
|
4333
4328
|
}
|
|
4334
|
-
`;var _e=n(2927),Ae=n(6079),Te=n(7243);let Se=!1;var Ce=n(3514),$e=n(7173),Oe=n(6367);const Ie=function(e){let{color:t,...n}=e;return a.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none"},n),a.createElement("path",{d:"M4.75 5.75h14.5M4.75 18.25h14.5M4.75 12h14.5",stroke:t||"#0D0D0D",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))};function Le(e){var t,n,r;let{icons:o,settings:c}=e;const u=(0,l.wA)(),{currentLanguage:h,renderedBy:g}=(0,l.d4)(p.$P),{open:b}=(0,l.d4)(p.o3),[A,T]=(0,a.useState)();return i().createElement(k,{open:b,$seasonalAppearance:c.seasonal_appearance},i().createElement(q,{ref:e=>{null!=e&&e.clientWidth&&!A&&T(e.clientWidth)}}),i().createElement(_,{onClick:()=>{u((0,d.nI)({open:!b}))},$seasonalAppearance:c.seasonal_appearance,open:b,background:null===(t=c.style)||void 0===t?void 0:t.color_global_icons_button_background},b?i().createElement(s.US,{width:20,height:20,color:(0,m.w5)((null===(n=c.style)||void 0===n?void 0:n.color_global_icons_button_background)||"#fff",f.AV.light,f.AV.dark)}):i().createElement(Ie,{width:20,height:20,color:(0,m.w5)((null===(r=c.style)||void 0===r?void 0:r.color_global_icons_button_background)||"#fff",f.AV.light,f.AV.dark)})),i().createElement(x,{buttonWidth:A,iconsCount:o.length,open:b},o.map((e,t)=>{var n;return i().createElement(v,{isLast:0===t,background:null===(n=c.style)||void 0===n?void 0:n.color_global_icons_button_background,key:e.id,onClick:()=>(async e=>{let{id:t,title:n,altText:r,imageUrl:o,buttonType:a,buttonAction:i}=e;(0,Oe.n6)({type:"trigger-globalicon",icon:{id:t,title:n,altText:r,imageUrl:o,type:a,action:i},renderedBy:g}),"DIALOGUE"===a&&await u((0,d.zh)(i,{languageCode:h,openChat:!0,tempId:void 0,responsePromise:void 0})),"NUDGE"===a&&await u((0,d.fe)({slug:i,nudgeLayout:void 0,trackEvent:!0})),"URL"===a&&window.open(i,"_blank")})(e)},i().createElement("div",null,i().createElement(y,null,e.title),e.imageUrl&&i().createElement(w,null,i().createElement(E,{src:e.imageUrl,alt:e.altText}))))})))}const Me=i().memo(Le);let Ne,Re=function(e){return e.USER_INACTIVITY="USER_INACTIVITY",e.USER_SCROLLING="USER_SCROLLING",e}({}),Pe=function(e){return e.BOTH="BOTH",e.MOBILE="MOBILE",e.DESKTOP="DESKTOP",e}({}),De=!1;const je=(0,a.lazy)(()=>Promise.resolve().then(n.bind(n,8309))),Fe=(0,a.lazy)(()=>Promise.resolve().then(n.bind(n,2154))),ze=(0,a.lazy)(()=>Promise.resolve().then(n.bind(n,6804))),Be=300;let He;function Ue(e){let{hidden:t=!1,onNudgeDismiss:n,onNudgeProductClick:r,onNudgeFormSubmit:c,chatSettings:u}=e;const f=(0,l.Pj)(),m=(0,l.wA)(),{active:g,inPlatform:b,currentLanguage:v,chatHasStarted:y}=(0,l.d4)(p.$P),[x,w]=(0,a.useState)(g),{PAT_HOST:E,PUSHER_KEY:k,VERSION:_}=(0,l.d4)(p.cA),{show:A}=(0,l.d4)(p.zD),{show:T,nudgeLayout:S}=(0,l.d4)(p.G0),{bubbleNotification:C,position:$,fullscreenMode:O}=(0,l.d4)(p.Od),{showBubbleNotification:I}=(0,l.d4)(p.Cv),{open:L}=(0,l.d4)(p.o3),M=(0,h.A)(u,"fullscreenMode",!1),[N,R]=(0,a.useState)(!1),{globalIcons:j,isGlobalIconsDelayed:F}=function(e,t,n){var r;const o=pe(),{currentLanguage:i,globalIconsState:s,inPlatform:c}=(0,l.d4)(p.$P),u=(0,l.wA)(),[f,h]=(0,a.useState)(),m=(0,a.useCallback)(()=>{if(!c&&e.global_icons_enabled&&e.global_icons)return e.global_icons.filter(e=>e.enabled[i]).reduce((e,t)=>{let{url:n,enabled:r,icons:o,title:a,trigger_after:i,trigger_on_device:l,trigger_rule:s}=t;return n.forEach(t=>{e.push({enabled:r,icons:o,title:a,trigger_after:i,trigger_on_device:l,trigger_rule:s,url:t})}),n.length||e.push({enabled:r,icons:o,title:a,trigger_after:i,trigger_on_device:l,trigger_rule:s,url:""}),e},[]).sort((e,t)=>e.url.length<t.url.length?1:-1).find(e=>{var t,n;if(!(0,me.A)()&&ce()(t=e.trigger_on_device).call(t,Pe.DESKTOP)||(0,me.A)()&&ce()(n=e.trigger_on_device).call(n,Pe.MOBILE))return(0,de.A)(o,e.url)})},[c,e.global_icons,e.global_icons_enabled,i,o]),g=(0,a.useMemo)(()=>m(),[m]);(0,a.useEffect)(()=>{De&&e.global_icons_enabled&&h(g)},[t,g,e.global_icons_enabled]);const b=(0,a.useCallback)(e=>{const t=e.target;t.documentElement&&g&&(t.documentElement.scrollHeight-t.documentElement.clientHeight)*(g.trigger_after/100)<t.documentElement.scrollTop&&(h(g),De=!0)},[g]);return(0,a.useEffect)(()=>{f&&De&&Ne&&e.global_icons_enabled&&(Ne.removeEventListener("scroll",b),Ne=null)},[f,b,e.global_icons_enabled]),(0,a.useEffect)(()=>{var t;return!De&&e.global_icons_enabled&&(null===g&&h(void 0),g)&&(g.trigger_rule===Re.USER_INACTIVITY&&(g.trigger_after>0&&!ce()(t=s.seenDelayedPages).call(t,g.url)?setTimeout(()=>{h(g),u((0,d.nI)({...s,seenDelayedPages:[...s.seenDelayedPages,g.url]})),De=!0},1e3*g.trigger_after):(h(g),De=!0)),g.trigger_rule!==Re.USER_SCROLLING||Ne||(Ne=n instanceof Element?n:window.document,Ne.addEventListener("scroll",b))),()=>{Ne&&(Ne.removeEventListener("scroll",b),Ne=null)}},[e,i,n,u,s,g,b]),{globalIcons:f,isGlobalIconsDelayed:!ce()(r=s.seenDelayedPages).call(r,null==g?void 0:g.url)&&g&&g.trigger_after>0}}(u,g),z=(0,me.A)(),B=(0,h.A)(u,"zIndex",D.DP);(0,a.useEffect)(()=>{g&&I&&m((0,d.pK)()),g&&A&&m((0,d.gQ)())},[I,g,z,m,A]),(0,a.useEffect)(()=>{(0,ge.LA)(o()),(0,ge.Kh)(f,k,{channelAuthorization:{transport:"ajax",endpoint:`${E}/chatbubble/${D.Ak}/auth/pusher`,headers:{"kindly-chat-version":_}},cluster:"eu",disableStats:!0,pongTimeout:7500})},[E,k,_,f]),le(),function(){const e=(0,l.wA)(),[t,n]=(0,a.useState)("/"),[r,o]=(0,a.useState)(!1),{shownNudges:i}=(0,l.d4)(p.$P),s=(0,Ce.A)();(0,a.useEffect)(()=>{n(window.location.href),null!=i&&i.length&&!r&&Array.from(new Set(i).values()).map(e=>s.find(t=>t.slug===e)).filter(e=>e).filter(e=>e.analytics_completion_page_path).filter(e=>(0,de.A)(t,e.analytics_completion_page_path)).forEach(t=>{o(!0),e((0,d.vJ)({slug:t.slug,eventType:$e.oE})),e({type:$e.Kd,slug:t.slug})})},[e,t,s,i,r])}(),function(){const e=(0,l.wA)(),{currentLanguageCode:t}=(0,U.A)(),{active:n,chatHasStarted:r}=(0,l.d4)(p.$P),{pushGreetingsEnabled:o,pushGreetings:i}=(0,l.d4)(p.Od),{dismissedMessages:s}=(0,l.d4)(p.zD),c=pe();(0,a.useEffect)(()=>{if(!o||!i||n||!t||r)return;const a=()=>(e,t)=>{const{show:n}=t().pushMessages;he.length&&(n||(he[0].autopopup_time>0?setTimeout(()=>{e((0,d.VP)(he[0])),he.shift()},he[0].autopopup_time):(e((0,d.VP)(he[0])),he.shift())),he.length&&setTimeout(()=>e(a()),Math.max(he[0].autopopup_time,2e3)))};i.map(e=>fe(e,t)).filter(e=>e.enabled&&!ce()(s).call(s,e.title)&&(0,de.A)(c,e.url)).sort((e,t)=>t.url.length-e.url.length).forEach(e=>he.push(e)),e(a())},[n,t,o,i,e,r,s,c])}(),function(){const e=(0,l.wA)(),{currentLanguageCode:t}=(0,U.A)(),{active:n}=(0,l.d4)(p.$P),{nudges:r}=(0,l.d4)(p.Od),{show:o,hasBeenDismissed:i,slug:s}=(0,l.d4)(p.G0),c=pe(),u=null==r?void 0:r.text_nudges;(0,a.useEffect)(()=>{!n&&t&&(null==u?void 0:u.length)>0&&(null!=u?u:[]).forEach(n=>!(o||i&&n.slug===s)&&!(!(0,de.A)(c,n.url_trigger)||!n.enabled[t])&&e((0,d.mR)({nudge:n,languageCode:t})))},[n,t,e,c,u])}(),function(e){const t=(0,l.wA)(),{token:n,pusherConnected:r,connectTriggerConfig:o}=(0,l.d4)(p.FI),{takenOver:i}=(0,l.d4)(p.MA),{persistStateLifespan:s}=(0,l.d4)(p.Od),{botKey:c,active:u,disabledTransports:f,chatHasStarted:h,wasActiveOnLoad:m,userIsIdle:g,error:b}=(0,l.d4)(p.$P),{chatMessages:v,messageSentTime:y}=(0,l.d4)(p.DZ),{labels:x}=(0,l.d4)(p.sr),[w,E]=(0,a.useState)(!1),k=localStorage.getItem(`kindly-chat-${c}`);(0,a.useEffect)(()=>()=>{Se=!1},[]),(0,a.useEffect)(()=>(window.addEventListener("online",()=>t((0,d.UJ)())),window.addEventListener("offline",()=>t((0,d.qf)())),()=>{window.removeEventListener("online",()=>t((0,d.UJ)())),window.removeEventListener("offline",()=>t((0,d.qf)()))}),[t]),(0,a.useEffect)(()=>{const n=e.welcomePage.type!==D.Lb.NONE;!h&&m&&!n&&t((0,d.Z4)())}),(0,a.useEffect)(()=>(n||(Se=!1),()=>{r&&(n&&(0,Te.DT)(n),ge.Zf&&(0,ge.Zf)())}),[r,n]),(0,a.useEffect)(()=>{!u||!h||r||Se||g||(403!==b||n?n&&(Se=!0,t((0,d.fk)(n,f))):(Se=!0,t((0,d.mg)())))},[u,h,t,b,r,n,g,f]),(0,a.useEffect)(()=>{o&&t((0,d.mg)(o))},[o,t]),(0,a.useEffect)(()=>{r&&o&&t((0,d.XO)())},[o,t,r]),(0,a.useEffect)(()=>{const e=u&&h;if(r||Se||g||o)return;const a=(0,_e.A)({messageSentTime:y,persistStateLifespan:s});e||n?e&&!n?(Se=!0,t((0,d.mg)({shouldGreet:h}))):a&&(Se=!0,t((0,d.fk)(n,f))):!e&&x.length>0&&(Se=!0,t((0,d.mg)({shouldGreet:!1})))},[u,o,r,n,f,t,v.length,h,g,b,y,s,k,c,x]),(0,a.useEffect)(()=>{Se&&r&&(Se=!1,t((0,Ae.S4)()),E(!0))},[r,t]),(0,a.useEffect)(()=>{if(r&&g&&!i){n&&(0,Te.DT)(n);try{(0,ge.Zf)()}catch{}}},[g,r,i,n]),(0,a.useEffect)(()=>{n&&u&&!w&&(0,_e.A)({messageSentTime:y,persistStateLifespan:s})&&(t((0,Ae.S4)()),E(!0))},[u,t,w,n])}(u);const H=!g&&A&&!t,V=j&&!g&&!T&&u.global_icons_enabled&&!H,G=(0,ie.A)(g);return(0,a.useEffect)(()=>{!g&&G?(He&&clearTimeout(He),He=setTimeout(()=>w(g),Be+10)):G!==g&&(He&&clearTimeout(He),w(g))},[G,g]),i().createElement(i().Fragment,null,i().createElement(ve,{fullscreen:!!M,active:g,chatHasStarted:y,$inPlatform:b,position:$,zIndex:B,$shouldHideUI:N,id:"kindly-root"},i().createElement(xe,{chatHasStarted:y,fullscreenMode:O,active:g,duration:Be},x&&i().createElement(a.Suspense,{fallback:""},i().createElement(je,{settings:u}))),H&&i().createElement(P,{settings:u}),T&&S&&i().createElement(a.Suspense,{fallback:""},i().createElement(Fe,{hidden:t,layout:S,onDismiss:n,onNewsletterSubmit:c,onProductClick:r})),i().createElement(ye,{$inPlatform:b,position:$,zIndex:B,id:"ChatButtonContainer",active:g,lang:v},!g&&C&&I&&i().createElement(we,null),!t&&i().createElement(Ee,{showGlobalIcons:V,globalIconsOpen:L},b&&i().createElement(a.Suspense,{fallback:""},i().createElement(ze,{active:g})),V&&i().createElement(Me,{icons:j.icons,settings:u}),i().createElement(te,{showGlobalIcons:!!V,isGlobalIconsDelayed:F})))),b&&i().createElement(ke,{onClick:()=>R(e=>!e)},N?i().createElement(s.A6,{stroke:"black"}):i().createElement(s.fl,{stroke:"black"})))}},9313:(e,t,n)=>{"use strict";n.d(t,{B1:()=>_,Kh:()=>E,LA:()=>d,Vq:()=>c,Xs:()=>k,Zf:()=>T,_N:()=>a,_Y:()=>o,al:()=>A});var r=n(6249);const o="PUSHER-REDUX/CONNECTED",a="PUSHER-REDUX/DISCONNECTED",i="PUSHER-REDUX/CONNECTING",l="PUSHER-REDUX/UNAVAILABLE",s="PUSHER-REDUX/FAILED",c="PUSHER-REDUX/SUBSCRIBED",u={socket:null,store:null,apiKey:null,options:null,subscriptions:{},PusherClient:null};function d(e){u.PusherClient=e}function p(e){const t={type:e.actionType};return e.channelName&&(t.channel=e.channelName),e.eventName&&(t.event=e.eventName),e.data&&(t.data=e.data),e.additionalParams&&(t.additionalParams=e.additionalParams),t}const f=[];let h=!1;function m(){for(;h&&f.length>0;){const e=f.shift();e&&e()}}function g(e){f.push(e),m()}function b(e){var t;h=!0,null===(t=u.store)||void 0===t||t.dispatch(p({actionType:o,data:e})),m()}function v(){var e;null===(e=u.store)||void 0===e||e.dispatch(p({actionType:a}))}function y(){var e;null===(e=u.store)||void 0===e||e.dispatch(p({actionType:i}))}function x(){var e;null===(e=u.store)||void 0===e||e.dispatch(p({actionType:l}))}function w(){var e;null===(e=u.store)||void 0===e||e.dispatch(p({actionType:s}))}function E(e,t,n){if(u.store=e,u.apiKey=t,null==n||!n.cluster)throw new Error("Cluster option is required for delayed configuration");u.options=(0,r.A)(u.options,n)}function k(e){if(null===u.PusherClient)throw new Error("Pusher client is not set");if(null===u.apiKey)throw new Error("API key is not set");u.socket=new u.PusherClient(u.apiKey,(0,r.A)(u.options,e)),u.socket.connection.bind("connected",b),u.socket.connection.bind("disconnected",v),u.socket.connection.bind("connecting",y),u.socket.connection.bind("unavailable",x),u.socket.connection.bind("failed",w)}function _(e,t,n,r){g(()=>{if(!u.socket)return void console.error("Not connected to Pusher");const o=u.socket.channel(e)||u.socket.subscribe(e);if(o.bind("pusher:subscription_succeeded",()=>{!function(e){var t;let{channelName:n,eventName:r,additionalParams:o}=e;null===(t=u.store)||void 0===t||t.dispatch(p({actionType:c,channelName:n,eventName:r,additionalParams:o}))}({eventName:t,channelName:e,additionalParams:r})}),u.subscriptions[e]||(u.subscriptions[e]={}),u.subscriptions[e][t]||(u.subscriptions[e][t]={}),!u.subscriptions[e][t][n]){const a=o=>{var a;null===(a=u.store)||void 0===a||a.dispatch(p({actionType:n,channelName:e,eventName:t,data:o,additionalParams:r}))};u.subscriptions[e][t][n]=a,o.bind(t,a)}})}function A(e,t,n){g(()=>{if(!u.socket)return void console.error("Not connected to Pusher");const r=u.socket.channel(e);if(!r)return void console.error(`Not subscribed to '${e}'`);const o=u.subscriptions[e];if(!o)return void console.error(`No subscription in '${e}'`);const a=o[t];if(!a)return void console.error(`Not subscribed event '${t}' from '${e}'`);const i=a[n];i?(r.unbind(t,i),delete a[n]):console.error(`Handler for ${n} not found for event '${t}' from '${e}'`)})}function T(){u.socket?u.socket.disconnect():console.error("Not connected to Pusher")}},9337:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6064);function o(e,t){return Object.fromEntries(Object.entries(e).map(e=>{let[n,o]=e;return[n,"string"==typeof o?o:(0,r.A)(o,t)]}))}},9344:(e,t,n)=>{"use strict";var r=n(9932),o=n(6100);e.exports=function(e){if("Function"===r(e))return o(e)}},9405:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(9155),o=n.n(r);const a=function(e){let{...t}=e;return o().createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),o().createElement("path",{d:"M9.98389 9C10.0518 8.86333 10.1332 8.73454 10.2264 8.61538C10.6382 8.08862 11.2795 7.75 12 7.75C13.2426 7.75 14.25 8.75736 14.25 10C14.25 10.6275 13.9931 11.195 13.5788 11.6031C13.0782 12.0961 12.4712 12.6282 12.1769 13.2533M12 16.25V16.26M12 19.25C7.99594 19.25 4.75 16.0041 4.75 12C4.75 7.99594 7.99594 4.75 12 4.75C16.0041 4.75 19.25 7.99594 19.25 12C19.25 16.0041 16.0041 19.25 12 19.25Z",stroke:"#141414",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}))}},9416:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(9155),o=n.n(r),a=n(824),i=n(3864),l=n(8905),s=n(6538);const c=i.Ay.div`
|
|
4329
|
+
`;var _e=n(2927),Ae=n(6079),Te=n(7243);let Se=!1;var $e=n(3514),Ce=n(7173),Oe=n(6367);const Ie=function(e){let{color:t,...n}=e;return a.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none"},n),a.createElement("path",{d:"M4.75 5.75h14.5M4.75 18.25h14.5M4.75 12h14.5",stroke:t||"#0D0D0D",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))};function Le(e){var t,n,r;let{icons:o,settings:c}=e;const u=(0,l.wA)(),{currentLanguage:h,renderedBy:g}=(0,l.d4)(p.$P),{open:b}=(0,l.d4)(p.o3),[A,T]=(0,a.useState)();return i().createElement(k,{$open:b,$seasonalAppearance:c.seasonal_appearance},i().createElement(q,{ref:e=>{null!=e&&e.clientWidth&&!A&&T(e.clientWidth)}}),i().createElement(_,{onClick:()=>{u((0,d.nI)({open:!b}))},$seasonalAppearance:c.seasonal_appearance,$open:b,$background:null===(t=c.style)||void 0===t?void 0:t.color_global_icons_button_background},b?i().createElement(s.US,{width:20,height:20,color:(0,m.w5)((null===(n=c.style)||void 0===n?void 0:n.color_global_icons_button_background)||"#fff",f.AV.light,f.AV.dark)}):i().createElement(Ie,{width:20,height:20,color:(0,m.w5)((null===(r=c.style)||void 0===r?void 0:r.color_global_icons_button_background)||"#fff",f.AV.light,f.AV.dark)})),i().createElement(x,{$buttonWidth:A,$iconsCount:o.length,$open:b},o.map((e,t)=>{var n;return i().createElement(v,{$isLast:0===t,$background:null===(n=c.style)||void 0===n?void 0:n.color_global_icons_button_background,key:e.id,onClick:()=>(async e=>{let{id:t,title:n,altText:r,imageUrl:o,buttonType:a,buttonAction:i}=e;(0,Oe.n6)({type:"trigger-globalicon",icon:{id:t,title:n,altText:r,imageUrl:o,type:a,action:i},renderedBy:g}),"DIALOGUE"===a&&await u((0,d.zh)(i,{languageCode:h,openChat:!0,tempId:void 0,responsePromise:void 0})),"NUDGE"===a&&await u((0,d.fe)({slug:i,nudgeLayout:void 0,trackEvent:!0})),"URL"===a&&window.open(i,"_blank")})(e)},i().createElement("div",null,i().createElement(y,null,e.title),e.imageUrl&&i().createElement(w,null,i().createElement(E,{src:e.imageUrl,alt:e.altText}))))})))}const Me=i().memo(Le);let Ne,Re=function(e){return e.USER_INACTIVITY="USER_INACTIVITY",e.USER_SCROLLING="USER_SCROLLING",e}({}),Pe=function(e){return e.BOTH="BOTH",e.MOBILE="MOBILE",e.DESKTOP="DESKTOP",e}({}),De=!1;const je=(0,a.lazy)(()=>Promise.resolve().then(n.bind(n,5976))),Fe=(0,a.lazy)(()=>Promise.resolve().then(n.bind(n,2154))),ze=(0,a.lazy)(()=>Promise.resolve().then(n.bind(n,6804))),Be=300;let He;function Ue(e){let{hidden:t=!1,onNudgeDismiss:n,onNudgeProductClick:r,onNudgeFormSubmit:c,chatSettings:u}=e;const f=(0,l.Pj)(),m=(0,l.wA)(),{active:g,inPlatform:b,currentLanguage:v,chatHasStarted:y}=(0,l.d4)(p.$P),[x,w]=(0,a.useState)(g),{PAT_HOST:E,PUSHER_KEY:k,VERSION:_}=(0,l.d4)(p.cA),{show:A}=(0,l.d4)(p.zD),{show:T,nudgeLayout:S}=(0,l.d4)(p.G0),{bubbleNotification:$,position:C,fullscreenMode:O}=(0,l.d4)(p.Od),{showBubbleNotification:I}=(0,l.d4)(p.Cv),{open:L}=(0,l.d4)(p.o3),M=(0,h.A)(u,"fullscreenMode",!1),[N,R]=(0,a.useState)(!1),{globalIcons:j,isGlobalIconsDelayed:F}=function(e,t,n){var r;const o=pe(),{currentLanguage:i,globalIconsState:s,inPlatform:c}=(0,l.d4)(p.$P),u=(0,l.wA)(),[f,h]=(0,a.useState)(),m=(0,a.useCallback)(()=>{if(!c&&e.global_icons_enabled&&e.global_icons)return e.global_icons.filter(e=>e.enabled[i]).reduce((e,t)=>{let{url:n,enabled:r,icons:o,title:a,trigger_after:i,trigger_on_device:l,trigger_rule:s}=t;return n.forEach(t=>{e.push({enabled:r,icons:o,title:a,trigger_after:i,trigger_on_device:l,trigger_rule:s,url:t})}),n.length||e.push({enabled:r,icons:o,title:a,trigger_after:i,trigger_on_device:l,trigger_rule:s,url:""}),e},[]).sort((e,t)=>e.url.length<t.url.length?1:-1).find(e=>{var t,n;if(!(0,me.A)()&&ce()(t=e.trigger_on_device).call(t,Pe.DESKTOP)||(0,me.A)()&&ce()(n=e.trigger_on_device).call(n,Pe.MOBILE))return(0,de.A)(o,e.url)})},[c,e.global_icons,e.global_icons_enabled,i,o]),g=(0,a.useMemo)(()=>m(),[m]);(0,a.useEffect)(()=>{De&&e.global_icons_enabled&&h(g)},[t,g,e.global_icons_enabled]);const b=(0,a.useCallback)(e=>{const t=e.target;t.documentElement&&g&&(t.documentElement.scrollHeight-t.documentElement.clientHeight)*(g.trigger_after/100)<t.documentElement.scrollTop&&(h(g),De=!0)},[g]);return(0,a.useEffect)(()=>{f&&De&&Ne&&e.global_icons_enabled&&(Ne.removeEventListener("scroll",b),Ne=null)},[f,b,e.global_icons_enabled]),(0,a.useEffect)(()=>{var t;return!De&&e.global_icons_enabled&&(null===g&&h(void 0),g)&&(g.trigger_rule===Re.USER_INACTIVITY&&(g.trigger_after>0&&!ce()(t=s.seenDelayedPages).call(t,g.url)?setTimeout(()=>{h(g),u((0,d.nI)({...s,seenDelayedPages:[...s.seenDelayedPages,g.url]})),De=!0},1e3*g.trigger_after):(h(g),De=!0)),g.trigger_rule!==Re.USER_SCROLLING||Ne||(Ne=n instanceof Element?n:window.document,Ne.addEventListener("scroll",b))),()=>{Ne&&(Ne.removeEventListener("scroll",b),Ne=null)}},[e,i,n,u,s,g,b]),{globalIcons:f,isGlobalIconsDelayed:!ce()(r=s.seenDelayedPages).call(r,null==g?void 0:g.url)&&g&&g.trigger_after>0}}(u,g),z=(0,me.A)(),B=(0,h.A)(u,"zIndex",D.DP);(0,a.useEffect)(()=>{g&&I&&m((0,d.pK)()),g&&A&&m((0,d.gQ)())},[I,g,z,m,A]),(0,a.useEffect)(()=>{(0,ge.LA)(o()),(0,ge.Kh)(f,k,{channelAuthorization:{transport:"ajax",endpoint:`${E}/chatbubble/${D.Ak}/auth/pusher`,headers:{"kindly-chat-version":_}},cluster:"eu",disableStats:!0,pongTimeout:7500})},[E,k,_,f]),le(),function(){const e=(0,l.wA)(),[t,n]=(0,a.useState)("/"),[r,o]=(0,a.useState)(!1),{shownNudges:i}=(0,l.d4)(p.$P),s=(0,$e.A)();(0,a.useEffect)(()=>{n(window.location.href),null!=i&&i.length&&!r&&Array.from(new Set(i).values()).map(e=>s.find(t=>t.slug===e)).filter(e=>e).filter(e=>e.analytics_completion_page_path).filter(e=>(0,de.A)(t,e.analytics_completion_page_path)).forEach(t=>{o(!0),e((0,d.vJ)({slug:t.slug,eventType:Ce.oE})),e({type:Ce.Kd,slug:t.slug})})},[e,t,s,i,r])}(),function(){const e=(0,l.wA)(),{currentLanguageCode:t}=(0,U.A)(),{active:n,chatHasStarted:r}=(0,l.d4)(p.$P),{pushGreetingsEnabled:o,pushGreetings:i}=(0,l.d4)(p.Od),{dismissedMessages:s}=(0,l.d4)(p.zD),c=pe();(0,a.useEffect)(()=>{if(!o||!i||n||!t||r)return;const a=()=>(e,t)=>{const{show:n}=t().pushMessages;he.length&&(n||(he[0].autopopup_time>0?setTimeout(()=>{e((0,d.VP)(he[0])),he.shift()},he[0].autopopup_time):(e((0,d.VP)(he[0])),he.shift())),he.length&&setTimeout(()=>e(a()),Math.max(he[0].autopopup_time,2e3)))};i.map(e=>fe(e,t)).filter(e=>e.enabled&&!ce()(s).call(s,e.title)&&(0,de.A)(c,e.url)).sort((e,t)=>t.url.length-e.url.length).forEach(e=>he.push(e)),e(a())},[n,t,o,i,e,r,s,c])}(),function(){const e=(0,l.wA)(),{currentLanguageCode:t}=(0,U.A)(),{active:n}=(0,l.d4)(p.$P),{nudges:r}=(0,l.d4)(p.Od),{show:o,hasBeenDismissed:i,slug:s}=(0,l.d4)(p.G0),c=pe(),u=null==r?void 0:r.text_nudges;(0,a.useEffect)(()=>{!n&&t&&(null==u?void 0:u.length)>0&&(null!=u?u:[]).forEach(n=>!(o||i&&n.slug===s)&&!(!(0,de.A)(c,n.url_trigger)||!n.enabled[t])&&e((0,d.mR)({nudge:n,languageCode:t})))},[n,t,e,c,u])}(),function(e){const t=(0,l.wA)(),{token:n,pusherConnected:r,connectTriggerConfig:o}=(0,l.d4)(p.FI),{takenOver:i}=(0,l.d4)(p.MA),{persistStateLifespan:s}=(0,l.d4)(p.Od),{botKey:c,active:u,disabledTransports:f,chatHasStarted:h,wasActiveOnLoad:m,userIsIdle:g,error:b}=(0,l.d4)(p.$P),{chatMessages:v,messageSentTime:y}=(0,l.d4)(p.DZ),{labels:x}=(0,l.d4)(p.sr),[w,E]=(0,a.useState)(!1),k=localStorage.getItem(`kindly-chat-${c}`);(0,a.useEffect)(()=>()=>{Se=!1},[]),(0,a.useEffect)(()=>(window.addEventListener("online",()=>t((0,d.UJ)())),window.addEventListener("offline",()=>t((0,d.qf)())),()=>{window.removeEventListener("online",()=>t((0,d.UJ)())),window.removeEventListener("offline",()=>t((0,d.qf)()))}),[t]),(0,a.useEffect)(()=>{const n=e.welcomePage.type!==D.Lb.NONE;!h&&m&&!n&&t((0,d.Z4)())}),(0,a.useEffect)(()=>(n||(Se=!1),()=>{r&&(n&&(0,Te.DT)(n),ge.Zf&&(0,ge.Zf)())}),[r,n]),(0,a.useEffect)(()=>{!u||!h||r||Se||g||(403!==b||n?n&&(Se=!0,t((0,d.fk)(n,f))):(Se=!0,t((0,d.mg)())))},[u,h,t,b,r,n,g,f]),(0,a.useEffect)(()=>{o&&t((0,d.mg)(o))},[o,t]),(0,a.useEffect)(()=>{r&&o&&t((0,d.XO)())},[o,t,r]),(0,a.useEffect)(()=>{const e=u&&h;if(r||Se||g||o)return;const a=(0,_e.A)({messageSentTime:y,persistStateLifespan:s});e||n?e&&!n?(Se=!0,t((0,d.mg)({shouldGreet:h}))):a&&(Se=!0,t((0,d.fk)(n,f))):!e&&x.length>0&&(Se=!0,t((0,d.mg)({shouldGreet:!1})))},[u,o,r,n,f,t,v.length,h,g,b,y,s,k,c,x]),(0,a.useEffect)(()=>{Se&&r&&(Se=!1,t((0,Ae.S4)()),E(!0))},[r,t]),(0,a.useEffect)(()=>{if(r&&g&&!i){n&&(0,Te.DT)(n);try{(0,ge.Zf)()}catch{}}},[g,r,i,n]),(0,a.useEffect)(()=>{n&&u&&!w&&(0,_e.A)({messageSentTime:y,persistStateLifespan:s})&&(t((0,Ae.S4)()),E(!0))},[u,t,w,n])}(u);const H=!g&&A&&!t,V=j&&!g&&!T&&u.global_icons_enabled&&!H,G=(0,ie.A)(g);return(0,a.useEffect)(()=>{!g&&G?(He&&clearTimeout(He),He=setTimeout(()=>w(g),Be+10)):G!==g&&(He&&clearTimeout(He),w(g))},[G,g]),i().createElement(i().Fragment,null,i().createElement(ve,{$fullscreen:!!M,$active:g,$chatHasStarted:y,$inPlatform:b,$position:C,$zIndex:B,$shouldHideUI:N,id:"kindly-root"},i().createElement(xe,{$chatHasStarted:y,$fullscreenMode:O,$active:g,$duration:Be},x&&i().createElement(a.Suspense,{fallback:""},i().createElement(je,{settings:u}))),H&&i().createElement(P,{settings:u}),T&&S&&i().createElement(a.Suspense,{fallback:""},i().createElement(Fe,{hidden:t,layout:S,onDismiss:n,onNewsletterSubmit:c,onProductClick:r})),i().createElement(ye,{$inPlatform:b,$position:C,$zIndex:B,id:"ChatButtonContainer",$active:g,lang:v},!g&&$&&I&&i().createElement(we,null),!t&&i().createElement(Ee,{$showGlobalIcons:V,$globalIconsOpen:L},b&&i().createElement(a.Suspense,{fallback:""},i().createElement(ze,{active:g})),V&&i().createElement(Me,{icons:j.icons,settings:u}),i().createElement(te,{showGlobalIcons:!!V,isGlobalIconsDelayed:F})))),b&&i().createElement(ke,{onClick:()=>R(e=>!e)},N?i().createElement(s.A6,{stroke:"black"}):i().createElement(s.fl,{stroke:"black"})))}},9313:(e,t,n)=>{"use strict";n.d(t,{B1:()=>_,Kh:()=>E,LA:()=>d,Vq:()=>c,Xs:()=>k,Zf:()=>T,_N:()=>a,_Y:()=>o,al:()=>A});var r=n(6249);const o="PUSHER-REDUX/CONNECTED",a="PUSHER-REDUX/DISCONNECTED",i="PUSHER-REDUX/CONNECTING",l="PUSHER-REDUX/UNAVAILABLE",s="PUSHER-REDUX/FAILED",c="PUSHER-REDUX/SUBSCRIBED",u={socket:null,store:null,apiKey:null,options:null,subscriptions:{},PusherClient:null};function d(e){u.PusherClient=e}function p(e){const t={type:e.actionType};return e.channelName&&(t.channel=e.channelName),e.eventName&&(t.event=e.eventName),e.data&&(t.data=e.data),e.additionalParams&&(t.additionalParams=e.additionalParams),t}const f=[];let h=!1;function m(){for(;h&&f.length>0;){const e=f.shift();e&&e()}}function g(e){f.push(e),m()}function b(e){var t;h=!0,null===(t=u.store)||void 0===t||t.dispatch(p({actionType:o,data:e})),m()}function v(){var e;null===(e=u.store)||void 0===e||e.dispatch(p({actionType:a}))}function y(){var e;null===(e=u.store)||void 0===e||e.dispatch(p({actionType:i}))}function x(){var e;null===(e=u.store)||void 0===e||e.dispatch(p({actionType:l}))}function w(){var e;null===(e=u.store)||void 0===e||e.dispatch(p({actionType:s}))}function E(e,t,n){if(u.store=e,u.apiKey=t,null==n||!n.cluster)throw new Error("Cluster option is required for delayed configuration");u.options=(0,r.A)(u.options,n)}function k(e){if(null===u.PusherClient)throw new Error("Pusher client is not set");if(null===u.apiKey)throw new Error("API key is not set");u.socket=new u.PusherClient(u.apiKey,(0,r.A)(u.options,e)),u.socket.connection.bind("connected",b),u.socket.connection.bind("disconnected",v),u.socket.connection.bind("connecting",y),u.socket.connection.bind("unavailable",x),u.socket.connection.bind("failed",w)}function _(e,t,n,r){g(()=>{if(!u.socket)return void console.error("Not connected to Pusher");const o=u.socket.channel(e)||u.socket.subscribe(e);if(o.bind("pusher:subscription_succeeded",()=>{!function(e){var t;let{channelName:n,eventName:r,additionalParams:o}=e;null===(t=u.store)||void 0===t||t.dispatch(p({actionType:c,channelName:n,eventName:r,additionalParams:o}))}({eventName:t,channelName:e,additionalParams:r})}),u.subscriptions[e]||(u.subscriptions[e]={}),u.subscriptions[e][t]||(u.subscriptions[e][t]={}),!u.subscriptions[e][t][n]){const a=o=>{var a;null===(a=u.store)||void 0===a||a.dispatch(p({actionType:n,channelName:e,eventName:t,data:o,additionalParams:r}))};u.subscriptions[e][t][n]=a,o.bind(t,a)}})}function A(e,t,n){g(()=>{if(!u.socket)return void console.error("Not connected to Pusher");const r=u.socket.channel(e);if(!r)return void console.error(`Not subscribed to '${e}'`);const o=u.subscriptions[e];if(!o)return void console.error(`No subscription in '${e}'`);const a=o[t];if(!a)return void console.error(`Not subscribed event '${t}' from '${e}'`);const i=a[n];i?(r.unbind(t,i),delete a[n]):console.error(`Handler for ${n} not found for event '${t}' from '${e}'`)})}function T(){u.socket?u.socket.disconnect():console.error("Not connected to Pusher")}},9337:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6064);function o(e,t){return Object.fromEntries(Object.entries(e).map(e=>{let[n,o]=e;return[n,"string"==typeof o?o:(0,r.A)(o,t)]}))}},9344:(e,t,n)=>{"use strict";var r=n(9932),o=n(6100);e.exports=function(e){if("Function"===r(e))return o(e)}},9405:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(9155),o=n.n(r);const a=function(e){let{...t}=e;return o().createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),o().createElement("path",{d:"M9.98389 9C10.0518 8.86333 10.1332 8.73454 10.2264 8.61538C10.6382 8.08862 11.2795 7.75 12 7.75C13.2426 7.75 14.25 8.75736 14.25 10C14.25 10.6275 13.9931 11.195 13.5788 11.6031C13.0782 12.0961 12.4712 12.6282 12.1769 13.2533M12 16.25V16.26M12 19.25C7.99594 19.25 4.75 16.0041 4.75 12C4.75 7.99594 7.99594 4.75 12 4.75C16.0041 4.75 19.25 7.99594 19.25 12C19.25 16.0041 16.0041 19.25 12 19.25Z",stroke:"#141414",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}))}},9416:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(9155),o=n.n(r),a=n(824),i=n(3864),l=n(8905),s=n(6538);const c=i.Ay.div`
|
|
4335
4330
|
position: absolute;
|
|
4336
4331
|
right: 8px;
|
|
4337
4332
|
font-size: var(--_kindlychat-font-size-sm);
|
|
4338
4333
|
color: ${e=>{let{theme:t}=e;return(0,s.w5)(t.panelBackground,"#FFFFFF",l.qd.textColorLight)}};
|
|
4339
|
-
${e=>{let{position:t}=e;return"top"===t?i.AH`
|
|
4334
|
+
${e=>{let{$position:t}=e;return"top"===t?i.AH`
|
|
4340
4335
|
top: 4px;
|
|
4341
4336
|
right: 16px;
|
|
4342
4337
|
`:"bottom"===t?i.AH`
|
|
@@ -4348,7 +4343,7 @@
|
|
|
4348
4343
|
top: 50%;
|
|
4349
4344
|
transform: translateY(-50%);
|
|
4350
4345
|
`}}
|
|
4351
|
-
`;function u(e){let{fieldName:t,maxLength:n,control:r,position:i="middle"}=e;const l=(0,a.FH)({control:r,name:t});return o().createElement(c,{position:i},`${(null==l?void 0:l.length)||0}/${n}`)}},9483:(e,t,n)=>{"use strict";n.d(t,{VP:()=>a,gQ:()=>i,oI:()=>o});var r=n(7173);const o={HANDOVER:"handover",MESSAGE:"message"},a=e=>t=>{const{title:n,message:a}=e;t({type:r.l,pushMessageTitle:n,pushMessageType:o.MESSAGE,pushMessageText:a})},i=()=>(e,t)=>{const{show:n}=t().pushMessages;n&&e({type:r.a_})}},9514:e=>{"use strict";e.exports=r},9576:(e,t,n)=>{"use strict";n.d(t,{Bq:()=>u,G8:()=>s,NR:()=>c});var r=n(9749),o=n.n(r),a=n(5013),i=n(7094);const l={maximum:"max",minimum:"min"},s=e=>{const t={},n=e.map(e=>{const t=Object.keys(e);for(let n=0;n<=t.length;n+=1)if(l[t[n]]){const r=Object.defineProperty(e,l[t[n]],Object.getOwnPropertyDescriptor(e,t[n]));return delete r[t[n]],r}return e});for(let e=0;e<n.length;e+=1){var r;const l=Object.keys(n[e]),s=null===(r=n[e].texts)||void 0===r?void 0:r.text;l.forEach(r=>{var l;o()(l=Object.values(i.ZF)).call(l,r)&&(t[(0,a.A)(r)]={value:n[e][r],...s&&{message:s}})})}return t},c=e=>{if("object"!=typeof e)return{};const t={};return Object.entries(e).forEach(e=>{let[n,r]=e;null!=r&&r.text||(t[n]=r.value)}),t},u=e=>{const t=[...e.validators||[]];return e.required&&t.push({required:e.required,text:e.texts.required_text}),t}},9619:(e,t,n)=>{"use strict";var r=n(8900),o=n(262),a=r.document,i=o(a)&&o(a.createElement);e.exports=function(e){return i?a.createElement(e):{}}},9665:(e,t,n)=>{"use strict";var r=n(5024),o=n(1203),a=n(9619);e.exports=!r&&!o(function(){return 7!==Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a})},9749:(e,t,n)=>{e.exports=n(1726)},9758:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>v}),n(1949);var r=n(9155),o=n.n(r);const a=e=>(0,r.isValidElement)(e)&&(e=>(0,r.isValidElement)(e)&&Boolean(e.props.children))(e)&&r.Children.toArray(e.props.children).reduce((e,t)=>e||(0,r.isValidElement)(t),!1),i=(e,t)=>r.Children.toArray(e).map((e,n,o)=>(0,r.isValidElement)(e)&&a(e)?t((0,r.cloneElement)(e,{...e.props,children:i(e.props.children,t)})):t(e,n,o)),l=i;var s=n(824),c=n(3864);const u=function(e){let{width:t=24,height:n=24,color:r="#333"}=e;return o().createElement("svg",{width:t,height:n,viewBox:"0 0 24 24",fill:"none"},o().createElement("path",{d:"m10.75 8.75 3.5 3.25-3.5 3.25",stroke:r,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))};var d=n(9223),p=n(1328),f=n(7339),h=n(1605),m=n(107),g=n(9576);const b=(e,t)=>o().cloneElement(e,t),v=function(e){let{defaultValues:t,children:n,onSubmit:a,shouldUnregister:i,clearOnSubmit:v=!1,className:y,sendButtonTitle:x="Submit",cancelButtonTitle:w="Cancel",ariaLabel:E,onCancel:k}=e;const{register:_,handleSubmit:A,getValues:T,reset:S,control:C,setError:$,trigger:O,clearErrors:I,setValue:L,formState:{isSubmitting:M,isSubmitted:N}}=(0,s.mN)({...t&&{defaultValues:t},...i&&{shouldUnregister:!0},mode:"onSubmit",reValidateMode:"onChange"}),{currentLanguageCode:R}=(0,p.A)(),{buttonText:P}=(0,r.useContext)(c.Dx),D=async e=>{if(void 0!==Object.values(e).find(e=>!!e))try{await a(e,$),v&&S()}catch(e){throw S(),e}};return o().createElement(m.lV,{onSubmit:A(D),"aria-label":E,isSubmitted:N,className:y,onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),e.metaKey||e.ctrlKey?A(D)():e.target.click())},noValidate:!0},l(n,e=>e?(e=>{var t,n,r,a,i,l;return null!=e&&null!==(t=e.props)&&void 0!==t&&t.name?e.props.hasController?o().createElement(s.xI,Object.assign({key:e.key,control:C,render:t=>b(e,{...e.props,...t}),rules:(0,g.G8)(e.props.validators,R)},e.props)):b(e,{register:_,setError:$,clearErrors:I,trigger:O,control:C,...e.type.name===f.ZH.name&&{setValue:L}}):(null==e||null===(n=e.type)||void 0===n?void 0:n.name)===h.A.name?b(e,{placeholder:null===(r=e.props)||void 0===r||null===(a=r.children)||void 0===a||null===(i=a[0].props)||void 0===i?void 0:i.placeholder_text,...!(null!==(l=e.props)&&void 0!==l&&l.htmlFor)&&{htmlFor:e.props.slug}}):e})(e):null),o().createElement(m.dg,null,o().createElement(d.A,{disabled:M,onClick:()=>{const e=T();k(e)},text:w,isSecondaryButton:!0}),o().createElement(d.A,{type:"submit",icon:o().createElement(u,{color:P,width:16,height:16}),loading:M,text:x,"data-testid":"form-submit-button"})))}},9886:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(9155);function o(e){const t=(0,r.useRef)();return(0,r.useEffect)(()=>{t.current=e},[e]),t.current}},9903:(e,t,n)=>{"use strict";var r=n(5777);e.exports=function(e){var t=+e;return t!=t||0===t?0:r(t)}},9907:e=>{var t,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var l,s=[],c=!1,u=-1;function d(){c&&l&&(c=!1,l.length?s=l.concat(s):u=-1,s.length&&p())}function p(){if(!c){var e=i(d);c=!0;for(var t=s.length;t;){for(l=s,s=[];++u<t;)l&&l[u].run();u=-1,t=s.length}l=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function h(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];s.push(new f(e,t)),1!==s.length||c||i(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=h,r.addListener=h,r.once=h,r.off=h,r.removeListener=h,r.removeAllListeners=h,r.emit=h,r.prependListener=h,r.prependOnceListener=h,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},9932:(e,t,n)=>{"use strict";var r=n(6100),o=r({}.toString),a=r("".slice);e.exports=function(e){return a(o(e),8,-1)}},9989:(e,t,n)=>{"use strict";var r=n(5024),o=n(9665),a=n(1330),i=n(7235),l=n(5341),s=TypeError,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d="enumerable",p="configurable",f="writable";t.f=r?a?function(e,t,n){if(i(e),t=l(t),i(n),"function"==typeof e&&"prototype"===t&&"value"in n&&f in n&&!n[f]){var r=u(e,t);r&&r[f]&&(e[t]=n.value,n={configurable:p in n?n[p]:r[p],enumerable:d in n?n[d]:r[d],writable:!1})}return c(e,t,n)}:c:function(e,t,n){if(i(e),t=l(t),i(n),o)try{return c(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new s("Accessors not supported");return"value"in n&&(e[t]=n.value),e}}},a={};function i(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={id:e,loaded:!1,exports:{}};return o[e].call(n.exports,n,n.exports,i),n.loaded=!0,n.exports}i.amdO={},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{if(void 0!==i){var e=i.u,t=i.e,n={},r={};i.u=function(t){return e(t)+(n.hasOwnProperty(t)?"?"+n[t]:"")},i.e=function(o){return t(o).catch(function(t){var a=r.hasOwnProperty(o)?r[o]:5;if(a<1){var l=e(o);throw t.message="Loading chunk "+o+" failed after 5 retries.\n("+l+")",t.request=l,t}return new Promise(function(e){var t=5-a+1;setTimeout(function(){var l="cache-bust=true&retry-attempt="+t;n[o]=l,r[o]=a-1,e(i.e(o))},e=>300*e)})})}}})(),i.nc=void 0;var l={};return(()=>{"use strict";i.r(l),i.d(l,{default:()=>pe});var e=i(9155),t=i.n(e),n=i(9749),r=i.n(n);var o=i(541),a=i(3864),s=i(6367),c=i(7498),u=i(9308),d=i(1695),p=i(2221);const f=e=>!e||Date.now()-Number(e)>p.M3;var h,m,g=i(6253),b=i(1872),v=i(5960),y=i(1085),x=Object.create,w=Object.defineProperty,E=Object.getOwnPropertyDescriptor,k=Object.getOwnPropertyNames,_=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,T=(h=(e,t)=>{var n,r;n=e,r=function(e){var t,n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,r=536870912,o=2*r,a=new WeakMap,i=function(e,t){return function(a){var i=t.get(a),l=void 0===i?a.size:i<o?i+1:0;if(!a.has(l))return e(a,l);if(a.size<r){for(;a.has(l);)l=Math.floor(Math.random()*o);return e(a,l)}if(a.size>n)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;a.has(l);)l=Math.floor(Math.random()*n);return e(a,l)}}((t=a,function(e,n){return t.set(e,n),n}),a),l=function(e){return function(t){var n=e(t);return t.add(n),n}}(i);e.addUniqueNumber=l,e.generateUniqueNumber=i},"object"==typeof e&&typeof t<"u"?r(e):"function"==typeof define&&i.amdO?define(["exports"],r):r((n=typeof globalThis<"u"?globalThis:n||self).fastUniqueNumbers={})},()=>(m||h((m={exports:{}}).exports,m),m.exports));e.Component;((e,t,n)=>{n=null!=e?x(_(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of k(t))!A.call(e,n)&&undefined!==n&&w(e,n,{get:()=>t[n],enumerable:!(r=E(t,n))||r.enumerable})})(e&&e.__esModule?n:w(n,"default",{value:e,enumerable:!0}),e)})(T());var S="object"==(typeof window>"u"?"undefined":typeof window),C={setTimeout:S?setTimeout.bind(window):setTimeout,clearTimeout:S?clearTimeout.bind(window):clearTimeout,setInterval:S?setInterval.bind(window):setInterval,clearInterval:S?clearInterval.bind(window):clearInterval},$={},O=typeof window>"u"?void 0:"function"==typeof window.BroadcastChannel?window.BroadcastChannel:class{name;closed=!1;mc=new MessageChannel;constructor(e){this.name=e,$[e]=$[e]||[],$[e].push(this),this.mc.port1.start(),this.mc.port2.start(),this.onStorage=this.onStorage.bind(this),window.addEventListener("storage",this.onStorage)}onStorage(e){if(e.storageArea!==window.localStorage||e.key.substring(0,this.name.length)!==this.name||null===e.newValue)return;let t=JSON.parse(e.newValue);this.mc.port2.postMessage(t)}postMessage(e){if(this.closed)throw new Error("InvalidStateError");let t=JSON.stringify(e),n=`${this.name}:${String(Date.now())}${String(Math.random())}`;window.localStorage.setItem(n,t),C.setTimeout(()=>{window.localStorage.removeItem(n)},500),$[this.name].forEach(e=>{e!==this&&e.mc.port2.postMessage(JSON.parse(t))})}close(){if(this.closed)return;this.closed=!0,this.mc.port1.close(),this.mc.port2.close(),window.removeEventListener("storage",this.onStorage);let e=$[this.name].indexOf(this);$[this.name].splice(e,1)}get onmessage(){return this.mc.port1.onmessage}set onmessage(e){this.mc.port1.onmessage=e}get onmessageerror(){return this.mc.port1.onmessageerror}set onmessageerror(e){this.mc.port1.onmessageerror=e}addEventListener(e,t){return this.mc.port1.addEventListener(e,t)}removeEventListener(e,t){return this.mc.port1.removeEventListener(e,t)}dispatchEvent(e){return this.mc.port1.dispatchEvent(e)}};function I(){return Math.random().toString(36).substring(2)}var L=class{options;channel;token=I();isLeader=!1;isDead=!1;isApplying=!1;reApply=!1;intervals=[];listeners=[];deferred;constructor(e,t){this.channel=e,this.options=t,this.apply=this.apply.bind(this),this.awaitLeadership=this.awaitLeadership.bind(this),this.sendAction=this.sendAction.bind(this)}async apply(){if(this.isLeader||this.isDead)return!1;if(this.isApplying)return this.reApply=!0,!1;this.isApplying=!0;let e=!1,t=t=>{let{token:n,action:r}=t.data;n!==this.token&&(0===r&&n>this.token&&(e=!0),1===r&&(e=!0))};this.channel.addEventListener("message",t);try{return this.sendAction(0),await function(e=0){return new Promise(t=>C.setTimeout(t,e))}(this.options.responseTime),this.channel.removeEventListener("message",t),this.isApplying=!1,e?!!this.reApply&&this.apply():(this.assumeLead(),!0)}catch{return!1}}awaitLeadership(){if(this.isLeader)return Promise.resolve();let e=!1,t=null;return new Promise(n=>{let r=()=>{if(e)return;e=!0;try{C.clearInterval(t)}catch{}let r=this.intervals.indexOf(t);r>=0&&this.intervals.splice(r,1),this.channel.removeEventListener("message",o),n()};t=C.setInterval(()=>{this.apply().then(()=>{this.isLeader&&r()})},this.options.fallbackInterval),this.intervals.push(t);let o=e=>{let{action:t}=e.data;2===t&&this.apply().then(()=>{this.isLeader&&r()})};this.channel.addEventListener("message",o)})}sendAction(e){this.channel.postMessage({action:e,token:this.token})}assumeLead(){this.isLeader=!0;let e=e=>{let{action:t}=e.data;0===t&&this.sendAction(1)};return this.channel.addEventListener("message",e),this.listeners.push(e),this.sendAction(1)}waitForLeadership(){return this.deferred||(this.deferred=this.awaitLeadership()),this.deferred}close(){if(!this.isDead){this.isDead=!0,this.isLeader=!1,this.sendAction(2);try{this.listeners.forEach(e=>this.channel.removeEventListener("message",e)),this.intervals.forEach(e=>C.clearInterval(e))}catch{}}}},M=class{channel;options;elector;token=I();registry=new Map;allIdle=!1;isLastActive=!1;constructor(e){let{channelName:t}=e;if(this.options=e,this.channel=new O(t),this.registry.set(this.token,1),e.leaderElection){let e={fallbackInterval:2e3,responseTime:100};this.elector=new L(this.channel,e),this.elector.waitForLeadership()}this.channel.addEventListener("message",e=>{let{action:t,token:n,data:r}=e.data;switch(t){case 3:this.registry.set(n,2);break;case 4:this.registry.delete(n);break;case 5:this.idle(n);break;case 6:this.active(n);break;case 7:this.prompt(n);break;case 8:this.start(n);break;case 9:this.reset(n);break;case 10:this.activate(n);break;case 11:this.pause(n);break;case 12:this.resume(n);break;case 13:this.options.onMessage(r)}}),this.send(3)}get isLeader(){if(!this.elector)throw new Error('❌ Leader election is not enabled. To Enable it set the "leaderElection" property to true.');return this.elector.isLeader}prompt(e=this.token){this.registry.set(e,0);let t=[...this.registry.values()].every(e=>0===e);e===this.token&&this.send(7),t&&this.options.onPrompt()}idle(e=this.token){this.registry.set(e,2);let t=[...this.registry.values()].every(e=>2===e);e===this.token&&this.send(5),!this.allIdle&&t&&(this.allIdle=!0,this.options.onIdle())}active(e=this.token){this.allIdle=!1,this.registry.set(e,1);let t=[...this.registry.values()].some(e=>1===e);e===this.token&&this.send(6),t&&this.options.onActive(),this.isLastActive=e===this.token}start(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(8):this.options.start(!0),this.isLastActive=e===this.token}reset(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(9):this.options.reset(!0),this.isLastActive=e===this.token}activate(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(10):this.options.activate(!0),this.isLastActive=e===this.token}pause(e=this.token){e===this.token?this.send(11):this.options.pause(!0)}resume(e=this.token){e===this.token?this.send(12):this.options.resume(!0)}message(e){try{this.channel.postMessage({action:13,token:this.token,data:e})}catch{}}send(e){try{this.channel.postMessage({action:e,token:this.token})}catch{}}close(){this.options.leaderElection&&this.elector.close(),this.send(4),this.channel.close()}},N=S?document:null,R=["mousemove","keydown","wheel","DOMMouseScroll","mousewheel","mousedown","touchstart","touchmove","MSPointerDown","MSPointerMove","visibilitychange","focus"];function P(e,t){let n=0;return function(...r){let o=(new Date).getTime();if(!(o-n<t))return n=o,e(...r)}}var D=()=>Date.now(),j=2147483647;(0,e.createContext)(null).Consumer;const F=function(t){return(0,e.forwardRef)(function(n,r){let o=function({timeout:t=12e5,promptTimeout:n=0,promptBeforeIdle:r=0,element:o=N,events:a=R,timers:i,immediateEvents:l=[],onPresenceChange:s=()=>{},onPrompt:c=()=>{},onIdle:u=()=>{},onActive:d=()=>{},onAction:p=()=>{},onMessage:f=()=>{},debounce:h=0,throttle:m=0,eventsThrottle:g=200,startOnMount:b=!0,startManually:v=!1,stopOnIdle:y=!1,crossTab:x=!1,name:w="idle-timer",syncTimers:E=0,leaderElection:k=!1,disabled:_=!1}={}){let A=(0,e.useRef)(D()),T=(0,e.useRef)(D()),$=(0,e.useRef)(null),O=(0,e.useRef)(null),I=(0,e.useRef)(0),L=(0,e.useRef)(0),F=(0,e.useRef)(0),z=(0,e.useRef)(0),B=(0,e.useRef)(!1),H=(0,e.useRef)(!1),U=(0,e.useRef)(!1),V=(0,e.useRef)(!0),G=(0,e.useRef)(!1),W=(0,e.useRef)(null),q=(0,e.useRef)(null),K=(0,e.useRef)(t),Y=(0,e.useRef)(0);(0,e.useEffect)(()=>{if(n&&console.warn("⚠️ IdleTimer -- The `promptTimeout` property has been deprecated in favor of `promptBeforeIdle`. It will be removed in the next major release."),r&&n)throw new Error("❌ Both promptTimeout and promptBeforeIdle can not be set. The promptTimeout property will be deprecated in a future version.");if(t>=j)throw new Error(`❌ The value for the timeout property must fit in a 32 bit signed integer, ${j}.`);if(n>=j)throw new Error(`❌ The value for the promptTimeout property must fit in a 32 bit signed integer, ${j}.`);if(r>=j)throw new Error(`❌ The value for the promptBeforeIdle property must fit in a 32 bit signed integer, ${j}.`);if(r>=t)throw new Error(`❌ The value for the promptBeforeIdle property must be less than the timeout property, ${t}.`);if(r?(K.current=t-r,Y.current=r):(K.current=t,Y.current=n),!V.current){if(v||_)return;B.current&&(oe.current(null,Fe),q.current&&q.current.active()),ye()}},[t,n,r,v,_]);let X=(0,e.useRef)(y);(0,e.useEffect)(()=>{X.current=y},[y]);let Z=(0,e.useRef)(l),J=(0,e.useRef)(o),Q=(0,e.useRef)([...new Set([...a,...l]).values()]),ee=(0,e.useRef)(_);(0,e.useEffect)(()=>{ee.current=_,!V.current&&(_?Ee():v||ye())},[_]);let te=(0,e.useRef)(s);(0,e.useEffect)(()=>{te.current=s},[s]);let ne=(0,e.useRef)(c);(0,e.useEffect)(()=>{ne.current=c},[c]);let re=(0,e.useRef)(u);(0,e.useEffect)(()=>{re.current=u},[u]);let oe=(0,e.useRef)(d);(0,e.useEffect)(()=>{oe.current=d},[d]);let ae=(0,e.useRef)(p);(0,e.useEffect)(()=>{ae.current=p},[p]);let ie=(0,e.useRef)(f);(0,e.useEffect)(()=>{ie.current=f},[f]);let le=(0,e.useMemo)(()=>{let e=(e,t)=>ae.current(e,t);return h>0?function(e,t){let n;function r(...r){n&&clearTimeout(n),n=setTimeout(()=>{e(...r),n=null},t)}return r.cancel=function(){clearTimeout(n)},r}(e,h):m>0?P(e,m):e},[m,h]),se=(0,e.useRef)();(0,e.useEffect)(()=>{x&&E&&(se.current=P(()=>{q.current.active()},E))},[x,E]);let ce=()=>{null!==W.current&&(C.clearTimeout(W.current),W.current=null)},ue=(e,t=!0)=>{ce(),W.current=C.setTimeout(he,e||K.current),t&&(O.current=D())},de=e=>{!H.current&&!B.current&&(ne.current(e,Fe),te.current({type:"active",prompted:!0},Fe)),z.current=0,F.current=D(),H.current=!0,ue(Y.current,!1)},pe=()=>{ce(),B.current||(re.current(null,Fe),te.current({type:"idle"},Fe)),B.current=!0,$.current=D(),X.current?ve():H.current&&(F.current=0,H.current=!1)},fe=e=>{ce(),(B.current||H.current)&&(oe.current(e,Fe),te.current({type:"active",prompted:!1},Fe)),H.current=!1,F.current=0,B.current=!1,I.current+=D()-$.current,L.current+=D()-$.current,be(),ue()},he=e=>{if(!B.current){le.cancel&&le.cancel();let t=D()-O.current;return K.current+Y.current<t||!(Y.current>0)||H.current?void(q.current?q.current.idle():pe()):void(q.current?q.current.prompt():de(e))}q.current?q.current.active():fe(e)},me=e=>{if(!b&&!O.current&&(O.current=D(),oe.current(null,Fe)),le(e,Fe),H.current)return;if(ce(),!B.current&&Z.current.includes(e.type))return void he(e);let t=D()-O.current;B.current&&!y||!B.current&&t>=K.current?he(e):(U.current=!1,z.current=0,F.current=0,ue(),x&&E&&se.current())},ge=(0,e.useRef)(me);(0,e.useEffect)(()=>{let e=G.current;e&&ve(),ge.current=g>0?P(me,g):me,e&&be()},[g,m,h,ae,x,E]);let be=()=>{S&&J.current&&(G.current||(Q.current.forEach(e=>{J.current.addEventListener(e,ge.current,{capture:!0,passive:!0})}),G.current=!0))},ve=(e=!1)=>{S&&J.current&&(G.current||e)&&(Q.current.forEach(e=>{J.current.removeEventListener(e,ge.current,{capture:!0})}),G.current=!1)},ye=(0,e.useCallback)(e=>!ee.current&&(ce(),be(),B.current=!1,H.current=!1,U.current=!1,z.current=0,F.current=0,q.current&&!e&&q.current.start(),ue(),!0),[W,B,ee,K,q]),xe=(0,e.useCallback)(e=>!ee.current&&(ce(),be(),T.current=D(),I.current+=D()-$.current,L.current+=D()-$.current,I.current=0,B.current=!1,H.current=!1,U.current=!1,z.current=0,F.current=0,q.current&&!e&&q.current.reset(),v||ue(),!0),[W,B,K,v,ee,q]),we=(0,e.useCallback)(e=>!ee.current&&(ce(),be(),(B.current||H.current)&&fe(),B.current=!1,H.current=!1,U.current=!1,z.current=0,F.current=0,T.current=D(),q.current&&!e&&q.current.activate(),ue(),!0),[W,B,H,ee,K,q]),Ee=(0,e.useCallback)((e=!1)=>!ee.current&&!U.current&&(z.current=Oe(),U.current=!0,ve(),ce(),q.current&&!e&&q.current.pause(),!0),[W,ee,q]),ke=(0,e.useCallback)((e=!1)=>!(ee.current||!U.current||(U.current=!1,H.current||be(),B.current||ue(z.current),F.current&&(F.current=D()),q.current&&!e&&q.current.resume(),0)),[W,K,ee,z,q]),_e=(0,e.useCallback)((e,t)=>(q.current?(t&&ie.current(e,Fe),q.current.message(e)):t&&ie.current(e,Fe),!0),[f]),Ae=(0,e.useCallback)(()=>B.current,[B]),Te=(0,e.useCallback)(()=>H.current,[H]),Se=(0,e.useCallback)(()=>q.current?q.current.isLeader:null,[q]),Ce=(0,e.useCallback)(()=>q.current?q.current.isLastActive:null,[q]),$e=(0,e.useCallback)(()=>q.current?q.current.token:null,[q]),Oe=(0,e.useCallback)(()=>{if(U.current)return z.current;let e=z.current?z.current:Y.current+K.current,t=O.current?D()-O.current:0,n=Math.floor(e-t);return n<0?0:Math.abs(n)},[K,Y,H,z,O]),Ie=(0,e.useCallback)(()=>Math.round(D()-T.current),[T]),Le=(0,e.useCallback)(()=>Math.round(D()-A.current),[A]),Me=(0,e.useCallback)(()=>$.current?new Date($.current):null,[$]),Ne=(0,e.useCallback)(()=>O.current?new Date(O.current):null,[O]),Re=(0,e.useCallback)(()=>B.current?Math.round(D()-$.current+I.current):Math.round(I.current),[$,I]),Pe=(0,e.useCallback)(()=>B.current?Math.round(D()-$.current+L.current):Math.round(L.current),[$,L]),De=(0,e.useCallback)(()=>{let e=Math.round(Ie()-Re());return e>=0?e:0},[$,I]),je=(0,e.useCallback)(()=>{let e=Math.round(Le()-Pe());return e>=0?e:0},[$,I]);(0,e.useEffect)(()=>{if(h>0&&m>0)throw new Error("❌ onAction can either be throttled or debounced, not both.");i&&function(e){C.setTimeout=e.setTimeout,C.clearTimeout=e.clearTimeout,C.setInterval=e.setInterval,C.clearInterval=e.clearInterval}(i);let e=()=>{q.current&&q.current.close(),le.cancel&&le.cancel(),ce(),ve(!0)};return S&&window.addEventListener("beforeunload",e),()=>{S&&window.removeEventListener("beforeunload",e),q.current&&q.current.close(),le.cancel&&le.cancel(),ce(),ve(!0)}},[]),(0,e.useEffect)(()=>{q.current&&q.current.close(),q.current=x?new M({channelName:w,leaderElection:k,onPrompt:()=>{de()},onIdle:()=>{pe()},onActive:()=>{fe()},onMessage:e=>{ie.current(e,Fe)},start:ye,reset:xe,activate:we,pause:Ee,resume:ke}):null},[x,w,k,ne,re,oe,ie,ye,xe,Ee,ke]),(0,e.useEffect)(()=>{V.current||(ce(),ve(!0)),!v&&!_&&(b?ye():be())},[v,b,_,V]),(0,e.useEffect)(()=>{if(!V.current){let e=[...new Set([...a,...l]).values()];if(ve(),Q.current=e,J.current=o,Z.current=l,v||_)return;b?ye():be()}},[o,JSON.stringify(a),JSON.stringify(l),V,_,v,b]),(0,e.useEffect)(()=>{V.current&&(V.current=!1)},[V]);let Fe={message:_e,start:ye,reset:xe,activate:we,pause:Ee,resume:ke,isIdle:Ae,isPrompted:Te,isLeader:Se,isLastActiveTab:Ce,getTabId:$e,getRemainingTime:Oe,getElapsedTime:Ie,getTotalElapsedTime:Le,getLastIdleTime:Me,getLastActiveTime:Ne,getIdleTime:Re,getTotalIdleTime:Pe,getActiveTime:De,getTotalActiveTime:je,setOnPresenceChange:e=>{s=e,te.current=e},setOnPrompt:e=>{c=e,ne.current=e},setOnIdle:e=>{u=e,re.current=e},setOnActive:e=>{d=e,oe.current=e},setOnAction:e=>{p=e,ae.current=e},setOnMessage:e=>{f=e,ie.current=e}};return Fe}({...n});return"function"==typeof r?r(o):r&&(r.current=o),(0,y.jsx)(t,{...n,...o})})}(e=>{let{children:t}=e;return t});var z=i(7e3);const B="kindly-last-conversion-timestamp",H=`\n${i(534).n}\n .kindly-overflow-hidden {\n overflow: hidden !important;\n }\n`;var U=i(2927),V=i(7173),G=i(1623);const W=function(){const e=document.createElement("div");e.style.fontSize="initial",document.documentElement.appendChild(e);const t=getComputedStyle(e).fontSize;return document.documentElement.removeChild(e),parseFloat(t)}(),q=a.DU`
|
|
4346
|
+
`;function u(e){let{fieldName:t,maxLength:n,control:r,position:i="middle"}=e;const l=(0,a.FH)({control:r,name:t});return o().createElement(c,{$position:i},`${(null==l?void 0:l.length)||0}/${n}`)}},9483:(e,t,n)=>{"use strict";n.d(t,{VP:()=>a,gQ:()=>i,oI:()=>o});var r=n(7173);const o={HANDOVER:"handover",MESSAGE:"message"},a=e=>t=>{const{title:n,message:a}=e;t({type:r.l,pushMessageTitle:n,pushMessageType:o.MESSAGE,pushMessageText:a})},i=()=>(e,t)=>{const{show:n}=t().pushMessages;n&&e({type:r.a_})}},9514:e=>{"use strict";e.exports=r},9619:(e,t,n)=>{"use strict";var r=n(8900),o=n(262),a=r.document,i=o(a)&&o(a.createElement);e.exports=function(e){return i?a.createElement(e):{}}},9662:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(9155),o=n.n(r),a=n(3755),i=n(8020),l=n(587),s=n(9272),c=n(5814);const u=function(e){let{name:t,label:n,control:r,validators:u,register:d,id:p,value:f,isLast:h,inputType:m,...g}=e,b={};u&&(b=(0,c.G8)(u));const v=(0,l.A)({name:t,control:r,trigger:null==r?void 0:r.trigger,setError:null==r?void 0:r.setError,clearErrors:null==r?void 0:r.clearErrors}),{ref:y,onChange:x,...w}=d&&t?d(t,b):{};return o().createElement(o().Fragment,null,o().createElement(a.hl,{htmlFor:p},o().createElement(a.eo,Object.assign({ref:y,name:t,type:m,id:p,value:f},(0,c.NR)(b),w&&{...w},{onChange:e=>{null==x||x(e),v(e)}},g)),o().createElement(a.r6,{$inputType:m,$isForm:!!d},o().createElement(a.FC,{$inputType:m,viewBox:"0 0 24 24"},m===s.cJ.CHECKBOX?o().createElement("polyline",{points:"20 6 9 17 4 12"}):o().createElement("circle",{cx:"12",cy:"13",r:"5"}))),n&&o().createElement(a.Ko,{$isForm:!!d},n)),h&&t&&o().createElement(i.A,{name:t,control:r}))}},9665:(e,t,n)=>{"use strict";var r=n(5024),o=n(1203),a=n(9619);e.exports=!r&&!o(function(){return 7!==Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a})},9749:(e,t,n)=>{e.exports=n(1726)},9886:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(9155);function o(e){const t=(0,r.useRef)();return(0,r.useEffect)(()=>{t.current=e},[e]),t.current}},9903:(e,t,n)=>{"use strict";var r=n(5777);e.exports=function(e){var t=+e;return t!=t||0===t?0:r(t)}},9907:e=>{var t,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var l,s=[],c=!1,u=-1;function d(){c&&l&&(c=!1,l.length?s=l.concat(s):u=-1,s.length&&p())}function p(){if(!c){var e=i(d);c=!0;for(var t=s.length;t;){for(l=s,s=[];++u<t;)l&&l[u].run();u=-1,t=s.length}l=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function h(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];s.push(new f(e,t)),1!==s.length||c||i(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=h,r.addListener=h,r.once=h,r.off=h,r.removeListener=h,r.removeAllListeners=h,r.emit=h,r.prependListener=h,r.prependOnceListener=h,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},9910:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(9155),o=n.n(r),a=n(9662),i=n(3755);function l(e){let{name:t,control:n,options:r,validators:l,register:s,inputType:c}=e;return o().createElement(o().Fragment,null,r.map((e,u)=>o().createElement(i.B2,{key:`${e.value}_${u}`},o().createElement(a.A,{inputType:c,validators:l,register:s,value:e.value,label:e.label,id:e.id,name:t,control:n,isLast:u===r.length-1}))))}const s=o().memo(l)},9932:(e,t,n)=>{"use strict";var r=n(6100),o=r({}.toString),a=r("".slice);e.exports=function(e){return a(o(e),8,-1)}},9989:(e,t,n)=>{"use strict";var r=n(5024),o=n(9665),a=n(1330),i=n(7235),l=n(5341),s=TypeError,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d="enumerable",p="configurable",f="writable";t.f=r?a?function(e,t,n){if(i(e),t=l(t),i(n),"function"==typeof e&&"prototype"===t&&"value"in n&&f in n&&!n[f]){var r=u(e,t);r&&r[f]&&(e[t]=n.value,n={configurable:p in n?n[p]:r[p],enumerable:d in n?n[d]:r[d],writable:!1})}return c(e,t,n)}:c:function(e,t,n){if(i(e),t=l(t),i(n),o)try{return c(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new s("Accessors not supported");return"value"in n&&(e[t]=n.value),e}}},a={};function i(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={id:e,loaded:!1,exports:{}};return o[e].call(n.exports,n,n.exports,i),n.loaded=!0,n.exports}i.amdO={},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{if(void 0!==i){var e=i.u,t=i.e,n={},r={};i.u=function(t){return e(t)+(n.hasOwnProperty(t)?"?"+n[t]:"")},i.e=function(o){return t(o).catch(function(t){var a=r.hasOwnProperty(o)?r[o]:5;if(a<1){var l=e(o);throw t.message="Loading chunk "+o+" failed after 5 retries.\n("+l+")",t.request=l,t}return new Promise(function(e){var t=5-a+1;setTimeout(function(){var l="cache-bust=true&retry-attempt="+t;n[o]=l,r[o]=a-1,e(i.e(o))},e=>300*e)})})}}})(),i.nc=void 0;var l={};return(()=>{"use strict";i.r(l),i.d(l,{default:()=>pe});var e=i(9155),t=i.n(e),n=i(9749),r=i.n(n);var o=i(541),a=i(3864),s=i(6367),c=i(7498),u=i(9308),d=i(1695),p=i(2221);const f=e=>!e||Date.now()-Number(e)>p.M3;var h,m,g=i(6253),b=i(1872),v=i(5960),y=i(1085),x=Object.create,w=Object.defineProperty,E=Object.getOwnPropertyDescriptor,k=Object.getOwnPropertyNames,_=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,T=(h=(e,t)=>{var n,r;n=e,r=function(e){var t,n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,r=536870912,o=2*r,a=new WeakMap,i=function(e,t){return function(a){var i=t.get(a),l=void 0===i?a.size:i<o?i+1:0;if(!a.has(l))return e(a,l);if(a.size<r){for(;a.has(l);)l=Math.floor(Math.random()*o);return e(a,l)}if(a.size>n)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;a.has(l);)l=Math.floor(Math.random()*n);return e(a,l)}}((t=a,function(e,n){return t.set(e,n),n}),a),l=function(e){return function(t){var n=e(t);return t.add(n),n}}(i);e.addUniqueNumber=l,e.generateUniqueNumber=i},"object"==typeof e&&typeof t<"u"?r(e):"function"==typeof define&&i.amdO?define(["exports"],r):r((n=typeof globalThis<"u"?globalThis:n||self).fastUniqueNumbers={})},()=>(m||h((m={exports:{}}).exports,m),m.exports));e.Component;((e,t,n)=>{n=null!=e?x(_(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of k(t))!A.call(e,n)&&undefined!==n&&w(e,n,{get:()=>t[n],enumerable:!(r=E(t,n))||r.enumerable})})(e&&e.__esModule?n:w(n,"default",{value:e,enumerable:!0}),e)})(T());var S="object"==(typeof window>"u"?"undefined":typeof window),$={setTimeout:S?setTimeout.bind(window):setTimeout,clearTimeout:S?clearTimeout.bind(window):clearTimeout,setInterval:S?setInterval.bind(window):setInterval,clearInterval:S?clearInterval.bind(window):clearInterval},C={},O=typeof window>"u"?void 0:"function"==typeof window.BroadcastChannel?window.BroadcastChannel:class{name;closed=!1;mc=new MessageChannel;constructor(e){this.name=e,C[e]=C[e]||[],C[e].push(this),this.mc.port1.start(),this.mc.port2.start(),this.onStorage=this.onStorage.bind(this),window.addEventListener("storage",this.onStorage)}onStorage(e){if(e.storageArea!==window.localStorage||e.key.substring(0,this.name.length)!==this.name||null===e.newValue)return;let t=JSON.parse(e.newValue);this.mc.port2.postMessage(t)}postMessage(e){if(this.closed)throw new Error("InvalidStateError");let t=JSON.stringify(e),n=`${this.name}:${String(Date.now())}${String(Math.random())}`;window.localStorage.setItem(n,t),$.setTimeout(()=>{window.localStorage.removeItem(n)},500),C[this.name].forEach(e=>{e!==this&&e.mc.port2.postMessage(JSON.parse(t))})}close(){if(this.closed)return;this.closed=!0,this.mc.port1.close(),this.mc.port2.close(),window.removeEventListener("storage",this.onStorage);let e=C[this.name].indexOf(this);C[this.name].splice(e,1)}get onmessage(){return this.mc.port1.onmessage}set onmessage(e){this.mc.port1.onmessage=e}get onmessageerror(){return this.mc.port1.onmessageerror}set onmessageerror(e){this.mc.port1.onmessageerror=e}addEventListener(e,t){return this.mc.port1.addEventListener(e,t)}removeEventListener(e,t){return this.mc.port1.removeEventListener(e,t)}dispatchEvent(e){return this.mc.port1.dispatchEvent(e)}};function I(){return Math.random().toString(36).substring(2)}var L=class{options;channel;token=I();isLeader=!1;isDead=!1;isApplying=!1;reApply=!1;intervals=[];listeners=[];deferred;constructor(e,t){this.channel=e,this.options=t,this.apply=this.apply.bind(this),this.awaitLeadership=this.awaitLeadership.bind(this),this.sendAction=this.sendAction.bind(this)}async apply(){if(this.isLeader||this.isDead)return!1;if(this.isApplying)return this.reApply=!0,!1;this.isApplying=!0;let e=!1,t=t=>{let{token:n,action:r}=t.data;n!==this.token&&(0===r&&n>this.token&&(e=!0),1===r&&(e=!0))};this.channel.addEventListener("message",t);try{return this.sendAction(0),await function(e=0){return new Promise(t=>$.setTimeout(t,e))}(this.options.responseTime),this.channel.removeEventListener("message",t),this.isApplying=!1,e?!!this.reApply&&this.apply():(this.assumeLead(),!0)}catch{return!1}}awaitLeadership(){if(this.isLeader)return Promise.resolve();let e=!1,t=null;return new Promise(n=>{let r=()=>{if(e)return;e=!0;try{$.clearInterval(t)}catch{}let r=this.intervals.indexOf(t);r>=0&&this.intervals.splice(r,1),this.channel.removeEventListener("message",o),n()};t=$.setInterval(()=>{this.apply().then(()=>{this.isLeader&&r()})},this.options.fallbackInterval),this.intervals.push(t);let o=e=>{let{action:t}=e.data;2===t&&this.apply().then(()=>{this.isLeader&&r()})};this.channel.addEventListener("message",o)})}sendAction(e){this.channel.postMessage({action:e,token:this.token})}assumeLead(){this.isLeader=!0;let e=e=>{let{action:t}=e.data;0===t&&this.sendAction(1)};return this.channel.addEventListener("message",e),this.listeners.push(e),this.sendAction(1)}waitForLeadership(){return this.deferred||(this.deferred=this.awaitLeadership()),this.deferred}close(){if(!this.isDead){this.isDead=!0,this.isLeader=!1,this.sendAction(2);try{this.listeners.forEach(e=>this.channel.removeEventListener("message",e)),this.intervals.forEach(e=>$.clearInterval(e))}catch{}}}},M=class{channel;options;elector;token=I();registry=new Map;allIdle=!1;isLastActive=!1;constructor(e){let{channelName:t}=e;if(this.options=e,this.channel=new O(t),this.registry.set(this.token,1),e.leaderElection){let e={fallbackInterval:2e3,responseTime:100};this.elector=new L(this.channel,e),this.elector.waitForLeadership()}this.channel.addEventListener("message",e=>{let{action:t,token:n,data:r}=e.data;switch(t){case 3:this.registry.set(n,2);break;case 4:this.registry.delete(n);break;case 5:this.idle(n);break;case 6:this.active(n);break;case 7:this.prompt(n);break;case 8:this.start(n);break;case 9:this.reset(n);break;case 10:this.activate(n);break;case 11:this.pause(n);break;case 12:this.resume(n);break;case 13:this.options.onMessage(r)}}),this.send(3)}get isLeader(){if(!this.elector)throw new Error('❌ Leader election is not enabled. To Enable it set the "leaderElection" property to true.');return this.elector.isLeader}prompt(e=this.token){this.registry.set(e,0);let t=[...this.registry.values()].every(e=>0===e);e===this.token&&this.send(7),t&&this.options.onPrompt()}idle(e=this.token){this.registry.set(e,2);let t=[...this.registry.values()].every(e=>2===e);e===this.token&&this.send(5),!this.allIdle&&t&&(this.allIdle=!0,this.options.onIdle())}active(e=this.token){this.allIdle=!1,this.registry.set(e,1);let t=[...this.registry.values()].some(e=>1===e);e===this.token&&this.send(6),t&&this.options.onActive(),this.isLastActive=e===this.token}start(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(8):this.options.start(!0),this.isLastActive=e===this.token}reset(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(9):this.options.reset(!0),this.isLastActive=e===this.token}activate(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(10):this.options.activate(!0),this.isLastActive=e===this.token}pause(e=this.token){e===this.token?this.send(11):this.options.pause(!0)}resume(e=this.token){e===this.token?this.send(12):this.options.resume(!0)}message(e){try{this.channel.postMessage({action:13,token:this.token,data:e})}catch{}}send(e){try{this.channel.postMessage({action:e,token:this.token})}catch{}}close(){this.options.leaderElection&&this.elector.close(),this.send(4),this.channel.close()}},N=S?document:null,R=["mousemove","keydown","wheel","DOMMouseScroll","mousewheel","mousedown","touchstart","touchmove","MSPointerDown","MSPointerMove","visibilitychange","focus"];function P(e,t){let n=0;return function(...r){let o=(new Date).getTime();if(!(o-n<t))return n=o,e(...r)}}var D=()=>Date.now(),j=2147483647;(0,e.createContext)(null).Consumer;const F=function(t){return(0,e.forwardRef)(function(n,r){let o=function({timeout:t=12e5,promptTimeout:n=0,promptBeforeIdle:r=0,element:o=N,events:a=R,timers:i,immediateEvents:l=[],onPresenceChange:s=()=>{},onPrompt:c=()=>{},onIdle:u=()=>{},onActive:d=()=>{},onAction:p=()=>{},onMessage:f=()=>{},debounce:h=0,throttle:m=0,eventsThrottle:g=200,startOnMount:b=!0,startManually:v=!1,stopOnIdle:y=!1,crossTab:x=!1,name:w="idle-timer",syncTimers:E=0,leaderElection:k=!1,disabled:_=!1}={}){let A=(0,e.useRef)(D()),T=(0,e.useRef)(D()),C=(0,e.useRef)(null),O=(0,e.useRef)(null),I=(0,e.useRef)(0),L=(0,e.useRef)(0),F=(0,e.useRef)(0),z=(0,e.useRef)(0),B=(0,e.useRef)(!1),H=(0,e.useRef)(!1),U=(0,e.useRef)(!1),V=(0,e.useRef)(!0),G=(0,e.useRef)(!1),W=(0,e.useRef)(null),q=(0,e.useRef)(null),K=(0,e.useRef)(t),Y=(0,e.useRef)(0);(0,e.useEffect)(()=>{if(n&&console.warn("⚠️ IdleTimer -- The `promptTimeout` property has been deprecated in favor of `promptBeforeIdle`. It will be removed in the next major release."),r&&n)throw new Error("❌ Both promptTimeout and promptBeforeIdle can not be set. The promptTimeout property will be deprecated in a future version.");if(t>=j)throw new Error(`❌ The value for the timeout property must fit in a 32 bit signed integer, ${j}.`);if(n>=j)throw new Error(`❌ The value for the promptTimeout property must fit in a 32 bit signed integer, ${j}.`);if(r>=j)throw new Error(`❌ The value for the promptBeforeIdle property must fit in a 32 bit signed integer, ${j}.`);if(r>=t)throw new Error(`❌ The value for the promptBeforeIdle property must be less than the timeout property, ${t}.`);if(r?(K.current=t-r,Y.current=r):(K.current=t,Y.current=n),!V.current){if(v||_)return;B.current&&(oe.current(null,Fe),q.current&&q.current.active()),ye()}},[t,n,r,v,_]);let X=(0,e.useRef)(y);(0,e.useEffect)(()=>{X.current=y},[y]);let Z=(0,e.useRef)(l),J=(0,e.useRef)(o),Q=(0,e.useRef)([...new Set([...a,...l]).values()]),ee=(0,e.useRef)(_);(0,e.useEffect)(()=>{ee.current=_,!V.current&&(_?Ee():v||ye())},[_]);let te=(0,e.useRef)(s);(0,e.useEffect)(()=>{te.current=s},[s]);let ne=(0,e.useRef)(c);(0,e.useEffect)(()=>{ne.current=c},[c]);let re=(0,e.useRef)(u);(0,e.useEffect)(()=>{re.current=u},[u]);let oe=(0,e.useRef)(d);(0,e.useEffect)(()=>{oe.current=d},[d]);let ae=(0,e.useRef)(p);(0,e.useEffect)(()=>{ae.current=p},[p]);let ie=(0,e.useRef)(f);(0,e.useEffect)(()=>{ie.current=f},[f]);let le=(0,e.useMemo)(()=>{let e=(e,t)=>ae.current(e,t);return h>0?function(e,t){let n;function r(...r){n&&clearTimeout(n),n=setTimeout(()=>{e(...r),n=null},t)}return r.cancel=function(){clearTimeout(n)},r}(e,h):m>0?P(e,m):e},[m,h]),se=(0,e.useRef)();(0,e.useEffect)(()=>{x&&E&&(se.current=P(()=>{q.current.active()},E))},[x,E]);let ce=()=>{null!==W.current&&($.clearTimeout(W.current),W.current=null)},ue=(e,t=!0)=>{ce(),W.current=$.setTimeout(he,e||K.current),t&&(O.current=D())},de=e=>{!H.current&&!B.current&&(ne.current(e,Fe),te.current({type:"active",prompted:!0},Fe)),z.current=0,F.current=D(),H.current=!0,ue(Y.current,!1)},pe=()=>{ce(),B.current||(re.current(null,Fe),te.current({type:"idle"},Fe)),B.current=!0,C.current=D(),X.current?ve():H.current&&(F.current=0,H.current=!1)},fe=e=>{ce(),(B.current||H.current)&&(oe.current(e,Fe),te.current({type:"active",prompted:!1},Fe)),H.current=!1,F.current=0,B.current=!1,I.current+=D()-C.current,L.current+=D()-C.current,be(),ue()},he=e=>{if(!B.current){le.cancel&&le.cancel();let t=D()-O.current;return K.current+Y.current<t||!(Y.current>0)||H.current?void(q.current?q.current.idle():pe()):void(q.current?q.current.prompt():de(e))}q.current?q.current.active():fe(e)},me=e=>{if(!b&&!O.current&&(O.current=D(),oe.current(null,Fe)),le(e,Fe),H.current)return;if(ce(),!B.current&&Z.current.includes(e.type))return void he(e);let t=D()-O.current;B.current&&!y||!B.current&&t>=K.current?he(e):(U.current=!1,z.current=0,F.current=0,ue(),x&&E&&se.current())},ge=(0,e.useRef)(me);(0,e.useEffect)(()=>{let e=G.current;e&&ve(),ge.current=g>0?P(me,g):me,e&&be()},[g,m,h,ae,x,E]);let be=()=>{S&&J.current&&(G.current||(Q.current.forEach(e=>{J.current.addEventListener(e,ge.current,{capture:!0,passive:!0})}),G.current=!0))},ve=(e=!1)=>{S&&J.current&&(G.current||e)&&(Q.current.forEach(e=>{J.current.removeEventListener(e,ge.current,{capture:!0})}),G.current=!1)},ye=(0,e.useCallback)(e=>!ee.current&&(ce(),be(),B.current=!1,H.current=!1,U.current=!1,z.current=0,F.current=0,q.current&&!e&&q.current.start(),ue(),!0),[W,B,ee,K,q]),xe=(0,e.useCallback)(e=>!ee.current&&(ce(),be(),T.current=D(),I.current+=D()-C.current,L.current+=D()-C.current,I.current=0,B.current=!1,H.current=!1,U.current=!1,z.current=0,F.current=0,q.current&&!e&&q.current.reset(),v||ue(),!0),[W,B,K,v,ee,q]),we=(0,e.useCallback)(e=>!ee.current&&(ce(),be(),(B.current||H.current)&&fe(),B.current=!1,H.current=!1,U.current=!1,z.current=0,F.current=0,T.current=D(),q.current&&!e&&q.current.activate(),ue(),!0),[W,B,H,ee,K,q]),Ee=(0,e.useCallback)((e=!1)=>!ee.current&&!U.current&&(z.current=Oe(),U.current=!0,ve(),ce(),q.current&&!e&&q.current.pause(),!0),[W,ee,q]),ke=(0,e.useCallback)((e=!1)=>!(ee.current||!U.current||(U.current=!1,H.current||be(),B.current||ue(z.current),F.current&&(F.current=D()),q.current&&!e&&q.current.resume(),0)),[W,K,ee,z,q]),_e=(0,e.useCallback)((e,t)=>(q.current?(t&&ie.current(e,Fe),q.current.message(e)):t&&ie.current(e,Fe),!0),[f]),Ae=(0,e.useCallback)(()=>B.current,[B]),Te=(0,e.useCallback)(()=>H.current,[H]),Se=(0,e.useCallback)(()=>q.current?q.current.isLeader:null,[q]),$e=(0,e.useCallback)(()=>q.current?q.current.isLastActive:null,[q]),Ce=(0,e.useCallback)(()=>q.current?q.current.token:null,[q]),Oe=(0,e.useCallback)(()=>{if(U.current)return z.current;let e=z.current?z.current:Y.current+K.current,t=O.current?D()-O.current:0,n=Math.floor(e-t);return n<0?0:Math.abs(n)},[K,Y,H,z,O]),Ie=(0,e.useCallback)(()=>Math.round(D()-T.current),[T]),Le=(0,e.useCallback)(()=>Math.round(D()-A.current),[A]),Me=(0,e.useCallback)(()=>C.current?new Date(C.current):null,[C]),Ne=(0,e.useCallback)(()=>O.current?new Date(O.current):null,[O]),Re=(0,e.useCallback)(()=>B.current?Math.round(D()-C.current+I.current):Math.round(I.current),[C,I]),Pe=(0,e.useCallback)(()=>B.current?Math.round(D()-C.current+L.current):Math.round(L.current),[C,L]),De=(0,e.useCallback)(()=>{let e=Math.round(Ie()-Re());return e>=0?e:0},[C,I]),je=(0,e.useCallback)(()=>{let e=Math.round(Le()-Pe());return e>=0?e:0},[C,I]);(0,e.useEffect)(()=>{if(h>0&&m>0)throw new Error("❌ onAction can either be throttled or debounced, not both.");i&&function(e){$.setTimeout=e.setTimeout,$.clearTimeout=e.clearTimeout,$.setInterval=e.setInterval,$.clearInterval=e.clearInterval}(i);let e=()=>{q.current&&q.current.close(),le.cancel&&le.cancel(),ce(),ve(!0)};return S&&window.addEventListener("beforeunload",e),()=>{S&&window.removeEventListener("beforeunload",e),q.current&&q.current.close(),le.cancel&&le.cancel(),ce(),ve(!0)}},[]),(0,e.useEffect)(()=>{q.current&&q.current.close(),q.current=x?new M({channelName:w,leaderElection:k,onPrompt:()=>{de()},onIdle:()=>{pe()},onActive:()=>{fe()},onMessage:e=>{ie.current(e,Fe)},start:ye,reset:xe,activate:we,pause:Ee,resume:ke}):null},[x,w,k,ne,re,oe,ie,ye,xe,Ee,ke]),(0,e.useEffect)(()=>{V.current||(ce(),ve(!0)),!v&&!_&&(b?ye():be())},[v,b,_,V]),(0,e.useEffect)(()=>{if(!V.current){let e=[...new Set([...a,...l]).values()];if(ve(),Q.current=e,J.current=o,Z.current=l,v||_)return;b?ye():be()}},[o,JSON.stringify(a),JSON.stringify(l),V,_,v,b]),(0,e.useEffect)(()=>{V.current&&(V.current=!1)},[V]);let Fe={message:_e,start:ye,reset:xe,activate:we,pause:Ee,resume:ke,isIdle:Ae,isPrompted:Te,isLeader:Se,isLastActiveTab:$e,getTabId:Ce,getRemainingTime:Oe,getElapsedTime:Ie,getTotalElapsedTime:Le,getLastIdleTime:Me,getLastActiveTime:Ne,getIdleTime:Re,getTotalIdleTime:Pe,getActiveTime:De,getTotalActiveTime:je,setOnPresenceChange:e=>{s=e,te.current=e},setOnPrompt:e=>{c=e,ne.current=e},setOnIdle:e=>{u=e,re.current=e},setOnActive:e=>{d=e,oe.current=e},setOnAction:e=>{p=e,ae.current=e},setOnMessage:e=>{f=e,ie.current=e}};return Fe}({...n});return"function"==typeof r?r(o):r&&(r.current=o),(0,y.jsx)(t,{...n,...o})})}(e=>{let{children:t}=e;return t});var z=i(7e3);const B="kindly-last-conversion-timestamp",H=`\n${i(534).n}\n .kindly-overflow-hidden {\n overflow: hidden !important;\n }\n`;var U=i(2927),V=i(7173),G=i(1623);const W=function(){const e=document.createElement("div");e.style.fontSize="initial",document.documentElement.appendChild(e);const t=getComputedStyle(e).fontSize;return document.documentElement.removeChild(e),parseFloat(t)}(),q=a.DU`
|
|
4352
4347
|
#kindly-root {
|
|
4353
4348
|
font-size: initial;
|
|
4354
4349
|
|
|
@@ -4361,4 +4356,4 @@
|
|
|
4361
4356
|
--_kindlychat-font-size-h2: calc(${W}px * 1.6);
|
|
4362
4357
|
--_kindlychat-font-size-input: ${Math.max(16,W)}px;
|
|
4363
4358
|
}
|
|
4364
|
-
`;var K=i(8905);const Y=e=>{var t,n,r,o,a,i,l,s,c,u,d,p,f,h,m,g,b,v,y,x,w,E,k,_,A,T,S,C,$,O,I,L,M;return{customFont:null!==(t=null==e?void 0:e.customFont)&&void 0!==t?t:null,chatbubbleText:null!==(n=null==e||null===(r=e.style)||void 0===r?void 0:r.color_chatbubble_text)&&void 0!==n?n:K.AV.dark,background:null!==(o=null==e||null===(a=e.style)||void 0===a?void 0:a.color_background)&&void 0!==o?o:"#ffffff",bubbleButtonOutline:null!==(i=null==e||null===(l=e.style)||void 0===l?void 0:l.color_button_outline)&&void 0!==i?i:"#0069ff",buttonBackground:null!==(s=null==e||null===(c=e.style)||void 0===c?void 0:c.color_button_background)&&void 0!==s?s:"#0069ff",secondaryButtonBackground:null!==(u=null==e||null===(d=e.style)||void 0===d?void 0:d.color_secondary_button_background)&&void 0!==u?u:"#ffffff",bubbleButtonBackground:null!==(p=null==e||null===(f=e.style)||void 0===f?void 0:f.color_bubble_button_background)&&void 0!==p?p:"#0069ff",buttonText:null!==(h=null==e||null===(m=e.style)||void 0===m?void 0:m.color_button_text)&&void 0!==h?h:"#ffffff",headerBackground:null!==(g=null==e||null===(b=e.style)||void 0===b?void 0:b.color_header_background)&&void 0!==g?g:"#0069ff",headerText:null!==(v=null==e||null===(y=e.style)||void 0===y?void 0:y.color_header_text)&&void 0!==v?v:"#ffffff",inputBackground:null!==(x=null==e||null===(w=e.style)||void 0===w?void 0:w.color_input_background)&&void 0!==x?x:"#ffffff",inputText:null!==(E=null==e||null===(k=e.style)||void 0===k?void 0:k.color_input_text)&&void 0!==E?E:"#333333",userMessageBackground:null!==(_=null==e||null===(A=e.style)||void 0===A?void 0:A.color_user_message_background)&&void 0!==_?_:"#f5f5f5",userMessageText:null!==(T=null==e||null===(S=e.style)||void 0===S?void 0:S.color_user_message_text_color)&&void 0!==T?T:"#2c2c2c",botMessageBackground:null!==(C=null==e||null===($=e.style)||void 0===$?void 0:$.color_bot_message_background)&&void 0!==C?C:"#f5f5f5",botMessageText:null!==(O=null==e||null===(I=e.style)||void 0===I?void 0:I.color_bot_message_text_color)&&void 0!==O?O:"#2c2c2c",panelBackground:null!==(L=null==e||null===(M=e.style)||void 0===M?void 0:M.color_panel_background)&&void 0!==L?L:"#ffffff"}};var X=i(2628),Z=i(6079);function J(n){let{settings:r}=n;const a=(0,o.wA)(),{inPlatform:i}=(0,o.d4)(d.$P),{canShow:l}=function(){const{splitTestEnabled:t,splitTestLabel:n,splitLabelTimestamp:r}=(0,o.d4)(d.Od),a=(0,o.wA)(),i=(0,e.useCallback)(()=>{a((0,b.YK)())},[a]),l=(0,g.A)(i,2500);return(0,e.useEffect)(()=>{function e(){l()}return t&&window.addEventListener("mousemove",e),()=>t?window.removeEventListener("mousemove",e):void 0},[t]),(0,e.useEffect)(()=>{r&&f(r)&&a((0,b.Ss)())},[r]),(0,e.useEffect)(()=>{let e=n||p.OT.NO_SPLIT_LABEL;t&&!n&&(e=Math.random()>.5?p.OT.SPLIT_A:p.OT.SPLIT_B),n||a((0,b.dm)(e))},[t,n]),{canShow:t&&["A","X"].indexOf(n)>-1||!t,splitTestLabel:n}}();return(()=>{const t=(0,o.wA)(),[n,r]=(0,e.useState)("/"),{conversionPageUrl:a,splitTestLabel:i,hasInteraction:l,splitTestEnabled:s}=(0,o.d4)(d.Od),c=(()=>{const[t,n]=(0,e.useState)(!1),{conversionPageUrl:r}=(0,o.d4)(d.Od),a=((t,n)=>{let{enable:r=!0}=n;const[o,a]=(0,e.useState)(null);if(!r)return null;const i=setInterval(()=>{const e=document.querySelector("#klarna-checkout-iframe");e&&(a(e),clearInterval(i))},500);return o})(0,{enable:null==r?void 0:r.match(/klarna/gi)}),i=(0,e.useRef)(null),l=(0,e.useCallback)(e=>{var t;const r=e.getAttribute("src")||"",o=function(e){try{return JSON.parse(e)}catch(e){return console.error("Failed to parse JSON:",e),null}}((null===(t=decodeURIComponent(r).match(/\{"(.*)/gim))||void 0===t?void 0:t[0])||"");o&&"object"==typeof o&&["created","checkout_complete"].indexOf(o.ORDER_STATUS)>-1&&n(!0)},[]);return(0,e.useEffect)(()=>{a&&!i.current&&(l(a),i.current=setInterval(()=>l(a),500))},[a,i,l]),(0,e.useEffect)(()=>{t&&clearInterval(i.current)},[t]),t})(),u=(0,e.useCallback)(()=>{if(!f(localStorage.getItem(B)))return;const e=s&&i,n=!l;localStorage.setItem(B,Number(new Date)),t((0,b.yM)(e,n)),t((0,b.Ss)())},[t,i,l,s]);(0,e.useEffect)(()=>{c&&u()},[u,c]),(0,e.useEffect)(()=>{r(window.location.href),null!=a&&a.trim()&&(0,z.A)(n,a)&&u()},[u,n,a])})(),function(){const t=(0,o.wA)(),{botKey:n}=(0,o.d4)(d.$P),{messageSentTime:r}=(0,o.d4)(d.DZ),{persistStateLifespan:a}=(0,o.d4)(d.Od),{chatMessages:i}=(0,o.d4)(d.DZ);(0,e.useEffect)(()=>{const e=(0,U.A)({messageSentTime:r,persistStateLifespan:a});0===a||e||0===i.length||t((0,b.g4)(n))},[n,t,a,r])}(),(0,e.useEffect)(()=>{var e;l&&null!==(e=r.chatbubble)&&void 0!==e&&e.autopopup&&!(0,X.A)()&&!i&&setTimeout(()=>a((0,b.UB)()),r.chatbubble.autopopup_time)},[a,i,r,l]),l?t().createElement(u.A,{chatSettings:r,hidden:r.bubbleHidden,onNudgeDismiss:r.onNudgeDismiss,onNudgeFormSubmit:r.onNudgeFormSubmit,onNudgeProductClick:r.onNudgeProductClick}):null}let Q=!1,ee=null;const te=(0,e.forwardRef)((n,r)=>{let{botKey:l,settings:u,initialChatLanguage:d}=n;return ee||(ee=(0,v.Ay)({botKey:l,settings:u,initialChatLanguage:d})),(0,e.useEffect)(()=>()=>{ee=null},[]),function(){const{nonce:t}=window.__KINDLY_SETTINGS__;(0,e.useEffect)(()=>{const e=document.createElement("style");e.setAttribute("data-kindly-styles","true"),e.textContent=H,t&&e.setAttribute("nonce",t);try{return document.querySelector('style[data-kindly-styles="true"]')||document.head.appendChild(e),()=>{try{const e=document.querySelector('style[data-kindly-styles="true"]');e&&document.head.contains(e)&&document.head.removeChild(e)}catch(e){console.error("Error removing Kindly styles:",e)}}}catch(e){return void console.error("Error injecting Kindly styles:",e)}},[])}(),(0,e.useImperativeHandle)(r,()=>({getActivityStatus:()=>ee.getState().chatbubble.active,openChat(){ee.dispatch((0,b.lQ)({source:"programmatic"}))},closeChat(){ee.dispatch((0,b.Rh)({source:"programmatic"}))},restartChat(){let{openChat:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{openChat:!1};(0,Z.Tk)(),ee.dispatch((0,b.zX)(l,e))},triggerDialogue(e,t){ee.dispatch((0,b.zh)(e,t))},sendMessage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.trim(),r="user"===t.sender,o=!1===t.openChat,{newContext:a}=t;r&&n&&ee.dispatch((0,b.y2)(n,void 0,a,void 0,void 0,{shouldOpenChat:!o}))},showNudge(e){let{nudgeLayout:t,slug:n,trackEvent:r=!0}=e;ee.dispatch((0,b.fe)({nudgeLayout:t,slug:n,trackEvent:r}))},showCustomNudge(e){let{content:t,slug:n,onRendered:r,trackEvent:o=!0}=e;ee.dispatch((0,b.kS)({content:t,slug:n,onRendered:r,trackEvent:o}))},getNudges:()=>ee.getState().bot.nudges,closeNudge(e,t){ee.dispatch((0,b.Y_)(e,t))},nudgeCompletion(e){sessionStorage.getItem("kindly-nudge-completion")||(ee.dispatch((0,G.vJ)({slug:e,eventType:V.oE})),ee.dispatch({type:V.Kd,slug:e}),sessionStorage.setItem("kindly-nudge-completion","true"))},triggerCtaEvent(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;ee.dispatch((0,G.NS)(e))},identifyUser(e){ee.dispatch((0,b.gm)(e))},setNewContext(e){ee.dispatch((0,b.Aw)(e))},getContext:()=>ee.dispatch((0,b.SD)()),setNewBannerMessage(e,t){ee.dispatch((0,b.cC)(e,t||(null==e?void 0:e.message)))},setNewLabel(e){ee.dispatch((0,b.tD)(e))},cancelHandover(){ee.dispatch((0,b.cL)())}})),(0,e.useEffect)(()=>{(0,s.NY)(u)},[u]),(0,e.useEffect)(()=>{const{persistStateLifespan:e}=ee.getState().bot;if(-1===e||e>0)return;let t=!1;const n=()=>{t||(t=!0,ee.dispatch((0,b.R7)(l)))};window.onbeforeunload=n,window.onunload=n},[l,u,ee]),(0,e.useEffect)(()=>{!Q&&u.track_utm&&(Q=!0,Promise.resolve().then(i.bind(i,649)).then(e=>{let{default:t}=e;const n=t();n&&ee.dispatch((0,b.Aw)({...n}))}))},[u,ee]),window.Cypress&&(window.store=ee),t().createElement(o.Kq,{store:ee},t().createElement(a.NP,{theme:Y(u)},t().createElement(q,null),t().createElement(c.A,{errorPoint:"inside ChatContainer",displayError:!1},(u.user_idle_timeout_seconds||0)>0?t().createElement(F,{onIdle:()=>ee.dispatch((0,b.ZS)()),onActive:()=>ee.dispatch((0,b.Mm)(u.id)),timeout:1e3*(u.user_idle_timeout_seconds||0)},t().createElement(J,{settings:u})):t().createElement(J,{settings:u}))))});te.displayName="ChatContainer";const ne=te;var re=i(2366),oe=i(6249);function ae(e){let{retries:t=6,interval:n=300,intervalBackoffMultiplier:r=2}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((o,a)=>{e({retriesLeft:t,interval:n,intervalBackoffMultiplier:r}).then(o).catch(i=>{setTimeout(()=>{t<=1?a(i):ae(e,{retries:t-1,interval:n*r,intervalBackoffMultiplier:r}).then(o,a)},n)})})}async function ie(e,t,n){const r=(0,re.U)(),o=`${e}/settings/${t}.json?version=2.76.4&${[re.B]}=${r}`;return ae(()=>fetch(o,{...n&&{signal:n.signal}}).then(async e=>{const t=await e.json();return{status:e.status,statusText:e.statusText,ok:e.ok,data:t}}),{retries:3,interval:2e3,intervalBackoffMultiplier:1})}let le=!1;const se=e=>e.split("-")[0],ce=(e,t)=>{const n=e.find(e=>e===t);if(n)return n;const r=se(t);return e.find(e=>se(e)===r)};function ue(e){return Object.getOwnPropertyNames(e).forEach(t=>{const n=e[t];n&&"object"==typeof n&&ue(n)}),Object.freeze(e)}function de(n){var o;let{botKey:a,setKindlyChatRef:i,options:l={}}=n;const s=function(t,n){const[r,o]=(0,e.useState)(n||{});return(0,e.useEffect)(()=>{const e=new AbortController;return le?o(e=>(0,oe.A)(e,n)):(async()=>{try{var r;const a=await ie((null===(r=n.environment)||void 0===r?void 0:r.SETTINGS_HOST)||"https://chat.kindlycdn.com",t,e),{welcome_page:i,in_chat_notification:l,notifications:s,settings:{supported_languages:c,...u},...d}=a.data,p={...d,...u,...s,supportedLanguages:c,welcomePage:i,inChatNotification:l};o(e=>(0,oe.A)((0,oe.A)(p,e),{...n}))}catch(e){var a,i;const t=null!==(a=e.response)&&void 0!==a&&null!==(i=a.data)&&void 0!==i&&i.error?e.response.data.error:e;"signal is aborted without reason"!==t.message&&console.error("Kindly chat failed to initialize.",t)}})(),le=!0,()=>{e.abort()}},[t,n]),(0,e.useEffect)(()=>()=>{le=!1},[]),r}(a,l);if(!s.id)return null;const{inPlatform:c,fullscreenMode:u,language:d,focusTrapOnFullView:p,supportedLanguages:f,getAuthToken:h,nonce:m}=s;window.__KINDLY_SETTINGS__=ue({language:d,supportedLanguages:f,feedbackSettings:c?{}:s.feedback_settings,focusTrapOnFullView:p,fullscreenMode:u,getAuthToken:h,nonce:m});const g=window.__KINDLY_SETTINGS__.language,b=function(e,t){var n,r,o;const a=e.map(e=>e.code),i=null==t?void 0:t.toLowerCase();if(1===a.length)return a[0];if(i){const e=ce(a,i);if(e)return e}const l=null===(n=document.documentElement.lang)||void 0===n?void 0:n.toLowerCase(),s=ce(a,l);if(s)return s;const c=null===(r=window.navigator.language)||void 0===r?void 0:r.toLowerCase(),u=ce(a,c);if(u)return u;return(null===(o=window.navigator.languages)||void 0===o?void 0:o.flatMap(e=>{const t=ce(a,e.toLowerCase());return t?[t]:[]})[0])||e.find(e=>e.is_primary).code.toLowerCase()}(window.__KINDLY_SETTINGS__.supportedLanguages.filter(e=>e.is_active),g);if(!b)return console.error("Impossible to determine initial Chat language, make sure you have at least one language active for the Bot"),null;const v=(null===(o=l.environment)||void 0===o?void 0:o.KINDLY_CHAT_URL)||"http://localhost:8081",y=[v?new URL(v).hostname:void 0,"*.kindly.ai","demokind.ly","*.demokind.ly",...s.chatbubble.domains].filter(Boolean);return s.chatbubble.inPlatform||function(e,t){return!!r()(t).call(t,"*")||!!e&&t.some(t=>function(e){const t=e.replace(/\./g,"\\.").replace(/\*/g,".");return new RegExp(t,"i")}(t).test(e))}(window.location.hostname,y)?t().createElement(ne,{ref:i,botKey:a,settings:s,initialChatLanguage:b}):(console.error(`Domain ${window.location.hostname} is not allowed to load Kindly Chat. Please check your bot settings if you think this is a mistake.`),null)}const pe=function(n){let{botKey:r,setKindlyChatRef:o,options:a}=n;return t().createElement(e.Suspense,{fallback:""},t().createElement(de,{botKey:r,setKindlyChatRef:o,options:a}))}})(),l})());
|
|
4359
|
+
`;var K=i(8905);const Y=e=>{var t,n,r,o,a,i,l,s,c,u,d,p,f,h,m,g,b,v,y,x,w,E,k,_,A,T,S,$,C,O,I,L,M;return{customFont:null!==(t=null==e?void 0:e.customFont)&&void 0!==t?t:null,chatbubbleText:null!==(n=null==e||null===(r=e.style)||void 0===r?void 0:r.color_chatbubble_text)&&void 0!==n?n:K.AV.dark,background:null!==(o=null==e||null===(a=e.style)||void 0===a?void 0:a.color_background)&&void 0!==o?o:"#ffffff",bubbleButtonOutline:null!==(i=null==e||null===(l=e.style)||void 0===l?void 0:l.color_button_outline)&&void 0!==i?i:"#0069ff",buttonBackground:null!==(s=null==e||null===(c=e.style)||void 0===c?void 0:c.color_button_background)&&void 0!==s?s:"#0069ff",secondaryButtonBackground:null!==(u=null==e||null===(d=e.style)||void 0===d?void 0:d.color_secondary_button_background)&&void 0!==u?u:"#ffffff",bubbleButtonBackground:null!==(p=null==e||null===(f=e.style)||void 0===f?void 0:f.color_bubble_button_background)&&void 0!==p?p:"#0069ff",buttonText:null!==(h=null==e||null===(m=e.style)||void 0===m?void 0:m.color_button_text)&&void 0!==h?h:"#ffffff",headerBackground:null!==(g=null==e||null===(b=e.style)||void 0===b?void 0:b.color_header_background)&&void 0!==g?g:"#0069ff",headerText:null!==(v=null==e||null===(y=e.style)||void 0===y?void 0:y.color_header_text)&&void 0!==v?v:"#ffffff",inputBackground:null!==(x=null==e||null===(w=e.style)||void 0===w?void 0:w.color_input_background)&&void 0!==x?x:"#ffffff",inputText:null!==(E=null==e||null===(k=e.style)||void 0===k?void 0:k.color_input_text)&&void 0!==E?E:"#333333",userMessageBackground:null!==(_=null==e||null===(A=e.style)||void 0===A?void 0:A.color_user_message_background)&&void 0!==_?_:"#f5f5f5",userMessageText:null!==(T=null==e||null===(S=e.style)||void 0===S?void 0:S.color_user_message_text_color)&&void 0!==T?T:"#2c2c2c",botMessageBackground:null!==($=null==e||null===(C=e.style)||void 0===C?void 0:C.color_bot_message_background)&&void 0!==$?$:"#f5f5f5",botMessageText:null!==(O=null==e||null===(I=e.style)||void 0===I?void 0:I.color_bot_message_text_color)&&void 0!==O?O:"#2c2c2c",panelBackground:null!==(L=null==e||null===(M=e.style)||void 0===M?void 0:M.color_panel_background)&&void 0!==L?L:"#ffffff"}};var X=i(2628),Z=i(6079);function J(n){let{settings:r}=n;const a=(0,o.wA)(),{inPlatform:i}=(0,o.d4)(d.$P),{canShow:l}=function(){const{splitTestEnabled:t,splitTestLabel:n,splitLabelTimestamp:r}=(0,o.d4)(d.Od),a=(0,o.wA)(),i=(0,e.useCallback)(()=>{a((0,b.YK)())},[a]),l=(0,g.A)(i,2500);return(0,e.useEffect)(()=>{function e(){l()}return t&&window.addEventListener("mousemove",e),()=>t?window.removeEventListener("mousemove",e):void 0},[t]),(0,e.useEffect)(()=>{r&&f(r)&&a((0,b.Ss)())},[r]),(0,e.useEffect)(()=>{let e=n||p.OT.NO_SPLIT_LABEL;t&&!n&&(e=Math.random()>.5?p.OT.SPLIT_A:p.OT.SPLIT_B),n||a((0,b.dm)(e))},[t,n]),{canShow:t&&["A","X"].indexOf(n)>-1||!t,splitTestLabel:n}}();return(()=>{const t=(0,o.wA)(),[n,r]=(0,e.useState)("/"),{conversionPageUrl:a,splitTestLabel:i,hasInteraction:l,splitTestEnabled:s}=(0,o.d4)(d.Od),c=(()=>{const[t,n]=(0,e.useState)(!1),{conversionPageUrl:r}=(0,o.d4)(d.Od),a=((t,n)=>{let{enable:r=!0}=n;const[o,a]=(0,e.useState)(null);if(!r)return null;const i=setInterval(()=>{const e=document.querySelector("#klarna-checkout-iframe");e&&(a(e),clearInterval(i))},500);return o})(0,{enable:null==r?void 0:r.match(/klarna/gi)}),i=(0,e.useRef)(null),l=(0,e.useCallback)(e=>{var t;const r=e.getAttribute("src")||"",o=function(e){try{return JSON.parse(e)}catch(e){return console.error("Failed to parse JSON:",e),null}}((null===(t=decodeURIComponent(r).match(/\{"(.*)/gim))||void 0===t?void 0:t[0])||"");o&&"object"==typeof o&&["created","checkout_complete"].indexOf(o.ORDER_STATUS)>-1&&n(!0)},[]);return(0,e.useEffect)(()=>{a&&!i.current&&(l(a),i.current=setInterval(()=>l(a),500))},[a,i,l]),(0,e.useEffect)(()=>{t&&clearInterval(i.current)},[t]),t})(),u=(0,e.useCallback)(()=>{if(!f(localStorage.getItem(B)))return;const e=s&&i,n=!l;localStorage.setItem(B,Number(new Date)),t((0,b.yM)(e,n)),t((0,b.Ss)())},[t,i,l,s]);(0,e.useEffect)(()=>{c&&u()},[u,c]),(0,e.useEffect)(()=>{r(window.location.href),null!=a&&a.trim()&&(0,z.A)(n,a)&&u()},[u,n,a])})(),function(){const t=(0,o.wA)(),{botKey:n}=(0,o.d4)(d.$P),{messageSentTime:r}=(0,o.d4)(d.DZ),{persistStateLifespan:a}=(0,o.d4)(d.Od),{chatMessages:i}=(0,o.d4)(d.DZ);(0,e.useEffect)(()=>{const e=(0,U.A)({messageSentTime:r,persistStateLifespan:a});0===a||e||0===i.length||t((0,b.g4)(n))},[n,t,a,r])}(),(0,e.useEffect)(()=>{var e;l&&null!==(e=r.chatbubble)&&void 0!==e&&e.autopopup&&!(0,X.A)()&&!i&&setTimeout(()=>a((0,b.UB)()),r.chatbubble.autopopup_time)},[a,i,r,l]),l?t().createElement(u.A,{chatSettings:r,hidden:r.bubbleHidden,onNudgeDismiss:r.onNudgeDismiss,onNudgeFormSubmit:r.onNudgeFormSubmit,onNudgeProductClick:r.onNudgeProductClick}):null}let Q=!1,ee=null;const te=(0,e.forwardRef)((n,r)=>{let{botKey:l,settings:u,initialChatLanguage:d}=n;return ee||(ee=(0,v.Ay)({botKey:l,settings:u,initialChatLanguage:d})),(0,e.useEffect)(()=>()=>{ee=null},[]),function(){const{nonce:t}=window.__KINDLY_SETTINGS__;(0,e.useEffect)(()=>{const e=document.createElement("style");e.setAttribute("data-kindly-styles","true"),e.textContent=H,t&&e.setAttribute("nonce",t);try{return document.querySelector('style[data-kindly-styles="true"]')||document.head.appendChild(e),()=>{try{const e=document.querySelector('style[data-kindly-styles="true"]');e&&document.head.contains(e)&&document.head.removeChild(e)}catch(e){console.error("Error removing Kindly styles:",e)}}}catch(e){return void console.error("Error injecting Kindly styles:",e)}},[])}(),(0,e.useImperativeHandle)(r,()=>({getActivityStatus:()=>ee.getState().chatbubble.active,openChat(){ee.dispatch((0,b.lQ)({source:"programmatic"}))},closeChat(){ee.dispatch((0,b.Rh)({source:"programmatic"}))},restartChat(){let{openChat:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{openChat:!1};(0,Z.Tk)(),ee.dispatch((0,b.zX)(l,e))},triggerDialogue(e,t){ee.dispatch((0,b.zh)(e,t))},sendMessage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.trim(),r="user"===t.sender,o=!1===t.openChat,{newContext:a}=t;r&&n&&ee.dispatch((0,b.y2)(n,void 0,a,void 0,void 0,{shouldOpenChat:!o}))},showNudge(e){let{nudgeLayout:t,slug:n,trackEvent:r=!0}=e;ee.dispatch((0,b.fe)({nudgeLayout:t,slug:n,trackEvent:r}))},showCustomNudge(e){let{content:t,slug:n,onRendered:r,trackEvent:o=!0}=e;ee.dispatch((0,b.kS)({content:t,slug:n,onRendered:r,trackEvent:o}))},getNudges:()=>ee.getState().bot.nudges,closeNudge(e,t){ee.dispatch((0,b.Y_)(e,t))},nudgeCompletion(e){sessionStorage.getItem("kindly-nudge-completion")||(ee.dispatch((0,G.vJ)({slug:e,eventType:V.oE})),ee.dispatch({type:V.Kd,slug:e}),sessionStorage.setItem("kindly-nudge-completion","true"))},triggerCtaEvent(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;ee.dispatch((0,G.NS)(e))},identifyUser(e){ee.dispatch((0,b.gm)(e))},setNewContext(e){ee.dispatch((0,b.Aw)(e))},getContext:()=>ee.dispatch((0,b.SD)()),setNewBannerMessage(e,t){ee.dispatch((0,b.cC)(e,t||(null==e?void 0:e.message)))},setNewLabel(e){ee.dispatch((0,b.tD)(e))},cancelHandover(){ee.dispatch((0,b.cL)())}})),(0,e.useEffect)(()=>{(0,s.NY)(u)},[u]),(0,e.useEffect)(()=>{const{persistStateLifespan:e}=ee.getState().bot;if(-1===e||e>0)return;let t=!1;const n=()=>{t||(t=!0,ee.dispatch((0,b.R7)(l)))};window.onbeforeunload=n,window.onunload=n},[l,u,ee]),(0,e.useEffect)(()=>{!Q&&u.track_utm&&(Q=!0,Promise.resolve().then(i.bind(i,649)).then(e=>{let{default:t}=e;const n=t();n&&ee.dispatch((0,b.Aw)({...n}))}))},[u,ee]),window.Cypress&&(window.store=ee),t().createElement(o.Kq,{store:ee},t().createElement(a.NP,{theme:Y(u)},t().createElement(q,null),t().createElement(c.A,{errorPoint:"inside ChatContainer",displayError:!1},(u.user_idle_timeout_seconds||0)>0?t().createElement(F,{onIdle:()=>ee.dispatch((0,b.ZS)()),onActive:()=>ee.dispatch((0,b.Mm)(u.id)),timeout:1e3*(u.user_idle_timeout_seconds||0)},t().createElement(J,{settings:u})):t().createElement(J,{settings:u}))))});te.displayName="ChatContainer";const ne=te;var re=i(2366),oe=i(6249);function ae(e){let{retries:t=6,interval:n=300,intervalBackoffMultiplier:r=2}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((o,a)=>{e({retriesLeft:t,interval:n,intervalBackoffMultiplier:r}).then(o).catch(i=>{setTimeout(()=>{t<=1?a(i):ae(e,{retries:t-1,interval:n*r,intervalBackoffMultiplier:r}).then(o,a)},n)})})}async function ie(e,t,n){const r=(0,re.U)(),o=`${e}/settings/${t}.json?version=2.76.7&${[re.B]}=${r}`;return ae(()=>fetch(o,{...n&&{signal:n.signal}}).then(async e=>{const t=await e.json();return{status:e.status,statusText:e.statusText,ok:e.ok,data:t}}),{retries:3,interval:2e3,intervalBackoffMultiplier:1})}let le=!1;const se=e=>e.split("-")[0],ce=(e,t)=>{const n=e.find(e=>e===t);if(n)return n;const r=se(t);return e.find(e=>se(e)===r)};function ue(e){return Object.getOwnPropertyNames(e).forEach(t=>{const n=e[t];n&&"object"==typeof n&&ue(n)}),Object.freeze(e)}function de(n){var o;let{botKey:a,setKindlyChatRef:i,options:l={}}=n;const s=function(t,n){const[r,o]=(0,e.useState)(n||{});return(0,e.useEffect)(()=>{const e=new AbortController;return le?o(e=>(0,oe.A)(e,n)):(async()=>{try{var r;const a=await ie((null===(r=n.environment)||void 0===r?void 0:r.SETTINGS_HOST)||"https://chat.kindlycdn.com",t,e),{welcome_page:i,in_chat_notification:l,notifications:s,settings:{supported_languages:c,...u},...d}=a.data,p={...d,...u,...s,supportedLanguages:c,welcomePage:i,inChatNotification:l};o(e=>(0,oe.A)((0,oe.A)(p,e),{...n}))}catch(e){var a,i;const t=null!==(a=e.response)&&void 0!==a&&null!==(i=a.data)&&void 0!==i&&i.error?e.response.data.error:e;"signal is aborted without reason"!==t.message&&console.error("Kindly chat failed to initialize.",t)}})(),le=!0,()=>{e.abort()}},[t,n]),(0,e.useEffect)(()=>()=>{le=!1},[]),r}(a,l);if(!s.id)return null;const{inPlatform:c,fullscreenMode:u,language:d,focusTrapOnFullView:p,supportedLanguages:f,getAuthToken:h,nonce:m}=s;window.__KINDLY_SETTINGS__=ue({language:d,supportedLanguages:f,feedbackSettings:c?{}:s.feedback_settings,focusTrapOnFullView:p,fullscreenMode:u,getAuthToken:h,nonce:m});const g=window.__KINDLY_SETTINGS__.language,b=function(e,t){var n,r,o;const a=e.map(e=>e.code),i=null==t?void 0:t.toLowerCase();if(1===a.length)return a[0];if(i){const e=ce(a,i);if(e)return e}const l=null===(n=document.documentElement.lang)||void 0===n?void 0:n.toLowerCase(),s=ce(a,l);if(s)return s;const c=null===(r=window.navigator.language)||void 0===r?void 0:r.toLowerCase(),u=ce(a,c);if(u)return u;return(null===(o=window.navigator.languages)||void 0===o?void 0:o.flatMap(e=>{const t=ce(a,e.toLowerCase());return t?[t]:[]})[0])||e.find(e=>e.is_primary).code.toLowerCase()}(window.__KINDLY_SETTINGS__.supportedLanguages.filter(e=>e.is_active),g);if(!b)return console.error("Impossible to determine initial Chat language, make sure you have at least one language active for the Bot"),null;const v=(null===(o=l.environment)||void 0===o?void 0:o.KINDLY_CHAT_URL)||"http://localhost:8081",y=[v?new URL(v).hostname:void 0,"*.kindly.ai","demokind.ly","*.demokind.ly",...s.chatbubble.domains].filter(Boolean);return s.chatbubble.inPlatform||function(e,t){return!!r()(t).call(t,"*")||!!e&&t.some(t=>function(e){const t=e.replace(/\./g,"\\.").replace(/\*/g,".");return new RegExp(t,"i")}(t).test(e))}(window.location.hostname,y)?t().createElement(ne,{ref:i,botKey:a,settings:s,initialChatLanguage:b}):(console.error(`Domain ${window.location.hostname} is not allowed to load Kindly Chat. Please check your bot settings if you think this is a mistake.`),null)}const pe=function(n){let{botKey:r,setKindlyChatRef:o,options:a}=n;return t().createElement(e.Suspense,{fallback:""},t().createElement(de,{botKey:r,setKindlyChatRef:o,options:a}))}})(),l})());
|