@kindly/react-chat 2.80.2 → 2.81.0

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 CHANGED
@@ -1,2 +1,2 @@
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("react-dom"),require("pusher-js"),require("prop-types")):"function"==typeof define&&define.amd?define(["react","react-dom","pusher-js","prop-types"],t):"object"==typeof exports?exports.kindlyChat=t(require("react"),require("react-dom"),require("pusher-js"),require("prop-types")):e.kindlyChat=t(e.react,e["react-dom"],e["pusher-js"],e["prop-types"])}(self,(e,t,n,r)=>(()=>{var o={85:(e,t,n)=>{"use strict";n(9828);var r=n(1100),o=n(8900),i=n(1811),a=n(6625);for(var s in r)i(o[s],s),a[s]=a.Array},86:(e,t,n)=>{"use strict";var r=n(4713),o=n(1003),i=n(8655),a=n(3508);e.exports=function(){var e=o("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,s=i("toPrimitive");t&&!t[s]&&a(t,s,function(e){return r(n,this)},{arity:1})}},99:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(8089),o=n.n(r);const i=(e,t)=>o()({},e,t)},112:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(9155),o=n.n(r);const i=n(3864).Ay.div.withConfig({componentId:"sc-1bvmkry-0"})(["transition:all 0.3s ease-in-out;"]);function a(e){let{children:t,carouselPosition:n,onTouchEnd:r,onTouchMove:a,onTouchStart:s}=e;return o().createElement(i,{onTouchStart:s,onTouchEnd:r,onTouchMove:a,style:{transform:`translateX(${n}px)`}},t)}},164:(e,t,n)=>{"use strict";var r=n(9098),o=n(4713),i=n(4871),a=n(3410),s=n(2769),l=n(1926),c=n(3671),u=n(3491),d=n(1811),p=n(3999),f=n(3508),h=n(8655),m=n(6625),g=n(2621),b=a.PROPER,v=a.CONFIGURABLE,y=g.IteratorPrototype,w=g.BUGGY_SAFARI_ITERATORS,x=h("iterator"),E="keys",k="values",A="entries",_=function(){return this};e.exports=function(e,t,n,a,h,g,C){l(n,t,a);var S,T,I,O=function(e){if(e===h&&R)return R;if(!w&&e&&e in $)return $[e];switch(e){case E:case k:case A:return function(){return new n(this,e)}}return function(){return new n(this)}},L=t+" Iterator",M=!1,$=e.prototype,N=$[x]||$["@@iterator"]||h&&$[h],R=!w&&N||O(h),P="Array"===t&&$.entries||N;if(P&&(S=c(P.call(new e)))!==Object.prototype&&S.next&&(i||c(S)===y||(u?u(S,y):s(S[x])||f(S,x,_)),d(S,L,!0,!0),i&&(m[L]=_)),b&&h===k&&N&&N.name!==k&&(!i&&v?p($,"name",k):(M=!0,R=function(){return o(N,this)})),h)if(T={values:O(k),keys:g?R:O(E),entries:O(A)},C)for(I in T)(w||M||!(I in $))&&f($,I,T[I]);else r({target:t,proto:!0,forced:w||M},T);return i&&!C||$[x]===R||f($,x,R,{name:h}),m[t]=R,T}},167:(e,t,n)=>{"use strict";n.d(t,{$A:()=>l,B3:()=>u,CE:()=>d,HD:()=>p,I$:()=>m,Zw:()=>f,dl:()=>g});var r=n(3864),o=n(8789),i=n(4927),a=n(8035),s=n(6052);const l=56,c=r.Ay.div.withConfig({componentId:"sc-4a24dm-0"})(["display:flex;align-items:center;"]),u=(0,r.Ay)(c).withConfig({componentId:"sc-4a24dm-1"})(["height:","px;text-align:left;padding:12px 14px 12px 12px;align-items:center;color:#fff;min-width:100%;z-index:",";justify-content:space-between;background:",";background-color:",";box-shadow:0 3px 4px -1px ",";"],l,a.vI.headerIndex,e=>e.theme.headerBackground,e=>e.theme.headerBackground,a.Tj.shadowColor),d=(0,r.Ay)(c).withConfig({componentId:"sc-4a24dm-2"})(["overflow:hidden;gap:8px;"]),p=(0,r.Ay)(c).withConfig({componentId:"sc-4a24dm-3"})(["align-items:center;gap:12px;"]),f=(0,r.Ay)(o.H2).withConfig({componentId:"sc-4a24dm-4"})(["margin:0;margin-right:",";margin-left:",";text-transform:none;letter-spacing:normal;max-width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;line-height:1.3;color:",";font-size:var(--_kindlychat-font-size-m);flex:1;"],e=>{let{$isTextDirectionRtl:t}=e;return t?"0":"8px"},e=>{let{$isTextDirectionRtl:t}=e;return t?"8px":"0"},e=>e.theme.headerText),h=(e,t)=>`\n background: ${(0,s.w5)(e.headerBackground,`rgba(255, 255, 255, ${t})`,`rgba(0, 0, 0, ${t})`)};\n background-color: ${(0,s.w5)(e.headerBackground,`rgba(255, 255, 255, ${t})`,`rgba(0, 0, 0, ${t})`)};\n`,m=(0,r.Ay)(i.$n).withConfig({componentId:"sc-4a24dm-5"})(["height:28px;width:28px;display:flex;align-items:center;justify-content:center;font-size:var(--_kindlychat-font-size-h4);padding:0;"," svg{fill:none;path{stroke:",";}}&:hover{","}&:active{","}&[inert]{opacity:0.5;}"],e=>{let{theme:t}=e;return h(t,"0.08")},e=>{let{theme:t}=e;return t.headerText},e=>{let{theme:t}=e;return h(t,"0.12")},e=>{let{theme:t}=e;return h(t,"0.16")}),g=r.Ay.div.withConfig({componentId:"sc-4a24dm-6"})(["border-radius:6px;display:inline-block;width:32px;height:32px;",""],e=>e.$avatar?`\n background-image: url(${e.$avatar});\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n `:"")},262:(e,t,n)=>{"use strict";var r=n(2769);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},310:(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})}},459:e=>{"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},480:e=>{"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},491:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(9155);const o=function(e,t){var n;let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(null===(n=window.kindlyChat)||void 0===n?void 0:n.shadowRoot)||window;const i=(0,r.useRef)();(0,r.useEffect)(()=>{i.current=t},[t]),(0,r.useEffect)(()=>{if(!o||!o.addEventListener)return()=>{};const t=async e=>{var t;await(null===(t=i.current)||void 0===t?void 0:t.call(i,e))};return o.addEventListener(e,t),()=>{o.removeEventListener(e,t)}},[e,o])}},493:(e,t,n)=>{"use strict";var r=n(4713),o=n(262),i=n(6281),a=n(4674),s=n(9258),l=n(8655),c=TypeError,u=l("toPrimitive");e.exports=function(e,t){if(!o(e)||i(e))return e;var n,l=a(e,u);if(l){if(void 0===t&&(t="default"),n=r(l,e,t),!o(n)||i(n))return n;throw new c("Can't convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},541:(e,t,n)=>{"use strict";n.d(t,{Kq:()=>Q,Ng:()=>J,Pj:()=>re,d4:()=>le,wA:()=>ie});var r=n(9155),o=n(5919),i=r.version.startsWith("19"),a=Symbol.for(i?"react.transitional.element":"react.element"),s=Symbol.for("react.portal"),l=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 w(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:a}){let s,l,c,u,d,p=!1;return function(f,h){return p?function(p,f){const h=!i(f,l),m=!o(p,s,f,l);return s=p,l=f,h&&m?(c=e(s,l),t.dependsOnOwnProps&&(u=t(r,l)),d=n(c,u,l),d):h?(e.dependsOnOwnProps&&(c=e(s,l)),t.dependsOnOwnProps&&(u=t(r,l)),d=n(c,u,l),d):m?function(){const t=e(s,l),r=!a(t,c);return c=t,r&&(d=n(c,u,l)),d}():d}(f,h):(s=f,l=h,c=e(s,l),u=t(r,l),d=n(c,u,l),p=!0,d)}}function x(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 A(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function _(e,t,n){return{...n,...e,...t}}var C={notify(){},get:()=>[]};function S(e,t){let n,r=C,o=0,i=!1;function a(){c.onStateChange&&c.onStateChange()}function s(){o++,n||(n=t?t.addNestedSub(a):e.subscribe(a),r=function(){let e=null,t=null;return{clear(){e=null,t=null},notify(){(()=>{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 l(){o--,n&&0===o&&(n(),n=void 0,r.clear(),r=C)}const c={addNestedSub:function(e){s();const t=r.subscribe(e);let n=!1;return()=>{n||(n=!0,t(),l())}},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:a,isSubscribed:function(){return i},trySubscribe:function(){i||(i=!0,s())},tryUnsubscribe:function(){i&&(i=!1,l())},getListeners:()=>r};return c}var T=(()=>!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement))(),I=(()=>"undefined"!=typeof navigator&&"ReactNative"===navigator.product)(),O=(()=>T||I?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 $={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},N={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},R={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},P={[v]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[y]:R};function j(e){return function(e){if("object"==typeof e&&null!==e){const{$$typeof:t}=e;switch(t){case a:switch(e=e.type){case l: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 s:return t}}}(e)===g?R:P[e.$$typeof]||$}var D=Object.defineProperty,z=Object.getOwnPropertyNames,F=Object.getOwnPropertySymbols,B=Object.getOwnPropertyDescriptor,H=Object.getPrototypeOf,U=Object.prototype;function V(e,t){if("string"!=typeof t){if(U){const n=H(t);n&&n!==U&&V(e,n)}let n=z(t);F&&(n=n.concat(F(t)));const r=j(e),o=j(t);for(let i=0;i<n.length;++i){const a=n[i];if(!(N[a]||o&&o[a]||r&&r[a])){const n=B(t,a);try{D(e,a,n)}catch(e){}}}}return e}var G=Symbol.for("react-redux-context"),W="undefined"!=typeof globalThis?globalThis:{};function q(){if(!r.createContext)return{};const e=W[G]??=new Map;let t=e.get(r.createContext);return t||(t=r.createContext(null),e.set(r.createContext,t)),t}var K=q(),Y=[null,null];function X(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function Z(e,t){return e===t}var J=function(e,t,n,{pure:o,areStatesEqual:i=Z,areOwnPropsEqual:a=M,areStatePropsEqual:s=M,areMergedPropsEqual:l=M,forwardRef:c=!1,context:u=K}={}){const d=u,p=function(e){return e?"function"==typeof e?k(e):A(e,"mapStateToProps"):x(()=>({}))}(e),f=function(e){return e&&"object"==typeof e?x(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):A(e,"mapDispatchToProps"):x(e=>({dispatch:e}))}(t),h=function(e){return e?"function"==typeof e?function(e){return function(t,{displayName:n,areMergedPropsEqual:r}){let o,i=!1;return function(t,n,a){const s=e(t,n,a);return i?r(s,o)||(o=s):(i=!0,o=s),o}}}(e):A(e,"mergeProps"):()=>_}(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:i,areStatePropsEqual:s,areOwnPropsEqual:a,areMergedPropsEqual:l};function u(t){const[n,i,a]=r.useMemo(()=>{const{reactReduxForwardedRef:e,...n}=t;return[t.context,e,n]},[t]),s=r.useMemo(()=>d,[n,d]),l=r.useContext(s),c=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch),u=Boolean(l)&&Boolean(l.store),p=c?t.store:l.store,f=u?l.getServerState:p.getState,h=r.useMemo(()=>function(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...o}){return w(t(e,o),n(e,o),r(e,o),e,o)}(p.dispatch,o),[p]),[g,b]=r.useMemo(()=>{if(!m)return Y;const e=S(p,c?void 0:l.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[p,c,l]),v=r.useMemo(()=>c?l:{...l,subscription:g},[c,l,g]),y=r.useRef(void 0),x=r.useRef(a),E=r.useRef(void 0),k=r.useRef(!1),A=r.useRef(!1),_=r.useRef(void 0);O(()=>(A.current=!0,()=>{A.current=!1}),[]);const C=r.useMemo(()=>()=>E.current&&a===x.current?E.current:h(p.getState(),a),[p,a]),T=r.useMemo(()=>e=>g?function(e,t,n,r,o,i,a,s,l,c,u){if(!e)return()=>{};let d=!1,p=null;const f=()=>{if(d||!s.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===i.current?a.current||c():(i.current=n,l.current=n,a.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,x,y,k,A,E,b,e):()=>{},[g]);var I,L;let M;I=X,L=[x,y,k,a,E,b],O(()=>I(...L),undefined);try{M=r.useSyncExternalStore(T,C,f?()=>h(f(),a):C)}catch(e){throw _.current&&(e.message+=`\nThe error may be correlated with this previous error:\n${_.current.stack}\n\n`),e}O(()=>{_.current=void 0,E.current=void 0,y.current=M});const $=r.useMemo(()=>r.createElement(e,{...M,ref:i}),[i,e,M]);return r.useMemo(()=>m?r.createElement(s.Provider,{value:v},$):$,[s,$,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,V(t,e)}return V(g,e)}},Q=function(e){const{children:t,context:n,serverState:o,store:i}=e,a=r.useMemo(()=>{const e=S(i);return{store:i,subscription:e,getServerState:o?()=>o:void 0}},[i,o]),s=r.useMemo(()=>i.getState(),[i]);O(()=>{const{subscription:e}=a;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),s!==i.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[a,s]);const l=n||K;return r.createElement(l.Provider,{value:a},t)};function ee(e=K){return function(){return r.useContext(e)}}var te=ee();function ne(e=K){const t=e===K?te:ee(e),n=()=>{const{store:e}=t();return e};return Object.assign(n,{withTypes:()=>n}),n}var re=ne();function oe(e=K){const t=e===K?re:ne(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var ie=oe(),ae=(e,t)=>e===t;function se(e=K){const t=e===K?te:ee(e),n=(e,n={})=>{const{equalityFn:i=ae}="function"==typeof n?{equalityFn:n}:n,a=t(),{store:s,subscription:l,getServerState:c}=a,u=(r.useRef(!0),r.useCallback({[e.name]:t=>e(t)}[e.name],[e])),d=(0,o.useSyncExternalStoreWithSelector)(l.addNestedSub,s.getState,c||s.getState,u,i);return r.useDebugValue(d),d};return Object.assign(n,{withTypes:()=>n}),n}var le=se()},587:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(824),o=n(9272);let i;const a=e=>{let{trigger:t,control:n,name:a,setError:s,clearErrors:l}=e;const{errors:c,isSubmitted:u}=n?(0,r.lN)({name:a,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[a])||void 0===r?void 0:r.message)!==(null==p?void 0:p.validationMessage)&&s?s(`browser_error_${a}`,{type:o.k1.BROWSER,message:p.validationMessage},{shouldFocus:!0}):l&&l(`browser_error_${a}`),u&&t){const e=d[`browser_error_${a}`];"email"===p.type&&!e&&p.value.endsWith(".")?i=setTimeout(()=>{t(a)},1e3):(i&&clearTimeout(i),t(a))}}}},628:(e,t,n)=>{"use strict";n.d(t,{Cy:()=>_,DT:()=>C,R7:()=>y,RY:()=>v,Rm:()=>S,Sz:()=>g,TP:()=>T,c9:()=>b,et:()=>A,m8:()=>w,zX:()=>x});var r=n(9749),o=n.n(r),i=n(8410),a=n(2221),s=n(6464),l=n(4851),c=n(4718),u=n(9359),d=n(9313),p=n(1763),f=n(8679),h=n(7325),m=n(1897);const g=()=>(e,t)=>{const{currentLanguage:n,currentModal:r}=t().chatbubble,{acceptanceText:o,revokePermissionText:a}=(0,u.A)(n);e((0,m.Fu)({wasRevoked:!1})),"COMPLIANCE"===r&&e((0,h.zn)(null));const s=`\n ${o}\n <br>\n <span data-kindly-action="${i.Y$.REVOKE_PERMISSION}" style="cursor: pointer; text-decoration: underline;">${a}</span>`.trim();e({type:f.z2,payload:{message:s,system_dialogue_message_type:i.zV.COMPLIANCE}})},b=(e,t)=>{const{currentLanguage:n}=t().chatbubble,{isEnabled:r}=(0,u.A)(n);r&&(e((0,h.zn)("COMPLIANCE")),e((0,m.Fu)({wasRevoked:!0})))},v=(e,t)=>{const{currentLanguage:n,currentModal:r}=t().chatbubble,{isEnabled:o}=(0,u.A)(n);o||"COMPLIANCE"!==r||(e((0,m.Fu)({wasRevoked:!1})),e((0,h.zn)(null)))},y=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},w=()=>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},x=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return async(r,o)=>{const{agent:{takenOver:i,requestedHandoverAt:s},chatbubble:{active:l},connection:{connected:c}}=o();s?r({type:f.MM}):i&&r({type:f.II,data:{taken_over:!1}}),r({type:f.a1}),r(y(e)),r({type:f.wk});try{c&&(0,d.Zf)(),l&&!t?r({type:f.uS}):n&&r({type:f.kA})}catch(e){console.warn(e)}finally{r((0,p.F)(a.Jm.LANGUAGE_SWITCH)),r({type:f.CB,botKey:e,keepOpen:t}),t||setTimeout(()=>r({type:f.d$,chatHasStarted:!1}),300)}}},E=Object.freeze({MAX:3,TIMEOUT_MS:2e3,TIMEOUT_MULTIPLIER:2,RESPONSE_STATUSES:[401,403]});let k=0;const A=function(e,t){let{onError:n,restartOnError:r}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return async i=>{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.80.2",[s.B]:(0,s.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?i(((e,t)=>function(n){var r,i,a,s;if(!e.response||!o()(r=E.RESPONSE_STATUSES).call(r,null===(i=e.response)||void 0===i?void 0:i.status))return console.error(e),null;if(k+=1,k>E.MAX)return console.error(`${t.url} returned ${null===(s=e.response)||void 0===s?void 0:s.status}, max chats restarts exceeded`),null;console.warn(`${t.url} returned ${null===(a=e.response)||void 0===a?void 0:a.status}, starting new chat`);const l=E.TIMEOUT_MS*E.TIMEOUT_MULTIPLIER**(k-1);return setTimeout(()=>n((e,t)=>{const{botKey:n}=t().chatbubble;e(x(n,!0))}),l),null})(e,t)):null}}},_=e=>{const t=`private-chatbubble-${e}`;(0,d.B1)(t,"mimir-started-searching",f.E7),(0,d.B1)(t,"agent_started_typing",f.M_),(0,d.B1)(t,"agent_stopped_typing",f.MU),(0,d.B1)(t,"message-attachments-updated",f.tS),(0,d.B1)(t,"message",f.tq),(0,d.B1)(t,"bot_started_typing",f.A8),(0,d.B1)(t,"bot_stopped_typing",f.wk),(0,d.B1)(t,"new-attachments",f.Os),(0,d.B1)(t,"pattern-context-match",f.jE),(0,d.B1)(t,"takeover",f.II)},C=e=>{const t=`private-chatbubble-${e}`;(0,d.al)(t,"mimir-started-searching",f.E7),(0,d.al)(t,"agent_started_typing",f.M_),(0,d.al)(t,"agent_stopped_typing",f.MU),(0,d.al)(t,"message-attachments-updated",f.tS),(0,d.al)(t,"message",f.tq),(0,d.al)(t,"bot_started_typing",f.A8),(0,d.al)(t,"bot_stopped_typing",f.wk),(0,d.al)(t,"new-attachments",f.Os),(0,d.al)(t,"pattern-context-match",f.jE),(0,d.al)(t,"takeover",f.II)},S=e=>{let{message:t,error:n,level:r="info",extra:o={}}=e;return(e,i)=>{var s;const u=i(),{connection:{token:d},environment:{PAT_HOST:p},chatbubble:{chatId:f}}=u,h={tags:{chat_id:f,bot_id:null===(s=u.bot)||void 0===s?void 0:s.id}},m=(0,c.A)({level:r,error:n,message:t,reduxState:u,extra:{...(g=o,JSON.parse(JSON.stringify(g,(e,t)=>void 0===t?"undefined 🤷‍♂️":t))),...h}});var g;e(A(`${p}/chatbubble/${a.Ak}/log`,{method:"POST",body:m,...(0,l.A)({token:d},{withCurrentUrl:!0})}))}},T=e=>t=>{t({type:f.se,messageSentTime:e})}},649:(e,t,n)=>{"use strict";n.d(t,{default:()=>s});var r=n(9749),o=n.n(r);const i="kindly-chat-utm",a=Object.freeze(["CONTENT","SOURCE","MEDIUM","CAMPAIGN","TERM"]);function s(){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()(a).call(a,n.toUpperCase().substring(4))?{...e,[n]:r}:e},{});if(0===Object.keys(t).length){const e=window.sessionStorage.getItem(i);t=e?JSON.parse(e):null}else window.sessionStorage.setItem(i,JSON.stringify(t));return t}},701:(e,t,n)=>{"use strict";var r=n(6100),o=n(2137),i=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(o(e),t)}},748:(e,t,n)=>{var r=n(7354);e.exports=function(e,t,n){r(e,t),t.set(e,n)},e.exports.__esModule=!0,e.exports.default=e.exports},809:(e,t,n)=>{"use strict";n.d(t,{Fc:()=>w,A6:()=>i,fl:()=>a,US:()=>s,gp:()=>m,WI:()=>v,Gr:()=>b,V$:()=>c,bM:()=>l,T4:()=>y,U:()=>f,qY:()=>g,gR:()=>u,fN:()=>h,qx:()=>d,Ze:()=>p});var r=n(9155),o=n.n(r);function i(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"}))}function a(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 s(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"}))}function l(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}))}function c(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"})))}function u(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"}))}function d(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"}))))}function p(e){return o().createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),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"}))}function f(e){let{crop:t=!1,width:n=24,height:o=24,...i}=e;const a=t?"4 4 16 16":"0 0 24 24";return r.createElement("svg",Object.assign({width:n,height:o,fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:a},i),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"}))}function h(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"}))}function m(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"}))}const 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"}))}function v(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"}))}const 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}))))},w=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"}))}},814:(e,t,n)=>{"use strict";var r=n(2769),o=n(459),i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(o(e)+" is not a function")}},824:(e,t,n)=>{"use strict";n.d(t,{FH:()=>N,lN:()=>I,mN:()=>Ce,xI:()=>R});var r=n(9155),o=e=>"checkbox"===e.type,i=e=>e instanceof Date,a=e=>null==e;const s=e=>"object"==typeof e;var l=e=>!a(e)&&!Array.isArray(e)&&s(e)&&!i(e),c=e=>l(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 l(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&&!l(e))return e;if(t=n?[]:Object.create(Object.getPrototypeOf(e)),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||!l(e))return n;const r=(h(t)?[t]:b(t)).reduce((e,t)=>a(e)?e:e[t],e);return m(r)||r===e?m(e[t])?n:e[t]:r},y=e=>"boolean"==typeof e,w=(e,t,n)=>{let r=-1;const o=h(t)?[t]:b(t),i=o.length,a=i-1;for(;++r<i;){const t=o[r];let i=n;if(r!==a){const n=e[t];i=l(n)||Array.isArray(n)?n:isNaN(+o[r+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=i,e=e[t]}};const x={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},E={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},k="pattern",A="required",_=r.createContext(null);_.displayName="HookFormContext";const C=()=>r.useContext(_);var S=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const o=i;return t._proxyFormState[o]!==E.all&&(t._proxyFormState[o]=!r||E.all),n&&(n[o]=!0),e[o]}});return o};const T="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;function I(e){const t=C(),{control:n=t.control,disabled:o,name:i,exact:a}=e||{},[s,l]=r.useState(n._formState),c=r.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return T(()=>n._subscribe({name:i,formState:c.current,exact:a,callback:e=>{!o&&l({...n._formState,...e})}}),[i,o,a]),r.useEffect(()=>{c.current.isValid&&n._setValid(!0)},[n]),r.useMemo(()=>S(s,n,c.current,!1),[s,n])}var O=e=>"string"==typeof e,L=(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),M=e=>a(e)||!s(e);function $(e,t,n=new WeakSet){if(M(e)||M(t))return e===t;if(i(e)&&i(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 a of r){const r=e[a];if(!o.includes(a))return!1;if("ref"!==a){const e=t[a];if(i(r)&&i(e)||l(r)&&l(e)||Array.isArray(r)&&Array.isArray(e)?!$(r,e,n):r!==e)return!1}}return!0}function N(e){const t=C(),{control:n=t.control,name:o,defaultValue:i,disabled:a,exact:s,compute:l}=e||{},c=r.useRef(i),u=r.useRef(l),d=r.useRef(void 0),p=r.useRef(n),f=r.useRef(o);u.current=l;const[h,m]=r.useState(()=>{const e=n._getWatch(o,c.current);return u.current?u.current(e):e}),g=r.useCallback(e=>{const t=L(o,n._names,e||n._formValues,!1,c.current);return u.current?u.current(t):t},[n._formValues,n._names,o]),b=r.useCallback(e=>{if(!a){const t=L(o,n._names,e||n._formValues,!1,c.current);if(u.current){const e=u.current(t);$(e,d.current)||(m(e),d.current=e)}else m(t)}},[n._formValues,n._names,a,o]);T(()=>(p.current===n&&$(f.current,o)||(p.current=n,f.current=o,b()),n._subscribe({name:o,formState:{values:!0},exact:s,callback:e=>{b(e.values)}})),[n,s,o,b]),r.useEffect(()=>n._removeUnmounted());const v=p.current!==n,y=f.current,w=r.useMemo(()=>{if(a)return null;const e=!v&&!$(y,o);return v||e?g():null},[a,v,o,y,g]);return null!==w?w:h}const R=e=>e.render(function(e){const t=C(),{name:n,disabled:o,control:i=t.control,shouldUnregister:a,defaultValue:s}=e,l=u(i._names.array,n),d=r.useMemo(()=>v(i._formValues,n,v(i._defaultValues,n,s)),[i,n,s]),p=N({control:i,name:n,defaultValue:d,exact:!0}),h=I({control:i,name:n,exact:!0}),g=r.useRef(e),b=r.useRef(void 0),E=r.useRef(i.register(n,{...e.rules,value:p,...y(e.disabled)?{disabled:e.disabled}:{}}));g.current=e;const k=r.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!v(h.errors,n)},isDirty:{enumerable:!0,get:()=>!!v(h.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!v(h.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!v(h.validatingFields,n)},error:{enumerable:!0,get:()=>v(h.errors,n)}}),[h,n]),A=r.useCallback(e=>E.current.onChange({target:{value:c(e),name:n},type:x.CHANGE}),[n]),_=r.useCallback(()=>E.current.onBlur({target:{value:v(i._formValues,n),name:n},type:x.BLUR}),[n,i._formValues]),S=r.useCallback(e=>{const t=v(i._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()})},[i._fields,n]),T=r.useMemo(()=>({name:n,value:p,...y(o)||h.disabled?{disabled:h.disabled||o}:{},onChange:A,onBlur:_,ref:S}),[n,o,h.disabled,A,_,S,p]);return r.useEffect(()=>{const e=i._options.shouldUnregister||a,t=b.current;t&&t!==n&&!l&&i.unregister(t),i.register(n,{...g.current.rules,...y(g.current.disabled)?{disabled:g.current.disabled}:{}});const r=(e,t)=>{const n=v(i._fields,e);n&&n._f&&(n._f.mount=t)};if(r(n,!0),e){const e=f(v(i._options.defaultValues,n,g.current.defaultValue));w(i._defaultValues,n,e),m(v(i._formValues,n))&&w(i._formValues,n,e)}return!l&&i.register(n),b.current=n,()=>{(l?e&&!i._state.action:e)?i.unregister(n):r(n,!1)}},[n,i,l,a]),r.useEffect(()=>{i._setDisabledField({disabled:o,name:n})},[o,n,i]),r.useMemo(()=>({field:T,formState:h,fieldState:k}),[T,h,k])}(e));var P=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},j=e=>Array.isArray(e)?e:[e],D=()=>{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=[]}}};function z(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const o=e[r],i=t[r];if(o&&l(o)&&i){const e=z(o,i);l(e)&&(n[r]=e)}else e[r]&&(n[r]=i)}return n}var F=e=>l(e)&&!Object.keys(e).length,B=e=>"file"===e.type,H=e=>"function"==typeof e,U=e=>{if(!p)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},V=e=>"select-multiple"===e.type,G=e=>"radio"===e.type,W=e=>G(e)||o(e),q=e=>U(e)&&e.isConnected;function K(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,i=n[o];return r&&delete r[i],0!==o&&(l(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))&&K(e,n.slice(0,-1)),e}var Y=e=>{for(const t in e)if(H(e[t]))return!0;return!1};function X(e){return Array.isArray(e)||l(e)&&!Y(e)}function Z(e,t={}){for(const n in e)X(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Z(e[n],t[n])):m(e[n])||(t[n]=!0);return t}function J(e,t,n){n||(n=Z(t));for(const r in e)X(e[r])?m(t)||M(n[r])?n[r]=Z(e[r],Array.isArray(e[r])?[]:{}):J(e[r],a(t)?{}:t[r],n[r]):n[r]=!$(e[r],t[r]);return n}const Q={value:!1,isValid:!1},ee={value:!0,isValid:!0};var te=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?ee:{value:e[0].value,isValid:!0}:ee:Q}return Q},ne=(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 re={isValid:!1,value:null};var oe=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,re):re;function ie(e){const t=e.ref;return B(t)?t.files:G(t)?oe(e.refs).value:V(t)?[...t.selectedOptions].map(({value:e})=>e):o(t)?te(e.refs).value:ne(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&&w(o,n,e._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},se=e=>e instanceof RegExp,le=e=>m(e)?e:se(e)?e.source:l(e)?se(e.value)?e.value.source:e.value:e,ce=e=>({isOnSubmit:!e||e===E.onSubmit,isOnBlur:e===E.onBlur,isOnChange:e===E.onChange,isOnAll:e===E.all,isOnTouch:e===E.onTouched});const ue="AsyncFunction";var de=e=>!!e&&!!e.validate&&!!(H(e.validate)&&e.validate.constructor.name===ue||l(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===ue)),pe=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),fe=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));const he=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const n=v(e,o);if(n){const{_f:e,...i}=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(he(i,t))break}else if(l(i)&&he(i,t))break}}};function me(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("."),i=v(t,r),a=v(e,r);if(i&&!Array.isArray(i)&&n!==r)return{name:n};if(a&&a.type)return{name:r,error:a};if(a&&a.root&&a.root.type)return{name:`${r}.root`,error:a.root};o.pop()}return{name:n}}var ge=(e,t,n,r)=>{n(e);const{name:o,...i}=e;return F(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(e=>t[e]===(!r||E.all))},be=(e,t,n)=>!e||!t||e===t||j(e).some(e=>e&&(n?e===t:e.startsWith(t)||t.startsWith(e))),ve=(e,t,n,r,o)=>!o.isOnAll&&(!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:!(n?r.isOnChange:o.isOnChange)||e),ye=(e,t)=>!g(v(e,t)).length&&K(e,t),we=(e,t,n)=>{const r=j(v(e,n));return w(r,"root",t[n]),w(e,n,r),e};function xe(e,t,n="validate"){if(O(e)||Array.isArray(e)&&e.every(O)||y(e)&&!e)return{type:n,message:O(e)?e:"",ref:t}}var Ee=e=>l(e)&&!se(e)?e:{value:e,message:""},ke=async(e,t,n,r,i,s)=>{const{ref:c,refs:u,required:d,maxLength:p,minLength:f,min:h,max:g,pattern:b,validate:w,name:x,valueAsNumber:E,mount:_}=e._f,C=v(n,x);if(!_||t.has(x))return{};const S=u?u[0]:c,T=e=>{i&&S.reportValidity&&(S.setCustomValidity(y(e)?"":e||""),S.reportValidity())},I={},L=G(c),M=o(c),$=L||M,N=(E||B(c))&&m(c.value)&&m(C)||U(c)&&""===c.value||""===C||Array.isArray(C)&&!C.length,R=P.bind(null,x,r,I),j=(e,t,n,r="maxLength",o="minLength")=>{const i=e?t:n;I[x]={type:e?r:o,message:i,ref:c,...R(e?r:o,i)}};if(s?!Array.isArray(C)||!C.length:d&&(!$&&(N||a(C))||y(C)&&!C||M&&!te(u).isValid||L&&!oe(u).isValid)){const{value:e,message:t}=O(d)?{value:!!d,message:d}:Ee(d);if(e&&(I[x]={type:A,message:t,ref:S,...R(A,t)},!r))return T(t),I}if(!(N||a(h)&&a(g))){let e,t;const n=Ee(g),o=Ee(h);if(a(C)||isNaN(C)){const r=c.valueAsDate||new Date(C),i=e=>new Date((new Date).toDateString()+" "+e),a="time"==c.type,s="week"==c.type;O(n.value)&&C&&(e=a?i(C)>i(n.value):s?C>n.value:r>new Date(n.value)),O(o.value)&&C&&(t=a?i(C)<i(o.value):s?C<o.value:r<new Date(o.value))}else{const r=c.valueAsNumber||(C?+C:C);a(n.value)||(e=r>n.value),a(o.value)||(t=r<o.value)}if((e||t)&&(j(!!e,n.message,o.message,"max","min"),!r))return T(I[x].message),I}if((p||f)&&!N&&(O(C)||s&&Array.isArray(C))){const e=Ee(p),t=Ee(f),n=!a(e.value)&&C.length>+e.value,o=!a(t.value)&&C.length<+t.value;if((n||o)&&(j(n,e.message,t.message),!r))return T(I[x].message),I}if(b&&!N&&O(C)){const{value:e,message:t}=Ee(b);if(se(e)&&!C.match(e)&&(I[x]={type:k,message:t,ref:c,...R(k,t)},!r))return T(t),I}if(w)if(H(w)){const e=xe(await w(C,n),S);if(e&&(I[x]={...e,...R("validate",e.message)},!r))return T(e.message),I}else if(l(w)){let e={};for(const t in w){if(!F(e)&&!r)break;const o=xe(await w[t](C,n),S,t);o&&(e={...o,...R(t,o.message)},T(o.message),r&&(I[x]=e))}if(!F(e)&&(I[x]={ref:S,...e},!r))return I}return T(!0),I};const Ae={mode:E.onSubmit,reValidateMode:E.onChange,shouldFocusError:!0};function _e(e={}){let t,n={...Ae,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:H(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},s={},d=(l(n.defaultValues)||l(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},A=0;const _={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let C={..._};const S={array:D(),state:D()},T=n.criteriaMode===E.all,I=async e=>{if(!n.disabled&&(_.isValid||C.isValid||e)){const e=n.resolver?F((await P()).errors):await G(s,!0);e!==r.isValid&&S.state.next({isValid:e})}},M=(e,t)=>{!n.disabled&&(_.isValidating||_.validatingFields||C.isValidating||C.validatingFields)&&((e||Array.from(k.mount)).forEach(e=>{e&&(t?w(r.validatingFields,e,t):K(r.validatingFields,e))}),S.state.next({validatingFields:r.validatingFields,isValidating:!F(r.validatingFields)}))},N=(e,t,n,r)=>{const o=v(s,e);if(o){const i=v(h,e,m(n)?v(d,e):n);m(i)||r&&r.defaultChecked||t?w(h,e,t?i:ie(o._f)):Z(e,i),b.mount&&I()}},R=(e,t,o,i,a)=>{let s=!1,l=!1;const c={name:e};if(!n.disabled){if(!o||i){(_.isDirty||C.isDirty)&&(l=r.isDirty,r.isDirty=c.isDirty=Y(),s=l!==c.isDirty);const n=$(v(d,e),t);l=!!v(r.dirtyFields,e),n?K(r.dirtyFields,e):w(r.dirtyFields,e,!0),c.dirtyFields=r.dirtyFields,s=s||(_.dirtyFields||C.dirtyFields)&&l!==!n}if(o){const t=v(r.touchedFields,e);t||(w(r.touchedFields,e,o),c.touchedFields=r.touchedFields,s=s||(_.touchedFields||C.touchedFields)&&t!==o)}s&&a&&S.state.next(c)}return s?c:{}},P=async e=>{M(e,!0);const t=await n.resolver(h,n.context,ae(e||k.mount,s,n.criteriaMode,n.shouldUseNativeValidation));return M(e),t},G=async(e,t,o={valid:!0})=>{for(const i in e){const a=e[i];if(a){const{_f:e,...i}=a;if(e){const i=k.array.has(e.name),s=a._f&&de(a._f);s&&_.validatingFields&&M([e.name],!0);const l=await ke(a,k.disabled,h,T,n.shouldUseNativeValidation&&!t,i);if(s&&_.validatingFields&&M([e.name]),l[e.name]&&(o.valid=!1,t))break;!t&&(v(l,e.name)?i?we(r.errors,l,e.name):w(r.errors,e.name,l[e.name]):K(r.errors,e.name))}!F(i)&&await G(i,t,o)}}return o.valid},Y=(e,t)=>!n.disabled&&(e&&t&&w(h,e,t),!$(se(),d)),X=(e,t,n)=>L(e,k,{...b.mount?h:m(t)?d:O(e)?{[e]:t}:t},n,t),Z=(e,t,n={})=>{const r=v(s,e);let i=t;if(r){const n=r._f;n&&(!n.disabled&&w(h,e,ne(t,n)),i=U(n.ref)&&a(t)?"":t,V(n.ref)?[...n.ref.options].forEach(e=>e.selected=i.includes(e.value)):n.refs?o(n.ref)?n.refs.forEach(e=>{e.defaultChecked&&e.disabled||(Array.isArray(i)?e.checked=!!i.find(t=>t===e.value):e.checked=i===e.value||!!i)}):n.refs.forEach(e=>e.checked=e.value===i):B(n.ref)?n.ref.value="":(n.ref.value=i,n.ref.type||S.state.next({name:e,values:f(h)})))}(n.shouldDirty||n.shouldTouch)&&R(e,i,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&oe(e)},Q=(e,t,n)=>{for(const r in t){if(!t.hasOwnProperty(r))return;const o=t[r],a=e+"."+r,c=v(s,a);(k.array.has(e)||l(o)||c&&!c._f)&&!i(o)?Q(a,o,n):Z(a,o,n)}},ee=(e,t,n={})=>{const o=v(s,e),i=k.array.has(e),l=f(t);w(h,e,l),i?(S.array.next({name:e,values:f(h)}),(_.isDirty||_.dirtyFields||C.isDirty||C.dirtyFields)&&n.shouldDirty&&S.state.next({name:e,dirtyFields:J(d,h),isDirty:Y(e,l)})):!o||o._f||a(l)?Z(e,l,n):Q(e,l,n),fe(e,k)&&S.state.next({...r,name:e}),S.state.next({name:b.mount?e:void 0,values:f(h)})},te=async e=>{b.mount=!0;const o=e.target;let a=o.name,l=!0;const u=v(s,a),d=e=>{l=Number.isNaN(e)||i(e)&&isNaN(e.getTime())||$(e,v(h,a,e))},p=ce(n.mode),m=ce(n.reValidateMode);if(u){let i,g;const b=o.type?ie(u._f):c(e),E=e.type===x.BLUR||e.type===x.FOCUS_OUT,O=!pe(u._f)&&!n.resolver&&!v(r.errors,a)&&!u._f.deps||ve(E,v(r.touchedFields,a),r.isSubmitted,m,p),L=fe(a,k,E);w(h,a,b),E?o&&o.readOnly||(u._f.onBlur&&u._f.onBlur(e),t&&t(0)):u._f.onChange&&u._f.onChange(e);const N=R(a,b,E),j=!F(N)||L;if(!E&&S.state.next({name:a,type:e.type,values:f(h)}),O)return(_.isValid||C.isValid)&&("onBlur"===n.mode?E&&I():E||I()),j&&S.state.next({name:a,...L?{}:N});if(!E&&L&&S.state.next({...r}),n.resolver){const{errors:e}=await P([a]);if(d(b),l){const t=me(r.errors,s,a),n=me(e,s,t.name||a);i=n.error,a=n.name,g=F(e)}}else M([a],!0),i=(await ke(u,k.disabled,h,T,n.shouldUseNativeValidation))[a],M([a]),d(b),l&&(i?g=!1:(_.isValid||C.isValid)&&(g=await G(s,!0)));l&&(u._f.deps&&(!Array.isArray(u._f.deps)||u._f.deps.length>0)&&oe(u._f.deps),((e,o,i,a)=>{const s=v(r.errors,e),l=(_.isValid||C.isValid)&&y(o)&&r.isValid!==o;var c;if(n.delayError&&i?(c=()=>((e,t)=>{w(r.errors,e,t),S.state.next({errors:r.errors})})(e,i),t=e=>{clearTimeout(A),A=setTimeout(c,e)},t(n.delayError)):(clearTimeout(A),t=null,i?w(r.errors,e,i):K(r.errors,e)),(i?!$(s,i):s)||!F(a)||l){const t={...a,...l&&y(o)?{isValid:o}:{},errors:r.errors,name:e};r={...r,...t},S.state.next(t)}})(a,g,i,N))}},re=(e,t)=>{if(v(r.errors,t)&&e.focus)return e.focus(),1},oe=async(e,t={})=>{let o,i;const a=j(e);if(n.resolver){const t=await(async e=>{const{errors:t}=await P(e);if(e)for(const n of e){const e=v(t,n);e?w(r.errors,n,e):K(r.errors,n)}else r.errors=t;return t})(m(e)?e:a);o=F(t),i=e?!a.some(e=>v(t,e)):o}else e?(i=(await Promise.all(a.map(async e=>{const t=v(s,e);return await G(t&&t._f?{[e]:t}:t)}))).every(Boolean),(i||r.isValid)&&I()):i=o=await G(s);return S.state.next({...!O(e)||(_.isValid||C.isValid)&&o!==r.isValid?{}:{name:e},...n.resolver||!e?{isValid:o}:{},errors:r.errors}),t.shouldFocus&&!i&&he(s,re,e?a:k.mount),i},se=(e,t)=>{let n={...b.mount?h:d};return t&&(n=z(t.dirtyFields?r.dirtyFields:r.touchedFields,n)),m(e)?n:O(e)?v(n,e):e.map(e=>v(n,e))},ue=(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(s,e,{_f:{}})._f||{}).ref,i=v(r.errors,e)||{},{ref:a,message:l,type:c,...u}=i;w(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()},Ee=e=>S.state.subscribe({next:t=>{be(e.name,t.name,e.exact)&&ge(t,e.formState||_,Me,e.reRenderRoot)&&e.callback({values:{...h},...r,...t,defaultValues:d})}}).unsubscribe,_e=(e,t={})=>{for(const o of e?j(e):k.mount)k.mount.delete(o),k.array.delete(o),t.keepValue||(K(s,o),K(h,o)),!t.keepError&&K(r.errors,o),!t.keepDirty&&K(r.dirtyFields,o),!t.keepTouched&&K(r.touchedFields,o),!t.keepIsValidating&&K(r.validatingFields,o),!n.shouldUnregister&&!t.keepDefaultValue&&K(d,o);S.state.next({values:f(h)}),S.state.next({...r,...t.keepDirty?{isDirty:Y()}:{}}),!t.keepIsValid&&I()},Ce=({disabled:e,name:t})=>{(y(e)&&b.mount||e||k.disabled.has(t))&&(e?k.disabled.add(t):k.disabled.delete(t))},Se=(e,t={})=>{let r=v(s,e);const o=y(t.disabled)||y(n.disabled);return w(s,e,{...r||{},_f:{...r&&r._f?r._f:{ref:{name:e}},name:e,mount:!0,...t}}),k.mount.add(e),r?Ce({disabled:y(t.disabled)?t.disabled:n.disabled,name:e}):N(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:te,onBlur:te,ref:o=>{if(o){Se(e,t),r=v(s,e);const n=m(o.value)&&o.querySelectorAll&&o.querySelectorAll("input,select,textarea")[0]||o,i=W(n),a=r._f.refs||[];if(i?a.find(e=>e===n):n===r._f.ref)return;w(s,e,{_f:{...r._f,...i?{refs:[...a.filter(q),n,...Array.isArray(v(d,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),N(e,!1,void 0,n)}else r=v(s,e,{}),r._f&&(r._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!u(k.array,e)||!b.action)&&k.unMount.add(e)}}},Te=()=>n.shouldFocusError&&he(s,re,k.mount),Ie=(e,t)=>async o=>{let i;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let a=f(h);if(S.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await P();r.errors=e,a=f(t)}else await G(s);if(k.disabled.size)for(const e of k.disabled)K(a,e);if(K(r.errors,"root"),F(r.errors)){S.state.next({errors:{}});try{await e(a,o)}catch(e){i=e}}else t&&await t({...r.errors},o),Te(),setTimeout(Te);if(S.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:F(r.errors)&&!i,submitCount:r.submitCount+1,errors:r.errors}),i)throw i},Oe=(e,t={})=>{const o=e?f(e):d,i=f(o),a=F(e),l=a?d:i;if(t.keepDefaultValues||(d=o),!t.keepValues){if(t.keepDirtyValues){const e=new Set([...k.mount,...Object.keys(J(d,h))]);for(const t of Array.from(e))v(r.dirtyFields,t)?w(l,t,v(h,t)):ee(t,v(l,t))}else{if(p&&m(e))for(const e of k.mount){const t=v(s,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(U(e)){const t=e.closest("form");if(t){t.reset();break}}}}if(t.keepFieldsRef)for(const e of k.mount)ee(e,v(l,e));else s={}}h=n.shouldUnregister?t.keepDefaultValues?f(d):{}:f(l),S.array.next({values:{...l}}),S.state.next({values:{...l}})}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=!_.isValid||!!t.keepIsValid||!!t.keepDirtyValues||!n.shouldUnregister&&!F(l),b.watch=!!n.shouldUnregister,S.state.next({submitCount:t.keepSubmitCount?r.submitCount:0,isDirty:!a&&(t.keepDirty?r.isDirty:!(!t.keepDefaultValues||$(e,d))),isSubmitted:!!t.keepIsSubmitted&&r.isSubmitted,dirtyFields:a?{}:t.keepDirtyValues?t.keepDefaultValues&&h?J(d,h):r.dirtyFields:t.keepDefaultValues&&e?J(d,e):t.keepDirty?r.dirtyFields:{},touchedFields:t.keepTouched?r.touchedFields:{},errors:t.keepErrors?r.errors:{},isSubmitSuccessful:!!t.keepIsSubmitSuccessful&&r.isSubmitSuccessful,isSubmitting:!1,defaultValues:d})},Le=(e,t)=>Oe(H(e)?e(h):e,t),Me=e=>{r={...r,...e}},$e={control:{register:Se,unregister:_e,getFieldState:ue,handleSubmit:Ie,setError:xe,_subscribe:Ee,_runSchema:P,_focusError:Te,_getWatch:X,_getDirty:Y,_setValid:I,_setFieldArray:(e,t=[],o,i,a=!0,l=!0)=>{if(i&&o&&!n.disabled){if(b.action=!0,l&&Array.isArray(v(s,e))){const t=o(v(s,e),i.argA,i.argB);a&&w(s,e,t)}if(l&&Array.isArray(v(r.errors,e))){const t=o(v(r.errors,e),i.argA,i.argB);a&&w(r.errors,e,t),ye(r.errors,e)}if((_.touchedFields||C.touchedFields)&&l&&Array.isArray(v(r.touchedFields,e))){const t=o(v(r.touchedFields,e),i.argA,i.argB);a&&w(r.touchedFields,e,t)}(_.dirtyFields||C.dirtyFields)&&(r.dirtyFields=J(d,h)),S.state.next({name:e,isDirty:Y(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else w(h,e,t)},_setDisabledField:Ce,_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:Oe,_resetDefaultValues:()=>H(n.defaultValues)&&n.defaultValues().then(e=>{Le(e,n.resetOptions),S.state.next({isLoading:!1})}),_removeUnmounted:()=>{for(const e of k.unMount){const t=v(s,e);t&&(t._f.refs?t._f.refs.every(e=>!q(e)):!q(t._f.ref))&&_e(e)}k.unMount=new Set},_disableForm:e=>{y(e)&&(S.state.next({disabled:e}),he(s,(t,n)=>{const r=v(s,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:_,get _fields(){return s},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,C={...C,...e.formState},Ee({...e,formState:C})),trigger:oe,register:Se,handleSubmit:Ie,watch:(e,t)=>H(e)?S.state.subscribe({next:n=>"values"in n&&e(X(void 0,t),n)}):X(e,t,!0),setValue:ee,getValues:se,reset:Le,resetField:(e,t={})=>{v(s,e)&&(m(t.defaultValue)?ee(e,f(v(d,e))):(ee(e,t.defaultValue),w(d,e,f(t.defaultValue))),t.keepTouched||K(r.touchedFields,e),t.keepDirty||(K(r.dirtyFields,e),r.isDirty=t.defaultValue?Y(e,f(v(d,e))):Y()),t.keepError||(K(r.errors,e),_.isValid&&I()),S.state.next({...r}))},clearErrors:e=>{e&&j(e).forEach(e=>K(r.errors,e)),S.state.next({errors:e?r.errors:{}})},unregister:_e,setError:xe,setFocus:(e,t={})=>{const n=v(s,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&(e.focus(),t.shouldSelect&&H(e.select)&&e.select())}},getFieldState:ue};return{...$e,formControl:$e}}function Ce(e={}){const t=r.useRef(void 0),n=r.useRef(void 0),[o,i]=r.useState({isDirty:!1,isValidating:!1,isLoading:H(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:H(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:o},e.defaultValues&&!H(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:n,...r}=_e(e);t.current={...r,formState:o}}const a=t.current.control;return a._options=e,T(()=>{const e=a._subscribe({formState:a._proxyFormState,callback:()=>i({...a._formState}),reRenderRoot:!0});return i(e=>({...e,isReady:!0})),a._formState.isReady=!0,e},[a]),r.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),r.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),r.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),r.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),r.useEffect(()=>{if(a._proxyFormState.isDirty){const e=a._getDirty();e!==o.isDirty&&a._subjects.state.next({isDirty:e})}},[a,o.isDirty]),r.useEffect(()=>{e.values&&!$(e.values,n.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),n.current=e.values,i(e=>({...e}))):a._resetDefaultValues()},[a,e.values]),r.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=S(o,a),t.current}},877:e=>{"use strict";e.exports=function(e,t){return{value:e,done:t}}},881:(e,t,n)=>{"use strict";n.d(t,{_H:()=>a,dg:()=>c,jq:()=>i,lV:()=>s,zE:()=>l});var r=n(3864),o=n(6052);const i=(0,r.AH)(["&:focus-within{outline:1px solid ",";}"],e=>{let{theme:t}=e;return(0,o.w5)(t.panelBackground,"rgba(255, 255, 255, 0.8)","rgba(0, 0, 0, 0.8)")}),a=r.Ay.div.withConfig({componentId:"sc-1n2166t-0"})(["padding:12px;box-shadow:0px 0px 1px rgba(0,0,0,0.24),0px 2px 6px rgba(0,0,0,0.04);border-radius:6px;margin:3px 0 2px;background:",";background-color:",";"],e=>{let{theme:t}=e;return t.panelBackground},e=>{let{theme:t}=e;return t.panelBackground}),s=r.Ay.form.withConfig({componentId:"sc-1n2166t-1"})(["display:flex;flex-direction:column;flex:1;",""],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 }"}),l=r.Ay.div.withConfig({componentId:"sc-1n2166t-2"})(["font-size:var(--_kindlychat-font-size-p);font-weight:500;display:flex;align-items:center;color:var(--panel-background-white-black-contrast-1743170834);& > svg{margin-right:4px;& > path{stroke:var(--panel-background-white-black-contrast-1743170834);}}"]),c=r.Ay.div.withConfig({componentId:"sc-1n2166t-3"})(["display:flex;flex-direction:row;align-self:flex-end;justify-content:flex-end;margin-top:16px;& > button{&:last-child{margin-left:12px;}}"])},892:(e,t,n)=>{"use strict";n.d(t,{Mx:()=>g,z5:()=>b,gm:()=>m,JL:()=>h});var r=n(5096),o=n(2221),i=n(9932),a=n.n(i);var s=n(4851);var l=n(628),c=n(8679);const u=new class{constructor(){a()(this,"locked",!1),a()(this,"waiters",[])}async acquire(){if(this.locked)return new Promise(e=>{this.waiters.push(e)}).then(()=>{this.locked=!0});this.locked=!0}release(){if(this.waiters.length>0){const e=this.waiters.shift();e&&e()}else this.locked=!1}},d=e=>async(t,n)=>{try{return await u.acquire(),await e(t,n)}finally{u.release()}},p=async(e,t)=>{const{auth:{jwt:n},connection:{token:r},environment:{PAT_HOST:i}}=t();if(n){const{headers:t}=(0,s.A)({jwt:n,token:r},{withCurrentUrl:!0});try{await e((0,l.et)(`${i}/chatbubble/${o.Ak}/auth/chat/invalidate`,{method:"POST",headers:t}))}catch(e){console.error("Failed to invalidate auth token:",e)}}return e({type:c.zZ}),!0};let f=null;const h=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f;return d(async(t,n)=>{var r,i;if(null===e)return!0;f=e;const a=n(),u=null===(r=a.connection)||void 0===r?void 0:r.token,d=null===(i=a.environment)||void 0===i?void 0:i.PAT_HOST;if(!u)return!1;const{headers:p}=(0,s.A)({token:u},{withCurrentUrl:!0});try{const{data:n,status:r}=await t((0,l.et)(`${d}/chatbubble/${o.Ak}/auth/identify`,{method:"POST",headers:p,body:e}));return r>=200&&r<400&&(t({type:c.qQ,...n}),f=null,!0)}catch(e){return console.error("Identity submission failed:",e),!1}})},m=e=>async(t,n)=>{f=e;const{connection:{token:r}}=n();r&&t(h(f))},g=()=>d(async(e,t)=>{var n,i,a;const u=t(),d=null===(n=u.chatbubble)||void 0===n?void 0:n.chatId,f=null===(i=u.connection)||void 0===i?void 0:i.token,h=null===(a=u.environment)||void 0===a?void 0:a.PAT_HOST,{getAuthToken:m}=r.Z;if(!d||!m)return await p(e,t),!1;let g;try{if(g=await m(d),!g)throw new Error("No JWT returned")}catch(n){return console.error("Chatbubble auth failed:",n),await p(e,t),!1}try{const{headers:t}=(0,s.A)({jwt:g,token:f},{withCurrentUrl:!0}),n=await e((0,l.et)(`${h}/chatbubble/${o.Ak}/auth/chat`,{method:"POST",headers:t}));return!(null==n||!n.data||(e({type:c.K_,jwt:g,avatarUrl:n.data.avatar_url,fullName:n.data.full_name}),0))}catch(n){return console.error("Server authentication failed:",n),await p(e,t),!1}}),b=()=>async(e,t)=>{var n,o,i;const a=t();if(null===(n=a.auth)||void 0===n||!n.isAuthenticated)return null;const s=null===(o=a.auth)||void 0===o?void 0:o.jwt,{getAuthToken:l}=r.Z;l&&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}(s)&&await e(g());const c=t();return null!==(i=c.auth)&&void 0!==i&&i.isAuthenticated?{Authorization:`Bearer ${c.auth.jwt}`}:null}},896:(e,t,n)=>{"use strict";function r(e){return e.touches||e.originalEvent.touches}n.d(t,{A:()=>i});let o=null;const i=e=>{let{setIndex:t,index:n,carousel:i}=e;return{handleTouchStart:e=>{const t=r(e)[0];o=t.clientX},handleTouchMove:e=>{if(!o)return;const a=r(e)[0].clientX;t(o-a>5?n+1:n-1,i),o=null},handleTouchEnd:()=>{o=null}}}},908:(e,t,n)=>{"use strict";var r=n(7551);e.exports=Array.isArray||function(e){return"Array"===r(e)}},916:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(9155),o=n(541),i=n(1695);function a(){const{nudges:e}=(0,o.d4)(i.Od);return(0,r.useMemo)(()=>{var t,n,r,o,i;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!==(i=null==e?void 0:e.multiple_choice_nudges)&&void 0!==i?i:[]]},[e])}},928:(e,t,n)=>{"use strict";n(4531)("match")},958:(e,t,n)=>{"use strict";n.d(t,{A:()=>N});var r=n(9749),o=n.n(r),i=n(9155),a=n.n(i),s=n(541),l=n(3864),c=n(6367),u=n(809),d=n(2221),p=n(8560),f=n(3791),h=n(6343),m=n(7182),g=n(1695),b=n(5767),v=n(2036),y=n(5353),w=n(8681);const x=l.Ay.div.withConfig({componentId:"sc-lsdvgt-0"})(["width:100%;position:relative;text-align:left;"]),E=(0,l.Ay)(u.Gr).withConfig({componentId:"sc-lsdvgt-1"})(["&& path{fill:none;}"]);var k=n(9223),A=n(9662),_=n(6101);const{EXTERNAL_LINK:C,EMAIL:S,PHONE:T,CHECKBOX:I,SLIDER:O,END_CHAT:L}=d.lP,M=e=>null!=e&&e.match(/^https?:\/\//i)?e:`http://${e}`;function $(e,t){t?window.open(e,t):window.location.href=e}function N(e){var t,n,r;let{button:N,setCheckboxValue:R,checked:P,chatMessage:j,disabled:D=!1,handlers:z,isNudge:F=!1,onClick:B,submitButtonsList:H}=e;const U=(0,m.jL)(),V=(0,w.A)(N.button_type),{chatMessages:G,buttonClicks:W}=(0,s.d4)(g.DZ)||[],q=(0,s.d4)(g.$P)||[],{buttonText:K}=(0,i.useContext)(l.Dx),Y=(0,m.CU)(),{feedbackToDisplay:X}=(0,p.A)(),Z=o()(t=[C,T,S]).call(t,V),J=o()(n=[I]).call(n,V),Q=o()(r=[O]).call(r,V),ee=Boolean((Array.isArray(P)?P:[]).find(e=>e.id===N.id)),te=N.open_in_new_tab||void 0===N.open_in_new_tab?"_blank":"_self",ne=V===L,re=(0,i.useRef)(H);let oe="";V===T&&(oe="tel:"),V===S&&(oe="mailto:");const ie=(0,i.useCallback)(e=>{e.preventDefault();const t=Y.getState(),{token:n}=t.connection,{PAT_HOST:r}=t.environment,{attachments:o}=t.messages,i=G.map(e=>(0,y.A)(e,o,r,n)),a=(0,y.A)(j,o,r,n);if((0,c.fz)({event:e,handlers:z,buttonType:V,button:(0,v.A)(N),lastMessage:a,chatLog:i,renderedBy:null==q?void 0:q.renderedBy}))return;"function"==typeof B&&B(),F||U((0,h.Bd)(N,j,P,re.current));const{href:s,target:l}=e.currentTarget;s&&(l&&"_self"!==l?$(s,l):setTimeout(()=>{$(s,l)},250))},[V,j,G,N,U,z,P,re,B,null==q?void 0:q.renderedBy,F,Y]),ae=(0,f.A)(ie,3e3),se=(null!=W?W:[]).find(e=>{let{chatMessageId:t,buttonId:n}=e;return t===(null==j?void 0:j.id)&&n===N.id}),le=(0,i.useCallback)(()=>{null==R||R(N)},[N,R]);return(0,i.useEffect)(()=>{se&&J&&!ee&&(null==R||R(N))},[se,J,N,R,ee]),Q&&null!=N&&N.slider_details?a().createElement("div",null,a().createElement(_.A,{name:`slider_${N.id}`,onChange:e=>{const t=parseFloat(e);var n;t&&Array.isArray(re.current)&&(null===(n=re.current)||void 0===n||n.map(e=>e.id===N.id?(e.slider_details.value=t,e):e))},from:N.slider_details.from_value,to:N.slider_details.to_value,value:N.slider_details.value,step:N.slider_details.step_value,affix:N.slider_details.affix,affixValue:N.slider_details.affix_value,ariaLabel:N.label})):a().createElement(k.A,Object.assign({cy:"message-button",isCheckbox:J,type:"button"},Z&&{href:`${oe}${V===C?M(N.value):N.value}`,target:`${V!==C||F?"_self":te}`},J&&{style:{backgroundColor:"transparent",background:"transparent"},role:"checkbox","aria-label":N.label,"aria-checked":ee?"true":"false"},{icon:V===C&&F&&a().createElement(u.fl,null)||V===C&&!F&&a().createElement(E,{color:K,size:20}),disabled:D,onClick:e=>J?le():Z?ie(e):(ne&&(X?(U((0,b.WG)({ratingSystem:X.rating_scale.rating_system,triggerType:X.trigger_type,formTitle:X.form_title,step:"RATING_SCALE"})),U((0,b.ZG)("button_click")),U((0,h.zn)("END_CHAT"))):U((0,h.wQ)("CANCEL_CHAT"))),ae(e))}),J&&a().createElement(x,null,a().createElement(A.A,{disabled:!0,"aria-disabled":!0,inputType:d.lP.CHECKBOX,name:`checkbox-${N.id}`,id:N.id,checked:ee,label:N.label})),J?"":N.label)}},960:(e,t,n)=>{"use strict";var r=n(9098),o=n(701),i=n(6281),a=n(459),s=n(8141),l=n(2044),c=s("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!l},{keyFor:function(e){if(!i(e))throw new TypeError(a(e)+" is not a symbol");if(o(c,e))return c[e]}})},1003:(e,t,n)=>{"use strict";var r=n(8099),o=n(8900),i=n(2769),a=function(e){return i(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?a(r[e])||a(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),i=n(8130),a=function(e){return function(t,n,a){var s=r(t),l=i(s);if(0===l)return!e&&-1;var c,u=o(a,l);if(e&&n!=n){for(;l>u;)if((c=s[u++])!=c)return!0}else for(;l>u;u++)if((e||u in s)&&s[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},1019:(e,t,n)=>{"use strict";n(3855);var r=n(2856);e.exports=r("String","includes")},1033:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>Gs});var r=n(9155),o=n.n(r),i=n(3864),a=n(8035);const s=i.Ay.div.withConfig({componentId:"sc-164l1vq-0"})(["font-size:var(--_kindlychat-font-size-m);text-align:initial;line-height:18px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;height:100%;z-index:",";pointer-events:auto;@media ","{max-height:unset;}",""],e=>e.$zIndex+5,a.jO.maxTablet,e=>{let{$inspectorOpen:t}=e;return t&&"display: flex; flex-direction: row-reverse;"});var l=n(2221),c=n(541),u=n(1695);const d=i.Ay.div.withConfig({componentId:"sc-huyjcb-0"})(["margin:20px;display:flex;flex-direction:column;"]),p=i.Ay.hr.withConfig({componentId:"sc-huyjcb-1"})(["border-top:1px solid rgb(243,243,244);width:100%;margin:0;"]),f=i.Ay.button.withConfig({componentId:"sc-huyjcb-2"})(["text-align:center;margin:5px 5px 0 5px;background:rgb(243,243,244);border:1px solid rgb(243,243,244);font-weight:600;padding:7px 16px;border-radius:5px;cursor:pointer;outline:none;&:hover{background:rgb(230,230,230);}&:disabled{background:white;color:rgb(206,206,206);border-color:rgb(206,206,206);cursor:default;}"]),h=i.Ay.div.withConfig({componentId:"sc-huyjcb-3"})(["display:flex;align-items:baseline;font-size:calc(var(--_kindlychat-font-size-sm) * 1.067);",""],e=>{let{$spaceBetween:t}=e;return t?"justify-content: space-between;":""}),m=i.Ay.div.withConfig({componentId:"sc-huyjcb-4"})(["padding:1px 3px;border-radius:3px;font-size:var(--_kindlychat-font-size-sm);margin-right:5px;background:rgba(255,74,156,0.25);"]),g=i.Ay.span.withConfig({componentId:"sc-huyjcb-5"})(["height:7px;width:7px;background:rgb(255,172,74);border-radius:50%;margin-right:5px;bottom:1px;position:relative;"]),b=(i.Ay.span.withConfig({componentId:"sc-huyjcb-6"})(["margin:0 5px;color:gray;"]),i.Ay.div.withConfig({componentId:"sc-huyjcb-7"})(["padding:1px 6px;border-radius:3px;border:1px solid lightgray;text-transform:uppercase;font-size:var(--_kindlychat-font-size-sm);margin:0 5px 3px 5px;white-space:nowrap;",""],e=>{let{$filled:t}=e;return t?"background: rgb(0, 105, 255); color: white;":""})),v=i.Ay.a.withConfig({componentId:"sc-huyjcb-8"})(["text-decoration:none;color:initial;cursor:pointer;&:hover{color:rgb(0,105,255);}"]);var y=n(8789);const w=()=>{};function x(){return o().createElement(o().Fragment,null,o().createElement(d,null,o().createElement(y.H5,null,"No messages yet!")),o().createElement(h,{$spaceBetween:!0},o().createElement(f,{disabled:!0,onClick:w},"Show previous"),o().createElement(f,{disabled:!0,onClick:w},"Show next")))}function E(e){let{patternContextMatch:t}=e;const[n,r]=Object.entries(t)[0];return o().createElement(d,null,o().createElement(y.H5,null,"Slot / Pattern context"),o().createElement(h,null,o().createElement(m,null,n),o().createElement("span",null,r)))}const k=e=>{let{botId:t,exchangeType:n,exchangeId:r}=e;return t&&n&&r?`/bot/${t}/build/${("usersays"===n?"dialogue":n).replace("_","-")}/${r}`:null};var A=n(9749),_=n.n(A);const{SAMPLE_MATCH:C,KEYWORD_EXACT_MATCH:S,KEYWORD_MENTION:T,PATTERN_MATCH:I,ZODIAC:O}=l.Gi,L=e=>(null!=e?e:"").toLowerCase().replace(/[-_]/g," "),M=e=>{switch(e){case C:case O:return"sample";case I:return"pattern";case S:case T:return"keyword";default:return L(e)}};function $(e){var t,n,r;let{handler:i,score:a,exchangeType:s,sender:c,fromWebhook:u,label:d}=e;return"string"==typeof d?o().createElement(b,null,d):_()(t=[C,O]).call(t,i)&&a?o().createElement(b,{$filled:!0,title:"Confidence score"},`${Math.round(100*a)} %`):_()(n=Object.values(l.Gi)).call(n,i)?o().createElement(b,null,M(i)):u?o().createElement(b,null,"webhook"):"string"==typeof s?o().createElement(b,null,L(s)):_()(r=Object.values(l.bS)).call(r,c)?o().createElement(b,null,L(c)):null}var N=n(3058);const R=i.Ay.span.withConfig({componentId:"sc-1jsyulb-0"})(["",""],N.uh);function P(){return o().createElement(R,null,"(opens in a new tab)")}const j=function(e){let{children:t,url:n}=e;return n?o().createElement(v,{target:"_blank",rel:"noopener noreferrer",href:n},t,o().createElement(P,null)):t},D=function(e){let{replyCandidates:t,botId:n}=e;const i=(0,r.useMemo)(()=>t.filter(e=>{let{selected:t,sample:n,title:r}=e;return!t&&(n||r)}),[t]);return 0===(null==i?void 0:i.length)?null:o().createElement(d,null,o().createElement(y.H5,null,"Potential dialogues"),i.map(e=>{let{_id:t,score:r,sample:i,title:a,dialogue_id:s}=e;return o().createElement(j,{key:`reply-candidate-${t}`,url:k({botId:n,exchangeType:"usersays",exchangeId:s})},o().createElement(h,null,o().createElement($,{handler:l.Gi.SAMPLE_MATCH,score:r}),o().createElement(g,null),o().createElement("span",null,i||a)))}))};function z(e){let{botId:t,exchangeType:n,exchangeId:r,children:i}=e;const a=k({botId:t,exchangeType:n,exchangeId:r});return o().createElement(j,{url:a},o().createElement(h,null,i))}const F=(e,t)=>`${(e||"").slice(0,t)}${(null==e?void 0:e.length)>t?"...":""}`,B=40;function H(e){let{fromBot:t,fromWebhook:n,handler:r,score:i,title:a,message:s,exchangeType:l,exchangeId:c,botId:u,isFollowup:p,sender:f}=e;return o().createElement(d,null,o().createElement(y.H5,null,"Message info"),t&&o().createElement(h,{$spaceBetween:!0},a&&o().createElement(z,{botId:u,exchangeType:l,exchangeId:c},o().createElement(g,null),o().createElement("span",null,F(a,B))),!a&&o().createElement("span",null,F(s,B)),o().createElement(h,null,o().createElement($,{handler:r,score:i,exchangeType:l,sender:f,fromWebhook:n}),p&&o().createElement($,{exchangeType:"followup"}))),!t&&o().createElement(h,{$spaceBetween:!0},F(s,B),o().createElement($,{label:"user"})))}function U(e){let{chatMessage:{message:t,score:n,title:r,handler:i,sender:a,from_bot:s,bot_id:l,from_webhook:c,reply_candidates:u,exchange_type:d,exchange_id:f,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:i,fromBot:s,fromWebhook:c,score:n,title:r,message:t,exchangeType:d,exchangeId:f,botId:l,isFollowup:h,sender:a}),o().createElement(p,null),g&&o().createElement(o().Fragment,null,o().createElement(E,{patternContextMatch:m}),o().createElement(p,null)),(null==u?void 0:u.length)>1&&o().createElement(o().Fragment,null,o().createElement(D,{replyCandidates:u,botId:l}),o().createElement(p,null)))}var V=n(9886),G=n(6343),W=n(2475),q=n(2628);const K=(0,i.i7)(["0%{visibility:visible;opacity:0;}1%{opacity:0;transform:translateY(20px);}100%{opacity:1;transform:translateY(0);}"]),Y=(0,i.AH)(["",";animation-name:",";"],(0,W.qL)(),K),X=(0,i.i7)(["0%{opacity:1;transform:translateY(0px);}99%{opacity:0;transform:translateY(20px);}100%{opacity:0;visibility:hidden;}"]),Z=(0,i.AH)(["",";animation-name:",";"],(0,W.qL)(),X),J=(0,i.AH)(["bottom:0px;right:0px;"]),Q=(0,i.AH)(["width:100%;height:100%;max-height:unset;min-height:320px;",";border-radius:0;visibility:",";"],J,e=>{let{$active:t}=e;return t?"visible":"hidden"}),ee=(0,i.AH)(["max-height:",";height:",";width:",";"],e=>{let{$fullscreen:t}=e;return t?"100%":"645px"},e=>{let{$fullscreen:t}=e;return t?"100%":"645px"},e=>{let{$fullscreen:t}=e;return t?"100%":"360px"}),te=(0,i.AH)(["bottom:85px;right:10px;border-radius:12px;@media (max-height:","){min-height:380px;height:calc(100vh - ",");}"],"950px",e=>{let{$offsetHeight:t}=e;return t||0}),ne=(0,i.AH)([""," "," ",""],e=>{let{$fullscreen:t}=e;return t?J:te},e=>{let{$active:t}=e;return t?ee:(0,W.vW)()},e=>{let{$fullscreen:t,$chatHasStarted:n,$active:r}=e;return!t&&!n&&(e=>{let{$active:t}=e;return t?Y:Z})({$active:r})}),re=(0,i.AH)(["right:369px;display:flex;flex-direction:column;justify-content:flex-start;z-index:19;border-radius:6px 0 0 6px;background:#ffffff;> &:last-child{margin:auto 20px 20px;}"]),oe=i.Ay.div.withConfig({componentId:"sc-4u7nsm-0"})(["display:flex;z-index:20;overflow:hidden;flex-direction:column;box-shadow:",";background:",";",";"," @media ","{",";}",""],a.FR.level2,e=>{let{theme:t}=e;return t.background},ne,e=>{let{$inspectorContainer:t}=e;return t&&re},a.jO.maxTablet,Q,(0,q.A)()&&Q);function ie(){const{active:e,chatHasStarted:t}=(0,c.d4)(u.$P),{offsetHeight:n}=(0,c.d4)(u.Od),{currentMessage:i,nextMessage:a,prevMessage:s,isFirstMessage:l,isLastMessage:d}=function(){var e,t;const n=(0,c.wA)(),{chatMessages:o}=(0,c.d4)(u.DZ),{currentMessageId:i}=(0,c.d4)(u.qV),a=i||(null===(e=o.slice(-1)[0])||void 0===e?void 0:e.id),s=o.findIndex(e=>{let{id:t}=e;return t===a}),l=(0,r.useCallback)(()=>{n((0,G.F3)(o[s+1].id))},[o,s,n]),d=(0,r.useCallback)(()=>{n((0,G.F3)(o[s-1].id))},[o,s,n]),p=null!==(t=null==o?void 0:o.length)&&void 0!==t?t:0,f=(0,V.A)(p),h=0===s,m=s===p-1;return(0,r.useEffect)(()=>{p>f&&n((0,G.F3)())},[n,p,f]),{currentMessage:o[s],nextMessage:l,prevMessage:d,isFirstMessage:h,isLastMessage:m}}();return o().createElement(oe,{$chatHasStarted:t,$active:e,$fullscreen:!1,$offsetHeight:n,$inspectorContainer:!0},i&&o().createElement(o().Fragment,null,o().createElement(U,{chatMessage:i}),o().createElement(h,{$spaceBetween:!0},o().createElement(f,{disabled:l,onClick:s},"Show previous"),o().createElement(f,{disabled:d,onClick:a},"Show next"))),!i&&o().createElement(x,null))}var ae=n(4927);const se=i.Ay.div.withConfig({componentId:"sc-14jyotv-0"})(["border-radius:0;box-shadow:1px 2px 5px 2px ",";line-height:23px;background:",";background-color:",";font-size:var(--_kindlychat-font-size-p);font-weight:500;transform-origin:top;display:flex;z-index:15;position:absolute;padding:0 10px;transform:",";transition:",";width:100%;top:55px;span{font-size:var(--_kindlychat-font-size-p);margin-right:7px;}"],a.Tj.shadowColor,a.Tj.warningColor,a.Tj.warningColor,e=>{let{$show:t}=e;return t?"scaleY(1)":"scaleY(0)"},e=>{let{$show:t}=e;return t?"transform 0.15s ease-in":"transform 0.15s ease-out"}),le=i.Ay.div.withConfig({componentId:"sc-14jyotv-1"})(["margin:5px 0;display:flex;color:#2c2c2c;font-size:inherit;font-weight:inherit;line-height:24px;"]),ce=(0,i.Ay)(ae.N_).withConfig({componentId:"sc-14jyotv-2"})(["color:#0063a2;"]);function ue(){const{text:e,url:t,show:n}=(0,c.d4)(u.uF);return n?o().createElement(se,{$show:n},o().createElement(le,null,o().createElement("span",null,"!"),e),t&&o().createElement(ce,{href:t,target:"_blank"},"url",o().createElement(P,null))):null}var de=n(5781),pe=n(1328);const fe=e=>{if("number"==typeof e)return 10===e.toString().length&&(e*=1e3),new Date(e);if("string"==typeof e){const t=e.replace(/\s+/g,"T");return new Date(t)}return e instanceof Date?e:new Date(0)};var he=n(6052);const me=(0,i.i7)(["0%{opacity:0;transform:translateY(2px);}100%{opacity:1;transform:translateY(0);}"]),ge=(0,i.AH)(["",";animation-name:",";"],(0,W.qL)(300),me),be=(0,i.AH)(["flex-direction:row-reverse;"]),ve=(0,i.AH)(["flex-direction:row;"]),ye=(0,i.AH)(["background:#e3e3e7;padding:0 30px;margin:10px -30px;position:relative;&:before{content:'';position:absolute;background:rgb(153,153,153);width:4px;height:calc(100% + 20px);left:0;z-index:1;}&:after{content:'';position:absolute;display:inline-block;width:100%;height:20px;background:#e3e3e7;top:100%;left:0;}"]),we=i.Ay.div.withConfig({componentId:"sc-drt5la-0"})(["",";",";&:nth-child(1){padding-top:10px;}"],e=>e.$fromBot?ve:be,e=>{let{$inspected:t}=e;return t&&ye}),xe=i.Ay.span.withConfig({componentId:"sc-drt5la-1"})(["display:flex;align-items:baseline;flex-wrap:nowrap;justify-content:center;opacity:0;margin-bottom:16px;",";@media (prefers-reduced-motion){animation:none;opacity:1;}"],ge),Ee=(0,i.Ay)(y.mt).withConfig({componentId:"sc-drt5la-2"})(["opacity:1;margin:0;color:",";"],e=>{let{theme:t}=e;return(0,he.w5)(t.background,"#FFFFFF","#000000")}),ke=i.Ay.div.withConfig({componentId:"sc-drt5la-3"})(["display:block;width:100%;",""],e=>e.$isLastGroupMessage&&"margin-bottom: 16px;");function Ae(e){let{fromBot:t,created:n,shouldShowTime:r,children:i,inspected:a,disclaimerComponent:s,isLastGroupMessage:c}=e;const{currentLanguageCode:u}=(0,pe.A)();return o().createElement(we,{$fromBot:t,$inspected:a,"data-testid":l.gH},o().createElement(ke,{$isLastGroupMessage:c},s,r&&o().createElement(xe,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,i=r.toDateString()===o.toDateString(),a=t||n||"en",s=(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 s(a,i)}catch(e){return s(n,i)}}(n,u))),i))}var _e=n(1346);function Ce(e){return o().createElement("svg",Object.assign({version:"1.1",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),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"}))))}function Se(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 Te=n(9514),Ie=n(6367),Oe=n(809);function Le(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 Me=i.Ay.button.withConfig({componentId:"sc-19ca8jq-0"})(["position:absolute;top:24px;right:24px;border:1px solid rgba(0,0,0,0.2);background:rgba(255,255,255,0.8);border-radius:6px;padding:5px;box-shadow:0 2px 4px rgba(0,0,0,0.1);transition:all 0.2s ease;cursor:pointer;& svg{display:block;}"]),$e=i.Ay.dialog.withConfig({componentId:"sc-19ca8jq-1"})(["all:unset;position:fixed;display:flex;inset:0;align-items:center;justify-content:center;&::backdrop{background:rgba(0,0,0,0.5);}"]),Ne=i.Ay.img.withConfig({componentId:"sc-19ca8jq-2"})(["width:auto;max-width:100%;max-height:100%;margin:auto;padding:24px;"]),Re=()=>{const[e,t]=(0,r.useState)(null),[n,o]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(!e)return;const t=[],n=[...e.getElementsByTagName("img")].filter(e=>!e.complete||!e.naturalWidth).map(e=>new Promise(n=>{t.push({img:e,resolver:n}),e.addEventListener("load",n,{once:!0}),e.addEventListener("error",n,{once:!0})}));return 0===n.length?o(!0):Promise.all(n).then(()=>{o(!0)}),()=>{t.forEach(e=>{let{img:t,resolver:n}=e;t.removeEventListener("load",n),t.removeEventListener("error",n)})}},[e]),[t,n]};var Pe=n(2036),je=n(7051);function De(e){const{browserName:t}=function(){const{userAgent:e}=navigator;let t;return t=e.match(/chrome|chromium|crios/i)?"chrome":e.match(/firefox|fxios/i)?"firefox":e.match(/safari/i)?"safari":e.match(/opr\//i)?"opera":e.match(/edg/i)?"edge":"No browser detection",{browserName:t,userAgent:e}}();return e===t}const ze="6px",Fe=()=>`\n /* If browser support backdrop-filter */\n ${De("chrome")&&"\n background: rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.2);\n backdrop-filter: blur(8px);\n opacity: 1;\n\n &:hover {\n background: rgba(255, 255, 255, 0.4);\n background-color: rgba(255, 255, 255, 0.4);\n\n + svg path {\n mix-blend-mode: unset;\n stroke: black;\n }\n }\n "}\n`,Be=()=>`\n position: absolute;\n pointer-events: none;\n \n path {\n stroke: #000;\n }\n\n ${De("chrome")&&"\n path {\n mix-blend-mode: difference;\n stroke: white;\n }\n "}\n\n `,He=i.Ay.div.withConfig({componentId:"sc-1uha618-0"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:",";position:relative;width:100%;min-height:100px;"," background:#232F41;color:#fff;font-size:var(--_kindlychat-font-size-p);"],e=>{let{$hasCaption:t}=e;return t?`${ze} ${ze} 0 0`:ze},e=>e.$imageHeight&&`height: ${e.$imageHeight}px;`),Ue=i.Ay.div.withConfig({componentId:"sc-1uha618-1"})(["position:relative;overflow:hidden;margin-left:-25px;width:calc(100% + 50px);> div{",";}"],e=>e.$active&&"\n position: relative;\n width: 100000%;\n display: flex;\n "),Ve=i.Ay.div.withConfig({componentId:"sc-1uha618-2"})(["position:relative;display:flex;flex-direction:column;width:","px;height:fit-content;margin-right:5px;margin-top:2px;margin-bottom:2px;border-radius:",";box-shadow:0px 2px 6px rgba(0,0,0,0.06);overflow:hidden;color:",";",";&::after{content:'';position:absolute;inset:0;pointer-events:none;box-shadow:inset 0px 0px 1px rgba(0,0,0,0.32);border-radius:",";}"],e=>e.$imageWidth,ze,a.qd.textColor,e=>{let{$first:t,$isCarousel:n}=e;return t||!n?"margin-left: 25px":""},ze),Ge=(0,i.AH)(["position:relative;display:",";min-height:100px;",""],e=>e.hidden?"none":"block",e=>e.$isCarousel?`height: ${e.$imageHeight}px;`:"height: auto;"),We=i.Ay.a.withConfig({componentId:"sc-1uha618-3"})(["",""],Ge),qe=i.Ay.div.withConfig({componentId:"sc-1uha618-4"})(["",""],Ge),Ke=i.Ay.img.withConfig({componentId:"sc-1uha618-5"})(["max-width:100%;position:relative;width:auto;max-height:350px;min-height:100px;transition:border-width 0.15s ease;display:block;"," ",""],e=>e.$carousel&&e.$imageHeight&&e.$imageWidth?`\n height: ${e.$imageHeight}px; \n object-fit: cover; \n width: ${e.$imageWidth}px;\n `:"",N.sF),Ye=i.Ay.div.withConfig({componentId:"sc-1uha618-6"})(["background:",";> *:last-child{margin-bottom:8px;}"],e=>{let{theme:t}=e;return t.panelBackground}),Xe=i.Ay.h3.withConfig({componentId:"sc-1uha618-7"})(["font-weight:500;margin:6px 8px 0px 8px;font-size:var(--_kindlychat-font-size-p);line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--panel-background-white-black-contrast-1743170834);"]),Ze=i.Ay.div.withConfig({componentId:"sc-1uha618-8"})(["margin:0;margin:2px 8px 8px 8px;font-size:var(--_kindlychat-font-size-sm);line-height:16px;color:var(--panel-background-white-black-contrast-1743170834);white-space:pre-line;opacity:0.6;"]),Je=i.Ay.button.withConfig({componentId:"sc-1uha618-9"})(["all:unset;position:relative;display:flex;height:35px;max-width:100%;font-size:var(--_kindlychat-font-size-p);align-items:center;justify-content:center;padding:4px 12px;color:var(--panel-background-white-black-contrast-1743170834);background-color:",";border-top:1px solid ",";font-weight:500;gap:6px;cursor:pointer;"," &:hover{filter:brightness(0.9);}> span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}svg{flex-shrink:0;& path{stroke:currentColor;}}&:focus-visible{&::after{content:'';position:absolute;inset:3px;outline:2px solid white;mix-blend-mode:difference;}}"],e=>{let{theme:t}=e;return t.panelBackground},e=>{let{theme:t}=e;return(0,he.w5)(t.panelBackground,"rgba(255, 255, 255, 0.08)","rgba(0, 0, 0, 0.08)")},e=>{let{$inView:t}=e;return!t&&"opacity: 0.5;"}),Qe=i.Ay.button.withConfig({componentId:"sc-1uha618-10"})(["position:absolute;top:50%;transform:translateY(-50%);background:#fff;background-color:#fff;border:none;width:36px;height:36px;display:flex;justify-content:center;align-items:center;cursor:pointer;padding:0 0 2px 0px;border-radius:100px;opacity:0.8;transition:all 0.2s ease;box-shadow:0px 2px 6px rgba(0,0,0,0.04);&:hover{opacity:1;}&:active{background-color:#efeeee;opacity:1;}"," "," ",";",""],N.sF,e=>{let{$next:t}=e;return t?"right: 10px;":"left: 10px;"},e=>{let{$disabled:t}=e;return t&&"display: none"},Fe),et=(0,i.Ay)(Oe.A6).withConfig({componentId:"sc-1uha618-11"})(["top:calc(50% - 13px);left:15px;",";",""],e=>{let{disabled:t}=e;return t&&"display: none"},Be),tt=(0,i.Ay)(Oe.fl).withConfig({componentId:"sc-1uha618-12"})(["top:calc(50% - 13px);right:15px;",";",""],e=>{let{disabled:t}=e;return t&&"display: none"},Be),nt=i.Ay.div.withConfig({componentId:"sc-1uha618-13"})(["position:absolute;left:",";bottom:",";background:#fff;display:flex;align-items:center;justify-content:center;width:24px;height:24px;opacity:0.8;border-radius:50%;pointer-events:none;",""],a.Nl.wrapper,a.Nl.wrapper,Fe),rt=(0,i.Ay)(Oe.qY).withConfig({componentId:"sc-1uha618-14"})(["bottom:",";left:",";",""],a.Nl.icon,a.Nl.icon,Be),ot=(0,i.Ay)(Oe.Gr).withConfig({componentId:"sc-1uha618-15"})(["position:relative;left:-2px;top:1px;"]),it=i.Ay.button.withConfig({componentId:"sc-1uha618-16"})(["display:",";position:absolute;top:",";right:",";width:24px;height:24px;align-items:center;justify-content:center;border-radius:2px;border:none;cursor:pointer;background:#fff;box-shadow:0px 2px 6px rgba(0,0,0,0.04);opacity:0.8;padding:0px 0 0 1px;"," &:hover{opacity:1;}",""],e=>e.$inView?"flex":"none",a.Nl.wrapper,a.Nl.wrapper,N.sF,Fe),at=(0,i.Ay)(Oe.gp).withConfig({componentId:"sc-1uha618-17"})(["top:",";right:",";",""],a.Nl.icon,a.Nl.icon,Be);function st(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:"M19.25 19.25L15.5 15.5M4.75 11C4.75 7.54822 7.54822 4.75 11 4.75C14.4518 4.75 17.25 7.54822 17.25 11C17.25 14.4518 14.4518 17.25 11 17.25C7.54822 17.25 4.75 14.4518 4.75 11Z",stroke:"#333333",strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}))}const lt=(0,i.i7)(["10%{transform:translateY(-5px);}50%{opacity:0.5;transform:translateY(0);}"]),ct=((0,i.i7)(["from{max-height:200px;}to{max-height:0;overflow:hidden;}"]),i.Ay.div.withConfig({componentId:"sc-kwvd9-0"})(["background:none;will-change:transform,opacity,max-height;width:auto;display:grid;position:relative;grid-template-columns:37px auto 37px;@media (prefers-reduced-motion){animation:none;}"])),ut=i.Ay.div.withConfig({componentId:"sc-kwvd9-1"})(["border-radius:15px;position:relative;display:inline-flex;flex-direction:row;border:0;margin:8px 0px;padding:10px 8px;align-self:center;background:",";background-color:",";"],e=>"image"===e.$loadingType?"transparent":e.theme.botMessageBackground,e=>"image"===e.$loadingType?"transparent":e.theme.botMessageBackground),dt=i.Ay.span.withConfig({componentId:"sc-kwvd9-2"})(["height:3px;width:3px;margin:0 2px;background:",";background-color:",";display:block;opacity:1;border-radius:100px;&:nth-of-type(1){animation:1s "," infinite 0.3s;}&:nth-of-type(2){animation:1s "," infinite 0.6s;}&:nth-of-type(3){animation:1s "," infinite 0.9s;}"],e=>{let{theme:t,$loadingType:n}=e;return"image"===n?"#fff":(0,he.w5)(t.botMessageBackground,"#FFF","#000")},e=>{let{theme:t,$loadingType:n}=e;return"image"===n?"#fff":(0,he.w5)(t.botMessageBackground,"#FFF","#000")},lt,lt,lt),pt=i.Ay.div.withConfig({componentId:"sc-kwvd9-3"})(["font-size:var(--_kindlychat-font-size-sm);display:flex;flex-direction:row;align-items:center;line-height:16px;margin:3px auto 0;padding:0 8px;color:",";"],e=>{let{theme:t}=e;return(0,he.w5)(t.background,"rgba(255, 255, 255, 0.6)","rgba(0, 0, 0, 0.6)")}),ft=i.Ay.span.withConfig({componentId:"sc-kwvd9-4"})(["font-weight:500;"]),ht=i.Ay.span.withConfig({componentId:"sc-kwvd9-5"})(["display:flex;flex-direction:row;align-items:center;"]),mt=i.Ay.div.withConfig({componentId:"sc-kwvd9-6"})(["display:inline-block;"]);function gt(e){let{loadingType:t,text:n,botName:r}=e;return o().createElement(ct,{"data-testid":l.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(st,{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=(0,i.i7)(["from{background-position:0%;}to{background-position:-200%;}"]),yt=i.Ay.div.withConfig({componentId:"sc-jo8x8h-0"})(["position:absolute;left:0;width:100%;top:0;height:100%;color:black;z-index:1;display:flex;justify-content:center;align-items:center;pointer-events:none;opacity:",";transition:opacity "," ease-out;div:first-child{height:100%;width:100%;position:absolute;background:",";background-size:200% 100%;animation:1.3s linear "," infinite 0s;opacity:0.5;}div:nth-child(2){height:100%;width:100%;position:absolute;background:white;opacity:",";}div:nth-child(3){z-index:1;}"],e=>{let{$finished:t}=e;return t?0:1},e=>{let{$hideTransitionLength:t}=e;return`${t}s`},"\n linear-gradient(\n 90deg,\n rgba(255, 255, 255, 1) 0%,\n rgba(255, 255, 255, 0.738) 9.5%,\n rgba(255, 255, 255, 0.541) 17%,\n rgba(255, 255, 255, 0.382) 23.5%,\n rgba(255, 255, 255, 0.278) 28.3%,\n rgba(255, 255, 255, 0.194) 32.5%,\n rgba(255, 255, 255, 0.126) 36.5%,\n rgba(255, 255, 255, 0.075) 40.1%,\n rgba(255, 255, 255, 0.042) 43.1%,\n rgba(255, 255, 255, 0.021) 45.5%,\n rgba(255, 255, 255, 0.008) 46.3%,\n rgba(255, 255, 255, 0.002) 49.3%,\n rgba(255, 255, 255, 0) 50%,\n rgba(255, 255, 255, 0.002) 50.7%,\n rgba(255, 255, 255, 0.008) 53.7%,\n rgba(255, 255, 255, 0.021) 54.5%,\n rgba(255, 255, 255, 0.042) 59.9%,\n rgba(255, 255, 255, 0.075) 61.7%,\n rgba(255, 255, 255, 0.126) 63.5%,\n rgba(255, 255, 255, 0.194) 67.5%,\n rgba(255, 255, 255, 0.278) 71.7%,\n rgba(255, 255, 255, 0.382) 76.5%,\n rgba(255, 255, 255, 0.541) 83%,\n rgba(255, 255, 255, 0.738) 90.5%,\n rgba(255, 255, 255, 1) 100%\n )\n",vt,e=>{let{$opacity:t}=e;return t}),wt=.3;function xt(e){let{loading:t,children:n,opacity:i=.6}=e;const[a,s]=(0,r.useState)(!t);return(0,r.useEffect)(()=>{a||t||setTimeout(()=>s(!0),1e3*wt)},[a,t]),a?null:o().createElement(yt,{$finished:!t,$hideTransitionLength:wt,$opacity:i},o().createElement("div",null),o().createElement("div",null),o().createElement("div",null,n))}const Et={link:o().createElement(ot,{size:20}),dialogue_trigger:o().createElement(Le,null)};function kt(e){var t,n,i,a;let{image:s,first:d,isCarousel:p,fromBot:f,inView:h,imageWidth:m,imageHeight:g,loading:b}=e;const[v,y]=Re(),w=(0,c.wA)(),{chatMessages:x}=(0,c.d4)(u.DZ)||[],E=(0,c.d4)(u.$P)||[],[k,A]=(0,r.useState)(!1),_=(0,r.useRef)(null),C=m===l.T5[600],S=e=>t=>{const n=x.map(je.A),r=n[n.length-1];(0,Ie.fz)({event:t,button:(0,Pe.A)(e),buttonType:e.button_type,chatLog:n,lastMessage:r,renderedBy:null==E?void 0:E.renderedBy})||(w((0,G.Bd)(e,r)),"link"===e.button_type&&setTimeout(()=>window.open(e.value,"_blank"),500))},T=Boolean((null===(t=s.title)||void 0===t?void 0:t.trim())||(null===(n=s.description)||void 0===n?void 0:n.trim())),I=null!=s&&s.newTab?"_blank":"_self",O=s.buttons||[],L=s.description&&(null===(i=s.description)||void 0===i?void 0:i.length)>100?s.description.slice(0,100).concat("..."):s.description;return(0,r.useEffect)(()=>{var e,t;k&&(null===(e=_.current)||void 0===e||e.close(),null===(t=_.current)||void 0===t||t.showModal())},[k]),o().createElement(o().Fragment,null,k&&(0,Te.createPortal)(o().createElement($e,{onClick:()=>A(!1),ref:_},o().createElement(Me,{onClick:()=>A(!1),autoFocus:!0},o().createElement(Oe.US,{width:"30",height:"30"})),o().createElement(Ne,{src:s.imageUrl})),((null===(a=window.kindlyChat)||void 0===a?void 0:a.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"),s.linkUrl?o().createElement(We,{$imageWidth:m,$imageHeight:g,hidden:!y,href:s.linkUrl,target:I,$isCarousel:p},o().createElement(Ke,{src:s.imageUrl,alt:s.altText,tabIndex:0,$carousel:p,$fromBot:f,$imageWidth:m,$imageHeight:g}),s.linkUrl&&o().createElement(nt,null),s.linkUrl&&o().createElement(rt,{width:16,height:16})):o().createElement(qe,{$imageWidth:m,$imageHeight:g,hidden:!y,$isCarousel:p},o().createElement(Ke,{src:s.imageUrl,alt:s.altText,tabIndex:-1,$carousel:p,$fromBot:f,$imageWidth:m,$imageHeight:g})),!b&&o().createElement(it,{"data-testid":"enlarge-image-button","aria-label":"Enlarge image",onClick:()=>A(!0),$inView:h}),!b&&o().createElement(at,null),!y&&o().createElement(bt,{imageWidth:m,imageHeight:g,hasCaption:T}),T&&o().createElement(Ye,null,s.title&&o().createElement(Xe,{$imageWidth:m,$imageHeight:g},s.title),L&&o().createElement(Ze,{$imageWidth:m,$imageHeight:g},L)),!C&&O.map(e=>o().createElement(Je,{key:e.id,title:e.label,onClick:S(e),$inView:h},o().createElement("span",null,e.label),Et[e.button_type]))))}var At=n(9687),_t=n(7542);const Ct=e=>{let{fromUser:t,$hasError:n,theme:r}=e;return n?a.Tj.grayColor:t?r.userMessageBackground:r.botMessageBackground},St=i.Ay.div.withConfig({componentId:"sc-3i0o6s-0"})(["position:relative;text-align:center;cursor:pointer;text-transform:none;width:80%;max-width:calc(80% - 25px);border-radius:17px;font-weight:500;border:none;padding:",";font-family:",";font-size:var(--_kindlychat-font-size-p);background:",";background-color:",";transition:opacity 0.2s ease-out;margin:8px 0 2px 25px;display:block;a,span{display:block;color:",";text-decoration:none;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;z-index:2;}& > svg:first-child{position:absolute;top:-7px;left:-4px;width:15px;path{opacity:",";transition:opacity 0.2s ease-out;}}& > svg:not(:first-child){width:20px;}"],e=>{let{$hasError:t}=e;return t?"7px 12px 4px":"8px 12px"},_t.m.default,Ct,Ct,e=>{let{fromUser:t,theme:n}=e;return(0,he.w5)(t?n.userMessageBackground:n.botMessageBackground,"#FFFFFF","#000000")},e=>{let{$loading:t}=e;return t?.5:1}),Tt=i.Ay.div.withConfig({componentId:"sc-3i0o6s-1"})(["width:20px;height:20px;left:-10px;bottom:5px;position:absolute;border-radius:100px;background:",";background-color:",";background-position:center center;background-repeat:no-repeat;background-size:cover;"],e=>e.theme.headerBackground,e=>e.theme.headerBackground),It=i.Ay.div.withConfig({componentId:"sc-3i0o6s-2"})(["width:175px;height:175px;position:relative;display:flex;justify-content:center;margin-bottom:4px;background:",";border-radius:15px;svg{width:24px;z-index:2;}"],a.Tj.grayColor),Ot=i.Ay.div.withConfig({componentId:"sc-3i0o6s-3"})(["display:flex;justify-content:",";"],e=>{let{fromUser:t}=e;return t?"flex-end":"flex-start"});function Lt(e){let{avatar:t}=e;const n=t?{backgroundImage:`url(${t})`}:{};return t?o().createElement(Tt,{style:n}):null}var Mt=n(4660);const $t=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,Mt.l)(e,n,t)},Nt="\n background: black;\n border-radius: 15px;\n",Rt=i.Ay.iframe.withConfig({componentId:"sc-6x850n-0"})(["",""],Nt),Pt=i.Ay.video.withConfig({componentId:"sc-6x850n-1"})(["",""],Nt);function jt(e){var t;let{source:n,type:r}=e;const i=null===(t=n.split(".").pop())||void 0===t?void 0:t.toLowerCase();return o().createElement(Pt,{width:"240",controls:!0,"data-chromatic":"ignore"},o().createElement("source",{src:n,type:r||`video/${i}`}),"Your browser does not support HTML5 video.")}function Dt(e){var t;let{attachment:n,avatar:r,chatMessageStatus:i}=e;const a=n.sender===l.bS.USER,s=(0,At.A)(n),c=s===l.sl.IMAGE,u=s===l.sl.VIDEO,d=Boolean(i)||n.status===l.Le.ERROR||n.status===l.Le.INFECTED,p=$t(n),f=!p,h={imageUrl:null!=p?p:"",altText:`Image ${n.name||`from ${null!==(t=null==n?void 0:n.sender)&&void 0!==t?t:"agent"}`}`};return c?o().createElement(Ot,{fromUser:a},o().createElement(Lt,{avatar:r}),!d&&!f&&o().createElement(kt,{image:h,fromBot:!a,isCarousel:!1,imageWidth:"250",inView:!0,first:!1,loading:n.status===l.Le.PROCESSING}),!d&&f&&o().createElement(It,{isImage:c},o().createElement(Se,null),o().createElement(xt,{loading:!0})),d&&o().createElement(It,null,o().createElement(Ce,null))):u?o().createElement(Ot,{fromUser:a},o().createElement(Lt,{avatar:r}),!d&&!f&&o().createElement(jt,{source:p,type:n.type}),!d&&f&&o().createElement(It,null,o().createElement(Se,null),o().createElement(xt,{loading:!0})),d&&o().createElement(It,null,o().createElement(Ce,null))):o().createElement(Ot,{fromUser:a},o().createElement(Lt,{avatar:r}),o().createElement(St,{fromUser:a,$loading:f,$hasError:d},o().createElement(_e.A,{height:10}),o().createElement(xt,{loading:!d&&f,opacity:.35}),!d&&!f&&o().createElement("a",{href:p,target:"_blank",rel:"noopener noreferrer"},n.name,o().createElement(P,null)),!d&&f&&o().createElement("span",null,"Uploading"),d&&o().createElement(Ce,null)))}var zt=n(958),Ft=n(896),Bt=n(112);const Ht=140;function Ut(e){let{chatMessage:t,imageCarousel:n}=e;const[i,a]=(0,r.useState)(0),[s,c]=(0,r.useState)(0),u=l.T5[t.image_carousel_size||1e3],[d,p]=(0,r.useState)(Ht.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===l.T5[800]?102:u===l.T5[600]?96:30,[u]),h=e=>u===l.T5[600]&&i===e-1||i===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),a(e),c(n)},[u,f]),{handleTouchStart:g,handleTouchMove:b,handleTouchEnd:v}=(0,Ft.A)({carousel:n,index:i,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(Bt.A,{carouselPosition:s,onTouchStart:g,onTouchMove:b,onTouchEnd:v},n.map((e,r)=>o().createElement(kt,{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:i<=0,"aria-label":"Go to previous image",onClick:()=>m(i-1,n)}),o().createElement(et,{disabled:i<=0}),o().createElement(Qe,{$next:!0,$disabled:i>=n.length-1,"aria-label":"Go to next image",onClick:()=>m(i+1,n)}),o().createElement(tt,{disabled:i>=n.length-1}))}var Vt=n(7182);const Gt=i.Ay.button.withConfig({componentId:"sc-1upnaey-0"})(["display:block;background:none;background-color:transparent;border:none;text-decoration:underline;font-weight:600;font-size:var(--_kindlychat-font-size-p);color:",";cursor:pointer;padding:0;",""],e=>{let{theme:t}=e;return(0,he.w5)(t.userMessageBackground,"#FFFFFF","#000000")},N.sF);function Wt(e){let{button:t}=e;const n=(0,Vt.jL)();return o().createElement(Gt,{onClick:()=>n((0,G.V$)(t))},t.contact_details.edit_text)}var qt=n(6831);const Kt=(0,i.i7)(["0%{opacity:0;transform:translateY(6px);}60%{transform:translateY(-2px);}100%{opacity:1;transform:translateY(0);}"]),Yt=(0,i.i7)(["0%{-webkit-font-smoothing:subpixel-antialiased;opacity:0;transform:scale(0.76);}35%{-webkit-font-smoothing:subpixel-antialiased;opacity:1;transform:scale(1.08);}75%{-webkit-font-smoothing:subpixel-antialiased;opacity:1;transform:scale(1.08);}100%{-webkit-font-smoothing:subpixel-antialiased;opacity:1;transform:scale(1);}"]),Xt=(0,i.AH)(["",";text-rendering:optimizeLegibility;animation-name:",";"],e=>{let{$isSystemMessage:t}=e;return(0,W.qL)(t?1200:600)},e=>{let{$isSystemMessage:t}=e;return t?Yt:Kt}),Zt=i.Ay.div.withConfig({componentId:"sc-1d179v9-0"})(["display:block;width:100%;"]),Jt=i.Ay.div.withConfig({componentId:"sc-1d179v9-1"})(["display:flex;flex-direction:column;",";",";"," @media (prefers-reduced-motion){animation:none;}"],Xt,e=>!e.$fromBot&&"display: block; ",e=>e.$hasSiblings&&"margin-bottom: 8px;"),Qt=i.Ay.div.withConfig({componentId:"sc-1d179v9-2"})(["display:flex;flex-direction:column;",";"," sup{position:relative;vertical-align:top;top:-0.3em;font-size:0.7em;}sup + sup{margin-left:0.2em;}"],e=>{let{$fromBot:t}=e;return t?"align-items: flex-start":"align-items: flex-end"},e=>e.$hasSiblings&&"margin-bottom: 8px;"),en=i.Ay.div.withConfig({componentId:"sc-1d179v9-3"})(["display:inline-flex;"," max-width:100%;flex-direction:",";"," margin-bottom:6px;flex-wrap:wrap;gap:6px;",";@media (prefers-reduced-motion){animation:none;}"],e=>{let{$orientation:t}=e;return t===l.Ii.VERTICAL&&"width: 240px;"},e=>{let{$orientation:t}=e;return t===l.Ii.HORIZONTAL?"row":"column"},e=>{let{$nextMessageType:t}=e;return t===l.bS.SYSTEM&&"margin-bottom: 16px;"},Xt),tn=(0,i.AH)(["white-space:pre-wrap;color:",";background:",";&:where(",":first-of-type:not(:only-of-type) &){border-radius:16px 16px 0px 16px;}&:where(",":last-of-type:not(:only-of-type) &){border-radius:16px 0px 16px 16px;}&:where(",":not(:first-of-type):not(:last-of-type) &){border-radius:16px 0px 0px 16px;}&:where(",":only-of-type &){border-radius:16px;}"],e=>{let{theme:t}=e;return(0,he.w5)(t.userMessageBackground,"#FFFFFF","#000000")},e=>e.theme.userMessageBackground,Zt,Zt,Zt,Zt),nn=(0,i.AH)(["color:",";background:",";&:first-child:not(:only-child){border-radius:16px 16px 16px 0px;}&:last-child:not(:only-child){border-radius:0px 16px 16px 16px;}&:not(:first-child):not(:last-child){border-radius:0px 16px 16px 0px;}&:only-child{border-radius:16px;}"],e=>{let{theme:t}=e;return(0,he.w5)(t.botMessageBackground,"#FFFFFF","#000000")},e=>{let{theme:t}=e;return t.botMessageBackground}),rn=(0,i.AH)(["margin-left:25px;white-space:pre-wrap;"]),on=(0,i.AH)(["position:relative;display:inline-block;max-width:240px;min-width:32px;margin:1px 0px;padding-top:10px;padding-bottom:10px;border:0;border-radius:16px;font-size:var(--_kindlychat-font-size-p);line-height:18px;word-break:normal;overflow-wrap:anywhere;"," "," "," "," p{all:unset;}a{color:inherit;&:hover{background-color:color-mix(in srgb,currentColor 15%,transparent);}}pre{white-space:pre-wrap;}"],e=>e.$clickable&&"cursor: pointer;",e=>e.$fromBot?nn:tn,e=>e.$fromAgent&&rn,N.sF),an=i.Ay.div.withConfig({componentId:"sc-4agunw-0"})(["",""],on),sn=i.Ay.a.withConfig({componentId:"sc-4agunw-1"})(["text-decoration:none;",""],on),ln=i.Ay.div.withConfig({componentId:"sc-4agunw-2"})(["--padding-base:15px;padding-left:var(--padding-base);padding-right:var(--padding-base);& a{text-decoration:underline;}& ol,& ul{padding-left:calc(var(--padding-base) + 4px);}"]),cn=i.Ay.hr.withConfig({componentId:"sc-4agunw-3"})(["border:0;height:1px;background:",";margin-top:8px;margin-bottom:4px;"],e=>{let{theme:t}=e;return(0,he.w5)(t.background,"#636472","#dfe0e3")}),un=i.Ay.div.withConfig({componentId:"sc-4agunw-4"})(["width:20px;height:20px;left:-35px;bottom:0;position:absolute;border-radius:100px;background:",";background-color:",";background-position:center center;background-repeat:no-repeat;background-size:cover;"],e=>e.theme.headerBackground,e=>e.theme.headerBackground);var dn=n(4311);const pn=i.Ay.div.withConfig({componentId:"sc-1hjf3xk-0"})(["font-size:var(--_kindlychat-font-size-sm);margin-top:4px;margin-bottom:5px;"]),fn=i.Ay.div.withConfig({componentId:"sc-1hjf3xk-1"})(["display:flex;flex-wrap:wrap;gap:6px;overflow:hidden;padding:2px;font-size:var(--_kindlychat-font-size-sm);"]),hn=i.Ay.a.withConfig({componentId:"sc-1hjf3xk-2"})(["align-items:center;border-radius:4px;color:inherit;display:inline-flex;line-height:16px;outline:1px solid ",";overflow:hidden;padding:1px 3px;text-decoration:none !important;text-overflow:ellipsis;white-space:nowrap;transition:all 0.2s ease-in-out;&:focus{outline:medium auto currentColor;outline:5px auto -webkit-focus-ring-color;}&:hover{outline-width:2px;box-shadow:0 2px 4px 0 rgba(0,0,0,0.08);background-color:#f2f2f233;}svg{margin-left:4px;height:11px;width:11px;}"],e=>{let{theme:t}=e;return(0,he.w5)(t.background,"#F2F2F233","#0D0D0D33")}),mn=i.Ay.span.withConfig({componentId:"sc-1hjf3xk-3"})(["max-width:100%;overflow:hidden;text-overflow:ellipsis;margin-left:3px;"]),gn=i.Ay.sup.withConfig({componentId:"sc-1hjf3xk-4"})(["font-size:0.7em;bottom:0.33em;position:relative;"]);function bn(e){let{references:t,onReferenceClick:n}=e;const{reference_list_title:r,read_more_text:i}=(0,dn.A)(),a=t.map(e=>e.url),s=e=>{n(e.currentTarget.href)};return o().createElement(o().Fragment,null,o().createElement(pn,null,r),o().createElement(fn,null,a.map((e,t)=>o().createElement(hn,{key:e,href:e,target:"_blank",rel:"noopener noreferrer",onClick:s},o().createElement(gn,null,t+1),o().createElement(mn,null,i),o().createElement(Oe.Gr,null),o().createElement(P,null)))))}const vn=[l.bS.WEBHOOK,l.bS.AGENT];function yn(e){let{children:t,chatMessage:n}=e;const{bot_id:r,exchange_id:i}=n,a="usersays"===n.exchange_type?"dialogue":n.exchange_type,s=`/workspace/${r}/build/${null==a?void 0:a.replace("_","-")}/${i}`;return o().createElement(sn,{$fromBot:n.from_bot,$clickable:!0,role:"link",tabIndex:0,href:s},t)}function wn(e){let{references:t,onReferenceClick:n}=e;return o().createElement(o().Fragment,null,o().createElement(cn,null),o().createElement(ln,null,o().createElement(bn,{references:t,onReferenceClick:n})))}function xn(e){var t;let{chatMessage:n,editContactDetailsButton:r,lineIndex:i,messageLine:a,numLines:s,preface:d,references:p=[]}=e;const f=(0,c.wA)(),{inPlatform:h}=(0,c.d4)(u.$P),{isTextDirectionRtl:m}=(0,c.d4)(u.Od),g=m?"rtl":void 0,b=h&&n.from_bot&&n.exchange_type&&!_()(t=vn).call(t,n.sender),v=p.length>0,y=n.sender===l.bS.AGENT,w=i===s-1,x=n.from_bot,E=o().createElement("p",null,o().createElement("strong",null,d)),k=e=>{f((0,G.qJ)({url:e,messageId:n.id}))};return b?o().createElement(yn,{chatMessage:n},d&&E,o().createElement(ln,null,x?(0,qt.A)(a):a),w&&v&&o().createElement(wn,{references:p,onReferenceClick:k})):o().createElement(an,{dir:g,$fromAgent:y,$fromBot:x},o().createElement(ln,null,d&&E,y&&o().createElement(un,{style:{backgroundImage:`url(${n.avatar})`}}),x?(0,qt.A)(a):a,w&&r&&o().createElement(Wt,{button:r})),w&&v&&o().createElement(wn,{references:p,onReferenceClick:k}))}const En=i.Ay.div.withConfig({componentId:"sc-285zcy-0"})(["display:flex;white-space:nowrap;font-size:var(--_kindlychat-font-size-sm);color:red;justify-content:flex-end;margin-bottom:2px;"]),kn=i.Ay.div.withConfig({componentId:"sc-285zcy-1"})(["display:flex;"]),An=i.Ay.button.withConfig({componentId:"sc-285zcy-2"})(["display:block;white-space:nowrap;font-size:var(--_kindlychat-font-size-sm);color:",";text-decoration:underline;background:none;border:none;padding:0;margin-bottom:2px;margin-left:4px;cursor:pointer;",""],a.Tj.darkColor,N.sF);function _n(e){let{chatMessage:t,attachments:n}=e;const i=(0,Vt.jL)(),a=Boolean(t.message),s=(null==n?void 0:n.length)>0,l=(0,r.useCallback)(()=>{a&&i((0,G.tM)(t.message,t.id))},[t,i,a]),c=(0,r.useCallback)(()=>{a?i((0,G.aP)(t.message,t.id)):s&&i((0,G.zX)())},[t,i,s,a]);return t.status>=500?o().createElement(En,null,s?"Upload failed":"Message not delivered"," ",o().createElement(kn,null,!s&&o().createElement(o().Fragment,null,o().createElement(An,{onClick:l},"Try again"),o().createElement(An,{onClick:c},"Restart chat")))):429===t.status?o().createElement(En,null,"Too many messages, please slow down."," ",o().createElement(kn,null,o().createElement(An,{onClick:l},"Try again"))):o().createElement(En,null,"An error occurred. ",o().createElement(An,{onClick:c},"Restart chat"))}var Cn=n(8410);function Sn(e){let{source:t}=e;const n=t.match(/^(?:https?:\/\/)?(www\.)?vimeo.com\/(\d+)($|\/)/);return n?o().createElement(Rt,{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}const Tn=e=>e.replace("?t=","?start=").replace("&t=","&start="),In=e=>{const t=e.toLowerCase();let n=e;return _()(t).call(t,"youtube.com")?(n=e.replace("&","?"),n=Tn(n),n.split("v=")[1]):_()(t).call(t,"youtu.be")?(n=Tn(e),n.split("youtu.be/")[1]):n};function On(e){let{source:t}=e;const n=In(t);return o().createElement(Rt,{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"})}function Ln(e){let{source:t}=e;return _()(t).call(t,"youtube.com")||_()(t).call(t,"youtu.be")?o().createElement(On,{source:t}):_()(t).call(t,"vimeo.com")?o().createElement(Sn,{source:t}):o().createElement(jt,{source:t})}const Mn=e=>{let{root:t=null,threshold:n=1,onChange:o,skip:i=!1}=e;const[a,s]=(0,r.useState)(null),l=(0,r.useRef)(null);return(0,r.useEffect)(()=>{if(i)return;l.current&&l.current.disconnect(),l.current=new IntersectionObserver(o,{root:t,threshold:n});const{current:e}=l;return a&&e.observe(a),()=>e.disconnect()},[a,t,o,i,n]),s};function $n(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 i=r+t,a=`<sup>${o}</sup>`;n.splice(i,0,...Array.from(a)),r+=a.length}),n.join("")}var Nn=n(3603),Rn=n(3699),Pn=n(1435),jn=n(9910),Dn=n(3950),zn=n(4711),Fn=n(4851),Bn=n(2552),Hn=n(5173),Un=n(4490);const Vn=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:i}}=o(),{PAT_HOST:a}=o().environment,{headers:s}=(0,Fn.A)({token:i},{withCurrentUrl:!0}),c={submission_id:e,context:t,state:n};return r((0,G.et)(`${a}/chatbubble/${l.Ak}/form/submit`,{method:"POST",body:c,headers:s}))}},Gn=e=>({...e,temporaryId:`tempId-${(0,zn.A)()}`});var Wn=n(3435),qn=n(881),Kn=n(9272),Yn=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}(Yn||{});const Xn=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!==Yn.SELECT||null!==(r=e.attributes)&&void 0!==r&&r.default_value||(n[e.slug]="")}),n},Zn=e=>{let t=0;return e.fields.forEach(e=>{var n,r;if(e.input_type===Kn.cJ.RANGE)t+=92;else if(e.input_type===Kn.cJ.SELECT)t+=51;else if(e.input_type===Kn.cJ.FILE)t+=113;else if(e.input_type===Kn.cJ.CHECKBOX||e.input_type===Kn.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 Jn=n(5814);const Qn=i.Ay.div.withConfig({componentId:"sc-1sb6ll-0"})(["display:flex;flex-direction:column;"]),er=i.Ay.div.withConfig({componentId:"sc-1sb6ll-1"})(["font-size:var(--_kindlychat-font-size-p);font-weight:500;margin-top:16px;color:var(--panel-background-white-black-contrast-1743170834);"]),tr=i.Ay.div.withConfig({componentId:"sc-1sb6ll-2"})(["display:flex;flex-direction:column;"]),nr=i.Ay.div.withConfig({componentId:"sc-1sb6ll-3"})(["display:flex;flex-direction:column;margin-top:16px;color:var(--panel-background-white-black-contrast-1743170834);"]),rr=i.Ay.div.withConfig({componentId:"sc-1sb6ll-4"})(["font-size:var(--_kindlychat-font-size-p);"]),or=i.Ay.div.withConfig({componentId:"sc-1sb6ll-5"})(["font-weight:500;margin-top:4px;font-size:var(--_kindlychat-font-size-p);display:flex;align-items:flex-start;"]),ir=i.Ay.div.withConfig({componentId:"sc-1sb6ll-6"})(["padding:",";"],e=>{let{$affix:t}=e;return"PREFIX"===t?"0 6px 0 0":"0 0 0 6px"}),ar=i.Ay.div.withConfig({componentId:"sc-1sb6ll-7"})(["margin-top:8px;"]),sr=i.Ay.div.withConfig({componentId:"sc-1sb6ll-8"})(["display:flex;flex-direction:column;"]),lr=i.Ay.div.withConfig({componentId:"sc-1sb6ll-9"})(["flex:1;"]);var cr=n(8043);function ur(e){return function(t,n){return t===e&&n?o().createElement(ir,{$affix:t},n):null}}const dr=ur("PREFIX"),pr=ur("SUFFIX"),fr=function(e){let{state:t,message:n,data:r=[]}=e;return o().createElement(Qn,null,t!==Kn.KN.SUBMITTED&&n&&o().createElement(er,null,n),t===Kn.KN.SUBMITTED&&r.length>0&&o().createElement(tr,null,r.map(e=>e.value?o().createElement(nr,{key:e.name},o().createElement(rr,null,e.label),o().createElement(or,null,dr(e.affix,e.affixValue),function(e){return e.type===Kn.cJ.FILE&&e.files?o().createElement(lr,null,e.files.map(t=>o().createElement(cr.A,{key:`${t.name}-${e.type}-${t.size}`,file:t,canRemove:!1}))):Array.isArray(e.value)?o().createElement(sr,null,e.value.map(e=>o().createElement(ar,{key:e.name},e.label))):e.value}(e),pr(e.affix,e.affixValue))):null)))};function hr(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 mr=n(5545);const gr=o().lazy(()=>Promise.resolve().then(n.bind(n,5518))),br=e=>"object"==typeof e&&e.length&&e.every(e=>"[object File]"===Object.prototype.toString.call(e)),vr=function(e){var t,n,i,a,s,d,p,f,h;let{chatMessageId:m,formData:g,onSubmit:b,onCancel:v}=e;const y=(0,c.wA)(),w=(0,c.d4)(u.uO),{text:x}=(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:A}=(0,pe.A)();(0,r.useEffect)(()=>{var e,t,n;null==g||!g.id||null!=w&&w[E]?(null==w||null===(e=w[E])||void 0===e?void 0:e.formSubmitState)!==Kn.KN.UNANSWERED||null!=w&&null!==(t=w[E])&&void 0!==t&&t.formCompleteMessage||!g.texts.unanswered_text||y((0,G.Bu)({...w[E],formCompleteMessage:g.texts.unanswered_text})):y((0,G.Bu)({formId:g.id,formSubmissionId:g.submission_id,formSubmitState:Kn.KN.ACTIVE,formCompleteMessage:"",formKey:E,formValue:(null==w||null===(n=w[E])||void 0===n?void 0:n.formValue)||g.fields.reduce((e,t)=>({...e,[`${t.slug}`]:""}),{})}))},[y,g,A,w,E]);const C=(0,r.useCallback)(e=>{var t,n,r,o,i;return e.input_type===Kn.cJ.SELECT?(null===(r=e.attributes.options.find(t=>{var n,r;return t.value===(null==w||null===(n=w[E])||void 0===n||null===(r=n.formValue)||void 0===r?void 0:r[e.slug])}))||void 0===r?void 0:r.label)||(null==w||null===(o=w[E])||void 0===o||null===(i=o.formValue)||void 0===i?void 0:i[e.slug]):null==w||null===(t=w[E])||void 0===t||null===(n=t.formValue)||void 0===n?void 0:n[e.slug]},[E,w]);return o().createElement(qn._H,null,(null===(t=g.texts)||void 0===t?void 0:t.title)&&o().createElement(qn.zE,null,o().createElement(hr,{width:20,height:20})," ",null===(n=g.texts)||void 0===n?void 0:n.title),(null==w||null===(i=w[E])||void 0===i?void 0:i.formSubmitState)&&(null==w||null===(a=w[E])||void 0===a?void 0:a.formSubmitState)!==Kn.KN.ACTIVE&&o().createElement(fr,{state:w[E].formSubmitState,message:w[E].formCompleteMessage,data:(()=>{var e,t;if(null!=g&&g.fields&&(null==w||null===(e=w[E])||void 0===e?void 0:e.formSubmitState)===Kn.KN.SUBMITTED&&null!=w&&null!==(t=w[E])&&void 0!==t&&t.formValue)return g.fields.reduce((e,t)=>{var n,r,o,i,a;return t.input_type!==Kn.cJ.CHECKBOX&&t.input_type!==Kn.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:C(t),files:null==w||null===(o=w[E])||void 0===o||null===(i=o.formFiles)||void 0===i?void 0:i[t.slug]}]:[...e,{name:`${t.input_type===Kn.cJ.CHECKBOX?"checkbox":"radio"}_list_${t.slug}`,label:null===(a=t.texts)||void 0===a?void 0:a.label,value:t.attributes.options.reduce((e,n)=>{var r,o;const i=null==w||null===(r=w[E])||void 0===r||null===(o=r.formValue)||void 0===o?void 0:o[t.slug];return(null==i?void 0:i.length)>0&&_()(i).call(i,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(mr.A,{minHeight:Zn(g)})},(!(null!=w&&w[E])||(null==w||null===(s=w[E])||void 0===s?void 0:s.formSubmitState)===Kn.KN.ACTIVE)&&o().createElement(gr,{onCancel:async e=>{var t;return v&&v(e),await y(Vn(g.submission_id,null==w?void 0:w[E].formValue,Kn.KN.CANCELED)),await y((0,G.zh)(g.cancel_dialogue_id,{languageCode:A})),y((0,G.Bu)({formKey:E,formId:g.id,formSubmitState:Kn.KN.CANCELED,formCompleteMessage:null===(t=g.texts)||void 0===t?void 0:t.cancel_text,formValue:e}))},defaultValues:Xn(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=>{br(e[n])&&(t[n]=e[n])}),t}(n),o=Object.values(n).filter(e=>br(e)).map(e=>Array.isArray(e)&&e.length?e.flat():e).flat();if(o.length){let e=!1;const a=()=>{e=!0},s=await Promise.all(o.map(e=>(0,Rn.TA)(e))),c=await y((e=>{let{chatMessageId:t,files:n,onError:r}=e;return async(e,o)=>{var i;const{bot:{id:a},chatbubble:{chatId:s},connection:{token:c},environment:{PAT_HOST:u}}=o(),d=await e((0,G.z5)()),{headers:p}=(0,Fn.A)({token:c},{extra:d}),f=n.map(Gn).map((0,Bn.A)("file")),h=f.map((0,Bn.A)("url")),m=`${u}/chatbubble/${l.Ak}/attachment/create`,g={attachments:h},b=await e((0,G.et)(m,{method:"POST",body:g,headers:p}));if((0,Hn.A)(b)||!Array.isArray(null==b||null===(i=b.data)||void 0===i?void 0:i.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,w]=v.reduce((e,t)=>{let[n,r]=e,{id:o,upload_url:i}=t;return[[...n,o],[...r,i]]},[[],[]]),x={"x-goog-upload-bot-id":a,"x-goog-upload-chat-id":s},E=(0,Un.A)(n,w).map(async t=>{let[{file:n},r]=t;const o=await(0,Rn.Bu)(n),i={...x,"Content-Type":n.type};return await e((0,G.et)(r,{method:"PUT",body:o,headers:i},{onError:e=>new Error(e)}))});if((await Promise.all(E)).some(Hn.A))return r(new Error("Failed to upload")),[];const k=`${u}/chatbubble/${l.Ak}/attachment/uploads-complete`,A={attachmentIds:y,chatMessageId:t,exchangeId:h[0].exchangeId};return await e((0,G.et)(k,{method:"POST",body:A,headers:p},{onError:()=>r(new Error("Failed to upload"))})),y}})({chatMessageId:m,files:s,onError:a}));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,i]=e;n[o]=i.map((e,n)=>t[r+n]).join(","),r+=i.length}),n}(r,c);n={...n,...e}}catch(e){a()}if(e){var i;if(k>=3)return y((0,G.Bu)({formKey:E,formId:g.id,formSubmitState:Kn.KN.ERRORED,formCompleteMessage:null===(i=g.texts)||void 0===i?void 0:i.error_text,formValue:n}));const e=Object.keys(r);return e.length&&e.forEach(e=>{var n;t(e,{type:"custom",message:null===(n=x.upload_file_failed)||void 0===n?void 0:n[A]})}),void(k+=1)}}var a;return null===await y(Vn(g.submission_id,n))?y((0,G.Bu)({formKey:E,formId:g.id,formSubmitState:Kn.KN.ERRORED,formCompleteMessage:null===(a=g.texts)||void 0===a?void 0:a.error_text,formValue:n})):(await y((0,G.zh)(g.submit_dialogue_id,{languageCode:A})),y((0,G.Bu)({formKey:E,formId:g.id,formSubmitState:Kn.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,i;return o().createElement(Wn.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===(i=e.texts)||void 0===i?void 0:i.label},(e=>{var t,n,r,i,a,s,l,c;if(e)switch(e.input_type){case Kn.cJ.CHECKBOX:case Kn.cJ.RADIO:return o().createElement(jn.A,{name:e.slug,inputType:e.input_type,options:null===(t=e.attributes)||void 0===t?void 0:t.options,validators:(0,Jn.Bq)(e)});case Kn.cJ.RANGE:return o().createElement(Pn.Ap,{hasController:!0,value:parseFloat(null==w||null===(n=w[E])||void 0===n||null===(r=n.formValue)||void 0===r?void 0:r[e.slug])||(null===(i=e.attributes)||void 0===i?void 0:i.default_value)||e.step,name:e.slug,step:null===(a=e.attributes)||void 0===a?void 0:a.step,affix:e.affix,affixValue:null===(s=e.texts)||void 0===s?void 0:s.affix_value,validators:(0,Jn.Bq)(e),ariaLabel:null===(l=e.texts)||void 0===l?void 0:l.label});case Kn.cJ.SELECT:return o().createElement(Pn.l6,{options:null===(c=e.attributes)||void 0===c?void 0:c.options,placeholder:e.texts.placeholder_text,validators:(0,Jn.Bq)(e),name:e.slug});case Kn.cJ.FILE:return o().createElement(Pn.ZH,{label:e.texts.placeholder_text,validators:(0,Jn.Bq)(e),name:e.slug});case Kn.cJ.TEXTAREA:return o().createElement(Dn.A,{placeholder:e.texts.placeholder_text,validators:(0,Jn.Bq)(e),name:e.slug});default:return o().createElement(Pn.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,Jn.Bq)(e),name:e.slug})}return null})(e))}))))},yr=e=>e,wr=e=>{let{button_type:t}=e;return t===l.lP.edit_contact_details?"editContactDetails":"regularButtons"},xr=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},Er=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 kr(e){var t,n,i,a,s;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),w=d.sender?d.sender===l.bS.USER:!d.from_bot,x=Er(d.message_references),E=d.from_bot&&d.handler!==l.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 i,a,s,l;e.nextSibling===r[o+1]&&(null===(i=r[o+1])||void 0===i?void 0:i.nextSibling)===r[o+2]&&(null===(a=e.parentNode)||void 0===a||a.insertBefore(n.createTextNode(t),e),e.remove(),null===(s=r[o+1])||void 0===s||s.remove(),null===(l=r[o+2])||void 0===l||l.remove())}),n.body.innerHTML.split(t))}(d.message||"").flatMap(e=>e.split(/\n\s*\n/)).map(e=>e.trim()).filter(e=>""!==e):[$n(d.message||"",x)],{regularButtons:k,editContactDetails:A}=(0,r.useMemo)(()=>(0,Nn.A)(d.buttons,wr),[d.buttons]),_=(0,r.useMemo)(()=>{var e;return null==d||null===(e=d.buttons)||void 0===e?void 0:e.filter(e=>e.button_type===l.lP.CHECKBOX.toLowerCase()||e.button_type===l.lP.SLIDER.toLowerCase())},[d]),C=(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===l.lP.CHECKBOX.toLowerCase()),T=(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]),I=Mn({onChange:T,threshold:.95,skip:w}),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]),L=(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(xr(e))).filter(yr)]},[y,d.attachments,d.attachment_ids]),M=Boolean(d.message||(null==L?void 0:L.length)||(null===(n=d.buttons)||void 0===n?void 0:n.length)||(null===(i=d.image_carousel)||void 0===i?void 0:i.length));return o().createElement(Zt,{ref:I,"data-testid":l.fl},o().createElement(Jt,{$fromBot:d.from_bot,$hasSiblings:Boolean(S)},d.sender===l.bS.SYSTEM&&d.event_message&&o().createElement(Cn.Ay,{chatMessage:d}),o().createElement(Qt,{$fromBot:d.from_bot,$hasSiblings:Boolean(C)},E.map((e,t)=>e?o().createElement(xn,{key:`chatMessage-${t}`,chatMessage:d,messageLine:e,lineIndex:t,numLines:E.length,editContactDetailsButton:null==A?void 0:A[0],references:x}):null)),(null===(a=d.image_carousel)||void 0===a?void 0:a.length)>0&&o().createElement("div",null,o().createElement(Ut,{imageCarousel:d.image_carousel,chatMessage:d})),L.map(e=>o().createElement("div",{key:e.id},o().createElement(Dt,{attachment:e,avatar:d.avatar,chatMessageStatus:d.status}))),d.video_source&&o().createElement(Ln,{source:d.video_source}),(null===(s=d.form)||void 0===s?void 0:s.fields)&&o().createElement(vr,{chatMessageId:d.id,formData:d.form})),(null==k?void 0:k.length)>0&&o().createElement(en,{$orientation:d.buttons_display_orientation||l.Ii.VERTICAL,$nextMessageType:h},k.map(e=>o().createElement(zt.A,{key:e.id,button:e,chatMessage:d,handlers:p,checked:g,setCheckboxValue:O,submitButtonsList:_}))),M&&d.status&&o().createElement(_n,{chatMessage:d,attachments:L}))}var Ar=n(6290);function _r(e){e&&(e.scrollTop=e.scrollHeight,setTimeout(()=>{e.scrollTop=e.scrollHeight},1))}const Cr=(0,i.i7)(["0%{opacity:0;transform:translateY(8px);}50%{opacity:0;transform:translateY(8px);}80%{transform:translateY(-2px);}100%{opacity:1;transform:translateY(0);}"]),Sr=(0,i.AH)(["",";animation-name:",";"],(0,W.qL)(600),Cr),Tr=(0,i.i7)(["0%{opacity:1;transform:translateY(0px);}50%{opacity:1;transform:translateY(-6px);}80%{transform:translateY(2px);}100%{opacity:0;transform:translateY(2px);}"]),Ir=(0,i.AH)(["",";animation-name:",";"],(0,W.qL)(300),Tr),Or=i.Ay.div.withConfig({componentId:"sc-2gibmd-0"})(["position:absolute;z-index:3;bottom:70px;left:50%;transform:translateX(-50%);transition:opacity 300ms ease 300ms;opacity:",";"],e=>e.$show?"1":"0"),Lr=i.Ay.button.withConfig({componentId:"sc-2gibmd-1"})(["opacity:0;border-radius:100px;color:#2c2c2c;background:",";background-color:",";border:1px solid ",";box-shadow:0 2px 4px 0 rgba(0,0,0,0.08);cursor:",";display:flex;align-items:center;justify-content:center;min-width:35px;max-width:205px;width:35px;height:35px;",";",";svg{path{stroke:",";}}"],e=>{let{theme:t}=e;return t.background},e=>{let{theme:t}=e;return t.background},e=>{let{theme:t}=e;return(0,he.w5)(t.background,"rgba(255,255,255, 0.08)","rgba(0,0,0, 0.08)")},e=>e.$show?"pointer":"default",e=>!e.$show&&(0,W.vW)(800),e=>e.$show?Sr:Ir,e=>{let{theme:t}=e;return(0,he.w5)(t.background,"#FFF","#000")}),Mr=600;function $r(e){let{bodyRef:t,isChatLooselyScrolledToBottom:n}=e;const[i,a]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{const e=setTimeout(()=>{n||a(!0)},Mr);return n&&a(!1),()=>clearTimeout(e)},[n]),o().createElement(Or,Object.assign({$show:i},!i&&{inert:""}),o().createElement(Lr,{$show:i,onClick:()=>{_r(t.current)},"aria-label":"Scroll to bottom of chat","data-testid":"chat-new-message"},o().createElement(Ar.A,null)))}var Nr=n(2194),Rr=n(6064);const Pr=i.Ay.div.withConfig({componentId:"sc-1h90lvz-0"})(["height:100%;"]),jr=i.Ay.div.withConfig({componentId:"sc-1h90lvz-1"})(["width:100%;min-width:100%;height:100%;padding:0 16px;overflow-y:",";overflow-x:hidden;background:",";background-color:",";overscroll-behavior:contain;scrollbar-gutter:stable;transition:opacity 0.3s ease;&[inert]{opacity:0.4;}",""],e=>{let{$isContentLongEnough:t}=e;return t?"auto":"hidden"},e=>e.theme.background,e=>e.theme.background,N.sF),Dr=i.Ay.div.withConfig({componentId:"sc-1h90lvz-2"})(["display:flex;max-width:",";margin:auto;gap:16px;flex-direction:column;justify-content:flex-end;"],a.mb.tablet),zr=i.Ay.div.withConfig({componentId:"sc-1h90lvz-3"})(["display:flex;flex-direction:row;color:",";font-size:var(--_kindlychat-font-size-sm);justify-content:center;margin-bottom:16px;"],e=>{let{theme:t}=e;return(0,he.w5)(t.background,"rgba(255, 255, 255, 0.6)","rgba(0, 0, 0, 0.6)")}),Fr=i.Ay.span.withConfig({componentId:"sc-1h90lvz-4"})(["font-weight:500;align-self:flex-start;"]),Br=i.Ay.span.withConfig({componentId:"sc-1h90lvz-5"})(["align-self:flex-start;"]),Hr=i.Ay.div.withConfig({componentId:"sc-1h90lvz-6"})(["display:inline-block;"]),Ur="filler-div-1741269268",Vr=(e,t)=>t.scrollHeight>=e.clientHeight,Gr=(e,t)=>{if(!e)return;const n=e.querySelectorAll("img"),r=e.querySelectorAll("video"),o=e.querySelectorAll("iframe");(n.length>0||r.length>0||o.length>0)&&setTimeout(t,50),n.forEach(e=>{e.complete||e.addEventListener("load",()=>{setTimeout(t,50)},{once:!0})}),r.forEach(e=>{const n=()=>setTimeout(t,50);if(e.readyState>=1)return void n();const r=()=>{n()};e.addEventListener("loadedmetadata",r,{once:!0}),e.addEventListener("loadeddata",r,{once:!0}),e.addEventListener("canplaythrough",r,{once:!0})}),o.forEach(e=>{e.addEventListener("load",()=>{setTimeout(t,50)},{once:!0})})},Wr=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"smooth";if(!e||!t)return;const r=()=>{const r=e.getBoundingClientRect(),o=t.getBoundingClientRect().top-r.top+e.scrollTop;e.scrollTo({top:o,behavior:n})};r(),Gr(t,r)},qr=function(){let e=0,t=null,n=null;const r=t=>{(e=>{_r(e)})(...t),e=Date.now()},o=function(){const o=Date.now()-e;null!==t&&(clearTimeout(t),t=null);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];o>=100||0===e?r(a):(n=a,t=setTimeout(()=>{n&&(r(n),n=null),t=null},100-o))};return o.cancel=()=>{null!==t&&(clearTimeout(t),t=null),n=null},o}();var Kr=n(7958);function Yr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!!e&&Math.abs(e.scrollHeight-e.scrollTop-e.clientHeight)<t+1}const Xr=30,Zr=100;var Jr=n(2720);const Qr=e=>{let t=null;const n=[],r=(e,t)=>!t||new Date(e.created).valueOf()-t>3e5;return e.forEach(e=>{(e=>{if(!t)return!1;const n=e.from_bot===t.from_bot,r=e.name===t.name,o=e.from_webhook===t.from_webhook,i=e.handler!==l.Gi.TRIGGER_DIALOGUE,a=!(e.sender===l.bS.SYSTEM&&t.sender===l.bS.SYSTEM);return n&&r&&o&&i&&a})(e)?n[n.length-1].messages.push(e):n.push({messages:[e],shouldShowTime:r(e,t&&new Date(t.created).valueOf())}),t=e}),n},eo=(e,t,n)=>{var r;const o=e||(null===(r=t.slice(-1)[0])||void 0===r?void 0:r.id);return!!n.find(e=>{let{id:t}=e;return o===t})};function to(e){let{bodyRef:t,buttonHandlers:n,inert:i}=e;const{currentLanguageCode:a}=(0,pe.A)(),[s,d]=(0,r.useState)(!0),{isTyping:p}=(0,c.d4)(u.MA),{isTyping:f,typingType:h,text:m,botName:g}=(0,c.d4)(u.Od),{currentMessageId:b,inspectorOpen:v}=(0,c.d4)(u.qV),{chatMessages:y}=(0,c.d4)(u.DZ)||[],w=Qr(y),x=(0,r.useRef)(null),E=function(e){let{bodyRef:t,bodyMessagesRef:n,setIsContentLongEnough:o}=e;const i=(0,r.useRef)(null),a=(0,r.useRef)(null),s=(0,r.useRef)(void 0),c=(0,r.useRef)(null),u=(0,r.useRef)(null),d=(0,r.useRef)(null),p=(0,r.useCallback)(e=>{if(!e||!n.current)return i.current&&(i.current.disconnect(),i.current=null),a.current&&(a.current.disconnect(),a.current=null),s.current&&(clearTimeout(s.current),s.current=void 0),c.current=null,u.current=null,d.current=null,void qr.cancel();t.current=e;const r=n.current,p=function(){let{shouldChangeImmediately:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=Vr(e,r);return null!==u.current&&u.current===n?null:(s.current&&(clearTimeout(s.current),s.current=void 0),n?(t?(o(!0),u.current=!0):s.current=setTimeout(()=>{o(!0),u.current=!0,requestAnimationFrame(()=>{Wr(e,c.current,"instant")})},1e3),!0):(o(!1),u.current=!1,!1))};p({shouldChangeImmediately:!0}),_r(e),Gr(r,()=>{p({shouldChangeImmediately:!0}),_r(e)}),i.current=new ResizeObserver(t=>{if(!t[0])return;const n=e.clientHeight,r=null!==d.current&&d.current!==n;d.current=n,r&&qr(e),!1===p({shouldChangeImmediately:!0})&&_r(e)}),i.current.observe(e),a.current=new MutationObserver(t=>{const n=t.flatMap(e=>Array.from(e.addedNodes).filter(e=>{var t,n,r;return e instanceof HTMLElement&&((null===(t=e.dataset)||void 0===t?void 0:t.testid)===l.fl||(null===(n=e.dataset)||void 0===n?void 0:n.testid)===l.dT||(null===(r=e.dataset)||void 0===r?void 0:r.testid)===l.gH)}));let r=!1;if(n.length>0&&(c.current=n[n.length-1],r=!0),!c.current||!r)return;const o=c.current;p({shouldChangeImmediately:!1}),setTimeout(()=>{Wr(e,o)},50)}),a.current.observe(r,{childList:!0,subtree:!0})},[n,t,o]);return p}({bodyRef:t,bodyMessagesRef:x,setIsContentLongEnough:d}),k=function(e){const[t,n]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(!e.current)return;let t=!1;const r=e.current,o=()=>{const e=Yr(r,Xr);t!==e&&(t=e,n(e))},i=(0,Kr.A)(o,Zr);return o(),r.addEventListener("scroll",i),()=>{r.removeEventListener("scroll",i),i.cancel()}},[e]),t}(t);let A=0;return o().createElement(jr,{ref:E,id:"chat-body-container","data-testid":"chat-body-container",$isContentLongEnough:s,inert:i?"":void 0},!s&&o().createElement(Pr,{id:Ur}),o().createElement(Dr,{role:"log","aria-live":"polite","data-testid":"chat-log","data-cy":"chat-log",ref:x},w.map((e,t)=>{const{messages:r,shouldShowTime:i}=e,s=v&&eo(b,y,r),c=t===w.length-1,u=r[0].handler===l.Gi.MIMIR||"SMART_WEBHOOK"===r[0].reply_type||"SMART_REPLY"===r[0].reply_type;return o().createElement(o().Fragment,{key:`message-group-${t}`},o().createElement(Ae,{fromBot:r[0].from_bot,created:r[0].created,shouldShowTime:i,inspected:s,isLastGroupMessage:c,disclaimerComponent:u?o().createElement(zr,null,o().createElement(Hr,null,o().createElement(Fr,null,g)," ",o().createElement(Br,null,(0,Rr.A)(m.gpt_search_result_text,a))),o().createElement(Jr.A,{text:(0,Rr.A)(m.gpt_tooltip_disclaimer,a),position:"top"},o().createElement(de.A,{width:18,height:18}))):void 0},r.map((e,t)=>{var i;return A+=1,o().createElement(o().Fragment,{key:`${e.key}`},o().createElement(kr,{chatMessage:e,nextMessageType:null===(i=r[t+1])||void 0===i?void 0:i.sender,buttonHandlers:n,messageCounter:A}))})))}),(p||f)&&o().createElement(gt,{botName:g,text:h===Nr.cT.KINDLY_GPT?(0,Rr.A)(m.gpt_search_text,a):void 0})),o().createElement($r,{bodyRef:t,isChatLooselyScrolledToBottom:k}))}const no=i.Ay.div.withConfig({componentId:"sc-1e9j8ct-0"})(["position:absolute;right:7px;bottom:6px;height:28px;width:28px;display:flex;align-items:center;justify-content:center;z-index:2;"]),ro=(0,i.Ay)(y.mt).withConfig({componentId:"sc-1e9j8ct-1"})(["margin:0;opacity:1;color:",";span{font-weight:500;}",";"],e=>{let{theme:t}=e;return(0,he.w5)(t.background,"#FFF","#000")},W.jB),oo=i.Ay.svg.withConfig({componentId:"sc-1e9j8ct-2"})(["position:absolute;transform-origin:50% 50%;transform:rotate(-90deg);circle{&:first-child{stroke:",";}&:last-child{stroke:",";}}"],e=>{let{theme:t}=e;return(0,he.w5)(t.background,"rgba(255,255,255, 0.66)","rgba(0,0,0, 0.2)")},e=>(0,he.J7)(e.theme.background,e.theme.buttonBackground)?e.theme.buttonText:e.theme.buttonBackground);function io(e){let{radius:t,stroke:n,progress:i}=e;const[a,s]=(0,r.useState)(),[l,c]=(0,r.useState)();(0,r.useEffect)(()=>{const e=t-2*n,r=2*e*Math.PI;s(e),c(r)},[t,n]);const u=l?l-i/100*l:0;return o().createElement(oo,{height:2*t,width:2*t},o().createElement("circle",{fill:"transparent",strokeWidth:n,strokeLinecap:"round",strokeDasharray:`${l} ${l}`,style:{strokeDashoffset:0},r:a,cx:t,cy:t}),o().createElement("circle",{fill:"transparent",strokeWidth:n,strokeLinecap:"round",strokeDasharray:`${l} ${l}`,style:{strokeDashoffset:u},r:a,cx:t,cy:t}))}function ao(e){let{inputMax:t,inputLength:n,composerHeight:r,composerHeightInitial:i}=e;const a=t-n,s=n<t?n/t*100:100,l=t>=n,c=r>i,u=c&&t-20<n,d=u?16:13;return c?o().createElement(no,{title:a>0?`You have used ${n} of the total of ${t} allowed characters`:`You have exceeded the message limit of ${t}`},o().createElement(o().Fragment,null,l&&o().createElement(io,{radius:d,stroke:1.6,progress:s}),o().createElement(ro,null,u&&o().createElement("span",null,a)))):null}var so=n(491),lo=n(3949);const co=i.Ay.div.withConfig({componentId:"sc-1jba2dg-0"})(["width:min(100%,",");margin:auto;padding:16px;padding-top:6px;background:none;background:",";background-color:",";"],a.mb.tablet,e=>e.theme.background,e=>e.theme.background),uo=i.Ay.div.withConfig({componentId:"sc-1jba2dg-1"})(["display:flex;align-items:flex-end;justify-content:space-between;gap:12px;transition:all 450ms cubic-bezier(0.635,-0.6,0.3,1.65);",";"],e=>e.$submitHidden&&"\n gap: 0px;\n "),po=i.Ay.div.withConfig({componentId:"sc-1jba2dg-2"})(["margin:8px 0 10px 10px;transition:all 0.3s ease;color:",";font-size:var(--_kindlychat-font-size-p);line-height:37px;",""],e=>{let{theme:t}=e;return(0,he.w5)(t.background,"#FFFFFF","#000000")},e=>e.$hide?"transform: translateY(-45px);":""),fo=(0,i.Ay)(lo.A).attrs(e=>{let{inputProps:t}=e;return{...t}}).withConfig({componentId:"sc-1jba2dg-3"})([""," min-height:","px;outline-offset:-4px;"],ae.hF,e=>{let{$minHeight:t}=e;return t}),ho=i.Ay.div.withConfig({componentId:"sc-1jba2dg-4"})(["width:28px;display:flex;justify-content:center;align-items:flex-start;transition:all 450ms cubic-bezier(0.635,-0.6,0.3,1.65);",";"],e=>e.$hidden&&"\n width: 0px;\n pointer-events: none;\n "),mo=(0,i.AH)(["color:#fff;z-index:10;cursor:pointer;box-shadow:none;height:28px;width:100%;padding:0;margin-bottom:4px;text-transform:none;display:flex;align-items:center;justify-content:center;border:none;max-width:28px;max-height:28px;background-color:transparent;"," &:focus-visible{outline:1px solid ",";}&:hover{opacity:0.8;}svg{transition:all 0.2s ease;path{stroke:",";}}"],N.sF,e=>{let{theme:t}=e;return(0,he.w5)(t.background,"#FFFFFF","#000000")},e=>(0,he.J7)(e.theme.background,e.theme.buttonBackground)?e.theme.buttonText:e.theme.buttonBackground),go=i.Ay.button.withConfig({componentId:"sc-1jba2dg-5"})(["",";z-index:15;padding:0px;transition:opacity 0.1s ease-in;",";svg{transition:all 0.2s ease;user-select:none;pointer-events:none;}",";"],mo,e=>{let{$active:t}=e;return!t&&"\n opacity: 0.3;\n pointer-events: none;\n "},e=>{let{disabled:t}=e;return t&&"\n cursor: default;\n opacity: 0.3;\n &:hover {\n opacity: 0.3;\n }\n "}),bo=i.Ay.div.withConfig({componentId:"sc-e0zhkb-0"})(["position:absolute;right:",";left:",";bottom:4px;z-index:2;width:28px;height:28px;display:",";align-items:center;justify-content:center;button{padding:0;height:100%;width:100%;display:flex;align-items:center;justify-content:center;}&:hover{opacity:0.8;}svg{path{stroke:",";}}"],e=>{let{$isTextDirectionRtl:t}=e;return t?"auto":"12px"},e=>{let{$isTextDirectionRtl:t}=e;return t?"12px":"auto"},e=>{let{hidden:t}=e;return t?"none":"flex"},e=>{let{theme:t}=e;return(0,he.w5)(t.background,"rgba(255, 255, 255, 0.64)","rgba(0, 0, 0, 0.64)")}),vo=5;function yo(e){let{accept:t=l.oY,multiple:n=!0,setMessage:i}=e;const a=(0,Vt.jL)(),{isTextDirectionRtl:s}=(0,Vt.GV)(u.Od),{takenOver:c,supportsAttachment:d}=(0,Vt.GV)(e=>{let{agent:t}=e;return t}),{attachments:p}=(0,Vt.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&&(a((0,G.B)()),m())},[p.buttonClicked,a,m]),o().createElement(bo,{hidden:!h,$isTextDirectionRtl:s},h&&o().createElement(ae.$n,{onClick:e=>{e.preventDefault(),e.stopPropagation(),m()},"data-testid":"composer-file-upload-button"},o().createElement(_e.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(i(""),(null===(n=t.files)||void 0===n?void 0:n.length)>vo)return void a((0,G.Dc)(`You can upload up to ${vo} files at a time`,3500));const e=await Promise.all(Array.from(t.files).map(Rn.TA));a((0,G.Ln)(e))}catch(e){a((0,G.Dc)(e.message.replace(/^Error: ?/i,""),3500))}},style:{display:"none"}}))}const wo=i.Ay.div.withConfig({componentId:"sc-1c1rsxp-0"})(["display:flex;align-items:center;font-size:var(--_kindlychat-font-size-sm);> div{position:relative;overflow:visible;}span{border:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-left:5px;padding-right:50px;}button{display:none;position:absolute;top:-4px;right:-4px;border:1px solid ",";border-radius:50%;width:14px;height:14px;padding:0px;background:",";z-index:1;path{stroke:",";}}"],e=>{let{theme:t}=e;return(0,he.w5)(t.background,"rgba(255, 255, 255, 0.8)","rgba(0, 0, 0, 0.8)")},e=>{let{theme:t}=e;return t.background},e=>{let{theme:t}=e;return(0,he.w5)(t.background,"rgba(255, 255, 255, 0.8)","rgba(0, 0, 0, 0.8)")}),xo=i.Ay.div.withConfig({componentId:"sc-1c1rsxp-1"})(["height:36px;width:36px;&:not(:first-child){margin-left:4px;}&:hover,&:focus-within{button{display:block;}}"]),Eo=i.Ay.div.withConfig({componentId:"sc-1c1rsxp-2"})(["height:36px;width:36px;border-radius:6px;position:relative;overflow:hidden;img,video{position:absolute;width:100%;height:100%;object-fit:cover;}"]),ko=i.Ay.div.withConfig({componentId:"sc-1c1rsxp-3"})(["height:100%;padding:8px;border-radius:8px;background:",";"],a.Tj.grayColor);function Ao(e){let{file:t}=e;const n=(0,At.A)(t);return n===l.sl.IMAGE||n===l.sl.VIDEO?o().createElement(Eo,{tabIndex:0},n===l.sl.IMAGE&&o().createElement("img",{src:t.url,alt:`Uploaded ${t.name}`}),n===l.sl.VIDEO&&o().createElement("video",{autoPlay:!0,muted:!0,loop:!0,playsInline:!0,"aria-label":t.name},o().createElement("source",{src:t.url,type:t.type}))):o().createElement(ko,null,o().createElement(_e.A,null))}i.Ay.div.withConfig({componentId:"sc-1c1rsxp-4"})(["font-size:var(--_kindlychat-font-size-p);height:41px;padding:0 4px;background:",";border-radius:8px;display:flex;align-items:center;margin-left:4px;"],a.Tj.grayColor);const _o=(e,t)=>{const n=e.slice();return n.splice(t,1),n};function Co(){const e=(0,Vt.jL)(),{attachments:{files:t}}=(0,Vt.GV)(e=>{let{chatbubble:t}=e;return t});return o().createElement(wo,null,t.map((n,r)=>o().createElement(xo,{key:`uploaded-image-${n.name}-${r}`},o().createElement(Ao,{file:n}),o().createElement(ae.$n,{onClick:n=>{n.preventDefault(),(n=>{e((0,G.Ln)(_o(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 So;const To=37,Io=1e3,Oo=1e3;function Lo(e){let{active:t,chatHasStarted:n,currentlyPoppedUp:i=!1,bodyRef:a,inert:s}=e;const[l,c]=(0,r.useState)(To),[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)()&&!i&&b.current&&b.current.focus()},[t,n,i]);const v=(0,Vt.jL)(),{inputLimitEnabled:y,inputLimit:w,isTextDirectionRtl:x}=(0,Vt.GV)(u.Od),{allGreetingsHideInput:E,attachments:{files:k},hideInputField:A}=(0,Vt.GV)(e=>{let{chatbubble:t}=e;return t}),{takenOver:_,userIsTyping:C}=(0,Vt.GV)(e=>{let{agent:t}=e;return t}),{connected:S}=(0,Vt.GV)(e=>{let{connection:t}=e;return t}),{chatMessages:T}=(0,Vt.GV)(e=>{let{messages:t}=e;return t}),{inspectorOpen:I}=(0,Vt.GV)(e=>{let{inspector:t}=e;return t}),O=x?"rtl":void 0,L=A&&!_&&0===k.length,M=!_&&y,$=M?w:Io,N=!f&&0===k.length,R=0===f.length&&0===k.length,P=!S||L||E&&0===T.length||f.length>$||N||!n,{placeholder:j,disabled_input_text:D}=(0,dn.A)(),z=e=>{if(e.preventDefault(),e.stopPropagation(),C&&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>Oo))return!1;g(e),v((0,G.y2)(f.trim()))}return h(""),!0};return(0,so.A)("touchend",async()=>{let e=0;const t=setInterval(()=>{var n;null===(n=b.current)||void 0===n||n.scrollIntoView(),e+=1,e>=5&&clearInterval(t)},100)},b.current),o().createElement(co,{dir:O,inert:s?"":void 0},o().createElement("form",{autoComplete:"off",action:"#",onSubmit:z},o().createElement(uo,{$submitHidden:R},o().createElement(ae.A0,{$initialHeight:To,$targetHeight:l,$active:!N,$hasFiles:(null==k?void 0:k.length)>0},0===k.length&&o().createElement(o().Fragment,null,o().createElement(fo,{"data-testid":"chat-box-composer","aria-hidden":n?"false":"true","aria-label":j,name:"message",$hide:L,disabled:!n||L,$active:!N,ref:b,placeholder:j,onChange:e=>{const{value:t}=e.target;_&&(e=>{const t=e.length>0;clearTimeout(So),!C&&t?v((0,G.Mb)()):C&&!t&&v((0,G.mw)()),So=setTimeout(()=>{v((0,G.mw)())},5e3)})(t),h(t),Yr(a.current)&&setTimeout(()=>{_r(a.current)},5)},value:f,onFocus:()=>p(!0),onBlur:()=>p(!1),onMouseDown:()=>{d||Yr(a.current)||_r(a.current)},onHeightChange:c,$minHeight:To,enterKeyHint:"send",onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||z(e)}}),o().createElement(po,Object.assign({$hide:A},!A&&{inert:""}),D)),o().createElement(Co,null),M&&o().createElement(ao,{inputMax:$,inputLength:f.length,composerHeight:l,composerHeightInitial:To}),o().createElement(yo,{setMessage:h})),o().createElement(ho,{$hidden:R},o().createElement(go,{"data-testid":"composer-submit","aria-hidden":P,$active:!P,disabled:P,role:"button",onClick:z,title:"Send message",onMouseDown:e=>{e.preventDefault()}},o().createElement(Oe.qx,{width:24,height:24}))))))}function Mo(e){return o().createElement("svg",Object.assign({viewBox:"0 0 82 82",xmlns:"http://www.w3.org/2000/svg"},e),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 $o=n(8411),No=n(167);function Ro(e){let{handleXButtonClick:t,settingsButtonRef:n}=e;const i=(0,Vt.jL)(),{name:a,avatar:s,fullscreenMode:l,isTextDirectionRtl:c}=(0,Vt.GV)(u.Od),{chatHasStarted:d,currentLanguage:p,overlayViews:f,currentModal:h}=(0,Vt.GV)(e=>{let{chatbubble:t}=e;return t}),{botConversationFeedback:m}=(0,$o.A)(p),g=c?"rtl":void 0,b=f[f.length-1],v=!b||"FEEDBACK"===b,y=l&&m||v&&!l,w=()=>{i((0,G.Rh)())};return x=e=>{const{activeElement:t}=document;if(!t)return;const{tagName:n}=t;"Escape"===e.code&&"BODY"===n&&w(),"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(No.B3,{dir:g,"data-testid":"chat-box-header"},o().createElement(No.CE,null,s?o().createElement(No.dl,{$avatar:s,"aria-hidden":"true"}):o().createElement(Mo,{height:30,"aria-hidden":"true"}),o().createElement(No.Zw,{$isTextDirectionRtl:c,"aria-label":`Chat bot ${a||"Kindly"}`},a||"Kindly")),o().createElement(No.HD,null,v&&o().createElement(No.I$,{"aria-label":"Open settings",title:"Open settings",type:"button",onClick:()=>{i((0,G.wQ)("GENERIC"))},"data-testid":"chat-settings-button",ref:n,inert:"COMPLIANCE"===h?"":void 0},o().createElement(Oe.Ze,{width:24,height:24})),v&&!l&&o().createElement(No.I$,{"aria-label":"Minimize chat",title:"Minimize chat",type:"button",onClick:w,"data-testid":"minimize-chat-button","data-cy":"minimize-chat-button"},o().createElement(Oe.gR,{width:24,height:24})),y&&o().createElement(No.I$,{"aria-label":"End chat",title:"End chat",type:"button",onClick:t,"data-testid":"end-chat-button","data-cy":"end-chat-button"},o().createElement(Oe.US,{width:24,height:24})))):null;var x}var Po=n(7325);const jo=i.Ay.div.withConfig({componentId:"sc-1s4wj3o-0"})(["overflow:hidden;position:absolute;inset:0;background:#fff;background-color:#fff;height:100%;width:100%;padding:0 0 20px 0;z-index:16;",";animation-duration:0.2s;animation-timing-function:ease-in;"],W.jB),Do=i.Ay.div.withConfig({componentId:"sc-1s4wj3o-1"})(["height:100%;display:flex;text-align:center;flex-direction:column;justify-content:space-between;align-items:center;"]),zo=i.Ay.div.withConfig({componentId:"sc-1s4wj3o-2"})(["width:100%;height:100%;display:flex;padding:0 30px;flex-direction:column;justify-content:center;align-items:center;"]),Fo=(0,i.Ay)(y.fz).withConfig({componentId:"sc-1s4wj3o-3"})(["font-size:var(--_kindlychat-font-size-m);a{color:",";}"],a.Tj.primaryColor),Bo=i.Ay.div.withConfig({componentId:"sc-1s4wj3o-4"})(["a{color:",";text-align:center;font-size:var(--_kindlychat-font-size-p);display:block;margin:60px 0 30px 0;&:hover,&:focus,&:active,&:visited{color:",";}}"],a.Tj.darkColor,a.Tj.darkColor),Ho=i.Ay.p.withConfig({componentId:"sc-1s4wj3o-5"})(["position:absolute;bottom:0;font-size:var(--_kindlychat-font-size-sm);color:",";"],a.CM[50]);function Uo(){const e=(0,Vt.jL)(),t=()=>{e((0,Po.eG)())},{back_to_chat_button:n}=(0,dn.A)();return o().createElement(jo,null,o().createElement(Do,null,o().createElement(zo,null,o().createElement(y.H3,null,"About Kindly"),o().createElement(Fo,null,"This chatbot is powered by Kindly.",o().createElement("br",null),"To learn more about Kindly, visit"," ",o().createElement("a",{ref:e=>{e&&e.focus()},href:"https://www.kindly.ai",target:"_blank",rel:"noopener noreferrer"},"this website.",o().createElement(P,null)))),o().createElement(Bo,null,o().createElement(ae.N_,{"aria-label":n,title:n,onClick:t,onKeyUp:e=>{"Enter"===e.key&&t()},tabIndex:0,type:"button"},"‹ ",n)),o().createElement(Ho,null,"v",window.kindlyChat.VERSION)))}var Vo=n(9223);const Go=i.Ay.div.withConfig({componentId:"sc-xpbg6h-0"})(["z-index:2;display:flex;justify-content:center;"]),Wo=i.Ay.span.withConfig({componentId:"sc-xpbg6h-1"})(["width:8px;height:8px;opacity:1;border-radius:100%;margin:0 4px 0 8px;background:#1cd300;background-color:#1cd300;"]),qo=i.Ay.p.withConfig({componentId:"sc-xpbg6h-2"})(["display:flex;font-size:var(--_kindlychat-font-size-xs);color:",";line-height:20px;margin-bottom:0;align-items:baseline;span:first-child{opacity:0.6;}a{cursor:pointer;}"],a.Tj.darkColor);function Ko(e){let{shouldAutoFocus:t}=e;const n=(0,Vt.jL)();return o().createElement(Go,null,o().createElement(qo,null,o().createElement("span",null,"Powered by")," ",o().createElement(Wo,null),o().createElement(y.cp,null,o().createElement(ae.Bi,{"aria-label":"Visit Kindly",title:"Visit Kindly",onClick:e=>{"click"===(null==e?void 0:e.type)&&n((0,G.wQ)("ABOUT_CHAT"))},type:"button",autoFocus:t},"Kindly"))))}const Yo=i.Ay.div.withConfig({componentId:"sc-7eewng-0"})(["overflow:hidden;position:relative;background:#fff;background-color:#fff;height:100%;width:100%;padding:0 0 20px 0;",";animation-duration:0.2s;animation-timing-function:ease-in;"],W.jB),Xo=i.Ay.div.withConfig({componentId:"sc-7eewng-1"})(["height:100%;display:flex;text-align:center;flex-direction:column;justify-content:space-between;align-items:center;"]),Zo=i.Ay.div.withConfig({componentId:"sc-7eewng-2"})(["width:100%;height:100%;display:flex;padding:0 30px;justify-content:center;align-items:center;"]),Jo=i.Ay.div.withConfig({componentId:"sc-7eewng-3"})(["button{margin:auto;}a{color:",";text-align:center;font-size:var(--_kindlychat-font-size-p);display:block;margin:60px 0 30px 0;&:hover,&:focus,&:active,&:visited{color:",";}}"],a.Tj.darkColor,a.Tj.darkColor),Qo=i.Ay.div.withConfig({componentId:"sc-7eewng-4"})(["div{display:flex;position:unset;align-items:center;}"]);function ei(e){let{endChat:t}=e;const{whitelabelEnabled:n}=(0,Vt.GV)(u.Od),{currentLanguageCode:r}=(0,pe.A)(),{preloadFeedbackImages:i}=(0,$o.A)(r),s=(0,Vt.jL)(),l=(0,dn.A)(),{back_to_chat_button:c,cancel_chat_button:d,cancel_chat_text:p}=l;return o().createElement(Yo,null,o().createElement(Xo,null,o().createElement(Zo,null,o().createElement(y.H2,null,p)),o().createElement(Jo,null,o().createElement(Vo.A,{style:a.Nz,"aria-label":d,title:d,onClick:t,onMouseEnter:()=>{i("bot_conversation")},type:"button",text:d,cy:"cancel-chat-button",autoFocus:!0}),o().createElement(ae.N_,{"aria-label":c,title:c,onClick:()=>{s((0,Po.eG)())},onKeyUp:e=>{"Enter"===e.key&&s((0,Po.eG)())},type:"button",tabIndex:0},"‹ ",c)),o().createElement(Qo,null,!n&&o().createElement(Ko,null))))}var ti=n(5096);function ni(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 ri(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 oi=n(4142),ii=n(5767);const ai=window.matchMedia("(prefers-reduced-motion: reduce)").matches,si="startViewTransition"in document;async function li(e){if(ai||!si)return void e();const t=document;return await t.startViewTransition(()=>{(0,Te.flushSync)(e)})}var ci=n(3169);const ui=(0,i.i7)(["0%{opacity:0;transform:translateY(4px);}100%{opacity:1;transform:translateY(0);}"]),di=i.Ay.section.attrs({"data-testid":"chat-modal"}).withConfig({componentId:"sc-1nmbsmf-0"})(["position:absolute;width:100%;bottom:0;left:0;right:0;padding:16px;border-radius:12px;border:1px solid ",";background-color:",";color:var(--panel-background-white-black-contrast-1743170834);z-index:15;animation:"," 0.3s ease;"],e=>{let{theme:t}=e;return(0,he.w5)(t.panelBackground,"rgba(255, 255, 255, 0.8)","#0000000d")},e=>{let{theme:t}=e;return t.panelBackground},ui),pi=(0,i.Ay)(di).withConfig({componentId:"sc-t0w48p-0"})(["display:flex;min-height:",";padding-top:38px;gap:24px;flex-direction:column;justify-content:",";border-radius:",";",";view-transition-name:'feedback-modal-1723461511841';"],e=>{let{$isFullHeight:t}=e;return t?"100%":"clamp(240px, 25%, 600px)"},e=>{let{$isFullHeight:t,$justifyCenter:n}=e;return t||n?"center":"space-between"},e=>{let{$isFullHeight:t}=e;return t&&"unset"},e=>{let{$isFullHeight:t}=e;return t&&"border: none"}),fi=(0,i.Ay)(Vo.A).withConfig({componentId:"sc-t0w48p-1"})(["margin-inline:auto;"]),hi=i.Ay.button.withConfig({componentId:"sc-t0w48p-2"})(["background:none;border:none;position:absolute;top:8px;right:8px;cursor:pointer;svg{display:block;}"]),mi=i.Ay.h2.withConfig({componentId:"sc-t0w48p-3"})(["margin:",";font-size:var(--_kindlychat-font-size-p);font-weight:500;text-align:center;"],e=>{let{$isFullHeight:t}=e;return t?"auto 8px 8px 8px":"8px"}),gi=i.Ay.div.withConfig({componentId:"sc-t0w48p-4"})(["display:flex;flex-wrap:wrap;justify-content:center;row-gap:16px;@media only screen and (max-width:360px){flex-direction:column;align-items:center;}"]),bi=i.Ay.button.withConfig({componentId:"sc-t0w48p-5"})([""," display:flex;height:fit-content;gap:8px;flex-direction:column;align-items:center;justify-content:center;opacity:",";transition:opacity 0.2s;cursor:pointer;user-select:none;word-break:normal;overflow-wrap:anywhere;@media only screen and (max-width:360px){width:fit-content;}@media only screen and (min-width:361px){width:65px;}"],N.AF,e=>{let{$wasChoiceMade:t,$isSelected:n}=e;return t&&!n?.5:1}),vi=i.Ay.img.withConfig({componentId:"sc-t0w48p-6"})(["width:24px;height:24px;transition:scale 0.3s;scale:",";",":hover &{scale:1.25;}"],e=>{let{$isSelected:t}=e;return t?1.25:1},bi),yi=i.Ay.span.withConfig({componentId:"sc-t0w48p-7"})(["display:block;font-size:var(--_kindlychat-font-size-sm);font-weight:500;"]),wi=i.Ay.div.withConfig({componentId:"sc-t0w48p-8"})(["display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-bottom:20px;"]),xi=i.Ay.button.withConfig({componentId:"sc-t0w48p-9"})(["border:1px solid rgba(0,0,0,0.08);padding:8px 12px;color:",";background-color:",";background-color:",";border-radius:6px;box-shadow:",";translate:",";transition:background-color 0.2s,translate 0.2s;cursor:pointer;user-select:none;"],e=>{let{theme:t}=e;return(0,he.w5)(t.secondaryButtonBackground,a.AV.light,a.AV.dark)},e=>{let{theme:t}=e;return t.secondaryButtonBackground},e=>{let{$isSelected:t,theme:n}=e;return t?(0,he.SW)(n.secondaryButtonBackground)?`oklch(from ${n.secondaryButtonBackground} calc(l * 0.90) c h / 0.9)`:`oklch(from ${n.secondaryButtonBackground} calc(l * 1.15) c h / 0.9)`:n.secondaryButtonBackground},a.FR.button,e=>{let{$isSelected:t}=e;return t?"0 -2px":"0 0"}),Ei=i.Ay.textarea.withConfig({componentId:"sc-t0w48p-10"})(["font-family:inherit;color:inherit;border:none;outline:none;width:100%;height:75px;font-size:var(--_kindlychat-font-size-sm);background:",";border-radius:8px;padding:8px 12px;resize:none;&::placeholder{color:",";}"],e=>{let{theme:t}=e;return(0,he.w5)(t.panelBackground,"rgba(255, 255, 255, 0.08)","rgba(0, 0, 0, 0.08)")},e=>{let{theme:t}=e;return(0,he.w5)(t.panelBackground,"rgba(255, 255, 255, 0.50)","rgba(0, 0, 0, 0.50)")}),ki=i.Ay.div.withConfig({componentId:"sc-t0w48p-11"})(["",";display:grid;grid-template-columns:0.6fr 1fr 0.6fr;grid-template-areas:'back dots next';view-transition-name:'navigation-1723461511841';"],e=>{let{$isFullHeight:t}=e;return t&&"margin-top: auto"}),Ai=i.Ay.button.withConfig({componentId:"sc-t0w48p-12"})(["display:flex;width:max-content;align-items:center;gap:2px;padding:7px 12px;border:1px solid #00000014;border-radius:6px;box-shadow:",";cursor:pointer;user-select:none;"],a.FR.button),_i=(0,i.Ay)(Ai).withConfig({componentId:"sc-t0w48p-13"})(["grid-area:back;color:",";background-color:",";"],e=>{let{theme:t}=e;return(0,he.w5)(t.secondaryButtonBackground,a.AV.light,a.AV.dark)},e=>{let{theme:t}=e;return t.secondaryButtonBackground}),Ci=(0,i.Ay)(Ai).withConfig({componentId:"sc-t0w48p-14"})(["grid-area:next;place-self:end;align-items:center;background-color:",";color:",";outline-offset:4px;transition:opacity 0.2s;&:disabled{opacity:0.5;cursor:not-allowed;}"],e=>{let{theme:t}=e;return t.buttonBackground},e=>{let{theme:t}=e;return t.buttonText}),Si=i.Ay.div.withConfig({componentId:"sc-t0w48p-15"})(["grid-area:dots;display:flex;align-items:center;gap:8px;margin:auto;view-transition-name:'progress-dots-1723461511841';"]),Ti=i.Ay.span.withConfig({componentId:"sc-t0w48p-16"})(["width:",";height:",";border-radius:50%;background-color:",";transition:width 0.3s,height 0.3s,background-color 0.3s;box-shadow:",";"],e=>{let{$isActive:t}=e;return t?"10px":"6px"},e=>{let{$isActive:t}=e;return t?"10px":"6px"},e=>{let{$isDotBeforeOrEqualCurrentStep:t,theme:n}=e;return t?`${n.buttonBackground}`:`${a.CM[20]}`},a.FR.button),Ii=i.Ay.div.withConfig({componentId:"sc-t0w48p-17"})(["font-size:var(--_kindlychat-font-size-p);font-weight:500;margin:auto;text-align:center;translate:0 0;transition:translate 0.2s;"]),Oi=(0,i.Ay)(ci.Ef).withConfig({componentId:"sc-t0w48p-18"})(["margin-top:16px;width:100%;"]),Li=i.Ay.span.withConfig({componentId:"sc-t0w48p-19"})(["overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"]);function Mi(e){var t,n,s;let{feedbackToSubmit:l,isFullHeight:u,endChat:d,shouldEndChat:p=!1,inert:f}=e;const h=(0,Vt.jL)(),m=(0,c.Pj)().getState(),{currentLanguageCode:g}=(0,pe.A)(),{botConversationFeedback:b,handoverConversationFeedback:v}=(0,$o.A)(g),y="bot_conversation"===l.trigger_type?b:v,w=(0,dn.A)(),{start_over_button:x}=w,{buttonText:E,secondaryButtonBackground:k}=(0,r.useContext)(i.Dx),A=(0,r.useMemo)(()=>(0,he.w5)(k,a.AV.light,a.AV.dark),[k]),C="external_feedback"===y.feedback_type,S=[...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"],T=l.currentStep,I=T?S.indexOf(T):0,O=ti.Z.fullscreenMode,L=y.predefined_buttons.use_sentiment_buttons&&null!==(s=l.sentiment)&&void 0!==s?s:"no_sentiment";(0,r.useEffect)(()=>{if(!T)return;const e=S[0]===T;(0,Ie.tf)("show-feedback",{value:{feedbackType:T}},{storeState:m,source:e?"programmatic":"user"})},[T,m]);const M=e=>{(0,Ie.tf)("dismiss-feedback",{value:{feedbackType:T}},{storeState:m,source:e}),h((0,Po.zn)(null)),h((0,ii.ot)()),p&&h((0,ii.Dz)())},$=()=>{(0,Ie.tf)("restart-chat",void 0,{storeState:m}),h((0,Po.ky)(!0))};return C?o().createElement(pi,{$isFullHeight:!!u,$justifyCenter:!0},!u&&o().createElement(hi,{onClick:()=>M("user")},o().createElement(Oe.US,{color:"black",height:28,width:28})),o().createElement(mi,{$isFullHeight:!!u},y.headline),o().createElement(fi,{onClick:()=>{p&&(null==d||d("programmatic")),h((0,Po.zn)(null)),h((0,ii.ot)())},href:y.url_for_feedback,target:"_blank",rel:"noreferrer"},y.button_label)):o().createElement(pi,Object.assign({"aria-live":"polite",$isFullHeight:!!u},f&&{inert:""}),!u&&o().createElement(hi,{onClick:()=>M("user")},o().createElement(Oe.US,{color:"black",height:28,width:28})),(()=>{var e;switch(T){case"RATING_SCALE":return o().createElement(o().Fragment,null,o().createElement(mi,{$isFullHeight:Boolean(u)},y.rating_scale.title),o().createElement(gi,null,y.rating_scale.edit_labels.map((e,t)=>{const n=0===t;return o().createElement(bi,Object.assign({key:e.id,$isSelected:l.index===t,"aria-pressed":l.index===t,"aria-label":e.rating,$wasChoiceMade:"number"==typeof l.index,onClick:()=>{return n=t,r=e.rating,o=e.sentiment,void(l.index===n?h((0,ii.n_)()):h((0,ii.wm)({index:n,rating:r,sentiment:o})));var n,r,o}},n&&{autoFocus:!0}),o().createElement(vi,{src:e.image,alt:e.rating,$isSelected:l.index===t}),e.show_rating&&o().createElement(yi,null,e.rating))})));case"PREDEFINED_BUTTONS":return o().createElement(o().Fragment,null,o().createElement(mi,{$isFullHeight:!!u},y.predefined_buttons.sentiments[L].title),o().createElement(wi,null,y.predefined_buttons.sentiments[L].buttons.map((e,t)=>{var n,r;const i=0===t;return o().createElement(xi,Object.assign({key:e.id,$isSelected:null===(n=l.buttons_chosen)||void 0===n?void 0:_()(n).call(n,e.text),"aria-pressed":null===(r=l.buttons_chosen)||void 0===r?void 0:_()(r).call(r,e.text),onClick:()=>{return t=e.text,void h((0,ii.m9)(t));var t}},i&&{autoFocus:!0}),e.text)})));case"FREEFORM_TEXT":return o().createElement(o().Fragment,null,o().createElement(mi,{$isFullHeight:!!u,id:"feedback-freeform-title-1739894771"},y.free_form.title),o().createElement(Ei,{value:null!==(e=l.freeform_text)&&void 0!==e?e:"",onChange:e=>{return t=e.target.value,void h((0,ii.GY)(t));var t},placeholder:y.free_form.placeholder,"aria-labelledby":"feedback-freeform-title-1739894771",autoFocus:!0}));case"THANK_YOU":return o().createElement(Ii,null,o().createElement(mi,{$isFullHeight:!!u},y.thanks_text),O&&o().createElement(Oi,{"aria-label":x,title:x,onClick:$,type:"button",$loading:!1},o().createElement(Li,null,x)));default:return null}})(),"THANK_YOU"!==T?o().createElement(ki,{$isFullHeight:u},I>0&&o().createElement(_i,{onClick:()=>{li(()=>{const e=S[I-1];e&&h((0,ii.zp)(e))})}},o().createElement(ni,{color:A}),y.back_button),o().createElement(Si,null,S.slice(0,-1).map((e,t)=>o().createElement(Ti,{key:e,$isActive:I===t,$isDotBeforeOrEqualCurrentStep:I>=t}))),o().createElement(Ci,{onClick:async()=>{li(()=>{(async()=>{(0,Ie.tf)("submit-feedback",{value:{feedbackType:T,feedbackValue:l}},{storeState:m}),await h((0,oi.S)(l))})();const e=S[I+1];e&&(h((0,ii.zp)(e)),"THANK_YOU"!==e||O||setTimeout(()=>{p?(null==d||d("programmatic"),h((0,Po.zn)(null))):M("programmatic"),h((0,ii.ot)())},4e3))})},disabled:"RATING_SCALE"===T&&"number"!=typeof l.index||"PREDEFINED_BUTTONS"===T&&!l.buttons_chosen.length},T===S[S.length-2]?o().createElement(o().Fragment,null,y.send_button,o().createElement(ri,{color:E})):o().createElement(o().Fragment,null,y.next_button,o().createElement(ri,{color:E})))):o().createElement(o().Fragment,null,u&&o().createElement(Ko,{shouldAutoFocus:!0})))}const $i=(0,i.i7)(["0%{opacity:0;}100%{opacity:1;}"]),Ni=((0,i.AH)(["",";animation-name:",";"],(0,W.qL)(100),$i),(0,i.i7)(["0%{opacity:1;}100%{opacity:0;}"])),Ri=((0,i.AH)(["",";animation-delay:50ms;animation-name:",";"],(0,W.qL)(500),Ni),(0,i.AH)(["",";"],e=>e.$fullHeight?"top: 0; height: 100%;":"top: 55px; height: calc(100% - 55px); border-bottom-right-radius: 6px; border-bottom-left-radius: 6px")),Pi=i.Ay.div.withConfig({componentId:"sc-1pzvbin-0"})(["width:100%;overflow:hidden;"," position:absolute;z-index:",";background:#fff;background-color:#fff;opacity:1;transition:opacity 0.2s;@starting-style{opacity:0;}"],Ri,a.vI.overlayIndex),ji=(0,i.Ay)(ae.N_).withConfig({componentId:"sc-1pzvbin-1"})(["display:block;color:",";text-align:center;margin:30px 0;font-size:var(--_kindlychat-font-size-p);&:hover,&:focus,&:active,&:visited{color:",";}"],a.Tj.darkColor,a.Tj.darkColor),Di=i.Ay.div.withConfig({componentId:"sc-1pzvbin-2"})(["overflow:hidden;position:relative;background:#fff;background-color:#fff;height:100%;width:100%;text-align:center;display:grid;grid-template-rows:1fr 40px;@media (max-height:610px){overflow-y:auto;}"]),zi=i.Ay.div.withConfig({componentId:"sc-1pzvbin-3"})(["display:grid;grid-gap:15px;grid-template-rows:auto 1fr;overflow-y:auto;@media ","{grid-gap:0;grid-template-rows:1fr;}"],a.jO.maxPhoneHeight),Fi=i.Ay.div.withConfig({componentId:"sc-1pzvbin-4"})(["display:grid;grid-template-rows:1fr auto;@media ","{grid-template-rows:1fr;}"],a.jO.maxPhoneHeight),Bi=i.Ay.div.withConfig({componentId:"sc-1pzvbin-5"})(["width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:20px 30px;h3{display:flex;align-items:center;justify-content:center;}"]),Hi=i.Ay.span.withConfig({componentId:"sc-1pzvbin-6"})(["overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"]),Ui=i.Ay.div.withConfig({componentId:"sc-1pzvbin-7"})(["div{position:unset;display:flex;flex-direction:column;align-items:center;}"]);function Vi(e){let{textContent:t}=e;const n=(0,c.wA)(),r=(0,c.Pj)().getState(),{chat_deleted_header:i,back_to_chat_button:a}=t,s=()=>{(0,Ie.tf)("restart-chat",void 0,{storeState:r}),n((0,G.ky)(!0))};return o().createElement(Bi,null,o().createElement(y.H3,null,i),o().createElement(ci.Ef,{"aria-label":a,title:a,onClick:s,onKeyUp:e=>{"Enter"===e.key&&s()},type:"button","data-testid":"back-to-chat-option",autoFocus:!0,$loading:!1},o().createElement(Hi,null,a)))}const Gi=i.Ay.div.withConfig({componentId:"sc-19fb7bu-0"})(["max-width:100%;flex-direction:column;display:flex;align-items:center;margin:unset;button{margin-bottom:10px;&:last-child{margin-top:0;}}"]);function Wi(e){let{textContent:t,onNavigateBack:n}=e;const r=(0,c.Pj)().getState(),i=(0,c.wA)(),{back_to_chat_button:s,delete_text:l,delete_button:u}=t;return o().createElement(o().Fragment,null,o().createElement(Bi,null,o().createElement(y.H3,null,l)),o().createElement(Gi,null,o().createElement(Vo.A,{style:a.Nz,"aria-label":u,title:u,onClick:()=>{(0,Ie.tf)("delete-chat",void 0,{storeState:r}),i((0,G._e)())},type:"button",text:u,cy:"confirm-delete-chat",autoFocus:!0}),o().createElement(ji,{"aria-label":s,title:s,onClick:()=>n(),onKeyUp:e=>{"Enter"===e.key&&n()},type:"button",tabIndex:0},"‹ ",s)))}const qi=i.Ay.div.withConfig({componentId:"sc-13vd2wb-0"})(["height:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding:0 15px;"]),Ki=i.Ay.div.withConfig({componentId:"sc-13vd2wb-1"})(["max-width:100%;margin:auto;display:flex;flex-direction:column;min-width:190px;button{margin-bottom:10px;}"]),Yi=i.Ay.div.withConfig({componentId:"sc-13vd2wb-2"})(["color:",";font-size:var(--_kindlychat-font-size-m);margin:0 0 10px;line-height:24px;"],a.Tj.darkColor);function Xi(e){let{textContent:t,onNavigateBack:n}=e;const r=(0,c.Pj)().getState(),i=(0,c.wA)(),{back_to_chat_button:a,download_button:s,download_format_text:l}=t,u=e=>{(0,Ie.tf)("download-chat",void 0,{storeState:r}),i((0,G.VK)({},e))};return o().createElement(o().Fragment,null,o().createElement(Bi,null,o().createElement(Yi,null,l)),o().createElement(qi,null,o().createElement(Ki,null,o().createElement(ci.Ef,{"aria-label":`${s} (HTML)`,title:`${s} (HTML)`,onClick:()=>u("html"),type:"button","data-testid":"download-chat-html",autoFocus:!0,$isSecondaryButton:!0,$loading:!1},o().createElement(Hi,null,`${s} (HTML)`)),o().createElement(ci.Ef,{"aria-label":`${s} (JSON)`,title:`${s} (JSON)`,onClick:()=>u("json"),type:"button","data-testid":"download-chat-json",$isSecondaryButton:!0,$loading:!1},o().createElement(Hi,null,`${s} (JSON)`))),o().createElement(ji,{"aria-label":a,title:a,onClick:n,onKeyUp:e=>{"Enter"===e.key&&n()},type:"button",tabIndex:0},"‹ ",a)))}const Zi=i.Ay.div.withConfig({componentId:"sc-eb968f-0"})(["width:100%;height:",";background:",";background-color:",";@media ","{display:none;}"],e=>e.$long?"180px":"210px",e=>e.theme.headerBackground,e=>e.theme.headerBackground,a.jO.maxPhoneHeight),Ji=i.Ay.div.withConfig({componentId:"sc-eb968f-1"})(["min-width:60%;max-width:95%;margin:auto;display:flex;flex-direction:column;button{margin:5px 0;&:first-child{margin-top:10px;}svg{margin-right:15px;vertical-align:middle;}}"]);function Qi(){const{supportedLanguages:e}=(0,pe.A)(),t=(0,Vt.jL)(),n=(0,c.Pj)().getState(),r=e.length>1,{back_to_chat_button:i,change_language_button:a,download_button:s,delete_button:l,start_over_button:u}=(0,dn.A)(),d=e=>()=>{t((0,G.wQ)(e))};return o().createElement(o().Fragment,null,o().createElement(Zi,{$long:r}),o().createElement(Ji,null,r&&o().createElement(ci.Ef,{"aria-label":a,title:a,onClick:d("SELECT_LANGUAGE"),type:"button","data-testid":"change-language-option",$isSecondaryButton:!0,autoFocus:r},o().createElement(Hi,null,o().createElement(Oe.U,{width:16,height:16,crop:!0}),a)),o().createElement(ci.Ef,{"aria-label":u,title:u,onClick:()=>{(0,Ie.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(Hi,null,u)),o().createElement(ci.Ef,{"aria-label":l,title:l,onClick:d("DELETE_CHAT_CONFIRMATION"),type:"button","data-testid":"delete-chat-option",$isSecondaryButton:!0},o().createElement(Hi,null,l)),o().createElement(ci.Ef,{"aria-label":s,title:s,onClick:d("SELECT_DOWNLOAD"),type:"button","data-testid":"download-chat-option",$isSecondaryButton:!0},o().createElement(Hi,null,s)),o().createElement(ci.Ef,{"aria-label":i,title:i,onClick:()=>{t((0,G.eG)())},type:"button","data-testid":"back-to-chat-option"},o().createElement(Hi,null,i))))}const ea=i.Ay.fieldset.withConfig({componentId:"sc-6uesp5-0"})(["border:none;background-color:transparent;height:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding:0 30px;"]),ta=i.Ay.div.withConfig({componentId:"sc-6uesp5-1"})(["max-width:100%;flex-direction:column;display:flex;margin:unset;min-width:190px;button{margin-bottom:10px;text-transform:capitalize;&:last-child{margin-top:0;}}"]),na=i.Ay.div.withConfig({componentId:"sc-6uesp5-2"})(["margin-bottom:15px;button{display:block;margin:0 auto 30px;}"]),ra=(0,i.Ay)(y.H3).withConfig({componentId:"sc-6uesp5-3"})(["margin-top:30px;width:100%;svg{margin-right:16px;display:inline-block;vertical-align:middle;}"]);function oa(e){let{onNavigateBack:t}=e;const{back_to_chat_button:n,change_language_button:i,confirm_action_button:s}=(0,dn.A)(),{currentLanguageCode:l,supportedLanguages:u}=(0,pe.A)(),[d,p]=(0,r.useState)(l),f=u.find(e=>{let{code:t}=e;return t===l}),h=u.find(e=>{let{code:t}=e;return t===d}),m=(0,c.Pj)().getState(),g=(0,Vt.jL)();return o().createElement(o().Fragment,null,o().createElement(Bi,null,o().createElement(ra,null,o().createElement(Oe.U,{width:50,height:50}),i)),o().createElement(ea,null,o().createElement(ta,null,u.map((e,t)=>{const n=0===t;return o().createElement(Vo.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(na,null,d!==l&&o().createElement(Vo.A,{style:a.Nz,"aria-label":s,title:s,onClick:()=>{(0,Ie.tf)("change-language",{value:{languageCode:d,languageName:(null==h?void 0:h.name_english)||d,previousLanguageCode:l,previousLanguageName:(null==f?void 0:f.name_english)||l}},{storeState:m}),g((0,G.L4)(d,{skipRestart:!0})),g(G.RY),t()},type:"submit",text:s}),o().createElement(ji,{"aria-label":n,title:n,onClick:t,onKeyUp:e=>{"Enter"===e.key&&t()},tabIndex:0,type:"button"},"‹ ",n))))}var ia=n(5381);const aa=i.Ay.div.withConfig({componentId:"sc-7s2wt6-0"})(["position:relative;width:fit-content;&:before{content:'';position:absolute;right:11px;top:50%;transform:translateY(-50%);width:0;height:0;z-index:1;border-top:7px solid #2c2c2c;border-left:4px solid transparent;border-right:4px solid transparent;}"]),sa=i.Ay.div.withConfig({componentId:"sc-7s2wt6-1"})(["position:absolute;top:10px;left:8px;"]),la=i.Ay.select.withConfig({componentId:"sc-7s2wt6-2"})(["cursor:pointer;appearance:none;border-radius:5px;font-size:var(--_kindlychat-font-size-m);border:1px solid #dedede;padding:8px 30px 8px 11px;position:relative;color:#2c2c2c;background:transparent;background-color:transparent;"," ",""],e=>e.$icon&&"padding-left: 30px;",N.sF);function ca(e){let{children:t,onClick:n=ia.A,onChange:r=ia.A,value:i,name:a,icon:s=!1,...l}=e;return o().createElement(aa,null,s&&o().createElement(sa,null,o().createElement(Oe.U,{width:16,height:16,crop:!0})),o().createElement(la,Object.assign({onClick:n,onChange:r,value:i,name:a,$icon:s},l),t))}var ua=n(628),da=n(9359);const pa=i.Ay.div.withConfig({componentId:"sc-g6reae-0"})(["height:100%;display:flex;flex-direction:column;justify-content:space-between;background:#fff;background-color:#fff;"]),fa=(0,i.AH)(["background-size:cover;background-position:center;background-image:url(",");"],e=>e.$welcomePageImage),ha=i.Ay.div.withConfig({componentId:"sc-g6reae-1"})(["flex:1;height:100%;max-height:250px;padding:18px 18px 0;background:",";background-color:",";",";"],e=>e.theme.headerBackground,e=>e.theme.headerBackground,e=>e.$welcomePageImage&&fa),ma=i.Ay.div.withConfig({componentId:"sc-g6reae-2"})(["flex:1;padding:15px 24px 24px;border-top:5px solid ",";@media ","{padding:24px;}"],e=>e.theme.headerBackground,a.jO.maxTablet),ga=i.Ay.div.withConfig({componentId:"sc-g6reae-3"})(["height:100%;display:flex;flex-direction:column;justify-content:space-between;"]),ba=i.Ay.div.withConfig({componentId:"sc-g6reae-4"})(["padding:20px 0;"]),va=i.Ay.div.withConfig({componentId:"sc-g6reae-5"})(["display:flex;flex-direction:column;gap:10px;margin:24px;justify-content:space-between;"," button:first-child{@media ","{min-width:unset;}}"],e=>{const t=e.theme.background,n=(0,he.SW)(t),r=n?`color-mix(in srgb, ${t} 96%, black)`:`color-mix(in srgb, ${t} 96%, white)`;return e.$complianceEnabled&&(0,i.AH)(["margin:0;padding:24px;border-top:1px solid rgba(0,0,0,0.02);color:",";background-color:",";"],n?`${a.AV.dark}`:`${a.AV.light}`,r)},a.jO.maxTablet),ya=((0,i.Ay)(ae.$n).withConfig({componentId:"sc-g6reae-6"})(["display:flex;align-items:center;padding:7px;color:",";background:",";background-color:",";border-color:",";border-radius:100px;"],e=>e.theme.buttonText,e=>e.theme.buttonBackground,e=>e.theme.buttonBackground,e=>e.theme.buttonBackground),(0,i.Ay)(y.H2).withConfig({componentId:"sc-g6reae-7"})(["font-weight:500;font-size:var(--_kindlychat-font-size-h3);margin:0 0 15px;"])),wa=i.Ay.div.withConfig({componentId:"sc-g6reae-8"})(["max-height:180px;overflow:hidden;font-size:var(--_kindlychat-font-size-m);margin:30px 0 10px 0;line-height:24px;overflow-y:auto;div{& > :first-child{margin-top:0;}& > :last-child{margin-bottom:0;}a{color:#0000c6;}a:visited{color:#5b096e;}}strong{font-weight:500;}"]);var xa=n(3886),Ea=n(1897);const ka=(0,i.AH)(["display:flex;flex-direction:column;gap:10px;font-size:13px;justify-content:space-between;a{color:currentColor;text-decoration:underline;text-underline-offset:2px;}"]),Aa=(0,i.AH)(["",""],e=>{const t=e.theme.background,n=(0,he.SW)(t),r=n?`color-mix(in srgb, ${t} 96%, black)`:`color-mix(in srgb, ${t} 96%, white)`;return(0,i.AH)(["color:",";background-color:",";"],n?`${a.AV.dark}`:`${a.AV.light}`,r)}),_a=i.Ay.div.withConfig({componentId:"sc-8v2qcc-0"})([""," ",""],ka,Aa),Ca=(0,i.Ay)(di).withConfig({componentId:"sc-8v2qcc-1"})(["border-top-left-radius:0;border-top-right-radius:0;border:none;border-top:1px solid rgba(0,0,0,0.02);padding:24px;"," ",""],ka,Aa),Sa=i.Ay.div.withConfig({componentId:"sc-8v2qcc-2"})(["display:flex;align-items:start;gap:4px;font-weight:500;svg{flex-shrink:0;margin-top:2px;path{stroke-width:2;}}"]);function Ta(e){const t=(0,Vt.jL)();(0,r.useEffect)(()=>{e||t(G.RY)},[e,t])}function Ia(e){let{descriptionTextHtml:t}=e;const n=(0,Vt.jL)();return(0,r.useEffect)(()=>{n((0,Ea.Er)({wasShown:!0}))},[n]),Ta(t),o().createElement(_a,null,o().createElement("span",{dangerouslySetInnerHTML:{__html:t||""}}))}function Oa(e){let{descriptionTextHtml:t,buttonText:n,accessRequestText:r}=e;const i=(0,Vt.jL)(),{complianceWasRevoked:a}=(0,Vt.GV)(e=>e.chatbubble);return Ta(t),o().createElement(Ca,null,a&&o().createElement(Sa,null,o().createElement(xa.A,{size:16}),r),o().createElement("span",{dangerouslySetInnerHTML:{__html:t||""}}),o().createElement(Vo.A,{type:"button",onClick:()=>{i((0,G.Sz)())}},n))}const La=(e,t)=>({header:(0,Rr.A)(e.header,t),text:(0,Rr.A)(e.text,t),start_button:(0,Rr.A)(e.start_button,t)});function Ma(){const{fullscreenMode:e}=ti.Z,t=(0,Vt.jL)(),n=(0,c.Pj)().getState(),[i,a]=(0,r.useState)(!1),{currentLanguageCode:s,supportedLanguages:l}=(0,pe.A)(),{welcomePage:d,welcomePageType:p,isTextDirectionRtl:f}=(0,Vt.GV)(u.Od),{active:h}=(0,Vt.GV)(e=>{let{chatbubble:t}=e;return t}),{descriptionTextHtml:m,buttonText:g,isEnabled:b,requireAgreement:v}=(0,da.A)(s),y=!e,w=f?"rtl":void 0,x=(0,r.useCallback)(e=>{e&&h&&setTimeout(()=>{e.focus()},0)},[h]),E=d?La(d,s):{header:"",text:"",start_button:""},k=E.start_button||"Start chat",A=b&&v?g:k;return o().createElement(o().Fragment,null,o().createElement(pa,null,o().createElement(ha,{$welcomePageImage:"PICTURE"===p&&d.image},y&&o().createElement(No.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(ma,null,o().createElement(ga,{dir:w},o().createElement("div",null,l.length>1&&o().createElement(ca,{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"},l.map(e=>o().createElement("option",{key:e.code,label:e.name_local,value:e.code},e.name_local))),o().createElement(ba,null,o().createElement(ya,null,E.header),o().createElement(wa,null,E.text&&(0,qt.A)(E.text)))))),o().createElement(va,{$complianceEnabled:b},b&&o().createElement(Ia,{descriptionTextHtml:m}),o().createElement(Vo.A,{cy:"start-chat-button",type:"button",title:A,onClick:()=>{a(!0),(0,Ie.tf)("welcome-page-start-chat",void 0,{storeState:n}),t((0,G.L4)(s)),t((0,G.mN)()),b&&v&&t((0,ua.Sz)())},loading:i,ref:x},A))))}function $a(e){var t,n;let{endChat:r,feedbackToSubmit:i}=e;const a=(0,c.wA)(),{hideHeader:s}=(0,c.d4)(u.Od),{whitelabelEnabled:l}=(0,c.d4)(u.Od),d=(0,dn.A)(),{overlayViews:p}=(0,c.d4)(u.$P),f=p[p.length-1],h=s||"WELCOME_PAGE"===f,m=()=>{a((0,G.i1)())};return o().createElement(Pi,{$fullHeight:h},"WELCOME_PAGE"===f&&o().createElement(Ma,null),_()(t=["GENERIC","SELECT_DOWNLOAD","SELECT_LANGUAGE","DELETED_CHAT","DELETE_CHAT_CONFIRMATION"]).call(t,f)&&o().createElement(Di,null,_()(n=["GENERIC","SELECT_DOWNLOAD","SELECT_LANGUAGE"]).call(n,f)?o().createElement(zi,null,"GENERIC"===f&&o().createElement(Qi,null),"SELECT_DOWNLOAD"===f&&o().createElement(Xi,{textContent:d,onNavigateBack:m}),"SELECT_LANGUAGE"===f&&o().createElement(oa,{onNavigateBack:m})):o().createElement(Fi,null,"DELETE_CHAT_CONFIRMATION"===f&&o().createElement(Wi,{onNavigateBack:m,textContent:d}),"DELETED_CHAT"===f&&o().createElement(Vi,{textContent:d})),o().createElement(Ui,null,!l&&o().createElement(Ko,null))),"CANCEL_CHAT"===f&&o().createElement(ei,{endChat:r}),"FEEDBACK"===f&&i&&o().createElement(Mi,{isFullHeight:!0,shouldEndChat:!0,feedbackToSubmit:i,endChat:r}),"ABOUT_CHAT"===f&&o().createElement(Uo,null))}const Na=i.Ay.div.withConfig({componentId:"sc-1272hyw-0"})(["display:flex;flex-direction:column;align-items:center;background:",";background-color:",";padding:1px 0 0;"," span{background:",";background-color:",";width:90%;height:1px;z-index:21;}"],e=>e.theme.background,e=>e.theme.background,ae.D7,a.Tj.borderColorDarkGray,a.Tj.borderColorDarkGray),Ra=i.Ay.form.withConfig({componentId:"sc-1272hyw-1"})(["display:flex;flex-direction:column;width:100%;padding:0 24px 20px;input{margin-right:24px;border:1px solid rgba(0,0,0,0);:focus{border:1px solid rgba(0,0,0,0);}:invalid{","}}"],e=>{let{$hasSubmitted:t}=e;return t&&"border-color: red;"}),Pa=(0,i.Ay)(ae.$n).withConfig({componentId:"sc-1272hyw-2"})(["min-height:25px;display:flex;align-items:center;font-size:var(--_kindlychat-font-size-h4);padding:0;&:hover{opacity:0.8;}"]),ja=i.Ay.div.withConfig({componentId:"sc-1272hyw-3"})(["display:flex;margin:4px 0 5px;color:",";font-size:var(--_kindlychat-font-size-p);align-items:center;"],e=>{let{theme:t}=e;return(0,he.w5)(t.background,"white","black")}),Da=i.Ay.div.withConfig({componentId:"sc-1272hyw-4"})(["display:flex;justify-content:space-between;align-items:center;button:first-child{margin-right:8px;}div + button{margin-left:12px;}"]),za=i.Ay.input.withConfig({componentId:"sc-1272hyw-5"})(["",""],ae.hF),Fa=Object.freeze({EMAIL:"email",PHONE:"phone_number"});function Ba(e,t){var n,s;const l=(0,Vt.jL)(),{contactDetailsButton:c,currentModal:d}=(0,Vt.GV)(u.$P),[p,f]=(0,r.useState)(""),[h,m]=(0,r.useState)(!1),g=(0,r.useRef)(null),b=(0,i.DP)(),v=null==c||null===(n=c.contact_details)||void 0===n?void 0:n.contact_type,{label:y,placeholder:w}=null!==(s=null==c?void 0:c.contact_details)&&void 0!==s?s:{},x=(0,r.useMemo)(()=>(0,he.w5)(b.background,a.Tj.grayColor,a.Tj.darkColor),[b.background]),E=()=>{l((0,G.V$)())};return o().createElement(Na,{ref:t,inert:d?"":void 0},o().createElement("span",null),o().createElement(Ra,{$hasSubmitted:h},o().createElement(ja,null,v&&o().createElement(Pa,{"aria-label":"Cancel entering details",title:"Cancel entering details",type:"button",onClick:E,"data-testid":"minimize-chat-button","data-cy":"minimize-chat-button"},o().createElement(Oe.US,{width:25,height:12,color:x})),y),o().createElement(Da,null,o().createElement(ae.A0,null,o().createElement(za,{onChange:e=>{f(e.target.value)},value:p,type:v===Fa.EMAIL?"email":"tel",ref:g,placeholder:w,required:!0})),o().createElement(go,{onClick:e=>{var t,n;return m(!0),!(null==g||null===(t=g.current)||void 0===t||null===(n=t.validity)||void 0===n||!n.valid||(e.preventDefault(),l((0,G.j3)(c,p)),E(),1))},type:"submit",$active:!0,title:"Send your "+(v===Fa.EMAIL?"email address":"phone number"),"data-testid":"send-contact-details-button"},o().createElement(Oe.qx,{width:24,height:24})))))}const Ha=(0,r.forwardRef)(Ba);var Ua=n(4095);const Va=i.Ay.div.withConfig({componentId:"sc-14jnerp-0"})(["left:0;right:0;top:","px;z-index:15;position:absolute;background:",";background-color:",";box-shadow:0px 3px 4px -1px ",";",";"],No.$A,e=>e.theme.headerBackground,e=>e.theme.headerBackground,a.Tj.shadowColor,W.yu),Ga=i.Ay.div.withConfig({componentId:"sc-14jnerp-1"})(["display:flex;padding:5px 18px;justify-content:space-between;align-items:center;border-top:1px solid rgba(0,0,0,0.1);transition:opacity 0.3s ease;","[inert] &{opacity:0.4;}"],Va),Wa=i.Ay.span.withConfig({componentId:"sc-14jnerp-2"})(["font-weight:600;"]),qa=(0,i.Ay)(y.H3).withConfig({componentId:"sc-14jnerp-3"})(["margin:0;color:",";"," font-size:var(--_kindlychat-font-size-m);font-weight:normal;line-height:24px;"],e=>e.theme.headerText,e=>{let{$shouldTruncate:t}=e;return t&&"white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"}),Ka=(0,i.Ay)(ae.N_).withConfig({componentId:"sc-14jnerp-4"})(["color:",";",""],e=>e.theme.headerText,e=>{let{$dontShrink:t}=e;return t&&"flex-shrink: 0;"}),Ya=(0,i.i7)(["from{background-position:-180px;}to{background-position:180px;}"]),Xa=(0,i.i7)(["from{background-position:180px;}to{background-position:-180px;}"]),Za=i.Ay.div.withConfig({componentId:"sc-14jnerp-5"})(["position:relative;border:0;"]),Ja=i.Ay.span.withConfig({componentId:"sc-14jnerp-6"})(["opacity:1;height:3px;width:100%;position:absolute;background-image:linear-gradient( 90deg,rgba(255,255,255,0) 25%,"," 45%,"," 55%,rgba(255,255,255,0) 75% );animation:1.3s linear "," infinite 0s;"],e=>e.theme.headerBackground,e=>e.theme.headerBackground,e=>{let{hasCancelled:t}=e;return t?Xa:Ya}),Qa=3e3;let es,ts;function ns(e){let{waitTimeInMinutes:t,queuePosition:n,handoverQueueText:r,estimatedTimeText:i,queuePositionText:a}=e;return Number.isInteger(n)&&a?o().createElement("span",null,a,": ",o().createElement(Wa,null,n)):Number.isInteger(t)&&i?o().createElement("span",null,i," ",o().createElement(Wa,null,t," min")):o().createElement("span",null,r)}function rs(){const[e,t]=(0,r.useState)(!1),{currentLanguageCode:n}=(0,pe.A)(),{botKey:i,currentModal:a}=(0,c.d4)(u.$P),{showTakeoverQueue:s}=(0,c.d4)(u.Od),{requestedHandoverAt:l,handoverWaitTimeEstimate:d,handoverQueuePosition:p,takeoverClosed:f,takenOver:h,name:m}=(0,c.d4)(u.MA),g=(0,c.wA)();(0,r.useEffect)(()=>{ts!==h&&h?(es=n,ts=h):void 0===es||es===n||h||(g((0,G.zX)(i,!0)),es=void 0,ts=void 0)},[f,h,l,i,n,g]);const{takeover_queue_text:b,takeover_queue_link:v,leave_queue_text:y,leave_queue_link:w,estimated_time_text:x,queue_position_text:E,chatting_with_agent_text:k,user_end_handover_button_text:A}=(0,dn.A)();if((0,r.useEffect)(()=>{const n=setTimeout(()=>{e&&(g((0,G.cL)()),t(!1))},Qa);return e||clearTimeout(n),()=>clearTimeout(n)},[e,g]),h){const e=`${k} ${m||"a human"}`;return o().createElement(Va,{inert:a?"":void 0},o().createElement(Ga,null,o().createElement(qa,{$shouldTruncate:!0,title:e},e)," ",o().createElement(Ka,{$dontShrink:!0,onClick:()=>g((0,G.zn)("END_HANDOVER"))},A)))}if(!s)return null;if(!Boolean(l)||f||h)return null;const _="number"==typeof d?Math.max((C=d,Math.ceil(C/60/1e3)),1):void 0;var C;return o().createElement(Va,null,o().createElement(Ga,{"aria-live":"polite","aria-atomic":"true","data-testid":"handover-queue"},e?o().createElement(o().Fragment,null,o().createElement(qa,null,y),o().createElement(Ka,{onClick:()=>t(!1),"data-testid":"handover-queue-link"},w)):o().createElement(o().Fragment,null,o().createElement(qa,null,o().createElement(ns,{estimatedTimeText:x,handoverQueueText:b,queuePositionText:E,queuePosition:p,waitTimeInMinutes:_})),o().createElement(Ka,{onClick:()=>t(!0),"data-testid":"handover-queue-link"},v))),o().createElement(Za,null,o().createElement(Ja,{hasCancelled:e})))}const os=(0,i.i7)(["0%{opacity:0;transform:translateY(-6px);}60%{transform:translateY(2px);}100%{opacity:1;transform:translateY(0);}"]),is=(0,i.AH)(["",";animation-name:",";"],(0,W.qL)(),os),as=i.Ay.div.withConfig({componentId:"sc-fbtzdd-0"})(["z-index:25;margin:8px;display:flex;padding:6px;justify-content:space-between;border-radius:6px;background-color:white;color:",";box-shadow:0px 0px 1px rgba(0,0,0,0.24),0px 2px 6px rgba(0,0,0,0.04);max-height:1000px;max-width:",";width:calc(100% - 16px);margin-left:auto;margin-right:auto;position:absolute;left:0;right:0;top:0;",";",";&[inert]{user-select:none;}"],a.Tj.primaryColor,a.mb.tablet,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 `},is),ss=i.Ay.div.withConfig({componentId:"sc-fbtzdd-1"})(["flex:0;flex-basis:auto;align-self:center;margin-left:6px;margin-right:6px;"]),ls=(0,i.Ay)(y.fz).withConfig({componentId:"sc-fbtzdd-2"})(["flex:1;margin:0;font-size:var(--_kindlychat-font-size-p);display:inline-block;padding:6px;"]),cs=(0,i.Ay)(Vo.A).withConfig({componentId:"sc-fbtzdd-3"})(["margin-top:8px;font-weight:500;font-size:var(--_kindlychat-font-size-p);"]),us=(0,i.Ay)(ae.$n).withConfig({componentId:"sc-fbtzdd-4"})(["flex:0;flex-basis:auto;z-index:15;display:flex;padding:0;height:fit-content;align-content:flex-start;flex-direction:column;&:hover{opacity:0.8;}"]),ds=n(9907).env.STORYBOOK?0:2e3,ps=i.Ay.button.withConfig({componentId:"sc-iju6vd-0"})(["border:none;margin:0;text-decoration:none;font-family:inherit;font-size:inherit;line-height:inherit;cursor:pointer;transition:background 250ms ease-in-out,transform 150ms ease;appearance:none;&:hover,&:focus{background:#edf2f7;}&:focus{outline:medium auto currentColor;outline:5px auto -webkit-focus-ring-color;}background:#f7fafc;border-radius:4px;display:inline-block;svg{vertical-align:sub;}"]),fs=function(e){let{children:t,href:n,fallback:r,...i}=e;const a=(s=(0,c.wA)(),{"#settings/language-select":{icon:o().createElement(Oe.Ze,{width:16,height:16}),onClick:()=>{s((0,G.wQ)("SELECT_LANGUAGE")),s((0,G.Fe)(l.Jm.LANGUAGE_SWITCH))}}})[n];var s;return a?o().createElement(ps,Object.assign({},i,{onClick:a.onClick}),a.icon," ",t):r||null},hs={language:Oe.U};function ms(){const{chatHasStarted:e,overlayViews:t}=(0,c.d4)(u.$P),n=function(e){const[t,n]=(0,r.useState)(!0);return(0,r.useEffect)(()=>{const t=setTimeout(()=>n(!1),e);return()=>clearTimeout(t)},[e]),e=>!t&&e()}(e?0:ds),{notifications:i}=(0,c.d4)(u.Hk),a=t.length>0,s=i.filter(e=>!e.dismissed).slice(-3),l=(0,c.wA)(),d=a,p=e=>t=>{t.stopPropagation(),l((0,G.Fe)(e))};if(null==s||!s.length)return null;const f=s.length;return n(()=>o().createElement(o().Fragment,null,s.map((e,t)=>{let{id:n,content:r,buttonHref:i,buttonText:a,icon:s}=e;const l=t===f-1,c=l?void 0:-1,u=hs[s];return o().createElement(as,{"aria-live":l?"polite":void 0,"aria-atomic":l?"true":void 0,"aria-hidden":l?void 0:"true",inert:l?void 0:"",role:l?"alert":void 0,tabIndex:c,$hasTopMargin:d,$index:t,$quantity:f,key:n},u&&o().createElement(ss,null,o().createElement(u,{width:24,height:24})),o().createElement(ls,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 i=/\[([^\\\]]+(?:\\.[^\\\]]*)*)\]\(([^)]+)\)/g;let a=i.exec(e);for(;null!==a;){const s=a[1],l=a[2];r(e.substring(n,a.index)),t.push(o().createElement(fs,{key:n+a.index,href:l,fallback:`[${s}](${l})`},s)),n=a.index+a[0].length,a=i.exec(e)}return r(e.substring(n)),t}(r),i&&a&&o().createElement(cs,{href:i,tabIndex:c,isSecondaryButton:!0},a)),o().createElement(us,{"aria-label":"Dismiss notification",title:"Dismiss notification",onClick:p(n),disabled:!l,type:"button"},o().createElement(Oe.WI,null)))})))}var gs=n(8560),bs=n(5353);const vs=(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)()?l.Je.WEB_MOBILE:l.Je.WEB,currentLanguage:r,from_bot:!1,sender:l.bS.USER,...(0,Bn.A)("buttonType","buttons")(e)}},{focusTrapOnFullView:ys}=ti.Z,ws=["SCRIPT","STYLE","LINK","META"],xs=()=>{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)||_()(ws).call(ws,e.tagName)||e.hasAttribute("inert")||(e.setAttribute("inert",""),e.setAttribute("data-kindly-inert",""))})},Es=()=>{document.querySelectorAll("[data-kindly-inert]").forEach(e=>{e.removeAttribute("inert"),e.removeAttribute("data-kindly-inert")})},ks=(0,i.Ay)(di).withConfig({componentId:"sc-19qip4y-0"})(["display:flex;min-height:",";padding:16px;gap:24px;flex-direction:column;justify-content:",";border-radius:",";",";view-transition-name:'feedback-end-chat-1723461511841';"],e=>{let{$isFullHeight:t}=e;return t?"100%":"clamp(120px, 25%, 600px)"},e=>{let{$isFullHeight:t,$justifyCenter:n}=e;return t||n?"center":"space-between"},e=>{let{$isFullHeight:t}=e;return t&&"unset"},e=>{let{$isFullHeight:t}=e;return t&&"border: none"});var As=n(1193);const _s=()=>o().createElement(ks,null,o().createElement(As.A,null));function Cs(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,i.Ay)(di).withConfig({componentId:"sc-1e1ck6u-0"})(["display:flex;gap:24px;flex-direction:column;"]),Ts=i.Ay.div.withConfig({componentId:"sc-1e1ck6u-1"})(["display:flex;gap:8px;flex-direction:column;font-size:var(--_kindlychat-font-size-p);> p{margin:0;}"]),Is=i.Ay.h3.withConfig({componentId:"sc-1e1ck6u-2"})(["margin:0;display:flex;gap:4px;align-items:center;font-size:var(--_kindlychat-font-size-p);font-weight:500;"]),Os=i.Ay.div.withConfig({componentId:"sc-1e1ck6u-3"})(["display:flex;gap:8px;> button{flex:1;}"]);function Ls(e){let{handleCancel:t,handleEndHumanChat:n,descriptionText:r,titleText:i,cancelButtonText:a,confirmButtonText:s}=e;return o().createElement(Ss,null,o().createElement(Ts,null,o().createElement(Is,null,o().createElement(Cs,{color:"var(--panel-background-white-black-contrast-1743170834)"}),i),o().createElement("p",null,r)),o().createElement(Os,null,o().createElement(Vo.A,{isSecondaryButton:!0,onClick:t},a),o().createElement(Vo.A,{onClick:n},s)))}function Ms(e){let{buttonHandlers:t,onMessage:n=null}=e;const i=(0,c.Pj)(),a=(0,Vt.jL)(),s=(0,r.useRef)(null),l=(0,r.useRef)(null),d=(0,r.useRef)(null),{hideHeader:p,fullscreenMode:f,offsetHeight:h,id:m}=(0,Vt.GV)(u.Od),{active:g,chatHasStarted:b,currentlyPoppedUp:v,contactDetailsButton:y,currentLanguage:w,currentModal:x,overlayViews:E,isChatFullWindow:k}=(0,Vt.GV)(e=>{let{chatbubble:t}=e;return t}),{chatMessages:A}=(0,Vt.GV)(e=>{let{messages:t}=e;return t}),_=function(e){const t=(0,V.A)(e),n=(e||[]).length;let r;return n&&n!==(t||[]).length&&(r=e[n-1]),r}(A),{feedbackToDisplay:C,feedbackToSubmit:S}=(0,gs.A)(),{cancel_button:T,user_end_handover_button_text:I,user_end_handover_modal_title_text:O,user_end_handover_modal_description_text:L}=(0,dn.A)(),[M,$]=(0,r.useState)(!0);(0,r.useEffect)(()=>{if(M)return void $(!1);if(!_)return;const e=i.getState(),{chatMessages:t,attachments:r}=e.messages,{chatId:o,renderedBy:a}=e.chatbubble,{token:s}=e.connection,{PAT_HOST:l}=e.environment,c=t.map(e=>(0,bs.A)(e,r,l,s)),u=(0,bs.A)(_,r,l,s);(0,Ie.GJ)(vs(u,{botId:m,currentLanguage:w,chatId:o}),c,n,a)},[M,n,_,m,i,A.length]);const N=A.length>=3,R=E[E.length-1],P=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"user";C&&"CANCEL_CHAT"===R&&N?(a((0,ii.WG)({ratingSystem:C.rating_scale.rating_system,triggerType:C.trigger_type,formTitle:C.form_title,step:"RATING_SCALE"})),a((0,G.wQ)("FEEDBACK"))):((0,Ie.tf)("end-chat",void 0,{storeState:i.getState(),source:e}),a((0,G.ky)(f)),a((0,G.zn)(null)))},{descriptionTextHtml:j,buttonText:D,accessRequestText:z}=(0,da.A)(w);return function(e){const{isChatFullWindow:t,renderedBy:n}=(0,c.d4)(u.$P),o=(0,r.useRef)();(0,r.useEffect)(()=>{if(e.current&&ys&&"API"===n)return o.current!==t&&(o.current=t,t?xs():Es()),Es},[e,t])}(d),o().createElement(oe,{"aria-live":"polite","data-cy":"chat-box","data-testid":"chat-box",ref:d,$active:g,$chatHasStarted:b,$fullscreen:!!f,$isChatFullWindow:k,$offsetHeight:h},o().createElement(Ua.A,{errorPoint:"inside ChatBoxContainer"},!p&&o().createElement(Ro,{handleXButtonClick:()=>{"CANCEL_CHAT"!==R&&"FEEDBACK"!==R?a((0,G.wQ)("CANCEL_CHAT")):P()},settingsButtonRef:l}),!!R&&o().createElement($a,{endChat:P,feedbackToSubmit:S}),o().createElement(ue,null),o().createElement(rs,null),o().createElement(ms,null),o().createElement(to,{bodyRef:s,buttonHandlers:t,inert:!!R||!!x}),y?o().createElement(Ha,null):o().createElement(Lo,{active:g,chatHasStarted:b,currentlyPoppedUp:v,bodyRef:s,inert:!!R||!!x}),"FEEDBACK_END_CHAT"===x&&o().createElement(_s,null),"END_HANDOVER"===x&&o().createElement(Ls,{handleCancel:()=>a((0,G.zn)(null)),handleEndHumanChat:async()=>{await a((0,G.m8)()),a((0,G.zn)(null))},titleText:null!=O?O:"",descriptionText:null!=L?L:"",cancelButtonText:null!=T?T:"",confirmButtonText:null!=I?I:""}),"COMPLIANCE"===x&&o().createElement(Oa,{descriptionTextHtml:j,buttonText:D,accessRequestText:z}),("END_CHAT"===x||"handover_conversation"===(null==S?void 0:S.trigger_type)&&"FEEDBACK_END_HANDOVER"===x)&&o().createElement(Mi,{feedbackToSubmit:S,shouldEndChat:!("END_CHAT"!==x),endChat:P})))}Ms.displayName="KindlyChatBox";var $s=n(1872);const Ns=(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,Rr.A)(o,t)}},{}),Rs=Object.freeze({en:e=>`New message from ${e}`,nb:e=>`Ny melding fra ${e}`,sv:e=>`Nytt meddelande från ${e}`}),Ps=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 Ds(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(7437);const Fs=()=>{const{takenOver:e,requestedHandoverAt:t}=(0,Vt.GV)(u.MA),n=(0,V.A)(e),o=(0,V.A)(t),i=(0,Vt.jL)(),a=Boolean(t),s=Boolean(o);(0,r.useEffect)(()=>{e&&!n?i((0,zs.f2)()):!e&&n&&(0,zs.yh)(),a&&!s?i((0,zs.Mk)()):!a&&s&&(0,zs.Zk)()},[i,s,n,a,e])};var Bs=n(5629),Hs=n(9017),Us=n(8681);const Vs=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,Us.A)(n)]:r}},{})};function Gs(e){let{settings:t}=e;const n=(0,Vt.jL)(),{currentLanguageCode:i}=(0,pe.A)(),{inspectorOpen:a}=(0,Vt.GV)(e=>{let{inspector:t}=e;return t}),{chatMessages:d}=(0,Vt.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,Hs.A)(t,"zIndex",l.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,Bs.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:i}=(0,c.d4)(u.MA),{agent:a}=(0,c.d4)(u.zD),s=(0,V.A)(i);(0,r.useEffect)(()=>{var r;e&&n&&Ds((null!==(r=null==Rs?void 0:Rs[o])&&void 0!==r?r:Rs.en)(t||"Kindly"))},[o,e,n,t]),(0,r.useEffect)(()=>{const e=Boolean(null==a?void 0:a.name);var t;s!==i&&i&&e&&Ds(null!==(t=null==Ps?void 0:Ps[o])&&void 0!==t?t:Ps.en)},[i,a,s,o])}(),function(){const e=(0,Vt.jL)(),{currentLanguage:t,active:n}=(0,Vt.GV)(u.$P),{maintenanceAlertEnabled:o,maintenanceAlert:i}=(0,Vt.GV)(u.Od);(0,r.useEffect)(()=>{if(!n||!o)return;const{text_content:r,link_location:a,link_text:s}=Ns(i,t);e((0,G.cC)({content:r,buttonText:s,buttonHref:a,once:!0},l.Jm.MAINTENANCE))},[n,t,e,i,o])}(),Fs(),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,i=()=>{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,Po.w7)(e)),e?o.classList.add("kindly-overflow-hidden"):o.classList.remove("kindly-overflow-hidden")})(e))};setTimeout(()=>i(),$s.X+10);const a=new ResizeObserver(i);return a.observe(r),()=>{t((0,Po.w7)(!1)),o.classList.remove("kindly-overflow-hidden"),a.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,Vt.jL)(),{chatHasStarted:t}=(0,Vt.GV)(e=>{let{chatbubble:t}=e;return t}),{welcomePageType:n}=(0,Vt.GV)(u.Od);(0,r.useEffect)(()=>{!t&&n!==l.Lb.NONE&&e((0,G.wQ)("WELCOME_PAGE"))},[t,n,e])}();const g=(0,r.useMemo)(()=>Vs(t.buttonHandlers),[t.buttonHandlers]);return o().createElement(s,{id:"chatContainer",ref:p,className:"chat-container",role:"complementary",$zIndex:m,"data-testid":"chat-box-container",lang:i,$inspectorOpen:a},o().createElement(Ms,{buttonHandlers:g,onMessage:t.onMessage}),a&&o().createElement(ie,null))}},1037:(e,t,n)=>{"use strict";var r=n(8655),o=n(9989).f,i=r("metadata"),a=Function.prototype;void 0===a[i]&&o(a,i,{value:null})},1085:(e,t,n)=>{"use strict";e.exports=n(3335)},1100:e=>{"use strict";e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},1112:(e,t,n)=>{"use strict";n.d(t,{Du:()=>l,Mb:()=>u,cL:()=>c,mw:()=>d});var r=n(2221),o=n(4851),i=n(628),a=n(7437),s=n(8679);const l=e=>async t=>{const n=await e;200===(null==n?void 0:n.status)&&(t({type:s.nz,...n}),t((0,a.uK)()))},c=()=>(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:a}}=t();e((0,i.et)(`${a}/chatbubble/${r.Ak}/takeover_cancel/`,{method:"POST",...(0,o.A)({token:n})})),e({type:s.MM})},u=()=>(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:a}}=t();e({type:s.c6}),e((0,i.et)(`${a}/chatbubble/${r.Ak}/user_started_typing/`,{method:"POST",...(0,o.A)({token:n})}))},d=()=>(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:a}}=t();e({type:s.we}),e((0,i.et)(`${a}/chatbubble/${r.Ak}/user_stopped_typing/`,{method:"POST",...(0,o.A)({token:n})}))}},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)}},1193:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var r=n(9155),o=n.n(r),i=n(9223),a=n(8560),s=n(6343),l=n(7182),c=n(5767),u=n(3864);const d=u.Ay.div.withConfig({componentId:"sc-embwe2-0"})(["font-weight:500;"]),p=u.Ay.div.withConfig({componentId:"sc-embwe2-1"})(["display:flex;flex-direction:column;justify-content:space-between;gap:24px;flex:1;"]),f=u.Ay.div.withConfig({componentId:"sc-embwe2-2"})(["display:flex;flex-direction:column;gap:8px;font-size:var(--_kindlychat-font-size-sm);line-height:20px;"]),h=u.Ay.div.withConfig({componentId:"sc-embwe2-3"})(["display:grid;grid-template-columns:1fr 1fr;gap:8px;"]),m=()=>{const{feedbackToSubmit:e}=(0,a.A)(),t=(0,l.jL)();return null!=e&&e.timeout?o().createElement(p,null,o().createElement(f,null,o().createElement(d,null,e.timeout.title),o().createElement("div",null,e.timeout.message)),o().createElement(h,null,o().createElement(i.A,{isSecondaryButton:!0,onClick:()=>{t((0,s.wQ)("FEEDBACK")),t((0,s.zn)(null)),t((0,c.ZG)("timeout"))}},e.timeout.end_conversation_text),o().createElement(i.A,{onClick:()=>{t((0,c.Dz)()),t((0,s.zn)(null))}},e.timeout.continue_conversation_text))):null}},1203:e=>{"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},1210:(e,t,n)=>{"use strict";var r=n(9098),o=n(1003),i=n(7013),a=n(4713),s=n(6100),l=n(1203),c=n(2769),u=n(6281),d=n(5148),p=n(7785),f=n(4603),h=String,m=o("JSON","stringify"),g=s(/./.exec),b=s("".charAt),v=s("".charCodeAt),y=s("".replace),w=s(1.1.toString),x=/[\uD800-\uDFFF]/g,E=/^[\uD800-\uDBFF]$/,k=/^[\uDC00-\uDFFF]$/,A=!f||l(function(){var e=o("Symbol")("stringify detection");return"[null]"!==m([e])||"{}"!==m({a:e})||"{}"!==m(Object(e))}),_=l(function(){return'"\\udf06\\ud834"'!==m("\udf06\ud834")||'"\\udead"'!==m("\udead")}),C=function(e,t){var n=d(arguments),r=p(t);if(c(r)||void 0!==e&&!u(e))return n[1]=function(e,t){if(c(r)&&(t=a(r,this,h(e),t)),!u(t))return t},i(m,null,n)},S=function(e,t,n){var r=b(n,t-1),o=b(n,t+1);return g(E,e)&&!g(k,o)||g(k,e)&&!g(E,r)?"\\u"+w(v(e,0),16):e};m&&r({target:"JSON",stat:!0,arity:3,forced:A||_},{stringify:function(e,t,n){var r=d(arguments),o=i(A?C:m,null,r);return _&&"string"==typeof o?y(o,x,S):o}})},1249:(e,t,n)=>{"use strict";var r=n(1003),o=n(4531),i=n(1811);o("toStringTag"),i(r("Symbol"),"Symbol")},1268:(e,t,n)=>{"use strict";var r=n(6100),o=0,i=Math.random(),a=r(1.1.toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++o+i,36)}},1305:(e,t,n)=>{"use strict";var r=n(8684);e.exports=r},1314:(e,t,n)=>{"use strict";var r=n(8900),o=n(2769),i=r.WeakMap;e.exports=o(i)&&/native code/.test(String(i))},1328:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(541),o=n(5096),i=n(1695);function a(){var e;const{supportedLanguages:t}=o.Z,{includeDisabledLanguages:n}=(0,r.d4)(i.Od),{currentLanguage:a}=(0,r.d4)(i.$P),s=null===(e=t.find(e=>{let{is_primary:t}=e;return t}))||void 0===e?void 0:e.code;if(!s)throw new Error("No primary language found in supported languages");const l=t.filter(e=>{let{is_active:t}=e;return t});return{primaryLanguageCode:s,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})},1342:(e,t,n)=>{"use strict";n(8293)},1346:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(9155),o=n.n(r);function i(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"}))}},1355:(e,t,n)=>{"use strict";var r=n(8655);t.f=r},1363:(e,t,n)=>{var r=n(2471).default,o=n(3230);e.exports=function(e){var t=o(e,"string");return"symbol"==r(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},1395:(e,t,n)=>{"use strict";var r=n(6100),o=n(1203),i=n(7551),a=Object,s=r("".split);e.exports=o(function(){return!a("z").propertyIsEnumerable(0)})?function(e){return"String"===i(e)?s(e,""):a(e)}:a},1435:(e,t,n)=>{"use strict";n.d(t,{Gb:()=>r.A,cS:()=>E.A,ZH:()=>Q,pd:()=>w,l6:()=>S,Ap:()=>x.A,TM:()=>ee.A});var r=n(9662),o=n(9155),i=n.n(o),a=n(824),s=n(3864),l=n(3058),c=n(8035),u=n(6052),d=n(881);const p=s.Ay.div.withConfig({componentId:"sc-5nmogf-0"})(["position:relative;display:flex;"]),f=s.Ay.div.withConfig({componentId:"sc-5nmogf-1"})(["padding:0 4px;position:absolute;top:50%;transform:translateY(-50%);font-size:var(--_kindlychat-font-size-p);display:"," ",";"],e=>{let{$show:t}=e;return t?"block;":"none;"},e=>{let{$adornmentPosition:t}=e;return"start"===t?"\n left: 10px;\n ":"\n left: auto;\n right: 10px;\n "}),h=s.Ay.input.withConfig({componentId:"sc-5nmogf-2"})([""," color:var(--panel-background-white-black-contrast-1743170834);padding:10px 16px;"," font-size:var(--_kindlychat-font-size-p);border-radius:18px;border:1px solid transparent;flex:1;&:focus{color:var(--panel-background-white-black-contrast-1743170834);box-shadow:none;border:1px solid ",";","}&::placeholder{color:",";opacity:0.5;}&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{appearance:none;margin:0;}&[type='number']{-moz-appearance:textfield;}text-size-adjust:","%;",""],e=>{let{theme:t}=e;return(0,l.Mo)(t.panelBackground,.08)},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},e=>{let{theme:t}=e;return(0,u.w5)(t.panelBackground,"rgba(255, 255, 255, 0.12)","rgba(0, 0, 0, 0.12)")},l.sF,e=>{let{theme:t}=e;return(0,u.w5)(t.panelBackground,"#FFF","#000")},(0,l.L9)(c.J.p),d.jq);var m=n(9416),g=n(7318),b=n(587),v=n(8780),y=n(5814);const w=function(e){var t,n,r,s,l;let{autoComplete:c="off",name:u,type:d="text",register:w,validators:x,control:E,id:k,setError:A,clearErrors:_,trigger:C,adornment:S,adornmentPosition:T="end",...I}=e;const O=(0,y.G8)(x),L=(0,o.useRef)(null),{ref:M,onChange:$,...N}=w?w(u,O):{},[,R]=(0,o.useState)(!1),{errors:P,isSubmitted:j}=(0,a.lN)({name:u,control:E}),D=(0,b.A)({name:u,trigger:C,control:E,setError:A,clearErrors:_});return i().createElement(i().Fragment,null,i().createElement(p,null,S&&i().createElement(f,{ref:e=>{L.current=e,R(!0)},$show:!(null!==(t=O.maxLength)&&void 0!==t&&t.value&&"end"===T),$adornmentPosition:T},S),i().createElement(h,Object.assign({autoComplete:c,name:u,type:d.toLowerCase(),$adornmentPosition:T,$adornmentWidth:null===(n=L.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==$||$(e),D(e)},ref:M,"aria-errormessage":`error_${u}`,"aria-invalid":!(0,v.A)(P)&&j},I)),!(null===(s=O.maxLength)||void 0===s||!s.value)&&E&&u&&i().createElement(m.A,{fieldName:u,control:E,maxLength:null===(l=O.maxLength)||void 0===l?void 0:l.value})),i().createElement(g.A,{control:E,name:u}))};var x=n(6101),E=n(9910),k=n(6290);const A=s.Ay.div.withConfig({componentId:"sc-1ncnj7t-0"})(["position:relative;display:flex;"]),_=s.Ay.select.withConfig({componentId:"sc-1ncnj7t-1"})(["background-color:",";color:",";padding:9px 16px;padding-right:42px;border-radius:18px;border:1px solid transparent;outline:none;flex:1;display:inline-block;appearance:none;text-indent:1px;text-overflow:'';max-width:100%;& option{color:initial;}",""],e=>{let{theme:t}=e;return(0,l.Mo)(t.panelBackground,.08)},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")},d.jq),C=s.Ay.div.withConfig({componentId:"sc-1ncnj7t-2"})(["position:absolute;right:20px;top:6px;width:10px;height:6px;pointer-events:none;user-select:none;svg path{stroke:",";}"],e=>{let{theme:t}=e;return(0,u.w5)(t.panelBackground,"#FFFFFF","#000000")}),S=function(e){let{name:t,register:n,validators:r,control:o,id:s,setError:l,clearErrors:c,trigger:u,options:d,...p}=e;const f=(0,y.G8)(r),{ref:h,onChange:m,...v}=n?n(t,f):{},w=(0,a.FH)({name:t,control:o}),x=(0,b.A)({name:t,trigger:u,control:o,setError:l,clearErrors:c});return i().createElement(i().Fragment,null,i().createElement(A,null,i().createElement(_,Object.assign({name:t,type:"select",$isPlaceholder:""===w,id:s||t},(0,y.NR)(f),v&&{...v},{onChange:e=>{null==m||m(e),x(e)},ref:h},p),p.placeholder&&i().createElement("option",{value:"",disabled:!0,hidden:!0},p.placeholder),null==d?void 0:d.map((e,n)=>i().createElement("option",{key:`select-${t}-${e.id||n}`,value:e.value},e.label))),i().createElement(C,null,i().createElement(k.A,{color:"#445265"}))),i().createElement(g.A,{control:o,name:t}))};var T=n(9749),I=n.n(T),O=n(541),L=n(809),M=n(5781),$=n(2720),N=n(2221),R=n(491),P=n(1328),j=n(9886),D=n(1695),z=n(3699),F=n(6064);const B=s.Ay.div.withConfig({componentId:"sc-ansydw-0"})(["position:relative;display:flex;flex-direction:column;"]),H=s.Ay.label.withConfig({componentId:"sc-ansydw-1"})(["padding:","px;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;flex:1;border-radius:6px;color:var(--panel-background-white-black-contrast-1743170834);border:1px dashed ",";"," "," ",""],e=>{let{$hasError:t}=e;return t?13:24},e=>{let{theme:t}=e;return(0,u.w5)(t.panelBackground,t.buttonBackground,"rgba(0, 0, 0, 0.12)")},e=>{let{$hasError:t}=e;return t&&(0,s.AH)(["background-color:#f9ef94 !important;border:1px solid #f9ef94 !important;"])},d.jq,e=>{let{theme:t,$isOver:n}=e;return n&&(0,l.Mo)(t.panelBackground,.08)}),U=s.Ay.span.withConfig({componentId:"sc-ansydw-2"})(["font-size:var(--_kindlychat-font-size-sm);font-weight:500;pointer-events:none;line-height:16px;"]),V=s.Ay.input.withConfig({componentId:"sc-ansydw-3"})(["width:0.1px;height:0.1px;opacity:0;overflow:hidden;position:absolute;z-index:-1;"]),G=s.Ay.span.withConfig({componentId:"sc-ansydw-4"})(["color:",";"],e=>{let{theme:t}=e;return t.buttonBackground}),W=s.Ay.div.withConfig({componentId:"sc-ansydw-5"})(["margin-top:8px;display:flex;flex-direction:row;font-size:var(--_kindlychat-font-size-sm);color:var(--panel-background-white-black-contrast-1743170834);& svg > path{stroke:var(--panel-background-white-black-contrast-1743170834);}"]),q=s.Ay.div.withConfig({componentId:"sc-ansydw-6"})(["display:flex;flex-direction:column;& > div{word-break:normal;overflow-wrap:anywhere;}"]),K=s.Ay.div.withConfig({componentId:"sc-ansydw-7"})(["font-size:var(--_kindlychat-font-size-sm);"]),Y=s.Ay.div.withConfig({componentId:"sc-ansydw-8"})(["display:flex;flex-direction:row;align-items:center;margin-bottom:4px;line-height:16px;"]);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,s;let{name:l,label:c,register:u,validators:d,control:p,id:f,setError:h,trigger:m,setValue:w,clearErrors:x,accept:E=N.oY,...k}=e;const{text:A}=(0,O.d4)(D.Od),{currentLanguageCode:_}=(0,P.A)(),C=(0,y.G8)(d),S=(0,o.useRef)(null),T=(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))&&!I()(t).call(t,e.type.substring(0,e.type.indexOf("/")))))return`${(0,F.A)(A.file_supported_types,_)}: ${E}`}return""},[E,_,A.file_supported_types]),ee=(0,o.useCallback)(e=>e.length&&[...e].some(e=>e.size/z.aO>z.W7)?`${(0,F.A)(A.file_maximum_size,_)}: ${(0,z.B$)(z.W7*z.aO)}`:"",[_,A.file_maximum_size]),{ref:te,...ne}=u?u(l,C):{ref:void 0},re=(0,o.useRef)(null),{errors:oe,isSubmitted:ie}=(0,a.lN)({name:l,control:p}),ae=(0,j.A)(oe),se=(0,b.A)({name:l,trigger:m,control:p,setError:h,clearErrors:x}),[,le]=(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(t)||ee(e.dataTransfer.files);if(n)return null==h?void 0:h(l,{type:"custom",message:n});oe[l]&&(null==x||x(l)),ue(t);const r=Z(t);return null==w||w(l,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(t)||ee(e.target.files);if(n)return null==h?void 0:h(l,{type:"custom",message:n});oe[l]&&(null==x||x(l)),ue(t);const r=Z(t);return S.current&&null!=r&&r.files.length&&(S.current.files=r.files),se(e),!0},S.current),i().createElement(i().Fragment,null,i().createElement(B,null,i().createElement(H,{"aria-describedby":f||l,ref:e=>{re.current=e,le(void 0)},$hasError:(null==oe?void 0:oe[l])&&"required"!==(null==oe||null===(t=oe[l])||void 0===t?void 0:t.type),$isOver:de,htmlFor:f||l},(null===(n=oe||ae)||void 0===n||null===(r=n[l])||void 0===r?void 0:r.message)&&i().createElement(Y,null,i().createElement(L.Fc,{width:18,height:18}),i().createElement(K,null,null===(s=(oe||ae)[l])||void 0===s?void 0:s.message)),i().createElement(U,null,(e=>e.split(/\[(.*?)\]/).map((e,t)=>t%2!=0?i().createElement(G,{key:`file-${e}`},e):i().createElement("span",{key:`file-${e}`}," ",e)))(c)),i().createElement(V,Object.assign({multiple:!0,accept:E,name:l,type:"file",id:f||l},(0,y.NR)(C),ne&&{...ne},{ref:e=>{S.current=e,te&&te(e)},"aria-errormessage":`error_${l}`,"aria-invalid":!(0,v.A)(oe)&&ie,"aria-hidden":"true"},k))),i().createElement(W,null,(0,F.A)(A.file_limitation,_),i().createElement($.A,{text:i().createElement(q,null,i().createElement("div",null,(0,F.A)(A.file_maximum_size,_),": ",(0,z.B$)(z.W7*z.aO)),i().createElement("div",null,(0,F.A)(A.file_supported_types,_),": ",E)),position:"top"},i().createElement(M.A,{width:18,height:18})))),i().createElement(g.A,{control:p,name:l}),ce.map((e,t)=>i().createElement(X.A,{key:`${e.name}-${e.size}}`,file:e,onRemove:()=>{const e=[...ce];e.splice(t,1),ue(e),null==w||w(l,e.length?e:void 0,{shouldValidate:!0})}})))};var ee=n(3950)},1452:(e,t,n)=>{"use strict";e.exports=n(5262)},1619:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>ge});var r,o,i=n(9155),a=n.n(i),s=n(541),l=n(3864),c=n(5096),u=n(6367),d=n(4095),p=n(1872),f=n(6343),h=n(7182),m=n(1085),g=Object.create,b=Object.defineProperty,v=Object.getOwnPropertyDescriptor,y=Object.getOwnPropertyNames,w=Object.getPrototypeOf,x=Object.prototype.hasOwnProperty,E=(r=(e,t)=>{var r,o;r=e,o=function(e){var t,n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,r=536870912,o=2*r,i=new WeakMap,a=function(e,t){return function(i){var a=t.get(i),s=void 0===a?i.size:a<o?a+1:0;if(!i.has(s))return e(i,s);if(i.size<r){for(;i.has(s);)s=Math.floor(Math.random()*o);return e(i,s)}if(i.size>n)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;i.has(s);)s=Math.floor(Math.random()*n);return e(i,s)}}((t=i,function(e,n){return t.set(e,n),n}),i),s=function(e){return function(t){var n=e(t);return t.add(n),n}}(a);e.addUniqueNumber=s,e.generateUniqueNumber=a},"object"==typeof e&&typeof t<"u"?o(e):"function"==typeof define&&n.amdO?define(["exports"],o):o((r=typeof globalThis<"u"?globalThis:r||self).fastUniqueNumbers={})},()=>(o||r((o={exports:{}}).exports,o),o.exports));i.Component;((e,t,n)=>{n=null!=e?g(w(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of y(t))!x.call(e,n)&&undefined!==n&&b(e,n,{get:()=>t[n],enumerable:!(r=v(t,n))||r.enumerable})})(e&&e.__esModule?n:b(n,"default",{value:e,enumerable:!0}),e)})(E());var k="object"==(typeof window>"u"?"undefined":typeof window),A={setTimeout:k?setTimeout.bind(window):setTimeout,clearTimeout:k?clearTimeout.bind(window):clearTimeout,setInterval:k?setInterval.bind(window):setInterval,clearInterval:k?clearInterval.bind(window):clearInterval},_={},C=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),A.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 S(){return Math.random().toString(36).substring(2)}var T=class{options;channel;token=S();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=>A.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{A.clearInterval(t)}catch{}let r=this.intervals.indexOf(t);r>=0&&this.intervals.splice(r,1),this.channel.removeEventListener("message",o),n()};t=A.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=>A.clearInterval(e))}catch{}}}},I=class{channel;options;elector;token=S();registry=new Map;allIdle=!1;isLastActive=!1;constructor(e){let{channelName:t}=e;if(this.options=e,this.channel=new C(t),this.registry.set(this.token,1),e.leaderElection){let e={fallbackInterval:2e3,responseTime:100};this.elector=new T(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()}},O=k?document:null,L=["mousemove","keydown","wheel","DOMMouseScroll","mousewheel","mousedown","touchstart","touchmove","MSPointerDown","MSPointerMove","visibilitychange","focus"];function M(e,t){let n=0;return function(...r){let o=(new Date).getTime();if(!(o-n<t))return n=o,e(...r)}}var $=()=>Date.now(),N=2147483647;function R({timeout:e=12e5,promptTimeout:t=0,promptBeforeIdle:n=0,element:r=O,events:o=L,timers:a,immediateEvents:s=[],onPresenceChange:l=()=>{},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:w=!1,name:x="idle-timer",syncTimers:E=0,leaderElection:_=!1,disabled:C=!1}={}){let S=(0,i.useRef)($()),T=(0,i.useRef)($()),R=(0,i.useRef)(null),P=(0,i.useRef)(null),j=(0,i.useRef)(0),D=(0,i.useRef)(0),z=(0,i.useRef)(0),F=(0,i.useRef)(0),B=(0,i.useRef)(!1),H=(0,i.useRef)(!1),U=(0,i.useRef)(!1),V=(0,i.useRef)(!0),G=(0,i.useRef)(!1),W=(0,i.useRef)(null),q=(0,i.useRef)(null),K=(0,i.useRef)(e),Y=(0,i.useRef)(0);(0,i.useEffect)(()=>{if(t&&console.warn("⚠️ IdleTimer -- The `promptTimeout` property has been deprecated in favor of `promptBeforeIdle`. It will be removed in the next major release."),n&&t)throw new Error("❌ Both promptTimeout and promptBeforeIdle can not be set. The promptTimeout property will be deprecated in a future version.");if(e>=N)throw new Error(`❌ The value for the timeout property must fit in a 32 bit signed integer, ${N}.`);if(t>=N)throw new Error(`❌ The value for the promptTimeout property must fit in a 32 bit signed integer, ${N}.`);if(n>=N)throw new Error(`❌ The value for the promptBeforeIdle property must fit in a 32 bit signed integer, ${N}.`);if(n>=e)throw new Error(`❌ The value for the promptBeforeIdle property must be less than the timeout property, ${e}.`);if(n?(K.current=e-n,Y.current=n):(K.current=e,Y.current=t),!V.current){if(v||C)return;B.current&&(oe.current(null,ze),q.current&&q.current.active()),ye()}},[e,t,n,v,C]);let X=(0,i.useRef)(y);(0,i.useEffect)(()=>{X.current=y},[y]);let Z=(0,i.useRef)(s),J=(0,i.useRef)(r),Q=(0,i.useRef)([...new Set([...o,...s]).values()]),ee=(0,i.useRef)(C);(0,i.useEffect)(()=>{ee.current=C,!V.current&&(C?Ee():v||ye())},[C]);let te=(0,i.useRef)(l);(0,i.useEffect)(()=>{te.current=l},[l]);let ne=(0,i.useRef)(c);(0,i.useEffect)(()=>{ne.current=c},[c]);let re=(0,i.useRef)(u);(0,i.useEffect)(()=>{re.current=u},[u]);let oe=(0,i.useRef)(d);(0,i.useEffect)(()=>{oe.current=d},[d]);let ie=(0,i.useRef)(p);(0,i.useEffect)(()=>{ie.current=p},[p]);let ae=(0,i.useRef)(f);(0,i.useEffect)(()=>{ae.current=f},[f]);let se=(0,i.useMemo)(()=>{let e=(e,t)=>ie.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?M(e,m):e},[m,h]),le=(0,i.useRef)();(0,i.useEffect)(()=>{w&&E&&(le.current=M(()=>{q.current.active()},E))},[w,E]);let ce=()=>{null!==W.current&&(A.clearTimeout(W.current),W.current=null)},ue=(e,t=!0)=>{ce(),W.current=A.setTimeout(he,e||K.current),t&&(P.current=$())},de=e=>{!H.current&&!B.current&&(ne.current(e,ze),te.current({type:"active",prompted:!0},ze)),F.current=0,z.current=$(),H.current=!0,ue(Y.current,!1)},pe=()=>{ce(),B.current||(re.current(null,ze),te.current({type:"idle"},ze)),B.current=!0,R.current=$(),X.current?ve():H.current&&(z.current=0,H.current=!1)},fe=e=>{ce(),(B.current||H.current)&&(oe.current(e,ze),te.current({type:"active",prompted:!1},ze)),H.current=!1,z.current=0,B.current=!1,j.current+=$()-R.current,D.current+=$()-R.current,be(),ue()},he=e=>{if(!B.current){se.cancel&&se.cancel();let t=$()-P.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&&!P.current&&(P.current=$(),oe.current(null,ze)),se(e,ze),H.current)return;if(ce(),!B.current&&Z.current.includes(e.type))return void he(e);let t=$()-P.current;B.current&&!y||!B.current&&t>=K.current?he(e):(U.current=!1,F.current=0,z.current=0,ue(),w&&E&&le.current())},ge=(0,i.useRef)(me);(0,i.useEffect)(()=>{let e=G.current;e&&ve(),ge.current=g>0?M(me,g):me,e&&be()},[g,m,h,ie,w,E]);let be=()=>{k&&J.current&&(G.current||(Q.current.forEach(e=>{J.current.addEventListener(e,ge.current,{capture:!0,passive:!0})}),G.current=!0))},ve=(e=!1)=>{k&&J.current&&(G.current||e)&&(Q.current.forEach(e=>{J.current.removeEventListener(e,ge.current,{capture:!0})}),G.current=!1)},ye=(0,i.useCallback)(e=>!ee.current&&(ce(),be(),B.current=!1,H.current=!1,U.current=!1,F.current=0,z.current=0,q.current&&!e&&q.current.start(),ue(),!0),[W,B,ee,K,q]),we=(0,i.useCallback)(e=>!ee.current&&(ce(),be(),T.current=$(),j.current+=$()-R.current,D.current+=$()-R.current,j.current=0,B.current=!1,H.current=!1,U.current=!1,F.current=0,z.current=0,q.current&&!e&&q.current.reset(),v||ue(),!0),[W,B,K,v,ee,q]),xe=(0,i.useCallback)(e=>!ee.current&&(ce(),be(),(B.current||H.current)&&fe(),B.current=!1,H.current=!1,U.current=!1,F.current=0,z.current=0,T.current=$(),q.current&&!e&&q.current.activate(),ue(),!0),[W,B,H,ee,K,q]),Ee=(0,i.useCallback)((e=!1)=>!ee.current&&!U.current&&(F.current=Oe(),U.current=!0,ve(),ce(),q.current&&!e&&q.current.pause(),!0),[W,ee,q]),ke=(0,i.useCallback)((e=!1)=>!(ee.current||!U.current||(U.current=!1,H.current||be(),B.current||ue(F.current),z.current&&(z.current=$()),q.current&&!e&&q.current.resume(),0)),[W,K,ee,F,q]),Ae=(0,i.useCallback)((e,t)=>(q.current?(t&&ae.current(e,ze),q.current.message(e)):t&&ae.current(e,ze),!0),[f]),_e=(0,i.useCallback)(()=>B.current,[B]),Ce=(0,i.useCallback)(()=>H.current,[H]),Se=(0,i.useCallback)(()=>q.current?q.current.isLeader:null,[q]),Te=(0,i.useCallback)(()=>q.current?q.current.isLastActive:null,[q]),Ie=(0,i.useCallback)(()=>q.current?q.current.token:null,[q]),Oe=(0,i.useCallback)(()=>{if(U.current)return F.current;let e=F.current?F.current:Y.current+K.current,t=P.current?$()-P.current:0,n=Math.floor(e-t);return n<0?0:Math.abs(n)},[K,Y,H,F,P]),Le=(0,i.useCallback)(()=>Math.round($()-T.current),[T]),Me=(0,i.useCallback)(()=>Math.round($()-S.current),[S]),$e=(0,i.useCallback)(()=>R.current?new Date(R.current):null,[R]),Ne=(0,i.useCallback)(()=>P.current?new Date(P.current):null,[P]),Re=(0,i.useCallback)(()=>B.current?Math.round($()-R.current+j.current):Math.round(j.current),[R,j]),Pe=(0,i.useCallback)(()=>B.current?Math.round($()-R.current+D.current):Math.round(D.current),[R,D]),je=(0,i.useCallback)(()=>{let e=Math.round(Le()-Re());return e>=0?e:0},[R,j]),De=(0,i.useCallback)(()=>{let e=Math.round(Me()-Pe());return e>=0?e:0},[R,j]);(0,i.useEffect)(()=>{if(h>0&&m>0)throw new Error("❌ onAction can either be throttled or debounced, not both.");a&&function(e){A.setTimeout=e.setTimeout,A.clearTimeout=e.clearTimeout,A.setInterval=e.setInterval,A.clearInterval=e.clearInterval}(a);let e=()=>{q.current&&q.current.close(),se.cancel&&se.cancel(),ce(),ve(!0)};return k&&window.addEventListener("beforeunload",e),()=>{k&&window.removeEventListener("beforeunload",e),q.current&&q.current.close(),se.cancel&&se.cancel(),ce(),ve(!0)}},[]),(0,i.useEffect)(()=>{q.current&&q.current.close(),q.current=w?new I({channelName:x,leaderElection:_,onPrompt:()=>{de()},onIdle:()=>{pe()},onActive:()=>{fe()},onMessage:e=>{ae.current(e,ze)},start:ye,reset:we,activate:xe,pause:Ee,resume:ke}):null},[w,x,_,ne,re,oe,ae,ye,we,Ee,ke]),(0,i.useEffect)(()=>{V.current||(ce(),ve(!0)),!v&&!C&&(b?ye():be())},[v,b,C,V]),(0,i.useEffect)(()=>{if(!V.current){let e=[...new Set([...o,...s]).values()];if(ve(),Q.current=e,J.current=r,Z.current=s,v||C)return;b?ye():be()}},[r,JSON.stringify(o),JSON.stringify(s),V,C,v,b]),(0,i.useEffect)(()=>{V.current&&(V.current=!1)},[V]);let ze={message:Ae,start:ye,reset:we,activate:xe,pause:Ee,resume:ke,isIdle:_e,isPrompted:Ce,isLeader:Se,isLastActiveTab:Te,getTabId:Ie,getRemainingTime:Oe,getElapsedTime:Le,getTotalElapsedTime:Me,getLastIdleTime:$e,getLastActiveTime:Ne,getIdleTime:Re,getTotalIdleTime:Pe,getActiveTime:je,getTotalActiveTime:De,setOnPresenceChange:e=>{l=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,ie.current=e},setOnMessage:e=>{f=e,ae.current=e}};return ze}(0,i.createContext)(null).Consumer;const P=function(e){return(0,i.forwardRef)(function(t,n){let r=R({...t});return"function"==typeof n?n(r):n&&(n.current=r),(0,m.jsx)(e,{...t,...r})})}(e=>{let{children:t}=e;return t});var j=n(1695),D=n(2221);var z=n(9918);const F="kindly-last-conversion-timestamp",B=()=>{const e=(0,h.jL)(),{conversionPageUrl:t,hasInteraction:n}=(0,s.d4)(j.Od),r=(()=>{const[e,t]=(0,i.useState)(!1),{conversionPageUrl:n}=(0,s.d4)(j.Od),r=((e,t)=>{let{enable:n=!0}=t;const[r,o]=(0,i.useState)(null);if(!n)return null;const a=setInterval(()=>{const e=document.querySelector("#klarna-checkout-iframe");e&&(o(e),clearInterval(a))},500);return r})(0,{enable:null==n?void 0:n.match(/klarna/gi)}),o=(0,i.useRef)(),a=(0,i.useCallback)(e=>{var n;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===(n=decodeURIComponent(r).match(/\{"(.*)/gim))||void 0===n?void 0:n[0])||"");o&&"object"==typeof o&&["created","checkout_complete"].indexOf(o.ORDER_STATUS)>-1&&t(!0)},[]);return(0,i.useEffect)(()=>{r&&!o.current&&(a(r),o.current=setInterval(()=>a(r),500))},[r,o,a]),(0,i.useEffect)(()=>{e&&clearInterval(o.current)},[e]),e})(),o=(0,i.useCallback)(()=>{if((t=localStorage.getItem(F))&&!(Date.now()-Number(t)>D.M3))return;var t;const r=!n;localStorage.setItem(F,String(Date.now())),e((0,f.yM)(r))},[e,n]);(0,i.useEffect)(()=>{r&&o()},[o,r]),(0,i.useEffect)(()=>{null!=t&&t.trim()&&(0,z.A)(window.location.href,t)&&o()},[o,t])};var H=n(5767),U=n(8560),V=n(9886);const G=`\n${n(7542).n}\n .kindly-overflow-hidden {\n overflow: hidden !important;\n }\n`;var W=n(2927),q=n(8679),K=n(8414);const Y=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)}(),X=(0,l.DU)(["#kindly-root{font-size:initial;pointer-events:none;--_kindlychat-font-size-xs:calc(","px * 0.7);--_kindlychat-font-size-sm:calc(","px * 0.75);--_kindlychat-font-size-m:","px;--_kindlychat-font-size-p:calc(","px * 0.9);--_kindlychat-font-size-h4:calc(","px * 1.2);--_kindlychat-font-size-h3:calc(","px * 1.4);--_kindlychat-font-size-h2:calc(","px * 1.6);--_kindlychat-font-size-input:","px;}"],Y,Y,Y,Y,Y,Y,Y,Math.max(16,Y));var Z=n(8035);const J=e=>{var t,n,r,o,i,a,s,l,c,u,d,p,f,h,m,g,b,v,y,w,x,E,k,A,_;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:Z.AV.dark,background:null!==(o=null==e||null===(i=e.style)||void 0===i?void 0:i.color_background)&&void 0!==o?o:"#ffffff",bubbleButtonOutline:null!==(a=null==e||null===(s=e.style)||void 0===s?void 0:s.color_button_outline)&&void 0!==a?a:"#0069ff",buttonBackground:null!==(l=null==e||null===(c=e.style)||void 0===c?void 0:c.color_button_background)&&void 0!==l?l:"#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",userMessageBackground:null!==(w=null==e||null===(x=e.style)||void 0===x?void 0:x.color_user_message_background)&&void 0!==w?w:"#f5f5f5",botMessageBackground:null!==(E=null==e||null===(k=e.style)||void 0===k?void 0:k.color_bot_message_background)&&void 0!==E?E:"#f5f5f5",panelBackground:null!==(A=null==e||null===(_=e.style)||void 0===_?void 0:_.color_panel_background)&&void 0!==A?A:"#ffffff"}};var Q=n(2628),ee=n(7437);function te(e){let{settings:t}=e;const n=(0,h.jL)(),{inPlatform:r}=(0,s.d4)(j.$P);return B(),function(){const e=(0,h.jL)(),{botKey:t}=(0,h.GV)(j.$P),{messageSentTime:n}=(0,h.GV)(j.DZ),{persistStateLifespan:r}=(0,h.GV)(j.Od),{chatMessages:o}=(0,h.GV)(j.DZ);(0,i.useEffect)(()=>{const i=(0,W.A)({messageSentTime:n,persistStateLifespan:r});0===r||i||0===o.length||e((0,f.g4)(t))},[t,e,r,n])}(),function(){var e,t,n;const{feedbackToDisplay:r}=(0,U.A)(),o=(0,h.jL)(),{chatHasStarted:a,active:s}=(0,h.GV)(j.$P),l=(0,V.A)(r),c=(0,i.useCallback)(()=>{r&&a&&(o((0,H.WG)({ratingSystem:r.rating_scale.rating_system,triggerType:r.trigger_type,formTitle:r.form_title,timeout:r.timeout,step:"RATING_SCALE"})),o(s?(0,f.zn)("FEEDBACK_END_CHAT"):(0,f.ku)()))},[r,a,s,o]),{start:u,reset:d,pause:p}=R({onIdle:c,timeout:1e3*((null==r||null===(e=r.timeout)||void 0===e?void 0:e.duration)||10),startManually:!0,disabled:!(null!=r&&null!==(t=r.timeout)&&void 0!==t&&t.enabled)});(0,i.useEffect)(()=>{var e;(null==l?void 0:l.id)!==(null==r?void 0:r.id)&&(p(),d(),null!=r&&null!==(e=r.timeout)&&void 0!==e&&e.enabled&&a&&u())},[null==r?void 0:r.id,null==r||null===(n=r.timeout)||void 0===n?void 0:n.enabled,null==l?void 0:l.id,a,d,u,p]),(0,i.useEffect)(()=>{a&&r||(p(),d())},[a,r,d,p])}(),(0,i.useEffect)(()=>{var e;null===(e=t.chatbubble)||void 0===e||!e.autopopup||(0,Q.A)()||r||setTimeout(()=>n((0,f.UB)()),t.chatbubble.autopopup_time)},[n,r,t]),a().createElement(p.A,{chatSettings:t,hidden:t.bubbleHidden,onNudgeDismiss:t.onNudgeDismiss,onNudgeFormSubmit:t.onNudgeFormSubmit,onNudgeProductClick:t.onNudgeProductClick})}let ne=!1,re=null;const oe=(0,i.forwardRef)((e,t)=>{let{botKey:r,settings:o,initialChatLanguage:p}=e;return re||(re=(0,h.Ay)({botKey:r,settings:o,initialChatLanguage:p})),(0,i.useEffect)(()=>()=>{re=null},[]),function(){const{nonce:e}=c.Z;(0,i.useEffect)(()=>{const t=document.createElement("style");t.setAttribute("data-kindly-styles","true"),t.textContent=G,e&&t.setAttribute("nonce",e);try{return document.querySelector('style[data-kindly-styles="true"]')||document.head.appendChild(t),()=>{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,i.useImperativeHandle)(t,()=>({getActivityStatus:()=>re.getState().chatbubble.active,openChat(){re.dispatch((0,f.lQ)({source:"programmatic"}))},closeChat(){re.dispatch((0,f.Rh)({source:"programmatic"}))},restartChat(){let{openChat:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{openChat:!1};(0,ee.Tk)(),re.dispatch((0,f.zX)(r,!0,e))},triggerDialogue(e,t){var n;"no"===(null==t||null===(n=t.languageCode)||void 0===n?void 0:n.toLowerCase())&&(t.languageCode="nb"),re.dispatch((0,f.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:i}=t;r&&n&&re.dispatch((0,f.y2)(n,void 0,i,void 0,void 0,{shouldOpenChat:!o}))},showNudge(e){let{nudgeLayout:t,slug:n,trackEvent:r=!0}=e;re.dispatch((0,f.fe)({nudgeLayout:t,slug:n,trackEvent:r}))},showCustomNudge(e){let{content:t,slug:n,onRendered:r,trackEvent:o=!0}=e;re.dispatch((0,f.kS)({content:t,slug:n,onRendered:r,trackEvent:o}))},getNudges:()=>re.getState().bot.nudges,closeNudge(e,t){re.dispatch((0,f.Y_)(e,t))},nudgeCompletion(e){sessionStorage.getItem("kindly-nudge-completion")||(re.dispatch((0,K.vJ)({slug:e,eventType:q.oE})),re.dispatch({type:q.Kd,slug:e}),sessionStorage.setItem("kindly-nudge-completion","true"))},triggerCtaEvent(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;re.dispatch((0,K.NS)(e))},identifyUser(e){re.dispatch((0,f.gm)(e))},setNewContext(e){re.dispatch((0,f.Aw)(e))},getContext:()=>re.dispatch((0,f.SD)()),setNewBannerMessage(e,t){re.dispatch((0,f.cC)(e,t||(null==e?void 0:e.message)))},setNewLabel(e){re.dispatch((0,f.tD)(e))},cancelHandover(){re.dispatch((0,f.cL)())},setGetAuthToken(e){c.Z.getAuthToken=e,re.dispatch((0,f.Mx)())}})),(0,i.useEffect)(()=>{(0,u.NY)(o)},[o]),(0,i.useEffect)(()=>{const{persistStateLifespan:e}=re.getState().bot;if(-1===e||e>0)return;let t=!1;const n=()=>{t||(t=!0,re.dispatch((0,f.R7)(r)))};window.onbeforeunload=n,window.onunload=n},[r,o,re]),(0,i.useEffect)(()=>{!ne&&o.track_utm&&(ne=!0,Promise.resolve().then(n.bind(n,649)).then(e=>{let{default:t}=e;const n=t();n&&re.dispatch((0,f.Aw)({...n}))}))},[o,re]),window.Cypress&&(window.store=re),a().createElement(s.Kq,{store:re},a().createElement(l.NP,{theme:J(o)},a().createElement(X,null),a().createElement(d.A,{errorPoint:"inside ChatContainer",displayError:!1},(o.user_idle_timeout_seconds||0)>0?a().createElement(P,{onIdle:()=>re.dispatch((0,f.ZS)()),onActive:()=>re.dispatch((0,f.Mm)(o.id)),timeout:1e3*(o.user_idle_timeout_seconds||0)},a().createElement(te,{settings:o})):a().createElement(te,{settings:o}))))});oe.displayName="ChatContainer";const ie=oe;var ae=n(6464),se=n(99);function le(e){let{retries:t=6,interval:n=300,intervalBackoffMultiplier:r=2}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((o,i)=>{e({retriesLeft:t,interval:n,intervalBackoffMultiplier:r}).then(o).catch(a=>{setTimeout(()=>{t<=1?i(a):le(e,{retries:t-1,interval:n*r,intervalBackoffMultiplier:r}).then(o,i)},n)})})}async function ce(e,t,n){const r=(0,ae.U)(),o=`${e}/settings/${t}.json?version=2.80.2&${[ae.B]}=${r}`;return le(()=>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 ue=!1;const de=e=>e.split("-")[0],pe=(e,t)=>{const n=e.find(e=>e===t);if(n)return n;const r=de(t);return e.find(e=>de(e)===r)};var fe=n(9749),he=n.n(fe);const me=function(e,t){return!!he()(t).call(t,"*")||!!e&&t.some(t=>function(e){const t=e.replace(/\./g,"\\.").replace(/\*/g,".");return new RegExp(t,"i")}(t).test(e))};function ge(e){var t;let{botKey:n,setKindlyChatRef:r,options:o={}}=e;const s=function(e,t){const[n,r]=(0,i.useState)(t||{});return(0,i.useEffect)(()=>{const n=new AbortController;return ue?r(e=>(0,se.A)(e,t)):(async()=>{try{var o;const i=await ce((null===(o=t.environment)||void 0===o?void 0:o.SETTINGS_HOST)||"https://chat.kindlycdn.com",e,n),{welcome_page:a,in_chat_notification:s,notifications:l,settings:{supported_languages:c,compliance_settings:u,...d},...p}=i.data,f={...p,...d,...l,supportedLanguages:c,welcomePage:a,inChatNotification:s,complianceSettings:u};r(e=>(0,se.A)((0,se.A)(f,e),{...t}))}catch(e){var i,a;const t=null!==(i=e.response)&&void 0!==i&&null!==(a=i.data)&&void 0!==a&&a.error?e.response.data.error:e;"signal is aborted without reason"!==t.message&&console.error("Kindly chat failed to initialize.",t)}})(),ue=!0,()=>{n.abort()}},[e,t]),(0,i.useEffect)(()=>()=>{ue=!1},[]),n}(n,o);if(!s.id)return null;const{inPlatform:l,fullscreenMode:u,language:d,focusTrapOnFullView:p,supportedLanguages:f,getAuthToken:h,nonce:m,complianceSettings:g,welcomePage:b}=s;c.Z.language=d,c.Z.supportedLanguages=f,c.Z.feedbackSettings=l?{}:s.feedback_settings,c.Z.focusTrapOnFullView=p,c.Z.fullscreenMode=u,c.Z.getAuthToken=h,c.Z.nonce=m,c.Z.complianceSettings=g,c.Z.welcomePage=b;const v=c.Z.language,y=function(e,t){var n,r,o;const i=e.map(e=>e.code),a=null==t?void 0:t.toLowerCase();if(0===e.length)return;if(1===i.length)return i[0];if(a){const e=pe(i,a);if(e)return e}const s=null===(n=document.documentElement.lang)||void 0===n?void 0:n.toLowerCase(),l=pe(i,s);if(l)return l;const c=null===(r=window.navigator.language)||void 0===r?void 0:r.toLowerCase(),u=pe(i,c);if(u)return u;return(null===(o=window.navigator.languages)||void 0===o?void 0:o.flatMap(e=>{const t=pe(i,e.toLowerCase());return t?[t]:[]})[0])||e.find(e=>e.is_primary).code.toLowerCase()}(c.Z.supportedLanguages.filter(e=>e.is_active),v);if(!y)return console.error("Impossible to determine initial Chat language, make sure you have at least one language active for the Bot"),null;const w=(null===(t=o.environment)||void 0===t?void 0:t.KINDLY_CHAT_URL)||"http://localhost:8081",x=[w?new URL(w).hostname:void 0,"*.kindly.ai","demokind.ly","*.demokind.ly",...s.chatbubble.domains].filter(Boolean);return s.chatbubble.inPlatform||me(window.location.hostname,x)?a().createElement(ie,{ref:r,botKey:n,settings:s,initialChatLanguage:y}):(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)}},1669:(e,t,n)=>{"use strict";n(4531)("metadata")},1695:(e,t,n)=>{"use strict";n.d(t,{$P:()=>s,Cv:()=>o,DZ:()=>h,FI:()=>l,G0:()=>m,Hk:()=>p,MA:()=>r,Od:()=>a,cA:()=>c,o3:()=>d,qV:()=>f,uF:()=>i,uO:()=>u,zD:()=>g});const r=e=>{let{agent:t}=e;return t},o=e=>{let{alerts:t}=e;return t},i=e=>{let{announcement:t}=e;return t},a=e=>{let{bot:t}=e;return t},s=e=>{let{chatbubble:t}=e;return t},l=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{messages:t}=e;return t},m=e=>{let{nudge:t}=e;return t},g=e=>{let{pushMessages:t}=e;return t}},1726:(e,t,n)=>{"use strict";var r=n(5161);e.exports=r},1763:(e,t,n)=>{"use strict";n.d(t,{F:()=>i,c:()=>o});var r=n(8679);const o=(e,t)=>(n,o)=>{var i,a;const{content:s,buttonHref:l,buttonText:c,icon:u,once:d}=e,p=null===(i=o().inChatNotification)||void 0===i||null===(a=i.notifications)||void 0===a?void 0:a.find(e=>e.id===t);p?s!==p.content&&n({type:r.MN,content:s,buttonHref:l,buttonText:c,icon:u,once:d,id:t}):n({type:r.vP,content:s,buttonHref:l,buttonText:c,icon:u,once:d,id:t})},i=e=>(t,n)=>{var o,i;const a=null===(o=n().inChatNotification)||void 0===o||null===(i=o.notifications)||void 0===i?void 0:i.find(t=>t.id===e);a&&(a.once?t({type:r.oZ,id:e}):t({type:r.nG,id:e}))}},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")})},1810:(e,t,n)=>{"use strict";var r=n(5279);e.exports=r},1811:(e,t,n)=>{"use strict";var r=n(4904),o=n(9989).f,i=n(3999),a=n(701),s=n(9559),l=n(8655)("toStringTag");e.exports=function(e,t,n,c){var u=n?e:e&&e.prototype;u&&(a(u,l)||o(u,l,{configurable:!0,value:t}),c&&!r&&i(u,"toString",s))}},1818:(e,t,n)=>{"use strict";n(4531)("unscopables")},1872:(e,t,n)=>{"use strict";n.d(t,{X:()=>Ue,A:()=>Ge});var r=n(4953),o=n.n(r),i=n(9155),a=n.n(i),s=n(541),l=n(809),c=n(3864),u=n(1193),d=n(4311),p=n(6343),f=n(1695),h=n(8035),m=n(9017),g=n(6052),b=n(2475);const v=(0,c.AH)(["& > div,& > svg{z-index:3;}& > div{position:relative;display:flex;justify-content:center;align-items:center;}&:before{content:'';position:absolute;left:0;top:0;width:100%;height:100%;background-color:",";border-radius:48px;transition:all 0.2s ease;}&:hover{transition:border 240ms;background:linear-gradient(0deg,rgba(0,0,0,0.08) 0%,rgba(0,0,0,0.08) 100%),#fff;&:before{box-shadow:0 0 0 2px rgba(0,0,0,0.2) inset;transition:all 0.2s ease;filter:brightness(0.92);}}&:focus,&:active{background:linear-gradient(0deg,rgba(0,0,0,0.08) 0%,rgba(0,0,0,0.08) 100%),#fff;&:after{position:absolute;left:0;top:0;bottom:0;right:0;width:100%;height:100%;transition:border 240ms;border-radius:48px;content:'';}}@media ","{&:before{border-radius:0px;","}&:focus,&:active{&:after{border-radius:0px;","}}}"],e=>{let{$background:t}=e;return t||""},h.jO.maxPhone,e=>{let{$isLast:t}=e;return t&&"border-top-left-radius: 48px; border-bottom-left-radius: 48px;"},e=>{let{$isLast:t}=e;return t&&"border-top-left-radius: 48px; border-bottom-left-radius: 48px;"}),y=c.Ay.div.withConfig({componentId:"sc-9dlu7b-0"})(["pointer-events:auto;max-width:250px;box-shadow: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);padding:6px 6px 6px 16px;justify-self:flex-end;border-radius:48px;display:flex;flex-direction:row;align-items:center;justify-content:flex-end;position:relative;z-index:2;transition:border 240ms;cursor:pointer;height:100%;color:",";"," @media ","{padding:0px 6px 0px 16px;box-shadow:none;border-right:1px solid rgba(0,0,0,0.08);border-radius:0px;","}"],e=>{let{$background:t}=e;return(0,g.w5)(t||"","#F2F2F2","#0D0D0D")},v,h.jO.maxPhone,e=>{let{$isLast:t}=e;return t&&"border-top-left-radius: 48px; border-bottom-left-radius: 48px;"}),w=c.Ay.div.withConfig({componentId:"sc-9dlu7b-1"})(["margin-right:8px;font-size:var(--_kindlychat-font-size-p);padding-top:9px;padding-bottom:9px;font-weight:500;"]),x=c.Ay.div.withConfig({componentId:"sc-9dlu7b-2"})(["display:flex;flex-direction:column-reverse;align-items:flex-end;transition:all 300ms ease;transition-timing-function:cubic-bezier(0.05,0.38,0.49,1);transform-origin:bottom right;scrollbar-width:none;&::-webkit-scrollbar{display:none;}"," @media ","{flex-direction:row;gap:0 !important;max-width:calc( 100vw - ","px );overflow-x:auto;transform-origin:right;overscroll-behavior:none;","}"],e=>{let{$open:t,$iconsCount:n}=e;return t?(0,c.AH)(["gap:8px;max-height:","px;opacity:1;transform:scale(1);"],n?60*n:0):(0,c.AH)(["gap:0px;max-height:0px;opacity:0;transform:scale(0.36);pointer-events:none;user-select:none;"])},h.jO.maxPhone,e=>{let{$buttonWidth:t}=e;return(t||0)+148},e=>{let{$open:t}=e;return!t&&(0,c.AH)(["max-width:0;"])}),E=c.Ay.div.withConfig({componentId:"sc-9dlu7b-3"})(["width:36px;height:36px;border-radius:50%;overflow:hidden;"]),k=c.Ay.img.withConfig({componentId:"sc-9dlu7b-4"})(["width:100%;height:100%;object-fit:cover;"]),A=c.Ay.div.withConfig({componentId:"sc-9dlu7b-5"})(["",";position:relative;transition:all 300ms ease;transition-timing-function:cubic-bezier(0.05,0.38,0.49,1);"," display:grid;white-space:nowrap;-ms-overflow-style:none;scrollbar-width:none;&::-webkit-scrollbar{display:none;}@media ","{display:flex;padding-left:16px;gap:0;pointer-events:all;&::before{width:100vw;height:458px;}}"],b.JP,e=>{let{$open:t}=e;return t?(0,c.AH)(["gap:8px;"]):(0,c.AH)(["gap:0;"])},h.jO.maxPhone),_=c.Ay.button.withConfig({componentId:"sc-9dlu7b-6"})(["outline:none;pointer-events:auto;justify-self:flex-end;margin-right:8px;border-radius:50%;overflow:hidden;display:flex;flex-direction:row;border:0;width:28px;height:28px;background-color:",";box-shadow:",";z-index:2;cursor:pointer;position:relative;"," justify-content:center;align-items:center;padding:0;@media ","{align-self:center;min-width:28px;margin-right:",";}"],e=>{let{$background:t}=e;return t||""},h.FR.level2,v,h.jO.maxPhone,e=>{let{$open:t}=e;return t?"8px;":"16px"});var C=n(7542),S=n(4927);const T=c.Ay.div.withConfig({componentId:"sc-1ihr6s7-0"})(["z-index:",";border-radius:14px;background:",";background-color:",";margin-bottom:16px;box-shadow:",";",";@media ","{margin-left:20px;","}@media ","{margin-left:16px;}"],e=>e.$zIndex,e=>{let{theme:t}=e;return t.background},e=>{let{theme:t}=e;return t.background},h.FR.level2,b.JP,h.jO.maxTablet,e=>{let{$bubbleSize:t}=e;return"SMALL"===t?"\n right: 30px;\n bottom: 30px;\n ":"\n bottom: 55px;"},h.jO.maxPhone),I=c.Ay.div.withConfig({componentId:"sc-1ihr6s7-1"})(["width:max-content;max-width:360px;min-width:60px;padding:12px;pointer-events:auto;@media ","{width:unset;max-width:100%;}"],h.jO.maxPhone),O=c.Ay.div.withConfig({componentId:"sc-1ihr6s7-2"})(["display:flex;cursor:pointer;align-items:center;"]),L=c.Ay.div.withConfig({componentId:"sc-1ihr6s7-3"})(["width:29px;height:29px;min-width:29px;border-radius:100px;margin-right:15px;background:",";background-position:center;background-size:cover;background-color:",";"],e=>e.theme.headerBackground,e=>e.theme.headerBackground),M=c.Ay.div.withConfig({componentId:"sc-1ihr6s7-4"})(["margin:0;color:",";font-size:var(--_kindlychat-font-size-m);font-weight:normal;line-height:24px;font-family:",";span{font-weight:500;}p{margin:0;}@media ","{font-size:var(--_kindlychat-font-size-p);}"],e=>{let{theme:t}=e;return(0,g.w5)(t.background,h.AV.light,h.AV.dark)},C.m.default,h.jO.maxTablet),$=(0,c.Ay)(S.$n).withConfig({componentId:"sc-1ihr6s7-5"})(["pointer-events:auto;z-index:",";display:flex;padding:4px;border-radius:50%;background:",";background-color:",";align-self:flex-end;margin-bottom:8px;",";",";&:before{background:",";background-color:",";}"],e=>e.$zIndex,e=>{let{theme:t}=e;return t.background||t.buttonBackground},e=>{let{theme:t}=e;return t.background||t.buttonBackground},b.JP,v,e=>{let{theme:t}=e;return t.background||t.buttonBackground},e=>{let{theme:t}=e;return t.background||t.buttonBackground}),N=c.Ay.div.withConfig({componentId:"sc-1ihr6s7-6"})(["display:flex;flex-direction:column;"]);function R(e){let{agent:t}=e;const{agent_joined_text:n}=(0,d.A)();return a().createElement(O,null,a().createElement(L,{style:{backgroundImage:`url(${t.avatar})`}}),a().createElement(M,null,a().createElement("span",null,t.name||"An agent")," ",n))}function P(e){let{text:t}=e;return a().createElement(O,null,a().createElement(M,{dangerouslySetInnerHTML:{__html:t}}))}const j=function(e){let{settings:t}=e;const{bubbleSize:n}=(0,s.d4)(f.Od),{agent:r,show:o,text:d,type:b}=(0,s.d4)(f.zD),v=(0,s.wA)(),y=(0,m.A)(t,"zIndex",15),w=(0,c.DP)(),x=(0,i.useMemo)(()=>(0,g.w5)(w.background||w.buttonBackground||"#fff",h.AV.light,h.AV.dark),[w.background,w.buttonBackground]);return null===d&&"feedback"!==b?null:a().createElement(N,null,a().createElement($,{"aria-label":"Dismiss pushMessage",title:"Dismiss pushMessage",onClick:e=>{e.stopPropagation(),v((0,p.gQ)())},type:"button",$zIndex:y},a().createElement(l.US,{color:x,width:20,height:20})),a().createElement(T,{$bubbleSize:n,"aria-hidden":o?"false":"true","aria-label":"Chat bot push message",onClick:()=>v((0,p.lQ)()),role:"complementary",$zIndex:y},a().createElement(I,null,b===p.oI.MESSAGE&&a().createElement(P,{text:d}),b===p.oI.HANDOVER&&a().createElement(R,{agent:r}),b===p.oI.FEEDBACK&&a().createElement(u.A,null))))};var D=n(2221);const z=(0,c.AH)(["width:",";height:",";object-fit:cover;border-radius:50%;transition:all 300ms ease;user-select:none;@media ","{","}"],e=>{let{$globalIconsOpen:t,$active:n,$showGlobalIcons:r,$isGlobalIconsDelayed:o}=e;return t&&void 0!==o&&!o||t&&r&&o||n?"36px":"44px"},e=>{let{$globalIconsOpen:t,$active:n,$showGlobalIcons:r,$isGlobalIconsDelayed:o}=e;return t&&void 0!==o&&!o||t&&r&&o||n?"36px":"44px"},h.jO.maxTablet,e=>{let{$smallBubble:t}=e;return t?(0,c.AH)(["width:36px;height:36px;animation:none;"]):(0,c.AH)(["width:44px !important;height:44px !important;animation:none;"])}),F=c.Ay.img.withConfig({componentId:"sc-15ijr09-0"})(["",""],z),B=(0,c.Ay)(l.T4).attrs(e=>({color:e.theme.chatbubbleText})).withConfig({componentId:"sc-15ijr09-1"})(["",""],z),H=(e,t)=>{if(e)return e;switch(t){case D.Ns.EASTER:return"http://localhost:8081/src/assets/images/KindlyBlobEaster.416354e85b59801cd8f65529358b4e44.png";case D.Ns.PRIDE:return"http://localhost:8081/src/assets/images/KindlyBlobPride.c2ba2b3e79a5f9136a5293758623b7ab.png";case D.Ns.CHRISTMAS:return"http://localhost:8081/src/assets/images/KindlyBlobXmas.73597f52e165fee513b384bc70e98314.png";default:return null}},U=function(e){let{showGlobalIcons:t,isGlobalIconsDelayed:n}=e;const{seasonalAppearance:r,bubbleAvatar:o,bubbleSize:i}=(0,s.d4)(f.Od),{active:l}=(0,s.d4)(f.$P),{open:c}=(0,s.d4)(f.o3);return r||o?a().createElement(F,{"data-testid":"chat-bubble-logo",$globalIconsOpen:c,$showGlobalIcons:t,$isGlobalIconsDelayed:n,$active:l,$smallBubble:"SMALL"===i,src:H(o,r),alt:""}):a().createElement(B,{"data-testid":"chat-bubble-logo",$globalIconsOpen:c,$showGlobalIcons:t,$isGlobalIconsDelayed:n,$active:l,$smallBubble:"SMALL"===i})};var V=n(1328);const G=(0,c.AH)(["white-space:nowrap;font-family:",";font-size:var(--_kindlychat-font-size-m);font-weight:500;"],C.m.default),W=c.Ay.div.withConfig({componentId:"sc-sdddjp-0"})(["position:absolute;left:-10000px;top:auto;user-select:none;pointer-events:none;visibility:hidden;",""],G),q=(0,i.forwardRef)((e,t)=>{var n;const{text:r,chatbubbleTextEnabled:o}=(0,s.d4)(f.Od),{currentLanguageCode:i}=(0,V.A)(),l=null===(n=r.chatbubble_text)||void 0===n?void 0:n[(null==i?void 0:i.split("-")[0])||"en"];return l&&o?a().createElement(W,{ref:t,"aria-hidden":"true"},l):null});q.displayName="HiddenButton";const K=q,Y=e=>{let{theme:t,$seasonalAppearance:n}=e;if(n)switch(n){case D.Ns.EASTER:return h.HM.sunglow;case D.Ns.CHRISTMAS:return h.HM.pomegranate;default:return h.Tj.white}return t.bubbleButtonBackground||t.buttonBackground},X=c.Ay.div.withConfig({componentId:"sc-1kk1ok5-0"})(["margin-left:8px;margin-right:8px;transition:all 300ms ease;width:auto;max-width:","px;white-space:nowrap;"," color:",";@media ","{font-size:"," !important;}"],e=>{let{$buttonWidth:t}=e;return t},e=>{let{$globalIconsOpen:t,$active:n,$isGlobalIconsDelayed:r,$showGlobalIcons:o}=e;return n?(0,c.AH)(["max-width:0;margin-left:0;margin-right:0;"]):t&&void 0!==r&&!r||t&&o&&r?(0,c.AH)(["font-size:var(--_kindlychat-font-size-p);"]):(0,c.AH)(["font-size:var(--_kindlychat-font-size-m);"])},e=>{let{theme:t,$seasonalAppearance:n}=e;if(n)switch(n){case D.Ns.EASTER:return h.HM.sunglowDark;case D.Ns.CHRISTMAS:return h.HM.pomegranateDark;default:return h.AV.dark}const r=(0,g.w5)(t.bubbleButtonBackground,h.AV.light,h.AV.dark);return t.chatbubbleText||r},h.jO.maxTablet,e=>{let{$smallBubble:t}=e;return t?h.J.p:h.J.h5}),Z=c.Ay.span.withConfig({componentId:"sc-1kk1ok5-1"})(["transition:opacity 150ms ease;opacity:",";",""],e=>{let{$active:t}=e;return t&&0},e=>{let{$active:t}=e;return!t&&"transition-delay: 150ms;"}),J=c.Ay.div.withConfig({componentId:"sc-1kk1ok5-2"})(["display:flex;flex-direction:row;z-index:1;align-items:center;"]),Q=c.Ay.button.withConfig({componentId:"sc-1kk1ok5-3"})(["justify-self:flex-end;overflow:visible;display:flex;justify-content:center;align-items:center;cursor:pointer;pointer-events:auto;flex-direction:row;padding:","px;border-radius:",";border:none;box-shadow:",";position:relative;transition:all 0.25s;&:before{content:'';position:absolute;left:0;top:0;width:100%;height:100%;background:",";border-radius:",";transition:all 0.2s ease;}&:after{content:'';left:2px;top:2px;position:absolute;width:calc(100% - 4px);height:calc(100% - 4px);background:",";border-radius:",";transition:all 0.2s ease;}&:hover{transition:all 0.2s ease;filter:brightness(0.92);&:before{transition:all 0.2s ease;filter:brightness(0.88);}}&:focus{transition:all 0.2s ease;filter:brightness(0.92);&:before{transition:all 0.2s ease;filter:brightness(0.88);}}@media ","{padding:","px !important;}@media ","{","}"],e=>{let{$hasButtonText:t,$globalIconsOpen:n,$showGlobalIcons:r,$active:o,$isGlobalIconsDelayed:i}=e;return t?o?6:""+(n&&void 0!==i&&!i||n&&r&&i?6:8):""+(o||n&&void 0!==i&&!i||n&&r&&i?6:8)},e=>{let{$hasButtonText:t}=e;return t?"48px":"50%"},e=>{let{$active:t}=e;return t?`0px 1px 5px 1px ${h.Tj.shadowColorDark}`:h.FR.level2},e=>{let{$bubbleOutline:t,theme:n,background:r,$seasonalAppearance:o}=e;return o?Y({theme:n||{},$seasonalAppearance:o}):r||(t?n.bubbleButtonOutline:n.bubbleButtonBackground)},e=>{let{$hasButtonText:t}=e;return t?"48px":"50%"},e=>{const t={theme:e.theme||{},$seasonalAppearance:e.$seasonalAppearance};return Y(t)},e=>{let{$hasButtonText:t}=e;return t?"48px":"50%"},h.jO.maxTablet,e=>{let{$smallBubble:t}=e;return t?6:8},h.jO.maxPhone,e=>{let{$globalIconsOpen:t,$showGlobalIcons:n}=e;return t&&n&&"\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n &:before, &:after {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n "}),ee=(0,c.AH)(["position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);"]);function te(e){var t;let{showGlobalIcons:n,isGlobalIconsDelayed:r}=e;const{bubbleOutline:o,text:l,seasonalAppearance:c,chatbubbleTextEnabled:u,bubbleSize:d}=(0,s.d4)(f.Od),{currentLanguage:h,active:m,isChatFullWindow:g}=(0,s.d4)(f.$P),[b,v]=(0,i.useState)(0),{open:y}=(0,s.d4)(f.o3),w=(0,s.wA)(),x=(0,i.useRef)(null),E=null===(t=l.chatbubble_text)||void 0===t?void 0:t[(null==h?void 0:h.split("-")[0])||"en"];(0,i.useEffect)(()=>{var e;E&&u&&x.current&&v(null===(e=x.current)||void 0===e?void 0:e.clientWidth)},[E,u]);const k=m?"Close chat":"Open chat";return a().createElement(Q,Object.assign({"aria-label":k,"aria-controls":"ChatButtonContainer",title:k,type:"button",$active:m,$globalIconsOpen:y,$isGlobalIconsDelayed:r,$showGlobalIcons:n,onClick:()=>w(m?(0,p.Rh)():(0,p.lQ)()),"data-testid":"chat-bubble-button","data-cy":"chat-bubble-button",$hasButtonText:!!E,$bubbleOutline:!!o,$smallBubble:"SMALL"===d,$seasonalAppearance:c},g&&{inert:""}),a().createElement(J,null,!!E&&u&&a().createElement(a().Fragment,null,a().createElement(K,{ref:x}),b&&a().createElement(X,{$buttonWidth:b,$active:m,$globalIconsOpen:y,$showGlobalIcons:n,$isGlobalIconsDelayed:r,$seasonalAppearance:c,$smallBubble:"SMALL"===d},a().createElement(Z,{$active:m},E))),a().createElement(U,{showGlobalIcons:n,isGlobalIconsDelayed:r})))}c.Ay.div.withConfig({componentId:"sc-1kk1ok5-4"})(["",";opacity:1;background-size:contain;background-repeat:no-repeat;background-position:center center;background-image:url(",");",";"],ee,e=>e.bubbleAvatar,e=>e.active&&"opacity: 0;"),c.Ay.div.withConfig({componentId:"sc-1kk1ok5-5"})(["position:relative;",";"],ee);const ne=a().memo(te);let re,oe,ie=!1;try{const e=window.AudioContext||window.webkitAudioContext;e&&(re=new e)}catch(e){console.warn("AudioContext is not supported in this environment:",e)}async function ae(){var e;if(re){if(!ie)try{ie=!0,oe||(oe=await async function(){if(!re)throw new Error("AudioContext is not supported");const e=await fetch("http://localhost:8081/src/assets/audio/newagent.442793eb7365abe2d4df421936fd9e6b.mp3"),t=await e.arrayBuffer();return re.decodeAudioData(t)}()),"suspended"===re.state&&await re.resume(),await(e=oe,re?new Promise(t=>{const n=re.createBufferSource();n.buffer=e,n.connect(re.destination),n.onended=()=>t(),n.start()}):Promise.reject(new Error("AudioContext is not supported")))}catch(e){console.error("Could not play notification sound:",e)}finally{ie=!1}}else console.warn("AudioContext is not supported, cannot play notification sound")}var se=n(9886);const le=()=>{const{takenOver:e}=(0,s.d4)(f.MA),t=(0,se.A)(e),{chatMessages:n}=(0,s.d4)(f.DZ),{active:r}=(0,s.d4)(f.$P),o=(0,se.A)(n);(0,i.useEffect)(()=>{if(void 0!==t&&t!==e&&e&&ae(),o&&n.length>o.length){const e=n[n.length-1];e&&(e.from_bot||"SYSTEM"===e.sender)&&("visible"===document.visibilityState&&r||ae())}},[e,n.length,r])};var ce=n(9749),ue=n.n(ce),de=n(7182),pe=n(6064),fe=n(9918);const he=()=>{const[e,t]=(0,i.useState)(document.location.href);return(0,i.useEffect)(()=>{const n=()=>{setTimeout(()=>{e!==document.location.href&&t(document.location.href)},0)},r=setInterval(n,200),{navigation:o}=window;return o&&o.addEventListener&&(o.addEventListener("navigate",n),clearInterval(r)),()=>{o&&o.removeEventListener?o.removeEventListener("navigate",n):clearInterval(r)}},[e]),e},me=(e,t)=>Object.entries(e).reduce((n,r)=>{let[o,i]=r;return{...n,[o]:(0,pe.A)(i,t),url:e.url,autopopup_time:e.autopopup_time}},{}),ge=[];var be=n(2628),ve=n(9313);const ye=(0,c.AH)(["bottom:0px;right:0px;left:0;top:0px;"]),we=c.Ay.div.withConfig({componentId:"sc-m0hsz7-0"})(["position:fixed;bottom:calc(",");right:calc(",");"," z-index:",";"," font-family:",";transform:",";transition:transform 0.3s ease;*{box-sizing:border-box;",";}"," "," --panel-background-white-black-contrast-1743170834:",";--chat-modal-background-white-black-contrast-1755953876:",";"],e=>{var t;let{$position:n}=e;return`${null!==(t=null==n?void 0:n.bottom)&&void 0!==t?t:D.bF.bottom}`},e=>{var t;let{$position:n}=e;return`${null!==(t=null==n?void 0:n.right)&&void 0!==t?t:D.bF.right}`},e=>{let{$fullscreen:t,$active:n}=e;return t&&n&&ye},e=>(e.$zIndex||0)+5,e=>{let{$active:t}=e;return t&&(0,be.A)()&&ye},e=>{let{theme:t}=e;return null!=t&&t.customFont?t.customFont:C.m.default},e=>{let{$shouldHideUI:t}=e;return t?"translateX(420px)":"none"},e=>{let{theme:t}=e;return(null==t?void 0:t.customFont)&&`font-family: ${t.customFont}`},e=>{let{$active:t,$chatHasStarted:n}=e;return t&&!n&&(0,c.AH)(["@media ","{bottom:2.5%;top:2.5%;right:5%;left:5%;border-radius:6px;box-shadow:",";}"],h.jO.maxTablet,h.FR.level2)},e=>{let{$active:t,$chatHasStarted:n}=e;return t&&n&&(0,c.AH)(["@media ","{bottom:0;top:0;right:0;left:0;}"],h.jO.maxTablet)},e=>{let{theme:t}=e;return(0,g.w5)(t.panelBackground,"#FFFFFF","#000000")},e=>{let{theme:t}=e;return(0,g.w5)(t.background,"#FFFFFF","#000000")}),xe=c.Ay.div.withConfig({componentId:"sc-m0hsz7-1"})(["display:flex;flex-direction:row;justify-content:flex-end;position:relative;",""],e=>{let{$active:t}=e;return t&&(0,c.AH)(["@media ","{opacity:0;user-select:none;pointer-events:none;}"],h.jO.maxTablet)}),Ee=c.Ay.div.withConfig({componentId:"sc-m0hsz7-2"})(["margin-bottom:24px;transform-origin:bottom right;height:100%;"," transition-timing-function:cubic-bezier(0.05,0.38,0.49,1);@media ","{","}@media ","{","}"],e=>{let{$active:t,$fullscreenMode:n,$duration:r=300}=e;return n?"":t?(0,c.AH)(["transform:scale(1) translateY(0);opacity:1;transition:","ms ease;"],r):(0,c.AH)(["transform:scale(0.24) translateY(200px);opacity:0;transition:","ms ease;"],r)},h.jO.maxPhone,e=>{let{$active:t}=e;return!t&&"width: 0;"},h.jO.maxTablet,e=>{let{$active:t,$chatHasStarted:n}=e;return t&&!n&&(0,c.AH)(["border-radius:6px;overflow:hidden;"])}),ke=c.Ay.div.withConfig({componentId:"sc-m0hsz7-3"})(["height:15px;width:15px;z-index:50;right:0;top:0;position:absolute;border-radius:100px;background:",";background-color:",";",";"],h.Tj.errorColor,h.Tj.errorColor,b.cr),Ae=c.Ay.div.withConfig({componentId:"sc-m0hsz7-4"})(["display:grid;gap:8px;position:relative;@media ","{gap:0px;"," ","}"],h.jO.maxPhone,e=>{let{$showGlobalIcons:t}=e;return t&&"grid-template-columns: auto auto;"},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 }"}),_e=c.Ay.button.withConfig({componentId:"sc-m0hsz7-5"})(["all:unset;position:fixed;display:flex;width:12px;height:24px;right:0;bottom:calc("," + 15px);align-items:center;justify-content:center;background:#fff;border:1px solid #e0e0e0;border-radius:4px 0 0 4px;transition:background 0.2s;cursor:pointer;&:hover{background:#f5f5f5;}&:focus-visible{outline:1px solid #0066cc;}"],e=>{var t;let{position:n}=e;return`${null!==(t=null==n?void 0:n.bottom)&&void 0!==t?t:D.bF.bottom}`});var Ce=n(2927),Se=n(7437),Te=n(628);let Ie=!1;var Oe=n(916),Le=n(8679),Me=n(6367);const $e=function(e){let{color:t,...n}=e;return i.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none"},n),i.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 Ne(e){var t,n,r;let{icons:o,settings:c}=e;const u=(0,s.wA)(),{currentLanguage:d,renderedBy:m}=(0,s.d4)(f.$P),{open:b}=(0,s.d4)(f.o3),[v,C]=(0,i.useState)();return a().createElement(A,{$open:b,$seasonalAppearance:c.seasonal_appearance},a().createElement(K,{ref:e=>{null!=e&&e.clientWidth&&!v&&C(e.clientWidth)}}),a().createElement(_,{onClick:()=>{u((0,p.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?a().createElement(l.US,{width:20,height:20,color:(0,g.w5)((null===(n=c.style)||void 0===n?void 0:n.color_global_icons_button_background)||"#fff",h.AV.light,h.AV.dark)}):a().createElement($e,{width:20,height:20,color:(0,g.w5)((null===(r=c.style)||void 0===r?void 0:r.color_global_icons_button_background)||"#fff",h.AV.light,h.AV.dark)})),a().createElement(x,{$buttonWidth:v,$iconsCount:o.length,$open:b},o.map((e,t)=>{var n;return a().createElement(y,{$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:i,buttonAction:a}=e;(0,Me.n6)({type:"trigger-globalicon",icon:{id:t,title:n,altText:r,imageUrl:o,type:i,action:a},renderedBy:m}),"DIALOGUE"===i&&await u((0,p.zh)(a,{languageCode:d,openChat:!0,tempId:void 0,responsePromise:void 0})),"NUDGE"===i&&await u((0,p.fe)({slug:a,nudgeLayout:void 0,trackEvent:!0})),"URL"===i&&window.open(a,"_blank")})(e)},a().createElement("div",null,a().createElement(w,null,e.title),e.imageUrl&&a().createElement(E,null,a().createElement(k,{src:e.imageUrl,alt:e.altText}))))})))}const Re=a().memo(Ne);let Pe,je=function(e){return e.USER_INACTIVITY="USER_INACTIVITY",e.USER_SCROLLING="USER_SCROLLING",e}({}),De=function(e){return e.BOTH="BOTH",e.MOBILE="MOBILE",e.DESKTOP="DESKTOP",e}({}),ze=!1;const Fe=(0,i.lazy)(()=>Promise.resolve().then(n.bind(n,1033))),Be=(0,i.lazy)(()=>Promise.resolve().then(n.bind(n,8706))),He=(0,i.lazy)(()=>Promise.resolve().then(n.bind(n,7142))),Ue=300;let Ve;function Ge(e){let{hidden:t=!1,onNudgeDismiss:n,onNudgeProductClick:r,onNudgeFormSubmit:c,chatSettings:u}=e;const d=(0,s.Pj)(),h=(0,s.wA)(),{active:g,inPlatform:b,currentLanguage:v,chatHasStarted:y}=(0,s.d4)(f.$P),[w,x]=(0,i.useState)(g),{PAT_HOST:E,PUSHER_KEY:k,VERSION:A}=(0,s.d4)(f.cA),{show:_}=(0,s.d4)(f.zD),{show:C,nudgeLayout:S}=(0,s.d4)(f.G0),{bubbleNotification:T,position:I,fullscreenMode:O}=(0,s.d4)(f.Od),{showBubbleNotification:L}=(0,s.d4)(f.Cv),{open:M}=(0,s.d4)(f.o3),$=(0,m.A)(u,"fullscreenMode",!1),[N,R]=(0,i.useState)(!1),{globalIcons:P,isGlobalIconsDelayed:z}=function(e,t,n){var r;const o=he(),{currentLanguage:a,globalIconsState:l,inPlatform:c}=(0,s.d4)(f.$P),u=(0,s.wA)(),[d,h]=(0,i.useState)(),m=(0,i.useCallback)(()=>{if(!c&&e.global_icons_enabled&&e.global_icons)return e.global_icons.filter(e=>e.enabled[a]).reduce((e,t)=>{let{url:n,enabled:r,icons:o,title:i,trigger_after:a,trigger_on_device:s,trigger_rule:l}=t;return n.forEach(t=>{e.push({enabled:r,icons:o,title:i,trigger_after:a,trigger_on_device:s,trigger_rule:l,url:t})}),n.length||e.push({enabled:r,icons:o,title:i,trigger_after:a,trigger_on_device:s,trigger_rule:l,url:""}),e},[]).sort((e,t)=>e.url.length<t.url.length?1:-1).find(e=>{var t,n;if(!(0,be.A)()&&ue()(t=e.trigger_on_device).call(t,De.DESKTOP)||(0,be.A)()&&ue()(n=e.trigger_on_device).call(n,De.MOBILE))return(0,fe.A)(o,e.url)})},[c,e.global_icons,e.global_icons_enabled,a,o]),g=(0,i.useMemo)(()=>m(),[m]);(0,i.useEffect)(()=>{ze&&e.global_icons_enabled&&h(g)},[t,g,e.global_icons_enabled]);const b=(0,i.useCallback)(e=>{const t=e.target;t.documentElement&&g&&(t.documentElement.scrollHeight-t.documentElement.clientHeight)*(g.trigger_after/100)<t.documentElement.scrollTop&&(h(g),ze=!0)},[g]);return(0,i.useEffect)(()=>{d&&ze&&Pe&&e.global_icons_enabled&&(Pe.removeEventListener("scroll",b),Pe=null)},[d,b,e.global_icons_enabled]),(0,i.useEffect)(()=>{var t;return!ze&&e.global_icons_enabled&&(null===g&&h(void 0),g)&&(g.trigger_rule===je.USER_INACTIVITY&&(g.trigger_after>0&&!ue()(t=l.seenDelayedPages).call(t,g.url)?setTimeout(()=>{h(g),u((0,p.nI)({...l,seenDelayedPages:[...l.seenDelayedPages,g.url]})),ze=!0},1e3*g.trigger_after):(h(g),ze=!0)),g.trigger_rule!==je.USER_SCROLLING||Pe||(Pe=n instanceof Element?n:window.document,Pe.addEventListener("scroll",b))),()=>{Pe&&(Pe.removeEventListener("scroll",b),Pe=null)}},[e,a,n,u,l,g,b]),{globalIcons:d,isGlobalIconsDelayed:!ue()(r=l.seenDelayedPages).call(r,null==g?void 0:g.url)&&g&&g.trigger_after>0}}(u,g),F=(0,be.A)(),B=(0,m.A)(u,"zIndex",D.DP);(0,i.useEffect)(()=>{g&&L&&h((0,p.pK)()),g&&_&&h((0,p.gQ)())},[L,g,F,h,_]),(0,i.useEffect)(()=>{(0,ve.LA)(o()),(0,ve.Kh)(d,k,{channelAuthorization:{transport:"ajax",endpoint:`${E}/chatbubble/${D.Ak}/auth/pusher`,headers:{"kindly-chat-version":A}},cluster:"eu",disableStats:!0,pongTimeout:7500})},[E,k,A,d]),le(),function(){const e=(0,de.jL)(),[t,n]=(0,i.useState)("/"),[r,o]=(0,i.useState)(!1),{shownNudges:a}=(0,s.d4)(f.$P),l=(0,Oe.A)();(0,i.useEffect)(()=>{n(window.location.href),null!=a&&a.length&&!r&&Array.from(new Set(a).values()).map(e=>l.find(t=>t.slug===e)).filter(e=>e).filter(e=>e.analytics_completion_page_path).filter(e=>(0,fe.A)(t,e.analytics_completion_page_path)).forEach(t=>{o(!0),e((0,p.vJ)({slug:t.slug,eventType:Le.oE})),e({type:Le.Kd,slug:t.slug})})},[e,t,l,a,r])}(),function(){const e=(0,de.jL)(),{currentLanguageCode:t}=(0,V.A)(),{active:n,chatHasStarted:r}=(0,s.d4)(f.$P),{pushGreetingsEnabled:o,pushGreetings:a}=(0,s.d4)(f.Od),{dismissedMessages:l}=(0,s.d4)(f.zD),c=he();(0,i.useEffect)(()=>{if(!o||!a||n||!t||r)return;const i=()=>(e,t)=>{const{show:n}=t().pushMessages;ge.length&&(n||(ge[0].autopopup_time>0?setTimeout(()=>{e((0,p.VP)(ge[0])),ge.shift()},ge[0].autopopup_time):(e((0,p.VP)(ge[0])),ge.shift())),ge.length&&setTimeout(()=>e(i()),Math.max(ge[0].autopopup_time,2e3)))};a.map(e=>me(e,t)).filter(e=>e.enabled&&!ue()(l).call(l,e.title)&&(0,fe.A)(c,e.url)).sort((e,t)=>t.url.length-e.url.length).forEach(e=>ge.push(e)),e(i())},[n,t,o,a,e,r,l,c])}(),function(){const e=(0,de.jL)(),{currentLanguageCode:t}=(0,V.A)(),{active:n}=(0,de.GV)(f.$P),{nudges:r}=(0,de.GV)(f.Od),{show:o,hasBeenDismissed:a,slug:s}=(0,de.GV)(f.G0),l=he(),c=null==r?void 0:r.text_nudges;(0,i.useEffect)(()=>{!n&&t&&(null==c?void 0:c.length)>0&&(null!=c?c:[]).forEach(n=>!(o||a&&n.slug===s)&&!(!(0,fe.A)(l,n.url_trigger)||!n.enabled[t])&&e((0,p.mR)({nudge:n,languageCode:t})))},[n,t,e,l,c])}(),function(e){const t=(0,de.jL)(),{token:n,pusherConnected:r,connectTriggerConfig:o}=(0,de.GV)(f.FI),{takenOver:a}=(0,de.GV)(f.MA),{persistStateLifespan:s}=(0,de.GV)(f.Od),{botKey:l,active:c,disabledTransports:u,chatHasStarted:d,wasActiveOnLoad:h,userIsIdle:m,error:g}=(0,de.GV)(f.$P),{chatMessages:b,messageSentTime:v}=(0,de.GV)(f.DZ),[y,w]=(0,i.useState)(!1),x=localStorage.getItem(`kindly-chat-${l}`);(0,i.useEffect)(()=>()=>{Ie=!1},[]),(0,i.useEffect)(()=>(window.addEventListener("online",()=>t((0,p.UJ)())),window.addEventListener("offline",()=>t((0,p.qf)())),()=>{window.removeEventListener("online",()=>t((0,p.UJ)())),window.removeEventListener("offline",()=>t((0,p.qf)()))}),[t]),(0,i.useEffect)(()=>{const n=e.welcomePage.type!==D.Lb.NONE;!d&&h&&!n&&t((0,p.Z4)())}),(0,i.useEffect)(()=>(n||(Ie=!1),()=>{r&&(n&&(0,Te.DT)(n),ve.Zf&&(0,ve.Zf)())}),[r,n]),(0,i.useEffect)(()=>{!c||!d||r||Ie||m||(403!==g||n?n&&(Ie=!0,t((0,p.fk)(n,u))):(Ie=!0,t((0,p.mg)())))},[c,d,t,g,r,n,m,u]),(0,i.useEffect)(()=>{o&&t((0,p.mg)(o))},[o,t]),(0,i.useEffect)(()=>{r&&o&&t((0,p.XO)())},[o,t,r]),(0,i.useEffect)(()=>{const e=c&&d;if(r||Ie||m||o)return;const i=(0,Ce.A)({messageSentTime:v,persistStateLifespan:s});(e||n)&&(e&&!n?(Ie=!0,t((0,p.mg)({shouldGreet:d}))):i&&(Ie=!0,t((0,p.fk)(n,u))))},[c,o,r,n,u,t,b.length,d,m,g,v,s,x,l]),(0,i.useEffect)(()=>{Ie&&r&&(Ie=!1,t((0,Se.S4)()),w(!0))},[r,t]),(0,i.useEffect)(()=>{if(r&&m&&!a){n&&(0,Te.DT)(n);try{(0,ve.Zf)()}catch{}}},[m,r,a,n]),(0,i.useEffect)(()=>{n&&c&&!y&&(0,Ce.A)({messageSentTime:v,persistStateLifespan:s})&&(t((0,Se.S4)()),w(!0))},[c,t,y,n])}(u);const H=!g&&_&&!t,U=P&&!g&&!C&&u.global_icons_enabled&&!H,G=(0,se.A)(g);return(0,i.useEffect)(()=>{!g&&G?(Ve&&clearTimeout(Ve),Ve=setTimeout(()=>x(g),Ue+10)):G!==g&&(Ve&&clearTimeout(Ve),x(g))},[G,g]),a().createElement(a().Fragment,null,a().createElement(we,{$fullscreen:!!$,$active:g,$chatHasStarted:y,$inPlatform:b,$position:I,$zIndex:B,$shouldHideUI:N,id:"kindly-root"},a().createElement(Ee,{$chatHasStarted:y,$fullscreenMode:O,$active:g,$duration:Ue},w&&a().createElement(i.Suspense,{fallback:""},a().createElement(Fe,{settings:u}))),H&&a().createElement(j,{settings:u}),C&&S&&a().createElement(i.Suspense,{fallback:""},a().createElement(Be,{hidden:t,layout:S,onDismiss:n,onNewsletterSubmit:c,onProductClick:r})),a().createElement(xe,{$inPlatform:b,$position:I,$zIndex:B,id:"ChatButtonContainer",$active:g,lang:v},!g&&T&&L&&a().createElement(ke,null),!t&&a().createElement(Ae,{$showGlobalIcons:U,$globalIconsOpen:M},b&&a().createElement(i.Suspense,{fallback:""},a().createElement(He,{active:g})),U&&a().createElement(Re,{icons:P.icons,settings:u}),a().createElement(ne,{showGlobalIcons:!!U,isGlobalIconsDelayed:z})))),b&&a().createElement(_e,{onClick:()=>R(e=>!e)},N?a().createElement(l.A6,{stroke:"black"}):a().createElement(l.fl,{stroke:"black"})))}},1897:(e,t,n)=>{"use strict";n.d(t,{Dw:()=>u,Er:()=>l,Fu:()=>c,ue:()=>a});var r=n(7251),o=n(8679),i=n(4142);const a={active:!1,allGreetingsHideInput:!1,attachments:{exchangeId:null,buttonClicked:null,files:[]},botKey:null,chatHasStarted:!1,chatId:null,contactDetailsButton:null,currentLanguage:"en",currentlyPoppedUp:!1,disabledTransports:[],wasActiveOnLoad:!1,error:null,globalIconsState:{seenDelayedPages:[],open:!0},hideInputField:!1,inPlatform:!1,isChatFullWindow:!1,complianceWasRevoked:!1,complianceWasShownInWelcomePage:!1,currentModal:null,overlayViews:[],previouslyPoppedUp:!1,renderedBy:"REACT",shownNudges:[],startedAt:null,uploadButtonWasClicked:null,userIsIdle:!1},s=(0,r.Z0)({name:"chatBubble",initialState:a,reducers:{setComplianceWasShownInWelcomePage:(e,t)=>{e.complianceWasShownInWelcomePage=t.payload.wasShown},setComplianceWasRevoked:(e,t)=>{e.complianceWasRevoked=t.payload.wasRevoked}},extraReducers:e=>e.addCase(o.tr,(e,t)=>{e.error=t.payload.error}).addCase(o.M2,(e,t)=>{e.currentLanguage=t.payload.code}).addCase(o.CB,(e,t)=>{e.botKey=t.payload.botKey||e.botKey,e.chatId=a.chatId,e.error=a.error,e.complianceWasShownInWelcomePage=a.complianceWasShownInWelcomePage,e.currentModal=a.currentModal,e.overlayViews=a.overlayViews,e.hideInputField=a.hideInputField,e.userIsIdle=a.userIsIdle}).addCase(o.ny,(e,t)=>{e.chatId=t.payload.chatId,e.allGreetingsHideInput=t.payload.allGreetingsHideInput,e.currentModal=a.currentModal,e.overlayViews=a.overlayViews}).addCase(o.d$,(e,t)=>{e.chatHasStarted=t.payload.chatHasStarted,e.userIsIdle=!t.payload.chatHasStarted&&e.userIsIdle}).addCase(o.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(o.kA,e=>{e.active=!0,e.userIsIdle=!1}).addCase(o.uS,e=>{e.active=!1}).addCase(o.hn,e=>{e.previouslyPoppedUp=!0,e.currentlyPoppedUp=!0}).addCase(o.IM,e=>e).addCase(o.nm,(e,t)=>{e.startedAt=t.payload.startedAt}).addCase(o.HW,(e,t)=>{e.userIsIdle=t.payload.userIsIdle}).addCase(o.Eg,(e,t)=>{e.contactDetailsButton=t.payload.button}).addCase(o.t1,e=>{e.contactDetailsButton=null}).addCase(o.wX,(e,t)=>{e.shownNudges=(e.shownNudges||[]).concat(t.payload.slug)}).addCase(o.FZ,(e,t)=>{e.attachments.buttonClicked=(+new Date).toString(),e.attachments.exchangeId=t.payload.button.value}).addCase(o.TF,(e,t)=>{e.attachments.files=t.payload.files}).addCase(o.Q4,e=>{e.attachments.exchangeId=null,e.attachments.buttonClicked=null,e.attachments.files=[]}).addCase(o.YR,e=>{e.attachments.buttonClicked=null}).addCase(o.Kd,(e,t)=>{e.shownNudges=(e.shownNudges||[]).filter(e=>e!==t.payload.slug)}).addCase(o.uA,(e,t)=>{e.globalIconsState={...e.globalIconsState,...t.payload.state}}).addCase(o.Xu,(e,t)=>{e.currentModal=t.payload.currentModal}).addCase(o.XM,(e,t)=>{e.isChatFullWindow=t.payload.isChatFullWindow}).addCase(o.wM,(e,t)=>{e.overlayViews=[...e.overlayViews,t.payload.view]}).addCase(o.SO,e=>{e.overlayViews=[]}).addCase(o.nX,e=>{e.overlayViews=e.overlayViews.slice(0,-1)}).addCase(i.S.rejected,e=>{e.currentModal=null,e.overlayViews=e.overlayViews.filter(e=>"FEEDBACK"!==e)})}),{setComplianceWasShownInWelcomePage:l,setComplianceWasRevoked:c}=s.actions,u=s.reducer},1918:(e,t,n)=>{"use strict";var r=n(9098),o=n(1203),i=n(908),a=n(262),s=n(2137),l=n(8130),c=n(5657),u=n(4492),d=n(4417),p=n(3121),f=n(8655),h=n(5547),m=f("isConcatSpreadable"),g=h>=51||!o(function(){var e=[];return e[m]=!1,e.concat()[0]!==e}),b=function(e){if(!a(e))return!1;var t=e[m];return void 0!==t?!!t:i(e)};r({target:"Array",proto:!0,arity:1,forced:!g||!p("concat")},{concat:function(e){var t,n,r,o,i,a=s(this),p=d(a,0),f=0;for(t=-1,r=arguments.length;t<r;t++)if(b(i=-1===t?a:arguments[t]))for(o=l(i),c(f+o),n=0;n<o;n++,f++)n in i&&u(p,f,i[n]);else c(f+1),u(p,f++,i);return p.length=f,p}})},1926:(e,t,n)=>{"use strict";var r=n(2621).IteratorPrototype,o=n(5780),i=n(480),a=n(1811),s=n(6625),l=function(){return this};e.exports=function(e,t,n,c){var u=t+" Iterator";return e.prototype=o(r,{next:i(+!c,n)}),a(e,u,!1,!0),s[u]=l,e}},1949:e=>{"use strict";e.exports=r},1966:(e,t,n)=>{"use strict";var r=n(2937),o=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw new i("Can't set "+o(e)+" as a prototype")}},2002:(e,t,n)=>{"use strict";var r=n(9098),o=n(1003),i=n(701),a=n(1139),s=n(8141),l=n(2044),c=s("string-to-symbol-registry"),u=s("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!l},{for:function(e){var t=a(e);if(i(c,t))return c[t];var n=o("Symbol")(t);return c[t]=n,u[n]=t,n}})},2036:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(8681);const o=e=>{const t=(null!=e?e:"").toLowerCase();return"external_link"===t?"link":"handover_request"===t?"takeover_request":t},i=e=>{let{button_type:t,...n}=e;return{...n,button_type:o(t),category:(0,r.A)(t)}}},2044:(e,t,n)=>{"use strict";var r=n(4603);e.exports=r&&!!Symbol.for&&!!Symbol.keyFor},2100:(e,t,n)=>{"use strict";n(4531)("patternMatch")},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 i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l<i.length;l++){var c=i[l];if(!s(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}},2194:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>l,cT:()=>a,ue:()=>s});var r=n(2221),o=n(8709),i=n(8679);const a={KINDLY_GPT:"kindly-gpt"},s={id:null,name:"",avatar:"",botName:"",botAvatar:"",text:null,startOverText:"Start over",placeholder:"",typingIndicator:!1,isTyping:!1,typingType:void 0,realtimeAnalytics:!1,inputLimitEnabled:!1,inputLimit:140,isTextDirectionRtl:!1,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]:s,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case i.CB:return{...e,name:e.botName,avatar:e.botAvatar,splitLabelTimestamp:Date.now()};case i.A8:var n;return{...e,isTyping:e.typingIndicator,typingType:null===(n=t.data)||void 0===n?void 0:n.type};case i.wk:return{...e,isTyping:!1,typingType:void 0};case i.tq:return{...e,hasInteraction:!0,splitLabelTimestamp:Date.now()};case i.M2:{var r;const n=null===(r=t.payload)||void 0===r?void 0:r.code;return{...e,isTextDirectionRtl:(0,o.A)(n)}}default:return e}}},2221:(e,t,n)=>{"use strict";n.d(t,{Ak:()=>r.Ak,DP:()=>m,Gi:()=>l,Ii:()=>y,Je:()=>w,Jm:()=>v,Lb:()=>o,Le:()=>d,M3:()=>h,MK:()=>u,Ns:()=>f,RT:()=>a,T5:()=>s,bF:()=>g,bS:()=>i,dT:()=>r.dT,fl:()=>r.fl,gH:()=>r.gH,lP:()=>c,oY:()=>x,rc:()=>b,sl:()=>p});var r=n(9292);const o=Object.freeze({NONE:"NONE",COLOR:"COLOR",PICTURE:"PICTURE"}),i=Object.freeze({USER:"USER",BOT:"BOT",WEBHOOK:"WEBHOOK",AGENT:"AGENT",SYSTEM:"SYSTEM",EXTERNAL:"EXTERNAL"}),a=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}),s=Object.freeze({1e3:"250",800:"178",600:"124"}),l=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",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",CONTACT_DETAILS:"CONTACT_DETAILS",UPLOAD_ATTACHMENT:"UPLOAD_ATTACHMENT",CHECKBOX:"CHECKBOX",SUBMIT:"SUBMIT",edit_contact_details:"edit_contact_details",SLIDER:"SLIDER",END_CHAT:"END_CHAT"}),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",VIDEO:"video"}),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",NO_SPLIT_LABEL:void 0}),18e5),m=5e3,g=Object.freeze({bottom:"16px",right:"16px"}),b=Object.freeze({PREFIX:"PREFIX",SUFFIX:"SUFFIX"}),v=Object.freeze({MAINTENANCE:"MAINTENANCE",LANGUAGE_SWITCH:"LANGUAGE_SWITCH"}),y=(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"}),x=[".pdf",".heic","image/*","video/*","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";var r=n(8900);n(1811)(r.JSON,"JSON",!0)},2320:(e,t,n)=>{"use strict";n(4531)("asyncIterator")},2471:(e,t,n)=>{var r=n(3844),o=n(5216);function i(t){return e.exports=i="function"==typeof r&&"symbol"==typeof o?function(e){return typeof e}:function(e){return e&&"function"==typeof r&&e.constructor===r&&e!==r.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,i(t)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},2475:(e,t,n)=>{"use strict";n.d(t,{AK:()=>v,JP:()=>y,Zm:()=>f,cr:()=>b,jB:()=>m,qL:()=>o,vW:()=>i,yu:()=>g});var r=n(3864);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300;return(0,r.AH)(["animation-timing-function:ease;animation-iteration-count:1;animation-fill-mode:forwards;animation-duration:","ms;"],e)},i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300;return(0,r.AH)(["height:0;width:0;padding:0;transition:width 0.1ms ease ","ms,padding 0.1ms ease ","ms,height 0.1ms ease ","ms;"],e,e,e)},a=(0,r.i7)(["0%{opacity:0;transform:translateY(-10px);}100%{opacity:1;transform:translateY(0);}"]),s=(0,r.i7)(["0%{opacity:0;transform:translateY(10px);}100%{opacity:1;transform:translateY(0);}"]),l=(0,r.i7)(["0%{opacity:0;transform:translateX(-15px);}100%{opacity:1;transform:translateX(0);}"]),c=(0,r.i7)(["0%{opacity:0;transform:translateX(-15px);}100%{opacity:0.8;transform:translateX(0);}"]),u=(0,r.i7)(["0%{opacity:0;transform:translateX(15px);}100%{opacity:1;transform:translateX(0);}"]),d=(0,r.i7)(["0%{opacity:0;transform:translateY(-100%);}100%{opacity:1;transform:translateY(0);}"]),p=(0,r.i7)(["0%{opacity:0;}100%{opacity:1;}"]),f=(0,r.i7)(["50%{opacity:0.5;}"]),h=((0,r.i7)(["50%{opacity:0.2;}"]),(0,r.i7)(["10%{transform:translateY(-5px);}50%{opacity:0.5;transform:translateY(0);}"])),m=(0,r.AH)([""," animation-name:",""],o(),p),g=(0,r.AH)([""," animation-name:",""],o(),a),b=(0,r.AH)([""," animation-name:",""],o(),s),v=(0,r.AH)([""," animation-name:",""],o(),l),y=((0,r.AH)([""," animation-name:",""],o(),c),(0,r.AH)([""," animation-name:",""],o(),u));(0,r.AH)([""," animation-name:",""],o(),d),(0,r.AH)(["animation:1.8s "," infinite 0.3s;"],h)},2492:()=>{},2552:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(9749),o=n.n(r);const i=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,i]=n;return{...e,...o()(t).call(t,r)?{}:{[r]:i}}},{})}}},2621:(e,t,n)=>{"use strict";var r,o,i,a=n(1203),s=n(2769),l=n(262),c=n(5780),u=n(3671),d=n(3508),p=n(8655),f=n(4871),h=p("iterator"),m=!1;[].keys&&("next"in(i=[].keys())?(o=u(u(i)))!==Object.prototype&&(r=o):m=!0),!l(r)||a(function(){var e={};return r[h].call(e)!==e})?r={}:f&&(r=c(r)),s(r[h])||d(r,h,function(){return this}),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:m}},2628:(e,t,n)=>{"use strict";n.d(t,{A:()=>Ze});var r,o="user-agent",i="",a="function",s="object",l="string",c="undefined",u="browser",d="cpu",p="device",f="engine",h="os",m="result",g="name",b="type",v="vendor",y="version",w="architecture",x="major",E="model",k="console",A="mobile",_="tablet",C="smarttv",S="wearable",T="xr",I="embedded",O="inapp",L="brands",M="formFactors",$="fullVersionList",N="platform",R="platformVersion",P="bitness",j="sec-ch-ua",D=j+"-full-version-list",z=j+"-arch",F=j+"-"+P,B=j+"-form-factors",H=j+"-"+A,U=j+"-"+E,V=j+"-"+N,G=V+"-version",W=[L,$,A,E,N,R,w,M,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",ie="OnePlus",ae="OPPO",se="Samsung",le="Sharp",ce="Sony",ue="Xiaomi",de="Zebra",pe="Chrome",fe="Chromium",he="Chromecast",me="Edge",ge="Firefox",be="Opera",ve="Facebook",ye="Sogou",we="Mobile ",xe=" Browser",Ee="Windows",ke=typeof window!==c&&window.navigator?window.navigator:void 0,Ae=ke&&ke.userAgentData?ke.userAgentData:void 0,_e=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},Ce=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!!Te(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])},Te=function(e){return typeof e===l},Ie=function(e){if(e){for(var t=[],n=$e(/\\?\"/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 Te(e)?e.toLowerCase():e},Le=function(e){return Te(e)?$e(/[^\d\.]/g,e).split(".")[0]:void 0},Me=function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];typeof n==s&&2==n.length?this[n[0]]=n[1]:this[n]=void 0}return this},$e=function(e,t){return Te(t)?t.replace(e,i):t},Ne=function(e){return $e(/\\?\"/g,e)},Re=function(e,t){return e=$e(/^\s\s*/,String(e)),typeof t===c?e:e.substring(0,t)},Pe=function(e,t){if(e&&t)for(var n,r,o,i,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(i=p[o])===s&&i.length>0?2===i.length?typeof i[1]==a?this[i[0]]=i[1].call(this,c):this[i[0]]=i[1]:i.length>=3&&(typeof i[1]!==a||i[1].exec&&i[1].test?3==i.length?this[i[0]]=c?c.replace(i[1],i[2]):void 0:4==i.length?this[i[0]]=c?i[3].call(this,c.replace(i[1],i[2])):void 0:i.length>4&&(this[i[0]]=c?i[3].apply(this,[c.replace(i[1],i[2])].concat(i.slice(4))):void 0):i.length>3?this[i[0]]=c?i[1].apply(this,i.slice(2)):void 0:this[i[0]]=c?i[1].call(this,c,i[2]):void 0):this[i]=c||void 0;u+=2}},je=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(Ce(t[n][r],e))return"?"===n?void 0:n}else if(Ce(t[n],e))return"?"===n?void 0:n;return t.hasOwnProperty("*")?t["*"]:e},De={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:""},ze={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},Fe={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,we+"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|palemoon)\/([-\w\.]+)/i,/(heytap|ovi|115|surf|qwant)browser\/([\d\.]+)/i,/(qwant)(?:ios|mobile)\/([\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+xe]],[/(avast|avg)\/([\w\.]+)/i],[[g,/(.+)/,"$1 Secure"+xe],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"+xe]],[/fxios\/([\w\.-]+)/i],[y,[g,we+ge]],[/\bqihoobrowser\/?([\w\.]*)/i],[y,[g,"360"]],[/\b(qq)\/([\w\.]+)/i],[[g,/(.+)/,"$1Browser"],y],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[g,/(.+)/,"$1"+xe],y],[/samsungbrowser\/([\w\.]+)/i],[y,[g,se+" 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,/(bing)(?:web|sapphire)\/([\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]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[g,/(.+)/,"Zalo"],y,[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"+xe]],[/chrome\/([\w\.]+) mobile/i],[y,[g,we+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[g,y],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[y,[g,we+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[g,we+"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,we+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|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+(?= .+rv\:.+gecko\/\d+)|[0-4][\w\.]+(?!.+compatible))/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\.]+./,i]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[w,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[w,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[w,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[w,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[w,"arm"]],[/ sun4\w[;\)]/i],[[w,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i,/((ppc|powerpc)(64)?)( mac|;|\))/i,/(?:osf1|[freopnt]{3,4}bsd) (alpha)/i],[[w,/ower/,i,Oe]],[/mc680.0/i],[[w,"68k"]],[/winnt.+\[axp/i],[[w,"alpha"]]],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,se],[b,_]],[/\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,se],[b,A]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i],[E,[v,K],[b,A]],[/\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,/\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i],[E,[v,K],[b,_]],[/(macintosh);/i],[E,[v,K]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[E,[v,le],[b,A]],[/\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,_]],[/honor([-\w ]+)[;\)]/i],[E,[v,ee],[b,A]],[/\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,_]],[/(?:huawei) ?([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i],[E,[v,J],[b,A]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[E,/_/g," "],[v,ue],[b,_]],[/\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|max|cc)?[_ ]?(?:\d{0,2}\w?)[_ ]?(?:plus|se|lite|pro)?( 5g|lte)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[E,/_/g," "],[v,ue],[b,A]],[/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,ie],[b,A]],[/; (\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,ae],[b,A]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[E,[v,je,{OnePlus:["203","304","403","404","413","415"],"*":ae}],[b,_]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[E,[v,"BLU"],[b,A]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[E,[v,"Vivo"],[b,A]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[E,[v,"Realme"],[b,A]],[/(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,_]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[E,[v,Q],[b,A]],[/\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,A]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[E,[v,re],[b,_]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[E,[v,te],[b,_]],[/(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,A]],[/(nokia) (t[12][01])/i],[v,E,[b,_]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i],[[E,/_/g," "],[b,A],[v,"Nokia"]],[/(pixel (c|tablet))\b/i],[E,[v,Z],[b,_]],[/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,A]],[/(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,A]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[E,"Xperia Tablet"],[v,ce],[b,_]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[E,[v,q],[b,_]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[E,/(.+)/g,"Fire Phone $1"],[v,q],[b,A]],[/(playbook);[-\w\),; ]+(rim)/i],[E,v,[b,_]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/(?:blackberry|\(bb10;) (\w+)/i],[E,[v,X],[b,A]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[E,[v,Y],[b,_]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[E,[v,Y],[b,A]],[/(nexus 9)/i],[E,[v,"HTC"],[b,_]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[v,[E,/_/g," "],[b,A]],[/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,_]],[/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,A]],[/(itel) ((\w+))/i],[[v,Oe],E,[b,je,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[E,[v,"Acer"],[b,_]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[E,[v,"Meizu"],[b,A]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[E,[v,"Ulefone"],[b,A]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[E,[v,"Energizer"],[b,A]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[E,[v,"Cat"],[b,A]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[E,[v,"Smartfren"],[b,A]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[E,[v,"Nothing"],[b,A]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[E,[v,"Archos"],[b,_]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[E,[v,"Archos"],[b,A]],[/; (n159v)/i],[E,[v,"HMD"],[b,A]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[v,E,[b,_]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl|wiko)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i,/(hisense) ([ehv][\w ]+)\)/i,/droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i],[v,E,[b,A]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[v,E,[b,_]],[/(surface duo)/i],[E,[v,ne],[b,_]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[E,[v,"Fairphone"],[b,A]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[E,[v,oe],[b,_]],[/(sprint) (\w+)/i],[v,E,[b,A]],[/(kin\.[onetw]{3})/i],[[E,/\./g," "],[v,ne],[b,A]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[E,[v,de],[b,_]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[E,[v,de],[b,A]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[v,[b,C]],[/hbbtv.+maple;(\d+)/i],[[E,/^/,"SmartTV"],[v,se],[b,C]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[v,E,[b,C]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[v,te],[b,C]],[/(apple) ?tv/i],[v,[E,K+" TV"],[b,C]],[/crkey.*devicetype\/chromecast/i],[[E,he+" Third Generation"],[v,Z],[b,C]],[/crkey.*devicetype\/([^/]*)/i],[[E,/^/,"Chromecast "],[v,Z],[b,C]],[/fuchsia.*crkey/i],[[E,he+" Nest Hub"],[v,Z],[b,C]],[/crkey/i],[[E,he],[v,Z],[b,C]],[/(portaltv)/i],[E,[v,ve],[b,C]],[/droid.+aft(\w+)( bui|\))/i],[E,[v,q],[b,C]],[/(shield \w+ tv)/i],[E,[v,oe],[b,C]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[E,[v,le],[b,C]],[/(bravia[\w ]+)( bui|\))/i],[E,[v,ce],[b,C]],[/(mi(tv|box)-?\w+) bui/i],[E,[v,ue],[b,C]],[/Hbbtv.*(technisat) (.*);/i],[v,E,[b,C]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[v,/.+\/(\w+)/,"$1",je,{LG:"lge"}],[E,Re],[b,C]],[/(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,se],[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,ae],[b,S]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[E,[v,K],[b,S]],[/(opwwe\d{3})/i],[E,[v,ie],[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,T]],[/(pico) ([\w ]+) os\d/i],[v,E,[b,T]],[/(quest( \d| pro)?s?).+vr/i],[E,[v,ve],[b,T]],[/mobile vr; rv.+firefox/i],[[b,T]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[v,[b,I]],[/(aeobc)\b/i],[E,[v,q],[b,I]],[/(homepod).+mac os/i],[E,[v,K],[b,I]],[/windows iot/i],[[b,I]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[E,[b,C]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[b,C]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i],[E,[b,je,{mobile:"Mobile",xr:"VR","*":_}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[b,_]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[b,A]],[/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,je,De]],[/(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,"",je,De],[g,Ee]],[/(windows ce)\/?([\d\.]*)/i],[g,y],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w\.]+)/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,je,{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=(Me.call((r={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}}).init,[[u,[g,y,x,b]],[d,[w]],[p,[b,E,v]],[f,[g,y]],[h,[g,y]]]),Me.call(r.isIgnore,[[u,[y,x]],[f,[y]],[h,[y]]]),Me.call(r.isIgnoreRgx,[[u,/ ?browser$/i],[h,/ ?os$/i]]),Me.call(r.toString,[[u,[g,y]],[d,[w]],[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,a=He.toString[t]||0;function s(){Me.call(this,n)}return s.prototype.getItem=function(){return e},s.prototype.withClientHints=function(){return Ae?Ae.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)&&!Ce(r,n)&&Oe(o?$e(o,this[n]):this[n])==Oe(o?$e(o,e):e)){if(t=!0,e!=c)break}else if(e==c&&t){t=!t;break}return t},s.prototype.toString=function(){var e=i;for(var t in a)typeof this[a[t]]!==c&&(e+=(e?" ":i)+this[a[t]]);return e||c}),Ae||(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||{},Me.call(this,W),t)Me.call(this,[[L,Ie(e[j])],[$,Ie(e[D])],[A,/\?1/.test(e[H])],[E,Ne(e[U])],[N,Ne(e[V])],[R,Ne(e[G])],[w,Ne(e[z])],[M,Ie(e[B])],[P,Ne(e[F])]]);else for(var n in e)this.hasOwnProperty(n)&&typeof e[n]!==c&&(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==a&&this.set(g,"Brave");break;case p:!this.get(b)&&Ae&&Ae[A]&&this.set(b,A),"Macintosh"==this.get(E)&&ke&&typeof ke.standalone!==c&&ke.maxTouchPoints&&ke.maxTouchPoints>2&&this.set(E,"iPad").set(b,_);break;case h:!this.get(g)&&Ae&&Ae[N]&&this.set(g,Ae[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(){switch(this.itemType!=m&&Pe.call(this.data,this.ua,this.rgxMap),this.itemType){case u:this.set(x,Le(this.get(y)));break;case h:if("iOS"==this.get(g)&&"18.6"==this.get(y)){var e=/\) Version\/([\d\.]+)/.exec(this.ua);e&&parseInt(e[1].substring(0,2),10)>=26&&this.set(y,e[1])}}return this},this.parseCH=function(){var e=this.uaCH,t=this.rgxMap;switch(this.itemType){case u:case f:var n,r=e[$]||e[L];if(r)for(var o=0;o<r.length;o++){var i=r[o].brand||r[o],a=r[o].version;this.itemType==u&&!/not.a.brand/i.test(i)&&(!n||/Chrom/.test(n)&&i!=fe||n==me&&/WebView2/.test(i))&&(i=je(i,Fe),(n=this.get(g))&&!/Chrom/.test(n)&&/Chrom/.test(i)||this.set(g,i).set(y,a).set(x,Le(a)),n=i),this.itemType==f&&i==fe&&this.set(y,a)}break;case d:var s=e[w];s&&(s&&"64"==e[P]&&(s+="64"),Pe.call(this.data,s+";",t));break;case p:if(e[A]&&this.set(b,A),e[E]&&(this.set(E,e[E]),!this.get(b)||!this.get(v))){var l={};Pe.call(l,"droid 9; "+e[E]+")",t),!this.get(b)&&l.type&&this.set(b,l.type),!this.get(v)&&l.vendor&&this.set(v,l.vendor)}if(e[M]){var c;if("string"!=typeof e[M])for(var k=0;!c&&k<e[M].length;)c=je(e[M][k++],ze);else c=je(e[M],ze);this.set(b,c)}break;case h:var _=e[N];if(_){var C=e[R];_==Ee&&(C=parseInt(Le(C),10)>=13?"11":"10"),this.set(g,_).set(y,C)}this.get(g)==Ee&&"Xbox"==e[E]&&this.set(g,"Xbox").set(y,void 0);break;case m:var S=this.data,T=function(t){return S[t].getItem().setCH(e).parseCH().get()};this.set(u,T(u)).set(d,T(d)).set(p,T(p)).set(f,T(f)).set(h,T(h))}return this},Me.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!==l||Se(t,!0)||(n=t,t=void 0),n)if(typeof n.append===a){var r={};n.forEach(function(e,t){r[String(t).toLowerCase()]=e}),n=r}else{var c={};for(var g in n)n.hasOwnProperty(g)&&(c[String(g).toLowerCase()]=n[g]);n=c}if(!(this instanceof We))return new We(e,t,n).getResult();var b=typeof e===l?e:n&&n[o]?n[o]:ke&&ke.userAgent?ke.userAgent:i,v=new Ve(n,!0),y=t?function(e,t){var n={},r=t;if(!Se(t))for(var o in r={},t)for(var i in t[o])r[i]=t[o][i].concat(r[i]?r[i]:[]);for(var a in e)n[a]=r[a]&&r[a].length%2==0?r[a].concat(e[a]):e[a];return n}(Be,t):Be,w=function(e){return e==m?function(){return new Ge(e,b,y,v).set("ua",b).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,b,y[e],v).parseUA().get()}};return Me.call(this,[["getBrowser",w(u)],["getCPU",w(d)],["getDevice",w(p)],["getEngine",w(f)],["getOS",w(h)],["getResult",w(m)],["getUA",function(){return b}],["setUA",function(e){return Te(e)&&(b=Re(e,500)),this}]]).setUA(b),this}We.VERSION="2.0.6",We.BROWSER=_e([g,y,x,b]),We.CPU=_e([w]),We.DEVICE=_e([E,v,b,k,A,C,_,S,I]),We.ENGINE=We.OS=_e([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=()=>"mobile"===(null==Xe?void 0:Xe.device.type)||"tablet"===(null==Xe?void 0:Xe.device.type)},2720:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(9155),o=n.n(r),i=n(3864),a=n(6052);const s=i.Ay.div.withConfig({componentId:"sc-1vynzdk-0"})(["visibility:hidden;padding:4px 8px;font-size:var(--_kindlychat-font-size-sm);background-color:",";color:",";border-radius:6px;z-index:99999;position:absolute;width:max-content;word-break:normal;overflow-wrap:anywhere;",""],e=>{let{theme:t}=e;return(0,a.w5)(t.background,"rgba(255, 255, 255, 0.9)","rgba(0, 0, 0, 0.9)")},e=>{let{theme:t}=e;return(0,a.w5)(t.background,"rgba(0, 0, 0, 0.8)","rgba(255, 255, 255, 0.8)")},e=>{let{$position:t}=e;switch(t){case"top":default:return"bottom: 100%;";case"bottom":return"top: 100%;"}}),l=i.Ay.div.withConfig({componentId:"sc-1vynzdk-1"})(["display:flex;flex-direction:row;align-items:center;position:relative;&:hover ","{visibility:visible;}"],s),c=function(e){let{children:t,text:n,position:i="top",testId:a="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:i,y:a,left:s,width:l,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"),i+l>d+f){var m;const e=d+f,t=Math.abs(e-s-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,w,x;a-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")),a+u>p+h&&(null===(w=c.current)||void 0===w||w.style.setProperty("top","auto"),null===(x=c.current)||void 0===x||x.style.setProperty("bottom","100%"))}()},[i]),o().createElement(l,{"data-testid":a},t,o().createElement(s,{ref:c,"data-testid":`${a}-text`,$position:i},n))}},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"],i=n&&n[t];if(i)return i;var a=r[e],s=a&&a.prototype;return s&&s[t]}},2871:(e,t,n)=>{"use strict";var r=n(1203);e.exports=!r(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},2894:(e,t,n)=>{"use strict";var r=n(6100),o=n(2769),i=n(3753),a=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),e.exports=i.inspectSource},2921:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const r=e=>{let{buttonId:t,chatMessageId:n}=e;return`button-click-${n}-${t}`},o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t=>!e.find(e=>r(t)===r(e))}},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})},2937:(e,t,n)=>{"use strict";var r=n(262);e.exports=function(e){return r(e)||null===e}},2991:(e,t,n)=>{"use strict";n(9098)({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:n(5396)})},2996:(e,t,n)=>{"use strict";n(4531)("replaceAll")},3049:(e,t,n)=>{"use strict";n.d(t,{UJ:()=>h,XO:()=>v,fk:()=>g,mg:()=>b,qf:()=>m});var r=n(5096),o=n(8410),i=n(2221),a=n(4851),s=n(9359),l=n(9313),c=n(892),u=n(628),d=n(8679),p=n(7325);const f="pusherTransportEncrypted",h=()=>(e,t)=>{const{connected:n}=t().connection;n||e({type:d._Y})},m=()=>(e,t)=>{const{connected:n}=t().connection;n&&e({type:d._N})},g=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return async n=>{const r=window.localStorage.getItem(f),o=r?JSON.parse(r):null;t.indexOf("ws")<0&&o&&"ws"!==o.transport&&window.localStorage.removeItem(f),await n((0,c.JL)()),await n((0,c.Mx)()),(0,l.Xs)({channelAuthorization:{headers:{"kindly-chatbubble-token":e,"Current-Url":window.location.href}},disabledTransports:t}),(0,u.Cy)(e)}},b=function(){let{triggerDialogueSlug:e,languageCode:t,shouldGreet:n=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async(c,f)=>{var h,m,b;const{local:{context:v,labels:y},chatbubble:{botKey:w,currentLanguage:x,disabledTransports:E,complianceWasShownInWelcomePage:k},environment:{PAT_HOST:A},bot:{includeDisabledLanguages:_}}=f();n&&c({type:d.A8});const C=t||x,S=(new Date).toISOString(),T=await c((0,u.et)(`${A}/chatbubble/${i.Ak}/connect`,{method:"POST",body:{labels:y,context:v,language_code:C,trigger_dialogue_slug:e,include_disabled_languages:_,should_greet:n,include_greeting:!0,tz:null===Intl||void 0===Intl||null===(h=Intl.DateTimeFormat)||void 0===h||null===(m=h.call(Intl))||void 0===m||null===(b=m.resolvedOptions())||void 0===b?void 0:b.timeZone},...(0,a.A)({botKey:w},{withCurrentUrl:!0,withVersion:!0})}));if(!T)return c({type:d.wk}),!1;const{pusherConnected:I}=f().connection;if(I)try{(0,l.Zf)()}catch(e){console.warn(e)}const{token:O,chat_id:L,created:M,all_greetings_hide_input:$,greeting:N,live_translation_system_dialogue:R}=T.data;c({type:d.wk}),c({type:d.ny,token:O,chatId:L,allGreetingsHideInput:$}),c({type:d.nm,startedAt:M}),c((0,u.TP)(S));const P="NONE"!==r.Z.welcomePage.type,{isEnabled:j,descriptionTextHtml:D,requireAgreement:z}=(0,s.A)(C);return!j||z||k&&P||c({type:d.z2,payload:{message:D,system_dialogue_message_type:o.zV.COMPLIANCE}}),j&&z&&!k&&c((0,p.zn)("COMPLIANCE")),R&&c({type:d.tq,data:R}),N&&c({type:d.tq,data:N}),c(g(O,E)),!0}},v=e=>t=>t({type:d.zT,triggerConfig:e})},3057:e=>{"use strict";e.exports=function(e){return null==e}},3058:(e,t,n)=>{"use strict";n.d(t,{AF:()=>c,L9:()=>s,Mo:()=>a,sF:()=>i,uh:()=>l});var r=n(3864),o=n(6052);const i=()=>"\n #chatContainer:not(.using-tab) & {\n outline: none;\n }\n",a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return`\n background: ${(0,o.w5)(e,`rgba(255, 255, 255, ${t})`,`rgba(0, 0, 0, ${t})`)};\n background-color: ${(0,o.w5)(e,`rgba(255, 255, 255, ${t})`,`rgba(0, 0, 0, ${t})`)};\n`},s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16;const n=parseInt(e,10);return n<t?Math.ceil(t/n*100):100},l=(0,r.AH)(["position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0;"]),c=(0,r.AH)(["background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;cursor:pointer;"])},3121:(e,t,n)=>{"use strict";var r=n(1203),o=n(8655),i=n(5547),a=o("species");e.exports=function(e){return i>=51||!r(function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo})}},3131:()=>{},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(7542),i=n(4927),a=n(8035),s=n(6052);const l=(0,r.AH)(["box-shadow:0 0 0 2px rgba(0,0,0,0.2) inset;@supports (background-color:hsl(from black h s l)){background-color:hsl(from var(--button-background-1741866936) h s calc(l * 0.88));}@supports not (background-color:hsl(from black h s l)){filter:brightness(0.9);}"]),c=(0,r.AH)(["--button-background-1741866936:",";--button-color-1741866936:",";position:relative;display:flex;font-weight:normal;color:var(--button-color-1741866936);background-color:var(--button-background-1741866936);box-shadow:",";opacity:",";justify-content:",";align-items:center;text-align:center;transition:all 0.2s ease;"," outline:none;@media (pointer:coarse){user-select:none;-webkit-touch-callout:none;}&:active,&:hover,&:focus-visible{","}&:focus-visible{&::after{content:'';position:absolute;inset:3px;border-radius:4px;outline:2px solid white;mix-blend-mode:difference;}}"],e=>{let{theme:t,$isCheckbox:n,$isSecondaryButton:r}=e;return((e,t,n)=>t?e.panelBackground:n?e.secondaryButtonBackground:e.buttonBackground)(t,n,r)},e=>{let{theme:t,$isCheckbox:n,$isSecondaryButton:r}=e;return((e,t,n)=>t?(0,s.w5)(e.panelBackground,a.AV.light,a.AV.dark):n?(0,s.w5)(e.secondaryButtonBackground,a.AV.light,a.AV.dark):e.buttonText)(t,n,r)},e=>{let{$flat:t,$disabled:n}=e;return t||n?"none":"0 1px 4px 0 rgba(0, 0, 0, 0.08)"},e=>{let{$loading:t}=e;return t?.6:1},e=>{let{$isCheckbox:t}=e;return t?"flex-start":"center"},e=>e.$selected&&l,l),u=(0,r.AH)(["",";padding:8px 12px;font-size:var(--_kindlychat-font-size-p);max-width:100%;font-family:",";& svg{margin-left:",";}&:disabled{opacity:0.5;cursor:not-allowed;}"],c,e=>{let{theme:t}=e;return t.customFont?t.customFont:o.m.default},e=>{let{$isCheckbox:t}=e;return t?"0px":"6px"}),d=r.Ay.span.withConfig({componentId:"sc-1jzjzva-0"})(["display:flex;max-width:100%;justify-content:center;align-items:center;"]),p=r.Ay.span.withConfig({componentId:"sc-1jzjzva-1"})(["overflow-wrap:normal;text-overflow:ellipsis;overflow:hidden;"]),f=r.Ay.span.withConfig({componentId:"sc-1jzjzva-2"})(["display:inline-flex;align-items:center;justify-content:center;"]),h=(0,r.Ay)(i.$n).withConfig({componentId:"sc-1jzjzva-3"})(["",""],u),m=r.Ay.a.withConfig({componentId:"sc-1jzjzva-4"})([""," "," text-decoration:none;"],i.k5,u)},3230:(e,t,n)=>{var r=n(6939),o=n(2471).default;e.exports=function(e,t){if("object"!=o(e)||!e)return e;var n=e[r];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=o(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},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:()=>f,FZ:()=>h,HW:()=>u,M2:()=>o,MO:()=>v,Q4:()=>g,SO:()=>E,TF:()=>m,XM:()=>w,Xu:()=>c,YR:()=>b,d$:()=>d,hn:()=>s,kA:()=>a,nX:()=>k,nm:()=>l,t1:()=>p,uA:()=>y,uS:()=>i,wM:()=>x});const r="START_OVER",o="SET_LANGUAGE",i="CLOSE_CHATBUBBLE",a="OPEN_CHATBUBBLE",s="POPPED_UP",l="SET_STARTED_AT",c="SET_CURRENT_MODAL",u="SET_USER_IS_IDLE",d="SET_CHAT_HAS_STARTED",p="HIDE_CONTACT_DETAILS",f="SHOW_CONTACT_DETAILS",h="ATTACHMENT_BUTTON_CLICKED",m="SET_ATTACHMENT_FILES",g="CLEAR_ATTACHMENT_FILES",b="ATTACHMENT_PROMPT_SHOWED",v="SET_ERROR",y="SET_GLOBAL_ICONS_STATE",w="SET_CHAT_FULL_WINDOW",x="DISPLAY_OVERLAY_VIEW",E="CLOSE_OVERLAY_VIEW",k="SHOW_PREVIOUS_OVERLAY_VIEW"},3335:(e,t,n)=>{"use strict";var r=n(9155),o=Symbol.for("react.element"),i=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,n){var r,l={},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)i.call(t,r)&&!s.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===l[r]&&(l[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:l,_owner:a.current}}},3395:(e,t,n)=>{"use strict";n(9828),n(7935),n(3832),n(5799);var r=n(1355);e.exports=r.f("iterator")},3407:(e,t,n)=>{"use strict";var r=n(7312);n(1037),n(1342),n(5687),n(1669),e.exports=r},3410:(e,t,n)=>{"use strict";var r=n(5024),o=n(701),i=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,s=o(i,"name"),l=s&&"something"===function(){}.name,c=s&&(!r||r&&a(i,"name").configurable);e.exports={EXISTS:s,PROPER:l,CONFIGURABLE:c}},3435:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var r=n(9749),o=n.n(r),i=n(9155),a=n.n(i),s=n(3864),l=n(8035),c=n(6052);const u=s.Ay.div.withConfig({componentId:"sc-av36lj-0"})(["display:flex;flex-direction:column;margin-top:16px;position:relative;&.no-margin{margin:0;}"]),d=s.Ay.label.withConfig({componentId:"sc-av36lj-1"})(["font-size:var(--_kindlychat-font-size-sm);margin:4px 0;font-weight:500;color:var(--panel-background-white-black-contrast-1743170834);"]),p=s.Ay.div.withConfig({componentId:"sc-av36lj-2"})(["font-weight:400;line-height:16px;margin-top:4px;font-size:var(--_kindlychat-font-size-sm);color:",";"],e=>{let{theme:t}=e;return(0,c.w5)(t.panelBackground,"#FFFFFF",l.qd.textColorLight)});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:i=null,helperText:s=null,required:l=!1}=e;const c=a().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 a().createElement(u,{className:t},r&&a().createElement(d,{htmlFor:i||""},r,l?a().createElement(a().Fragment,null,"*"):""),n,s&&a().createElement(p,null,s))}},3489:(e,t,n)=>{"use strict";var r=n(1003);e.exports=r("document","documentElement")},3491:(e,t,n)=>{"use strict";var r=n(3574),o=n(262),i=n(5426),a=n(1966);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=r(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return i(n),a(r),o(n)?(t?e(n,r):n.__proto__=r,n):n}}():void 0)},3508:(e,t,n)=>{"use strict";var r=n(3999);e.exports=function(e,t,n,o){return o&&o.enumerable?e[t]=n:r(e,t,n),e}},3521:(e,t,n)=>{"use strict";var r=n(6100),o=n(1203),i=n(2769),a=n(8407),s=n(1003),l=n(2894),c=function(){},u=s("Reflect","construct"),d=/^\s*(?:class|function)\b/,p=r(d.exec),f=!d.test(c),h=function(e){if(!i(e))return!1;try{return u(c,[],e),!0}catch(e){return!1}},m=function(e){if(!i(e))return!1;switch(a(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return f||!!p(d,l(e))}catch(e){return!0}};m.sham=!0,e.exports=!u||o(function(){var e;return h(h.call)||!h(Object)||!h(function(){e=!0})||e})?m:h},3531:(e,t,n)=>{"use strict";var r=n(8900).navigator,o=r&&r.userAgent;e.exports=o?String(o):""},3553:(e,t,n)=>{"use strict";n.d(t,{VP:()=>a,gQ:()=>s,ku:()=>i,oI:()=>o});var r=n(8679);const o={HANDOVER:"handover",MESSAGE:"message",FEEDBACK:"feedback"},i=()=>(e,t)=>{const{show:n,dismissed:i}=t().pushMessages;i||n||e({type:r.l,pushMessageType:o.FEEDBACK})},a=e=>t=>{const{title:n,message:i}=e;t({type:r.l,pushMessageTitle:n,pushMessageType:o.MESSAGE,pushMessageText:i})},s=()=>(e,t)=>{const{show:n}=t().pushMessages;n&&e({type:r.a_})}},3574:(e,t,n)=>{"use strict";var r=n(6100),o=n(814);e.exports=function(e,t,n){try{return r(o(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}}},3592:(e,t,n)=>{"use strict";var r=n(5297);e.exports=r},3603:(e,t,n)=>{"use strict";function r(){let e=arguments.length>1?arguments[1]:void 0;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce((t,n)=>{var r;const o=e(n),i=null!==(r=t[o])&&void 0!==r?r:[];return i.push(n),t[o]=i,t},{})}n.d(t,{A:()=>r})},3671:(e,t,n)=>{"use strict";var r=n(701),o=n(2769),i=n(2137),a=n(4275),s=n(2871),l=a("IE_PROTO"),c=Object,u=c.prototype;e.exports=s?c.getPrototypeOf:function(e){var t=i(e);if(r(t,l))return t[l];var n=t.constructor;return o(n)&&t instanceof n?n.prototype:t instanceof c?u:null}},3678:(e,t,n)=>{"use strict";var r=n(1003),o=n(6100),i=r("Symbol"),a=i.keyFor,s=o(i.prototype.valueOf);e.exports=i.isRegisteredSymbol||function(e){try{return void 0!==a(s(e))}catch(e){return!1}}},3699:(e,t,n)=>{"use strict";n.d(t,{B$:()=>c,Bu:()=>d,TA:()=>u,W7:()=>s,aO:()=>a});var r=n(2221),o=n(9687);const i=["Bytes","kB","MB","GB"],a=1024,s=10*a,l=30*a,c=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))} ${i[n]}`},u=e=>new Promise((t,n)=>{const i=e.size/a,u=(0,o.A)(e)===r.sl.VIDEO,d=u?l:s;if(i>d)return void n(new Error(`The ${u?"video":"image"} must be less than ${c(d)}`));const p=new FileReader;p.readAsDataURL(e),p.onload=()=>t({url:p.result,file:e,sizeKb:i,name:e.name,type:e.type,status:r.Le.PROCESSING,sender:r.bS.USER}),p.onabort=()=>n(new Error(p.error))}),d=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),i=n(7525),a="__core-js_shared__",s=e.exports=o[a]||i(a,{});(s.versions||(s.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:()=>a,Ko:()=>u,eo:()=>c,hl:()=>l,r6:()=>s});var r=n(3864),o=n(6052),i=n(9272);const a=r.Ay.svg.withConfig({componentId:"sc-1av4ah8-0"})(["fill:",";stroke:",";stroke-width:2px;position:relative;top:-1px;"],e=>{let{$inputType:t,theme:n}=e;return t===i.cJ.CHECKBOX?"none":n.buttonText},e=>{let{theme:t}=e;return t.buttonText}),s=r.Ay.div.withConfig({componentId:"sc-1av4ah8-1"})(["display:inline-block;width:",";height:",";border-radius:",";background:transparent;border:1px solid ",";",";","{visibility:hidden;}left:0;position:absolute;"],e=>{let{$inputType:t}=e;return t===i.cJ.CHECKBOX?"16px":"18px"},e=>{let{$inputType:t}=e;return t===i.cJ.CHECKBOX?"16px":"18px"},e=>{let{$inputType:t}=e;return t===i.cJ.CHECKBOX?"3px":"50%"},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)")},e=>{let{theme:{buttonBackground:t}}=e;return(0,o.SW)(t)?"filter: brightness(0.7);":"filter: opacity(0.3);"},a),l=r.Ay.label.withConfig({componentId:"sc-1av4ah8-2"})(["cursor:pointer;display:flex;justify-content:flex-start;align-items:center;&:hover > ","{border:1px solid ",";}"],s,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)")}),c=r.Ay.input.withConfig({componentId:"sc-1av4ah8-3"})(["height:16px;width:16px;opacity:0;margin:0;left:0;position:absolute;&:checked ~ ","{background:",";filter:opacity(1);","{visibility:visible;}animation:"," 150ms ease;}&:focus-within ~ ","{outline:1px solid ",";}"],s,e=>{let{theme:{buttonBackground:t}}=e;return t},a,e=>{let{theme:{buttonBackground:t}}=e;return(e=>(0,r.i7)(["50%{box-shadow:0 0 0 3px ",";}"],e))(t)},s,e=>{let{theme:t}=e;return(0,o.w5)(t.panelBackground,"rgba(255, 255, 255, 0.8)","rgba(0, 0, 0, 0.8)")}),u=r.Ay.div.withConfig({componentId:"sc-1av4ah8-4"})(["font-size:var(--_kindlychat-font-size-p);font-weight:400;margin:0 28px;color:",";"],e=>{let{theme:t,$isForm:n}=e;return n?"var(--panel-background-white-black-contrast-1743170834)":(0,o.w5)(t.background,"#FFFFFF","#000000")}),d=r.Ay.div.withConfig({componentId:"sc-1av4ah8-5"})(["margin-top:12px;display:flex;flex-direction:column;align-items:flex-start;"])},3773:(e,t,n)=>{"use strict";var r=n(908),o=n(3521),i=n(262),a=n(8655)("species"),s=Array;e.exports=function(e){var t;return r(e)&&(t=e.constructor,(o(t)&&(t===s||r(t.prototype))||i(t)&&null===(t=t[a]))&&(t=void 0)),void 0===t?s:t}},3791:(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)(function(){var r;const o=Date.now()-(null!==(r=n.current)&&void 0!==r?r:0)<t;for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];if(o){var l;const e=a[0];return void(null==e||null===(l=e.preventDefault)||void 0===l||l.call(e))}e(...a),n.current=Date.now()},[t,e])}},3832:(e,t,n)=>{"use strict";var r=n(5571).charAt,o=n(1139),i=n(8417),a=n(164),s=n(877),l="String Iterator",c=i.set,u=i.getterFor(l);a(String,"String",function(e){c(this,{type:l,string:o(e),index:0})},function(){var e,t=u(this),n=t.string,o=t.index;return o>=n.length?s(void 0,!0):(e=r(n,o),t.index+=e.length,s(e,!1))})},3844:(e,t,n)=>{"use strict";e.exports=n(5994)},3855:(e,t,n)=>{"use strict";var r=n(9098),o=n(6100),i=n(5947),a=n(5426),s=n(1139),l=n(4240),c=o("".indexOf);r({target:"String",proto:!0,forced:!l("includes")},{includes:function(e){return!!~c(s(a(this)),s(i(e)),arguments.length>1?arguments[1]:void 0)}})},3860:(e,t,n)=>{"use strict";n(4531)("matcher")},3864:(e,t,n)=>{"use strict";n.d(t,{ID:()=>Lt,Dx:()=>Bt,NP:()=>Ut,DU:()=>Qt,AH:()=>Kt,Ay:()=>Zt,i7:()=>en,DP:()=>Ht});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,i=t.length;o<i;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 i=n(9155),a=n.n(i),s=n(2146),l=n.n(s),c="-ms-",u="-moz-",d="-webkit-",p="comm",f="rule",h="decl",m="@import",g="@keyframes",b="@layer",v=Math.abs,y=String.fromCharCode,w=Object.assign;function x(e){return e.trim()}function E(e,t){return(e=t.exec(e))?e[0]:e}function k(e,t,n){return e.replace(t,n)}function A(e,t,n){return e.indexOf(t,n)}function _(e,t){return 0|e.charCodeAt(t)}function C(e,t,n){return e.slice(t,n)}function S(e){return e.length}function T(e){return e.length}function I(e,t){return t.push(e),e}function O(e,t){return e.filter(function(e){return!E(e,t)})}var L=1,M=1,$=0,N=0,R=0,P="";function j(e,t,n,r,o,i,a,s){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:L,column:M,length:a,return:"",siblings:s}}function D(e,t){return w(j("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function z(e){for(;e.root;)e=D(e.root,{children:[e]});I(e,e.siblings)}function F(){return R=N>0?_(P,--N):0,M--,10===R&&(M=1,L--),R}function B(){return R=N<$?_(P,N++):0,M++,10===R&&(M=1,L++),R}function H(){return _(P,N)}function U(){return N}function V(e,t){return C(P,e,t)}function G(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 W(e){return x(V(N-1,Y(91===e?e+2:40===e?e+1:e)))}function q(e){for(;(R=H())&&R<33;)B();return G(e)>2||G(R)>3?"":" "}function K(e,t){for(;--t&&B()&&!(R<48||R>102||R>57&&R<65||R>70&&R<97););return V(e,U()+(t<6&&32==H()&&32==B()))}function Y(e){for(;B();)switch(R){case e:return N;case 34:case 39:34!==e&&39!==e&&Y(R);break;case 40:41===e&&Y(e);break;case 92:B()}return N}function X(e,t){for(;B()&&e+R!==57&&(e+R!==84||47!==H()););return"/*"+V(t,N-1)+"*"+y(47===e?e:B())}function Z(e){for(;!G(H());)B();return V(e,N)}function J(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function Q(e,t,n,r){switch(e.type){case b:if(e.children.length)break;case m:case h:return e.return=e.return||e.value;case p:return"";case g:return e.return=e.value+"{"+J(e.children,r)+"}";case f:if(!S(e.value=e.props.join(",")))return""}return S(n=J(e.children,r))?e.return=e.value+"{"+n+"}":""}function ee(e,t,n){switch(function(e,t){return 45^_(e,0)?(((t<<2^_(e,0))<<2^_(e,1))<<2^_(e,2))<<2^_(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(_(e,t+11)){case 114:return d+e+c+k(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return d+e+c+k(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return d+e+c+k(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+k(e,/(\w+).+(:[^]+)/,d+"box-$1$2"+c+"flex-$1$2")+e;case 5443:return d+e+c+"flex-item-"+k(e,/flex-|-self/g,"")+(E(e,/flex-|baseline/)?"":c+"grid-row-"+k(e,/flex-|-self/g,""))+e;case 4675:return d+e+c+"flex-line-pack"+k(e,/align-content|flex-|-self/g,"")+e;case 5548:return d+e+c+k(e,"shrink","negative")+e;case 5292:return d+e+c+k(e,"basis","preferred-size")+e;case 6060:return d+"box-"+k(e,"-grow","")+d+e+c+k(e,"grow","positive")+e;case 4554:return d+k(e,/([^-])(transform)/g,"$1"+d+"$2")+e;case 6187:return k(k(k(e,/(zoom-|grab)/,d+"$1"),/(image-set)/,d+"$1"),e,"")+e;case 5495:case 3959:return k(e,/(image-set\([^]*)/,d+"$1$`$1");case 4968:return k(k(e,/(.+:)(flex-)?(.*)/,d+"box-pack:$3"+c+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+d+e+e;case 4200:if(!E(e,/flex-|baseline/))return c+"grid-column-align"+C(e,t)+e;break;case 2592:case 3360:return c+k(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(e,n){return t=n,E(e.props,/grid-\w+-end/)})?~A(e+(n=n[t].value),"span",0)?e:c+k(e,"-start","")+e+c+"grid-row-span:"+(~A(n,"span",0)?E(n,/\d+/):+E(n,/\d+/)-+E(e,/\d+/))+";":c+k(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(e){return E(e.props,/grid-\w+-start/)})?e:c+k(k(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return k(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(S(e)-1-t>6)switch(_(e,t+1)){case 109:if(45!==_(e,t+4))break;case 102:return k(e,/(.+:)(.+)-([^]+)/,"$1"+d+"$2-$3$1"+u+(108==_(e,t+3)?"$3":"$2-$3"))+e;case 115:return~A(e,"stretch",0)?ee(k(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return k(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,n,r,o,i,a,s){return c+n+":"+r+s+(o?c+n+"-span:"+(i?a:+a-+r)+s:"")+e});case 4949:if(121===_(e,t+6))return k(e,":",":"+d)+e;break;case 6444:switch(_(e,45===_(e,14)?18:11)){case 120:return k(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+d+(45===_(e,14)?"inline-":"")+"box$3$1"+d+"$2$3$1"+c+"$2box$3")+e;case 100:return k(e,":",":"+c)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return k(e,"scroll-","scroll-snap-")+e}return e}function te(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case h:return void(e.return=ee(e.value,e.length,n));case g:return J([D(e,{value:k(e.value,"@","@"+d)})],r);case f:if(e.length)return function(e,t){return e.map(t).join("")}(n=e.props,function(t){switch(E(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":z(D(e,{props:[k(t,/:(read-\w+)/,":"+u+"$1")]})),z(D(e,{props:[t]})),w(e,{props:O(n,r)});break;case"::placeholder":z(D(e,{props:[k(t,/:(plac\w+)/,":"+d+"input-$1")]})),z(D(e,{props:[k(t,/:(plac\w+)/,":"+u+"$1")]})),z(D(e,{props:[k(t,/:(plac\w+)/,c+"input-$1")]})),z(D(e,{props:[t]})),w(e,{props:O(n,r)})}return""})}}function ne(e){return function(e){return P="",e}(re("",null,null,null,[""],e=function(e){return L=M=1,$=S(P=e),N=0,[]}(e),0,[0],e))}function re(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,p=0,f=0,h=0,m=1,g=1,b=1,w=0,x="",E=o,C=i,T=r,O=x;g;)switch(h=w,w=B()){case 40:if(108!=h&&58==_(O,d-1)){-1!=A(O+=k(W(w),"&","&\f"),"&\f",v(c?s[c-1]:0))&&(b=-1);break}case 34:case 39:case 91:O+=W(w);break;case 9:case 10:case 13:case 32:O+=q(h);break;case 92:O+=K(U()-1,7);continue;case 47:switch(H()){case 42:case 47:I(ie(X(B(),U()),t,n,l),l);break;default:O+="/"}break;case 123*m:s[c++]=S(O)*b;case 125*m:case 59:case 0:switch(w){case 0:case 125:g=0;case 59+u:-1==b&&(O=k(O,/\f/g,"")),f>0&&S(O)-d&&I(f>32?ae(O+";",r,n,d-1,l):ae(k(O," ","")+";",r,n,d-2,l),l);break;case 59:O+=";";default:if(I(T=oe(O,t,n,c,u,o,s,x,E=[],C=[],d,i),i),123===w)if(0===u)re(O,t,T,T,E,i,d,s,C);else switch(99===p&&110===_(O,3)?100:p){case 100:case 108:case 109:case 115:re(e,T,T,r&&I(oe(e,T,T,0,0,o,s,x,o,E=[],d,C),C),o,C,d,s,r?E:C);break;default:re(O,T,T,T,[""],C,0,s,C)}}c=u=f=0,m=b=1,x=O="",d=a;break;case 58:d=1+S(O),f=h;default:if(m<1)if(123==w)--m;else if(125==w&&0==m++&&125==F())continue;switch(O+=y(w),w*m){case 38:b=u>0?1:(O+="\f",-1);break;case 44:s[c++]=(S(O)-1)*b,b=1;break;case 64:45===H()&&(O+=W(B())),p=H(),u=d=S(x=O+=Z(U())),w++;break;case 45:45===h&&2==S(O)&&(m=0)}}return i}function oe(e,t,n,r,o,i,a,s,l,c,u,d){for(var p=o-1,h=0===o?i:[""],m=T(h),g=0,b=0,y=0;g<r;++g)for(var w=0,E=C(e,p+1,p=v(b=a[g])),A=e;w<m;++w)(A=x(b>0?h[w]+" "+E:k(E,/&\f/g,h[w])))&&(l[y++]=A);return j(e,t,n,0===o?f:s,l,c,u,d)}function ie(e,t,n,r){return j(e,t,n,p,y(R),C(e,2,-2),0,r)}function ae(e,t,n,r,o){return j(e,t,n,h,C(e,0,r),C(e,r+1,-1),r,o)}var se={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},le=n(9907),ce=void 0!==le&&void 0!==le.env&&(le.env.REACT_APP_SC_ATTR||le.env.SC_ATTR)||"data-styled",ue="active",de="data-styled-version",pe="6.1.19",fe="/*!sc*/\n",he="undefined"!=typeof window&&"undefined"!=typeof document,me=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:void 0!==le&&void 0!==le.env&&void 0!==le.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==le.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==le.env.REACT_APP_SC_DISABLE_SPEEDY&&le.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==le&&void 0!==le.env&&void 0!==le.env.SC_DISABLE_SPEEDY&&""!==le.env.SC_DISABLE_SPEEDY&&"false"!==le.env.SC_DISABLE_SPEEDY&&le.env.SC_DISABLE_SPEEDY),ge={},be=(new Set,Object.freeze([])),ve=Object.freeze({});function ye(e,t,n){return void 0===n&&(n=ve),e.theme!==n.theme&&e.theme||t||n.theme}var we=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"]),xe=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Ee=/(^-|-$)/g;function ke(e){return e.replace(xe,"-").replace(Ee,"")}var Ae=/(a)(d)/gi,_e=52,Ce=function(e){return String.fromCharCode(e+(e>25?39:97))};function Se(e){var t,n="";for(t=Math.abs(e);t>_e;t=t/_e|0)n=Ce(t%_e)+n;return(Ce(t%_e)+n).replace(Ae,"$1-$2")}var Te,Ie=5381,Oe=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Le=function(e){return Oe(Ie,e)};function Me(e){return Se(Le(e)>>>0)}function $e(e){return"string"==typeof e&&!0}var Ne="function"==typeof Symbol&&Symbol.for,Re=Ne?Symbol.for("react.memo"):60115,Pe=Ne?Symbol.for("react.forward_ref"):60112,je={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},De={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},ze={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Fe=((Te={})[Pe]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Te[Re]=ze,Te);function Be(e){return("type"in(t=e)&&t.type.$$typeof)===Re?ze:"$$typeof"in e?Fe[e.$$typeof]:je;var t}var He=Object.defineProperty,Ue=Object.getOwnPropertyNames,Ve=Object.getOwnPropertySymbols,Ge=Object.getOwnPropertyDescriptor,We=Object.getPrototypeOf,qe=Object.prototype;function Ke(e,t,n){if("string"!=typeof t){if(qe){var r=We(t);r&&r!==qe&&Ke(e,r,n)}var o=Ue(t);Ve&&(o=o.concat(Ve(t)));for(var i=Be(e),a=Be(t),s=0;s<o.length;++s){var l=o[s];if(!(l in De||n&&n[l]||a&&l in a||i&&l in i)){var c=Ge(t,l);try{He(e,l,c)}catch(e){}}}}return e}function Ye(e){return"function"==typeof e}function Xe(e){return"object"==typeof e&&"styledComponentId"in e}function Ze(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function Je(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 Qe(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function et(e,t,n){if(void 0===n&&(n=!1),!n&&!Qe(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=et(e[r],t[r]);else if(Qe(t))for(var r in t)e[r]=et(e[r],t[r]);return e}function tt(e,t){Object.defineProperty(e,"toString",{value:t})}function nt(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 rt=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 nt(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var i=r;i<o;i++)this.groupSizes[i]=0}for(var a=this.indexOfGroup(e+1),s=(i=0,t.length);i<s;i++)this.tag.insertRule(a,t[i])&&(this.groupSizes[e]++,a++)},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,i=r;i<o;i++)t+="".concat(this.tag.getRule(i)).concat(fe);return t},e}(),ot=new Map,it=new Map,at=1,st=function(e){if(ot.has(e))return ot.get(e);for(;it.has(at);)at++;var t=at++;return ot.set(e,t),it.set(t,e),t},lt=function(e,t){at=t+1,ot.set(e,t),it.set(t,e)},ct="style[".concat(ce,"][").concat(de,'="').concat(pe,'"]'),ut=new RegExp("^".concat(ce,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),dt=function(e,t,n){for(var r,o=n.split(","),i=0,a=o.length;i<a;i++)(r=o[i])&&e.registerName(t,r)},pt=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split(fe),o=[],i=0,a=r.length;i<a;i++){var s=r[i].trim();if(s){var l=s.match(ut);if(l){var c=0|parseInt(l[1],10),u=l[2];0!==c&&(lt(u,c),dt(e,u,l[3]),e.getTag().insertRules(c,o)),o.length=0}else o.push(s)}}},ft=function(e){for(var t=document.querySelectorAll(ct),n=0,r=t.length;n<r;n++){var o=t[n];o&&o.getAttribute(ce)!==ue&&(pt(e,o),o.parentNode&&o.parentNode.removeChild(o))}};function ht(){return n.nc}var mt=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){var t=Array.from(e.querySelectorAll("style[".concat(ce,"]")));return t[t.length-1]}(n),i=void 0!==o?o.nextSibling:null;r.setAttribute(ce,ue),r.setAttribute(de,pe);var a=ht();return a&&r.setAttribute("nonce",a),n.insertBefore(r,i),r},gt=function(){function e(e){this.element=mt(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 nt(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}(),bt=function(){function e(e){this.element=mt(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}(),vt=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}(),yt=he,wt={isServer:!he,useCSSOMInjection:!me},xt=function(){function e(e,t,n){void 0===e&&(e=ve),void 0===t&&(t={});var o=this;this.options=r(r({},wt),e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&he&&yt&&(yt=!1,ft(this)),tt(this,function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return it.get(e)}(n);if(void 0===o)return"continue";var i=e.names.get(o),a=t.getGroup(n);if(void 0===i||!i.size||0===a.length)return"continue";var s="".concat(ce,".g").concat(n,'[id="').concat(o,'"]'),l="";void 0!==i&&i.forEach(function(e){e.length>0&&(l+="".concat(e,","))}),r+="".concat(a).concat(s,'{content:"').concat(l,'"}').concat(fe)},i=0;i<n;i++)o(i);return r}(o)})}return e.registerId=function(e){return st(e)},e.prototype.rehydrate=function(){!this.server&&he&&ft(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 vt(n):t?new gt(n):new bt(n)}(this.options),new rt(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(st(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(st(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(st(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),Et=/&/g,kt=/^\s*\/\/.*$/gm;function At(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=At(e.children,t)),e})}function _t(e){var t,n,r,o=void 0===e?ve:e,i=o.options,a=void 0===i?ve:i,s=o.plugins,l=void 0===s?be:s,c=function(e,r,o){return o.startsWith(n)&&o.endsWith(n)&&o.replaceAll(n,"").length>0?".".concat(t):e},u=l.slice();u.push(function(e){e.type===f&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(Et,n).replace(r,c))}),a.prefix&&u.push(te),u.push(Q);var d=function(e,o,i,s){void 0===o&&(o=""),void 0===i&&(i=""),void 0===s&&(s="&"),t=s,n=o,r=new RegExp("\\".concat(n,"\\b"),"g");var l=e.replace(kt,""),c=ne(i||o?"".concat(i," ").concat(o," { ").concat(l," }"):l);a.namespace&&(c=At(c,a.namespace));var d,p,f,h=[];return J(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="",i=0;i<p;i++)o+=d[i](e,t,n,r)||"";return o})),h};return d.hash=l.length?l.reduce(function(e,t){return t.name||nt(15),Oe(e,t.name)},Ie).toString():"",d}var Ct=new xt,St=_t(),Tt=a().createContext({shouldForwardProp:void 0,styleSheet:Ct,stylis:St}),It=(Tt.Consumer,a().createContext(void 0));function Ot(){return(0,i.useContext)(Tt)}function Lt(e){var t=(0,i.useState)(e.stylisPlugins),n=t[0],r=t[1],o=Ot().styleSheet,s=(0,i.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,i.useMemo)(function(){return _t({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:n})},[e.enableVendorPrefixes,e.namespace,n]);(0,i.useEffect)(function(){l()(n,e.stylisPlugins)||r(e.stylisPlugins)},[e.stylisPlugins]);var u=(0,i.useMemo)(function(){return{shouldForwardProp:e.shouldForwardProp,styleSheet:s,stylis:c}},[e.shouldForwardProp,s,c]);return a().createElement(Tt.Provider,{value:u},a().createElement(It.Provider,{value:c},e.children))}var Mt=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=St);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,tt(this,function(){throw nt(12,String(n.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=St),this.name+e.hash},e}(),$t=function(e){return e>="A"&&e<="Z"};function Nt(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;$t(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var Rt=function(e){return null==e||!1===e||""===e},Pt=function(e){var t,n,r=[];for(var i in e){var a=e[i];e.hasOwnProperty(i)&&!Rt(a)&&(Array.isArray(a)&&a.isCss||Ye(a)?r.push("".concat(Nt(i),":"),a,";"):Qe(a)?r.push.apply(r,o(o(["".concat(i," {")],Pt(a),!1),["}"],!1)):r.push("".concat(Nt(i),": ").concat((t=i,null==(n=a)||"boolean"==typeof n||""===n?"":"number"!=typeof n||0===n||t in se||t.startsWith("--")?String(n).trim():"".concat(n,"px")),";")))}return r};function jt(e,t,n,r){return Rt(e)?[]:Xe(e)?[".".concat(e.styledComponentId)]:Ye(e)?!Ye(o=e)||o.prototype&&o.prototype.isReactComponent||!t?[e]:jt(e(t),t,n,r):e instanceof Mt?n?(e.inject(n,r),[e.getName(r)]):[e]:Qe(e)?Pt(e):Array.isArray(e)?Array.prototype.concat.apply(be,e.map(function(e){return jt(e,t,n,r)})):[e.toString()];var o}function Dt(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(Ye(n)&&!Xe(n))return!1}return!0}var zt=Le(pe),Ft=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&Dt(e),this.componentId=t,this.baseHash=Oe(zt,t),this.baseStyle=n,xt.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=Ze(r,this.staticRulesId);else{var o=Je(jt(this.rules,e,t,n)),i=Se(Oe(this.baseHash,o)>>>0);if(!t.hasNameForId(this.componentId,i)){var a=n(o,".".concat(i),void 0,this.componentId);t.insertRules(this.componentId,i,a)}r=Ze(r,i),this.staticRulesId=i}else{for(var s=Oe(this.baseHash,n.hash),l="",c=0;c<this.rules.length;c++){var u=this.rules[c];if("string"==typeof u)l+=u;else if(u){var d=Je(jt(u,e,t,n));s=Oe(s,d+c),l+=d}}if(l){var p=Se(s>>>0);t.hasNameForId(this.componentId,p)||t.insertRules(this.componentId,p,n(l,".".concat(p),void 0,this.componentId)),r=Ze(r,p)}}return r},e}(),Bt=a().createContext(void 0);function Ht(){var e=(0,i.useContext)(Bt);if(!e)throw nt(18);return e}function Ut(e){var t=a().useContext(Bt),n=(0,i.useMemo)(function(){return function(e,t){if(!e)throw nt(14);if(Ye(e))return e(t);if(Array.isArray(e)||"object"!=typeof e)throw nt(8);return t?r(r({},t),e):e}(e.theme,t)},[e.theme,t]);return e.children?a().createElement(Bt.Provider,{value:n},e.children):null}Bt.Consumer;var Vt={};function Gt(e,t,n){var o=Xe(e),s=e,l=!$e(e),c=t.attrs,u=void 0===c?be:c,d=t.componentId,p=void 0===d?function(e,t){var n="string"!=typeof e?"sc":ke(e);Vt[n]=(Vt[n]||0)+1;var r="".concat(n,"-").concat(Me(pe+n+Vt[n]));return t?"".concat(t,"-").concat(r):r}(t.displayName,t.parentComponentId):d,f=t.displayName,h=void 0===f?function(e){return $e(e)?"styled.".concat(e):"Styled(".concat(function(e){return e.displayName||e.name||"Component"}(e),")")}(e):f,m=t.displayName&&t.componentId?"".concat(ke(t.displayName),"-").concat(t.componentId):t.componentId||p,g=o&&s.attrs?s.attrs.concat(u).filter(Boolean):u,b=t.shouldForwardProp;if(o&&s.shouldForwardProp){var v=s.shouldForwardProp;if(t.shouldForwardProp){var y=t.shouldForwardProp;b=function(e,t){return v(e,t)&&y(e,t)}}else b=v}var w=new Ft(n,m,o?s.componentStyle:void 0);function x(e,t){return function(e,t,n){var o=e.attrs,s=e.componentStyle,l=e.defaultProps,c=e.foldedComponentIds,u=e.styledComponentId,d=e.target,p=a().useContext(Bt),f=Ot(),h=e.shouldForwardProp||f.shouldForwardProp,m=ye(t,p,l)||ve,g=function(e,t,n){for(var o,i=r(r({},t),{className:void 0,theme:n}),a=0;a<e.length;a+=1){var s=Ye(o=e[a])?o(i):o;for(var l in s)i[l]="className"===l?Ze(i[l],s[l]):"style"===l?r(r({},i[l]),s[l]):s[l]}return t.className&&(i.className=Ze(i.className,t.className)),i}(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 w=function(e,t){var n=Ot();return e.generateAndInjectStyles(t,n.styleSheet,n.stylis)}(s,g),x=Ze(c,u);return w&&(x+=" "+w),g.className&&(x+=" "+g.className),v[$e(b)&&!we.has(b)?"class":"className"]=x,n&&(v.ref=n),(0,i.createElement)(b,v)}(E,e,t)}x.displayName=h;var E=a().forwardRef(x);return E.attrs=g,E.componentStyle=w,E.displayName=h,E.shouldForwardProp=b,E.foldedComponentIds=o?Ze(s.foldedComponentIds,s.styledComponentId):"",E.styledComponentId=m,E.target=o?s.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++)et(e,o[r],!0);return e}({},s.defaultProps,e):e}}),tt(E,function(){return".".concat(E.styledComponentId)}),l&&Ke(E,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),E}function Wt(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 qt=function(e){return Object.assign(e,{isCss:!0})};function Kt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(Ye(e)||Qe(e))return qt(jt(Wt(be,o([e],t,!0))));var r=e;return 0===t.length&&1===r.length&&"string"==typeof r[0]?jt(r):qt(jt(Wt(r,t)))}function Yt(e,t,n){if(void 0===n&&(n=ve),!t)throw nt(1,t);var i=function(r){for(var i=[],a=1;a<arguments.length;a++)i[a-1]=arguments[a];return e(t,n,Kt.apply(void 0,o([r],i,!1)))};return i.attrs=function(o){return Yt(e,t,r(r({},n),{attrs:Array.prototype.concat(n.attrs,o).filter(Boolean)}))},i.withConfig=function(o){return Yt(e,t,r(r({},n),o))},i}var Xt=function(e){return Yt(Gt,e)},Zt=Xt;we.forEach(function(e){Zt[e]=Xt(e)});var Jt=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Dt(e),xt.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,r){var o=r(Je(jt(this.rules,t,n,r)),""),i=this.componentId+e;n.insertRules(i,i,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,r){e>2&&xt.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function Qt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=Kt.apply(void 0,o([e],t,!1)),s="sc-global-".concat(Me(JSON.stringify(i))),l=new Jt(i,s),c=function(e){var t=Ot(),n=a().useContext(Bt),r=a().useRef(t.styleSheet.allocateGSInstance(s)).current;return t.styleSheet.server&&u(r,e,t.styleSheet,n,t.stylis),a().useLayoutEffect(function(){if(!t.styleSheet.server)return u(r,e,t.styleSheet,n,t.stylis),function(){return l.removeStyles(r,t.styleSheet)}},[r,e,t.styleSheet,n,t.stylis]),null};function u(e,t,n,o,i){if(l.isStatic)l.renderStyles(e,ge,n,i);else{var a=r(r({},t),{theme:ye(t,o,c.defaultProps)});l.renderStyles(e,a,n,i)}}return a().memo(c)}function en(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Je(Kt.apply(void 0,o([e],t,!1))),i=Me(r);return new Mt(i,r)}(function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var n=ht(),r=Je([n&&'nonce="'.concat(n,'"'),"".concat(ce,'="true"'),"".concat(de,'="').concat(pe,'"')].filter(Boolean)," ");return"<style ".concat(r,">").concat(t,"</style>")},this.getStyleTags=function(){if(e.sealed)throw nt(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw nt(2);var n=e.instance.toString();if(!n)return[];var o=((t={})[ce]="",t[de]=pe,t.dangerouslySetInnerHTML={__html:n},t),i=ht();return i&&(o.nonce=i),[a().createElement("style",r({},o,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new xt({isServer:!0}),this.sealed=!1}e.prototype.collectStyles=function(e){if(this.sealed)throw nt(2);return a().createElement(Lt,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw nt(3)}})(),"__sc-".concat(ce,"__")},3886:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(9155),o=n.n(r);function i(e){let{size:t=24,fill:n="#333333"}=e;return o().createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o().createElement("path",{d:"M12 4.75L4.75 8C4.75 8 4 19.25 12 19.25C20 19.25 19.25 8 19.25 8L12 4.75Z",stroke:n,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M9.75 12.75L11 14.25L14.25 9.75",stroke:n,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))}},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),i=n.n(o),a=o.useLayoutEffect,s=function(e,t){"function"!=typeof e?e.current=t:e(t)},l={"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(l).forEach(function(t){e.style.setProperty(t,l[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,s,l=(r=n,s=i().useRef(r),a(function(){s.current=r}),s);o.useLayoutEffect(function(){var n=function(e){return l.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,a=e.cacheMeasurements,l=e.maxRows,b=e.minRows,v=e.onChange,y=void 0===v?p:v,w=e.onHeightChange,x=void 0===w?p:w,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,A=o.useRef(null),_=function(e,t){var n=i().useRef();return i().useCallback(function(r){e.current=r,n.current&&s(n.current,null),n.current=t,t&&s(t,r)},[t])}(A,t),C=o.useRef(0),S=o.useRef(),T=function(){var e=A.current,t=a&&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,i=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach(function(e){var t=e;u.style[t]=a[t]}),c(u),u.value=t;var l=d(u,e);u.value=t,l=d(u,e),u.value="x";var p=u.scrollHeight-o,f=p*n;"border-box"===s&&(f=f+o+i),l=Math.max(f,l);var h=p*r;return"border-box"===s&&(h=h+o+i),[l=Math.min(h,l),p]}(t,e.value||e.placeholder||"x",b,l),r=n[0],o=n[1];C.current!==r&&(C.current=r,e.style.setProperty("height",r+"px","important"),x(r,{rowHeight:o}))}};return o.useLayoutEffect(T),function(e,t){m(document.body,"reset",function(n){e.current.form===n.target&&t()})}(A,function(){if(!k){var e=A.current.value;requestAnimationFrame(function(){var t=A.current;t&&e!==t.value&&T()})}}),m(window,"resize",T),n=T,m(document.fonts,"loadingdone",n),o.createElement("textarea",r({},E,{onChange:function(e){k||T(),y(e)},ref:_}))},v=o.forwardRef(b)},3950:(e,t,n)=>{"use strict";n.d(t,{A:()=>w});var r=n(9155),o=n.n(r),i=n(824),a=n(3949),s=n(3864),l=n(3058),c=n(4927),u=n(8035),d=n(6052),p=n(2628);const f=s.Ay.div.withConfig({componentId:"sc-4y6b4p-0"})(["position:relative;display:flex;"]),h=(0,s.Ay)(a.A).withConfig({componentId:"sc-4y6b4p-1"})([""," max-height:unset;white-space:unset;text-overflow:unset;padding-right:unset;"," color:var(--panel-background-white-black-contrast-1743170834);min-height:","px;outline-offset:-4px;@media ","{max-height:unset;}"," "," &:focus{color:var(--panel-background-white-black-contrast-1743170834);box-shadow:none;border:1px solid ",";","}&::placeholder{color:",";opacity:0.5;}"],c.hF,e=>{let{theme:t}=e;return(0,l.Mo)(t.panelBackground,.08)},e=>{let{$minHeight:t}=e;return t},u.jO.maxTablet,(0,p.A)()&&(0,s.AH)(["max-height:unset;"]),e=>{let{$hasMaxLength:t}=e;if(t)return"padding-bottom: 24px;"},e=>{let{theme:t}=e;return(0,d.w5)(t.panelBackground,"rgba(255, 255, 255, 0.12)","rgba(0, 0, 0, 0.12)")},l.sF,e=>{let{theme:t}=e;return(0,d.w5)(t.panelBackground,"#FFF","#000")});var m=n(9416),g=n(7318),b=n(587),v=n(8780),y=n(5814);const w=function(e){var t,n,r;let{autoComplete:a="off",name:s,register:l,validators:c,control:u,id:d,setError:p,clearErrors:w,trigger:x,...E}=e;const k=(0,y.G8)(c),{ref:A,onChange:_,...C}=l?l(s,k):{},{errors:S,isSubmitted:T}=(0,i.lN)({name:s,control:u}),I=(0,b.A)({name:s,trigger:x,control:u,setError:p,clearErrors:w});return o().createElement(o().Fragment,null,o().createElement(f,null,o().createElement(h,Object.assign({autoComplete:a,name:s,minRows:2,$hasMaxLength:!(null===(t=k.maxLength)||void 0===t||!t.value),id:d||s},(0,y.NR)(k),C&&{...C},{onChange:e=>{null==_||_(e),I(e)},ref:A,"aria-errormessage":`error_${s}`,"aria-invalid":!(0,v.A)(S)&&T},E)),!(null===(n=k.maxLength)||void 0===n||!n.value)&&u&&s&&o().createElement(m.A,{position:"bottom",fieldName:s,control:u,maxLength:null===(r=k.maxLength)||void 0===r?void 0:r.value})),o().createElement(g.A,{control:u,name:s}))}},3999:(e,t,n)=>{"use strict";var r=n(5024),o=n(9989),i=n(480);e.exports=r?function(e,t,n){return o.f(e,t,i(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},i=r.useSyncExternalStore,a=r.useRef,s=r.useEffect,l=r.useMemo,c=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=a(null);if(null===d.current){var p={hasValue:!1,value:null};d.current=p}else p=d.current;d=l(function(){function e(e){if(!s){if(s=!0,i=e,e=r(e),void 0!==u&&p.hasValue){var t=p.value;if(u(t,e))return a=t}return a=e}if(t=a,o(i,e))return t;var n=r(e);return void 0!==u&&u(t,n)?(i=e,t):(i=e,a=n)}var i,a,s=!1,l=void 0===n?null:n;return[function(){return e(t())},null===l?void 0:function(){return e(l())}]},[t,n,r,u]);var f=i(e,d[0],d[1]);return s(function(){p.hasValue=!0,p.value=f},[f]),c(f),f}},4095:(e,t,n)=>{"use strict";n.d(t,{A:()=>A});var r=n(9155),o=n.n(r),i=n(541),a=n(6343),s=n(809),l=n(9223),c=n(7182),u=n(3864),d=n(8035);const p=(0,u.AH)(["border-radius:100px;background-color:",";"],d.Tj.grayColor),f=u.Ay.div.withConfig({componentId:"sc-769ymc-0"})(["height:100%;width:100%;display:grid;background-color:#fff;grid-template-rows:55px 1fr 70px;"]),h=u.Ay.div.withConfig({componentId:"sc-769ymc-1"})(["padding:10px 20px;display:grid;align-items:center;grid-template-columns:30px 1fr 40px;box-shadow:0px 3px 4px -1px ",";"],d.Tj.shadowColor),m=u.Ay.div.withConfig({componentId:"sc-769ymc-2"})(["height:20px;width:110px;margin-left:20px;",""],p),g=u.Ay.div.withConfig({componentId:"sc-769ymc-3"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;width:210px;margin:auto;"]),b=u.Ay.span.withConfig({componentId:"sc-769ymc-4"})(["font-size:var(--_kindlychat-font-size-p);margin:16px 0 24px 0;",";"],e=>e.$heading&&"font-size: var(--_kindlychat-font-size-h4); font-weight: 400;\n margin: 0"),v=u.Ay.div.withConfig({componentId:"sc-769ymc-5"})(["height:","px;min-width:","px;",""],e=>e.$size,e=>e.$size,p),y=u.Ay.div.withConfig({componentId:"sc-769ymc-6"})(["display:flex;align-items:center;padding:15px 0;margin:0 20px;border-top:1px solid ",";"],d.Tj.grayColor),w=u.Ay.div.withConfig({componentId:"sc-769ymc-7"})(["height:40px;width:100%;margin-right:20px;",""],p);var x=n(167);const E=function(){const e=(0,c.jL)(),t=(0,r.useCallback)(()=>{e((0,a.ky)())},[e]);return o().createElement(f,null,o().createElement(h,null,o().createElement(v,{$size:30}),o().createElement(m,null),o().createElement(x.I$,{"aria-label":"Close chat",title:"Close chat",type:"button",onClick:t,"data-testid":"close-chat-button"},o().createElement(s.US,{width:25,height:25}))),o().createElement(g,null,o().createElement(b,{$heading:!0},"Oh no..."),o().createElement(b,null,"We were unable to load the chat. Please refresh or try again later."),o().createElement(l.A,{onClick:t},"Refresh chat")),o().createElement(y,null,o().createElement(w,null),o().createElement(v,{$size:40})))};class k 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,i=`Component tree crashed ${o}: ${e.message}`,s={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,a.Rm)({message:i,error:e,extra:s,level:"error"}))}render(){const{hasError:e}=this.state,{children:t,displayError:n}=this.props;return e&&n?o().createElement(E,null):e?null:t}}const A=(0,i.Ng)()(k)},4119:(e,t,n)=>{"use strict";n(4531)("species")},4142:(e,t,n)=>{"use strict";n.d(t,{S:()=>s});var r=n(7251),o=n(2221),i=n(6343),a=n(4851);const s=(0,r.zD)("feedback/sendToPat",async(e,t)=>{let{getState:n,dispatch:r,rejectWithValue:s}=t;const{connection:{token:l},environment:{PAT_HOST:c}}=n();try{const t=await r((0,i.et)(`${c}/chatbubble/${o.Ak}/feedback`,{method:"POST",body:{feedback:e},...(0,a.A)({token:l})}));if(!t.ok)throw new Error(`Feedback submission failed with status: ${t.status}`);return t.data.data.id}catch(e){return s(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}},4275:(e,t,n)=>{"use strict";var r=n(8141),o=n(1268),i=r("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},4311:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(9155),o=n(541),i=n(1695),a=n(9337),s=n(1328);function l(){const{text:e}=(0,o.d4)(i.Od),{currentLanguageCode:t}=(0,s.A)();return(0,r.useMemo)(()=>(0,a.A)(e,t),[t,e])}},4317:(e,t,n)=>{"use strict";var r=n(6100);e.exports=r({}.isPrototypeOf)},4356:(e,t,n)=>{"use strict";n(9504),n(7424);var r=n(1355);e.exports=r.f("toPrimitive")},4358:(e,t,n)=>{"use strict";var r=n(9989);e.exports=function(e,t,n){return r.f(e,t,n)}},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},4417:(e,t,n)=>{"use strict";var r=n(3773);e.exports=function(e,t){return new(r(e))(0===t?0:t)}},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})},4492:(e,t,n)=>{"use strict";var r=n(5024),o=n(9989),i=n(480);e.exports=function(e,t,n){r?o.f(e,t,i(0,n)):e[t]=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},4531:(e,t,n)=>{"use strict";var r=n(8099),o=n(701),i=n(1355),a=n(9989).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});o(t,e)||a(t,e,{value:i.f(e)})}},4543:(e,t,n)=>{"use strict";var r=n(5024),o=n(4713),i=n(7161),a=n(480),s=n(3273),l=n(5341),c=n(701),u=n(9665),d=Object.getOwnPropertyDescriptor;t.f=r?d:function(e,t){if(e=s(e),t=l(t),u)try{return d(e,t)}catch(e){}if(c(e,t))return a(!o(i.f,e,t),e[t])}},4572:(e,t,n)=>{"use strict";var r=n(9344),o=n(814),i=n(1780),a=r(r.bind);e.exports=function(e,t){return o(e),void 0===t?e:i?a(e,t):function(){return e.apply(t,arguments)}}},4574:(e,t,n)=>{"use strict";var r=n(9903),o=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):i(n,t)}},4603:(e,t,n)=>{"use strict";var r=n(5547),o=n(1203),i=n(8900).String;e.exports=!!Object.getOwnPropertySymbols&&!o(function(){var e=Symbol("symbol detection");return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41})},4660:(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}`}},4665:e=>{e.exports=function(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")},e.exports.__esModule=!0,e.exports.default=e.exports},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)}},4711:(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 i=new Uint8Array(16),a=[];for(let e=0;e<256;++e)a.push((e+256).toString(16).slice(1));function s(e,t,n){const r=(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(i)}();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=15&r[6]|64,r[8]=63&r[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]=r[e];return t}return function(e,t=0){return(a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]).toLowerCase()}(r)}const l=function(e,t,n){return!r.randomUUID||t||e?s(e,t,n):r.randomUUID()}},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)}},4718:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(9292),o=n(8172);const i=e=>{var t,n;let{level:i="info",error:a,message:s,reduxState:l,extra:c}=e;s||null!=a&&a.message||(console.error("Attempted to log without message"),s="No error message provided");const u=(0,o.A)(l||{},r.W$),d={version:"2.80.2",release:"2.80.2",userAgent:navigator.userAgent,state:l?JSON.stringify(u):void 0,...c},p={message:null!==(t=s)&&void 0!==t?t:null==a?void 0:a.message,name:null==a?void 0:a.name,stack:null==a?void 0:a.stack,code:null==a?void 0:a.code,signal:null==a?void 0:a.signal,filename:null==a?void 0:a.filename};return{message:null!==(n=s)&&void 0!==n?n:null==a?void 0:a.message,level:i,extra:d,error:p}}},4851:(e,t,n)=>{"use strict";function r(e){let{token:t,botKey:n,jwt:r}=e,{withCurrentUrl:o,withVersion:i,extra:a}=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}:{},...i?{"kindly-chat-version":"2.80.2"}:{},...a}}}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(6052),i=n(2628),a=n(7542),s=n(3058),l=n(8035);const c=r.Ay.button.withConfig({componentId:"sc-o7eiww-0"})(["all:unset;cursor:pointer;outline:revert;"]),u=r.Ay.a.withConfig({componentId:"sc-o7eiww-1"})(["text-decoration:underline;cursor:pointer;",""],s.sF),d=(0,r.AH)(["border:0;text-align:center;border-radius:6px;font-weight:normal;background:none;cursor:pointer;text-transform:none;transition:all 0.2s ease;"]),p=r.Ay.button.withConfig({componentId:"sc-o7eiww-2"})([""," ",""],d,s.sF),f=r.Ay.div.withConfig({componentId:"sc-o7eiww-3"})(["position:relative;overflow:",";max-height:83px;min-height:",";height:","px;width:100%;min-width:0;"],e=>{let{$hasFiles:t}=e;return t?"visible":"hidden"},e=>{let{$initialHeight:t}=e;return`${(null!=t?t:0)+1}px`},e=>e.$active?e.$targetHeight:e.$initialHeight),h=(0,r.AH)(["max-height:41px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"]),m=(0,r.AH)(["",";font-size:",";"],e=>!e.$active&&"max-height: 44px;",l.J.input),g=(0,r.AH)(["position:relative;z-index:2;margin-bottom:0;color:",";font-size:var(--_kindlychat-font-size-p);line-height:20px;padding:7px 50px 8px 16px;"," background-image:none;resize:none;box-shadow:none;border-radius:18px;max-height:83px;font-family:",";width:100%;min-height:0;border:1px solid transparent;transition:transform 0.3s ease;",";",";@media ","{","}"," &:focus{color:",";box-shadow:none;border:1px solid ",";","}&:focus-visible{outline:none;}::placeholder{color:",";opacity:0.5;}"],e=>{let{theme:t}=e;return(0,o.w5)(t.background,"#FFFFFF","#000000")},e=>{let{theme:t}=e;return(0,s.Mo)(t.background,.08)},a.m.default,e=>e.$hide&&"transform: translateY(-60px)",e=>!e.$active&&h,l.jO.maxTablet,m,(0,i.A)()&&m,e=>{let{theme:t}=e;return(0,o.w5)(t.background,"#FFFFFF","#000000")},e=>{let{theme:t}=e;return(0,o.w5)(t.background,"rgba(255, 255, 255, 0.12)","rgba(0, 0, 0, 0.12)")},s.sF,e=>{let{theme:t}=e;return(0,o.w5)(t.background,"#FFF","#000")}),b=(0,r.AH)(["position:relative;&:before{content:'';left:0;right:20px;top:-15px;z-index:1;height:20px;position:absolute;background:linear-gradient( 0deg,"," 0%,"," 25%,rgba(248,248,248,0) 100% );opacity:1;transition:opacity linear 300ms;","}"],e=>e.theme.background,e=>e.theme.background,e=>{let{$inspectorOpen:t}=e;return t?"height: 0":""})},4953:e=>{"use strict";e.exports=n},5024:(e,t,n)=>{"use strict";var r=n(1203);e.exports=!r(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},5096:(e,t,n)=>{"use strict";n.d(t,{Z:()=>I});var r=n(5677),o=n.n(r),i=n(748),a=n.n(i),s=n(9932),l=n.n(s),c=n(5791),u=n.n(c),d=n(8803),p=n.n(d),f=n(4665),h=n.n(f),m=n(9155),g=n.n(m),b=n(5873),v=n(3864),y=n(9292),w=n(4718);const x=/Edge?\/(9[7-9]|\d{3,})\.\d+(\.\d+|)|Firefox\/(9[5-9]|\d{3,})\.\d+(\.\d+|)|Chrom(ium|e)\/(9[7-9]|\d{3,})\.\d+(\.\d+|)|(Maci|X1{2}).+ Version\/(15\.([4-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})\.\d+)([,.]\d+|)( \(\w+\)|)( Mobile\/\w+|) Safari\/|Chrome.+OPR\/(8[2-9]|9\d|\d{3,})\.\d+\.\d+|(CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS|CPU iPad OS)[ +]+(15[._]([4-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})[._]\d+)([._]\d+|)|Android:?[ /-](14[2-9]|1[5-9]\d|[2-9]\d{2}|\d{4,})(\.\d+|)(\.\d+|)|Mobile Safari.+OPR\/([89]\d|\d{3,})\.\d+\.\d+|Android.+Firefox\/(14[4-9]|1[5-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+Chrom(ium|e)\/(14[2-9]|1[5-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+(UC? ?Browser|UCWEB|U3)[ /]?(15\.([5-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})\.\d+)\.\d+|SamsungBrowser\/(1[6-9]|[2-9]\d|\d{3,})\.\d+/;var E=n(9514);const k=(0,v.DU)([":host{all:initial;}",""],e=>e.styles),A=(0,m.lazy)(()=>Promise.resolve().then(n.bind(n,1619)));let _;const C=(0,m.forwardRef)((e,t)=>{let{botKey:n,options:r,setKindlyChatRef:o}=e;const[i,a]=(0,m.useState)(r);function s(e,t){i[e]!==t&&(void 0===_||_===e?(0,E.flushSync)(()=>{a(n=>({...n,[e]:t}))}):a(n=>({...n,[e]:t})),_=e)}return(0,m.useImperativeHandle)(t,()=>({setOption:s,state:i})),g().createElement(m.Suspense,{fallback:""},g().createElement(A,{setKindlyChatRef:o,botKey:n,options:i}),g().createElement(k,{styles:r.styles}))});C.displayName="KindlyChatAPI";const S=C;var T;const I={},O="tab-visibility",L="bubble-visibility";var M=new WeakMap,$=new WeakMap,N=new WeakMap,R=new WeakSet,P=new WeakMap,j=new WeakMap;class D{constructor(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(o()(this,R),l()(this,"WINDOW_NAME","kindlyChat"),l()(this,"API_NODE_ID","kindly-chat-api"),l()(this,"SCRIPT_NODE_ID","kindly-chat"),l()(this,"VERSION","2.80.2"),l()(this,"APIRoot",null),a()(this,M,null),l()(this,"kindlyChat",null),l()(this,"botKey",void 0),l()(this,"options",{}),l()(this,"error",null),a()(this,$,null),a()(this,N,null),l()(this,"shadowRoot",null),l()(this,"showBubble",function(){var t;let{syncAcrossTabs:n=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var r;null===(t=u()(M,e))||void 0===t||t.setOption("bubbleHidden",!1),e.options.bubbleHidden=!1,n&&(null===(r=u()(N,e))||void 0===r||r.postMessage({type:L,payload:{visible:!0}}))}),l()(this,"hideBubble",function(){var t;let{syncAcrossTabs:n=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var r;null===(t=u()(M,e))||void 0===t||t.setOption("bubbleHidden",!0),e.options.bubbleHidden=!0,n&&(null===(r=u()(N,e))||void 0===r||r.postMessage({type:L,payload:{visible:!1}}))}),l()(this,"openChat",()=>{this.kindlyChat.openChat()}),l()(this,"closeChat",()=>{this.kindlyChat.closeChat()}),l()(this,"restartChat",e=>{this.kindlyChat.restartChat(e)}),l()(this,"getState",e=>u()(M,this).state[e]),l()(this,"setRootRef",e=>{p()(M,this,e)}),l()(this,"setNewContext",e=>{this.kindlyChat.setNewContext(e)}),l()(this,"getContext",async()=>this.kindlyChat.getContext()),l()(this,"setNewBannerMessage",async(e,t)=>this.kindlyChat.setNewBannerMessage(e,t)),l()(this,"setNewLabel",e=>{this.kindlyChat.setNewLabel(e)}),l()(this,"setKindlyChatRef",e=>{this.kindlyChat=e}),l()(this,"triggerDialogue",(e,t)=>{this.kindlyChat.triggerDialogue(e,t)}),l()(this,"sendMessage",(e,t)=>{this.kindlyChat.sendMessage(e,t)}),l()(this,"showNudge",e=>{let{nudgeLayout:t,slug:n,trackEvent:r=!0}=e;this.kindlyChat.showNudge({nudgeLayout:t,slug:n,trackEvent:r})}),l()(this,"showCustomNudge",e=>{let{content:t,slug:n,onRendered:r,trackEvent:o=!0}=e;this.kindlyChat.showCustomNudge({content:t,slug:n,onRendered:r,trackEvent:o})}),l()(this,"getNudges",()=>this.kindlyChat.getNudges()),l()(this,"closeNudge",function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];e.kindlyChat.closeNudge(t,n,r)}),l()(this,"nudgeCompletion",e=>{let{slug:t}=e;this.kindlyChat.nudgeCompletion(t)}),l()(this,"triggerCtaEvent",function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;e.kindlyChat.triggerCtaEvent(t)}),l()(this,"identifyUser",e=>{this.kindlyChat.identifyUser(e)}),l()(this,"cancelHandover",()=>{this.kindlyChat.cancelHandover()}),l()(this,"authenticate",e=>{e?this.kindlyChat.setGetAuthToken(e):console.error("Kindly Chat: No getAuthToken function provided. Kindly Chat will not be authenticated.")}),l()(this,"deauthenticate",()=>{this.kindlyChat.setGetAuthToken()}),a()(this,P,()=>{if(u()($,this)&&u()($,this).unmount(),p()($,this,null),this.shadowRoot){const e=this.shadowRoot.querySelector("style");e&&this.shadowRoot.removeChild(e)}}),a()(this,j,(e,t)=>{if(!this.shadowRoot){const t=window.document.createElement("div"),n=e.appendChild(t);this.shadowRoot=n.attachShadow({mode:"open"})}u()($,this)||p()($,this,(0,b.H)(this.shadowRoot)),u()($,this).render(g().createElement(v.ID,{target:this.shadowRoot},g().createElement(S,{ref:this.setRootRef,setKindlyChatRef:this.setKindlyChatRef,botKey:t,options:this.options})))}),l()(this,"render",()=>{this.error||(this.APIRoot?this.botKey?this.options.shadowDom&&HTMLElement.prototype.attachShadow?u()(j,this).call(this,this.APIRoot,this.botKey):(u()($,this)||p()($,this,(0,b.H)(this.APIRoot)),u()($,this).render(g().createElement(S,{ref:this.setRootRef,setKindlyChatRef:this.setKindlyChatRef,botKey:this.botKey,options:this.options}))):console.error("Cannot call render() without a bot key."):console.error("Cannot call render() on uninitialized Kindly Chat."))}),window.addEventListener("error",e=>{var t,n;if(null!==(t=e.filename)&&void 0!==t&&t.startsWith("http://localhost:8081")&&(null===(n=e.message)||void 0===n||!n.startsWith("Script error."))){const t=new XMLHttpRequest;t.open("POST",`https://bot.kindly.ai/chatbubble/${y.Ak}/log`),t.setRequestHeader("content-type","application/json"),t.send(JSON.stringify((0,w.A)({level:"error",error:e.error,extra:{fromEventListener:!0,filename:e.filename,lineno:e.lineno,colno:e.colno,eventmessage:e.message}}),(e,t)=>void 0===t?null:t))}}),h()(R,this,z).call(this,t,n)){if(!function(){const e={ResizeObserver:"undefined"!=typeof ResizeObserver,HTMLDialogElement:"undefined"!=typeof HTMLDialogElement,BroadcastChannel:"undefined"!=typeof BroadcastChannel};return Object.values(e).every(Boolean)}()){const e="Browser does not support features required for Kindly Chat to work.";return console.warn(e),void(this.error=new Error(e))}h()(R,this,B).call(this,this.options.target),h()(R,this,F).call(this)}}get isBrowserCompatible(){const{userAgent:e}=window.navigator;return x.test(e)}get open(){return this.kindlyChat.getActivityStatus()}}function z(e,t){const{botKey:n,...r}=h()(R,this,H).call(this);if(this.botKey=e||window.kindlyBotKey||n||void 0,!this.botKey){const e='Could not initialize Kindly Chat without bot key. Tried window.kindlyBotKey, data attribute "data-bot-key" and property "botKey".';return console.error(e),!1}return this.options={...T.defaultOptions,...window.kindlyOptions,...r,...t},!0}function F(){this.botKey&&(p()(N,this,new BroadcastChannel(`kindly-chat-${this.botKey}`)),u()(N,this).onmessage=e=>{switch(e.data.type){case O:e.data.payload.visible&&u()(P,this).call(this);break;case L:e.data.payload.visible?this.showBubble():this.hideBubble()}},document.addEventListener("visibilitychange",()=>{var e,t;document.hidden?null===(e=u()(N,this))||void 0===e||e.postMessage({type:O,payload:{visible:!1}}):(null===(t=u()(N,this))||void 0===t||t.postMessage({type:O,payload:{visible:!0}}),u()($,this)||(this.options.isFromMultitab=!0,this.render()))}))}function B(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(window[this.WINDOW_NAME]){const e="Kindly Chat does not support multiple instances on the same page";return console.warn(e),void(this.error=new Error(e))}if(window[this.WINDOW_NAME]=this,!document.getElementById(this.API_NODE_ID)){let t;if(this.APIRoot=document.createElement("div"),this.APIRoot.id=this.API_NODE_ID,e){const n=document.getElementById(e),r=e&&n&&"function"==typeof(null==n?void 0:n.appendChild);t=r?n:document.body,e&&!r&&console.warn(`Render target element with id="${e}" not found in DOM, falling back to document.body`)}else t=document.body;t.appendChild(this.APIRoot)}}function H(){const e=document.getElementById(this.SCRIPT_NODE_ID);if(!e)return console.warn(`Could not find element with id="${this.SCRIPT_NODE_ID}" in DOM, not loading data attributes.`),{};const t={...null==e?void 0:e.dataset};["bubbleHidden","shadowDom"].forEach(n=>{const r=`data-${n.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}`;e.hasAttribute(r)&&(t[n]=!0)});const n=e.getAttribute("nonce");return n&&(t.nonce=n),t}T=D,l()(D,"defaultOptions",{bubbleHidden:!1,shadowDom:!1,styles:"",target:null,renderedBy:"API",isFromMultitab:!1})},5116:(e,t,n)=>{"use strict";var r=n(8600),o=n(9683).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},5148:(e,t,n)=>{"use strict";var r=n(6100);e.exports=r([].slice)},5161:(e,t,n)=>{"use strict";var r=n(4317),o=n(8341),i=n(1019),a=Array.prototype,s=String.prototype;e.exports=function(e){var t=e.includes;return e===a||r(a,e)&&t===a.includes?o:"string"==typeof e||e===s||r(s,e)&&t===s.includes?i: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})},5216:(e,t,n)=>{"use strict";e.exports=n(6586)},5241:e=>{"use strict";e.exports={}},5262:(e,t,n)=>{"use strict";var r=n(6735);e.exports=r},5279:(e,t,n)=>{"use strict";var r=n(4356);e.exports=r},5297:(e,t,n)=>{"use strict";n(6925);var r=n(8099).Object,o=e.exports=function(e,t,n){return r.defineProperty(e,t,n)};r.defineProperty.sham&&(o.sham=!0)},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:()=>i});var r=n(4660),o=n(7051);const i=(e,t,n,i)=>{const a=[o.A,e=>((e,t,n,o)=>{let{attachment_ids:i=[],...a}=e;return{...a,attachments:(i||[]).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,i)];return a.reduce((e,t)=>t(e),e||{})}},5381:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=()=>{}},5396:(e,t,n)=>{"use strict";for(var r=n(8141),o=n(1003),i=n(6100),a=n(6281),s=n(8655),l=o("Symbol"),c=l.isWellKnownSymbol,u=o("Object","getOwnPropertyNames"),d=i(l.prototype.valueOf),p=r("wks"),f=0,h=u(l),m=h.length;f<m;f++)try{var g=h[f];a(l[g])&&s(g)}catch(e){}e.exports=function(e){if(c&&c(e))return!0;try{for(var t=d(e),n=0,r=u(p),o=r.length;n<o;n++)if(p[r[n]]==t)return!0}catch(e){}return!1}},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}},5518:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>v});var r=n(9155),o=n.n(r);const i=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),a=(e,t)=>r.Children.toArray(e).map((e,n,o)=>(0,r.isValidElement)(e)&&i(e)?t((0,r.cloneElement)(e,{...e.props,children:a(e.props.children,t)})):t(e,n,o)),s=a;var l=n(824),c=n(3864);function u(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(8035),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:i,shouldUnregister:a,clearOnSubmit:v=!1,className:y,sendButtonTitle:w="Submit",cancelButtonTitle:x="Cancel",ariaLabel:E,onCancel:k}=e;const{register:A,handleSubmit:_,getValues:C,reset:S,control:T,setError:I,trigger:O,clearErrors:L,setValue:M,formState:{isSubmitting:$,isSubmitted:N}}=(0,l.mN)({...t&&{defaultValues:t},...a&&{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 i(e,I),v&&S()}catch(e){throw S(),e}};return o().createElement(m.lV,{onSubmit:_(P),"aria-label":E,$isSubmitted:N,className:y,onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),e.metaKey||e.ctrlKey?_(P)():e.target.click())},noValidate:!0},s(n,e=>e?o().isValidElement(e)?(e=>{var t,n,r,i,a,s;return e?null!=e&&null!==(t=e.props)&&void 0!==t&&t.name?e.props.hasController?o().createElement(l.xI,Object.assign({key:e.key,control:T,render:t=>b(e,{...e.props,...t}),rules:(0,g.G8)(e.props.validators)},e.props)):b(e,{register:A,setError:I,clearErrors:L,trigger:O,control:T,...e.type&&"string"!=typeof e.type&&e.type.name===f.ZH.name&&{setValue:M}}):(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===(i=r[0])||void 0===i||null===(a=i.props)||void 0===a?void 0:a.placeholder_text,...!(null!==(s=e.props)&&void 0!==s&&s.htmlFor)&&{htmlFor:e.props.slug}}):e:null})(e):e:null),o().createElement(m.dg,null,o().createElement(d.A,{disabled:$,onClick:()=>{const e=C();k&&k(e)},text:x,isSecondaryButton:!0}),o().createElement(d.A,{type:"submit",icon:o().createElement(u,{color:R,width:16,height:16}),loading:$,text:w,"data-testid":"form-submit-button"})))}},5522:(e,t,n)=>{"use strict";n(9098)({target:"Symbol",stat:!0},{isRegisteredSymbol:n(3678)})},5545:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(9155),o=n.n(r),i=n(3864),a=n(2475);const s=i.Ay.div.withConfig({componentId:"sc-1a2z22o-0"})(["display:flex;align-items:center;justify-content:center;border-radius:100px;transition:all cubic-bezier(0.61,0.1,0.42,0.9) 150ms;min-height:18px;background-color:transparent;",""],e=>{let{$minHeight:t}=e;return t&&`min-height: ${t}px;`}),l=i.Ay.span.withConfig({componentId:"sc-1a2z22o-1"})(["width:6px;height:6px;opacity:0;border-radius:50%;background:",";background-color:",";&:nth-of-type(1){animation:1s "," infinite 0.3s;}&:nth-of-type(2){margin:0 5px;animation:1s "," infinite 0.6s;}&:nth-of-type(3){animation:1s "," infinite 0.9s;}"],e=>e.theme.buttonText,e=>e.theme.buttonText,a.Zm,a.Zm,a.Zm);function c(e){let{loading:t=!1,isCheckbox:n=!1,flat:r,minHeight:i}=e;return o().createElement(s,{$minHeight:i,$flat:r,$isCheckbox:n,$loading:t},o().createElement(l,null),o().createElement(l,null),o().createElement(l,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:a.default,slicer:i.default,serialize:JSON.stringify,deserialize:JSON.parse},t),o=n.key,s=n.merge,l=n.slicer,c=n.serialize,u=n.deserialize;return function(t){return function(n,r,i){"function"==typeof r&&void 0===i&&(i=r,r=void 0);var a=void 0,d=void 0;try{a=u(localStorage.getItem(o)),d=s(r,a)}catch(e){console.warn("Failed to retrieve initialize state from localStorage:",e)}var p=t(n,d,i),f=l(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 i=o(n(8639)),a=o(n(7487));e.exports=t.default},5547:(e,t,n)=>{"use strict";var r,o,i=n(8900),a=n(3531),s=i.process,l=i.Deno,c=s&&s.versions||l&&l.version,u=c&&c.v8;u&&(o=(r=u.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=+r[1]),e.exports=o},5571:(e,t,n)=>{"use strict";var r=n(6100),o=n(9903),i=n(1139),a=n(5426),s=r("".charAt),l=r("".charCodeAt),c=r("".slice),u=function(e){return function(t,n){var r,u,d=i(a(t)),p=o(n),f=d.length;return p<0||p>=f?e?"":void 0:(r=l(d,p))<55296||r>56319||p+1===f||(u=l(d,p+1))<56320||u>57343?e?s(d,p):r:e?c(d,p,p+2):u-56320+(r-55296<<10)+65536}};e.exports={codeAt:u(!1),charAt:u(!0)}},5629:(e,t,n)=>{"use strict";n.d(t,{Bd:()=>L,Bu:()=>k,Zn:()=>S,aP:()=>x,j3:()=>M,pA:()=>N,qJ:()=>R,tM:()=>E,y2:()=>A,zh:()=>T});var r=n(4711),o=n(9272),i=n(2221),a=n(4851),s=n(7958),l=n(3699),c=n(2552),u=n(5173),d=n(4490),p=n(1112),f=n(892),h=n(7325),m=n(3049),g=n(628),b=n(8681),v=n(7437),y=n(8679);const w=e=>{const{PAT_HOST:t}=e().environment,{local:n,chatbubble:{botKey:r},connection:{token:o},messages:{forms:i}}=e();return{token:o,PAT_HOST:t,botKey:r,local:n,forms:i}},x=(e,t,n)=>(r,o)=>{const{botKey:i}=w(o);r((0,g.zX)(i,!0)),localStorage.setItem("kindly-chat-restart-message",JSON.stringify({message:e,exchangeId:t,newContext:n}))},E=(e,t)=>async(n,r)=>{const{PAT_HOST:o,token:s}=w(r),l=await n((0,f.z5)()),{headers:c}=(0,a.A)({token:s},{withCurrentUrl:!0,extra:l}),d={message:e,temporaryId:t},p=await n((0,g.et)(`${o}/chatbubble/${i.Ak}/message/`,{method:"POST",body:d,headers:c},{onError:e=>{var r;n({type:y.pz,temporaryId:t,status:null==e||null===(r=e.response)||void 0===r?void 0:r.status})}}));(0,u.A)(p)||(n({type:y.pz,...p.data}),n((0,v.uK)()))},k=e=>t=>{t({type:y.QA,formData:e})},A=function(e,t,n){let{responsePromise:s,tempId:l}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},c=arguments.length>4?arguments[4]:void 0,d=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return async(p,b)=>{const{PAT_HOST:x}=w(b);let{token:E,local:A,forms:_}=w(b);if(!E){if(!await p((0,m.mg)({shouldGreet:!1})))return;const{shouldOpenChat:e}=d;e&&(p((0,h.mN)()),p((0,h.lQ)({source:"programmatic"}))),({token:E,local:A,forms:_}=w(b))}const C=await p((0,f.z5)()),{headers:S}=(0,a.A)({token:E},{withCurrentUrl:!0,extra:C});_&&Object.values(_).forEach(e=>{if((null==e?void 0:e.formSubmitState)===o.KN.ACTIVE){const t={submission_id:e.formSubmissionId,context:e.formValue,state:o.KN.UNANSWERED};p((0,g.et)(`${x}/chatbubble/${i.Ak}/form/submit`,{method:"POST",body:t,headers:S})),p(k({...e,formSubmitState:o.KN.UNANSWERED}))}});const T=l||`tempId-${(0,r.A)()}`;p({type:y.tq,data:{id:T,created:(new Date).toISOString(),message:e,buttonType:c}}),p((0,g.TP)((new Date).toISOString()));const I={message:e,exchange_id:t,temporaryId:T,new_context:{...A.context,...n||{}}},O=s?await s:await p((0,g.et)(`${x}/chatbubble/${i.Ak}/message/`,{method:"POST",body:I,headers:S},{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}`),p({type:y.pz,temporaryId:T,status:null==e||null===(n=e.response)||void 0===n?void 0:n.status}),p({type:y.wk})}}));(0,u.A)(O)||(p({type:y.pz,...O.data}),p((0,v.uK)()))}},_=e=>({...e,temporaryId:`tempId-${(0,r.A)()}`}),C=e=>{let{temporaryId:t}=e;return t},S=()=>async(e,t)=>{var n;const{bot:{id:o},chatbubble:{chatId:s,attachments:p},connection:{token:h},environment:{PAT_HOST:m}}=t(),b=await e((0,f.z5)()),{headers:v}=(0,a.A)({token:h},{extra:b}),w=`tempId-${(0,r.A)()}`,x=p.files.map(_).map((0,c.A)("file"));e({type:y.Os,data:{attachments:x}}),e({type:y.Q4}),e({type:y.tq,data:{id:w,created:(new Date).toISOString(),attachment_ids:x.map(C),message:""}}),e((0,g.TP)((new Date).toISOString()));const E=(t,n)=>{var r;e({type:y.pz,temporaryId:w,status:null==t||null===(r=t.response)||void 0===r?void 0:r.status}),n?e({type:y.wP,attachment:{...n,status:i.Le.ERROR}}):x.forEach(t=>e({type:y.wP,attachment:{...t,status:i.Le.ERROR}}))},k=x.map((0,c.A)("file","url")),A=`${m}/chatbubble/${i.Ak}/attachment/create`,S={attachments:k,temporaryChatMessageId:w},T=await e((0,g.et)(A,{method:"POST",body:S,headers:v},{onError:e=>E(e)}));if((0,u.A)(T)||!Array.isArray(null==T||null===(n=T.data)||void 0===n?void 0:n.attachments))return;const[I,O]=T.data.attachments.reduce((t,n)=>{let[r,o]=t,{id:i,temporary_id:a,upload_url:s}=n;return e({type:y.wP,attachment:{temporaryId:a,id:i}}),[[...r,i],[...o,s]]},[[],[]]),L={"x-goog-upload-bot-id":o,"x-goog-upload-chat-id":s},M=(0,d.A)(p.files,O).map(async t=>{let[{file:n,...r},o]=t;const i=await(0,l.Bu)(n),a={...L,"Content-Type":n.type};return await e((0,g.et)(o,{method:"PUT",body:i,headers:a},{onError:e=>E(e,r)}))}),$=await Promise.all(M);if($.some(e=>void 0===e))return;if($.some(u.A))return;const N=`${m}/chatbubble/${i.Ak}/attachment/uploads-complete`,R={attachmentIds:I,temporaryChatMessageId:w,exchangeId:p.exchangeId};e((0,g.TP)((new Date).toISOString())),await e((0,g.et)(N,{method:"POST",body:R,headers:v},{onError:e=>E(e)}))},T=function(e){let{openChat:t,languageCode:n,tempId:o,responsePromise:s}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return async(l,c)=>{const{connection:{token:d},chatbubble:{currentLanguage:p},local:{context:f}}=c(),{PAT_HOST:b}=c().environment;if(!d){const r={triggerDialogueSlug:e,languageCode:n,openChat:t};return l((0,m.XO)(r)),l((0,h.mN)()),void(t&&l((0,h.lQ)({source:"programmatic"})))}if(n&&n!==p){const e="Tried to trigger a dialogue in another language on an existing chat";l((0,g.Rm)({message:e,level:"error",extra:{languageCode:n,currentLanguage:p}}))}const w=o||(0,r.A)();l({type:y.IM,data:{id:w,created:(new Date).toISOString(),exchangeId:e}}),l((0,g.TP)((new Date).toISOString()));const x={exchange_id:e,temporaryId:w,new_context:{...f}},{headers:E}=(0,a.A)({token:d},{withCurrentUrl:!0}),k=s?await s:await l((0,g.et)(`${b}/chatbubble/${i.Ak}/trigger/`,{method:"POST",body:x,headers:E}));k&&!(0,u.A)(k)&&(t&&l((0,h.lQ)({source:"programmatic"})),l((0,v.uK)()))}},I=(e,t)=>n=>{n({type:y.Y6,buttonClick:{chatMessageId:e.id,buttonId:t.id,time:(new Date).toISOString()}})},O=(e,t,n)=>async(r,o)=>{const{connection:{token:s},environment:{PAT_HOST:l,VERSION:c}}=o(),u=await r((0,f.z5)()),{headers:d}=(0,a.A)({token:s},{withCurrentUrl:!0,extra:u}),p={method:"POST",body:{button:t,chatMessage:e,temporaryId:n,version:c},headers:d};return r((0,v.uK)()),r((0,g.et)(`${l}/chatbubble/${i.Ak}/button/click/`,p))},L=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return async(a,s)=>{const{local:l}=s(),c=(0,b.A)(e.button_type),u=`tempId-${(0,r.A)()}`,d={};o.length>0&&o.forEach(e=>{var r,o,s;e.button_type===i.lP.SLIDER.toLowerCase()&&null!==(r=e.slider_details)&&void 0!==r&&r.value?(d[null===(o=e.label)||void 0===o?void 0:o.toLowerCase()]=null===(s=e.slider_details)||void 0===s?void 0:s.value,a(I(t,e))):e.button_type===i.lP.CHECKBOX.toLowerCase()&&n.find(t=>t.id===e.id)?(d[e.value]=e.value,a(I(t,e)),a(O(t,e,u))):d[e.value]=""});const f=a(O(t,{...e,new_context:{...l.context,...d||{}}},u));switch(a({type:y.Y6,buttonClick:{chatMessageId:t.id,buttonId:e.id||e._id,time:(new Date).toISOString()}}),c){case i.lP.QUICK_REPLY:{const n={responsePromise:f,tempId:u};a(A(e.value,t.exchange_id,e.new_context,n,e.button_type));break}case i.lP.HANDOVER_REQUEST:a((0,p.Du)(f));break;case i.lP.DIALOGUE_TRIGGER:a(T(e.value,{tempId:u,responsePromise:f}));break;case i.lP.PRIVACY_EXPORT:a((0,h.VK)({responsePromise:f}));break;case i.lP.PRIVACY_DELETE:a((0,h._e)({responsePromise:f}));break;case i.lP.CONTACT_DETAILS:a((0,h.V$)(e));break;case i.lP.UPLOAD_ATTACHMENT:a((0,h.jz)(e))}}},M=(e,t)=>async(n,o)=>{const{connection:{token:s},environment:{PAT_HOST:l,VERSION:c}}=o(),d=`tempId-${(0,r.A)()}`,p=e.contact_details.contact_type,h={...e,button_type:i.lP.edit_contact_details};n({type:y.tq,data:{id:d,created:(new Date).toISOString(),message:t,buttons:[h],isContactDetails:!0}});const m=await n((0,f.z5)()),{headers:b}=(0,a.A)({token:s},{withCurrentUrl:!0,extra:m}),v={contactType:p,value:t,version:c,buttons:[h],temporaryId:d},w=await n((0,g.et)(`${l}/chatbubble/${i.Ak}/button/contact-details/`,{method:"POST",body:v,headers:b}));(0,u.A)(w)||n({type:y.pz,...w.data})},$=(0,s.A)(async(e,t,n)=>{let{id:r,index:o}=e;const{connection:{token:s},environment:{PAT_HOST:l,VERSION:c}}=n(),u=await t((0,f.z5)()),{headers:d}=(0,a.A)({token:s},{withCurrentUrl:!0,extra:u}),p={chatMessageId:r,version:c};t({type:y.kU,id:r,index:o}),t((0,g.et)(`${l}/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}),N=(e,t)=>(n,r)=>$({id:e,index:t},n,r),R=e=>{let{url:t,messageId:n}=e;return async(e,r)=>{const{botKey:o}=r().chatbubble,{PAT_HOST:s}=r().environment,{token:l}=r().connection,c=await e((0,f.z5)());e((0,g.et)(`${s}/chatbubble/${i.Ak}/message/reference-click/${n}`,{method:"POST",body:{url:t},...(0,a.A)({botKey:o,token:l},{withCurrentUrl:!0,extra:c})}))}}},5657:e=>{"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},5664:(e,t,n)=>{"use strict";n(4531)("dispose")},5677:(e,t,n)=>{var r=n(7354);e.exports=function(e,t){r(e,t),t.add(e)},e.exports.__esModule=!0,e.exports.default=e.exports},5687:(e,t,n)=>{"use strict";n(5664)},5767:(e,t,n)=>{"use strict";n.d(t,{ot:()=>_,Dz:()=>C,n_:()=>x,Ay:()=>T,WG:()=>y,CJ:()=>b,ZG:()=>S,GY:()=>k,wm:()=>w,zp:()=>A,m9:()=>E});var r=n(9749),o=n.n(r);var i=e=>Array.isArray(e)?e:[e];Symbol(),Object.getPrototypeOf({});var a="undefined"!=typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function s(){return{s:0,v:void 0,o:null,p:null}}function l(e,t={}){let n={s:0,v:void 0,o:null,p:null};const{resultEqualityCheck:r}=t;let o,i=0;function l(){let t=n;const{length:l}=arguments;for(let e=0,n=l;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=s(),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=s(),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),i++,r){const e=o?.deref?.()??o;null!=e&&r(e,u)&&(u=e,0!==i&&i--),o="object"==typeof u&&null!==u||"function"==typeof u?new a(u):u}return c.s=1,c.v=u,u}return l.clearCache=()=>{n={s:0,v:void 0,o:null,p:null},l.resetResultsCount()},l.resultsCount=()=>i,l.resetResultsCount=()=>{i=0},l}function c(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r=0,o=0,a={},s=e.pop();"object"==typeof s&&(a=s,s=e.pop()),function(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);const c={...n,...a},{memoize:u,memoizeOptions:d=[],argsMemoize:p=l,argsMemoizeOptions:f=[],devModeChecks:h={}}=c,m=i(d),g=i(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++,s.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:s,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(l),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(9977),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,timeout:t.payload.timeout,feedback_trigger_by:"default",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,e.feedbackToSubmit.buttons_chosen=[])},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)},setFeedbackTriggerBy:(e,t)=>{e.feedbackToSubmit&&(e.feedbackToSubmit.feedback_trigger_by=t.payload)},clearFeedbackToSubmit:e=>{e.feedbackToSubmit=null},clearFeedbacksAlreadyDisplayed:e=>{e.feedbacksAlreadyDisplayed=[]}},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:w,clearRating:x,toggleCommentButton:E,setFreeformText:k,setStep:A,clearFeedbackToSubmit:_,clearFeedbacksAlreadyDisplayed:C,setFeedbackTriggerBy:S}=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)}},5780:(e,t,n)=>{"use strict";var r,o=n(7235),i=n(7389),a=n(9683),s=n(5241),l=n(3489),c=n(9619),u=n(4275),d="prototype",p="script",f=u("IE_PROTO"),h=function(){},m=function(e){return"<"+p+">"+e+"</"+p+">"},g=function(e){e.write(m("")),e.close();var t=e.parentWindow.Object;return e=null,t},b=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;b="undefined"!=typeof document?document.domain&&r?g(r):(t=c("iframe"),n="java"+p+":",t.style.display="none",l.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(m("document.F=Object")),e.close(),e.F):g(r);for(var o=a.length;o--;)delete b[d][a[o]];return b()};s[f]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(h[d]=o(e),n=new h,h[d]=null,n[f]=e):n=b(),void 0===t?n:i.f(n,t)}},5781:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(9155),o=n.n(r);function i(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"}))}},5785:(e,t,n)=>{"use strict";var r=n(9098),o=n(4603),i=n(1203),a=n(7313),s=n(2137);r({target:"Object",stat:!0,forced:!o||i(function(){a.f(1)})},{getOwnPropertySymbols:function(e){var t=a.f;return t?t(s(e)):[]}})},5791:(e,t,n)=>{var r=n(4665);e.exports=function(e,t){return e.get(r(e,t))},e.exports.__esModule=!0,e.exports.default=e.exports},5799:(e,t,n)=>{"use strict";n(4531)("iterator")},5813:(e,t,n)=>{"use strict";var r=n(1810);e.exports=r},5814:(e,t,n)=>{"use strict";n.d(t,{Bq:()=>u,G8:()=>l,NR:()=>c});var r=n(9749),o=n.n(r),i=n(7575),a=n(9272);const s={maximum:"max",minimum:"min"},l=e=>{const t={},n=e.map(e=>Object.entries(e).reduce((e,t)=>{let[n,r]=t;return e[s[n]||n]=r,e},{}));for(let e=0;e<n.length;e+=1){var r;const s=Object.keys(n[e]),l=null===(r=n[e].texts)||void 0===r?void 0:r.text;s.forEach(r=>{var s;o()(s=Object.values(a.ZF)).call(s,r)&&(t[(0,i.A)(r)]={value:n[e][r],...l&&{message:l}})})}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}},5851:()=>{},5873:(e,t,n)=>{"use strict";var r=n(9514);t.H=r.createRoot,r.hydrateRoot},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}},5994:(e,t,n)=>{"use strict";var r=n(3407);n(5522),n(7524),n(8448),n(8013),n(9437),n(2991),n(3860),n(6251),n(2100),n(2996),e.exports=r},6052:(e,t,n)=>{"use strict";function r(e,t,n){return o(e)?n:t}function o(e){let t=e;s(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)),l(e)&&(t=i(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 i(e){return e.replace(a,(e,t,n,r)=>`#${t}${t}${n}${n}${r}${r}`)}n.d(t,{J7:()=>c,SW:()=>o,w5:()=>r});const a=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,s=e=>e.match(/^rgb/),l=e=>e.match(a);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(s(e))return e.match(/\d+/g).map(Number);let t="#"===e.charAt(0)?e.substring(1):e;return l(e)&&(t=i(t).substring(1)),[parseInt(t.substring(0,2),16),parseInt(t.substring(2,4),16),parseInt(t.substring(4,6),16)]}},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})},6100:(e,t,n)=>{"use strict";var r=n(1780),o=Function.prototype,i=o.call,a=r&&o.bind.bind(i,i);e.exports=r?a:function(e){return function(){return i.apply(e,arguments)}}},6101:(e,t,n)=>{"use strict";n.d(t,{A:()=>y});var r=n(9155),o=n.n(r),i=n(2221),a=n(3864),s=n(6052);const l=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=a.Ay.div.withConfig({componentId:"sc-1mhxo2t-0"})(["display:flex;flex-direction:column;position:relative;width:100%;"," background-color:",";"],e=>{let{$isForm:t}=e;return t?"padding: 12px 0 16px;":(0,a.AH)(["border-radius:6px;padding:12px 12px 16px 12px;box-shadow:0px 1px 5px 1px rgba(0,0,0,0.08);"])},e=>{let{theme:t}=e;return t.panelBackground}),d=a.Ay.div.withConfig({componentId:"sc-1mhxo2t-1"})(["padding:0px 8px 0px 0px;font-size:var(--_kindlychat-font-size-p);"]),p=a.Ay.div.withConfig({componentId:"sc-1mhxo2t-2"})(["position:relative;flex:1;display:flex;align-items:center;flex-direction:row;margin-bottom:12px;color:",";"],e=>{let{theme:t,$isForm:n}=e;return n?"var(--panel-background-white-black-contrast-1743170834)":(0,s.w5)(t.background,"#FFFFFF","#000000")}),f=a.Ay.span.withConfig({componentId:"sc-1mhxo2t-3"})(["display:flex;padding:4px;align-items:center;justify-content:center;font-size:var(--_kindlychat-font-size-p);"]),h=a.Ay.div.withConfig({componentId:"sc-1mhxo2t-4"})(["position:relative;display:flex;flex:1;border:1px solid ",";border-radius:25px;"],e=>{let{theme:t}=e;return(0,s.w5)(t.panelBackground,"rgba(255,255,255, 0.08)","rgba(0,0,0, 0.08)")}),m=(0,a.AH)(["height:20px;width:20px;border-radius:50%;background:",";cursor:pointer;appearance:none;margin-top:-6px;border:1px solid rgba(0,0,0,0.2);box-shadow:0 1px 4px 0 rgba(0,0,0,0.08);"],e=>{let{theme:t}=e;return t.buttonBackground}),g=(e,t,n)=>(e-n)/(t-n)*100,b=a.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)}%, ${l((0,s.w5)(t.panelBackground,"#FFFFFF","#000000"),.08)} ${g(n,r,o)}%, ${l((0,s.w5)(t.panelBackground,"#FFFFFF","#000000"),.08)} 100%)`}}}).withConfig({componentId:"sc-1mhxo2t-5"})(["cursor:pointer;"," &[type='range']{appearance:none;width:100%;border-radius:25px;height:8px;margin:0;&::-webkit-slider-thumb{","}&::-moz-range-thumb{","}&::-webkit-slider-runnable-track{width:100%;height:8px;cursor:pointer;border-radius:25px;}}"],c.jq,m,m);var v=n(5814);const y=function(e){let{from:t,to:n,value:a=1,affix:s,affixValue:l,step:c=1,onChange:m,name:g,field:y,ariaLabel:w,validators:x=[],hasController:E}=e;const k=(0,v.G8)(x),A=(0,r.useMemo)(()=>{var e;const n=parseFloat(String(t));return Number.isNaN(n)?null===(e=k.min)||void 0===e?void 0:e.value:n},[t,k]),_=(0,r.useMemo)(()=>{var e;const t=parseFloat(String(n));return Number.isNaN(t)?null===(e=k.max)||void 0===e?void 0:e.value:t},[n,k]),[C,S]=(0,r.useState)(((e,t,n)=>t<e?e+n:t)(c,a,A));return o().createElement(u,{$isForm:!!E},o().createElement(p,{$isForm:!!E},s===i.rc.PREFIX&&o().createElement(d,null,l),o().createElement(f,null,C),s===i.rc.SUFFIX&&o().createElement(d,null,l)),o().createElement(h,null,o().createElement(b,{type:"range",name:g,step:c,min:A,max:_,value:C,onChange:e=>{var t;null!=e&&null!==(t=e.target)&&void 0!==t&&t.value&&(m&&m(e.target.value),null!=y&&y.onChange&&y.onChange(e),S(e.target.value))},"aria-label":w})))}},6189:(e,t,n)=>{"use strict";n(1918),n(7935),n(9239),n(8293),n(2320),n(3131),n(5664),n(8749),n(6836),n(5799),n(928),n(9850),n(6457),n(6789),n(4119),n(7501),n(7424),n(1249),n(1818),n(2279),n(5851),n(2492);var r=n(8099);e.exports=r.Symbol},6251:(e,t,n)=>{"use strict";n(4531)("metadataKey")},6281:(e,t,n)=>{"use strict";var r=n(1003),o=n(2769),i=n(4317),a=n(7460),s=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return o(t)&&i(t.prototype,s(e))}},6290:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(9155),o=n.n(r);function i(e){let{color:t="#FFF",...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("path",{d:"M15.25 10.75L12 14.25L8.75 10.75",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))}},6343:(e,t,n)=>{"use strict";n.d(t,{oI:()=>E.oI,Sz:()=>c.Sz,B:()=>p.B,Mx:()=>s.Mx,UB:()=>p.UB,cL:()=>r.cL,RY:()=>c.RY,g4:()=>p.g4,Bd:()=>x.Bd,Rh:()=>p.Rh,eG:()=>p.eG,mN:()=>p.mN,mg:()=>f.mg,fk:()=>f.fk,XO:()=>f.XO,_e:()=>p._e,Fe:()=>w.F,pK:()=>i,Y_:()=>k.Y_,gQ:()=>E.gQ,wQ:()=>p.wQ,ky:()=>p.ky,VK:()=>p.VK,z5:()=>s.z5,SD:()=>y,gm:()=>s.gm,UJ:()=>f.UJ,qf:()=>f.qf,Rm:()=>c.Rm,Mm:()=>p.Mm,ZS:()=>p.ZS,lQ:()=>p.lQ,tM:()=>x.tM,aP:()=>x.aP,c9:()=>c.c9,Zn:()=>x.Zn,j3:()=>x.j3,Ln:()=>p.Ln,L4:()=>p.L4,zn:()=>p.zn,Bu:()=>x.Bu,nI:()=>p.nI,F3:()=>h,pA:()=>x.pA,Aw:()=>b,tD:()=>v,Dc:()=>a,kS:()=>k.kS,ob:()=>p.ob,ku:()=>E.ku,cC:()=>w.c,fe:()=>k.fe,i1:()=>p.i1,VP:()=>E.VP,mR:()=>k.mR,Z4:()=>p.Z4,zX:()=>c.zX,y2:()=>x.y2,V$:()=>p.V$,uz:()=>m,yM:()=>d,vJ:()=>k.vJ,qJ:()=>x.qJ,et:()=>c.et,zh:()=>x.zh,m8:()=>c.m8,R7:()=>c.R7,Mb:()=>r.Mb,mw:()=>r.mw});var r=n(1112),o=n(8679);const i=()=>e=>{e({type:o.u2})},a=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 s=n(892),l=n(4851),c=n(628),u=n(2221);const d=e=>async(t,n)=>{const{PAT_HOST:r}=n().environment,{botKey:o,currentLanguage:i}=n().chatbubble,{token:a}=n().connection,d=await t((0,s.z5)());t((0,c.et)(`${r}/chatbubble/${u.Ak}/conversion/`,{method:"POST",body:{is_order:e,language_code:i},...(0,l.A)({botKey:o,token:a},{withCurrentUrl:!0,extra:d})}))};var p=n(7325),f=n(3049);const h=e=>({type:o.ye,chatMessageId:e}),m=()=>({type:o.vK});var g=n(6546);const b=e=>t=>{t({type:g.s,context:e})},v=e=>(t,n)=>{if("string"!=typeof e)throw new Error("label needs to be a string, received "+typeof e);t({type:g.T,label:e});const{connection:{token:r},environment:{PAT_HOST:o},local:{labels:i}}=n();r&&t((0,c.et)(`${o}/chatbubble/${u.Ak}/update_labels`,{method:"POST",body:{labels:i},...(0,l.A)({token:r})}))},y=()=>async(e,t)=>{const{connection:{token:n,botKey:r},environment:{PAT_HOST:o},local:{context:i}}=t();let a={...i};if(n){const t=await e((0,c.et)(`${o}/chatbubble/${u.Ak}/context`,{method:"get",...(0,l.A)({token:n,botKey:r})}));null!=t&&t.data&&(a={...t.data,...a})}return a};var w=n(1763),x=n(5629),E=n(3553),k=n(8414)},6367:(e,t,n)=>{"use strict";n.d(t,{GJ:()=>a,NY:()=>l,fz:()=>c,n6:()=>d,tf:()=>u});const r=["load","message"],o="See https://docs.kindly.ai/api/chat#handlers for how to switch.",i=function(e,t,n,i){var a,s;let l=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(-1!==r.indexOf(e)&&Boolean(i)&&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 i=Object.values(n);try{e(...i)}catch(e){console.error(e)}}(i,e,t),"API"!==n)return!0;if(null===(a=window)||void 0===a||null===(s=a.kindlyChat)||void 0===s||!s.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:l}))};function a(e,t,n,r){e&&i("message",{newMessage:e,chatLog:t},r,n)}let s=!1;function l(e){!1===s&&(s=!0,i("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:i,handlers:a,lastMessage:s,renderedBy:l}=e,c=!1;const u=null==a?void 0:a[n];if(u){console.warn(`kindlyOptions.buttonHandlers is deprecated in favor of standard event handlers. ${o}`);try{c=Boolean(u(i,t,s,r,n))}catch(e){console.error(e)}}var d;return"API"===l&&(c=!(null!==(d=window.kindlyChat)&&void 0!==d&&d.APIRoot.dispatchEvent(new CustomEvent("kindly:buttonclick",{detail:{button:t,lastMessage:s,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:a}}=r,s={...t,chatId:o,source:n,type:e};return i("ui",s,a,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})))}},6457:(e,t,n)=>{"use strict";n(4531)("replace")},6464:(e,t,n)=>{"use strict";n.d(t,{B:()=>o,U:()=>i});var r=n(4711);const o="kindly-chat-browser-id",i=()=>{const e=localStorage.getItem(o);if(!e){const e=(0,r.A)();return localStorage.setItem(o,e),e}return e}},6546:(e,t,n)=>{"use strict";n.d(t,{T:()=>o,s:()=>r});const r="SET_NEW_CONTEXT",o="SET_NEW_LABEL"},6586:(e,t,n)=>{"use strict";var r=n(1305);e.exports=r},6625:e=>{"use strict";e.exports={}},6735:(e,t,n)=>{"use strict";var r=n(3592);e.exports=r},6789:(e,t,n)=>{"use strict";n(4531)("search")},6831:(e,t,n)=>{"use strict";n.d(t,{A:()=>ce});var r=n(9155),o=n.n(r);const{entries:i,setPrototypeOf:a,isFrozen:s,getPrototypeOf:l,getOwnPropertyDescriptor:c}=Object;let{freeze:u,seal:d,create:p}=Object,{apply:f,construct:h}="undefined"!=typeof Reflect&&Reflect;u||(u=function(e){return e}),d||(d=function(e){return e}),f||(f=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return e.apply(t,r)}),h||(h=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});const m=O(Array.prototype.forEach),g=O(Array.prototype.lastIndexOf),b=O(Array.prototype.pop),v=O(Array.prototype.push),y=O(Array.prototype.splice),w=O(String.prototype.toLowerCase),x=O(String.prototype.toString),E=O(String.prototype.match),k=O(String.prototype.replace),A=O(String.prototype.indexOf),_=O(String.prototype.trim),C=O(Object.prototype.hasOwnProperty),S=O(RegExp.prototype.test),T=(I=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return h(I,t)});var I;function O(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 f(e,t,r)}}function L(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:w;a&&a(e,null);let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(s(t)||(t[r]=e),o=e)}e[o]=!0}return e}function M(e){for(let t=0;t<e.length;t++)C(e,t)||(e[t]=null);return e}function $(e){const t=p(null);for(const[n,r]of i(e))C(e,n)&&(Array.isArray(r)?t[n]=M(r):r&&"object"==typeof r&&r.constructor===Object?t[n]=$(r):t[n]=r);return t}function N(e,t){for(;null!==e;){const n=c(e,t);if(n){if(n.get)return O(n.get);if("function"==typeof n.value)return O(n.value)}e=l(e)}return function(){return null}}const R=u(["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","search","section","select","shadow","slot","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"]),P=u(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),j=u(["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"]),D=u(["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"]),z=u(["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"]),F=u(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),B=u(["#text"]),H=u(["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","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","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","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),U=u(["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","mask-type","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"]),V=u(["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"]),G=u(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),W=d(/\{\{[\w\W]*|[\w\W]*\}\}/gm),q=d(/<%[\w\W]*|[\w\W]*%>/gm),K=d(/\$\{[\w\W]*/gm),Y=d(/^data-[\-\w.\u00B7-\uFFFF]+$/),X=d(/^aria-[\-\w]+$/),Z=d(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),J=d(/^(?:\w+script|data):/i),Q=d(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ee=d(/^html$/i),te=d(/^[a-z][.\w]*(-[.\w]+)+$/i);var ne=Object.freeze({__proto__:null,ARIA_ATTR:X,ATTR_WHITESPACE:Q,CUSTOM_ELEMENT:te,DATA_ATTR:Y,DOCTYPE_NAME:ee,ERB_EXPR:q,IS_ALLOWED_URI:Z,IS_SCRIPT_OR_DATA:J,MUSTACHE_EXPR:W,TMPLIT_EXPR:K});const re=function(){return"undefined"==typeof window?null:window};var oe=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:re();const n=t=>e(t);if(n.version="3.3.0",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:s,HTMLTemplateElement:l,Node:c,Element:d,NodeFilter:f,NamedNodeMap:h=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:I,DOMParser:O,trustedTypes:M}=t,W=d.prototype,q=N(W,"cloneNode"),K=N(W,"remove"),Y=N(W,"nextSibling"),X=N(W,"childNodes"),J=N(W,"parentNode");if("function"==typeof l){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let Q,te="";const{implementation:oe,createNodeIterator:ie,createDocumentFragment:ae,getElementsByTagName:se}=r,{importNode:le}=o;let ce={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof i&&"function"==typeof J&&oe&&void 0!==oe.createHTMLDocument;const{MUSTACHE_EXPR:ue,ERB_EXPR:de,TMPLIT_EXPR:pe,DATA_ATTR:fe,ARIA_ATTR:he,IS_SCRIPT_OR_DATA:me,ATTR_WHITESPACE:ge,CUSTOM_ELEMENT:be}=ne;let{IS_ALLOWED_URI:ve}=ne,ye=null;const we=L({},[...R,...P,...j,...z,...B]);let xe=null;const Ee=L({},[...H,...U,...V,...G]);let ke=Object.seal(p(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}})),Ae=null,_e=null;const Ce=Object.seal(p(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Se=!0,Te=!0,Ie=!1,Oe=!0,Le=!1,Me=!0,$e=!1,Ne=!1,Re=!1,Pe=!1,je=!1,De=!1,ze=!0,Fe=!1,Be=!0,He=!1,Ue={},Ve=null;const Ge=L({},["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 We=null;const qe=L({},["audio","video","img","source","image","track"]);let Ke=null;const Ye=L({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Xe="http://www.w3.org/1998/Math/MathML",Ze="http://www.w3.org/2000/svg",Je="http://www.w3.org/1999/xhtml";let Qe=Je,et=!1,tt=null;const nt=L({},[Xe,Ze,Je],x);let rt=L({},["mi","mo","mn","ms","mtext"]),ot=L({},["annotation-xml"]);const it=L({},["title","style","font","a","script"]);let at=null;const st=["application/xhtml+xml","text/html"];let lt=null,ct=null;const ut=r.createElement("form"),dt=function(e){return e instanceof RegExp||e instanceof Function},pt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ct||ct!==e){if(e&&"object"==typeof e||(e={}),e=$(e),at=-1===st.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,lt="application/xhtml+xml"===at?x:w,ye=C(e,"ALLOWED_TAGS")?L({},e.ALLOWED_TAGS,lt):we,xe=C(e,"ALLOWED_ATTR")?L({},e.ALLOWED_ATTR,lt):Ee,tt=C(e,"ALLOWED_NAMESPACES")?L({},e.ALLOWED_NAMESPACES,x):nt,Ke=C(e,"ADD_URI_SAFE_ATTR")?L($(Ye),e.ADD_URI_SAFE_ATTR,lt):Ye,We=C(e,"ADD_DATA_URI_TAGS")?L($(qe),e.ADD_DATA_URI_TAGS,lt):qe,Ve=C(e,"FORBID_CONTENTS")?L({},e.FORBID_CONTENTS,lt):Ge,Ae=C(e,"FORBID_TAGS")?L({},e.FORBID_TAGS,lt):$({}),_e=C(e,"FORBID_ATTR")?L({},e.FORBID_ATTR,lt):$({}),Ue=!!C(e,"USE_PROFILES")&&e.USE_PROFILES,Se=!1!==e.ALLOW_ARIA_ATTR,Te=!1!==e.ALLOW_DATA_ATTR,Ie=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Oe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Le=e.SAFE_FOR_TEMPLATES||!1,Me=!1!==e.SAFE_FOR_XML,$e=e.WHOLE_DOCUMENT||!1,Pe=e.RETURN_DOM||!1,je=e.RETURN_DOM_FRAGMENT||!1,De=e.RETURN_TRUSTED_TYPE||!1,Re=e.FORCE_BODY||!1,ze=!1!==e.SANITIZE_DOM,Fe=e.SANITIZE_NAMED_PROPS||!1,Be=!1!==e.KEEP_CONTENT,He=e.IN_PLACE||!1,ve=e.ALLOWED_URI_REGEXP||Z,Qe=e.NAMESPACE||Je,rt=e.MATHML_TEXT_INTEGRATION_POINTS||rt,ot=e.HTML_INTEGRATION_POINTS||ot,ke=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&dt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ke.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&dt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ke.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ke.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Le&&(Te=!1),je&&(Pe=!0),Ue&&(ye=L({},B),xe=[],!0===Ue.html&&(L(ye,R),L(xe,H)),!0===Ue.svg&&(L(ye,P),L(xe,U),L(xe,G)),!0===Ue.svgFilters&&(L(ye,j),L(xe,U),L(xe,G)),!0===Ue.mathMl&&(L(ye,z),L(xe,V),L(xe,G))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?Ce.tagCheck=e.ADD_TAGS:(ye===we&&(ye=$(ye)),L(ye,e.ADD_TAGS,lt))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?Ce.attributeCheck=e.ADD_ATTR:(xe===Ee&&(xe=$(xe)),L(xe,e.ADD_ATTR,lt))),e.ADD_URI_SAFE_ATTR&&L(Ke,e.ADD_URI_SAFE_ATTR,lt),e.FORBID_CONTENTS&&(Ve===Ge&&(Ve=$(Ve)),L(Ve,e.FORBID_CONTENTS,lt)),Be&&(ye["#text"]=!0),$e&&L(ye,["html","head","body"]),ye.table&&(L(ye,["tbody"]),delete Ae.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw T('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw T('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Q=e.TRUSTED_TYPES_POLICY,te=Q.createHTML("")}else void 0===Q&&(Q=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}}(M,a)),null!==Q&&"string"==typeof te&&(te=Q.createHTML(""));u&&u(e),ct=e}},ft=L({},[...P,...j,...D]),ht=L({},[...z,...F]),mt=function(e){v(n.removed,{element:e});try{J(e).removeChild(e)}catch(t){K(e)}},gt=function(e,t){try{v(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){v(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Pe||je)try{mt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},bt=function(e){let t=null,n=null;if(Re)e="<remove></remove>"+e;else{const t=E(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===at&&Qe===Je&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=Q?Q.createHTML(e):e;if(Qe===Je)try{t=(new O).parseFromString(o,at)}catch(e){}if(!t||!t.documentElement){t=oe.createDocument(Qe,"template",null);try{t.documentElement.innerHTML=et?te:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),Qe===Je?se.call(t,$e?"html":"body")[0]:$e?t.documentElement:i},vt=function(e){return ie.call(e.ownerDocument||e,e,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT|f.SHOW_PROCESSING_INSTRUCTION|f.SHOW_CDATA_SECTION,null)},yt=function(e){return e instanceof I&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof h)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},wt=function(e){return"function"==typeof c&&e instanceof c};function xt(e,t,r){m(e,e=>{e.call(n,t,r,ct)})}const Et=function(e){let t=null;if(xt(ce.beforeSanitizeElements,e,null),yt(e))return mt(e),!0;const r=lt(e.nodeName);if(xt(ce.uponSanitizeElement,e,{tagName:r,allowedTags:ye}),Me&&e.hasChildNodes()&&!wt(e.firstElementChild)&&S(/<[/\w!]/g,e.innerHTML)&&S(/<[/\w!]/g,e.textContent))return mt(e),!0;if(7===e.nodeType)return mt(e),!0;if(Me&&8===e.nodeType&&S(/<[/\w]/g,e.data))return mt(e),!0;if(!(Ce.tagCheck instanceof Function&&Ce.tagCheck(r))&&(!ye[r]||Ae[r])){if(!Ae[r]&&At(r)){if(ke.tagNameCheck instanceof RegExp&&S(ke.tagNameCheck,r))return!1;if(ke.tagNameCheck instanceof Function&&ke.tagNameCheck(r))return!1}if(Be&&!Ve[r]){const t=J(e)||e.parentNode,n=X(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r){const o=q(n[r],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,Y(e))}}return mt(e),!0}return e instanceof d&&!function(e){let t=J(e);t&&t.tagName||(t={namespaceURI:Qe,tagName:"template"});const n=w(e.tagName),r=w(t.tagName);return!!tt[e.namespaceURI]&&(e.namespaceURI===Ze?t.namespaceURI===Je?"svg"===n:t.namespaceURI===Xe?"svg"===n&&("annotation-xml"===r||rt[r]):Boolean(ft[n]):e.namespaceURI===Xe?t.namespaceURI===Je?"math"===n:t.namespaceURI===Ze?"math"===n&&ot[r]:Boolean(ht[n]):e.namespaceURI===Je?!(t.namespaceURI===Ze&&!ot[r])&&!(t.namespaceURI===Xe&&!rt[r])&&!ht[n]&&(it[n]||!ft[n]):!("application/xhtml+xml"!==at||!tt[e.namespaceURI]))}(e)?(mt(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!S(/<\/no(script|embed|frames)/i,e.innerHTML)?(Le&&3===e.nodeType&&(t=e.textContent,m([ue,de,pe],e=>{t=k(t,e," ")}),e.textContent!==t&&(v(n.removed,{element:e.cloneNode()}),e.textContent=t)),xt(ce.afterSanitizeElements,e,null),!1):(mt(e),!0)},kt=function(e,t,n){if(ze&&("id"===t||"name"===t)&&(n in r||n in ut))return!1;if(Te&&!_e[t]&&S(fe,t));else if(Se&&S(he,t));else if(Ce.attributeCheck instanceof Function&&Ce.attributeCheck(t,e));else if(!xe[t]||_e[t]){if(!(At(e)&&(ke.tagNameCheck instanceof RegExp&&S(ke.tagNameCheck,e)||ke.tagNameCheck instanceof Function&&ke.tagNameCheck(e))&&(ke.attributeNameCheck instanceof RegExp&&S(ke.attributeNameCheck,t)||ke.attributeNameCheck instanceof Function&&ke.attributeNameCheck(t,e))||"is"===t&&ke.allowCustomizedBuiltInElements&&(ke.tagNameCheck instanceof RegExp&&S(ke.tagNameCheck,n)||ke.tagNameCheck instanceof Function&&ke.tagNameCheck(n))))return!1}else if(Ke[t]);else if(S(ve,k(n,ge,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==A(n,"data:")||!We[e])if(Ie&&!S(me,k(n,ge,"")));else if(n)return!1;return!0},At=function(e){return"annotation-xml"!==e&&E(e,be)},_t=function(e){xt(ce.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||yt(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:xe,forceKeepAttr:void 0};let o=t.length;for(;o--;){const i=t[o],{name:a,namespaceURI:s,value:l}=i,c=lt(a),u=l;let d="value"===a?u:_(u);if(r.attrName=c,r.attrValue=d,r.keepAttr=!0,r.forceKeepAttr=void 0,xt(ce.uponSanitizeAttribute,e,r),d=r.attrValue,!Fe||"id"!==c&&"name"!==c||(gt(a,e),d="user-content-"+d),Me&&S(/((--!?|])>)|<\/(style|title|textarea)/i,d)){gt(a,e);continue}if("attributename"===c&&E(d,"href")){gt(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){gt(a,e);continue}if(!Oe&&S(/\/>/i,d)){gt(a,e);continue}Le&&m([ue,de,pe],e=>{d=k(d,e," ")});const p=lt(e.nodeName);if(kt(p,c,d)){if(Q&&"object"==typeof M&&"function"==typeof M.getAttributeType)if(s);else switch(M.getAttributeType(p,c)){case"TrustedHTML":d=Q.createHTML(d);break;case"TrustedScriptURL":d=Q.createScriptURL(d)}if(d!==u)try{s?e.setAttributeNS(s,a,d):e.setAttribute(a,d),yt(e)?mt(e):b(n.removed)}catch(t){gt(a,e)}}else gt(a,e)}xt(ce.afterSanitizeAttributes,e,null)},Ct=function e(t){let n=null;const r=vt(t);for(xt(ce.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)xt(ce.uponSanitizeShadowNode,n,null),Et(n),_t(n),n.content instanceof s&&e(n.content);xt(ce.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,a=null,l=null;if(et=!e,et&&(e="\x3c!--\x3e"),"string"!=typeof e&&!wt(e)){if("function"!=typeof e.toString)throw T("toString is not a function");if("string"!=typeof(e=e.toString()))throw T("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Ne||pt(t),n.removed=[],"string"==typeof e&&(He=!1),He){if(e.nodeName){const t=lt(e.nodeName);if(!ye[t]||Ae[t])throw T("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof c)r=bt("\x3c!----\x3e"),i=r.ownerDocument.importNode(e,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i);else{if(!Pe&&!Le&&!$e&&-1===e.indexOf("<"))return Q&&De?Q.createHTML(e):e;if(r=bt(e),!r)return Pe?null:De?te:""}r&&Re&&mt(r.firstChild);const u=vt(He?e:r);for(;a=u.nextNode();)Et(a),_t(a),a.content instanceof s&&Ct(a.content);if(He)return e;if(Pe){if(je)for(l=ae.call(r.ownerDocument);r.firstChild;)l.appendChild(r.firstChild);else l=r;return(xe.shadowroot||xe.shadowrootmode)&&(l=le.call(o,l,!0)),l}let d=$e?r.outerHTML:r.innerHTML;return $e&&ye["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&S(ee,r.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+d),Le&&m([ue,de,pe],e=>{d=k(d,e," ")}),Q&&De?Q.createHTML(d):d},n.setConfig=function(){pt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ne=!0},n.clearConfig=function(){ct=null,Ne=!1},n.isValidAttribute=function(e,t,n){ct||pt({});const r=lt(e),o=lt(t);return kt(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&v(ce[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=g(ce[e],t);return-1===n?void 0:y(ce[e],n,1)[0]}return b(ce[e])},n.removeHooks=function(e){ce[e]=[]},n.removeAllHooks=function(){ce={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();const ie=["form","input"],ae=["target"],se=["action"];function le(e){return oe.sanitize(e,{ADD_ATTR:ae,FORBID_ATTR:se,FORBID_TAGS:ie,USE_PROFILES:{svg:!1,svgFilters:!1,mathMl:!1,html:!0}})}function ce(e){return o().createElement("div",{dangerouslySetInnerHTML:{__html:le(e)}})}},6836:(e,t,n)=>{"use strict";n(4531)("isConcatSpreadable")},6925:(e,t,n)=>{"use strict";var r=n(9098),o=n(5024),i=n(9989).f;r({target:"Object",stat:!0,forced:Object.defineProperty!==i,sham:!o},{defineProperty:i})},6939:(e,t,n)=>{"use strict";e.exports=n(5813)},7013:(e,t,n)=>{"use strict";var r=n(1780),o=Function.prototype,i=o.apply,a=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?a.bind(i):function(){return a.apply(i,arguments)})},7051:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(2036);const o=e=>{let{buttons:t=[],...n}=e;return{...n,buttons:t.map(r.A)}}},7142:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>A});var r=n(9155),o=n.n(r),i=n(541),a=n(809),s=n(1328),l=n(6343),c=n(1695),u=n(3864),d=n(2475),p=n(4927),f=n(8035);const h=u.Ay.div.withConfig({componentId:"sc-1g1jmh4-0"})(["display:flex;flex-direction:row;position:absolute;bottom:4px;padding-right:12px;right:calc(100% - 12px);background:#fff;background-color:#fff;box-shadow:0px 1px 5px 0px ",";border-radius:7px;pointer-events:auto;",";"],f.Tj.shadowColorDark,e=>!e.$active&&(0,u.AH)(["transform:scale(0);transform-origin:right;opacity:0;pointer-events:none;user-select:none;"])),m=u.Ay.div.withConfig({componentId:"sc-1g1jmh4-1"})(["z-index:1;bottom:2px;transition:all 0.2s ease;display:flex;flex-direction:row;"," ",";"],e=>e.$active&&e.$fullscreenMode&&"z-index: -1;",e=>!e.$active&&(0,u.AH)(["transform:scale(0);transform-origin:right;opacity:0;pointer-events:none;user-select:none;"])),g=u.Ay.div.withConfig({componentId:"sc-1g1jmh4-2"})(["padding:2px;border-radius:7px;z-index:1;display:flex;min-width:max-content;justify-content:center;",";"],d.JP),b=(0,u.Ay)(p.N_).withConfig({componentId:"sc-1g1jmh4-3"})(["color:#757575;margin:0;cursor:pointer;font-size:var(--_kindlychat-font-size-sm);font-weight:500;text-decoration:none;&:hover{text-decoration:underline;}"]),v=u.Ay.div.withConfig({componentId:"sc-1g1jmh4-4"})(["display:flex;padding:2px;align-items:center;justify-content:space-between;"]),y=(0,u.Ay)(p.$n).withConfig({componentId:"sc-1g1jmh4-5"})(["display:flex;position:relative;align-items:center;padding:12px;transition:all 0.15s ease;&:hover{background:#",";background-color:#",";svg path{fill:#000;}&:after{border-left-color:#000;}}"," ",""],f.Tj.grayColor,f.Tj.grayColor,e=>e.$active&&`\n background: #${f.Tj.grayColor};\n background-color: #${f.Tj.grayColor};\n `,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 ");var w=n(3791),x=n(5629),E=n(7182);const k=1e3;function A(e){let{active:t}=e;const[n,u]=(0,r.useState)(!1),{botKey:d,admin:p}=(0,i.d4)(c.$P),{supportedLanguages:f}=(0,s.A)(),{fullscreenMode:A}=(0,i.d4)(c.Od),{inspectorOpen:_}=(0,i.d4)(c.qV),C=(0,i.wA)(),S=(0,r.useCallback)(()=>{C((0,l.uz)())},[C]);return function(){var e,t;const n=(0,E.jL)(),{admin:o}=(0,E.GV)(c.$P),{chatMessages:i}=(0,E.GV)(c.DZ)||[],a=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,w.A)(e=>{n((0,x.y2)(e))},k),l=(0,r.useCallback)(e=>{e.altKey&&"KeyR"===e.code&&a&&s(a)},[a,s]);(0,r.useEffect)(()=>{if(o)return window.addEventListener("keydown",l,!0),()=>window.removeEventListener("keydown",l,!0)},[l,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,C((0,l.L4)(t)),void u(!1);var t}},o().createElement(b,null,e.code.toUpperCase())))),o().createElement(m,{$active:t,$hasInspector:p,$fullscreenMode:A},p&&o().createElement(v,null,o().createElement(y,{onClick:S,title:_?"Close chat inspector":"Open chat inspector"},_?o().createElement(a.V$,null):o().createElement(a.bM,null))),o().createElement(v,null,o().createElement(y,{title:"Restart chat",onClick:()=>{f.length>1?u(!n):C((0,l.zX)(d,!0))},$active:n,$tail:f.length>1},o().createElement(a.fN,{width:15,height:15})))))}},7150:(e,t,n)=>{"use strict";var r=n(7551),o=n(3273),i=n(5116).f,a=n(5148),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return s&&"Window"===r(e)?function(e){try{return i(e)}catch(e){return a(s)}}(e):i(o(e))}},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},7182:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>we,jL:()=>xe,GV:()=>Ee,CU:()=>ke});var r={};n.r(r),n.d(r,{agent:()=>M,alerts:()=>N,announcement:()=>P,auth:()=>D,bot:()=>g.Ay,connection:()=>F,environment:()=>y,inChatNotification:()=>U,inspector:()=>G,local:()=>K,messages:()=>ae,nudge:()=>le,pushMessages:()=>de});var o=n(7251),i=n(541),a=n(5546),s=n.n(a),l=n(5096);const c=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 u=n(99);function d(e,t,n){return(0,u.A)(e,function(e,t){return e.split(".").reverse().reduce((e,n,r)=>0===r?{[n]:t}:{[n]:e},{})}(t,n))}var p=n(9017),f=n(8709),h=n(2628),m=n(2221),g=n(2194),b=n(8679);const v={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"},y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,t=arguments.length>1?arguments[1]:void 0;return t.type===b.$o?{...e,...t.env}:e};var w=n(1897);const x=(e,t)=>{var n;return{...g.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?m.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,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:{...m.bF,...e.position},offsetHeight:e.offsetHeight||"205px",fullscreenMode:e.fullscreenMode||!1,zIndex:e.zIndex||m.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,conversionPageUrl:e.conversion_page_url,whitelabelEnabled:e.whitelabel_enabled}};function E(e){let{botKey:t,settings:n,settings:{context:r,inPlatform:o,admin:i,environment:a,renderedBy:s},initialChatLanguage:l}=e;return{bot:x(n,o),chatbubble:{...w.ue,botKey:t,inPlatform:o,admin:i,renderedBy:s||"REACT",currentLanguage:l},local:{context:r,labels:[]},environment:{...v,VERSION:"2.80.2",...a}}}const k=(e,t,n)=>{const{currentLanguage:r}=t;return n[r]||n.en};var A=n(7437);const _=Object.freeze({WARNING:"WARNING",CRITICAL:"CRITICAL"}),C=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),T=n(6343);const I={[b.A8]:{stopType:b.wk,reducer:"bot"},[b.M_]:{stopType:b.MU,reducer:"agent"}};let O;const L={name:void 0,isTyping:!1,userIsTyping:!1,takenOver:!1,takeoverClosed:!0,requestedHandoverAt:void 0,hasRequestedHandoverAtLeastOnce:!1,supportsAttachment:!1,handoverWaitTimeEstimate:void 0},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 b.tq:return{...e,name:t.data.name||e.name,isTyping:!1};case b.M_:return{...e,isTyping:!0};case b.MU:return{...e,isTyping:!1};case b.c6:return{...e,userIsTyping:!0};case b.we:return{...e,userIsTyping:!1};case b.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),i=Boolean(!t.data.taken_over&&e.takenOver),a=Boolean(t.data.supports_attachment),s=t.data.requested_handover_at,l=t.data.handover_wait_time_estimate,c=t.data.handover_queue_position;return n?{...e,requestedHandoverAt:s,hasRequestedHandoverAtLeastOnce:!0,takenOver:!1,takeoverClosed:!1,handoverWaitTimeEstimate:l,handoverQueuePosition:c}:r?{...e,requestedHandoverAt:void 0,hasRequestedHandoverAtLeastOnce:!0,takenOver:!0,isTyping:!1,supportsAttachment:a,takeoverClosed:!1,handoverWaitTimeEstimate:void 0,handoverQueuePosition:void 0}:i||o?{...e,requestedHandoverAt:void 0,takenOver:!1,isTyping:!1,supportsAttachment:void 0,handoverWaitTimeEstimate:void 0,handoverQueuePosition:void 0}:e}case b.nz:return{...e,requestedHandoverAt:void 0===t.data.requested_handover_at?e.requestedHandoverAt:t.data.requested_handover_at,takeoverClosed:Boolean(t.data.closed)};case b.AQ:return{...e,handoverWaitTimeEstimate:t.data.handover_wait_time_estimate,handoverQueuePosition:t.data.handover_queue_position};case b.MM:return{...e,requestedHandoverAt:void 0,handoverWaitTimeEstimate:void 0,handoverQueuePosition:void 0};case b.CB:return{...e,requestedHandoverAt:L.requestedHandoverAt,hasRequestedHandoverAtLeastOnce:L.hasRequestedHandoverAtLeastOnce};default:return e}},$={showTabNotification:!1,showBubbleNotification:!1},N=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case b.tq:return t.data.from_bot&&"SYSTEM"!==t.data.sender?{...e,showTabNotification:!0}:e;case b.Wh:return{...e,showTabNotification:!0};case b.Zb:return{...e,showBubbleNotification:!0};case b.u2:return{...$};default:return e}},R={show:!1,text:null,url:null,type:null},P=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:R,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case b.YU:return{text:t.payload.text,type:t.payload.alertType,url:t.payload.url,show:!0};case b.nW:return R;default:return e}},j={isAuthenticated:!1,jwt:null,avatarUrl:null,fullName:null},D=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 b.K_:return{...e,isAuthenticated:!0,jwt:t.jwt,avatarUrl:t.avatarUrl,fullName:t.fullName};case b.qQ:return{...e,avatarUrl:t.avatar_url,fullName:t.full_name,email:t.email,phoneNumber:t.phone_number,userId:t.user_id};case b.zZ:return{...e,...j};default:return e}},z={token:null,connected:!0,pusherConnected:!1,connectTriggerConfig:void 0},F=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 b.ny:return{...e,token:t.token};case b.CB:return{...e,token:null};case b._Y:return{...e,connected:!0};case b._N:return{...e,connected:!1};case b.mz:return e;case b.kP:return{...e,pusherConnected:!1};case b.VZ:return"message"===t.event?{...e,pusherConnected:!0}:e;case b.zT:return{...e,connectTriggerConfig:t.triggerConfig};default:return e}},B={notifications:[]},H={content:"",dismissed:!1,once:!1},U=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:B,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case b.vP:return{...e,notifications:[...e.notifications,{...H,id:t.id,buttonText:t.buttonText,buttonHref:t.buttonHref,content:t.content,icon:t.icon,once:t.once}]};case b.MN:{const n=e.notifications.findIndex(e=>e.id===t.id);if(-1===n)return e;const r=[...e.notifications];return r[n]={id:t.id,content:t.content,buttonHref:t.buttonHref,buttonText:t.buttonText,icon:t.icon,once:t.once},{...e,notifications:r}}case b.nG:return{...e,notifications:e.notifications.filter(e=>e.id!==t.id)};case b.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}},V={inspectorOpen:!1,currentMessageId:null},G=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:V,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case b.ye:return{...e,currentMessageId:t.chatMessageId};case b.vK:return{...e,inspectorOpen:!e.inspectorOpen};default:return e}};var W=n(6546);const q={context:{},labels:[]},K=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:q,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case W.s:return{...e,context:{...e.context,...t.context}};case W.T:return{...e,labels:[...new Set([...e.labels,t.label])]};case b.CB:return{...e,labels:[]};default:return e}};var Y=n(9749),X=n.n(Y),Z=n(2921),J=n(7575);const Q=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,J.A)(n)]:r}},{})};var ee=n(310),te=n(8172);const ne={chatMessages:[],buttonClicks:[],attachments:[],messageSentTime:null,lastMessageSeen:null,forms:{}},re=e=>{let{id:t}=e;return t},oe=e=>{let{temporaryId:t,id:n}=e;return e=>{let{temporaryId:r,id:o}=e;return n===o||t===r}},ie=(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]:ne,i=arguments.length>1?arguments[1]:void 0;switch(i.type){case b.tq:{const{chatMessages:e}=o,{data:t}=i;if((0,ee.A)(e)(t)){const n={...t};return n.key||=n.id,d(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 b.z2:{const e=((e,t)=>{const n=(new Date).toISOString();return{id:n,created:n,message:"",event_message:e,from_bot:!0,sender:"SYSTEM",exchange_type:"system-dialogue",system_dialogue_message_type:t}})(i.payload.message,i.payload.system_dialogue_message_type),{chatMessages:t}=o;return{...o,chatMessages:[...t,e]}}case b.CB:return ne;case b.fg:{const{chatbubble_temporary_id:e,id:t}=i.data,n=n=>{var r;let{id:o}=n;return X()(r=[e,t]).call(r,o)},r=e=>({...e,message:i.data.message});return{...o,chatMessages:ie(o.chatMessages,n,r)}}case b.se:return{...o,messageSentTime:i.messageSentTime};case b.pz:{var a;const{created:e,id:t,temporaryId:n}=i,{chatMessages:r}=o,s=null!==(a=null==i?void 0:i.status)&&void 0!==a?a:null,l=r.findIndex(e=>{let{id:t}=e;return t===n});if(l<0)return o;const c=r[l],u={...c,created:e||(null==c?void 0:c.created),id:t||(null==c?void 0:c.id),status:s},d=r.map((e,t)=>t!==l?e:u);return{...o,chatMessages:d}}case b.jE:{const{chatMessageId:e,chatMessageTempId:t,patternContextMatch:n}=i.data,r=n=>{let{id:r}=n;return r===e||r===t},a=e=>({...e,pattern_context_match:n});return{...o,chatMessages:ie(o.chatMessages,r,a)}}case b.Y6:var s;return(0,Z.A)(o.buttonClicks)(i.buttonClick)?{...o,buttonClicks:[...null!==(s=o.buttonClicks)&&void 0!==s?s:[],i.buttonClick]}:o;case b.kU:return{...o,lastMessageSeen:(0,te.A)(i,["id","index"])};case b.Os:return{...o,attachments:[...null!==(e=o.attachments)&&void 0!==e?e:[],...(null===(t=i.data)||void 0===t||null===(n=t.attachments)||void 0===n?void 0:n.map(Q))||[]]};case b.wP:{const e=Q(i.attachment),t=oe(e),n=t=>({...t,...e});return{...o,attachments:ie(o.attachments,t,n)}}case b.tS:{var l;const{attachments:e=[],temporaryChatMessageId:t,chatMessageId:n}=i.data,r=e.map(Q),a=(null!==(l=o.attachments)&&void 0!==l?l:[]).map(e=>{const t=r.find(oe(e));return t?{...e,...t}:e});let s=o.chatMessages;if(t&&n){const e=e=>{let{id:n}=e;return n===t},i=e=>({...e,id:n,attachment_ids:r.map(re)});s=ie(o.chatMessages,e,i)}return{...o,attachments:a,chatMessages:s}}case b.QA:return null!==(r=i.formData)&&void 0!==r&&r.formKey?{...o,forms:{...o.forms,[i.formData.formKey]:i.formData}}:o;default:return o}},se={slug:null,show:!1,isCustom:!1,dialogue:null,webhook:null,content:null,onRendered:null,nudgeLayout:{},nudgeType:m.MK.TEMPLATE,hasBeenDismissed:!1},le=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:se,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case b.X2:return{...e,show:!1,nudgeLayout:{},hasBeenDismissed:!0};case b.wv:return{...e,show:!0,slug:t.slug,dialogue:t.dialogue,webhook:t.webhook,nudgeLayout:t.nudgeLayout,nudgeType:m.MK.TEMPLATE,trackEvent:t.trackEvent,hasBeenDismissed:!1};case b.un:return{...e,show:!0,isCustom:!0,slug:t.slug,content:t.content,nudgeLayout:{},onRendered:t.onRendered,nudgeType:m.MK.CUSTOM,trackEvent:t.trackEvent,hasBeenDismissed:!1};default:return e}};var ce=n(3553);const ue={show:!1,text:null,agent:null,dismissed:!1,type:ce.oI.MESSAGE,dismissedMessages:[],taken_over:!1},de=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ue,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case b.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:ce.oI.HANDOVER}:e;case b.tq:return(0,h.A)()||!t.data.from_bot||"SYSTEM"===t.data.sender||"greeting"===t.data.exchange_type?e:{...e,show:!0,text:t.data.message,type:ce.oI.MESSAGE};case b.l:return{...e,show:!0,text:t.pushMessageText,dismissed:!1,type:t.pushMessageType,dismissedMessages:[...e.dismissedMessages,t.pushMessageTitle]};case b.a_:return{...e,show:!1,dismissed:!0};case b.a1:return ue;default:return e}};var pe=n(5767);const fe=e=>{let{url:t,...n}=e;return(t||"").startsWith("data:")?n:{...n,url:t}},he=e=>e?()=>e=>({bot:{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,hasRequestedHandoverAtLeastOnce:e.agent.hasRequestedHandoverAtLeastOnce},bot:{hasInteraction:e.bot.hasInteraction,isTextDirectionRtl:e.bot.isTextDirectionRtl},chatbubble:{...e.chatbubble,admin:void 0,currentlyPoppedUp:w.ue.currentlyPoppedUp,allGreetingsHideInput:w.ue.allGreetingsHideInput,contactDetailsButton:w.ue.contactDetailsButton,attachments:w.ue.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(fe),messageSentTime:e.messages.messageSentTime,lastMessageSeen:e.messages.lastMessageSeen},pushMessages:{dismissedMessages:e.pushMessages.dismissedMessages}}),me=e=>t=>{let{active:n}=t.chatbubble;const r=(0,h.A)();return e.isFromMultitab||(n=t.chatbubble.active&&(Boolean(e.chatbubble.keep_open&&!r)||Boolean(e.chatbubble.keep_open_mobile&&r))),(0,u.A)(t,{chatbubble:{active:n,wasActiveOnLoad:n}})},ge=e=>{var t;if((0,p.A)(e,"bot.includeDisabledLanguages",!1))return e;const n=null==e||null===(t=e.chatbubble)||void 0===t?void 0:t.currentLanguage,r=l.Z.supportedLanguages.some(e=>{let{code:t}=e;return t===n}),o=l.Z.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,u.A)(e,{chatbubble:{currentLanguage:o.code}})},be=e=>{let{inPlatform:t,botKey:n}=e;return(e=>(t,n)=>{return r=(0,u.A)(t,n),e.reduce((e,t)=>{let[n,r]=t;return d(e,n,r)},r);var r})([["chatbubble.inPlatform",t],["chatbubble.botKey",n]].filter(e=>{let[,t]=e;return void 0!==t}))},ve=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(),i=null!==(r=null==o?void 0:o.chat_live_translation_language_code)&&void 0!==r?r:null==o?void 0:o.chat_language_code,a=null!=i?i:e;return(0,u.A)(t,{chatbubble:{currentLanguage:a},bot:{isTextDirectionRtl:(0,f.A)(a)}})},ye=[e=>t=>n=>n.type===b.tq&&n.data.from_bot?(e.dispatch((0,A.MY)()),(0,A.CM)(),t(n)):t(n),e=>t=>n=>{switch(n.type){case b._N:return((e,t,n,r)=>{const{announcement:o,bot:i,chatbubble:a}=t;if(o.show)return n(r);const s={text:k(0,a,e),alertType:_.WARNING};return n({type:b.YU,payload:s}),n(r)})(C.OFFLINE,e.getState(),t,n);case b._Y:{const{announcement:r,connection:o}=e.getState();return r.show&&t({type:b.nW}),o.connected||e.dispatch((0,A.S4)()),t(n)}default:return t(n)}},e=>t=>async n=>{const{agent:{takenOver:r},chatbubble:{currentLanguage:o}}=e.getState();if(n.type===b.II){const{handoverConversationFeedback:t,preloadFeedbackImages:i}=(0,S.A)(o);r&&!1===n.data.taken_over&&t&&(i("handover_conversation"),e.dispatch((0,T.ob)(t)))}if(n.type!==b.tq)return t(n);const{from_bot:i,sender:a,was_anonymized:s,exchange_type:l,triggered_chat_start:c,chat_language_code:u,chat_live_translation_language_code:d}=n.data,p=d||u;if(n.type===b.tq&&(0,h.A)()&&i&&a!==m.bS.SYSTEM&&e.dispatch({type:b.Zb}),"greeting"===l||c)o!==p&&t({type:b.M2,payload:{code:p}});else if(i&&p&&o!==p){var f;const{text:n}=e.getState().bot,r=null===(f=n.language_switch_notification)||void 0===f?void 0:f[p];r&&e.dispatch((0,T.cC)({content:r,buttonText:void 0,buttonHref:void 0,icon:"language"},m.Jm.LANGUAGE_SWITCH)),t({type:b.M2,payload:{code:p}})}if(i||!s)return t(n);t({type:b.fg,data:n.data})},e=>t=>async n=>{const r=I[n.type];var o;return r&&(clearTimeout(O),O=setTimeout(()=>{e.getState()[r.reducer].isTyping&&t({type:r.stopType})},1e3*((null===(o=n.data)||void 0===o?void 0:o.TTL)||10))),n.type!==b.wk&&n.type!==b.MU||clearTimeout(O),t(n)},()=>e=>t=>{e("payload"in t?t:{...t,payload:{...t}})}];function we(e){let{botKey:t,settings:n,persist:i=!0,initialChatLanguage:a,initialStateModifier:l}=e;const{inPlatform:d}=n,p=!n.inPlatform&&0===n.chatbubble.persist_state_lifespan_seconds,f=`kindly-chat-${t}`,h=he(p),m=c(ge,ve(a),me(n),be({inPlatform:d,botKey:t})),g=i?s()(null,{key:f,slicer:h,merge:m}):e=>e;let b=E({botKey:t,settings:n,initialChatLanguage:a});return l&&(b=(0,u.A)(b,l)),(0,o.U1)({reducer:{...r,feedback:pe.Ay,chatbubble:w.Dw},preloadedState:b,middleware:e=>e().concat(...ye),enhancers:e=>e().concat(g),devTools:!1})}const xe=i.wA.withTypes(),Ee=i.d4.withTypes(),ke=i.Pj.withTypes()},7235:(e,t,n)=>{"use strict";var r=n(262),o=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(o(e)+" is not an object")}},7251:(e,t,n)=>{"use strict";n.d(t,{U1:()=>fe,zD:()=>xe,Z0:()=>Se});var r=Symbol.for("immer-nothing"),o=Symbol.for("immer-draftable"),i=Symbol.for("immer-state");function a(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var s=Object.getPrototypeOf;function l(e){return!!e&&!!e[i]}function c(e){return!!e&&(p(e)||Array.isArray(e)||!!e[o]||!!e.constructor?.[o]||b(e)||v(e))}var u=Object.prototype.constructor.toString(),d=new WeakMap;function p(e){if(!e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);if(null===t||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;if("function"!=typeof n)return!1;let r=d.get(n);return void 0===r&&(r=Function.toString.call(n),d.set(n,r)),r===u}function f(e,t,n=!0){0===h(e)?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function h(e){const t=e[i];return t?t.type_:Array.isArray(e)?1:b(e)?2:v(e)?3:0}function m(e,t){return 2===h(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function g(e,t,n){const r=h(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function b(e){return e instanceof Map}function v(e){return e instanceof Set}function y(e){return e.copy_||e.base_}function w(e,t){if(b(e))return new Map(e);if(v(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=p(e);if(!0===t||"class_only"===t&&!n){const t=Object.getOwnPropertyDescriptors(e);delete t[i];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const o=n[r],i=t[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(s(e),t)}{const t=s(e);if(null!==t&&n)return{...e};const r=Object.create(t);return Object.assign(r,e)}}function x(e,t=!1){return k(e)||l(e)||!c(e)||(h(e)>1&&Object.defineProperties(e,{set:E,add:E,clear:E,delete:E}),Object.freeze(e),t&&Object.values(e).forEach(e=>x(e,!0))),e}var E={value:function(){a(2)}};function k(e){return null===e||"object"!=typeof e||Object.isFrozen(e)}var A,_={};function C(e){const t=_[e];return t||a(0),t}function S(){return A}function T(e,t){t&&(C("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function I(e){O(e),e.drafts_.forEach(M),e.drafts_=null}function O(e){e===A&&(A=e.parent_)}function L(e){return A={drafts_:[],parent_:A,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function M(e){const t=e[i];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function $(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[i].modified_&&(I(t),a(4)),c(e)&&(e=N(t,e),t.parent_||P(t,e)),t.patches_&&C("Patches").generateReplacementPatches_(n[i].base_,e,t.patches_,t.inversePatches_)):e=N(t,n,[]),I(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==r?e:void 0}function N(e,t,n){if(k(t))return t;const r=e.immer_.shouldUseStrictIteration(),o=t[i];if(!o)return f(t,(r,i)=>R(e,o,t,r,i,n),r),t;if(o.scope_!==e)return t;if(!o.modified_)return P(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const t=o.copy_;let i=t,a=!1;3===o.type_&&(i=new Set(t),t.clear(),a=!0),f(i,(r,i)=>R(e,o,t,r,i,n,a),r),P(e,t,!1),n&&e.patches_&&C("Patches").generatePatches_(o,n,e.patches_,e.inversePatches_)}return o.copy_}function R(e,t,n,r,o,i,a){if(null==o)return;if("object"!=typeof o&&!a)return;const s=k(o);if(!s||a){if(l(o)){const a=N(e,o,i&&t&&3!==t.type_&&!m(t.assigned_,r)?i.concat(r):void 0);if(g(n,r,a),!l(a))return;e.canAutoFreeze_=!1}else a&&n.add(o);if(c(o)&&!s){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;if(t&&t.base_&&t.base_[r]===o&&s)return;N(e,o),t&&t.scope_.parent_||"symbol"==typeof r||!(b(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))||P(e,o)}}}function P(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&x(t,n)}var j={get(e,t){if(t===i)return e;const n=y(e);if(!m(n,t))return function(e,t,n){const r=F(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_||!c(r)?r:r===z(e.base_,t)?(H(e),e.copy_[t]=U(r,e)):r},has:(e,t)=>t in y(e),ownKeys:e=>Reflect.ownKeys(y(e)),set(e,t,n){const r=F(y(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=z(y(e),t),s=r?.[i];if(s&&s.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||m(e.base_,t)))return!0;H(e),B(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!==z(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,H(e),B(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=y(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty(){a(11)},getPrototypeOf:e=>s(e.base_),setPrototypeOf(){a(12)}},D={};function z(e,t){const n=e[i];return(n?y(n):e)[t]}function F(e,t){if(!(t in e))return;let n=s(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=s(n)}}function B(e){e.modified_||(e.modified_=!0,e.parent_&&B(e.parent_))}function H(e){e.copy_||(e.copy_=w(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function U(e,t){const n=b(e)?C("MapSet").proxyMap_(e,t):v(e)?C("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:S(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,i=j;n&&(o=[r],i=D);const{revoke:a,proxy:s}=Proxy.revocable(o,i);return r.draft_=s,r.revoke_=a,s}(e,t);return(t?t.scope_:S()).drafts_.push(n),n}function V(e){if(!c(e)||k(e))return e;const t=e[i];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=w(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=w(e,!0);return f(n,(e,t)=>{g(n,e,V(t))},r),t&&(t.finalized_=!1),n}f(j,(e,t)=>{D[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),D.deleteProperty=function(e,t){return D.set.call(this,e,t,void 0)},D.set=function(e,t,n){return j.set.call(this,e[0],t,n,e[0])};var G=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,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 o;if("function"!=typeof t&&a(6),void 0!==n&&"function"!=typeof n&&a(7),c(e)){const r=L(this),i=U(e,void 0);let a=!0;try{o=t(i),a=!1}finally{a?I(r):O(r)}return T(r,n),$(o,r)}if(!e||"object"!=typeof e){if(o=t(e),void 0===o&&(o=e),o===r&&(o=void 0),this.autoFreeze_&&x(o,!0),n){const t=[],r=[];C("Patches").generateReplacementPatches_(e,o,t,r),n(t,r)}return o}a(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),"boolean"==typeof e?.useStrictIteration&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){var t;c(e)||a(8),l(e)&&(l(t=e)||a(10),e=V(t));const n=L(this),r=U(e,void 0);return r[i].isManual_=!0,O(n),r}finishDraft(e,t){const n=e&&e[i];n&&n.isManual_||a(9);const{scope_:r}=n;return T(r,t),$(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}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=C("Patches").applyPatches_;return l(e)?r(e,t):this.produce(e,e=>r(e,t))}},W=G.produce,q=G.setUseStrictIteration.bind(G);function K(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. `}var Y=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),X=()=>Math.random().toString(36).substring(7).split("").join("."),Z={INIT:`@@redux/INIT${X()}`,REPLACE:`@@redux/REPLACE${X()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${X()}`};function J(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 Q(e,t,n){if("function"!=typeof e)throw new Error(K(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(K(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(K(1));return n(Q)(e,t)}let r=e,o=t,i=new Map,a=i,s=0,l=!1;function c(){a===i&&(a=new Map,i.forEach((e,t)=>{a.set(t,e)}))}function u(){if(l)throw new Error(K(3));return o}function d(e){if("function"!=typeof e)throw new Error(K(4));if(l)throw new Error(K(5));let t=!0;c();const n=s++;return a.set(n,e),function(){if(t){if(l)throw new Error(K(6));t=!1,c(),a.delete(n),i=null}}}function p(e){if(!J(e))throw new Error(K(7));if(void 0===e.type)throw new Error(K(8));if("string"!=typeof e.type)throw new Error(K(17));if(l)throw new Error(K(9));try{l=!0,o=r(o,e)}finally{l=!1}return(i=a).forEach(e=>{e()}),e}return p({type:Z.INIT}),{dispatch:p,subscribe:d,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error(K(10));r=e,p({type:Z.REPLACE})},[Y]:function(){const e=d;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(K(11));function n(){const e=t;e.next&&e.next(u())}return n(),{unsubscribe:e(n)}},[Y](){return this}}}}}function ee(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function te(e){return({dispatch:t,getState:n})=>r=>o=>"function"==typeof o?o(t,n,e):r(o)}var ne=te(),re=te,oe=(n(9907),"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?ee:ee.apply(null,arguments)}),ie=("undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__,e=>e&&"function"==typeof e.match);function ae(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error(Oe(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 J(e)&&"type"in e&&"string"==typeof e.type}(t)&&t.type===e,n}var se=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 le(e){return c(e)?W(e,()=>{}):e}function ce(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}var ue=()=>function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:o=!0}=e??{};let i=new se;return t&&("boolean"==typeof t?i.push(ne):i.push(re(t.extraArgument))),i},de=e=>t=>{setTimeout(t,e)},pe=e=>function(t){const{autoBatch:n=!0}=t??{};let r=new se(e);return n&&r.push(((e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,i=!1,a=!1;const s=new Set,l="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:de(10):"callback"===e.type?e.queueNotification:de(e.timeout),c=()=>{a=!1,i&&(i=!1,s.forEach(e=>e()))};return Object.assign({},r,{subscribe(e){const t=r.subscribe(()=>o&&e());return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){try{return o=!e?.meta?.RTK_autoBatch,i=!o,i&&(a||(a=!0,l(c))),r.dispatch(e)}finally{o=!0}}})})("object"==typeof n?n:void 0)),r};function fe(e){const t=ue(),{reducer:n,middleware:r,devTools:o=!0,duplicateMiddlewareCheck:i=!0,preloadedState:a,enhancers:s}=e||{};let l,c;if("function"==typeof n)l=n;else{if(!J(n))throw new Error(Oe(1));l=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 r=Object.keys(n);let o;try{!function(e){Object.keys(e).forEach(t=>{const n=e[t];if(void 0===n(void 0,{type:Z.INIT}))throw new Error(K(12));if(void 0===n(void 0,{type:Z.PROBE_UNKNOWN_ACTION()}))throw new Error(K(13))})}(n)}catch(e){o=e}return function(e={},t){if(o)throw o;let i=!1;const a={};for(let o=0;o<r.length;o++){const s=r[o],l=n[s],c=e[s],u=l(c,t);if(void 0===u)throw t&&t.type,new Error(K(14));a[s]=u,i=i||u!==c}return i=i||r.length!==Object.keys(e).length,i?a:e}}(n)}c="function"==typeof r?r(t):t();let u=ee;o&&(u=oe({trace:!1,..."object"==typeof o&&o}));const d=function(...e){return t=>(n,r)=>{const o=t(n,r);let i=()=>{throw new Error(K(15))};const a={getState:o.getState,dispatch:(e,...t)=>i(e,...t)},s=e.map(e=>e(a));return i=ee(...s)(o.dispatch),{...o,dispatch:i}}}(...c),p=pe(d);return Q(l,a,u(..."function"==typeof s?s(p):p()))}function he(e){const t={},n=[];let r;const o={addCase(e,n){const r="string"==typeof e?e:e.type;if(!r)throw new Error(Oe(28));if(r in t)throw new Error(Oe(29));return t[r]=n,o},addAsyncThunk:(e,r)=>(r.pending&&(t[e.pending.type]=r.pending),r.rejected&&(t[e.rejected.type]=r.rejected),r.fulfilled&&(t[e.fulfilled.type]=r.fulfilled),r.settled&&n.push({matcher:e.settled,reducer:r.settled}),o),addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),o),addDefaultCase:e=>(r=e,o)};return e(o),[t,n,r]}q(!1);function me(...e){return t=>e.some(e=>((e,t)=>ie(e)?e.match(t):e(t))(e,t))}var ge=["name","message","stack","code"],be=class{constructor(e,t){this.payload=e,this.meta=t}_type},ve=class{constructor(e,t){this.payload=e,this.meta=t}_type},ye=e=>{if("object"==typeof e&&null!==e){const t={};for(const n of ge)"string"==typeof e[n]&&(t[n]=e[n]);return t}return{message:String(e)}},we="External signal was aborted",xe=(()=>{function e(e,t,n){const r=ae(e+"/fulfilled",(e,t,n,r)=>({payload:e,meta:{...r||{},arg:n,requestId:t,requestStatus:"fulfilled"}})),o=ae(e+"/pending",(e,t,n)=>({payload:void 0,meta:{...n||{},arg:t,requestId:e,requestStatus:"pending"}})),i=ae(e+"/rejected",(e,t,r,o,i)=>({payload:o,error:(n&&n.serializeError||ye)(e||"Rejected"),meta:{...i||{},arg:r,requestId:t,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===e?.name,condition:"ConditionError"===e?.name}}));return Object.assign(function(e,{signal:a}={}){return(s,l,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()}a&&(a.aborted?h(we):a.addEventListener("abort",()=>h(we),{once:!0}));const m=async function(){let a;try{let i=n?.condition?.(e,{getState:l,extra:c});if(null!==(m=i)&&"object"==typeof m&&"function"==typeof m.then&&(i=await i),!1===i||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)});s(o(u,e,n?.getPendingMeta?.({requestId:u,arg:e},{getState:l,extra:c}))),a=await Promise.race([g,Promise.resolve(t(e,{dispatch:s,getState:l,extra:c,requestId:u,signal:d.signal,abort:h,rejectWithValue:(e,t)=>new be(e,t),fulfillWithValue:(e,t)=>new ve(e,t)})).then(t=>{if(t instanceof be)throw t;return t instanceof ve?r(t.payload,u,e,t.meta):r(t,u,e)})])}catch(t){a=t instanceof be?i(null,u,e,t.payload,t.meta):i(t,u,e)}finally{p&&d.signal.removeEventListener("abort",p)}var m;return n&&!n.dispatchConditionRejection&&i.match(a)&&a.meta.condition||s(a),a}();return Object.assign(m,{abort:h,requestId:u,arg:e,unwrap:()=>m.then(Ee)})}},{pending:o,rejected:i,fulfilled:r,settled:me(i,r),typePrefix:e})}return e.withTypes=()=>e,e})();function Ee(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var ke=Symbol.for("rtk-slice-createasyncthunk");function Ae(e,t){return`${e}/${t}`}function _e({creators:e}={}){const t=e?.asyncThunk?.[ke];return function(e){const{name:n,reducerPath:r=n}=e;if(!n)throw new Error(Oe(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)||{},i=Object.keys(o),a={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){const n="string"==typeof e?e:e.type;if(!n)throw new Error(Oe(12));if(n in a.sliceCaseReducersByType)throw new Error(Oe(13));return a.sliceCaseReducersByType[n]=t,s},addMatcher:(e,t)=>(a.sliceMatchers.push({matcher:e,reducer:t}),s),exposeAction:(e,t)=>(a.actionCreators[e]=t,s),exposeCaseReducer:(e,t)=>(a.sliceCaseReducersByName[e]=t,s)};function u(){const[t={},n=[],r]="function"==typeof e.extraReducers?he(e.extraReducers):[e.extraReducers],o={...t,...a.sliceCaseReducersByType};return function(e){let t,[i,s,u]=he(e=>{for(let t in o)e.addCase(t,o[t]);for(let t of a.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=()=>le(e());else{const n=le(e);t=()=>n}function d(e=t(),n){let r=[i[n.type],...s.filter(({matcher:e})=>e(n)).map(({reducer:e})=>e)];return 0===r.filter(e=>!!e).length&&(r=[u]),r.reduce((e,t)=>{if(t){if(l(e)){const r=t(e,n);return void 0===r?e:r}if(c(e))return W(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 d.getInitialState=t,d}(e.initialState)}i.forEach(r=>{const i=o[r],a={reducerName:r,type:Ae(n,r),createNotation:"function"==typeof e.reducers};!function(e){return"asyncThunk"===e._reducerDefinitionType}(i)?function({type:e,reducerName:t,createNotation:n},r,o){let i,a;if("reducer"in r){if(n&&!function(e){return"reducerWithPrepare"===e._reducerDefinitionType}(r))throw new Error(Oe(17));i=r.reducer,a=r.prepare}else i=r;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?ae(e,a):ae(e))}(a,i,s):function({type:e,reducerName:t},n,r,o){if(!o)throw new Error(Oe(18));const{payloadCreator:i,fulfilled:a,pending:s,rejected:l,settled:c,options:u}=n,d=o(e,i,u);r.exposeAction(t,d),a&&r.addCase(d.fulfilled,a),s&&r.addCase(d.pending,s),l&&r.addCase(d.rejected,l),c&&r.addMatcher(d.settled,c),r.exposeCaseReducer(t,{fulfilled:a||Te,pending:s||Te,rejected:l||Te,settled:c||Te})}(a,i,s,t)});const d=e=>e,p=new Map,f=new WeakMap;let h;function m(e,t){return h||(h=u()),h(e,t)}function g(){return h||(h=u()),h.getInitialState()}function b(t,n=!1){function r(e){let o=e[t];return void 0===o&&n&&(o=ce(f,r,g)),o}function o(t=d){const r=ce(p,n,()=>new WeakMap);return ce(r,t,()=>{const r={};for(const[o,i]of Object.entries(e.selectors??{}))r[o]=Ce(i,t,()=>ce(f,t,g),n);return r})}return{reducerPath:t,getSelectors:o,get selectors(){return o(r)},selectSlice:r}}const v={name:n,reducer:m,actions:a.actionCreators,caseReducers:a.sliceCaseReducersByName,getInitialState:g,...b(r),injectInto(e,{reducerPath:t,...n}={}){const o=t??r;return e.inject({reducerPath:o,reducer:m},n),{...v,...b(o,!0)}}};return v}}function Ce(e,t,n,r){function o(o,...i){let a=t(o);return void 0===a&&r&&(a=n()),e(a,...i)}return o.unwrapped=e,o}var Se=_e();function Te(){}var{assign:Ie}=Object;function Oe(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")},7312:(e,t,n)=>{"use strict";var r=n(6189);n(85),e.exports=r},7313:(e,t)=>{"use strict";t.f=Object.getOwnPropertySymbols},7318:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(9155),o=n.n(r),i=n(824),a=n(8035);const s=n(3864).Ay.div.withConfig({componentId:"sc-xuun63-0"})(["display:flex;flex-direction:row;justify-content:flex-start;align-items:flex-start;font-size:var(--_kindlychat-font-size-sm);"," right:0;left:auto;color:var(--panel-background-white-black-contrast-1743170834);max-height:",";opacity:",";transition:max-height 1s ease,opacity 240ms ease ",";svg path{stroke:var(--panel-background-white-black-contrast-1743170834);}"],e=>{let{$show:t}=e;return t&&"margin-top: 4px;"},e=>{let{$show:t}=e;return t?"120px":"0px"},e=>{let{$show:t}=e;return t?1:0},e=>{let{$show:t}=e;return t?"480ms":0});function l(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,i.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(s,{$show:Boolean(m&&h),id:`error_${d}`},o().createElement(l,{width:16,height:16,color:a.Tj.errorColor}),"string"==typeof m?m:"")}},7325:(e,t,n)=>{"use strict";n.d(t,{jz:()=>A,B:()=>C,UB:()=>w,g4:()=>h,Rh:()=>g,eG:()=>p,mN:()=>L,_e:()=>$,wQ:()=>d,ky:()=>b,VK:()=>M,Mm:()=>E,ZS:()=>x,lQ:()=>y,Ln:()=>_,L4:()=>m,w7:()=>O,zn:()=>T,nI:()=>S,ob:()=>I,i1:()=>f,Z4:()=>v,V$:()=>k});var r=n(6367),o=n(2221),i=n(6464),a=n(4851),s=n(9313),l=n(628),c=n(8679),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:i,chatHasStarted:s}=r().chatbubble,{takenOver:u}=r().agent,{token:d}=r().connection,{PAT_HOST:p}=r().environment;if(n({type:c.M2,payload:{code:e}}),t||!s||u){if(s&&!await n((0,l.et)(`${p}/chatbubble/${o.Ak}/language_switch/`,{method:"POST",body:{languageCode:e},headers:(0,a.A)({token:d}).headers}))){const{currentLanguage:e}=r().chatbubble;n({type:c.M2,payload:{code:e}})}}else n((0,l.zX)(i,!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,l.zX)(r,e)),t(p());try{(0,s.Zf)()}catch(e){console.error(e)}}},v=()=>(e,t)=>{const{chatbubble:{chatHasStarted:n}}=t();n||e({type:c.d$,chatHasStarted:!0})},y=function(){let{source:e="user"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(t,n)=>{const{pushMessages:i,alerts:a,bot:s,nudge:l,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}),i.show&&t({type:c.a_}),l.show&&t({type:c.X2}),(a.showTabNotification||a.showBubbleNotification)&&t({type:c.u2}),t({type:c.kA}),s.welcomePage&&s.welcomePageType!==o.Lb.NONE||t(v())}},w=()=>(e,t)=>{const{active:n,previouslyPoppedUp:r}=t().chatbubble;n||r||(e(y({source:"programmatic"})),e({type:c.hn}))},x=()=>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:i}}=n();(null==i||null===(r=i.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})},A=e=>t=>{t({type:c.FZ,button:e})},_=e=>t=>{0===e.length?t({type:c.Q4}):t({type:c.TF,files:e})},C=()=>e=>{e({type:c.YR})},S=e=>t=>{t({type:c.uA,state:e})},T=e=>t=>{t({type:c.Xu,currentModal:e})},I=e=>(t,n)=>{setTimeout(()=>{const{feedback:{feedbackToSubmit:r},chatbubble:{chatHasStarted:o}}=n();o&&!r&&(t((0,u.WG)({ratingSystem:e.rating_scale.rating_system,triggerType:e.trigger_type,formTitle:e.form_title,step:"RATING_SCALE"})),t(T("FEEDBACK_END_HANDOVER")))},2e3)},O=e=>t=>{t({type:c.XM,isChatFullWindow:e})},L=()=>e=>{e(p()),e(v())},M=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 s=e?await e:null;if(!s){const{connection:{token:e},environment:{PAT_HOST:n}}=r(),l=`${n}/chatbubble/${o.Ak}/privacy/export/${t}`,{headers:c}=(0,a.A)({token:e}),u={method:"GET",headers:{...c,"kindly-chat-version":"2.80.2",[i.B]:(0,i.U)()}};s=await(async(e,t)=>{let n;return fetch(e,{...t,headers:{"Content-Type":"application/json","kindly-chat-version":"2.80.2",[i.B]:(0,i.U)(),...t.headers},body:JSON.stringify(t.body)}).then(e=>{var t;if(!e.ok)throw new Error(e.statusText);const r=e.headers.get("Content-Disposition");return n=null==r||null===(t=r.split(/;(.+)/)[1])||void 0===t?void 0:t.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"),i=document.createElement("a");i.href=r,i.download=n,o.appendChild(i),i.click(),i.remove()})})(l,u)}}},$=function(){let{responsePromise:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async(t,n)=>{const{connection:{token:r},chatbubble:{botKey:i},environment:{PAT_HOST:s}}=n(),u=`${s}/chatbubble/${o.Ak}/privacy/delete/`,p=e?await e:await t((0,l.et)(u,{method:"DELETE",...(0,a.A)({token:r})}));200===(null==p?void 0:p.status)&&(t({type:c.CB,botKey:i,keepOpen:!0}),t(d("DELETED_CHAT")))}}},7354:e=>{e.exports=function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")},e.exports.__esModule=!0,e.exports.default=e.exports},7389:(e,t,n)=>{"use strict";var r=n(5024),o=n(1330),i=n(9989),a=n(7235),s=n(3273),l=n(8364);t.f=r&&!o?Object.defineProperties:function(e,t){a(e);for(var n,r=s(t),o=l(t),c=o.length,u=0;c>u;)i.f(e,n=o[u++],r[n]);return e}},7424:(e,t,n)=>{"use strict";var r=n(4531),o=n(86);r("toPrimitive"),o()},7437:(e,t,n)=>{"use strict";n.d(t,{CM:()=>E,Tk:()=>g,MY:()=>k,S4:()=>y,yh:()=>_,Zk:()=>S,Mk:()=>C,f2:()=>A,uK:()=>w});var r=n(9749),o=n.n(r),i=n(2221),a=n(2921),s=n(4851),l=n(3603),c=n(310),u=n(8679),d=n(628);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!==i.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:w,buttonClicks:E,chatMessages:k,messageSentTime:A}}=t();if(!g||!h)return;const[_]=k.filter(e=>{let{from_bot:t}=e;return t}).slice(-1),[C]=w.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!=_?_:{},null!=C?C:{})||A||f||(new Date).toISOString(),T=await e((0,d.et)(`${y}/chatbubble/${i.Ak}/latest?timestamp=${S}`,{method:"GET",...(0,s.A)({token:g})},{onError:t=>{var n;403===(null===(n=t.response)||void 0===n?void 0:n.status)?(console.warn(`/chatbubble/${i.Ak}/latest returned 403, starting new chat`),e({type:u.tr,error:403}),e((0,d.zX)(m,!0))):console.error(t)}}));if(!T||!T.data)return;const{chatMessages:I,buttonClicks:O=[],takenOver:L,requestedHandoverAt:M,attachments:$,externalHandoverState:N,handoverWaitTimeEstimate:R,handoverQueuePosition:P}=T.data,j=(0,c.A)(k),D=(0,a.A)(E),z=I.filter(j),F=O.map(b).filter(D),B=z.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:a=[]}=(0,l.A)(function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).filter(e=>{let{sender:t,status:n}=e;return t===i.bS.USER||n===i.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}}),a.length>0&&t({type:u.tS,data:{attachments:a}})})($)),e(x(B)),n!==L&&e({type:u.II,data:{taken_over:L,supports_attachment:null==N?void 0:N.supports_attachment,requested_handover_at:M}}),r!==M&&e({type:u.nz,data:{requested_handover_at:M,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=z,U="created",(H||[]).slice().sort((e,t)=>e[U]<t[U]?-1:1)).forEach(t=>{e({type:u.tq,data:t})}),F.forEach(t=>e({type:u.Y6,buttonClick:t}))},w=()=>e=>{if(g("replyTimeoutIds"),f.length)return;const t=setTimeout(()=>e(y()),i.RT.REPLY_TIMEOUT_MS);h.push(t),m=1},x=e=>t=>{if(g("replyTimeoutIds"),0===m)return;if(e||!(m<i.RT.REPLY_TIMEOUT_MAX_ATTEMPTS))return void(e||console.error(`Reply timeout failed more than ${i.RT.REPLY_TIMEOUT_MAX_ATTEMPTS} times`));const n=i.RT.REPLY_TIMEOUT_MS*i.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()),i.RT.HANDOVER_POLL_INTERVAL_MS);p.push(t)}if(p.length){g("handoverRequestPollIntervalIds");const t=setInterval(()=>e(y()),i.RT.HANDOVER_REQUEST_POLL_INTERVAL_MS);p.push(t)}},A=()=>e=>{if(g(),f.length)return;const t=setInterval(()=>e(y()),i.RT.HANDOVER_POLL_INTERVAL_MS);f.push(t)},_=()=>g("handoverPollIntervalIds"),C=()=>e=>{if(p.length)return;const t=setInterval(()=>e(y()),i.RT.HANDOVER_REQUEST_POLL_INTERVAL_MS);p.push(t)},S=()=>g("handoverRequestPollIntervalIds")},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},7501:(e,t,n)=>{"use strict";n(4531)("split")},7524:(e,t,n)=>{"use strict";n(9098)({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:n(5396)})},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}},7542:(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"},7551:(e,t,n)=>{"use strict";var r=n(6100),o=r({}.toString),i=r("".slice);e.exports=function(e){return i(o(e),8,-1)}},7575:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=e=>e.replace(/_\w/g,e=>e[1].toUpperCase())},7603:(e,t,n)=>{"use strict";var r=n(9098),o=n(1005).includes,i=n(1203),a=n(8137);r({target:"Array",proto:!0,forced:i(function(){return!Array(1).includes()})},{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),a("includes")},7752:(e,t,n)=>{"use strict";var r=n(262),o=n(7551),i=n(8655)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[i])?!!t:"RegExp"===o(e))}},7785:(e,t,n)=>{"use strict";var r=n(6100),o=n(908),i=n(2769),a=n(7551),s=n(1139),l=r([].push);e.exports=function(e){if(i(e))return e;if(o(e)){for(var t=e.length,n=[],r=0;r<t;r++){var c=e[r];"string"==typeof c?l(n,c):"number"!=typeof c&&"Number"!==a(c)&&"String"!==a(c)||l(n,s(c))}var u=n.length,d=!0;return function(e,t){if(d)return d=!1,t;if(o(this))return t;for(var r=0;r<u;r++)if(n[r]===e)return t}}}},7935:()=>{},7958:(e,t,n)=>{"use strict";function r(e,t,n){let r=null,o=[];const i=function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];n&&o.push(a),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(...a)},t)};return i.cancel=()=>{r&&clearTimeout(r),o=[]},i}n.d(t,{A:()=>r})},8013:(e,t,n)=>{"use strict";n(4531)("observable")},8035:(e,t,n)=>{"use strict";n.d(t,{AV:()=>a,CM:()=>o,FR:()=>f,HM:()=>h,J:()=>s,Nl:()=>p,Nz:()=>d,Tj:()=>r,jO:()=>c,mb:()=>l,qd:()=>i,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"},i={textColor:"#333333",textColorLight:"#757575"},a={dark:"#0D0D0D",light:"#F2F2F2"},s={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)"},l={tablet:"768px",phone:"500px"},c={minTablet:`(min-width: calc(${l.tablet} + 1px))`,maxTablet:`(max-width: ${l.tablet})`,maxPhone:`(max-width: ${l.phone})`,maxPhoneHeight:"(max-height: 760px)"},u={headerIndex:"15",overlayIndex:"20",contextMenuIndex:"30"},d={width:190},p={icon:"10px",wrapper:"6px"},f={button:"0px 1px 4px 0px rgba(0, 0, 0, 0.08)",card:"0 0 1px 0 rgba(0, 0, 0, 0.24), 0 2px 6px 0 rgba(0, 0, 0, 0.04)",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"}},8043:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var r=n(9155),o=n.n(r),i=n(809),a=n(1346),s=n(3699),l=n(3864),c=n(6052);const u=l.Ay.div.withConfig({componentId:"sc-11sa2m4-0"})(["display:flex;flex-direction:row;padding:8px 12px;gap:8px;margin-top:8px;border-radius:6px;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)")}`}),d=l.Ay.div.withConfig({componentId:"sc-11sa2m4-1"})(["display:flex;flex-direction:column;flex:1;"]),p=l.Ay.div.withConfig({componentId:"sc-11sa2m4-2"})(["font-size:var(--_kindlychat-font-size-p);color:var(--panel-background-white-black-contrast-1743170834);font-weight:450;word-break:break-all;"]),f=l.Ay.div.withConfig({componentId:"sc-11sa2m4-3"})(["font-size:var(--_kindlychat-font-size-sm);color:",";"],e=>{let{theme:t}=e;return(0,c.w5)(t.panelBackground,"rgba(255, 255, 255, 0.8)","rgba(0, 0, 0, 0.8)")}),h=l.Ay.div.withConfig({componentId:"sc-11sa2m4-4"})(["display:flex;flex-direction:row;justify-content:center;align-items:center;padding:6px;& svg{& > path{stroke:",";}}"],e=>{let{theme:t}=e;return(0,c.w5)(t.panelBackground,"rgba(255, 255, 255, 0.8)","rgba(0, 0, 0, 0.8)")}),m=l.Ay.div.withConfig({componentId:"sc-11sa2m4-5"})(["display:flex;flex-direction:row;justify-content:center;align-items:center;font-size:calc(var(--_kindlychat-font-size-m) * 1.25);cursor:pointer;& svg{& > path{stroke:",";}}"],e=>{let{theme:t}=e;return(0,c.w5)(t.panelBackground,"rgba(255, 255, 255, 0.8)","rgba(0, 0, 0, 0.8)")}),g=function(e){let{file:t,canRemove:n=!0,onRemove:r}=e;return o().createElement(u,null,o().createElement(h,null,o().createElement(a.A,{title:"attachment"})),o().createElement(d,null,o().createElement(p,null,t.name),o().createElement(f,null,(0,s.B$)(t.size))),n&&o().createElement(m,{onClick:r},o().createElement(i.US,{width:24,height:24})))}},8089:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",a="[object Function]",s="[object Object]",l=/^\[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[i]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u[a]=u["[object Map]"]=u["[object Number]"]=u[s]=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,w=y&&h.process,x=function(){try{return v&&v.require&&v.require("util").types||w&&w.binding&&w.binding("util")}catch(e){}}(),E=x&&x.isTypedArray,k=Array.prototype,A=Function.prototype,_=Object.prototype,C=g["__core-js_shared__"],S=A.toString,T=_.hasOwnProperty,I=(d=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""))?"Symbol(src)_1."+d:"",O=_.toString,L=S.call(Object),M=RegExp("^"+S.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$=y?g.Buffer:void 0,N=g.Symbol,R=g.Uint8Array,P=($&&$.allocUnsafe,p=Object.getPrototypeOf,f=Object,function(e){return p(f(e))}),j=Object.create,D=_.propertyIsEnumerable,z=k.splice,F=N?N.toStringTag:void 0,B=function(){try{var e=se(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),H=$?$.isBuffer:void 0,U=Math.max,V=Date.now,G=se(g,"Map"),W=se(Object,"create"),q=function(){function e(){}return function(t){if(!ye(t))return{};if(j)return j(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];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 T.call(t,e)?t[e]:void 0},K.prototype.has=function(e){var t=this.__data__;return W?void 0!==t[e]:T.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():z.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=ae(this,e).delete(e);return this.size-=t?1:0,t},X.prototype.get=function(e){return ae(this,e).get(e)},X.prototype.has=function(e){return ae(this,e).has(e)},X.prototype.set=function(e,t){var n=ae(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]":F&&F in Object(e)?function(e){var t=T.call(e,F),n=e[F];try{e[F]=void 0;var r=!0}catch(e){}var o=O.call(e);return r&&(t?e[F]=n:delete e[F]),o}(e):function(e){return O.call(e)}(e)}function re(e){return we(e)&&ne(e)==i}function oe(e,t,n,r,o){e!==t&&function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var s=i[++r];if(!1===t(o[s],s,o))break}}(t,function(i,a){if(o||(o=new Z),ye(i))!function(e,t,n,r,o,i,a){var l=ue(e,n),c=ue(t,n),u=a.get(c);if(u)J(e,n,u);else{var d,p,f,h,m,g=i?i(l,c,n+"",e,t,a):void 0,b=void 0===g;if(b){var v=he(c),y=!v&&ge(c),w=!v&&!y&&xe(c);g=c,v||y||w?he(l)?g=l:we(m=l)&&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}(l):y?(b=!1,g=function(e){return e.slice()}(c)):w?(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(!we(e)||ne(e)!=s)return!1;var t=P(e);if(null===t)return!0;var n=T.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&S.call(n)==L}(c)||fe(c)?(g=l,fe(l)?g=function(e){return function(e,t,n){var r=!n;n||(n={});for(var o=-1,i=t.length;++o<i;){var a=t[o],s=void 0;void 0===s&&(s=e[a]),r?te(n,a,s):Q(n,a,s)}return n}(e,Ee(e))}(l):ye(l)&&!be(l)||(g=function(e){return"function"!=typeof e.constructor||ce(e)?{}:q(P(e))}(c))):b=!1}b&&(a.set(c,g),o(g,c,r,i,a),a.delete(c)),J(e,n,g)}}(e,t,a,n,oe,r,o);else{var l=r?r(ue(e,a),i,a+"",e,t,o):void 0;void 0===l&&(l=i),J(e,a,l)}},Ee)}var ie=B?function(e,t){return B(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:_e;function ae(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 se(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!!I&&I in e}(e))&&(be(e)?M:l).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 le(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||_)}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)}}(ie);function pe(e,t){return e===t||e!=e&&t!=t}var fe=re(function(){return arguments}())?re:function(e){return we(e)&&T.call(e,"callee")&&!D.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==a||"[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 we(e){return null!=e&&"object"==typeof e}var xe=E?function(e){return function(t){return e(t)}}(E):function(e){return we(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),i=!n&&!r&&!o&&xe(e),a=n||r||o||i,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var c in e)!t&&!T.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||le(c,l))||s.push(c);return s}(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&&T.call(e,r))&&n.push(r);return n}(e)}var ke,Ae=(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,i=U(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(a),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,s)}}(e,t,_e),e+"")}(function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,i=r>2?t[2]:void 0;for(o=ke.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(e,t,n){if(!ye(n))return!1;var r=typeof t;return!!("number"==r?me(n)&&le(t,n.length):"string"==r&&t in n)&&pe(n[t],e)}(t[0],t[1],i)&&(o=r<3?void 0:o,r=1),e=Object(e);++n<r;){var a=t[n];a&&ke(e,a,n)}return e}));function _e(e){return e}e.exports=Ae},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:()=>i});var r=n(9749),o=n.n(r);function i(){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,i]=n;return{...e,...o()(t).call(t,r)?{[r]:i}:{}}},{})}},8293:(e,t,n)=>{"use strict";n(4531)("asyncDispose")},8341:(e,t,n)=>{"use strict";n(7603);var r=n(2856);e.exports=r("Array","includes")},8364:(e,t,n)=>{"use strict";var r=n(8600),o=n(9683);e.exports=Object.keys||function(e){return r(e,o)}},8407:(e,t,n)=>{"use strict";var r=n(4904),o=n(2769),i=n(7551),a=n(8655)("toStringTag"),s=Object,l="Arguments"===i(function(){return arguments}());e.exports=r?i: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=s(e),a))?n:l?i(t):"Object"===(r=i(t))&&o(t.callee)?"Arguments":r}},8410:(e,t,n)=>{"use strict";n.d(t,{Y$:()=>y,zV:()=>w,Ay:()=>x});var r=n(9155),o=n.n(r);function i(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"}))}var a=n(3886);const s=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"}))))},l=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"}))},c=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}))};var u=n(6343),d=n(7182),p=n(3864),f=n(2475),h=n(6052);const m=p.Ay.div.withConfig({componentId:"sc-1ilvrss-0"})(["width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;",";margin-bottom:8px;@media (prefers-reduced-motion){animation:none;}"],f.AK),g=p.Ay.div.withConfig({componentId:"sc-1ilvrss-1"})(["max-width:80%;display:flex;"]),b=p.Ay.span.withConfig({componentId:"sc-1ilvrss-2"})(["font-size:var(--_kindlychat-font-size-sm);text-align:center;color:",";& > div{display:inline;}& > svg{font-size:var(--_kindlychat-font-size-m);margin-right:4px;vertical-align:text-top;min-width:20px;display:inline;}"],e=>{let{theme:t}=e;return(0,h.w5)(t.background,"rgba(255, 255, 255, 0.6)","rgba(0, 0, 0, 0.6)")});var v=n(6831);const y={REVOKE_PERMISSION:"revoke-permission"},w={COMPLIANCE:"frontend_system_message_compliance_text"};function x(e){let{chatMessage:t}=e;const n=(0,d.jL)();let r=null;switch(t.system_dialogue_message_type.toLowerCase()){case"start":r=o().createElement(s,{width:16,height:16});break;case"end":r=o().createElement(l,{width:16,height:16});break;case"agent_assigned":r=o().createElement(c,{width:16,height:16});break;case"live_translation_start":case"live_translation_end":r=o().createElement(i,{size:16});break;case w.COMPLIANCE:r=o().createElement(a.A,{size:16})}return o().createElement(m,null,o().createElement(g,{onClick:e=>{const t=e.target;if(!t)return;const r=t.closest("[data-kindly-action]");r&&(e.preventDefault(),r.getAttribute("data-kindly-action")===y.REVOKE_PERMISSION&&n(u.c9))}},o().createElement(b,null,r,(0,v.A)(t.event_message))))}},8411:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(5096);const o=new Set;function i(e){var t,n;const{feedbackSettings:i}=r.Z,a=null==i||null===(t=i[e])||void 0===t?void 0:t.forms.find(e=>"bot_conversation"===e.trigger_type&&e.is_active),s=null==i||null===(n=i[e])||void 0===n?void 0:n.forms.find(e=>"handover_conversation"===e.trigger_type&&e.is_active);return{botConversationFeedback:a,handoverConversationFeedback:s,preloadFeedbackImages:e=>{const t="bot_conversation"===e?a:s;t&&t.rating_scale.edit_labels.forEach(e=>{if(o.has(e.image))return;const t=new Image;t.src=e.image,o.add(t.src)})}}}},8414:(e,t,n)=>{"use strict";n.d(t,{Y_:()=>h,kS:()=>g,fe:()=>m,mR:()=>b,vJ:()=>p,NS:()=>f});var r=n(5096),o=n(4851);const i=(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:i}=e;return{sections:[{title:t[i],description:n[i]},{form:{input:{label:r[i],placeholder:o[i],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:i,carousel_title:a,image_carousel:s,languageCode:l}=e;return{sections:[{title:n[l],description:r[l],buttons:[{label:o[l],value:i[l],button_type:"link",is_active:!0}]},{products:{title:a[l],items:null===(t=s[l])||void 0===t?void 0:t.map(e=>{let{title:t,alt_text:n,description:r,image_url:o,product_url:i,link_text:a,link_url:s,price:l}=e;return{title:t,image:o,linkText:a,linkUrl:s,productUrl:i,altText:n,description:r,price:l}})}}]}})({...e,languageCode:t}):"Text"===n?r=(e=>{let{title:t,body_text:n,link_text:r,link_location:o,languageCode:i}=e;return{sections:[{title:t[i],description:n[i]},{link:{text:r[i],location:o[i]}}]}})({...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(892),s=n(628),l=n(2221),c=n(6464),u=n(8679);const d=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]},p=e=>{let{slug:t,eventType:n,label:i}=e;return async(e,p)=>{if(!t||!n)return;const{supportedLanguages:f}=r.Z,{nudges:h}=p().bot,{currentLanguage:m}=p().chatbubble,g=(e=>{var t,n,r,o,i;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!==(i=null==e?void 0:e.multiple_choice_nudges)&&void 0!==i?i:[]]})(h),b=g.find(e=>e.slug===t&&d(e,f,m));b&&(e({type:u.wX,slug:t}),n!==u.MO&&n!==u.oE||await e((e=>{let{targetNudge:t,eventType:n,label:r,currentLanguage:i}=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,s.et)(`${p}/chatbubble/${l.Ak}/nudge/`,{method:"POST",body:{session_id:(0,c.U)(),nudge_id:t.id,action:n,type:t.type,label:r||null,language_code:i},...(0,o.A)({botKey:d,token:f},{withCurrentUrl:!0,extra:h})}))}})({targetNudge:b,eventType:n,label:i,currentLanguage:m})))}},f=e=>(t,n)=>{const{show:r,slug:o}=n().nudge;r&&t(p({slug:o,eventType:u.MO,label:e}))},h=(e,t)=>(n,r)=>{const{show:o,isCustom:i,slug:a,trackEvent:s}=r().nudge;if(o){if(n({type:u.X2}),i){var l;const e=document.getElementById("kindly-custom-nudge");e&&(null===(l=e.parentNode)||void 0===l||l.removeChild(e))}s&&n(p({slug:a,eventType:e?u.MO:u.X2,label:t}))}},m=e=>{let{nudgeLayout:t,slug:n,trackEvent:o}=e;return(e,a)=>{var s,c,f,h,m,g,b;const{supportedLanguages:v}=r.Z,{nudges:y}=a().bot,{currentLanguage:w}=a().chatbubble,{show:x}=a().pushMessages,E=null==t?void 0:t.language;let k,A=null!==(s=null==t?void 0:t.webhook)&&void 0!==s?s:null,_=null!==(c=null==t?void 0:t.dialogueId)&&void 0!==c?c:null,C=t;const S=v.find(e=>{let{is_primary:t}=e;return t}),T=[...null!==(f=null==y?void 0:y.form_nudges)&&void 0!==f?f:[],...null!==(h=null==y?void 0:y.custom_nudges)&&void 0!==h?h:[],...null!==(m=null==y?void 0:y.product_nudges)&&void 0!==m?m:[],...null!==(g=null==y?void 0:y.text_nudges)&&void 0!==g?g:[],...null!==(b=null==y?void 0:y.multiple_choice_nudges)&&void 0!==b?b:[]],I=E||w||(null==S?void 0:S.code),O=n||t.slug;if(O){var L,M,$,N,R,P,j;if(k=T.filter(e=>e.slug===O)[0],void 0===k)return;if(_=null!==(L=null===(M=k)||void 0===M?void 0:M.dialogue_id)&&void 0!==L?L:_,A=null!==($=null===(N=k)||void 0===N?void 0:N.webhook)&&void 0!==$?$:A,C=i(k,I),C.sections=[...null!==(R=null===(P=C)||void 0===P?void 0:P.sections)&&void 0!==R?R:[],...null!==(j=null==t?void 0:t.sections)&&void 0!==j?j:[]],C.backdrop=null==t?void 0:t.backdrop,!d(k,v,I))return void console.warn("Nudge is disabled for the current language:",I)}else console.error("Please set up a nudge in the platform to get a slug!");o&&e(p({slug:O,eventType:u.wv})),x&&e({type:u.a_}),e({slug:O,type:u.wv,nudgeLayout:C,dialogue:_,webhook:A,nudgeType:l.MK.TEMPLATE,trackEvent:o})}},g=e=>{let{content:t,slug:n,onRendered:r,trackEvent:o}=e;return(e,i)=>{const{show:a}=i().pushMessages;o&&e(p({slug:n,eventType:u.un})),a&&e({type:u.a_}),e({type:u.un,content:t,slug:n,onRendered:r,nudgeType:l.MK.CUSTOM})}},b=e=>{let{nudge:t,languageCode:n}=e;return e=>{const{autopopup_time:r}=t,o=i(t,n);r<=0||(r&&0!==r?setTimeout(()=>e({type:u.wv,nudgeLayout:o,slug:t.slug}),r):e({type:u.wv,nudgeLayout:o,slug:t.slug}))}}},8417:(e,t,n)=>{"use strict";var r,o,i,a=n(1314),s=n(8900),l=n(262),c=n(3999),u=n(701),d=n(3753),p=n(4275),f=n(5241),h="Object already initialized",m=s.TypeError,g=s.WeakMap;if(a||d.state){var b=d.state||(d.state=new g);b.get=b.get,b.has=b.has,b.set=b.set,r=function(e,t){if(b.has(e))throw new m(h);return t.facade=e,b.set(e,t),t},o=function(e){return b.get(e)||{}},i=function(e){return b.has(e)}}else{var v=p("state");f[v]=!0,r=function(e,t){if(u(e,v))throw new m(h);return t.facade=e,c(e,v,t),t},o=function(e){return u(e,v)?e[v]:{}},i=function(e){return u(e,v)}}e.exports={set:r,get:o,has:i,enforce:function(e){return i(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!l(t)||(n=o(t)).type!==e)throw new m("Incompatible receiver, "+e+" required");return n}}}},8448:(e,t,n)=>{"use strict";n(4531)("customMatcher")},8560:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(9749),o=n.n(r),i=n(7182),a=n(5767),s=n(8411);function l(){var e;const{currentLanguage:t}=(0,i.GV)(e=>{let{chatbubble:t}=e;return t}),{takenOver:n,hasRequestedHandoverAtLeastOnce:r}=(0,i.GV)(e=>{let{agent:t}=e;return t}),{feedbackToSubmit:l,feedbacksAlreadyDisplayed:c}=(0,i.GV)(a.CJ),{botConversationFeedback:u,handoverConversationFeedback:d}=(0,s.A)(t),p=null===(e=null==u?void 0:u.allow_bot_feedback_after_handover_feedback)||void 0===e||e,f=u&&!o()(c).call(c,"bot_conversation")&&(!r||p);return{feedbackToDisplay:d&&n?d:f?u:null,feedbackToSubmit:l}}},8600:(e,t,n)=>{"use strict";var r=n(6100),o=n(701),i=n(3273),a=n(1005).indexOf,s=n(5241),l=r([].push);e.exports=function(e,t){var n,r=i(e),c=0,u=[];for(n in r)!o(s,n)&&o(r,n)&&l(u,n);for(;t.length>c;)o(r,n=t[c++])&&(~a(u,n)||l(u,n));return u}},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,i.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)),i=r(n(4399));e.exports=t.default},8655:(e,t,n)=>{"use strict";var r=n(8900),o=n(8141),i=n(701),a=n(1268),s=n(4603),l=n(7460),c=r.Symbol,u=o("wks"),d=l?c.for||c:c&&c.withoutSetter||a;e.exports=function(e){return i(u,e)||(u[e]=s&&i(c,e)?c[e]:d("Symbol."+e)),u[e]}},8679:(e,t,n)=>{"use strict";n.d(t,{M_:()=>r,MU:()=>o,nW:()=>m,YU:()=>h,fg:()=>M,FZ:()=>E.FZ,YR:()=>E.YR,K_:()=>v,A8:()=>y,wk:()=>w,Y6:()=>$,Q4:()=>E.Q4,uS:()=>E.uS,SO:()=>E.SO,_Y:()=>k._Y,zT:()=>k.zT,wX:()=>Y,MO:()=>q,nG:()=>T,_N:()=>k._N,Kd:()=>X,oZ:()=>S,u2:()=>f,X2:()=>V,a_:()=>Z,wM:()=>E.wM,z2:()=>j,II:()=>s,MM:()=>a,nz:()=>i,t1:()=>E.t1,qQ:()=>b,tS:()=>N,E7:()=>x,Os:()=>R,tq:()=>P,ny:()=>k.ny,kA:()=>E.kA,$o:()=>A,jE:()=>I,hn:()=>E.hn,mz:()=>k.mz,kP:()=>k.kP,VZ:()=>k.VZ,MN:()=>C,a1:()=>Q,oE:()=>K,TF:()=>E.TF,XM:()=>E.XM,d$:()=>E.d$,Xu:()=>E.Xu,tr:()=>E.MO,QA:()=>D,uA:()=>E.uA,ye:()=>O,M2:()=>E.M2,kU:()=>z,se:()=>F,nm:()=>E.nm,HW:()=>E.HW,Zb:()=>p,Eg:()=>E.Eg,un:()=>W,vP:()=>_,wv:()=>G,nX:()=>E.nX,l:()=>J,Wh:()=>d,CB:()=>E.CB,vK:()=>L,IM:()=>B,zZ:()=>g,wP:()=>H,pz:()=>U,AQ:()=>u,c6:()=>l,we:()=>c});const r="AGENT_STARTED_TYPING",o="AGENT_STOPPED_TYPING",i="HANDOVER_REQUESTED",a="HANDOVER_CANCELLED",s="HANDOVER",l="USER_STARTED_TYPING",c="USER_STOPPED_TYPING",u="UPDATE_HANDOVER_QUEUE",d="SHOW_TAB_NOTIFICATION",p="SHOW_BUBBLE_NOTIFICATION",f="DISMISS_NOTIFICATIONS",h="ANNOUNCEMENT_SHOW",m="ANNOUNCEMENT_HIDE",g="UNAUTHENTICATED",b="IDENTIFIED",v="AUTHENTICATED",y="BOT_STARTED_TYPING",w="BOT_STOPPED_TYPING",x="MIMIR_STARTED_SEARCHING";var E=n(3313),k=n(9977);const A="ENVIRONMENT_OVERRIDE",_="SHOW_IN_CHAT_NOTIFICATION",C="REPLACE_IN_CHAT_NOTIFICATION",S="DISMISS_IN_CHAT_NOTIFICATION",T="DELETE_IN_CHAT_NOTIFICATION",I="PATTERN_CONTEXT_MATCH",O="SET_INSPECTED_CHAT_MESSAGE",L="TOGGLE_INSPECTOR",M="ANONYMIZED_MESSAGE",$="BUTTON_CLICK",N="MESSAGE_ATTACHMENTS_UPDATED",R="NEW_ATTACHMENTS",P="NEW_MESSAGE",j="NEW_FRONTEND_SYSTEM_MESSAGE",D="SET_FORM",z="SET_LAST_MESSAGE_SEEN",F="SET_MESSAGE_SENT_TIME",B="TRIGGER_DIALOGUE",H="UPDATE_ATTACHMENT",U="UPDATE_CHAT_MESSAGE",V="DISMISS_NUDGE",G="SHOW_NUDGE",W="SHOW_CUSTOM_NUDGE",q="CTA_CLICK",K="SESSION_COMPLETION",Y="COUNT_NUDGE",X="DISCOUNT_NUDGE",Z="DISMISS_PUSH_MESSAGE",J="SHOW_PUSH_MESSAGE",Q="RESET_PUSH_MESSAGES"},8681:(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}},8684:(e,t,n)=>{"use strict";var r=n(3395);n(85),e.exports=r},8696:(e,t,n)=>{"use strict";var r=n(1203),o=n(2769),i=/#|\.prototype\./,a=function(e,t){var n=l[s(e)];return n===u||n!==c&&(o(t)?r(t):!!t)},s=a.normalize=function(e){return String(e).replace(i,".").toLowerCase()},l=a.data={},c=a.NATIVE="N",u=a.POLYFILL="P";e.exports=a},8706:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>Ee});var r=n(9155),o=n.n(r),i=n(541),a=n(3864);const s=a.Ay.div.withConfig({componentId:"sc-104frbp-0"})(["display:block;top:-100vh;left:-100vw;height:200vh;width:200vw;position:fixed;cursor:pointer;transition:all ease 1200ms;background:",";opacity:",";z-index:",";"],e=>{let{$backdrop:t}=e;return t.color||"#000"},e=>{let{$backdrop:t}=e;return t.opacity||.5},e=>{let{$backdrop:t}=e;return t.zIndex||-1});function l(e){let{backdrop:t,onClick:n}=e;return o().createElement(s,{onClick:n,$backdrop:t})}var c=n(2221),u=n(6343),d=n(1695),p=n(1328),f=n(9337),h=n(916);function m(e){let{slug:t}=e;const[n,o]=(0,r.useState)({}),[i,a]=(0,r.useState)(!0),s=(0,h.A)(),{currentLanguageCode:l}=(0,p.A)();return(0,r.useEffect)(()=>{let e={};const n=s.find(e=>e.slug===t);var r;n&&t&&(null!=n&&n.text_blocks?n.text_blocks.map(t=>{const n=(0,f.A)(t,l);e[t.slug]=n.value}):e=(0,f.A)(n,l),a(Boolean(null==n||null===(r=n.text_blocks)||void 0===r?void 0:r.length)),o(e))},[s,l,t]),{textContent:n,hasTextContent:i}}const g=function(){const e=window.kindlyChat.APIRoot,t=(0,r.useRef)(e),{content:n,slug:o,onRendered:a}=(0,i.d4)(d.G0),{currentLanguageCode:s}=(0,p.A)(),{textContent:l,hasTextContent:c}=m({slug:o});return(0,r.useEffect)(()=>{if(document.getElementById("kindly-custom-nudge"))return;const e="function"==typeof n?n(l):n;if(c&&0===Object.keys(l).length)return;const r=document.createElement("div");r.innerHTML=e,t.current.appendChild(r),r.setAttribute("id","kindly-custom-nudge"),"function"==typeof a&&a(r)},[n,s,o,l,a,c]),null};var b=n(1949),v=n.n(b),y=n(809);const w=a.Ay.div.withConfig({componentId:"sc-28ma63-0"})(["margin:24px;display:flex;flex-direction:column;"]);function x(e){let{html:t,slug:n}=e;const{textContent:r}=m({slug:n});return o().createElement(w,null,o().createElement("div",{dangerouslySetInnerHTML:{__html:"function"==typeof t?t(r):t}}))}var E=n(958);const k=a.Ay.div.withConfig({componentId:"sc-1y03ray-0"})(["margin:24px;display:flex;flex-direction:column;"]),A=a.Ay.h2.withConfig({componentId:"sc-1y03ray-1"})(["font-size:var(--_kindlychat-font-size-m);font-weight:500;line-height:26px;margin:0 0 16px 0;"]),_=a.Ay.p.withConfig({componentId:"sc-1y03ray-2"})(["line-height:22px;margin:0px;"]),C=a.Ay.a.withConfig({componentId:"sc-1y03ray-3"})(["line-height:22px;margin:0 0 16px 0;color:#0069ff;"]);var S=n(8679),T=n(8414);function I(e){let{buttons:t,slug:n}=e;const a=(0,i.wA)(),s=t.length>0,l=(0,r.useCallback)(()=>{a((0,T.vJ)({slug:n,eventType:S.MO}))},[a,n]);return s?o().createElement(k,null,t.map((e,t)=>o().createElement(E.A,{button:e,key:`${e.value}-${t}`,isNudge:!0,onClick:l}))):null}function O(e){let{title:t,description:n,link:a,slug:s}=e;const l=(0,i.wA)(),c=(0,r.useCallback)(e=>{e.preventDefault(),l((0,T.vJ)({slug:s,eventType:S.MO})),window.location.href=e.target.getAttribute("href")},[s]);return o().createElement(k,null,t&&o().createElement(A,null,t),n&&o().createElement(_,null,n),(null==a?void 0:a.location)&&(null==a?void 0:a.text)&&o().createElement(C,{href:a.location,onClick:c},a.text))}var L=n(3058);const M=a.Ay.div.withConfig({componentId:"sc-cguh8u-0"})(["margin:24px;display:flex;flex-direction:column;"]),$=a.Ay.div.withConfig({componentId:"sc-cguh8u-1"})(["display:grid;grid-template-columns:1fr 44px;align-items:end;grid-gap:16px;"]),N=a.Ay.div.withConfig({componentId:"sc-cguh8u-2"})(["display:flex;flex-direction:column;"]),R=a.Ay.label.withConfig({componentId:"sc-cguh8u-3"})(["font-size:var(--_kindlychat-font-size-m);line-height:19px;margin-left:8px;margin-bottom:8px;"]),P=a.Ay.input.withConfig({componentId:"sc-cguh8u-4"})(["border:none;padding:14px 16px;border-radius:22px;font-size:var(--_kindlychat-font-size-p);background:rgba(0,0,0,0.08);background-color:rgba(0,0,0,0.08);&:focus{color:#2c2c2c;box-shadow:none;border:none;","}"],L.sF),j=a.Ay.button.withConfig({componentId:"sc-cguh8u-5"})(["cursor:pointer;box-shadow:none;height:44px;width:44px;padding:0;display:flex;align-items:center;justify-content:center;border:none;border-radius:100px;background:",";background-color:",";transition:opacity 0.1s ease-in;"," &:hover{opacity:0.8;}svg{margin-top:2px;margin-right:2px;transition:all 0.2s ease;path{fill:",";}}"],e=>e.theme.buttonBackground,e=>e.theme.buttonBackground,L.sF,e=>e.theme.buttonText);function D(e){let{buttonContent:t}=e;return o().createElement(j,{role:"button",title:t.title,type:"submit"},o().createElement(y.qx,{width:24,height:24}))}function z(e){let{value:t,setValue:n,inputContent:r}=e;const{label:i,type:a,placeholder:s,required:l}=r;return o().createElement(N,null,o().createElement(R,null,i),o().createElement(P,{"aria-label":s,name:i,placeholder:s,type:a||"text",value:t,onChange:e=>n(e.target.value),required:l}))}var F=n(628);function B(e){let{form:t,onNewsletterSubmit:n,slug:a}=e;const s=(0,i.wA)(),{dialogue:l,webhook:c}=(0,i.d4)(d.G0),{primaryLanguageCode:f,currentLanguageCode:h}=(0,p.A)(),[m,g]=(0,r.useState)(""),[b,v]=(0,r.useState)(!1),{success:y}=t;return o().createElement(M,null,b&&y?o().createElement(_,null,y):o().createElement("form",{autoComplete:"off",action:"#",onSubmit:e=>{if(e.preventDefault(),g(""),!m.trim())return!1;if(l&&s((0,u.zh)(l,{openChat:!0,languageCode:h||f})),c){const t={event:e,email:m};s((0,F.et)(c,{method:"POST",body:t}))}if("function"==typeof n)try{n(e,m)}catch(e){console.error(e)}return s((0,u.vJ)({slug:a,eventType:S.MO})),v(!0)}},o().createElement($,null,o().createElement(z,{value:m,setValue:g,inputContent:t.input}),o().createElement(D,{buttonContent:t.button}))))}const H=a.Ay.div.withConfig({componentId:"sc-1cs3brm-0"})(["margin:24px;display:inline-flex;flex-wrap:wrap;gap:8px;"]),U=a.Ay.div.withConfig({componentId:"sc-1cs3brm-1"})(["height:1px;width:100%;background:rgba(0,0,0,0.1);"]);var V=n(9223);function G(e){let{choices:t,slug:n}=e;const r=(0,i.wA)(),{primaryLanguageCode:a,currentLanguageCode:s}=(0,p.A)(),{buttons:l}=t;return o().createElement(o().Fragment,null,o().createElement(U,null),o().createElement(H,null,l.map(e=>{let{text:t,triggerDialogue:i}=e;return o().createElement(V.A,{key:`${t}-${i}`,text:t,onClick:()=>{return e=i,r((0,u.zh)(e,{openChat:!0,languageCode:s||a})),void r((0,T.vJ)({slug:n,eventType:S.MO,label:e}));var e}})})))}var W=n(896);v().shape({id:v().string.isRequired,title:v().string,description:v().string,image:v().string.isRequired,price:v().string});var q=n(8035),K=n(7542);const Y=a.Ay.a.withConfig({componentId:"sc-20xwq1-0"})(["text-decoration:none;color:initial;cursor:pointer;width:100%;"]),X=a.Ay.div.withConfig({componentId:"sc-20xwq1-1"})(["display:flex;padding:2px;flex-direction:column;align-items:flex-start;overflow:hidden;"," @media ","{margin-right:16px;margin-bottom:3px;box-shadow:0px 1px 3px 0px ",";border-radius:8px;overflow:hidden;max-width:201px;&:first-child{margin-left:24px;}}"],L.sF,q.jO.maxPhone,q.Tj.shadowColor),Z=a.Ay.img.withConfig({componentId:"sc-20xwq1-2"})(["width:155px;height:155px;object-fit:cover;border-radius:8px;margin-bottom:8px;@media ","{width:201px;height:201px;border-radius:0;margin-bottom:0;}"],q.jO.maxPhone),J=a.Ay.div.withConfig({componentId:"sc-20xwq1-3"})(["max-width:100%;@media ","{padding:8px 16px;}"],q.jO.maxPhone),Q=(0,a.AH)(["font-size:var(--_kindlychat-font-size-p);margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;"]),ee=a.Ay.a.withConfig({componentId:"sc-20xwq1-4"})([""," color:#333;display:block;margin-top:8px;text-decoration:underline;"],Q),te=a.Ay.button.withConfig({componentId:"sc-20xwq1-5"})([""," padding:6px 0;border:none;cursor:pointer;margin-top:8px;width:100%;display:flex;align-items:center;justify-content:center;border-radius:100px;color:",";background:",";background-color:",";font-family:",";"],Q,e=>e.theme.buttonText,e=>e.theme.buttonBackground,e=>e.theme.buttonBackground,K.m.default),ne=a.Ay.h3.withConfig({componentId:"sc-20xwq1-6"})([""," font-weight:500;"],Q),re=a.Ay.p.withConfig({componentId:"sc-20xwq1-7"})([""," font-weight:400;"],Q),oe=a.Ay.div.withConfig({componentId:"sc-20xwq1-8"})([""," font-weight:500;"],Q);function ie(e){let{to:t,text:n,onClick:r}=e;return t?o().createElement(ee,{onClick:r,href:t},n):o().createElement(te,{onClick:r},n)}const ae=function(e){var t,n,r,i,a,s;let{product:l,onProductClick:c}=e;const u=null!==(t=null==l?void 0:l.image)&&void 0!==t&&t,d=null!==(n=null==l?void 0:l.title)&&void 0!==n&&n,p=null!==(r=null==l?void 0:l.productUrl)&&void 0!==r&&r,f=null!==(i=null==l?void 0:l.description)&&void 0!==i&&i,h=(null==l?void 0:l.price)||!1,m=null!==(a=null==l?void 0:l.linkText)&&void 0!==a&&a,g=null!==(s=null==l?void 0:l.linkUrl)&&void 0!==s&&s;return o().createElement(X,null,o().createElement(Y,{href:p},u&&o().createElement(Z,{src:u,alt:d}),o().createElement(J,null,d&&o().createElement(ne,null,d),f&&o().createElement(re,null,f),h&&o().createElement(oe,null,h))),m&&o().createElement(ie,{to:g,text:m,onClick:e=>{if("function"==typeof c)try{c(e,l)}catch(e){console.error(e)}}}))},se=a.Ay.div.withConfig({componentId:"sc-vfg4fr-0"})(["margin:24px;@media ","{margin:24px 0;}"],q.jO.maxPhone),le=a.Ay.div.withConfig({componentId:"sc-vfg4fr-1"})(["position:relative;overflow:hidden;> div{display:grid;grid-template-columns:1fr 1fr;grid-auto-rows:auto;grid-gap:14px;transform:translate(0);",";}"],e=>e.active&&"\n position: relative;\n width: 1000%;\n display: flex;\n grid-gap: 0px;\n "),ce=a.Ay.h2.withConfig({componentId:"sc-vfg4fr-2"})(["font-size:var(--_kindlychat-font-size-m);font-weight:500;line-height:26px;margin:16px 0px;@media ","{margin:16px 24px;}"],q.jO.maxPhone);var ue=n(112);const de=function(e){var t,n;let{section:i,onProductClick:a}=e;const{width:s}=(()=>{const[e,t]=(0,r.useState)({width:void 0,height:void 0});return(0,r.useEffect)(()=>{function e(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",e),e(),()=>window.removeEventListener("resize",e)},[]),e})(),l=parseInt(q.mb.phone.replace("px",""),10),c=null!==(t=null==i?void 0:i.items)&&void 0!==t?t:[],u=null!==(n=null==i?void 0:i.title)&&void 0!==n&&n,{setIndex:d,imageIndex:p,carouselPosition:f}=(e=>{let{windowWidth:t,phoneWidth:n,ignoreDesktop:o=!0}=e;const[i,a]=(0,r.useState)(0),[s,l]=(0,r.useState)(0);return(0,r.useEffect)(()=>{t>=n&&o&&l(0)},[t,n,s,o]),{setIndex:(0,r.useCallback)((e,r)=>{if(t>=n)return;if(e<0||e>=r.length)return;const o=-217*e;a(e),l(o)},[t,n]),imageIndex:i,carouselPosition:s}})({windowWidth:s,phoneWidth:l}),{handleTouchStart:h,handleTouchMove:m,handleTouchEnd:g}=(0,W.A)({carousel:c,index:p,setIndex:d});return o().createElement(se,null,u&&o().createElement(ce,null,u),o().createElement(le,{active:s<l},o().createElement(ue.A,{carouselPosition:f,onTouchStart:h,onTouchMove:m,onTouchEnd:g},c.map(e=>o().createElement(ae,{product:e,key:e.id,onProductClick:a})))))},pe=e=>e||{location:"",text:""};function fe(e){var t,n;let{section:r,slug:a,onProductClick:s,onNewsletterSubmit:l}=e;const c=(0,i.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 o().createElement(o().Fragment,null,(u||d||g)&&o().createElement(O,{title:u,description:d,link:pe(g),slug:a}),p&&o().createElement(I,{buttons:p,slug:a}),h&&o().createElement(G,{choices:h,slug:a}),f&&o().createElement(de,{section:f,onProductClick:(e,t)=>{if(null!=t&&t.productUrl?c((0,T.vJ)({slug:a,eventType:S.MO,label:t.productUrl})):console.warn("Could not track cta click with label:",t.productUrl),"function"==typeof s)try{s(e,t)}catch(e){console.error(e)}}}),m&&o().createElement(B,{form:m,onNewsletterSubmit:l,slug:a}),b&&o().createElement(x,{html:b,slug:a}))}function he(e){var t;let{layout:n,slug:r,onProductClick:i,onNewsletterSubmit:a}=e;return(null!==(t=null==n?void 0:n.sections)&&void 0!==t?t:[]).map((e,t)=>o().createElement(fe,{key:`section-${t}`,section:e,slug:null!=r?r:null,onProductClick:i,onNewsletterSubmit:a}))}var me=n(2475),ge=n(4927);const be=a.Ay.div.withConfig({componentId:"sc-1k0o2t4-0"})(["right:20px;bottom:",";z-index:10;position:fixed;border-radius:14px;background:#fff;background-color:#fff;box-shadow:0 3px 15px 1px ",";pointer-events:auto;",";",";@media ","{",";z-index:16;box-shadow:0 -3px 15px 1px ",";}"],e=>{let{bubbleHidden:t}=e;return t?"30px":"100px"},q.Tj.shadowColor,me.JP,e=>{let{theme:t}=e;return t.customFont&&`font-family: ${t.customFont}`},q.jO.maxPhone,e=>{let{modal:t}=e;return!t&&"\n left: 0px;\n right: 0px;\n bottom: 0px;\n border-radius: 14px 14px 0 0;"},q.Tj.shadowColor),ve=a.Ay.div.withConfig({componentId:"sc-1k0o2t4-1"})(["position:relative;padding:0px;max-width:380px;width:100%;max-height:calc(100vh - 150px);overflow-y:auto;",";@media ","{min-width:380px;}@media ","{min-width:100%;}"],e=>{let{modal:t}=e;return t&&"box-sizing: border-box"},q.jO.minTablet,q.jO.maxPhone),ye=(0,a.Ay)(ge.$n).withConfig({componentId:"sc-1k0o2t4-2"})(["top:8px;right:8px;z-index:15;display:flex;padding:0;border-radius:100px;position:absolute;&:hover{opacity:0.8;}svg path{stroke:black;}@media ","{",";}"],q.jO.maxPhone,e=>{let{modal:t}=e;return t?"top: 2px; right: 0;":"top: 8px; right: 8px;"}),we=a.Ay.div.withConfig({componentId:"sc-1k0o2t4-3"})(["position:absolute;background:#fff;width:100%;height:100%;left:0;right:0;top:0;bottom:0;border-radius:14px;@media ","{border-radius:",";}&:before{content:'';width:50px;height:calc(100% - 8px);background:",";position:absolute;z-index:-1;top:4px;left:-4px;border-radius:25px;@media ","{width:calc(100% - 8px);height:50px;top:-4px;left:4px;}}"],q.jO.maxPhone,e=>{let{modal:t}=e;return t?"14px":"14px 14px 0 0"},e=>{let{theme:t}=e;return t.bubbleButtonBackground||t.buttonBackground},q.jO.maxPhone),xe=function(e){let{bubbleHidden:t,show:n,slug:r,layout:i,onDismiss:a,onProductClick:s,onNewsletterSubmit:l}=e;return o().createElement(be,{bubbleHidden:t,"aria-hidden":n?"false":"true","data-testid":"nudge-container","data-cy":"nudge-container","data-story":"NudgeContainer"},o().createElement(we,null),o().createElement(ye,{"aria-label":"Dismiss pushMessage",title:"Dismiss pushMessage",onClick:a,type:"button","data-testid":"close-nudge-button","data-cy":"close-nudge-button"},o().createElement(y.US,{width:25,height:25})),o().createElement(ve,null,o().createElement(he,{layout:i,slug:r,onProductClick:s,onNewsletterSubmit:l})))};function Ee(e){var t;let{hidden:n,layout:r,onDismiss:a,onProductClick:s,onNewsletterSubmit:p}=e;const{show:f,nudgeType:h,slug:m}=(0,i.d4)(d.G0),b=null!==(t=null==r?void 0:r.backdrop)&&void 0!==t&&t,v=(0,i.wA)(),y=e=>{if(e.stopPropagation(),v((0,u.Y_)()),"function"==typeof a)try{a(e)}catch(e){console.error(e)}};return o().createElement(o().Fragment,null,b&&o().createElement(l,{backdrop:b,onClick:y}),h===c.MK.TEMPLATE&&o().createElement(xe,{show:f,layout:r,slug:m,onDismiss:y,onProductClick:s,onNewsletterSubmit:p,bubbleHidden:n}),h===c.MK.CUSTOM&&o().createElement(g,null))}},8709:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(9749),o=n.n(r);const i=e=>{var t;if(!e)return!1;e=e.toLowerCase();try{const t=new Intl.Locale(e);if("function"==typeof t.getTextInfo)return"rtl"===t.getTextInfo().direction}catch{}return o()(t=["ar","he","fa","ur","ps","dv","syr","yi"]).call(t,e.split("-")[0])}},8749:(e,t,n)=>{"use strict";n(4531)("hasInstance")},8780:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=e=>0===Object.keys(e).length},8789:(e,t,n)=>{"use strict";n.d(t,{H2:()=>l,H3:()=>c,H5:()=>u,cp:()=>d,fz:()=>a,mt:()=>s});var r=n(3864),o=n(7542),i=n(8035);const a=r.Ay.p.withConfig({componentId:"sc-128z1ys-0"})(["color:",";font-size:var(--_kindlychat-font-size-p);font-weight:normal;line-height:20px;font-family:",";word-break:normal;overflow-wrap:anywhere;"],i.Tj.darkColor,o.m.default),s=(0,r.Ay)(a).withConfig({componentId:"sc-128z1ys-1"})(["font-size:var(--_kindlychat-font-size-xs);opacity:0.6;"]),l=r.Ay.h2.withConfig({componentId:"sc-128z1ys-2"})(["color:",";font-size:var(--_kindlychat-font-size-h2);font-weight:normal;margin:0 0 30px;line-height:30px;font-family:",";"],i.Tj.darkColor,o.m.default),c=r.Ay.h3.withConfig({componentId:"sc-128z1ys-3"})(["color:",";font-size:var(--_kindlychat-font-size-h3);font-weight:normal;line-height:30px;margin:0 0 15px;font-family:",";"],i.Tj.darkColor,o.m.default),u=(r.Ay.h4.withConfig({componentId:"sc-128z1ys-4"})(["color:",";font-size:var(--_kindlychat-font-size-h4);font-weight:normal;margin:0 0 10px;font-family:",";"],i.Tj.darkColor,o.m.default),r.Ay.h5.withConfig({componentId:"sc-128z1ys-5"})(["color:",";font-size:var(--_kindlychat-font-size-m);font-weight:normal;margin:0 0 10px;line-height:24px;font-family:",";"],i.Tj.darkColor,o.m.default)),d=(r.Ay.h6.withConfig({componentId:"sc-128z1ys-6"})(["color:",";font-size:var(--font-size-h6);font-weight:normal;margin:0 0 10px;font-family:",";"],i.Tj.darkColor,o.m.default),r.Ay.span.withConfig({componentId:"sc-128z1ys-7"})(["color:",";font-family:",";opacity:1;a{color:",";text-decoration:none;&:hover,&:focus,&:active,&:visited{color:",";}}"],i.Tj.primaryColor,o.m.KindlySans,i.Tj.primaryColor,i.Tj.primaryColor))},8803:(e,t,n)=>{var r=n(4665);e.exports=function(e,t,n){return e.set(r(e,t),n),n},e.exports.__esModule=!0,e.exports.default=e.exports},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")()},9017:(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}},9098:(e,t,n)=>{"use strict";var r=n(8900),o=n(7013),i=n(9344),a=n(2769),s=n(4543).f,l=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,i){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,i)}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,w,x=e.target,E=e.global,k=e.stat,A=e.proto,_=E?r:k?r[x]:r[x]&&r[x].prototype,C=E?c:c[x]||d(c,x,{})[x],S=C.prototype;for(m in t)o=!(n=l(E?m:x+(k?".":"#")+m,e.forced))&&_&&p(_,m),b=C[m],o&&(v=e.dontCallGetSet?(w=s(_,m))&&w.value:_[m]),g=o&&v?v:t[m],(n||A||typeof b!=typeof g)&&(y=e.bind&&o?u(g,r):e.wrap&&o?f(g):A&&a(g)?i(g):g,(e.sham||g&&g.sham||b&&b.sham)&&d(y,"sham",!0),d(C,m,y),A&&(p(c,h=x+"Prototype")||d(c,h,{}),d(c[h],m,g),e.real&&S&&(n||!S[m])&&d(S,m,g)))}},9155:t=>{"use strict";t.exports=e},9205:(e,t,n)=>{"use strict";var r=n(9098),o=n(8900),i=n(4713),a=n(6100),s=n(4871),l=n(5024),c=n(4603),u=n(1203),d=n(701),p=n(4317),f=n(7235),h=n(3273),m=n(5341),g=n(1139),b=n(480),v=n(5780),y=n(8364),w=n(5116),x=n(7150),E=n(7313),k=n(4543),A=n(9989),_=n(7389),C=n(7161),S=n(3508),T=n(4358),I=n(8141),O=n(4275),L=n(5241),M=n(1268),$=n(8655),N=n(1355),R=n(4531),P=n(86),j=n(1811),D=n(8417),z=n(9809).forEach,F=O("hidden"),B="Symbol",H="prototype",U=D.set,V=D.getterFor(B),G=Object[H],W=o.Symbol,q=W&&W[H],K=o.RangeError,Y=o.TypeError,X=o.QObject,Z=k.f,J=A.f,Q=x.f,ee=C.f,te=a([].push),ne=I("symbols"),re=I("op-symbols"),oe=I("wks"),ie=!X||!X[H]||!X[H].findChild,ae=function(e,t,n){var r=Z(G,t);r&&delete G[t],J(e,t,n),r&&e!==G&&J(G,t,r)},se=l&&u(function(){return 7!==v(J({},"a",{get:function(){return J(this,"a",{value:7}).a}})).a})?ae:J,le=function(e,t){var n=ne[e]=v(q);return U(n,{type:B,tag:e,description:t}),l||(n.description=t),n},ce=function(e,t,n){e===G&&ce(re,t,n),f(e);var r=m(t);return f(n),d(ne,r)?(n.enumerable?(d(e,F)&&e[F][r]&&(e[F][r]=!1),n=v(n,{enumerable:b(0,!1)})):(d(e,F)||J(e,F,b(1,v(null))),e[F][r]=!0),se(e,r,n)):J(e,r,n)},ue=function(e,t){f(e);var n=h(t),r=y(n).concat(he(n));return z(r,function(t){l&&!i(de,n,t)||ce(e,t,n[t])}),e},de=function(e){var t=m(e),n=i(ee,this,t);return!(this===G&&d(ne,t)&&!d(re,t))&&(!(n||!d(this,t)||!d(ne,t)||d(this,F)&&this[F][t])||n)},pe=function(e,t){var n=h(e),r=m(t);if(n!==G||!d(ne,r)||d(re,r)){var o=Z(n,r);return!o||!d(ne,r)||d(n,F)&&n[F][r]||(o.enumerable=!0),o}},fe=function(e){var t=Q(h(e)),n=[];return z(t,function(e){d(ne,e)||d(L,e)||te(n,e)}),n},he=function(e){var t=e===G,n=Q(t?re:h(e)),r=[];return z(n,function(e){!d(ne,e)||t&&!d(G,e)||te(r,ne[e])}),r};c||(S(q=(W=function(){if(p(q,this))throw new Y("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?g(arguments[0]):void 0,t=M(e),n=function(e){var r=void 0===this?o:this;r===G&&i(n,re,e),d(r,F)&&d(r[F],t)&&(r[F][t]=!1);var a=b(1,e);try{se(r,t,a)}catch(e){if(!(e instanceof K))throw e;ae(r,t,a)}};return l&&ie&&se(G,t,{configurable:!0,set:n}),le(t,e)})[H],"toString",function(){return V(this).tag}),S(W,"withoutSetter",function(e){return le(M(e),e)}),C.f=de,A.f=ce,_.f=ue,k.f=pe,w.f=x.f=fe,E.f=he,N.f=function(e){return le($(e),e)},l&&(T(q,"description",{configurable:!0,get:function(){return V(this).description}}),s||S(G,"propertyIsEnumerable",de,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:W}),z(y(oe),function(e){R(e)}),r({target:B,stat:!0,forced:!c},{useSetter:function(){ie=!0},useSimple:function(){ie=!1}}),r({target:"Object",stat:!0,forced:!c,sham:!l},{create:function(e,t){return void 0===t?v(e):ue(v(e),t)},defineProperty:ce,defineProperties:ue,getOwnPropertyDescriptor:pe}),r({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:fe}),P(),j(W,B),L[F]=!0},9223:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(9155),o=n.n(r),i=n(5381),a=n(3169),s=n(5545);function l(e,t){const{href:n,target:r,children:l,icon:c,text:u,loading:d=!1,isCheckbox:p=!1,type:f="button",onClick:h=i.A,cy:m,isSecondaryButton:g=!1,flat:b,disabled:v,selected:y,...w}=e,x=e=>{d?e.preventDefault():h(e)};return n?o().createElement(a.rK,Object.assign({ref:t,href:n,target:r,$isCheckbox:p,onClick:x,$loading:d,$isSecondaryButton:g},w),d?o().createElement(s.A,{flat:w.flat,isCheckbox:p,loading:d}):o().createElement(a.EE,null,o().createElement(a.T3,null,l||u),o().createElement(a.Tu,null,c))):o().createElement(a.Ef,Object.assign({ref:t,onClick:x,$isCheckbox:p,type:f,$loading:d,"data-testid":m,$isSecondaryButton:g,$flat:b,$disabled:v,$selected:y},w),d?o().createElement(s.A,{flat:w.flat,isCheckbox:p,loading:d}):o().createElement(a.EE,null,o().createElement(a.T3,null,l||u),o().createElement(a.Tu,null,c)))}const c=o().forwardRef(l);c.displayName="Button";const u=c},9239:(e,t,n)=>{"use strict";n(9205),n(2002),n(960),n(1210),n(5785)},9258:(e,t,n)=>{"use strict";var r=n(4713),o=n(2769),i=n(262),a=TypeError;e.exports=function(e,t){var n,s;if("string"===t&&o(n=e.toString)&&!i(s=r(n,e)))return s;if(o(n=e.valueOf)&&!i(s=r(n,e)))return s;if("string"!==t&&o(n=e.toString)&&!i(s=r(n,e)))return s;throw new a("Can't convert object to primitive value")}},9272:(e,t,n)=>{"use strict";n.d(t,{KN:()=>o,ZF:()=>i,cJ:()=>r,k1:()=>a});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"},i={PATTERN:"pattern",REQUIRED:"required",MAX_LENGTH:"max_length",MIN_LENGTH:"min_length",min:"min",max:"max"},a={CUSTOM:"custom",BROWSER:"browser"}},9292:(e,t,n)=>{"use strict";n.d(t,{Ak:()=>r,W$:()=>o,dT:()=>s,fl:()=>a,gH:()=>i});const r="v2",o=Object.freeze(["agent","alerts","bot","chatbubble","nudge"]),i="chat-group",a="message-block",s="typing-indicator"},9313:(e,t,n)=>{"use strict";n.d(t,{B1:()=>A,Kh:()=>E,LA:()=>d,Vq:()=>c,Xs:()=>k,Zf:()=>C,_N:()=>i,_Y:()=>o,al:()=>_});var r=n(99);const o="PUSHER-REDUX/CONNECTED",i="PUSHER-REDUX/DISCONNECTED",a="PUSHER-REDUX/CONNECTING",s="PUSHER-REDUX/UNAVAILABLE",l="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:i}))}function y(){var e;null===(e=u.store)||void 0===e||e.dispatch(p({actionType:a}))}function w(){var e;null===(e=u.store)||void 0===e||e.dispatch(p({actionType:s}))}function x(){var e;null===(e=u.store)||void 0===e||e.dispatch(p({actionType:l}))}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",w),u.socket.connection.bind("failed",x)}function A(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 i=o=>{var i;null===(i=u.store)||void 0===i||i.dispatch(p({actionType:n,channelName:e,eventName:t,data:o,additionalParams:r}))};u.subscriptions[e][t][n]=i,o.bind(t,i)}})}function _(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 i=o[t];if(!i)return void console.error(`Not subscribed event '${t}' from '${e}'`);const a=i[n];a?(r.unbind(t,a),delete i[n]):console.error(`Handler for ${n} not found for event '${t}' from '${e}'`)})}function C(){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(7551),o=n(6100);e.exports=function(e){if("Function"===r(e))return o(e)}},9359:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(5096);function o(e){const{access_request_text:t,acceptance_text:n,revoke_permission_text:o,description_text_html:i,enabled:a,require_agreement:s,button_text:l}=r.Z.complianceSettings[e]||{};return{isEnabled:a,accessRequestText:t,acceptanceText:n,revokePermissionText:o,descriptionTextHtml:i,requireAgreement:s,buttonText:l}}},9416:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(9155),o=n.n(r),i=n(824),a=n(3864),s=n(8035),l=n(6052);const c=a.Ay.div.withConfig({componentId:"sc-1lavw6k-0"})(["position:absolute;right:8px;font-size:var(--_kindlychat-font-size-sm);color:",";",""],e=>{let{theme:t}=e;return(0,l.w5)(t.panelBackground,"#FFFFFF",s.qd.textColorLight)},e=>{let{$position:t}=e;return"top"===t?(0,a.AH)(["top:4px;right:16px;"]):"bottom"===t?(0,a.AH)(["top:auto;bottom:4px;right:16px;"]):(0,a.AH)(["right:8px;top:50%;transform:translateY(-50%);"])});function u(e){let{fieldName:t,maxLength:n,control:r,position:a="middle"}=e;const s=(0,i.FH)({control:r,name:t});return o().createElement(c,{$position:a},`${(null==s?void 0:s.length)||0}/${n}`)}},9437:(e,t,n)=>{"use strict";n(9098)({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:n(3678)})},9504:()=>{},9514:e=>{"use strict";e.exports=t},9559:(e,t,n)=>{"use strict";var r=n(4904),o=n(8407);e.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},9619:(e,t,n)=>{"use strict";var r=n(8900),o=n(262),i=r.document,a=o(i)&&o(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},9662:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(9155),o=n.n(r),i=n(3755),a=n(7318),s=n(587),l=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,s.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:w,...x}=d&&t?d(t,b):{};return o().createElement(o().Fragment,null,o().createElement(i.hl,{htmlFor:p},o().createElement(i.eo,Object.assign({ref:y,name:t,type:m,id:p,value:f},(0,c.NR)(b),x&&{...x},{onChange:e=>{null==w||w(e),v(e)}},g)),o().createElement(i.r6,{$inputType:m,$isForm:!!d},o().createElement(i.FC,{$inputType:m,viewBox:"0 0 24 24"},m===l.cJ.CHECKBOX?o().createElement("polyline",{points:"20 6 9 17 4 12"}):o().createElement("circle",{cx:"12",cy:"13",r:"5"}))),n&&o().createElement(i.Ko,{$isForm:!!d},n)),h&&t&&o().createElement(a.A,{name:t,control:r}))}},9665:(e,t,n)=>{"use strict";var r=n(5024),o=n(1203),i=n(9619);e.exports=!r&&!o(function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})},9683:e=>{"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},9687:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(2221);function o(){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])===r.sl.IMAGE?r.sl.IMAGE:(null==t?void 0:t[0])===r.sl.VIDEO?r.sl.VIDEO:(null==t?void 0:t[1])===r.sl.PDF?r.sl.PDF:t.slice(-1)[0]}},9749:(e,t,n)=>{e.exports=n(1726)},9809:(e,t,n)=>{"use strict";var r=n(4572),o=n(6100),i=n(1395),a=n(2137),s=n(8130),l=n(4417),c=o([].push),u=function(e){var t=1===e,n=2===e,o=3===e,u=4===e,d=6===e,p=7===e,f=5===e||d;return function(h,m,g,b){for(var v,y,w=a(h),x=i(w),E=s(x),k=r(m,g),A=0,_=b||l,C=t?_(h,E):n||p?_(h,0):void 0;E>A;A++)if((f||A in x)&&(y=k(v=x[A],A,w),e))if(t)C[A]=y;else if(y)switch(e){case 3:return!0;case 5:return v;case 6:return A;case 2:c(C,v)}else switch(e){case 4:return!1;case 7:c(C,v)}return d?-1:o||u?u:C}};e.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)}},9828:(e,t,n)=>{"use strict";var r=n(3273),o=n(8137),i=n(6625),a=n(8417),s=n(9989).f,l=n(164),c=n(877),u=n(4871),d=n(5024),p="Array Iterator",f=a.set,h=a.getterFor(p);e.exports=l(Array,"Array",function(e,t){f(this,{type:p,target:r(e),index:0,kind:t})},function(){var e=h(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,c(void 0,!0);switch(e.kind){case"keys":return c(n,!1);case"values":return c(t[n],!1)}return c([n,t[n]],!1)},"values");var m=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!u&&d&&"values"!==m.name)try{s(m,"name",{value:"values"})}catch(e){}},9850:(e,t,n)=>{"use strict";n(4531)("matchAll")},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 i(){throw new Error("clearTimeout has not been defined")}function a(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:i}catch(e){n=i}}();var s,l=[],c=!1,u=-1;function d(){c&&s&&(c=!1,s.length?l=s.concat(l):u=-1,l.length&&p())}function p(){if(!c){var e=a(d);c=!0;for(var t=l.length;t;){for(s=l,l=[];++u<t;)s&&s[u].run();u=-1,t=l.length}s=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!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];l.push(new f(e,t)),1!==l.length||c||a(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:()=>l});var r=n(9155),o=n.n(r),i=n(9662),a=n(3755);function s(e){let{name:t,control:n,options:r,validators:s,register:l,inputType:c}=e;return o().createElement(o().Fragment,null,r.map((e,u)=>o().createElement(a.B2,{key:`${e.value}_${u}`},o().createElement(i.A,{inputType:c,validators:s,register:l,value:e.value,label:e.label,id:e.id,name:t,control:n,isLast:u===r.length-1}))))}const l=o().memo(s)},9918:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const r=new Map,o=(e,t)=>{if(!Array.isArray(e))switch(typeof e){case"string":e=[e];break;case"undefined":e=[];break;default:throw new TypeError(`Expected '${t}' to be a string or an array, but got a type of '${typeof e}'`)}return e.filter(e=>{if("string"!=typeof e){if(void 0===e)return!1;throw new TypeError(`Expected '${t}' to be an array of strings, but found a type of '${typeof e}' in the array`)}return!0})},i=(e,t,n,i)=>{if(e=o(e,"inputs"),0===(t=o(t,"patterns")).length)return[];const a=(t=t.map(e=>((e,t)=>{const n="s"+((t={caseSensitive:!1,...t}).caseSensitive?"":"i"),o=e+"|"+n;if(r.has(o))return r.get(o);const i="!"===e[0];i&&(e=e.slice(1)),e=(e=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e=e.replaceAll(String.raw`\*`,"__ESCAPED_STAR__").replaceAll("\\\\","__ESCAPED_BACKSLASH__").replaceAll(/\\(.)/g,"$1")).replaceAll(String.raw`\*`,".*")).replaceAll("__ESCAPED_STAR__",String.raw`\*`).replaceAll("__ESCAPED_BACKSLASH__","\\\\");const a=new RegExp(`^${e}$`,n);return a.negated=i,r.set(o,a),a})(e,n))).filter(e=>e.negated),s=t.filter(e=>!e.negated),{allPatterns:l}=n||{},c=[];if(l&&i&&a.length>1&&0===s.length){for(const t of e)for(const e of a)if(e.test(t))return[];return e.slice(0,1)}for(const t of e){let e=!1;for(const n of a)if(n.test(t)){e=!0;break}if(!e){if(0===s.length)c.push(t);else if(l){const e=Array.from({length:s.length},()=>!1);for(const[n,r]of s.entries())r.test(t)&&(e[n]=!0);e.every(Boolean)&&c.push(t)}else{let e=!1;for(const n of s)if(n.test(t)){e=!0;break}e&&c.push(t)}if(i&&c.length>0)break}}return c},a=(e,t)=>{if(!t||""===t)return!0;const n=e.endsWith("/")&&e.length>1?e.slice(0,-1):e;let r=n;if(null!=t&&t.startsWith("/"))try{r=new URL(n).pathname}catch{r=n}return i(r,t,undefined,!0).length>0}},9932:(e,t,n)=>{var r=n(1452),o=n(1363);e.exports=function(e,t,n){return(t=o(t))in e?r(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},9977:(e,t,n)=>{"use strict";n.d(t,{VZ:()=>r.Vq,_N:()=>i,_Y:()=>o,kP:()=>r._N,mz:()=>r._Y,ny:()=>a,zT:()=>s});var r=n(9313);const o="CONNECTED",i="DISCONNECTED",a="NEW_TOKEN",s="CONNECT_WITH_TRIGGER"},9989:(e,t,n)=>{"use strict";var r=n(5024),o=n(9665),i=n(1330),a=n(7235),s=n(5341),l=TypeError,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d="enumerable",p="configurable",f="writable";t.f=r?i?function(e,t,n){if(a(e),t=s(t),a(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(a(e),t=s(t),a(n),o)try{return c(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new l("Accessors not supported");return"value"in n&&(e[t]=n.value),e}}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={id:e,loaded:!1,exports:{}};return o[e].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.amdO={},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{if(void 0!==a){var e=a.u,t=a.e,n={},r={};a.u=function(t){return e(t)+(n.hasOwnProperty(t)?"?"+n[t]:"")},a.e=function(o){return t(o).catch(function(t){var i=r.hasOwnProperty(o)?r[o]:5;if(i<1){var s=e(o);throw t.message="Loading chunk "+o+" failed after 5 retries.\n("+s+")",t.request=s,t}return new Promise(function(e){var t=5-i+1;setTimeout(function(){var s="cache-bust=true&retry-attempt="+t;n[o]=s,r[o]=i-1,e(a.e(o))},e=>300*e)})})}}})(),a.nc=void 0;var s={};return(()=>{"use strict";a.r(s),a.d(s,{default:()=>r});var e=a(9155),t=a.n(e),n=a(1619);const r=function(r){let{botKey:o,setKindlyChatRef:i,options:a}=r;return t().createElement(e.Suspense,{fallback:""},t().createElement(n.default,{botKey:o,setKindlyChatRef:i,options:a}))}})(),s})());
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom"),require("pusher-js"),require("prop-types")):"function"==typeof define&&define.amd?define(["react","react-dom","pusher-js","prop-types"],t):"object"==typeof exports?exports.kindlyChat=t(require("react"),require("react-dom"),require("pusher-js"),require("prop-types")):e.kindlyChat=t(e.react,e["react-dom"],e["pusher-js"],e["prop-types"])}(globalThis,(e,t,n,r)=>(()=>{var o={85:(e,t,n)=>{"use strict";n(9828);var r=n(1100),o=n(8900),i=n(1811),a=n(6625);for(var s in r)i(o[s],s),a[s]=a.Array},86:(e,t,n)=>{"use strict";var r=n(4713),o=n(1003),i=n(8655),a=n(3508);e.exports=function(){var e=o("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,s=i("toPrimitive");t&&!t[s]&&a(t,s,function(e){return r(n,this)},{arity:1})}},99:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(8089),o=n.n(r);const i=(e,t)=>o()({},e,t)},112:(e,t,n)=>{"use strict";n.d(t,{A:()=>i}),n(9155);const r=n(3864).Ay.div.withConfig({componentId:"sc-1bvmkry-0"})(["transition:all 0.3s ease-in-out;"]);var o=n(1085);function i(e){let{children:t,carouselPosition:n,onTouchEnd:i,onTouchMove:a,onTouchStart:s}=e;return(0,o.jsx)(r,{onTouchStart:s,onTouchEnd:i,onTouchMove:a,style:{transform:`translateX(${n}px)`},children:t})}},164:(e,t,n)=>{"use strict";var r=n(9098),o=n(4713),i=n(4871),a=n(3410),s=n(2769),l=n(1926),c=n(3671),u=n(3491),d=n(1811),f=n(3999),p=n(3508),h=n(8655),g=n(6625),m=n(2621),b=a.PROPER,v=a.CONFIGURABLE,y=m.IteratorPrototype,x=m.BUGGY_SAFARI_ITERATORS,w=h("iterator"),k="keys",S="values",C="entries",_=function(){return this};e.exports=function(e,t,n,a,h,m,A){l(n,t,a);var E,T,j,I=function(e){if(e===h&&N)return N;if(!x&&e&&e in P)return P[e];switch(e){case k:case S:case C:return function(){return new n(this,e)}}return function(){return new n(this)}},O=t+" Iterator",L=!1,P=e.prototype,M=P[w]||P["@@iterator"]||h&&P[h],N=!x&&M||I(h),z="Array"===t&&P.entries||M;if(z&&(E=c(z.call(new e)))!==Object.prototype&&E.next&&(i||c(E)===y||(u?u(E,y):s(E[w])||p(E,w,_)),d(E,O,!0,!0),i&&(g[O]=_)),b&&h===S&&M&&M.name!==S&&(!i&&v?f(P,"name",S):(L=!0,N=function(){return o(M,this)})),h)if(T={values:I(S),keys:m?N:I(k),entries:I(C)},A)for(j in T)(x||L||!(j in P))&&p(P,j,T[j]);else r({target:t,proto:!0,forced:x||L},T);return i&&!A||P[w]===N||p(P,w,N,{name:h}),g[t]=N,T}},167:(e,t,n)=>{"use strict";n.d(t,{$A:()=>l,B3:()=>u,CE:()=>d,HD:()=>f,I$:()=>g,Zw:()=>p,dl:()=>m});var r=n(3864),o=n(8789),i=n(4927),a=n(8035),s=n(6052);const l=56,c=r.Ay.div.withConfig({componentId:"sc-4a24dm-0"})(["display:flex;align-items:center;"]),u=(0,r.Ay)(c).withConfig({componentId:"sc-4a24dm-1"})(["height:","px;text-align:left;padding:12px 14px 12px 12px;align-items:center;color:#fff;min-width:100%;z-index:",";justify-content:space-between;background:",";background-color:",";box-shadow:0 3px 4px -1px ",";"],l,a.vI.headerIndex,e=>e.theme.headerBackground,e=>e.theme.headerBackground,a.Tj.shadowColor),d=(0,r.Ay)(c).withConfig({componentId:"sc-4a24dm-2"})(["overflow:hidden;gap:8px;"]),f=(0,r.Ay)(c).withConfig({componentId:"sc-4a24dm-3"})(["align-items:center;gap:12px;"]),p=(0,r.Ay)(o.H2).withConfig({componentId:"sc-4a24dm-4"})(["margin:0;margin-right:",";margin-left:",";text-transform:none;letter-spacing:normal;max-width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;line-height:1.3;color:",";font-size:var(--_kindlychat-font-size-m);flex:1;"],e=>{let{$isTextDirectionRtl:t}=e;return t?"0":"8px"},e=>{let{$isTextDirectionRtl:t}=e;return t?"8px":"0"},e=>e.theme.headerText),h=(e,t)=>`\n background: ${(0,s.w5)(e.headerBackground,`rgba(255, 255, 255, ${t})`,`rgba(0, 0, 0, ${t})`)};\n background-color: ${(0,s.w5)(e.headerBackground,`rgba(255, 255, 255, ${t})`,`rgba(0, 0, 0, ${t})`)};\n`,g=(0,r.Ay)(i.$n).withConfig({componentId:"sc-4a24dm-5"})(["height:28px;width:28px;display:flex;align-items:center;justify-content:center;font-size:var(--_kindlychat-font-size-h4);padding:0;"," svg{fill:none;path{stroke:",";}}&:hover{","}&:active{","}&[inert]{opacity:0.5;}"],e=>{let{theme:t}=e;return h(t,"0.08")},e=>{let{theme:t}=e;return t.headerText},e=>{let{theme:t}=e;return h(t,"0.12")},e=>{let{theme:t}=e;return h(t,"0.16")}),m=r.Ay.div.withConfig({componentId:"sc-4a24dm-6"})(["border-radius:6px;display:inline-block;width:32px;height:32px;",""],e=>e.$avatar?`\n background-image: url(${e.$avatar});\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n `:"")},262:(e,t,n)=>{"use strict";var r=n(2769);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},310:(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})}},459:e=>{"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},480:e=>{"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},491:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(9155);const o=function(e,t){var n;let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(null===(n=window.kindlyChat)||void 0===n?void 0:n.shadowRoot)||window;const i=(0,r.useRef)(null);(0,r.useEffect)(()=>{i.current=t},[t]),(0,r.useEffect)(()=>{if(!o||!o.addEventListener)return()=>{};const t=async e=>{var t;await(null===(t=i.current)||void 0===t?void 0:t.call(i,e))};return o.addEventListener(e,t),()=>{o.removeEventListener(e,t)}},[e,o])}},493:(e,t,n)=>{"use strict";var r=n(4713),o=n(262),i=n(6281),a=n(4674),s=n(9258),l=n(8655),c=TypeError,u=l("toPrimitive");e.exports=function(e,t){if(!o(e)||i(e))return e;var n,l=a(e,u);if(l){if(void 0===t&&(t="default"),n=r(l,e,t),!o(n)||i(n))return n;throw new c("Can't convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},541:(e,t,n)=>{"use strict";n.d(t,{Kq:()=>J,Ng:()=>Q,Pj:()=>re,d4:()=>le,wA:()=>ie});var r=n(9155),o=n(5919),i=r.version.startsWith("19"),a=Symbol.for(i?"react.transitional.element":"react.element"),s=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),f=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),v=p,y=m;function x(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:a}){let s,l,c,u,d,f=!1;return function(p,h){return f?function(f,p){const h=!i(p,l),g=!o(f,s,p,l);return s=f,l=p,h&&g?(c=e(s,l),t.dependsOnOwnProps&&(u=t(r,l)),d=n(c,u,l),d):h?(e.dependsOnOwnProps&&(c=e(s,l)),t.dependsOnOwnProps&&(u=t(r,l)),d=n(c,u,l),d):g?function(){const t=e(s,l),r=!a(t,c);return c=t,r&&(d=n(c,u,l)),d}():d}(p,h):(s=p,l=h,c=e(s,l),u=t(r,l),d=n(c,u,l),f=!0,d)}}function w(e){return function(t){const n=e(t);function r(){return n}return r.dependsOnOwnProps=!1,r}}function k(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function S(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=k(e);let o=r(t,n);return"function"==typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=k(o),o=r(t,n)),o},r}}function C(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function _(e,t,n){return{...n,...e,...t}}var A={notify(){},get:()=>[]};function E(e,t){let n,r=A,o=0,i=!1;function a(){c.onStateChange&&c.onStateChange()}function s(){o++,n||(n=t?t.addNestedSub(a):e.subscribe(a),r=function(){let e=null,t=null;return{clear(){e=null,t=null},notify(){(()=>{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 l(){o--,n&&0===o&&(n(),n=void 0,r.clear(),r=A)}const c={addNestedSub:function(e){s();const t=r.subscribe(e);let n=!1;return()=>{n||(n=!0,t(),l())}},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:a,isSubscribed:function(){return i},trySubscribe:function(){i||(i=!0,s())},tryUnsubscribe:function(){i&&(i=!1,l())},getListeners:()=>r};return c}var T=(()=>!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement))(),j=(()=>"undefined"!=typeof navigator&&"ReactNative"===navigator.product)(),I=(()=>T||j?r.useLayoutEffect:r.useEffect)();function O(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function L(e,t){if(O(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])||!O(e[n[r]],t[n[r]]))return!1;return!0}var P={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},M={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},N={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},z={[v]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[y]:N};function R(e){return function(e){if("object"==typeof e&&null!==e){const{$$typeof:t}=e;switch(t){case a:switch(e=e.type){case l:case u:case c:case h:case g:return e;default:switch(e=e&&e.$$typeof){case f:case p:case b:case m:case d:return e;default:return t}}case s:return t}}}(e)===m?N:z[e.$$typeof]||P}var $=Object.defineProperty,D=Object.getOwnPropertyNames,F=Object.getOwnPropertySymbols,B=Object.getOwnPropertyDescriptor,H=Object.getPrototypeOf,U=Object.prototype;function V(e,t){if("string"!=typeof t){if(U){const n=H(t);n&&n!==U&&V(e,n)}let n=D(t);F&&(n=n.concat(F(t)));const r=R(e),o=R(t);for(let i=0;i<n.length;++i){const a=n[i];if(!(M[a]||o&&o[a]||r&&r[a])){const n=B(t,a);try{$(e,a,n)}catch(e){}}}}return e}var W=Symbol.for("react-redux-context"),G="undefined"!=typeof globalThis?globalThis:{};function q(){if(!r.createContext)return{};const e=G[W]??=new Map;let t=e.get(r.createContext);return t||(t=r.createContext(null),e.set(r.createContext,t)),t}var K=q(),Y=[null,null];function X(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function Z(e,t){return e===t}var Q=function(e,t,n,{pure:o,areStatesEqual:i=Z,areOwnPropsEqual:a=L,areStatePropsEqual:s=L,areMergedPropsEqual:l=L,forwardRef:c=!1,context:u=K}={}){const d=u,f=function(e){return e?"function"==typeof e?S(e):C(e,"mapStateToProps"):w(()=>({}))}(e),p=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?S(e):C(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,i=!1;return function(t,n,a){const s=e(t,n,a);return i?r(s,o)||(o=s):(i=!0,o=s),o}}}(e):C(e,"mergeProps"):()=>_}(n),g=Boolean(e);return e=>{const t=e.displayName||e.name||"Component",n=`Connect(${t})`,o={shouldHandleStateChanges:g,displayName:n,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:f,initMapDispatchToProps:p,initMergeProps:h,areStatesEqual:i,areStatePropsEqual:s,areOwnPropsEqual:a,areMergedPropsEqual:l};function u(t){const[n,i,a]=r.useMemo(()=>{const{reactReduxForwardedRef:e,...n}=t;return[t.context,e,n]},[t]),s=r.useMemo(()=>d,[n,d]),l=r.useContext(s),c=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch),u=Boolean(l)&&Boolean(l.store),f=c?t.store:l.store,p=u?l.getServerState:f.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)}(f.dispatch,o),[f]),[m,b]=r.useMemo(()=>{if(!g)return Y;const e=E(f,c?void 0:l.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[f,c,l]),v=r.useMemo(()=>c?l:{...l,subscription:m},[c,l,m]),y=r.useRef(void 0),w=r.useRef(a),k=r.useRef(void 0),S=r.useRef(!1),C=r.useRef(!1),_=r.useRef(void 0);I(()=>(C.current=!0,()=>{C.current=!1}),[]);const A=r.useMemo(()=>()=>k.current&&a===w.current?k.current:h(f.getState(),a),[f,a]),T=r.useMemo(()=>e=>m?function(e,t,n,r,o,i,a,s,l,c,u){if(!e)return()=>{};let d=!1,f=null;const p=()=>{if(d||!s.current)return;const e=t.getState();let n,p;try{n=r(e,o.current)}catch(e){p=e,f=e}p||(f=null),n===i.current?a.current||c():(i.current=n,l.current=n,a.current=!0,u())};return n.onStateChange=p,n.trySubscribe(),p(),()=>{if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,f)throw f}}(g,f,m,h,w,y,S,C,k,b,e):()=>{},[m]);var j,O;let L;j=X,O=[w,y,S,a,k,b],I(()=>j(...O),undefined);try{L=r.useSyncExternalStore(T,A,p?()=>h(p(),a):A)}catch(e){throw _.current&&(e.message+=`\nThe error may be correlated with this previous error:\n${_.current.stack}\n\n`),e}I(()=>{_.current=void 0,k.current=void 0,y.current=L});const P=r.useMemo(()=>r.createElement(e,{...L,ref:i}),[i,e,L]);return r.useMemo(()=>g?r.createElement(s.Provider,{value:v},P):P,[s,P,v])}const m=r.memo(u);if(m.WrappedComponent=e,m.displayName=u.displayName=n,c){const t=r.forwardRef(function(e,t){return r.createElement(m,{...e,reactReduxForwardedRef:t})});return t.displayName=n,t.WrappedComponent=e,V(t,e)}return V(m,e)}},J=function(e){const{children:t,context:n,serverState:o,store:i}=e,a=r.useMemo(()=>{const e=E(i);return{store:i,subscription:e,getServerState:o?()=>o:void 0}},[i,o]),s=r.useMemo(()=>i.getState(),[i]);I(()=>{const{subscription:e}=a;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),s!==i.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[a,s]);const l=n||K;return r.createElement(l.Provider,{value:a},t)};function ee(e=K){return function(){return r.useContext(e)}}var te=ee();function ne(e=K){const t=e===K?te:ee(e),n=()=>{const{store:e}=t();return e};return Object.assign(n,{withTypes:()=>n}),n}var re=ne();function oe(e=K){const t=e===K?re:ne(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var ie=oe(),ae=(e,t)=>e===t;function se(e=K){const t=e===K?te:ee(e),n=(e,n={})=>{const{equalityFn:i=ae}="function"==typeof n?{equalityFn:n}:n,a=t(),{store:s,subscription:l,getServerState:c}=a,u=(r.useRef(!0),r.useCallback({[e.name]:t=>e(t)}[e.name],[e])),d=(0,o.useSyncExternalStoreWithSelector)(l.addNestedSub,s.getState,c||s.getState,u,i);return r.useDebugValue(d),d};return Object.assign(n,{withTypes:()=>n}),n}var le=se()},587:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(824),o=n(9272);let i;const a=e=>{let{trigger:t,control:n,name:a,setError:s,clearErrors:l}=e;const{errors:c,isSubmitted:u}=n?(0,r.lN)({name:a,control:n}):{errors:{},isSubmitted:!1};return e=>{var r;if(!n)return;const d={...c},f=e.target;if(null!=f&&f.validationMessage&&(null===(r=c[a])||void 0===r?void 0:r.message)!==(null==f?void 0:f.validationMessage)&&s?s(`browser_error_${a}`,{type:o.k1.BROWSER,message:f.validationMessage},{shouldFocus:!0}):l&&l(`browser_error_${a}`),u&&t){const e=d[`browser_error_${a}`];"email"===f.type&&!e&&f.value.endsWith(".")?i=setTimeout(()=>{t(a)},1e3):(i&&clearTimeout(i),t(a))}}}},628:(e,t,n)=>{"use strict";n.d(t,{Cy:()=>_,DT:()=>A,R7:()=>y,RY:()=>v,Rm:()=>E,Sz:()=>m,TP:()=>T,c9:()=>b,et:()=>C,m8:()=>x,zX:()=>w});var r=n(9749),o=n.n(r),i=n(8410),a=n(2221),s=n(6464),l=n(4851),c=n(4718),u=n(9359),d=n(9313),f=n(1763),p=n(8679),h=n(7325),g=n(1897);const m=()=>(e,t)=>{const{currentLanguage:n,currentModal:r}=t().chatbubble,{acceptanceText:o,revokePermissionText:a}=(0,u.A)(n);e((0,g.Fu)({wasRevoked:!1})),"COMPLIANCE"===r&&e((0,h.zn)(null));const s=`\n ${o}\n <br>\n <span data-kindly-action="${i.Y$.REVOKE_PERMISSION}" style="cursor: pointer; text-decoration: underline;">${a}</span>`.trim();e({type:p.z2,payload:{message:s,system_dialogue_message_type:i.zV.COMPLIANCE}})},b=(e,t)=>{const{currentLanguage:n}=t().chatbubble,{isEnabled:r}=(0,u.A)(n);r&&(e((0,h.zn)("COMPLIANCE")),e((0,g.Fu)({wasRevoked:!0})))},v=(e,t)=>{const{currentLanguage:n,currentModal:r}=t().chatbubble,{isEnabled:o}=(0,u.A)(n);o||"COMPLIANCE"!==r||(e((0,g.Fu)({wasRevoked:!1})),e((0,h.zn)(null)))},y=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},x=()=>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},w=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return async(r,o)=>{const{agent:{takenOver:i,requestedHandoverAt:s},chatbubble:{active:l},connection:{connected:c}}=o();s?r({type:p.MM}):i&&r({type:p.II,data:{taken_over:!1}}),r({type:p.a1}),r(y(e)),r({type:p.wk});try{c&&(0,d.Zf)(),l&&!t?r({type:p.uS}):n&&r({type:p.kA})}catch(e){console.warn(e)}finally{r((0,f.F)(a.Jm.LANGUAGE_SWITCH)),r({type:p.CB,botKey:e,keepOpen:t}),t||setTimeout(()=>r({type:p.d$,chatHasStarted:!1}),300)}}},k=Object.freeze({MAX:3,TIMEOUT_MS:2e3,TIMEOUT_MULTIPLIER:2,RESPONSE_STATUSES:[401,403]});let S=0;const C=function(e,t){let{onError:n,restartOnError:r}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return async i=>{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.81.0",[s.B]:(0,s.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?i(((e,t)=>function(n){var r,i,a,s;if(!e.response||!o()(r=k.RESPONSE_STATUSES).call(r,null===(i=e.response)||void 0===i?void 0:i.status))return console.error(e),null;if(S+=1,S>k.MAX)return console.error(`${t.url} returned ${null===(s=e.response)||void 0===s?void 0:s.status}, max chats restarts exceeded`),null;console.warn(`${t.url} returned ${null===(a=e.response)||void 0===a?void 0:a.status}, starting new chat`);const l=k.TIMEOUT_MS*k.TIMEOUT_MULTIPLIER**(S-1);return setTimeout(()=>n((e,t)=>{const{botKey:n}=t().chatbubble;e(w(n,!0))}),l),null})(e,t)):null}}},_=e=>{const t=`private-chatbubble-${e}`;(0,d.B1)(t,"mimir-started-searching",p.E7),(0,d.B1)(t,"agent_started_typing",p.M_),(0,d.B1)(t,"agent_stopped_typing",p.MU),(0,d.B1)(t,"message-attachments-updated",p.tS),(0,d.B1)(t,"message",p.tq),(0,d.B1)(t,"bot_started_typing",p.A8),(0,d.B1)(t,"bot_stopped_typing",p.wk),(0,d.B1)(t,"new-attachments",p.Os),(0,d.B1)(t,"pattern-context-match",p.jE),(0,d.B1)(t,"takeover",p.II)},A=e=>{const t=`private-chatbubble-${e}`;(0,d.al)(t,"mimir-started-searching",p.E7),(0,d.al)(t,"agent_started_typing",p.M_),(0,d.al)(t,"agent_stopped_typing",p.MU),(0,d.al)(t,"message-attachments-updated",p.tS),(0,d.al)(t,"message",p.tq),(0,d.al)(t,"bot_started_typing",p.A8),(0,d.al)(t,"bot_stopped_typing",p.wk),(0,d.al)(t,"new-attachments",p.Os),(0,d.al)(t,"pattern-context-match",p.jE),(0,d.al)(t,"takeover",p.II)},E=e=>{let{message:t,error:n,level:r="info",extra:o={}}=e;return(e,i)=>{var s;const u=i(),{connection:{token:d},environment:{PAT_HOST:f},chatbubble:{chatId:p}}=u,h={tags:{chat_id:p,bot_id:null===(s=u.bot)||void 0===s?void 0:s.id}},g=(0,c.A)({level:r,error:n,message:t,reduxState:u,extra:{...(m=o,JSON.parse(JSON.stringify(m,(e,t)=>void 0===t?"undefined 🤷‍♂️":t))),...h}});var m;e(C(`${f}/chatbubble/${a.Ak}/log`,{method:"POST",body:g,...(0,l.A)({token:d},{withCurrentUrl:!0})}))}},T=e=>t=>{t({type:p.se,messageSentTime:e})}},649:(e,t,n)=>{"use strict";n.d(t,{default:()=>s});var r=n(9749),o=n.n(r);const i="kindly-chat-utm",a=Object.freeze(["CONTENT","SOURCE","MEDIUM","CAMPAIGN","TERM"]);function s(){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()(a).call(a,n.toUpperCase().substring(4))?{...e,[n]:r}:e},{});if(0===Object.keys(t).length){const e=window.sessionStorage.getItem(i);t=e?JSON.parse(e):null}else window.sessionStorage.setItem(i,JSON.stringify(t));return t}},701:(e,t,n)=>{"use strict";var r=n(6100),o=n(2137),i=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(o(e),t)}},748:(e,t,n)=>{var r=n(7354);e.exports=function(e,t,n){r(e,t),t.set(e,n)},e.exports.__esModule=!0,e.exports.default=e.exports},786:(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 i=new Uint8Array(16),a=[];for(let e=0;e<256;++e)a.push((e+256).toString(16).slice(1));function s(e,t,n){const r=(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(i)}();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=15&r[6]|64,r[8]=63&r[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]=r[e];return t}return function(e,t=0){return(a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]).toLowerCase()}(r)}const l=function(e,t,n){return!r.randomUUID||t||e?s(e,t,n):r.randomUUID()}},809:(e,t,n)=>{"use strict";n.d(t,{Fc:()=>y,A6:()=>o,fl:()=>i,US:()=>a,gp:()=>h,WI:()=>b,Gr:()=>m,V$:()=>l,bM:()=>s,T4:()=>v,U:()=>f,qY:()=>g,gR:()=>c,fN:()=>p,qx:()=>u,Ze:()=>d}),n(9155);var r=n(1085);function o(e){let{fill:t="none",stroke:n="white",...o}=e;return(0,r.jsx)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:t,xmlns:"http://www.w3.org/2000/svg",...o,children:(0,r.jsx)("path",{d:"M14.25 7.73999L8.75 12.99L14.25 18.24",stroke:n,strokeWidth:"1.5",strokeLinecap:"square"})})}function i(e){let{fill:t="none",stroke:n="white",...o}=e;return(0,r.jsx)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:t,xmlns:"http://www.w3.org/2000/svg",...o,children:(0,r.jsx)("path",{d:"M9.75 7.73999L15.25 12.99L9.75 18.24",stroke:n,strokeWidth:"1.5",strokeLinecap:"square"})})}function a(e){let{color:t,...n}=e;return(0,r.jsxs)("svg",{...n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M17.25 6.75L6.75 17.25",stroke:t||"#445265",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M6.75 6.75L17.25 17.25",stroke:t||"#445265",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function s(e){let{width:t="16px",height:n="12px",fill:o="rgb(0, 105, 255)"}=e;return(0,r.jsx)("svg",{width:t,height:n,viewBox:"0 0 16 12",children:(0,r.jsx)("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:o})})}function l(e){let{width:t="16px",height:n="16px",fill:o="rgb(0, 105, 255)"}=e;return(0,r.jsx)("svg",{width:t,height:n,children:(0,r.jsx)("g",{fill:o,children:(0,r.jsx)("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"})})})}function c(e){let{...t}=e;return(0,r.jsx)("svg",{...t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M18.25 12.25L5.75 12.25",stroke:"#445265",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function u(e){return(0,r.jsxs)("svg",{...e,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("g",{clipPath:"url(#a)",stroke:"#6A778A",strokeWidth:"1.5",strokeLinecap:"square",children:(0,r.jsx)("path",{d:"M4.75 4.75 19.25 12l-14.5 7.25L8.25 12l-3.5-7.25ZM8.5 12h2.75"})}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"a",children:(0,r.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function d(e){return(0,r.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,r.jsx)("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"}),(0,r.jsx)("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"})]})}function f(e){let{crop:t=!1,width:n=24,height:o=24,...i}=e;const a=t?"4 4 16 16":"0 0 24 24";return(0,r.jsxs)("svg",{width:n,height:o,fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:a,...i,children:[(0,r.jsx)("path",{d:"M12.75 19.25L16 12.75L19.25 19.25",stroke:"#333",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M14 17.25H18",stroke:"#333",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M4.75 6.75H13.25",stroke:"#333",strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M9 6.5V4.75",stroke:"#333",strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),(0,r.jsx)("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"}),(0,r.jsx)("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"})]})}function p(e){return(0,r.jsx)("svg",{...e,viewBox:"0 0 15 15",xmlns:"https://www.w3.org/2000/svg",children:(0,r.jsx)("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"})})}function h(e){return(0,r.jsxs)("svg",{...e,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("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"}),(0,r.jsx)("path",{d:"M5.16675 8.49999V10.8333H7.50008",stroke:"white",strokeLinecap:"square"}),(0,r.jsx)("path",{d:"M10.8333 7.49999V5.16666H8.5",stroke:"white",strokeLinecap:"square"})]})}const g=function(e){let{color:t="white",...n}=e;return(0,r.jsxs)("svg",{...n,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("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"}),(0,r.jsx)("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"}),(0,r.jsx)("path",{d:"M9.5 6.5L6.5 9.5",stroke:t,strokeLinecap:"square",strokeLinejoin:"round"})]})};function m(e){let{size:t=24,color:n="#333",className:o}=e;return(0,r.jsxs)("svg",{width:t,height:t,className:o,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("title",{children:"External link, opens in a new tab"}),(0,r.jsx)("path",{d:"M17.25 15.25V6.75H8.75",stroke:n,strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M17 7L6.75 17.25",stroke:n,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function b(e){return(0,r.jsxs)("svg",{...e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("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"}),(0,r.jsx)("path",{d:"M14.2981 9.7019L9.7019 14.2981",stroke:"#141414",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M14.2981 14.2981L9.7019 9.7019",stroke:"#141414",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}const v=function(e){let{color:t,...n}=e;return(0,r.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:[(0,r.jsx)("g",{clipPath:"url(#clip0_519_2415)",children:(0,r.jsx)("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"})}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"clip0_519_2415",children:(0,r.jsx)("rect",{width:"24",height:"24",fill:t})})})]})},y=function(e){return(0,r.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,r.jsx)("path",{d:"M12 15H12.01",stroke:"#333333",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("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"}),(0,r.jsx)("path",{d:"M12 8.75V12.25",stroke:"#333333",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}},814:(e,t,n)=>{"use strict";var r=n(2769),o=n(459),i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(o(e)+" is not a function")}},824:(e,t,n)=>{"use strict";n.d(t,{FH:()=>M,lN:()=>j,mN:()=>Ae,xI:()=>N});var r=n(9155),o=e=>"checkbox"===e.type,i=e=>e instanceof Date,a=e=>null==e;const s=e=>"object"==typeof e;var l=e=>!a(e)&&!Array.isArray(e)&&s(e)&&!i(e),c=e=>l(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 l(t)&&t.hasOwnProperty("isPrototypeOf")},f="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function p(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(f&&(e instanceof Blob||r)||!n&&!l(e))return e;if(t=n?[]:Object.create(Object.getPrototypeOf(e)),n||d(e))for(const n in e)e.hasOwnProperty(n)&&(t[n]=p(e[n]));else t=e}return t}var h=e=>/^\w*$/.test(e),g=e=>void 0===e,m=e=>Array.isArray(e)?e.filter(Boolean):[],b=e=>m(e.replace(/["|']|\]/g,"").split(/\.|\[/)),v=(e,t,n)=>{if(!t||!l(e))return n;const r=(h(t)?[t]:b(t)).reduce((e,t)=>a(e)?e:e[t],e);return g(r)||r===e?g(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),i=o.length,a=i-1;for(;++r<i;){const t=o[r];let i=n;if(r!==a){const n=e[t];i=l(n)||Array.isArray(n)?n:isNaN(+o[r+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=i,e=e[t]}};const w={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},k={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},S="pattern",C="required",_=r.createContext(null);_.displayName="HookFormContext";const A=()=>r.useContext(_);var E=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const o=i;return t._proxyFormState[o]!==k.all&&(t._proxyFormState[o]=!r||k.all),n&&(n[o]=!0),e[o]}});return o};const T="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;function j(e){const t=A(),{control:n=t.control,disabled:o,name:i,exact:a}=e||{},[s,l]=r.useState(n._formState),c=r.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return T(()=>n._subscribe({name:i,formState:c.current,exact:a,callback:e=>{!o&&l({...n._formState,...e})}}),[i,o,a]),r.useEffect(()=>{c.current.isValid&&n._setValid(!0)},[n]),r.useMemo(()=>E(s,n,c.current,!1),[s,n])}var I=e=>"string"==typeof e,O=(e,t,n,r,o)=>I(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),L=e=>a(e)||!s(e);function P(e,t,n=new WeakSet){if(L(e)||L(t))return e===t;if(i(e)&&i(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 a of r){const r=e[a];if(!o.includes(a))return!1;if("ref"!==a){const e=t[a];if(i(r)&&i(e)||l(r)&&l(e)||Array.isArray(r)&&Array.isArray(e)?!P(r,e,n):r!==e)return!1}}return!0}function M(e){const t=A(),{control:n=t.control,name:o,defaultValue:i,disabled:a,exact:s,compute:l}=e||{},c=r.useRef(i),u=r.useRef(l),d=r.useRef(void 0),f=r.useRef(n),p=r.useRef(o);u.current=l;const[h,g]=r.useState(()=>{const e=n._getWatch(o,c.current);return u.current?u.current(e):e}),m=r.useCallback(e=>{const t=O(o,n._names,e||n._formValues,!1,c.current);return u.current?u.current(t):t},[n._formValues,n._names,o]),b=r.useCallback(e=>{if(!a){const t=O(o,n._names,e||n._formValues,!1,c.current);if(u.current){const e=u.current(t);P(e,d.current)||(g(e),d.current=e)}else g(t)}},[n._formValues,n._names,a,o]);T(()=>(f.current===n&&P(p.current,o)||(f.current=n,p.current=o,b()),n._subscribe({name:o,formState:{values:!0},exact:s,callback:e=>{b(e.values)}})),[n,s,o,b]),r.useEffect(()=>n._removeUnmounted());const v=f.current!==n,y=p.current,x=r.useMemo(()=>{if(a)return null;const e=!v&&!P(y,o);return v||e?m():null},[a,v,o,y,m]);return null!==x?x:h}const N=e=>e.render(function(e){const t=A(),{name:n,disabled:o,control:i=t.control,shouldUnregister:a,defaultValue:s}=e,l=u(i._names.array,n),d=r.useMemo(()=>v(i._formValues,n,v(i._defaultValues,n,s)),[i,n,s]),f=M({control:i,name:n,defaultValue:d,exact:!0}),h=j({control:i,name:n,exact:!0}),m=r.useRef(e),b=r.useRef(void 0),k=r.useRef(i.register(n,{...e.rules,value:f,...y(e.disabled)?{disabled:e.disabled}:{}}));m.current=e;const S=r.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!v(h.errors,n)},isDirty:{enumerable:!0,get:()=>!!v(h.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!v(h.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!v(h.validatingFields,n)},error:{enumerable:!0,get:()=>v(h.errors,n)}}),[h,n]),C=r.useCallback(e=>k.current.onChange({target:{value:c(e),name:n},type:w.CHANGE}),[n]),_=r.useCallback(()=>k.current.onBlur({target:{value:v(i._formValues,n),name:n},type:w.BLUR}),[n,i._formValues]),E=r.useCallback(e=>{const t=v(i._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()})},[i._fields,n]),T=r.useMemo(()=>({name:n,value:f,...y(o)||h.disabled?{disabled:h.disabled||o}:{},onChange:C,onBlur:_,ref:E}),[n,o,h.disabled,C,_,E,f]);return r.useEffect(()=>{const e=i._options.shouldUnregister||a,t=b.current;t&&t!==n&&!l&&i.unregister(t),i.register(n,{...m.current.rules,...y(m.current.disabled)?{disabled:m.current.disabled}:{}});const r=(e,t)=>{const n=v(i._fields,e);n&&n._f&&(n._f.mount=t)};if(r(n,!0),e){const e=p(v(i._options.defaultValues,n,m.current.defaultValue));x(i._defaultValues,n,e),g(v(i._formValues,n))&&x(i._formValues,n,e)}return!l&&i.register(n),b.current=n,()=>{(l?e&&!i._state.action:e)?i.unregister(n):r(n,!1)}},[n,i,l,a]),r.useEffect(()=>{i._setDisabledField({disabled:o,name:n})},[o,n,i]),r.useMemo(()=>({field:T,formState:h,fieldState:S}),[T,h,S])}(e));var z=(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],$=()=>{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=[]}}};function D(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const o=e[r],i=t[r];if(o&&l(o)&&i){const e=D(o,i);l(e)&&(n[r]=e)}else e[r]&&(n[r]=i)}return n}var F=e=>l(e)&&!Object.keys(e).length,B=e=>"file"===e.type,H=e=>"function"==typeof e,U=e=>{if(!f)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},V=e=>"select-multiple"===e.type,W=e=>"radio"===e.type,G=e=>W(e)||o(e),q=e=>U(e)&&e.isConnected;function K(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=g(e)?r++:e[t[r++]];return e}(e,n),o=n.length-1,i=n[o];return r&&delete r[i],0!==o&&(l(r)&&F(r)||Array.isArray(r)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!g(e[t]))return!1;return!0}(r))&&K(e,n.slice(0,-1)),e}var Y=e=>{for(const t in e)if(H(e[t]))return!0;return!1};function X(e){return Array.isArray(e)||l(e)&&!Y(e)}function Z(e,t={}){for(const n in e)X(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Z(e[n],t[n])):g(e[n])||(t[n]=!0);return t}function Q(e,t,n){n||(n=Z(t));for(const r in e)X(e[r])?g(t)||L(n[r])?n[r]=Z(e[r],Array.isArray(e[r])?[]:{}):Q(e[r],a(t)?{}:t[r],n[r]):n[r]=!P(e[r],t[r]);return n}const J={value:!1,isValid:!1},ee={value:!0,isValid:!0};var te=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&&!g(e[0].attributes.value)?g(e[0].value)||""===e[0].value?ee:{value:e[0].value,isValid:!0}:ee:J}return J},ne=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>g(e)?e:t?""===e?NaN:e?+e:e:n&&I(e)?new Date(e):r?r(e):e;const re={isValid:!1,value:null};var oe=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,re):re;function ie(e){const t=e.ref;return B(t)?t.files:W(t)?oe(e.refs).value:V(t)?[...t.selectedOptions].map(({value:e})=>e):o(t)?te(e.refs).value:ne(g(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}},se=e=>e instanceof RegExp,le=e=>g(e)?e:se(e)?e.source:l(e)?se(e.value)?e.value.source:e.value:e,ce=e=>({isOnSubmit:!e||e===k.onSubmit,isOnBlur:e===k.onBlur,isOnChange:e===k.onChange,isOnAll:e===k.all,isOnTouch:e===k.onTouched});const ue="AsyncFunction";var de=e=>!!e&&!!e.validate&&!!(H(e.validate)&&e.validate.constructor.name===ue||l(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===ue)),fe=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 he=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const n=v(e,o);if(n){const{_f:e,...i}=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(he(i,t))break}else if(l(i)&&he(i,t))break}}};function ge(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("."),i=v(t,r),a=v(e,r);if(i&&!Array.isArray(i)&&n!==r)return{name:n};if(a&&a.type)return{name:r,error:a};if(a&&a.root&&a.root.type)return{name:`${r}.root`,error:a.root};o.pop()}return{name:n}}var me=(e,t,n,r)=>{n(e);const{name:o,...i}=e;return F(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(e=>t[e]===(!r||k.all))},be=(e,t,n)=>!e||!t||e===t||R(e).some(e=>e&&(n?e===t:e.startsWith(t)||t.startsWith(e))),ve=(e,t,n,r,o)=>!o.isOnAll&&(!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:!(n?r.isOnChange:o.isOnChange)||e),ye=(e,t)=>!m(v(e,t)).length&&K(e,t),xe=(e,t,n)=>{const r=R(v(e,n));return x(r,"root",t[n]),x(e,n,r),e};function we(e,t,n="validate"){if(I(e)||Array.isArray(e)&&e.every(I)||y(e)&&!e)return{type:n,message:I(e)?e:"",ref:t}}var ke=e=>l(e)&&!se(e)?e:{value:e,message:""},Se=async(e,t,n,r,i,s)=>{const{ref:c,refs:u,required:d,maxLength:f,minLength:p,min:h,max:m,pattern:b,validate:x,name:w,valueAsNumber:k,mount:_}=e._f,A=v(n,w);if(!_||t.has(w))return{};const E=u?u[0]:c,T=e=>{i&&E.reportValidity&&(E.setCustomValidity(y(e)?"":e||""),E.reportValidity())},j={},O=W(c),L=o(c),P=O||L,M=(k||B(c))&&g(c.value)&&g(A)||U(c)&&""===c.value||""===A||Array.isArray(A)&&!A.length,N=z.bind(null,w,r,j),R=(e,t,n,r="maxLength",o="minLength")=>{const i=e?t:n;j[w]={type:e?r:o,message:i,ref:c,...N(e?r:o,i)}};if(s?!Array.isArray(A)||!A.length:d&&(!P&&(M||a(A))||y(A)&&!A||L&&!te(u).isValid||O&&!oe(u).isValid)){const{value:e,message:t}=I(d)?{value:!!d,message:d}:ke(d);if(e&&(j[w]={type:C,message:t,ref:E,...N(C,t)},!r))return T(t),j}if(!(M||a(h)&&a(m))){let e,t;const n=ke(m),o=ke(h);if(a(A)||isNaN(A)){const r=c.valueAsDate||new Date(A),i=e=>new Date((new Date).toDateString()+" "+e),a="time"==c.type,s="week"==c.type;I(n.value)&&A&&(e=a?i(A)>i(n.value):s?A>n.value:r>new Date(n.value)),I(o.value)&&A&&(t=a?i(A)<i(o.value):s?A<o.value:r<new Date(o.value))}else{const r=c.valueAsNumber||(A?+A:A);a(n.value)||(e=r>n.value),a(o.value)||(t=r<o.value)}if((e||t)&&(R(!!e,n.message,o.message,"max","min"),!r))return T(j[w].message),j}if((f||p)&&!M&&(I(A)||s&&Array.isArray(A))){const e=ke(f),t=ke(p),n=!a(e.value)&&A.length>+e.value,o=!a(t.value)&&A.length<+t.value;if((n||o)&&(R(n,e.message,t.message),!r))return T(j[w].message),j}if(b&&!M&&I(A)){const{value:e,message:t}=ke(b);if(se(e)&&!A.match(e)&&(j[w]={type:S,message:t,ref:c,...N(S,t)},!r))return T(t),j}if(x)if(H(x)){const e=we(await x(A,n),E);if(e&&(j[w]={...e,...N("validate",e.message)},!r))return T(e.message),j}else if(l(x)){let e={};for(const t in x){if(!F(e)&&!r)break;const o=we(await x[t](A,n),E,t);o&&(e={...o,...N(t,o.message)},T(o.message),r&&(j[w]=e))}if(!F(e)&&(j[w]={ref:E,...e},!r))return j}return T(!0),j};const Ce={mode:k.onSubmit,reValidateMode:k.onChange,shouldFocusError:!0};function _e(e={}){let t,n={...Ce,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:H(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},s={},d=(l(n.defaultValues)||l(n.values))&&p(n.defaultValues||n.values)||{},h=n.shouldUnregister?{}:p(d),b={action:!1,mount:!1,watch:!1},S={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},C=0;const _={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let A={..._};const E={array:$(),state:$()},T=n.criteriaMode===k.all,j=async e=>{if(!n.disabled&&(_.isValid||A.isValid||e)){const e=n.resolver?F((await z()).errors):await W(s,!0);e!==r.isValid&&E.state.next({isValid:e})}},L=(e,t)=>{!n.disabled&&(_.isValidating||_.validatingFields||A.isValidating||A.validatingFields)&&((e||Array.from(S.mount)).forEach(e=>{e&&(t?x(r.validatingFields,e,t):K(r.validatingFields,e))}),E.state.next({validatingFields:r.validatingFields,isValidating:!F(r.validatingFields)}))},M=(e,t,n,r)=>{const o=v(s,e);if(o){const i=v(h,e,g(n)?v(d,e):n);g(i)||r&&r.defaultChecked||t?x(h,e,t?i:ie(o._f)):Z(e,i),b.mount&&j()}},N=(e,t,o,i,a)=>{let s=!1,l=!1;const c={name:e};if(!n.disabled){if(!o||i){(_.isDirty||A.isDirty)&&(l=r.isDirty,r.isDirty=c.isDirty=Y(),s=l!==c.isDirty);const n=P(v(d,e),t);l=!!v(r.dirtyFields,e),n?K(r.dirtyFields,e):x(r.dirtyFields,e,!0),c.dirtyFields=r.dirtyFields,s=s||(_.dirtyFields||A.dirtyFields)&&l!==!n}if(o){const t=v(r.touchedFields,e);t||(x(r.touchedFields,e,o),c.touchedFields=r.touchedFields,s=s||(_.touchedFields||A.touchedFields)&&t!==o)}s&&a&&E.state.next(c)}return s?c:{}},z=async e=>{L(e,!0);const t=await n.resolver(h,n.context,ae(e||S.mount,s,n.criteriaMode,n.shouldUseNativeValidation));return L(e),t},W=async(e,t,o={valid:!0})=>{for(const i in e){const a=e[i];if(a){const{_f:e,...i}=a;if(e){const i=S.array.has(e.name),s=a._f&&de(a._f);s&&_.validatingFields&&L([e.name],!0);const l=await Se(a,S.disabled,h,T,n.shouldUseNativeValidation&&!t,i);if(s&&_.validatingFields&&L([e.name]),l[e.name]&&(o.valid=!1,t))break;!t&&(v(l,e.name)?i?xe(r.errors,l,e.name):x(r.errors,e.name,l[e.name]):K(r.errors,e.name))}!F(i)&&await W(i,t,o)}}return o.valid},Y=(e,t)=>!n.disabled&&(e&&t&&x(h,e,t),!P(se(),d)),X=(e,t,n)=>O(e,S,{...b.mount?h:g(t)?d:I(e)?{[e]:t}:t},n,t),Z=(e,t,n={})=>{const r=v(s,e);let i=t;if(r){const n=r._f;n&&(!n.disabled&&x(h,e,ne(t,n)),i=U(n.ref)&&a(t)?"":t,V(n.ref)?[...n.ref.options].forEach(e=>e.selected=i.includes(e.value)):n.refs?o(n.ref)?n.refs.forEach(e=>{e.defaultChecked&&e.disabled||(Array.isArray(i)?e.checked=!!i.find(t=>t===e.value):e.checked=i===e.value||!!i)}):n.refs.forEach(e=>e.checked=e.value===i):B(n.ref)?n.ref.value="":(n.ref.value=i,n.ref.type||E.state.next({name:e,values:p(h)})))}(n.shouldDirty||n.shouldTouch)&&N(e,i,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&oe(e)},J=(e,t,n)=>{for(const r in t){if(!t.hasOwnProperty(r))return;const o=t[r],a=e+"."+r,c=v(s,a);(S.array.has(e)||l(o)||c&&!c._f)&&!i(o)?J(a,o,n):Z(a,o,n)}},ee=(e,t,n={})=>{const o=v(s,e),i=S.array.has(e),l=p(t);x(h,e,l),i?(E.array.next({name:e,values:p(h)}),(_.isDirty||_.dirtyFields||A.isDirty||A.dirtyFields)&&n.shouldDirty&&E.state.next({name:e,dirtyFields:Q(d,h),isDirty:Y(e,l)})):!o||o._f||a(l)?Z(e,l,n):J(e,l,n),pe(e,S)&&E.state.next({...r,name:e}),E.state.next({name:b.mount?e:void 0,values:p(h)})},te=async e=>{b.mount=!0;const o=e.target;let a=o.name,l=!0;const u=v(s,a),d=e=>{l=Number.isNaN(e)||i(e)&&isNaN(e.getTime())||P(e,v(h,a,e))},f=ce(n.mode),g=ce(n.reValidateMode);if(u){let i,m;const b=o.type?ie(u._f):c(e),k=e.type===w.BLUR||e.type===w.FOCUS_OUT,I=!fe(u._f)&&!n.resolver&&!v(r.errors,a)&&!u._f.deps||ve(k,v(r.touchedFields,a),r.isSubmitted,g,f),O=pe(a,S,k);x(h,a,b),k?o&&o.readOnly||(u._f.onBlur&&u._f.onBlur(e),t&&t(0)):u._f.onChange&&u._f.onChange(e);const M=N(a,b,k),R=!F(M)||O;if(!k&&E.state.next({name:a,type:e.type,values:p(h)}),I)return(_.isValid||A.isValid)&&("onBlur"===n.mode?k&&j():k||j()),R&&E.state.next({name:a,...O?{}:M});if(!k&&O&&E.state.next({...r}),n.resolver){const{errors:e}=await z([a]);if(d(b),l){const t=ge(r.errors,s,a),n=ge(e,s,t.name||a);i=n.error,a=n.name,m=F(e)}}else L([a],!0),i=(await Se(u,S.disabled,h,T,n.shouldUseNativeValidation))[a],L([a]),d(b),l&&(i?m=!1:(_.isValid||A.isValid)&&(m=await W(s,!0)));l&&(u._f.deps&&(!Array.isArray(u._f.deps)||u._f.deps.length>0)&&oe(u._f.deps),((e,o,i,a)=>{const s=v(r.errors,e),l=(_.isValid||A.isValid)&&y(o)&&r.isValid!==o;var c;if(n.delayError&&i?(c=()=>((e,t)=>{x(r.errors,e,t),E.state.next({errors:r.errors})})(e,i),t=e=>{clearTimeout(C),C=setTimeout(c,e)},t(n.delayError)):(clearTimeout(C),t=null,i?x(r.errors,e,i):K(r.errors,e)),(i?!P(s,i):s)||!F(a)||l){const t={...a,...l&&y(o)?{isValid:o}:{},errors:r.errors,name:e};r={...r,...t},E.state.next(t)}})(a,m,i,M))}},re=(e,t)=>{if(v(r.errors,t)&&e.focus)return e.focus(),1},oe=async(e,t={})=>{let o,i;const a=R(e);if(n.resolver){const t=await(async e=>{const{errors:t}=await z(e);if(e)for(const n of e){const e=v(t,n);e?x(r.errors,n,e):K(r.errors,n)}else r.errors=t;return t})(g(e)?e:a);o=F(t),i=e?!a.some(e=>v(t,e)):o}else e?(i=(await Promise.all(a.map(async e=>{const t=v(s,e);return await W(t&&t._f?{[e]:t}:t)}))).every(Boolean),(i||r.isValid)&&j()):i=o=await W(s);return E.state.next({...!I(e)||(_.isValid||A.isValid)&&o!==r.isValid?{}:{name:e},...n.resolver||!e?{isValid:o}:{},errors:r.errors}),t.shouldFocus&&!i&&he(s,re,e?a:S.mount),i},se=(e,t)=>{let n={...b.mount?h:d};return t&&(n=D(t.dirtyFields?r.dirtyFields:r.touchedFields,n)),g(e)?n:I(e)?v(n,e):e.map(e=>v(n,e))},ue=(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)}),we=(e,t,n)=>{const o=(v(s,e,{_f:{}})._f||{}).ref,i=v(r.errors,e)||{},{ref:a,message:l,type:c,...u}=i;x(r.errors,e,{...u,...t,ref:o}),E.state.next({name:e,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&o&&o.focus&&o.focus()},ke=e=>E.state.subscribe({next:t=>{be(e.name,t.name,e.exact)&&me(t,e.formState||_,Le,e.reRenderRoot)&&e.callback({values:{...h},...r,...t,defaultValues:d})}}).unsubscribe,_e=(e,t={})=>{for(const o of e?R(e):S.mount)S.mount.delete(o),S.array.delete(o),t.keepValue||(K(s,o),K(h,o)),!t.keepError&&K(r.errors,o),!t.keepDirty&&K(r.dirtyFields,o),!t.keepTouched&&K(r.touchedFields,o),!t.keepIsValidating&&K(r.validatingFields,o),!n.shouldUnregister&&!t.keepDefaultValue&&K(d,o);E.state.next({values:p(h)}),E.state.next({...r,...t.keepDirty?{isDirty:Y()}:{}}),!t.keepIsValid&&j()},Ae=({disabled:e,name:t})=>{(y(e)&&b.mount||e||S.disabled.has(t))&&(e?S.disabled.add(t):S.disabled.delete(t))},Ee=(e,t={})=>{let r=v(s,e);const o=y(t.disabled)||y(n.disabled);return x(s,e,{...r||{},_f:{...r&&r._f?r._f:{ref:{name:e}},name:e,mount:!0,...t}}),S.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:te,onBlur:te,ref:o=>{if(o){Ee(e,t),r=v(s,e);const n=g(o.value)&&o.querySelectorAll&&o.querySelectorAll("input,select,textarea")[0]||o,i=G(n),a=r._f.refs||[];if(i?a.find(e=>e===n):n===r._f.ref)return;x(s,e,{_f:{...r._f,...i?{refs:[...a.filter(q),n,...Array.isArray(v(d,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),M(e,!1,void 0,n)}else r=v(s,e,{}),r._f&&(r._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!u(S.array,e)||!b.action)&&S.unMount.add(e)}}},Te=()=>n.shouldFocusError&&he(s,re,S.mount),je=(e,t)=>async o=>{let i;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let a=p(h);if(E.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await z();r.errors=e,a=p(t)}else await W(s);if(S.disabled.size)for(const e of S.disabled)K(a,e);if(K(r.errors,"root"),F(r.errors)){E.state.next({errors:{}});try{await e(a,o)}catch(e){i=e}}else t&&await t({...r.errors},o),Te(),setTimeout(Te);if(E.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:F(r.errors)&&!i,submitCount:r.submitCount+1,errors:r.errors}),i)throw i},Ie=(e,t={})=>{const o=e?p(e):d,i=p(o),a=F(e),l=a?d:i;if(t.keepDefaultValues||(d=o),!t.keepValues){if(t.keepDirtyValues){const e=new Set([...S.mount,...Object.keys(Q(d,h))]);for(const t of Array.from(e))v(r.dirtyFields,t)?x(l,t,v(h,t)):ee(t,v(l,t))}else{if(f&&g(e))for(const e of S.mount){const t=v(s,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(U(e)){const t=e.closest("form");if(t){t.reset();break}}}}if(t.keepFieldsRef)for(const e of S.mount)ee(e,v(l,e));else s={}}h=n.shouldUnregister?t.keepDefaultValues?p(d):{}:p(l),E.array.next({values:{...l}}),E.state.next({values:{...l}})}S={mount:t.keepDirtyValues?S.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},b.mount=!_.isValid||!!t.keepIsValid||!!t.keepDirtyValues||!n.shouldUnregister&&!F(l),b.watch=!!n.shouldUnregister,E.state.next({submitCount:t.keepSubmitCount?r.submitCount:0,isDirty:!a&&(t.keepDirty?r.isDirty:!(!t.keepDefaultValues||P(e,d))),isSubmitted:!!t.keepIsSubmitted&&r.isSubmitted,dirtyFields:a?{}:t.keepDirtyValues?t.keepDefaultValues&&h?Q(d,h):r.dirtyFields:t.keepDefaultValues&&e?Q(d,e):t.keepDirty?r.dirtyFields:{},touchedFields:t.keepTouched?r.touchedFields:{},errors:t.keepErrors?r.errors:{},isSubmitSuccessful:!!t.keepIsSubmitSuccessful&&r.isSubmitSuccessful,isSubmitting:!1,defaultValues:d})},Oe=(e,t)=>Ie(H(e)?e(h):e,t),Le=e=>{r={...r,...e}},Pe={control:{register:Ee,unregister:_e,getFieldState:ue,handleSubmit:je,setError:we,_subscribe:ke,_runSchema:z,_focusError:Te,_getWatch:X,_getDirty:Y,_setValid:j,_setFieldArray:(e,t=[],o,i,a=!0,l=!0)=>{if(i&&o&&!n.disabled){if(b.action=!0,l&&Array.isArray(v(s,e))){const t=o(v(s,e),i.argA,i.argB);a&&x(s,e,t)}if(l&&Array.isArray(v(r.errors,e))){const t=o(v(r.errors,e),i.argA,i.argB);a&&x(r.errors,e,t),ye(r.errors,e)}if((_.touchedFields||A.touchedFields)&&l&&Array.isArray(v(r.touchedFields,e))){const t=o(v(r.touchedFields,e),i.argA,i.argB);a&&x(r.touchedFields,e,t)}(_.dirtyFields||A.dirtyFields)&&(r.dirtyFields=Q(d,h)),E.state.next({name:e,isDirty:Y(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else x(h,e,t)},_setDisabledField:Ae,_setErrors:e=>{r.errors=e,E.state.next({errors:r.errors,isValid:!1})},_getFieldArray:e=>m(v(b.mount?h:d,e,n.shouldUnregister?v(d,e,[]):[])),_reset:Ie,_resetDefaultValues:()=>H(n.defaultValues)&&n.defaultValues().then(e=>{Oe(e,n.resetOptions),E.state.next({isLoading:!1})}),_removeUnmounted:()=>{for(const e of S.unMount){const t=v(s,e);t&&(t._f.refs?t._f.refs.every(e=>!q(e)):!q(t._f.ref))&&_e(e)}S.unMount=new Set},_disableForm:e=>{y(e)&&(E.state.next({disabled:e}),he(s,(t,n)=>{const r=v(s,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:E,_proxyFormState:_,get _fields(){return s},get _formValues(){return h},get _state(){return b},set _state(e){b=e},get _defaultValues(){return d},get _names(){return S},set _names(e){S=e},get _formState(){return r},get _options(){return n},set _options(e){n={...n,...e}}},subscribe:e=>(b.mount=!0,A={...A,...e.formState},ke({...e,formState:A})),trigger:oe,register:Ee,handleSubmit:je,watch:(e,t)=>H(e)?E.state.subscribe({next:n=>"values"in n&&e(X(void 0,t),n)}):X(e,t,!0),setValue:ee,getValues:se,reset:Oe,resetField:(e,t={})=>{v(s,e)&&(g(t.defaultValue)?ee(e,p(v(d,e))):(ee(e,t.defaultValue),x(d,e,p(t.defaultValue))),t.keepTouched||K(r.touchedFields,e),t.keepDirty||(K(r.dirtyFields,e),r.isDirty=t.defaultValue?Y(e,p(v(d,e))):Y()),t.keepError||(K(r.errors,e),_.isValid&&j()),E.state.next({...r}))},clearErrors:e=>{e&&R(e).forEach(e=>K(r.errors,e)),E.state.next({errors:e?r.errors:{}})},unregister:_e,setError:we,setFocus:(e,t={})=>{const n=v(s,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&(e.focus(),t.shouldSelect&&H(e.select)&&e.select())}},getFieldState:ue};return{...Pe,formControl:Pe}}function Ae(e={}){const t=r.useRef(void 0),n=r.useRef(void 0),[o,i]=r.useState({isDirty:!1,isValidating:!1,isLoading:H(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:H(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:o},e.defaultValues&&!H(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:n,...r}=_e(e);t.current={...r,formState:o}}const a=t.current.control;return a._options=e,T(()=>{const e=a._subscribe({formState:a._proxyFormState,callback:()=>i({...a._formState}),reRenderRoot:!0});return i(e=>({...e,isReady:!0})),a._formState.isReady=!0,e},[a]),r.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),r.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),r.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),r.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),r.useEffect(()=>{if(a._proxyFormState.isDirty){const e=a._getDirty();e!==o.isDirty&&a._subjects.state.next({isDirty:e})}},[a,o.isDirty]),r.useEffect(()=>{e.values&&!P(e.values,n.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),n.current=e.values,i(e=>({...e}))):a._resetDefaultValues()},[a,e.values]),r.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=E(o,a),t.current}},877:e=>{"use strict";e.exports=function(e,t){return{value:e,done:t}}},881:(e,t,n)=>{"use strict";n.d(t,{_H:()=>a,dg:()=>c,jq:()=>i,lV:()=>s,zE:()=>l});var r=n(3864),o=n(6052);const i=(0,r.AH)(["&:focus-within{outline:1px solid ",";}"],e=>{let{theme:t}=e;return(0,o.w5)(t.panelBackground,"rgba(255, 255, 255, 0.8)","rgba(0, 0, 0, 0.8)")}),a=r.Ay.div.withConfig({componentId:"sc-1n2166t-0"})(["padding:12px;box-shadow:0px 0px 1px rgba(0,0,0,0.24),0px 2px 6px rgba(0,0,0,0.04);border-radius:6px;margin:3px 0 2px;background:",";background-color:",";"],e=>{let{theme:t}=e;return t.panelBackground},e=>{let{theme:t}=e;return t.panelBackground}),s=r.Ay.form.withConfig({componentId:"sc-1n2166t-1"})(["display:flex;flex-direction:column;flex:1;",""],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 }"}),l=r.Ay.div.withConfig({componentId:"sc-1n2166t-2"})(["font-size:var(--_kindlychat-font-size-p);font-weight:500;display:flex;align-items:center;color:var(--panel-background-white-black-contrast-1743170834);& > svg{margin-right:4px;& > path{stroke:var(--panel-background-white-black-contrast-1743170834);}}"]),c=r.Ay.div.withConfig({componentId:"sc-1n2166t-3"})(["display:flex;flex-direction:row;align-self:flex-end;justify-content:flex-end;margin-top:16px;& > button{&:last-child{margin-left:12px;}}"])},892:(e,t,n)=>{"use strict";n.d(t,{Mx:()=>m,z5:()=>b,gm:()=>g,JL:()=>h});var r=n(5096),o=n(2221),i=n(9932),a=n.n(i);var s=n(4851);var l=n(628),c=n(8679);const u=new class{constructor(){a()(this,"locked",!1),a()(this,"waiters",[])}async acquire(){if(this.locked)return new Promise(e=>{this.waiters.push(e)}).then(()=>{this.locked=!0});this.locked=!0}release(){if(this.waiters.length>0){const e=this.waiters.shift();e&&e()}else this.locked=!1}},d=e=>async(t,n)=>{try{return await u.acquire(),await e(t,n)}finally{u.release()}},f=async(e,t)=>{const{auth:{jwt:n},connection:{token:r},environment:{PAT_HOST:i}}=t();if(n){const{headers:t}=(0,s.A)({jwt:n,token:r},{withCurrentUrl:!0});try{await e((0,l.et)(`${i}/chatbubble/${o.Ak}/auth/chat/invalidate`,{method:"POST",headers:t}))}catch(e){console.error("Failed to invalidate auth token:",e)}}return e({type:c.zZ}),!0};let p=null;const h=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p;return d(async(t,n)=>{var r,i;if(null===e)return!0;p=e;const a=n(),u=null===(r=a.connection)||void 0===r?void 0:r.token,d=null===(i=a.environment)||void 0===i?void 0:i.PAT_HOST;if(!u)return!1;const{headers:f}=(0,s.A)({token:u},{withCurrentUrl:!0});try{const{data:n,status:r}=await t((0,l.et)(`${d}/chatbubble/${o.Ak}/auth/identify`,{method:"POST",headers:f,body:e}));return r>=200&&r<400&&(t({type:c.qQ,...n}),p=null,!0)}catch(e){return console.error("Identity submission failed:",e),!1}})},g=e=>async(t,n)=>{p=e;const{connection:{token:r}}=n();r&&t(h(p))},m=()=>d(async(e,t)=>{var n,i,a;const u=t(),d=null===(n=u.chatbubble)||void 0===n?void 0:n.chatId,p=null===(i=u.connection)||void 0===i?void 0:i.token,h=null===(a=u.environment)||void 0===a?void 0:a.PAT_HOST,{getAuthToken:g}=r.Z;if(!d||!g)return await f(e,t),!1;let m;try{if(m=await g(d),!m)throw new Error("No JWT returned")}catch(n){return console.error("Chatbubble auth failed:",n),await f(e,t),!1}try{const{headers:t}=(0,s.A)({jwt:m,token:p},{withCurrentUrl:!0}),n=await e((0,l.et)(`${h}/chatbubble/${o.Ak}/auth/chat`,{method:"POST",headers:t}));return!(null==n||!n.data||(e({type:c.K_,jwt:m,avatarUrl:n.data.avatar_url,fullName:n.data.full_name}),0))}catch(n){return console.error("Server authentication failed:",n),await f(e,t),!1}}),b=()=>async(e,t)=>{var n,o,i;const a=t();if(null===(n=a.auth)||void 0===n||!n.isAuthenticated)return null;const s=null===(o=a.auth)||void 0===o?void 0:o.jwt,{getAuthToken:l}=r.Z;l&&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}(s)&&await e(m());const c=t();return null!==(i=c.auth)&&void 0!==i&&i.isAuthenticated?{Authorization:`Bearer ${c.auth.jwt}`}:null}},896:(e,t,n)=>{"use strict";function r(e){return e.touches||e.originalEvent.touches}n.d(t,{A:()=>i});let o=null;const i=e=>{let{setIndex:t,index:n,carousel:i}=e;return{handleTouchStart:e=>{const t=r(e)[0];o=t.clientX},handleTouchMove:e=>{if(!o)return;const a=r(e)[0].clientX;t(o-a>5?n+1:n-1,i),o=null},handleTouchEnd:()=>{o=null}}}},908:(e,t,n)=>{"use strict";var r=n(7551);e.exports=Array.isArray||function(e){return"Array"===r(e)}},916:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(9155),o=n(541),i=n(1695);function a(){const{nudges:e}=(0,o.d4)(i.Od);return(0,r.useMemo)(()=>{var t,n,r,o,i;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!==(i=null==e?void 0:e.multiple_choice_nudges)&&void 0!==i?i:[]]},[e])}},928:(e,t,n)=>{"use strict";n(4531)("match")},958:(e,t,n)=>{"use strict";n.d(t,{A:()=>M});var r=n(9749),o=n.n(r),i=n(9155),a=n(541),s=n(3864),l=n(6367),c=n(809),u=n(2221),d=n(8560),f=n(3791),p=n(6343),h=n(7182),g=n(1695),m=n(5767),b=n(2036),v=n(5353),y=n(8681);const x=s.Ay.div.withConfig({componentId:"sc-lsdvgt-0"})(["width:100%;position:relative;text-align:left;"]),w=(0,s.Ay)(c.Gr).withConfig({componentId:"sc-lsdvgt-1"})(["&& path{fill:none;}"]);var k=n(9223),S=n(9662),C=n(6101),_=n(1085);const{EXTERNAL_LINK:A,EMAIL:E,PHONE:T,CHECKBOX:j,SLIDER:I,END_CHAT:O}=u.lP,L=e=>null!=e&&e.match(/^https?:\/\//i)?e:`http://${e}`;function P(e,t){t?window.open(e,t):window.location.href=e}function M(e){var t,n,r;let{button:M,setCheckboxValue:N,checked:z,chatMessage:R,disabled:$=!1,handlers:D,isNudge:F=!1,onClick:B,submitButtonsList:H}=e;const U=(0,h.jL)(),V=(0,y.A)(M.button_type),{chatMessages:W,buttonClicks:G}=(0,a.d4)(g.DZ)||[],q=(0,a.d4)(g.$P)||[],{buttonText:K}=(0,i.useContext)(s.Dx),Y=(0,h.CU)(),{feedbackToDisplay:X}=(0,d.A)(),Z=o()(t=[A,T,E]).call(t,V),Q=o()(n=[j]).call(n,V),J=o()(r=[I]).call(r,V),ee=Boolean((Array.isArray(z)?z:[]).find(e=>e.id===M.id)),te=M.open_in_new_tab||void 0===M.open_in_new_tab?"_blank":"_self",ne=V===O,re=(0,i.useRef)(H);let oe="";V===T&&(oe="tel:"),V===E&&(oe="mailto:");const ie=(0,i.useCallback)(e=>{e.preventDefault();const t=Y.getState(),{token:n}=t.connection,{PAT_HOST:r}=t.environment,{attachments:o}=t.messages,i=W.map(e=>(0,v.A)(e,o,r,n)),a=(0,v.A)(R,o,r,n);if((0,l.fz)({event:e,handlers:D,buttonType:V,button:(0,b.A)(M),lastMessage:a,chatLog:i,renderedBy:null==q?void 0:q.renderedBy}))return;"function"==typeof B&&B(),F||U((0,p.Bd)(M,R,z,re.current));const{href:s,target:c}=e.currentTarget;s&&(c&&"_self"!==c?P(s,c):setTimeout(()=>{P(s,c)},250))},[V,R,W,M,U,D,z,re,B,null==q?void 0:q.renderedBy,F,Y]),ae=(0,f.A)(ie,3e3),se=(null!=G?G:[]).find(e=>{let{chatMessageId:t,buttonId:n}=e;return t===(null==R?void 0:R.id)&&n===M.id}),le=(0,i.useCallback)(()=>{null==N||N(M)},[M,N]);return(0,i.useEffect)(()=>{se&&Q&&!ee&&(null==N||N(M))},[se,Q,M,N,ee]),J&&null!=M&&M.slider_details?(0,_.jsx)("div",{children:(0,_.jsx)(C.A,{name:`slider_${M.id}`,onChange:e=>{const t=parseFloat(e);var n;t&&Array.isArray(re.current)&&(null===(n=re.current)||void 0===n||n.map(e=>e.id===M.id?(e.slider_details.value=t,e):e))},from:M.slider_details.from_value,to:M.slider_details.to_value,value:M.slider_details.value,step:M.slider_details.step_value,affix:M.slider_details.affix,affixValue:M.slider_details.affix_value,ariaLabel:M.label})}):(0,_.jsxs)(k.A,{cy:"message-button",isCheckbox:Q,type:"button",...Z&&{href:`${oe}${V===A?L(M.value):M.value}`,target:`${V!==A||F?"_self":te}`},...Q&&{style:{backgroundColor:"transparent",background:"transparent"},role:"checkbox","aria-label":M.label,"aria-checked":ee?"true":"false"},icon:V===A&&F&&(0,_.jsx)(c.fl,{})||V===A&&!F&&(0,_.jsx)(w,{color:K,size:20}),disabled:$,onClick:e=>Q?le():Z?ie(e):(ne&&(X?(U((0,m.WG)({ratingSystem:X.rating_scale.rating_system,triggerType:X.trigger_type,formTitle:X.form_title,step:"RATING_SCALE"})),U((0,m.ZG)("button_click")),U((0,p.zn)("END_CHAT"))):U((0,p.wQ)("CANCEL_CHAT"))),ae(e)),children:[Q&&(0,_.jsx)(x,{children:(0,_.jsx)(S.A,{disabled:!0,"aria-disabled":!0,inputType:u.lP.CHECKBOX,name:`checkbox-${M.id}`,id:M.id,checked:ee,label:M.label})}),Q?"":M.label]})}},960:(e,t,n)=>{"use strict";var r=n(9098),o=n(701),i=n(6281),a=n(459),s=n(8141),l=n(2044),c=s("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!l},{keyFor:function(e){if(!i(e))throw new TypeError(a(e)+" is not a symbol");if(o(c,e))return c[e]}})},1003:(e,t,n)=>{"use strict";var r=n(8099),o=n(8900),i=n(2769),a=function(e){return i(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?a(r[e])||a(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),i=n(8130),a=function(e){return function(t,n,a){var s=r(t),l=i(s);if(0===l)return!e&&-1;var c,u=o(a,l);if(e&&n!=n){for(;l>u;)if((c=s[u++])!=c)return!0}else for(;l>u;u++)if((e||u in s)&&s[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},1019:(e,t,n)=>{"use strict";n(3855);var r=n(2856);e.exports=r("String","includes")},1033:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>Ys});var r=n(9155),o=n.n(r),i=n(3864),a=n(8035);const s=i.Ay.div.withConfig({componentId:"sc-164l1vq-0"})(["font-size:var(--_kindlychat-font-size-m);text-align:initial;line-height:18px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;height:100%;z-index:",";pointer-events:auto;@media ","{max-height:unset;}",""],e=>e.$zIndex+5,a.jO.maxTablet,e=>{let{$inspectorOpen:t}=e;return t&&"display: flex; flex-direction: row-reverse;"});var l=n(2221),c=n(541),u=n(1695);const d=i.Ay.div.withConfig({componentId:"sc-huyjcb-0"})(["margin:20px;display:flex;flex-direction:column;"]),f=i.Ay.hr.withConfig({componentId:"sc-huyjcb-1"})(["border-top:1px solid rgb(243,243,244);width:100%;margin:0;"]),p=i.Ay.button.withConfig({componentId:"sc-huyjcb-2"})(["text-align:center;margin:5px 5px 0 5px;background:rgb(243,243,244);border:1px solid rgb(243,243,244);font-weight:600;padding:7px 16px;border-radius:5px;cursor:pointer;outline:none;&:hover{background:rgb(230,230,230);}&:disabled{background:white;color:rgb(206,206,206);border-color:rgb(206,206,206);cursor:default;}"]),h=i.Ay.div.withConfig({componentId:"sc-huyjcb-3"})(["display:flex;align-items:baseline;font-size:calc(var(--_kindlychat-font-size-sm) * 1.067);",""],e=>{let{$spaceBetween:t}=e;return t?"justify-content: space-between;":""}),g=i.Ay.div.withConfig({componentId:"sc-huyjcb-4"})(["padding:1px 3px;border-radius:3px;font-size:var(--_kindlychat-font-size-sm);margin-right:5px;background:rgba(255,74,156,0.25);"]),m=i.Ay.span.withConfig({componentId:"sc-huyjcb-5"})(["height:7px;width:7px;background:rgb(255,172,74);border-radius:50%;margin-right:5px;bottom:1px;position:relative;"]),b=(i.Ay.span.withConfig({componentId:"sc-huyjcb-6"})(["margin:0 5px;color:gray;"]),i.Ay.div.withConfig({componentId:"sc-huyjcb-7"})(["padding:1px 6px;border-radius:3px;border:1px solid lightgray;text-transform:uppercase;font-size:var(--_kindlychat-font-size-sm);margin:0 5px 3px 5px;white-space:nowrap;",""],e=>{let{$filled:t}=e;return t?"background: rgb(0, 105, 255); color: white;":""})),v=i.Ay.a.withConfig({componentId:"sc-huyjcb-8"})(["text-decoration:none;color:initial;cursor:pointer;&:hover{color:rgb(0,105,255);}"]);var y=n(8789),x=n(1085);const w=()=>{};function k(){return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(d,{children:(0,x.jsx)(y.H5,{children:"No messages yet!"})}),(0,x.jsxs)(h,{$spaceBetween:!0,children:[(0,x.jsx)(p,{disabled:!0,onClick:w,children:"Show previous"}),(0,x.jsx)(p,{disabled:!0,onClick:w,children:"Show next"})]})]})}function S(e){let{patternContextMatch:t}=e;const[n,r]=Object.entries(t)[0];return(0,x.jsxs)(d,{children:[(0,x.jsx)(y.H5,{children:"Slot / Pattern context"}),(0,x.jsxs)(h,{children:[(0,x.jsx)(g,{children:n}),(0,x.jsx)("span",{children:r})]})]})}const C=e=>{let{botId:t,exchangeType:n,exchangeId:r}=e;return t&&n&&r?`/bot/${t}/build/${("usersays"===n?"dialogue":n).replace("_","-")}/${r}`:null};var _=n(9749),A=n.n(_);const{SAMPLE_MATCH:E,KEYWORD_EXACT_MATCH:T,KEYWORD_MENTION:j,PATTERN_MATCH:I,ZODIAC:O}=l.Gi,L=e=>(null!=e?e:"").toLowerCase().replace(/[-_]/g," "),P=e=>{switch(e){case E:case O:return"sample";case I:return"pattern";case T:case j:return"keyword";default:return L(e)}};function M(e){var t,n,r;let{handler:o,score:i,exchangeType:a,sender:s,fromWebhook:c,label:u}=e;return"string"==typeof u?(0,x.jsx)(b,{children:u}):o&&A()(t=[E,O]).call(t,o)&&i?(0,x.jsx)(b,{$filled:!0,title:"Confidence score",children:`${Math.round(100*i)} %`}):o&&A()(n=Object.values(l.Gi)).call(n,o)?(0,x.jsx)(b,{children:P(o)}):c?(0,x.jsx)(b,{children:"webhook"}):"string"==typeof a?(0,x.jsx)(b,{children:L(a)}):s&&A()(r=Object.values(l.bS)).call(r,s)?(0,x.jsx)(b,{children:L(s)}):null}var N=n(3058);const z=i.Ay.span.withConfig({componentId:"sc-1jsyulb-0"})(["",""],N.uh);function R(){return(0,x.jsx)(z,{children:"(opens in a new tab)"})}const $=function(e){let{children:t,url:n}=e;return n?(0,x.jsxs)(v,{target:"_blank",rel:"noopener noreferrer",href:n,children:[t,(0,x.jsx)(R,{})]}):t},D=function(e){let{replyCandidates:t,botId:n}=e;const o=(0,r.useMemo)(()=>t.filter(e=>{let{selected:t,sample:n,title:r}=e;return!t&&(n||r)}),[t]);return 0===(null==o?void 0:o.length)?null:(0,x.jsxs)(d,{children:[(0,x.jsx)(y.H5,{children:"Potential dialogues"}),o.map(e=>{let{_id:t,score:r,sample:o,title:i,dialogue_id:a}=e;return(0,x.jsx)($,{url:C({botId:n,exchangeType:"usersays",exchangeId:a}),children:(0,x.jsxs)(h,{children:[(0,x.jsx)(M,{handler:l.Gi.SAMPLE_MATCH,score:r}),(0,x.jsx)(m,{}),(0,x.jsx)("span",{children:o||i})]})},`reply-candidate-${t}`)})]})};function F(e){let{botId:t,exchangeType:n,exchangeId:r,children:o}=e;const i=C({botId:t,exchangeType:n,exchangeId:r});return(0,x.jsx)($,{url:i,children:(0,x.jsx)(h,{children:o})})}const B=(e,t)=>`${(e||"").slice(0,t)}${(null==e?void 0:e.length)>t?"...":""}`,H=40;function U(e){let{fromBot:t,fromWebhook:n,handler:r,score:o,title:i,message:a,exchangeType:s,exchangeId:l,botId:c,isFollowup:u,sender:f}=e;return(0,x.jsxs)(d,{children:[(0,x.jsx)(y.H5,{children:"Message info"}),t&&(0,x.jsxs)(h,{$spaceBetween:!0,children:[i&&(0,x.jsxs)(F,{botId:c,exchangeType:s,exchangeId:l,children:[(0,x.jsx)(m,{}),(0,x.jsx)("span",{children:B(i,H)})]}),!i&&(0,x.jsx)("span",{children:B(a,H)}),(0,x.jsxs)(h,{children:[(0,x.jsx)(M,{handler:r,score:o,exchangeType:s,sender:f,fromWebhook:n}),u&&(0,x.jsx)(M,{exchangeType:"followup"})]})]}),!t&&(0,x.jsxs)(h,{$spaceBetween:!0,children:[B(a,H),(0,x.jsx)(M,{label:"user"})]})]})}function V(e){let{chatMessage:{message:t,score:n,title:r,handler:o,sender:i,from_bot:a,bot_id:s,from_webhook:l,reply_candidates:c,exchange_type:u,exchange_id:d,is_followup:p,pattern_context_match:h}}=e;const g=Object.keys(h||{}).length>0;return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(U,{handler:o,fromBot:a,fromWebhook:l,score:n,title:r,message:t,exchangeType:u,exchangeId:d,botId:s,isFollowup:p,sender:i}),(0,x.jsx)(f,{}),g&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(S,{patternContextMatch:h}),(0,x.jsx)(f,{})]}),(null==c?void 0:c.length)>1&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(D,{replyCandidates:c,botId:s}),(0,x.jsx)(f,{})]})]})}var W=n(9886),G=n(6343),q=n(2475),K=n(2628);const Y=(0,i.i7)(["0%{visibility:visible;opacity:0;}1%{opacity:0;transform:translateY(20px);}100%{opacity:1;transform:translateY(0);}"]),X=(0,i.AH)(["",";animation-name:",";"],(0,q.qL)(),Y),Z=(0,i.i7)(["0%{opacity:1;transform:translateY(0px);}99%{opacity:0;transform:translateY(20px);}100%{opacity:0;visibility:hidden;}"]),Q=(0,i.AH)(["",";animation-name:",";"],(0,q.qL)(),Z),J=(0,i.AH)(["bottom:0px;right:0px;"]),ee=(0,i.AH)(["width:100%;height:100%;max-height:unset;min-height:320px;",";border-radius:0;visibility:",";"],J,e=>{let{$active:t}=e;return t?"visible":"hidden"}),te=(0,i.AH)(["max-height:",";height:",";width:",";"],e=>{let{$fullscreen:t}=e;return t?"100%":"645px"},e=>{let{$fullscreen:t}=e;return t?"100%":"645px"},e=>{let{$fullscreen:t}=e;return t?"100%":"360px"}),ne=(0,i.AH)(["bottom:85px;right:10px;border-radius:12px;@media (max-height:","){min-height:380px;height:calc(100vh - ",");}"],"950px",e=>{let{$offsetHeight:t}=e;return t||0}),re=(0,i.AH)([""," "," ",""],e=>{let{$fullscreen:t}=e;return t?J:ne},e=>{let{$active:t}=e;return t?te:(0,q.vW)()},e=>{let{$fullscreen:t,$chatHasStarted:n,$active:r}=e;return!t&&!n&&(e=>{let{$active:t}=e;return t?X:Q})({$active:r})}),oe=(0,i.AH)(["right:369px;display:flex;flex-direction:column;justify-content:flex-start;z-index:19;border-radius:6px 0 0 6px;background:#ffffff;> &:last-child{margin:auto 20px 20px;}"]),ie=i.Ay.div.withConfig({componentId:"sc-4u7nsm-0"})(["display:flex;z-index:20;overflow:hidden;flex-direction:column;box-shadow:",";background:",";",";"," @media ","{",";}",""],a.FR.level2,e=>{let{theme:t}=e;return t.background},re,e=>{let{$inspectorContainer:t}=e;return t&&oe},a.jO.maxTablet,ee,(0,K.A)()&&ee);function ae(){const{active:e,chatHasStarted:t}=(0,c.d4)(u.$P),{offsetHeight:n}=(0,c.d4)(u.Od),{currentMessage:o,nextMessage:i,prevMessage:a,isFirstMessage:s,isLastMessage:l}=function(){var e,t;const n=(0,c.wA)(),{chatMessages:o}=(0,c.d4)(u.DZ),{currentMessageId:i}=(0,c.d4)(u.qV),a=i||(null===(e=o.slice(-1)[0])||void 0===e?void 0:e.id),s=o.findIndex(e=>{let{id:t}=e;return t===a}),l=(0,r.useCallback)(()=>{n((0,G.F3)(o[s+1].id))},[o,s,n]),d=(0,r.useCallback)(()=>{n((0,G.F3)(o[s-1].id))},[o,s,n]),f=null!==(t=null==o?void 0:o.length)&&void 0!==t?t:0,p=(0,W.A)(f),h=0===s,g=s===f-1;return(0,r.useEffect)(()=>{f>p&&n((0,G.F3)())},[n,f,p]),{currentMessage:o[s],nextMessage:l,prevMessage:d,isFirstMessage:h,isLastMessage:g}}();return(0,x.jsxs)(ie,{$chatHasStarted:t,$active:e,$fullscreen:!1,$offsetHeight:n,$inspectorContainer:!0,children:[o&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(V,{chatMessage:o}),(0,x.jsxs)(h,{$spaceBetween:!0,children:[(0,x.jsx)(p,{disabled:s,onClick:a,children:"Show previous"}),(0,x.jsx)(p,{disabled:l,onClick:i,children:"Show next"})]})]}),!o&&(0,x.jsx)(k,{})]})}var se=n(4927);const le=i.Ay.div.withConfig({componentId:"sc-14jyotv-0"})(["border-radius:0;box-shadow:1px 2px 5px 2px ",";line-height:23px;background:",";background-color:",";font-size:var(--_kindlychat-font-size-p);font-weight:500;transform-origin:top;display:flex;z-index:15;position:absolute;padding:0 10px;transform:",";transition:",";width:100%;top:55px;span{font-size:var(--_kindlychat-font-size-p);margin-right:7px;}"],a.Tj.shadowColor,a.Tj.warningColor,a.Tj.warningColor,e=>{let{$show:t}=e;return t?"scaleY(1)":"scaleY(0)"},e=>{let{$show:t}=e;return t?"transform 0.15s ease-in":"transform 0.15s ease-out"}),ce=i.Ay.div.withConfig({componentId:"sc-14jyotv-1"})(["margin:5px 0;display:flex;color:#2c2c2c;font-size:inherit;font-weight:inherit;line-height:24px;"]),ue=(0,i.Ay)(se.N_).withConfig({componentId:"sc-14jyotv-2"})(["color:#0063a2;"]);function de(){const{text:e,url:t,show:n}=(0,c.d4)(u.uF);return n?(0,x.jsxs)(le,{$show:n,children:[(0,x.jsxs)(ce,{children:[(0,x.jsx)("span",{children:"!"}),e]}),t&&(0,x.jsxs)(ue,{href:t,target:"_blank",children:["url",(0,x.jsx)(R,{})]})]}):null}var fe=n(5781),pe=n(1328);const he=e=>{if("number"==typeof e)return 10===e.toString().length&&(e*=1e3),new Date(e);if("string"==typeof e){const t=e.replace(/\s+/g,"T");return new Date(t)}return e instanceof Date?e:new Date(0)};function ge(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=he(e),o=new Date,i=r.toDateString()===o.toDateString(),a=t||n||"en",s=(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 s(a,i)}catch(e){return s(n,i)}}var me=n(6052);const be=(0,i.i7)(["0%{opacity:0;transform:translateY(2px);}100%{opacity:1;transform:translateY(0);}"]),ve=(0,i.AH)(["",";animation-name:",";"],(0,q.qL)(300),be),ye=(0,i.AH)(["flex-direction:row-reverse;"]),xe=(0,i.AH)(["flex-direction:row;"]),we=(0,i.AH)(["background:#e3e3e7;padding:0 30px;margin:10px -30px;position:relative;&:before{content:'';position:absolute;background:rgb(153,153,153);width:4px;height:calc(100% + 20px);left:0;z-index:1;}&:after{content:'';position:absolute;display:inline-block;width:100%;height:20px;background:#e3e3e7;top:100%;left:0;}"]),ke=i.Ay.div.withConfig({componentId:"sc-drt5la-0"})(["",";",";&:nth-child(1){padding-top:10px;}"],e=>e.$fromBot?xe:ye,e=>{let{$inspected:t}=e;return t&&we}),Se=i.Ay.span.withConfig({componentId:"sc-drt5la-1"})(["display:flex;align-items:baseline;flex-wrap:nowrap;justify-content:center;opacity:0;margin-bottom:16px;",";@media (prefers-reduced-motion){animation:none;opacity:1;}"],ve),Ce=(0,i.Ay)(y.mt).withConfig({componentId:"sc-drt5la-2"})(["opacity:1;margin:0;color:",";"],e=>{let{theme:t}=e;return(0,me.w5)(t.background,"#FFFFFF","#000000")}),_e=i.Ay.div.withConfig({componentId:"sc-drt5la-3"})(["display:block;width:100%;",""],e=>e.$isLastGroupMessage&&"margin-bottom: 16px;");function Ae(e){let{fromBot:t,created:n,shouldShowTime:r,children:o,inspected:i,disclaimerComponent:a,isLastGroupMessage:s}=e;const{currentLanguageCode:c}=(0,pe.A)();return(0,x.jsx)(ke,{$fromBot:t,$inspected:i,"data-testid":l.gH,children:(0,x.jsxs)(_e,{$isLastGroupMessage:s,children:[a,r&&(0,x.jsx)(Se,{children:(0,x.jsx)(Ce,{children:ge(n,c)})}),o]})})}var Ee=n(1346);function Te(e){return(0,x.jsxs)("svg",{version:"1.1",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,x.jsx)("title",{children:"Unsuccessful upload"}),(0,x.jsx)("g",{fill:"none",fillRule:"evenodd",children:(0,x.jsx)("g",{transform:"translate(-1128 -635)",fill:"#7B7B7B",fillRule:"nonzero",children:(0,x.jsx)("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"})})})]})}function je(e){return(0,x.jsxs)("svg",{...e,version:"1.1",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("title",{children:"Loading image upload"}),(0,x.jsx)("g",{fill:"none",fillRule:"evenodd",children:(0,x.jsx)("g",{transform:"translate(-685 -659)",fill:"#7B7B7B",fillRule:"nonzero",children:(0,x.jsxs)("g",{transform:"translate(685 659)",children:[(0,x.jsx)("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"}),(0,x.jsx)("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"}),(0,x.jsx)("circle",{cx:"7.5",cy:"7.5",r:"1.5"})]})})})]})}var Ie=n(9514),Oe=n(6367),Le=n(809);function Pe(e){let{color:t="black",...n}=e;return(0,x.jsxs)("svg",{...n,width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("path",{d:"M12 4.75V6.25",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,x.jsx)("path",{d:"M17.1265 6.87347L16.0659 7.93413",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,x.jsx)("path",{d:"M19.25 12L17.75 12",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,x.jsx)("path",{d:"M17.1265 17.1265L16.0659 16.0659",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,x.jsx)("path",{d:"M12 17.75V19.25",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,x.jsx)("path",{d:"M7.93413 16.0659L6.87347 17.1265",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,x.jsx)("path",{d:"M6.24997 12L4.74997 12",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,x.jsx)("path",{d:"M7.93413 7.93413L6.87347 6.87347",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}const Me=i.Ay.button.withConfig({componentId:"sc-19ca8jq-0"})(["position:absolute;top:24px;right:24px;border:1px solid rgba(0,0,0,0.2);background:rgba(255,255,255,0.8);border-radius:6px;padding:5px;box-shadow:0 2px 4px rgba(0,0,0,0.1);transition:all 0.2s ease;cursor:pointer;& svg{display:block;}"]),Ne=i.Ay.dialog.withConfig({componentId:"sc-19ca8jq-1"})(["all:unset;position:fixed;display:flex;inset:0;align-items:center;justify-content:center;&::backdrop{background:rgba(0,0,0,0.5);}"]),ze=i.Ay.img.withConfig({componentId:"sc-19ca8jq-2"})(["width:auto;max-width:100%;max-height:100%;margin:auto;padding:24px;"]),Re=()=>{const[e,t]=(0,r.useState)(null),[n,o]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(!e)return;const t=[],n=[...e.getElementsByTagName("img")].filter(e=>!e.complete||!e.naturalWidth).map(e=>new Promise(n=>{t.push({img:e,resolver:n}),e.addEventListener("load",n,{once:!0}),e.addEventListener("error",n,{once:!0})}));return 0===n.length?o(!0):Promise.all(n).then(()=>{o(!0)}),()=>{t.forEach(e=>{let{img:t,resolver:n}=e;t.removeEventListener("load",n),t.removeEventListener("error",n)})}},[e]),[t,n]};var $e=n(2036),De=n(7051);function Fe(e){const{browserName:t}=function(){const{userAgent:e}=navigator;let t;return t=e.match(/chrome|chromium|crios/i)?"chrome":e.match(/firefox|fxios/i)?"firefox":e.match(/safari/i)?"safari":e.match(/opr\//i)?"opera":e.match(/edg/i)?"edge":"No browser detection",{browserName:t,userAgent:e}}();return e===t}const Be="6px",He=()=>`\n /* If browser support backdrop-filter */\n ${Fe("chrome")&&"\n background: rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.2);\n backdrop-filter: blur(8px);\n opacity: 1;\n\n &:hover {\n background: rgba(255, 255, 255, 0.4);\n background-color: rgba(255, 255, 255, 0.4);\n\n + svg path {\n mix-blend-mode: unset;\n stroke: black;\n }\n }\n "}\n`,Ue=()=>`\n position: absolute;\n pointer-events: none;\n \n path {\n stroke: #000;\n }\n\n ${Fe("chrome")&&"\n path {\n mix-blend-mode: difference;\n stroke: white;\n }\n "}\n\n `,Ve=i.Ay.div.withConfig({componentId:"sc-1uha618-0"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:",";position:relative;width:100%;min-height:100px;"," background:#232F41;color:#fff;font-size:var(--_kindlychat-font-size-p);"],e=>{let{$hasCaption:t}=e;return t?`${Be} ${Be} 0 0`:Be},e=>e.$imageHeight&&`height: ${e.$imageHeight}px;`),We=i.Ay.div.withConfig({componentId:"sc-1uha618-1"})(["position:relative;overflow:hidden;margin-left:-25px;width:calc(100% + 50px);> div{",";}"],e=>e.$active&&"\n position: relative;\n width: 100000%;\n display: flex;\n "),Ge=i.Ay.div.withConfig({componentId:"sc-1uha618-2"})(["position:relative;display:flex;flex-direction:column;width:","px;height:fit-content;margin-right:5px;margin-top:2px;margin-bottom:2px;border-radius:",";box-shadow:0px 2px 6px rgba(0,0,0,0.06);overflow:hidden;color:",";",";&::after{content:'';position:absolute;inset:0;pointer-events:none;box-shadow:inset 0px 0px 1px rgba(0,0,0,0.32);border-radius:",";}"],e=>e.$imageWidth,Be,a.qd.textColor,e=>{let{$first:t,$isCarousel:n}=e;return t||!n?"margin-left: 25px":""},Be),qe=(0,i.AH)(["position:relative;display:",";min-height:100px;",""],e=>e.hidden?"none":"block",e=>e.$isCarousel?`height: ${e.$imageHeight}px;`:"height: auto;"),Ke=i.Ay.a.withConfig({componentId:"sc-1uha618-3"})(["",""],qe),Ye=i.Ay.div.withConfig({componentId:"sc-1uha618-4"})(["",""],qe),Xe=i.Ay.img.withConfig({componentId:"sc-1uha618-5"})(["max-width:100%;position:relative;width:auto;max-height:350px;min-height:100px;transition:border-width 0.15s ease;display:block;"," ",""],e=>e.$carousel&&e.$imageHeight&&e.$imageWidth?`\n height: ${e.$imageHeight}px; \n object-fit: cover; \n width: ${e.$imageWidth}px;\n `:"",N.sF),Ze=i.Ay.div.withConfig({componentId:"sc-1uha618-6"})(["background:",";> *:last-child{margin-bottom:8px;}"],e=>{let{theme:t}=e;return t.panelBackground}),Qe=i.Ay.h3.withConfig({componentId:"sc-1uha618-7"})(["font-weight:500;margin:6px 8px 0px 8px;font-size:var(--_kindlychat-font-size-p);line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--panel-background-white-black-contrast-1743170834);"]),Je=i.Ay.div.withConfig({componentId:"sc-1uha618-8"})(["margin:0;margin:2px 8px 8px 8px;font-size:var(--_kindlychat-font-size-sm);line-height:16px;color:var(--panel-background-white-black-contrast-1743170834);white-space:pre-line;opacity:0.6;"]),et=i.Ay.button.withConfig({componentId:"sc-1uha618-9"})(["all:unset;position:relative;display:flex;height:35px;max-width:100%;font-size:var(--_kindlychat-font-size-p);align-items:center;justify-content:center;padding:4px 12px;color:var(--panel-background-white-black-contrast-1743170834);background-color:",";border-top:1px solid ",";font-weight:500;gap:6px;cursor:pointer;"," &:hover{filter:brightness(0.9);}> span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}svg{flex-shrink:0;& path{stroke:currentColor;}}&:focus-visible{&::after{content:'';position:absolute;inset:3px;outline:2px solid white;mix-blend-mode:difference;}}"],e=>{let{theme:t}=e;return t.panelBackground},e=>{let{theme:t}=e;return(0,me.w5)(t.panelBackground,"rgba(255, 255, 255, 0.08)","rgba(0, 0, 0, 0.08)")},e=>{let{$inView:t}=e;return!t&&"opacity: 0.5;"}),tt=i.Ay.button.withConfig({componentId:"sc-1uha618-10"})(["position:absolute;top:50%;transform:translateY(-50%);background:#fff;background-color:#fff;border:none;width:36px;height:36px;display:flex;justify-content:center;align-items:center;cursor:pointer;padding:0 0 2px 0px;border-radius:100px;opacity:0.8;transition:all 0.2s ease;box-shadow:0px 2px 6px rgba(0,0,0,0.04);&:hover{opacity:1;}&:active{background-color:#efeeee;opacity:1;}"," "," ",";",""],N.sF,e=>{let{$next:t}=e;return t?"right: 10px;":"left: 10px;"},e=>{let{$disabled:t}=e;return t&&"display: none"},He),nt=(0,i.Ay)(Le.A6).withConfig({componentId:"sc-1uha618-11"})(["top:calc(50% - 13px);left:15px;",";",""],e=>{let{disabled:t}=e;return t&&"display: none"},Ue),rt=(0,i.Ay)(Le.fl).withConfig({componentId:"sc-1uha618-12"})(["top:calc(50% - 13px);right:15px;",";",""],e=>{let{disabled:t}=e;return t&&"display: none"},Ue),ot=i.Ay.div.withConfig({componentId:"sc-1uha618-13"})(["position:absolute;left:",";bottom:",";background:#fff;display:flex;align-items:center;justify-content:center;width:24px;height:24px;opacity:0.8;border-radius:50%;pointer-events:none;",""],a.Nl.wrapper,a.Nl.wrapper,He),it=(0,i.Ay)(Le.qY).withConfig({componentId:"sc-1uha618-14"})(["bottom:",";left:",";",""],a.Nl.icon,a.Nl.icon,Ue),at=(0,i.Ay)(Le.Gr).withConfig({componentId:"sc-1uha618-15"})(["position:relative;left:-2px;top:1px;"]),st=i.Ay.button.withConfig({componentId:"sc-1uha618-16"})(["display:",";position:absolute;top:",";right:",";width:24px;height:24px;align-items:center;justify-content:center;border-radius:2px;border:none;cursor:pointer;background:#fff;box-shadow:0px 2px 6px rgba(0,0,0,0.04);opacity:0.8;padding:0px 0 0 1px;"," &:hover{opacity:1;}",""],e=>e.$inView?"flex":"none",a.Nl.wrapper,a.Nl.wrapper,N.sF,He),lt=(0,i.Ay)(Le.gp).withConfig({componentId:"sc-1uha618-17"})(["top:",";right:",";",""],a.Nl.icon,a.Nl.icon,Ue);function ct(e){return(0,x.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,x.jsx)("path",{d:"M19.25 19.25L15.5 15.5M4.75 11C4.75 7.54822 7.54822 4.75 11 4.75C14.4518 4.75 17.25 7.54822 17.25 11C17.25 14.4518 14.4518 17.25 11 17.25C7.54822 17.25 4.75 14.4518 4.75 11Z",stroke:"#333333",strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"})})}const ut=(0,i.i7)(["10%{transform:translateY(-5px);}50%{opacity:0.5;transform:translateY(0);}"]),dt=((0,i.i7)(["from{max-height:200px;}to{max-height:0;overflow:hidden;}"]),i.Ay.div.withConfig({componentId:"sc-kwvd9-0"})(["background:none;will-change:transform,opacity,max-height;width:auto;display:grid;position:relative;grid-template-columns:37px auto 37px;@media (prefers-reduced-motion){animation:none;}"])),ft=i.Ay.div.withConfig({componentId:"sc-kwvd9-1"})(["border-radius:15px;position:relative;display:inline-flex;flex-direction:row;border:0;margin:8px 0px;padding:10px 8px;align-self:center;background:",";background-color:",";"],e=>"image"===e.$loadingType?"transparent":e.theme.botMessageBackground,e=>"image"===e.$loadingType?"transparent":e.theme.botMessageBackground),pt=i.Ay.span.withConfig({componentId:"sc-kwvd9-2"})(["height:3px;width:3px;margin:0 2px;background:",";background-color:",";display:block;opacity:1;border-radius:100px;&:nth-of-type(1){animation:1s "," infinite 0.3s;}&:nth-of-type(2){animation:1s "," infinite 0.6s;}&:nth-of-type(3){animation:1s "," infinite 0.9s;}"],e=>{let{theme:t,$loadingType:n}=e;return"image"===n?"#fff":(0,me.w5)(t.botMessageBackground,"#FFF","#000")},e=>{let{theme:t,$loadingType:n}=e;return"image"===n?"#fff":(0,me.w5)(t.botMessageBackground,"#FFF","#000")},ut,ut,ut),ht=i.Ay.div.withConfig({componentId:"sc-kwvd9-3"})(["font-size:var(--_kindlychat-font-size-sm);display:flex;flex-direction:row;align-items:center;line-height:16px;margin:3px auto 0;padding:0 8px;color:",";"],e=>{let{theme:t}=e;return(0,me.w5)(t.background,"rgba(255, 255, 255, 0.6)","rgba(0, 0, 0, 0.6)")}),gt=i.Ay.span.withConfig({componentId:"sc-kwvd9-4"})(["font-weight:500;"]),mt=i.Ay.span.withConfig({componentId:"sc-kwvd9-5"})(["display:flex;flex-direction:row;align-items:center;"]),bt=i.Ay.div.withConfig({componentId:"sc-kwvd9-6"})(["display:inline-block;"]);function vt(e){let{loadingType:t,text:n,botName:r}=e;return(0,x.jsxs)(dt,{"data-testid":l.dT,children:[(0,x.jsxs)(ft,{$loadingType:t,children:[(0,x.jsx)(pt,{$loadingType:t}),(0,x.jsx)(pt,{$loadingType:t}),(0,x.jsx)(pt,{$loadingType:t})]}),n&&(0,x.jsxs)(ht,{children:[(0,x.jsx)(mt,{children:(0,x.jsx)(ct,{width:16,height:16})})," ",(0,x.jsxs)(bt,{children:[(0,x.jsx)(gt,{children:r})," ",n]})]})]})}function yt(e){let{imageWidth:t,imageHeight:n,hasCaption:r}=e;return(0,x.jsxs)(Ve,{title:"Loading image...",$imageWidth:t,$imageHeight:n?Number(n):void 0,$hasCaption:r,children:[(0,x.jsx)(vt,{loadingType:"image"}),(0,x.jsx)("div",{children:"Loading image"})]})}const xt=(0,i.i7)(["from{background-position:0%;}to{background-position:-200%;}"]),wt=i.Ay.div.withConfig({componentId:"sc-jo8x8h-0"})(["position:absolute;left:0;width:100%;top:0;height:100%;color:black;z-index:1;display:flex;justify-content:center;align-items:center;pointer-events:none;opacity:",";transition:opacity "," ease-out;div:first-child{height:100%;width:100%;position:absolute;background:",";background-size:200% 100%;animation:1.3s linear "," infinite 0s;opacity:0.5;}div:nth-child(2){height:100%;width:100%;position:absolute;background:white;opacity:",";}div:nth-child(3){z-index:1;}"],e=>{let{$finished:t}=e;return t?0:1},e=>{let{$hideTransitionLength:t}=e;return`${t}s`},"\n linear-gradient(\n 90deg,\n rgba(255, 255, 255, 1) 0%,\n rgba(255, 255, 255, 0.738) 9.5%,\n rgba(255, 255, 255, 0.541) 17%,\n rgba(255, 255, 255, 0.382) 23.5%,\n rgba(255, 255, 255, 0.278) 28.3%,\n rgba(255, 255, 255, 0.194) 32.5%,\n rgba(255, 255, 255, 0.126) 36.5%,\n rgba(255, 255, 255, 0.075) 40.1%,\n rgba(255, 255, 255, 0.042) 43.1%,\n rgba(255, 255, 255, 0.021) 45.5%,\n rgba(255, 255, 255, 0.008) 46.3%,\n rgba(255, 255, 255, 0.002) 49.3%,\n rgba(255, 255, 255, 0) 50%,\n rgba(255, 255, 255, 0.002) 50.7%,\n rgba(255, 255, 255, 0.008) 53.7%,\n rgba(255, 255, 255, 0.021) 54.5%,\n rgba(255, 255, 255, 0.042) 59.9%,\n rgba(255, 255, 255, 0.075) 61.7%,\n rgba(255, 255, 255, 0.126) 63.5%,\n rgba(255, 255, 255, 0.194) 67.5%,\n rgba(255, 255, 255, 0.278) 71.7%,\n rgba(255, 255, 255, 0.382) 76.5%,\n rgba(255, 255, 255, 0.541) 83%,\n rgba(255, 255, 255, 0.738) 90.5%,\n rgba(255, 255, 255, 1) 100%\n )\n",xt,e=>{let{$opacity:t}=e;return t}),kt=.3;function St(e){let{loading:t,children:n,opacity:o=.6}=e;const[i,a]=(0,r.useState)(!t);return(0,r.useEffect)(()=>{i||t||setTimeout(()=>a(!0),1e3*kt)},[i,t]),i?null:(0,x.jsxs)(wt,{$finished:!t,$hideTransitionLength:kt,$opacity:o,children:[(0,x.jsx)("div",{}),(0,x.jsx)("div",{}),(0,x.jsx)("div",{children:n})]})}const Ct={link:(0,x.jsx)(at,{size:20}),dialogue_trigger:(0,x.jsx)(Pe,{})};function _t(e){var t,n,o,i;let{image:a,first:s,isCarousel:d,fromBot:f,inView:p,imageWidth:h,imageHeight:g,loading:m}=e;const[b,v]=Re(),y=(0,c.wA)(),{chatMessages:w}=(0,c.d4)(u.DZ)||[],k=(0,c.d4)(u.$P)||[],[S,C]=(0,r.useState)(!1),_=(0,r.useRef)(null),A=h===l.T5[600],E=e=>t=>{const n=w.map(De.A),r=n[n.length-1];(0,Oe.fz)({event:t,button:(0,$e.A)(e),buttonType:e.button_type,chatLog:n,lastMessage:r,renderedBy:null==k?void 0:k.renderedBy})||(y((0,G.Bd)(e,r)),"link"===e.button_type&&setTimeout(()=>window.open(e.value,"_blank"),500))},T=Boolean((null===(t=a.title)||void 0===t?void 0:t.trim())||(null===(n=a.description)||void 0===n?void 0:n.trim())),j=null!=a&&a.newTab?"_blank":"_self",I=a.buttons||[],O=a.description&&(null===(o=a.description)||void 0===o?void 0:o.length)>100?a.description.slice(0,100).concat("..."):a.description;return(0,r.useEffect)(()=>{var e,t;S&&(null===(e=_.current)||void 0===e||e.close(),null===(t=_.current)||void 0===t||t.showModal())},[S]),(0,x.jsxs)(x.Fragment,{children:[S&&(0,Ie.createPortal)((0,x.jsxs)(Ne,{onClick:()=>C(!1),ref:_,children:[(0,x.jsx)(Me,{onClick:()=>C(!1),autoFocus:!0,children:(0,x.jsx)(Le.US,{width:"30",height:"30"})}),(0,x.jsx)(ze,{src:a.imageUrl})]}),((null===(i=window.kindlyChat)||void 0===i?void 0:i.shadowRoot)||window.document).getElementById("chatContainer")),(0,x.jsxs)(Ge,{$first:s,ref:b,$imageWidth:h,$imageHeight:g,$isCarousel:d,$fromBot:f,inert:p?void 0:"true",children:[(0,x.jsx)(St,{loading:!!m,children:"Uploading"}),a.linkUrl?(0,x.jsxs)(Ke,{$imageWidth:h,$imageHeight:g,hidden:!v,href:a.linkUrl,target:j,$isCarousel:d,children:[(0,x.jsx)(Xe,{src:a.imageUrl,alt:a.altText,tabIndex:0,$carousel:d,$fromBot:f,$imageWidth:h,$imageHeight:g}),a.linkUrl&&(0,x.jsx)(ot,{}),a.linkUrl&&(0,x.jsx)(it,{width:16,height:16})]}):(0,x.jsx)(Ye,{$imageWidth:h,$imageHeight:g,hidden:!v,$isCarousel:d,children:(0,x.jsx)(Xe,{src:a.imageUrl,alt:a.altText,tabIndex:-1,$carousel:d,$fromBot:f,$imageWidth:h,$imageHeight:g})}),!m&&(0,x.jsx)(st,{"data-testid":"enlarge-image-button","aria-label":"Enlarge image",onClick:()=>C(!0),$inView:p}),!m&&(0,x.jsx)(lt,{}),!v&&(0,x.jsx)(yt,{imageWidth:h,imageHeight:g,hasCaption:T}),T&&(0,x.jsxs)(Ze,{children:[a.title&&(0,x.jsx)(Qe,{$imageWidth:h,$imageHeight:g,children:a.title}),O&&(0,x.jsx)(Je,{$imageWidth:h,$imageHeight:g,children:O})]}),!A&&I.map(e=>(0,x.jsxs)(et,{title:e.label,onClick:E(e),$inView:p,children:[(0,x.jsx)("span",{children:e.label}),Ct[e.button_type]]},e.id))]})]})}var At=n(9687),Et=n(7542);const Tt=e=>{let{fromUser:t,$hasError:n,theme:r}=e;return n?a.Tj.grayColor:t?r.userMessageBackground:r.botMessageBackground},jt=i.Ay.div.withConfig({componentId:"sc-3i0o6s-0"})(["position:relative;text-align:center;cursor:pointer;text-transform:none;width:80%;max-width:calc(80% - 25px);border-radius:17px;font-weight:500;border:none;padding:",";font-family:",";font-size:var(--_kindlychat-font-size-p);background:",";background-color:",";transition:opacity 0.2s ease-out;margin:8px 0 2px 25px;display:block;a,span{display:block;color:",";text-decoration:none;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;z-index:2;}& > svg:first-child{position:absolute;top:-7px;left:-4px;width:15px;path{opacity:",";transition:opacity 0.2s ease-out;}}& > svg:not(:first-child){width:20px;}"],e=>{let{$hasError:t}=e;return t?"7px 12px 4px":"8px 12px"},Et.m.default,Tt,Tt,e=>{let{fromUser:t,theme:n}=e;return(0,me.w5)(t?n.userMessageBackground:n.botMessageBackground,"#FFFFFF","#000000")},e=>{let{$loading:t}=e;return t?.5:1}),It=i.Ay.div.withConfig({componentId:"sc-3i0o6s-1"})(["width:20px;height:20px;left:-10px;bottom:5px;position:absolute;border-radius:100px;background:",";background-color:",";background-position:center center;background-repeat:no-repeat;background-size:cover;"],e=>e.theme.headerBackground,e=>e.theme.headerBackground),Ot=i.Ay.div.withConfig({componentId:"sc-3i0o6s-2"})(["width:175px;height:175px;position:relative;display:flex;justify-content:center;margin-bottom:4px;background:",";border-radius:15px;svg{width:24px;z-index:2;}"],a.Tj.grayColor),Lt=i.Ay.div.withConfig({componentId:"sc-3i0o6s-3"})(["display:flex;justify-content:",";"],e=>{let{fromUser:t}=e;return t?"flex-end":"flex-start"});function Pt(e){let{avatar:t}=e;const n=t?{backgroundImage:`url(${t})`}:{};return t?(0,x.jsx)(It,{style:n}):null}var Mt=n(4660);const Nt=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,Mt.l)(e,n,t)},zt="\n background: black;\n border-radius: 15px;\n",Rt=i.Ay.iframe.withConfig({componentId:"sc-6x850n-0"})(["",""],zt),$t=i.Ay.video.withConfig({componentId:"sc-6x850n-1"})(["",""],zt);function Dt(e){var t;let{source:n,type:r}=e;const o=null===(t=n.split(".").pop())||void 0===t?void 0:t.toLowerCase();return(0,x.jsxs)($t,{width:"240",controls:!0,"data-chromatic":"ignore",children:[(0,x.jsx)("source",{src:n,type:r||`video/${o}`}),"Your browser does not support HTML5 video."]})}function Ft(e){var t;let{attachment:n,avatar:r,chatMessageStatus:o}=e;const i=n.sender===l.bS.USER,a=(0,At.A)(n),s=a===l.sl.IMAGE,c=a===l.sl.VIDEO,u=Boolean(o)||n.status===l.Le.ERROR||n.status===l.Le.INFECTED,d=Nt(n),f=!d,p={imageUrl:null!=d?d:"",altText:`Image ${n.name||`from ${null!==(t=null==n?void 0:n.sender)&&void 0!==t?t:"agent"}`}`};return s?(0,x.jsxs)(Lt,{fromUser:i,children:[(0,x.jsx)(Pt,{avatar:r}),!u&&!f&&(0,x.jsx)(_t,{image:p,fromBot:!i,isCarousel:!1,imageWidth:"250",inView:!0,first:!1,loading:n.status===l.Le.PROCESSING}),!u&&f&&(0,x.jsxs)(Ot,{isImage:s,children:[(0,x.jsx)(je,{}),(0,x.jsx)(St,{loading:!0})]}),u&&(0,x.jsx)(Ot,{children:(0,x.jsx)(Te,{})})]}):c?(0,x.jsxs)(Lt,{fromUser:i,children:[(0,x.jsx)(Pt,{avatar:r}),!u&&!f&&(0,x.jsx)(Dt,{source:d,type:n.type}),!u&&f&&(0,x.jsxs)(Ot,{children:[(0,x.jsx)(je,{}),(0,x.jsx)(St,{loading:!0})]}),u&&(0,x.jsx)(Ot,{children:(0,x.jsx)(Te,{})})]}):(0,x.jsxs)(Lt,{fromUser:i,children:[(0,x.jsx)(Pt,{avatar:r}),(0,x.jsxs)(jt,{fromUser:i,$loading:f,$hasError:u,children:[(0,x.jsx)(Ee.A,{height:10}),(0,x.jsx)(St,{loading:!u&&f,opacity:.35}),!u&&!f&&(0,x.jsxs)("a",{href:d,target:"_blank",rel:"noopener noreferrer",children:[n.name,(0,x.jsx)(R,{})]}),!u&&f&&(0,x.jsx)("span",{children:"Uploading"}),u&&(0,x.jsx)(Te,{})]})]})}var Bt=n(958),Ht=n(896),Ut=n(112);const Vt=140;function Wt(e){let{chatMessage:t,imageCarousel:n}=e;const[o,i]=(0,r.useState)(0),[a,s]=(0,r.useState)(0),c=l.T5[t.image_carousel_size||1e3],[u,d]=(0,r.useState)(Vt.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/c,r=t.height/n;e&&d(r.toString())}}return()=>{e=!1}},[n,d,c]);const f=(0,r.useMemo)(()=>c===l.T5[800]?102:c===l.T5[600]?96:30,[c]),p=e=>c===l.T5[600]&&o===e-1||o===e,h=(0,r.useCallback)((e,t)=>{if(e<0||e>=t.length)return;let n=0;n=e>=t.length-1?-(e*c-f):-(e*c+5*e),i(e),s(n)},[c,f]),{handleTouchStart:g,handleTouchMove:m,handleTouchEnd:b}=(0,Ht.A)({carousel:n,index:o,setIndex:h}),v=(0,r.useCallback)(e=>{e&&setTimeout(()=>{e.scrollLeft=0},100)},[]);return(0,x.jsxs)(We,{$active:n.length>1,ref:v,children:[(0,x.jsx)(Ut.A,{carouselPosition:a,onTouchStart:g,onTouchMove:m,onTouchEnd:b,children:n.map((e,r)=>(0,x.jsx)(_t,{first:0===r,image:e,fromBot:t.from_bot,isCarousel:n.length>1,inView:p(r),imageWidth:c,imageHeight:u},e.id||r))}),(0,x.jsx)(tt,{$previous:!0,$disabled:o<=0,"aria-label":"Go to previous image",onClick:()=>h(o-1,n)}),(0,x.jsx)(nt,{disabled:o<=0}),(0,x.jsx)(tt,{$next:!0,$disabled:o>=n.length-1,"aria-label":"Go to next image",onClick:()=>h(o+1,n)}),(0,x.jsx)(rt,{disabled:o>=n.length-1})]})}var Gt=n(7182);const qt=i.Ay.button.withConfig({componentId:"sc-1upnaey-0"})(["display:block;background:none;background-color:transparent;border:none;text-decoration:underline;font-weight:600;font-size:var(--_kindlychat-font-size-p);color:",";cursor:pointer;padding:0;",""],e=>{let{theme:t}=e;return(0,me.w5)(t.userMessageBackground,"#FFFFFF","#000000")},N.sF);function Kt(e){let{button:t}=e;const n=(0,Gt.jL)();return(0,x.jsx)(qt,{onClick:()=>n((0,G.V$)(t)),children:t.contact_details.edit_text})}var Yt=n(6831);const Xt=(0,i.i7)(["0%{opacity:0;transform:translateY(6px);}60%{transform:translateY(-2px);}100%{opacity:1;transform:translateY(0);}"]),Zt=(0,i.i7)(["0%{-webkit-font-smoothing:subpixel-antialiased;opacity:0;transform:scale(0.76);}35%{-webkit-font-smoothing:subpixel-antialiased;opacity:1;transform:scale(1.08);}75%{-webkit-font-smoothing:subpixel-antialiased;opacity:1;transform:scale(1.08);}100%{-webkit-font-smoothing:subpixel-antialiased;opacity:1;transform:scale(1);}"]),Qt=(0,i.AH)(["",";text-rendering:optimizeLegibility;animation-name:",";"],e=>{let{$isSystemMessage:t}=e;return(0,q.qL)(t?1200:600)},e=>{let{$isSystemMessage:t}=e;return t?Zt:Xt}),Jt=i.Ay.div.withConfig({componentId:"sc-1d179v9-0"})(["display:block;width:100%;"]),en=i.Ay.div.withConfig({componentId:"sc-1d179v9-1"})(["display:flex;flex-direction:column;",";",";"," @media (prefers-reduced-motion){animation:none;}"],Qt,e=>!e.$fromBot&&"display: block; ",e=>e.$hasSiblings&&"margin-bottom: 8px;"),tn=i.Ay.div.withConfig({componentId:"sc-1d179v9-2"})(["display:flex;flex-direction:column;",";"," sup{position:relative;vertical-align:top;top:-0.3em;font-size:0.7em;}sup + sup{margin-left:0.2em;}"],e=>{let{$fromBot:t}=e;return t?"align-items: flex-start":"align-items: flex-end"},e=>e.$hasSiblings&&"margin-bottom: 8px;"),nn=i.Ay.div.withConfig({componentId:"sc-1d179v9-3"})(["display:inline-flex;"," max-width:100%;flex-direction:",";"," margin-bottom:6px;flex-wrap:wrap;gap:6px;",";@media (prefers-reduced-motion){animation:none;}"],e=>{let{$orientation:t}=e;return t===l.Ii.VERTICAL&&"width: 240px;"},e=>{let{$orientation:t}=e;return t===l.Ii.HORIZONTAL?"row":"column"},e=>{let{$nextMessageType:t}=e;return t===l.bS.SYSTEM&&"margin-bottom: 16px;"},Qt),rn=(0,i.AH)(["white-space:pre-wrap;color:",";background:",";&:where(",":first-of-type:not(:only-of-type) &){border-radius:16px 16px 0px 16px;}&:where(",":last-of-type:not(:only-of-type) &){border-radius:16px 0px 16px 16px;}&:where(",":not(:first-of-type):not(:last-of-type) &){border-radius:16px 0px 0px 16px;}&:where(",":only-of-type &){border-radius:16px;}"],e=>{let{theme:t}=e;return(0,me.w5)(t.userMessageBackground,"#FFFFFF","#000000")},e=>e.theme.userMessageBackground,Jt,Jt,Jt,Jt),on=(0,i.AH)(["color:",";background:",";&:first-child:not(:only-child){border-radius:16px 16px 16px 0px;}&:last-child:not(:only-child){border-radius:0px 16px 16px 16px;}&:not(:first-child):not(:last-child){border-radius:0px 16px 16px 0px;}&:only-child{border-radius:16px;}"],e=>{let{theme:t}=e;return(0,me.w5)(t.botMessageBackground,"#FFFFFF","#000000")},e=>{let{theme:t}=e;return t.botMessageBackground}),an=(0,i.AH)(["margin-left:25px;white-space:pre-wrap;"]),sn=(0,i.AH)(["position:relative;display:inline-block;max-width:240px;min-width:32px;margin:1px 0px;padding-top:10px;padding-bottom:10px;border:0;border-radius:16px;font-size:var(--_kindlychat-font-size-p);line-height:18px;word-break:normal;overflow-wrap:anywhere;"," "," "," "," p{all:unset;}a{color:inherit;&:hover{background-color:color-mix(in srgb,currentColor 15%,transparent);}}pre{white-space:pre-wrap;}"],e=>e.$clickable&&"cursor: pointer;",e=>e.$fromBot?on:rn,e=>e.$fromAgent&&an,N.sF),ln=i.Ay.div.withConfig({componentId:"sc-4agunw-0"})(["",""],sn),cn=i.Ay.a.withConfig({componentId:"sc-4agunw-1"})(["text-decoration:none;",""],sn),un=i.Ay.div.withConfig({componentId:"sc-4agunw-2"})(["--padding-base:15px;padding-left:var(--padding-base);padding-right:var(--padding-base);& a{text-decoration:underline;}& ol,& ul{padding-left:calc(var(--padding-base) + 4px);}"]),dn=i.Ay.hr.withConfig({componentId:"sc-4agunw-3"})(["border:0;height:1px;background:",";margin-top:8px;margin-bottom:4px;"],e=>{let{theme:t}=e;return(0,me.w5)(t.background,"#636472","#dfe0e3")}),fn=i.Ay.div.withConfig({componentId:"sc-4agunw-4"})(["width:20px;height:20px;left:-35px;bottom:0;position:absolute;border-radius:100px;background:",";background-color:",";background-position:center center;background-repeat:no-repeat;background-size:cover;"],e=>e.theme.headerBackground,e=>e.theme.headerBackground);var pn=n(4311);const hn=i.Ay.div.withConfig({componentId:"sc-1hjf3xk-0"})(["font-size:var(--_kindlychat-font-size-sm);margin-top:4px;margin-bottom:5px;"]),gn=i.Ay.div.withConfig({componentId:"sc-1hjf3xk-1"})(["display:flex;flex-wrap:wrap;gap:6px;overflow:hidden;padding:2px;font-size:var(--_kindlychat-font-size-sm);"]),mn=i.Ay.a.withConfig({componentId:"sc-1hjf3xk-2"})(["align-items:center;border-radius:4px;color:inherit;display:inline-flex;line-height:16px;outline:1px solid ",";overflow:hidden;padding:1px 3px;text-decoration:none !important;text-overflow:ellipsis;white-space:nowrap;transition:all 0.2s ease-in-out;&:focus{outline:medium auto currentColor;outline:5px auto -webkit-focus-ring-color;}&:hover{outline-width:2px;box-shadow:0 2px 4px 0 rgba(0,0,0,0.08);background-color:#f2f2f233;}svg{margin-left:4px;height:11px;width:11px;}"],e=>{let{theme:t}=e;return(0,me.w5)(t.background,"#F2F2F233","#0D0D0D33")}),bn=i.Ay.span.withConfig({componentId:"sc-1hjf3xk-3"})(["max-width:100%;overflow:hidden;text-overflow:ellipsis;margin-left:3px;"]),vn=i.Ay.sup.withConfig({componentId:"sc-1hjf3xk-4"})(["font-size:0.7em;bottom:0.33em;position:relative;"]);function yn(e){let{references:t,onReferenceClick:n}=e;const{reference_list_title:r,read_more_text:o}=(0,pn.A)(),i=t.map(e=>e.url),a=e=>{n(e.currentTarget.href)};return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(hn,{children:r}),(0,x.jsx)(gn,{children:i.map((e,t)=>(0,x.jsxs)(mn,{href:e,target:"_blank",rel:"noopener noreferrer",onClick:a,children:[(0,x.jsx)(vn,{children:t+1}),(0,x.jsx)(bn,{children:o}),(0,x.jsx)(Le.Gr,{}),(0,x.jsx)(R,{})]},e))})]})}const xn=[l.bS.WEBHOOK,l.bS.AGENT];function wn(e){let{children:t,chatMessage:n}=e;const{bot_id:r,exchange_id:o}=n,i="usersays"===n.exchange_type?"dialogue":n.exchange_type,a=`/workspace/${r}/build/${null==i?void 0:i.replace("_","-")}/${o}`;return(0,x.jsx)(cn,{$fromBot:n.from_bot,$clickable:!0,role:"link",tabIndex:0,href:a,children:t})}function kn(e){let{references:t,onReferenceClick:n}=e;return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(dn,{}),(0,x.jsx)(un,{children:(0,x.jsx)(yn,{references:t,onReferenceClick:n})})]})}function Sn(e){var t;let{chatMessage:n,editContactDetailsButton:r,lineIndex:o,messageLine:i,numLines:a,preface:s,references:d=[]}=e;const f=(0,c.wA)(),{inPlatform:p}=(0,c.d4)(u.$P),{isTextDirectionRtl:h}=(0,c.d4)(u.Od),g=h?"rtl":void 0,m=p&&n.from_bot&&n.exchange_type&&!A()(t=xn).call(t,n.sender),b=d.length>0,v=n.sender===l.bS.AGENT,y=o===a-1,w=n.from_bot,k=(0,x.jsx)("p",{children:(0,x.jsx)("strong",{children:s})}),S=e=>{f((0,G.qJ)({url:e,messageId:n.id}))};return m?(0,x.jsxs)(wn,{chatMessage:n,children:[s&&k,(0,x.jsx)(un,{children:w?(0,Yt.A)(i):i}),y&&b&&(0,x.jsx)(kn,{references:d,onReferenceClick:S})]}):(0,x.jsxs)(ln,{dir:g,$fromAgent:v,$fromBot:w,children:[(0,x.jsxs)(un,{children:[s&&k,v&&(0,x.jsx)(fn,{style:{backgroundImage:`url(${n.avatar})`}}),w?(0,Yt.A)(i):i,y&&r&&(0,x.jsx)(Kt,{button:r})]}),y&&b&&(0,x.jsx)(kn,{references:d,onReferenceClick:S})]})}const Cn=i.Ay.div.withConfig({componentId:"sc-285zcy-0"})(["display:flex;white-space:nowrap;font-size:var(--_kindlychat-font-size-sm);color:red;justify-content:flex-end;margin-bottom:2px;"]),_n=i.Ay.div.withConfig({componentId:"sc-285zcy-1"})(["display:flex;"]),An=i.Ay.button.withConfig({componentId:"sc-285zcy-2"})(["display:block;white-space:nowrap;font-size:var(--_kindlychat-font-size-sm);color:",";text-decoration:underline;background:none;border:none;padding:0;margin-bottom:2px;margin-left:4px;cursor:pointer;",""],a.Tj.darkColor,N.sF);function En(e){let{chatMessage:t,attachments:n}=e;const o=(0,Gt.jL)(),i=Boolean(t.message),a=(null==n?void 0:n.length)>0,s=(0,r.useCallback)(()=>{i&&o((0,G.tM)(t.message,t.id))},[t,o,i]),l=(0,r.useCallback)(()=>{i?o((0,G.aP)(t.message,t.id)):a&&o((0,G.zX)())},[t,o,a,i]);return t.status>=500?(0,x.jsxs)(Cn,{children:[a?"Upload failed":"Message not delivered"," ",(0,x.jsx)(_n,{children:!a&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(An,{onClick:s,children:"Try again"}),(0,x.jsx)(An,{onClick:l,children:"Restart chat"})]})})]}):429===t.status?(0,x.jsxs)(Cn,{children:["Too many messages, please slow down."," ",(0,x.jsx)(_n,{children:(0,x.jsx)(An,{onClick:s,children:"Try again"})})]}):(0,x.jsxs)(Cn,{children:["An error occurred. ",(0,x.jsx)(An,{onClick:l,children:"Restart chat"})]})}var Tn=n(8410);function jn(e){let{source:t}=e;const n=t.match(/^(?:https?:\/\/)?(www\.)?vimeo.com\/(\d+)($|\/)/);return n?(0,x.jsx)(Rt,{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}const In=e=>e.replace("?t=","?start=").replace("&t=","&start="),On=e=>{const t=e.toLowerCase();let n=e;return A()(t).call(t,"youtube.com")?(n=e.replace("&","?"),n=In(n),n.split("v=")[1]):A()(t).call(t,"youtu.be")?(n=In(e),n.split("youtu.be/")[1]):n};function Ln(e){let{source:t}=e;const n=On(t);return(0,x.jsx)(Rt,{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"})}function Pn(e){let{source:t}=e;return A()(t).call(t,"youtube.com")||A()(t).call(t,"youtu.be")?(0,x.jsx)(Ln,{source:t}):A()(t).call(t,"vimeo.com")?(0,x.jsx)(jn,{source:t}):(0,x.jsx)(Dt,{source:t})}const Mn=e=>{let{root:t=null,threshold:n=1,onChange:o,skip:i=!1}=e;const[a,s]=(0,r.useState)(null),l=(0,r.useRef)(null);return(0,r.useEffect)(()=>{if(i)return;l.current&&l.current.disconnect(),l.current=new IntersectionObserver(o,{root:t,threshold:n});const{current:e}=l;return a&&e.observe(a),()=>e.disconnect()},[a,t,o,i,n]),s};function Nn(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 i=r+t,a=`<sup>${o}</sup>`;n.splice(i,0,...Array.from(a)),r+=a.length}),n.join("")}var zn=n(3603),Rn=n(3699),$n=n(1435),Dn=n(9910),Fn=n(3950),Bn=n(786),Hn=n(4851),Un=n(2552),Vn=n(5173),Wn=n(4490);const Gn=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:i}}=o(),{PAT_HOST:a}=o().environment,{headers:s}=(0,Hn.A)({token:i},{withCurrentUrl:!0}),c={submission_id:e,context:t,state:n};return r((0,G.et)(`${a}/chatbubble/${l.Ak}/form/submit`,{method:"POST",body:c,headers:s}))}},qn=e=>({...e,temporaryId:`tempId-${(0,Bn.A)()}`});var Kn=n(3435),Yn=n(881),Xn=n(9272),Zn=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}(Zn||{});const Qn=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!==Zn.SELECT||null!==(r=e.attributes)&&void 0!==r&&r.default_value||(n[e.slug]="")}),n},Jn=e=>{let t=0;return e.fields.forEach(e=>{var n,r;if(e.input_type===Xn.cJ.RANGE)t+=92;else if(e.input_type===Xn.cJ.SELECT)t+=51;else if(e.input_type===Xn.cJ.FILE)t+=113;else if(e.input_type===Xn.cJ.CHECKBOX||e.input_type===Xn.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 er=n(5814);const tr=i.Ay.div.withConfig({componentId:"sc-1sb6ll-0"})(["display:flex;flex-direction:column;"]),nr=i.Ay.div.withConfig({componentId:"sc-1sb6ll-1"})(["font-size:var(--_kindlychat-font-size-p);font-weight:500;margin-top:16px;color:var(--panel-background-white-black-contrast-1743170834);"]),rr=i.Ay.div.withConfig({componentId:"sc-1sb6ll-2"})(["display:flex;flex-direction:column;"]),or=i.Ay.div.withConfig({componentId:"sc-1sb6ll-3"})(["display:flex;flex-direction:column;margin-top:16px;color:var(--panel-background-white-black-contrast-1743170834);"]),ir=i.Ay.div.withConfig({componentId:"sc-1sb6ll-4"})(["font-size:var(--_kindlychat-font-size-p);"]),ar=i.Ay.div.withConfig({componentId:"sc-1sb6ll-5"})(["font-weight:500;margin-top:4px;font-size:var(--_kindlychat-font-size-p);display:flex;align-items:flex-start;"]),sr=i.Ay.div.withConfig({componentId:"sc-1sb6ll-6"})(["padding:",";"],e=>{let{$affix:t}=e;return"PREFIX"===t?"0 6px 0 0":"0 0 0 6px"}),lr=i.Ay.div.withConfig({componentId:"sc-1sb6ll-7"})(["margin-top:8px;"]),cr=i.Ay.div.withConfig({componentId:"sc-1sb6ll-8"})(["display:flex;flex-direction:column;"]),ur=i.Ay.div.withConfig({componentId:"sc-1sb6ll-9"})(["flex:1;"]);var dr=n(8043);function fr(e){return function(t,n){return t===e&&n?(0,x.jsx)(sr,{$affix:t,children:n}):null}}const pr=fr("PREFIX"),hr=fr("SUFFIX");function gr(e){return e.type===Xn.cJ.FILE&&e.files?(0,x.jsx)(ur,{children:e.files.map(t=>(0,x.jsx)(dr.A,{file:t,canRemove:!1},`${t.name}-${e.type}-${t.size}`))}):Array.isArray(e.value)?(0,x.jsx)(cr,{children:e.value.map(e=>(0,x.jsx)(lr,{children:e.label},e.name))}):e.value}const mr=function(e){let{state:t,message:n,data:r=[]}=e;return(0,x.jsxs)(tr,{children:[t!==Xn.KN.SUBMITTED&&n&&(0,x.jsx)(nr,{children:n}),t===Xn.KN.SUBMITTED&&r.length>0&&(0,x.jsx)(rr,{children:r.map(e=>e.value?(0,x.jsxs)(or,{children:[(0,x.jsx)(ir,{children:e.label}),(0,x.jsxs)(ar,{children:[pr(e.affix,e.affixValue),gr(e),hr(e.affix,e.affixValue)]})]},e.name):null)})]})};function br(e){let{width:t=24,height:n=24,color:r="#333"}=e;return(0,x.jsxs)("svg",{width:t,height:n,viewBox:"0 0 24 24",fill:"none",children:[(0,x.jsx)("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"}),(0,x.jsx)("path",{d:"M9.75 6h8.5M9.75 12h8.5M9.75 18h8.5",stroke:r,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})]})}var vr=n(5545);const yr=o().lazy(()=>Promise.resolve().then(n.bind(n,5518))),xr=e=>"object"==typeof e&&e.length&&e.every(e=>"[object File]"===Object.prototype.toString.call(e)),wr=function(e){var t,n,o,i,a,s,d,f,p;let{chatMessageId:h,formData:g,onSubmit:m,onCancel:b}=e;const v=(0,c.wA)(),y=(0,c.d4)(u.uO),{text:w}=(0,c.d4)(u.Od),{current:k}=(0,r.useRef)(`${g.id}_submission_${g.submission_id}`);let{current:S}=(0,r.useRef)(0);const{currentLanguageCode:C}=(0,pe.A)();(0,r.useEffect)(()=>{var e,t,n;null==g||!g.id||null!=y&&y[k]?(null==y||null===(e=y[k])||void 0===e?void 0:e.formSubmitState)!==Xn.KN.UNANSWERED||null!=y&&null!==(t=y[k])&&void 0!==t&&t.formCompleteMessage||!g.texts.unanswered_text||v((0,G.Bu)({...y[k],formCompleteMessage:g.texts.unanswered_text})):v((0,G.Bu)({formId:g.id,formSubmissionId:g.submission_id,formSubmitState:Xn.KN.ACTIVE,formCompleteMessage:"",formKey:k,formValue:(null==y||null===(n=y[k])||void 0===n?void 0:n.formValue)||g.fields.reduce((e,t)=>({...e,[`${t.slug}`]:""}),{})}))},[v,g,C,y,k]);const _=(0,r.useCallback)(e=>{var t,n,r,o,i;return e.input_type===Xn.cJ.SELECT?(null===(r=e.attributes.options.find(t=>{var n,r;return t.value===(null==y||null===(n=y[k])||void 0===n||null===(r=n.formValue)||void 0===r?void 0:r[e.slug])}))||void 0===r?void 0:r.label)||(null==y||null===(o=y[k])||void 0===o||null===(i=o.formValue)||void 0===i?void 0:i[e.slug]):null==y||null===(t=y[k])||void 0===t||null===(n=t.formValue)||void 0===n?void 0:n[e.slug]},[k,y]),E=e=>{var t,n,r,o,i,a,s,l;if(e)switch(e.input_type){case Xn.cJ.CHECKBOX:case Xn.cJ.RADIO:return(0,x.jsx)(Dn.A,{name:e.slug,inputType:e.input_type,options:null===(t=e.attributes)||void 0===t?void 0:t.options,validators:(0,er.Bq)(e)});case Xn.cJ.RANGE:return(0,x.jsx)($n.Ap,{hasController:!0,value:parseFloat(null==y||null===(n=y[k])||void 0===n||null===(r=n.formValue)||void 0===r?void 0:r[e.slug])||(null===(o=e.attributes)||void 0===o?void 0:o.default_value)||e.step,name:e.slug,step:null===(i=e.attributes)||void 0===i?void 0:i.step,affix:e.affix,affixValue:null===(a=e.texts)||void 0===a?void 0:a.affix_value,validators:(0,er.Bq)(e),ariaLabel:null===(s=e.texts)||void 0===s?void 0:s.label});case Xn.cJ.SELECT:return(0,x.jsx)($n.l6,{options:null===(l=e.attributes)||void 0===l?void 0:l.options,placeholder:e.texts.placeholder_text,validators:(0,er.Bq)(e),name:e.slug});case Xn.cJ.FILE:return(0,x.jsx)($n.ZH,{label:e.texts.placeholder_text,validators:(0,er.Bq)(e),name:e.slug});case Xn.cJ.TEXTAREA:return(0,x.jsx)(Fn.A,{placeholder:e.texts.placeholder_text,validators:(0,er.Bq)(e),name:e.slug});default:return(0,x.jsx)($n.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,er.Bq)(e),name:e.slug})}return null};return(0,x.jsxs)(Yn._H,{children:[(null===(t=g.texts)||void 0===t?void 0:t.title)&&(0,x.jsxs)(Yn.zE,{children:[(0,x.jsx)(br,{width:20,height:20})," ",null===(n=g.texts)||void 0===n?void 0:n.title]}),(null==y||null===(o=y[k])||void 0===o?void 0:o.formSubmitState)&&(null==y||null===(i=y[k])||void 0===i?void 0:i.formSubmitState)!==Xn.KN.ACTIVE&&(0,x.jsx)(mr,{state:y[k].formSubmitState,message:y[k].formCompleteMessage,data:(()=>{var e,t;if(null!=g&&g.fields&&(null==y||null===(e=y[k])||void 0===e?void 0:e.formSubmitState)===Xn.KN.SUBMITTED&&null!=y&&null!==(t=y[k])&&void 0!==t&&t.formValue)return g.fields.reduce((e,t)=>{var n,r,o,i,a;return t.input_type!==Xn.cJ.CHECKBOX&&t.input_type!==Xn.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:_(t),files:null==y||null===(o=y[k])||void 0===o||null===(i=o.formFiles)||void 0===i?void 0:i[t.slug]}]:[...e,{name:`${t.input_type===Xn.cJ.CHECKBOX?"checkbox":"radio"}_list_${t.slug}`,label:null===(a=t.texts)||void 0===a?void 0:a.label,value:t.attributes.options.reduce((e,n)=>{var r,o;const i=null==y||null===(r=y[k])||void 0===r||null===(o=r.formValue)||void 0===o?void 0:o[t.slug];return(null==i?void 0:i.length)>0&&A()(i).call(i,n.value)?[...e||[],{name:n.value,label:n.label,value:n.value}]:e},null)}]},[]).sort((e,t)=>(e.order||0)-(t.order||0))})()}),(0,x.jsx)(r.Suspense,{fallback:(0,x.jsx)(vr.A,{minHeight:Jn(g)}),children:(!(null!=y&&y[k])||(null==y||null===(a=y[k])||void 0===a?void 0:a.formSubmitState)===Xn.KN.ACTIVE)&&(0,x.jsx)(yr,{onCancel:async e=>{var t;return b&&b(e),await v(Gn(g.submission_id,null==y?void 0:y[k].formValue,Xn.KN.CANCELED)),await v((0,G.zh)(g.cancel_dialogue_id,{languageCode:C})),v((0,G.Bu)({formKey:k,formId:g.id,formSubmitState:Xn.KN.CANCELED,formCompleteMessage:null===(t=g.texts)||void 0===t?void 0:t.cancel_text,formValue:e}))},defaultValues:Qn(g),onSubmit:async(e,t)=>{m&&m(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=>{xr(e[n])&&(t[n]=e[n])}),t}(n),o=Object.values(n).filter(e=>xr(e)).map(e=>Array.isArray(e)&&e.length?e.flat():e).flat();if(o.length){let e=!1;const a=()=>{e=!0},s=await Promise.all(o.map(e=>(0,Rn.TA)(e))),c=await v((e=>{let{chatMessageId:t,files:n,onError:r}=e;return async(e,o)=>{var i;const{bot:{id:a},chatbubble:{chatId:s},connection:{token:c},environment:{PAT_HOST:u}}=o(),d=await e((0,G.z5)()),{headers:f}=(0,Hn.A)({token:c},{extra:d}),p=n.map(qn).map((0,Un.A)("file")),h=p.map((0,Un.A)("url")),g=`${u}/chatbubble/${l.Ak}/attachment/create`,m={attachments:h},b=await e((0,G.et)(g,{method:"POST",body:m,headers:f}));if((0,Vn.A)(b)||!Array.isArray(null==b||null===(i=b.data)||void 0===i?void 0:i.attachments))return r(new Error("Failed to upload")),[];const{attachments:v}=b.data;if(v.sort((e,t)=>p.findIndex(t=>t.temporaryId===e.temporaryId)-p.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:i}=t;return[[...n,o],[...r,i]]},[[],[]]),w={"x-goog-upload-bot-id":a,"x-goog-upload-chat-id":s},k=(0,Wn.A)(n,x).map(async t=>{let[{file:n},r]=t;const o=await(0,Rn.Bu)(n),i={...w,"Content-Type":n.type};return await e((0,G.et)(r,{method:"PUT",body:o,headers:i},{onError:e=>new Error(e)}))});if((await Promise.all(k)).some(Vn.A))return r(new Error("Failed to upload")),[];const S=`${u}/chatbubble/${l.Ak}/attachment/uploads-complete`,C={attachmentIds:y,chatMessageId:t,exchangeId:h[0].exchangeId};return await e((0,G.et)(S,{method:"POST",body:C,headers:f},{onError:()=>r(new Error("Failed to upload"))})),y}})({chatMessageId:h,files:s,onError:a}));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,i]=e;n[o]=i.map((e,n)=>t[r+n]).join(","),r+=i.length}),n}(r,c);n={...n,...e}}catch(e){a()}if(e){var i;if(S>=3)return v((0,G.Bu)({formKey:k,formId:g.id,formSubmitState:Xn.KN.ERRORED,formCompleteMessage:null===(i=g.texts)||void 0===i?void 0:i.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[C]})}),void(S+=1)}}var a;return null===await v(Gn(g.submission_id,n))?v((0,G.Bu)({formKey:k,formId:g.id,formSubmitState:Xn.KN.ERRORED,formCompleteMessage:null===(a=g.texts)||void 0===a?void 0:a.error_text,formValue:n})):(await v((0,G.zh)(g.submit_dialogue_id,{languageCode:C})),v((0,G.Bu)({formKey:k,formId:g.id,formSubmitState:Xn.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===(s=g.texts)||void 0===s?void 0:s.title,sendButtonTitle:null===(d=g.texts)||void 0===d?void 0:d.submit_button_text,cancelButtonTitle:null===(f=g.texts)||void 0===f?void 0:f.cancel_button_text,children:null===(p=g.fields)||void 0===p?void 0:p.map((e,t)=>{var n,r,o;return(0,x.jsx)(Kn.A,{className:0!==t||null!==(n=g.texts)&&void 0!==n&&n.title?void 0:"no-margin",helperText:null===(r=e.texts)||void 0===r?void 0:r.help_text,required:e.required,label:null===(o=e.texts)||void 0===o?void 0:o.label,children:E(e)},`form_field_${k}_${e.order}`)})})})]})},kr=e=>e,Sr=e=>{let{button_type:t}=e;return t===l.lP.edit_contact_details?"editContactDetails":"regularButtons"},Cr=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},_r=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 Ar(e){var t,n,o,i,a;let{chatMessage:s,buttonHandlers:d,messageCounter:f,nextMessageType:p}=e;const h=(0,c.wA)(),[g,m]=(0,r.useState)([]),{lastMessageSeen:b,attachments:v=[]}=(0,c.d4)(u.DZ),y=s.sender?s.sender===l.bS.USER:!s.from_bot,w=_r(s.message_references),k=s.from_bot&&s.handler!==l.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 i,a,s,l;e.nextSibling===r[o+1]&&(null===(i=r[o+1])||void 0===i?void 0:i.nextSibling)===r[o+2]&&(null===(a=e.parentNode)||void 0===a||a.insertBefore(n.createTextNode(t),e),e.remove(),null===(s=r[o+1])||void 0===s||s.remove(),null===(l=r[o+2])||void 0===l||l.remove())}),n.body.innerHTML.split(t))}(s.message||"").flatMap(e=>e.split(/\n\s*\n/)).map(e=>e.trim()).filter(e=>""!==e):[Nn(s.message||"",w)],{regularButtons:S,editContactDetails:C}=(0,r.useMemo)(()=>(0,zn.A)(s.buttons,Sr),[s.buttons]),_=(0,r.useMemo)(()=>{var e;return null==s||null===(e=s.buttons)||void 0===e?void 0:e.filter(e=>e.button_type===l.lP.CHECKBOX.toLowerCase()||e.button_type===l.lP.SLIDER.toLowerCase())},[s]),A=(null==s?void 0:s.image_carousel)||(null==s?void 0:s.video_source),E=null==s||null===(t=s.buttons)||void 0===t?void 0:t.filter(e=>e.button_type===l.lP.CHECKBOX.toLowerCase()),T=(0,r.useCallback)(e=>{let[{isIntersecting:t}]=e;!t||(null==b?void 0:b.index)>=f||h((0,G.pA)(s.id,f))},[s.id,h,b,f]),j=Mn({onChange:T,threshold:.95,skip:y}),I=(0,r.useCallback)(e=>{const t=g.find(t=>t.id===e.id);m(t?g.filter(t=>t.id!==e.id):[...g,e])},[g]),O=(0,r.useMemo)(()=>{var e,t;return[...null!==(e=s.attachments)&&void 0!==e?e:[],...(null!==(t=s.attachment_ids)&&void 0!==t?t:[]).map(e=>v.find(Cr(e))).filter(kr)]},[v,s.attachments,s.attachment_ids]),L=Boolean(s.message||(null==O?void 0:O.length)||(null===(n=s.buttons)||void 0===n?void 0:n.length)||(null===(o=s.image_carousel)||void 0===o?void 0:o.length));return(0,x.jsxs)(Jt,{ref:j,"data-testid":l.fl,children:[(0,x.jsxs)(en,{$fromBot:s.from_bot,$hasSiblings:Boolean(E),children:[s.sender===l.bS.SYSTEM&&s.event_message&&(0,x.jsx)(Tn.Ay,{chatMessage:s}),(0,x.jsx)(tn,{$fromBot:s.from_bot,$hasSiblings:Boolean(A),children:k.map((e,t)=>e?(0,x.jsx)(Sn,{chatMessage:s,messageLine:e,lineIndex:t,numLines:k.length,editContactDetailsButton:null==C?void 0:C[0],references:w},`chatMessage-${t}`):null)}),(null===(i=s.image_carousel)||void 0===i?void 0:i.length)>0&&(0,x.jsx)("div",{children:(0,x.jsx)(Wt,{imageCarousel:s.image_carousel,chatMessage:s})}),O.map(e=>(0,x.jsx)("div",{children:(0,x.jsx)(Ft,{attachment:e,avatar:s.avatar,chatMessageStatus:s.status})},e.id)),s.video_source&&(0,x.jsx)(Pn,{source:s.video_source}),(null===(a=s.form)||void 0===a?void 0:a.fields)&&(0,x.jsx)(wr,{chatMessageId:s.id,formData:s.form})]}),(null==S?void 0:S.length)>0&&(0,x.jsx)(nn,{$orientation:s.buttons_display_orientation||l.Ii.VERTICAL,$nextMessageType:p,children:S.map(e=>(0,x.jsx)(Bt.A,{button:e,chatMessage:s,handlers:d,checked:g,setCheckboxValue:I,submitButtonsList:_},e.id))}),L&&s.status&&(0,x.jsx)(En,{chatMessage:s,attachments:O})]})}var Er=n(6290);function Tr(e){e&&(e.scrollTop=e.scrollHeight,setTimeout(()=>{e.scrollTop=e.scrollHeight},1))}const jr=(0,i.i7)(["0%{opacity:0;transform:translateY(8px);}50%{opacity:0;transform:translateY(8px);}80%{transform:translateY(-2px);}100%{opacity:1;transform:translateY(0);}"]),Ir=(0,i.AH)(["",";animation-name:",";"],(0,q.qL)(600),jr),Or=(0,i.i7)(["0%{opacity:1;transform:translateY(0px);}50%{opacity:1;transform:translateY(-6px);}80%{transform:translateY(2px);}100%{opacity:0;transform:translateY(2px);}"]),Lr=(0,i.AH)(["",";animation-name:",";"],(0,q.qL)(300),Or),Pr=i.Ay.div.withConfig({componentId:"sc-2gibmd-0"})(["position:absolute;z-index:3;bottom:70px;left:50%;transform:translateX(-50%);transition:opacity 300ms ease 300ms;opacity:",";"],e=>e.$show?"1":"0"),Mr=i.Ay.button.withConfig({componentId:"sc-2gibmd-1"})(["opacity:0;border-radius:100px;color:#2c2c2c;background:",";background-color:",";border:1px solid ",";box-shadow:0 2px 4px 0 rgba(0,0,0,0.08);cursor:",";display:flex;align-items:center;justify-content:center;min-width:35px;max-width:205px;width:35px;height:35px;",";",";svg{path{stroke:",";}}"],e=>{let{theme:t}=e;return t.background},e=>{let{theme:t}=e;return t.background},e=>{let{theme:t}=e;return(0,me.w5)(t.background,"rgba(255,255,255, 0.08)","rgba(0,0,0, 0.08)")},e=>e.$show?"pointer":"default",e=>!e.$show&&(0,q.vW)(800),e=>e.$show?Ir:Lr,e=>{let{theme:t}=e;return(0,me.w5)(t.background,"#FFF","#000")}),Nr=600;function zr(e){let{bodyRef:t,isChatLooselyScrolledToBottom:n}=e;const[o,i]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{const e=setTimeout(()=>{n||i(!0)},Nr);return n&&i(!1),()=>clearTimeout(e)},[n]),(0,x.jsx)(Pr,{$show:o,inert:!o,children:(0,x.jsx)(Mr,{$show:o,onClick:()=>{Tr(t.current)},"aria-label":"Scroll to bottom of chat","data-testid":"chat-new-message",children:(0,x.jsx)(Er.A,{})})})}var Rr=n(2194),$r=n(6064);const Dr=i.Ay.div.withConfig({componentId:"sc-1h90lvz-0"})(["height:100%;"]),Fr=i.Ay.div.withConfig({componentId:"sc-1h90lvz-1"})(["width:100%;min-width:100%;height:100%;padding:0 16px;overflow-y:",";overflow-x:hidden;background:",";background-color:",";overscroll-behavior:contain;scrollbar-gutter:stable;transition:opacity 0.3s ease;&[inert]{opacity:0.4;}",""],e=>{let{$isContentLongEnough:t}=e;return t?"auto":"hidden"},e=>e.theme.background,e=>e.theme.background,N.sF),Br=i.Ay.div.withConfig({componentId:"sc-1h90lvz-2"})(["display:flex;max-width:",";margin:auto;gap:16px;flex-direction:column;justify-content:flex-end;"],a.mb.tablet),Hr=i.Ay.div.withConfig({componentId:"sc-1h90lvz-3"})(["display:flex;flex-direction:row;color:",";font-size:var(--_kindlychat-font-size-sm);justify-content:center;margin-bottom:16px;"],e=>{let{theme:t}=e;return(0,me.w5)(t.background,"rgba(255, 255, 255, 0.6)","rgba(0, 0, 0, 0.6)")}),Ur=i.Ay.span.withConfig({componentId:"sc-1h90lvz-4"})(["font-weight:500;align-self:flex-start;"]),Vr=i.Ay.span.withConfig({componentId:"sc-1h90lvz-5"})(["align-self:flex-start;"]),Wr=i.Ay.div.withConfig({componentId:"sc-1h90lvz-6"})(["display:inline-block;"]),Gr="filler-div-1741269268",qr=(e,t)=>t.scrollHeight>=e.clientHeight,Kr=(e,t)=>{if(!e)return;const n=e.querySelectorAll("img"),r=e.querySelectorAll("video"),o=e.querySelectorAll("iframe");(n.length>0||r.length>0||o.length>0)&&setTimeout(t,50),n.forEach(e=>{e.complete||e.addEventListener("load",()=>{setTimeout(t,50)},{once:!0})}),r.forEach(e=>{const n=()=>setTimeout(t,50);if(e.readyState>=1)return void n();const r=()=>{n()};e.addEventListener("loadedmetadata",r,{once:!0}),e.addEventListener("loadeddata",r,{once:!0}),e.addEventListener("canplaythrough",r,{once:!0})}),o.forEach(e=>{e.addEventListener("load",()=>{setTimeout(t,50)},{once:!0})})},Yr=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"smooth";if(!e||!t)return;const r=()=>{const r=e.getBoundingClientRect(),o=t.getBoundingClientRect().top-r.top+e.scrollTop;e.scrollTo({top:o,behavior:n})};r(),Kr(t,r)},Xr=function(){let e=0,t=null,n=null;const r=t=>{(e=>{Tr(e)})(...t),e=Date.now()},o=function(){const o=Date.now()-e;null!==t&&(clearTimeout(t),t=null);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];o>=100||0===e?r(a):(n=a,t=setTimeout(()=>{n&&(r(n),n=null),t=null},100-o))};return o.cancel=()=>{null!==t&&(clearTimeout(t),t=null),n=null},o}();var Zr=n(7958);function Qr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!!e&&Math.abs(e.scrollHeight-e.scrollTop-e.clientHeight)<t+1}const Jr=30,eo=100;var to=n(2720);const no=e=>{let t=null;const n=[],r=(e,t)=>!t||new Date(e.created).valueOf()-t>3e5;return e.forEach(e=>{(e=>{if(!t)return!1;const n=e.from_bot===t.from_bot,r=e.name===t.name,o=e.from_webhook===t.from_webhook,i=e.handler!==l.Gi.TRIGGER_DIALOGUE,a=!(e.sender===l.bS.SYSTEM&&t.sender===l.bS.SYSTEM);return n&&r&&o&&i&&a})(e)?n[n.length-1].messages.push(e):n.push({messages:[e],shouldShowTime:r(e,t&&new Date(t.created).valueOf())}),t=e}),n},ro=(e,t,n)=>{var r;const o=e||(null===(r=t.slice(-1)[0])||void 0===r?void 0:r.id);return!!n.find(e=>{let{id:t}=e;return o===t})};function oo(e){let{bodyRef:t,buttonHandlers:n,inert:i}=e;const{currentLanguageCode:a}=(0,pe.A)(),[s,d]=(0,r.useState)(!0),{isTyping:f}=(0,c.d4)(u.MA),{isTyping:p,typingType:h,text:g,botName:m}=(0,c.d4)(u.Od),{currentMessageId:b,inspectorOpen:v}=(0,c.d4)(u.qV),{chatMessages:y}=(0,c.d4)(u.DZ)||[],w=no(y),k=(0,r.useRef)(null),S=function(e){let{bodyRef:t,bodyMessagesRef:n,setIsContentLongEnough:o}=e;const i=(0,r.useRef)(null),a=(0,r.useRef)(null),s=(0,r.useRef)(void 0),c=(0,r.useRef)(null),u=(0,r.useRef)(null),d=(0,r.useRef)(null),f=(0,r.useCallback)(e=>{if(!e||!n.current)return i.current&&(i.current.disconnect(),i.current=null),a.current&&(a.current.disconnect(),a.current=null),s.current&&(clearTimeout(s.current),s.current=void 0),c.current=null,u.current=null,d.current=null,void Xr.cancel();t.current=e;const r=n.current,f=function(){let{shouldChangeImmediately:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=qr(e,r);return null!==u.current&&u.current===n?null:(s.current&&(clearTimeout(s.current),s.current=void 0),n?(t?(o(!0),u.current=!0):s.current=setTimeout(()=>{o(!0),u.current=!0,requestAnimationFrame(()=>{Yr(e,c.current,"instant")})},1e3),!0):(o(!1),u.current=!1,!1))};f({shouldChangeImmediately:!0}),Tr(e),Kr(r,()=>{f({shouldChangeImmediately:!0}),Tr(e)}),i.current=new ResizeObserver(t=>{if(!t[0])return;const n=e.clientHeight,r=null!==d.current&&d.current!==n;d.current=n,r&&Xr(e),!1===f({shouldChangeImmediately:!0})&&Tr(e)}),i.current.observe(e),a.current=new MutationObserver(t=>{const n=t.flatMap(e=>Array.from(e.addedNodes).filter(e=>{var t,n,r;return e instanceof HTMLElement&&((null===(t=e.dataset)||void 0===t?void 0:t.testid)===l.fl||(null===(n=e.dataset)||void 0===n?void 0:n.testid)===l.dT||(null===(r=e.dataset)||void 0===r?void 0:r.testid)===l.gH)}));let r=!1;if(n.length>0&&(c.current=n[n.length-1],r=!0),!c.current||!r)return;const o=c.current;f({shouldChangeImmediately:!1}),setTimeout(()=>{Yr(e,o)},50)}),a.current.observe(r,{childList:!0,subtree:!0})},[n,t,o]);return f}({bodyRef:t,bodyMessagesRef:k,setIsContentLongEnough:d}),C=function(e){const[t,n]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(!e.current)return;let t=!1;const r=e.current,o=()=>{const e=Qr(r,Jr);t!==e&&(t=e,n(e))},i=(0,Zr.A)(o,eo);return o(),r.addEventListener("scroll",i),()=>{r.removeEventListener("scroll",i),i.cancel()}},[e]),t}(t);let _=0;return(0,x.jsxs)(Fr,{ref:S,id:"chat-body-container","data-testid":"chat-body-container",$isContentLongEnough:s,inert:i,children:[!s&&(0,x.jsx)(Dr,{id:Gr}),(0,x.jsxs)(Br,{role:"log","aria-live":"polite","data-testid":"chat-log","data-cy":"chat-log",ref:k,children:[w.map((e,t)=>{const{messages:r,shouldShowTime:i}=e,s=v&&ro(b,y,r),c=t===w.length-1,u=r[0].handler===l.Gi.MIMIR||"SMART_WEBHOOK"===r[0].reply_type||"SMART_REPLY"===r[0].reply_type;return(0,x.jsx)(o().Fragment,{children:(0,x.jsx)(Ae,{fromBot:r[0].from_bot,created:r[0].created,shouldShowTime:i,inspected:s,isLastGroupMessage:c,disclaimerComponent:u?(0,x.jsxs)(Hr,{children:[(0,x.jsxs)(Wr,{children:[(0,x.jsx)(Ur,{children:m})," ",(0,x.jsx)(Vr,{children:(0,$r.A)(g.gpt_search_result_text,a)})]}),(0,x.jsx)(to.A,{text:(0,$r.A)(g.gpt_tooltip_disclaimer,a),position:"top",children:(0,x.jsx)(fe.A,{width:18,height:18})})]}):void 0,children:r.map((e,t)=>{var i;return _+=1,(0,x.jsx)(o().Fragment,{children:(0,x.jsx)(Ar,{chatMessage:e,nextMessageType:null===(i=r[t+1])||void 0===i?void 0:i.sender,buttonHandlers:n,messageCounter:_})},`${e.key}`)})})},`message-group-${t}`)}),(f||p)&&(0,x.jsx)(vt,{botName:m,text:h===Rr.cT.KINDLY_GPT?(0,$r.A)(g.gpt_search_text,a):void 0})]}),(0,x.jsx)(zr,{bodyRef:t,isChatLooselyScrolledToBottom:C})]})}const io=i.Ay.div.withConfig({componentId:"sc-1e9j8ct-0"})(["position:absolute;right:7px;bottom:6px;height:28px;width:28px;display:flex;align-items:center;justify-content:center;z-index:2;"]),ao=(0,i.Ay)(y.mt).withConfig({componentId:"sc-1e9j8ct-1"})(["margin:0;opacity:1;color:",";span{font-weight:500;}",";"],e=>{let{theme:t}=e;return(0,me.w5)(t.background,"#FFF","#000")},q.jB),so=i.Ay.svg.withConfig({componentId:"sc-1e9j8ct-2"})(["position:absolute;transform-origin:50% 50%;transform:rotate(-90deg);circle{&:first-child{stroke:",";}&:last-child{stroke:",";}}"],e=>{let{theme:t}=e;return(0,me.w5)(t.background,"rgba(255,255,255, 0.66)","rgba(0,0,0, 0.2)")},e=>(0,me.J7)(e.theme.background,e.theme.buttonBackground)?e.theme.buttonText:e.theme.buttonBackground);function lo(e){let{radius:t,stroke:n,progress:o}=e;const[i,a]=(0,r.useState)(),[s,l]=(0,r.useState)();(0,r.useEffect)(()=>{const e=t-2*n,r=2*e*Math.PI;a(e),l(r)},[t,n]);const c=s?s-o/100*s:0;return(0,x.jsxs)(so,{height:2*t,width:2*t,children:[(0,x.jsx)("circle",{fill:"transparent",strokeWidth:n,strokeLinecap:"round",strokeDasharray:`${s} ${s}`,style:{strokeDashoffset:0},r:i,cx:t,cy:t}),(0,x.jsx)("circle",{fill:"transparent",strokeWidth:n,strokeLinecap:"round",strokeDasharray:`${s} ${s}`,style:{strokeDashoffset:c},r:i,cx:t,cy:t})]})}function co(e){let{inputMax:t,inputLength:n,composerHeight:r,composerHeightInitial:o}=e;const i=t-n,a=n<t?n/t*100:100,s=t>=n,l=r>o,c=l&&t-20<n,u=c?16:13;return l?(0,x.jsx)(io,{title:i>0?`You have used ${n} of the total of ${t} allowed characters`:`You have exceeded the message limit of ${t}`,children:(0,x.jsxs)(x.Fragment,{children:[s&&(0,x.jsx)(lo,{radius:u,stroke:1.6,progress:a}),(0,x.jsx)(ao,{children:c&&(0,x.jsx)("span",{children:i})})]})}):null}var uo=n(491),fo=n(3949);const po=i.Ay.div.withConfig({componentId:"sc-1jba2dg-0"})(["width:min(100%,",");margin:auto;padding:16px;padding-top:6px;background:none;background:",";background-color:",";"],a.mb.tablet,e=>e.theme.background,e=>e.theme.background),ho=i.Ay.div.withConfig({componentId:"sc-1jba2dg-1"})(["display:flex;align-items:flex-end;justify-content:space-between;gap:12px;transition:all 450ms cubic-bezier(0.635,-0.6,0.3,1.65);",";"],e=>e.$submitHidden&&"\n gap: 0px;\n "),go=i.Ay.div.withConfig({componentId:"sc-1jba2dg-2"})(["margin:8px 0 10px 10px;transition:all 0.3s ease;color:",";font-size:var(--_kindlychat-font-size-p);line-height:37px;",""],e=>{let{theme:t}=e;return(0,me.w5)(t.background,"#FFFFFF","#000000")},e=>e.$hide?"transform: translateY(-45px);":""),mo=(0,i.Ay)(fo.A).attrs(e=>{let{inputProps:t}=e;return{...t}}).withConfig({componentId:"sc-1jba2dg-3"})([""," min-height:","px;outline-offset:-4px;"],se.hF,e=>{let{$minHeight:t}=e;return t}),bo=i.Ay.div.withConfig({componentId:"sc-1jba2dg-4"})(["width:28px;display:flex;justify-content:center;align-items:flex-start;transition:all 450ms cubic-bezier(0.635,-0.6,0.3,1.65);",";"],e=>e.$hidden&&"\n width: 0px;\n pointer-events: none;\n "),vo=(0,i.AH)(["color:#fff;z-index:10;cursor:pointer;box-shadow:none;height:28px;width:100%;padding:0;margin-bottom:4px;text-transform:none;display:flex;align-items:center;justify-content:center;border:none;max-width:28px;max-height:28px;background-color:transparent;"," &:focus-visible{outline:1px solid ",";}&:hover{opacity:0.8;}svg{transition:all 0.2s ease;path{stroke:",";}}"],N.sF,e=>{let{theme:t}=e;return(0,me.w5)(t.background,"#FFFFFF","#000000")},e=>(0,me.J7)(e.theme.background,e.theme.buttonBackground)?e.theme.buttonText:e.theme.buttonBackground),yo=i.Ay.button.withConfig({componentId:"sc-1jba2dg-5"})(["",";z-index:15;padding:0px;transition:opacity 0.1s ease-in;",";svg{transition:all 0.2s ease;user-select:none;pointer-events:none;}",";"],vo,e=>{let{$active:t}=e;return!t&&"\n opacity: 0.3;\n pointer-events: none;\n "},e=>{let{disabled:t}=e;return t&&"\n cursor: default;\n opacity: 0.3;\n &:hover {\n opacity: 0.3;\n }\n "}),xo=i.Ay.div.withConfig({componentId:"sc-e0zhkb-0"})(["position:absolute;right:",";left:",";bottom:4px;z-index:2;width:28px;height:28px;display:",";align-items:center;justify-content:center;button{padding:0;height:100%;width:100%;display:flex;align-items:center;justify-content:center;}&:hover{opacity:0.8;}svg{path{stroke:",";}}"],e=>{let{$isTextDirectionRtl:t}=e;return t?"auto":"12px"},e=>{let{$isTextDirectionRtl:t}=e;return t?"12px":"auto"},e=>{let{hidden:t}=e;return t?"none":"flex"},e=>{let{theme:t}=e;return(0,me.w5)(t.background,"rgba(255, 255, 255, 0.64)","rgba(0, 0, 0, 0.64)")}),wo=5;function ko(e){let{accept:t=l.oY,multiple:n=!0,setMessage:o}=e;const i=(0,Gt.jL)(),{isTextDirectionRtl:a}=(0,Gt.GV)(u.Od),{takenOver:s,supportsAttachment:c}=(0,Gt.GV)(e=>{let{agent:t}=e;return t}),{attachments:d}=(0,Gt.GV)(e=>{let{chatbubble:t}=e;return t}),f=(0,r.useRef)(null),p=s&&c||(0,K.A)()&&(null==d?void 0:d.exchangeId),h=(0,r.useCallback)(()=>{f.current&&(f.current.value="",f.current.click())},[f]);return(0,r.useEffect)(()=>{d.buttonClicked&&(i((0,G.B)()),h())},[d.buttonClicked,i,h]),(0,x.jsxs)(xo,{hidden:!p,$isTextDirectionRtl:a,children:[p&&(0,x.jsx)(se.$n,{onClick:e=>{e.preventDefault(),e.stopPropagation(),h()},"data-testid":"composer-file-upload-button",children:(0,x.jsx)(Ee.A,{})}),(0,x.jsx)("input",{ref:f,hidden:!0,type:"file",accept:t,multiple:n,onChange:async e=>{let{target:t}=e;try{var n;if(o(""),(null===(n=t.files)||void 0===n?void 0:n.length)>wo)return void i((0,G.Dc)(`You can upload up to ${wo} files at a time`,3500));const e=await Promise.all(Array.from(t.files).map(Rn.TA));i((0,G.Ln)(e))}catch(e){i((0,G.Dc)(e.message.replace(/^Error: ?/i,""),3500))}},style:{display:"none"}})]})}const So=i.Ay.div.withConfig({componentId:"sc-1c1rsxp-0"})(["display:flex;align-items:center;font-size:var(--_kindlychat-font-size-sm);> div{position:relative;overflow:visible;}span{border:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-left:5px;padding-right:50px;}button{display:none;position:absolute;top:-4px;right:-4px;border:1px solid ",";border-radius:50%;width:14px;height:14px;padding:0px;background:",";z-index:1;path{stroke:",";}}"],e=>{let{theme:t}=e;return(0,me.w5)(t.background,"rgba(255, 255, 255, 0.8)","rgba(0, 0, 0, 0.8)")},e=>{let{theme:t}=e;return t.background},e=>{let{theme:t}=e;return(0,me.w5)(t.background,"rgba(255, 255, 255, 0.8)","rgba(0, 0, 0, 0.8)")}),Co=i.Ay.div.withConfig({componentId:"sc-1c1rsxp-1"})(["height:36px;width:36px;&:not(:first-child){margin-left:4px;}&:hover,&:focus-within{button{display:block;}}"]),_o=i.Ay.div.withConfig({componentId:"sc-1c1rsxp-2"})(["height:36px;width:36px;border-radius:6px;position:relative;overflow:hidden;img,video{position:absolute;width:100%;height:100%;object-fit:cover;}"]),Ao=i.Ay.div.withConfig({componentId:"sc-1c1rsxp-3"})(["height:100%;padding:8px;border-radius:8px;background:",";"],a.Tj.grayColor);function Eo(e){let{file:t}=e;const n=(0,At.A)(t);return n===l.sl.IMAGE||n===l.sl.VIDEO?(0,x.jsxs)(_o,{tabIndex:0,children:[n===l.sl.IMAGE&&(0,x.jsx)("img",{src:t.url,alt:`Uploaded ${t.name}`}),n===l.sl.VIDEO&&(0,x.jsx)("video",{autoPlay:!0,muted:!0,loop:!0,playsInline:!0,"aria-label":t.name,children:(0,x.jsx)("source",{src:t.url,type:t.type})})]}):(0,x.jsx)(Ao,{children:(0,x.jsx)(Ee.A,{})})}i.Ay.div.withConfig({componentId:"sc-1c1rsxp-4"})(["font-size:var(--_kindlychat-font-size-p);height:41px;padding:0 4px;background:",";border-radius:8px;display:flex;align-items:center;margin-left:4px;"],a.Tj.grayColor);const To=(e,t)=>{const n=e.slice();return n.splice(t,1),n};function jo(){const e=(0,Gt.jL)(),{attachments:{files:t}}=(0,Gt.GV)(e=>{let{chatbubble:t}=e;return t});return(0,x.jsxs)(So,{children:[t.map((n,r)=>(0,x.jsxs)(Co,{children:[(0,x.jsx)(Eo,{file:n}),(0,x.jsx)(se.$n,{onClick:n=>{n.preventDefault(),(n=>{e((0,G.Ln)(To(t,n)))})(r)},children:(0,x.jsx)(Le.US,{width:11,height:11,color:"#FFF"})})]},`uploaded-image-${n.name}-${r}`)),1===(null==t?void 0:t.length)&&(0,x.jsx)("span",{children:t[0].name})]})}let Io;const Oo=37,Lo=1e3,Po=1e3;function Mo(e){let{active:t,chatHasStarted:n,currentlyPoppedUp:o=!1,bodyRef:i,inert:a}=e;const[s,l]=(0,r.useState)(Oo),[c,d]=(0,r.useState)(!1),[f,p]=(0,r.useState)(""),[h,g]=(0,r.useState)(0),m=(0,r.useRef)(null);(0,r.useEffect)(()=>{var e;!t&&!n||(0,K.A)()||o||!m.current||null===(e=m.current)||void 0===e||e.focus()},[t,n,o]);const b=(0,Gt.jL)(),{inputLimitEnabled:v,inputLimit:y,isTextDirectionRtl:w}=(0,Gt.GV)(u.Od),{allGreetingsHideInput:k,attachments:{files:S},hideInputField:C}=(0,Gt.GV)(e=>{let{chatbubble:t}=e;return t}),{takenOver:_,userIsTyping:A}=(0,Gt.GV)(e=>{let{agent:t}=e;return t}),{connected:E}=(0,Gt.GV)(e=>{let{connection:t}=e;return t}),{chatMessages:T}=(0,Gt.GV)(e=>{let{messages:t}=e;return t}),j=w?"rtl":void 0,I=C&&!_&&0===S.length,O=!_&&v,L=O?y:Lo,P=!f&&0===S.length,M=0===f.length&&0===S.length,N=!E||I||k&&0===T.length||f.length>L||P||!n,{placeholder:z,disabled_input_text:R}=(0,pn.A)(),$=e=>{if(e.preventDefault(),e.stopPropagation(),A&&b((0,G.mw)()),N)return!1;if(!f.trim()&&0===S.length)return!1;if(S.length>0)b((0,G.Zn)());else{const e=(new Date).getTime();if(!(e-h>Po))return!1;g(e),b((0,G.y2)(f.trim()))}return p(""),!0};return(0,uo.A)("touchend",async()=>{let e=0;const t=setInterval(()=>{var n;null===(n=m.current)||void 0===n||n.scrollIntoView(),e+=1,e>=5&&clearInterval(t)},100)},m.current),(0,x.jsx)(po,{dir:j,inert:a,children:(0,x.jsx)("form",{autoComplete:"off",action:"#",onSubmit:$,children:(0,x.jsxs)(ho,{$submitHidden:M,children:[(0,x.jsxs)(se.A0,{$initialHeight:Oo,$targetHeight:s,$active:!P,$hasFiles:(null==S?void 0:S.length)>0,children:[0===S.length&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(mo,{"data-testid":"chat-box-composer","aria-hidden":n?"false":"true","aria-label":z,name:"message",$hide:I,disabled:!n||I,$active:!P,ref:m,placeholder:z,onChange:e=>{const{value:t}=e.target;_&&(e=>{const t=e.length>0;clearTimeout(Io),!A&&t?b((0,G.Mb)()):A&&!t&&b((0,G.mw)()),Io=setTimeout(()=>{b((0,G.mw)())},5e3)})(t),p(t),Qr(i.current)&&setTimeout(()=>{Tr(i.current)},5)},value:f,onFocus:()=>d(!0),onBlur:()=>d(!1),onMouseDown:()=>{c||Qr(i.current)||Tr(i.current)},onHeightChange:l,$minHeight:Oo,enterKeyHint:"send",onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||$(e)}}),(0,x.jsx)(go,{$hide:C,inert:!C,children:R})]}),(0,x.jsx)(jo,{}),O&&(0,x.jsx)(co,{inputMax:L,inputLength:f.length,composerHeight:s,composerHeightInitial:Oo}),(0,x.jsx)(ko,{setMessage:p})]}),(0,x.jsx)(bo,{$hidden:M,children:(0,x.jsx)(yo,{"data-testid":"composer-submit","aria-hidden":N,$active:!N,disabled:N,role:"button",onClick:$,title:"Send message",onMouseDown:e=>{e.preventDefault()},children:(0,x.jsx)(Le.qx,{width:24,height:24})})})]})})})}function No(e){return(0,x.jsxs)("svg",{viewBox:"0 0 82 82",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,x.jsx)("title",{children:"Bot Avatar"}),(0,x.jsxs)("g",{transform:"translate(1 1)",fill:"none",fillRule:"evenodd",children:[(0,x.jsx)("circle",{stroke:"#F3F3F4",strokeWidth:"2",fill:"#FFF",cx:"40",cy:"40",r:"40"}),(0,x.jsx)("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"}),(0,x.jsx)("path",{d:"M29.42 60.83a17.42 17.42 0 0022.38 0",stroke:"#DA3CFF",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,x.jsx)("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 zo=n(8411),Ro=n(167);function $o(e){let{handleXButtonClick:t,settingsButtonRef:n}=e;const o=(0,Gt.jL)(),{name:i,avatar:a,fullscreenMode:s,isTextDirectionRtl:l}=(0,Gt.GV)(u.Od),{chatHasStarted:c,currentLanguage:d,overlayViews:f,currentModal:p}=(0,Gt.GV)(e=>{let{chatbubble:t}=e;return t}),{botConversationFeedback:h}=(0,zo.A)(d),g=l?"rtl":void 0,m=f[f.length-1],b=!m||"FEEDBACK"===m,v=s&&h||b&&!s,y=()=>{o((0,G.Rh)())};return w=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",w,!0),()=>window.removeEventListener("keydown",w,!0)),[w]),c?(0,x.jsxs)(Ro.B3,{dir:g,"data-testid":"chat-box-header",children:[(0,x.jsxs)(Ro.CE,{children:[a?(0,x.jsx)(Ro.dl,{$avatar:a,"aria-hidden":"true"}):(0,x.jsx)(No,{height:30,"aria-hidden":"true"}),(0,x.jsx)(Ro.Zw,{$isTextDirectionRtl:l,"aria-label":`Chat bot ${i||"Kindly"}`,children:i||"Kindly"})]}),(0,x.jsxs)(Ro.HD,{children:[b&&(0,x.jsx)(Ro.I$,{"aria-label":"Open settings",title:"Open settings",type:"button",onClick:()=>{o((0,G.wQ)("GENERIC"))},"data-testid":"chat-settings-button",ref:n,inert:"COMPLIANCE"===p||void 0,children:(0,x.jsx)(Le.Ze,{width:24,height:24})}),b&&!s&&(0,x.jsx)(Ro.I$,{"aria-label":"Minimize chat",title:"Minimize chat",type:"button",onClick:y,"data-testid":"minimize-chat-button","data-cy":"minimize-chat-button",children:(0,x.jsx)(Le.gR,{width:24,height:24})}),v&&(0,x.jsx)(Ro.I$,{"aria-label":"End chat",title:"End chat",type:"button",onClick:t,"data-testid":"end-chat-button","data-cy":"end-chat-button",children:(0,x.jsx)(Le.US,{width:24,height:24})})]})]}):null;var w}var Do=n(7325);const Fo=i.Ay.div.withConfig({componentId:"sc-1s4wj3o-0"})(["overflow:hidden;position:absolute;inset:0;background:#fff;background-color:#fff;height:100%;width:100%;padding:0 0 20px 0;z-index:16;",";animation-duration:0.2s;animation-timing-function:ease-in;"],q.jB),Bo=i.Ay.div.withConfig({componentId:"sc-1s4wj3o-1"})(["height:100%;display:flex;text-align:center;flex-direction:column;justify-content:space-between;align-items:center;"]),Ho=i.Ay.div.withConfig({componentId:"sc-1s4wj3o-2"})(["width:100%;height:100%;display:flex;padding:0 30px;flex-direction:column;justify-content:center;align-items:center;"]),Uo=(0,i.Ay)(y.fz).withConfig({componentId:"sc-1s4wj3o-3"})(["font-size:var(--_kindlychat-font-size-m);a{color:",";}"],a.Tj.primaryColor),Vo=i.Ay.div.withConfig({componentId:"sc-1s4wj3o-4"})(["a{color:",";text-align:center;font-size:var(--_kindlychat-font-size-p);display:block;margin:60px 0 30px 0;&:hover,&:focus,&:active,&:visited{color:",";}}"],a.Tj.darkColor,a.Tj.darkColor),Wo=i.Ay.p.withConfig({componentId:"sc-1s4wj3o-5"})(["position:absolute;bottom:0;font-size:var(--_kindlychat-font-size-sm);color:",";"],a.CM[50]);function Go(){const e=(0,Gt.jL)(),t=()=>{e((0,Do.eG)())},{back_to_chat_button:n}=(0,pn.A)();return(0,x.jsx)(Fo,{children:(0,x.jsxs)(Bo,{children:[(0,x.jsxs)(Ho,{children:[(0,x.jsx)(y.H3,{children:"About Kindly"}),(0,x.jsxs)(Uo,{children:["This chatbot is powered by Kindly.",(0,x.jsx)("br",{}),"To learn more about Kindly, visit"," ",(0,x.jsxs)("a",{ref:e=>{e&&e.focus()},href:"https://www.kindly.ai",target:"_blank",rel:"noopener noreferrer",children:["this website.",(0,x.jsx)(R,{})]})]})]}),(0,x.jsx)(Vo,{children:(0,x.jsxs)(se.N_,{"aria-label":n,title:n,onClick:t,onKeyUp:e=>{"Enter"===e.key&&t()},tabIndex:0,type:"button",children:["‹ ",n]})}),(0,x.jsxs)(Wo,{children:["v",window.kindlyChat.VERSION]})]})})}var qo=n(9223);const Ko=i.Ay.div.withConfig({componentId:"sc-xpbg6h-0"})(["z-index:2;display:flex;justify-content:center;"]),Yo=i.Ay.span.withConfig({componentId:"sc-xpbg6h-1"})(["width:8px;height:8px;opacity:1;border-radius:100%;margin:0 4px 0 8px;background:#1cd300;background-color:#1cd300;"]),Xo=i.Ay.p.withConfig({componentId:"sc-xpbg6h-2"})(["display:flex;font-size:var(--_kindlychat-font-size-xs);color:",";line-height:20px;margin-bottom:0;align-items:baseline;span:first-child{opacity:0.6;}a{cursor:pointer;}"],a.Tj.darkColor);function Zo(e){let{shouldAutoFocus:t}=e;const n=(0,Gt.jL)();return(0,x.jsx)(Ko,{children:(0,x.jsxs)(Xo,{children:[(0,x.jsx)("span",{children:"Powered by"})," ",(0,x.jsx)(Yo,{}),(0,x.jsx)(y.cp,{children:(0,x.jsx)(se.Bi,{"aria-label":"Visit Kindly",title:"Visit Kindly",onClick:e=>{"click"===(null==e?void 0:e.type)&&n((0,G.wQ)("ABOUT_CHAT"))},type:"button",autoFocus:t,children:"Kindly"})})]})})}const Qo=i.Ay.div.withConfig({componentId:"sc-7eewng-0"})(["overflow:hidden;position:relative;background:#fff;background-color:#fff;height:100%;width:100%;padding:0 0 20px 0;",";animation-duration:0.2s;animation-timing-function:ease-in;"],q.jB),Jo=i.Ay.div.withConfig({componentId:"sc-7eewng-1"})(["height:100%;display:flex;text-align:center;flex-direction:column;justify-content:space-between;align-items:center;"]),ei=i.Ay.div.withConfig({componentId:"sc-7eewng-2"})(["width:100%;height:100%;display:flex;padding:0 30px;justify-content:center;align-items:center;"]),ti=i.Ay.div.withConfig({componentId:"sc-7eewng-3"})(["button{margin:auto;}a{color:",";text-align:center;font-size:var(--_kindlychat-font-size-p);display:block;margin:60px 0 30px 0;&:hover,&:focus,&:active,&:visited{color:",";}}"],a.Tj.darkColor,a.Tj.darkColor),ni=i.Ay.div.withConfig({componentId:"sc-7eewng-4"})(["div{display:flex;position:unset;align-items:center;}"]);function ri(e){let{endChat:t}=e;const{whitelabelEnabled:n}=(0,Gt.GV)(u.Od),{currentLanguageCode:r}=(0,pe.A)(),{preloadFeedbackImages:o}=(0,zo.A)(r),i=(0,Gt.jL)(),s=(0,pn.A)(),{back_to_chat_button:l,cancel_chat_button:c,cancel_chat_text:d}=s;return(0,x.jsx)(Qo,{children:(0,x.jsxs)(Jo,{children:[(0,x.jsx)(ei,{children:(0,x.jsx)(y.H2,{children:d})}),(0,x.jsxs)(ti,{children:[(0,x.jsx)(qo.A,{style:a.Nz,"aria-label":c,title:c,onClick:t,onMouseEnter:()=>{o("bot_conversation")},type:"button",text:c,cy:"cancel-chat-button",autoFocus:!0}),(0,x.jsxs)(se.N_,{"aria-label":l,title:l,onClick:()=>{i((0,Do.eG)())},onKeyUp:e=>{"Enter"===e.key&&i((0,Do.eG)())},type:"button",tabIndex:0,children:["‹ ",l]})]}),(0,x.jsx)(ni,{children:!n&&(0,x.jsx)(Zo,{})})]})})}var oi=n(5096);function ii(e){let{color:t="#232F41"}=e;return(0,x.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("path",{d:"M6.83317 4.5L3.1665 8L6.83317 11.5",stroke:t,strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),(0,x.jsx)("path",{d:"M12.8335 8H3.3335",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function ai(e){let{color:t="#232F41"}=e;return(0,x.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("path",{d:"M9.1665 4.5L12.8332 8L9.1665 11.5",stroke:t,strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),(0,x.jsx)("path",{d:"M12.6665 8H3.1665",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}var si=n(4142),li=n(5767);const ci=window.matchMedia("(prefers-reduced-motion: reduce)").matches,ui="startViewTransition"in document;async function di(e){if(ci||!ui)return void e();const t=document;return await t.startViewTransition(()=>{(0,Ie.flushSync)(e)})}var fi=n(3169);const pi=(0,i.i7)(["0%{opacity:0;transform:translateY(4px);}100%{opacity:1;transform:translateY(0);}"]),hi=i.Ay.section.attrs({"data-testid":"chat-modal"}).withConfig({componentId:"sc-1nmbsmf-0"})(["position:absolute;width:100%;bottom:0;left:0;right:0;padding:16px;border-radius:12px;border:1px solid ",";background-color:",";color:var(--panel-background-white-black-contrast-1743170834);z-index:15;animation:"," 0.3s ease;"],e=>{let{theme:t}=e;return(0,me.w5)(t.panelBackground,"rgba(255, 255, 255, 0.8)","#0000000d")},e=>{let{theme:t}=e;return t.panelBackground},pi),gi=(0,i.Ay)(hi).withConfig({componentId:"sc-t0w48p-0"})(["display:flex;min-height:",";padding-top:38px;gap:24px;flex-direction:column;justify-content:",";border-radius:",";",";view-transition-name:'feedback-modal-1723461511841';"],e=>{let{$isFullHeight:t}=e;return t?"100%":"clamp(240px, 25%, 600px)"},e=>{let{$isFullHeight:t,$justifyCenter:n}=e;return t||n?"center":"space-between"},e=>{let{$isFullHeight:t}=e;return t&&"unset"},e=>{let{$isFullHeight:t}=e;return t&&"border: none"}),mi=(0,i.Ay)(qo.A).withConfig({componentId:"sc-t0w48p-1"})(["margin-inline:auto;"]),bi=i.Ay.button.withConfig({componentId:"sc-t0w48p-2"})(["background:none;border:none;position:absolute;top:8px;right:8px;cursor:pointer;svg{display:block;}"]),vi=i.Ay.h2.withConfig({componentId:"sc-t0w48p-3"})(["margin:",";font-size:var(--_kindlychat-font-size-p);font-weight:500;text-align:center;"],e=>{let{$isFullHeight:t}=e;return t?"auto 8px 8px 8px":"8px"}),yi=i.Ay.div.withConfig({componentId:"sc-t0w48p-4"})(["display:flex;flex-wrap:wrap;justify-content:center;row-gap:16px;@media only screen and (max-width:360px){flex-direction:column;align-items:center;}"]),xi=i.Ay.button.withConfig({componentId:"sc-t0w48p-5"})([""," display:flex;height:fit-content;gap:8px;flex-direction:column;align-items:center;justify-content:center;opacity:",";transition:opacity 0.2s;cursor:pointer;user-select:none;word-break:normal;overflow-wrap:anywhere;@media only screen and (max-width:360px){width:fit-content;}@media only screen and (min-width:361px){width:65px;}"],N.AF,e=>{let{$wasChoiceMade:t,$isSelected:n}=e;return t&&!n?.5:1}),wi=i.Ay.img.withConfig({componentId:"sc-t0w48p-6"})(["width:24px;height:24px;transition:scale 0.3s;scale:",";",":hover &{scale:1.25;}"],e=>{let{$isSelected:t}=e;return t?1.25:1},xi),ki=i.Ay.span.withConfig({componentId:"sc-t0w48p-7"})(["display:block;font-size:var(--_kindlychat-font-size-sm);font-weight:500;"]),Si=i.Ay.div.withConfig({componentId:"sc-t0w48p-8"})(["display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-bottom:20px;"]),Ci=i.Ay.button.withConfig({componentId:"sc-t0w48p-9"})(["border:1px solid rgba(0,0,0,0.08);padding:8px 12px;color:",";background-color:",";background-color:",";border-radius:6px;box-shadow:",";translate:",";transition:background-color 0.2s,translate 0.2s;cursor:pointer;user-select:none;"],e=>{let{theme:t}=e;return(0,me.w5)(t.secondaryButtonBackground,a.AV.light,a.AV.dark)},e=>{let{theme:t}=e;return t.secondaryButtonBackground},e=>{let{$isSelected:t,theme:n}=e;return t?(0,me.SW)(n.secondaryButtonBackground)?`oklch(from ${n.secondaryButtonBackground} calc(l * 0.90) c h / 0.9)`:`oklch(from ${n.secondaryButtonBackground} calc(l * 1.15) c h / 0.9)`:n.secondaryButtonBackground},a.FR.button,e=>{let{$isSelected:t}=e;return t?"0 -2px":"0 0"}),_i=i.Ay.textarea.withConfig({componentId:"sc-t0w48p-10"})(["font-family:inherit;color:inherit;border:none;outline:none;width:100%;height:75px;font-size:var(--_kindlychat-font-size-sm);background:",";border-radius:8px;padding:8px 12px;resize:none;&::placeholder{color:",";}"],e=>{let{theme:t}=e;return(0,me.w5)(t.panelBackground,"rgba(255, 255, 255, 0.08)","rgba(0, 0, 0, 0.08)")},e=>{let{theme:t}=e;return(0,me.w5)(t.panelBackground,"rgba(255, 255, 255, 0.50)","rgba(0, 0, 0, 0.50)")}),Ai=i.Ay.div.withConfig({componentId:"sc-t0w48p-11"})(["",";display:grid;grid-template-columns:0.6fr 1fr 0.6fr;grid-template-areas:'back dots next';view-transition-name:'navigation-1723461511841';"],e=>{let{$isFullHeight:t}=e;return t&&"margin-top: auto"}),Ei=i.Ay.button.withConfig({componentId:"sc-t0w48p-12"})(["display:flex;width:max-content;align-items:center;gap:2px;padding:7px 12px;border:1px solid #00000014;border-radius:6px;box-shadow:",";cursor:pointer;user-select:none;"],a.FR.button),Ti=(0,i.Ay)(Ei).withConfig({componentId:"sc-t0w48p-13"})(["grid-area:back;color:",";background-color:",";"],e=>{let{theme:t}=e;return(0,me.w5)(t.secondaryButtonBackground,a.AV.light,a.AV.dark)},e=>{let{theme:t}=e;return t.secondaryButtonBackground}),ji=(0,i.Ay)(Ei).withConfig({componentId:"sc-t0w48p-14"})(["grid-area:next;place-self:end;align-items:center;background-color:",";color:",";outline-offset:4px;transition:opacity 0.2s;&:disabled{opacity:0.5;cursor:not-allowed;}"],e=>{let{theme:t}=e;return t.buttonBackground},e=>{let{theme:t}=e;return t.buttonText}),Ii=i.Ay.div.withConfig({componentId:"sc-t0w48p-15"})(["grid-area:dots;display:flex;align-items:center;gap:8px;margin:auto;view-transition-name:'progress-dots-1723461511841';"]),Oi=i.Ay.span.withConfig({componentId:"sc-t0w48p-16"})(["width:",";height:",";border-radius:50%;background-color:",";transition:width 0.3s,height 0.3s,background-color 0.3s;box-shadow:",";"],e=>{let{$isActive:t}=e;return t?"10px":"6px"},e=>{let{$isActive:t}=e;return t?"10px":"6px"},e=>{let{$isDotBeforeOrEqualCurrentStep:t,theme:n}=e;return t?`${n.buttonBackground}`:`${a.CM[20]}`},a.FR.button),Li=i.Ay.div.withConfig({componentId:"sc-t0w48p-17"})(["font-size:var(--_kindlychat-font-size-p);font-weight:500;margin:auto;text-align:center;translate:0 0;transition:translate 0.2s;"]),Pi=(0,i.Ay)(fi.Ef).withConfig({componentId:"sc-t0w48p-18"})(["margin-top:16px;width:100%;"]),Mi=i.Ay.span.withConfig({componentId:"sc-t0w48p-19"})(["overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"]);function Ni(e){var t,n,o;let{feedbackToSubmit:s,isFullHeight:l,endChat:u,shouldEndChat:d=!1,inert:f}=e;const p=(0,Gt.jL)(),h=(0,c.Pj)().getState(),{currentLanguageCode:g}=(0,pe.A)(),{botConversationFeedback:m,handoverConversationFeedback:b}=(0,zo.A)(g),v="bot_conversation"===s.trigger_type?m:b,y=(0,pn.A)(),{start_over_button:w}=y,{buttonText:k,secondaryButtonBackground:S}=(0,r.useContext)(i.Dx),C=(0,r.useMemo)(()=>(0,me.w5)(S,a.AV.light,a.AV.dark),[S]),_="external_feedback"===v.feedback_type,E=[...null!=v&&v.rating_scale?["RATING_SCALE"]:[],...null!=v&&null!==(t=v.predefined_buttons)&&void 0!==t&&t.enable_step?["PREDEFINED_BUTTONS"]:[],...null!=v&&null!==(n=v.free_form)&&void 0!==n&&n.enable_step?["FREEFORM_TEXT"]:[],"THANK_YOU"],T=s.currentStep,j=T?E.indexOf(T):0,I=oi.Z.fullscreenMode,O=v.predefined_buttons.use_sentiment_buttons&&null!==(o=s.sentiment)&&void 0!==o?o:"no_sentiment";(0,r.useEffect)(()=>{if(!T)return;const e=E[0]===T;(0,Oe.tf)("show-feedback",{value:{feedbackType:T}},{storeState:h,source:e?"programmatic":"user"})},[T,h]);const L=e=>{(0,Oe.tf)("dismiss-feedback",{value:{feedbackType:T}},{storeState:h,source:e}),p((0,Do.zn)(null)),p((0,li.ot)()),d&&p((0,li.Dz)())},P=()=>{(0,Oe.tf)("restart-chat",void 0,{storeState:h}),p((0,Do.ky)(!0))};return _?(0,x.jsxs)(gi,{$isFullHeight:!!l,$justifyCenter:!0,children:[!l&&(0,x.jsx)(bi,{onClick:()=>L("user"),children:(0,x.jsx)(Le.US,{color:"black",height:28,width:28})}),(0,x.jsx)(vi,{$isFullHeight:!!l,children:v.headline}),(0,x.jsx)(mi,{onClick:()=>{d&&(null==u||u("programmatic")),p((0,Do.zn)(null)),p((0,li.ot)())},href:v.url_for_feedback,target:"_blank",rel:"noreferrer",children:v.button_label})]}):(0,x.jsxs)(gi,{"aria-live":"polite",$isFullHeight:!!l,inert:f,children:[!l&&(0,x.jsx)(bi,{onClick:()=>L("user"),children:(0,x.jsx)(Le.US,{color:"black",height:28,width:28})}),(()=>{var e;switch(T){case"RATING_SCALE":return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(vi,{$isFullHeight:Boolean(l),children:v.rating_scale.title}),(0,x.jsx)(yi,{children:v.rating_scale.edit_labels.map((e,t)=>{const n=0===t;return(0,x.jsxs)(xi,{$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?p((0,li.n_)()):p((0,li.wm)({index:n,rating:r,sentiment:o})));var n,r,o},...n&&{autoFocus:!0},children:[(0,x.jsx)(wi,{src:e.image,alt:e.rating,$isSelected:s.index===t}),e.show_rating&&(0,x.jsx)(ki,{children:e.rating})]},e.id)})})]});case"PREDEFINED_BUTTONS":return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(vi,{$isFullHeight:!!l,children:v.predefined_buttons.sentiments[O].title}),(0,x.jsx)(Si,{children:v.predefined_buttons.sentiments[O].buttons.map((e,t)=>{var n,r;const o=0===t;return(0,x.jsx)(Ci,{$isSelected:null===(n=s.buttons_chosen)||void 0===n?void 0:A()(n).call(n,e.text),"aria-pressed":null===(r=s.buttons_chosen)||void 0===r?void 0:A()(r).call(r,e.text),onClick:()=>{return t=e.text,void p((0,li.m9)(t));var t},...o&&{autoFocus:!0},children:e.text},e.id)})})]});case"FREEFORM_TEXT":return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(vi,{$isFullHeight:!!l,id:"feedback-freeform-title-1739894771",children:v.free_form.title}),(0,x.jsx)(_i,{value:null!==(e=s.freeform_text)&&void 0!==e?e:"",onChange:e=>{return t=e.target.value,void p((0,li.GY)(t));var t},placeholder:v.free_form.placeholder,"aria-labelledby":"feedback-freeform-title-1739894771",autoFocus:!0})]});case"THANK_YOU":return(0,x.jsxs)(Li,{children:[(0,x.jsx)(vi,{$isFullHeight:!!l,children:v.thanks_text}),I&&(0,x.jsx)(Pi,{"aria-label":w,title:w,onClick:P,type:"button",$loading:!1,children:(0,x.jsx)(Mi,{children:w})})]});default:return null}})(),"THANK_YOU"!==T?(0,x.jsxs)(Ai,{$isFullHeight:l,children:[j>0&&(0,x.jsxs)(Ti,{onClick:()=>{di(()=>{const e=E[j-1];e&&p((0,li.zp)(e))})},children:[(0,x.jsx)(ii,{color:C}),v.back_button]}),(0,x.jsx)(Ii,{children:E.slice(0,-1).map((e,t)=>(0,x.jsx)(Oi,{$isActive:j===t,$isDotBeforeOrEqualCurrentStep:j>=t},e))}),(0,x.jsx)(ji,{onClick:async()=>{di(()=>{(async()=>{(0,Oe.tf)("submit-feedback",{value:{feedbackType:T,feedbackValue:s}},{storeState:h}),await p((0,si.S)(s))})();const e=E[j+1];e&&(p((0,li.zp)(e)),"THANK_YOU"!==e||I||setTimeout(()=>{d?(null==u||u("programmatic"),p((0,Do.zn)(null))):L("programmatic"),p((0,li.ot)())},4e3))})},disabled:"RATING_SCALE"===T&&"number"!=typeof s.index||"PREDEFINED_BUTTONS"===T&&!s.buttons_chosen.length,children:T===E[E.length-2]?(0,x.jsxs)(x.Fragment,{children:[v.send_button,(0,x.jsx)(ai,{color:k})]}):(0,x.jsxs)(x.Fragment,{children:[v.next_button,(0,x.jsx)(ai,{color:k})]})})]}):(0,x.jsx)(x.Fragment,{children:l&&(0,x.jsx)(Zo,{shouldAutoFocus:!0})})]})}const zi=(0,i.i7)(["0%{opacity:0;}100%{opacity:1;}"]),Ri=((0,i.AH)(["",";animation-name:",";"],(0,q.qL)(100),zi),(0,i.i7)(["0%{opacity:1;}100%{opacity:0;}"])),$i=((0,i.AH)(["",";animation-delay:50ms;animation-name:",";"],(0,q.qL)(500),Ri),(0,i.AH)(["",";"],e=>e.$fullHeight?"top: 0; height: 100%;":"top: 55px; height: calc(100% - 55px); border-bottom-right-radius: 6px; border-bottom-left-radius: 6px")),Di=i.Ay.div.withConfig({componentId:"sc-1pzvbin-0"})(["width:100%;overflow:hidden;"," position:absolute;z-index:",";background:#fff;background-color:#fff;opacity:1;transition:opacity 0.2s;@starting-style{opacity:0;}"],$i,a.vI.overlayIndex),Fi=(0,i.Ay)(se.N_).withConfig({componentId:"sc-1pzvbin-1"})(["display:block;color:",";text-align:center;margin:30px 0;font-size:var(--_kindlychat-font-size-p);&:hover,&:focus,&:active,&:visited{color:",";}"],a.Tj.darkColor,a.Tj.darkColor),Bi=i.Ay.div.withConfig({componentId:"sc-1pzvbin-2"})(["overflow:hidden;position:relative;background:#fff;background-color:#fff;height:100%;width:100%;text-align:center;display:grid;grid-template-rows:1fr 40px;@media (max-height:610px){overflow-y:auto;}"]),Hi=i.Ay.div.withConfig({componentId:"sc-1pzvbin-3"})(["display:grid;grid-gap:15px;grid-template-rows:auto 1fr;overflow-y:auto;@media ","{grid-gap:0;grid-template-rows:1fr;}"],a.jO.maxPhoneHeight),Ui=i.Ay.div.withConfig({componentId:"sc-1pzvbin-4"})(["display:grid;grid-template-rows:1fr auto;@media ","{grid-template-rows:1fr;}"],a.jO.maxPhoneHeight),Vi=i.Ay.div.withConfig({componentId:"sc-1pzvbin-5"})(["width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:20px 30px;h3{display:flex;align-items:center;justify-content:center;}"]),Wi=i.Ay.span.withConfig({componentId:"sc-1pzvbin-6"})(["overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"]),Gi=i.Ay.div.withConfig({componentId:"sc-1pzvbin-7"})(["div{position:unset;display:flex;flex-direction:column;align-items:center;}"]);function qi(e){let{textContent:t}=e;const n=(0,c.wA)(),r=(0,c.Pj)().getState(),{chat_deleted_header:o,back_to_chat_button:i}=t,a=()=>{(0,Oe.tf)("restart-chat",void 0,{storeState:r}),n((0,G.ky)(!0))};return(0,x.jsxs)(Vi,{children:[(0,x.jsx)(y.H3,{children:o}),(0,x.jsx)(fi.Ef,{"aria-label":i,title:i,onClick:a,onKeyUp:e=>{"Enter"===e.key&&a()},type:"button","data-testid":"back-to-chat-option",autoFocus:!0,$loading:!1,children:(0,x.jsx)(Wi,{children:i})})]})}const Ki=i.Ay.div.withConfig({componentId:"sc-19fb7bu-0"})(["max-width:100%;flex-direction:column;display:flex;align-items:center;margin:unset;button{margin-bottom:10px;&:last-child{margin-top:0;}}"]);function Yi(e){let{textContent:t,onNavigateBack:n}=e;const r=(0,c.Pj)().getState(),o=(0,c.wA)(),{back_to_chat_button:i,delete_text:s,delete_button:l}=t;return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(Vi,{children:(0,x.jsx)(y.H3,{children:s})}),(0,x.jsxs)(Ki,{children:[(0,x.jsx)(qo.A,{style:a.Nz,"aria-label":l,title:l,onClick:()=>{(0,Oe.tf)("delete-chat",void 0,{storeState:r}),o((0,G._e)())},type:"button",text:l,cy:"confirm-delete-chat",autoFocus:!0}),(0,x.jsxs)(Fi,{"aria-label":i,title:i,onClick:()=>n(),onKeyUp:e=>{"Enter"===e.key&&n()},type:"button",tabIndex:0,children:["‹ ",i]})]})]})}const Xi=i.Ay.div.withConfig({componentId:"sc-13vd2wb-0"})(["height:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding:0 15px;"]),Zi=i.Ay.div.withConfig({componentId:"sc-13vd2wb-1"})(["max-width:100%;margin:auto;display:flex;flex-direction:column;min-width:190px;button{margin-bottom:10px;}"]),Qi=i.Ay.div.withConfig({componentId:"sc-13vd2wb-2"})(["color:",";font-size:var(--_kindlychat-font-size-m);margin:0 0 10px;line-height:24px;"],a.Tj.darkColor);function Ji(e){let{textContent:t,onNavigateBack:n}=e;const r=(0,c.Pj)().getState(),o=(0,c.wA)(),{back_to_chat_button:i,download_button:a,download_format_text:s}=t,l=e=>{(0,Oe.tf)("download-chat",void 0,{storeState:r}),o((0,G.VK)({},e))};return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(Vi,{children:(0,x.jsx)(Qi,{children:s})}),(0,x.jsxs)(Xi,{children:[(0,x.jsxs)(Zi,{children:[(0,x.jsx)(fi.Ef,{"aria-label":`${a} (HTML)`,title:`${a} (HTML)`,onClick:()=>l("html"),type:"button","data-testid":"download-chat-html",autoFocus:!0,$isSecondaryButton:!0,$loading:!1,children:(0,x.jsx)(Wi,{children:`${a} (HTML)`})}),(0,x.jsx)(fi.Ef,{"aria-label":`${a} (JSON)`,title:`${a} (JSON)`,onClick:()=>l("json"),type:"button","data-testid":"download-chat-json",$isSecondaryButton:!0,$loading:!1,children:(0,x.jsx)(Wi,{children:`${a} (JSON)`})})]}),(0,x.jsxs)(Fi,{"aria-label":i,title:i,onClick:n,onKeyUp:e=>{"Enter"===e.key&&n()},type:"button",tabIndex:0,children:["‹ ",i]})]})]})}const ea=i.Ay.div.withConfig({componentId:"sc-eb968f-0"})(["width:100%;height:",";background:",";background-color:",";@media ","{display:none;}"],e=>e.$long?"180px":"210px",e=>e.theme.headerBackground,e=>e.theme.headerBackground,a.jO.maxPhoneHeight),ta=i.Ay.div.withConfig({componentId:"sc-eb968f-1"})(["min-width:60%;max-width:95%;margin:auto;display:flex;flex-direction:column;button{margin:5px 0;&:first-child{margin-top:10px;}svg{margin-right:15px;vertical-align:middle;}}"]);function na(){const{supportedLanguages:e}=(0,pe.A)(),t=(0,Gt.jL)(),n=(0,c.Pj)().getState(),r=e.length>1,{back_to_chat_button:o,change_language_button:i,download_button:a,delete_button:s,start_over_button:l}=(0,pn.A)(),u=e=>()=>{t((0,G.wQ)(e))};return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(ea,{$long:r}),(0,x.jsxs)(ta,{children:[r&&(0,x.jsx)(fi.Ef,{"aria-label":i,title:i,onClick:u("SELECT_LANGUAGE"),type:"button","data-testid":"change-language-option",$isSecondaryButton:!0,autoFocus:r,children:(0,x.jsxs)(Wi,{children:[(0,x.jsx)(Le.U,{width:16,height:16,crop:!0}),i]})}),(0,x.jsx)(fi.Ef,{"aria-label":l,title:l,onClick:()=>{(0,Oe.tf)("restart-chat",void 0,{storeState:n}),t((0,G.ky)(!0))},type:"button","data-testid":"restart-chat-option",$isSecondaryButton:!0,autoFocus:!r,children:(0,x.jsx)(Wi,{children:l})}),(0,x.jsx)(fi.Ef,{"aria-label":s,title:s,onClick:u("DELETE_CHAT_CONFIRMATION"),type:"button","data-testid":"delete-chat-option",$isSecondaryButton:!0,children:(0,x.jsx)(Wi,{children:s})}),(0,x.jsx)(fi.Ef,{"aria-label":a,title:a,onClick:u("SELECT_DOWNLOAD"),type:"button","data-testid":"download-chat-option",$isSecondaryButton:!0,children:(0,x.jsx)(Wi,{children:a})}),(0,x.jsx)(fi.Ef,{"aria-label":o,title:o,onClick:()=>{t((0,G.eG)())},type:"button","data-testid":"back-to-chat-option",children:(0,x.jsx)(Wi,{children:o})})]})]})}const ra=i.Ay.fieldset.withConfig({componentId:"sc-6uesp5-0"})(["border:none;background-color:transparent;height:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding:0 30px;"]),oa=i.Ay.div.withConfig({componentId:"sc-6uesp5-1"})(["max-width:100%;flex-direction:column;display:flex;margin:unset;min-width:190px;button{margin-bottom:10px;text-transform:capitalize;&:last-child{margin-top:0;}}"]),ia=i.Ay.div.withConfig({componentId:"sc-6uesp5-2"})(["margin-bottom:15px;button{display:block;margin:0 auto 30px;}"]),aa=(0,i.Ay)(y.H3).withConfig({componentId:"sc-6uesp5-3"})(["margin-top:30px;width:100%;svg{margin-right:16px;display:inline-block;vertical-align:middle;}"]);function sa(e){let{onNavigateBack:t}=e;const{back_to_chat_button:n,change_language_button:o,confirm_action_button:i}=(0,pn.A)(),{currentLanguageCode:s,supportedLanguages:l}=(0,pe.A)(),[u,d]=(0,r.useState)(s),f=l.find(e=>{let{code:t}=e;return t===s}),p=l.find(e=>{let{code:t}=e;return t===u}),h=(0,c.Pj)().getState(),g=(0,Gt.jL)();return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(Vi,{children:(0,x.jsxs)(aa,{children:[(0,x.jsx)(Le.U,{width:50,height:50}),o]})}),(0,x.jsxs)(ra,{children:[(0,x.jsx)(oa,{children:l.map((e,t)=>{const n=0===t;return(0,x.jsx)(qo.A,{"aria-label":e.name_local,title:e.name_local,onClick:()=>d(e.code),text:e.name_local,"aria-checked":e.code===u,selected:e.code===u,role:"radio",cy:`${e.code}-button`,autoFocus:n,isSecondaryButton:!0},e.code)})}),(0,x.jsxs)(ia,{children:[u!==s&&(0,x.jsx)(qo.A,{style:a.Nz,"aria-label":i,title:i,onClick:()=>{(0,Oe.tf)("change-language",{value:{languageCode:u,languageName:(null==p?void 0:p.name_english)||u,previousLanguageCode:s,previousLanguageName:(null==f?void 0:f.name_english)||s}},{storeState:h}),g((0,G.L4)(u,{skipRestart:!0})),g(G.RY),t()},type:"submit",text:i}),(0,x.jsxs)(Fi,{"aria-label":n,title:n,onClick:t,onKeyUp:e=>{"Enter"===e.key&&t()},tabIndex:0,type:"button",children:["‹ ",n]})]})]})]})}var la=n(5381);const ca=i.Ay.div.withConfig({componentId:"sc-7s2wt6-0"})(["position:relative;width:fit-content;&:before{content:'';position:absolute;right:11px;top:50%;transform:translateY(-50%);width:0;height:0;z-index:1;border-top:7px solid #2c2c2c;border-left:4px solid transparent;border-right:4px solid transparent;}"]),ua=i.Ay.div.withConfig({componentId:"sc-7s2wt6-1"})(["position:absolute;top:10px;left:8px;"]),da=i.Ay.select.withConfig({componentId:"sc-7s2wt6-2"})(["cursor:pointer;appearance:none;border-radius:5px;font-size:var(--_kindlychat-font-size-m);border:1px solid #dedede;padding:8px 30px 8px 11px;position:relative;color:#2c2c2c;background:transparent;background-color:transparent;"," ",""],e=>e.$icon&&"padding-left: 30px;",N.sF);function fa(e){let{children:t,onClick:n=la.A,onChange:r=la.A,value:o,name:i,icon:a=!1,...s}=e;return(0,x.jsxs)(ca,{children:[a&&(0,x.jsx)(ua,{children:(0,x.jsx)(Le.U,{width:16,height:16,crop:!0})}),(0,x.jsx)(da,{onClick:n,onChange:r,value:o,name:i,$icon:a,...s,children:t})]})}var pa=n(628),ha=n(9359);const ga=i.Ay.div.withConfig({componentId:"sc-g6reae-0"})(["height:100%;display:flex;flex-direction:column;justify-content:space-between;background:#fff;background-color:#fff;"]),ma=(0,i.AH)(["background-size:cover;background-position:center;background-image:url(",");"],e=>e.$welcomePageImage),ba=i.Ay.div.withConfig({componentId:"sc-g6reae-1"})(["flex:1;height:100%;max-height:250px;padding:18px 18px 0;background:",";background-color:",";",";"],e=>e.theme.headerBackground,e=>e.theme.headerBackground,e=>e.$welcomePageImage&&ma),va=i.Ay.div.withConfig({componentId:"sc-g6reae-2"})(["flex:1;padding:15px 24px 24px;border-top:5px solid ",";@media ","{padding:24px;}"],e=>e.theme.headerBackground,a.jO.maxTablet),ya=i.Ay.div.withConfig({componentId:"sc-g6reae-3"})(["height:100%;display:flex;flex-direction:column;justify-content:space-between;"]),xa=i.Ay.div.withConfig({componentId:"sc-g6reae-4"})(["padding:20px 0;"]),wa=i.Ay.div.withConfig({componentId:"sc-g6reae-5"})(["display:flex;flex-direction:column;gap:10px;margin:24px;justify-content:space-between;"," button:first-child{@media ","{min-width:unset;}}"],e=>{const t=e.theme.background,n=(0,me.SW)(t),r=n?`color-mix(in srgb, ${t} 96%, black)`:`color-mix(in srgb, ${t} 96%, white)`;return e.$complianceEnabled&&(0,i.AH)(["margin:0;padding:24px;border-top:1px solid rgba(0,0,0,0.02);color:",";background-color:",";"],n?`${a.AV.dark}`:`${a.AV.light}`,r)},a.jO.maxTablet),ka=((0,i.Ay)(se.$n).withConfig({componentId:"sc-g6reae-6"})(["display:flex;align-items:center;padding:7px;color:",";background:",";background-color:",";border-color:",";border-radius:100px;"],e=>e.theme.buttonText,e=>e.theme.buttonBackground,e=>e.theme.buttonBackground,e=>e.theme.buttonBackground),(0,i.Ay)(y.H2).withConfig({componentId:"sc-g6reae-7"})(["font-weight:500;font-size:var(--_kindlychat-font-size-h3);margin:0 0 15px;"])),Sa=i.Ay.div.withConfig({componentId:"sc-g6reae-8"})(["max-height:180px;overflow:hidden;font-size:var(--_kindlychat-font-size-m);margin:30px 0 10px 0;line-height:24px;overflow-y:auto;div{& > :first-child{margin-top:0;}& > :last-child{margin-bottom:0;}a{color:#0000c6;}a:visited{color:#5b096e;}}strong{font-weight:500;}"]);var Ca=n(3886),_a=n(1897);const Aa=(0,i.AH)(["display:flex;flex-direction:column;gap:10px;font-size:13px;justify-content:space-between;a{color:currentColor;text-decoration:underline;text-underline-offset:2px;}"]),Ea=(0,i.AH)(["",""],e=>{const t=e.theme.background,n=(0,me.SW)(t),r=n?`color-mix(in srgb, ${t} 96%, black)`:`color-mix(in srgb, ${t} 96%, white)`;return(0,i.AH)(["color:",";background-color:",";"],n?`${a.AV.dark}`:`${a.AV.light}`,r)}),Ta=i.Ay.div.withConfig({componentId:"sc-8v2qcc-0"})([""," ",""],Aa,Ea),ja=(0,i.Ay)(hi).withConfig({componentId:"sc-8v2qcc-1"})(["border-top-left-radius:0;border-top-right-radius:0;border:none;border-top:1px solid rgba(0,0,0,0.02);padding:24px;"," ",""],Aa,Ea),Ia=i.Ay.div.withConfig({componentId:"sc-8v2qcc-2"})(["display:flex;align-items:start;gap:4px;font-weight:500;svg{flex-shrink:0;margin-top:2px;path{stroke-width:2;}}"]);function Oa(e){const t=(0,Gt.jL)();(0,r.useEffect)(()=>{e||t(G.RY)},[e,t])}function La(e){let{descriptionTextHtml:t}=e;const n=(0,Gt.jL)();return(0,r.useEffect)(()=>{n((0,_a.Er)({wasShown:!0}))},[n]),Oa(t),(0,x.jsx)(Ta,{children:(0,x.jsx)("span",{dangerouslySetInnerHTML:{__html:t||""}})})}function Pa(e){let{descriptionTextHtml:t,buttonText:n,accessRequestText:r}=e;const o=(0,Gt.jL)(),{complianceWasRevoked:i}=(0,Gt.GV)(e=>e.chatbubble);return Oa(t),(0,x.jsxs)(ja,{children:[i&&(0,x.jsxs)(Ia,{children:[(0,x.jsx)(Ca.A,{size:16}),r]}),(0,x.jsx)("span",{dangerouslySetInnerHTML:{__html:t||""}}),(0,x.jsx)(qo.A,{type:"button",onClick:()=>{o((0,G.Sz)())},children:n})]})}const Ma=(e,t)=>({header:(0,$r.A)(e.header,t),text:(0,$r.A)(e.text,t),start_button:(0,$r.A)(e.start_button,t)});function Na(){const{fullscreenMode:e}=oi.Z,t=(0,Gt.jL)(),n=(0,c.Pj)().getState(),[o,i]=(0,r.useState)(!1),{currentLanguageCode:a,supportedLanguages:s}=(0,pe.A)(),{welcomePage:l,welcomePageType:d,isTextDirectionRtl:f}=(0,Gt.GV)(u.Od),{active:p}=(0,Gt.GV)(e=>{let{chatbubble:t}=e;return t}),{descriptionTextHtml:h,buttonText:g,isEnabled:m,requireAgreement:b}=(0,ha.A)(a),v=!e,y=f?"rtl":void 0,w=(0,r.useCallback)(e=>{e&&p&&setTimeout(()=>{e.focus()},0)},[p]),k=l?Ma(l,a):{header:"",text:"",start_button:""},S=k.start_button||"Start chat",C=m&&b?g:S;return(0,x.jsx)(x.Fragment,{children:(0,x.jsxs)(ga,{children:[(0,x.jsx)(ba,{$welcomePageImage:"PICTURE"===d&&l.image,children:v&&(0,x.jsx)(Ro.I$,{"aria-label":"Close chat",title:"Close chat",type:"button",onClick:()=>{t((0,G.Rh)())},"data-testid":"close-chat-button",children:(0,x.jsx)(Le.US,{width:25,height:25})})}),(0,x.jsx)(va,{children:(0,x.jsx)(ya,{dir:y,children:(0,x.jsxs)("div",{children:[s.length>1&&(0,x.jsx)(fa,{icon:!0,name:"language-select","data-testid":"language-select",value:a,onChange:e=>{return n=e.target.value,void t((0,G.L4)(n));var n},"aria-label":"Select a language",children:s.map(e=>(0,x.jsx)("option",{label:e.name_local,value:e.code,children:e.name_local},e.code))}),(0,x.jsxs)(xa,{children:[(0,x.jsx)(ka,{children:k.header}),(0,x.jsx)(Sa,{children:k.text&&(0,Yt.A)(k.text)})]})]})})}),(0,x.jsxs)(wa,{$complianceEnabled:m,children:[m&&(0,x.jsx)(La,{descriptionTextHtml:h}),(0,x.jsx)(qo.A,{cy:"start-chat-button",type:"button",title:C,onClick:()=>{i(!0),(0,Oe.tf)("welcome-page-start-chat",void 0,{storeState:n}),t((0,G.L4)(a)),t((0,G.mN)()),m&&b&&t((0,pa.Sz)())},loading:o,ref:w,children:C})]})]})})}function za(e){var t,n;let{endChat:r,feedbackToSubmit:o}=e;const i=(0,c.wA)(),{hideHeader:a}=(0,c.d4)(u.Od),{whitelabelEnabled:s}=(0,c.d4)(u.Od),l=(0,pn.A)(),{overlayViews:d}=(0,c.d4)(u.$P),f=d[d.length-1],p=a||"WELCOME_PAGE"===f,h=()=>{i((0,G.i1)())};return(0,x.jsxs)(Di,{$fullHeight:p,children:["WELCOME_PAGE"===f&&(0,x.jsx)(Na,{}),A()(t=["GENERIC","SELECT_DOWNLOAD","SELECT_LANGUAGE","DELETED_CHAT","DELETE_CHAT_CONFIRMATION"]).call(t,f)&&(0,x.jsxs)(Bi,{children:[A()(n=["GENERIC","SELECT_DOWNLOAD","SELECT_LANGUAGE"]).call(n,f)?(0,x.jsxs)(Hi,{children:["GENERIC"===f&&(0,x.jsx)(na,{}),"SELECT_DOWNLOAD"===f&&(0,x.jsx)(Ji,{textContent:l,onNavigateBack:h}),"SELECT_LANGUAGE"===f&&(0,x.jsx)(sa,{onNavigateBack:h})]}):(0,x.jsxs)(Ui,{children:["DELETE_CHAT_CONFIRMATION"===f&&(0,x.jsx)(Yi,{onNavigateBack:h,textContent:l}),"DELETED_CHAT"===f&&(0,x.jsx)(qi,{textContent:l})]}),(0,x.jsx)(Gi,{children:!s&&(0,x.jsx)(Zo,{})})]}),"CANCEL_CHAT"===f&&(0,x.jsx)(ri,{endChat:r}),"FEEDBACK"===f&&o&&(0,x.jsx)(Ni,{isFullHeight:!0,shouldEndChat:!0,feedbackToSubmit:o,endChat:r}),"ABOUT_CHAT"===f&&(0,x.jsx)(Go,{})]})}const Ra=i.Ay.div.withConfig({componentId:"sc-1272hyw-0"})(["display:flex;flex-direction:column;align-items:center;background:",";background-color:",";padding:1px 0 0;"," span{background:",";background-color:",";width:90%;height:1px;z-index:21;}"],e=>e.theme.background,e=>e.theme.background,se.D7,a.Tj.borderColorDarkGray,a.Tj.borderColorDarkGray),$a=i.Ay.form.withConfig({componentId:"sc-1272hyw-1"})(["display:flex;flex-direction:column;width:100%;padding:0 24px 20px;input{margin-right:24px;border:1px solid rgba(0,0,0,0);:focus{border:1px solid rgba(0,0,0,0);}:invalid{","}}"],e=>{let{$hasSubmitted:t}=e;return t&&"border-color: red;"}),Da=(0,i.Ay)(se.$n).withConfig({componentId:"sc-1272hyw-2"})(["min-height:25px;display:flex;align-items:center;font-size:var(--_kindlychat-font-size-h4);padding:0;&:hover{opacity:0.8;}"]),Fa=i.Ay.div.withConfig({componentId:"sc-1272hyw-3"})(["display:flex;margin:4px 0 5px;color:",";font-size:var(--_kindlychat-font-size-p);align-items:center;"],e=>{let{theme:t}=e;return(0,me.w5)(t.background,"white","black")}),Ba=i.Ay.div.withConfig({componentId:"sc-1272hyw-4"})(["display:flex;justify-content:space-between;align-items:center;button:first-child{margin-right:8px;}div + button{margin-left:12px;}"]),Ha=i.Ay.input.withConfig({componentId:"sc-1272hyw-5"})(["",""],se.hF),Ua=Object.freeze({EMAIL:"email",PHONE:"phone_number"});function Va(e,t){var n,o;const s=(0,Gt.jL)(),{contactDetailsButton:l,currentModal:c}=(0,Gt.GV)(u.$P),[d,f]=(0,r.useState)(""),[p,h]=(0,r.useState)(!1),g=(0,r.useRef)(null),m=(0,i.DP)(),b=null==l||null===(n=l.contact_details)||void 0===n?void 0:n.contact_type,{label:v,placeholder:y}=null!==(o=null==l?void 0:l.contact_details)&&void 0!==o?o:{},w=(0,r.useMemo)(()=>(0,me.w5)(m.background,a.Tj.grayColor,a.Tj.darkColor),[m.background]),k=()=>{s((0,G.V$)())};return(0,x.jsxs)(Ra,{ref:t,inert:!!c,children:[(0,x.jsx)("span",{}),(0,x.jsxs)($a,{$hasSubmitted:p,children:[(0,x.jsxs)(Fa,{children:[b&&(0,x.jsx)(Da,{"aria-label":"Cancel entering details",title:"Cancel entering details",type:"button",onClick:k,"data-testid":"minimize-chat-button","data-cy":"minimize-chat-button",children:(0,x.jsx)(Le.US,{width:25,height:12,color:w})}),v]}),(0,x.jsxs)(Ba,{children:[(0,x.jsx)(se.A0,{children:(0,x.jsx)(Ha,{onChange:e=>{f(e.target.value)},value:d,type:b===Ua.EMAIL?"email":"tel",ref:g,placeholder:y,required:!0})}),(0,x.jsx)(yo,{onClick:e=>{var t,n;return h(!0),!(null==g||null===(t=g.current)||void 0===t||null===(n=t.validity)||void 0===n||!n.valid||(e.preventDefault(),s((0,G.j3)(l,d)),k(),1))},type:"submit",$active:!0,title:"Send your "+(b===Ua.EMAIL?"email address":"phone number"),"data-testid":"send-contact-details-button",children:(0,x.jsx)(Le.qx,{width:24,height:24})})]})]})]})}const Wa=(0,r.forwardRef)(Va);var Ga=n(4095);const qa=i.Ay.div.withConfig({componentId:"sc-14jnerp-0"})(["left:0;right:0;top:","px;z-index:15;position:absolute;background:",";background-color:",";box-shadow:0px 3px 4px -1px ",";",";"],Ro.$A,e=>e.theme.headerBackground,e=>e.theme.headerBackground,a.Tj.shadowColor,q.yu),Ka=i.Ay.div.withConfig({componentId:"sc-14jnerp-1"})(["display:flex;padding:5px 18px;justify-content:space-between;align-items:center;border-top:1px solid rgba(0,0,0,0.1);transition:opacity 0.3s ease;","[inert] &{opacity:0.4;}"],qa),Ya=i.Ay.span.withConfig({componentId:"sc-14jnerp-2"})(["font-weight:600;"]),Xa=(0,i.Ay)(y.H3).withConfig({componentId:"sc-14jnerp-3"})(["margin:0;color:",";"," font-size:var(--_kindlychat-font-size-m);font-weight:normal;line-height:24px;"],e=>e.theme.headerText,e=>{let{$shouldTruncate:t}=e;return t&&"white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"}),Za=(0,i.Ay)(se.N_).withConfig({componentId:"sc-14jnerp-4"})(["color:",";",""],e=>e.theme.headerText,e=>{let{$dontShrink:t}=e;return t&&"flex-shrink: 0;"}),Qa=(0,i.i7)(["from{background-position:-180px;}to{background-position:180px;}"]),Ja=(0,i.i7)(["from{background-position:180px;}to{background-position:-180px;}"]),es=i.Ay.div.withConfig({componentId:"sc-14jnerp-5"})(["position:relative;border:0;"]),ts=i.Ay.span.withConfig({componentId:"sc-14jnerp-6"})(["opacity:1;height:3px;width:100%;position:absolute;background-image:linear-gradient( 90deg,rgba(255,255,255,0) 25%,"," 45%,"," 55%,rgba(255,255,255,0) 75% );animation:1.3s linear "," infinite 0s;"],e=>e.theme.headerBackground,e=>e.theme.headerBackground,e=>{let{$hasCancelled:t}=e;return t?Ja:Qa}),ns=3e3;let rs,os;function is(e){let{waitTimeInMinutes:t,queuePosition:n,handoverQueueText:r,estimatedTimeText:o,queuePositionText:i}=e;return Number.isInteger(n)&&i?(0,x.jsxs)("span",{children:[i,": ",(0,x.jsx)(Ya,{children:n})]}):Number.isInteger(t)&&o?(0,x.jsxs)("span",{children:[o," ",(0,x.jsxs)(Ya,{children:[t," min"]})]}):(0,x.jsx)("span",{children:r})}function as(){const[e,t]=(0,r.useState)(!1),{currentLanguageCode:n}=(0,pe.A)(),{botKey:o,currentModal:i}=(0,c.d4)(u.$P),{showTakeoverQueue:a}=(0,c.d4)(u.Od),{requestedHandoverAt:s,handoverWaitTimeEstimate:l,handoverQueuePosition:d,takeoverClosed:f,takenOver:p,name:h}=(0,c.d4)(u.MA),g=(0,c.wA)();(0,r.useEffect)(()=>{os!==p&&p?(rs=n,os=p):void 0===rs||rs===n||p||(g((0,G.zX)(o,!0)),rs=void 0,os=void 0)},[f,p,s,o,n,g]);const{takeover_queue_text:m,takeover_queue_link:b,leave_queue_text:v,leave_queue_link:y,estimated_time_text:w,queue_position_text:k,chatting_with_agent_text:S,user_end_handover_button_text:C}=(0,pn.A)();if((0,r.useEffect)(()=>{const n=setTimeout(()=>{e&&(g((0,G.cL)()),t(!1))},ns);return e||clearTimeout(n),()=>clearTimeout(n)},[e,g]),p){const e=`${S} ${h||"a human"}`;return(0,x.jsx)(qa,{inert:!!i,children:(0,x.jsxs)(Ka,{children:[(0,x.jsx)(Xa,{$shouldTruncate:!0,title:e,children:e})," ",(0,x.jsx)(Za,{$dontShrink:!0,onClick:()=>g((0,G.zn)("END_HANDOVER")),children:C})]})})}if(!a)return null;if(!Boolean(s)||f||p)return null;const _="number"==typeof l?Math.max((A=l,Math.ceil(A/60/1e3)),1):void 0;var A;return(0,x.jsxs)(qa,{children:[(0,x.jsx)(Ka,{"aria-live":"polite","aria-atomic":"true","data-testid":"handover-queue",children:e?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(Xa,{children:v}),(0,x.jsx)(Za,{onClick:()=>t(!1),"data-testid":"handover-queue-link",children:y})]}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(Xa,{children:(0,x.jsx)(is,{estimatedTimeText:w,handoverQueueText:m,queuePositionText:k,queuePosition:d,waitTimeInMinutes:_})}),(0,x.jsx)(Za,{onClick:()=>t(!0),"data-testid":"handover-queue-link",children:b})]})}),(0,x.jsx)(es,{children:(0,x.jsx)(ts,{$hasCancelled:e})})]})}const ss=(0,i.i7)(["0%{opacity:0;transform:translateY(-6px);}60%{transform:translateY(2px);}100%{opacity:1;transform:translateY(0);}"]),ls=(0,i.AH)(["",";animation-name:",";"],(0,q.qL)(),ss),cs=i.Ay.div.withConfig({componentId:"sc-fbtzdd-0"})(["z-index:25;margin:8px;display:flex;padding:6px;justify-content:space-between;border-radius:6px;background-color:white;color:",";box-shadow:0px 0px 1px rgba(0,0,0,0.24),0px 2px 6px rgba(0,0,0,0.04);max-height:1000px;max-width:",";width:calc(100% - 16px);margin-left:auto;margin-right:auto;position:absolute;left:0;right:0;top:0;",";",";&[inert]{user-select:none;}"],a.Tj.primaryColor,a.mb.tablet,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 `},ls),us=i.Ay.div.withConfig({componentId:"sc-fbtzdd-1"})(["flex:0;flex-basis:auto;align-self:center;margin-left:6px;margin-right:6px;"]),ds=(0,i.Ay)(y.fz).withConfig({componentId:"sc-fbtzdd-2"})(["flex:1;margin:0;font-size:var(--_kindlychat-font-size-p);display:inline-block;padding:6px;"]),fs=(0,i.Ay)(qo.A).withConfig({componentId:"sc-fbtzdd-3"})(["margin-top:8px;font-weight:500;font-size:var(--_kindlychat-font-size-p);"]),ps=(0,i.Ay)(se.$n).withConfig({componentId:"sc-fbtzdd-4"})(["flex:0;flex-basis:auto;z-index:15;display:flex;padding:0;height:fit-content;align-content:flex-start;flex-direction:column;&:hover{opacity:0.8;}"]),hs=n(9907).env.STORYBOOK?0:2e3,gs=i.Ay.button.withConfig({componentId:"sc-iju6vd-0"})(["border:none;margin:0;text-decoration:none;font-family:inherit;font-size:inherit;line-height:inherit;cursor:pointer;transition:background 250ms ease-in-out,transform 150ms ease;appearance:none;&:hover,&:focus{background:#edf2f7;}&:focus{outline:medium auto currentColor;outline:5px auto -webkit-focus-ring-color;}background:#f7fafc;border-radius:4px;display:inline-block;svg{vertical-align:sub;}"]),ms=function(e){let{children:t,href:n,fallback:r,...o}=e;const i=(a=(0,c.wA)(),{"#settings/language-select":{icon:(0,x.jsx)(Le.Ze,{width:16,height:16}),onClick:()=>{a((0,G.wQ)("SELECT_LANGUAGE")),a((0,G.Fe)(l.Jm.LANGUAGE_SWITCH))}}})[n];var a;return i?(0,x.jsxs)(gs,{...o,onClick:i.onClick,children:[i.icon," ",t]}):r||null};function bs(e){if(!e)return null;const t=[];let n=0;function r(e){e.length>0&&(t.push((0,x.jsx)("span",{children:e},n)),n+=e.length)}const o=/\[([^\\\]]+(?:\\.[^\\\]]*)*)\]\(([^)]+)\)/g;let i=o.exec(e);for(;null!==i;){const a=i[1],s=i[2];r(e.substring(n,i.index)),t.push((0,x.jsx)(ms,{href:s,fallback:`[${a}](${s})`,children:a},n+i.index)),n=i.index+i[0].length,i=o.exec(e)}return r(e.substring(n)),t}const vs={language:Le.U};function ys(){const{chatHasStarted:e,overlayViews:t}=(0,c.d4)(u.$P),n=function(e){const[t,n]=(0,r.useState)(!0);return(0,r.useEffect)(()=>{const t=setTimeout(()=>n(!1),e);return()=>clearTimeout(t)},[e]),e=>!t&&e()}(e?0:hs),{notifications:o}=(0,c.d4)(u.Hk),i=t.length>0,a=o.filter(e=>!e.dismissed).slice(-3),s=(0,c.wA)(),l=i,d=e=>t=>{t.stopPropagation(),s((0,G.Fe)(e))};if(null==a||!a.length)return null;const f=a.length;return n(()=>(0,x.jsx)(x.Fragment,{children:a.map((e,t)=>{let{id:n,content:r,buttonHref:o,buttonText:i,icon:a}=e;const s=t===f-1,c=s?void 0:-1,u=vs[a];return(0,x.jsxs)(cs,{"aria-live":s?"polite":void 0,"aria-atomic":s?"true":void 0,"aria-hidden":s?void 0:"true",inert:s?void 0:"",role:s?"alert":void 0,tabIndex:c,$hasTopMargin:l,$index:t,$quantity:f,children:[u&&(0,x.jsx)(us,{children:(0,x.jsx)(u,{width:24,height:24})}),(0,x.jsxs)(ds,{children:[bs(r),o&&i&&(0,x.jsx)(fs,{href:o,tabIndex:c,isSecondaryButton:!0,children:i})]}),(0,x.jsx)(ps,{"aria-label":"Dismiss notification",title:"Dismiss notification",onClick:d(n),disabled:!s,type:"button",children:(0,x.jsx)(Le.WI,{})})]},n)})}))}var xs=n(8560),ws=n(5353);const ks=(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,K.A)()?l.Je.WEB_MOBILE:l.Je.WEB,currentLanguage:r,from_bot:!1,sender:l.bS.USER,...(0,Un.A)("buttonType","buttons")(e)}},{focusTrapOnFullView:Ss}=oi.Z,Cs=["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)||A()(Cs).call(Cs,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")})},Es=(0,i.Ay)(hi).withConfig({componentId:"sc-19qip4y-0"})(["display:flex;min-height:",";padding:16px;gap:24px;flex-direction:column;justify-content:",";border-radius:",";",";view-transition-name:'feedback-end-chat-1723461511841';"],e=>{let{$isFullHeight:t}=e;return t?"100%":"clamp(120px, 25%, 600px)"},e=>{let{$isFullHeight:t,$justifyCenter:n}=e;return t||n?"center":"space-between"},e=>{let{$isFullHeight:t}=e;return t&&"unset"},e=>{let{$isFullHeight:t}=e;return t&&"border: none"});var Ts=n(1193);const js=()=>(0,x.jsx)(Es,{children:(0,x.jsx)(Ts.A,{})});function Is(e){let{color:t="#0D0D0D"}=e;return(0,x.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:[(0,x.jsx)("path",{d:"M15.75 8.75L19.25 12L15.75 15.25",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,x.jsx)("path",{d:"M19 12H10.75",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,x.jsx)("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 Os=(0,i.Ay)(hi).withConfig({componentId:"sc-1e1ck6u-0"})(["display:flex;gap:24px;flex-direction:column;"]),Ls=i.Ay.div.withConfig({componentId:"sc-1e1ck6u-1"})(["display:flex;gap:8px;flex-direction:column;font-size:var(--_kindlychat-font-size-p);> p{margin:0;}"]),Ps=i.Ay.h3.withConfig({componentId:"sc-1e1ck6u-2"})(["margin:0;display:flex;gap:4px;align-items:center;font-size:var(--_kindlychat-font-size-p);font-weight:500;"]),Ms=i.Ay.div.withConfig({componentId:"sc-1e1ck6u-3"})(["display:flex;gap:8px;> button{flex:1;}"]);function Ns(e){let{handleCancel:t,handleEndHumanChat:n,descriptionText:r,titleText:o,cancelButtonText:i,confirmButtonText:a}=e;return(0,x.jsxs)(Os,{children:[(0,x.jsxs)(Ls,{children:[(0,x.jsxs)(Ps,{children:[(0,x.jsx)(Is,{color:"var(--panel-background-white-black-contrast-1743170834)"}),o]}),(0,x.jsx)("p",{children:r})]}),(0,x.jsxs)(Ms,{children:[(0,x.jsx)(qo.A,{isSecondaryButton:!0,onClick:t,children:i}),(0,x.jsx)(qo.A,{onClick:n,children:a})]})]})}function zs(e){let{buttonHandlers:t,onMessage:n=null}=e;const o=(0,c.Pj)(),i=(0,Gt.jL)(),a=(0,r.useRef)(null),s=(0,r.useRef)(null),l=(0,r.useRef)(null),{hideHeader:d,fullscreenMode:f,offsetHeight:p,id:h}=(0,Gt.GV)(u.Od),{active:g,chatHasStarted:m,currentlyPoppedUp:b,contactDetailsButton:v,currentLanguage:y,currentModal:w,overlayViews:k,isChatFullWindow:S}=(0,Gt.GV)(e=>{let{chatbubble:t}=e;return t}),{chatMessages:C}=(0,Gt.GV)(e=>{let{messages:t}=e;return t}),_=function(e){const t=(0,W.A)(e),n=(e||[]).length;let r;return n&&n!==(t||[]).length&&(r=e[n-1]),r}(C),{feedbackToDisplay:A,feedbackToSubmit:E}=(0,xs.A)(),{cancel_button:T,user_end_handover_button_text:j,user_end_handover_modal_title_text:I,user_end_handover_modal_description_text:O}=(0,pn.A)(),[L,P]=(0,r.useState)(!0);(0,r.useEffect)(()=>{if(L)return void P(!1);if(!_)return;const e=o.getState(),{chatMessages:t,attachments:r}=e.messages,{chatId:i,renderedBy:a}=e.chatbubble,{token:s}=e.connection,{PAT_HOST:l}=e.environment,c=t.map(e=>(0,ws.A)(e,r,l,s)),u=(0,ws.A)(_,r,l,s);(0,Oe.GJ)(ks(u,{botId:h,currentLanguage:y,chatId:i}),c,n,a)},[L,n,_,h,o,C.length]);const M=C.length>=3,N=k[k.length-1],z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"user";A&&"CANCEL_CHAT"===N&&M?(i((0,li.WG)({ratingSystem:A.rating_scale.rating_system,triggerType:A.trigger_type,formTitle:A.form_title,step:"RATING_SCALE"})),i((0,G.wQ)("FEEDBACK"))):((0,Oe.tf)("end-chat",void 0,{storeState:o.getState(),source:e}),i((0,G.ky)(f)),i((0,G.zn)(null)))},{descriptionTextHtml:R,buttonText:$,accessRequestText:D}=(0,ha.A)(y);return function(e){const{isChatFullWindow:t,renderedBy:n}=(0,c.d4)(u.$P),o=(0,r.useRef)(!1);(0,r.useEffect)(()=>{if(e.current&&Ss&&"API"===n)return o.current!==t&&(o.current=t,t?_s():As()),As},[e,t])}(l),(0,x.jsx)(ie,{"aria-live":"polite","data-cy":"chat-box","data-testid":"chat-box",ref:l,$active:g,$chatHasStarted:m,$fullscreen:!!f,$isChatFullWindow:S,$offsetHeight:p,children:(0,x.jsxs)(Ga.A,{errorPoint:"inside ChatBoxContainer",children:[!d&&(0,x.jsx)($o,{handleXButtonClick:()=>{"CANCEL_CHAT"!==N&&"FEEDBACK"!==N?i((0,G.wQ)("CANCEL_CHAT")):z()},settingsButtonRef:s}),!!N&&(0,x.jsx)(za,{endChat:z,feedbackToSubmit:E}),(0,x.jsx)(de,{}),(0,x.jsx)(as,{}),(0,x.jsx)(ys,{}),(0,x.jsx)(oo,{bodyRef:a,buttonHandlers:t,inert:!!N||!!w}),v?(0,x.jsx)(Wa,{}):(0,x.jsx)(Mo,{active:g,chatHasStarted:m,currentlyPoppedUp:b,bodyRef:a,inert:!!N||!!w}),"FEEDBACK_END_CHAT"===w&&(0,x.jsx)(js,{}),"END_HANDOVER"===w&&(0,x.jsx)(Ns,{handleCancel:()=>i((0,G.zn)(null)),handleEndHumanChat:async()=>{await i((0,G.m8)()),i((0,G.zn)(null))},titleText:null!=I?I:"",descriptionText:null!=O?O:"",cancelButtonText:null!=T?T:"",confirmButtonText:null!=j?j:""}),"COMPLIANCE"===w&&(0,x.jsx)(Pa,{descriptionTextHtml:R,buttonText:$,accessRequestText:D}),("END_CHAT"===w||"handover_conversation"===(null==E?void 0:E.trigger_type)&&"FEEDBACK_END_HANDOVER"===w)&&(0,x.jsx)(Ni,{feedbackToSubmit:E,shouldEndChat:!("END_CHAT"!==w),endChat:z})]})})}zs.displayName="KindlyChatBox";var Rs=n(1872);const $s=(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,$r.A)(o,t)}},{}),Ds=Object.freeze({en:e=>`New message from ${e}`,nb:e=>`Ny melding fra ${e}`,sv:e=>`Nytt meddelande från ${e}`}),Fs=Object.freeze({en:"An agent joined the conversation",nb:"En agent ble med i samtalen",sv:"En agent gick med i samtalet"});let Bs=!1;function Hs(e){const t=document.title;let n;n||Bs||(Bs=!0,n=setInterval(()=>{document.title=document.title===e?t:e},1e3),window.addEventListener("mousemove",function e(){clearInterval(n),document.title=t,n=null,Bs=!1,window.removeEventListener("mousemove",e)}))}var Us=n(7437);const Vs=()=>{const{takenOver:e,requestedHandoverAt:t}=(0,Gt.GV)(u.MA),n=(0,W.A)(e),o=(0,W.A)(t),i=(0,Gt.jL)(),a=Boolean(t),s=Boolean(o);(0,r.useEffect)(()=>{e&&!n?i((0,Us.f2)()):!e&&n&&(0,Us.yh)(),a&&!s?i((0,Us.Mk)()):!a&&s&&(0,Us.Zk)()},[i,s,n,a,e])};var Ws=n(5629),Gs=n(9017),qs=n(8681);const Ks=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,qs.A)(n)]:r}},{})};function Ys(e){let{settings:t}=e;const n=(0,Gt.jL)(),{currentLanguageCode:o}=(0,pe.A)(),{inspectorOpen:i}=(0,Gt.GV)(e=>{let{inspector:t}=e;return t}),{chatMessages:a}=(0,Gt.GV)(e=>{let{messages:t}=e;return t}),d=(0,r.useRef)(null),f=(0,W.A)(a),p=localStorage.getItem("kindly-chat-restart-message"),h=(0,Gs.A)(t,"zIndex",l.DP);(0,r.useEffect)(()=>{if(0===(null==f?void 0:f.length)&&1===(null==a?void 0:a.length)&&p){const{message:e,exchangeId:t,newContext:r}=JSON.parse(p);localStorage.removeItem("kindly-chat-restart-message"),n((0,Ws.y2)(e,t,r))}},[n,a,f,p]),function(){const{tabNotification:e,name:t}=(0,c.d4)(u.Od),{showTabNotification:n}=(0,c.d4)(u.Cv),{currentLanguageCode:o}=(0,pe.A)(),{takenOver:i}=(0,c.d4)(u.MA),{agent:a}=(0,c.d4)(u.zD),s=(0,W.A)(i);(0,r.useEffect)(()=>{var r;e&&n&&Hs((null!==(r=null==Ds?void 0:Ds[o])&&void 0!==r?r:Ds.en)(t||"Kindly"))},[o,e,n,t]),(0,r.useEffect)(()=>{const e=Boolean(null==a?void 0:a.name);var t;s!==i&&i&&e&&Hs(null!==(t=null==Fs?void 0:Fs[o])&&void 0!==t?t:Fs.en)},[i,a,s,o])}(),function(){const e=(0,Gt.jL)(),{currentLanguage:t,active:n}=(0,Gt.GV)(u.$P),{maintenanceAlertEnabled:o,maintenanceAlert:i}=(0,Gt.GV)(u.Od);(0,r.useEffect)(()=>{if(!n||!o)return;const{text_content:r,link_location:a,link_text:s}=$s(i,t);e((0,G.cC)({content:r,buttonText:s,buttonHref:a,once:!0},l.Jm.MAINTENANCE))},[n,t,e,i,o])}(),Vs(),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,i=()=>{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,Do.w7)(e)),e?o.classList.add("kindly-overflow-hidden"):o.classList.remove("kindly-overflow-hidden")})(e))};setTimeout(()=>i(),Rs.X+10);const a=new ResizeObserver(i);return a.observe(r),()=>{t((0,Do.w7)(!1)),o.classList.remove("kindly-overflow-hidden"),a.disconnect()}},[t,e])}(d),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])}(d),function(){const e=(0,Gt.jL)(),{chatHasStarted:t}=(0,Gt.GV)(e=>{let{chatbubble:t}=e;return t}),{welcomePageType:n}=(0,Gt.GV)(u.Od);(0,r.useEffect)(()=>{!t&&n!==l.Lb.NONE&&e((0,G.wQ)("WELCOME_PAGE"))},[t,n,e])}();const g=(0,r.useMemo)(()=>Ks(t.buttonHandlers),[t.buttonHandlers]);return(0,x.jsxs)(s,{id:"chatContainer",ref:d,className:"chat-container",role:"complementary",$zIndex:h,"data-testid":"chat-box-container",lang:o,$inspectorOpen:i,children:[(0,x.jsx)(zs,{buttonHandlers:g,onMessage:t.onMessage}),i&&(0,x.jsx)(ae,{})]})}},1037:(e,t,n)=>{"use strict";var r=n(8655),o=n(9989).f,i=r("metadata"),a=Function.prototype;void 0===a[i]&&o(a,i,{value:null})},1085:(e,t,n)=>{"use strict";e.exports=n(1197)},1100:e=>{"use strict";e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},1112:(e,t,n)=>{"use strict";n.d(t,{Du:()=>l,Mb:()=>u,cL:()=>c,mw:()=>d});var r=n(2221),o=n(4851),i=n(628),a=n(7437),s=n(8679);const l=e=>async t=>{const n=await e;200===(null==n?void 0:n.status)&&(t({type:s.nz,...n}),t((0,a.uK)()))},c=()=>(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:a}}=t();e((0,i.et)(`${a}/chatbubble/${r.Ak}/takeover_cancel/`,{method:"POST",...(0,o.A)({token:n})})),e({type:s.MM})},u=()=>(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:a}}=t();e({type:s.c6}),e((0,i.et)(`${a}/chatbubble/${r.Ak}/user_started_typing/`,{method:"POST",...(0,o.A)({token:n})}))},d=()=>(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:a}}=t();e({type:s.we}),e((0,i.et)(`${a}/chatbubble/${r.Ak}/user_stopped_typing/`,{method:"POST",...(0,o.A)({token:n})}))}},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)}},1193:(e,t,n)=>{"use strict";n.d(t,{A:()=>h}),n(9155);var r=n(9223),o=n(8560),i=n(6343),a=n(7182),s=n(5767),l=n(3864);const c=l.Ay.div.withConfig({componentId:"sc-embwe2-0"})(["font-weight:500;"]),u=l.Ay.div.withConfig({componentId:"sc-embwe2-1"})(["display:flex;flex-direction:column;justify-content:space-between;gap:24px;flex:1;"]),d=l.Ay.div.withConfig({componentId:"sc-embwe2-2"})(["display:flex;flex-direction:column;gap:8px;font-size:var(--_kindlychat-font-size-sm);line-height:20px;"]),f=l.Ay.div.withConfig({componentId:"sc-embwe2-3"})(["display:grid;grid-template-columns:1fr 1fr;gap:8px;"]);var p=n(1085);const h=()=>{const{feedbackToSubmit:e}=(0,o.A)(),t=(0,a.jL)();return null!=e&&e.timeout?(0,p.jsxs)(u,{children:[(0,p.jsxs)(d,{children:[(0,p.jsx)(c,{children:e.timeout.title}),(0,p.jsx)("div",{children:e.timeout.message})]}),(0,p.jsxs)(f,{children:[(0,p.jsx)(r.A,{isSecondaryButton:!0,onClick:()=>{t((0,i.wQ)("FEEDBACK")),t((0,i.zn)(null)),t((0,s.ZG)("timeout"))},children:e.timeout.end_conversation_text}),(0,p.jsx)(r.A,{onClick:()=>{t((0,s.Dz)()),t((0,i.zn)(null))},children:e.timeout.continue_conversation_text})]})]}):null}},1197:(e,t)=>{"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(e,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var i in r={},t)"key"!==i&&(r[i]=t[i]);else r=t;return t=r.ref,{$$typeof:n,type:e,key:o,ref:void 0!==t?t:null,props:r}}t.Fragment=r,t.jsx=o,t.jsxs=o},1203:e=>{"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},1210:(e,t,n)=>{"use strict";var r=n(9098),o=n(1003),i=n(7013),a=n(4713),s=n(6100),l=n(1203),c=n(2769),u=n(6281),d=n(5148),f=n(7785),p=n(4603),h=String,g=o("JSON","stringify"),m=s(/./.exec),b=s("".charAt),v=s("".charCodeAt),y=s("".replace),x=s(1.1.toString),w=/[\uD800-\uDFFF]/g,k=/^[\uD800-\uDBFF]$/,S=/^[\uDC00-\uDFFF]$/,C=!p||l(function(){var e=o("Symbol")("stringify detection");return"[null]"!==g([e])||"{}"!==g({a:e})||"{}"!==g(Object(e))}),_=l(function(){return'"\\udf06\\ud834"'!==g("\udf06\ud834")||'"\\udead"'!==g("\udead")}),A=function(e,t){var n=d(arguments),r=f(t);if(c(r)||void 0!==e&&!u(e))return n[1]=function(e,t){if(c(r)&&(t=a(r,this,h(e),t)),!u(t))return t},i(g,null,n)},E=function(e,t,n){var r=b(n,t-1),o=b(n,t+1);return m(k,e)&&!m(S,o)||m(S,e)&&!m(k,r)?"\\u"+x(v(e,0),16):e};g&&r({target:"JSON",stat:!0,arity:3,forced:C||_},{stringify:function(e,t,n){var r=d(arguments),o=i(C?A:g,null,r);return _&&"string"==typeof o?y(o,w,E):o}})},1249:(e,t,n)=>{"use strict";var r=n(1003),o=n(4531),i=n(1811);o("toStringTag"),i(r("Symbol"),"Symbol")},1268:(e,t,n)=>{"use strict";var r=n(6100),o=0,i=Math.random(),a=r(1.1.toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++o+i,36)}},1305:(e,t,n)=>{"use strict";var r=n(8684);e.exports=r},1314:(e,t,n)=>{"use strict";var r=n(8900),o=n(2769),i=r.WeakMap;e.exports=o(i)&&/native code/.test(String(i))},1328:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(541),o=n(5096),i=n(1695);function a(){var e;const{supportedLanguages:t}=o.Z,{includeDisabledLanguages:n}=(0,r.d4)(i.Od),{currentLanguage:a}=(0,r.d4)(i.$P),s=null===(e=t.find(e=>{let{is_primary:t}=e;return t}))||void 0===e?void 0:e.code;if(!s)throw new Error("No primary language found in supported languages");const l=t.filter(e=>{let{is_active:t}=e;return t});return{primaryLanguageCode:s,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})},1342:(e,t,n)=>{"use strict";n(8293)},1346:(e,t,n)=>{"use strict";n.d(t,{A:()=>o}),n(9155);var r=n(1085);function o(e){let{title:t="File attachment",...n}=e;return(0,r.jsxs)("svg",{width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:[(0,r.jsx)("title",{children:t}),(0,r.jsx)("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"})]})}},1355:(e,t,n)=>{"use strict";var r=n(8655);t.f=r},1363:(e,t,n)=>{var r=n(2471).default,o=n(3230);e.exports=function(e){var t=o(e,"string");return"symbol"==r(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},1395:(e,t,n)=>{"use strict";var r=n(6100),o=n(1203),i=n(7551),a=Object,s=r("".split);e.exports=o(function(){return!a("z").propertyIsEnumerable(0)})?function(e){return"String"===i(e)?s(e,""):a(e)}:a},1435:(e,t,n)=>{"use strict";n.d(t,{Gb:()=>r.A,cS:()=>k.A,ZH:()=>ee,pd:()=>x,l6:()=>E,Ap:()=>w.A,TM:()=>te.A});var r=n(9662),o=n(9155),i=n(824),a=n(3864),s=n(3058),l=n(8035),c=n(6052),u=n(881);const d=a.Ay.div.withConfig({componentId:"sc-5nmogf-0"})(["position:relative;display:flex;"]),f=a.Ay.div.withConfig({componentId:"sc-5nmogf-1"})(["padding:0 4px;position:absolute;top:50%;transform:translateY(-50%);font-size:var(--_kindlychat-font-size-p);display:"," ",";"],e=>{let{$show:t}=e;return t?"block;":"none;"},e=>{let{$adornmentPosition:t}=e;return"start"===t?"\n left: 10px;\n ":"\n left: auto;\n right: 10px;\n "}),p=a.Ay.input.withConfig({componentId:"sc-5nmogf-2"})([""," color:var(--panel-background-white-black-contrast-1743170834);padding:10px 16px;"," font-size:var(--_kindlychat-font-size-p);border-radius:18px;border:1px solid transparent;flex:1;&:focus{color:var(--panel-background-white-black-contrast-1743170834);box-shadow:none;border:1px solid ",";","}&::placeholder{color:",";opacity:0.5;}&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{appearance:none;margin:0;}&[type='number']{-moz-appearance:textfield;}text-size-adjust:","%;",""],e=>{let{theme:t}=e;return(0,s.Mo)(t.panelBackground,.08)},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},e=>{let{theme:t}=e;return(0,c.w5)(t.panelBackground,"rgba(255, 255, 255, 0.12)","rgba(0, 0, 0, 0.12)")},s.sF,e=>{let{theme:t}=e;return(0,c.w5)(t.panelBackground,"#FFF","#000")},(0,s.L9)(l.J.p),u.jq);var h=n(9416),g=n(7318),m=n(587),b=n(8780),v=n(5814),y=n(1085);const x=function(e){var t,n,r,a,s;let{autoComplete:l="off",name:c,type:u="text",register:x,validators:w,control:k,id:S,setError:C,clearErrors:_,trigger:A,adornment:E,adornmentPosition:T="end",...j}=e;const I=(0,v.G8)(w),O=(0,o.useRef)(null),{ref:L,onChange:P,...M}=x?x(c,I):{},[,N]=(0,o.useState)(!1),{errors:z,isSubmitted:R}=(0,i.lN)({name:c,control:k}),$=(0,m.A)({name:c,trigger:A,control:k,setError:C,clearErrors:_});return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(d,{children:[E&&(0,y.jsx)(f,{ref:e=>{O.current=e,N(!0)},$show:!(null!==(t=I.maxLength)&&void 0!==t&&t.value&&"end"===T),$adornmentPosition:T,children:E}),(0,y.jsx)(p,{autoComplete:l,name:c,type:u.toLowerCase(),$adornmentPosition:T,$adornmentWidth:null===(n=O.current)||void 0===n?void 0:n.clientWidth,$hasMaxLength:!(null===(r=I.maxLength)||void 0===r||!r.value),id:S||c,...(0,v.NR)(I),...M&&{...M},onChange:e=>{null==P||P(e),$(e)},ref:L,"aria-errormessage":`error_${c}`,"aria-invalid":!(0,b.A)(z)&&R,...j}),!(null===(a=I.maxLength)||void 0===a||!a.value)&&k&&c&&(0,y.jsx)(h.A,{fieldName:c,control:k,maxLength:null===(s=I.maxLength)||void 0===s?void 0:s.value})]}),(0,y.jsx)(g.A,{control:k,name:c})]})};var w=n(6101),k=n(9910),S=n(6290);const C=a.Ay.div.withConfig({componentId:"sc-1ncnj7t-0"})(["position:relative;display:flex;"]),_=a.Ay.select.withConfig({componentId:"sc-1ncnj7t-1"})(["background-color:",";color:",";padding:9px 16px;padding-right:42px;border-radius:18px;border:1px solid transparent;outline:none;flex:1;display:inline-block;appearance:none;text-indent:1px;text-overflow:'';max-width:100%;& option{color:initial;}",""],e=>{let{theme:t}=e;return(0,s.Mo)(t.panelBackground,.08)},e=>{let{theme:t,$isPlaceholder:n}=e;return n?(0,c.w5)(t.panelBackground,"rgba(255, 255, 255, 0.46)","rgba(0, 0, 0, 0.46)"):(0,c.w5)(t.panelBackground,"#FFFFFF","#000000")},u.jq),A=a.Ay.div.withConfig({componentId:"sc-1ncnj7t-2"})(["position:absolute;right:20px;top:6px;width:10px;height:6px;pointer-events:none;user-select:none;svg path{stroke:",";}"],e=>{let{theme:t}=e;return(0,c.w5)(t.panelBackground,"#FFFFFF","#000000")}),E=function(e){let{name:t,register:n,validators:r,control:o,id:a,setError:s,clearErrors:l,trigger:c,options:u,...d}=e;const f=(0,v.G8)(r),{ref:p,onChange:h,...b}=n?n(t,f):{},x=(0,i.FH)({name:t,control:o}),w=(0,m.A)({name:t,trigger:c,control:o,setError:s,clearErrors:l});return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(C,{children:[(0,y.jsxs)(_,{name:t,type:"select",$isPlaceholder:""===x,id:a||t,...(0,v.NR)(f),...b&&{...b},onChange:e=>{null==h||h(e),w(e)},ref:p,...d,children:[d.placeholder&&(0,y.jsx)("option",{value:"",disabled:!0,hidden:!0,children:d.placeholder}),null==u?void 0:u.map((e,n)=>(0,y.jsx)("option",{value:e.value,children:e.label},`select-${t}-${e.id||n}`))]}),(0,y.jsx)(A,{children:(0,y.jsx)(S.A,{color:"#445265"})})]}),(0,y.jsx)(g.A,{control:o,name:t})]})};var T=n(9749),j=n.n(T),I=n(541),O=n(809),L=n(5781),P=n(2720),M=n(2221),N=n(491),z=n(1328),R=n(9886),$=n(1695),D=n(3699),F=n(6064);const B=a.Ay.div.withConfig({componentId:"sc-ansydw-0"})(["position:relative;display:flex;flex-direction:column;"]),H=a.Ay.label.withConfig({componentId:"sc-ansydw-1"})(["padding:","px;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;flex:1;border-radius:6px;color:var(--panel-background-white-black-contrast-1743170834);border:1px dashed ",";"," "," ",""],e=>{let{$hasError:t}=e;return t?13:24},e=>{let{theme:t}=e;return(0,c.w5)(t.panelBackground,t.buttonBackground,"rgba(0, 0, 0, 0.12)")},e=>{let{$hasError:t}=e;return t&&(0,a.AH)(["background-color:#f9ef94 !important;border:1px solid #f9ef94 !important;"])},u.jq,e=>{let{theme:t,$isOver:n}=e;return n&&(0,s.Mo)(t.panelBackground,.08)}),U=a.Ay.span.withConfig({componentId:"sc-ansydw-2"})(["font-size:var(--_kindlychat-font-size-sm);font-weight:500;pointer-events:none;line-height:16px;"]),V=a.Ay.input.withConfig({componentId:"sc-ansydw-3"})(["width:0.1px;height:0.1px;opacity:0;overflow:hidden;position:absolute;z-index:-1;"]),W=a.Ay.span.withConfig({componentId:"sc-ansydw-4"})(["color:",";"],e=>{let{theme:t}=e;return t.buttonBackground}),G=a.Ay.div.withConfig({componentId:"sc-ansydw-5"})(["margin-top:8px;display:flex;flex-direction:row;font-size:var(--_kindlychat-font-size-sm);color:var(--panel-background-white-black-contrast-1743170834);& svg > path{stroke:var(--panel-background-white-black-contrast-1743170834);}"]),q=a.Ay.div.withConfig({componentId:"sc-ansydw-6"})(["display:flex;flex-direction:column;& > div{word-break:normal;overflow-wrap:anywhere;}"]),K=a.Ay.div.withConfig({componentId:"sc-ansydw-7"})(["font-size:var(--_kindlychat-font-size-sm);"]),Y=a.Ay.div.withConfig({componentId:"sc-ansydw-8"})(["display:flex;flex-direction:row;align-items:center;margin-bottom:4px;line-height:16px;"]);var X=n(8043);const Z=e=>e.split(/\[(.*?)\]/).map((e,t)=>t%2!=0?(0,y.jsx)(W,{children:e},`file-${e}`):(0,y.jsxs)("span",{children:[" ",e]},`file-${e}`)),Q=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},ee=function(e){var t,n,r,a;let{name:s,label:l,register:c,validators:u,control:d,id:f,setError:p,trigger:h,setValue:x,clearErrors:w,accept:k=M.oY,...S}=e;const{text:C}=(0,I.d4)($.Od),{currentLanguageCode:_}=(0,z.A)(),A=(0,v.G8)(u),E=(0,o.useRef)(null),T=(0,o.useCallback)(e=>e.length>5?"You can upload up to 5 files at a time.":"",[]),W=(0,o.useCallback)(e=>{if(e.length){const t=k.split(",").map(e=>e.replace("/*",""));if([...e].some(e=>!t.some(t=>e.name.endsWith(t))&&!j()(t).call(t,e.type.substring(0,e.type.indexOf("/")))))return`${(0,F.A)(C.file_supported_types,_)}: ${k}`}return""},[k,_,C.file_supported_types]),ee=(0,o.useCallback)(e=>e.length&&[...e].some(e=>e.size/D.aO>D.W7)?`${(0,F.A)(C.file_maximum_size,_)}: ${(0,D.B$)(D.W7*D.aO)}`:"",[_,C.file_maximum_size]),{ref:te,...ne}=c?c(s,A):{ref:void 0},re=(0,o.useRef)(null),{errors:oe,isSubmitted:ie}=(0,i.lN)({name:s,control:d}),ae=(0,R.A)(oe),se=(0,m.A)({name:s,trigger:h,control:d,setError:p,clearErrors:w}),[,le]=(0,o.useState)(null),[ce,ue]=(0,o.useState)([]),[de,fe]=(0,o.useState)(!1);return(0,N.A)("dragover",e=>{e.preventDefault()},re.current),(0,N.A)("dragenter",e=>{e.preventDefault(),fe(!0)},re.current),(0,N.A)("dragleave",e=>{e.preventDefault(),fe(!1)},re.current),(0,N.A)("drop",e=>{e.preventDefault();const t=J(ce,e.dataTransfer.files),n=W(e.dataTransfer.files)||T(t)||ee(e.dataTransfer.files);if(n)return null==p?void 0:p(s,{type:"custom",message:n});oe[s]&&(null==w||w(s)),ue(t);const r=Q(t);return null==x||x(s,null==r?void 0:r.files,{shouldValidate:!0}),E.current&&null!=r&&r.files.length&&(E.current.files=r.files),fe(!1),!0},re.current),(0,N.A)("change",e=>{e.preventDefault();const t=J(ce,e.target.files),n=T(t)||ee(e.target.files);if(n)return null==p?void 0:p(s,{type:"custom",message:n});oe[s]&&(null==w||w(s)),ue(t);const r=Q(t);return E.current&&null!=r&&r.files.length&&(E.current.files=r.files),se(e),!0},E.current),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(B,{children:[(0,y.jsxs)(H,{"aria-describedby":f||s,ref:e=>{re.current=e,le(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,children:[(null===(n=oe||ae)||void 0===n||null===(r=n[s])||void 0===r?void 0:r.message)&&(0,y.jsxs)(Y,{children:[(0,y.jsx)(O.Fc,{width:18,height:18}),(0,y.jsx)(K,{children:null===(a=(oe||ae)[s])||void 0===a?void 0:a.message})]}),(0,y.jsx)(U,{children:Z(l)}),(0,y.jsx)(V,{multiple:!0,accept:k,name:s,type:"file",id:f||s,...(0,v.NR)(A),...ne&&{...ne},ref:e=>{E.current=e,te&&te(e)},"aria-errormessage":`error_${s}`,"aria-invalid":!(0,b.A)(oe)&&ie,"aria-hidden":"true",...S})]}),(0,y.jsxs)(G,{children:[(0,F.A)(C.file_limitation,_),(0,y.jsx)(P.A,{text:(0,y.jsxs)(q,{children:[(0,y.jsxs)("div",{children:[(0,F.A)(C.file_maximum_size,_),": ",(0,D.B$)(D.W7*D.aO)]}),(0,y.jsxs)("div",{children:[(0,F.A)(C.file_supported_types,_),": ",k]})]}),position:"top",children:(0,y.jsx)(L.A,{width:18,height:18})})]})]}),(0,y.jsx)(g.A,{control:d,name:s}),ce.map((e,t)=>(0,y.jsx)(X.A,{file:e,onRemove:()=>{const e=[...ce];e.splice(t,1),ue(e),null==x||x(s,e.length?e:void 0,{shouldValidate:!0})}},`${e.name}-${e.size}}`))]})};var te=n(3950)},1452:(e,t,n)=>{"use strict";e.exports=n(5262)},1619:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>ge});var r,o,i=n(9155),a=n(541),s=n(3864),l=n(5096),c=n(6367),u=n(4095),d=n(1872),f=n(6343),p=n(7182),h=n(1085),g=Object.create,m=Object.defineProperty,b=Object.getOwnPropertyDescriptor,v=Object.getOwnPropertyNames,y=Object.getPrototypeOf,x=Object.prototype.hasOwnProperty,w=(r=(e,t)=>{var r,o;r=e,o=function(e){var t,n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,r=536870912,o=2*r,i=new WeakMap,a=function(e,t){return function(i){var a=t.get(i),s=void 0===a?i.size:a<o?a+1:0;if(!i.has(s))return e(i,s);if(i.size<r){for(;i.has(s);)s=Math.floor(Math.random()*o);return e(i,s)}if(i.size>n)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;i.has(s);)s=Math.floor(Math.random()*n);return e(i,s)}}((t=i,function(e,n){return t.set(e,n),n}),i),s=function(e){return function(t){var n=e(t);return t.add(n),n}}(a);e.addUniqueNumber=s,e.generateUniqueNumber=a},"object"==typeof e&&typeof t<"u"?o(e):"function"==typeof define&&n.amdO?define(["exports"],o):o((r=typeof globalThis<"u"?globalThis:r||self).fastUniqueNumbers={})},()=>(o||r((o={exports:{}}).exports,o),o.exports));i.Component;((e,t,n)=>{n=null!=e?g(y(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of v(t))!x.call(e,n)&&undefined!==n&&m(e,n,{get:()=>t[n],enumerable:!(r=b(t,n))||r.enumerable})})(e&&e.__esModule?n:m(n,"default",{value:e,enumerable:!0}),e)})(w());var k="object"==(typeof window>"u"?"undefined":typeof window),S={setTimeout:k?setTimeout.bind(window):setTimeout,clearTimeout:k?clearTimeout.bind(window):clearTimeout,setInterval:k?setInterval.bind(window):setInterval,clearInterval:k?clearInterval.bind(window):clearInterval},C={},_=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),S.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 A(){return Math.random().toString(36).substring(2)}var E=class{options;channel;token=A();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=>S.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{S.clearInterval(t)}catch{}let r=this.intervals.indexOf(t);r>=0&&this.intervals.splice(r,1),this.channel.removeEventListener("message",o),n()};t=S.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=>S.clearInterval(e))}catch{}}}},T=class{channel;options;elector;token=A();registry=new Map;allIdle=!1;isLastActive=!1;constructor(e){let{channelName:t}=e;if(this.options=e,this.channel=new _(t),this.registry.set(this.token,1),e.leaderElection){let e={fallbackInterval:2e3,responseTime:100};this.elector=new E(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()}},j=k?document:null,I=["mousemove","keydown","wheel","DOMMouseScroll","mousewheel","mousedown","touchstart","touchmove","MSPointerDown","MSPointerMove","visibilitychange","focus"];function O(e,t){let n=0;return function(...r){let o=(new Date).getTime();if(!(o-n<t))return n=o,e(...r)}}var L=()=>Date.now(),P=2147483647;function M({timeout:e=12e5,promptTimeout:t=0,promptBeforeIdle:n=0,element:r=j,events:o=I,timers:a,immediateEvents:s=[],onPresenceChange:l=()=>{},onPrompt:c=()=>{},onIdle:u=()=>{},onActive:d=()=>{},onAction:f=()=>{},onMessage:p=()=>{},debounce:h=0,throttle:g=0,eventsThrottle:m=200,startOnMount:b=!0,startManually:v=!1,stopOnIdle:y=!1,crossTab:x=!1,name:w="idle-timer",syncTimers:C=0,leaderElection:_=!1,disabled:A=!1}={}){let E=(0,i.useRef)(L()),M=(0,i.useRef)(L()),N=(0,i.useRef)(null),z=(0,i.useRef)(null),R=(0,i.useRef)(0),$=(0,i.useRef)(0),D=(0,i.useRef)(0),F=(0,i.useRef)(0),B=(0,i.useRef)(!1),H=(0,i.useRef)(!1),U=(0,i.useRef)(!1),V=(0,i.useRef)(!0),W=(0,i.useRef)(!1),G=(0,i.useRef)(null),q=(0,i.useRef)(null),K=(0,i.useRef)(e),Y=(0,i.useRef)(0);(0,i.useEffect)(()=>{if(t&&console.warn("⚠️ IdleTimer -- The `promptTimeout` property has been deprecated in favor of `promptBeforeIdle`. It will be removed in the next major release."),n&&t)throw new Error("❌ Both promptTimeout and promptBeforeIdle can not be set. The promptTimeout property will be deprecated in a future version.");if(e>=P)throw new Error(`❌ The value for the timeout property must fit in a 32 bit signed integer, ${P}.`);if(t>=P)throw new Error(`❌ The value for the promptTimeout property must fit in a 32 bit signed integer, ${P}.`);if(n>=P)throw new Error(`❌ The value for the promptBeforeIdle property must fit in a 32 bit signed integer, ${P}.`);if(n>=e)throw new Error(`❌ The value for the promptBeforeIdle property must be less than the timeout property, ${e}.`);if(n?(K.current=e-n,Y.current=n):(K.current=e,Y.current=t),!V.current){if(v||A)return;B.current&&(oe.current(null,De),q.current&&q.current.active()),ye()}},[e,t,n,v,A]);let X=(0,i.useRef)(y);(0,i.useEffect)(()=>{X.current=y},[y]);let Z=(0,i.useRef)(s),Q=(0,i.useRef)(r),J=(0,i.useRef)([...new Set([...o,...s]).values()]),ee=(0,i.useRef)(A);(0,i.useEffect)(()=>{ee.current=A,!V.current&&(A?ke():v||ye())},[A]);let te=(0,i.useRef)(l);(0,i.useEffect)(()=>{te.current=l},[l]);let ne=(0,i.useRef)(c);(0,i.useEffect)(()=>{ne.current=c},[c]);let re=(0,i.useRef)(u);(0,i.useEffect)(()=>{re.current=u},[u]);let oe=(0,i.useRef)(d);(0,i.useEffect)(()=>{oe.current=d},[d]);let ie=(0,i.useRef)(f);(0,i.useEffect)(()=>{ie.current=f},[f]);let ae=(0,i.useRef)(p);(0,i.useEffect)(()=>{ae.current=p},[p]);let se=(0,i.useMemo)(()=>{let e=(e,t)=>ie.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):g>0?O(e,g):e},[g,h]),le=(0,i.useRef)();(0,i.useEffect)(()=>{x&&C&&(le.current=O(()=>{q.current.active()},C))},[x,C]);let ce=()=>{null!==G.current&&(S.clearTimeout(G.current),G.current=null)},ue=(e,t=!0)=>{ce(),G.current=S.setTimeout(he,e||K.current),t&&(z.current=L())},de=e=>{!H.current&&!B.current&&(ne.current(e,De),te.current({type:"active",prompted:!0},De)),F.current=0,D.current=L(),H.current=!0,ue(Y.current,!1)},fe=()=>{ce(),B.current||(re.current(null,De),te.current({type:"idle"},De)),B.current=!0,N.current=L(),X.current?ve():H.current&&(D.current=0,H.current=!1)},pe=e=>{ce(),(B.current||H.current)&&(oe.current(e,De),te.current({type:"active",prompted:!1},De)),H.current=!1,D.current=0,B.current=!1,R.current+=L()-N.current,$.current+=L()-N.current,be(),ue()},he=e=>{if(!B.current){se.cancel&&se.cancel();let t=L()-z.current;return K.current+Y.current<t||!(Y.current>0)||H.current?void(q.current?q.current.idle():fe()):void(q.current?q.current.prompt():de(e))}q.current?q.current.active():pe(e)},ge=e=>{if(!b&&!z.current&&(z.current=L(),oe.current(null,De)),se(e,De),H.current)return;if(ce(),!B.current&&Z.current.includes(e.type))return void he(e);let t=L()-z.current;B.current&&!y||!B.current&&t>=K.current?he(e):(U.current=!1,F.current=0,D.current=0,ue(),x&&C&&le.current())},me=(0,i.useRef)(ge);(0,i.useEffect)(()=>{let e=W.current;e&&ve(),me.current=m>0?O(ge,m):ge,e&&be()},[m,g,h,ie,x,C]);let be=()=>{k&&Q.current&&(W.current||(J.current.forEach(e=>{Q.current.addEventListener(e,me.current,{capture:!0,passive:!0})}),W.current=!0))},ve=(e=!1)=>{k&&Q.current&&(W.current||e)&&(J.current.forEach(e=>{Q.current.removeEventListener(e,me.current,{capture:!0})}),W.current=!1)},ye=(0,i.useCallback)(e=>!ee.current&&(ce(),be(),B.current=!1,H.current=!1,U.current=!1,F.current=0,D.current=0,q.current&&!e&&q.current.start(),ue(),!0),[G,B,ee,K,q]),xe=(0,i.useCallback)(e=>!ee.current&&(ce(),be(),M.current=L(),R.current+=L()-N.current,$.current+=L()-N.current,R.current=0,B.current=!1,H.current=!1,U.current=!1,F.current=0,D.current=0,q.current&&!e&&q.current.reset(),v||ue(),!0),[G,B,K,v,ee,q]),we=(0,i.useCallback)(e=>!ee.current&&(ce(),be(),(B.current||H.current)&&pe(),B.current=!1,H.current=!1,U.current=!1,F.current=0,D.current=0,M.current=L(),q.current&&!e&&q.current.activate(),ue(),!0),[G,B,H,ee,K,q]),ke=(0,i.useCallback)((e=!1)=>!ee.current&&!U.current&&(F.current=Ie(),U.current=!0,ve(),ce(),q.current&&!e&&q.current.pause(),!0),[G,ee,q]),Se=(0,i.useCallback)((e=!1)=>!(ee.current||!U.current||(U.current=!1,H.current||be(),B.current||ue(F.current),D.current&&(D.current=L()),q.current&&!e&&q.current.resume(),0)),[G,K,ee,F,q]),Ce=(0,i.useCallback)((e,t)=>(q.current?(t&&ae.current(e,De),q.current.message(e)):t&&ae.current(e,De),!0),[p]),_e=(0,i.useCallback)(()=>B.current,[B]),Ae=(0,i.useCallback)(()=>H.current,[H]),Ee=(0,i.useCallback)(()=>q.current?q.current.isLeader:null,[q]),Te=(0,i.useCallback)(()=>q.current?q.current.isLastActive:null,[q]),je=(0,i.useCallback)(()=>q.current?q.current.token:null,[q]),Ie=(0,i.useCallback)(()=>{if(U.current)return F.current;let e=F.current?F.current:Y.current+K.current,t=z.current?L()-z.current:0,n=Math.floor(e-t);return n<0?0:Math.abs(n)},[K,Y,H,F,z]),Oe=(0,i.useCallback)(()=>Math.round(L()-M.current),[M]),Le=(0,i.useCallback)(()=>Math.round(L()-E.current),[E]),Pe=(0,i.useCallback)(()=>N.current?new Date(N.current):null,[N]),Me=(0,i.useCallback)(()=>z.current?new Date(z.current):null,[z]),Ne=(0,i.useCallback)(()=>B.current?Math.round(L()-N.current+R.current):Math.round(R.current),[N,R]),ze=(0,i.useCallback)(()=>B.current?Math.round(L()-N.current+$.current):Math.round($.current),[N,$]),Re=(0,i.useCallback)(()=>{let e=Math.round(Oe()-Ne());return e>=0?e:0},[N,R]),$e=(0,i.useCallback)(()=>{let e=Math.round(Le()-ze());return e>=0?e:0},[N,R]);(0,i.useEffect)(()=>{if(h>0&&g>0)throw new Error("❌ onAction can either be throttled or debounced, not both.");a&&function(e){S.setTimeout=e.setTimeout,S.clearTimeout=e.clearTimeout,S.setInterval=e.setInterval,S.clearInterval=e.clearInterval}(a);let e=()=>{q.current&&q.current.close(),se.cancel&&se.cancel(),ce(),ve(!0)};return k&&window.addEventListener("beforeunload",e),()=>{k&&window.removeEventListener("beforeunload",e),q.current&&q.current.close(),se.cancel&&se.cancel(),ce(),ve(!0)}},[]),(0,i.useEffect)(()=>{q.current&&q.current.close(),q.current=x?new T({channelName:w,leaderElection:_,onPrompt:()=>{de()},onIdle:()=>{fe()},onActive:()=>{pe()},onMessage:e=>{ae.current(e,De)},start:ye,reset:xe,activate:we,pause:ke,resume:Se}):null},[x,w,_,ne,re,oe,ae,ye,xe,ke,Se]),(0,i.useEffect)(()=>{V.current||(ce(),ve(!0)),!v&&!A&&(b?ye():be())},[v,b,A,V]),(0,i.useEffect)(()=>{if(!V.current){let e=[...new Set([...o,...s]).values()];if(ve(),J.current=e,Q.current=r,Z.current=s,v||A)return;b?ye():be()}},[r,JSON.stringify(o),JSON.stringify(s),V,A,v,b]),(0,i.useEffect)(()=>{V.current&&(V.current=!1)},[V]);let De={message:Ce,start:ye,reset:xe,activate:we,pause:ke,resume:Se,isIdle:_e,isPrompted:Ae,isLeader:Ee,isLastActiveTab:Te,getTabId:je,getRemainingTime:Ie,getElapsedTime:Oe,getTotalElapsedTime:Le,getLastIdleTime:Pe,getLastActiveTime:Me,getIdleTime:Ne,getTotalIdleTime:ze,getActiveTime:Re,getTotalActiveTime:$e,setOnPresenceChange:e=>{l=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=>{f=e,ie.current=e},setOnMessage:e=>{p=e,ae.current=e}};return De}(0,i.createContext)(null).Consumer;const N=function(e){return(0,i.forwardRef)(function(t,n){let r=M({...t});return"function"==typeof n?n(r):n&&(n.current=r),(0,h.jsx)(e,{...t,...r})})}(e=>{let{children:t}=e;return t});var z=n(1695),R=n(2221);var $=n(9918);const D="kindly-last-conversion-timestamp",F=()=>{const e=(0,p.jL)(),{conversionPageUrl:t,hasInteraction:n}=(0,a.d4)(z.Od),r=(()=>{const[e,t]=(0,i.useState)(!1),{conversionPageUrl:n}=(0,a.d4)(z.Od),r=((e,t)=>{let{enable:n=!0}=t;const[r,o]=(0,i.useState)(null);if(!n)return null;const a=setInterval(()=>{const e=document.querySelector("#klarna-checkout-iframe");e&&(o(e),clearInterval(a))},500);return r})(0,{enable:null==n?void 0:n.match(/klarna/gi)}),o=(0,i.useRef)(void 0),s=(0,i.useCallback)(e=>{var n;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===(n=decodeURIComponent(r).match(/\{"(.*)/gim))||void 0===n?void 0:n[0])||"");o&&"object"==typeof o&&["created","checkout_complete"].indexOf(o.ORDER_STATUS)>-1&&t(!0)},[]);return(0,i.useEffect)(()=>{r&&!o.current&&(s(r),o.current=setInterval(()=>s(r),500))},[r,o,s]),(0,i.useEffect)(()=>{e&&clearInterval(o.current)},[e]),e})(),o=(0,i.useCallback)(()=>{if((t=localStorage.getItem(D))&&!(Date.now()-Number(t)>R.M3))return;var t;const r=!n;localStorage.setItem(D,String(Date.now())),e((0,f.yM)(r))},[e,n]);(0,i.useEffect)(()=>{r&&o()},[o,r]),(0,i.useEffect)(()=>{null!=t&&t.trim()&&(0,$.A)(window.location.href,t)&&o()},[o,t])};var B=n(5767),H=n(8560),U=n(9886);const V=`\n${n(7542).n}\n .kindly-overflow-hidden {\n overflow: hidden !important;\n }\n`;var W=n(2927),G=n(8679),q=n(8414);const K=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)}(),Y=(0,s.DU)(["#kindly-root{font-size:initial;pointer-events:none;--_kindlychat-font-size-xs:calc(","px * 0.7);--_kindlychat-font-size-sm:calc(","px * 0.75);--_kindlychat-font-size-m:","px;--_kindlychat-font-size-p:calc(","px * 0.9);--_kindlychat-font-size-h4:calc(","px * 1.2);--_kindlychat-font-size-h3:calc(","px * 1.4);--_kindlychat-font-size-h2:calc(","px * 1.6);--_kindlychat-font-size-input:","px;}"],K,K,K,K,K,K,K,Math.max(16,K));var X=n(8035);const Z=e=>{var t,n,r,o,i,a,s,l,c,u,d,f,p,h,g,m,b,v,y,x,w,k,S,C,_;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:X.AV.dark,background:null!==(o=null==e||null===(i=e.style)||void 0===i?void 0:i.color_background)&&void 0!==o?o:"#ffffff",bubbleButtonOutline:null!==(a=null==e||null===(s=e.style)||void 0===s?void 0:s.color_button_outline)&&void 0!==a?a:"#0069ff",buttonBackground:null!==(l=null==e||null===(c=e.style)||void 0===c?void 0:c.color_button_background)&&void 0!==l?l:"#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!==(f=null==e||null===(p=e.style)||void 0===p?void 0:p.color_bubble_button_background)&&void 0!==f?f:"#0069ff",buttonText:null!==(h=null==e||null===(g=e.style)||void 0===g?void 0:g.color_button_text)&&void 0!==h?h:"#ffffff",headerBackground:null!==(m=null==e||null===(b=e.style)||void 0===b?void 0:b.color_header_background)&&void 0!==m?m:"#0069ff",headerText:null!==(v=null==e||null===(y=e.style)||void 0===y?void 0:y.color_header_text)&&void 0!==v?v:"#ffffff",userMessageBackground:null!==(x=null==e||null===(w=e.style)||void 0===w?void 0:w.color_user_message_background)&&void 0!==x?x:"#f5f5f5",botMessageBackground:null!==(k=null==e||null===(S=e.style)||void 0===S?void 0:S.color_bot_message_background)&&void 0!==k?k:"#f5f5f5",panelBackground:null!==(C=null==e||null===(_=e.style)||void 0===_?void 0:_.color_panel_background)&&void 0!==C?C:"#ffffff"}};var Q=n(2628),J=n(7437);function ee(e){let{settings:t}=e;const n=(0,p.jL)(),{inPlatform:r}=(0,a.d4)(z.$P);return F(),function(){const e=(0,p.jL)(),{botKey:t}=(0,p.GV)(z.$P),{messageSentTime:n}=(0,p.GV)(z.DZ),{persistStateLifespan:r}=(0,p.GV)(z.Od),{chatMessages:o}=(0,p.GV)(z.DZ);(0,i.useEffect)(()=>{const i=(0,W.A)({messageSentTime:n,persistStateLifespan:r});0===r||i||0===o.length||e((0,f.g4)(t))},[t,e,r,n])}(),function(){var e,t,n;const{feedbackToDisplay:r}=(0,H.A)(),o=(0,p.jL)(),{chatHasStarted:a,active:s}=(0,p.GV)(z.$P),l=(0,U.A)(r),c=(0,i.useCallback)(()=>{r&&a&&(o((0,B.WG)({ratingSystem:r.rating_scale.rating_system,triggerType:r.trigger_type,formTitle:r.form_title,timeout:r.timeout,step:"RATING_SCALE"})),o(s?(0,f.zn)("FEEDBACK_END_CHAT"):(0,f.ku)()))},[r,a,s,o]),{start:u,reset:d,pause:h}=M({onIdle:c,timeout:1e3*((null==r||null===(e=r.timeout)||void 0===e?void 0:e.duration)||10),startManually:!0,disabled:!(null!=r&&null!==(t=r.timeout)&&void 0!==t&&t.enabled)});(0,i.useEffect)(()=>{var e;(null==l?void 0:l.id)!==(null==r?void 0:r.id)&&(h(),d(),null!=r&&null!==(e=r.timeout)&&void 0!==e&&e.enabled&&a&&u())},[null==r?void 0:r.id,null==r||null===(n=r.timeout)||void 0===n?void 0:n.enabled,null==l?void 0:l.id,a,d,u,h]),(0,i.useEffect)(()=>{a&&r||(h(),d())},[a,r,d,h])}(),(0,i.useEffect)(()=>{var e;null===(e=t.chatbubble)||void 0===e||!e.autopopup||(0,Q.A)()||r||setTimeout(()=>n((0,f.UB)()),t.chatbubble.autopopup_time)},[n,r,t]),(0,h.jsx)(d.A,{chatSettings:t,hidden:t.bubbleHidden,onNudgeDismiss:t.onNudgeDismiss,onNudgeFormSubmit:t.onNudgeFormSubmit,onNudgeProductClick:t.onNudgeProductClick})}let te=!1,ne=null;const re=(0,i.forwardRef)((e,t)=>{let{botKey:r,settings:o,initialChatLanguage:d}=e;return ne||(ne=(0,p.Ay)({botKey:r,settings:o,initialChatLanguage:d})),(0,i.useEffect)(()=>()=>{ne=null},[]),function(){const{nonce:e}=l.Z;(0,i.useEffect)(()=>{const t=document.createElement("style");t.setAttribute("data-kindly-styles","true"),t.textContent=V,e&&t.setAttribute("nonce",e);try{return document.querySelector('style[data-kindly-styles="true"]')||document.head.appendChild(t),()=>{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,i.useImperativeHandle)(t,()=>({getActivityStatus:()=>ne.getState().chatbubble.active,openChat(){ne.dispatch((0,f.lQ)({source:"programmatic"}))},closeChat(){ne.dispatch((0,f.Rh)({source:"programmatic"}))},restartChat(){let{openChat:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{openChat:!1};(0,J.Tk)(),ne.dispatch((0,f.zX)(r,!0,e))},triggerDialogue(e,t){var n;"no"===(null==t||null===(n=t.languageCode)||void 0===n?void 0:n.toLowerCase())&&(t.languageCode="nb"),ne.dispatch((0,f.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:i}=t;r&&n&&ne.dispatch((0,f.y2)(n,void 0,i,void 0,void 0,{shouldOpenChat:!o}))},showNudge(e){let{nudgeLayout:t,slug:n,trackEvent:r=!0}=e;ne.dispatch((0,f.fe)({nudgeLayout:t,slug:n,trackEvent:r}))},showCustomNudge(e){let{content:t,slug:n,onRendered:r,trackEvent:o=!0}=e;ne.dispatch((0,f.kS)({content:t,slug:n,onRendered:r,trackEvent:o}))},getNudges:()=>ne.getState().bot.nudges,closeNudge(e,t){ne.dispatch((0,f.Y_)(e,t))},nudgeCompletion(e){sessionStorage.getItem("kindly-nudge-completion")||(ne.dispatch((0,q.vJ)({slug:e,eventType:G.oE})),ne.dispatch({type:G.Kd,slug:e}),sessionStorage.setItem("kindly-nudge-completion","true"))},triggerCtaEvent(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;ne.dispatch((0,q.NS)(e))},identifyUser(e){ne.dispatch((0,f.gm)(e))},setNewContext(e){ne.dispatch((0,f.Aw)(e))},getContext:()=>ne.dispatch((0,f.SD)()),setNewBannerMessage(e,t){ne.dispatch((0,f.cC)(e,t||(null==e?void 0:e.message)))},setNewLabel(e){ne.dispatch((0,f.tD)(e))},cancelHandover(){ne.dispatch((0,f.cL)())},setGetAuthToken(e){l.Z.getAuthToken=e,ne.dispatch((0,f.Mx)())}})),(0,i.useEffect)(()=>{(0,c.NY)(o)},[o]),(0,i.useEffect)(()=>{const{persistStateLifespan:e}=ne.getState().bot;if(-1===e||e>0)return;let t=!1;const n=()=>{t||(t=!0,ne.dispatch((0,f.R7)(r)))};window.onbeforeunload=n,window.onunload=n},[r,o,ne]),(0,i.useEffect)(()=>{!te&&o.track_utm&&(te=!0,Promise.resolve().then(n.bind(n,649)).then(e=>{let{default:t}=e;const n=t();n&&ne.dispatch((0,f.Aw)({...n}))}))},[o,ne]),window.Cypress&&(window.store=ne),(0,h.jsx)(a.Kq,{store:ne,children:(0,h.jsxs)(s.NP,{theme:Z(o),children:[(0,h.jsx)(Y,{}),(0,h.jsx)(u.A,{errorPoint:"inside ChatContainer",displayError:!1,children:(o.user_idle_timeout_seconds||0)>0?(0,h.jsx)(N,{onIdle:()=>ne.dispatch((0,f.ZS)()),onActive:()=>ne.dispatch((0,f.Mm)(o.id)),timeout:1e3*(o.user_idle_timeout_seconds||0),children:(0,h.jsx)(ee,{settings:o})}):(0,h.jsx)(ee,{settings:o})})]})})});re.displayName="ChatContainer";const oe=re;var ie=n(6464),ae=n(99);function se(e){let{retries:t=6,interval:n=300,intervalBackoffMultiplier:r=2}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((o,i)=>{e({retriesLeft:t,interval:n,intervalBackoffMultiplier:r}).then(o).catch(a=>{setTimeout(()=>{t<=1?i(a):se(e,{retries:t-1,interval:n*r,intervalBackoffMultiplier:r}).then(o,i)},n)})})}async function le(e,t,n){const r=(0,ie.U)(),o=`${e}/settings/${t}.json?version=2.81.0&${[ie.B]}=${r}`;return se(()=>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 ce=!1;const ue=e=>e.split("-")[0],de=(e,t)=>{const n=e.find(e=>e===t);if(n)return n;const r=ue(t);return e.find(e=>ue(e)===r)};var fe=n(9749),pe=n.n(fe);const he=function(e,t){return!!pe()(t).call(t,"*")||!!e&&t.some(t=>function(e){const t=e.replace(/\./g,"\\.").replace(/\*/g,".");return new RegExp(t,"i")}(t).test(e))};function ge(e){var t;let{botKey:n,setKindlyChatRef:r,options:o={}}=e;const a=function(e,t){const[n,r]=(0,i.useState)(t||{});return(0,i.useEffect)(()=>{const n=new AbortController;return ce?r(e=>(0,ae.A)(e,t)):(async()=>{try{var o;const i=await le((null===(o=t.environment)||void 0===o?void 0:o.SETTINGS_HOST)||"https://chat.kindlycdn.com",e,n),{welcome_page:a,in_chat_notification:s,notifications:l,settings:{supported_languages:c,compliance_settings:u,...d},...f}=i.data,p={...f,...d,...l,supportedLanguages:c,welcomePage:a,inChatNotification:s,complianceSettings:u};r(e=>(0,ae.A)((0,ae.A)(p,e),{...t}))}catch(e){var i,a;const t=null!==(i=e.response)&&void 0!==i&&null!==(a=i.data)&&void 0!==a&&a.error?e.response.data.error:e;"signal is aborted without reason"!==t.message&&console.error("Kindly chat failed to initialize.",t)}})(),ce=!0,()=>{n.abort()}},[e,t]),(0,i.useEffect)(()=>()=>{ce=!1},[]),n}(n,o);if(!a.id)return null;const{inPlatform:s,fullscreenMode:c,language:u,focusTrapOnFullView:d,supportedLanguages:f,getAuthToken:p,nonce:g,complianceSettings:m,welcomePage:b}=a;l.Z.language=u,l.Z.supportedLanguages=f,l.Z.feedbackSettings=s?{}:a.feedback_settings,l.Z.focusTrapOnFullView=d,l.Z.fullscreenMode=c,l.Z.getAuthToken=p,l.Z.nonce=g,l.Z.complianceSettings=m,l.Z.welcomePage=b;const v=l.Z.language,y=function(e,t){var n,r,o;const i=e.map(e=>e.code),a=null==t?void 0:t.toLowerCase();if(0===e.length)return;if(1===i.length)return i[0];if(a){const e=de(i,a);if(e)return e}const s=null===(n=document.documentElement.lang)||void 0===n?void 0:n.toLowerCase(),l=de(i,s);if(l)return l;const c=null===(r=window.navigator.language)||void 0===r?void 0:r.toLowerCase(),u=de(i,c);if(u)return u;return(null===(o=window.navigator.languages)||void 0===o?void 0:o.flatMap(e=>{const t=de(i,e.toLowerCase());return t?[t]:[]})[0])||e.find(e=>e.is_primary).code.toLowerCase()}(l.Z.supportedLanguages.filter(e=>e.is_active),v);if(!y)return console.error("Impossible to determine initial Chat language, make sure you have at least one language active for the Bot"),null;const x=(null===(t=o.environment)||void 0===t?void 0:t.KINDLY_CHAT_URL)||"http://localhost:8081",w=[x?new URL(x).hostname:void 0,"*.kindly.ai","demokind.ly","*.demokind.ly",...a.chatbubble.domains].filter(Boolean);return a.chatbubble.inPlatform||he(window.location.hostname,w)?(0,h.jsx)(oe,{ref:r,botKey:n,settings:a,initialChatLanguage:y}):(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)}},1669:(e,t,n)=>{"use strict";n(4531)("metadata")},1695:(e,t,n)=>{"use strict";n.d(t,{$P:()=>s,Cv:()=>o,DZ:()=>h,FI:()=>l,G0:()=>g,Hk:()=>f,MA:()=>r,Od:()=>a,cA:()=>c,o3:()=>d,qV:()=>p,uF:()=>i,uO:()=>u,zD:()=>m});const r=e=>{let{agent:t}=e;return t},o=e=>{let{alerts:t}=e;return t},i=e=>{let{announcement:t}=e;return t},a=e=>{let{bot:t}=e;return t},s=e=>{let{chatbubble:t}=e;return t},l=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},f=e=>{let{inChatNotification:t}=e;return t},p=e=>{let{inspector:t}=e;return t},h=e=>{let{messages:t}=e;return t},g=e=>{let{nudge:t}=e;return t},m=e=>{let{pushMessages:t}=e;return t}},1726:(e,t,n)=>{"use strict";var r=n(5161);e.exports=r},1763:(e,t,n)=>{"use strict";n.d(t,{F:()=>i,c:()=>o});var r=n(8679);const o=(e,t)=>(n,o)=>{var i,a;const{content:s,buttonHref:l,buttonText:c,icon:u,once:d}=e,f=null===(i=o().inChatNotification)||void 0===i||null===(a=i.notifications)||void 0===a?void 0:a.find(e=>e.id===t);f?s!==f.content&&n({type:r.MN,content:s,buttonHref:l,buttonText:c,icon:u,once:d,id:t}):n({type:r.vP,content:s,buttonHref:l,buttonText:c,icon:u,once:d,id:t})},i=e=>(t,n)=>{var o,i;const a=null===(o=n().inChatNotification)||void 0===o||null===(i=o.notifications)||void 0===i?void 0:i.find(t=>t.id===e);a&&(a.once?t({type:r.oZ,id:e}):t({type:r.nG,id:e}))}},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")})},1810:(e,t,n)=>{"use strict";var r=n(5279);e.exports=r},1811:(e,t,n)=>{"use strict";var r=n(4904),o=n(9989).f,i=n(3999),a=n(701),s=n(9559),l=n(8655)("toStringTag");e.exports=function(e,t,n,c){var u=n?e:e&&e.prototype;u&&(a(u,l)||o(u,l,{configurable:!0,value:t}),c&&!r&&i(u,"toString",s))}},1818:(e,t,n)=>{"use strict";n(4531)("unscopables")},1872:(e,t,n)=>{"use strict";n.d(t,{X:()=>Ve,A:()=>Ge});var r=n(4953),o=n.n(r),i=n(9155),a=n.n(i),s=n(541),l=n(809),c=n(3864),u=n(1193),d=n(4311),f=n(6343),p=n(1695),h=n(8035),g=n(9017),m=n(6052),b=n(2475);const v=(0,c.AH)(["& > div,& > svg{z-index:3;}& > div{position:relative;display:flex;justify-content:center;align-items:center;}&:before{content:'';position:absolute;left:0;top:0;width:100%;height:100%;background-color:",";border-radius:48px;transition:all 0.2s ease;}&:hover{transition:border 240ms;background:linear-gradient(0deg,rgba(0,0,0,0.08) 0%,rgba(0,0,0,0.08) 100%),#fff;&:before{box-shadow:0 0 0 2px rgba(0,0,0,0.2) inset;transition:all 0.2s ease;filter:brightness(0.92);}}&:focus,&:active{background:linear-gradient(0deg,rgba(0,0,0,0.08) 0%,rgba(0,0,0,0.08) 100%),#fff;&:after{position:absolute;left:0;top:0;bottom:0;right:0;width:100%;height:100%;transition:border 240ms;border-radius:48px;content:'';}}@media ","{&:before{border-radius:0px;","}&:focus,&:active{&:after{border-radius:0px;","}}}"],e=>{let{$background:t}=e;return t||""},h.jO.maxPhone,e=>{let{$isLast:t}=e;return t&&"border-top-left-radius: 48px; border-bottom-left-radius: 48px;"},e=>{let{$isLast:t}=e;return t&&"border-top-left-radius: 48px; border-bottom-left-radius: 48px;"}),y=c.Ay.div.withConfig({componentId:"sc-9dlu7b-0"})(["pointer-events:auto;max-width:250px;box-shadow: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);padding:6px 6px 6px 16px;justify-self:flex-end;border-radius:48px;display:flex;flex-direction:row;align-items:center;justify-content:flex-end;position:relative;z-index:2;transition:border 240ms;cursor:pointer;height:100%;color:",";"," @media ","{padding:0px 6px 0px 16px;box-shadow:none;border-right:1px solid rgba(0,0,0,0.08);border-radius:0px;","}"],e=>{let{$background:t}=e;return(0,m.w5)(t||"","#F2F2F2","#0D0D0D")},v,h.jO.maxPhone,e=>{let{$isLast:t}=e;return t&&"border-top-left-radius: 48px; border-bottom-left-radius: 48px;"}),x=c.Ay.div.withConfig({componentId:"sc-9dlu7b-1"})(["margin-right:8px;font-size:var(--_kindlychat-font-size-p);padding-top:9px;padding-bottom:9px;font-weight:500;"]),w=c.Ay.div.withConfig({componentId:"sc-9dlu7b-2"})(["display:flex;flex-direction:column-reverse;align-items:flex-end;transition:all 300ms ease;transition-timing-function:cubic-bezier(0.05,0.38,0.49,1);transform-origin:bottom right;scrollbar-width:none;&::-webkit-scrollbar{display:none;}"," @media ","{flex-direction:row;gap:0 !important;max-width:calc( 100vw - ","px );overflow-x:auto;transform-origin:right;overscroll-behavior:none;","}"],e=>{let{$open:t,$iconsCount:n}=e;return t?(0,c.AH)(["gap:8px;max-height:","px;opacity:1;transform:scale(1);"],n?60*n:0):(0,c.AH)(["gap:0px;max-height:0px;opacity:0;transform:scale(0.36);pointer-events:none;user-select:none;"])},h.jO.maxPhone,e=>{let{$buttonWidth:t}=e;return(t||0)+148},e=>{let{$open:t}=e;return!t&&(0,c.AH)(["max-width:0;"])}),k=c.Ay.div.withConfig({componentId:"sc-9dlu7b-3"})(["width:36px;height:36px;border-radius:50%;overflow:hidden;"]),S=c.Ay.img.withConfig({componentId:"sc-9dlu7b-4"})(["width:100%;height:100%;object-fit:cover;"]),C=c.Ay.div.withConfig({componentId:"sc-9dlu7b-5"})(["",";position:relative;transition:all 300ms ease;transition-timing-function:cubic-bezier(0.05,0.38,0.49,1);"," display:grid;white-space:nowrap;-ms-overflow-style:none;scrollbar-width:none;&::-webkit-scrollbar{display:none;}@media ","{display:flex;padding-left:16px;gap:0;pointer-events:all;&::before{width:100vw;height:458px;}}"],b.JP,e=>{let{$open:t}=e;return t?(0,c.AH)(["gap:8px;"]):(0,c.AH)(["gap:0;"])},h.jO.maxPhone),_=c.Ay.button.withConfig({componentId:"sc-9dlu7b-6"})(["outline:none;pointer-events:auto;justify-self:flex-end;margin-right:8px;border-radius:50%;overflow:hidden;display:flex;flex-direction:row;border:0;width:28px;height:28px;background-color:",";box-shadow:",";z-index:2;cursor:pointer;position:relative;"," justify-content:center;align-items:center;padding:0;@media ","{align-self:center;min-width:28px;margin-right:",";}"],e=>{let{$background:t}=e;return t||""},h.FR.level2,v,h.jO.maxPhone,e=>{let{$open:t}=e;return t?"8px;":"16px"});var A=n(7542),E=n(4927);const T=c.Ay.div.withConfig({componentId:"sc-1ihr6s7-0"})(["z-index:",";border-radius:14px;background:",";background-color:",";margin-bottom:16px;box-shadow:",";",";@media ","{margin-left:20px;","}@media ","{margin-left:16px;}"],e=>e.$zIndex,e=>{let{theme:t}=e;return t.background},e=>{let{theme:t}=e;return t.background},h.FR.level2,b.JP,h.jO.maxTablet,e=>{let{$bubbleSize:t}=e;return"SMALL"===t?"\n right: 30px;\n bottom: 30px;\n ":"\n bottom: 55px;"},h.jO.maxPhone),j=c.Ay.div.withConfig({componentId:"sc-1ihr6s7-1"})(["width:max-content;max-width:360px;min-width:60px;padding:12px;pointer-events:auto;@media ","{width:unset;max-width:100%;}"],h.jO.maxPhone),I=c.Ay.div.withConfig({componentId:"sc-1ihr6s7-2"})(["display:flex;cursor:pointer;align-items:center;"]),O=c.Ay.div.withConfig({componentId:"sc-1ihr6s7-3"})(["width:29px;height:29px;min-width:29px;border-radius:100px;margin-right:15px;background:",";background-position:center;background-size:cover;background-color:",";"],e=>e.theme.headerBackground,e=>e.theme.headerBackground),L=c.Ay.div.withConfig({componentId:"sc-1ihr6s7-4"})(["margin:0;color:",";font-size:var(--_kindlychat-font-size-m);font-weight:normal;line-height:24px;font-family:",";span{font-weight:500;}p{margin:0;}@media ","{font-size:var(--_kindlychat-font-size-p);}"],e=>{let{theme:t}=e;return(0,m.w5)(t.background,h.AV.light,h.AV.dark)},A.m.default,h.jO.maxTablet),P=(0,c.Ay)(E.$n).withConfig({componentId:"sc-1ihr6s7-5"})(["pointer-events:auto;z-index:",";display:flex;padding:4px;border-radius:50%;background:",";background-color:",";align-self:flex-end;margin-bottom:8px;",";",";&:before{background:",";background-color:",";}"],e=>e.$zIndex,e=>{let{theme:t}=e;return t.background||t.buttonBackground},e=>{let{theme:t}=e;return t.background||t.buttonBackground},b.JP,v,e=>{let{theme:t}=e;return t.background||t.buttonBackground},e=>{let{theme:t}=e;return t.background||t.buttonBackground}),M=c.Ay.div.withConfig({componentId:"sc-1ihr6s7-6"})(["display:flex;flex-direction:column;"]);var N=n(1085);function z(e){let{agent:t}=e;const{agent_joined_text:n}=(0,d.A)();return(0,N.jsxs)(I,{children:[(0,N.jsx)(O,{style:{backgroundImage:`url(${t.avatar})`}}),(0,N.jsxs)(L,{children:[(0,N.jsx)("span",{children:t.name||"An agent"})," ",n]})]})}function R(e){let{text:t}=e;return(0,N.jsx)(I,{children:(0,N.jsx)(L,{dangerouslySetInnerHTML:{__html:t}})})}const $=function(e){let{settings:t}=e;const{bubbleSize:n}=(0,s.d4)(p.Od),{agent:r,show:o,text:a,type:d}=(0,s.d4)(p.zD),b=(0,s.wA)(),v=(0,g.A)(t,"zIndex",15),y=(0,c.DP)(),x=(0,i.useMemo)(()=>(0,m.w5)(y.background||y.buttonBackground||"#fff",h.AV.light,h.AV.dark),[y.background,y.buttonBackground]);return null===a&&"feedback"!==d?null:(0,N.jsxs)(M,{children:[(0,N.jsx)(P,{"aria-label":"Dismiss pushMessage",title:"Dismiss pushMessage",onClick:e=>{e.stopPropagation(),b((0,f.gQ)())},type:"button",$zIndex:v,children:(0,N.jsx)(l.US,{color:x,width:20,height:20})}),(0,N.jsx)(T,{$bubbleSize:n,"aria-hidden":o?"false":"true","aria-label":"Chat bot push message",onClick:()=>b((0,f.lQ)()),role:"complementary",$zIndex:v,children:(0,N.jsxs)(j,{children:[d===f.oI.MESSAGE&&(0,N.jsx)(R,{text:a}),d===f.oI.HANDOVER&&(0,N.jsx)(z,{agent:r}),d===f.oI.FEEDBACK&&(0,N.jsx)(u.A,{})]})})]})};var D=n(2221);const F=(0,c.AH)(["width:",";height:",";object-fit:cover;border-radius:50%;transition:all 300ms ease;user-select:none;@media ","{","}"],e=>{let{$globalIconsOpen:t,$active:n,$showGlobalIcons:r,$isGlobalIconsDelayed:o}=e;return t&&void 0!==o&&!o||t&&r&&o||n?"36px":"44px"},e=>{let{$globalIconsOpen:t,$active:n,$showGlobalIcons:r,$isGlobalIconsDelayed:o}=e;return t&&void 0!==o&&!o||t&&r&&o||n?"36px":"44px"},h.jO.maxTablet,e=>{let{$smallBubble:t}=e;return t?(0,c.AH)(["width:36px;height:36px;animation:none;"]):(0,c.AH)(["width:44px !important;height:44px !important;animation:none;"])}),B=c.Ay.img.withConfig({componentId:"sc-15ijr09-0"})(["",""],F),H=(0,c.Ay)(l.T4).attrs(e=>({color:e.theme.chatbubbleText})).withConfig({componentId:"sc-15ijr09-1"})(["",""],F),U=(e,t)=>{if(e)return e;switch(t){case D.Ns.EASTER:return"http://localhost:8081/src/assets/images/KindlyBlobEaster.416354e85b59801cd8f65529358b4e44.png";case D.Ns.PRIDE:return"http://localhost:8081/src/assets/images/KindlyBlobPride.c2ba2b3e79a5f9136a5293758623b7ab.png";case D.Ns.CHRISTMAS:return"http://localhost:8081/src/assets/images/KindlyBlobXmas.73597f52e165fee513b384bc70e98314.png";default:return null}},V=function(e){let{showGlobalIcons:t,isGlobalIconsDelayed:n}=e;const{seasonalAppearance:r,bubbleAvatar:o,bubbleSize:i}=(0,s.d4)(p.Od),{active:a}=(0,s.d4)(p.$P),{open:l}=(0,s.d4)(p.o3);return r||o?(0,N.jsx)(B,{"data-testid":"chat-bubble-logo",$globalIconsOpen:l,$showGlobalIcons:t,$isGlobalIconsDelayed:n,$active:a,$smallBubble:"SMALL"===i,src:U(o,r),alt:""}):(0,N.jsx)(H,{"data-testid":"chat-bubble-logo",$globalIconsOpen:l,$showGlobalIcons:t,$isGlobalIconsDelayed:n,$active:a,$smallBubble:"SMALL"===i})};var W=n(1328);const G=(0,c.AH)(["white-space:nowrap;font-family:",";font-size:var(--_kindlychat-font-size-m);font-weight:500;"],A.m.default),q=c.Ay.div.withConfig({componentId:"sc-sdddjp-0"})(["position:absolute;left:-10000px;top:auto;user-select:none;pointer-events:none;visibility:hidden;",""],G),K=(0,i.forwardRef)((e,t)=>{var n;const{text:r,chatbubbleTextEnabled:o}=(0,s.d4)(p.Od),{currentLanguageCode:i}=(0,W.A)(),a=null===(n=r.chatbubble_text)||void 0===n?void 0:n[(null==i?void 0:i.split("-")[0])||"en"];return a&&o?(0,N.jsx)(q,{ref:t,"aria-hidden":"true",children:a}):null});K.displayName="HiddenButton";const Y=K,X=e=>{let{theme:t,$seasonalAppearance:n}=e;if(n)switch(n){case D.Ns.EASTER:return h.HM.sunglow;case D.Ns.CHRISTMAS:return h.HM.pomegranate;default:return h.Tj.white}return t.bubbleButtonBackground||t.buttonBackground},Z=c.Ay.div.withConfig({componentId:"sc-1kk1ok5-0"})(["margin-left:8px;margin-right:8px;transition:all 300ms ease;width:auto;max-width:","px;white-space:nowrap;"," color:",";@media ","{font-size:"," !important;}"],e=>{let{$buttonWidth:t}=e;return t},e=>{let{$globalIconsOpen:t,$active:n,$isGlobalIconsDelayed:r,$showGlobalIcons:o}=e;return n?(0,c.AH)(["max-width:0;margin-left:0;margin-right:0;"]):t&&void 0!==r&&!r||t&&o&&r?(0,c.AH)(["font-size:var(--_kindlychat-font-size-p);"]):(0,c.AH)(["font-size:var(--_kindlychat-font-size-m);"])},e=>{let{theme:t,$seasonalAppearance:n}=e;if(n)switch(n){case D.Ns.EASTER:return h.HM.sunglowDark;case D.Ns.CHRISTMAS:return h.HM.pomegranateDark;default:return h.AV.dark}const r=(0,m.w5)(t.bubbleButtonBackground,h.AV.light,h.AV.dark);return t.chatbubbleText||r},h.jO.maxTablet,e=>{let{$smallBubble:t}=e;return t?h.J.p:h.J.h5}),Q=c.Ay.span.withConfig({componentId:"sc-1kk1ok5-1"})(["transition:opacity 150ms ease;opacity:",";",""],e=>{let{$active:t}=e;return t&&0},e=>{let{$active:t}=e;return!t&&"transition-delay: 150ms;"}),J=c.Ay.div.withConfig({componentId:"sc-1kk1ok5-2"})(["display:flex;flex-direction:row;z-index:1;align-items:center;"]),ee=c.Ay.button.withConfig({componentId:"sc-1kk1ok5-3"})(["justify-self:flex-end;overflow:visible;display:flex;justify-content:center;align-items:center;cursor:pointer;pointer-events:auto;flex-direction:row;padding:","px;border-radius:",";border:none;box-shadow:",";position:relative;transition:all 0.25s;&:before{content:'';position:absolute;left:0;top:0;width:100%;height:100%;background:",";border-radius:",";transition:all 0.2s ease;}&:after{content:'';left:2px;top:2px;position:absolute;width:calc(100% - 4px);height:calc(100% - 4px);background:",";border-radius:",";transition:all 0.2s ease;}&:hover{transition:all 0.2s ease;filter:brightness(0.92);&:before{transition:all 0.2s ease;filter:brightness(0.88);}}&:focus{transition:all 0.2s ease;filter:brightness(0.92);&:before{transition:all 0.2s ease;filter:brightness(0.88);}}@media ","{padding:","px !important;}@media ","{","}"],e=>{let{$hasButtonText:t,$globalIconsOpen:n,$showGlobalIcons:r,$active:o,$isGlobalIconsDelayed:i}=e;return t?o?6:""+(n&&void 0!==i&&!i||n&&r&&i?6:8):""+(o||n&&void 0!==i&&!i||n&&r&&i?6:8)},e=>{let{$hasButtonText:t}=e;return t?"48px":"50%"},e=>{let{$active:t}=e;return t?`0px 1px 5px 1px ${h.Tj.shadowColorDark}`:h.FR.level2},e=>{let{$bubbleOutline:t,theme:n,background:r,$seasonalAppearance:o}=e;return o?X({theme:n||{},$seasonalAppearance:o}):r||(t?n.bubbleButtonOutline:n.bubbleButtonBackground)},e=>{let{$hasButtonText:t}=e;return t?"48px":"50%"},e=>{const t={theme:e.theme||{},$seasonalAppearance:e.$seasonalAppearance};return X(t)},e=>{let{$hasButtonText:t}=e;return t?"48px":"50%"},h.jO.maxTablet,e=>{let{$smallBubble:t}=e;return t?6:8},h.jO.maxPhone,e=>{let{$globalIconsOpen:t,$showGlobalIcons:n}=e;return t&&n&&"\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n &:before, &:after {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n "}),te=(0,c.AH)(["position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);"]);function ne(e){var t;let{showGlobalIcons:n,isGlobalIconsDelayed:r}=e;const{bubbleOutline:o,text:a,seasonalAppearance:l,chatbubbleTextEnabled:c,bubbleSize:u}=(0,s.d4)(p.Od),{currentLanguage:d,active:h,isChatFullWindow:g}=(0,s.d4)(p.$P),[m,b]=(0,i.useState)(0),{open:v}=(0,s.d4)(p.o3),y=(0,s.wA)(),x=(0,i.useRef)(null),w=null===(t=a.chatbubble_text)||void 0===t?void 0:t[(null==d?void 0:d.split("-")[0])||"en"];(0,i.useEffect)(()=>{var e;w&&c&&x.current&&b(null===(e=x.current)||void 0===e?void 0:e.clientWidth)},[w,c]);const k=h?"Close chat":"Open chat";return(0,N.jsx)(ee,{"aria-label":k,"aria-controls":"ChatButtonContainer",title:k,type:"button",$active:h,$globalIconsOpen:v,$isGlobalIconsDelayed:r,$showGlobalIcons:n,onClick:()=>y(h?(0,f.Rh)():(0,f.lQ)()),"data-testid":"chat-bubble-button","data-cy":"chat-bubble-button",$hasButtonText:!!w,$bubbleOutline:!!o,$smallBubble:"SMALL"===u,$seasonalAppearance:l,inert:!!g,children:(0,N.jsxs)(J,{children:[!!w&&c&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(Y,{ref:x}),m&&(0,N.jsx)(Z,{$buttonWidth:m,$active:h,$globalIconsOpen:v,$showGlobalIcons:n,$isGlobalIconsDelayed:r,$seasonalAppearance:l,$smallBubble:"SMALL"===u,children:(0,N.jsx)(Q,{$active:h,children:w})})]}),(0,N.jsx)(V,{showGlobalIcons:n,isGlobalIconsDelayed:r})]})})}c.Ay.div.withConfig({componentId:"sc-1kk1ok5-4"})(["",";opacity:1;background-size:contain;background-repeat:no-repeat;background-position:center center;background-image:url(",");",";"],te,e=>e.bubbleAvatar,e=>e.active&&"opacity: 0;"),c.Ay.div.withConfig({componentId:"sc-1kk1ok5-5"})(["position:relative;",";"],te);const re=a().memo(ne);let oe,ie,ae=!1;try{const e=window.AudioContext||window.webkitAudioContext;e&&(oe=new e)}catch(e){console.warn("AudioContext is not supported in this environment:",e)}async function se(){var e;if(oe){if(!ae)try{ae=!0,ie||(ie=await async function(){if(!oe)throw new Error("AudioContext is not supported");const e=await fetch("http://localhost:8081/src/assets/audio/newagent.442793eb7365abe2d4df421936fd9e6b.mp3"),t=await e.arrayBuffer();return oe.decodeAudioData(t)}()),"suspended"===oe.state&&await oe.resume(),await(e=ie,oe?new Promise(t=>{const n=oe.createBufferSource();n.buffer=e,n.connect(oe.destination),n.onended=()=>t(),n.start()}):Promise.reject(new Error("AudioContext is not supported")))}catch(e){console.error("Could not play notification sound:",e)}finally{ae=!1}}else console.warn("AudioContext is not supported, cannot play notification sound")}var le=n(9886);const ce=()=>{const{takenOver:e}=(0,s.d4)(p.MA),t=(0,le.A)(e),{chatMessages:n}=(0,s.d4)(p.DZ),{active:r}=(0,s.d4)(p.$P),o=(0,le.A)(n);(0,i.useEffect)(()=>{if(void 0!==t&&t!==e&&e&&se(),o&&n.length>o.length){const e=n[n.length-1];e&&(e.from_bot||"SYSTEM"===e.sender)&&("visible"===document.visibilityState&&r||se())}},[e,n.length,r])};var ue=n(9749),de=n.n(ue),fe=n(7182),pe=n(6064),he=n(9918);const ge=()=>{const[e,t]=(0,i.useState)(document.location.href);return(0,i.useEffect)(()=>{const n=()=>{setTimeout(()=>{e!==document.location.href&&t(document.location.href)},0)},r=setInterval(n,200),{navigation:o}=window;return o&&o.addEventListener&&(o.addEventListener("navigate",n),clearInterval(r)),()=>{o&&o.removeEventListener?o.removeEventListener("navigate",n):clearInterval(r)}},[e]),e},me=(e,t)=>Object.entries(e).reduce((n,r)=>{let[o,i]=r;return{...n,[o]:(0,pe.A)(i,t),url:e.url,autopopup_time:e.autopopup_time}},{}),be=[];var ve=n(2628),ye=n(9313);const xe=(0,c.AH)(["bottom:0px;right:0px;left:0;top:0px;"]),we=c.Ay.div.withConfig({componentId:"sc-m0hsz7-0"})(["position:fixed;bottom:calc(",");right:calc(",");"," z-index:",";"," font-family:",";transform:",";transition:transform 0.3s ease;*{box-sizing:border-box;",";}"," "," --panel-background-white-black-contrast-1743170834:",";--chat-modal-background-white-black-contrast-1755953876:",";"],e=>{var t;let{$position:n}=e;return`${null!==(t=null==n?void 0:n.bottom)&&void 0!==t?t:D.bF.bottom}`},e=>{var t;let{$position:n}=e;return`${null!==(t=null==n?void 0:n.right)&&void 0!==t?t:D.bF.right}`},e=>{let{$fullscreen:t,$active:n}=e;return t&&n&&xe},e=>(e.$zIndex||0)+5,e=>{let{$active:t}=e;return t&&(0,ve.A)()&&xe},e=>{let{theme:t}=e;return null!=t&&t.customFont?t.customFont:A.m.default},e=>{let{$shouldHideUI:t}=e;return t?"translateX(420px)":"none"},e=>{let{theme:t}=e;return(null==t?void 0:t.customFont)&&`font-family: ${t.customFont}`},e=>{let{$active:t,$chatHasStarted:n}=e;return t&&!n&&(0,c.AH)(["@media ","{bottom:2.5%;top:2.5%;right:5%;left:5%;border-radius:6px;box-shadow:",";}"],h.jO.maxTablet,h.FR.level2)},e=>{let{$active:t,$chatHasStarted:n}=e;return t&&n&&(0,c.AH)(["@media ","{bottom:0;top:0;right:0;left:0;}"],h.jO.maxTablet)},e=>{let{theme:t}=e;return(0,m.w5)(t.panelBackground,"#FFFFFF","#000000")},e=>{let{theme:t}=e;return(0,m.w5)(t.background,"#FFFFFF","#000000")}),ke=c.Ay.div.withConfig({componentId:"sc-m0hsz7-1"})(["display:flex;flex-direction:row;justify-content:flex-end;position:relative;",""],e=>{let{$active:t}=e;return t&&(0,c.AH)(["@media ","{opacity:0;user-select:none;pointer-events:none;}"],h.jO.maxTablet)}),Se=c.Ay.div.withConfig({componentId:"sc-m0hsz7-2"})(["margin-bottom:24px;transform-origin:bottom right;height:100%;"," transition-timing-function:cubic-bezier(0.05,0.38,0.49,1);@media ","{","}@media ","{","}"],e=>{let{$active:t,$fullscreenMode:n,$duration:r=300}=e;return n?"":t?(0,c.AH)(["transform:scale(1) translateY(0);opacity:1;transition:","ms ease;"],r):(0,c.AH)(["transform:scale(0.24) translateY(200px);opacity:0;transition:","ms ease;"],r)},h.jO.maxPhone,e=>{let{$active:t}=e;return!t&&"width: 0;"},h.jO.maxTablet,e=>{let{$active:t,$chatHasStarted:n}=e;return t&&!n&&(0,c.AH)(["border-radius:6px;overflow:hidden;"])}),Ce=c.Ay.div.withConfig({componentId:"sc-m0hsz7-3"})(["height:15px;width:15px;z-index:50;right:0;top:0;position:absolute;border-radius:100px;background:",";background-color:",";",";"],h.Tj.errorColor,h.Tj.errorColor,b.cr),_e=c.Ay.div.withConfig({componentId:"sc-m0hsz7-4"})(["display:grid;gap:8px;position:relative;@media ","{gap:0px;"," ","}"],h.jO.maxPhone,e=>{let{$showGlobalIcons:t}=e;return t&&"grid-template-columns: auto auto;"},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 }"}),Ae=c.Ay.button.withConfig({componentId:"sc-m0hsz7-5"})(["all:unset;position:fixed;display:flex;width:12px;height:24px;right:0;bottom:calc("," + 15px);align-items:center;justify-content:center;background:#fff;border:1px solid #e0e0e0;border-radius:4px 0 0 4px;transition:background 0.2s;cursor:pointer;&:hover{background:#f5f5f5;}&:focus-visible{outline:1px solid #0066cc;}"],e=>{var t;let{position:n}=e;return`${null!==(t=null==n?void 0:n.bottom)&&void 0!==t?t:D.bF.bottom}`});var Ee=n(2927),Te=n(7437),je=n(628);let Ie=!1;var Oe=n(916),Le=n(8679),Pe=n(6367);const Me=function(e){let{color:t,...n}=e;return(0,N.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",...n,children:(0,N.jsx)("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 Ne(e){var t,n,r;let{icons:o,settings:a}=e;const c=(0,s.wA)(),{currentLanguage:u,renderedBy:d}=(0,s.d4)(p.$P),{open:g}=(0,s.d4)(p.o3),[b,v]=(0,i.useState)();return(0,N.jsxs)(C,{$open:g,$seasonalAppearance:a.seasonal_appearance,children:[(0,N.jsx)(Y,{ref:e=>{null!=e&&e.clientWidth&&!b&&v(e.clientWidth)}}),(0,N.jsx)(_,{onClick:()=>{c((0,f.nI)({open:!g}))},$seasonalAppearance:a.seasonal_appearance,$open:g,$background:null===(t=a.style)||void 0===t?void 0:t.color_global_icons_button_background,children:g?(0,N.jsx)(l.US,{width:20,height:20,color:(0,m.w5)((null===(n=a.style)||void 0===n?void 0:n.color_global_icons_button_background)||"#fff",h.AV.light,h.AV.dark)}):(0,N.jsx)(Me,{width:20,height:20,color:(0,m.w5)((null===(r=a.style)||void 0===r?void 0:r.color_global_icons_button_background)||"#fff",h.AV.light,h.AV.dark)})}),(0,N.jsx)(w,{$buttonWidth:b,$iconsCount:o.length,$open:g,children:o.map((e,t)=>{var n;return(0,N.jsx)(y,{$isLast:0===t,$background:null===(n=a.style)||void 0===n?void 0:n.color_global_icons_button_background,onClick:()=>(async e=>{let{id:t,title:n,altText:r,imageUrl:o,buttonType:i,buttonAction:a}=e;(0,Pe.n6)({type:"trigger-globalicon",icon:{id:t,title:n,altText:r,imageUrl:o,type:i,action:a},renderedBy:d}),"DIALOGUE"===i&&await c((0,f.zh)(a,{languageCode:u,openChat:!0,tempId:void 0,responsePromise:void 0})),"NUDGE"===i&&await c((0,f.fe)({slug:a,nudgeLayout:void 0,trackEvent:!0})),"URL"===i&&window.open(a,"_blank")})(e),children:(0,N.jsxs)("div",{children:[(0,N.jsx)(x,{children:e.title}),e.imageUrl&&(0,N.jsx)(k,{children:(0,N.jsx)(S,{src:e.imageUrl,alt:e.altText})})]})},e.id)})})]})}const ze=a().memo(Ne);let Re,$e=function(e){return e.USER_INACTIVITY="USER_INACTIVITY",e.USER_SCROLLING="USER_SCROLLING",e}({}),De=function(e){return e.BOTH="BOTH",e.MOBILE="MOBILE",e.DESKTOP="DESKTOP",e}({}),Fe=!1;const Be=(0,i.lazy)(()=>Promise.resolve().then(n.bind(n,1033))),He=(0,i.lazy)(()=>Promise.resolve().then(n.bind(n,8706))),Ue=(0,i.lazy)(()=>Promise.resolve().then(n.bind(n,7142))),Ve=300;let We;function Ge(e){let{hidden:t=!1,onNudgeDismiss:n,onNudgeProductClick:r,onNudgeFormSubmit:a,chatSettings:c}=e;const u=(0,s.Pj)(),d=(0,s.wA)(),{active:h,inPlatform:m,currentLanguage:b,chatHasStarted:v}=(0,s.d4)(p.$P),[y,x]=(0,i.useState)(h),{PAT_HOST:w,PUSHER_KEY:k,VERSION:S}=(0,s.d4)(p.cA),{show:C}=(0,s.d4)(p.zD),{show:_,nudgeLayout:A}=(0,s.d4)(p.G0),{bubbleNotification:E,position:T,fullscreenMode:j}=(0,s.d4)(p.Od),{showBubbleNotification:I}=(0,s.d4)(p.Cv),{open:O}=(0,s.d4)(p.o3),L=(0,g.A)(c,"fullscreenMode",!1),[P,M]=(0,i.useState)(!1),{globalIcons:z,isGlobalIconsDelayed:R}=function(e,t,n){var r;const o=ge(),{currentLanguage:a,globalIconsState:l,inPlatform:c}=(0,s.d4)(p.$P),u=(0,s.wA)(),[d,h]=(0,i.useState)(),g=(0,i.useCallback)(()=>{if(!c&&e.global_icons_enabled&&e.global_icons)return e.global_icons.filter(e=>e.enabled[a]).reduce((e,t)=>{let{url:n,enabled:r,icons:o,title:i,trigger_after:a,trigger_on_device:s,trigger_rule:l}=t;return n.forEach(t=>{e.push({enabled:r,icons:o,title:i,trigger_after:a,trigger_on_device:s,trigger_rule:l,url:t})}),n.length||e.push({enabled:r,icons:o,title:i,trigger_after:a,trigger_on_device:s,trigger_rule:l,url:""}),e},[]).sort((e,t)=>e.url.length<t.url.length?1:-1).find(e=>{var t,n;if(!(0,ve.A)()&&de()(t=e.trigger_on_device).call(t,De.DESKTOP)||(0,ve.A)()&&de()(n=e.trigger_on_device).call(n,De.MOBILE))return(0,he.A)(o,e.url)})},[c,e.global_icons,e.global_icons_enabled,a,o]),m=(0,i.useMemo)(()=>g(),[g]);(0,i.useEffect)(()=>{Fe&&e.global_icons_enabled&&h(m)},[t,m,e.global_icons_enabled]);const b=(0,i.useCallback)(e=>{const t=e.target;t.documentElement&&m&&(t.documentElement.scrollHeight-t.documentElement.clientHeight)*(m.trigger_after/100)<t.documentElement.scrollTop&&(h(m),Fe=!0)},[m]);return(0,i.useEffect)(()=>{d&&Fe&&Re&&e.global_icons_enabled&&(Re.removeEventListener("scroll",b),Re=null)},[d,b,e.global_icons_enabled]),(0,i.useEffect)(()=>{var t;return!Fe&&e.global_icons_enabled&&(null===m&&h(void 0),m)&&(m.trigger_rule===$e.USER_INACTIVITY&&(m.trigger_after>0&&!de()(t=l.seenDelayedPages).call(t,m.url)?setTimeout(()=>{h(m),u((0,f.nI)({...l,seenDelayedPages:[...l.seenDelayedPages,m.url]})),Fe=!0},1e3*m.trigger_after):(h(m),Fe=!0)),m.trigger_rule!==$e.USER_SCROLLING||Re||(Re=n instanceof Element?n:window.document,Re.addEventListener("scroll",b))),()=>{Re&&(Re.removeEventListener("scroll",b),Re=null)}},[e,a,n,u,l,m,b]),{globalIcons:d,isGlobalIconsDelayed:!de()(r=l.seenDelayedPages).call(r,null==m?void 0:m.url)&&m&&m.trigger_after>0}}(c,h),F=(0,ve.A)(),B=(0,g.A)(c,"zIndex",D.DP);(0,i.useEffect)(()=>{h&&I&&d((0,f.pK)()),h&&C&&d((0,f.gQ)())},[I,h,F,d,C]),(0,i.useEffect)(()=>{(0,ye.LA)(o()),(0,ye.Kh)(u,k,{channelAuthorization:{transport:"ajax",endpoint:`${w}/chatbubble/${D.Ak}/auth/pusher`,headers:{"kindly-chat-version":S}},cluster:"eu",disableStats:!0,pongTimeout:7500})},[w,k,S,u]),ce(),function(){const e=(0,fe.jL)(),[t,n]=(0,i.useState)("/"),[r,o]=(0,i.useState)(!1),{shownNudges:a}=(0,s.d4)(p.$P),l=(0,Oe.A)();(0,i.useEffect)(()=>{n(window.location.href),null!=a&&a.length&&!r&&Array.from(new Set(a).values()).map(e=>l.find(t=>t.slug===e)).filter(e=>e).filter(e=>e.analytics_completion_page_path).filter(e=>(0,he.A)(t,e.analytics_completion_page_path)).forEach(t=>{o(!0),e((0,f.vJ)({slug:t.slug,eventType:Le.oE})),e({type:Le.Kd,slug:t.slug})})},[e,t,l,a,r])}(),function(){const e=(0,fe.jL)(),{currentLanguageCode:t}=(0,W.A)(),{active:n,chatHasStarted:r}=(0,s.d4)(p.$P),{pushGreetingsEnabled:o,pushGreetings:a}=(0,s.d4)(p.Od),{dismissedMessages:l}=(0,s.d4)(p.zD),c=ge();(0,i.useEffect)(()=>{if(!o||!a||n||!t||r)return;const i=()=>(e,t)=>{const{show:n}=t().pushMessages;be.length&&(n||(be[0].autopopup_time>0?setTimeout(()=>{e((0,f.VP)(be[0])),be.shift()},be[0].autopopup_time):(e((0,f.VP)(be[0])),be.shift())),be.length&&setTimeout(()=>e(i()),Math.max(be[0].autopopup_time,2e3)))};a.map(e=>me(e,t)).filter(e=>e.enabled&&!de()(l).call(l,e.title)&&(0,he.A)(c,e.url)).sort((e,t)=>t.url.length-e.url.length).forEach(e=>be.push(e)),e(i())},[n,t,o,a,e,r,l,c])}(),function(){const e=(0,fe.jL)(),{currentLanguageCode:t}=(0,W.A)(),{active:n}=(0,fe.GV)(p.$P),{nudges:r}=(0,fe.GV)(p.Od),{show:o,hasBeenDismissed:a,slug:s}=(0,fe.GV)(p.G0),l=ge(),c=null==r?void 0:r.text_nudges;(0,i.useEffect)(()=>{!n&&t&&(null==c?void 0:c.length)>0&&(null!=c?c:[]).forEach(n=>!(o||a&&n.slug===s)&&!(!(0,he.A)(l,n.url_trigger)||!n.enabled[t])&&e((0,f.mR)({nudge:n,languageCode:t})))},[n,t,e,l,c])}(),function(e){const t=(0,fe.jL)(),{token:n,pusherConnected:r,connectTriggerConfig:o}=(0,fe.GV)(p.FI),{takenOver:a}=(0,fe.GV)(p.MA),{persistStateLifespan:s}=(0,fe.GV)(p.Od),{botKey:l,active:c,disabledTransports:u,chatHasStarted:d,wasActiveOnLoad:h,userIsIdle:g,error:m}=(0,fe.GV)(p.$P),{chatMessages:b,messageSentTime:v}=(0,fe.GV)(p.DZ),[y,x]=(0,i.useState)(!1),w=localStorage.getItem(`kindly-chat-${l}`);(0,i.useEffect)(()=>()=>{Ie=!1},[]),(0,i.useEffect)(()=>(window.addEventListener("online",()=>t((0,f.UJ)())),window.addEventListener("offline",()=>t((0,f.qf)())),()=>{window.removeEventListener("online",()=>t((0,f.UJ)())),window.removeEventListener("offline",()=>t((0,f.qf)()))}),[t]),(0,i.useEffect)(()=>{const n=e.welcomePage.type!==D.Lb.NONE;!d&&h&&!n&&t((0,f.Z4)())}),(0,i.useEffect)(()=>(n||(Ie=!1),()=>{r&&(n&&(0,je.DT)(n),ye.Zf&&(0,ye.Zf)())}),[r,n]),(0,i.useEffect)(()=>{!c||!d||r||Ie||g||(403!==m||n?n&&(Ie=!0,t((0,f.fk)(n,u))):(Ie=!0,t((0,f.mg)())))},[c,d,t,m,r,n,g,u]),(0,i.useEffect)(()=>{o&&t((0,f.mg)(o))},[o,t]),(0,i.useEffect)(()=>{r&&o&&t((0,f.XO)())},[o,t,r]),(0,i.useEffect)(()=>{const e=c&&d;if(r||Ie||g||o)return;const i=(0,Ee.A)({messageSentTime:v,persistStateLifespan:s});(e||n)&&(e&&!n?(Ie=!0,t((0,f.mg)({shouldGreet:d}))):i&&(Ie=!0,t((0,f.fk)(n,u))))},[c,o,r,n,u,t,b.length,d,g,m,v,s,w,l]),(0,i.useEffect)(()=>{Ie&&r&&(Ie=!1,t((0,Te.S4)()),x(!0))},[r,t]),(0,i.useEffect)(()=>{if(r&&g&&!a){n&&(0,je.DT)(n);try{(0,ye.Zf)()}catch{}}},[g,r,a,n]),(0,i.useEffect)(()=>{n&&c&&!y&&(0,Ee.A)({messageSentTime:v,persistStateLifespan:s})&&(t((0,Te.S4)()),x(!0))},[c,t,y,n])}(c);const H=!h&&C&&!t,U=z&&!h&&!_&&c.global_icons_enabled&&!H,V=(0,le.A)(h);return(0,i.useEffect)(()=>{!h&&V?(We&&clearTimeout(We),We=setTimeout(()=>x(h),Ve+10)):V!==h&&(We&&clearTimeout(We),x(h))},[V,h]),(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(we,{$fullscreen:!!L,$active:h,$chatHasStarted:v,$inPlatform:m,$position:T,$zIndex:B,$shouldHideUI:P,id:"kindly-root",children:[(0,N.jsx)(Se,{$chatHasStarted:v,$fullscreenMode:j,$active:h,$duration:Ve,children:y&&(0,N.jsx)(i.Suspense,{fallback:"",children:(0,N.jsx)(Be,{settings:c})})}),H&&(0,N.jsx)($,{settings:c}),_&&A&&(0,N.jsx)(i.Suspense,{fallback:"",children:(0,N.jsx)(He,{hidden:t,layout:A,onDismiss:n,onNewsletterSubmit:a,onProductClick:r})}),(0,N.jsxs)(ke,{$inPlatform:m,$position:T,$zIndex:B,id:"ChatButtonContainer",$active:h,lang:b,children:[!h&&E&&I&&(0,N.jsx)(Ce,{}),!t&&(0,N.jsxs)(_e,{$showGlobalIcons:U,$globalIconsOpen:O,children:[m&&(0,N.jsx)(i.Suspense,{fallback:"",children:(0,N.jsx)(Ue,{active:h})}),U&&(0,N.jsx)(ze,{icons:z.icons,settings:c}),(0,N.jsx)(re,{showGlobalIcons:!!U,isGlobalIconsDelayed:R})]})]})]}),m&&(0,N.jsx)(Ae,{onClick:()=>M(e=>!e),children:P?(0,N.jsx)(l.A6,{stroke:"black"}):(0,N.jsx)(l.fl,{stroke:"black"})})]})}},1897:(e,t,n)=>{"use strict";n.d(t,{Dw:()=>u,Er:()=>l,Fu:()=>c,ue:()=>a});var r=n(7251),o=n(8679),i=n(4142);const a={active:!1,allGreetingsHideInput:!1,attachments:{exchangeId:null,buttonClicked:null,files:[]},botKey:null,chatHasStarted:!1,chatId:null,contactDetailsButton:null,currentLanguage:"en",currentlyPoppedUp:!1,disabledTransports:[],wasActiveOnLoad:!1,error:null,globalIconsState:{seenDelayedPages:[],open:!0},hideInputField:!1,inPlatform:!1,isChatFullWindow:!1,complianceWasRevoked:!1,complianceWasShownInWelcomePage:!1,currentModal:null,overlayViews:[],previouslyPoppedUp:!1,renderedBy:"REACT",shownNudges:[],startedAt:null,uploadButtonWasClicked:null,userIsIdle:!1},s=(0,r.Z0)({name:"chatBubble",initialState:a,reducers:{setComplianceWasShownInWelcomePage:(e,t)=>{e.complianceWasShownInWelcomePage=t.payload.wasShown},setComplianceWasRevoked:(e,t)=>{e.complianceWasRevoked=t.payload.wasRevoked}},extraReducers:e=>e.addCase(o.tr,(e,t)=>{e.error=t.payload.error}).addCase(o.M2,(e,t)=>{e.currentLanguage=t.payload.code}).addCase(o.CB,(e,t)=>{e.botKey=t.payload.botKey||e.botKey,e.chatId=a.chatId,e.error=a.error,e.complianceWasShownInWelcomePage=a.complianceWasShownInWelcomePage,e.currentModal=a.currentModal,e.overlayViews=a.overlayViews,e.hideInputField=a.hideInputField,e.userIsIdle=a.userIsIdle}).addCase(o.ny,(e,t)=>{e.chatId=t.payload.chatId,e.allGreetingsHideInput=t.payload.allGreetingsHideInput,e.currentModal=a.currentModal,e.overlayViews=a.overlayViews}).addCase(o.d$,(e,t)=>{e.chatHasStarted=t.payload.chatHasStarted,e.userIsIdle=!t.payload.chatHasStarted&&e.userIsIdle}).addCase(o.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(o.kA,e=>{e.active=!0,e.userIsIdle=!1}).addCase(o.uS,e=>{e.active=!1}).addCase(o.hn,e=>{e.previouslyPoppedUp=!0,e.currentlyPoppedUp=!0}).addCase(o.IM,e=>e).addCase(o.nm,(e,t)=>{e.startedAt=t.payload.startedAt}).addCase(o.HW,(e,t)=>{e.userIsIdle=t.payload.userIsIdle}).addCase(o.Eg,(e,t)=>{e.contactDetailsButton=t.payload.button}).addCase(o.t1,e=>{e.contactDetailsButton=null}).addCase(o.wX,(e,t)=>{e.shownNudges=(e.shownNudges||[]).concat(t.payload.slug)}).addCase(o.FZ,(e,t)=>{e.attachments.buttonClicked=(+new Date).toString(),e.attachments.exchangeId=t.payload.button.value}).addCase(o.TF,(e,t)=>{e.attachments.files=t.payload.files}).addCase(o.Q4,e=>{e.attachments.exchangeId=null,e.attachments.buttonClicked=null,e.attachments.files=[]}).addCase(o.YR,e=>{e.attachments.buttonClicked=null}).addCase(o.Kd,(e,t)=>{e.shownNudges=(e.shownNudges||[]).filter(e=>e!==t.payload.slug)}).addCase(o.uA,(e,t)=>{e.globalIconsState={...e.globalIconsState,...t.payload.state}}).addCase(o.Xu,(e,t)=>{e.currentModal=t.payload.currentModal}).addCase(o.XM,(e,t)=>{e.isChatFullWindow=t.payload.isChatFullWindow}).addCase(o.wM,(e,t)=>{e.overlayViews=[...e.overlayViews,t.payload.view]}).addCase(o.SO,e=>{e.overlayViews=[]}).addCase(o.nX,e=>{e.overlayViews=e.overlayViews.slice(0,-1)}).addCase(i.S.rejected,e=>{e.currentModal=null,e.overlayViews=e.overlayViews.filter(e=>"FEEDBACK"!==e)})}),{setComplianceWasShownInWelcomePage:l,setComplianceWasRevoked:c}=s.actions,u=s.reducer},1918:(e,t,n)=>{"use strict";var r=n(9098),o=n(1203),i=n(908),a=n(262),s=n(2137),l=n(8130),c=n(5657),u=n(4492),d=n(4417),f=n(3121),p=n(8655),h=n(5547),g=p("isConcatSpreadable"),m=h>=51||!o(function(){var e=[];return e[g]=!1,e.concat()[0]!==e}),b=function(e){if(!a(e))return!1;var t=e[g];return void 0!==t?!!t:i(e)};r({target:"Array",proto:!0,arity:1,forced:!m||!f("concat")},{concat:function(e){var t,n,r,o,i,a=s(this),f=d(a,0),p=0;for(t=-1,r=arguments.length;t<r;t++)if(b(i=-1===t?a:arguments[t]))for(o=l(i),c(p+o),n=0;n<o;n++,p++)n in i&&u(f,p,i[n]);else c(p+1),u(f,p++,i);return f.length=p,f}})},1926:(e,t,n)=>{"use strict";var r=n(2621).IteratorPrototype,o=n(5780),i=n(480),a=n(1811),s=n(6625),l=function(){return this};e.exports=function(e,t,n,c){var u=t+" Iterator";return e.prototype=o(r,{next:i(+!c,n)}),a(e,u,!1,!0),s[u]=l,e}},1949:e=>{"use strict";e.exports=r},1966:(e,t,n)=>{"use strict";var r=n(2937),o=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw new i("Can't set "+o(e)+" as a prototype")}},2002:(e,t,n)=>{"use strict";var r=n(9098),o=n(1003),i=n(701),a=n(1139),s=n(8141),l=n(2044),c=s("string-to-symbol-registry"),u=s("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!l},{for:function(e){var t=a(e);if(i(c,t))return c[t];var n=o("Symbol")(t);return c[t]=n,u[n]=t,n}})},2036:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(8681);const o=e=>{const t=(null!=e?e:"").toLowerCase();return"external_link"===t?"link":"handover_request"===t?"takeover_request":t},i=e=>{let{button_type:t,...n}=e;return{...n,button_type:o(t),category:(0,r.A)(t)}}},2044:(e,t,n)=>{"use strict";var r=n(4603);e.exports=r&&!!Symbol.for&&!!Symbol.keyFor},2100:(e,t,n)=>{"use strict";n(4531)("patternMatch")},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 i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l<i.length;l++){var c=i[l];if(!s(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}},2194:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>l,cT:()=>a,ue:()=>s});var r=n(2221),o=n(8709),i=n(8679);const a={KINDLY_GPT:"kindly-gpt"},s={id:null,name:"",avatar:"",botName:"",botAvatar:"",text:null,startOverText:"Start over",placeholder:"",typingIndicator:!1,isTyping:!1,typingType:void 0,realtimeAnalytics:!1,inputLimitEnabled:!1,inputLimit:140,isTextDirectionRtl:!1,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]:s,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case i.CB:return{...e,name:e.botName,avatar:e.botAvatar,splitLabelTimestamp:Date.now()};case i.A8:var n;return{...e,isTyping:e.typingIndicator,typingType:null===(n=t.data)||void 0===n?void 0:n.type};case i.wk:return{...e,isTyping:!1,typingType:void 0};case i.tq:return{...e,hasInteraction:!0,splitLabelTimestamp:Date.now()};case i.M2:{var r;const n=null===(r=t.payload)||void 0===r?void 0:r.code;return{...e,isTextDirectionRtl:(0,o.A)(n)}}default:return e}}},2221:(e,t,n)=>{"use strict";n.d(t,{Ak:()=>r.Ak,DP:()=>g,Gi:()=>l,Ii:()=>y,Je:()=>x,Jm:()=>v,Lb:()=>o,Le:()=>d,M3:()=>h,MK:()=>u,Ns:()=>p,RT:()=>a,T5:()=>s,bF:()=>m,bS:()=>i,dT:()=>r.dT,fl:()=>r.fl,gH:()=>r.gH,lP:()=>c,oY:()=>w,rc:()=>b,sl:()=>f});var r=n(9292);const o=Object.freeze({NONE:"NONE",COLOR:"COLOR",PICTURE:"PICTURE"}),i=Object.freeze({USER:"USER",BOT:"BOT",WEBHOOK:"WEBHOOK",AGENT:"AGENT",SYSTEM:"SYSTEM",EXTERNAL:"EXTERNAL"}),a=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}),s=Object.freeze({1e3:"250",800:"178",600:"124"}),l=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",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",CONTACT_DETAILS:"CONTACT_DETAILS",UPLOAD_ATTACHMENT:"UPLOAD_ATTACHMENT",CHECKBOX:"CHECKBOX",SUBMIT:"SUBMIT",edit_contact_details:"edit_contact_details",SLIDER:"SLIDER",END_CHAT:"END_CHAT"}),u=Object.freeze({TEMPLATE:"TEMPLATE",CUSTOM:"CUSTOM"}),d=Object.freeze({CLEAN:"CLEAN",ERROR:"ERROR",INFECTED:"INFECTED",PROCESSING:"PROCESSING"}),f=Object.freeze({IMAGE:"image",PDF:"pdf",TEXT:"text",VIDEO:"video"}),p=(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",NO_SPLIT_LABEL:void 0}),18e5),g=5e3,m=Object.freeze({bottom:"16px",right:"16px"}),b=Object.freeze({PREFIX:"PREFIX",SUFFIX:"SUFFIX"}),v=Object.freeze({MAINTENANCE:"MAINTENANCE",LANGUAGE_SWITCH:"LANGUAGE_SWITCH"}),y=(Object.freeze({WEBHOOK:"WEBHOOK",PLUGIN:"PLUGIN",STANDARD:"STANDARD"}),Object.freeze({HORIZONTAL:"HORIZONTAL",VERTICAL:"VERTICAL"})),x=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"}),w=[".pdf",".heic","image/*","video/*","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";var r=n(8900);n(1811)(r.JSON,"JSON",!0)},2320:(e,t,n)=>{"use strict";n(4531)("asyncIterator")},2471:(e,t,n)=>{var r=n(3844),o=n(5216);function i(t){return e.exports=i="function"==typeof r&&"symbol"==typeof o?function(e){return typeof e}:function(e){return e&&"function"==typeof r&&e.constructor===r&&e!==r.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,i(t)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},2475:(e,t,n)=>{"use strict";n.d(t,{AK:()=>v,JP:()=>y,Zm:()=>p,cr:()=>b,jB:()=>g,qL:()=>o,vW:()=>i,yu:()=>m});var r=n(3864);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300;return(0,r.AH)(["animation-timing-function:ease;animation-iteration-count:1;animation-fill-mode:forwards;animation-duration:","ms;"],e)},i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300;return(0,r.AH)(["height:0;width:0;padding:0;transition:width 0.1ms ease ","ms,padding 0.1ms ease ","ms,height 0.1ms ease ","ms;"],e,e,e)},a=(0,r.i7)(["0%{opacity:0;transform:translateY(-10px);}100%{opacity:1;transform:translateY(0);}"]),s=(0,r.i7)(["0%{opacity:0;transform:translateY(10px);}100%{opacity:1;transform:translateY(0);}"]),l=(0,r.i7)(["0%{opacity:0;transform:translateX(-15px);}100%{opacity:1;transform:translateX(0);}"]),c=(0,r.i7)(["0%{opacity:0;transform:translateX(-15px);}100%{opacity:0.8;transform:translateX(0);}"]),u=(0,r.i7)(["0%{opacity:0;transform:translateX(15px);}100%{opacity:1;transform:translateX(0);}"]),d=(0,r.i7)(["0%{opacity:0;transform:translateY(-100%);}100%{opacity:1;transform:translateY(0);}"]),f=(0,r.i7)(["0%{opacity:0;}100%{opacity:1;}"]),p=(0,r.i7)(["50%{opacity:0.5;}"]),h=((0,r.i7)(["50%{opacity:0.2;}"]),(0,r.i7)(["10%{transform:translateY(-5px);}50%{opacity:0.5;transform:translateY(0);}"])),g=(0,r.AH)([""," animation-name:",""],o(),f),m=(0,r.AH)([""," animation-name:",""],o(),a),b=(0,r.AH)([""," animation-name:",""],o(),s),v=(0,r.AH)([""," animation-name:",""],o(),l),y=((0,r.AH)([""," animation-name:",""],o(),c),(0,r.AH)([""," animation-name:",""],o(),u));(0,r.AH)([""," animation-name:",""],o(),d),(0,r.AH)(["animation:1.8s "," infinite 0.3s;"],h)},2492:()=>{},2552:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(9749),o=n.n(r);const i=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,i]=n;return{...e,...o()(t).call(t,r)?{}:{[r]:i}}},{})}}},2621:(e,t,n)=>{"use strict";var r,o,i,a=n(1203),s=n(2769),l=n(262),c=n(5780),u=n(3671),d=n(3508),f=n(8655),p=n(4871),h=f("iterator"),g=!1;[].keys&&("next"in(i=[].keys())?(o=u(u(i)))!==Object.prototype&&(r=o):g=!0),!l(r)||a(function(){var e={};return r[h].call(e)!==e})?r={}:p&&(r=c(r)),s(r[h])||d(r,h,function(){return this}),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:g}},2628:(e,t,n)=>{"use strict";n.d(t,{A:()=>Ze});var r,o="user-agent",i="",a="function",s="object",l="string",c="undefined",u="browser",d="cpu",f="device",p="engine",h="os",g="result",m="name",b="type",v="vendor",y="version",x="architecture",w="major",k="model",S="console",C="mobile",_="tablet",A="smarttv",E="wearable",T="xr",j="embedded",I="inapp",O="brands",L="formFactors",P="fullVersionList",M="platform",N="platformVersion",z="bitness",R="sec-ch-ua",$=R+"-full-version-list",D=R+"-arch",F=R+"-"+z,B=R+"-form-factors",H=R+"-"+C,U=R+"-"+k,V=R+"-"+M,W=V+"-version",G=[O,P,C,k,M,N,x,L,z],q="Amazon",K="Apple",Y="ASUS",X="BlackBerry",Z="Google",Q="Huawei",J="Lenovo",ee="Honor",te="LG",ne="Microsoft",re="Motorola",oe="Nvidia",ie="OnePlus",ae="OPPO",se="Samsung",le="Sharp",ce="Sony",ue="Xiaomi",de="Zebra",fe="Chrome",pe="Chromium",he="Chromecast",ge="Edge",me="Firefox",be="Opera",ve="Facebook",ye="Sogou",xe="Mobile ",we=" Browser",ke="Windows",Se=typeof window!==c&&window.navigator?window.navigator:void 0,Ce=Se&&Se.userAgentData?Se.userAgentData:void 0,_e=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},Ae=function(e,t){if(typeof e===s&&e.length>0){for(var n in e)if(Ie(t)==Ie(e[n]))return!0;return!1}return!!Te(e)&&Ie(t)==Ie(e)},Ee=function(e,t){for(var n in e)return/^(browser|cpu|device|engine|os)$/.test(n)||!!t&&Ee(e[n])},Te=function(e){return typeof e===l},je=function(e){if(e){for(var t=[],n=Pe(/\\?\"/g,e).split(","),r=0;r<n.length;r++)if(n[r].indexOf(";")>-1){var o=Ne(n[r]).split(";v=");t[r]={brand:o[0],version:o[1]}}else t[r]=Ne(n[r]);return t}},Ie=function(e){return Te(e)?e.toLowerCase():e},Oe=function(e){return Te(e)?Pe(/[^\d\.]/g,e).split(".")[0]:void 0},Le=function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];typeof n==s&&2==n.length?this[n[0]]=n[1]:this[n]=void 0}return this},Pe=function(e,t){return Te(t)?t.replace(e,i):t},Me=function(e){return Pe(/\\?\"/g,e)},Ne=function(e,t){return e=Pe(/^\s\s*/,String(e)),typeof t===c?e:e.substring(0,t)},ze=function(e,t){if(e&&t)for(var n,r,o,i,l,c,u=0;u<t.length&&!l;){var d=t[u],f=t[u+1];for(n=r=0;n<d.length&&!l&&d[n];)if(l=d[n++].exec(e))for(o=0;o<f.length;o++)c=l[++r],typeof(i=f[o])===s&&i.length>0?2===i.length?typeof i[1]==a?this[i[0]]=i[1].call(this,c):this[i[0]]=i[1]:i.length>=3&&(typeof i[1]!==a||i[1].exec&&i[1].test?3==i.length?this[i[0]]=c?c.replace(i[1],i[2]):void 0:4==i.length?this[i[0]]=c?i[3].call(this,c.replace(i[1],i[2])):void 0:i.length>4&&(this[i[0]]=c?i[3].apply(this,[c.replace(i[1],i[2])].concat(i.slice(4))):void 0):i.length>3?this[i[0]]=c?i[1].apply(this,i.slice(2)):void 0:this[i[0]]=c?i[1].call(this,c,i[2]):void 0):this[i]=c||void 0;u+=2}},Re=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(Ae(t[n][r],e))return"?"===n?void 0:n}else if(Ae(t[n],e))return"?"===n?void 0:n;return t.hasOwnProperty("*")?t["*"]:e},$e={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:""},De={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},Fe={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,[m,xe+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[y,[m,ge+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[y,[m,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[m,y],[/opios[\/ ]+([\w\.]+)/i],[y,[m,be+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[y,[m,be+" GX"]],[/\bopr\/([\w\.]+)/i],[y,[m,be]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[y,[m,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[y,[m,"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|palemoon)\/([-\w\.]+)/i,/(heytap|ovi|115|surf|qwant)browser\/([\d\.]+)/i,/(qwant)(?:ios|mobile)\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[m,y],[/quark(?:pc)?\/([-\w\.]+)/i],[y,[m,"Quark"]],[/\bddg\/([\w\.]+)/i],[y,[m,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[y,[m,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[y,[m,"WeChat"]],[/konqueror\/([\w\.]+)/i],[y,[m,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[y,[m,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[y,[m,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[y,[m,"Smart "+J+we]],[/(avast|avg)\/([\w\.]+)/i],[[m,/(.+)/,"$1 Secure"+we],y],[/\bfocus\/([\w\.]+)/i],[y,[m,me+" Focus"]],[/\bopt\/([\w\.]+)/i],[y,[m,be+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[y,[m,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[y,[m,"Dolphin"]],[/coast\/([\w\.]+)/i],[y,[m,be+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[y,[m,"MIUI"+we]],[/fxios\/([\w\.-]+)/i],[y,[m,xe+me]],[/\bqihoobrowser\/?([\w\.]*)/i],[y,[m,"360"]],[/\b(qq)\/([\w\.]+)/i],[[m,/(.+)/,"$1Browser"],y],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[m,/(.+)/,"$1"+we],y],[/samsungbrowser\/([\w\.]+)/i],[y,[m,se+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[y,[m,ye+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[m,ye+" Mobile"],y],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[m,y],[/(lbbrowser|rekonq)/i],[m],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[y,m],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[m,ve],y,[b,I]],[/(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,/(bing)(?:web|sapphire)\/([\w\.]+)/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[m,y,[b,I]],[/\bgsa\/([\w\.]+) .*safari\//i],[y,[m,"GSA"],[b,I]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[y,[m,"TikTok"],[b,I]],[/\[(linkedin)app\]/i],[m,[b,I]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[m,/(.+)/,"Zalo"],y,[b,I]],[/(chromium)[\/ ]([-\w\.]+)/i],[m,y],[/headlesschrome(?:\/([\w\.]+)| )/i],[y,[m,fe+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[y,[m,ge+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[m,fe+" WebView"],y],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[y,[m,"Android"+we]],[/chrome\/([\w\.]+) mobile/i],[y,[m,xe+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[m,y],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[y,[m,xe+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[m,xe+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[y,m],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[m,[y,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[m,y],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[m,xe+me],y],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[m,"Netscape"],y],[/(wolvic|librewolf)\/([\w\.]+)/i],[m,y],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[y,[m,me+" 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|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+(?= .+rv\:.+gecko\/\d+)|[0-4][\w\.]+(?!.+compatible))/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[m,[y,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[m,[y,/[^\d\.]+./,i]]],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"]],[/ 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,/((ppc|powerpc)(64)?)( mac|;|\))/i,/(?:osf1|[freopnt]{3,4}bsd) (alpha)/i],[[x,/ower/,i,Ie]],[/mc680.0/i],[[x,"68k"]],[/winnt.+\[axp/i],[[x,"alpha"]]],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],[k,[v,se],[b,_]],[/\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],[k,[v,se],[b,C]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i],[k,[v,K],[b,C]],[/\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,/\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i],[k,[v,K],[b,_]],[/(macintosh);/i],[k,[v,K]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[k,[v,le],[b,C]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[k,[v,ee],[b,_]],[/honor([-\w ]+)[;\)]/i],[k,[v,ee],[b,C]],[/\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],[k,[v,Q],[b,_]],[/(?:huawei) ?([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i],[k,[v,Q],[b,C]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[k,/_/g," "],[v,ue],[b,_]],[/\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|max|cc)?[_ ]?(?:\d{0,2}\w?)[_ ]?(?:plus|se|lite|pro)?( 5g|lte)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[k,/_/g," "],[v,ue],[b,C]],[/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],[k,[v,ie],[b,C]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[k,[v,ae],[b,C]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[k,[v,Re,{OnePlus:["203","304","403","404","413","415"],"*":ae}],[b,_]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[k,[v,"BLU"],[b,C]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[k,[v,"Vivo"],[b,C]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[k,[v,"Realme"],[b,C]],[/(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],[k,[v,J],[b,_]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[k,[v,J],[b,C]],[/\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],[k,[v,re],[b,C]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[k,[v,re],[b,_]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[k,[v,te],[b,_]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[k,[v,te],[b,C]],[/(nokia) (t[12][01])/i],[v,k,[b,_]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i],[[k,/_/g," "],[b,C],[v,"Nokia"]],[/(pixel (c|tablet))\b/i],[k,[v,Z],[b,_]],[/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],[k,[v,Z],[b,C]],[/(google) (pixelbook( go)?)/i],[v,k],[/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],[k,[v,ce],[b,C]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[k,"Xperia Tablet"],[v,ce],[b,_]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[k,[v,q],[b,_]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[k,/(.+)/g,"Fire Phone $1"],[v,q],[b,C]],[/(playbook);[-\w\),; ]+(rim)/i],[k,v,[b,_]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/(?:blackberry|\(bb10;) (\w+)/i],[k,[v,X],[b,C]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[k,[v,Y],[b,_]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[k,[v,Y],[b,C]],[/(nexus 9)/i],[k,[v,"HTC"],[b,_]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[v,[k,/_/g," "],[b,C]],[/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],[k,[v,"TCL"],[b,_]],[/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],[k,[v,"TCL"],[b,C]],[/(itel) ((\w+))/i],[[v,Ie],k,[b,Re,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[k,[v,"Acer"],[b,_]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[k,[v,"Meizu"],[b,C]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[k,[v,"Ulefone"],[b,C]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[k,[v,"Energizer"],[b,C]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[k,[v,"Cat"],[b,C]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[k,[v,"Smartfren"],[b,C]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[k,[v,"Nothing"],[b,C]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[k,[v,"Archos"],[b,_]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[k,[v,"Archos"],[b,C]],[/; (n159v)/i],[k,[v,"HMD"],[b,C]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[v,k,[b,_]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl|wiko)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i,/(hisense) ([ehv][\w ]+)\)/i,/droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i],[v,k,[b,C]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[v,k,[b,_]],[/(surface duo)/i],[k,[v,ne],[b,_]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[k,[v,"Fairphone"],[b,C]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[k,[v,oe],[b,_]],[/(sprint) (\w+)/i],[v,k,[b,C]],[/(kin\.[onetw]{3})/i],[[k,/\./g," "],[v,ne],[b,C]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[k,[v,de],[b,_]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[k,[v,de],[b,C]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[v,[b,A]],[/hbbtv.+maple;(\d+)/i],[[k,/^/,"SmartTV"],[v,se],[b,A]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[v,k,[b,A]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[v,te],[b,A]],[/(apple) ?tv/i],[v,[k,K+" TV"],[b,A]],[/crkey.*devicetype\/chromecast/i],[[k,he+" Third Generation"],[v,Z],[b,A]],[/crkey.*devicetype\/([^/]*)/i],[[k,/^/,"Chromecast "],[v,Z],[b,A]],[/fuchsia.*crkey/i],[[k,he+" Nest Hub"],[v,Z],[b,A]],[/crkey/i],[[k,he],[v,Z],[b,A]],[/(portaltv)/i],[k,[v,ve],[b,A]],[/droid.+aft(\w+)( bui|\))/i],[k,[v,q],[b,A]],[/(shield \w+ tv)/i],[k,[v,oe],[b,A]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[k,[v,le],[b,A]],[/(bravia[\w ]+)( bui|\))/i],[k,[v,ce],[b,A]],[/(mi(tv|box)-?\w+) bui/i],[k,[v,ue],[b,A]],[/Hbbtv.*(technisat) (.*);/i],[v,k,[b,A]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[v,/.+\/(\w+)/,"$1",Re,{LG:"lge"}],[k,Ne],[b,A]],[/(playstation \w+)/i],[k,[v,ce],[b,S]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[k,[v,ne],[b,S]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i],[v,k,[b,S]],[/droid.+; (shield)( bui|\))/i],[k,[v,oe],[b,S]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[k,[v,se],[b,E]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[v,k,[b,E]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[k,[v,ae],[b,E]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[k,[v,K],[b,E]],[/(opwwe\d{3})/i],[k,[v,ie],[b,E]],[/(moto 360)/i],[k,[v,re],[b,E]],[/(smartwatch 3)/i],[k,[v,ce],[b,E]],[/(g watch r)/i],[k,[v,te],[b,E]],[/droid.+; (wt63?0{2,3})\)/i],[k,[v,de],[b,E]],[/droid.+; (glass) \d/i],[k,[v,Z],[b,T]],[/(pico) ([\w ]+) os\d/i],[v,k,[b,T]],[/(quest( \d| pro)?s?).+vr/i],[k,[v,ve],[b,T]],[/mobile vr; rv.+firefox/i],[[b,T]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[v,[b,j]],[/(aeobc)\b/i],[k,[v,q],[b,j]],[/(homepod).+mac os/i],[k,[v,K],[b,j]],[/windows iot/i],[[b,j]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[k,[b,A]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[b,A]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i],[k,[b,Re,{mobile:"Mobile",xr:"VR","*":_}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[b,_]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[b,C]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[k,[v,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[y,[m,ge+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[m,y],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[y,[m,"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],[m,y],[/ladybird\//i],[[m,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[y,m]],os:[[/(windows nt) (6\.[23]); arm/i],[[m,/N/,"R"],[y,Re,$e]],[/(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],[m,y],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[y,/(;|\))/g,"",Re,$e],[m,ke]],[/(windows ce)\/?([\d\.]*)/i],[m,y],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w\.]+)/i,/cfnetwork\/.+darwin/i],[[y,/_/g,"."],[m,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[m,"macOS"],[y,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[y,[m,he+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[y,[m,he+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[y,[m,he+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[y,[m,he+" Linux"]],[/crkey\/([\d\.]+)/i],[y,[m,he]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[y,m],[/(ubuntu) ([\w\.]+) like android/i],[[m,/(.+)/,"$1 Touch"],y],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[m,y],[/\(bb(10);/i],[y,[m,X]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[y,[m,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[y,[m,me+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[y,[m,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[y,Re,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[m,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[y,[m,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[m,"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],[m,y],[/(sunos) ?([\d\.]*)/i],[[m,"Solaris"],y],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[m,y]]},He=(Le.call((r={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}}).init,[[u,[m,y,w,b]],[d,[x]],[f,[b,k,v]],[p,[m,y]],[h,[m,y]]]),Le.call(r.isIgnore,[[u,[y,w]],[p,[y]],[h,[y]]]),Le.call(r.isIgnoreRgx,[[u,/ ?browser$/i],[h,/ ?os$/i]]),Le.call(r.toString,[[u,[m,y]],[d,[x]],[f,[v,k]],[p,[m,y]],[h,[m,y]]]),r),Ue=function(e,t){var n=He.init[t],r=He.isIgnore[t]||0,o=He.isIgnoreRgx[t]||0,a=He.toString[t]||0;function s(){Le.call(this,n)}return s.prototype.getItem=function(){return e},s.prototype.withClientHints=function(){return Ce?Ce.getHighEntropyValues(G).then(function(t){return e.setCH(new Ve(t,!1)).parseCH().get()}):e.parseCH().get()},s.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=g&&(s.prototype.is=function(e){var t=!1;for(var n in this)if(this.hasOwnProperty(n)&&!Ae(r,n)&&Ie(o?Pe(o,this[n]):this[n])==Ie(o?Pe(o,e):e)){if(t=!0,e!=c)break}else if(e==c&&t){t=!t;break}return t},s.prototype.toString=function(){var e=i;for(var t in a)typeof this[a[t]]!==c&&(e+=(e?" ":i)+this[a[t]]);return e||c}),Ce||(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,G),t)Le.call(this,[[O,je(e[R])],[P,je(e[$])],[C,/\?1/.test(e[H])],[k,Me(e[U])],[M,Me(e[V])],[N,Me(e[W])],[x,Me(e[D])],[L,je(e[B])],[z,Me(e[F])]]);else for(var n in e)this.hasOwnProperty(n)&&typeof e[n]!==c&&(this[n]=e[n])}function We(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(Se&&Se.userAgent==this.ua)switch(this.itemType){case u:Se.brave&&typeof Se.brave.isBrave==a&&this.set(m,"Brave");break;case f:!this.get(b)&&Ce&&Ce[C]&&this.set(b,C),"Macintosh"==this.get(k)&&Se&&typeof Se.standalone!==c&&Se.maxTouchPoints&&Se.maxTouchPoints>2&&this.set(k,"iPad").set(b,_);break;case h:!this.get(m)&&Ce&&Ce[M]&&this.set(m,Ce[M]);break;case g:var e=this.data,t=function(t){return e[t].getItem().detectFeature().get()};this.set(u,t(u)).set(d,t(d)).set(f,t(f)).set(p,t(p)).set(h,t(h))}return this},this.parseUA=function(){switch(this.itemType!=g&&ze.call(this.data,this.ua,this.rgxMap),this.itemType){case u:this.set(w,Oe(this.get(y)));break;case h:if("iOS"==this.get(m)&&"18.6"==this.get(y)){var e=/\) Version\/([\d\.]+)/.exec(this.ua);e&&parseInt(e[1].substring(0,2),10)>=26&&this.set(y,e[1])}}return this},this.parseCH=function(){var e=this.uaCH,t=this.rgxMap;switch(this.itemType){case u:case p:var n,r=e[P]||e[O];if(r)for(var o=0;o<r.length;o++){var i=r[o].brand||r[o],a=r[o].version;this.itemType==u&&!/not.a.brand/i.test(i)&&(!n||/Chrom/.test(n)&&i!=pe||n==ge&&/WebView2/.test(i))&&(i=Re(i,Fe),(n=this.get(m))&&!/Chrom/.test(n)&&/Chrom/.test(i)||this.set(m,i).set(y,a).set(w,Oe(a)),n=i),this.itemType==p&&i==pe&&this.set(y,a)}break;case d:var s=e[x];s&&(s&&"64"==e[z]&&(s+="64"),ze.call(this.data,s+";",t));break;case f:if(e[C]&&this.set(b,C),e[k]&&(this.set(k,e[k]),!this.get(b)||!this.get(v))){var l={};ze.call(l,"droid 9; "+e[k]+")",t),!this.get(b)&&l.type&&this.set(b,l.type),!this.get(v)&&l.vendor&&this.set(v,l.vendor)}if(e[L]){var c;if("string"!=typeof e[L])for(var S=0;!c&&S<e[L].length;)c=Re(e[L][S++],De);else c=Re(e[L],De);this.set(b,c)}break;case h:var _=e[M];if(_){var A=e[N];_==ke&&(A=parseInt(Oe(A),10)>=13?"11":"10"),this.set(m,_).set(y,A)}this.get(m)==ke&&"Xbox"==e[k]&&this.set(m,"Xbox").set(y,void 0);break;case g:var E=this.data,T=function(t){return E[t].getItem().setCH(e).parseCH().get()};this.set(u,T(u)).set(d,T(d)).set(f,T(f)).set(p,T(p)).set(h,T(h))}return this},Le.call(this,[["itemType",e],["ua",t],["uaCH",r],["rgxMap",n],["data",Ue(this,e)]]),this}function Ge(e,t,n){if(typeof e===s?(Ee(e,!0)?(typeof t===s&&(n=t),t=e):(n=e,t=void 0),e=void 0):typeof e!==l||Ee(t,!0)||(n=t,t=void 0),n)if(typeof n.append===a){var r={};n.forEach(function(e,t){r[String(t).toLowerCase()]=e}),n=r}else{var c={};for(var m in n)n.hasOwnProperty(m)&&(c[String(m).toLowerCase()]=n[m]);n=c}if(!(this instanceof Ge))return new Ge(e,t,n).getResult();var b=typeof e===l?e:n&&n[o]?n[o]:Se&&Se.userAgent?Se.userAgent:i,v=new Ve(n,!0),y=t?function(e,t){var n={},r=t;if(!Ee(t))for(var o in r={},t)for(var i in t[o])r[i]=t[o][i].concat(r[i]?r[i]:[]);for(var a in e)n[a]=r[a]&&r[a].length%2==0?r[a].concat(e[a]):e[a];return n}(Be,t):Be,x=function(e){return e==g?function(){return new We(e,b,y,v).set("ua",b).set(u,this.getBrowser()).set(d,this.getCPU()).set(f,this.getDevice()).set(p,this.getEngine()).set(h,this.getOS()).get()}:function(){return new We(e,b,y[e],v).parseUA().get()}};return Le.call(this,[["getBrowser",x(u)],["getCPU",x(d)],["getDevice",x(f)],["getEngine",x(p)],["getOS",x(h)],["getResult",x(g)],["getUA",function(){return b}],["setUA",function(e){return Te(e)&&(b=Ne(e,500)),this}]]).setUA(b),this}Ge.VERSION="2.0.6",Ge.BROWSER=_e([m,y,w,b]),Ge.CPU=_e([x]),Ge.DEVICE=_e([k,v,b,S,C,A,_,E,j]),Ge.ENGINE=Ge.OS=_e([m,y]);const qe=Ge(),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=()=>"mobile"===(null==Xe?void 0:Xe.device.type)||"tablet"===(null==Xe?void 0:Xe.device.type)},2720:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(9155),o=n(3864),i=n(6052);const a=o.Ay.div.withConfig({componentId:"sc-1vynzdk-0"})(["visibility:hidden;padding:4px 8px;font-size:var(--_kindlychat-font-size-sm);background-color:",";color:",";border-radius:6px;z-index:99999;position:absolute;width:max-content;word-break:normal;overflow-wrap:anywhere;",""],e=>{let{theme:t}=e;return(0,i.w5)(t.background,"rgba(255, 255, 255, 0.9)","rgba(0, 0, 0, 0.9)")},e=>{let{theme:t}=e;return(0,i.w5)(t.background,"rgba(0, 0, 0, 0.8)","rgba(255, 255, 255, 0.8)")},e=>{let{$position:t}=e;switch(t){case"top":default:return"bottom: 100%;";case"bottom":return"top: 100%;"}}),s=o.Ay.div.withConfig({componentId:"sc-1vynzdk-1"})(["display:flex;flex-direction:row;align-items:center;position:relative;&:hover ","{visibility:visible;}"],a);var l=n(1085);const c=function(e){let{children:t,text:n,position:o="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:i,y:a,left:s,width:l,height:u}=r||{x:0,y:0,left:0,width:0,height:0},{x:d,y:f,width:p,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",p-40+"px"),i+l>d+p){var g;const e=d+p,t=Math.abs(e-s-40);null===(g=c.current)||void 0===g||g.style.setProperty("right",`-${t}px`)}else{var m,b;null===(m=c.current)||void 0===m||m.style.setProperty("left","50%"),null===(b=c.current)||void 0===b||b.style.setProperty("transform","translateX(-50%)")}var v,y,x,w;a-f<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")),a+u>f+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%"))}()},[o]),(0,l.jsxs)(s,{"data-testid":i,children:[t,(0,l.jsx)(a,{ref:c,"data-testid":`${i}-text`,$position:o,children:n})]})}},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"],i=n&&n[t];if(i)return i;var a=r[e],s=a&&a.prototype;return s&&s[t]}},2871:(e,t,n)=>{"use strict";var r=n(1203);e.exports=!r(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},2894:(e,t,n)=>{"use strict";var r=n(6100),o=n(2769),i=n(3753),a=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),e.exports=i.inspectSource},2921:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const r=e=>{let{buttonId:t,chatMessageId:n}=e;return`button-click-${n}-${t}`},o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t=>!e.find(e=>r(t)===r(e))}},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})},2937:(e,t,n)=>{"use strict";var r=n(262);e.exports=function(e){return r(e)||null===e}},2991:(e,t,n)=>{"use strict";n(9098)({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:n(5396)})},2996:(e,t,n)=>{"use strict";n(4531)("replaceAll")},3049:(e,t,n)=>{"use strict";n.d(t,{UJ:()=>h,XO:()=>v,fk:()=>m,mg:()=>b,qf:()=>g});var r=n(5096),o=n(8410),i=n(2221),a=n(4851),s=n(9359),l=n(9313),c=n(892),u=n(628),d=n(8679),f=n(7325);const p="pusherTransportEncrypted",h=()=>(e,t)=>{const{connected:n}=t().connection;n||e({type:d._Y})},g=()=>(e,t)=>{const{connected:n}=t().connection;n&&e({type:d._N})},m=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return async n=>{const r=window.localStorage.getItem(p),o=r?JSON.parse(r):null;t.indexOf("ws")<0&&o&&"ws"!==o.transport&&window.localStorage.removeItem(p),await n((0,c.JL)()),await n((0,c.Mx)()),(0,l.Xs)({channelAuthorization:{headers:{"kindly-chatbubble-token":e,"Current-Url":window.location.href}},disabledTransports:t}),(0,u.Cy)(e)}},b=function(){let{triggerDialogueSlug:e,languageCode:t,shouldGreet:n=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async(c,p)=>{var h,g,b;const{local:{context:v,labels:y},chatbubble:{botKey:x,currentLanguage:w,disabledTransports:k,complianceWasShownInWelcomePage:S},environment:{PAT_HOST:C},bot:{includeDisabledLanguages:_}}=p();n&&c({type:d.A8});const A=t||w,E=(new Date).toISOString(),T=await c((0,u.et)(`${C}/chatbubble/${i.Ak}/connect`,{method:"POST",body:{labels:y,context:v,language_code:A,trigger_dialogue_slug:e,include_disabled_languages:_,should_greet:n,include_greeting:!0,tz:null===Intl||void 0===Intl||null===(h=Intl.DateTimeFormat)||void 0===h||null===(g=h.call(Intl))||void 0===g||null===(b=g.resolvedOptions())||void 0===b?void 0:b.timeZone},...(0,a.A)({botKey:x},{withCurrentUrl:!0,withVersion:!0})}));if(!T)return c({type:d.wk}),!1;const{pusherConnected:j}=p().connection;if(j)try{(0,l.Zf)()}catch(e){console.warn(e)}const{token:I,chat_id:O,created:L,all_greetings_hide_input:P,greeting:M,live_translation_system_dialogue:N}=T.data;c({type:d.wk}),c({type:d.ny,token:I,chatId:O,allGreetingsHideInput:P}),c({type:d.nm,startedAt:L}),c((0,u.TP)(E));const z="NONE"!==r.Z.welcomePage.type,{isEnabled:R,descriptionTextHtml:$,requireAgreement:D}=(0,s.A)(A);return!R||D||S&&z||c({type:d.z2,payload:{message:$,system_dialogue_message_type:o.zV.COMPLIANCE}}),R&&D&&!S&&c((0,f.zn)("COMPLIANCE")),N&&c({type:d.tq,data:N}),M&&c({type:d.tq,data:M}),c(m(I,k)),!0}},v=e=>t=>t({type:d.zT,triggerConfig:e})},3057:e=>{"use strict";e.exports=function(e){return null==e}},3058:(e,t,n)=>{"use strict";n.d(t,{AF:()=>c,L9:()=>s,Mo:()=>a,sF:()=>i,uh:()=>l});var r=n(3864),o=n(6052);const i=()=>"\n #chatContainer:not(.using-tab) & {\n outline: none;\n }\n",a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return`\n background: ${(0,o.w5)(e,`rgba(255, 255, 255, ${t})`,`rgba(0, 0, 0, ${t})`)};\n background-color: ${(0,o.w5)(e,`rgba(255, 255, 255, ${t})`,`rgba(0, 0, 0, ${t})`)};\n`},s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16;const n=parseInt(e,10);return n<t?Math.ceil(t/n*100):100},l=(0,r.AH)(["position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0;"]),c=(0,r.AH)(["background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;cursor:pointer;"])},3121:(e,t,n)=>{"use strict";var r=n(1203),o=n(8655),i=n(5547),a=o("species");e.exports=function(e){return i>=51||!r(function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo})}},3131:()=>{},3169:(e,t,n)=>{"use strict";n.d(t,{EE:()=>d,Ef:()=>h,T3:()=>f,Tu:()=>p,rK:()=>g});var r=n(3864),o=n(7542),i=n(4927),a=n(8035),s=n(6052);const l=(0,r.AH)(["box-shadow:0 0 0 2px rgba(0,0,0,0.2) inset;@supports (background-color:hsl(from black h s l)){background-color:hsl(from var(--button-background-1741866936) h s calc(l * 0.88));}@supports not (background-color:hsl(from black h s l)){filter:brightness(0.9);}"]),c=(0,r.AH)(["--button-background-1741866936:",";--button-color-1741866936:",";position:relative;display:flex;font-weight:normal;color:var(--button-color-1741866936);background-color:var(--button-background-1741866936);box-shadow:",";opacity:",";justify-content:",";align-items:center;text-align:center;transition:all 0.2s ease;"," outline:none;@media (pointer:coarse){user-select:none;-webkit-touch-callout:none;}&:active,&:hover,&:focus-visible{","}&:focus-visible{&::after{content:'';position:absolute;inset:3px;border-radius:4px;outline:2px solid white;mix-blend-mode:difference;}}"],e=>{let{theme:t,$isCheckbox:n,$isSecondaryButton:r}=e;return((e,t,n)=>t?e.panelBackground:n?e.secondaryButtonBackground:e.buttonBackground)(t,n,r)},e=>{let{theme:t,$isCheckbox:n,$isSecondaryButton:r}=e;return((e,t,n)=>t?(0,s.w5)(e.panelBackground,a.AV.light,a.AV.dark):n?(0,s.w5)(e.secondaryButtonBackground,a.AV.light,a.AV.dark):e.buttonText)(t,n,r)},e=>{let{$flat:t,$disabled:n}=e;return t||n?"none":"0 1px 4px 0 rgba(0, 0, 0, 0.08)"},e=>{let{$loading:t}=e;return t?.6:1},e=>{let{$isCheckbox:t}=e;return t?"flex-start":"center"},e=>e.$selected&&l,l),u=(0,r.AH)(["",";padding:8px 12px;font-size:var(--_kindlychat-font-size-p);max-width:100%;font-family:",";& svg{margin-left:",";}&:disabled{opacity:0.5;cursor:not-allowed;}"],c,e=>{let{theme:t}=e;return t.customFont?t.customFont:o.m.default},e=>{let{$isCheckbox:t}=e;return t?"0px":"6px"}),d=r.Ay.span.withConfig({componentId:"sc-1jzjzva-0"})(["display:flex;max-width:100%;justify-content:center;align-items:center;"]),f=r.Ay.span.withConfig({componentId:"sc-1jzjzva-1"})(["overflow-wrap:normal;text-overflow:ellipsis;overflow:hidden;"]),p=r.Ay.span.withConfig({componentId:"sc-1jzjzva-2"})(["display:inline-flex;align-items:center;justify-content:center;"]),h=(0,r.Ay)(i.$n).withConfig({componentId:"sc-1jzjzva-3"})(["",""],u),g=r.Ay.a.withConfig({componentId:"sc-1jzjzva-4"})([""," "," text-decoration:none;"],i.k5,u)},3230:(e,t,n)=>{var r=n(6939),o=n(2471).default;e.exports=function(e,t){if("object"!=o(e)||!e)return e;var n=e[r];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=o(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},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:()=>p,FZ:()=>h,HW:()=>u,M2:()=>o,MO:()=>v,Q4:()=>m,SO:()=>k,TF:()=>g,XM:()=>x,Xu:()=>c,YR:()=>b,d$:()=>d,hn:()=>s,kA:()=>a,nX:()=>S,nm:()=>l,t1:()=>f,uA:()=>y,uS:()=>i,wM:()=>w});const r="START_OVER",o="SET_LANGUAGE",i="CLOSE_CHATBUBBLE",a="OPEN_CHATBUBBLE",s="POPPED_UP",l="SET_STARTED_AT",c="SET_CURRENT_MODAL",u="SET_USER_IS_IDLE",d="SET_CHAT_HAS_STARTED",f="HIDE_CONTACT_DETAILS",p="SHOW_CONTACT_DETAILS",h="ATTACHMENT_BUTTON_CLICKED",g="SET_ATTACHMENT_FILES",m="CLEAR_ATTACHMENT_FILES",b="ATTACHMENT_PROMPT_SHOWED",v="SET_ERROR",y="SET_GLOBAL_ICONS_STATE",x="SET_CHAT_FULL_WINDOW",w="DISPLAY_OVERLAY_VIEW",k="CLOSE_OVERLAY_VIEW",S="SHOW_PREVIOUS_OVERLAY_VIEW"},3395:(e,t,n)=>{"use strict";n(9828),n(7935),n(3832),n(5799);var r=n(1355);e.exports=r.f("iterator")},3407:(e,t,n)=>{"use strict";var r=n(7312);n(1037),n(1342),n(5687),n(1669),e.exports=r},3410:(e,t,n)=>{"use strict";var r=n(5024),o=n(701),i=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,s=o(i,"name"),l=s&&"something"===function(){}.name,c=s&&(!r||r&&a(i,"name").configurable);e.exports={EXISTS:s,PROPER:l,CONFIGURABLE:c}},3435:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var r=n(9749),o=n.n(r),i=n(9155),a=n.n(i),s=n(3864),l=n(8035),c=n(6052);const u=s.Ay.div.withConfig({componentId:"sc-av36lj-0"})(["display:flex;flex-direction:column;margin-top:16px;position:relative;&.no-margin{margin:0;}"]),d=s.Ay.label.withConfig({componentId:"sc-av36lj-1"})(["font-size:var(--_kindlychat-font-size-sm);margin:4px 0;font-weight:500;color:var(--panel-background-white-black-contrast-1743170834);"]),f=s.Ay.div.withConfig({componentId:"sc-av36lj-2"})(["font-weight:400;line-height:16px;margin-top:4px;font-size:var(--_kindlychat-font-size-sm);color:",";"],e=>{let{theme:t}=e;return(0,c.w5)(t.panelBackground,"#FFFFFF",l.qd.textColorLight)});var p=n(824),h=n(1435);const g=[h.pd.name,h.Gb.name,h.Ap.name,p.xI.name,h.cS.name,h.l6.name,h.ZH.name,h.TM.name];var m=n(1085);const b=function(e){let{className:t,children:n,label:r=null,htmlFor:i=null,helperText:s=null,required:l=!1}=e;const c=a().Children.toArray(n);(!c.length||c.length>1)&&console.error(`InputWrapper is expecting one child node. Received ${c.length}`);const p=c[0];if(p&&"function"==typeof p.type){const e=p.type.displayName||p.type.name;null!=g&&o()(g).call(g,e)||console.error(`InputWrapper child can only be one of the following: ${g.join(", ")}`)}return(0,m.jsxs)(u,{className:t,children:[r&&(0,m.jsxs)(d,{htmlFor:i||"",children:[r,l?(0,m.jsx)(m.Fragment,{children:"*"}):""]}),n,s&&(0,m.jsx)(f,{children:s})]})}},3489:(e,t,n)=>{"use strict";var r=n(1003);e.exports=r("document","documentElement")},3491:(e,t,n)=>{"use strict";var r=n(3574),o=n(262),i=n(5426),a=n(1966);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=r(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return i(n),a(r),o(n)?(t?e(n,r):n.__proto__=r,n):n}}():void 0)},3508:(e,t,n)=>{"use strict";var r=n(3999);e.exports=function(e,t,n,o){return o&&o.enumerable?e[t]=n:r(e,t,n),e}},3521:(e,t,n)=>{"use strict";var r=n(6100),o=n(1203),i=n(2769),a=n(8407),s=n(1003),l=n(2894),c=function(){},u=s("Reflect","construct"),d=/^\s*(?:class|function)\b/,f=r(d.exec),p=!d.test(c),h=function(e){if(!i(e))return!1;try{return u(c,[],e),!0}catch(e){return!1}},g=function(e){if(!i(e))return!1;switch(a(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!f(d,l(e))}catch(e){return!0}};g.sham=!0,e.exports=!u||o(function(){var e;return h(h.call)||!h(Object)||!h(function(){e=!0})||e})?g:h},3531:(e,t,n)=>{"use strict";var r=n(8900).navigator,o=r&&r.userAgent;e.exports=o?String(o):""},3553:(e,t,n)=>{"use strict";n.d(t,{VP:()=>a,gQ:()=>s,ku:()=>i,oI:()=>o});var r=n(8679);const o={HANDOVER:"handover",MESSAGE:"message",FEEDBACK:"feedback"},i=()=>(e,t)=>{const{show:n,dismissed:i}=t().pushMessages;i||n||e({type:r.l,pushMessageType:o.FEEDBACK})},a=e=>t=>{const{title:n,message:i}=e;t({type:r.l,pushMessageTitle:n,pushMessageType:o.MESSAGE,pushMessageText:i})},s=()=>(e,t)=>{const{show:n}=t().pushMessages;n&&e({type:r.a_})}},3574:(e,t,n)=>{"use strict";var r=n(6100),o=n(814);e.exports=function(e,t,n){try{return r(o(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}}},3592:(e,t,n)=>{"use strict";var r=n(5297);e.exports=r},3603:(e,t,n)=>{"use strict";function r(){let e=arguments.length>1?arguments[1]:void 0;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce((t,n)=>{var r;const o=e(n),i=null!==(r=t[o])&&void 0!==r?r:[];return i.push(n),t[o]=i,t},{})}n.d(t,{A:()=>r})},3671:(e,t,n)=>{"use strict";var r=n(701),o=n(2769),i=n(2137),a=n(4275),s=n(2871),l=a("IE_PROTO"),c=Object,u=c.prototype;e.exports=s?c.getPrototypeOf:function(e){var t=i(e);if(r(t,l))return t[l];var n=t.constructor;return o(n)&&t instanceof n?n.prototype:t instanceof c?u:null}},3678:(e,t,n)=>{"use strict";var r=n(1003),o=n(6100),i=r("Symbol"),a=i.keyFor,s=o(i.prototype.valueOf);e.exports=i.isRegisteredSymbol||function(e){try{return void 0!==a(s(e))}catch(e){return!1}}},3699:(e,t,n)=>{"use strict";n.d(t,{B$:()=>c,Bu:()=>d,TA:()=>u,W7:()=>s,aO:()=>a});var r=n(2221),o=n(9687);const i=["Bytes","kB","MB","GB"],a=1024,s=10*a,l=30*a,c=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))} ${i[n]}`},u=e=>new Promise((t,n)=>{const i=e.size/a,u=(0,o.A)(e)===r.sl.VIDEO,d=u?l:s;if(i>d)return void n(new Error(`The ${u?"video":"image"} must be less than ${c(d)}`));const f=new FileReader;f.readAsDataURL(e),f.onload=()=>t({url:f.result,file:e,sizeKb:i,name:e.name,type:e.type,status:r.Le.PROCESSING,sender:r.bS.USER}),f.onabort=()=>n(new Error(f.error))}),d=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),i=n(7525),a="__core-js_shared__",s=e.exports=o[a]||i(a,{});(s.versions||(s.versions=[])).push({version:"3.46.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.46.0/LICENSE",source:"https://github.com/zloirock/core-js"})},3755:(e,t,n)=>{"use strict";n.d(t,{B2:()=>d,FC:()=>a,Ko:()=>u,eo:()=>c,hl:()=>l,r6:()=>s});var r=n(3864),o=n(6052),i=n(9272);const a=r.Ay.svg.withConfig({componentId:"sc-1av4ah8-0"})(["fill:",";stroke:",";stroke-width:2px;position:relative;top:-1px;"],e=>{let{$inputType:t,theme:n}=e;return t===i.cJ.CHECKBOX?"none":n.buttonText},e=>{let{theme:t}=e;return t.buttonText}),s=r.Ay.div.withConfig({componentId:"sc-1av4ah8-1"})(["display:inline-block;width:",";height:",";border-radius:",";background:transparent;border:1px solid ",";",";","{visibility:hidden;}left:0;position:absolute;"],e=>{let{$inputType:t}=e;return t===i.cJ.CHECKBOX?"16px":"18px"},e=>{let{$inputType:t}=e;return t===i.cJ.CHECKBOX?"16px":"18px"},e=>{let{$inputType:t}=e;return t===i.cJ.CHECKBOX?"3px":"50%"},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)")},e=>{let{theme:{buttonBackground:t}}=e;return(0,o.SW)(t)?"filter: brightness(0.7);":"filter: opacity(0.3);"},a),l=r.Ay.label.withConfig({componentId:"sc-1av4ah8-2"})(["cursor:pointer;display:flex;justify-content:flex-start;align-items:center;&:hover > ","{border:1px solid ",";}"],s,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)")}),c=r.Ay.input.withConfig({componentId:"sc-1av4ah8-3"})(["height:16px;width:16px;opacity:0;margin:0;left:0;position:absolute;&:checked ~ ","{background:",";filter:opacity(1);","{visibility:visible;}animation:"," 150ms ease;}&:focus-within ~ ","{outline:1px solid ",";}"],s,e=>{let{theme:{buttonBackground:t}}=e;return t},a,e=>{let{theme:{buttonBackground:t}}=e;return(e=>(0,r.i7)(["50%{box-shadow:0 0 0 3px ",";}"],e))(t)},s,e=>{let{theme:t}=e;return(0,o.w5)(t.panelBackground,"rgba(255, 255, 255, 0.8)","rgba(0, 0, 0, 0.8)")}),u=r.Ay.div.withConfig({componentId:"sc-1av4ah8-4"})(["font-size:var(--_kindlychat-font-size-p);font-weight:400;margin:0 28px;color:",";"],e=>{let{theme:t,$isForm:n}=e;return n?"var(--panel-background-white-black-contrast-1743170834)":(0,o.w5)(t.background,"#FFFFFF","#000000")}),d=r.Ay.div.withConfig({componentId:"sc-1av4ah8-5"})(["margin-top:12px;display:flex;flex-direction:column;align-items:flex-start;"])},3773:(e,t,n)=>{"use strict";var r=n(908),o=n(3521),i=n(262),a=n(8655)("species"),s=Array;e.exports=function(e){var t;return r(e)&&(t=e.constructor,(o(t)&&(t===s||r(t.prototype))||i(t)&&null===(t=t[a]))&&(t=void 0)),void 0===t?s:t}},3791:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(9155);const o=(e,t)=>{const n=(0,r.useRef)(void 0);return(0,r.useCallback)(function(){var r;const o=Date.now()-(null!==(r=n.current)&&void 0!==r?r:0)<t;for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];if(o){var l;const e=a[0];return void(null==e||null===(l=e.preventDefault)||void 0===l||l.call(e))}e(...a),n.current=Date.now()},[t,e])}},3832:(e,t,n)=>{"use strict";var r=n(5571).charAt,o=n(1139),i=n(8417),a=n(164),s=n(877),l="String Iterator",c=i.set,u=i.getterFor(l);a(String,"String",function(e){c(this,{type:l,string:o(e),index:0})},function(){var e,t=u(this),n=t.string,o=t.index;return o>=n.length?s(void 0,!0):(e=r(n,o),t.index+=e.length,s(e,!1))})},3844:(e,t,n)=>{"use strict";e.exports=n(5994)},3855:(e,t,n)=>{"use strict";var r=n(9098),o=n(6100),i=n(5947),a=n(5426),s=n(1139),l=n(4240),c=o("".indexOf);r({target:"String",proto:!0,forced:!l("includes")},{includes:function(e){return!!~c(s(a(this)),s(i(e)),arguments.length>1?arguments[1]:void 0)}})},3860:(e,t,n)=>{"use strict";n(4531)("matcher")},3864:(e,t,n)=>{"use strict";n.d(t,{ID:()=>Ot,Dx:()=>Bt,NP:()=>Ut,DU:()=>Jt,AH:()=>Kt,Ay:()=>Zt,i7:()=>en,DP:()=>Ht});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,i=t.length;o<i;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 i=n(9155),a=n.n(i),s=n(2146),l=n.n(s),c="-ms-",u="-moz-",d="-webkit-",f="comm",p="rule",h="decl",g="@import",m="@keyframes",b="@layer",v=Math.abs,y=String.fromCharCode,x=Object.assign;function w(e){return e.trim()}function k(e,t){return(e=t.exec(e))?e[0]:e}function S(e,t,n){return e.replace(t,n)}function C(e,t,n){return e.indexOf(t,n)}function _(e,t){return 0|e.charCodeAt(t)}function A(e,t,n){return e.slice(t,n)}function E(e){return e.length}function T(e){return e.length}function j(e,t){return t.push(e),e}function I(e,t){return e.filter(function(e){return!k(e,t)})}var O=1,L=1,P=0,M=0,N=0,z="";function R(e,t,n,r,o,i,a,s){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:O,column:L,length:a,return:"",siblings:s}}function $(e,t){return x(R("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function D(e){for(;e.root;)e=$(e.root,{children:[e]});j(e,e.siblings)}function F(){return N=M>0?_(z,--M):0,L--,10===N&&(L=1,O--),N}function B(){return N=M<P?_(z,M++):0,L++,10===N&&(L=1,O++),N}function H(){return _(z,M)}function U(){return M}function V(e,t){return A(z,e,t)}function W(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 G(e){return w(V(M-1,Y(91===e?e+2:40===e?e+1:e)))}function q(e){for(;(N=H())&&N<33;)B();return W(e)>2||W(N)>3?"":" "}function K(e,t){for(;--t&&B()&&!(N<48||N>102||N>57&&N<65||N>70&&N<97););return V(e,U()+(t<6&&32==H()&&32==B()))}function Y(e){for(;B();)switch(N){case e:return M;case 34:case 39:34!==e&&39!==e&&Y(N);break;case 40:41===e&&Y(e);break;case 92:B()}return M}function X(e,t){for(;B()&&e+N!==57&&(e+N!==84||47!==H()););return"/*"+V(t,M-1)+"*"+y(47===e?e:B())}function Z(e){for(;!W(H());)B();return V(e,M)}function Q(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function J(e,t,n,r){switch(e.type){case b:if(e.children.length)break;case g:case h:return e.return=e.return||e.value;case f:return"";case m:return e.return=e.value+"{"+Q(e.children,r)+"}";case p:if(!E(e.value=e.props.join(",")))return""}return E(n=Q(e.children,r))?e.return=e.value+"{"+n+"}":""}function ee(e,t,n){switch(function(e,t){return 45^_(e,0)?(((t<<2^_(e,0))<<2^_(e,1))<<2^_(e,2))<<2^_(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(_(e,t+11)){case 114:return d+e+c+S(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return d+e+c+S(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return d+e+c+S(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+S(e,/(\w+).+(:[^]+)/,d+"box-$1$2"+c+"flex-$1$2")+e;case 5443:return d+e+c+"flex-item-"+S(e,/flex-|-self/g,"")+(k(e,/flex-|baseline/)?"":c+"grid-row-"+S(e,/flex-|-self/g,""))+e;case 4675:return d+e+c+"flex-line-pack"+S(e,/align-content|flex-|-self/g,"")+e;case 5548:return d+e+c+S(e,"shrink","negative")+e;case 5292:return d+e+c+S(e,"basis","preferred-size")+e;case 6060:return d+"box-"+S(e,"-grow","")+d+e+c+S(e,"grow","positive")+e;case 4554:return d+S(e,/([^-])(transform)/g,"$1"+d+"$2")+e;case 6187:return S(S(S(e,/(zoom-|grab)/,d+"$1"),/(image-set)/,d+"$1"),e,"")+e;case 5495:case 3959:return S(e,/(image-set\([^]*)/,d+"$1$`$1");case 4968:return S(S(e,/(.+:)(flex-)?(.*)/,d+"box-pack:$3"+c+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+d+e+e;case 4200:if(!k(e,/flex-|baseline/))return c+"grid-column-align"+A(e,t)+e;break;case 2592:case 3360:return c+S(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(e,n){return t=n,k(e.props,/grid-\w+-end/)})?~C(e+(n=n[t].value),"span",0)?e:c+S(e,"-start","")+e+c+"grid-row-span:"+(~C(n,"span",0)?k(n,/\d+/):+k(n,/\d+/)-+k(e,/\d+/))+";":c+S(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(e){return k(e.props,/grid-\w+-start/)})?e:c+S(S(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return S(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(E(e)-1-t>6)switch(_(e,t+1)){case 109:if(45!==_(e,t+4))break;case 102:return S(e,/(.+:)(.+)-([^]+)/,"$1"+d+"$2-$3$1"+u+(108==_(e,t+3)?"$3":"$2-$3"))+e;case 115:return~C(e,"stretch",0)?ee(S(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return S(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,n,r,o,i,a,s){return c+n+":"+r+s+(o?c+n+"-span:"+(i?a:+a-+r)+s:"")+e});case 4949:if(121===_(e,t+6))return S(e,":",":"+d)+e;break;case 6444:switch(_(e,45===_(e,14)?18:11)){case 120:return S(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+d+(45===_(e,14)?"inline-":"")+"box$3$1"+d+"$2$3$1"+c+"$2box$3")+e;case 100:return S(e,":",":"+c)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return S(e,"scroll-","scroll-snap-")+e}return e}function te(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case h:return void(e.return=ee(e.value,e.length,n));case m:return Q([$(e,{value:S(e.value,"@","@"+d)})],r);case p:if(e.length)return function(e,t){return e.map(t).join("")}(n=e.props,function(t){switch(k(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":D($(e,{props:[S(t,/:(read-\w+)/,":"+u+"$1")]})),D($(e,{props:[t]})),x(e,{props:I(n,r)});break;case"::placeholder":D($(e,{props:[S(t,/:(plac\w+)/,":"+d+"input-$1")]})),D($(e,{props:[S(t,/:(plac\w+)/,":"+u+"$1")]})),D($(e,{props:[S(t,/:(plac\w+)/,c+"input-$1")]})),D($(e,{props:[t]})),x(e,{props:I(n,r)})}return""})}}function ne(e){return function(e){return z="",e}(re("",null,null,null,[""],e=function(e){return O=L=1,P=E(z=e),M=0,[]}(e),0,[0],e))}function re(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,f=0,p=0,h=0,g=1,m=1,b=1,x=0,w="",k=o,A=i,T=r,I=w;m;)switch(h=x,x=B()){case 40:if(108!=h&&58==_(I,d-1)){-1!=C(I+=S(G(x),"&","&\f"),"&\f",v(c?s[c-1]:0))&&(b=-1);break}case 34:case 39:case 91:I+=G(x);break;case 9:case 10:case 13:case 32:I+=q(h);break;case 92:I+=K(U()-1,7);continue;case 47:switch(H()){case 42:case 47:j(ie(X(B(),U()),t,n,l),l);break;default:I+="/"}break;case 123*g:s[c++]=E(I)*b;case 125*g:case 59:case 0:switch(x){case 0:case 125:m=0;case 59+u:-1==b&&(I=S(I,/\f/g,"")),p>0&&E(I)-d&&j(p>32?ae(I+";",r,n,d-1,l):ae(S(I," ","")+";",r,n,d-2,l),l);break;case 59:I+=";";default:if(j(T=oe(I,t,n,c,u,o,s,w,k=[],A=[],d,i),i),123===x)if(0===u)re(I,t,T,T,k,i,d,s,A);else switch(99===f&&110===_(I,3)?100:f){case 100:case 108:case 109:case 115:re(e,T,T,r&&j(oe(e,T,T,0,0,o,s,w,o,k=[],d,A),A),o,A,d,s,r?k:A);break;default:re(I,T,T,T,[""],A,0,s,A)}}c=u=p=0,g=b=1,w=I="",d=a;break;case 58:d=1+E(I),p=h;default:if(g<1)if(123==x)--g;else if(125==x&&0==g++&&125==F())continue;switch(I+=y(x),x*g){case 38:b=u>0?1:(I+="\f",-1);break;case 44:s[c++]=(E(I)-1)*b,b=1;break;case 64:45===H()&&(I+=G(B())),f=H(),u=d=E(w=I+=Z(U())),x++;break;case 45:45===h&&2==E(I)&&(g=0)}}return i}function oe(e,t,n,r,o,i,a,s,l,c,u,d){for(var f=o-1,h=0===o?i:[""],g=T(h),m=0,b=0,y=0;m<r;++m)for(var x=0,k=A(e,f+1,f=v(b=a[m])),C=e;x<g;++x)(C=w(b>0?h[x]+" "+k:S(k,/&\f/g,h[x])))&&(l[y++]=C);return R(e,t,n,0===o?p:s,l,c,u,d)}function ie(e,t,n,r){return R(e,t,n,f,y(N),A(e,2,-2),0,r)}function ae(e,t,n,r,o){return R(e,t,n,h,A(e,0,r),A(e,r+1,-1),r,o)}var se={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},le=n(9907),ce=void 0!==le&&void 0!==le.env&&(le.env.REACT_APP_SC_ATTR||le.env.SC_ATTR)||"data-styled",ue="active",de="data-styled-version",fe="6.1.19",pe="/*!sc*/\n",he="undefined"!=typeof window&&"undefined"!=typeof document,ge=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:void 0!==le&&void 0!==le.env&&void 0!==le.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==le.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==le.env.REACT_APP_SC_DISABLE_SPEEDY&&le.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==le&&void 0!==le.env&&void 0!==le.env.SC_DISABLE_SPEEDY&&""!==le.env.SC_DISABLE_SPEEDY&&"false"!==le.env.SC_DISABLE_SPEEDY&&le.env.SC_DISABLE_SPEEDY),me={},be=(new Set,Object.freeze([])),ve=Object.freeze({});function ye(e,t,n){return void 0===n&&(n=ve),e.theme!==n.theme&&e.theme||t||n.theme}var xe=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"]),we=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,ke=/(^-|-$)/g;function Se(e){return e.replace(we,"-").replace(ke,"")}var Ce=/(a)(d)/gi,_e=52,Ae=function(e){return String.fromCharCode(e+(e>25?39:97))};function Ee(e){var t,n="";for(t=Math.abs(e);t>_e;t=t/_e|0)n=Ae(t%_e)+n;return(Ae(t%_e)+n).replace(Ce,"$1-$2")}var Te,je=5381,Ie=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Oe=function(e){return Ie(je,e)};function Le(e){return Ee(Oe(e)>>>0)}function Pe(e){return"string"==typeof e&&!0}var Me="function"==typeof Symbol&&Symbol.for,Ne=Me?Symbol.for("react.memo"):60115,ze=Me?Symbol.for("react.forward_ref"):60112,Re={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},$e={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},De={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Fe=((Te={})[ze]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Te[Ne]=De,Te);function Be(e){return("type"in(t=e)&&t.type.$$typeof)===Ne?De:"$$typeof"in e?Fe[e.$$typeof]:Re;var t}var He=Object.defineProperty,Ue=Object.getOwnPropertyNames,Ve=Object.getOwnPropertySymbols,We=Object.getOwnPropertyDescriptor,Ge=Object.getPrototypeOf,qe=Object.prototype;function Ke(e,t,n){if("string"!=typeof t){if(qe){var r=Ge(t);r&&r!==qe&&Ke(e,r,n)}var o=Ue(t);Ve&&(o=o.concat(Ve(t)));for(var i=Be(e),a=Be(t),s=0;s<o.length;++s){var l=o[s];if(!(l in $e||n&&n[l]||a&&l in a||i&&l in i)){var c=We(t,l);try{He(e,l,c)}catch(e){}}}}return e}function Ye(e){return"function"==typeof e}function Xe(e){return"object"==typeof e&&"styledComponentId"in e}function Ze(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function Qe(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 Je(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function et(e,t,n){if(void 0===n&&(n=!1),!n&&!Je(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=et(e[r],t[r]);else if(Je(t))for(var r in t)e[r]=et(e[r],t[r]);return e}function tt(e,t){Object.defineProperty(e,"toString",{value:t})}function nt(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 rt=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 nt(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var i=r;i<o;i++)this.groupSizes[i]=0}for(var a=this.indexOfGroup(e+1),s=(i=0,t.length);i<s;i++)this.tag.insertRule(a,t[i])&&(this.groupSizes[e]++,a++)},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,i=r;i<o;i++)t+="".concat(this.tag.getRule(i)).concat(pe);return t},e}(),ot=new Map,it=new Map,at=1,st=function(e){if(ot.has(e))return ot.get(e);for(;it.has(at);)at++;var t=at++;return ot.set(e,t),it.set(t,e),t},lt=function(e,t){at=t+1,ot.set(e,t),it.set(t,e)},ct="style[".concat(ce,"][").concat(de,'="').concat(fe,'"]'),ut=new RegExp("^".concat(ce,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),dt=function(e,t,n){for(var r,o=n.split(","),i=0,a=o.length;i<a;i++)(r=o[i])&&e.registerName(t,r)},ft=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split(pe),o=[],i=0,a=r.length;i<a;i++){var s=r[i].trim();if(s){var l=s.match(ut);if(l){var c=0|parseInt(l[1],10),u=l[2];0!==c&&(lt(u,c),dt(e,u,l[3]),e.getTag().insertRules(c,o)),o.length=0}else o.push(s)}}},pt=function(e){for(var t=document.querySelectorAll(ct),n=0,r=t.length;n<r;n++){var o=t[n];o&&o.getAttribute(ce)!==ue&&(ft(e,o),o.parentNode&&o.parentNode.removeChild(o))}};function ht(){return n.nc}var gt=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){var t=Array.from(e.querySelectorAll("style[".concat(ce,"]")));return t[t.length-1]}(n),i=void 0!==o?o.nextSibling:null;r.setAttribute(ce,ue),r.setAttribute(de,fe);var a=ht();return a&&r.setAttribute("nonce",a),n.insertBefore(r,i),r},mt=function(){function e(e){this.element=gt(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 nt(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}(),bt=function(){function e(e){this.element=gt(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}(),vt=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}(),yt=he,xt={isServer:!he,useCSSOMInjection:!ge},wt=function(){function e(e,t,n){void 0===e&&(e=ve),void 0===t&&(t={});var o=this;this.options=r(r({},xt),e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&he&&yt&&(yt=!1,pt(this)),tt(this,function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return it.get(e)}(n);if(void 0===o)return"continue";var i=e.names.get(o),a=t.getGroup(n);if(void 0===i||!i.size||0===a.length)return"continue";var s="".concat(ce,".g").concat(n,'[id="').concat(o,'"]'),l="";void 0!==i&&i.forEach(function(e){e.length>0&&(l+="".concat(e,","))}),r+="".concat(a).concat(s,'{content:"').concat(l,'"}').concat(pe)},i=0;i<n;i++)o(i);return r}(o)})}return e.registerId=function(e){return st(e)},e.prototype.rehydrate=function(){!this.server&&he&&pt(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 vt(n):t?new mt(n):new bt(n)}(this.options),new rt(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(st(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(st(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(st(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),kt=/&/g,St=/^\s*\/\/.*$/gm;function Ct(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=Ct(e.children,t)),e})}function _t(e){var t,n,r,o=void 0===e?ve:e,i=o.options,a=void 0===i?ve:i,s=o.plugins,l=void 0===s?be:s,c=function(e,r,o){return o.startsWith(n)&&o.endsWith(n)&&o.replaceAll(n,"").length>0?".".concat(t):e},u=l.slice();u.push(function(e){e.type===p&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(kt,n).replace(r,c))}),a.prefix&&u.push(te),u.push(J);var d=function(e,o,i,s){void 0===o&&(o=""),void 0===i&&(i=""),void 0===s&&(s="&"),t=s,n=o,r=new RegExp("\\".concat(n,"\\b"),"g");var l=e.replace(St,""),c=ne(i||o?"".concat(i," ").concat(o," { ").concat(l," }"):l);a.namespace&&(c=Ct(c,a.namespace));var d,f,p,h=[];return Q(c,(d=u.concat((p=function(e){return h.push(e)},function(e){e.root||(e=e.return)&&p(e)})),f=T(d),function(e,t,n,r){for(var o="",i=0;i<f;i++)o+=d[i](e,t,n,r)||"";return o})),h};return d.hash=l.length?l.reduce(function(e,t){return t.name||nt(15),Ie(e,t.name)},je).toString():"",d}var At=new wt,Et=_t(),Tt=a().createContext({shouldForwardProp:void 0,styleSheet:At,stylis:Et}),jt=(Tt.Consumer,a().createContext(void 0));function It(){return(0,i.useContext)(Tt)}function Ot(e){var t=(0,i.useState)(e.stylisPlugins),n=t[0],r=t[1],o=It().styleSheet,s=(0,i.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,i.useMemo)(function(){return _t({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:n})},[e.enableVendorPrefixes,e.namespace,n]);(0,i.useEffect)(function(){l()(n,e.stylisPlugins)||r(e.stylisPlugins)},[e.stylisPlugins]);var u=(0,i.useMemo)(function(){return{shouldForwardProp:e.shouldForwardProp,styleSheet:s,stylis:c}},[e.shouldForwardProp,s,c]);return a().createElement(Tt.Provider,{value:u},a().createElement(jt.Provider,{value:c},e.children))}var Lt=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=Et);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,tt(this,function(){throw nt(12,String(n.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=Et),this.name+e.hash},e}(),Pt=function(e){return e>="A"&&e<="Z"};function Mt(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;Pt(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var Nt=function(e){return null==e||!1===e||""===e},zt=function(e){var t,n,r=[];for(var i in e){var a=e[i];e.hasOwnProperty(i)&&!Nt(a)&&(Array.isArray(a)&&a.isCss||Ye(a)?r.push("".concat(Mt(i),":"),a,";"):Je(a)?r.push.apply(r,o(o(["".concat(i," {")],zt(a),!1),["}"],!1)):r.push("".concat(Mt(i),": ").concat((t=i,null==(n=a)||"boolean"==typeof n||""===n?"":"number"!=typeof n||0===n||t in se||t.startsWith("--")?String(n).trim():"".concat(n,"px")),";")))}return r};function Rt(e,t,n,r){return Nt(e)?[]:Xe(e)?[".".concat(e.styledComponentId)]:Ye(e)?!Ye(o=e)||o.prototype&&o.prototype.isReactComponent||!t?[e]:Rt(e(t),t,n,r):e instanceof Lt?n?(e.inject(n,r),[e.getName(r)]):[e]:Je(e)?zt(e):Array.isArray(e)?Array.prototype.concat.apply(be,e.map(function(e){return Rt(e,t,n,r)})):[e.toString()];var o}function $t(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(Ye(n)&&!Xe(n))return!1}return!0}var Dt=Oe(fe),Ft=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&$t(e),this.componentId=t,this.baseHash=Ie(Dt,t),this.baseStyle=n,wt.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=Ze(r,this.staticRulesId);else{var o=Qe(Rt(this.rules,e,t,n)),i=Ee(Ie(this.baseHash,o)>>>0);if(!t.hasNameForId(this.componentId,i)){var a=n(o,".".concat(i),void 0,this.componentId);t.insertRules(this.componentId,i,a)}r=Ze(r,i),this.staticRulesId=i}else{for(var s=Ie(this.baseHash,n.hash),l="",c=0;c<this.rules.length;c++){var u=this.rules[c];if("string"==typeof u)l+=u;else if(u){var d=Qe(Rt(u,e,t,n));s=Ie(s,d+c),l+=d}}if(l){var f=Ee(s>>>0);t.hasNameForId(this.componentId,f)||t.insertRules(this.componentId,f,n(l,".".concat(f),void 0,this.componentId)),r=Ze(r,f)}}return r},e}(),Bt=a().createContext(void 0);function Ht(){var e=(0,i.useContext)(Bt);if(!e)throw nt(18);return e}function Ut(e){var t=a().useContext(Bt),n=(0,i.useMemo)(function(){return function(e,t){if(!e)throw nt(14);if(Ye(e))return e(t);if(Array.isArray(e)||"object"!=typeof e)throw nt(8);return t?r(r({},t),e):e}(e.theme,t)},[e.theme,t]);return e.children?a().createElement(Bt.Provider,{value:n},e.children):null}Bt.Consumer;var Vt={};function Wt(e,t,n){var o=Xe(e),s=e,l=!Pe(e),c=t.attrs,u=void 0===c?be:c,d=t.componentId,f=void 0===d?function(e,t){var n="string"!=typeof e?"sc":Se(e);Vt[n]=(Vt[n]||0)+1;var r="".concat(n,"-").concat(Le(fe+n+Vt[n]));return t?"".concat(t,"-").concat(r):r}(t.displayName,t.parentComponentId):d,p=t.displayName,h=void 0===p?function(e){return Pe(e)?"styled.".concat(e):"Styled(".concat(function(e){return e.displayName||e.name||"Component"}(e),")")}(e):p,g=t.displayName&&t.componentId?"".concat(Se(t.displayName),"-").concat(t.componentId):t.componentId||f,m=o&&s.attrs?s.attrs.concat(u).filter(Boolean):u,b=t.shouldForwardProp;if(o&&s.shouldForwardProp){var v=s.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 Ft(n,g,o?s.componentStyle:void 0);function w(e,t){return function(e,t,n){var o=e.attrs,s=e.componentStyle,l=e.defaultProps,c=e.foldedComponentIds,u=e.styledComponentId,d=e.target,f=a().useContext(Bt),p=It(),h=e.shouldForwardProp||p.shouldForwardProp,g=ye(t,f,l)||ve,m=function(e,t,n){for(var o,i=r(r({},t),{className:void 0,theme:n}),a=0;a<e.length;a+=1){var s=Ye(o=e[a])?o(i):o;for(var l in s)i[l]="className"===l?Ze(i[l],s[l]):"style"===l?r(r({},i[l]),s[l]):s[l]}return t.className&&(i.className=Ze(i.className,t.className)),i}(o,t,g),b=m.as||d,v={};for(var y in m)void 0===m[y]||"$"===y[0]||"as"===y||"theme"===y&&m.theme===g||("forwardedAs"===y?v.as=m.forwardedAs:h&&!h(y,b)||(v[y]=m[y]));var x=function(e,t){var n=It();return e.generateAndInjectStyles(t,n.styleSheet,n.stylis)}(s,m),w=Ze(c,u);return x&&(w+=" "+x),m.className&&(w+=" "+m.className),v[Pe(b)&&!xe.has(b)?"class":"className"]=w,n&&(v.ref=n),(0,i.createElement)(b,v)}(k,e,t)}w.displayName=h;var k=a().forwardRef(w);return k.attrs=m,k.componentStyle=x,k.displayName=h,k.shouldForwardProp=b,k.foldedComponentIds=o?Ze(s.foldedComponentIds,s.styledComponentId):"",k.styledComponentId=g,k.target=o?s.target:e,Object.defineProperty(k,"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++)et(e,o[r],!0);return e}({},s.defaultProps,e):e}}),tt(k,function(){return".".concat(k.styledComponentId)}),l&&Ke(k,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),k}function Gt(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 qt=function(e){return Object.assign(e,{isCss:!0})};function Kt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(Ye(e)||Je(e))return qt(Rt(Gt(be,o([e],t,!0))));var r=e;return 0===t.length&&1===r.length&&"string"==typeof r[0]?Rt(r):qt(Rt(Gt(r,t)))}function Yt(e,t,n){if(void 0===n&&(n=ve),!t)throw nt(1,t);var i=function(r){for(var i=[],a=1;a<arguments.length;a++)i[a-1]=arguments[a];return e(t,n,Kt.apply(void 0,o([r],i,!1)))};return i.attrs=function(o){return Yt(e,t,r(r({},n),{attrs:Array.prototype.concat(n.attrs,o).filter(Boolean)}))},i.withConfig=function(o){return Yt(e,t,r(r({},n),o))},i}var Xt=function(e){return Yt(Wt,e)},Zt=Xt;xe.forEach(function(e){Zt[e]=Xt(e)});var Qt=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=$t(e),wt.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,r){var o=r(Qe(Rt(this.rules,t,n,r)),""),i=this.componentId+e;n.insertRules(i,i,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,r){e>2&&wt.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function Jt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=Kt.apply(void 0,o([e],t,!1)),s="sc-global-".concat(Le(JSON.stringify(i))),l=new Qt(i,s),c=function(e){var t=It(),n=a().useContext(Bt),r=a().useRef(t.styleSheet.allocateGSInstance(s)).current;return t.styleSheet.server&&u(r,e,t.styleSheet,n,t.stylis),a().useLayoutEffect(function(){if(!t.styleSheet.server)return u(r,e,t.styleSheet,n,t.stylis),function(){return l.removeStyles(r,t.styleSheet)}},[r,e,t.styleSheet,n,t.stylis]),null};function u(e,t,n,o,i){if(l.isStatic)l.renderStyles(e,me,n,i);else{var a=r(r({},t),{theme:ye(t,o,c.defaultProps)});l.renderStyles(e,a,n,i)}}return a().memo(c)}function en(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Qe(Kt.apply(void 0,o([e],t,!1))),i=Le(r);return new Lt(i,r)}(function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var n=ht(),r=Qe([n&&'nonce="'.concat(n,'"'),"".concat(ce,'="true"'),"".concat(de,'="').concat(fe,'"')].filter(Boolean)," ");return"<style ".concat(r,">").concat(t,"</style>")},this.getStyleTags=function(){if(e.sealed)throw nt(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw nt(2);var n=e.instance.toString();if(!n)return[];var o=((t={})[ce]="",t[de]=fe,t.dangerouslySetInnerHTML={__html:n},t),i=ht();return i&&(o.nonce=i),[a().createElement("style",r({},o,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new wt({isServer:!0}),this.sealed=!1}e.prototype.collectStyles=function(e){if(this.sealed)throw nt(2);return a().createElement(Ot,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw nt(3)}})(),"__sc-".concat(ce,"__")},3886:(e,t,n)=>{"use strict";n.d(t,{A:()=>o}),n(9155);var r=n(1085);function o(e){let{size:t=24,fill:n="#333333"}=e;return(0,r.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M12 4.75L4.75 8C4.75 8 4 19.25 12 19.25C20 19.25 19.25 8 19.25 8L12 4.75Z",stroke:n,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M9.75 12.75L11 14.25L14.25 9.75",stroke:n,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}},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),i=n.n(o),a=o.useLayoutEffect,s=function(e,t){"function"!=typeof e?e.current=t:e(t)},l={"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(l).forEach(function(t){e.style.setProperty(t,l[t],"important")})},u=null,d=function(e,t){var n=e.scrollHeight;return"border-box"===t.sizingStyle.boxSizing?n+t.borderSize:n-t.paddingSize},f=function(){},p=["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 g(e,t,n){var r,s,l=(r=n,s=i().useRef(r),a(function(){s.current=r}),s);o.useLayoutEffect(function(){var n=function(e){return l.current(e)};if(e)return e.addEventListener(t,n),function(){return e.removeEventListener(t,n)}},[])}var m=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],b=function(e,t){var n,a=e.cacheMeasurements,l=e.maxRows,b=e.minRows,v=e.onChange,y=void 0===v?f:v,x=e.onHeightChange,w=void 0===x?f:x,k=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,m),S=void 0!==k.value,C=o.useRef(null),_=function(e,t){var n=i().useRef();return i().useCallback(function(r){e.current=r,n.current&&s(n.current,null),n.current=t,t&&s(t,r)},[t])}(C,t),A=o.useRef(0),E=o.useRef(),T=function(){var e=C.current,t=a&&E.current?E.current:function(e){var t=window.getComputedStyle(e);if(null===t)return null;var n,r=(n=t,p.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){E.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,i=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach(function(e){var t=e;u.style[t]=a[t]}),c(u),u.value=t;var l=d(u,e);u.value=t,l=d(u,e),u.value="x";var f=u.scrollHeight-o,p=f*n;"border-box"===s&&(p=p+o+i),l=Math.max(p,l);var h=f*r;return"border-box"===s&&(h=h+o+i),[l=Math.min(h,l),f]}(t,e.value||e.placeholder||"x",b,l),r=n[0],o=n[1];A.current!==r&&(A.current=r,e.style.setProperty("height",r+"px","important"),w(r,{rowHeight:o}))}};return o.useLayoutEffect(T),function(e,t){g(document.body,"reset",function(n){e.current.form===n.target&&t()})}(C,function(){if(!S){var e=C.current.value;requestAnimationFrame(function(){var t=C.current;t&&e!==t.value&&T()})}}),g(window,"resize",T),n=T,g(document.fonts,"loadingdone",n),o.createElement("textarea",r({},k,{onChange:function(e){S||T(),y(e)},ref:_}))},v=o.forwardRef(b)},3950:(e,t,n)=>{"use strict";n.d(t,{A:()=>y}),n(9155);var r=n(824),o=n(3949),i=n(3864),a=n(3058),s=n(4927),l=n(8035),c=n(6052),u=n(2628);const d=i.Ay.div.withConfig({componentId:"sc-4y6b4p-0"})(["position:relative;display:flex;"]),f=(0,i.Ay)(o.A).withConfig({componentId:"sc-4y6b4p-1"})([""," max-height:unset;white-space:unset;text-overflow:unset;padding-right:unset;"," color:var(--panel-background-white-black-contrast-1743170834);min-height:","px;outline-offset:-4px;@media ","{max-height:unset;}"," "," &:focus{color:var(--panel-background-white-black-contrast-1743170834);box-shadow:none;border:1px solid ",";","}&::placeholder{color:",";opacity:0.5;}"],s.hF,e=>{let{theme:t}=e;return(0,a.Mo)(t.panelBackground,.08)},e=>{let{$minHeight:t}=e;return t},l.jO.maxTablet,(0,u.A)()&&(0,i.AH)(["max-height:unset;"]),e=>{let{$hasMaxLength:t}=e;if(t)return"padding-bottom: 24px;"},e=>{let{theme:t}=e;return(0,c.w5)(t.panelBackground,"rgba(255, 255, 255, 0.12)","rgba(0, 0, 0, 0.12)")},a.sF,e=>{let{theme:t}=e;return(0,c.w5)(t.panelBackground,"#FFF","#000")});var p=n(9416),h=n(7318),g=n(587),m=n(8780),b=n(5814),v=n(1085);const y=function(e){var t,n,o;let{autoComplete:i="off",name:a,register:s,validators:l,control:c,id:u,setError:y,clearErrors:x,trigger:w,...k}=e;const S=(0,b.G8)(l),{ref:C,onChange:_,...A}=s?s(a,S):{},{errors:E,isSubmitted:T}=(0,r.lN)({name:a,control:c}),j=(0,g.A)({name:a,trigger:w,control:c,setError:y,clearErrors:x});return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(d,{children:[(0,v.jsx)(f,{autoComplete:i,name:a,minRows:2,$hasMaxLength:!(null===(t=S.maxLength)||void 0===t||!t.value),id:u||a,...(0,b.NR)(S),...A&&{...A},onChange:e=>{null==_||_(e),j(e)},ref:C,"aria-errormessage":`error_${a}`,"aria-invalid":!(0,m.A)(E)&&T,...k}),!(null===(n=S.maxLength)||void 0===n||!n.value)&&c&&a&&(0,v.jsx)(p.A,{position:"bottom",fieldName:a,control:c,maxLength:null===(o=S.maxLength)||void 0===o?void 0:o.value})]}),(0,v.jsx)(h.A,{control:c,name:a})]})}},3999:(e,t,n)=>{"use strict";var r=n(5024),o=n(9989),i=n(480);e.exports=r?function(e,t,n){return o.f(e,t,i(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},i=r.useSyncExternalStore,a=r.useRef,s=r.useEffect,l=r.useMemo,c=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=a(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!s){if(s=!0,i=e,e=r(e),void 0!==u&&f.hasValue){var t=f.value;if(u(t,e))return a=t}return a=e}if(t=a,o(i,e))return t;var n=r(e);return void 0!==u&&u(t,n)?(i=e,t):(i=e,a=n)}var i,a,s=!1,l=void 0===n?null:n;return[function(){return e(t())},null===l?void 0:function(){return e(l())}]},[t,n,r,u]);var p=i(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),c(p),p}},4095:(e,t,n)=>{"use strict";n.d(t,{A:()=>C});var r=n(9155),o=n(541),i=n(6343),a=n(809),s=n(9223),l=n(7182),c=n(3864),u=n(8035);const d=(0,c.AH)(["border-radius:100px;background-color:",";"],u.Tj.grayColor),f=c.Ay.div.withConfig({componentId:"sc-769ymc-0"})(["height:100%;width:100%;display:grid;background-color:#fff;grid-template-rows:55px 1fr 70px;"]),p=c.Ay.div.withConfig({componentId:"sc-769ymc-1"})(["padding:10px 20px;display:grid;align-items:center;grid-template-columns:30px 1fr 40px;box-shadow:0px 3px 4px -1px ",";"],u.Tj.shadowColor),h=c.Ay.div.withConfig({componentId:"sc-769ymc-2"})(["height:20px;width:110px;margin-left:20px;",""],d),g=c.Ay.div.withConfig({componentId:"sc-769ymc-3"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;width:210px;margin:auto;"]),m=c.Ay.span.withConfig({componentId:"sc-769ymc-4"})(["font-size:var(--_kindlychat-font-size-p);margin:16px 0 24px 0;",";"],e=>e.$heading&&"font-size: var(--_kindlychat-font-size-h4); font-weight: 400;\n margin: 0"),b=c.Ay.div.withConfig({componentId:"sc-769ymc-5"})(["height:","px;min-width:","px;",""],e=>e.$size,e=>e.$size,d),v=c.Ay.div.withConfig({componentId:"sc-769ymc-6"})(["display:flex;align-items:center;padding:15px 0;margin:0 20px;border-top:1px solid ",";"],u.Tj.grayColor),y=c.Ay.div.withConfig({componentId:"sc-769ymc-7"})(["height:40px;width:100%;margin-right:20px;",""],d);var x=n(167),w=n(1085);const k=function(){const e=(0,l.jL)(),t=(0,r.useCallback)(()=>{e((0,i.ky)())},[e]);return(0,w.jsxs)(f,{children:[(0,w.jsxs)(p,{children:[(0,w.jsx)(b,{$size:30}),(0,w.jsx)(h,{}),(0,w.jsx)(x.I$,{"aria-label":"Close chat",title:"Close chat",type:"button",onClick:t,"data-testid":"close-chat-button",children:(0,w.jsx)(a.US,{width:25,height:25})})]}),(0,w.jsxs)(g,{children:[(0,w.jsx)(m,{$heading:!0,children:"Oh no..."}),(0,w.jsx)(m,{children:"We were unable to load the chat. Please refresh or try again later."}),(0,w.jsx)(s.A,{onClick:t,children:"Refresh chat"})]}),(0,w.jsxs)(v,{children:[(0,w.jsx)(y,{}),(0,w.jsx)(b,{$size:40})]})]})};class S 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}`,s={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:s,level:"error"}))}render(){const{hasError:e}=this.state,{children:t,displayError:n}=this.props;return e&&n?(0,w.jsx)(k,{}):e?null:t}}const C=(0,o.Ng)()(S)},4119:(e,t,n)=>{"use strict";n(4531)("species")},4142:(e,t,n)=>{"use strict";n.d(t,{S:()=>s});var r=n(7251),o=n(2221),i=n(6343),a=n(4851);const s=(0,r.zD)("feedback/sendToPat",async(e,t)=>{let{getState:n,dispatch:r,rejectWithValue:s}=t;const{connection:{token:l},environment:{PAT_HOST:c}}=n();try{const t=await r((0,i.et)(`${c}/chatbubble/${o.Ak}/feedback`,{method:"POST",body:{feedback:e},...(0,a.A)({token:l})}));if(!t.ok)throw new Error(`Feedback submission failed with status: ${t.status}`);return t.data.data.id}catch(e){return s(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}},4275:(e,t,n)=>{"use strict";var r=n(8141),o=n(1268),i=r("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},4311:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(9155),o=n(541),i=n(1695),a=n(9337),s=n(1328);function l(){const{text:e}=(0,o.d4)(i.Od),{currentLanguageCode:t}=(0,s.A)();return(0,r.useMemo)(()=>(0,a.A)(e,t),[t,e])}},4317:(e,t,n)=>{"use strict";var r=n(6100);e.exports=r({}.isPrototypeOf)},4356:(e,t,n)=>{"use strict";n(9504),n(7424);var r=n(1355);e.exports=r.f("toPrimitive")},4358:(e,t,n)=>{"use strict";var r=n(9989);e.exports=function(e,t,n){return r.f(e,t,n)}},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},4417:(e,t,n)=>{"use strict";var r=n(3773);e.exports=function(e,t){return new(r(e))(0===t?0:t)}},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})},4492:(e,t,n)=>{"use strict";var r=n(5024),o=n(9989),i=n(480);e.exports=function(e,t,n){r?o.f(e,t,i(0,n)):e[t]=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},4531:(e,t,n)=>{"use strict";var r=n(8099),o=n(701),i=n(1355),a=n(9989).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});o(t,e)||a(t,e,{value:i.f(e)})}},4543:(e,t,n)=>{"use strict";var r=n(5024),o=n(4713),i=n(7161),a=n(480),s=n(3273),l=n(5341),c=n(701),u=n(9665),d=Object.getOwnPropertyDescriptor;t.f=r?d:function(e,t){if(e=s(e),t=l(t),u)try{return d(e,t)}catch(e){}if(c(e,t))return a(!o(i.f,e,t),e[t])}},4572:(e,t,n)=>{"use strict";var r=n(9344),o=n(814),i=n(1780),a=r(r.bind);e.exports=function(e,t){return o(e),void 0===t?e:i?a(e,t):function(){return e.apply(t,arguments)}}},4574:(e,t,n)=>{"use strict";var r=n(9903),o=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):i(n,t)}},4603:(e,t,n)=>{"use strict";var r=n(5547),o=n(1203),i=n(8900).String;e.exports=!!Object.getOwnPropertySymbols&&!o(function(){var e=Symbol("symbol detection");return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41})},4660:(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}`}},4665:e=>{e.exports=function(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")},e.exports.__esModule=!0,e.exports.default=e.exports},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)}},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)}},4718:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(9292),o=n(8172);const i=e=>{var t,n;let{level:i="info",error:a,message:s,reduxState:l,extra:c}=e;s||null!=a&&a.message||(console.error("Attempted to log without message"),s="No error message provided");const u=(0,o.A)(l||{},r.W$),d={version:"2.81.0",release:"2.81.0",userAgent:navigator.userAgent,state:l?JSON.stringify(u):void 0,...c},f={message:null!==(t=s)&&void 0!==t?t:null==a?void 0:a.message,name:null==a?void 0:a.name,stack:null==a?void 0:a.stack,code:null==a?void 0:a.code,signal:null==a?void 0:a.signal,filename:null==a?void 0:a.filename};return{message:null!==(n=s)&&void 0!==n?n:null==a?void 0:a.message,level:i,extra:d,error:f}}},4851:(e,t,n)=>{"use strict";function r(e){let{token:t,botKey:n,jwt:r}=e,{withCurrentUrl:o,withVersion:i,extra:a}=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}:{},...i?{"kindly-chat-version":"2.81.0"}:{},...a}}}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:()=>f,A0:()=>p,Bi:()=>c,D7:()=>b,N_:()=>u,hF:()=>m,k5:()=>d});var r=n(3864),o=n(6052),i=n(2628),a=n(7542),s=n(3058),l=n(8035);const c=r.Ay.button.withConfig({componentId:"sc-o7eiww-0"})(["all:unset;cursor:pointer;outline:revert;"]),u=r.Ay.a.withConfig({componentId:"sc-o7eiww-1"})(["text-decoration:underline;cursor:pointer;",""],s.sF),d=(0,r.AH)(["border:0;text-align:center;border-radius:6px;font-weight:normal;background:none;cursor:pointer;text-transform:none;transition:all 0.2s ease;"]),f=r.Ay.button.withConfig({componentId:"sc-o7eiww-2"})([""," ",""],d,s.sF),p=r.Ay.div.withConfig({componentId:"sc-o7eiww-3"})(["position:relative;overflow:",";max-height:83px;min-height:",";height:","px;width:100%;min-width:0;"],e=>{let{$hasFiles:t}=e;return t?"visible":"hidden"},e=>{let{$initialHeight:t}=e;return`${(null!=t?t:0)+1}px`},e=>e.$active?e.$targetHeight:e.$initialHeight),h=(0,r.AH)(["max-height:41px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"]),g=(0,r.AH)(["",";font-size:",";"],e=>!e.$active&&"max-height: 44px;",l.J.input),m=(0,r.AH)(["position:relative;z-index:2;margin-bottom:0;color:",";font-size:var(--_kindlychat-font-size-p);line-height:20px;padding:7px 50px 8px 16px;"," background-image:none;resize:none;box-shadow:none;border-radius:18px;max-height:83px;font-family:",";width:100%;min-height:0;border:1px solid transparent;transition:transform 0.3s ease;",";",";@media ","{","}"," &:focus{color:",";box-shadow:none;border:1px solid ",";","}&:focus-visible{outline:none;}::placeholder{color:",";opacity:0.5;}"],e=>{let{theme:t}=e;return(0,o.w5)(t.background,"#FFFFFF","#000000")},e=>{let{theme:t}=e;return(0,s.Mo)(t.background,.08)},a.m.default,e=>e.$hide&&"transform: translateY(-60px)",e=>!e.$active&&h,l.jO.maxTablet,g,(0,i.A)()&&g,e=>{let{theme:t}=e;return(0,o.w5)(t.background,"#FFFFFF","#000000")},e=>{let{theme:t}=e;return(0,o.w5)(t.background,"rgba(255, 255, 255, 0.12)","rgba(0, 0, 0, 0.12)")},s.sF,e=>{let{theme:t}=e;return(0,o.w5)(t.background,"#FFF","#000")}),b=(0,r.AH)(["position:relative;&:before{content:'';left:0;right:20px;top:-15px;z-index:1;height:20px;position:absolute;background:linear-gradient( 0deg,"," 0%,"," 25%,rgba(248,248,248,0) 100% );opacity:1;transition:opacity linear 300ms;","}"],e=>e.theme.background,e=>e.theme.background,e=>{let{$inspectorOpen:t}=e;return t?"height: 0":""})},4953:e=>{"use strict";e.exports=n},5024:(e,t,n)=>{"use strict";var r=n(1203);e.exports=!r(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},5096:(e,t,n)=>{"use strict";n.d(t,{Z:()=>j});var r=n(5677),o=n.n(r),i=n(748),a=n.n(i),s=n(9932),l=n.n(s),c=n(5791),u=n.n(c),d=n(8803),f=n.n(d),p=n(4665),h=n.n(p),g=n(9155),m=n(5873),b=n(3864),v=n(9292),y=n(4718);const x=/Edge?\/(9[7-9]|\d{3,})\.\d+(\.\d+|)|Firefox\/(9[5-9]|\d{3,})\.\d+(\.\d+|)|Chrom(ium|e)\/(9[7-9]|\d{3,})\.\d+(\.\d+|)|(Maci|X1{2}).+ Version\/(15\.([4-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})\.\d+)([,.]\d+|)( \(\w+\)|)( Mobile\/\w+|) Safari\/|Chrome.+OPR\/(8[2-9]|9\d|\d{3,})\.\d+\.\d+|(CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS|CPU iPad OS)[ +]+(15[._]([4-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})[._]\d+)([._]\d+|)|Android:?[ /-](14[2-9]|1[5-9]\d|[2-9]\d{2}|\d{4,})(\.\d+|)(\.\d+|)|Mobile Safari.+OPR\/([89]\d|\d{3,})\.\d+\.\d+|Android.+Firefox\/(14[4-9]|1[5-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+Chrom(ium|e)\/(14[2-9]|1[5-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+(UC? ?Browser|UCWEB|U3)[ /]?(15\.([5-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})\.\d+)\.\d+|SamsungBrowser\/(1[6-9]|[2-9]\d|\d{3,})\.\d+/;var w=n(9514);const k=(0,b.DU)([":host{all:initial;}",""],e=>e.styles);var S=n(1085);const C=(0,g.lazy)(()=>Promise.resolve().then(n.bind(n,1619)));let _;const A=(0,g.forwardRef)((e,t)=>{let{botKey:n,options:r,setKindlyChatRef:o}=e;const[i,a]=(0,g.useState)(r);function s(e,t){i[e]!==t&&(void 0===_||_===e?(0,w.flushSync)(()=>{a(n=>({...n,[e]:t}))}):a(n=>({...n,[e]:t})),_=e)}return(0,g.useImperativeHandle)(t,()=>({setOption:s,state:i})),(0,S.jsxs)(g.Suspense,{fallback:"",children:[(0,S.jsx)(C,{setKindlyChatRef:o,botKey:n,options:i}),(0,S.jsx)(k,{styles:r.styles})]})});A.displayName="KindlyChatAPI";const E=A;var T;const j={},I="tab-visibility",O="bubble-visibility";var L=new WeakMap,P=new WeakMap,M=new WeakMap,N=new WeakSet,z=new WeakMap,R=new WeakMap;class ${constructor(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(o()(this,N),l()(this,"WINDOW_NAME","kindlyChat"),l()(this,"API_NODE_ID","kindly-chat-api"),l()(this,"SCRIPT_NODE_ID","kindly-chat"),l()(this,"VERSION","2.81.0"),l()(this,"APIRoot",null),a()(this,L,null),l()(this,"kindlyChat",null),l()(this,"botKey",void 0),l()(this,"options",{}),l()(this,"error",null),a()(this,P,null),a()(this,M,null),l()(this,"shadowRoot",null),l()(this,"showBubble",function(){var t;let{syncAcrossTabs:n=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var r;null===(t=u()(L,e))||void 0===t||t.setOption("bubbleHidden",!1),e.options.bubbleHidden=!1,n&&(null===(r=u()(M,e))||void 0===r||r.postMessage({type:O,payload:{visible:!0}}))}),l()(this,"hideBubble",function(){var t;let{syncAcrossTabs:n=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var r;null===(t=u()(L,e))||void 0===t||t.setOption("bubbleHidden",!0),e.options.bubbleHidden=!0,n&&(null===(r=u()(M,e))||void 0===r||r.postMessage({type:O,payload:{visible:!1}}))}),l()(this,"openChat",()=>{this.kindlyChat.openChat()}),l()(this,"closeChat",()=>{this.kindlyChat.closeChat()}),l()(this,"restartChat",e=>{this.kindlyChat.restartChat(e)}),l()(this,"getState",e=>u()(L,this).state[e]),l()(this,"setRootRef",e=>{f()(L,this,e)}),l()(this,"setNewContext",e=>{this.kindlyChat.setNewContext(e)}),l()(this,"getContext",async()=>this.kindlyChat.getContext()),l()(this,"setNewBannerMessage",async(e,t)=>this.kindlyChat.setNewBannerMessage(e,t)),l()(this,"setNewLabel",e=>{this.kindlyChat.setNewLabel(e)}),l()(this,"setKindlyChatRef",e=>{this.kindlyChat=e}),l()(this,"triggerDialogue",(e,t)=>{this.kindlyChat.triggerDialogue(e,t)}),l()(this,"sendMessage",(e,t)=>{this.kindlyChat.sendMessage(e,t)}),l()(this,"showNudge",e=>{let{nudgeLayout:t,slug:n,trackEvent:r=!0}=e;this.kindlyChat.showNudge({nudgeLayout:t,slug:n,trackEvent:r})}),l()(this,"showCustomNudge",e=>{let{content:t,slug:n,onRendered:r,trackEvent:o=!0}=e;this.kindlyChat.showCustomNudge({content:t,slug:n,onRendered:r,trackEvent:o})}),l()(this,"getNudges",()=>this.kindlyChat.getNudges()),l()(this,"closeNudge",function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];e.kindlyChat.closeNudge(t,n,r)}),l()(this,"nudgeCompletion",e=>{let{slug:t}=e;this.kindlyChat.nudgeCompletion(t)}),l()(this,"triggerCtaEvent",function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;e.kindlyChat.triggerCtaEvent(t)}),l()(this,"identifyUser",e=>{this.kindlyChat.identifyUser(e)}),l()(this,"cancelHandover",()=>{this.kindlyChat.cancelHandover()}),l()(this,"authenticate",e=>{e?this.kindlyChat.setGetAuthToken(e):console.error("Kindly Chat: No getAuthToken function provided. Kindly Chat will not be authenticated.")}),l()(this,"deauthenticate",()=>{this.kindlyChat.setGetAuthToken()}),a()(this,z,()=>{if(u()(P,this)&&u()(P,this).unmount(),f()(P,this,null),this.shadowRoot){const e=this.shadowRoot.querySelector("style");e&&this.shadowRoot.removeChild(e)}}),a()(this,R,(e,t)=>{if(!this.shadowRoot){const t=window.document.createElement("div"),n=e.appendChild(t);this.shadowRoot=n.attachShadow({mode:"open"})}u()(P,this)||f()(P,this,(0,m.createRoot)(this.shadowRoot)),u()(P,this).render((0,S.jsx)(b.ID,{target:this.shadowRoot,children:(0,S.jsx)(E,{ref:this.setRootRef,setKindlyChatRef:this.setKindlyChatRef,botKey:t,options:this.options})}))}),l()(this,"render",()=>{this.error||(this.APIRoot?this.botKey?this.options.shadowDom&&HTMLElement.prototype.attachShadow?u()(R,this).call(this,this.APIRoot,this.botKey):(u()(P,this)||f()(P,this,(0,m.createRoot)(this.APIRoot)),u()(P,this).render((0,S.jsx)(E,{ref:this.setRootRef,setKindlyChatRef:this.setKindlyChatRef,botKey:this.botKey,options:this.options}))):console.error("Cannot call render() without a bot key."):console.error("Cannot call render() on uninitialized Kindly Chat."))}),window.addEventListener("error",e=>{var t,n;if(null!==(t=e.filename)&&void 0!==t&&t.startsWith("http://localhost:8081")&&(null===(n=e.message)||void 0===n||!n.startsWith("Script error."))){const t=new XMLHttpRequest;t.open("POST",`https://bot.kindly.ai/chatbubble/${v.Ak}/log`),t.setRequestHeader("content-type","application/json"),t.send(JSON.stringify((0,y.A)({level:"error",error:e.error,extra:{fromEventListener:!0,filename:e.filename,lineno:e.lineno,colno:e.colno,eventmessage:e.message}}),(e,t)=>void 0===t?null:t))}}),h()(N,this,D).call(this,t,n)){if(!function(){const e={ResizeObserver:"undefined"!=typeof ResizeObserver,HTMLDialogElement:"undefined"!=typeof HTMLDialogElement,BroadcastChannel:"undefined"!=typeof BroadcastChannel};return Object.values(e).every(Boolean)}()){const e="Browser does not support features required for Kindly Chat to work.";return console.warn(e),void(this.error=new Error(e))}h()(N,this,B).call(this,this.options.target),h()(N,this,F).call(this)}}get isBrowserCompatible(){const{userAgent:e}=window.navigator;return x.test(e)}get open(){return this.kindlyChat.getActivityStatus()}}function D(e,t){const{botKey:n,...r}=h()(N,this,H).call(this);if(this.botKey=e||window.kindlyBotKey||n||void 0,!this.botKey){const e='Could not initialize Kindly Chat without bot key. Tried window.kindlyBotKey, data attribute "data-bot-key" and property "botKey".';return console.error(e),!1}return this.options={...T.defaultOptions,...window.kindlyOptions,...r,...t},!0}function F(){this.botKey&&(f()(M,this,new BroadcastChannel(`kindly-chat-${this.botKey}`)),u()(M,this).onmessage=e=>{switch(e.data.type){case I:e.data.payload.visible&&u()(z,this).call(this);break;case O:e.data.payload.visible?this.showBubble():this.hideBubble()}},document.addEventListener("visibilitychange",()=>{var e,t;document.hidden?null===(e=u()(M,this))||void 0===e||e.postMessage({type:I,payload:{visible:!1}}):(null===(t=u()(M,this))||void 0===t||t.postMessage({type:I,payload:{visible:!0}}),u()(P,this)||(this.options.isFromMultitab=!0,this.render()))}))}function B(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(window[this.WINDOW_NAME]){const e="Kindly Chat does not support multiple instances on the same page";return console.warn(e),void(this.error=new Error(e))}if(window[this.WINDOW_NAME]=this,!document.getElementById(this.API_NODE_ID)){let t;if(this.APIRoot=document.createElement("div"),this.APIRoot.id=this.API_NODE_ID,e){const n=document.getElementById(e),r=e&&n&&"function"==typeof(null==n?void 0:n.appendChild);t=r?n:document.body,e&&!r&&console.warn(`Render target element with id="${e}" not found in DOM, falling back to document.body`)}else t=document.body;t.appendChild(this.APIRoot)}}function H(){const e=document.getElementById(this.SCRIPT_NODE_ID);if(!e)return console.warn(`Could not find element with id="${this.SCRIPT_NODE_ID}" in DOM, not loading data attributes.`),{};const t={...null==e?void 0:e.dataset};["bubbleHidden","shadowDom"].forEach(n=>{const r=`data-${n.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}`;e.hasAttribute(r)&&(t[n]=!0)});const n=e.getAttribute("nonce");return n&&(t.nonce=n),t}T=$,l()($,"defaultOptions",{bubbleHidden:!1,shadowDom:!1,styles:"",target:null,renderedBy:"API",isFromMultitab:!1})},5116:(e,t,n)=>{"use strict";var r=n(8600),o=n(9683).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},5148:(e,t,n)=>{"use strict";var r=n(6100);e.exports=r([].slice)},5161:(e,t,n)=>{"use strict";var r=n(4317),o=n(8341),i=n(1019),a=Array.prototype,s=String.prototype;e.exports=function(e){var t=e.includes;return e===a||r(a,e)&&t===a.includes?o:"string"==typeof e||e===s||r(s,e)&&t===s.includes?i: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})},5216:(e,t,n)=>{"use strict";e.exports=n(6586)},5241:e=>{"use strict";e.exports={}},5262:(e,t,n)=>{"use strict";var r=n(6735);e.exports=r},5279:(e,t,n)=>{"use strict";var r=n(4356);e.exports=r},5297:(e,t,n)=>{"use strict";n(6925);var r=n(8099).Object,o=e.exports=function(e,t,n){return r.defineProperty(e,t,n)};r.defineProperty.sham&&(o.sham=!0)},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:()=>i});var r=n(4660),o=n(7051);const i=(e,t,n,i)=>{const a=[o.A,e=>((e,t,n,o)=>{let{attachment_ids:i=[],...a}=e;return{...a,attachments:(i||[]).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,i)];return a.reduce((e,t)=>t(e),e||{})}},5381:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=()=>{}},5396:(e,t,n)=>{"use strict";for(var r=n(8141),o=n(1003),i=n(6100),a=n(6281),s=n(8655),l=o("Symbol"),c=l.isWellKnownSymbol,u=o("Object","getOwnPropertyNames"),d=i(l.prototype.valueOf),f=r("wks"),p=0,h=u(l),g=h.length;p<g;p++)try{var m=h[p];a(l[m])&&s(m)}catch(e){}e.exports=function(e){if(c&&c(e))return!0;try{for(var t=d(e),n=0,r=u(f),o=r.length;n<o;n++)if(f[r[n]]==t)return!0}catch(e){}return!1}},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}},5518:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>y});var r=n(9155),o=n.n(r);const i=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),a=(e,t)=>r.Children.toArray(e).map((e,n,o)=>(0,r.isValidElement)(e)&&i(e)?t((0,r.cloneElement)(e,{...e.props,children:a(e.props.children,t)})):t(e,n,o)),s=a;var l=n(824),c=n(3864),u=n(1085);function d(e){let{width:t=24,height:n=24,color:r="#333"}=e;return(0,u.jsx)("svg",{width:t,height:n,viewBox:"0 0 24 24",fill:"none",children:(0,u.jsx)("path",{d:"m10.75 8.75 3.5 3.25-3.5 3.25",stroke:r,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})}var f=n(9223),p=n(8035),h=n(1435),g=n(3435),m=n(881),b=n(5814);const v=(e,t)=>o().cloneElement(e,t),y=function(e){let{defaultValues:t,children:n,onSubmit:i,shouldUnregister:a,clearOnSubmit:y=!1,className:x,sendButtonTitle:w="Submit",cancelButtonTitle:k="Cancel",ariaLabel:S,onCancel:C}=e;const{register:_,handleSubmit:A,getValues:E,reset:T,control:j,setError:I,trigger:O,clearErrors:L,setValue:P,formState:{isSubmitting:M,isSubmitted:N}}=(0,l.mN)({...t&&{defaultValues:t},...a&&{shouldUnregister:!0},mode:"onSubmit",reValidateMode:"onChange"}),{buttonText:z}=(0,r.useContext)(c.Dx)||{buttonText:p.Tj.white},R=async e=>{if(void 0!==Object.values(e).find(e=>!!e))try{await i(e,I),y&&T()}catch(e){throw T(),e}};return(0,u.jsxs)(m.lV,{onSubmit:A(R),"aria-label":S,$isSubmitted:N,className:x,onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),e.metaKey||e.ctrlKey?A(R)():e.target.click())},noValidate:!0,children:[s(n,e=>e?o().isValidElement(e)?(e=>{var t,n,r,o,i,a;return e?null!=e&&null!==(t=e.props)&&void 0!==t&&t.name?e.props.hasController?(0,u.jsx)(l.xI,{control:j,render:t=>v(e,{...e.props,...t}),rules:(0,b.G8)(e.props.validators),...e.props},e.key):v(e,{register:_,setError:I,clearErrors:L,trigger:O,control:j,...e.type&&"string"!=typeof e.type&&e.type.name===h.ZH.name&&{setValue:P}}):(null!=e&&e.type&&"string"!=typeof e.type?e.type.name:null)===g.A.name?v(e,{placeholder:null===(n=e.props)||void 0===n||null===(r=n.children)||void 0===r||null===(o=r[0])||void 0===o||null===(i=o.props)||void 0===i?void 0:i.placeholder_text,...!(null!==(a=e.props)&&void 0!==a&&a.htmlFor)&&{htmlFor:e.props.slug}}):e:null})(e):e:null),(0,u.jsxs)(m.dg,{children:[(0,u.jsx)(f.A,{disabled:M,onClick:()=>{const e=E();C&&C(e)},text:k,isSecondaryButton:!0}),(0,u.jsx)(f.A,{type:"submit",icon:(0,u.jsx)(d,{color:z,width:16,height:16}),loading:M,text:w,"data-testid":"form-submit-button"})]})]})}},5522:(e,t,n)=>{"use strict";n(9098)({target:"Symbol",stat:!0},{isRegisteredSymbol:n(3678)})},5545:(e,t,n)=>{"use strict";n.d(t,{A:()=>l}),n(9155);var r=n(3864),o=n(2475);const i=r.Ay.div.withConfig({componentId:"sc-1a2z22o-0"})(["display:flex;align-items:center;justify-content:center;border-radius:100px;transition:all cubic-bezier(0.61,0.1,0.42,0.9) 150ms;min-height:18px;background-color:transparent;",""],e=>{let{$minHeight:t}=e;return t&&`min-height: ${t}px;`}),a=r.Ay.span.withConfig({componentId:"sc-1a2z22o-1"})(["width:6px;height:6px;opacity:0;border-radius:50%;background:",";background-color:",";&:nth-of-type(1){animation:1s "," infinite 0.3s;}&:nth-of-type(2){margin:0 5px;animation:1s "," infinite 0.6s;}&:nth-of-type(3){animation:1s "," infinite 0.9s;}"],e=>e.theme.buttonText,e=>e.theme.buttonText,o.Zm,o.Zm,o.Zm);var s=n(1085);function l(e){let{loading:t=!1,isCheckbox:n=!1,flat:r,minHeight:o}=e;return(0,s.jsxs)(i,{$minHeight:o,$flat:r,$isCheckbox:n,$loading:t,children:[(0,s.jsx)(a,{}),(0,s.jsx)(a,{}),(0,s.jsx)(a,{})]})}},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:a.default,slicer:i.default,serialize:JSON.stringify,deserialize:JSON.parse},t),o=n.key,s=n.merge,l=n.slicer,c=n.serialize,u=n.deserialize;return function(t){return function(n,r,i){"function"==typeof r&&void 0===i&&(i=r,r=void 0);var a=void 0,d=void 0;try{a=u(localStorage.getItem(o)),d=s(r,a)}catch(e){console.warn("Failed to retrieve initialize state from localStorage:",e)}var f=t(n,d,i),p=l(e);return f.subscribe(function(){var e=f.getState(),t=p(e);try{localStorage.setItem(o,c(t))}catch(e){console.warn("Unable to persist state to localStorage:",e)}}),f}}};var i=o(n(8639)),a=o(n(7487));e.exports=t.default},5547:(e,t,n)=>{"use strict";var r,o,i=n(8900),a=n(3531),s=i.process,l=i.Deno,c=s&&s.versions||l&&l.version,u=c&&c.v8;u&&(o=(r=u.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=+r[1]),e.exports=o},5571:(e,t,n)=>{"use strict";var r=n(6100),o=n(9903),i=n(1139),a=n(5426),s=r("".charAt),l=r("".charCodeAt),c=r("".slice),u=function(e){return function(t,n){var r,u,d=i(a(t)),f=o(n),p=d.length;return f<0||f>=p?e?"":void 0:(r=l(d,f))<55296||r>56319||f+1===p||(u=l(d,f+1))<56320||u>57343?e?s(d,f):r:e?c(d,f,f+2):u-56320+(r-55296<<10)+65536}};e.exports={codeAt:u(!1),charAt:u(!0)}},5629:(e,t,n)=>{"use strict";n.d(t,{Bd:()=>O,Bu:()=>S,Zn:()=>E,aP:()=>w,j3:()=>L,pA:()=>M,qJ:()=>N,tM:()=>k,y2:()=>C,zh:()=>T});var r=n(786),o=n(9272),i=n(2221),a=n(4851),s=n(7958),l=n(3699),c=n(2552),u=n(5173),d=n(4490),f=n(1112),p=n(892),h=n(7325),g=n(3049),m=n(628),b=n(8681),v=n(7437),y=n(8679);const x=e=>{const{PAT_HOST:t}=e().environment,{local:n,chatbubble:{botKey:r},connection:{token:o},messages:{forms:i}}=e();return{token:o,PAT_HOST:t,botKey:r,local:n,forms:i}},w=(e,t,n)=>(r,o)=>{const{botKey:i}=x(o);r((0,m.zX)(i,!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:s}=x(r),l=await n((0,p.z5)()),{headers:c}=(0,a.A)({token:s},{withCurrentUrl:!0,extra:l}),d={message:e,temporaryId:t},f=await n((0,m.et)(`${o}/chatbubble/${i.Ak}/message/`,{method:"POST",body:d,headers:c},{onError:e=>{var r;n({type:y.pz,temporaryId:t,status:null==e||null===(r=e.response)||void 0===r?void 0:r.status})}}));(0,u.A)(f)||(n({type:y.pz,...f.data}),n((0,v.uK)()))},S=e=>t=>{t({type:y.QA,formData:e})},C=function(e,t,n){let{responsePromise:s,tempId:l}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},c=arguments.length>4?arguments[4]:void 0,d=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return async(f,b)=>{const{PAT_HOST:w}=x(b);let{token:k,local:C,forms:_}=x(b);if(!k){if(!await f((0,g.mg)({shouldGreet:!1})))return;const{shouldOpenChat:e}=d;e&&(f((0,h.mN)()),f((0,h.lQ)({source:"programmatic"}))),({token:k,local:C,forms:_}=x(b))}const A=await f((0,p.z5)()),{headers:E}=(0,a.A)({token:k},{withCurrentUrl:!0,extra:A});_&&Object.values(_).forEach(e=>{if((null==e?void 0:e.formSubmitState)===o.KN.ACTIVE){const t={submission_id:e.formSubmissionId,context:e.formValue,state:o.KN.UNANSWERED};f((0,m.et)(`${w}/chatbubble/${i.Ak}/form/submit`,{method:"POST",body:t,headers:E})),f(S({...e,formSubmitState:o.KN.UNANSWERED}))}});const T=l||`tempId-${(0,r.A)()}`;f({type:y.tq,data:{id:T,created:(new Date).toISOString(),message:e,buttonType:c}}),f((0,m.TP)((new Date).toISOString()));const j={message:e,exchange_id:t,temporaryId:T,new_context:{...C.context,...n||{}}},I=s?await s:await f((0,m.et)(`${w}/chatbubble/${i.Ak}/message/`,{method:"POST",body:j,headers:E},{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:y.pz,temporaryId:T,status:null==e||null===(n=e.response)||void 0===n?void 0:n.status}),f({type:y.wk})}}));(0,u.A)(I)||(f({type:y.pz,...I.data}),f((0,v.uK)()))}},_=e=>({...e,temporaryId:`tempId-${(0,r.A)()}`}),A=e=>{let{temporaryId:t}=e;return t},E=()=>async(e,t)=>{var n;const{bot:{id:o},chatbubble:{chatId:s,attachments:f},connection:{token:h},environment:{PAT_HOST:g}}=t(),b=await e((0,p.z5)()),{headers:v}=(0,a.A)({token:h},{extra:b}),x=`tempId-${(0,r.A)()}`,w=f.files.map(_).map((0,c.A)("file"));e({type:y.Os,data:{attachments:w}}),e({type:y.Q4}),e({type:y.tq,data:{id:x,created:(new Date).toISOString(),attachment_ids:w.map(A),message:""}}),e((0,m.TP)((new Date).toISOString()));const k=(t,n)=>{var r;e({type:y.pz,temporaryId:x,status:null==t||null===(r=t.response)||void 0===r?void 0:r.status}),n?e({type:y.wP,attachment:{...n,status:i.Le.ERROR}}):w.forEach(t=>e({type:y.wP,attachment:{...t,status:i.Le.ERROR}}))},S=w.map((0,c.A)("file","url")),C=`${g}/chatbubble/${i.Ak}/attachment/create`,E={attachments:S,temporaryChatMessageId:x},T=await e((0,m.et)(C,{method:"POST",body:E,headers:v},{onError:e=>k(e)}));if((0,u.A)(T)||!Array.isArray(null==T||null===(n=T.data)||void 0===n?void 0:n.attachments))return;const[j,I]=T.data.attachments.reduce((t,n)=>{let[r,o]=t,{id:i,temporary_id:a,upload_url:s}=n;return e({type:y.wP,attachment:{temporaryId:a,id:i}}),[[...r,i],[...o,s]]},[[],[]]),O={"x-goog-upload-bot-id":o,"x-goog-upload-chat-id":s},L=(0,d.A)(f.files,I).map(async t=>{let[{file:n,...r},o]=t;const i=await(0,l.Bu)(n),a={...O,"Content-Type":n.type};return await e((0,m.et)(o,{method:"PUT",body:i,headers:a},{onError:e=>k(e,r)}))}),P=await Promise.all(L);if(P.some(e=>void 0===e))return;if(P.some(u.A))return;const M=`${g}/chatbubble/${i.Ak}/attachment/uploads-complete`,N={attachmentIds:j,temporaryChatMessageId:x,exchangeId:f.exchangeId};e((0,m.TP)((new Date).toISOString())),await e((0,m.et)(M,{method:"POST",body:N,headers:v},{onError:e=>k(e)}))},T=function(e){let{openChat:t,languageCode:n,tempId:o,responsePromise:s}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return async(l,c)=>{const{connection:{token:d},chatbubble:{currentLanguage:f},local:{context:p}}=c(),{PAT_HOST:b}=c().environment;if(!d){const r={triggerDialogueSlug:e,languageCode:n,openChat:t};return l((0,g.XO)(r)),l((0,h.mN)()),void(t&&l((0,h.lQ)({source:"programmatic"})))}if(n&&n!==f){const e="Tried to trigger a dialogue in another language on an existing chat";l((0,m.Rm)({message:e,level:"error",extra:{languageCode:n,currentLanguage:f}}))}const x=o||(0,r.A)();l({type:y.IM,data:{id:x,created:(new Date).toISOString(),exchangeId:e}}),l((0,m.TP)((new Date).toISOString()));const w={exchange_id:e,temporaryId:x,new_context:{...p}},{headers:k}=(0,a.A)({token:d},{withCurrentUrl:!0}),S=s?await s:await l((0,m.et)(`${b}/chatbubble/${i.Ak}/trigger/`,{method:"POST",body:w,headers:k}));S&&!(0,u.A)(S)&&(t&&l((0,h.lQ)({source:"programmatic"})),l((0,v.uK)()))}},j=(e,t)=>n=>{n({type:y.Y6,buttonClick:{chatMessageId:e.id,buttonId:t.id,time:(new Date).toISOString()}})},I=(e,t,n)=>async(r,o)=>{const{connection:{token:s},environment:{PAT_HOST:l,VERSION:c}}=o(),u=await r((0,p.z5)()),{headers:d}=(0,a.A)({token:s},{withCurrentUrl:!0,extra:u}),f={method:"POST",body:{button:t,chatMessage:e,temporaryId:n,version:c},headers:d};return r((0,v.uK)()),r((0,m.et)(`${l}/chatbubble/${i.Ak}/button/click/`,f))},O=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return async(a,s)=>{const{local:l}=s(),c=(0,b.A)(e.button_type),u=`tempId-${(0,r.A)()}`,d={};o.length>0&&o.forEach(e=>{var r,o,s;e.button_type===i.lP.SLIDER.toLowerCase()&&null!==(r=e.slider_details)&&void 0!==r&&r.value?(d[null===(o=e.label)||void 0===o?void 0:o.toLowerCase()]=null===(s=e.slider_details)||void 0===s?void 0:s.value,a(j(t,e))):e.button_type===i.lP.CHECKBOX.toLowerCase()&&n.find(t=>t.id===e.id)?(d[e.value]=e.value,a(j(t,e)),a(I(t,e,u))):d[e.value]=""});const p=a(I(t,{...e,new_context:{...l.context,...d||{}}},u));switch(a({type:y.Y6,buttonClick:{chatMessageId:t.id,buttonId:e.id||e._id,time:(new Date).toISOString()}}),c){case i.lP.QUICK_REPLY:{const n={responsePromise:p,tempId:u};a(C(e.value,t.exchange_id,e.new_context,n,e.button_type));break}case i.lP.HANDOVER_REQUEST:a((0,f.Du)(p));break;case i.lP.DIALOGUE_TRIGGER:a(T(e.value,{tempId:u,responsePromise:p}));break;case i.lP.PRIVACY_EXPORT:a((0,h.VK)({responsePromise:p}));break;case i.lP.PRIVACY_DELETE:a((0,h._e)({responsePromise:p}));break;case i.lP.CONTACT_DETAILS:a((0,h.V$)(e));break;case i.lP.UPLOAD_ATTACHMENT:a((0,h.jz)(e))}}},L=(e,t)=>async(n,o)=>{const{connection:{token:s},environment:{PAT_HOST:l,VERSION:c}}=o(),d=`tempId-${(0,r.A)()}`,f=e.contact_details.contact_type,h={...e,button_type:i.lP.edit_contact_details};n({type:y.tq,data:{id:d,created:(new Date).toISOString(),message:t,buttons:[h],isContactDetails:!0}});const g=await n((0,p.z5)()),{headers:b}=(0,a.A)({token:s},{withCurrentUrl:!0,extra:g}),v={contactType:f,value:t,version:c,buttons:[h],temporaryId:d},x=await n((0,m.et)(`${l}/chatbubble/${i.Ak}/button/contact-details/`,{method:"POST",body:v,headers:b}));(0,u.A)(x)||n({type:y.pz,...x.data})},P=(0,s.A)(async(e,t,n)=>{let{id:r,index:o}=e;const{connection:{token:s},environment:{PAT_HOST:l,VERSION:c}}=n(),u=await t((0,p.z5)()),{headers:d}=(0,a.A)({token:s},{withCurrentUrl:!0,extra:u}),f={chatMessageId:r,version:c};t({type:y.kU,id:r,index:o}),t((0,m.et)(`${l}/chatbubble/${i.Ak}/message-seen`,{method:"PATCH",body:f,headers:d}))},1500,(e,t)=>{const[{index:n}]=e,[{index:r}]=t;return n>r?e:t}),M=(e,t)=>(n,r)=>P({id:e,index:t},n,r),N=e=>{let{url:t,messageId:n}=e;return async(e,r)=>{const{botKey:o}=r().chatbubble,{PAT_HOST:s}=r().environment,{token:l}=r().connection,c=await e((0,p.z5)());e((0,m.et)(`${s}/chatbubble/${i.Ak}/message/reference-click/${n}`,{method:"POST",body:{url:t},...(0,a.A)({botKey:o,token:l},{withCurrentUrl:!0,extra:c})}))}}},5657:e=>{"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},5664:(e,t,n)=>{"use strict";n(4531)("dispose")},5677:(e,t,n)=>{var r=n(7354);e.exports=function(e,t){r(e,t),t.add(e)},e.exports.__esModule=!0,e.exports.default=e.exports},5687:(e,t,n)=>{"use strict";n(5664)},5767:(e,t,n)=>{"use strict";n.d(t,{ot:()=>_,Dz:()=>A,n_:()=>w,Ay:()=>T,WG:()=>y,CJ:()=>b,ZG:()=>E,GY:()=>S,wm:()=>x,zp:()=>C,m9:()=>k});var r=n(9749),o=n.n(r);var i=e=>Array.isArray(e)?e:[e];Symbol(),Object.getPrototypeOf({});var a="undefined"!=typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function s(){return{s:0,v:void 0,o:null,p:null}}function l(e,t={}){let n={s:0,v:void 0,o:null,p:null};const{resultEqualityCheck:r}=t;let o,i=0;function l(){let t=n;const{length:l}=arguments;for(let e=0,n=l;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=s(),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=s(),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),i++,r){const e=o?.deref?.()??o;null!=e&&r(e,u)&&(u=e,0!==i&&i--),o="object"==typeof u&&null!==u||"function"==typeof u?new a(u):u}return c.s=1,c.v=u,u}return l.clearCache=()=>{n={s:0,v:void 0,o:null,p:null},l.resetResultsCount()},l.resultsCount=()=>i,l.resetResultsCount=()=>{i=0},l}function c(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r=0,o=0,a={},s=e.pop();"object"==typeof s&&(a=s,s=e.pop()),function(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);const c={...n,...a},{memoize:u,memoizeOptions:d=[],argsMemoize:f=l,argsMemoizeOptions:p=[],devModeChecks:h={}}=c,g=i(d),m=i(p),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++,s.apply(null,arguments)},...g),y=f(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},...m);return Object.assign(y,{resultFunc:s,memoizedResultFunc:v,dependencies:b,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:u,argsMemoize:f})};return Object.assign(r,{withTypes:()=>r}),r}var u=c(l),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}),f=n(7251),p=n(3313),h=n(9977),g=n(4142);const m={feedbacksAlreadyDisplayed:[],feedbackToSubmit:null},b=u([e=>e.feedback.feedbacksAlreadyDisplayed,e=>e.feedback.feedbackToSubmit],(e,t)=>({feedbacksAlreadyDisplayed:e,feedbackToSubmit:t})),v=(0,f.Z0)({name:"feedback",initialState:m,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,timeout:t.payload.timeout,feedback_trigger_by:"default",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,e.feedbackToSubmit.buttons_chosen=[])},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)},setFeedbackTriggerBy:(e,t)=>{e.feedbackToSubmit&&(e.feedbackToSubmit.feedback_trigger_by=t.payload)},clearFeedbackToSubmit:e=>{e.feedbackToSubmit=null},clearFeedbacksAlreadyDisplayed:e=>{e.feedbacksAlreadyDisplayed=[]}},extraReducers:e=>{e.addCase(g.S.fulfilled,(e,t)=>{e.feedbackToSubmit&&(e.feedbackToSubmit.id=t.payload)}),e.addCase(g.S.rejected,e=>{e.feedbackToSubmit=null}),e.addMatcher(e=>{var t;return o()(t=[p.CB,h.ny]).call(t,e.type)},()=>m)}}),{initializeFeedback:y,setRating:x,clearRating:w,toggleCommentButton:k,setFreeformText:S,setStep:C,clearFeedbackToSubmit:_,clearFeedbacksAlreadyDisplayed:A,setFeedbackTriggerBy:E}=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)}},5780:(e,t,n)=>{"use strict";var r,o=n(7235),i=n(7389),a=n(9683),s=n(5241),l=n(3489),c=n(9619),u=n(4275),d="prototype",f="script",p=u("IE_PROTO"),h=function(){},g=function(e){return"<"+f+">"+e+"</"+f+">"},m=function(e){e.write(g("")),e.close();var t=e.parentWindow.Object;return e=null,t},b=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;b="undefined"!=typeof document?document.domain&&r?m(r):(t=c("iframe"),n="java"+f+":",t.style.display="none",l.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(g("document.F=Object")),e.close(),e.F):m(r);for(var o=a.length;o--;)delete b[d][a[o]];return b()};s[p]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(h[d]=o(e),n=new h,h[d]=null,n[p]=e):n=b(),void 0===t?n:i.f(n,t)}},5781:(e,t,n)=>{"use strict";n.d(t,{A:()=>o}),n(9155);var r=n(1085);function o(e){let{...t}=e;return(0,r.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:(0,r.jsx)("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"})})}},5785:(e,t,n)=>{"use strict";var r=n(9098),o=n(4603),i=n(1203),a=n(7313),s=n(2137);r({target:"Object",stat:!0,forced:!o||i(function(){a.f(1)})},{getOwnPropertySymbols:function(e){var t=a.f;return t?t(s(e)):[]}})},5791:(e,t,n)=>{var r=n(4665);e.exports=function(e,t){return e.get(r(e,t))},e.exports.__esModule=!0,e.exports.default=e.exports},5799:(e,t,n)=>{"use strict";n(4531)("iterator")},5813:(e,t,n)=>{"use strict";var r=n(1810);e.exports=r},5814:(e,t,n)=>{"use strict";n.d(t,{Bq:()=>u,G8:()=>l,NR:()=>c});var r=n(9749),o=n.n(r),i=n(7575),a=n(9272);const s={maximum:"max",minimum:"min"},l=e=>{const t={},n=e.map(e=>Object.entries(e).reduce((e,t)=>{let[n,r]=t;return e[s[n]||n]=r,e},{}));for(let e=0;e<n.length;e+=1){var r;const s=Object.keys(n[e]),l=null===(r=n[e].texts)||void 0===r?void 0:r.text;s.forEach(r=>{var s;o()(s=Object.values(a.ZF)).call(s,r)&&(t[(0,i.A)(r)]={value:n[e][r],...l&&{message:l}})})}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}},5851:()=>{},5873:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(6974)},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}},5994:(e,t,n)=>{"use strict";var r=n(3407);n(5522),n(7524),n(8448),n(8013),n(9437),n(2991),n(3860),n(6251),n(2100),n(2996),e.exports=r},6052:(e,t,n)=>{"use strict";function r(e,t,n){return o(e)?n:t}function o(e){let t=e;s(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)),l(e)&&(t=i(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 i(e){return e.replace(a,(e,t,n,r)=>`#${t}${t}${n}${n}${r}${r}`)}n.d(t,{J7:()=>c,SW:()=>o,w5:()=>r});const a=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,s=e=>e.match(/^rgb/),l=e=>e.match(a);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(s(e))return e.match(/\d+/g).map(Number);let t="#"===e.charAt(0)?e.substring(1):e;return l(e)&&(t=i(t).substring(1)),[parseInt(t.substring(0,2),16),parseInt(t.substring(2,4),16),parseInt(t.substring(4,6),16)]}},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})},6100:(e,t,n)=>{"use strict";var r=n(1780),o=Function.prototype,i=o.call,a=r&&o.bind.bind(i,i);e.exports=r?a:function(e){return function(){return i.apply(e,arguments)}}},6101:(e,t,n)=>{"use strict";n.d(t,{A:()=>y});var r=n(9155),o=n(2221),i=n(3864),a=n(6052);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 l=n(881);const c=i.Ay.div.withConfig({componentId:"sc-1mhxo2t-0"})(["display:flex;flex-direction:column;position:relative;width:100%;"," background-color:",";"],e=>{let{$isForm:t}=e;return t?"padding: 12px 0 16px;":(0,i.AH)(["border-radius:6px;padding:12px 12px 16px 12px;box-shadow:0px 1px 5px 1px rgba(0,0,0,0.08);"])},e=>{let{theme:t}=e;return t.panelBackground}),u=i.Ay.div.withConfig({componentId:"sc-1mhxo2t-1"})(["padding:0px 8px 0px 0px;font-size:var(--_kindlychat-font-size-p);"]),d=i.Ay.div.withConfig({componentId:"sc-1mhxo2t-2"})(["position:relative;flex:1;display:flex;align-items:center;flex-direction:row;margin-bottom:12px;color:",";"],e=>{let{theme:t,$isForm:n}=e;return n?"var(--panel-background-white-black-contrast-1743170834)":(0,a.w5)(t.background,"#FFFFFF","#000000")}),f=i.Ay.span.withConfig({componentId:"sc-1mhxo2t-3"})(["display:flex;padding:4px;align-items:center;justify-content:center;font-size:var(--_kindlychat-font-size-p);"]),p=i.Ay.div.withConfig({componentId:"sc-1mhxo2t-4"})(["position:relative;display:flex;flex:1;border:1px solid ",";border-radius:25px;"],e=>{let{theme:t}=e;return(0,a.w5)(t.panelBackground,"rgba(255,255,255, 0.08)","rgba(0,0,0, 0.08)")}),h=(0,i.AH)(["height:20px;width:20px;border-radius:50%;background:",";cursor:pointer;appearance:none;margin-top:-6px;border:1px solid rgba(0,0,0,0.2);box-shadow:0 1px 4px 0 rgba(0,0,0,0.08);"],e=>{let{theme:t}=e;return t.buttonBackground}),g=(e,t,n)=>(e-n)/(t-n)*100,m=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,a.w5)(t.panelBackground,"#FFFFFF","#000000"),.08)} ${g(n,r,o)}%, ${s((0,a.w5)(t.panelBackground,"#FFFFFF","#000000"),.08)} 100%)`}}}).withConfig({componentId:"sc-1mhxo2t-5"})(["cursor:pointer;"," &[type='range']{appearance:none;width:100%;border-radius:25px;height:8px;margin:0;&::-webkit-slider-thumb{","}&::-moz-range-thumb{","}&::-webkit-slider-runnable-track{width:100%;height:8px;cursor:pointer;border-radius:25px;}}"],l.jq,h,h);var b=n(5814),v=n(1085);const y=function(e){let{from:t,to:n,value:i=1,affix:a,affixValue:s,step:l=1,onChange:h,name:g,field:y,ariaLabel:x,validators:w=[],hasController:k}=e;const S=(0,b.G8)(w),C=(0,r.useMemo)(()=>{var e;const n=parseFloat(String(t));return Number.isNaN(n)?null===(e=S.min)||void 0===e?void 0:e.value:n},[t,S]),_=(0,r.useMemo)(()=>{var e;const t=parseFloat(String(n));return Number.isNaN(t)?null===(e=S.max)||void 0===e?void 0:e.value:t},[n,S]),[A,E]=(0,r.useState)(((e,t,n)=>t<e?e+n:t)(l,i,C));return(0,v.jsxs)(c,{$isForm:!!k,children:[(0,v.jsxs)(d,{$isForm:!!k,children:[a===o.rc.PREFIX&&(0,v.jsx)(u,{children:s}),(0,v.jsx)(f,{children:A}),a===o.rc.SUFFIX&&(0,v.jsx)(u,{children:s})]}),(0,v.jsx)(p,{children:(0,v.jsx)(m,{type:"range",name:g,step:l,min:C,max:_,value:A,onChange:e=>{var t;null!=e&&null!==(t=e.target)&&void 0!==t&&t.value&&(h&&h(e.target.value),null!=y&&y.onChange&&y.onChange(e),E(e.target.value))},"aria-label":x})})]})}},6189:(e,t,n)=>{"use strict";n(1918),n(7935),n(9239),n(8293),n(2320),n(3131),n(5664),n(8749),n(6836),n(5799),n(928),n(9850),n(6457),n(6789),n(4119),n(7501),n(7424),n(1249),n(1818),n(2279),n(5851),n(2492);var r=n(8099);e.exports=r.Symbol},6251:(e,t,n)=>{"use strict";n(4531)("metadataKey")},6281:(e,t,n)=>{"use strict";var r=n(1003),o=n(2769),i=n(4317),a=n(7460),s=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return o(t)&&i(t.prototype,s(e))}},6290:(e,t,n)=>{"use strict";n.d(t,{A:()=>o}),n(9155);var r=n(1085);function o(e){let{color:t="#FFF",...n}=e;return(0,r.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:(0,r.jsx)("path",{d:"M15.25 10.75L12 14.25L8.75 10.75",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}},6310:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<i(o,t)))break e;e[r]=t,e[n]=o,n=r}}function r(e){return 0===e.length?null:e[0]}function o(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,a=o>>>1;r<a;){var s=2*(r+1)-1,l=e[s],c=s+1,u=e[c];if(0>i(l,n))c<o&&0>i(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(c<o&&0>i(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var c=[],u=[],d=1,f=null,p=3,h=!1,g=!1,m=!1,b=!1,v="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,x="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var t=r(u);null!==t;){if(null===t.callback)o(u);else{if(!(t.startTime<=e))break;o(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function k(e){if(m=!1,w(e),!g)if(null!==r(c))g=!0,C||(C=!0,S());else{var t=r(u);null!==t&&L(k,t.startTime-e)}}var S,C=!1,_=-1,A=5,E=-1;function T(){return!(!b&&t.unstable_now()-E<A)}function j(){if(b=!1,C){var e=t.unstable_now();E=e;var n=!0;try{e:{g=!1,m&&(m=!1,y(_),_=-1),h=!0;var i=p;try{t:{for(w(e),f=r(c);null!==f&&!(f.expirationTime>e&&T());){var a=f.callback;if("function"==typeof a){f.callback=null,p=f.priorityLevel;var s=a(f.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof s){f.callback=s,w(e),n=!0;break t}f===r(c)&&o(c),w(e)}else o(c);f=r(c)}if(null!==f)n=!0;else{var l=r(u);null!==l&&L(k,l.startTime-e),n=!1}}break e}finally{f=null,p=i,h=!1}n=void 0}}finally{n?S():C=!1}}}if("function"==typeof x)S=function(){x(j)};else if("undefined"!=typeof MessageChannel){var I=new MessageChannel,O=I.port2;I.port1.onmessage=j,S=function(){O.postMessage(null)}}else S=function(){v(j,0)};function L(e,n){_=v(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},t.unstable_requestPaint=function(){b=!0},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},t.unstable_scheduleCallback=function(e,o,i){var a=t.unstable_now();switch(i="object"==typeof i&&null!==i&&"number"==typeof(i=i.delay)&&0<i?a+i:a,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:d++,callback:o,priorityLevel:e,startTime:i,expirationTime:s=i+s,sortIndex:-1},i>a?(e.sortIndex=i,n(u,e),null===r(c)&&e===r(u)&&(m?(y(_),_=-1):m=!0,L(k,i-a))):(e.sortIndex=s,n(c,e),g||h||(g=!0,C||(C=!0,S()))),e},t.unstable_shouldYield=T,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},6343:(e,t,n)=>{"use strict";n.d(t,{oI:()=>k.oI,Sz:()=>c.Sz,B:()=>f.B,Mx:()=>s.Mx,UB:()=>f.UB,cL:()=>r.cL,RY:()=>c.RY,g4:()=>f.g4,Bd:()=>w.Bd,Rh:()=>f.Rh,eG:()=>f.eG,mN:()=>f.mN,mg:()=>p.mg,fk:()=>p.fk,XO:()=>p.XO,_e:()=>f._e,Fe:()=>x.F,pK:()=>i,Y_:()=>S.Y_,gQ:()=>k.gQ,wQ:()=>f.wQ,ky:()=>f.ky,VK:()=>f.VK,z5:()=>s.z5,SD:()=>y,gm:()=>s.gm,UJ:()=>p.UJ,qf:()=>p.qf,Rm:()=>c.Rm,Mm:()=>f.Mm,ZS:()=>f.ZS,lQ:()=>f.lQ,tM:()=>w.tM,aP:()=>w.aP,c9:()=>c.c9,Zn:()=>w.Zn,j3:()=>w.j3,Ln:()=>f.Ln,L4:()=>f.L4,zn:()=>f.zn,Bu:()=>w.Bu,nI:()=>f.nI,F3:()=>h,pA:()=>w.pA,Aw:()=>b,tD:()=>v,Dc:()=>a,kS:()=>S.kS,ob:()=>f.ob,ku:()=>k.ku,cC:()=>x.c,fe:()=>S.fe,i1:()=>f.i1,VP:()=>k.VP,mR:()=>S.mR,Z4:()=>f.Z4,zX:()=>c.zX,y2:()=>w.y2,V$:()=>f.V$,uz:()=>g,yM:()=>d,vJ:()=>S.vJ,qJ:()=>w.qJ,et:()=>c.et,zh:()=>w.zh,m8:()=>c.m8,R7:()=>c.R7,Mb:()=>r.Mb,mw:()=>r.mw});var r=n(1112),o=n(8679);const i=()=>e=>{e({type:o.u2})},a=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 s=n(892),l=n(4851),c=n(628),u=n(2221);const d=e=>async(t,n)=>{const{PAT_HOST:r}=n().environment,{botKey:o,currentLanguage:i}=n().chatbubble,{token:a}=n().connection,d=await t((0,s.z5)());t((0,c.et)(`${r}/chatbubble/${u.Ak}/conversion/`,{method:"POST",body:{is_order:e,language_code:i},...(0,l.A)({botKey:o,token:a},{withCurrentUrl:!0,extra:d})}))};var f=n(7325),p=n(3049);const h=e=>({type:o.ye,chatMessageId:e}),g=()=>({type:o.vK});var m=n(6546);const b=e=>t=>{t({type:m.s,context:e})},v=e=>(t,n)=>{if("string"!=typeof e)throw new Error("label needs to be a string, received "+typeof e);t({type:m.T,label:e});const{connection:{token:r},environment:{PAT_HOST:o},local:{labels:i}}=n();r&&t((0,c.et)(`${o}/chatbubble/${u.Ak}/update_labels`,{method:"POST",body:{labels:i},...(0,l.A)({token:r})}))},y=()=>async(e,t)=>{const{connection:{token:n,botKey:r},environment:{PAT_HOST:o},local:{context:i}}=t();let a={...i};if(n){const t=await e((0,c.et)(`${o}/chatbubble/${u.Ak}/context`,{method:"get",...(0,l.A)({token:n,botKey:r})}));null!=t&&t.data&&(a={...t.data,...a})}return a};var x=n(1763),w=n(5629),k=n(3553),S=n(8414)},6367:(e,t,n)=>{"use strict";n.d(t,{GJ:()=>a,NY:()=>l,fz:()=>c,n6:()=>d,tf:()=>u});const r=["load","message"],o="See https://docs.kindly.ai/api/chat#handlers for how to switch.",i=function(e,t,n,i){var a,s;let l=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(-1!==r.indexOf(e)&&Boolean(i)&&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 i=Object.values(n);try{e(...i)}catch(e){console.error(e)}}(i,e,t),"API"!==n)return!0;if(null===(a=window)||void 0===a||null===(s=a.kindlyChat)||void 0===s||!s.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:l}))};function a(e,t,n,r){e&&i("message",{newMessage:e,chatLog:t},r,n)}let s=!1;function l(e){!1===s&&(s=!0,i("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:i,handlers:a,lastMessage:s,renderedBy:l}=e,c=!1;const u=null==a?void 0:a[n];if(u){console.warn(`kindlyOptions.buttonHandlers is deprecated in favor of standard event handlers. ${o}`);try{c=Boolean(u(i,t,s,r,n))}catch(e){console.error(e)}}var d;return"API"===l&&(c=!(null!==(d=window.kindlyChat)&&void 0!==d&&d.APIRoot.dispatchEvent(new CustomEvent("kindly:buttonclick",{detail:{button:t,lastMessage:s,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:a}}=r,s={...t,chatId:o,source:n,type:e};return i("ui",s,a,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})))}},6457:(e,t,n)=>{"use strict";n(4531)("replace")},6464:(e,t,n)=>{"use strict";n.d(t,{B:()=>o,U:()=>i});var r=n(786);const o="kindly-chat-browser-id",i=()=>{const e=localStorage.getItem(o);if(!e){const e=(0,r.A)();return localStorage.setItem(o,e),e}return e}},6546:(e,t,n)=>{"use strict";n.d(t,{T:()=>o,s:()=>r});const r="SET_NEW_CONTEXT",o="SET_NEW_LABEL"},6586:(e,t,n)=>{"use strict";var r=n(1305);e.exports=r},6625:e=>{"use strict";e.exports={}},6735:(e,t,n)=>{"use strict";var r=n(3592);e.exports=r},6789:(e,t,n)=>{"use strict";n(4531)("search")},6831:(e,t,n)=>{"use strict";n.d(t,{A:()=>le}),n(9155);const{entries:r,setPrototypeOf:o,isFrozen:i,getPrototypeOf:a,getOwnPropertyDescriptor:s}=Object;let{freeze:l,seal:c,create:u}=Object,{apply:d,construct:f}="undefined"!=typeof Reflect&&Reflect;l||(l=function(e){return e}),c||(c=function(e){return e}),d||(d=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return e.apply(t,r)}),f||(f=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});const p=T(Array.prototype.forEach),h=T(Array.prototype.lastIndexOf),g=T(Array.prototype.pop),m=T(Array.prototype.push),b=T(Array.prototype.splice),v=T(String.prototype.toLowerCase),y=T(String.prototype.toString),x=T(String.prototype.match),w=T(String.prototype.replace),k=T(String.prototype.indexOf),S=T(String.prototype.trim),C=T(Object.prototype.hasOwnProperty),_=T(RegExp.prototype.test),A=(E=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return f(E,t)});var E;function T(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 d(e,t,r)}}function j(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:v;o&&o(e,null);let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(i(t)||(t[r]=e),o=e)}e[o]=!0}return e}function I(e){for(let t=0;t<e.length;t++)C(e,t)||(e[t]=null);return e}function O(e){const t=u(null);for(const[n,o]of r(e))C(e,n)&&(Array.isArray(o)?t[n]=I(o):o&&"object"==typeof o&&o.constructor===Object?t[n]=O(o):t[n]=o);return t}function L(e,t){for(;null!==e;){const n=s(e,t);if(n){if(n.get)return T(n.get);if("function"==typeof n.value)return T(n.value)}e=a(e)}return function(){return null}}const P=l(["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","search","section","select","shadow","slot","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"]),M=l(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),N=l(["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"]),z=l(["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"]),R=l(["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"]),$=l(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),D=l(["#text"]),F=l(["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","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","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","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),B=l(["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","mask-type","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"]),H=l(["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"]),U=l(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),V=c(/\{\{[\w\W]*|[\w\W]*\}\}/gm),W=c(/<%[\w\W]*|[\w\W]*%>/gm),G=c(/\$\{[\w\W]*/gm),q=c(/^data-[\-\w.\u00B7-\uFFFF]+$/),K=c(/^aria-[\-\w]+$/),Y=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),X=c(/^(?:\w+script|data):/i),Z=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Q=c(/^html$/i),J=c(/^[a-z][.\w]*(-[.\w]+)+$/i);var ee=Object.freeze({__proto__:null,ARIA_ATTR:K,ATTR_WHITESPACE:Z,CUSTOM_ELEMENT:J,DATA_ATTR:q,DOCTYPE_NAME:Q,ERB_EXPR:W,IS_ALLOWED_URI:Y,IS_SCRIPT_OR_DATA:X,MUSTACHE_EXPR:V,TMPLIT_EXPR:G});const te=function(){return"undefined"==typeof window?null:window};var ne=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te();const n=t=>e(t);if(n.version="3.3.0",n.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return n.isSupported=!1,n;let{document:o}=t;const i=o,a=i.currentScript,{DocumentFragment:s,HTMLTemplateElement:c,Node:d,Element:f,NodeFilter:E,NamedNodeMap:T=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:I,DOMParser:V,trustedTypes:W}=t,G=f.prototype,q=L(G,"cloneNode"),K=L(G,"remove"),X=L(G,"nextSibling"),Z=L(G,"childNodes"),J=L(G,"parentNode");if("function"==typeof c){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let ne,re="";const{implementation:oe,createNodeIterator:ie,createDocumentFragment:ae,getElementsByTagName:se}=o,{importNode:le}=i;let ce={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof r&&"function"==typeof J&&oe&&void 0!==oe.createHTMLDocument;const{MUSTACHE_EXPR:ue,ERB_EXPR:de,TMPLIT_EXPR:fe,DATA_ATTR:pe,ARIA_ATTR:he,IS_SCRIPT_OR_DATA:ge,ATTR_WHITESPACE:me,CUSTOM_ELEMENT:be}=ee;let{IS_ALLOWED_URI:ve}=ee,ye=null;const xe=j({},[...P,...M,...N,...R,...D]);let we=null;const ke=j({},[...F,...B,...H,...U]);let Se=Object.seal(u(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}})),Ce=null,_e=null;const Ae=Object.seal(u(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ee=!0,Te=!0,je=!1,Ie=!0,Oe=!1,Le=!0,Pe=!1,Me=!1,Ne=!1,ze=!1,Re=!1,$e=!1,De=!0,Fe=!1,Be=!0,He=!1,Ue={},Ve=null;const We=j({},["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 Ge=null;const qe=j({},["audio","video","img","source","image","track"]);let Ke=null;const Ye=j({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Xe="http://www.w3.org/1998/Math/MathML",Ze="http://www.w3.org/2000/svg",Qe="http://www.w3.org/1999/xhtml";let Je=Qe,et=!1,tt=null;const nt=j({},[Xe,Ze,Qe],y);let rt=j({},["mi","mo","mn","ms","mtext"]),ot=j({},["annotation-xml"]);const it=j({},["title","style","font","a","script"]);let at=null;const st=["application/xhtml+xml","text/html"];let lt=null,ct=null;const ut=o.createElement("form"),dt=function(e){return e instanceof RegExp||e instanceof Function},ft=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ct||ct!==e){if(e&&"object"==typeof e||(e={}),e=O(e),at=-1===st.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,lt="application/xhtml+xml"===at?y:v,ye=C(e,"ALLOWED_TAGS")?j({},e.ALLOWED_TAGS,lt):xe,we=C(e,"ALLOWED_ATTR")?j({},e.ALLOWED_ATTR,lt):ke,tt=C(e,"ALLOWED_NAMESPACES")?j({},e.ALLOWED_NAMESPACES,y):nt,Ke=C(e,"ADD_URI_SAFE_ATTR")?j(O(Ye),e.ADD_URI_SAFE_ATTR,lt):Ye,Ge=C(e,"ADD_DATA_URI_TAGS")?j(O(qe),e.ADD_DATA_URI_TAGS,lt):qe,Ve=C(e,"FORBID_CONTENTS")?j({},e.FORBID_CONTENTS,lt):We,Ce=C(e,"FORBID_TAGS")?j({},e.FORBID_TAGS,lt):O({}),_e=C(e,"FORBID_ATTR")?j({},e.FORBID_ATTR,lt):O({}),Ue=!!C(e,"USE_PROFILES")&&e.USE_PROFILES,Ee=!1!==e.ALLOW_ARIA_ATTR,Te=!1!==e.ALLOW_DATA_ATTR,je=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ie=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Oe=e.SAFE_FOR_TEMPLATES||!1,Le=!1!==e.SAFE_FOR_XML,Pe=e.WHOLE_DOCUMENT||!1,ze=e.RETURN_DOM||!1,Re=e.RETURN_DOM_FRAGMENT||!1,$e=e.RETURN_TRUSTED_TYPE||!1,Ne=e.FORCE_BODY||!1,De=!1!==e.SANITIZE_DOM,Fe=e.SANITIZE_NAMED_PROPS||!1,Be=!1!==e.KEEP_CONTENT,He=e.IN_PLACE||!1,ve=e.ALLOWED_URI_REGEXP||Y,Je=e.NAMESPACE||Qe,rt=e.MATHML_TEXT_INTEGRATION_POINTS||rt,ot=e.HTML_INTEGRATION_POINTS||ot,Se=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&dt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Se.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&dt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Se.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Se.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Oe&&(Te=!1),Re&&(ze=!0),Ue&&(ye=j({},D),we=[],!0===Ue.html&&(j(ye,P),j(we,F)),!0===Ue.svg&&(j(ye,M),j(we,B),j(we,U)),!0===Ue.svgFilters&&(j(ye,N),j(we,B),j(we,U)),!0===Ue.mathMl&&(j(ye,R),j(we,H),j(we,U))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?Ae.tagCheck=e.ADD_TAGS:(ye===xe&&(ye=O(ye)),j(ye,e.ADD_TAGS,lt))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?Ae.attributeCheck=e.ADD_ATTR:(we===ke&&(we=O(we)),j(we,e.ADD_ATTR,lt))),e.ADD_URI_SAFE_ATTR&&j(Ke,e.ADD_URI_SAFE_ATTR,lt),e.FORBID_CONTENTS&&(Ve===We&&(Ve=O(Ve)),j(Ve,e.FORBID_CONTENTS,lt)),Be&&(ye["#text"]=!0),Pe&&j(ye,["html","head","body"]),ye.table&&(j(ye,["tbody"]),delete Ce.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ne=e.TRUSTED_TYPES_POLICY,re=ne.createHTML("")}else void 0===ne&&(ne=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}}(W,a)),null!==ne&&"string"==typeof re&&(re=ne.createHTML(""));l&&l(e),ct=e}},pt=j({},[...M,...N,...z]),ht=j({},[...R,...$]),gt=function(e){m(n.removed,{element:e});try{J(e).removeChild(e)}catch(t){K(e)}},mt=function(e,t){try{m(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){m(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ze||Re)try{gt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},bt=function(e){let t=null,n=null;if(Ne)e="<remove></remove>"+e;else{const t=x(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===at&&Je===Qe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=ne?ne.createHTML(e):e;if(Je===Qe)try{t=(new V).parseFromString(r,at)}catch(e){}if(!t||!t.documentElement){t=oe.createDocument(Je,"template",null);try{t.documentElement.innerHTML=et?re:r}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(o.createTextNode(n),i.childNodes[0]||null),Je===Qe?se.call(t,Pe?"html":"body")[0]:Pe?t.documentElement:i},vt=function(e){return ie.call(e.ownerDocument||e,e,E.SHOW_ELEMENT|E.SHOW_COMMENT|E.SHOW_TEXT|E.SHOW_PROCESSING_INSTRUCTION|E.SHOW_CDATA_SECTION,null)},yt=function(e){return e instanceof I&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof T)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},xt=function(e){return"function"==typeof d&&e instanceof d};function wt(e,t,r){p(e,e=>{e.call(n,t,r,ct)})}const kt=function(e){let t=null;if(wt(ce.beforeSanitizeElements,e,null),yt(e))return gt(e),!0;const r=lt(e.nodeName);if(wt(ce.uponSanitizeElement,e,{tagName:r,allowedTags:ye}),Le&&e.hasChildNodes()&&!xt(e.firstElementChild)&&_(/<[/\w!]/g,e.innerHTML)&&_(/<[/\w!]/g,e.textContent))return gt(e),!0;if(7===e.nodeType)return gt(e),!0;if(Le&&8===e.nodeType&&_(/<[/\w]/g,e.data))return gt(e),!0;if(!(Ae.tagCheck instanceof Function&&Ae.tagCheck(r))&&(!ye[r]||Ce[r])){if(!Ce[r]&&Ct(r)){if(Se.tagNameCheck instanceof RegExp&&_(Se.tagNameCheck,r))return!1;if(Se.tagNameCheck instanceof Function&&Se.tagNameCheck(r))return!1}if(Be&&!Ve[r]){const t=J(e)||e.parentNode,n=Z(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r){const o=q(n[r],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,X(e))}}return gt(e),!0}return e instanceof f&&!function(e){let t=J(e);t&&t.tagName||(t={namespaceURI:Je,tagName:"template"});const n=v(e.tagName),r=v(t.tagName);return!!tt[e.namespaceURI]&&(e.namespaceURI===Ze?t.namespaceURI===Qe?"svg"===n:t.namespaceURI===Xe?"svg"===n&&("annotation-xml"===r||rt[r]):Boolean(pt[n]):e.namespaceURI===Xe?t.namespaceURI===Qe?"math"===n:t.namespaceURI===Ze?"math"===n&&ot[r]:Boolean(ht[n]):e.namespaceURI===Qe?!(t.namespaceURI===Ze&&!ot[r])&&!(t.namespaceURI===Xe&&!rt[r])&&!ht[n]&&(it[n]||!pt[n]):!("application/xhtml+xml"!==at||!tt[e.namespaceURI]))}(e)?(gt(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!_(/<\/no(script|embed|frames)/i,e.innerHTML)?(Oe&&3===e.nodeType&&(t=e.textContent,p([ue,de,fe],e=>{t=w(t,e," ")}),e.textContent!==t&&(m(n.removed,{element:e.cloneNode()}),e.textContent=t)),wt(ce.afterSanitizeElements,e,null),!1):(gt(e),!0)},St=function(e,t,n){if(De&&("id"===t||"name"===t)&&(n in o||n in ut))return!1;if(Te&&!_e[t]&&_(pe,t));else if(Ee&&_(he,t));else if(Ae.attributeCheck instanceof Function&&Ae.attributeCheck(t,e));else if(!we[t]||_e[t]){if(!(Ct(e)&&(Se.tagNameCheck instanceof RegExp&&_(Se.tagNameCheck,e)||Se.tagNameCheck instanceof Function&&Se.tagNameCheck(e))&&(Se.attributeNameCheck instanceof RegExp&&_(Se.attributeNameCheck,t)||Se.attributeNameCheck instanceof Function&&Se.attributeNameCheck(t,e))||"is"===t&&Se.allowCustomizedBuiltInElements&&(Se.tagNameCheck instanceof RegExp&&_(Se.tagNameCheck,n)||Se.tagNameCheck instanceof Function&&Se.tagNameCheck(n))))return!1}else if(Ke[t]);else if(_(ve,w(n,me,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==k(n,"data:")||!Ge[e])if(je&&!_(ge,w(n,me,"")));else if(n)return!1;return!0},Ct=function(e){return"annotation-xml"!==e&&x(e,be)},_t=function(e){wt(ce.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||yt(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:we,forceKeepAttr:void 0};let o=t.length;for(;o--;){const i=t[o],{name:a,namespaceURI:s,value:l}=i,c=lt(a),u=l;let d="value"===a?u:S(u);if(r.attrName=c,r.attrValue=d,r.keepAttr=!0,r.forceKeepAttr=void 0,wt(ce.uponSanitizeAttribute,e,r),d=r.attrValue,!Fe||"id"!==c&&"name"!==c||(mt(a,e),d="user-content-"+d),Le&&_(/((--!?|])>)|<\/(style|title|textarea)/i,d)){mt(a,e);continue}if("attributename"===c&&x(d,"href")){mt(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){mt(a,e);continue}if(!Ie&&_(/\/>/i,d)){mt(a,e);continue}Oe&&p([ue,de,fe],e=>{d=w(d,e," ")});const f=lt(e.nodeName);if(St(f,c,d)){if(ne&&"object"==typeof W&&"function"==typeof W.getAttributeType)if(s);else switch(W.getAttributeType(f,c)){case"TrustedHTML":d=ne.createHTML(d);break;case"TrustedScriptURL":d=ne.createScriptURL(d)}if(d!==u)try{s?e.setAttributeNS(s,a,d):e.setAttribute(a,d),yt(e)?gt(e):g(n.removed)}catch(t){mt(a,e)}}else mt(a,e)}wt(ce.afterSanitizeAttributes,e,null)},At=function e(t){let n=null;const r=vt(t);for(wt(ce.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)wt(ce.uponSanitizeShadowNode,n,null),kt(n),_t(n),n.content instanceof s&&e(n.content);wt(ce.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,o=null,a=null,l=null;if(et=!e,et&&(e="\x3c!--\x3e"),"string"!=typeof e&&!xt(e)){if("function"!=typeof e.toString)throw A("toString is not a function");if("string"!=typeof(e=e.toString()))throw A("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Me||ft(t),n.removed=[],"string"==typeof e&&(He=!1),He){if(e.nodeName){const t=lt(e.nodeName);if(!ye[t]||Ce[t])throw A("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof d)r=bt("\x3c!----\x3e"),o=r.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?r=o:r.appendChild(o);else{if(!ze&&!Oe&&!Pe&&-1===e.indexOf("<"))return ne&&$e?ne.createHTML(e):e;if(r=bt(e),!r)return ze?null:$e?re:""}r&&Ne&&gt(r.firstChild);const c=vt(He?e:r);for(;a=c.nextNode();)kt(a),_t(a),a.content instanceof s&&At(a.content);if(He)return e;if(ze){if(Re)for(l=ae.call(r.ownerDocument);r.firstChild;)l.appendChild(r.firstChild);else l=r;return(we.shadowroot||we.shadowrootmode)&&(l=le.call(i,l,!0)),l}let u=Pe?r.outerHTML:r.innerHTML;return Pe&&ye["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&_(Q,r.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+u),Oe&&p([ue,de,fe],e=>{u=w(u,e," ")}),ne&&$e?ne.createHTML(u):u},n.setConfig=function(){ft(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Me=!0},n.clearConfig=function(){ct=null,Me=!1},n.isValidAttribute=function(e,t,n){ct||ft({});const r=lt(e),o=lt(t);return St(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&m(ce[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=h(ce[e],t);return-1===n?void 0:b(ce[e],n,1)[0]}return g(ce[e])},n.removeHooks=function(e){ce[e]=[]},n.removeAllHooks=function(){ce={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();const re=["form","input"],oe=["target"],ie=["action"];function ae(e){return ne.sanitize(e,{ADD_ATTR:oe,FORBID_ATTR:ie,FORBID_TAGS:re,USE_PROFILES:{svg:!1,svgFilters:!1,mathMl:!1,html:!0}})}var se=n(1085);function le(e){return(0,se.jsx)("div",{dangerouslySetInnerHTML:{__html:ae(e)}})}},6836:(e,t,n)=>{"use strict";n(4531)("isConcatSpreadable")},6925:(e,t,n)=>{"use strict";var r=n(9098),o=n(5024),i=n(9989).f;r({target:"Object",stat:!0,forced:Object.defineProperty!==i,sham:!o},{defineProperty:i})},6939:(e,t,n)=>{"use strict";e.exports=n(5813)},6974:(e,t,n)=>{"use strict";var r=n(9907),o=n(7967),i=n(9155),a=n(9514);function s(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function c(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function u(e){if(31===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function d(e){if(l(e)!==e)throw Error(s(188))}function f(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e;for(e=e.child;null!==e;){if(null!==(t=f(e)))return t;e=e.sibling}return null}var p=Object.assign,h=Symbol.for("react.element"),g=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),w=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),A=Symbol.for("react.lazy");Symbol.for("react.scope");var E=Symbol.for("react.activity");Symbol.for("react.legacy_hidden"),Symbol.for("react.tracing_marker");var T=Symbol.for("react.memo_cache_sentinel");Symbol.for("react.view_transition");var j=Symbol.iterator;function I(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=j&&e[j]||e["@@iterator"])?e:null}var O=Symbol.for("react.client.reference");function L(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===O?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case b:return"Fragment";case y:return"Profiler";case v:return"StrictMode";case S:return"Suspense";case C:return"SuspenseList";case E:return"Activity"}if("object"==typeof e)switch(e.$$typeof){case m:return"Portal";case w:return e.displayName||"Context";case x:return(e._context.displayName||"Context")+".Consumer";case k:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case _:return null!==(t=e.displayName||null)?t:L(e.type)||"Memo";case A:t=e._payload,e=e._init;try{return L(e(t))}catch(e){}}return null}var P=Array.isArray,M=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z={pending:!1,data:null,method:null,action:null},R=[],$=-1;function D(e){return{current:e}}function F(e){0>$||(e.current=R[$],R[$]=null,$--)}function B(e,t){$++,R[$]=e.current,e.current=t}var H,U,V=D(null),W=D(null),G=D(null),q=D(null);function K(e,t){switch(B(G,t),B(W,e),B(V,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?bd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)e=vd(t=bd(t),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}F(V),B(V,e)}function Y(){F(V),F(W),F(G)}function X(e){null!==e.memoizedState&&B(q,e);var t=V.current,n=vd(t,e.type);t!==n&&(B(W,e),B(V,n))}function Z(e){W.current===e&&(F(V),F(W)),q.current===e&&(F(q),df._currentValue=z)}function Q(e){if(void 0===H)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);H=t&&t[1]||"",U=-1<e.stack.indexOf("\n at")?" (<anonymous>)":-1<e.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+H+e+U}var J=!1;function ee(e,t){if(!e||J)return"";J=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&"function"==typeof n.catch&&n.catch(function(){})}}catch(e){if(e&&r&&"string"==typeof e.stack)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=r.DetermineComponentFrameRoot(),a=i[0],s=i[1];if(a&&s){var l=a.split("\n"),c=s.split("\n");for(o=r=0;r<l.length&&!l[r].includes("DetermineComponentFrameRoot");)r++;for(;o<c.length&&!c[o].includes("DetermineComponentFrameRoot");)o++;if(r===l.length||o===c.length)for(r=l.length-1,o=c.length-1;1<=r&&0<=o&&l[r]!==c[o];)o--;for(;1<=r&&0<=o;r--,o--)if(l[r]!==c[o]){if(1!==r||1!==o)do{if(r--,0>--o||l[r]!==c[o]){var u="\n"+l[r].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}}while(1<=r&&0<=o);break}}}finally{J=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Q(n):""}function te(e,t){switch(e.tag){case 26:case 27:case 5:return Q(e.type);case 16:return Q("Lazy");case 13:return e.child!==t&&null!==t?Q("Suspense Fallback"):Q("Suspense");case 19:return Q("SuspenseList");case 0:case 15:return ee(e.type,!1);case 11:return ee(e.type.render,!1);case 1:return ee(e.type,!0);case 31:return Q("Activity");default:return""}}function ne(e){try{var t="",n=null;do{t+=te(e,n),n=e,e=e.return}while(e);return t}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}var re=Object.prototype.hasOwnProperty,oe=o.unstable_scheduleCallback,ie=o.unstable_cancelCallback,ae=o.unstable_shouldYield,se=o.unstable_requestPaint,le=o.unstable_now,ce=o.unstable_getCurrentPriorityLevel,ue=o.unstable_ImmediatePriority,de=o.unstable_UserBlockingPriority,fe=o.unstable_NormalPriority,pe=o.unstable_LowPriority,he=o.unstable_IdlePriority,ge=o.log,me=o.unstable_setDisableYieldValue,be=null,ve=null;function ye(e){if("function"==typeof ge&&me(e),ve&&"function"==typeof ve.setStrictMode)try{ve.setStrictMode(be,e)}catch(e){}}var xe=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(we(e)/ke|0)|0},we=Math.log,ke=Math.LN2,Se=256,Ce=262144,_e=4194304;function Ae(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return 261888&e;case 262144:case 524288:case 1048576:case 2097152:return 3932160&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ee(e,t,n){var r=e.pendingLanes;if(0===r)return 0;var o=0,i=e.suspendedLanes,a=e.pingedLanes;e=e.warmLanes;var s=134217727&r;return 0!==s?0!==(r=s&~i)?o=Ae(r):0!==(a&=s)?o=Ae(a):n||0!==(n=s&~e)&&(o=Ae(n)):0!==(s=r&~i)?o=Ae(s):0!==a?o=Ae(a):n||0!==(n=r&~e)&&(o=Ae(n)),0===o?0:0!==t&&t!==o&&0===(t&i)&&((i=o&-o)>=(n=t&-t)||32===i&&4194048&n)?t:o}function Te(e,t){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function je(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function Ie(){var e=_e;return!(62914560&(_e<<=1))&&(_e=4194304),e}function Oe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Le(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Pe(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-xe(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|261930&n}function Me(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-xe(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}function Ne(e,t){var n=t&-t;return 0!==((n=42&n?1:ze(n))&(e.suspendedLanes|t))?0:n}function ze(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Re(e){return 2<(e&=-e)?8<e?134217727&e?32:268435456:8:2}function $e(){var e=N.p;return 0!==e?e:void 0===(e=window.event)?32:_f(e.type)}function De(e,t){var n=N.p;try{return N.p=e,t()}finally{N.p=n}}var Fe=Math.random().toString(36).slice(2),Be="__reactFiber$"+Fe,He="__reactProps$"+Fe,Ue="__reactContainer$"+Fe,Ve="__reactEvents$"+Fe,We="__reactListeners$"+Fe,Ge="__reactHandles$"+Fe,qe="__reactResources$"+Fe,Ke="__reactMarker$"+Fe;function Ye(e){delete e[Be],delete e[He],delete e[Ve],delete e[We],delete e[Ge]}function Xe(e){var t=e[Be];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ue]||n[Be]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=zd(e);null!==e;){if(n=e[Be])return n;e=zd(e)}return t}n=(e=n).parentNode}return null}function Ze(e){if(e=e[Be]||e[Ue]){var t=e.tag;if(5===t||6===t||13===t||31===t||26===t||27===t||3===t)return e}return null}function Qe(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e.stateNode;throw Error(s(33))}function Je(e){var t=e[qe];return t||(t=e[qe]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function et(e){e[Ke]=!0}var tt=new Set,nt={};function rt(e,t){ot(e,t),ot(e+"Capture",t)}function ot(e,t){for(nt[e]=t,e=0;e<t.length;e++)tt.add(t[e])}var it=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),at={},st={};function lt(e,t,n){if(o=t,re.call(st,o)||!re.call(at,o)&&(it.test(o)?st[o]=!0:(at[o]=!0,0)))if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":return void e.removeAttribute(t);case"boolean":var r=t.toLowerCase().slice(0,5);if("data-"!==r&&"aria-"!==r)return void e.removeAttribute(t)}e.setAttribute(t,""+n)}var o}function ct(e,t,n){if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(t)}e.setAttribute(t,""+n)}}function ut(e,t,n,r){if(null===r)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(n)}e.setAttributeNS(t,n,""+r)}}function dt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function ft(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function pt(e){if(!e._valueTracker){var t=ft(e)?"checked":"value";e._valueTracker=function(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&void 0!==r&&"function"==typeof r.get&&"function"==typeof r.set){var o=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){n=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e,t,""+e[t])}}function ht(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ft(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function gt(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var mt=/[\n"\\]/g;function bt(e){return e.replace(mt,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function vt(e,t,n,r,o,i,a,s){e.name="",null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a?e.type=a:e.removeAttribute("type"),null!=t?"number"===a?(0===t&&""===e.value||e.value!=t)&&(e.value=""+dt(t)):e.value!==""+dt(t)&&(e.value=""+dt(t)):"submit"!==a&&"reset"!==a||e.removeAttribute("value"),null!=t?xt(e,a,dt(t)):null!=n?xt(e,a,dt(n)):null!=r&&e.removeAttribute("value"),null==o&&null!=i&&(e.defaultChecked=!!i),null!=o&&(e.checked=o&&"function"!=typeof o&&"symbol"!=typeof o),null!=s&&"function"!=typeof s&&"symbol"!=typeof s&&"boolean"!=typeof s?e.name=""+dt(s):e.removeAttribute("name")}function yt(e,t,n,r,o,i,a,s){if(null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&"boolean"!=typeof i&&(e.type=i),null!=t||null!=n){if(("submit"===i||"reset"===i)&&null==t)return void pt(e);n=null!=n?""+dt(n):"",t=null!=t?""+dt(t):n,s||t===e.value||(e.value=t),e.defaultValue=t}r="function"!=typeof(r=null!=r?r:o)&&"symbol"!=typeof r&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a&&(e.name=a),pt(e)}function xt(e,t,n){"number"===t&&gt(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function wt(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+dt(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function kt(e,t,n){null==t||((t=""+dt(t))!==e.value&&(e.value=t),null!=n)?e.defaultValue=null!=n?""+dt(n):"":e.defaultValue!==t&&(e.defaultValue=t)}function St(e,t,n,r){if(null==t){if(null!=r){if(null!=n)throw Error(s(92));if(P(r)){if(1<r.length)throw Error(s(93));r=r[0]}n=r}null==n&&(n=""),t=n}n=dt(t),e.defaultValue=n,(r=e.textContent)===n&&""!==r&&null!==r&&(e.value=r),pt(e)}function Ct(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var _t=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function At(e,t,n){var r=0===t.indexOf("--");null==n||"boolean"==typeof n||""===n?r?e.setProperty(t,""):"float"===t?e.cssFloat="":e[t]="":r?e.setProperty(t,n):"number"!=typeof n||0===n||_t.has(t)?"float"===t?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Et(e,t,n){if(null!=t&&"object"!=typeof t)throw Error(s(62));if(e=e.style,null!=n){for(var r in n)!n.hasOwnProperty(r)||null!=t&&t.hasOwnProperty(r)||(0===r.indexOf("--")?e.setProperty(r,""):"float"===r?e.cssFloat="":e[r]="");for(var o in t)r=t[o],t.hasOwnProperty(o)&&n[o]!==r&&At(e,o,r)}else for(var i in t)t.hasOwnProperty(i)&&At(e,i,t[i])}function Tt(e){if(-1===e.indexOf("-"))return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var jt=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),It=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ot(e){return It.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Lt(){}var Pt=null;function Mt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Nt=null,zt=null;function Rt(e){var t=Ze(e);if(t&&(e=t.stateNode)){var n=e[He]||null;e:switch(e=t.stateNode,t.type){case"input":if(vt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+bt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=r[He]||null;if(!o)throw Error(s(90));vt(r,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<n.length;t++)(r=n[t]).form===e.form&&ht(r)}break e;case"textarea":kt(e,n.value,n.defaultValue);break e;case"select":null!=(t=n.value)&&wt(e,!!n.multiple,t,!1)}}}var $t=!1;function Dt(e,t,n){if($t)return e(t,n);$t=!0;try{return e(t)}finally{if($t=!1,(null!==Nt||null!==zt)&&(Jc(),Nt&&(t=Nt,e=zt,zt=Nt=null,Rt(t),e)))for(t=0;t<e.length;t++)Rt(e[t])}}function Ft(e,t){var n=e.stateNode;if(null===n)return null;var r=n[He]||null;if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(s(231,t,typeof n));return n}var Bt=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),Ht=!1;if(Bt)try{var Ut={};Object.defineProperty(Ut,"passive",{get:function(){Ht=!0}}),window.addEventListener("test",Ut,Ut),window.removeEventListener("test",Ut,Ut)}catch(e){Ht=!1}var Vt=null,Wt=null,Gt=null;function qt(){if(Gt)return Gt;var e,t,n=Wt,r=n.length,o="value"in Vt?Vt.value:Vt.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return Gt=o.slice(e,1<t?1-t:void 0)}function Kt(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Yt(){return!0}function Xt(){return!1}function Zt(e){function t(t,n,r,o,i){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(o):o[a]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?Yt:Xt,this.isPropagationStopped=Xt,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Yt)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Yt)},persist:function(){},isPersistent:Yt}),t}var Qt,Jt,en,tn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nn=Zt(tn),rn=p({},tn,{view:0,detail:0}),on=Zt(rn),an=p({},rn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:bn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==en&&(en&&"mousemove"===e.type?(Qt=e.screenX-en.screenX,Jt=e.screenY-en.screenY):Jt=Qt=0,en=e),Qt)},movementY:function(e){return"movementY"in e?e.movementY:Jt}}),sn=Zt(an),ln=Zt(p({},an,{dataTransfer:0})),cn=Zt(p({},rn,{relatedTarget:0})),un=Zt(p({},tn,{animationName:0,elapsedTime:0,pseudoElement:0})),dn=Zt(p({},tn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),fn=Zt(p({},tn,{data:0})),pn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},gn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=gn[e])&&!!t[e]}function bn(){return mn}var vn=Zt(p({},rn,{key:function(e){if(e.key){var t=pn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Kt(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?hn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:bn,charCode:function(e){return"keypress"===e.type?Kt(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Kt(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),yn=Zt(p({},an,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),xn=Zt(p({},rn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:bn})),wn=Zt(p({},tn,{propertyName:0,elapsedTime:0,pseudoElement:0})),kn=Zt(p({},an,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Sn=Zt(p({},tn,{newState:0,oldState:0})),Cn=[9,13,27,32],_n=Bt&&"CompositionEvent"in window,An=null;Bt&&"documentMode"in document&&(An=document.documentMode);var En=Bt&&"TextEvent"in window&&!An,Tn=Bt&&(!_n||An&&8<An&&11>=An),jn=String.fromCharCode(32),In=!1;function On(e,t){switch(e){case"keyup":return-1!==Cn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ln(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Pn=!1,Mn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Nn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Mn[e.type]:"textarea"===t}function zn(e,t,n,r){Nt?zt?zt.push(r):zt=[r]:Nt=r,0<(t=rd(t,"onChange")).length&&(n=new nn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Rn=null,$n=null;function Dn(e){Yu(e,0)}function Fn(e){if(ht(Qe(e)))return e}function Bn(e,t){if("change"===e)return t}var Hn=!1;if(Bt){var Un;if(Bt){var Vn="oninput"in document;if(!Vn){var Wn=document.createElement("div");Wn.setAttribute("oninput","return;"),Vn="function"==typeof Wn.oninput}Un=Vn}else Un=!1;Hn=Un&&(!document.documentMode||9<document.documentMode)}function Gn(){Rn&&(Rn.detachEvent("onpropertychange",qn),$n=Rn=null)}function qn(e){if("value"===e.propertyName&&Fn($n)){var t=[];zn(t,$n,e,Mt(e)),Dt(Dn,t)}}function Kn(e,t,n){"focusin"===e?(Gn(),$n=n,(Rn=t).attachEvent("onpropertychange",qn)):"focusout"===e&&Gn()}function Yn(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Fn($n)}function Xn(e,t){if("click"===e)return Fn(t)}function Zn(e,t){if("input"===e||"change"===e)return Fn(t)}var Qn="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function Jn(e,t){if(Qn(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!re.call(t,o)||!Qn(e[o],t[o]))return!1}return!0}function er(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function tr(e,t){var n,r=er(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=er(r)}}function nr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?nr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function rr(e){for(var t=gt((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=gt((e=t.contentWindow).document)}return t}function or(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var ir=Bt&&"documentMode"in document&&11>=document.documentMode,ar=null,sr=null,lr=null,cr=!1;function ur(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;cr||null==ar||ar!==gt(r)||(r="selectionStart"in(r=ar)&&or(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},lr&&Jn(lr,r)||(lr=r,0<(r=rd(sr,"onSelect")).length&&(t=new nn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ar)))}function dr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var fr={animationend:dr("Animation","AnimationEnd"),animationiteration:dr("Animation","AnimationIteration"),animationstart:dr("Animation","AnimationStart"),transitionrun:dr("Transition","TransitionRun"),transitionstart:dr("Transition","TransitionStart"),transitioncancel:dr("Transition","TransitionCancel"),transitionend:dr("Transition","TransitionEnd")},pr={},hr={};function gr(e){if(pr[e])return pr[e];if(!fr[e])return e;var t,n=fr[e];for(t in n)if(n.hasOwnProperty(t)&&t in hr)return pr[e]=n[t];return e}Bt&&(hr=document.createElement("div").style,"AnimationEvent"in window||(delete fr.animationend.animation,delete fr.animationiteration.animation,delete fr.animationstart.animation),"TransitionEvent"in window||delete fr.transitionend.transition);var mr=gr("animationend"),br=gr("animationiteration"),vr=gr("animationstart"),yr=gr("transitionrun"),xr=gr("transitionstart"),wr=gr("transitioncancel"),kr=gr("transitionend"),Sr=new Map,Cr="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function _r(e,t){Sr.set(e,t),rt(t,[e])}Cr.push("scrollEnd");var Ar="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof r&&"function"==typeof r.emit)return void r.emit("uncaughtException",e);console.error(e)},Er=[],Tr=0,jr=0;function Ir(){for(var e=Tr,t=jr=Tr=0;t<e;){var n=Er[t];Er[t++]=null;var r=Er[t];Er[t++]=null;var o=Er[t];Er[t++]=null;var i=Er[t];if(Er[t++]=null,null!==r&&null!==o){var a=r.pending;null===a?o.next=o:(o.next=a.next,a.next=o),r.pending=o}0!==i&&Mr(n,o,i)}}function Or(e,t,n,r){Er[Tr++]=e,Er[Tr++]=t,Er[Tr++]=n,Er[Tr++]=r,jr|=r,e.lanes|=r,null!==(e=e.alternate)&&(e.lanes|=r)}function Lr(e,t,n,r){return Or(e,t,n,r),Nr(e)}function Pr(e,t){return Or(e,null,null,t),Nr(e)}function Mr(e,t,n){e.lanes|=n;var r=e.alternate;null!==r&&(r.lanes|=n);for(var o=!1,i=e.return;null!==i;)i.childLanes|=n,null!==(r=i.alternate)&&(r.childLanes|=n),22===i.tag&&(null===(e=i.stateNode)||1&e._visibility||(o=!0)),e=i,i=i.return;return 3===e.tag?(i=e.stateNode,o&&null!==t&&(o=31-xe(n),null===(r=(e=i.hiddenUpdates)[o])?e[o]=[t]:r.push(t),t.lane=536870912|n),i):null}function Nr(e){if(50<Vc)throw Vc=0,Wc=null,Error(s(185));for(var t=e.return;null!==t;)t=(e=t).return;return 3===e.tag?e.stateNode:null}var zr={};function Rr(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $r(e,t,n,r){return new Rr(e,t,n,r)}function Dr(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Fr(e,t){var n=e.alternate;return null===n?((n=$r(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=65011712&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Br(e,t){e.flags&=65011714;var n=e.alternate;return null===n?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Hr(e,t,n,r,o,i){var a=0;if(r=e,"function"==typeof e)Dr(e)&&(a=1);else if("string"==typeof e)a=function(e,t,n){if(1===n||null!=t.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":if("string"!=typeof t.precedence||"string"!=typeof t.href||""===t.href)break;return!0;case"link":if("string"!=typeof t.rel||"string"!=typeof t.href||""===t.href||t.onLoad||t.onError)break;return"stylesheet"!==t.rel||(e=t.disabled,"string"==typeof t.precedence&&null==e);case"script":if(t.async&&"function"!=typeof t.async&&"symbol"!=typeof t.async&&!t.onLoad&&!t.onError&&t.src&&"string"==typeof t.src)return!0}return!1}(e,n,V.current)?26:"html"===e||"head"===e||"body"===e?27:5;else e:switch(e){case E:return(e=$r(31,n,t,o)).elementType=E,e.lanes=i,e;case b:return Ur(n.children,o,i,t);case v:a=8,o|=24;break;case y:return(e=$r(12,n,t,2|o)).elementType=y,e.lanes=i,e;case S:return(e=$r(13,n,t,o)).elementType=S,e.lanes=i,e;case C:return(e=$r(19,n,t,o)).elementType=C,e.lanes=i,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case w:a=10;break e;case x:a=9;break e;case k:a=11;break e;case _:a=14;break e;case A:a=16,r=null;break e}a=29,n=Error(s(130,null===e?"null":typeof e,"")),r=null}return(t=$r(a,n,t,o)).elementType=e,t.type=r,t.lanes=i,t}function Ur(e,t,n,r){return(e=$r(7,e,r,t)).lanes=n,e}function Vr(e,t,n){return(e=$r(6,e,null,t)).lanes=n,e}function Wr(e){var t=$r(18,null,null,0);return t.stateNode=e,t}function Gr(e,t,n){return(t=$r(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var qr=new WeakMap;function Kr(e,t){if("object"==typeof e&&null!==e){var n=qr.get(e);return void 0!==n?n:(t={value:e,source:t,stack:ne(t)},qr.set(e,t),t)}return{value:e,source:t,stack:ne(t)}}var Yr=[],Xr=0,Zr=null,Qr=0,Jr=[],eo=0,to=null,no=1,ro="";function oo(e,t){Yr[Xr++]=Qr,Yr[Xr++]=Zr,Zr=e,Qr=t}function io(e,t,n){Jr[eo++]=no,Jr[eo++]=ro,Jr[eo++]=to,to=e;var r=no;e=ro;var o=32-xe(r)-1;r&=~(1<<o),n+=1;var i=32-xe(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,no=1<<32-xe(t)+o|n<<o|r,ro=i+e}else no=1<<i|n<<o|r,ro=e}function ao(e){null!==e.return&&(oo(e,1),io(e,1,0))}function so(e){for(;e===Zr;)Zr=Yr[--Xr],Yr[Xr]=null,Qr=Yr[--Xr],Yr[Xr]=null;for(;e===to;)to=Jr[--eo],Jr[eo]=null,ro=Jr[--eo],Jr[eo]=null,no=Jr[--eo],Jr[eo]=null}function lo(e,t){Jr[eo++]=no,Jr[eo++]=ro,Jr[eo++]=to,no=t.id,ro=t.overflow,to=e}var co=null,uo=null,fo=!1,po=null,ho=!1,go=Error(s(519));function mo(e){throw ko(Kr(Error(s(418,1<arguments.length&&void 0!==arguments[1]&&arguments[1]?"text":"HTML","")),e)),go}function bo(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Be]=e,t[He]=r,n){case"dialog":Xu("cancel",t),Xu("close",t);break;case"iframe":case"object":case"embed":Xu("load",t);break;case"video":case"audio":for(n=0;n<qu.length;n++)Xu(qu[n],t);break;case"source":Xu("error",t);break;case"img":case"image":case"link":Xu("error",t),Xu("load",t);break;case"details":Xu("toggle",t);break;case"input":Xu("invalid",t),yt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Xu("invalid",t);break;case"textarea":Xu("invalid",t),St(t,r.value,r.defaultValue,r.children)}"string"!=typeof(n=r.children)&&"number"!=typeof n&&"bigint"!=typeof n||t.textContent===""+n||!0===r.suppressHydrationWarning||cd(t.textContent,n)?(null!=r.popover&&(Xu("beforetoggle",t),Xu("toggle",t)),null!=r.onScroll&&Xu("scroll",t),null!=r.onScrollEnd&&Xu("scrollend",t),null!=r.onClick&&(t.onclick=Lt),t=!0):t=!1,t||mo(e,!0)}function vo(e){for(co=e.return;co;)switch(co.tag){case 5:case 31:case 13:return void(ho=!1);case 27:case 3:return void(ho=!0);default:co=co.return}}function yo(e){if(e!==co)return!1;if(!fo)return vo(e),fo=!0,!1;var t,n=e.tag;if((t=3!==n&&27!==n)&&((t=5===n)&&(t=!("form"!==(t=e.type)&&"button"!==t)||yd(e.type,e.memoizedProps)),t=!t),t&&uo&&mo(e),vo(e),13===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(s(317));uo=Nd(e)}else if(31===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(s(317));uo=Nd(e)}else 27===n?(n=uo,Ad(e.type)?(e=Md,Md=null,uo=e):uo=n):uo=co?Pd(e.stateNode.nextSibling):null;return!0}function xo(){uo=co=null,fo=!1}function wo(){var e=po;return null!==e&&(null===Ic?Ic=e:Ic.push.apply(Ic,e),po=null),e}function ko(e){null===po?po=[e]:po.push(e)}var So=D(null),Co=null,_o=null;function Ao(e,t,n){B(So,t._currentValue),t._currentValue=n}function Eo(e){e._currentValue=So.current,F(So)}function To(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function jo(e,t,n,r){var o=e.child;for(null!==o&&(o.return=e);null!==o;){var i=o.dependencies;if(null!==i){var a=o.child;i=i.firstContext;e:for(;null!==i;){var l=i;i=o;for(var c=0;c<t.length;c++)if(l.context===t[c]){i.lanes|=n,null!==(l=i.alternate)&&(l.lanes|=n),To(i.return,n,e),r||(a=null);break e}i=l.next}}else if(18===o.tag){if(null===(a=o.return))throw Error(s(341));a.lanes|=n,null!==(i=a.alternate)&&(i.lanes|=n),To(a,n,e),a=null}else a=o.child;if(null!==a)a.return=o;else for(a=o;null!==a;){if(a===e){a=null;break}if(null!==(o=a.sibling)){o.return=a.return,a=o;break}a=a.return}o=a}}function Io(e,t,n,r){e=null;for(var o=t,i=!1;null!==o;){if(!i)if(524288&o.flags)i=!0;else if(262144&o.flags)break;if(10===o.tag){var a=o.alternate;if(null===a)throw Error(s(387));if(null!==(a=a.memoizedProps)){var l=o.type;Qn(o.pendingProps.value,a.value)||(null!==e?e.push(l):e=[l])}}else if(o===q.current){if(null===(a=o.alternate))throw Error(s(387));a.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(null!==e?e.push(df):e=[df])}o=o.return}null!==e&&jo(t,e,n,r),t.flags|=262144}function Oo(e){for(e=e.firstContext;null!==e;){if(!Qn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Lo(e){Co=e,_o=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function Po(e){return No(Co,e)}function Mo(e,t){return null===Co&&Lo(e),No(e,t)}function No(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},null===_o){if(null===e)throw Error(s(308));_o=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else _o=_o.next=t;return n}var zo="undefined"!=typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Ro=o.unstable_scheduleCallback,$o=o.unstable_NormalPriority,Do={$$typeof:w,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Fo(){return{controller:new zo,data:new Map,refCount:0}}function Bo(e){e.refCount--,0===e.refCount&&Ro($o,function(){e.controller.abort()})}var Ho=null,Uo=0,Vo=0,Wo=null;function Go(){if(0===--Uo&&null!==Ho){null!==Wo&&(Wo.status="fulfilled");var e=Ho;Ho=null,Vo=0,Wo=null;for(var t=0;t<e.length;t++)(0,e[t])()}}var qo=M.S;M.S=function(e,t){Pc=le(),"object"==typeof t&&null!==t&&"function"==typeof t.then&&function(e,t){if(null===Ho){var n=Ho=[];Uo=0,Vo=Hu(),Wo={status:"pending",value:void 0,then:function(e){n.push(e)}}}Uo++,t.then(Go,Go)}(0,t),null!==qo&&qo(e,t)};var Ko=D(null);function Yo(){var e=Ko.current;return null!==e?e:hc.pooledCache}function Xo(e,t){B(Ko,null===t?Ko.current:t.pool)}function Zo(){var e=Yo();return null===e?null:{parent:Do._currentValue,pool:e}}var Qo=Error(s(460)),Jo=Error(s(474)),ei=Error(s(542)),ti={then:function(){}};function ni(e){return"fulfilled"===(e=e.status)||"rejected"===e}function ri(e,t,n){switch(void 0===(n=e[n])?e.push(t):n!==t&&(t.then(Lt,Lt),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw si(e=t.reason),e;default:if("string"==typeof t.status)t.then(Lt,Lt);else{if(null!==(e=hc)&&100<e.shellSuspendCounter)throw Error(s(482));(e=t).status="pending",e.then(function(e){if("pending"===t.status){var n=t;n.status="fulfilled",n.value=e}},function(e){if("pending"===t.status){var n=t;n.status="rejected",n.reason=e}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw si(e=t.reason),e}throw ii=t,Qo}}function oi(e){try{return(0,e._init)(e._payload)}catch(e){if(null!==e&&"object"==typeof e&&"function"==typeof e.then)throw ii=e,Qo;throw e}}var ii=null;function ai(){if(null===ii)throw Error(s(459));var e=ii;return ii=null,e}function si(e){if(e===Qo||e===ei)throw Error(s(483))}var li=null,ci=0;function ui(e){var t=ci;return ci+=1,null===li&&(li=[]),ri(li,e,t)}function di(e,t){t=t.props.ref,e.ref=void 0!==t?t:null}function fi(e,t){if(t.$$typeof===h)throw Error(s(525));throw e=Object.prototype.toString.call(t),Error(s(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function pi(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function o(e,t){return(e=Fr(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=67108866,n):r:(t.flags|=67108866,n):(t.flags|=1048576,n)}function a(t){return e&&null===t.alternate&&(t.flags|=67108866),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Vr(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function c(e,t,n,r){var i=n.type;return i===b?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===i||"object"==typeof i&&null!==i&&i.$$typeof===A&&oi(i)===t.type)?(di(t=o(t,n.props),n),t.return=e,t):(di(t=Hr(n.type,n.key,n.props,null,e.mode,r),n),t.return=e,t)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Gr(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function d(e,t,n,r,i){return null===t||7!==t.tag?((t=Ur(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function f(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t||"bigint"==typeof t)return(t=Vr(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case g:return di(n=Hr(t.type,t.key,t.props,null,e.mode,n),t),n.return=e,n;case m:return(t=Gr(t,e.mode,n)).return=e,t;case A:return f(e,t=oi(t),n)}if(P(t)||I(t))return(t=Ur(t,e.mode,n,null)).return=e,t;if("function"==typeof t.then)return f(e,ui(t),n);if(t.$$typeof===w)return f(e,Mo(e,t),n);fi(e,t)}return null}function p(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n||"bigint"==typeof n)return null!==o?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case g:return n.key===o?c(e,t,n,r):null;case m:return n.key===o?u(e,t,n,r):null;case A:return p(e,t,n=oi(n),r)}if(P(n)||I(n))return null!==o?null:d(e,t,n,r,null);if("function"==typeof n.then)return p(e,t,ui(n),r);if(n.$$typeof===w)return p(e,t,Mo(e,n),r);fi(e,n)}return null}function h(e,t,n,r,o){if("string"==typeof r&&""!==r||"number"==typeof r||"bigint"==typeof r)return l(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case g:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o);case m:return u(t,e=e.get(null===r.key?n:r.key)||null,r,o);case A:return h(e,t,n,r=oi(r),o)}if(P(r)||I(r))return d(t,e=e.get(n)||null,r,o,null);if("function"==typeof r.then)return h(e,t,n,ui(r),o);if(r.$$typeof===w)return h(e,t,n,Mo(t,r),o);fi(t,r)}return null}function v(l,c,u,d){if("object"==typeof u&&null!==u&&u.type===b&&null===u.key&&(u=u.props.children),"object"==typeof u&&null!==u){switch(u.$$typeof){case g:e:{for(var y=u.key;null!==c;){if(c.key===y){if((y=u.type)===b){if(7===c.tag){n(l,c.sibling),(d=o(c,u.props.children)).return=l,l=d;break e}}else if(c.elementType===y||"object"==typeof y&&null!==y&&y.$$typeof===A&&oi(y)===c.type){n(l,c.sibling),di(d=o(c,u.props),u),d.return=l,l=d;break e}n(l,c);break}t(l,c),c=c.sibling}u.type===b?((d=Ur(u.props.children,l.mode,d,u.key)).return=l,l=d):(di(d=Hr(u.type,u.key,u.props,null,l.mode,d),u),d.return=l,l=d)}return a(l);case m:e:{for(y=u.key;null!==c;){if(c.key===y){if(4===c.tag&&c.stateNode.containerInfo===u.containerInfo&&c.stateNode.implementation===u.implementation){n(l,c.sibling),(d=o(c,u.children||[])).return=l,l=d;break e}n(l,c);break}t(l,c),c=c.sibling}(d=Gr(u,l.mode,d)).return=l,l=d}return a(l);case A:return v(l,c,u=oi(u),d)}if(P(u))return function(o,a,s,l){for(var c=null,u=null,d=a,g=a=0,m=null;null!==d&&g<s.length;g++){d.index>g?(m=d,d=null):m=d.sibling;var b=p(o,d,s[g],l);if(null===b){null===d&&(d=m);break}e&&d&&null===b.alternate&&t(o,d),a=i(b,a,g),null===u?c=b:u.sibling=b,u=b,d=m}if(g===s.length)return n(o,d),fo&&oo(o,g),c;if(null===d){for(;g<s.length;g++)null!==(d=f(o,s[g],l))&&(a=i(d,a,g),null===u?c=d:u.sibling=d,u=d);return fo&&oo(o,g),c}for(d=r(d);g<s.length;g++)null!==(m=h(d,o,g,s[g],l))&&(e&&null!==m.alternate&&d.delete(null===m.key?g:m.key),a=i(m,a,g),null===u?c=m:u.sibling=m,u=m);return e&&d.forEach(function(e){return t(o,e)}),fo&&oo(o,g),c}(l,c,u,d);if(I(u)){if("function"!=typeof(y=I(u)))throw Error(s(150));return function(o,a,l,c){if(null==l)throw Error(s(151));for(var u=null,d=null,g=a,m=a=0,b=null,v=l.next();null!==g&&!v.done;m++,v=l.next()){g.index>m?(b=g,g=null):b=g.sibling;var y=p(o,g,v.value,c);if(null===y){null===g&&(g=b);break}e&&g&&null===y.alternate&&t(o,g),a=i(y,a,m),null===d?u=y:d.sibling=y,d=y,g=b}if(v.done)return n(o,g),fo&&oo(o,m),u;if(null===g){for(;!v.done;m++,v=l.next())null!==(v=f(o,v.value,c))&&(a=i(v,a,m),null===d?u=v:d.sibling=v,d=v);return fo&&oo(o,m),u}for(g=r(g);!v.done;m++,v=l.next())null!==(v=h(g,o,m,v.value,c))&&(e&&null!==v.alternate&&g.delete(null===v.key?m:v.key),a=i(v,a,m),null===d?u=v:d.sibling=v,d=v);return e&&g.forEach(function(e){return t(o,e)}),fo&&oo(o,m),u}(l,c,u=y.call(u),d)}if("function"==typeof u.then)return v(l,c,ui(u),d);if(u.$$typeof===w)return v(l,c,Mo(l,u),d);fi(l,u)}return"string"==typeof u&&""!==u||"number"==typeof u||"bigint"==typeof u?(u=""+u,null!==c&&6===c.tag?(n(l,c.sibling),(d=o(c,u)).return=l,l=d):(n(l,c),(d=Vr(u,l.mode,d)).return=l,l=d),a(l)):n(l,c)}return function(e,t,n,r){try{ci=0;var o=v(e,t,n,r);return li=null,o}catch(t){if(t===Qo||t===ei)throw t;var i=$r(29,t,null,e.mode);return i.lanes=r,i.return=e,i}}}var hi=pi(!0),gi=pi(!1),mi=!1;function bi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vi(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function yi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function xi(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&pc){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,t=Nr(e),Mr(e,null,n),t}return Or(e,r,t,n),Nr(e)}function wi(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194048&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Me(e,n)}}function ki(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var a={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===i?o=i=a:i=i.next=a,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,callbacks:r.callbacks},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Si=!1;function Ci(){if(Si&&null!==Wo)throw Wo}function _i(e,t,n,r){Si=!1;var o=e.updateQueue;mi=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(null!==s){o.shared.pending=null;var l=s,c=l.next;l.next=null,null===a?i=c:a.next=c,a=l;var u=e.alternate;null!==u&&(s=(u=u.updateQueue).lastBaseUpdate)!==a&&(null===s?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l)}if(null!==i){var d=o.baseState;for(a=0,u=c=l=null,s=i;;){var f=-536870913&s.lane,h=f!==s.lane;if(h?(mc&f)===f:(r&f)===f){0!==f&&f===Vo&&(Si=!0),null!==u&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var g=e,m=s;f=t;var b=n;switch(m.tag){case 1:if("function"==typeof(g=m.payload)){d=g.call(b,d,f);break e}d=g;break e;case 3:g.flags=-65537&g.flags|128;case 0:if(null==(f="function"==typeof(g=m.payload)?g.call(b,d,f):g))break e;d=p({},d,f);break e;case 2:mi=!0}}null!==(f=s.callback)&&(e.flags|=64,h&&(e.flags|=8192),null===(h=o.callbacks)?o.callbacks=[f]:h.push(f))}else h={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=h,l=d):u=u.next=h,a|=f;if(null===(s=s.next)){if(null===(s=o.shared.pending))break;s=(h=s).next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}null===u&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,null===i&&(o.shared.lanes=0),Cc|=a,e.lanes=a,e.memoizedState=d}}function Ai(e,t){if("function"!=typeof e)throw Error(s(191,e));e.call(t)}function Ei(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;e<n.length;e++)Ai(n[e],t)}var Ti=D(null),ji=D(0);function Ii(e,t){B(ji,e=kc),B(Ti,t),kc=e|t.baseLanes}function Oi(){B(ji,kc),B(Ti,Ti.current)}function Li(){kc=ji.current,F(Ti),F(ji)}var Pi=D(null),Mi=null;function Ni(e){var t=e.alternate;B(Fi,1&Fi.current),B(Pi,e),null===Mi&&(null===t||null!==Ti.current||null!==t.memoizedState)&&(Mi=e)}function zi(e){B(Fi,Fi.current),B(Pi,e),null===Mi&&(Mi=e)}function Ri(e){22===e.tag?(B(Fi,Fi.current),B(Pi,e),null===Mi&&(Mi=e)):$i()}function $i(){B(Fi,Fi.current),B(Pi,Pi.current)}function Di(e){F(Pi),Mi===e&&(Mi=null),F(Fi)}var Fi=D(0);function Bi(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||Od(n)||Ld(n)))return t}else if(19!==t.tag||"forwards"!==t.memoizedProps.revealOrder&&"backwards"!==t.memoizedProps.revealOrder&&"unstable_legacy-backwards"!==t.memoizedProps.revealOrder&&"together"!==t.memoizedProps.revealOrder){if(null!==t.child){t.child.return=t,t=t.child;continue}}else if(128&t.flags)return t;if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Hi=0,Ui=null,Vi=null,Wi=null,Gi=!1,qi=!1,Ki=!1,Yi=0,Xi=0,Zi=null,Qi=0;function Ji(){throw Error(s(321))}function ea(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Qn(e[n],t[n]))return!1;return!0}function ta(e,t,n,r,o,i){return Hi=i,Ui=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=null===e||null===e.memoizedState?ms:bs,Ki=!1,i=n(r,o),Ki=!1,qi&&(i=ra(t,n,r,o)),na(e),i}function na(e){M.H=gs;var t=null!==Vi&&null!==Vi.next;if(Hi=0,Wi=Vi=Ui=null,Gi=!1,Xi=0,Zi=null,t)throw Error(s(300));null===e||Ps||null!==(e=e.dependencies)&&Oo(e)&&(Ps=!0)}function ra(e,t,n,r){Ui=e;var o=0;do{if(qi&&(Zi=null),Xi=0,qi=!1,25<=o)throw Error(s(301));if(o+=1,Wi=Vi=null,null!=e.updateQueue){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,null!=i.memoCache&&(i.memoCache.index=0)}M.H=vs,i=t(n,r)}while(qi);return i}function oa(){var e=M.H,t=e.useState()[0];return t="function"==typeof t.then?ua(t):t,e=e.useState()[0],(null!==Vi?Vi.memoizedState:null)!==e&&(Ui.flags|=1024),t}function ia(){var e=0!==Yi;return Yi=0,e}function aa(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function sa(e){if(Gi){for(e=e.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}Gi=!1}Hi=0,Wi=Vi=Ui=null,qi=!1,Xi=Yi=0,Zi=null}function la(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Wi?Ui.memoizedState=Wi=e:Wi=Wi.next=e,Wi}function ca(){if(null===Vi){var e=Ui.alternate;e=null!==e?e.memoizedState:null}else e=Vi.next;var t=null===Wi?Ui.memoizedState:Wi.next;if(null!==t)Wi=t,Vi=e;else{if(null===e){if(null===Ui.alternate)throw Error(s(467));throw Error(s(310))}e={memoizedState:(Vi=e).memoizedState,baseState:Vi.baseState,baseQueue:Vi.baseQueue,queue:Vi.queue,next:null},null===Wi?Ui.memoizedState=Wi=e:Wi=Wi.next=e}return Wi}function ua(e){var t=Xi;return Xi+=1,null===Zi&&(Zi=[]),e=ri(Zi,e,t),t=Ui,null===(null===Wi?t.memoizedState:Wi.next)&&(t=t.alternate,M.H=null===t||null===t.memoizedState?ms:bs),e}function da(e){if(null!==e&&"object"==typeof e){if("function"==typeof e.then)return ua(e);if(e.$$typeof===w)return Po(e)}throw Error(s(438,String(e)))}function fa(e){var t=null,n=Ui.updateQueue;if(null!==n&&(t=n.memoCache),null==t){var r=Ui.alternate;null!==r&&null!==(r=r.updateQueue)&&null!=(r=r.memoCache)&&(t={data:r.data.map(function(e){return e.slice()}),index:0})}if(null==t&&(t={data:[],index:0}),null===n&&(n={lastEffect:null,events:null,stores:null,memoCache:null},Ui.updateQueue=n),n.memoCache=t,void 0===(n=t.data[t.index]))for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=T;return t.index++,n}function pa(e,t){return"function"==typeof t?t(e):t}function ha(e){return ga(ca(),Vi,e)}function ga(e,t,n){var r=e.queue;if(null===r)throw Error(s(311));r.lastRenderedReducer=n;var o=e.baseQueue,i=r.pending;if(null!==i){if(null!==o){var a=o.next;o.next=i.next,i.next=a}t.baseQueue=o=i,r.pending=null}if(i=e.baseState,null===o)e.memoizedState=i;else{var l=a=null,c=null,u=t=o.next,d=!1;do{var f=-536870913&u.lane;if(f!==u.lane?(mc&f)===f:(Hi&f)===f){var p=u.revertLane;if(0===p)null!==c&&(c=c.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Vo&&(d=!0);else{if((Hi&p)===p){u=u.next,p===Vo&&(d=!0);continue}f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},null===c?(l=c=f,a=i):c=c.next=f,Ui.lanes|=p,Cc|=p}f=u.action,Ki&&n(i,f),i=u.hasEagerState?u.eagerState:n(i,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},null===c?(l=c=p,a=i):c=c.next=p,Ui.lanes|=f,Cc|=f;u=u.next}while(null!==u&&u!==t);if(null===c?a=i:c.next=l,!Qn(i,e.memoizedState)&&(Ps=!0,d&&null!==(n=Wo)))throw n;e.memoizedState=i,e.baseState=a,e.baseQueue=c,r.lastRenderedState=i}return null===o&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ma(e){var t=ca(),n=t.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var a=o=o.next;do{i=e(i,a.action),a=a.next}while(a!==o);Qn(i,t.memoizedState)||(Ps=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function ba(e,t,n){var r=Ui,o=ca(),i=fo;if(i){if(void 0===n)throw Error(s(407));n=n()}else n=t();var a=!Qn((Vi||o).memoizedState,n);if(a&&(o.memoizedState=n,Ps=!0),o=o.queue,Ha(xa.bind(null,r,o,e),[e]),o.getSnapshot!==t||a||null!==Wi&&1&Wi.memoizedState.tag){if(r.flags|=2048,Ra(9,{destroy:void 0},ya.bind(null,r,o,n,t),null),null===hc)throw Error(s(349));i||127&Hi||va(r,t,n)}return n}function va(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=Ui.updateQueue)?(t={lastEffect:null,events:null,stores:null,memoCache:null},Ui.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function ya(e,t,n,r){t.value=n,t.getSnapshot=r,wa(t)&&ka(e)}function xa(e,t,n){return n(function(){wa(t)&&ka(e)})}function wa(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Qn(e,n)}catch(e){return!0}}function ka(e){var t=Pr(e,2);null!==t&&Kc(t,0,2)}function Sa(e){var t=la();if("function"==typeof e){var n=e;if(e=n(),Ki){ye(!0);try{n()}finally{ye(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pa,lastRenderedState:e},t}function Ca(e,t,n,r){return e.baseState=n,ga(e,Vi,"function"==typeof r?r:pa)}function _a(e,t,n,r,o){if(fs(e))throw Error(s(485));if(null!==(e=t.action)){var i={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(e){i.listeners.push(e)}};null!==M.T?n(!0):i.isTransition=!1,r(i),null===(n=t.pending)?(i.next=t.pending=i,Aa(t,i)):(i.next=n.next,t.pending=n.next=i)}}function Aa(e,t){var n=t.action,r=t.payload,o=e.state;if(t.isTransition){var i=M.T,a={};M.T=a;try{var s=n(o,r),l=M.S;null!==l&&l(a,s),Ea(e,t,s)}catch(n){ja(e,t,n)}finally{null!==i&&null!==a.types&&(i.types=a.types),M.T=i}}else try{Ea(e,t,i=n(o,r))}catch(n){ja(e,t,n)}}function Ea(e,t,n){null!==n&&"object"==typeof n&&"function"==typeof n.then?n.then(function(n){Ta(e,t,n)},function(n){return ja(e,t,n)}):Ta(e,t,n)}function Ta(e,t,n){t.status="fulfilled",t.value=n,Ia(t),e.state=n,null!==(t=e.pending)&&((n=t.next)===t?e.pending=null:(n=n.next,t.next=n,Aa(e,n)))}function ja(e,t,n){var r=e.pending;if(e.pending=null,null!==r){r=r.next;do{t.status="rejected",t.reason=n,Ia(t),t=t.next}while(t!==r)}e.action=null}function Ia(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Oa(e,t){return t}function La(e,t){if(fo){var n=hc.formState;if(null!==n){e:{var r=Ui;if(fo){if(uo){t:{for(var o=uo,i=ho;8!==o.nodeType;){if(!i){o=null;break t}if(null===(o=Pd(o.nextSibling))){o=null;break t}}o="F!"===(i=o.data)||"F"===i?o:null}if(o){uo=Pd(o.nextSibling),r="F!"===o.data;break e}}mo(r)}r=!1}r&&(t=n[0])}}return(n=la()).memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oa,lastRenderedState:t},n.queue=r,n=cs.bind(null,Ui,r),r.dispatch=n,r=Sa(!1),i=ds.bind(null,Ui,!1,r.queue),o={state:t,dispatch:null,action:e,pending:null},(r=la()).queue=o,n=_a.bind(null,Ui,o,i,n),o.dispatch=n,r.memoizedState=e,[t,n,!1]}function Pa(e){return Ma(ca(),Vi,e)}function Ma(e,t,n){if(t=ga(e,t,Oa)[0],e=ha(pa)[0],"object"==typeof t&&null!==t&&"function"==typeof t.then)try{var r=ua(t)}catch(e){if(e===Qo)throw ei;throw e}else r=t;var o=(t=ca()).queue,i=o.dispatch;return n!==t.memoizedState&&(Ui.flags|=2048,Ra(9,{destroy:void 0},Na.bind(null,o,n),null)),[r,i,e]}function Na(e,t){e.action=t}function za(e){var t=ca(),n=Vi;if(null!==n)return Ma(t,n,e);ca(),t=t.memoizedState;var r=(n=ca()).queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ra(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},null===(t=Ui.updateQueue)&&(t={lastEffect:null,events:null,stores:null,memoCache:null},Ui.updateQueue=t),null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function $a(){return ca().memoizedState}function Da(e,t,n,r){var o=la();Ui.flags|=e,o.memoizedState=Ra(1|t,{destroy:void 0},n,void 0===r?null:r)}function Fa(e,t,n,r){var o=ca();r=void 0===r?null:r;var i=o.memoizedState.inst;null!==Vi&&null!==r&&ea(r,Vi.memoizedState.deps)?o.memoizedState=Ra(t,i,n,r):(Ui.flags|=e,o.memoizedState=Ra(1|t,i,n,r))}function Ba(e,t){Da(8390656,8,e,t)}function Ha(e,t){Fa(2048,8,e,t)}function Ua(e){var t=ca().memoizedState;return function(e){Ui.flags|=4;var t=Ui.updateQueue;if(null===t)t={lastEffect:null,events:null,stores:null,memoCache:null},Ui.updateQueue=t,t.events=[e];else{var n=t.events;null===n?t.events=[e]:n.push(e)}}({ref:t,nextImpl:e}),function(){if(2&pc)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function Va(e,t){return Fa(4,2,e,t)}function Wa(e,t){return Fa(4,4,e,t)}function Ga(e,t){if("function"==typeof t){e=e();var n=t(e);return function(){"function"==typeof n?n():t(null)}}if(null!=t)return e=e(),t.current=e,function(){t.current=null}}function qa(e,t,n){n=null!=n?n.concat([e]):null,Fa(4,4,Ga.bind(null,t,e),n)}function Ka(){}function Ya(e,t){var n=ca();t=void 0===t?null:t;var r=n.memoizedState;return null!==t&&ea(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Xa(e,t){var n=ca();t=void 0===t?null:t;var r=n.memoizedState;if(null!==t&&ea(t,r[1]))return r[0];if(r=e(),Ki){ye(!0);try{e()}finally{ye(!1)}}return n.memoizedState=[r,t],r}function Za(e,t,n){return void 0===n||1073741824&Hi&&!(261930&mc)?e.memoizedState=t:(e.memoizedState=n,e=qc(),Ui.lanes|=e,Cc|=e,n)}function Qa(e,t,n,r){return Qn(n,t)?n:null!==Ti.current?(e=Za(e,n,r),Qn(e,t)||(Ps=!0),e):42&Hi&&(!(1073741824&Hi)||261930&mc)?(e=qc(),Ui.lanes|=e,Cc|=e,t):(Ps=!0,e.memoizedState=n)}function Ja(e,t,n,r,o){var i=N.p;N.p=0!==i&&8>i?i:8;var a,s,l,c=M.T,u={};M.T=u,ds(e,!1,t,n);try{var d=o(),f=M.S;null!==f&&f(u,d),null!==d&&"object"==typeof d&&"function"==typeof d.then?us(e,t,(a=r,s=[],l={status:"pending",value:null,reason:null,then:function(e){s.push(e)}},d.then(function(){l.status="fulfilled",l.value=a;for(var e=0;e<s.length;e++)(0,s[e])(a)},function(e){for(l.status="rejected",l.reason=e,e=0;e<s.length;e++)(0,s[e])(void 0)}),l),Gc()):us(e,t,r,Gc())}catch(n){us(e,t,{then:function(){},status:"rejected",reason:n},Gc())}finally{N.p=i,null!==c&&null!==u.types&&(c.types=u.types),M.T=c}}function es(){}function ts(e,t,n,r){if(5!==e.tag)throw Error(s(476));var o=ns(e).queue;Ja(e,o,t,z,null===n?es:function(){return rs(e),n(r)})}function ns(e){var t=e.memoizedState;if(null!==t)return t;var n={};return(t={memoizedState:z,baseState:z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pa,lastRenderedState:z},next:null}).next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pa,lastRenderedState:n},next:null},e.memoizedState=t,null!==(e=e.alternate)&&(e.memoizedState=t),t}function rs(e){var t=ns(e);null===t.next&&(t=e.alternate.memoizedState),us(e,t.next.queue,{},Gc())}function os(){return Po(df)}function is(){return ca().memoizedState}function as(){return ca().memoizedState}function ss(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=Gc(),r=xi(t,e=yi(n),n);return null!==r&&(Kc(r,0,n),wi(r,t,n)),t={cache:Fo()},void(e.payload=t)}t=t.return}}function ls(e,t,n){var r=Gc();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},fs(e)?ps(t,n):null!==(n=Lr(e,t,n,r))&&(Kc(n,0,r),hs(n,t,r))}function cs(e,t,n){us(e,t,n,Gc())}function us(e,t,n,r){var o={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(fs(e))ps(t,o);else{var i=e.alternate;if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=i(a,n);if(o.hasEagerState=!0,o.eagerState=s,Qn(s,a))return Or(e,t,o,0),null===hc&&Ir(),!1}catch(e){}if(null!==(n=Lr(e,t,o,r)))return Kc(n,0,r),hs(n,t,r),!0}return!1}function ds(e,t,n,r){if(r={lane:2,revertLane:Hu(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},fs(e)){if(t)throw Error(s(479))}else null!==(t=Lr(e,n,r,2))&&Kc(t,0,2)}function fs(e){var t=e.alternate;return e===Ui||null!==t&&t===Ui}function ps(e,t){qi=Gi=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function hs(e,t,n){if(4194048&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Me(e,n)}}var gs={readContext:Po,use:da,useCallback:Ji,useContext:Ji,useEffect:Ji,useImperativeHandle:Ji,useLayoutEffect:Ji,useInsertionEffect:Ji,useMemo:Ji,useReducer:Ji,useRef:Ji,useState:Ji,useDebugValue:Ji,useDeferredValue:Ji,useTransition:Ji,useSyncExternalStore:Ji,useId:Ji,useHostTransitionStatus:Ji,useFormState:Ji,useActionState:Ji,useOptimistic:Ji,useMemoCache:Ji,useCacheRefresh:Ji};gs.useEffectEvent=Ji;var ms={readContext:Po,use:da,useCallback:function(e,t){return la().memoizedState=[e,void 0===t?null:t],e},useContext:Po,useEffect:Ba,useImperativeHandle:function(e,t,n){n=null!=n?n.concat([e]):null,Da(4194308,4,Ga.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Da(4194308,4,e,t)},useInsertionEffect:function(e,t){Da(4,2,e,t)},useMemo:function(e,t){var n=la();t=void 0===t?null:t;var r=e();if(Ki){ye(!0);try{e()}finally{ye(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=la();if(void 0!==n){var o=n(t);if(Ki){ye(!0);try{n(t)}finally{ye(!1)}}}else o=t;return r.memoizedState=r.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},r.queue=e,e=e.dispatch=ls.bind(null,Ui,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},la().memoizedState=e},useState:function(e){var t=(e=Sa(e)).queue,n=cs.bind(null,Ui,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ka,useDeferredValue:function(e,t){return Za(la(),e,t)},useTransition:function(){var e=Sa(!1);return e=Ja.bind(null,Ui,e.queue,!0,!1),la().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Ui,o=la();if(fo){if(void 0===n)throw Error(s(407));n=n()}else{if(n=t(),null===hc)throw Error(s(349));127&mc||va(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Ba(xa.bind(null,r,i,e),[e]),r.flags|=2048,Ra(9,{destroy:void 0},ya.bind(null,r,i,n,t),null),n},useId:function(){var e=la(),t=hc.identifierPrefix;if(fo){var n=ro;t="_"+t+"R_"+(n=(no&~(1<<32-xe(no)-1)).toString(32)+n),0<(n=Yi++)&&(t+="H"+n.toString(32)),t+="_"}else t="_"+t+"r_"+(n=Qi++).toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:os,useFormState:La,useActionState:La,useOptimistic:function(e){var t=la();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=ds.bind(null,Ui,!0,n),n.dispatch=t,[e,t]},useMemoCache:fa,useCacheRefresh:function(){return la().memoizedState=ss.bind(null,Ui)},useEffectEvent:function(e){var t=la(),n={impl:e};return t.memoizedState=n,function(){if(2&pc)throw Error(s(440));return n.impl.apply(void 0,arguments)}}},bs={readContext:Po,use:da,useCallback:Ya,useContext:Po,useEffect:Ha,useImperativeHandle:qa,useInsertionEffect:Va,useLayoutEffect:Wa,useMemo:Xa,useReducer:ha,useRef:$a,useState:function(){return ha(pa)},useDebugValue:Ka,useDeferredValue:function(e,t){return Qa(ca(),Vi.memoizedState,e,t)},useTransition:function(){var e=ha(pa)[0],t=ca().memoizedState;return["boolean"==typeof e?e:ua(e),t]},useSyncExternalStore:ba,useId:is,useHostTransitionStatus:os,useFormState:Pa,useActionState:Pa,useOptimistic:function(e,t){return Ca(ca(),0,e,t)},useMemoCache:fa,useCacheRefresh:as};bs.useEffectEvent=Ua;var vs={readContext:Po,use:da,useCallback:Ya,useContext:Po,useEffect:Ha,useImperativeHandle:qa,useInsertionEffect:Va,useLayoutEffect:Wa,useMemo:Xa,useReducer:ma,useRef:$a,useState:function(){return ma(pa)},useDebugValue:Ka,useDeferredValue:function(e,t){var n=ca();return null===Vi?Za(n,e,t):Qa(n,Vi.memoizedState,e,t)},useTransition:function(){var e=ma(pa)[0],t=ca().memoizedState;return["boolean"==typeof e?e:ua(e),t]},useSyncExternalStore:ba,useId:is,useHostTransitionStatus:os,useFormState:za,useActionState:za,useOptimistic:function(e,t){var n=ca();return null!==Vi?Ca(n,0,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:fa,useCacheRefresh:as};function ys(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:p({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}vs.useEffectEvent=Ua;var xs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Gc(),o=yi(r);o.payload=t,null!=n&&(o.callback=n),null!==(t=xi(e,o,r))&&(Kc(t,0,r),wi(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Gc(),o=yi(r);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=xi(e,o,r))&&(Kc(t,0,r),wi(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Gc(),r=yi(n);r.tag=2,null!=t&&(r.callback=t),null!==(t=xi(e,r,n))&&(Kc(t,0,n),wi(t,e,n))}};function ws(e,t,n,r,o,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!(t.prototype&&t.prototype.isPureReactComponent&&Jn(n,r)&&Jn(o,i))}function ks(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&xs.enqueueReplaceState(t,t.state,null)}function Ss(e,t){var n=t;if("ref"in t)for(var r in n={},t)"ref"!==r&&(n[r]=t[r]);if(e=e.defaultProps)for(var o in n===t&&(n=p({},n)),e)void 0===n[o]&&(n[o]=e[o]);return n}function Cs(e){Ar(e)}function _s(e){console.error(e)}function As(e){Ar(e)}function Es(e,t){try{(0,e.onUncaughtError)(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Ts(e,t,n){try{(0,e.onCaughtError)(n.value,{componentStack:n.stack,errorBoundary:1===t.tag?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function js(e,t,n){return(n=yi(n)).tag=3,n.payload={element:null},n.callback=function(){Es(e,t)},n}function Is(e){return(e=yi(e)).tag=3,e}function Os(e,t,n,r){var o=n.type.getDerivedStateFromError;if("function"==typeof o){var i=r.value;e.payload=function(){return o(i)},e.callback=function(){Ts(t,n,r)}}var a=n.stateNode;null!==a&&"function"==typeof a.componentDidCatch&&(e.callback=function(){Ts(t,n,r),"function"!=typeof o&&(null===zc?zc=new Set([this]):zc.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:null!==e?e:""})})}var Ls=Error(s(461)),Ps=!1;function Ms(e,t,n,r){t.child=null===e?gi(t,null,n,r):hi(t,e.child,n,r)}function Ns(e,t,n,r,o){n=n.render;var i=t.ref;if("ref"in r){var a={};for(var s in r)"ref"!==s&&(a[s]=r[s])}else a=r;return Lo(t),r=ta(e,t,n,a,i,o),s=ia(),null===e||Ps?(fo&&s&&ao(t),t.flags|=1,Ms(e,t,r,o),t.child):(aa(e,t,o),ol(e,t,o))}function zs(e,t,n,r,o){if(null===e){var i=n.type;return"function"!=typeof i||Dr(i)||void 0!==i.defaultProps||null!==n.compare?((e=Hr(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,Rs(e,t,i,r,o))}if(i=e.child,!il(e,o)){var a=i.memoizedProps;if((n=null!==(n=n.compare)?n:Jn)(a,r)&&e.ref===t.ref)return ol(e,t,o)}return t.flags|=1,(e=Fr(i,r)).ref=t.ref,e.return=t,t.child=e}function Rs(e,t,n,r,o){if(null!==e){var i=e.memoizedProps;if(Jn(i,r)&&e.ref===t.ref){if(Ps=!1,t.pendingProps=r=i,!il(e,o))return t.lanes=e.lanes,ol(e,t,o);131072&e.flags&&(Ps=!0)}}return Vs(e,t,n,r,o)}function $s(e,t,n,r){var o=r.children,i=null!==e?e.memoizedState:null;if(null===e&&null===t.stateNode&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),"hidden"===r.mode){if(128&t.flags){if(i=null!==i?i.baseLanes|n:n,null!==e){for(r=t.child=e.child,o=0;null!==r;)o=o|r.lanes|r.childLanes,r=r.sibling;r=o&~i}else r=0,t.child=null;return Fs(e,t,i,n,r)}if(!(536870912&n))return r=t.lanes=536870912,Fs(e,t,null!==i?i.baseLanes|n:n,n,r);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&Xo(0,null!==i?i.cachePool:null),null!==i?Ii(t,i):Oi(),Ri(t)}else null!==i?(Xo(0,i.cachePool),Ii(t,i),$i(),t.memoizedState=null):(null!==e&&Xo(0,null),Oi(),$i());return Ms(e,t,o,n),t.child}function Ds(e,t){return null!==e&&22===e.tag||null!==t.stateNode||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Fs(e,t,n,r,o){var i=Yo();return i=null===i?null:{parent:Do._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},null!==e&&Xo(0,null),Oi(),Ri(t),null!==e&&Io(e,t,r,!0),t.childLanes=o,null}function Bs(e,t){return(t=Js({mode:t.mode,children:t.children},e.mode)).ref=e.ref,e.child=t,t.return=e,t}function Hs(e,t,n){return hi(t,e.child,null,n),(e=Bs(t,t.pendingProps)).flags|=2,Di(t),t.memoizedState=null,e}function Us(e,t){var n=t.ref;if(null===n)null!==e&&null!==e.ref&&(t.flags|=4194816);else{if("function"!=typeof n&&"object"!=typeof n)throw Error(s(284));null!==e&&e.ref===n||(t.flags|=4194816)}}function Vs(e,t,n,r,o){return Lo(t),n=ta(e,t,n,r,void 0,o),r=ia(),null===e||Ps?(fo&&r&&ao(t),t.flags|=1,Ms(e,t,n,o),t.child):(aa(e,t,o),ol(e,t,o))}function Ws(e,t,n,r,o,i){return Lo(t),t.updateQueue=null,n=ra(t,r,n,o),na(e),r=ia(),null===e||Ps?(fo&&r&&ao(t),t.flags|=1,Ms(e,t,n,i),t.child):(aa(e,t,i),ol(e,t,i))}function Gs(e,t,n,r,o){if(Lo(t),null===t.stateNode){var i=zr,a=n.contextType;"object"==typeof a&&null!==a&&(i=Po(a)),i=new n(r,i),t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,i.updater=xs,t.stateNode=i,i._reactInternals=t,(i=t.stateNode).props=r,i.state=t.memoizedState,i.refs={},bi(t),a=n.contextType,i.context="object"==typeof a&&null!==a?Po(a):zr,i.state=t.memoizedState,"function"==typeof(a=n.getDerivedStateFromProps)&&(ys(t,n,a,r),i.state=t.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(a=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),a!==i.state&&xs.enqueueReplaceState(i,i.state,null),_i(t,r,i,o),Ci(),i.state=t.memoizedState),"function"==typeof i.componentDidMount&&(t.flags|=4194308),r=!0}else if(null===e){i=t.stateNode;var s=t.memoizedProps,l=Ss(n,s);i.props=l;var c=i.context,u=n.contextType;a=zr,"object"==typeof u&&null!==u&&(a=Po(u));var d=n.getDerivedStateFromProps;u="function"==typeof d||"function"==typeof i.getSnapshotBeforeUpdate,s=t.pendingProps!==s,u||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(s||c!==a)&&ks(t,i,r,a),mi=!1;var f=t.memoizedState;i.state=f,_i(t,r,i,o),Ci(),c=t.memoizedState,s||f!==c||mi?("function"==typeof d&&(ys(t,n,d,r),c=t.memoizedState),(l=mi||ws(t,n,l,r,f,c,a))?(u||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(t.flags|=4194308)):("function"==typeof i.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),i.props=r,i.state=c,i.context=a,r=l):("function"==typeof i.componentDidMount&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,vi(e,t),u=Ss(n,a=t.memoizedProps),i.props=u,d=t.pendingProps,f=i.context,c=n.contextType,l=zr,"object"==typeof c&&null!==c&&(l=Po(c)),(c="function"==typeof(s=n.getDerivedStateFromProps)||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(a!==d||f!==l)&&ks(t,i,r,l),mi=!1,f=t.memoizedState,i.state=f,_i(t,r,i,o),Ci();var p=t.memoizedState;a!==d||f!==p||mi||null!==e&&null!==e.dependencies&&Oo(e.dependencies)?("function"==typeof s&&(ys(t,n,s,r),p=t.memoizedState),(u=mi||ws(t,n,u,r,f,p,l)||null!==e&&null!==e.dependencies&&Oo(e.dependencies))?(c||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,p,l),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof i.componentDidUpdate&&(t.flags|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof i.componentDidUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),i.props=r,i.state=p,i.context=l,r=u):("function"!=typeof i.componentDidUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return i=r,Us(e,t),r=!!(128&t.flags),i||r?(i=t.stateNode,n=r&&"function"!=typeof n.getDerivedStateFromError?null:i.render(),t.flags|=1,null!==e&&r?(t.child=hi(t,e.child,null,o),t.child=hi(t,null,n,o)):Ms(e,t,n,o),t.memoizedState=i.state,e=t.child):e=ol(e,t,o),e}function qs(e,t,n,r){return xo(),t.flags|=256,Ms(e,t,n,r),t.child}var Ks={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ys(e){return{baseLanes:e,cachePool:Zo()}}function Xs(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=Ec),e}function Zs(e,t,n){var r,o=t.pendingProps,i=!1,a=!!(128&t.flags);if((r=a)||(r=(null===e||null!==e.memoizedState)&&!!(2&Fi.current)),r&&(i=!0,t.flags&=-129),r=!!(32&t.flags),t.flags&=-33,null===e){if(fo){if(i?Ni(t):$i(),(e=uo)?null!==(e=null!==(e=Id(e,ho))&&"&"!==e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==to?{id:no,overflow:ro}:null,retryLane:536870912,hydrationErrors:null},(n=Wr(e)).return=t,t.child=n,co=t,uo=null):e=null,null===e)throw mo(t);return Ld(e)?t.lanes=32:t.lanes=536870912,null}var l=o.children;return o=o.fallback,i?($i(),l=Js({mode:"hidden",children:l},i=t.mode),o=Ur(o,i,n,null),l.return=t,o.return=t,l.sibling=o,t.child=l,(o=t.child).memoizedState=Ys(n),o.childLanes=Xs(e,r,n),t.memoizedState=Ks,Ds(null,o)):(Ni(t),Qs(t,l))}var c=e.memoizedState;if(null!==c&&null!==(l=c.dehydrated)){if(a)256&t.flags?(Ni(t),t.flags&=-257,t=el(e,t,n)):null!==t.memoizedState?($i(),t.child=e.child,t.flags|=128,t=null):($i(),l=o.fallback,i=t.mode,o=Js({mode:"visible",children:o.children},i),(l=Ur(l,i,n,null)).flags|=2,o.return=t,l.return=t,o.sibling=l,t.child=o,hi(t,e.child,null,n),(o=t.child).memoizedState=Ys(n),o.childLanes=Xs(e,r,n),t.memoizedState=Ks,t=Ds(null,o));else if(Ni(t),Ld(l)){if(r=l.nextSibling&&l.nextSibling.dataset)var u=r.dgst;r=u,(o=Error(s(419))).stack="",o.digest=r,ko({value:o,source:null,stack:null}),t=el(e,t,n)}else if(Ps||Io(e,t,n,!1),r=0!==(n&e.childLanes),Ps||r){if(null!==(r=hc)&&0!==(o=Ne(r,n))&&o!==c.retryLane)throw c.retryLane=o,Pr(e,o),Kc(r,0,o),Ls;Od(l)||au(),t=el(e,t,n)}else Od(l)?(t.flags|=192,t.child=e.child,t=null):(e=c.treeContext,uo=Pd(l.nextSibling),co=t,fo=!0,po=null,ho=!1,null!==e&&lo(t,e),(t=Qs(t,o.children)).flags|=4096);return t}return i?($i(),l=o.fallback,i=t.mode,u=(c=e.child).sibling,(o=Fr(c,{mode:"hidden",children:o.children})).subtreeFlags=65011712&c.subtreeFlags,null!==u?l=Fr(u,l):(l=Ur(l,i,n,null)).flags|=2,l.return=t,o.return=t,o.sibling=l,t.child=o,Ds(null,o),o=t.child,null===(l=e.child.memoizedState)?l=Ys(n):(null!==(i=l.cachePool)?(c=Do._currentValue,i=i.parent!==c?{parent:c,pool:c}:i):i=Zo(),l={baseLanes:l.baseLanes|n,cachePool:i}),o.memoizedState=l,o.childLanes=Xs(e,r,n),t.memoizedState=Ks,Ds(e.child,o)):(Ni(t),e=(n=e.child).sibling,(n=Fr(n,{mode:"visible",children:o.children})).return=t,n.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n)}function Qs(e,t){return(t=Js({mode:"visible",children:t},e.mode)).return=e,e.child=t}function Js(e,t){return(e=$r(22,e,null,t)).lanes=0,e}function el(e,t,n){return hi(t,e.child,null,n),(e=Qs(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function tl(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),To(e.return,t,n)}function nl(e,t,n,r,o,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o,treeForkCount:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=o,a.treeForkCount=i)}function rl(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;r=r.children;var a=Fi.current,s=!!(2&a);if(s?(a=1&a|2,t.flags|=128):a&=1,B(Fi,a),Ms(e,t,r,n),r=fo?Qr:0,!s&&null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&tl(e,n,t);else if(19===e.tag)tl(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===Bi(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),nl(t,!1,o,n,i,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===Bi(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}nl(t,!0,n,null,i,r);break;case"together":nl(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function ol(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Cc|=t.lanes,0===(n&t.childLanes)){if(null===e)return null;if(Io(e,t,n,!1),0===(n&t.childLanes))return null}if(null!==e&&t.child!==e.child)throw Error(s(153));if(null!==t.child){for(n=Fr(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Fr(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function il(e,t){return 0!==(e.lanes&t)||!(null===(e=e.dependencies)||!Oo(e))}function al(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps)Ps=!0;else{if(!(il(e,n)||128&t.flags))return Ps=!1,function(e,t,n){switch(t.tag){case 3:K(t,t.stateNode.containerInfo),Ao(0,Do,e.memoizedState.cache),xo();break;case 27:case 5:X(t);break;case 4:K(t,t.stateNode.containerInfo);break;case 10:Ao(0,t.type,t.memoizedProps.value);break;case 31:if(null!==t.memoizedState)return t.flags|=128,zi(t),null;break;case 13:var r=t.memoizedState;if(null!==r)return null!==r.dehydrated?(Ni(t),t.flags|=128,null):0!==(n&t.child.childLanes)?Zs(e,t,n):(Ni(t),null!==(e=ol(e,t,n))?e.sibling:null);Ni(t);break;case 19:var o=!!(128&e.flags);if((r=0!==(n&t.childLanes))||(Io(e,t,n,!1),r=0!==(n&t.childLanes)),o){if(r)return rl(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),B(Fi,Fi.current),r)break;return null;case 22:return t.lanes=0,$s(e,t,n,t.pendingProps);case 24:Ao(0,Do,e.memoizedState.cache)}return ol(e,t,n)}(e,t,n);Ps=!!(131072&e.flags)}else Ps=!1,fo&&1048576&t.flags&&io(t,Qr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=oi(t.elementType),t.type=e,"function"!=typeof e){if(null!=e){var o=e.$$typeof;if(o===k){t.tag=11,t=Ns(null,t,e,r,n);break e}if(o===_){t.tag=14,t=zs(null,t,e,r,n);break e}}throw t=L(e)||e,Error(s(306,t,""))}Dr(e)?(r=Ss(e,r),t.tag=1,t=Gs(null,t,e,r,n)):(t.tag=0,t=Vs(null,t,e,r,n))}return t;case 0:return Vs(e,t,t.type,t.pendingProps,n);case 1:return Gs(e,t,r=t.type,o=Ss(r,t.pendingProps),n);case 3:e:{if(K(t,t.stateNode.containerInfo),null===e)throw Error(s(387));r=t.pendingProps;var i=t.memoizedState;o=i.element,vi(e,t),_i(t,r,null,n);var a=t.memoizedState;if(r=a.cache,Ao(0,Do,r),r!==i.cache&&jo(t,[Do],n,!0),Ci(),r=a.element,i.isDehydrated){if(i={element:r,isDehydrated:!1,cache:a.cache},t.updateQueue.baseState=i,t.memoizedState=i,256&t.flags){t=qs(e,t,r,n);break e}if(r!==o){ko(o=Kr(Error(s(424)),t)),t=qs(e,t,r,n);break e}for(e=9===(e=t.stateNode.containerInfo).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,uo=Pd(e.firstChild),co=t,fo=!0,po=null,ho=!0,n=gi(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(xo(),r===o){t=ol(e,t,n);break e}Ms(e,t,r,n)}t=t.child}return t;case 26:return Us(e,t),null===e?(n=Wd(t.type,null,t.pendingProps,null))?t.memoizedState=n:fo||(n=t.type,e=t.pendingProps,(r=md(G.current).createElement(n))[Be]=t,r[He]=e,fd(r,n,e),et(r),t.stateNode=r):t.memoizedState=Wd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return X(t),null===e&&fo&&(r=t.stateNode=Rd(t.type,t.pendingProps,G.current),co=t,ho=!0,o=uo,Ad(t.type)?(Md=o,uo=Pd(r.firstChild)):uo=o),Ms(e,t,t.pendingProps.children,n),Us(e,t),null===e&&(t.flags|=4194304),t.child;case 5:return null===e&&fo&&((o=r=uo)&&(null!==(r=function(e,t,n,r){for(;1===e.nodeType;){var o=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&("INPUT"!==e.nodeName||"hidden"!==e.type))break}else if(r){if(!e[Ke])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if("stylesheet"===(i=e.getAttribute("rel"))&&e.hasAttribute("data-precedence"))break;if(i!==o.rel||e.getAttribute("href")!==(null==o.href||""===o.href?null:o.href)||e.getAttribute("crossorigin")!==(null==o.crossOrigin?null:o.crossOrigin)||e.getAttribute("title")!==(null==o.title?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(((i=e.getAttribute("src"))!==(null==o.src?null:o.src)||e.getAttribute("type")!==(null==o.type?null:o.type)||e.getAttribute("crossorigin")!==(null==o.crossOrigin?null:o.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else{if("input"!==t||"hidden"!==e.type)return e;var i=null==o.name?null:""+o.name;if("hidden"===o.type&&e.getAttribute("name")===i)return e}if(null===(e=Pd(e.nextSibling)))break}return null}(r,t.type,t.pendingProps,ho))?(t.stateNode=r,co=t,uo=Pd(r.firstChild),ho=!1,o=!0):o=!1),o||mo(t)),X(t),o=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,r=i.children,yd(o,i)?r=null:null!==a&&yd(o,a)&&(t.flags|=32),null!==t.memoizedState&&(o=ta(e,t,oa,null,null,n),df._currentValue=o),Us(e,t),Ms(e,t,r,n),t.child;case 6:return null===e&&fo&&((e=n=uo)&&(null!==(n=function(e,t,n){if(""===t)return null;for(;3!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!n)return null;if(null===(e=Pd(e.nextSibling)))return null}return e}(n,t.pendingProps,ho))?(t.stateNode=n,co=t,uo=null,e=!0):e=!1),e||mo(t)),null;case 13:return Zs(e,t,n);case 4:return K(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=hi(t,null,r,n):Ms(e,t,r,n),t.child;case 11:return Ns(e,t,t.type,t.pendingProps,n);case 7:return Ms(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ms(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ao(0,t.type,r.value),Ms(e,t,r.children,n),t.child;case 9:return o=t.type._context,r=t.pendingProps.children,Lo(t),r=r(o=Po(o)),t.flags|=1,Ms(e,t,r,n),t.child;case 14:return zs(e,t,t.type,t.pendingProps,n);case 15:return Rs(e,t,t.type,t.pendingProps,n);case 19:return rl(e,t,n);case 31:return function(e,t,n){var r=t.pendingProps,o=!!(128&t.flags);if(t.flags&=-129,null===e){if(fo){if("hidden"===r.mode)return e=Bs(t,r),t.lanes=536870912,Ds(null,e);if(zi(t),(e=uo)?null!==(e=null!==(e=Id(e,ho))&&"&"===e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==to?{id:no,overflow:ro}:null,retryLane:536870912,hydrationErrors:null},(n=Wr(e)).return=t,t.child=n,co=t,uo=null):e=null,null===e)throw mo(t);return t.lanes=536870912,null}return Bs(t,r)}var i=e.memoizedState;if(null!==i){var a=i.dehydrated;if(zi(t),o)if(256&t.flags)t.flags&=-257,t=Hs(e,t,n);else{if(null===t.memoizedState)throw Error(s(558));t.child=e.child,t.flags|=128,t=null}else if(Ps||Io(e,t,n,!1),o=0!==(n&e.childLanes),Ps||o){if(null!==(r=hc)&&0!==(a=Ne(r,n))&&a!==i.retryLane)throw i.retryLane=a,Pr(e,a),Kc(r,0,a),Ls;au(),t=Hs(e,t,n)}else e=i.treeContext,uo=Pd(a.nextSibling),co=t,fo=!0,po=null,ho=!1,null!==e&&lo(t,e),(t=Bs(t,r)).flags|=4096;return t}return(e=Fr(e.child,{mode:r.mode,children:r.children})).ref=t.ref,t.child=e,e.return=t,e}(e,t,n);case 22:return $s(e,t,n,t.pendingProps);case 24:return Lo(t),r=Po(Do),null===e?(null===(o=Yo())&&(o=hc,i=Fo(),o.pooledCache=i,i.refCount++,null!==i&&(o.pooledCacheLanes|=n),o=i),t.memoizedState={parent:r,cache:o},bi(t),Ao(0,Do,o)):(0!==(e.lanes&n)&&(vi(e,t),_i(t,null,null,n),Ci()),o=e.memoizedState,i=t.memoizedState,o.parent!==r?(o={parent:r,cache:r},t.memoizedState=o,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=o),Ao(0,Do,r)):(r=i.cache,Ao(0,Do,r),r!==o.cache&&jo(t,[Do],n,!0))),Ms(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function sl(e){e.flags|=4}function ll(e,t,n,r,o){if((t=!!(32&e.mode))&&(t=!1),t){if(e.flags|=16777216,(335544128&o)===o)if(e.stateNode.complete)e.flags|=8192;else{if(!ru())throw ii=ti,Jo;e.flags|=8192}}else e.flags&=-16777217}function cl(e,t){if("stylesheet"!==t.type||4&t.state.loading)e.flags&=-16777217;else if(e.flags|=16777216,!of(t)){if(!ru())throw ii=ti,Jo;e.flags|=8192}}function ul(e,t){null!==t&&(e.flags|=4),16384&e.flags&&(t=22!==e.tag?Ie():536870912,e.lanes|=t,Tc|=t)}function dl(e,t){if(!fo)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function fl(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=65011712&o.subtreeFlags,r|=65011712&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function pl(e,t,n){var r=t.pendingProps;switch(so(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return fl(t),null;case 3:return n=t.stateNode,r=null,null!==e&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Eo(Do),Y(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(yo(t)?sl(t):null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,wo())),fl(t),null;case 26:var o=t.type,i=t.memoizedState;return null===e?(sl(t),null!==i?(fl(t),cl(t,i)):(fl(t),ll(t,o,0,0,n))):i?i!==e.memoizedState?(sl(t),fl(t),cl(t,i)):(fl(t),t.flags&=-16777217):((e=e.memoizedProps)!==r&&sl(t),fl(t),ll(t,o,0,0,n)),null;case 27:if(Z(t),n=G.current,o=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&sl(t);else{if(!r){if(null===t.stateNode)throw Error(s(166));return fl(t),null}e=V.current,yo(t)?bo(t):(e=Rd(o,r,n),t.stateNode=e,sl(t))}return fl(t),null;case 5:if(Z(t),o=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&sl(t);else{if(!r){if(null===t.stateNode)throw Error(s(166));return fl(t),null}if(i=V.current,yo(t))bo(t);else{var a=md(G.current);switch(i){case 1:i=a.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:i=a.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":i=a.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":i=a.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":(i=a.createElement("div")).innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i="string"==typeof r.is?a.createElement("select",{is:r.is}):a.createElement("select"),r.multiple?i.multiple=!0:r.size&&(i.size=r.size);break;default:i="string"==typeof r.is?a.createElement(o,{is:r.is}):a.createElement(o)}}i[Be]=t,i[He]=r;e:for(a=t.child;null!==a;){if(5===a.tag||6===a.tag)i.appendChild(a.stateNode);else if(4!==a.tag&&27!==a.tag&&null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;null===a.sibling;){if(null===a.return||a.return===t)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}t.stateNode=i;e:switch(fd(i,o,r),o){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&sl(t)}}return fl(t),ll(t,t.type,null===e||e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&sl(t);else{if("string"!=typeof r&&null===t.stateNode)throw Error(s(166));if(e=G.current,yo(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,null!==(o=co))switch(o.tag){case 27:case 5:r=o.memoizedProps}e[Be]=t,(e=!!(e.nodeValue===n||null!==r&&!0===r.suppressHydrationWarning||cd(e.nodeValue,n)))||mo(t,!0)}else(e=md(e).createTextNode(r))[Be]=t,t.stateNode=e}return fl(t),null;case 31:if(n=t.memoizedState,null===e||null!==e.memoizedState){if(r=yo(t),null!==n){if(null===e){if(!r)throw Error(s(318));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(s(557));e[Be]=t}else xo(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;fl(t),e=!1}else n=wo(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return 256&t.flags?(Di(t),t):(Di(t),null);if(128&t.flags)throw Error(s(558))}return fl(t),null;case 13:if(r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(o=yo(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error(s(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(s(317));o[Be]=t}else xo(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;fl(t),o=!1}else o=wo(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return 256&t.flags?(Di(t),t):(Di(t),null)}return Di(t),128&t.flags?(t.lanes=n,t):(n=null!==r,e=null!==e&&null!==e.memoizedState,n&&(o=null,null!==(r=t.child).alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(o=r.alternate.memoizedState.cachePool.pool),i=null,null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(i=r.memoizedState.cachePool.pool),i!==o&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ul(t,t.updateQueue),fl(t),null);case 4:return Y(),null===e&&Ju(t.stateNode.containerInfo),fl(t),null;case 10:return Eo(t.type),fl(t),null;case 19:if(F(Fi),null===(r=t.memoizedState))return fl(t),null;if(o=!!(128&t.flags),null===(i=r.rendering))if(o)dl(r,!1);else{if(0!==Sc||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(i=Bi(e))){for(t.flags|=128,dl(r,!1),e=i.updateQueue,t.updateQueue=e,ul(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)Br(n,e),n=n.sibling;return B(Fi,1&Fi.current|2),fo&&oo(t,r.treeForkCount),t.child}e=e.sibling}null!==r.tail&&le()>Mc&&(t.flags|=128,o=!0,dl(r,!1),t.lanes=4194304)}else{if(!o)if(null!==(e=Bi(i))){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,ul(t,e),dl(r,!0),null===r.tail&&"hidden"===r.tailMode&&!i.alternate&&!fo)return fl(t),null}else 2*le()-r.renderingStartTime>Mc&&536870912!==n&&(t.flags|=128,o=!0,dl(r,!1),t.lanes=4194304);r.isBackwards?(i.sibling=t.child,t.child=i):(null!==(e=r.last)?e.sibling=i:t.child=i,r.last=i)}return null!==r.tail?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=le(),e.sibling=null,n=Fi.current,B(Fi,o?1&n|2:1&n),fo&&oo(t,r.treeForkCount),e):(fl(t),null);case 22:case 23:return Di(t),Li(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?!!(536870912&n)&&!(128&t.flags)&&(fl(t),6&t.subtreeFlags&&(t.flags|=8192)):fl(t),null!==(n=t.updateQueue)&&ul(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&F(Ko),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Eo(Do),fl(t),null;case 25:case 30:return null}throw Error(s(156,t.tag))}function hl(e,t){switch(so(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Eo(Do),Y(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return Z(t),null;case 31:if(null!==t.memoizedState){if(Di(t),null===t.alternate)throw Error(s(340));xo()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 13:if(Di(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(s(340));xo()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return F(Fi),null;case 4:return Y(),null;case 10:return Eo(t.type),null;case 22:case 23:return Di(t),Li(),null!==e&&F(Ko),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return Eo(Do),null;default:return null}}function gl(e,t){switch(so(t),t.tag){case 3:Eo(Do),Y();break;case 26:case 27:case 5:Z(t);break;case 4:Y();break;case 31:null!==t.memoizedState&&Di(t);break;case 13:Di(t);break;case 19:F(Fi);break;case 10:Eo(t.type);break;case 22:case 23:Di(t),Li(),null!==e&&F(Ko);break;case 24:Eo(Do)}}function ml(e,t){try{var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var o=r.next;n=o;do{if((n.tag&e)===e){r=void 0;var i=n.create,a=n.inst;r=i(),a.destroy=r}n=n.next}while(n!==o)}}catch(e){Su(t,t.return,e)}}function bl(e,t,n){try{var r=t.updateQueue,o=null!==r?r.lastEffect:null;if(null!==o){var i=o.next;r=i;do{if((r.tag&e)===e){var a=r.inst,s=a.destroy;if(void 0!==s){a.destroy=void 0,o=t;var l=n,c=s;try{c()}catch(e){Su(o,l,e)}}}r=r.next}while(r!==i)}}catch(e){Su(t,t.return,e)}}function vl(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{Ei(t,n)}catch(t){Su(e,e.return,t)}}}function yl(e,t,n){n.props=Ss(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Su(e,t,n)}}function xl(e,t){try{var n=e.ref;if(null!==n){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;default:r=e.stateNode}"function"==typeof n?e.refCleanup=n(r):n.current=r}}catch(n){Su(e,t,n)}}function wl(e,t){var n=e.ref,r=e.refCleanup;if(null!==n)if("function"==typeof r)try{r()}catch(n){Su(e,t,n)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof n)try{n(null)}catch(n){Su(e,t,n)}else n.current=null}function kl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Su(e,e.return,t)}}function Sl(e,t,n){try{var r=e.stateNode;!function(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,i=null,a=null,l=null,c=null,u=null,d=null;for(h in n){var f=n[h];if(n.hasOwnProperty(h)&&null!=f)switch(h){case"checked":case"value":break;case"defaultValue":c=f;default:r.hasOwnProperty(h)||ud(e,t,h,null,r,f)}}for(var p in r){var h=r[p];if(f=n[p],r.hasOwnProperty(p)&&(null!=h||null!=f))switch(p){case"type":i=h;break;case"name":o=h;break;case"checked":u=h;break;case"defaultChecked":d=h;break;case"value":a=h;break;case"defaultValue":l=h;break;case"children":case"dangerouslySetInnerHTML":if(null!=h)throw Error(s(137,t));break;default:h!==f&&ud(e,t,p,h,r,f)}}return void vt(e,a,l,c,u,d,i,o);case"select":for(i in h=a=l=p=null,n)if(c=n[i],n.hasOwnProperty(i)&&null!=c)switch(i){case"value":break;case"multiple":h=c;default:r.hasOwnProperty(i)||ud(e,t,i,null,r,c)}for(o in r)if(i=r[o],c=n[o],r.hasOwnProperty(o)&&(null!=i||null!=c))switch(o){case"value":p=i;break;case"defaultValue":l=i;break;case"multiple":a=i;default:i!==c&&ud(e,t,o,i,r,c)}return t=l,n=a,r=h,void(null!=p?wt(e,!!n,p,!1):!!r!=!!n&&(null!=t?wt(e,!!n,t,!0):wt(e,!!n,n?[]:"",!1)));case"textarea":for(l in h=p=null,n)if(o=n[l],n.hasOwnProperty(l)&&null!=o&&!r.hasOwnProperty(l))switch(l){case"value":case"children":break;default:ud(e,t,l,null,r,o)}for(a in r)if(o=r[a],i=n[a],r.hasOwnProperty(a)&&(null!=o||null!=i))switch(a){case"value":p=o;break;case"defaultValue":h=o;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=o)throw Error(s(91));break;default:o!==i&&ud(e,t,a,o,r,i)}return void kt(e,p,h);case"option":for(var g in n)p=n[g],n.hasOwnProperty(g)&&null!=p&&!r.hasOwnProperty(g)&&("selected"===g?e.selected=!1:ud(e,t,g,null,r,p));for(c in r)p=r[c],h=n[c],!r.hasOwnProperty(c)||p===h||null==p&&null==h||("selected"===c?e.selected=p&&"function"!=typeof p&&"symbol"!=typeof p:ud(e,t,c,p,r,h));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var m in n)p=n[m],n.hasOwnProperty(m)&&null!=p&&!r.hasOwnProperty(m)&&ud(e,t,m,null,r,p);for(u in r)if(p=r[u],h=n[u],r.hasOwnProperty(u)&&p!==h&&(null!=p||null!=h))switch(u){case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(s(137,t));break;default:ud(e,t,u,p,r,h)}return;default:if(Tt(t)){for(var b in n)p=n[b],n.hasOwnProperty(b)&&void 0!==p&&!r.hasOwnProperty(b)&&dd(e,t,b,void 0,r,p);for(d in r)p=r[d],h=n[d],!r.hasOwnProperty(d)||p===h||void 0===p&&void 0===h||dd(e,t,d,p,r,h);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&null!=p&&!r.hasOwnProperty(v)&&ud(e,t,v,null,r,p);for(f in r)p=r[f],h=n[f],!r.hasOwnProperty(f)||p===h||null==p&&null==h||ud(e,t,f,p,r,h)}(r,e.type,n,t),r[He]=t}catch(t){Su(e,e.return,t)}}function Cl(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag&&Ad(e.type)||4===e.tag}function _l(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Cl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(27===e.tag&&Ad(e.type))continue e;if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function Al(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?(9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).insertBefore(e,t):((t=9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Lt));else if(4!==r&&(27===r&&Ad(e.type)&&(n=e.stateNode,t=null),null!==(e=e.child)))for(Al(e,t,n),e=e.sibling;null!==e;)Al(e,t,n),e=e.sibling}function El(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&(27===r&&Ad(e.type)&&(n=e.stateNode),null!==(e=e.child)))for(El(e,t,n),e=e.sibling;null!==e;)El(e,t,n),e=e.sibling}function Tl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);fd(t,r,n),t[Be]=e,t[He]=n}catch(t){Su(e,e.return,t)}}var jl=!1,Il=!1,Ol=!1,Ll="function"==typeof WeakSet?WeakSet:Set,Pl=null;function Ml(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Kl(e,n),4&r&&ml(5,n);break;case 1:if(Kl(e,n),4&r)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(e){Su(n,n.return,e)}else{var o=Ss(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Su(n,n.return,e)}}64&r&&vl(n),512&r&&xl(n,n.return);break;case 3:if(Kl(e,n),64&r&&null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:t=n.child.stateNode}try{Ei(e,t)}catch(e){Su(n,n.return,e)}}break;case 27:null===t&&4&r&&Tl(n);case 26:case 5:Kl(e,n),null===t&&4&r&&kl(n),512&r&&xl(n,n.return);break;case 12:Kl(e,n);break;case 31:Kl(e,n),4&r&&Fl(e,n);break;case 13:Kl(e,n),4&r&&Bl(e,n),64&r&&null!==(e=n.memoizedState)&&null!==(e=e.dehydrated)&&function(e,t){var n=e.ownerDocument;if("$~"===e.data)e._reactRetry=t;else if("$?"!==e.data||"loading"!==n.readyState)t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}(e,n=Eu.bind(null,n));break;case 22:if(!(r=null!==n.memoizedState||jl)){t=null!==t&&null!==t.memoizedState||Il,o=jl;var i=Il;jl=r,(Il=t)&&!i?Xl(e,n,!!(8772&n.subtreeFlags)):Kl(e,n),jl=o,Il=i}break;case 30:break;default:Kl(e,n)}}function Nl(e){var t=e.alternate;null!==t&&(e.alternate=null,Nl(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&Ye(t),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var zl=null,Rl=!1;function $l(e,t,n){for(n=n.child;null!==n;)Dl(e,t,n),n=n.sibling}function Dl(e,t,n){if(ve&&"function"==typeof ve.onCommitFiberUnmount)try{ve.onCommitFiberUnmount(be,n)}catch(e){}switch(n.tag){case 26:Il||wl(n,t),$l(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:Il||wl(n,t);var r=zl,o=Rl;Ad(n.type)&&(zl=n.stateNode,Rl=!1),$l(e,t,n),$d(n.stateNode),zl=r,Rl=o;break;case 5:Il||wl(n,t);case 6:if(r=zl,o=Rl,zl=null,$l(e,t,n),Rl=o,null!==(zl=r))if(Rl)try{(9===zl.nodeType?zl.body:"HTML"===zl.nodeName?zl.ownerDocument.body:zl).removeChild(n.stateNode)}catch(e){Su(n,t,e)}else try{zl.removeChild(n.stateNode)}catch(e){Su(n,t,e)}break;case 18:null!==zl&&(Rl?(Ed(9===(e=zl).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,n.stateNode),Uf(e)):Ed(zl,n.stateNode));break;case 4:r=zl,o=Rl,zl=n.stateNode.containerInfo,Rl=!0,$l(e,t,n),zl=r,Rl=o;break;case 0:case 11:case 14:case 15:bl(2,n,t),Il||bl(4,n,t),$l(e,t,n);break;case 1:Il||(wl(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount&&yl(n,t,r)),$l(e,t,n);break;case 21:$l(e,t,n);break;case 22:Il=(r=Il)||null!==n.memoizedState,$l(e,t,n),Il=r;break;default:$l(e,t,n)}}function Fl(e,t){if(null===t.memoizedState&&null!==(e=t.alternate)&&null!==(e=e.memoizedState)){e=e.dehydrated;try{Uf(e)}catch(e){Su(t,t.return,e)}}}function Bl(e,t){if(null===t.memoizedState&&null!==(e=t.alternate)&&null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))try{Uf(e)}catch(e){Su(t,t.return,e)}}function Hl(e,t){var n=function(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new Ll),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new Ll),t;default:throw Error(s(435,e.tag))}}(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Tu.bind(null,e,t);t.then(r,r)}})}function Ul(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r],i=e,a=t,l=a;e:for(;null!==l;){switch(l.tag){case 27:if(Ad(l.type)){zl=l.stateNode,Rl=!1;break e}break;case 5:zl=l.stateNode,Rl=!1;break e;case 3:case 4:zl=l.stateNode.containerInfo,Rl=!0;break e}l=l.return}if(null===zl)throw Error(s(160));Dl(i,a,o),zl=null,Rl=!1,null!==(i=o.alternate)&&(i.return=null),o.return=null}if(13886&t.subtreeFlags)for(t=t.child;null!==t;)Wl(t,e),t=t.sibling}var Vl=null;function Wl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ul(t,e),Gl(e),4&r&&(bl(3,e,e.return),ml(3,e),bl(5,e,e.return));break;case 1:Ul(t,e),Gl(e),512&r&&(Il||null===n||wl(n,n.return)),64&r&&jl&&null!==(e=e.updateQueue)&&null!==(r=e.callbacks)&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=null===n?r:n.concat(r));break;case 26:var o=Vl;if(Ul(t,e),Gl(e),512&r&&(Il||null===n||wl(n,n.return)),4&r){var i=null!==n?n.memoizedState:null;if(r=e.memoizedState,null===n)if(null===r)if(null===e.stateNode){e:{r=e.type,n=e.memoizedProps,o=o.ownerDocument||o;t:switch(r){case"title":(!(i=o.getElementsByTagName("title")[0])||i[Ke]||i[Be]||"http://www.w3.org/2000/svg"===i.namespaceURI||i.hasAttribute("itemprop"))&&(i=o.createElement(r),o.head.insertBefore(i,o.querySelector("head > title"))),fd(i,r,n),i[Be]=e,et(i),r=i;break e;case"link":var a=nf("link","href",o).get(r+(n.href||""));if(a)for(var l=0;l<a.length;l++)if((i=a[l]).getAttribute("href")===(null==n.href||""===n.href?null:n.href)&&i.getAttribute("rel")===(null==n.rel?null:n.rel)&&i.getAttribute("title")===(null==n.title?null:n.title)&&i.getAttribute("crossorigin")===(null==n.crossOrigin?null:n.crossOrigin)){a.splice(l,1);break t}fd(i=o.createElement(r),r,n),o.head.appendChild(i);break;case"meta":if(a=nf("meta","content",o).get(r+(n.content||"")))for(l=0;l<a.length;l++)if((i=a[l]).getAttribute("content")===(null==n.content?null:""+n.content)&&i.getAttribute("name")===(null==n.name?null:n.name)&&i.getAttribute("property")===(null==n.property?null:n.property)&&i.getAttribute("http-equiv")===(null==n.httpEquiv?null:n.httpEquiv)&&i.getAttribute("charset")===(null==n.charSet?null:n.charSet)){a.splice(l,1);break t}fd(i=o.createElement(r),r,n),o.head.appendChild(i);break;default:throw Error(s(468,r))}i[Be]=e,et(i),r=i}e.stateNode=r}else rf(o,e.type,e.stateNode);else e.stateNode=Zd(o,r,e.memoizedProps);else i!==r?(null===i?null!==n.stateNode&&(n=n.stateNode).parentNode.removeChild(n):i.count--,null===r?rf(o,e.type,e.stateNode):Zd(o,r,e.memoizedProps)):null===r&&null!==e.stateNode&&Sl(e,e.memoizedProps,n.memoizedProps)}break;case 27:Ul(t,e),Gl(e),512&r&&(Il||null===n||wl(n,n.return)),null!==n&&4&r&&Sl(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Ul(t,e),Gl(e),512&r&&(Il||null===n||wl(n,n.return)),32&e.flags){o=e.stateNode;try{Ct(o,"")}catch(t){Su(e,e.return,t)}}4&r&&null!=e.stateNode&&Sl(e,o=e.memoizedProps,null!==n?n.memoizedProps:o),1024&r&&(Ol=!0);break;case 6:if(Ul(t,e),Gl(e),4&r){if(null===e.stateNode)throw Error(s(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Su(e,e.return,t)}}break;case 3:if(tf=null,o=Vl,Vl=Bd(t.containerInfo),Ul(t,e),Vl=o,Gl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Uf(t.containerInfo)}catch(t){Su(e,e.return,t)}Ol&&(Ol=!1,ql(e));break;case 4:r=Vl,Vl=Bd(e.stateNode.containerInfo),Ul(t,e),Gl(e),Vl=r;break;case 12:default:Ul(t,e),Gl(e);break;case 31:case 19:Ul(t,e),Gl(e),4&r&&null!==(r=e.updateQueue)&&(e.updateQueue=null,Hl(e,r));break;case 13:Ul(t,e),Gl(e),8192&e.child.flags&&null!==e.memoizedState!=(null!==n&&null!==n.memoizedState)&&(Lc=le()),4&r&&null!==(r=e.updateQueue)&&(e.updateQueue=null,Hl(e,r));break;case 22:o=null!==e.memoizedState;var c=null!==n&&null!==n.memoizedState,u=jl,d=Il;if(jl=u||o,Il=d||c,Ul(t,e),Il=d,jl=u,Gl(e),8192&r)e:for(t=e.stateNode,t._visibility=o?-2&t._visibility:1|t._visibility,o&&(null===n||c||jl||Il||Yl(e)),n=null,t=e;;){if(5===t.tag||26===t.tag){if(null===n){c=n=t;try{if(i=c.stateNode,o)"function"==typeof(a=i.style).setProperty?a.setProperty("display","none","important"):a.display="none";else{l=c.stateNode;var f=c.memoizedProps.style,p=null!=f&&f.hasOwnProperty("display")?f.display:null;l.style.display=null==p||"boolean"==typeof p?"":(""+p).trim()}}catch(e){Su(c,c.return,e)}}}else if(6===t.tag){if(null===n){c=t;try{c.stateNode.nodeValue=o?"":c.memoizedProps}catch(e){Su(c,c.return,e)}}}else if(18===t.tag){if(null===n){c=t;try{var h=c.stateNode;o?Td(h,!0):Td(c.stateNode,!1)}catch(e){Su(c,c.return,e)}}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;null===t.sibling;){if(null===t.return||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}4&r&&null!==(r=e.updateQueue)&&null!==(n=r.retryQueue)&&(r.retryQueue=null,Hl(e,n));case 30:case 21:}}function Gl(e){var t=e.flags;if(2&t){try{for(var n,r=e.return;null!==r;){if(Cl(r)){n=r;break}r=r.return}if(null==n)throw Error(s(160));switch(n.tag){case 27:var o=n.stateNode;El(e,_l(e),o);break;case 5:var i=n.stateNode;32&n.flags&&(Ct(i,""),n.flags&=-33),El(e,_l(e),i);break;case 3:case 4:var a=n.stateNode.containerInfo;Al(e,_l(e),a);break;default:throw Error(s(161))}}catch(t){Su(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function ql(e){if(1024&e.subtreeFlags)for(e=e.child;null!==e;){var t=e;ql(t),5===t.tag&&1024&t.flags&&t.stateNode.reset(),e=e.sibling}}function Kl(e,t){if(8772&t.subtreeFlags)for(t=t.child;null!==t;)Ml(e,t.alternate,t),t=t.sibling}function Yl(e){for(e=e.child;null!==e;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:bl(4,t,t.return),Yl(t);break;case 1:wl(t,t.return);var n=t.stateNode;"function"==typeof n.componentWillUnmount&&yl(t,t.return,n),Yl(t);break;case 27:$d(t.stateNode);case 26:case 5:wl(t,t.return),Yl(t);break;case 22:null===t.memoizedState&&Yl(t);break;default:Yl(t)}e=e.sibling}}function Xl(e,t,n){for(n=n&&!!(8772&t.subtreeFlags),t=t.child;null!==t;){var r=t.alternate,o=e,i=t,a=i.flags;switch(i.tag){case 0:case 11:case 15:Xl(o,i,n),ml(4,i);break;case 1:if(Xl(o,i,n),"function"==typeof(o=(r=i).stateNode).componentDidMount)try{o.componentDidMount()}catch(e){Su(r,r.return,e)}if(null!==(o=(r=i).updateQueue)){var s=r.stateNode;try{var l=o.shared.hiddenCallbacks;if(null!==l)for(o.shared.hiddenCallbacks=null,o=0;o<l.length;o++)Ai(l[o],s)}catch(e){Su(r,r.return,e)}}n&&64&a&&vl(i),xl(i,i.return);break;case 27:Tl(i);case 26:case 5:Xl(o,i,n),n&&null===r&&4&a&&kl(i),xl(i,i.return);break;case 12:Xl(o,i,n);break;case 31:Xl(o,i,n),n&&4&a&&Fl(o,i);break;case 13:Xl(o,i,n),n&&4&a&&Bl(o,i);break;case 22:null===i.memoizedState&&Xl(o,i,n),xl(i,i.return);break;case 30:break;default:Xl(o,i,n)}t=t.sibling}}function Zl(e,t){var n=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),e=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(e=t.memoizedState.cachePool.pool),e!==n&&(null!=e&&e.refCount++,null!=n&&Bo(n))}function Ql(e,t){e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Bo(e))}function Jl(e,t,n,r){if(10256&t.subtreeFlags)for(t=t.child;null!==t;)ec(e,t,n,r),t=t.sibling}function ec(e,t,n,r){var o=t.flags;switch(t.tag){case 0:case 11:case 15:Jl(e,t,n,r),2048&o&&ml(9,t);break;case 1:case 31:case 13:default:Jl(e,t,n,r);break;case 3:Jl(e,t,n,r),2048&o&&(e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Bo(e)));break;case 12:if(2048&o){Jl(e,t,n,r),e=t.stateNode;try{var i=t.memoizedProps,a=i.id,s=i.onPostCommit;"function"==typeof s&&s(a,null===t.alternate?"mount":"update",e.passiveEffectDuration,-0)}catch(e){Su(t,t.return,e)}}else Jl(e,t,n,r);break;case 23:break;case 22:i=t.stateNode,a=t.alternate,null!==t.memoizedState?2&i._visibility?Jl(e,t,n,r):nc(e,t):2&i._visibility?Jl(e,t,n,r):(i._visibility|=2,tc(e,t,n,r,!!(10256&t.subtreeFlags)||!1)),2048&o&&Zl(a,t);break;case 24:Jl(e,t,n,r),2048&o&&Ql(t.alternate,t)}}function tc(e,t,n,r,o){for(o=o&&(!!(10256&t.subtreeFlags)||!1),t=t.child;null!==t;){var i=e,a=t,s=n,l=r,c=a.flags;switch(a.tag){case 0:case 11:case 15:tc(i,a,s,l,o),ml(8,a);break;case 23:break;case 22:var u=a.stateNode;null!==a.memoizedState?2&u._visibility?tc(i,a,s,l,o):nc(i,a):(u._visibility|=2,tc(i,a,s,l,o)),o&&2048&c&&Zl(a.alternate,a);break;case 24:tc(i,a,s,l,o),o&&2048&c&&Ql(a.alternate,a);break;default:tc(i,a,s,l,o)}t=t.sibling}}function nc(e,t){if(10256&t.subtreeFlags)for(t=t.child;null!==t;){var n=e,r=t,o=r.flags;switch(r.tag){case 22:nc(n,r),2048&o&&Zl(r.alternate,r);break;case 24:nc(n,r),2048&o&&Ql(r.alternate,r);break;default:nc(n,r)}t=t.sibling}}var rc=8192;function oc(e,t,n){if(e.subtreeFlags&rc)for(e=e.child;null!==e;)ic(e,t,n),e=e.sibling}function ic(e,t,n){switch(e.tag){case 26:oc(e,t,n),e.flags&rc&&null!==e.memoizedState&&function(e,t,n,r){if(!("stylesheet"!==n.type||"string"==typeof r.media&&!1===matchMedia(r.media).matches||4&n.state.loading)){if(null===n.instance){var o=Gd(r.href),i=t.querySelector(qd(o));if(i)return null!==(t=i._p)&&"object"==typeof t&&"function"==typeof t.then&&(e.count++,e=sf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,void et(i);i=t.ownerDocument||t,r=Kd(r),(o=Dd.get(o))&&Jd(r,o),et(i=i.createElement("link"));var a=i;a._p=new Promise(function(e,t){a.onload=e,a.onerror=t}),fd(i,"link",r),n.instance=i}null===e.stylesheets&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(3&n.state.loading)&&(e.count++,n=sf.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}(n,Vl,e.memoizedState,e.memoizedProps);break;case 5:default:oc(e,t,n);break;case 3:case 4:var r=Vl;Vl=Bd(e.stateNode.containerInfo),oc(e,t,n),Vl=r;break;case 22:null===e.memoizedState&&(null!==(r=e.alternate)&&null!==r.memoizedState?(r=rc,rc=16777216,oc(e,t,n),rc=r):oc(e,t,n))}}function ac(e){var t=e.alternate;if(null!==t&&null!==(e=t.child)){t.child=null;do{t=e.sibling,e.sibling=null,e=t}while(null!==e)}}function sc(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];Pl=r,uc(r,e)}ac(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)lc(e),e=e.sibling}function lc(e){switch(e.tag){case 0:case 11:case 15:sc(e),2048&e.flags&&bl(9,e,e.return);break;case 3:case 12:default:sc(e);break;case 22:var t=e.stateNode;null!==e.memoizedState&&2&t._visibility&&(null===e.return||13!==e.return.tag)?(t._visibility&=-3,cc(e)):sc(e)}}function cc(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];Pl=r,uc(r,e)}ac(e)}for(e=e.child;null!==e;){switch((t=e).tag){case 0:case 11:case 15:bl(8,t,t.return),cc(t);break;case 22:2&(n=t.stateNode)._visibility&&(n._visibility&=-3,cc(t));break;default:cc(t)}e=e.sibling}}function uc(e,t){for(;null!==Pl;){var n=Pl;switch(n.tag){case 0:case 11:case 15:bl(8,n,t);break;case 23:case 22:if(null!==n.memoizedState&&null!==n.memoizedState.cachePool){var r=n.memoizedState.cachePool.pool;null!=r&&r.refCount++}break;case 24:Bo(n.memoizedState.cache)}if(null!==(r=n.child))r.return=n,Pl=r;else e:for(n=e;null!==Pl;){var o=(r=Pl).sibling,i=r.return;if(Nl(r),r===n){Pl=null;break e}if(null!==o){o.return=i,Pl=o;break e}Pl=i}}}var dc={getCacheForType:function(e){var t=Po(Do),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Po(Do).controller.signal}},fc="function"==typeof WeakMap?WeakMap:Map,pc=0,hc=null,gc=null,mc=0,bc=0,vc=null,yc=!1,xc=!1,wc=!1,kc=0,Sc=0,Cc=0,_c=0,Ac=0,Ec=0,Tc=0,jc=null,Ic=null,Oc=!1,Lc=0,Pc=0,Mc=1/0,Nc=null,zc=null,Rc=0,$c=null,Dc=null,Fc=0,Bc=0,Hc=null,Uc=null,Vc=0,Wc=null;function Gc(){return 2&pc&&0!==mc?mc&-mc:null!==M.T?Hu():$e()}function qc(){if(0===Ec)if(536870912&mc&&!fo)Ec=536870912;else{var e=Ce;!(3932160&(Ce<<=1))&&(Ce=262144),Ec=e}return null!==(e=Pi.current)&&(e.flags|=32),Ec}function Kc(e,t,n){(e!==hc||2!==bc&&9!==bc)&&null===e.cancelPendingCommit||(tu(e,0),Qc(e,mc,Ec,!1)),Le(e,n),2&pc&&e===hc||(e===hc&&(!(2&pc)&&(_c|=n),4===Sc&&Qc(e,mc,Ec,!1)),Nu(e))}function Yc(e,t,n){if(6&pc)throw Error(s(327));for(var r=!n&&!(127&t)&&0===(t&e.expiredLanes)||Te(e,t),o=r?function(e,t){var n=pc;pc|=2;var r=ou(),o=iu();hc!==e||mc!==t?(Nc=null,Mc=le()+500,tu(e,t)):xc=Te(e,t);e:for(;;)try{if(0!==bc&&null!==gc){t=gc;var i=vc;t:switch(bc){case 1:bc=0,vc=null,fu(e,t,i,1);break;case 2:case 9:if(ni(i)){bc=0,vc=null,du(t);break}t=function(){2!==bc&&9!==bc||hc!==e||(bc=7),Nu(e)},i.then(t,t);break e;case 3:bc=7;break e;case 4:bc=5;break e;case 7:ni(i)?(bc=0,vc=null,du(t)):(bc=0,vc=null,fu(e,t,i,7));break;case 5:var a=null;switch(gc.tag){case 26:a=gc.memoizedState;case 5:case 27:var l=gc;if(a?of(a):l.stateNode.complete){bc=0,vc=null;var c=l.sibling;if(null!==c)gc=c;else{var u=l.return;null!==u?(gc=u,pu(u)):gc=null}break t}}bc=0,vc=null,fu(e,t,i,5);break;case 6:bc=0,vc=null,fu(e,t,i,6);break;case 8:eu(),Sc=6;break e;default:throw Error(s(462))}}cu();break}catch(t){nu(e,t)}return _o=Co=null,M.H=r,M.A=o,pc=n,null!==gc?0:(hc=null,mc=0,Ir(),Sc)}(e,t):su(e,t,!0),i=r;;){if(0===o){xc&&!r&&Qc(e,t,0,!1);break}if(n=e.current.alternate,!i||Zc(n)){if(2===o){if(i=t,e.errorRecoveryDisabledLanes&i)var a=0;else a=0!=(a=-536870913&e.pendingLanes)?a:536870912&a?536870912:0;if(0!==a){t=a;e:{var l=e;o=jc;var c=l.current.memoizedState.isDehydrated;if(c&&(tu(l,a).flags|=256),2!==(a=su(l,a,!1))){if(wc&&!c){l.errorRecoveryDisabledLanes|=i,_c|=i,o=4;break e}i=Ic,Ic=o,null!==i&&(null===Ic?Ic=i:Ic.push.apply(Ic,i))}o=a}if(i=!1,2!==o)continue}}if(1===o){tu(e,0),Qc(e,t,0,!0);break}e:{switch(r=e,i=o){case 0:case 1:throw Error(s(345));case 4:if((4194048&t)!==t)break;case 6:Qc(r,t,Ec,!yc);break e;case 2:Ic=null;break;case 3:case 5:break;default:throw Error(s(329))}if((62914560&t)===t&&10<(o=Lc+300-le())){if(Qc(r,t,Ec,!yc),0!==Ee(r,0,!0))break e;Fc=t,r.timeoutHandle=wd(Xc.bind(null,r,n,Ic,Nc,Oc,t,Ec,_c,Tc,yc,i,"Throttled",-0,0),o)}else Xc(r,n,Ic,Nc,Oc,t,Ec,_c,Tc,yc,i,null,-0,0)}break}o=su(e,t,!1),i=!1}Nu(e)}function Xc(e,t,n,r,o,i,a,s,l,c,u,d,f,p){if(e.timeoutHandle=-1,8192&(d=t.subtreeFlags)||!(16785408&~d)){ic(t,i,d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Lt});var h=(62914560&i)===i?Lc-le():(4194048&i)===i?Pc-le():0;if(null!==(h=function(e,t){return e.stylesheets&&0===e.count&&cf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&cf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&0===af&&(af=62500*function(){if("function"==typeof performance.getEntriesByType){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var o=n[r],i=o.transferSize,a=o.initiatorType,s=o.duration;if(i&&s&&pd(a)){for(a=0,s=o.responseEnd,r+=1;r<n.length;r++){var l=n[r],c=l.startTime;if(c>s)break;var u=l.transferSize,d=l.initiatorType;u&&pd(d)&&(a+=u*((l=l.responseEnd)<s?1:(s-c)/(l-c)))}if(--r,t+=8*(i+a)/(o.duration/1e3),10<++e)break}}if(0<e)return t/e/1e6}return navigator.connection&&"number"==typeof(e=navigator.connection.downlink)?e:5}());var o=setTimeout(function(){if(e.waitingForImages=!1,0===e.count&&(e.stylesheets&&cf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>af?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(o)}}:null}(d,h)))return Fc=i,e.cancelPendingCommit=h(gu.bind(null,e,t,i,n,r,o,a,s,l,u,d,null,f,p)),void Qc(e,i,a,!c)}gu(e,t,i,n,r,o,a,s,l)}function Zc(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&null!==(n=t.updateQueue)&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!Qn(i(),o))return!1}catch(e){return!1}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Qc(e,t,n,r){t&=~Ac,t&=~_c,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var o=t;0<o;){var i=31-xe(o),a=1<<i;r[i]=-1,o&=~a}0!==n&&Pe(e,n,t)}function Jc(){return!!(6&pc)||(zu(0,!1),!1)}function eu(){if(null!==gc){if(0===bc)var e=gc.return;else _o=Co=null,sa(e=gc),li=null,ci=0,e=gc;for(;null!==e;)gl(e.alternate,e),e=e.return;gc=null}}function tu(e,t){var n=e.timeoutHandle;-1!==n&&(e.timeoutHandle=-1,kd(n)),null!==(n=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,n()),Fc=0,eu(),hc=e,gc=n=Fr(e.current,null),mc=t,bc=0,vc=null,yc=!1,xc=Te(e,t),wc=!1,Tc=Ec=Ac=_c=Cc=Sc=0,Ic=jc=null,Oc=!1,8&t&&(t|=32&t);var r=e.entangledLanes;if(0!==r)for(e=e.entanglements,r&=t;0<r;){var o=31-xe(r),i=1<<o;t|=e[o],r&=~i}return kc=t,Ir(),n}function nu(e,t){Ui=null,M.H=gs,t===Qo||t===ei?(t=ai(),bc=3):t===Jo?(t=ai(),bc=4):bc=t===Ls?8:null!==t&&"object"==typeof t&&"function"==typeof t.then?6:1,vc=t,null===gc&&(Sc=1,Es(e,Kr(t,e.current)))}function ru(){var e=Pi.current;return null===e||((4194048&mc)===mc?null===Mi:!!((62914560&mc)===mc||536870912&mc)&&e===Mi)}function ou(){var e=M.H;return M.H=gs,null===e?gs:e}function iu(){var e=M.A;return M.A=dc,e}function au(){Sc=4,yc||(4194048&mc)!==mc&&null!==Pi.current||(xc=!0),!(134217727&Cc)&&!(134217727&_c)||null===hc||Qc(hc,mc,Ec,!1)}function su(e,t,n){var r=pc;pc|=2;var o=ou(),i=iu();hc===e&&mc===t||(Nc=null,tu(e,t)),t=!1;var a=Sc;e:for(;;)try{if(0!==bc&&null!==gc){var s=gc,l=vc;switch(bc){case 8:eu(),a=6;break e;case 3:case 2:case 9:case 6:null===Pi.current&&(t=!0);var c=bc;if(bc=0,vc=null,fu(e,s,l,c),n&&xc){a=0;break e}break;default:c=bc,bc=0,vc=null,fu(e,s,l,c)}}lu(),a=Sc;break}catch(t){nu(e,t)}return t&&e.shellSuspendCounter++,_o=Co=null,pc=r,M.H=o,M.A=i,null===gc&&(hc=null,mc=0,Ir()),a}function lu(){for(;null!==gc;)uu(gc)}function cu(){for(;null!==gc&&!ae();)uu(gc)}function uu(e){var t=al(e.alternate,e,kc);e.memoizedProps=e.pendingProps,null===t?pu(e):gc=t}function du(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Ws(n,t,t.pendingProps,t.type,void 0,mc);break;case 11:t=Ws(n,t,t.pendingProps,t.type.render,t.ref,mc);break;case 5:sa(t);default:gl(n,t),t=al(n,t=gc=Br(t,kc),kc)}e.memoizedProps=e.pendingProps,null===t?pu(e):gc=t}function fu(e,t,n,r){_o=Co=null,sa(t),li=null,ci=0;var o=t.return;try{if(function(e,t,n,r,o){if(n.flags|=32768,null!==r&&"object"==typeof r&&"function"==typeof r.then){if(null!==(t=n.alternate)&&Io(t,n,o,!0),null!==(n=Pi.current)){switch(n.tag){case 31:case 13:return null===Mi?au():null===n.alternate&&0===Sc&&(Sc=3),n.flags&=-257,n.flags|=65536,n.lanes=o,r===ti?n.flags|=16384:(null===(t=n.updateQueue)?n.updateQueue=new Set([r]):t.add(r),Cu(e,r,o)),!1;case 22:return n.flags|=65536,r===ti?n.flags|=16384:(null===(t=n.updateQueue)?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):null===(n=t.retryQueue)?t.retryQueue=new Set([r]):n.add(r),Cu(e,r,o)),!1}throw Error(s(435,n.tag))}return Cu(e,r,o),au(),!1}if(fo)return null!==(t=Pi.current)?(!(65536&t.flags)&&(t.flags|=256),t.flags|=65536,t.lanes=o,r!==go&&ko(Kr(e=Error(s(422),{cause:r}),n))):(r!==go&&ko(Kr(t=Error(s(423),{cause:r}),n)),(e=e.current.alternate).flags|=65536,o&=-o,e.lanes|=o,r=Kr(r,n),ki(e,o=js(e.stateNode,r,o)),4!==Sc&&(Sc=2)),!1;var i=Error(s(520),{cause:r});if(i=Kr(i,n),null===jc?jc=[i]:jc.push(i),4!==Sc&&(Sc=2),null===t)return!0;r=Kr(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=o&-o,n.lanes|=e,ki(n,e=js(n.stateNode,r,e)),!1;case 1:if(t=n.type,i=n.stateNode,!(128&n.flags||"function"!=typeof t.getDerivedStateFromError&&(null===i||"function"!=typeof i.componentDidCatch||null!==zc&&zc.has(i))))return n.flags|=65536,o&=-o,n.lanes|=o,Os(o=Is(o),e,n,r),ki(n,o),!1}n=n.return}while(null!==n);return!1}(e,o,t,n,mc))return Sc=1,Es(e,Kr(n,e.current)),void(gc=null)}catch(t){if(null!==o)throw gc=o,t;return Sc=1,Es(e,Kr(n,e.current)),void(gc=null)}32768&t.flags?(fo||1===r?e=!0:xc||536870912&mc?e=!1:(yc=e=!0,(2===r||9===r||3===r||6===r)&&null!==(r=Pi.current)&&13===r.tag&&(r.flags|=16384)),hu(t,e)):pu(t)}function pu(e){var t=e;do{if(32768&t.flags)return void hu(t,yc);e=t.return;var n=pl(t.alternate,t,kc);if(null!==n)return void(gc=n);if(null!==(t=t.sibling))return void(gc=t);gc=t=e}while(null!==t);0===Sc&&(Sc=5)}function hu(e,t){do{var n=hl(e.alternate,e);if(null!==n)return n.flags&=32767,void(gc=n);if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&null!==(e=e.sibling))return void(gc=e);gc=e=n}while(null!==e);Sc=6,gc=null}function gu(e,t,n,r,o,i,a,l,c){e.cancelPendingCommit=null;do{xu()}while(0!==Rc);if(6&pc)throw Error(s(327));if(null!==t){if(t===e.current)throw Error(s(177));if(i=t.lanes|t.childLanes,function(e,t,n,r,o,i){var a=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,l=e.expirationTimes,c=e.hiddenUpdates;for(n=a&~n;0<n;){var u=31-xe(n),d=1<<u;s[u]=0,l[u]=-1;var f=c[u];if(null!==f)for(c[u]=null,u=0;u<f.length;u++){var p=f[u];null!==p&&(p.lane&=-536870913)}n&=~d}0!==r&&Pe(e,r,0),0!==i&&0===o&&0!==e.tag&&(e.suspendedLanes|=i&~(a&~t))}(e,n,i|=jr,a,l,c),e===hc&&(gc=hc=null,mc=0),Dc=t,$c=e,Fc=n,Bc=i,Hc=o,Uc=r,10256&t.subtreeFlags||10256&t.flags?(e.callbackNode=null,e.callbackPriority=0,oe(fe,function(){return wu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(13878&t.flags),13878&t.subtreeFlags||r){r=M.T,M.T=null,o=N.p,N.p=2,a=pc,pc|=4;try{!function(e,t){if(e=e.containerInfo,hd=vf,or(e=rr(e))){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch(e){n=null;break e}var a=0,l=-1,c=-1,u=0,d=0,f=e,p=null;t:for(;;){for(var h;f!==n||0!==o&&3!==f.nodeType||(l=a+o),f!==i||0!==r&&3!==f.nodeType||(c=a+r),3===f.nodeType&&(a+=f.nodeValue.length),null!==(h=f.firstChild);)p=f,f=h;for(;;){if(f===e)break t;if(p===n&&++u===o&&(l=a),p===i&&++d===r&&(c=a),null!==(h=f.nextSibling))break;p=(f=p).parentNode}f=h}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(gd={focusedElem:e,selectionRange:n},vf=!1,Pl=t;null!==Pl;)if(e=(t=Pl).child,1028&t.subtreeFlags&&null!==e)e.return=t,Pl=e;else for(;null!==Pl;){switch(i=(t=Pl).alternate,e=t.flags,t.tag){case 0:if(4&e&&null!==(e=null!==(e=t.updateQueue)?e.events:null))for(n=0;n<e.length;n++)(o=e[n]).ref.impl=o.nextImpl;break;case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if(1024&e&&null!==i){e=void 0,n=t,o=i.memoizedProps,i=i.memoizedState,r=n.stateNode;try{var g=Ss(n.type,o);e=r.getSnapshotBeforeUpdate(g,i),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Su(n,n.return,e)}}break;case 3:if(1024&e)if(9===(n=(e=t.stateNode.containerInfo).nodeType))jd(e);else if(1===n)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":jd(e);break;default:e.textContent=""}break;default:if(1024&e)throw Error(s(163))}if(null!==(e=t.sibling)){e.return=t.return,Pl=e;break}Pl=t.return}}(e,t)}finally{pc=a,N.p=o,M.T=r}}Rc=1,mu(),bu(),vu()}}function mu(){if(1===Rc){Rc=0;var e=$c,t=Dc,n=!!(13878&t.flags);if(13878&t.subtreeFlags||n){n=M.T,M.T=null;var r=N.p;N.p=2;var o=pc;pc|=4;try{Wl(t,e);var i=gd,a=rr(e.containerInfo),s=i.focusedElem,l=i.selectionRange;if(a!==s&&s&&s.ownerDocument&&nr(s.ownerDocument.documentElement,s)){if(null!==l&&or(s)){var c=l.start,u=l.end;if(void 0===u&&(u=c),"selectionStart"in s)s.selectionStart=c,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),h=s.textContent.length,g=Math.min(l.start,h),m=void 0===l.end?g:Math.min(l.end,h);!p.extend&&g>m&&(a=m,m=g,g=a);var b=tr(s,g),v=tr(s,m);if(b&&v&&(1!==p.rangeCount||p.anchorNode!==b.node||p.anchorOffset!==b.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(b.node,b.offset),p.removeAllRanges(),g>m?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)1===p.nodeType&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for("function"==typeof s.focus&&s.focus(),s=0;s<d.length;s++){var x=d[s];x.element.scrollLeft=x.left,x.element.scrollTop=x.top}}vf=!!hd,gd=hd=null}finally{pc=o,N.p=r,M.T=n}}e.current=t,Rc=2}}function bu(){if(2===Rc){Rc=0;var e=$c,t=Dc,n=!!(8772&t.flags);if(8772&t.subtreeFlags||n){n=M.T,M.T=null;var r=N.p;N.p=2;var o=pc;pc|=4;try{Ml(e,t.alternate,t)}finally{pc=o,N.p=r,M.T=n}}Rc=3}}function vu(){if(4===Rc||3===Rc){Rc=0,se();var e=$c,t=Dc,n=Fc,r=Uc;10256&t.subtreeFlags||10256&t.flags?Rc=5:(Rc=0,Dc=$c=null,yu(e,e.pendingLanes));var o=e.pendingLanes;if(0===o&&(zc=null),Re(n),t=t.stateNode,ve&&"function"==typeof ve.onCommitFiberRoot)try{ve.onCommitFiberRoot(be,t,void 0,!(128&~t.current.flags))}catch(e){}if(null!==r){t=M.T,o=N.p,N.p=2,M.T=null;try{for(var i=e.onRecoverableError,a=0;a<r.length;a++){var s=r[a];i(s.value,{componentStack:s.stack})}}finally{M.T=t,N.p=o}}3&Fc&&xu(),Nu(e),o=e.pendingLanes,261930&n&&42&o?e===Wc?Vc++:(Vc=0,Wc=e):Vc=0,zu(0,!1)}}function yu(e,t){0===(e.pooledCacheLanes&=t)&&null!=(t=e.pooledCache)&&(e.pooledCache=null,Bo(t))}function xu(){return mu(),bu(),vu(),wu()}function wu(){if(5!==Rc)return!1;var e=$c,t=Bc;Bc=0;var n=Re(Fc),r=M.T,o=N.p;try{N.p=32>n?32:n,M.T=null,n=Hc,Hc=null;var i=$c,a=Fc;if(Rc=0,Dc=$c=null,Fc=0,6&pc)throw Error(s(331));var l=pc;if(pc|=4,lc(i.current),ec(i,i.current,a,n),pc=l,zu(0,!1),ve&&"function"==typeof ve.onPostCommitFiberRoot)try{ve.onPostCommitFiberRoot(be,i)}catch(e){}return!0}finally{N.p=o,M.T=r,yu(e,t)}}function ku(e,t,n){t=Kr(n,t),null!==(e=xi(e,t=js(e.stateNode,t,2),2))&&(Le(e,2),Nu(e))}function Su(e,t,n){if(3===e.tag)ku(e,e,n);else for(;null!==t;){if(3===t.tag){ku(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===zc||!zc.has(r))){e=Kr(n,e),null!==(r=xi(t,n=Is(2),2))&&(Os(n,r,t,e),Le(r,2),Nu(r));break}}t=t.return}}function Cu(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new fc;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(wc=!0,o.add(n),e=_u.bind(null,e,t,n),t.then(e,e))}function _u(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,hc===e&&(mc&n)===n&&(4===Sc||3===Sc&&(62914560&mc)===mc&&300>le()-Lc?!(2&pc)&&tu(e,0):Ac|=n,Tc===mc&&(Tc=0)),Nu(e)}function Au(e,t){0===t&&(t=Ie()),null!==(e=Pr(e,t))&&(Le(e,t),Nu(e))}function Eu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Au(e,n)}function Tu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(s(314))}null!==r&&r.delete(t),Au(e,n)}var ju=null,Iu=null,Ou=!1,Lu=!1,Pu=!1,Mu=0;function Nu(e){e!==Iu&&null===e.next&&(null===Iu?ju=Iu=e:Iu=Iu.next=e),Lu=!0,Ou||(Ou=!0,Cd(function(){6&pc?oe(ue,Ru):$u()}))}function zu(e,t){if(!Pu&&Lu){Pu=!0;do{for(var n=!1,r=ju;null!==r;){if(!t)if(0!==e){var o=r.pendingLanes;if(0===o)var i=0;else{var a=r.suspendedLanes,s=r.pingedLanes;i=(1<<31-xe(42|e)+1)-1,i=201326741&(i&=o&~(a&~s))?201326741&i|1:i?2|i:0}0!==i&&(n=!0,Bu(r,i))}else i=mc,!(3&(i=Ee(r,r===hc?i:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||Te(r,i)||(n=!0,Bu(r,i));r=r.next}}while(n);Pu=!1}}function Ru(){$u()}function $u(){Lu=Ou=!1;var e,t=0;0!==Mu&&((e=window.event)&&"popstate"===e.type?e!==xd&&(xd=e,1):(xd=null,0))&&(t=Mu);for(var n=le(),r=null,o=ju;null!==o;){var i=o.next,a=Du(o,n);0===a?(o.next=null,null===r?ju=i:r.next=i,null===i&&(Iu=r)):(r=o,(0!==t||3&a)&&(Lu=!0)),o=i}0!==Rc&&5!==Rc||zu(t,!1),0!==Mu&&(Mu=0)}function Du(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=-62914561&e.pendingLanes;0<i;){var a=31-xe(i),s=1<<a,l=o[a];-1===l?0!==(s&n)&&0===(s&r)||(o[a]=je(s,t)):l<=t&&(e.expiredLanes|=s),i&=~s}if(n=mc,n=Ee(e,e===(t=hc)?n:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle),r=e.callbackNode,0===n||e===t&&(2===bc||9===bc)||null!==e.cancelPendingCommit)return null!==r&&null!==r&&ie(r),e.callbackNode=null,e.callbackPriority=0;if(!(3&n)||Te(e,n)){if((t=n&-n)===e.callbackPriority)return t;switch(null!==r&&ie(r),Re(n)){case 2:case 8:n=de;break;case 32:default:n=fe;break;case 268435456:n=he}return r=Fu.bind(null,e),n=oe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return null!==r&&null!==r&&ie(r),e.callbackPriority=2,e.callbackNode=null,2}function Fu(e,t){if(0!==Rc&&5!==Rc)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(xu()&&e.callbackNode!==n)return null;var r=mc;return 0===(r=Ee(e,e===hc?r:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle))?null:(Yc(e,r,t),Du(e,le()),null!=e.callbackNode&&e.callbackNode===n?Fu.bind(null,e):null)}function Bu(e,t){if(xu())return null;Yc(e,t,!0)}function Hu(){if(0===Mu){var e=Vo;0===e&&(e=Se,!(261888&(Se<<=1))&&(Se=256)),Mu=e}return Mu}function Uu(e){return null==e||"symbol"==typeof e||"boolean"==typeof e?null:"function"==typeof e?e:Ot(""+e)}function Vu(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}for(var Wu=0;Wu<Cr.length;Wu++){var Gu=Cr[Wu];_r(Gu.toLowerCase(),"on"+(Gu[0].toUpperCase()+Gu.slice(1)))}_r(mr,"onAnimationEnd"),_r(br,"onAnimationIteration"),_r(vr,"onAnimationStart"),_r("dblclick","onDoubleClick"),_r("focusin","onFocus"),_r("focusout","onBlur"),_r(yr,"onTransitionRun"),_r(xr,"onTransitionStart"),_r(wr,"onTransitionCancel"),_r(kr,"onTransitionEnd"),ot("onMouseEnter",["mouseout","mouseover"]),ot("onMouseLeave",["mouseout","mouseover"]),ot("onPointerEnter",["pointerout","pointerover"]),ot("onPointerLeave",["pointerout","pointerover"]),rt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),rt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),rt("onBeforeInput",["compositionend","keypress","textInput","paste"]),rt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),rt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),rt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qu="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ku=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(qu));function Yu(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==i&&o.isPropagationStopped())break e;i=s,o.currentTarget=c;try{i(o)}catch(e){Ar(e)}o.currentTarget=null,i=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,c=s.currentTarget,s=s.listener,l!==i&&o.isPropagationStopped())break e;i=s,o.currentTarget=c;try{i(o)}catch(e){Ar(e)}o.currentTarget=null,i=l}}}}function Xu(e,t){var n=t[Ve];void 0===n&&(n=t[Ve]=new Set);var r=e+"__bubble";n.has(r)||(ed(t,e,2,!1),n.add(r))}function Zu(e,t,n){var r=0;t&&(r|=4),ed(n,e,r,t)}var Qu="_reactListening"+Math.random().toString(36).slice(2);function Ju(e){if(!e[Qu]){e[Qu]=!0,tt.forEach(function(t){"selectionchange"!==t&&(Ku.has(t)||Zu(t,!1,e),Zu(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Qu]||(t[Qu]=!0,Zu("selectionchange",!1,t))}}function ed(e,t,n,r){switch(_f(t)){case 2:var o=yf;break;case 8:o=xf;break;default:o=wf}n=o.bind(null,t,n,e),o=void 0,!Ht||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function td(e,t,n,r,o){var i=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===o)break;if(4===a)for(a=r.return;null!==a;){var c=a.tag;if((3===c||4===c)&&a.stateNode.containerInfo===o)return;a=a.return}for(;null!==s;){if(null===(a=Xe(s)))return;if(5===(c=a.tag)||6===c||26===c||27===c){r=i=a;continue e}s=s.parentNode}}r=r.return}Dt(function(){var r=i,o=Mt(n),a=[];e:{var s=Sr.get(e);if(void 0!==s){var c=nn,u=e;switch(e){case"keypress":if(0===Kt(n))break e;case"keydown":case"keyup":c=vn;break;case"focusin":u="focus",c=cn;break;case"focusout":u="blur",c=cn;break;case"beforeblur":case"afterblur":c=cn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":c=sn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":c=ln;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":c=xn;break;case mr:case br:case vr:c=un;break;case kr:c=wn;break;case"scroll":case"scrollend":c=on;break;case"wheel":c=kn;break;case"copy":case"cut":case"paste":c=dn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":c=yn;break;case"toggle":case"beforetoggle":c=Sn}var d=!!(4&t),f=!d&&("scroll"===e||"scrollend"===e),p=d?null!==s?s+"Capture":null:s;d=[];for(var h,g=r;null!==g;){var m=g;if(h=m.stateNode,5!==(m=m.tag)&&26!==m&&27!==m||null===h||null===p||null!=(m=Ft(g,p))&&d.push(nd(g,m,h)),f)break;g=g.return}0<d.length&&(s=new c(s,u,null,n,o),a.push({event:s,listeners:d}))}}if(!(7&t)){if(c="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===Pt||!(u=n.relatedTarget||n.fromElement)||!Xe(u)&&!u[Ue])&&(c||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,c?(c=r,null!==(u=(u=n.relatedTarget||n.toElement)?Xe(u):null)&&(f=l(u),d=u.tag,u!==f||5!==d&&27!==d&&6!==d)&&(u=null)):(c=null,u=r),c!==u)){if(d=sn,m="onMouseLeave",p="onMouseEnter",g="mouse","pointerout"!==e&&"pointerover"!==e||(d=yn,m="onPointerLeave",p="onPointerEnter",g="pointer"),f=null==c?s:Qe(c),h=null==u?s:Qe(u),(s=new d(m,g+"leave",c,n,o)).target=f,s.relatedTarget=h,m=null,Xe(o)===r&&((d=new d(p,g+"enter",u,n,o)).target=h,d.relatedTarget=f,m=d),f=m,c&&u)e:{for(d=od,g=u,h=0,m=p=c;m;m=d(m))h++;m=0;for(var b=g;b;b=d(b))m++;for(;0<h-m;)p=d(p),h--;for(;0<m-h;)g=d(g),m--;for(;h--;){if(p===g||null!==g&&p===g.alternate){d=p;break e}p=d(p),g=d(g)}d=null}else d=null;null!==c&&id(a,s,c,d,!1),null!==u&&null!==f&&id(a,f,u,d,!0)}if("select"===(c=(s=r?Qe(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===c&&"file"===s.type)var v=Bn;else if(Nn(s))if(Hn)v=Zn;else{v=Yn;var y=Kn}else!(c=s.nodeName)||"input"!==c.toLowerCase()||"checkbox"!==s.type&&"radio"!==s.type?r&&Tt(r.elementType)&&(v=Bn):v=Xn;switch(v&&(v=v(e,r))?zn(a,v,n,o):(y&&y(e,s,r),"focusout"===e&&r&&"number"===s.type&&null!=r.memoizedProps.value&&xt(s,"number",s.value)),y=r?Qe(r):window,e){case"focusin":(Nn(y)||"true"===y.contentEditable)&&(ar=y,sr=r,lr=null);break;case"focusout":lr=sr=ar=null;break;case"mousedown":cr=!0;break;case"contextmenu":case"mouseup":case"dragend":cr=!1,ur(a,n,o);break;case"selectionchange":if(ir)break;case"keydown":case"keyup":ur(a,n,o)}var x;if(_n)e:{switch(e){case"compositionstart":var w="onCompositionStart";break e;case"compositionend":w="onCompositionEnd";break e;case"compositionupdate":w="onCompositionUpdate";break e}w=void 0}else Pn?On(e,n)&&(w="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(w="onCompositionStart");w&&(Tn&&"ko"!==n.locale&&(Pn||"onCompositionStart"!==w?"onCompositionEnd"===w&&Pn&&(x=qt()):(Wt="value"in(Vt=o)?Vt.value:Vt.textContent,Pn=!0)),0<(y=rd(r,w)).length&&(w=new fn(w,e,null,n,o),a.push({event:w,listeners:y}),(x||null!==(x=Ln(n)))&&(w.data=x))),(x=En?function(e,t){switch(e){case"compositionend":return Ln(t);case"keypress":return 32!==t.which?null:(In=!0,jn);case"textInput":return(e=t.data)===jn&&In?null:e;default:return null}}(e,n):function(e,t){if(Pn)return"compositionend"===e||!_n&&On(e,t)?(e=qt(),Gt=Wt=Vt=null,Pn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Tn&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(w=rd(r,"onBeforeInput")).length&&(y=new fn("onBeforeInput","beforeinput",null,n,o),a.push({event:y,listeners:w}),y.data=x),function(e,t,n,r,o){if("submit"===t&&n&&n.stateNode===o){var i=Uu((o[He]||null).action),a=r.submitter;a&&null!==(t=(t=a[He]||null)?Uu(t.formAction):a.getAttribute("formAction"))&&(i=t,a=null);var s=new nn("action","action",null,r,o);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(0!==Mu){var e=a?Vu(o,a):new FormData(o);ts(n,{pending:!0,data:e,method:o.method,action:i},null,e)}}else"function"==typeof i&&(s.preventDefault(),e=a?Vu(o,a):new FormData(o),ts(n,{pending:!0,data:e,method:o.method,action:i},i,e))},currentTarget:o}]})}}(a,e,r,n,o)}Yu(a,t)})}function nd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function rd(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;if(5!==(o=o.tag)&&26!==o&&27!==o||null===i||(null!=(o=Ft(e,n))&&r.unshift(nd(e,o,i)),null!=(o=Ft(e,t))&&r.push(nd(e,o,i))),3===e.tag)return r;e=e.return}return[]}function od(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag&&27!==e.tag);return e||null}function id(e,t,n,r,o){for(var i=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(s=s.tag,null!==l&&l===r)break;5!==s&&26!==s&&27!==s||null===c||(l=c,o?null!=(c=Ft(n,i))&&a.unshift(nd(n,c,l)):o||null!=(c=Ft(n,i))&&a.push(nd(n,c,l))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var ad=/\r\n?/g,sd=/\u0000|\uFFFD/g;function ld(e){return("string"==typeof e?e:""+e).replace(ad,"\n").replace(sd,"")}function cd(e,t){return t=ld(t),ld(e)===t}function ud(e,t,n,r,o,i){switch(n){case"children":"string"==typeof r?"body"===t||"textarea"===t&&""===r||Ct(e,r):("number"==typeof r||"bigint"==typeof r)&&"body"!==t&&Ct(e,""+r);break;case"className":ct(e,"class",r);break;case"tabIndex":ct(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":ct(e,n,r);break;case"style":Et(e,r,i);break;case"data":if("object"!==t){ct(e,"data",r);break}case"src":case"href":if(""===r&&("a"!==t||"href"!==n)){e.removeAttribute(n);break}if(null==r||"function"==typeof r||"symbol"==typeof r||"boolean"==typeof r){e.removeAttribute(n);break}r=Ot(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if("function"==typeof r){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}if("function"==typeof i&&("formAction"===n?("input"!==t&&ud(e,t,"name",o.name,o,null),ud(e,t,"formEncType",o.formEncType,o,null),ud(e,t,"formMethod",o.formMethod,o,null),ud(e,t,"formTarget",o.formTarget,o,null)):(ud(e,t,"encType",o.encType,o,null),ud(e,t,"method",o.method,o,null),ud(e,t,"target",o.target,o,null))),null==r||"symbol"==typeof r||"boolean"==typeof r){e.removeAttribute(n);break}r=Ot(""+r),e.setAttribute(n,r);break;case"onClick":null!=r&&(e.onclick=Lt);break;case"onScroll":null!=r&&Xu("scroll",e);break;case"onScrollEnd":null!=r&&Xu("scrollend",e);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!=typeof r||!("__html"in r))throw Error(s(61));if(null!=(n=r.__html)){if(null!=o.children)throw Error(s(60));e.innerHTML=n}}break;case"multiple":e.multiple=r&&"function"!=typeof r&&"symbol"!=typeof r;break;case"muted":e.muted=r&&"function"!=typeof r&&"symbol"!=typeof r;break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":case"autoFocus":break;case"xlinkHref":if(null==r||"function"==typeof r||"boolean"==typeof r||"symbol"==typeof r){e.removeAttribute("xlink:href");break}n=Ot(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":null!=r&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(n,""+r):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":!0===r?e.setAttribute(n,""):!1!==r&&null!=r&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":null!=r&&"function"!=typeof r&&"symbol"!=typeof r&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":null==r||"function"==typeof r||"symbol"==typeof r||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":Xu("beforetoggle",e),Xu("toggle",e),lt(e,"popover",r);break;case"xlinkActuate":ut(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":ut(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":ut(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":ut(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":ut(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":ut(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":ut(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":ut(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":ut(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":lt(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])&&lt(e,n=jt.get(n)||n,r)}}function dd(e,t,n,r,o,i){switch(n){case"style":Et(e,r,i);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!=typeof r||!("__html"in r))throw Error(s(61));if(null!=(n=r.__html)){if(null!=o.children)throw Error(s(60));e.innerHTML=n}}break;case"children":"string"==typeof r?Ct(e,r):("number"==typeof r||"bigint"==typeof r)&&Ct(e,""+r);break;case"onScroll":null!=r&&Xu("scroll",e);break;case"onScrollEnd":null!=r&&Xu("scrollend",e);break;case"onClick":null!=r&&(e.onclick=Lt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":case"innerText":case"textContent":break;default:nt.hasOwnProperty(n)||("o"!==n[0]||"n"!==n[1]||(o=n.endsWith("Capture"),t=n.slice(2,o?n.length-7:void 0),"function"==typeof(i=null!=(i=e[He]||null)?i[n]:null)&&e.removeEventListener(t,i,o),"function"!=typeof r)?n in e?e[n]=r:!0===r?e.setAttribute(n,""):lt(e,n,r):("function"!=typeof i&&null!==i&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,o)))}}function fd(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Xu("error",e),Xu("load",e);var r,o=!1,i=!1;for(r in n)if(n.hasOwnProperty(r)){var a=n[r];if(null!=a)switch(r){case"src":o=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:ud(e,t,r,a,n,null)}}return i&&ud(e,t,"srcSet",n.srcSet,n,null),void(o&&ud(e,t,"src",n.src,n,null));case"input":Xu("invalid",e);var l=r=a=i=null,c=null,u=null;for(o in n)if(n.hasOwnProperty(o)){var d=n[o];if(null!=d)switch(o){case"name":i=d;break;case"type":a=d;break;case"checked":c=d;break;case"defaultChecked":u=d;break;case"value":r=d;break;case"defaultValue":l=d;break;case"children":case"dangerouslySetInnerHTML":if(null!=d)throw Error(s(137,t));break;default:ud(e,t,o,d,n,null)}}return void yt(e,r,l,c,u,a,i,!1);case"select":for(i in Xu("invalid",e),o=a=r=null,n)if(n.hasOwnProperty(i)&&null!=(l=n[i]))switch(i){case"value":r=l;break;case"defaultValue":a=l;break;case"multiple":o=l;default:ud(e,t,i,l,n,null)}return t=r,n=a,e.multiple=!!o,void(null!=t?wt(e,!!o,t,!1):null!=n&&wt(e,!!o,n,!0));case"textarea":for(a in Xu("invalid",e),r=i=o=null,n)if(n.hasOwnProperty(a)&&null!=(l=n[a]))switch(a){case"value":o=l;break;case"defaultValue":i=l;break;case"children":r=l;break;case"dangerouslySetInnerHTML":if(null!=l)throw Error(s(91));break;default:ud(e,t,a,l,n,null)}return void St(e,o,i,r);case"option":for(c in n)n.hasOwnProperty(c)&&null!=(o=n[c])&&("selected"===c?e.selected=o&&"function"!=typeof o&&"symbol"!=typeof o:ud(e,t,c,o,n,null));return;case"dialog":Xu("beforetoggle",e),Xu("toggle",e),Xu("cancel",e),Xu("close",e);break;case"iframe":case"object":Xu("load",e);break;case"video":case"audio":for(o=0;o<qu.length;o++)Xu(qu[o],e);break;case"image":Xu("error",e),Xu("load",e);break;case"details":Xu("toggle",e);break;case"embed":case"source":case"link":Xu("error",e),Xu("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&null!=(o=n[u]))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:ud(e,t,u,o,n,null)}return;default:if(Tt(t)){for(d in n)n.hasOwnProperty(d)&&void 0!==(o=n[d])&&dd(e,t,d,o,n,void 0);return}}for(l in n)n.hasOwnProperty(l)&&null!=(o=n[l])&&ud(e,t,l,o,n,null)}function pd(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}var hd=null,gd=null;function md(e){return 9===e.nodeType?e:e.ownerDocument}function bd(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function vd(e,t){if(0===e)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return 1===e&&"foreignObject"===t?0:e}function yd(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"bigint"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var xd=null,wd="function"==typeof setTimeout?setTimeout:void 0,kd="function"==typeof clearTimeout?clearTimeout:void 0,Sd="function"==typeof Promise?Promise:void 0,Cd="function"==typeof queueMicrotask?queueMicrotask:void 0!==Sd?function(e){return Sd.resolve(null).then(e).catch(_d)}:wd;function _d(e){setTimeout(function(){throw e})}function Ad(e){return"head"===e}function Ed(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)||"/&"===n){if(0===r)return e.removeChild(o),void Uf(t);r--}else if("$"===n||"$?"===n||"$~"===n||"$!"===n||"&"===n)r++;else if("html"===n)$d(e.ownerDocument.documentElement);else if("head"===n){$d(n=e.ownerDocument.head);for(var i=n.firstChild;i;){var a=i.nextSibling,s=i.nodeName;i[Ke]||"SCRIPT"===s||"STYLE"===s||"LINK"===s&&"stylesheet"===i.rel.toLowerCase()||n.removeChild(i),i=a}}else"body"===n&&$d(e.ownerDocument.body);n=o}while(n);Uf(t)}function Td(e,t){var n=e;e=0;do{var r=n.nextSibling;if(1===n.nodeType?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",""===n.getAttribute("style")&&n.removeAttribute("style")):3===n.nodeType&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&8===r.nodeType)if("/$"===(n=r.data)){if(0===e)break;e--}else"$"!==n&&"$?"!==n&&"$~"!==n&&"$!"!==n||e++;n=r}while(n)}function jd(e){var t=e.firstChild;for(t&&10===t.nodeType&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":jd(n),Ye(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===n.rel.toLowerCase())continue}e.removeChild(n)}}function Id(e,t){for(;8!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!t)return null;if(null===(e=Pd(e.nextSibling)))return null}return e}function Od(e){return"$?"===e.data||"$~"===e.data}function Ld(e){return"$!"===e.data||"$?"===e.data&&"loading"!==e.ownerDocument.readyState}function Pd(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t||"$~"===t||"&"===t||"F!"===t||"F"===t)break;if("/$"===t||"/&"===t)return null}}return e}var Md=null;function Nd(e){e=e.nextSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n||"/&"===n){if(0===t)return Pd(e.nextSibling);t--}else"$"!==n&&"$!"!==n&&"$?"!==n&&"$~"!==n&&"&"!==n||t++}e=e.nextSibling}return null}function zd(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n||"$~"===n||"&"===n){if(0===t)return e;t--}else"/$"!==n&&"/&"!==n||t++}e=e.previousSibling}return null}function Rd(e,t,n){switch(t=md(n),e){case"html":if(!(e=t.documentElement))throw Error(s(452));return e;case"head":if(!(e=t.head))throw Error(s(453));return e;case"body":if(!(e=t.body))throw Error(s(454));return e;default:throw Error(s(451))}}function $d(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ye(e)}var Dd=new Map,Fd=new Set;function Bd(e){return"function"==typeof e.getRootNode?e.getRootNode():9===e.nodeType?e:e.ownerDocument}var Hd=N.d;N.d={f:function(){var e=Hd.f(),t=Jc();return e||t},r:function(e){var t=Ze(e);null!==t&&5===t.tag&&"form"===t.type?rs(t):Hd.r(e)},D:function(e){Hd.D(e),Vd("dns-prefetch",e,null)},C:function(e,t){Hd.C(e,t),Vd("preconnect",e,t)},L:function(e,t,n){Hd.L(e,t,n);var r=Ud;if(r&&e&&t){var o='link[rel="preload"][as="'+bt(t)+'"]';"image"===t&&n&&n.imageSrcSet?(o+='[imagesrcset="'+bt(n.imageSrcSet)+'"]',"string"==typeof n.imageSizes&&(o+='[imagesizes="'+bt(n.imageSizes)+'"]')):o+='[href="'+bt(e)+'"]';var i=o;switch(t){case"style":i=Gd(e);break;case"script":i=Yd(e)}Dd.has(i)||(e=p({rel:"preload",href:"image"===t&&n&&n.imageSrcSet?void 0:e,as:t},n),Dd.set(i,e),null!==r.querySelector(o)||"style"===t&&r.querySelector(qd(i))||"script"===t&&r.querySelector(Xd(i))||(fd(t=r.createElement("link"),"link",e),et(t),r.head.appendChild(t)))}},m:function(e,t){Hd.m(e,t);var n=Ud;if(n&&e){var r=t&&"string"==typeof t.as?t.as:"script",o='link[rel="modulepreload"][as="'+bt(r)+'"][href="'+bt(e)+'"]',i=o;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Yd(e)}if(!Dd.has(i)&&(e=p({rel:"modulepreload",href:e},t),Dd.set(i,e),null===n.querySelector(o))){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Xd(i)))return}fd(r=n.createElement("link"),"link",e),et(r),n.head.appendChild(r)}}},X:function(e,t){Hd.X(e,t);var n=Ud;if(n&&e){var r=Je(n).hoistableScripts,o=Yd(e),i=r.get(o);i||((i=n.querySelector(Xd(o)))||(e=p({src:e,async:!0},t),(t=Dd.get(o))&&ef(e,t),et(i=n.createElement("script")),fd(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(o,i))}},S:function(e,t,n){Hd.S(e,t,n);var r=Ud;if(r&&e){var o=Je(r).hoistableStyles,i=Gd(e);t=t||"default";var a=o.get(i);if(!a){var s={loading:0,preload:null};if(a=r.querySelector(qd(i)))s.loading=5;else{e=p({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Dd.get(i))&&Jd(e,n);var l=a=r.createElement("link");et(l),fd(l,"link",e),l._p=new Promise(function(e,t){l.onload=e,l.onerror=t}),l.addEventListener("load",function(){s.loading|=1}),l.addEventListener("error",function(){s.loading|=2}),s.loading|=4,Qd(a,t,r)}a={type:"stylesheet",instance:a,count:1,state:s},o.set(i,a)}}},M:function(e,t){Hd.M(e,t);var n=Ud;if(n&&e){var r=Je(n).hoistableScripts,o=Yd(e),i=r.get(o);i||((i=n.querySelector(Xd(o)))||(e=p({src:e,async:!0,type:"module"},t),(t=Dd.get(o))&&ef(e,t),et(i=n.createElement("script")),fd(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(o,i))}}};var Ud="undefined"==typeof document?null:document;function Vd(e,t,n){var r=Ud;if(r&&"string"==typeof t&&t){var o=bt(t);o='link[rel="'+e+'"][href="'+o+'"]',"string"==typeof n&&(o+='[crossorigin="'+n+'"]'),Fd.has(o)||(Fd.add(o),e={rel:e,crossOrigin:n,href:t},null===r.querySelector(o)&&(fd(t=r.createElement("link"),"link",e),et(t),r.head.appendChild(t)))}}function Wd(e,t,n,r){var o,i,a,l,c=(c=G.current)?Bd(c):null;if(!c)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return"string"==typeof n.precedence&&"string"==typeof n.href?(t=Gd(n.href),(r=(n=Je(c).hoistableStyles).get(t))||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if("stylesheet"===n.rel&&"string"==typeof n.href&&"string"==typeof n.precedence){e=Gd(n.href);var u=Je(c).hoistableStyles,d=u.get(e);if(d||(c=c.ownerDocument||c,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,d),(u=c.querySelector(qd(e)))&&!u._p&&(d.instance=u,d.state.loading=5),Dd.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Dd.set(e,n),u||(o=c,i=e,a=n,l=d.state,o.querySelector('link[rel="preload"][as="style"]['+i+"]")?l.loading=1:(i=o.createElement("link"),l.preload=i,i.addEventListener("load",function(){return l.loading|=1}),i.addEventListener("error",function(){return l.loading|=2}),fd(i,"link",a),et(i),o.head.appendChild(i))))),t&&null===r)throw Error(s(528,""));return d}if(t&&null!==r)throw Error(s(529,""));return null;case"script":return t=n.async,"string"==typeof(n=n.src)&&t&&"function"!=typeof t&&"symbol"!=typeof t?(t=Yd(n),(r=(n=Je(c).hoistableScripts).get(t))||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function Gd(e){return'href="'+bt(e)+'"'}function qd(e){return'link[rel="stylesheet"]['+e+"]"}function Kd(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Yd(e){return'[src="'+bt(e)+'"]'}function Xd(e){return"script[async]"+e}function Zd(e,t,n){if(t.count++,null===t.instance)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+bt(n.href)+'"]');if(r)return t.instance=r,et(r),r;var o=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return et(r=(e.ownerDocument||e).createElement("style")),fd(r,"style",o),Qd(r,n.precedence,e),t.instance=r;case"stylesheet":o=Gd(n.href);var i=e.querySelector(qd(o));if(i)return t.state.loading|=4,t.instance=i,et(i),i;r=Kd(n),(o=Dd.get(o))&&Jd(r,o),et(i=(e.ownerDocument||e).createElement("link"));var a=i;return a._p=new Promise(function(e,t){a.onload=e,a.onerror=t}),fd(i,"link",r),t.state.loading|=4,Qd(i,n.precedence,e),t.instance=i;case"script":return i=Yd(n.src),(o=e.querySelector(Xd(i)))?(t.instance=o,et(o),o):(r=n,(o=Dd.get(i))&&ef(r=p({},n),o),et(o=(e=e.ownerDocument||e).createElement("script")),fd(o,"link",r),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(s(443,t.type))}else"stylesheet"===t.type&&!(4&t.state.loading)&&(r=t.instance,t.state.loading|=4,Qd(r,n.precedence,e));return t.instance}function Qd(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=r.length?r[r.length-1]:null,i=o,a=0;a<r.length;a++){var s=r[a];if(s.dataset.precedence===t)i=s;else if(i!==o)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=9===n.nodeType?n.head:n).insertBefore(e,t.firstChild)}function Jd(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.title&&(e.title=t.title)}function ef(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.integrity&&(e.integrity=t.integrity)}var tf=null;function nf(e,t,n){if(null===tf){var r=new Map,o=tf=new Map;o.set(n,r)}else(r=(o=tf).get(n))||(r=new Map,o.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),o=0;o<n.length;o++){var i=n[o];if(!(i[Ke]||i[Be]||"link"===e&&"stylesheet"===i.getAttribute("rel"))&&"http://www.w3.org/2000/svg"!==i.namespaceURI){var a=i.getAttribute(t)||"";a=e+a;var s=r.get(a);s?s.push(i):r.set(a,[i])}}return r}function rf(e,t,n){(e=e.ownerDocument||e).head.insertBefore(n,"title"===t?e.querySelector("head > title"):null)}function of(e){return!!("stylesheet"!==e.type||3&e.state.loading)}var af=0;function sf(){if(this.count--,0===this.count&&(0===this.imgCount||!this.waitingForImages))if(this.stylesheets)cf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var lf=null;function cf(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,lf=new Map,t.forEach(uf,e),lf=null,sf.call(e))}function uf(e,t){if(!(4&t.state.loading)){var n=lf.get(e);if(n)var r=n.get(null);else{n=new Map,lf.set(e,n);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<o.length;i++){var a=o[i];"LINK"!==a.nodeName&&"not all"===a.getAttribute("media")||(n.set(a.dataset.precedence,a),r=a)}r&&n.set(null,r)}a=(o=t.instance).getAttribute("data-precedence"),(i=n.get(a)||r)===r&&n.set(null,o),n.set(a,o),this.count++,r=sf.bind(this),o.addEventListener("load",r),o.addEventListener("error",r),i?i.parentNode.insertBefore(o,i.nextSibling):(e=9===e.nodeType?e.head:e).insertBefore(o,e.firstChild),t.state.loading|=4}}var df={$$typeof:w,Provider:null,Consumer:null,_currentValue:z,_currentValue2:z,_threadCount:0};function ff(e,t,n,r,o,i,a,s,l){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Oe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Oe(0),this.hiddenUpdates=Oe(null),this.identifierPrefix=r,this.onUncaughtError=o,this.onCaughtError=i,this.onRecoverableError=a,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function pf(e,t,n,r,o,i){o=function(e){return e?e=zr:zr}(o),null===r.context?r.context=o:r.pendingContext=o,(r=yi(t)).payload={element:n},null!==(i=void 0===i?null:i)&&(r.callback=i),null!==(n=xi(e,r,t))&&(Kc(n,0,t),wi(n,e,t))}function hf(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function gf(e,t){hf(e,t),(e=e.alternate)&&hf(e,t)}function mf(e){if(13===e.tag||31===e.tag){var t=Pr(e,67108864);null!==t&&Kc(t,0,67108864),gf(e,67108864)}}function bf(e){if(13===e.tag||31===e.tag){var t=Gc(),n=Pr(e,t=ze(t));null!==n&&Kc(n,0,t),gf(e,t)}}var vf=!0;function yf(e,t,n,r){var o=M.T;M.T=null;var i=N.p;try{N.p=2,wf(e,t,n,r)}finally{N.p=i,M.T=o}}function xf(e,t,n,r){var o=M.T;M.T=null;var i=N.p;try{N.p=8,wf(e,t,n,r)}finally{N.p=i,M.T=o}}function wf(e,t,n,r){if(vf){var o=kf(r);if(null===o)td(e,t,r,Sf,n),Mf(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return Ef=Nf(Ef,e,t,n,r,o),!0;case"dragenter":return Tf=Nf(Tf,e,t,n,r,o),!0;case"mouseover":return jf=Nf(jf,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return If.set(i,Nf(If.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Of.set(i,Nf(Of.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(Mf(e,r),4&t&&-1<Pf.indexOf(e)){for(;null!==o;){var i=Ze(o);if(null!==i)switch(i.tag){case 3:if((i=i.stateNode).current.memoizedState.isDehydrated){var a=Ae(i.pendingLanes);if(0!==a){var s=i;for(s.pendingLanes|=2,s.entangledLanes|=2;a;){var l=1<<31-xe(a);s.entanglements[1]|=l,a&=~l}Nu(i),!(6&pc)&&(Mc=le()+500,zu(0,!1))}}break;case 31:case 13:null!==(s=Pr(i,2))&&Kc(s,0,2),Jc(),gf(i,2)}if(null===(i=kf(r))&&td(e,t,r,Sf,n),i===o)break;o=i}null!==o&&r.stopPropagation()}else td(e,t,r,null,n)}}function kf(e){return Cf(e=Mt(e))}var Sf=null;function Cf(e){if(Sf=null,null!==(e=Xe(e))){var t=l(e);if(null===t)e=null;else{var n=t.tag;if(13===n){if(null!==(e=c(t)))return e;e=null}else if(31===n){if(null!==(e=u(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Sf=e,null}function _f(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ce()){case ue:return 2;case de:return 8;case fe:case pe:return 32;case he:return 268435456;default:return 32}default:return 32}}var Af=!1,Ef=null,Tf=null,jf=null,If=new Map,Of=new Map,Lf=[],Pf="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Mf(e,t){switch(e){case"focusin":case"focusout":Ef=null;break;case"dragenter":case"dragleave":Tf=null;break;case"mouseover":case"mouseout":jf=null;break;case"pointerover":case"pointerout":If.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Of.delete(t.pointerId)}}function Nf(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},null!==t&&null!==(t=Ze(t))&&mf(t),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function zf(e){var t=Xe(e.target);if(null!==t){var n=l(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=c(n)))return e.blockedOn=t,void De(e.priority,function(){bf(n)})}else if(31===t){if(null!==(t=u(n)))return e.blockedOn=t,void De(e.priority,function(){bf(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Rf(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=kf(e.nativeEvent);if(null!==n)return null!==(t=Ze(n))&&mf(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Pt=r,n.target.dispatchEvent(r),Pt=null,t.shift()}return!0}function $f(e,t,n){Rf(e)&&n.delete(t)}function Df(){Af=!1,null!==Ef&&Rf(Ef)&&(Ef=null),null!==Tf&&Rf(Tf)&&(Tf=null),null!==jf&&Rf(jf)&&(jf=null),If.forEach($f),Of.forEach($f)}function Ff(e,t){e.blockedOn===t&&(e.blockedOn=null,Af||(Af=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Df)))}var Bf=null;function Hf(e){Bf!==e&&(Bf=e,o.unstable_scheduleCallback(o.unstable_NormalPriority,function(){Bf===e&&(Bf=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],o=e[t+2];if("function"!=typeof r){if(null===Cf(r||n))continue;break}var i=Ze(n);null!==i&&(e.splice(t,3),t-=3,ts(i,{pending:!0,data:o,method:n.method,action:r},r,o))}}))}function Uf(e){function t(t){return Ff(t,e)}null!==Ef&&Ff(Ef,e),null!==Tf&&Ff(Tf,e),null!==jf&&Ff(jf,e),If.forEach(t),Of.forEach(t);for(var n=0;n<Lf.length;n++){var r=Lf[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Lf.length&&null===(n=Lf[0]).blockedOn;)zf(n),null===n.blockedOn&&Lf.shift();if(null!=(n=(e.ownerDocument||e).$$reactFormReplay))for(r=0;r<n.length;r+=3){var o=n[r],i=n[r+1],a=o[He]||null;if("function"==typeof i)a||Hf(n);else if(a){var s=null;if(i&&i.hasAttribute("formAction")){if(o=i,a=i[He]||null)s=a.formAction;else if(null!==Cf(o))continue}else s=a.action;"function"==typeof s?n[r+1]=s:(n.splice(r,3),r-=3),Hf(n)}}}function Vf(){function e(e){e.canIntercept&&"react-transition"===e.info&&e.intercept({handler:function(){return new Promise(function(e){return o=e})},focusReset:"manual",scroll:"manual"})}function t(){null!==o&&(o(),o=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&null!=e.url&&navigation.navigate(e.url,{state:e.getState(),info:"react-transition",history:"replace"})}}if("object"==typeof navigation){var r=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),null!==o&&(o(),o=null)}}}function Wf(e){this._internalRoot=e}function Gf(e){this._internalRoot=e}Gf.prototype.render=Wf.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(s(409));pf(t.current,Gc(),e,t,null,null)},Gf.prototype.unmount=Wf.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;pf(e.current,2,null,e,null,null),Jc(),t[Ue]=null}},Gf.prototype.unstable_scheduleHydration=function(e){if(e){var t=$e();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Lf.length&&0!==t&&t<Lf[n].priority;n++);Lf.splice(n,0,e),0===n&&zf(e)}};var qf=i.version;if("19.2.0"!==qf)throw Error(s(527,qf,"19.2.0"));N.findDOMNode=function(e){var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(s(188));throw e=Object.keys(e).join(","),Error(s(268,e))}return e=function(e){var t=e.alternate;if(!t){if(null===(t=l(e)))throw Error(s(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return d(o),e;if(i===r)return d(o),t;i=i.sibling}throw Error(s(188))}if(n.return!==r.return)n=o,r=i;else{for(var a=!1,c=o.child;c;){if(c===n){a=!0,n=o,r=i;break}if(c===r){a=!0,r=o,n=i;break}c=c.sibling}if(!a){for(c=i.child;c;){if(c===n){a=!0,n=i,r=o;break}if(c===r){a=!0,r=i,n=o;break}c=c.sibling}if(!a)throw Error(s(189))}}if(n.alternate!==r)throw Error(s(190))}if(3!==n.tag)throw Error(s(188));return n.stateNode.current===n?e:t}(t),null===(e=null!==e?f(e):null)?null:e.stateNode};var Kf={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.0"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Yf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yf.isDisabled&&Yf.supportsFiber)try{be=Yf.inject(Kf),ve=Yf}catch(e){}}t.createRoot=function(e,t){if(!(n=e)||1!==n.nodeType&&9!==n.nodeType&&11!==n.nodeType)throw Error(s(299));var n,r=!1,o="",i=Cs,a=_s,l=As;return null!=t&&(!0===t.unstable_strictMode&&(r=!0),void 0!==t.identifierPrefix&&(o=t.identifierPrefix),void 0!==t.onUncaughtError&&(i=t.onUncaughtError),void 0!==t.onCaughtError&&(a=t.onCaughtError),void 0!==t.onRecoverableError&&(l=t.onRecoverableError)),t=function(e,t,n,r,o,i,a,s,l,c,u,d){return e=new ff(e,t,n,a,l,c,u,d,s),t=1,!0===i&&(t|=24),i=$r(3,null,null,t),e.current=i,i.stateNode=e,(t=Fo()).refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:r,isDehydrated:n,cache:t},bi(i),e}(e,1,!1,null,0,r,o,null,i,a,l,Vf),e[Ue]=t.current,Ju(e),new Wf(t)}},7013:(e,t,n)=>{"use strict";var r=n(1780),o=Function.prototype,i=o.apply,a=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?a.bind(i):function(){return a.apply(i,arguments)})},7051:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(2036);const o=e=>{let{buttons:t=[],...n}=e;return{...n,buttons:t.map(r.A)}}},7142:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>C});var r=n(9155),o=n(541),i=n(809),a=n(1328),s=n(6343),l=n(1695),c=n(3864),u=n(2475),d=n(4927),f=n(8035);const p=c.Ay.div.withConfig({componentId:"sc-1g1jmh4-0"})(["display:flex;flex-direction:row;position:absolute;bottom:4px;padding-right:12px;right:calc(100% - 12px);background:#fff;background-color:#fff;box-shadow:0px 1px 5px 0px ",";border-radius:7px;pointer-events:auto;",";"],f.Tj.shadowColorDark,e=>!e.$active&&(0,c.AH)(["transform:scale(0);transform-origin:right;opacity:0;pointer-events:none;user-select:none;"])),h=c.Ay.div.withConfig({componentId:"sc-1g1jmh4-1"})(["z-index:1;bottom:2px;transition:all 0.2s ease;display:flex;flex-direction:row;"," ",";"],e=>e.$active&&e.$fullscreenMode&&"z-index: -1;",e=>!e.$active&&(0,c.AH)(["transform:scale(0);transform-origin:right;opacity:0;pointer-events:none;user-select:none;"])),g=c.Ay.div.withConfig({componentId:"sc-1g1jmh4-2"})(["padding:2px;border-radius:7px;z-index:1;display:flex;min-width:max-content;justify-content:center;",";"],u.JP),m=(0,c.Ay)(d.N_).withConfig({componentId:"sc-1g1jmh4-3"})(["color:#757575;margin:0;cursor:pointer;font-size:var(--_kindlychat-font-size-sm);font-weight:500;text-decoration:none;&:hover{text-decoration:underline;}"]),b=c.Ay.div.withConfig({componentId:"sc-1g1jmh4-4"})(["display:flex;padding:2px;align-items:center;justify-content:space-between;"]),v=(0,c.Ay)(d.$n).withConfig({componentId:"sc-1g1jmh4-5"})(["display:flex;position:relative;align-items:center;padding:12px;transition:all 0.15s ease;&:hover{background:#",";background-color:#",";svg path{fill:#000;}&:after{border-left-color:#000;}}"," ",""],f.Tj.grayColor,f.Tj.grayColor,e=>e.$active&&`\n background: #${f.Tj.grayColor};\n background-color: #${f.Tj.grayColor};\n `,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 ");var y=n(3791),x=n(5629),w=n(7182);const k=1e3;var S=n(1085);function C(e){let{active:t}=e;const[n,c]=(0,r.useState)(!1),{botKey:u,admin:d}=(0,o.d4)(l.$P),{supportedLanguages:f}=(0,a.A)(),{fullscreenMode:C}=(0,o.d4)(l.Od),{inspectorOpen:_}=(0,o.d4)(l.qV),A=(0,o.wA)(),E=(0,r.useCallback)(()=>{A((0,s.uz)())},[A]);return function(){var e,t;const n=(0,w.jL)(),{admin:o}=(0,w.GV)(l.$P),{chatMessages:i}=(0,w.GV)(l.DZ)||[],a=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,y.A)(e=>{n((0,x.y2)(e))},k),c=(0,r.useCallback)(e=>{e.altKey&&"KeyR"===e.code&&a&&s(a)},[a,s]);(0,r.useEffect)(()=>{if(o)return window.addEventListener("keydown",c,!0),()=>window.removeEventListener("keydown",c,!0)},[c,o])}(),(0,S.jsxs)(p,{$active:t,children:[n&&t&&(0,S.jsx)(g,{children:f.map(e=>(0,S.jsx)(v,{title:`Restart ${e.name_local}`,onClick:()=>{return t=e.code,A((0,s.L4)(t)),void c(!1);var t},children:(0,S.jsx)(m,{children:e.code.toUpperCase()})},e.code))}),(0,S.jsxs)(h,{$active:t,$hasInspector:d,$fullscreenMode:C,children:[d&&(0,S.jsx)(b,{children:(0,S.jsx)(v,{onClick:E,title:_?"Close chat inspector":"Open chat inspector",children:_?(0,S.jsx)(i.V$,{}):(0,S.jsx)(i.bM,{})})}),(0,S.jsx)(b,{children:(0,S.jsx)(v,{title:"Restart chat",onClick:()=>{f.length>1?c(!n):A((0,s.zX)(u,!0))},$active:n,$tail:f.length>1,children:(0,S.jsx)(i.fN,{width:15,height:15})})})]})]})}},7150:(e,t,n)=>{"use strict";var r=n(7551),o=n(3273),i=n(5116).f,a=n(5148),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return s&&"Window"===r(e)?function(e){try{return i(e)}catch(e){return a(s)}}(e):i(o(e))}},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},7182:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>xe,jL:()=>we,GV:()=>ke,CU:()=>Se});var r={};n.r(r),n.d(r,{agent:()=>L,alerts:()=>M,announcement:()=>z,auth:()=>$,bot:()=>m.Ay,connection:()=>F,environment:()=>y,inChatNotification:()=>U,inspector:()=>W,local:()=>K,messages:()=>ae,nudge:()=>le,pushMessages:()=>de});var o=n(7251),i=n(541),a=n(5546),s=n.n(a),l=n(5096);const c=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 u=n(99);function d(e,t,n){return(0,u.A)(e,function(e,t){return e.split(".").reverse().reduce((e,n,r)=>0===r?{[n]:t}:{[n]:e},{})}(t,n))}var f=n(9017),p=n(8709),h=n(2628),g=n(2221),m=n(2194),b=n(8679);const v={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"},y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,t=arguments.length>1?arguments[1]:void 0;return t.type===b.$o?{...e,...t.env}:e};var x=n(1897);const w=(e,t)=>{var n;return{...m.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?g.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,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:{...g.bF,...e.position},offsetHeight:e.offsetHeight||"205px",fullscreenMode:e.fullscreenMode||!1,zIndex:e.zIndex||g.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,conversionPageUrl:e.conversion_page_url,whitelabelEnabled:e.whitelabel_enabled}};function k(e){let{botKey:t,settings:n,settings:{context:r,inPlatform:o,admin:i,environment:a,renderedBy:s},initialChatLanguage:l}=e;return{bot:w(n,o),chatbubble:{...x.ue,botKey:t,inPlatform:o,admin:i,renderedBy:s||"REACT",currentLanguage:l},local:{context:r,labels:[]},environment:{...v,VERSION:"2.81.0",...a}}}const S=(e,t,n)=>{const{currentLanguage:r}=t;return n[r]||n.en};var C=n(7437);const _=Object.freeze({WARNING:"WARNING",CRITICAL:"CRITICAL"}),A=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 E=n(8411),T=n(6343);const j={[b.A8]:{stopType:b.wk,reducer:"bot"},[b.M_]:{stopType:b.MU,reducer:"agent"}};let I;const O={name:void 0,isTyping:!1,userIsTyping:!1,takenOver:!1,takeoverClosed:!0,requestedHandoverAt:void 0,hasRequestedHandoverAtLeastOnce:!1,supportsAttachment:!1,handoverWaitTimeEstimate:void 0},L=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 b.tq:return{...e,name:t.data.name||e.name,isTyping:!1};case b.M_:return{...e,isTyping:!0};case b.MU:return{...e,isTyping:!1};case b.c6:return{...e,userIsTyping:!0};case b.we:return{...e,userIsTyping:!1};case b.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),i=Boolean(!t.data.taken_over&&e.takenOver),a=Boolean(t.data.supports_attachment),s=t.data.requested_handover_at,l=t.data.handover_wait_time_estimate,c=t.data.handover_queue_position;return n?{...e,requestedHandoverAt:s,hasRequestedHandoverAtLeastOnce:!0,takenOver:!1,takeoverClosed:!1,handoverWaitTimeEstimate:l,handoverQueuePosition:c}:r?{...e,requestedHandoverAt:void 0,hasRequestedHandoverAtLeastOnce:!0,takenOver:!0,isTyping:!1,supportsAttachment:a,takeoverClosed:!1,handoverWaitTimeEstimate:void 0,handoverQueuePosition:void 0}:i||o?{...e,requestedHandoverAt:void 0,takenOver:!1,isTyping:!1,supportsAttachment:void 0,handoverWaitTimeEstimate:void 0,handoverQueuePosition:void 0}:e}case b.nz:return{...e,requestedHandoverAt:void 0===t.data.requested_handover_at?e.requestedHandoverAt:t.data.requested_handover_at,takeoverClosed:Boolean(t.data.closed)};case b.AQ:return{...e,handoverWaitTimeEstimate:t.data.handover_wait_time_estimate,handoverQueuePosition:t.data.handover_queue_position};case b.MM:return{...e,requestedHandoverAt:void 0,handoverWaitTimeEstimate:void 0,handoverQueuePosition:void 0};case b.CB:return{...e,requestedHandoverAt:O.requestedHandoverAt,hasRequestedHandoverAtLeastOnce:O.hasRequestedHandoverAtLeastOnce};default:return e}},P={showTabNotification:!1,showBubbleNotification:!1},M=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 b.tq:return t.data.from_bot&&"SYSTEM"!==t.data.sender?{...e,showTabNotification:!0}:e;case b.Wh:return{...e,showTabNotification:!0};case b.Zb:return{...e,showBubbleNotification:!0};case b.u2:return{...P};default:return e}},N={show:!1,text:null,url:null,type:null},z=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 b.YU:return{text:t.payload.text,type:t.payload.alertType,url:t.payload.url,show:!0};case b.nW:return N;default:return e}},R={isAuthenticated:!1,jwt:null,avatarUrl:null,fullName:null},$=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:R,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case b.K_:return{...e,isAuthenticated:!0,jwt:t.jwt,avatarUrl:t.avatarUrl,fullName:t.fullName};case b.qQ:return{...e,avatarUrl:t.avatar_url,fullName:t.full_name,email:t.email,phoneNumber:t.phone_number,userId:t.user_id};case b.zZ:return{...e,...R};default:return e}},D={token:null,connected:!0,pusherConnected:!1,connectTriggerConfig:void 0},F=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:D,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case b.ny:return{...e,token:t.token};case b.CB:return{...e,token:null};case b._Y:return{...e,connected:!0};case b._N:return{...e,connected:!1};case b.mz:return e;case b.kP:return{...e,pusherConnected:!1};case b.VZ:return"message"===t.event?{...e,pusherConnected:!0}:e;case b.zT:return{...e,connectTriggerConfig:t.triggerConfig};default:return e}},B={notifications:[]},H={content:"",dismissed:!1,once:!1},U=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:B,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case b.vP:return{...e,notifications:[...e.notifications,{...H,id:t.id,buttonText:t.buttonText,buttonHref:t.buttonHref,content:t.content,icon:t.icon,once:t.once}]};case b.MN:{const n=e.notifications.findIndex(e=>e.id===t.id);if(-1===n)return e;const r=[...e.notifications];return r[n]={id:t.id,content:t.content,buttonHref:t.buttonHref,buttonText:t.buttonText,icon:t.icon,once:t.once},{...e,notifications:r}}case b.nG:return{...e,notifications:e.notifications.filter(e=>e.id!==t.id)};case b.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}},V={inspectorOpen:!1,currentMessageId:null},W=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:V,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case b.ye:return{...e,currentMessageId:t.chatMessageId};case b.vK:return{...e,inspectorOpen:!e.inspectorOpen};default:return e}};var G=n(6546);const q={context:{},labels:[]},K=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:q,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 b.CB:return{...e,labels:[]};default:return e}};var Y=n(9749),X=n.n(Y),Z=n(2921),Q=n(7575);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,Q.A)(n)]:r}},{})};var ee=n(310),te=n(8172);const ne={chatMessages:[],buttonClicks:[],attachments:[],messageSentTime:null,lastMessageSeen:null,forms:{}},re=e=>{let{id:t}=e;return t},oe=e=>{let{temporaryId:t,id:n}=e;return e=>{let{temporaryId:r,id:o}=e;return n===o||t===r}},ie=(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]:ne,i=arguments.length>1?arguments[1]:void 0;switch(i.type){case b.tq:{const{chatMessages:e}=o,{data:t}=i;if((0,ee.A)(e)(t)){const n={...t};return n.key||=n.id,d(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 b.z2:{const e=((e,t)=>{const n=(new Date).toISOString();return{id:n,created:n,message:"",event_message:e,from_bot:!0,sender:"SYSTEM",exchange_type:"system-dialogue",system_dialogue_message_type:t}})(i.payload.message,i.payload.system_dialogue_message_type),{chatMessages:t}=o;return{...o,chatMessages:[...t,e]}}case b.CB:return ne;case b.fg:{const{chatbubble_temporary_id:e,id:t}=i.data,n=n=>{var r;let{id:o}=n;return X()(r=[e,t]).call(r,o)},r=e=>({...e,message:i.data.message});return{...o,chatMessages:ie(o.chatMessages,n,r)}}case b.se:return{...o,messageSentTime:i.messageSentTime};case b.pz:{var a;const{created:e,id:t,temporaryId:n}=i,{chatMessages:r}=o,s=null!==(a=null==i?void 0:i.status)&&void 0!==a?a:null,l=r.findIndex(e=>{let{id:t}=e;return t===n});if(l<0)return o;const c=r[l],u={...c,created:e||(null==c?void 0:c.created),id:t||(null==c?void 0:c.id),status:s},d=r.map((e,t)=>t!==l?e:u);return{...o,chatMessages:d}}case b.jE:{const{chatMessageId:e,chatMessageTempId:t,patternContextMatch:n}=i.data,r=n=>{let{id:r}=n;return r===e||r===t},a=e=>({...e,pattern_context_match:n});return{...o,chatMessages:ie(o.chatMessages,r,a)}}case b.Y6:var s;return(0,Z.A)(o.buttonClicks)(i.buttonClick)?{...o,buttonClicks:[...null!==(s=o.buttonClicks)&&void 0!==s?s:[],i.buttonClick]}:o;case b.kU:return{...o,lastMessageSeen:(0,te.A)(i,["id","index"])};case b.Os:return{...o,attachments:[...null!==(e=o.attachments)&&void 0!==e?e:[],...(null===(t=i.data)||void 0===t||null===(n=t.attachments)||void 0===n?void 0:n.map(J))||[]]};case b.wP:{const e=J(i.attachment),t=oe(e),n=t=>({...t,...e});return{...o,attachments:ie(o.attachments,t,n)}}case b.tS:{var l;const{attachments:e=[],temporaryChatMessageId:t,chatMessageId:n}=i.data,r=e.map(J),a=(null!==(l=o.attachments)&&void 0!==l?l:[]).map(e=>{const t=r.find(oe(e));return t?{...e,...t}:e});let s=o.chatMessages;if(t&&n){const e=e=>{let{id:n}=e;return n===t},i=e=>({...e,id:n,attachment_ids:r.map(re)});s=ie(o.chatMessages,e,i)}return{...o,attachments:a,chatMessages:s}}case b.QA:return null!==(r=i.formData)&&void 0!==r&&r.formKey?{...o,forms:{...o.forms,[i.formData.formKey]:i.formData}}:o;default:return o}},se={slug:null,show:!1,isCustom:!1,dialogue:null,webhook:null,content:null,onRendered:null,nudgeLayout:{},nudgeType:g.MK.TEMPLATE,hasBeenDismissed:!1},le=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:se,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case b.X2:return{...e,show:!1,nudgeLayout:{},hasBeenDismissed:!0};case b.wv:return{...e,show:!0,slug:t.slug,dialogue:t.dialogue,webhook:t.webhook,nudgeLayout:t.nudgeLayout,nudgeType:g.MK.TEMPLATE,trackEvent:t.trackEvent,hasBeenDismissed:!1};case b.un:return{...e,show:!0,isCustom:!0,slug:t.slug,content:t.content,nudgeLayout:{},onRendered:t.onRendered,nudgeType:g.MK.CUSTOM,trackEvent:t.trackEvent,hasBeenDismissed:!1};default:return e}};var ce=n(3553);const ue={show:!1,text:null,agent:null,dismissed:!1,type:ce.oI.MESSAGE,dismissedMessages:[],taken_over:!1},de=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ue,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case b.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:ce.oI.HANDOVER}:e;case b.tq:return(0,h.A)()||!t.data.from_bot||"SYSTEM"===t.data.sender||"greeting"===t.data.exchange_type?e:{...e,show:!0,text:t.data.message,type:ce.oI.MESSAGE};case b.l:return{...e,show:!0,text:t.pushMessageText,dismissed:!1,type:t.pushMessageType,dismissedMessages:[...e.dismissedMessages,t.pushMessageTitle]};case b.a_:return{...e,show:!1,dismissed:!0};case b.a1:return ue;default:return e}};var fe=n(5767);const pe=e=>{let{url:t,...n}=e;return(t||"").startsWith("data:")?n:{...n,url:t}},he=e=>e?()=>e=>({bot:{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,hasRequestedHandoverAtLeastOnce:e.agent.hasRequestedHandoverAtLeastOnce},bot:{hasInteraction:e.bot.hasInteraction,isTextDirectionRtl:e.bot.isTextDirectionRtl},chatbubble:{...e.chatbubble,admin:void 0,currentlyPoppedUp:x.ue.currentlyPoppedUp,allGreetingsHideInput:x.ue.allGreetingsHideInput,contactDetailsButton:x.ue.contactDetailsButton,attachments:x.ue.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}}),ge=e=>t=>{let{active:n}=t.chatbubble;const r=(0,h.A)();return e.isFromMultitab||(n=t.chatbubble.active&&(Boolean(e.chatbubble.keep_open&&!r)||Boolean(e.chatbubble.keep_open_mobile&&r))),(0,u.A)(t,{chatbubble:{active:n,wasActiveOnLoad:n}})},me=e=>{var t;if((0,f.A)(e,"bot.includeDisabledLanguages",!1))return e;const n=null==e||null===(t=e.chatbubble)||void 0===t?void 0:t.currentLanguage,r=l.Z.supportedLanguages.some(e=>{let{code:t}=e;return t===n}),o=l.Z.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,u.A)(e,{chatbubble:{currentLanguage:o.code}})},be=e=>{let{inPlatform:t,botKey:n}=e;return(e=>(t,n)=>{return r=(0,u.A)(t,n),e.reduce((e,t)=>{let[n,r]=t;return d(e,n,r)},r);var r})([["chatbubble.inPlatform",t],["chatbubble.botKey",n]].filter(e=>{let[,t]=e;return void 0!==t}))},ve=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(),i=null!==(r=null==o?void 0:o.chat_live_translation_language_code)&&void 0!==r?r:null==o?void 0:o.chat_language_code,a=null!=i?i:e;return(0,u.A)(t,{chatbubble:{currentLanguage:a},bot:{isTextDirectionRtl:(0,p.A)(a)}})},ye=[e=>t=>n=>n.type===b.tq&&n.data.from_bot?(e.dispatch((0,C.MY)()),(0,C.CM)(),t(n)):t(n),e=>t=>n=>{switch(n.type){case b._N:return((e,t,n,r)=>{const{announcement:o,bot:i,chatbubble:a}=t;if(o.show)return n(r);const s={text:S(0,a,e),alertType:_.WARNING};return n({type:b.YU,payload:s}),n(r)})(A.OFFLINE,e.getState(),t,n);case b._Y:{const{announcement:r,connection:o}=e.getState();return r.show&&t({type:b.nW}),o.connected||e.dispatch((0,C.S4)()),t(n)}default:return t(n)}},e=>t=>async n=>{const{agent:{takenOver:r},chatbubble:{currentLanguage:o}}=e.getState();if(n.type===b.II){const{handoverConversationFeedback:t,preloadFeedbackImages:i}=(0,E.A)(o);r&&!1===n.data.taken_over&&t&&(i("handover_conversation"),e.dispatch((0,T.ob)(t)))}if(n.type!==b.tq)return t(n);const{from_bot:i,sender:a,was_anonymized:s,exchange_type:l,triggered_chat_start:c,chat_language_code:u,chat_live_translation_language_code:d}=n.data,f=d||u;if(n.type===b.tq&&(0,h.A)()&&i&&a!==g.bS.SYSTEM&&e.dispatch({type:b.Zb}),"greeting"===l||c)o!==f&&t({type:b.M2,payload:{code:f}});else if(i&&f&&o!==f){var p;const{text:n}=e.getState().bot,r=null===(p=n.language_switch_notification)||void 0===p?void 0:p[f];r&&e.dispatch((0,T.cC)({content:r,buttonText:void 0,buttonHref:void 0,icon:"language"},g.Jm.LANGUAGE_SWITCH)),t({type:b.M2,payload:{code:f}})}if(i||!s)return t(n);t({type:b.fg,data:n.data})},e=>t=>async n=>{const r=j[n.type];var o;return r&&(clearTimeout(I),I=setTimeout(()=>{e.getState()[r.reducer].isTyping&&t({type:r.stopType})},1e3*((null===(o=n.data)||void 0===o?void 0:o.TTL)||10))),n.type!==b.wk&&n.type!==b.MU||clearTimeout(I),t(n)},()=>e=>t=>{e("payload"in t?t:{...t,payload:{...t}})}];function xe(e){let{botKey:t,settings:n,persist:i=!0,initialChatLanguage:a,initialStateModifier:l}=e;const{inPlatform:d}=n,f=!n.inPlatform&&0===n.chatbubble.persist_state_lifespan_seconds,p=`kindly-chat-${t}`,h=he(f),g=c(me,ve(a),ge(n),be({inPlatform:d,botKey:t})),m=i?s()(null,{key:p,slicer:h,merge:g}):e=>e;let b=k({botKey:t,settings:n,initialChatLanguage:a});return l&&(b=(0,u.A)(b,l)),(0,o.U1)({reducer:{...r,feedback:fe.Ay,chatbubble:x.Dw},preloadedState:b,middleware:e=>e().concat(...ye),enhancers:e=>e().concat(m),devTools:!1})}const we=i.wA.withTypes(),ke=i.d4.withTypes(),Se=i.Pj.withTypes()},7235:(e,t,n)=>{"use strict";var r=n(262),o=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(o(e)+" is not an object")}},7251:(e,t,n)=>{"use strict";n.d(t,{U1:()=>pe,zD:()=>we,Z0:()=>Ee});var r=Symbol.for("immer-nothing"),o=Symbol.for("immer-draftable"),i=Symbol.for("immer-state");function a(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var s=Object.getPrototypeOf;function l(e){return!!e&&!!e[i]}function c(e){return!!e&&(f(e)||Array.isArray(e)||!!e[o]||!!e.constructor?.[o]||b(e)||v(e))}var u=Object.prototype.constructor.toString(),d=new WeakMap;function f(e){if(!e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);if(null===t||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;if("function"!=typeof n)return!1;let r=d.get(n);return void 0===r&&(r=Function.toString.call(n),d.set(n,r)),r===u}function p(e,t,n=!0){0===h(e)?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function h(e){const t=e[i];return t?t.type_:Array.isArray(e)?1:b(e)?2:v(e)?3:0}function g(e,t){return 2===h(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function m(e,t,n){const r=h(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function b(e){return e instanceof Map}function v(e){return e instanceof Set}function y(e){return e.copy_||e.base_}function x(e,t){if(b(e))return new Map(e);if(v(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=f(e);if(!0===t||"class_only"===t&&!n){const t=Object.getOwnPropertyDescriptors(e);delete t[i];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const o=n[r],i=t[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(s(e),t)}{const t=s(e);if(null!==t&&n)return{...e};const r=Object.create(t);return Object.assign(r,e)}}function w(e,t=!1){return S(e)||l(e)||!c(e)||(h(e)>1&&Object.defineProperties(e,{set:k,add:k,clear:k,delete:k}),Object.freeze(e),t&&Object.values(e).forEach(e=>w(e,!0))),e}var k={value:function(){a(2)}};function S(e){return null===e||"object"!=typeof e||Object.isFrozen(e)}var C,_={};function A(e){const t=_[e];return t||a(0),t}function E(){return C}function T(e,t){t&&(A("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function j(e){I(e),e.drafts_.forEach(L),e.drafts_=null}function I(e){e===C&&(C=e.parent_)}function O(e){return C={drafts_:[],parent_:C,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function L(e){const t=e[i];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function P(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[i].modified_&&(j(t),a(4)),c(e)&&(e=M(t,e),t.parent_||z(t,e)),t.patches_&&A("Patches").generateReplacementPatches_(n[i].base_,e,t.patches_,t.inversePatches_)):e=M(t,n,[]),j(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==r?e:void 0}function M(e,t,n){if(S(t))return t;const r=e.immer_.shouldUseStrictIteration(),o=t[i];if(!o)return p(t,(r,i)=>N(e,o,t,r,i,n),r),t;if(o.scope_!==e)return t;if(!o.modified_)return z(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const t=o.copy_;let i=t,a=!1;3===o.type_&&(i=new Set(t),t.clear(),a=!0),p(i,(r,i)=>N(e,o,t,r,i,n,a),r),z(e,t,!1),n&&e.patches_&&A("Patches").generatePatches_(o,n,e.patches_,e.inversePatches_)}return o.copy_}function N(e,t,n,r,o,i,a){if(null==o)return;if("object"!=typeof o&&!a)return;const s=S(o);if(!s||a){if(l(o)){const a=M(e,o,i&&t&&3!==t.type_&&!g(t.assigned_,r)?i.concat(r):void 0);if(m(n,r,a),!l(a))return;e.canAutoFreeze_=!1}else a&&n.add(o);if(c(o)&&!s){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;if(t&&t.base_&&t.base_[r]===o&&s)return;M(e,o),t&&t.scope_.parent_||"symbol"==typeof r||!(b(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))||z(e,o)}}}function z(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&w(t,n)}var R={get(e,t){if(t===i)return e;const n=y(e);if(!g(n,t))return function(e,t,n){const r=F(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_||!c(r)?r:r===D(e.base_,t)?(H(e),e.copy_[t]=U(r,e)):r},has:(e,t)=>t in y(e),ownKeys:e=>Reflect.ownKeys(y(e)),set(e,t,n){const r=F(y(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=D(y(e),t),s=r?.[i];if(s&&s.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||g(e.base_,t)))return!0;H(e),B(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!==D(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,H(e),B(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=y(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty(){a(11)},getPrototypeOf:e=>s(e.base_),setPrototypeOf(){a(12)}},$={};function D(e,t){const n=e[i];return(n?y(n):e)[t]}function F(e,t){if(!(t in e))return;let n=s(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=s(n)}}function B(e){e.modified_||(e.modified_=!0,e.parent_&&B(e.parent_))}function H(e){e.copy_||(e.copy_=x(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function U(e,t){const n=b(e)?A("MapSet").proxyMap_(e,t):v(e)?A("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:E(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,i=R;n&&(o=[r],i=$);const{revoke:a,proxy:s}=Proxy.revocable(o,i);return r.draft_=s,r.revoke_=a,s}(e,t);return(t?t.scope_:E()).drafts_.push(n),n}function V(e){if(!c(e)||S(e))return e;const t=e[i];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=x(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=x(e,!0);return p(n,(e,t)=>{m(n,e,V(t))},r),t&&(t.finalized_=!1),n}p(R,(e,t)=>{$[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),$.deleteProperty=function(e,t){return $.set.call(this,e,t,void 0)},$.set=function(e,t,n){return R.set.call(this,e[0],t,n,e[0])};var W=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,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 o;if("function"!=typeof t&&a(6),void 0!==n&&"function"!=typeof n&&a(7),c(e)){const r=O(this),i=U(e,void 0);let a=!0;try{o=t(i),a=!1}finally{a?j(r):I(r)}return T(r,n),P(o,r)}if(!e||"object"!=typeof e){if(o=t(e),void 0===o&&(o=e),o===r&&(o=void 0),this.autoFreeze_&&w(o,!0),n){const t=[],r=[];A("Patches").generateReplacementPatches_(e,o,t,r),n(t,r)}return o}a(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),"boolean"==typeof e?.useStrictIteration&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){var t;c(e)||a(8),l(e)&&(l(t=e)||a(10),e=V(t));const n=O(this),r=U(e,void 0);return r[i].isManual_=!0,I(n),r}finishDraft(e,t){const n=e&&e[i];n&&n.isManual_||a(9);const{scope_:r}=n;return T(r,t),P(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}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=A("Patches").applyPatches_;return l(e)?r(e,t):this.produce(e,e=>r(e,t))}},G=W.produce,q=W.setUseStrictIteration.bind(W);function K(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. `}var Y=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),X=()=>Math.random().toString(36).substring(7).split("").join("."),Z={INIT:`@@redux/INIT${X()}`,REPLACE:`@@redux/REPLACE${X()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${X()}`};function Q(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 J(e,t,n){if("function"!=typeof e)throw new Error(K(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(K(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(K(1));return n(J)(e,t)}let r=e,o=t,i=new Map,a=i,s=0,l=!1;function c(){a===i&&(a=new Map,i.forEach((e,t)=>{a.set(t,e)}))}function u(){if(l)throw new Error(K(3));return o}function d(e){if("function"!=typeof e)throw new Error(K(4));if(l)throw new Error(K(5));let t=!0;c();const n=s++;return a.set(n,e),function(){if(t){if(l)throw new Error(K(6));t=!1,c(),a.delete(n),i=null}}}function f(e){if(!Q(e))throw new Error(K(7));if(void 0===e.type)throw new Error(K(8));if("string"!=typeof e.type)throw new Error(K(17));if(l)throw new Error(K(9));try{l=!0,o=r(o,e)}finally{l=!1}return(i=a).forEach(e=>{e()}),e}return f({type:Z.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error(K(10));r=e,f({type:Z.REPLACE})},[Y]:function(){const e=d;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(K(11));function n(){const e=t;e.next&&e.next(u())}return n(),{unsubscribe:e(n)}},[Y](){return this}}}}}function ee(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function te(e){return({dispatch:t,getState:n})=>r=>o=>"function"==typeof o?o(t,n,e):r(o)}var ne=te(),re=te,oe=(n(9907),"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?ee:ee.apply(null,arguments)}),ie=("undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__,e=>e&&"function"==typeof e.match);function ae(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error(Ie(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 Q(e)&&"type"in e&&"string"==typeof e.type}(t)&&t.type===e,n}var se=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 le(e){return c(e)?G(e,()=>{}):e}function ce(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}var ue=()=>function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:o=!0}=e??{};let i=new se;return t&&("boolean"==typeof t?i.push(ne):i.push(re(t.extraArgument))),i},de=e=>t=>{setTimeout(t,e)},fe=e=>function(t){const{autoBatch:n=!0}=t??{};let r=new se(e);return n&&r.push(((e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,i=!1,a=!1;const s=new Set,l="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:de(10):"callback"===e.type?e.queueNotification:de(e.timeout),c=()=>{a=!1,i&&(i=!1,s.forEach(e=>e()))};return Object.assign({},r,{subscribe(e){const t=r.subscribe(()=>o&&e());return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){try{return o=!e?.meta?.RTK_autoBatch,i=!o,i&&(a||(a=!0,l(c))),r.dispatch(e)}finally{o=!0}}})})("object"==typeof n?n:void 0)),r};function pe(e){const t=ue(),{reducer:n,middleware:r,devTools:o=!0,duplicateMiddlewareCheck:i=!0,preloadedState:a,enhancers:s}=e||{};let l,c;if("function"==typeof n)l=n;else{if(!Q(n))throw new Error(Ie(1));l=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 r=Object.keys(n);let o;try{!function(e){Object.keys(e).forEach(t=>{const n=e[t];if(void 0===n(void 0,{type:Z.INIT}))throw new Error(K(12));if(void 0===n(void 0,{type:Z.PROBE_UNKNOWN_ACTION()}))throw new Error(K(13))})}(n)}catch(e){o=e}return function(e={},t){if(o)throw o;let i=!1;const a={};for(let o=0;o<r.length;o++){const s=r[o],l=n[s],c=e[s],u=l(c,t);if(void 0===u)throw t&&t.type,new Error(K(14));a[s]=u,i=i||u!==c}return i=i||r.length!==Object.keys(e).length,i?a:e}}(n)}c="function"==typeof r?r(t):t();let u=ee;o&&(u=oe({trace:!1,..."object"==typeof o&&o}));const d=function(...e){return t=>(n,r)=>{const o=t(n,r);let i=()=>{throw new Error(K(15))};const a={getState:o.getState,dispatch:(e,...t)=>i(e,...t)},s=e.map(e=>e(a));return i=ee(...s)(o.dispatch),{...o,dispatch:i}}}(...c),f=fe(d);return J(l,a,u(..."function"==typeof s?s(f):f()))}function he(e){const t={},n=[];let r;const o={addCase(e,n){const r="string"==typeof e?e:e.type;if(!r)throw new Error(Ie(28));if(r in t)throw new Error(Ie(29));return t[r]=n,o},addAsyncThunk:(e,r)=>(r.pending&&(t[e.pending.type]=r.pending),r.rejected&&(t[e.rejected.type]=r.rejected),r.fulfilled&&(t[e.fulfilled.type]=r.fulfilled),r.settled&&n.push({matcher:e.settled,reducer:r.settled}),o),addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),o),addDefaultCase:e=>(r=e,o)};return e(o),[t,n,r]}q(!1);function ge(...e){return t=>e.some(e=>((e,t)=>ie(e)?e.match(t):e(t))(e,t))}var me=["name","message","stack","code"],be=class{constructor(e,t){this.payload=e,this.meta=t}_type},ve=class{constructor(e,t){this.payload=e,this.meta=t}_type},ye=e=>{if("object"==typeof e&&null!==e){const t={};for(const n of me)"string"==typeof e[n]&&(t[n]=e[n]);return t}return{message:String(e)}},xe="External signal was aborted",we=(()=>{function e(e,t,n){const r=ae(e+"/fulfilled",(e,t,n,r)=>({payload:e,meta:{...r||{},arg:n,requestId:t,requestStatus:"fulfilled"}})),o=ae(e+"/pending",(e,t,n)=>({payload:void 0,meta:{...n||{},arg:t,requestId:e,requestStatus:"pending"}})),i=ae(e+"/rejected",(e,t,r,o,i)=>({payload:o,error:(n&&n.serializeError||ye)(e||"Rejected"),meta:{...i||{},arg:r,requestId:t,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===e?.name,condition:"ConditionError"===e?.name}}));return Object.assign(function(e,{signal:a}={}){return(s,l,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 f,p;function h(e){p=e,d.abort()}a&&(a.aborted?h(xe):a.addEventListener("abort",()=>h(xe),{once:!0}));const g=async function(){let a;try{let i=n?.condition?.(e,{getState:l,extra:c});if(null!==(g=i)&&"object"==typeof g&&"function"==typeof g.then&&(i=await i),!1===i||d.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const m=new Promise((e,t)=>{f=()=>{t({name:"AbortError",message:p||"Aborted"})},d.signal.addEventListener("abort",f)});s(o(u,e,n?.getPendingMeta?.({requestId:u,arg:e},{getState:l,extra:c}))),a=await Promise.race([m,Promise.resolve(t(e,{dispatch:s,getState:l,extra:c,requestId:u,signal:d.signal,abort:h,rejectWithValue:(e,t)=>new be(e,t),fulfillWithValue:(e,t)=>new ve(e,t)})).then(t=>{if(t instanceof be)throw t;return t instanceof ve?r(t.payload,u,e,t.meta):r(t,u,e)})])}catch(t){a=t instanceof be?i(null,u,e,t.payload,t.meta):i(t,u,e)}finally{f&&d.signal.removeEventListener("abort",f)}var g;return n&&!n.dispatchConditionRejection&&i.match(a)&&a.meta.condition||s(a),a}();return Object.assign(g,{abort:h,requestId:u,arg:e,unwrap:()=>g.then(ke)})}},{pending:o,rejected:i,fulfilled:r,settled:ge(i,r),typePrefix:e})}return e.withTypes=()=>e,e})();function ke(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var Se=Symbol.for("rtk-slice-createasyncthunk");function Ce(e,t){return`${e}/${t}`}function _e({creators:e}={}){const t=e?.asyncThunk?.[Se];return function(e){const{name:n,reducerPath:r=n}=e;if(!n)throw new Error(Ie(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)||{},i=Object.keys(o),a={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){const n="string"==typeof e?e:e.type;if(!n)throw new Error(Ie(12));if(n in a.sliceCaseReducersByType)throw new Error(Ie(13));return a.sliceCaseReducersByType[n]=t,s},addMatcher:(e,t)=>(a.sliceMatchers.push({matcher:e,reducer:t}),s),exposeAction:(e,t)=>(a.actionCreators[e]=t,s),exposeCaseReducer:(e,t)=>(a.sliceCaseReducersByName[e]=t,s)};function u(){const[t={},n=[],r]="function"==typeof e.extraReducers?he(e.extraReducers):[e.extraReducers],o={...t,...a.sliceCaseReducersByType};return function(e){let t,[i,s,u]=he(e=>{for(let t in o)e.addCase(t,o[t]);for(let t of a.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=()=>le(e());else{const n=le(e);t=()=>n}function d(e=t(),n){let r=[i[n.type],...s.filter(({matcher:e})=>e(n)).map(({reducer:e})=>e)];return 0===r.filter(e=>!!e).length&&(r=[u]),r.reduce((e,t)=>{if(t){if(l(e)){const r=t(e,n);return void 0===r?e:r}if(c(e))return G(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 d.getInitialState=t,d}(e.initialState)}i.forEach(r=>{const i=o[r],a={reducerName:r,type:Ce(n,r),createNotation:"function"==typeof e.reducers};!function(e){return"asyncThunk"===e._reducerDefinitionType}(i)?function({type:e,reducerName:t,createNotation:n},r,o){let i,a;if("reducer"in r){if(n&&!function(e){return"reducerWithPrepare"===e._reducerDefinitionType}(r))throw new Error(Ie(17));i=r.reducer,a=r.prepare}else i=r;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?ae(e,a):ae(e))}(a,i,s):function({type:e,reducerName:t},n,r,o){if(!o)throw new Error(Ie(18));const{payloadCreator:i,fulfilled:a,pending:s,rejected:l,settled:c,options:u}=n,d=o(e,i,u);r.exposeAction(t,d),a&&r.addCase(d.fulfilled,a),s&&r.addCase(d.pending,s),l&&r.addCase(d.rejected,l),c&&r.addMatcher(d.settled,c),r.exposeCaseReducer(t,{fulfilled:a||Te,pending:s||Te,rejected:l||Te,settled:c||Te})}(a,i,s,t)});const d=e=>e,f=new Map,p=new WeakMap;let h;function g(e,t){return h||(h=u()),h(e,t)}function m(){return h||(h=u()),h.getInitialState()}function b(t,n=!1){function r(e){let o=e[t];return void 0===o&&n&&(o=ce(p,r,m)),o}function o(t=d){const r=ce(f,n,()=>new WeakMap);return ce(r,t,()=>{const r={};for(const[o,i]of Object.entries(e.selectors??{}))r[o]=Ae(i,t,()=>ce(p,t,m),n);return r})}return{reducerPath:t,getSelectors:o,get selectors(){return o(r)},selectSlice:r}}const v={name:n,reducer:g,actions:a.actionCreators,caseReducers:a.sliceCaseReducersByName,getInitialState:m,...b(r),injectInto(e,{reducerPath:t,...n}={}){const o=t??r;return e.inject({reducerPath:o,reducer:g},n),{...v,...b(o,!0)}}};return v}}function Ae(e,t,n,r){function o(o,...i){let a=t(o);return void 0===a&&r&&(a=n()),e(a,...i)}return o.unwrapped=e,o}var Ee=_e();function Te(){}var{assign:je}=Object;function Ie(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")},7312:(e,t,n)=>{"use strict";var r=n(6189);n(85),e.exports=r},7313:(e,t)=>{"use strict";t.f=Object.getOwnPropertySymbols},7318:(e,t,n)=>{"use strict";n.d(t,{A:()=>c}),n(9155);var r=n(824),o=n(8035);const i=n(3864).Ay.div.withConfig({componentId:"sc-xuun63-0"})(["display:flex;flex-direction:row;justify-content:flex-start;align-items:flex-start;font-size:var(--_kindlychat-font-size-sm);"," right:0;left:auto;color:var(--panel-background-white-black-contrast-1743170834);max-height:",";opacity:",";transition:max-height 1s ease,opacity 240ms ease ",";svg path{stroke:var(--panel-background-white-black-contrast-1743170834);}"],e=>{let{$show:t}=e;return t&&"margin-top: 4px;"},e=>{let{$show:t}=e;return t?"120px":"0px"},e=>{let{$show:t}=e;return t?1:0},e=>{let{$show:t}=e;return t?"480ms":0});var a=n(1085);function s(e){let{width:t=24,height:n=24,color:r="#333"}=e;return(0,a.jsxs)("svg",{width:n,height:t,viewBox:"0 0 24 24",fill:"none",children:[(0,a.jsx)("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"}),(0,a.jsx)("path",{d:"M12 10v2",stroke:r,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M12.5 16a.5.5 0 11-1 0 .5.5 0 011 0z",stroke:r})]})}var l=n(9272);const c=function(e){var t,n,c,u;let{name:d,control:f}=e;const{errors:p,isSubmitted:h}=(0,r.lN)({name:d,control:f}),g=(null===(t=p[d])||void 0===t?void 0:t.type)!==l.k1.CUSTOM&&((null===(n=p[d])||void 0===n?void 0:n.message)||(null===(c=p[`browser_error_${d}`])||void 0===c?void 0:c.message)||(null!==(u=p[d])&&void 0!==u&&u.ref&&"validationMessage"in p[d].ref?p[d].ref.validationMessage:void 0));return(0,a.jsxs)(i,{$show:Boolean(g&&h),id:`error_${d}`,children:[(0,a.jsx)(s,{width:16,height:16,color:o.Tj.errorColor}),"string"==typeof g?g:""]})}},7325:(e,t,n)=>{"use strict";n.d(t,{jz:()=>C,B:()=>A,UB:()=>x,g4:()=>h,Rh:()=>m,eG:()=>f,mN:()=>O,_e:()=>P,wQ:()=>d,ky:()=>b,VK:()=>L,Mm:()=>k,ZS:()=>w,lQ:()=>y,Ln:()=>_,L4:()=>g,w7:()=>I,zn:()=>T,nI:()=>E,ob:()=>j,i1:()=>p,Z4:()=>v,V$:()=>S});var r=n(6367),o=n(2221),i=n(6464),a=n(4851),s=n(9313),l=n(628),c=n(8679),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})},f=()=>e=>{e({type:c.SO})},p=()=>e=>{e({type:c.nX})},h=e=>t=>{t({type:c.CB,botKey:e})},g=function(e){let{skipRestart:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return async(n,r)=>{const{botKey:i,chatHasStarted:s}=r().chatbubble,{takenOver:u}=r().agent,{token:d}=r().connection,{PAT_HOST:f}=r().environment;if(n({type:c.M2,payload:{code:e}}),t||!s||u){if(s&&!await n((0,l.et)(`${f}/chatbubble/${o.Ak}/language_switch/`,{method:"POST",body:{languageCode:e},headers:(0,a.A)({token:d}).headers}))){const{currentLanguage:e}=r().chatbubble;n({type:c.M2,payload:{code:e}})}}else n((0,l.zX)(i,!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})}},b=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(t,n)=>{const{chatbubble:{botKey:r}}=n();t((0,l.zX)(r,e)),t(f());try{(0,s.Zf)()}catch(e){console.error(e)}}},v=()=>(e,t)=>{const{chatbubble:{chatHasStarted:n}}=t();n||e({type:c.d$,chatHasStarted:!0})},y=function(){let{source:e="user"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(t,n)=>{const{pushMessages:i,alerts:a,bot:s,nudge:l,chatbubble:{chatHasStarted:u},bot:{welcomePageType:d}}=n(),f=!u&&d!==o.Lb.NONE;(0,r.tf)("open-chatbubble",{value:{nextPage:f?"welcome-page":"chat"}},{storeState:n(),source:e}),i.show&&t({type:c.a_}),l.show&&t({type:c.X2}),(a.showTabNotification||a.showBubbleNotification)&&t({type:c.u2}),t({type:c.kA}),s.welcomePage&&s.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})},k=e=>(e,t)=>{const{userIsIdle:n}=t().chatbubble;n&&e({type:c.HW,userIsIdle:!1})},S=e=>(t,n)=>{var r,o;const{chatbubble:{contactDetailsButton:i}}=n();(null==i||null===(r=i.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})},C=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})},E=e=>t=>{t({type:c.uA,state:e})},T=e=>t=>{t({type:c.Xu,currentModal:e})},j=e=>(t,n)=>{setTimeout(()=>{const{feedback:{feedbackToSubmit:r},chatbubble:{chatHasStarted:o}}=n();o&&!r&&(t((0,u.WG)({ratingSystem:e.rating_scale.rating_system,triggerType:e.trigger_type,formTitle:e.form_title,step:"RATING_SCALE"})),t(T("FEEDBACK_END_HANDOVER")))},2e3)},I=e=>t=>{t({type:c.XM,isChatFullWindow:e})},O=()=>e=>{e(f()),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 s=e?await e:null;if(!s){const{connection:{token:e},environment:{PAT_HOST:n}}=r(),l=`${n}/chatbubble/${o.Ak}/privacy/export/${t}`,{headers:c}=(0,a.A)({token:e}),u={method:"GET",headers:{...c,"kindly-chat-version":"2.81.0",[i.B]:(0,i.U)()}};s=await(async(e,t)=>{let n;return fetch(e,{...t,headers:{"Content-Type":"application/json","kindly-chat-version":"2.81.0",[i.B]:(0,i.U)(),...t.headers},body:JSON.stringify(t.body)}).then(e=>{var t;if(!e.ok)throw new Error(e.statusText);const r=e.headers.get("Content-Disposition");return n=null==r||null===(t=r.split(/;(.+)/)[1])||void 0===t?void 0:t.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"),i=document.createElement("a");i.href=r,i.download=n,o.appendChild(i),i.click(),i.remove()})})(l,u)}}},P=function(){let{responsePromise:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async(t,n)=>{const{connection:{token:r},chatbubble:{botKey:i},environment:{PAT_HOST:s}}=n(),u=`${s}/chatbubble/${o.Ak}/privacy/delete/`,f=e?await e:await t((0,l.et)(u,{method:"DELETE",...(0,a.A)({token:r})}));200===(null==f?void 0:f.status)&&(t({type:c.CB,botKey:i,keepOpen:!0}),t(d("DELETED_CHAT")))}}},7354:e=>{e.exports=function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")},e.exports.__esModule=!0,e.exports.default=e.exports},7389:(e,t,n)=>{"use strict";var r=n(5024),o=n(1330),i=n(9989),a=n(7235),s=n(3273),l=n(8364);t.f=r&&!o?Object.defineProperties:function(e,t){a(e);for(var n,r=s(t),o=l(t),c=o.length,u=0;c>u;)i.f(e,n=o[u++],r[n]);return e}},7424:(e,t,n)=>{"use strict";var r=n(4531),o=n(86);r("toPrimitive"),o()},7437:(e,t,n)=>{"use strict";n.d(t,{CM:()=>k,Tk:()=>m,MY:()=>S,S4:()=>y,yh:()=>_,Zk:()=>E,Mk:()=>A,f2:()=>C,uK:()=>x});var r=n(9749),o=n.n(r),i=n(2221),a=n(2921),s=n(4851),l=n(3603),c=n(310),u=n(8679),d=n(628);const f=[],p=[],h=[];let g=0;const m=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.length||([...f,...p].forEach(e=>{clearInterval(e)}),f.length=0,p.length=0,h.forEach(e=>{clearTimeout(e)}),h.length=0,g=0),o()(t).call(t,"handoverRequestPollIntervalIds")&&(f.forEach(e=>{clearInterval(e)}),f.length=0),o()(t).call(t,"handoverPollIntervalIds")&&(p.forEach(e=>{clearInterval(e)}),p.length=0),o()(t).call(t,"replyTimeoutIds")&&(h.forEach(e=>{clearTimeout(e)}),h.length=0,g=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!==i.Le.PROCESSING},y=()=>async(e,t)=>{const{agent:{takenOver:n,requestedHandoverAt:r,handoverWaitTimeEstimate:o,handoverQueuePosition:f},chatbubble:{startedAt:p,chatHasStarted:h,botKey:g},connection:{token:m},environment:{PAT_HOST:y},messages:{attachments:x,buttonClicks:k,chatMessages:S,messageSentTime:C}}=t();if(!m||!h)return;const[_]=S.filter(e=>{let{from_bot:t}=e;return t}).slice(-1),[A]=x.filter(v).slice(-1),E=((e,t)=>{let{created:n}=e,{created:r}=t;return n&&r?new Date(n)>new Date(r)?n:r:n||r})(null!=_?_:{},null!=A?A:{})||C||p||(new Date).toISOString(),T=await e((0,d.et)(`${y}/chatbubble/${i.Ak}/latest?timestamp=${E}`,{method:"GET",...(0,s.A)({token:m})},{onError:t=>{var n;403===(null===(n=t.response)||void 0===n?void 0:n.status)?(console.warn(`/chatbubble/${i.Ak}/latest returned 403, starting new chat`),e({type:u.tr,error:403}),e((0,d.zX)(g,!0))):console.error(t)}}));if(!T||!T.data)return;const{chatMessages:j,buttonClicks:I=[],takenOver:O,requestedHandoverAt:L,attachments:P,externalHandoverState:M,handoverWaitTimeEstimate:N,handoverQueuePosition:z}=T.data,R=(0,c.A)(S),$=(0,a.A)(k),D=j.filter(R),F=I.map(b).filter($),B=D.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:a=[]}=(0,l.A)(function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).filter(e=>{let{sender:t,status:n}=e;return t===i.bS.USER||n===i.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}}),a.length>0&&t({type:u.tS,data:{attachments:a}})})(P)),e(w(B)),n!==O&&e({type:u.II,data:{taken_over:O,supports_attachment:null==M?void 0:M.supports_attachment,requested_handover_at:L}}),r!==L&&e({type:u.nz,data:{requested_handover_at:L,handover_wait_time_estimate:N,handover_queue_position:z}}),o===N&&f===z||e({type:u.AQ,data:{handover_wait_time_estimate:N,handover_queue_position:z}}),(H=D,U="created",(H||[]).slice().sort((e,t)=>e[U]<t[U]?-1:1)).forEach(t=>{e({type:u.tq,data:t})}),F.forEach(t=>e({type:u.Y6,buttonClick:t}))},x=()=>e=>{if(m("replyTimeoutIds"),p.length)return;const t=setTimeout(()=>e(y()),i.RT.REPLY_TIMEOUT_MS);h.push(t),g=1},w=e=>t=>{if(m("replyTimeoutIds"),0===g)return;if(e||!(g<i.RT.REPLY_TIMEOUT_MAX_ATTEMPTS))return void(e||console.error(`Reply timeout failed more than ${i.RT.REPLY_TIMEOUT_MAX_ATTEMPTS} times`));const n=i.RT.REPLY_TIMEOUT_MS*i.RT.REPLY_TIMEOUT_MS_MULTIPLIER**g,r=setTimeout(()=>t(y()),n);h.push(r),g+=1},k=()=>m("replyTimeoutIds"),S=()=>e=>{if(p.length){m("handoverPollIntervalIds");const t=setInterval(()=>e(y()),i.RT.HANDOVER_POLL_INTERVAL_MS);f.push(t)}if(f.length){m("handoverRequestPollIntervalIds");const t=setInterval(()=>e(y()),i.RT.HANDOVER_REQUEST_POLL_INTERVAL_MS);f.push(t)}},C=()=>e=>{if(m(),p.length)return;const t=setInterval(()=>e(y()),i.RT.HANDOVER_POLL_INTERVAL_MS);p.push(t)},_=()=>m("handoverPollIntervalIds"),A=()=>e=>{if(f.length)return;const t=setInterval(()=>e(y()),i.RT.HANDOVER_REQUEST_POLL_INTERVAL_MS);f.push(t)},E=()=>m("handoverRequestPollIntervalIds")},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},7501:(e,t,n)=>{"use strict";n(4531)("split")},7524:(e,t,n)=>{"use strict";n(9098)({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:n(5396)})},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}},7542:(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"},7551:(e,t,n)=>{"use strict";var r=n(6100),o=r({}.toString),i=r("".slice);e.exports=function(e){return i(o(e),8,-1)}},7575:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=e=>e.replace(/_\w/g,e=>e[1].toUpperCase())},7603:(e,t,n)=>{"use strict";var r=n(9098),o=n(1005).includes,i=n(1203),a=n(8137);r({target:"Array",proto:!0,forced:i(function(){return!Array(1).includes()})},{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),a("includes")},7752:(e,t,n)=>{"use strict";var r=n(262),o=n(7551),i=n(8655)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[i])?!!t:"RegExp"===o(e))}},7785:(e,t,n)=>{"use strict";var r=n(6100),o=n(908),i=n(2769),a=n(7551),s=n(1139),l=r([].push);e.exports=function(e){if(i(e))return e;if(o(e)){for(var t=e.length,n=[],r=0;r<t;r++){var c=e[r];"string"==typeof c?l(n,c):"number"!=typeof c&&"Number"!==a(c)&&"String"!==a(c)||l(n,s(c))}var u=n.length,d=!0;return function(e,t){if(d)return d=!1,t;if(o(this))return t;for(var r=0;r<u;r++)if(n[r]===e)return t}}}},7935:()=>{},7958:(e,t,n)=>{"use strict";function r(e,t,n){let r=null,o=[];const i=function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];n&&o.push(a),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(...a)},t)};return i.cancel=()=>{r&&clearTimeout(r),o=[]},i}n.d(t,{A:()=>r})},7967:(e,t,n)=>{"use strict";e.exports=n(6310)},8013:(e,t,n)=>{"use strict";n(4531)("observable")},8035:(e,t,n)=>{"use strict";n.d(t,{AV:()=>a,CM:()=>o,FR:()=>p,HM:()=>h,J:()=>s,Nl:()=>f,Nz:()=>d,Tj:()=>r,jO:()=>c,mb:()=>l,qd:()=>i,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"},i={textColor:"#333333",textColorLight:"#757575"},a={dark:"#0D0D0D",light:"#F2F2F2"},s={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)"},l={tablet:"768px",phone:"500px"},c={minTablet:`(min-width: calc(${l.tablet} + 1px))`,maxTablet:`(max-width: ${l.tablet})`,maxPhone:`(max-width: ${l.phone})`,maxPhoneHeight:"(max-height: 760px)"},u={headerIndex:"15",overlayIndex:"20",contextMenuIndex:"30"},d={width:190},f={icon:"10px",wrapper:"6px"},p={button:"0px 1px 4px 0px rgba(0, 0, 0, 0.08)",card:"0 0 1px 0 rgba(0, 0, 0, 0.24), 0 2px 6px 0 rgba(0, 0, 0, 0.04)",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"}},8043:(e,t,n)=>{"use strict";n.d(t,{A:()=>g}),n(9155);var r=n(809),o=n(1346),i=n(3699),a=n(3864),s=n(6052);const l=a.Ay.div.withConfig({componentId:"sc-11sa2m4-0"})(["display:flex;flex-direction:row;padding:8px 12px;gap:8px;margin-top:8px;border-radius:6px;border:",";"],e=>{let{theme:t}=e;return`1px solid ${(0,s.w5)(t.panelBackground,"rgba(255, 255, 255, 0.08)","rgba(0, 0, 0, 0.08)")}`}),c=a.Ay.div.withConfig({componentId:"sc-11sa2m4-1"})(["display:flex;flex-direction:column;flex:1;"]),u=a.Ay.div.withConfig({componentId:"sc-11sa2m4-2"})(["font-size:var(--_kindlychat-font-size-p);color:var(--panel-background-white-black-contrast-1743170834);font-weight:450;word-break:break-all;"]),d=a.Ay.div.withConfig({componentId:"sc-11sa2m4-3"})(["font-size:var(--_kindlychat-font-size-sm);color:",";"],e=>{let{theme:t}=e;return(0,s.w5)(t.panelBackground,"rgba(255, 255, 255, 0.8)","rgba(0, 0, 0, 0.8)")}),f=a.Ay.div.withConfig({componentId:"sc-11sa2m4-4"})(["display:flex;flex-direction:row;justify-content:center;align-items:center;padding:6px;& svg{& > path{stroke:",";}}"],e=>{let{theme:t}=e;return(0,s.w5)(t.panelBackground,"rgba(255, 255, 255, 0.8)","rgba(0, 0, 0, 0.8)")}),p=a.Ay.div.withConfig({componentId:"sc-11sa2m4-5"})(["display:flex;flex-direction:row;justify-content:center;align-items:center;font-size:calc(var(--_kindlychat-font-size-m) * 1.25);cursor:pointer;& svg{& > path{stroke:",";}}"],e=>{let{theme:t}=e;return(0,s.w5)(t.panelBackground,"rgba(255, 255, 255, 0.8)","rgba(0, 0, 0, 0.8)")});var h=n(1085);const g=function(e){let{file:t,canRemove:n=!0,onRemove:a}=e;return(0,h.jsxs)(l,{children:[(0,h.jsx)(f,{children:(0,h.jsx)(o.A,{title:"attachment"})}),(0,h.jsxs)(c,{children:[(0,h.jsx)(u,{children:t.name}),(0,h.jsx)(d,{children:(0,i.B$)(t.size)})]}),n&&(0,h.jsx)(p,{onClick:a,children:(0,h.jsx)(r.US,{width:24,height:24})})]})}},8089:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",a="[object Function]",s="[object Object]",l=/^\[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[i]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u[a]=u["[object Map]"]=u["[object Number]"]=u[s]=u["[object RegExp]"]=u["[object Set]"]=u["[object String]"]=u["[object WeakMap]"]=!1;var d,f,p,h="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,g="object"==typeof self&&self&&self.Object===Object&&self,m=h||g||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){}}(),k=w&&w.isTypedArray,S=Array.prototype,C=Function.prototype,_=Object.prototype,A=m["__core-js_shared__"],E=C.toString,T=_.hasOwnProperty,j=(d=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||""))?"Symbol(src)_1."+d:"",I=_.toString,O=E.call(Object),L=RegExp("^"+E.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=y?m.Buffer:void 0,M=m.Symbol,N=m.Uint8Array,z=(P&&P.allocUnsafe,f=Object.getPrototypeOf,p=Object,function(e){return f(p(e))}),R=Object.create,$=_.propertyIsEnumerable,D=S.splice,F=M?M.toStringTag:void 0,B=function(){try{var e=se(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),H=P?P.isBuffer:void 0,U=Math.max,V=Date.now,W=se(m,"Map"),G=se(Object,"create"),q=function(){function e(){}return function(t){if(!ye(t))return{};if(R)return R(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 Q(e,t,n){(void 0!==n&&!fe(e[t],n)||void 0===n&&!(t in e))&&te(e,t,n)}function J(e,t,n){var r=e[t];T.call(e,t)&&fe(r,n)&&(void 0!==n||t in e)||te(e,t,n)}function ee(e,t){for(var n=e.length;n--;)if(fe(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__=G?G(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(G){var n=t[e];return n===r?void 0:n}return T.call(t,e)?t[e]:void 0},K.prototype.has=function(e){var t=this.__data__;return G?void 0!==t[e]:T.call(t,e)},K.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=G&&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():D.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(W||Y),string:new K}},X.prototype.delete=function(e){var t=ae(this,e).delete(e);return this.size-=t?1:0,t},X.prototype.get=function(e){return ae(this,e).get(e)},X.prototype.has=function(e){return ae(this,e).has(e)},X.prototype.set=function(e,t){var n=ae(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(!W||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]":F&&F in Object(e)?function(e){var t=T.call(e,F),n=e[F];try{e[F]=void 0;var r=!0}catch(e){}var o=I.call(e);return r&&(t?e[F]=n:delete e[F]),o}(e):function(e){return I.call(e)}(e)}function re(e){return xe(e)&&ne(e)==i}function oe(e,t,n,r,o){e!==t&&function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var s=i[++r];if(!1===t(o[s],s,o))break}}(t,function(i,a){if(o||(o=new Z),ye(i))!function(e,t,n,r,o,i,a){var l=ue(e,n),c=ue(t,n),u=a.get(c);if(u)Q(e,n,u);else{var d,f,p,h,g,m=i?i(l,c,n+"",e,t,a):void 0,b=void 0===m;if(b){var v=he(c),y=!v&&me(c),x=!v&&!y&&we(c);m=c,v||y||x?he(l)?m=l:xe(g=l)&&ge(g)?m=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(l):y?(b=!1,m=function(e){return e.slice()}(c)):x?(b=!1,h=new(p=(d=c).buffer).constructor(p.byteLength),new N(h).set(new N(p)),f=h,m=new d.constructor(f,d.byteOffset,d.length)):m=[]:function(e){if(!xe(e)||ne(e)!=s)return!1;var t=z(e);if(null===t)return!0;var n=T.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&E.call(n)==O}(c)||pe(c)?(m=l,pe(l)?m=function(e){return function(e,t,n){var r=!n;n||(n={});for(var o=-1,i=t.length;++o<i;){var a=t[o],s=void 0;void 0===s&&(s=e[a]),r?te(n,a,s):J(n,a,s)}return n}(e,ke(e))}(l):ye(l)&&!be(l)||(m=function(e){return"function"!=typeof e.constructor||ce(e)?{}:q(z(e))}(c))):b=!1}b&&(a.set(c,m),o(m,c,r,i,a),a.delete(c)),Q(e,n,m)}}(e,t,a,n,oe,r,o);else{var l=r?r(ue(e,a),i,a+"",e,t,o):void 0;void 0===l&&(l=i),Q(e,a,l)}},ke)}var ie=B?function(e,t){return B(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:_e;function ae(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 se(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!!j&&j in e}(e))&&(be(e)?L:l).test(function(e){if(null!=e){try{return E.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function le(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||_)}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)}}(ie);function fe(e,t){return e===t||e!=e&&t!=t}var pe=re(function(){return arguments}())?re:function(e){return xe(e)&&T.call(e,"callee")&&!$.call(e,"callee")},he=Array.isArray;function ge(e){return null!=e&&ve(e.length)&&!be(e)}var me=H||function(){return!1};function be(e){if(!ye(e))return!1;var t=ne(e);return t==a||"[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=k?function(e){return function(t){return e(t)}}(k):function(e){return xe(e)&&ve(e.length)&&!!u[ne(e)]};function ke(e){return ge(e)?function(e,t){var n=he(e),r=!n&&pe(e),o=!n&&!r&&me(e),i=!n&&!r&&!o&&we(e),a=n||r||o||i,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var c in e)!t&&!T.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||le(c,l))||s.push(c);return s}(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&&T.call(e,r))&&n.push(r);return n}(e)}var Se,Ce=(Se=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,i=U(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(a),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,s)}}(e,t,_e),e+"")}(function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,i=r>2?t[2]:void 0;for(o=Se.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(e,t,n){if(!ye(n))return!1;var r=typeof t;return!!("number"==r?ge(n)&&le(t,n.length):"string"==r&&t in n)&&fe(n[t],e)}(t[0],t[1],i)&&(o=r<3?void 0:o,r=1),e=Object(e);++n<r;){var a=t[n];a&&Se(e,a,n)}return e}));function _e(e){return e}e.exports=Ce},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:()=>i});var r=n(9749),o=n.n(r);function i(){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,i]=n;return{...e,...o()(t).call(t,r)?{[r]:i}:{}}},{})}},8293:(e,t,n)=>{"use strict";n(4531)("asyncDispose")},8341:(e,t,n)=>{"use strict";n(7603);var r=n(2856);e.exports=r("Array","includes")},8364:(e,t,n)=>{"use strict";var r=n(8600),o=n(9683);e.exports=Object.keys||function(e){return r(e,o)}},8407:(e,t,n)=>{"use strict";var r=n(4904),o=n(2769),i=n(7551),a=n(8655)("toStringTag"),s=Object,l="Arguments"===i(function(){return arguments}());e.exports=r?i: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=s(e),a))?n:l?i(t):"Object"===(r=i(t))&&o(t.callee)?"Arguments":r}},8410:(e,t,n)=>{"use strict";n.d(t,{Y$:()=>v,zV:()=>y,Ay:()=>x}),n(9155);var r=n(1085);function o(e){let{color:t="#333333",size:n=24}=e;return(0,r.jsxs)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("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"}),(0,r.jsx)("path",{d:"M9 8.90015H14.95",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M11.9751 8.725V7.5",stroke:t,strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),(0,r.jsx)("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"}),(0,r.jsx)("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"})]})}var i=n(3886);const a=function(e){let{color:t="#6A778A",...n}=e;return(0,r.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:[(0,r.jsxs)("g",{clipPath:"url(#clip0_144_28508)",children:[(0,r.jsx)("path",{d:"M6.5 5.83398L8.83333 8.00065M8.83333 8.00065L6.5 10.1673M8.83333 8.00065H3",stroke:t,strokeLinecap:"square"}),(0,r.jsx)("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"})]}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"clip0_144_28508",children:(0,r.jsx)("rect",{width:"16",height:"16",fill:"white"})})})]})},s=function(e){let{color:t="#6A778A",...n}=e;return(0,r.jsxs)("svg",{width:"15",height:"14",viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:[(0,r.jsx)("path",{d:"M9.6875 5.10352L11.7292 6.99935L9.6875 8.89518",stroke:t,strokeWidth:"1.05",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M11.583 7H6.77051",stroke:t,strokeWidth:"1.04973",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("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"})]})},l=function(e){let{color:t="#6A778A",...n}=e;return(0,r.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:(0,r.jsx)("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})})};var c=n(6343),u=n(7182),d=n(3864),f=n(2475),p=n(6052);const h=d.Ay.div.withConfig({componentId:"sc-1ilvrss-0"})(["width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;",";margin-bottom:8px;@media (prefers-reduced-motion){animation:none;}"],f.AK),g=d.Ay.div.withConfig({componentId:"sc-1ilvrss-1"})(["max-width:80%;display:flex;"]),m=d.Ay.span.withConfig({componentId:"sc-1ilvrss-2"})(["font-size:var(--_kindlychat-font-size-sm);text-align:center;color:",";& > div{display:inline;}& > svg{font-size:var(--_kindlychat-font-size-m);margin-right:4px;vertical-align:text-top;min-width:20px;display:inline;}"],e=>{let{theme:t}=e;return(0,p.w5)(t.background,"rgba(255, 255, 255, 0.6)","rgba(0, 0, 0, 0.6)")});var b=n(6831);const v={REVOKE_PERMISSION:"revoke-permission"},y={COMPLIANCE:"frontend_system_message_compliance_text"};function x(e){let{chatMessage:t}=e;const n=(0,u.jL)();let d=null;switch(t.system_dialogue_message_type.toLowerCase()){case"start":d=(0,r.jsx)(a,{width:16,height:16});break;case"end":d=(0,r.jsx)(s,{width:16,height:16});break;case"agent_assigned":d=(0,r.jsx)(l,{width:16,height:16});break;case"live_translation_start":case"live_translation_end":d=(0,r.jsx)(o,{size:16});break;case y.COMPLIANCE:d=(0,r.jsx)(i.A,{size:16})}return(0,r.jsx)(h,{children:(0,r.jsx)(g,{onClick:e=>{const t=e.target;if(!t)return;const r=t.closest("[data-kindly-action]");r&&(e.preventDefault(),r.getAttribute("data-kindly-action")===v.REVOKE_PERMISSION&&n(c.c9))},children:(0,r.jsxs)(m,{children:[d,(0,b.A)(t.event_message)]})})})}},8411:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(5096);const o=new Set;function i(e){var t,n;const{feedbackSettings:i}=r.Z,a=null==i||null===(t=i[e])||void 0===t?void 0:t.forms.find(e=>"bot_conversation"===e.trigger_type&&e.is_active),s=null==i||null===(n=i[e])||void 0===n?void 0:n.forms.find(e=>"handover_conversation"===e.trigger_type&&e.is_active);return{botConversationFeedback:a,handoverConversationFeedback:s,preloadFeedbackImages:e=>{const t="bot_conversation"===e?a:s;t&&t.rating_scale.edit_labels.forEach(e=>{if(o.has(e.image))return;const t=new Image;t.src=e.image,o.add(t.src)})}}}},8414:(e,t,n)=>{"use strict";n.d(t,{Y_:()=>h,kS:()=>m,fe:()=>g,mR:()=>b,vJ:()=>f,NS:()=>p});var r=n(5096),o=n(4851);const i=(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:i}=e;return{sections:[{title:t[i],description:n[i]},{form:{input:{label:r[i],placeholder:o[i],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:i,carousel_title:a,image_carousel:s,languageCode:l}=e;return{sections:[{title:n[l],description:r[l],buttons:[{label:o[l],value:i[l],button_type:"link",is_active:!0}]},{products:{title:a[l],items:null===(t=s[l])||void 0===t?void 0:t.map(e=>{let{title:t,alt_text:n,description:r,image_url:o,product_url:i,link_text:a,link_url:s,price:l}=e;return{title:t,image:o,linkText:a,linkUrl:s,productUrl:i,altText:n,description:r,price:l}})}}]}})({...e,languageCode:t}):"Text"===n?r=(e=>{let{title:t,body_text:n,link_text:r,link_location:o,languageCode:i}=e;return{sections:[{title:t[i],description:n[i]},{link:{text:r[i],location:o[i]}}]}})({...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(892),s=n(628),l=n(2221),c=n(6464),u=n(8679);const d=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]},f=e=>{let{slug:t,eventType:n,label:i}=e;return async(e,f)=>{if(!t||!n)return;const{supportedLanguages:p}=r.Z,{nudges:h}=f().bot,{currentLanguage:g}=f().chatbubble,m=(e=>{var t,n,r,o,i;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!==(i=null==e?void 0:e.multiple_choice_nudges)&&void 0!==i?i:[]]})(h),b=m.find(e=>e.slug===t&&d(e,p,g));b&&(e({type:u.wX,slug:t}),n!==u.MO&&n!==u.oE||await e((e=>{let{targetNudge:t,eventType:n,label:r,currentLanguage:i}=e;return async(e,u)=>{const{botKey:d}=u().chatbubble,{PAT_HOST:f}=u().environment,{token:p}=u().connection,h=await e((0,a.z5)());e((0,s.et)(`${f}/chatbubble/${l.Ak}/nudge/`,{method:"POST",body:{session_id:(0,c.U)(),nudge_id:t.id,action:n,type:t.type,label:r||null,language_code:i},...(0,o.A)({botKey:d,token:p},{withCurrentUrl:!0,extra:h})}))}})({targetNudge:b,eventType:n,label:i,currentLanguage:g})))}},p=e=>(t,n)=>{const{show:r,slug:o}=n().nudge;r&&t(f({slug:o,eventType:u.MO,label:e}))},h=(e,t)=>(n,r)=>{const{show:o,isCustom:i,slug:a,trackEvent:s}=r().nudge;if(o){if(n({type:u.X2}),i){var l;const e=document.getElementById("kindly-custom-nudge");e&&(null===(l=e.parentNode)||void 0===l||l.removeChild(e))}s&&n(f({slug:a,eventType:e?u.MO:u.X2,label:t}))}},g=e=>{let{nudgeLayout:t,slug:n,trackEvent:o}=e;return(e,a)=>{var s,c,p,h,g,m,b;const{supportedLanguages:v}=r.Z,{nudges:y}=a().bot,{currentLanguage:x}=a().chatbubble,{show:w}=a().pushMessages,k=null==t?void 0:t.language;let S,C=null!==(s=null==t?void 0:t.webhook)&&void 0!==s?s:null,_=null!==(c=null==t?void 0:t.dialogueId)&&void 0!==c?c:null,A=t;const E=v.find(e=>{let{is_primary:t}=e;return t}),T=[...null!==(p=null==y?void 0:y.form_nudges)&&void 0!==p?p:[],...null!==(h=null==y?void 0:y.custom_nudges)&&void 0!==h?h:[],...null!==(g=null==y?void 0:y.product_nudges)&&void 0!==g?g:[],...null!==(m=null==y?void 0:y.text_nudges)&&void 0!==m?m:[],...null!==(b=null==y?void 0:y.multiple_choice_nudges)&&void 0!==b?b:[]],j=k||x||(null==E?void 0:E.code),I=n||t.slug;if(I){var O,L,P,M,N,z,R;if(S=T.filter(e=>e.slug===I)[0],void 0===S)return;if(_=null!==(O=null===(L=S)||void 0===L?void 0:L.dialogue_id)&&void 0!==O?O:_,C=null!==(P=null===(M=S)||void 0===M?void 0:M.webhook)&&void 0!==P?P:C,A=i(S,j),A.sections=[...null!==(N=null===(z=A)||void 0===z?void 0:z.sections)&&void 0!==N?N:[],...null!==(R=null==t?void 0:t.sections)&&void 0!==R?R:[]],A.backdrop=null==t?void 0:t.backdrop,!d(S,v,j))return void console.warn("Nudge is disabled for the current language:",j)}else console.error("Please set up a nudge in the platform to get a slug!");o&&e(f({slug:I,eventType:u.wv})),w&&e({type:u.a_}),e({slug:I,type:u.wv,nudgeLayout:A,dialogue:_,webhook:C,nudgeType:l.MK.TEMPLATE,trackEvent:o})}},m=e=>{let{content:t,slug:n,onRendered:r,trackEvent:o}=e;return(e,i)=>{const{show:a}=i().pushMessages;o&&e(f({slug:n,eventType:u.un})),a&&e({type:u.a_}),e({type:u.un,content:t,slug:n,onRendered:r,nudgeType:l.MK.CUSTOM})}},b=e=>{let{nudge:t,languageCode:n}=e;return e=>{const{autopopup_time:r}=t,o=i(t,n);r<=0||(r&&0!==r?setTimeout(()=>e({type:u.wv,nudgeLayout:o,slug:t.slug}),r):e({type:u.wv,nudgeLayout:o,slug:t.slug}))}}},8417:(e,t,n)=>{"use strict";var r,o,i,a=n(1314),s=n(8900),l=n(262),c=n(3999),u=n(701),d=n(3753),f=n(4275),p=n(5241),h="Object already initialized",g=s.TypeError,m=s.WeakMap;if(a||d.state){var b=d.state||(d.state=new m);b.get=b.get,b.has=b.has,b.set=b.set,r=function(e,t){if(b.has(e))throw new g(h);return t.facade=e,b.set(e,t),t},o=function(e){return b.get(e)||{}},i=function(e){return b.has(e)}}else{var v=f("state");p[v]=!0,r=function(e,t){if(u(e,v))throw new g(h);return t.facade=e,c(e,v,t),t},o=function(e){return u(e,v)?e[v]:{}},i=function(e){return u(e,v)}}e.exports={set:r,get:o,has:i,enforce:function(e){return i(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!l(t)||(n=o(t)).type!==e)throw new g("Incompatible receiver, "+e+" required");return n}}}},8448:(e,t,n)=>{"use strict";n(4531)("customMatcher")},8560:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(9749),o=n.n(r),i=n(7182),a=n(5767),s=n(8411);function l(){var e;const{currentLanguage:t}=(0,i.GV)(e=>{let{chatbubble:t}=e;return t}),{takenOver:n,hasRequestedHandoverAtLeastOnce:r}=(0,i.GV)(e=>{let{agent:t}=e;return t}),{feedbackToSubmit:l,feedbacksAlreadyDisplayed:c}=(0,i.GV)(a.CJ),{botConversationFeedback:u,handoverConversationFeedback:d}=(0,s.A)(t),f=null===(e=null==u?void 0:u.allow_bot_feedback_after_handover_feedback)||void 0===e||e,p=u&&!o()(c).call(c,"bot_conversation")&&(!r||f);return{feedbackToDisplay:d&&n?d:p?u:null,feedbackToSubmit:l}}},8600:(e,t,n)=>{"use strict";var r=n(6100),o=n(701),i=n(3273),a=n(1005).indexOf,s=n(5241),l=r([].push);e.exports=function(e,t){var n,r=i(e),c=0,u=[];for(n in r)!o(s,n)&&o(r,n)&&l(u,n);for(;t.length>c;)o(r,n=t[c++])&&(~a(u,n)||l(u,n));return u}},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,i.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)),i=r(n(4399));e.exports=t.default},8655:(e,t,n)=>{"use strict";var r=n(8900),o=n(8141),i=n(701),a=n(1268),s=n(4603),l=n(7460),c=r.Symbol,u=o("wks"),d=l?c.for||c:c&&c.withoutSetter||a;e.exports=function(e){return i(u,e)||(u[e]=s&&i(c,e)?c[e]:d("Symbol."+e)),u[e]}},8679:(e,t,n)=>{"use strict";n.d(t,{M_:()=>r,MU:()=>o,nW:()=>g,YU:()=>h,fg:()=>L,FZ:()=>k.FZ,YR:()=>k.YR,K_:()=>v,A8:()=>y,wk:()=>x,Y6:()=>P,Q4:()=>k.Q4,uS:()=>k.uS,SO:()=>k.SO,_Y:()=>S._Y,zT:()=>S.zT,wX:()=>Y,MO:()=>q,nG:()=>T,_N:()=>S._N,Kd:()=>X,oZ:()=>E,u2:()=>p,X2:()=>V,a_:()=>Z,wM:()=>k.wM,z2:()=>R,II:()=>s,MM:()=>a,nz:()=>i,t1:()=>k.t1,qQ:()=>b,tS:()=>M,E7:()=>w,Os:()=>N,tq:()=>z,ny:()=>S.ny,kA:()=>k.kA,$o:()=>C,jE:()=>j,hn:()=>k.hn,mz:()=>S.mz,kP:()=>S.kP,VZ:()=>S.VZ,MN:()=>A,a1:()=>J,oE:()=>K,TF:()=>k.TF,XM:()=>k.XM,d$:()=>k.d$,Xu:()=>k.Xu,tr:()=>k.MO,QA:()=>$,uA:()=>k.uA,ye:()=>I,M2:()=>k.M2,kU:()=>D,se:()=>F,nm:()=>k.nm,HW:()=>k.HW,Zb:()=>f,Eg:()=>k.Eg,un:()=>G,vP:()=>_,wv:()=>W,nX:()=>k.nX,l:()=>Q,Wh:()=>d,CB:()=>k.CB,vK:()=>O,IM:()=>B,zZ:()=>m,wP:()=>H,pz:()=>U,AQ:()=>u,c6:()=>l,we:()=>c});const r="AGENT_STARTED_TYPING",o="AGENT_STOPPED_TYPING",i="HANDOVER_REQUESTED",a="HANDOVER_CANCELLED",s="HANDOVER",l="USER_STARTED_TYPING",c="USER_STOPPED_TYPING",u="UPDATE_HANDOVER_QUEUE",d="SHOW_TAB_NOTIFICATION",f="SHOW_BUBBLE_NOTIFICATION",p="DISMISS_NOTIFICATIONS",h="ANNOUNCEMENT_SHOW",g="ANNOUNCEMENT_HIDE",m="UNAUTHENTICATED",b="IDENTIFIED",v="AUTHENTICATED",y="BOT_STARTED_TYPING",x="BOT_STOPPED_TYPING",w="MIMIR_STARTED_SEARCHING";var k=n(3313),S=n(9977);const C="ENVIRONMENT_OVERRIDE",_="SHOW_IN_CHAT_NOTIFICATION",A="REPLACE_IN_CHAT_NOTIFICATION",E="DISMISS_IN_CHAT_NOTIFICATION",T="DELETE_IN_CHAT_NOTIFICATION",j="PATTERN_CONTEXT_MATCH",I="SET_INSPECTED_CHAT_MESSAGE",O="TOGGLE_INSPECTOR",L="ANONYMIZED_MESSAGE",P="BUTTON_CLICK",M="MESSAGE_ATTACHMENTS_UPDATED",N="NEW_ATTACHMENTS",z="NEW_MESSAGE",R="NEW_FRONTEND_SYSTEM_MESSAGE",$="SET_FORM",D="SET_LAST_MESSAGE_SEEN",F="SET_MESSAGE_SENT_TIME",B="TRIGGER_DIALOGUE",H="UPDATE_ATTACHMENT",U="UPDATE_CHAT_MESSAGE",V="DISMISS_NUDGE",W="SHOW_NUDGE",G="SHOW_CUSTOM_NUDGE",q="CTA_CLICK",K="SESSION_COMPLETION",Y="COUNT_NUDGE",X="DISCOUNT_NUDGE",Z="DISMISS_PUSH_MESSAGE",Q="SHOW_PUSH_MESSAGE",J="RESET_PUSH_MESSAGES"},8681:(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}},8684:(e,t,n)=>{"use strict";var r=n(3395);n(85),e.exports=r},8696:(e,t,n)=>{"use strict";var r=n(1203),o=n(2769),i=/#|\.prototype\./,a=function(e,t){var n=l[s(e)];return n===u||n!==c&&(o(t)?r(t):!!t)},s=a.normalize=function(e){return String(e).replace(i,".").toLowerCase()},l=a.data={},c=a.NATIVE="N",u=a.POLYFILL="P";e.exports=a},8706:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>ke});var r=n(9155),o=n(541),i=n(3864);const a=i.Ay.div.withConfig({componentId:"sc-104frbp-0"})(["display:block;top:-100vh;left:-100vw;height:200vh;width:200vw;position:fixed;cursor:pointer;transition:all ease 1200ms;background:",";opacity:",";z-index:",";"],e=>{let{$backdrop:t}=e;return t.color||"#000"},e=>{let{$backdrop:t}=e;return t.opacity||.5},e=>{let{$backdrop:t}=e;return t.zIndex||-1});var s=n(1085);function l(e){let{backdrop:t,onClick:n}=e;return(0,s.jsx)(a,{onClick:n,$backdrop:t})}var c=n(2221),u=n(6343),d=n(1695),f=n(1328),p=n(9337),h=n(916);function g(e){let{slug:t}=e;const[n,o]=(0,r.useState)({}),[i,a]=(0,r.useState)(!0),s=(0,h.A)(),{currentLanguageCode:l}=(0,f.A)();return(0,r.useEffect)(()=>{let e={};const n=s.find(e=>e.slug===t);var r;n&&t&&(null!=n&&n.text_blocks?n.text_blocks.map(t=>{const n=(0,p.A)(t,l);e[t.slug]=n.value}):e=(0,p.A)(n,l),a(Boolean(null==n||null===(r=n.text_blocks)||void 0===r?void 0:r.length)),o(e))},[s,l,t]),{textContent:n,hasTextContent:i}}const m=function(){const e=window.kindlyChat.APIRoot,t=(0,r.useRef)(e),{content:n,slug:i,onRendered:a}=(0,o.d4)(d.G0),{currentLanguageCode:s}=(0,f.A)(),{textContent:l,hasTextContent:c}=g({slug:i});return(0,r.useEffect)(()=>{if(document.getElementById("kindly-custom-nudge"))return;const e="function"==typeof n?n(l):n;if(c&&0===Object.keys(l).length)return;const r=document.createElement("div");r.innerHTML=e,t.current.appendChild(r),r.setAttribute("id","kindly-custom-nudge"),"function"==typeof a&&a(r)},[n,s,i,l,a,c]),null};var b=n(1949),v=n.n(b),y=n(809);const x=i.Ay.div.withConfig({componentId:"sc-28ma63-0"})(["margin:24px;display:flex;flex-direction:column;"]);function w(e){let{html:t,slug:n}=e;const{textContent:r}=g({slug:n});return(0,s.jsx)(x,{children:(0,s.jsx)("div",{dangerouslySetInnerHTML:{__html:"function"==typeof t?t(r):t}})})}var k=n(958);const S=i.Ay.div.withConfig({componentId:"sc-1y03ray-0"})(["margin:24px;display:flex;flex-direction:column;"]),C=i.Ay.h2.withConfig({componentId:"sc-1y03ray-1"})(["font-size:var(--_kindlychat-font-size-m);font-weight:500;line-height:26px;margin:0 0 16px 0;"]),_=i.Ay.p.withConfig({componentId:"sc-1y03ray-2"})(["line-height:22px;margin:0px;"]),A=i.Ay.a.withConfig({componentId:"sc-1y03ray-3"})(["line-height:22px;margin:0 0 16px 0;color:#0069ff;"]);var E=n(8679),T=n(8414);function j(e){let{buttons:t,slug:n}=e;const i=(0,o.wA)(),a=t.length>0,l=(0,r.useCallback)(()=>{i((0,T.vJ)({slug:n,eventType:E.MO}))},[i,n]);return a?(0,s.jsx)(S,{children:t.map((e,t)=>(0,s.jsx)(k.A,{button:e,isNudge:!0,onClick:l},`${e.value}-${t}`))}):null}function I(e){let{title:t,description:n,link:i,slug:a}=e;const l=(0,o.wA)(),c=(0,r.useCallback)(e=>{e.preventDefault(),l((0,T.vJ)({slug:a,eventType:E.MO})),window.location.href=e.target.getAttribute("href")},[a]);return(0,s.jsxs)(S,{children:[t&&(0,s.jsx)(C,{children:t}),n&&(0,s.jsx)(_,{children:n}),(null==i?void 0:i.location)&&(null==i?void 0:i.text)&&(0,s.jsx)(A,{href:i.location,onClick:c,children:i.text})]})}var O=n(3058);const L=i.Ay.div.withConfig({componentId:"sc-cguh8u-0"})(["margin:24px;display:flex;flex-direction:column;"]),P=i.Ay.div.withConfig({componentId:"sc-cguh8u-1"})(["display:grid;grid-template-columns:1fr 44px;align-items:end;grid-gap:16px;"]),M=i.Ay.div.withConfig({componentId:"sc-cguh8u-2"})(["display:flex;flex-direction:column;"]),N=i.Ay.label.withConfig({componentId:"sc-cguh8u-3"})(["font-size:var(--_kindlychat-font-size-m);line-height:19px;margin-left:8px;margin-bottom:8px;"]),z=i.Ay.input.withConfig({componentId:"sc-cguh8u-4"})(["border:none;padding:14px 16px;border-radius:22px;font-size:var(--_kindlychat-font-size-p);background:rgba(0,0,0,0.08);background-color:rgba(0,0,0,0.08);&:focus{color:#2c2c2c;box-shadow:none;border:none;","}"],O.sF),R=i.Ay.button.withConfig({componentId:"sc-cguh8u-5"})(["cursor:pointer;box-shadow:none;height:44px;width:44px;padding:0;display:flex;align-items:center;justify-content:center;border:none;border-radius:100px;background:",";background-color:",";transition:opacity 0.1s ease-in;"," &:hover{opacity:0.8;}svg{margin-top:2px;margin-right:2px;transition:all 0.2s ease;path{fill:",";}}"],e=>e.theme.buttonBackground,e=>e.theme.buttonBackground,O.sF,e=>e.theme.buttonText);function $(e){let{buttonContent:t}=e;return(0,s.jsx)(R,{role:"button",title:t.title,type:"submit",children:(0,s.jsx)(y.qx,{width:24,height:24})})}function D(e){let{value:t,setValue:n,inputContent:r}=e;const{label:o,type:i,placeholder:a,required:l}=r;return(0,s.jsxs)(M,{children:[(0,s.jsx)(N,{children:o}),(0,s.jsx)(z,{"aria-label":a,name:o,placeholder:a,type:i||"text",value:t,onChange:e=>n(e.target.value),required:l})]})}var F=n(628);function B(e){let{form:t,onNewsletterSubmit:n,slug:i}=e;const a=(0,o.wA)(),{dialogue:l,webhook:c}=(0,o.d4)(d.G0),{primaryLanguageCode:p,currentLanguageCode:h}=(0,f.A)(),[g,m]=(0,r.useState)(""),[b,v]=(0,r.useState)(!1),{success:y}=t;return(0,s.jsx)(L,{children:b&&y?(0,s.jsx)(_,{children:y}):(0,s.jsx)("form",{autoComplete:"off",action:"#",onSubmit:e=>{if(e.preventDefault(),m(""),!g.trim())return!1;if(l&&a((0,u.zh)(l,{openChat:!0,languageCode:h||p})),c){const t={event:e,email:g};a((0,F.et)(c,{method:"POST",body:t}))}if("function"==typeof n)try{n(e,g)}catch(e){console.error(e)}return a((0,u.vJ)({slug:i,eventType:E.MO})),v(!0)},children:(0,s.jsxs)(P,{children:[(0,s.jsx)(D,{value:g,setValue:m,inputContent:t.input}),(0,s.jsx)($,{buttonContent:t.button})]})})})}const H=i.Ay.div.withConfig({componentId:"sc-1cs3brm-0"})(["margin:24px;display:inline-flex;flex-wrap:wrap;gap:8px;"]),U=i.Ay.div.withConfig({componentId:"sc-1cs3brm-1"})(["height:1px;width:100%;background:rgba(0,0,0,0.1);"]);var V=n(9223);function W(e){let{choices:t,slug:n}=e;const r=(0,o.wA)(),{primaryLanguageCode:i,currentLanguageCode:a}=(0,f.A)(),{buttons:l}=t;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(U,{}),(0,s.jsx)(H,{children:l.map(e=>{let{text:t,triggerDialogue:o}=e;return(0,s.jsx)(V.A,{text:t,onClick:()=>{return e=o,r((0,u.zh)(e,{openChat:!0,languageCode:a||i})),void r((0,T.vJ)({slug:n,eventType:E.MO,label:e}));var e}},`${t}-${o}`)})})]})}var G=n(896);v().shape({id:v().string.isRequired,title:v().string,description:v().string,image:v().string.isRequired,price:v().string});var q=n(8035),K=n(7542);const Y=i.Ay.a.withConfig({componentId:"sc-20xwq1-0"})(["text-decoration:none;color:initial;cursor:pointer;width:100%;"]),X=i.Ay.div.withConfig({componentId:"sc-20xwq1-1"})(["display:flex;padding:2px;flex-direction:column;align-items:flex-start;overflow:hidden;"," @media ","{margin-right:16px;margin-bottom:3px;box-shadow:0px 1px 3px 0px ",";border-radius:8px;overflow:hidden;max-width:201px;&:first-child{margin-left:24px;}}"],O.sF,q.jO.maxPhone,q.Tj.shadowColor),Z=i.Ay.img.withConfig({componentId:"sc-20xwq1-2"})(["width:155px;height:155px;object-fit:cover;border-radius:8px;margin-bottom:8px;@media ","{width:201px;height:201px;border-radius:0;margin-bottom:0;}"],q.jO.maxPhone),Q=i.Ay.div.withConfig({componentId:"sc-20xwq1-3"})(["max-width:100%;@media ","{padding:8px 16px;}"],q.jO.maxPhone),J=(0,i.AH)(["font-size:var(--_kindlychat-font-size-p);margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;"]),ee=i.Ay.a.withConfig({componentId:"sc-20xwq1-4"})([""," color:#333;display:block;margin-top:8px;text-decoration:underline;"],J),te=i.Ay.button.withConfig({componentId:"sc-20xwq1-5"})([""," padding:6px 0;border:none;cursor:pointer;margin-top:8px;width:100%;display:flex;align-items:center;justify-content:center;border-radius:100px;color:",";background:",";background-color:",";font-family:",";"],J,e=>e.theme.buttonText,e=>e.theme.buttonBackground,e=>e.theme.buttonBackground,K.m.default),ne=i.Ay.h3.withConfig({componentId:"sc-20xwq1-6"})([""," font-weight:500;"],J),re=i.Ay.p.withConfig({componentId:"sc-20xwq1-7"})([""," font-weight:400;"],J),oe=i.Ay.div.withConfig({componentId:"sc-20xwq1-8"})([""," font-weight:500;"],J);function ie(e){let{to:t,text:n,onClick:r}=e;return t?(0,s.jsx)(ee,{onClick:r,href:t,children:n}):(0,s.jsx)(te,{onClick:r,children:n})}const ae=function(e){var t,n,r,o,i,a;let{product:l,onProductClick:c}=e;const u=null!==(t=null==l?void 0:l.image)&&void 0!==t&&t,d=null!==(n=null==l?void 0:l.title)&&void 0!==n&&n,f=null!==(r=null==l?void 0:l.productUrl)&&void 0!==r&&r,p=null!==(o=null==l?void 0:l.description)&&void 0!==o&&o,h=(null==l?void 0:l.price)||!1,g=null!==(i=null==l?void 0:l.linkText)&&void 0!==i&&i,m=null!==(a=null==l?void 0:l.linkUrl)&&void 0!==a&&a;return(0,s.jsxs)(X,{children:[(0,s.jsxs)(Y,{href:f,children:[u&&(0,s.jsx)(Z,{src:u,alt:d}),(0,s.jsxs)(Q,{children:[d&&(0,s.jsx)(ne,{children:d}),p&&(0,s.jsx)(re,{children:p}),h&&(0,s.jsx)(oe,{children:h})]})]}),g&&(0,s.jsx)(ie,{to:m,text:g,onClick:e=>{if("function"==typeof c)try{c(e,l)}catch(e){console.error(e)}}})]})},se=i.Ay.div.withConfig({componentId:"sc-vfg4fr-0"})(["margin:24px;@media ","{margin:24px 0;}"],q.jO.maxPhone),le=i.Ay.div.withConfig({componentId:"sc-vfg4fr-1"})(["position:relative;overflow:hidden;> div{display:grid;grid-template-columns:1fr 1fr;grid-auto-rows:auto;grid-gap:14px;transform:translate(0);",";}"],e=>e.active&&"\n position: relative;\n width: 1000%;\n display: flex;\n grid-gap: 0px;\n "),ce=i.Ay.h2.withConfig({componentId:"sc-vfg4fr-2"})(["font-size:var(--_kindlychat-font-size-m);font-weight:500;line-height:26px;margin:16px 0px;@media ","{margin:16px 24px;}"],q.jO.maxPhone);var ue=n(112);const de=function(e){var t,n;let{section:o,onProductClick:i}=e;const{width:a}=(()=>{const[e,t]=(0,r.useState)({width:void 0,height:void 0});return(0,r.useEffect)(()=>{function e(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",e),e(),()=>window.removeEventListener("resize",e)},[]),e})(),l=parseInt(q.mb.phone.replace("px",""),10),c=null!==(t=null==o?void 0:o.items)&&void 0!==t?t:[],u=null!==(n=null==o?void 0:o.title)&&void 0!==n&&n,{setIndex:d,imageIndex:f,carouselPosition:p}=(e=>{let{windowWidth:t,phoneWidth:n,ignoreDesktop:o=!0}=e;const[i,a]=(0,r.useState)(0),[s,l]=(0,r.useState)(0);return(0,r.useEffect)(()=>{t>=n&&o&&l(0)},[t,n,s,o]),{setIndex:(0,r.useCallback)((e,r)=>{if(t>=n)return;if(e<0||e>=r.length)return;const o=-217*e;a(e),l(o)},[t,n]),imageIndex:i,carouselPosition:s}})({windowWidth:a,phoneWidth:l}),{handleTouchStart:h,handleTouchMove:g,handleTouchEnd:m}=(0,G.A)({carousel:c,index:f,setIndex:d});return(0,s.jsxs)(se,{children:[u&&(0,s.jsx)(ce,{children:u}),(0,s.jsx)(le,{active:a<l,children:(0,s.jsx)(ue.A,{carouselPosition:p,onTouchStart:h,onTouchMove:g,onTouchEnd:m,children:c.map(e=>(0,s.jsx)(ae,{product:e,onProductClick:i},e.id))})})]})},fe=e=>e||{location:"",text:""};function pe(e){var t,n;let{section:r,slug:i,onProductClick:a,onNewsletterSubmit:l}=e;const c=(0,o.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:"",f=null==r?void 0:r.buttons,p=null==r?void 0:r.products,h=null==r?void 0:r.choices,g=null==r?void 0:r.form,m=null==r?void 0:r.link,b=null==r?void 0:r.html;return(0,s.jsxs)(s.Fragment,{children:[(u||d||m)&&(0,s.jsx)(I,{title:u,description:d,link:fe(m),slug:i}),f&&(0,s.jsx)(j,{buttons:f,slug:i}),h&&(0,s.jsx)(W,{choices:h,slug:i}),p&&(0,s.jsx)(de,{section:p,onProductClick:(e,t)=>{if(null!=t&&t.productUrl?c((0,T.vJ)({slug:i,eventType:E.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)}}}),g&&(0,s.jsx)(B,{form:g,onNewsletterSubmit:l,slug:i}),b&&(0,s.jsx)(w,{html:b,slug:i})]})}function he(e){var t;let{layout:n,slug:r,onProductClick:o,onNewsletterSubmit:i}=e;return(null!==(t=null==n?void 0:n.sections)&&void 0!==t?t:[]).map((e,t)=>(0,s.jsx)(pe,{section:e,slug:null!=r?r:null,onProductClick:o,onNewsletterSubmit:i},`section-${t}`))}var ge=n(2475),me=n(4927);const be=i.Ay.div.withConfig({componentId:"sc-1k0o2t4-0"})(["right:20px;bottom:",";z-index:10;position:fixed;border-radius:14px;background:#fff;background-color:#fff;box-shadow:0 3px 15px 1px ",";pointer-events:auto;",";",";@media ","{",";z-index:16;box-shadow:0 -3px 15px 1px ",";}"],e=>{let{bubbleHidden:t}=e;return t?"30px":"100px"},q.Tj.shadowColor,ge.JP,e=>{let{theme:t}=e;return t.customFont&&`font-family: ${t.customFont}`},q.jO.maxPhone,e=>{let{modal:t}=e;return!t&&"\n left: 0px;\n right: 0px;\n bottom: 0px;\n border-radius: 14px 14px 0 0;"},q.Tj.shadowColor),ve=i.Ay.div.withConfig({componentId:"sc-1k0o2t4-1"})(["position:relative;padding:0px;max-width:380px;width:100%;max-height:calc(100vh - 150px);overflow-y:auto;",";@media ","{min-width:380px;}@media ","{min-width:100%;}"],e=>{let{modal:t}=e;return t&&"box-sizing: border-box"},q.jO.minTablet,q.jO.maxPhone),ye=(0,i.Ay)(me.$n).withConfig({componentId:"sc-1k0o2t4-2"})(["top:8px;right:8px;z-index:15;display:flex;padding:0;border-radius:100px;position:absolute;&:hover{opacity:0.8;}svg path{stroke:black;}@media ","{",";}"],q.jO.maxPhone,e=>{let{modal:t}=e;return t?"top: 2px; right: 0;":"top: 8px; right: 8px;"}),xe=i.Ay.div.withConfig({componentId:"sc-1k0o2t4-3"})(["position:absolute;background:#fff;width:100%;height:100%;left:0;right:0;top:0;bottom:0;border-radius:14px;@media ","{border-radius:",";}&:before{content:'';width:50px;height:calc(100% - 8px);background:",";position:absolute;z-index:-1;top:4px;left:-4px;border-radius:25px;@media ","{width:calc(100% - 8px);height:50px;top:-4px;left:4px;}}"],q.jO.maxPhone,e=>{let{modal:t}=e;return t?"14px":"14px 14px 0 0"},e=>{let{theme:t}=e;return t.bubbleButtonBackground||t.buttonBackground},q.jO.maxPhone),we=function(e){let{bubbleHidden:t,show:n,slug:r,layout:o,onDismiss:i,onProductClick:a,onNewsletterSubmit:l}=e;return(0,s.jsxs)(be,{bubbleHidden:t,"aria-hidden":n?"false":"true","data-testid":"nudge-container","data-cy":"nudge-container","data-story":"NudgeContainer",children:[(0,s.jsx)(xe,{}),(0,s.jsx)(ye,{"aria-label":"Dismiss pushMessage",title:"Dismiss pushMessage",onClick:i,type:"button","data-testid":"close-nudge-button","data-cy":"close-nudge-button",children:(0,s.jsx)(y.US,{width:25,height:25})}),(0,s.jsx)(ve,{children:(0,s.jsx)(he,{layout:o,slug:r,onProductClick:a,onNewsletterSubmit:l})})]})};function ke(e){var t;let{hidden:n,layout:r,onDismiss:i,onProductClick:a,onNewsletterSubmit:f}=e;const{show:p,nudgeType:h,slug:g}=(0,o.d4)(d.G0),b=null!==(t=null==r?void 0:r.backdrop)&&void 0!==t&&t,v=(0,o.wA)(),y=e=>{if(e.stopPropagation(),v((0,u.Y_)()),"function"==typeof i)try{i(e)}catch(e){console.error(e)}};return(0,s.jsxs)(s.Fragment,{children:[b&&(0,s.jsx)(l,{backdrop:b,onClick:y}),h===c.MK.TEMPLATE&&(0,s.jsx)(we,{show:p,layout:r,slug:g,onDismiss:y,onProductClick:a,onNewsletterSubmit:f,bubbleHidden:n}),h===c.MK.CUSTOM&&(0,s.jsx)(m,{})]})}},8709:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(9749),o=n.n(r);const i=e=>{var t;if(!e)return!1;e=e.toLowerCase();try{const t=new Intl.Locale(e);if("function"==typeof t.getTextInfo)return"rtl"===t.getTextInfo().direction}catch{}return o()(t=["ar","he","fa","ur","ps","dv","syr","yi"]).call(t,e.split("-")[0])}},8749:(e,t,n)=>{"use strict";n(4531)("hasInstance")},8780:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=e=>0===Object.keys(e).length},8789:(e,t,n)=>{"use strict";n.d(t,{H2:()=>l,H3:()=>c,H5:()=>u,cp:()=>d,fz:()=>a,mt:()=>s});var r=n(3864),o=n(7542),i=n(8035);const a=r.Ay.p.withConfig({componentId:"sc-128z1ys-0"})(["color:",";font-size:var(--_kindlychat-font-size-p);font-weight:normal;line-height:20px;font-family:",";word-break:normal;overflow-wrap:anywhere;"],i.Tj.darkColor,o.m.default),s=(0,r.Ay)(a).withConfig({componentId:"sc-128z1ys-1"})(["font-size:var(--_kindlychat-font-size-xs);opacity:0.6;"]),l=r.Ay.h2.withConfig({componentId:"sc-128z1ys-2"})(["color:",";font-size:var(--_kindlychat-font-size-h2);font-weight:normal;margin:0 0 30px;line-height:30px;font-family:",";"],i.Tj.darkColor,o.m.default),c=r.Ay.h3.withConfig({componentId:"sc-128z1ys-3"})(["color:",";font-size:var(--_kindlychat-font-size-h3);font-weight:normal;line-height:30px;margin:0 0 15px;font-family:",";"],i.Tj.darkColor,o.m.default),u=(r.Ay.h4.withConfig({componentId:"sc-128z1ys-4"})(["color:",";font-size:var(--_kindlychat-font-size-h4);font-weight:normal;margin:0 0 10px;font-family:",";"],i.Tj.darkColor,o.m.default),r.Ay.h5.withConfig({componentId:"sc-128z1ys-5"})(["color:",";font-size:var(--_kindlychat-font-size-m);font-weight:normal;margin:0 0 10px;line-height:24px;font-family:",";"],i.Tj.darkColor,o.m.default)),d=(r.Ay.h6.withConfig({componentId:"sc-128z1ys-6"})(["color:",";font-size:var(--font-size-h6);font-weight:normal;margin:0 0 10px;font-family:",";"],i.Tj.darkColor,o.m.default),r.Ay.span.withConfig({componentId:"sc-128z1ys-7"})(["color:",";font-family:",";opacity:1;a{color:",";text-decoration:none;&:hover,&:focus,&:active,&:visited{color:",";}}"],i.Tj.primaryColor,o.m.KindlySans,i.Tj.primaryColor,i.Tj.primaryColor))},8803:(e,t,n)=>{var r=n(4665);e.exports=function(e,t,n){return e.set(r(e,t),n),n},e.exports.__esModule=!0,e.exports.default=e.exports},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")()},9017:(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}},9098:(e,t,n)=>{"use strict";var r=n(8900),o=n(7013),i=n(9344),a=n(2769),s=n(4543).f,l=n(8696),c=n(8099),u=n(4572),d=n(3999),f=n(701);n(3753);var p=function(e){var t=function(n,r,i){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,i)}return o(e,this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var n,o,h,g,m,b,v,y,x,w=e.target,k=e.global,S=e.stat,C=e.proto,_=k?r:S?r[w]:r[w]&&r[w].prototype,A=k?c:c[w]||d(c,w,{})[w],E=A.prototype;for(g in t)o=!(n=l(k?g:w+(S?".":"#")+g,e.forced))&&_&&f(_,g),b=A[g],o&&(v=e.dontCallGetSet?(x=s(_,g))&&x.value:_[g]),m=o&&v?v:t[g],(n||C||typeof b!=typeof m)&&(y=e.bind&&o?u(m,r):e.wrap&&o?p(m):C&&a(m)?i(m):m,(e.sham||m&&m.sham||b&&b.sham)&&d(y,"sham",!0),d(A,g,y),C&&(f(c,h=w+"Prototype")||d(c,h,{}),d(c[h],g,m),e.real&&E&&(n||!E[g])&&d(E,g,m)))}},9155:t=>{"use strict";t.exports=e},9205:(e,t,n)=>{"use strict";var r=n(9098),o=n(8900),i=n(4713),a=n(6100),s=n(4871),l=n(5024),c=n(4603),u=n(1203),d=n(701),f=n(4317),p=n(7235),h=n(3273),g=n(5341),m=n(1139),b=n(480),v=n(5780),y=n(8364),x=n(5116),w=n(7150),k=n(7313),S=n(4543),C=n(9989),_=n(7389),A=n(7161),E=n(3508),T=n(4358),j=n(8141),I=n(4275),O=n(5241),L=n(1268),P=n(8655),M=n(1355),N=n(4531),z=n(86),R=n(1811),$=n(8417),D=n(9809).forEach,F=I("hidden"),B="Symbol",H="prototype",U=$.set,V=$.getterFor(B),W=Object[H],G=o.Symbol,q=G&&G[H],K=o.RangeError,Y=o.TypeError,X=o.QObject,Z=S.f,Q=C.f,J=w.f,ee=A.f,te=a([].push),ne=j("symbols"),re=j("op-symbols"),oe=j("wks"),ie=!X||!X[H]||!X[H].findChild,ae=function(e,t,n){var r=Z(W,t);r&&delete W[t],Q(e,t,n),r&&e!==W&&Q(W,t,r)},se=l&&u(function(){return 7!==v(Q({},"a",{get:function(){return Q(this,"a",{value:7}).a}})).a})?ae:Q,le=function(e,t){var n=ne[e]=v(q);return U(n,{type:B,tag:e,description:t}),l||(n.description=t),n},ce=function(e,t,n){e===W&&ce(re,t,n),p(e);var r=g(t);return p(n),d(ne,r)?(n.enumerable?(d(e,F)&&e[F][r]&&(e[F][r]=!1),n=v(n,{enumerable:b(0,!1)})):(d(e,F)||Q(e,F,b(1,v(null))),e[F][r]=!0),se(e,r,n)):Q(e,r,n)},ue=function(e,t){p(e);var n=h(t),r=y(n).concat(he(n));return D(r,function(t){l&&!i(de,n,t)||ce(e,t,n[t])}),e},de=function(e){var t=g(e),n=i(ee,this,t);return!(this===W&&d(ne,t)&&!d(re,t))&&(!(n||!d(this,t)||!d(ne,t)||d(this,F)&&this[F][t])||n)},fe=function(e,t){var n=h(e),r=g(t);if(n!==W||!d(ne,r)||d(re,r)){var o=Z(n,r);return!o||!d(ne,r)||d(n,F)&&n[F][r]||(o.enumerable=!0),o}},pe=function(e){var t=J(h(e)),n=[];return D(t,function(e){d(ne,e)||d(O,e)||te(n,e)}),n},he=function(e){var t=e===W,n=J(t?re:h(e)),r=[];return D(n,function(e){!d(ne,e)||t&&!d(W,e)||te(r,ne[e])}),r};c||(E(q=(G=function(){if(f(q,this))throw new Y("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?m(arguments[0]):void 0,t=L(e),n=function(e){var r=void 0===this?o:this;r===W&&i(n,re,e),d(r,F)&&d(r[F],t)&&(r[F][t]=!1);var a=b(1,e);try{se(r,t,a)}catch(e){if(!(e instanceof K))throw e;ae(r,t,a)}};return l&&ie&&se(W,t,{configurable:!0,set:n}),le(t,e)})[H],"toString",function(){return V(this).tag}),E(G,"withoutSetter",function(e){return le(L(e),e)}),A.f=de,C.f=ce,_.f=ue,S.f=fe,x.f=w.f=pe,k.f=he,M.f=function(e){return le(P(e),e)},l&&(T(q,"description",{configurable:!0,get:function(){return V(this).description}}),s||E(W,"propertyIsEnumerable",de,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:G}),D(y(oe),function(e){N(e)}),r({target:B,stat:!0,forced:!c},{useSetter:function(){ie=!0},useSimple:function(){ie=!1}}),r({target:"Object",stat:!0,forced:!c,sham:!l},{create:function(e,t){return void 0===t?v(e):ue(v(e),t)},defineProperty:ce,defineProperties:ue,getOwnPropertyDescriptor:fe}),r({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:pe}),z(),R(G,B),O[F]=!0},9223:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(9155),o=n.n(r),i=n(5381),a=n(3169),s=n(5545),l=n(1085);function c(e,t){const{href:n,target:r,children:o,icon:c,text:u,loading:d=!1,isCheckbox:f=!1,type:p="button",onClick:h=i.A,cy:g,isSecondaryButton:m=!1,flat:b,disabled:v,selected:y,...x}=e,w=e=>{d?e.preventDefault():h(e)};return n?(0,l.jsx)(a.rK,{ref:t,href:n,target:r,$isCheckbox:f,onClick:w,$loading:d,$isSecondaryButton:m,...x,children:d?(0,l.jsx)(s.A,{flat:x.flat,isCheckbox:f,loading:d}):(0,l.jsxs)(a.EE,{children:[(0,l.jsx)(a.T3,{children:o||u}),(0,l.jsx)(a.Tu,{children:c})]})}):(0,l.jsx)(a.Ef,{ref:t,onClick:w,$isCheckbox:f,type:p,$loading:d,"data-testid":g,$isSecondaryButton:m,$flat:b,$disabled:v,$selected:y,...x,children:d?(0,l.jsx)(s.A,{flat:x.flat,isCheckbox:f,loading:d}):(0,l.jsxs)(a.EE,{children:[(0,l.jsx)(a.T3,{children:o||u}),(0,l.jsx)(a.Tu,{children:c})]})})}const u=o().forwardRef(c);u.displayName="Button";const d=u},9239:(e,t,n)=>{"use strict";n(9205),n(2002),n(960),n(1210),n(5785)},9258:(e,t,n)=>{"use strict";var r=n(4713),o=n(2769),i=n(262),a=TypeError;e.exports=function(e,t){var n,s;if("string"===t&&o(n=e.toString)&&!i(s=r(n,e)))return s;if(o(n=e.valueOf)&&!i(s=r(n,e)))return s;if("string"!==t&&o(n=e.toString)&&!i(s=r(n,e)))return s;throw new a("Can't convert object to primitive value")}},9272:(e,t,n)=>{"use strict";n.d(t,{KN:()=>o,ZF:()=>i,cJ:()=>r,k1:()=>a});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"},i={PATTERN:"pattern",REQUIRED:"required",MAX_LENGTH:"max_length",MIN_LENGTH:"min_length",min:"min",max:"max"},a={CUSTOM:"custom",BROWSER:"browser"}},9292:(e,t,n)=>{"use strict";n.d(t,{Ak:()=>r,W$:()=>o,dT:()=>s,fl:()=>a,gH:()=>i});const r="v2",o=Object.freeze(["agent","alerts","bot","chatbubble","nudge"]),i="chat-group",a="message-block",s="typing-indicator"},9313:(e,t,n)=>{"use strict";n.d(t,{B1:()=>C,Kh:()=>k,LA:()=>d,Vq:()=>c,Xs:()=>S,Zf:()=>A,_N:()=>i,_Y:()=>o,al:()=>_});var r=n(99);const o="PUSHER-REDUX/CONNECTED",i="PUSHER-REDUX/DISCONNECTED",a="PUSHER-REDUX/CONNECTING",s="PUSHER-REDUX/UNAVAILABLE",l="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 f(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 p=[];let h=!1;function g(){for(;h&&p.length>0;){const e=p.shift();e&&e()}}function m(e){p.push(e),g()}function b(e){var t;h=!0,null===(t=u.store)||void 0===t||t.dispatch(f({actionType:o,data:e})),g()}function v(){var e;null===(e=u.store)||void 0===e||e.dispatch(f({actionType:i}))}function y(){var e;null===(e=u.store)||void 0===e||e.dispatch(f({actionType:a}))}function x(){var e;null===(e=u.store)||void 0===e||e.dispatch(f({actionType:s}))}function w(){var e;null===(e=u.store)||void 0===e||e.dispatch(f({actionType:l}))}function k(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 S(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 C(e,t,n,r){m(()=>{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(f({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 i=o=>{var i;null===(i=u.store)||void 0===i||i.dispatch(f({actionType:n,channelName:e,eventName:t,data:o,additionalParams:r}))};u.subscriptions[e][t][n]=i,o.bind(t,i)}})}function _(e,t,n){m(()=>{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 i=o[t];if(!i)return void console.error(`Not subscribed event '${t}' from '${e}'`);const a=i[n];a?(r.unbind(t,a),delete i[n]):console.error(`Handler for ${n} not found for event '${t}' from '${e}'`)})}function A(){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(7551),o=n(6100);e.exports=function(e){if("Function"===r(e))return o(e)}},9359:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(5096);function o(e){const{access_request_text:t,acceptance_text:n,revoke_permission_text:o,description_text_html:i,enabled:a,require_agreement:s,button_text:l}=r.Z.complianceSettings[e]||{};return{isEnabled:a,accessRequestText:t,acceptanceText:n,revokePermissionText:o,descriptionTextHtml:i,requireAgreement:s,buttonText:l}}},9416:(e,t,n)=>{"use strict";n.d(t,{A:()=>c}),n(9155);var r=n(824),o=n(3864),i=n(8035),a=n(6052);const s=o.Ay.div.withConfig({componentId:"sc-1lavw6k-0"})(["position:absolute;right:8px;font-size:var(--_kindlychat-font-size-sm);color:",";",""],e=>{let{theme:t}=e;return(0,a.w5)(t.panelBackground,"#FFFFFF",i.qd.textColorLight)},e=>{let{$position:t}=e;return"top"===t?(0,o.AH)(["top:4px;right:16px;"]):"bottom"===t?(0,o.AH)(["top:auto;bottom:4px;right:16px;"]):(0,o.AH)(["right:8px;top:50%;transform:translateY(-50%);"])});var l=n(1085);function c(e){let{fieldName:t,maxLength:n,control:o,position:i="middle"}=e;const a=(0,r.FH)({control:o,name:t});return(0,l.jsx)(s,{$position:i,children:`${(null==a?void 0:a.length)||0}/${n}`})}},9437:(e,t,n)=>{"use strict";n(9098)({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:n(3678)})},9504:()=>{},9514:e=>{"use strict";e.exports=t},9559:(e,t,n)=>{"use strict";var r=n(4904),o=n(8407);e.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},9619:(e,t,n)=>{"use strict";var r=n(8900),o=n(262),i=r.document,a=o(i)&&o(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},9662:(e,t,n)=>{"use strict";n.d(t,{A:()=>c}),n(9155);var r=n(3755),o=n(7318),i=n(587),a=n(9272),s=n(5814),l=n(1085);const c=function(e){let{name:t,label:n,control:c,validators:u,register:d,id:f,value:p,isLast:h,inputType:g,...m}=e,b={};u&&(b=(0,s.G8)(u));const v=(0,i.A)({name:t,control:c,trigger:null==c?void 0:c.trigger,setError:null==c?void 0:c.setError,clearErrors:null==c?void 0:c.clearErrors}),{ref:y,onChange:x,...w}=d&&t?d(t,b):{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(r.hl,{htmlFor:f,children:[(0,l.jsx)(r.eo,{ref:y,name:t,type:g,id:f,value:p,...(0,s.NR)(b),...w&&{...w},onChange:e=>{null==x||x(e),v(e)},...m}),(0,l.jsx)(r.r6,{$inputType:g,$isForm:!!d,children:(0,l.jsx)(r.FC,{$inputType:g,viewBox:"0 0 24 24",children:g===a.cJ.CHECKBOX?(0,l.jsx)("polyline",{points:"20 6 9 17 4 12"}):(0,l.jsx)("circle",{cx:"12",cy:"13",r:"5"})})}),n&&(0,l.jsx)(r.Ko,{$isForm:!!d,children:n})]}),h&&t&&(0,l.jsx)(o.A,{name:t,control:c})]})}},9665:(e,t,n)=>{"use strict";var r=n(5024),o=n(1203),i=n(9619);e.exports=!r&&!o(function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})},9683:e=>{"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},9687:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(2221);function o(){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])===r.sl.IMAGE?r.sl.IMAGE:(null==t?void 0:t[0])===r.sl.VIDEO?r.sl.VIDEO:(null==t?void 0:t[1])===r.sl.PDF?r.sl.PDF:t.slice(-1)[0]}},9749:(e,t,n)=>{e.exports=n(1726)},9809:(e,t,n)=>{"use strict";var r=n(4572),o=n(6100),i=n(1395),a=n(2137),s=n(8130),l=n(4417),c=o([].push),u=function(e){var t=1===e,n=2===e,o=3===e,u=4===e,d=6===e,f=7===e,p=5===e||d;return function(h,g,m,b){for(var v,y,x=a(h),w=i(x),k=s(w),S=r(g,m),C=0,_=b||l,A=t?_(h,k):n||f?_(h,0):void 0;k>C;C++)if((p||C in w)&&(y=S(v=w[C],C,x),e))if(t)A[C]=y;else if(y)switch(e){case 3:return!0;case 5:return v;case 6:return C;case 2:c(A,v)}else switch(e){case 4:return!1;case 7:c(A,v)}return d?-1:o||u?u:A}};e.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)}},9828:(e,t,n)=>{"use strict";var r=n(3273),o=n(8137),i=n(6625),a=n(8417),s=n(9989).f,l=n(164),c=n(877),u=n(4871),d=n(5024),f="Array Iterator",p=a.set,h=a.getterFor(f);e.exports=l(Array,"Array",function(e,t){p(this,{type:f,target:r(e),index:0,kind:t})},function(){var e=h(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,c(void 0,!0);switch(e.kind){case"keys":return c(n,!1);case"values":return c(t[n],!1)}return c([n,t[n]],!1)},"values");var g=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!u&&d&&"values"!==g.name)try{s(g,"name",{value:"values"})}catch(e){}},9850:(e,t,n)=>{"use strict";n(4531)("matchAll")},9886:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(9155);function o(e){const t=(0,r.useRef)(void 0);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 i(){throw new Error("clearTimeout has not been defined")}function a(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:i}catch(e){n=i}}();var s,l=[],c=!1,u=-1;function d(){c&&s&&(c=!1,s.length?l=s.concat(l):u=-1,l.length&&f())}function f(){if(!c){var e=a(d);c=!0;for(var t=l.length;t;){for(s=l,l=[];++u<t;)s&&s[u].run();u=-1,t=l.length}s=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!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 p(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];l.push(new p(e,t)),1!==l.length||c||a(f)},p.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:()=>c});var r=n(9155),o=n.n(r),i=n(9662),a=n(3755),s=n(1085);function l(e){let{name:t,control:n,options:r,validators:o,register:l,inputType:c}=e;return(0,s.jsx)(s.Fragment,{children:r.map((e,u)=>(0,s.jsx)(a.B2,{children:(0,s.jsx)(i.A,{inputType:c,validators:o,register:l,value:e.value,label:e.label,id:e.id,name:t,control:n,isLast:u===r.length-1})},`${e.value}_${u}`))})}const c=o().memo(l)},9918:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const r=new Map,o=(e,t)=>{if(!Array.isArray(e))switch(typeof e){case"string":e=[e];break;case"undefined":e=[];break;default:throw new TypeError(`Expected '${t}' to be a string or an array, but got a type of '${typeof e}'`)}return e.filter(e=>{if("string"!=typeof e){if(void 0===e)return!1;throw new TypeError(`Expected '${t}' to be an array of strings, but found a type of '${typeof e}' in the array`)}return!0})},i=(e,t,n,i)=>{if(e=o(e,"inputs"),0===(t=o(t,"patterns")).length)return[];const a=(t=t.map(e=>((e,t)=>{const n="s"+((t={caseSensitive:!1,...t}).caseSensitive?"":"i"),o=e+"|"+n;if(r.has(o))return r.get(o);const i="!"===e[0];i&&(e=e.slice(1)),e=(e=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e=e.replaceAll(String.raw`\*`,"__ESCAPED_STAR__").replaceAll("\\\\","__ESCAPED_BACKSLASH__").replaceAll(/\\(.)/g,"$1")).replaceAll(String.raw`\*`,".*")).replaceAll("__ESCAPED_STAR__",String.raw`\*`).replaceAll("__ESCAPED_BACKSLASH__","\\\\");const a=new RegExp(`^${e}$`,n);return a.negated=i,r.set(o,a),a})(e,n))).filter(e=>e.negated),s=t.filter(e=>!e.negated),{allPatterns:l}=n||{},c=[];if(l&&i&&a.length>1&&0===s.length){for(const t of e)for(const e of a)if(e.test(t))return[];return e.slice(0,1)}for(const t of e){let e=!1;for(const n of a)if(n.test(t)){e=!0;break}if(!e){if(0===s.length)c.push(t);else if(l){const e=Array.from({length:s.length},()=>!1);for(const[n,r]of s.entries())r.test(t)&&(e[n]=!0);e.every(Boolean)&&c.push(t)}else{let e=!1;for(const n of s)if(n.test(t)){e=!0;break}e&&c.push(t)}if(i&&c.length>0)break}}return c},a=(e,t)=>{if(!t||""===t)return!0;const n=e.endsWith("/")&&e.length>1?e.slice(0,-1):e;let r=n;if(null!=t&&t.startsWith("/"))try{r=new URL(n).pathname}catch{r=n}return i(r,t,undefined,!0).length>0}},9932:(e,t,n)=>{var r=n(1452),o=n(1363);e.exports=function(e,t,n){return(t=o(t))in e?r(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},9977:(e,t,n)=>{"use strict";n.d(t,{VZ:()=>r.Vq,_N:()=>i,_Y:()=>o,kP:()=>r._N,mz:()=>r._Y,ny:()=>a,zT:()=>s});var r=n(9313);const o="CONNECTED",i="DISCONNECTED",a="NEW_TOKEN",s="CONNECT_WITH_TRIGGER"},9989:(e,t,n)=>{"use strict";var r=n(5024),o=n(9665),i=n(1330),a=n(7235),s=n(5341),l=TypeError,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d="enumerable",f="configurable",p="writable";t.f=r?i?function(e,t,n){if(a(e),t=s(t),a(n),"function"==typeof e&&"prototype"===t&&"value"in n&&p in n&&!n[p]){var r=u(e,t);r&&r[p]&&(e[t]=n.value,n={configurable:f in n?n[f]:r[f],enumerable:d in n?n[d]:r[d],writable:!1})}return c(e,t,n)}:c:function(e,t,n){if(a(e),t=s(t),a(n),o)try{return c(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new l("Accessors not supported");return"value"in n&&(e[t]=n.value),e}}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={id:e,loaded:!1,exports:{}};return o[e].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.amdO={},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{if(void 0!==a){var e=a.u,t=a.e,n={},r={};a.u=function(t){return e(t)+(n.hasOwnProperty(t)?"?"+n[t]:"")},a.e=function(o){return t(o).catch(function(t){var i=r.hasOwnProperty(o)?r[o]:5;if(i<1){var s=e(o);throw t.message="Loading chunk "+o+" failed after 5 retries.\n("+s+")",t.request=s,t}return new Promise(function(e){var t=5-i+1;setTimeout(function(){var s="cache-bust=true&retry-attempt="+t;n[o]=s,r[o]=i-1,e(a.e(o))},e=>300*e)})})}}})(),a.nc=void 0;var s={};return(()=>{"use strict";a.r(s),a.d(s,{default:()=>r});var e=a(9155),t=a(1619),n=a(1085);const r=function(r){let{botKey:o,setKindlyChatRef:i,options:a}=r;return(0,n.jsx)(e.Suspense,{fallback:"",children:(0,n.jsx)(t.default,{botKey:o,setKindlyChatRef:i,options:a})})}})(),s})());