@hiver/connector-agent 4.8.1 → 4.8.2

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/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(le,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("react"),require("react-dom"),require("@hiver/hiver-ui-kit")):typeof define=="function"&&define.amd?define(["exports","react","react-dom","@hiver/hiver-ui-kit"],w):(le=typeof globalThis<"u"?globalThis:le||self,w(le["@hiver/connector-agent"]={},le.React,le.ReactDOM,le.hiverUiKit))})(this,function(le,w,Re,d){"use strict";var qS=Object.defineProperty;var e2=le=>{throw TypeError(le)};var $S=(le,w,Re)=>w in le?qS(le,w,{enumerable:!0,configurable:!0,writable:!0,value:Re}):le[w]=Re;var De=(le,w,Re)=>$S(le,typeof w!="symbol"?w+"":w,Re),ml=(le,w,Re)=>w.has(le)||e2("Cannot "+Re);var F=(le,w,Re)=>(ml(le,w,"read from private field"),Re?Re.call(le):w.get(le)),ce=(le,w,Re)=>w.has(le)?e2("Cannot add the same private member more than once"):w instanceof WeakSet?w.add(le):w.set(le,Re),U=(le,w,Re,d)=>(ml(le,w,"write to private field"),d?d.call(le,Re):w.set(le,Re),Re),ye=(le,w,Re)=>(ml(le,w,"access private method"),Re);var ja=(le,w,Re,d)=>({set _(Va){U(le,w,Va,Re)},get _(){return F(le,w,d)}});var hr,Mn,eo,Zp,to,Pn,no,Xp,gr,zp,ro,oo,Mt,mr,st,$o,br,$t,Sn,Yp,dn,Jp,fn,lt,yr,pn,Yn,qp,En,Qt,Qo,$p,We,jn,Bn,so,ao,Vn,io,co,Qp,Ct,xe,Uo,ut,Cr,lo,Gn,hn,Ko,uo,fo,xr,vr,Hn,po,ke,os,bl,yl,Cl,xl,vl,El,Il,t2,Up,Wn,Zn,xt,In,wn,Ba,wl,Kp;function Va(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const T=Va(w);var ge=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ga={exports:{}},bo={};/**
1
+ (function(le,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("react"),require("react-dom"),require("@hiver/hiver-ui-kit")):typeof define=="function"&&define.amd?define(["exports","react","react-dom","@hiver/hiver-ui-kit"],w):(le=typeof globalThis<"u"?globalThis:le||self,w(le["@hiver/connector-agent"]={},le.React,le.ReactDOM,le.hiverUiKit))})(this,function(le,w,Re,d){"use strict";var qS=Object.defineProperty;var e2=le=>{throw TypeError(le)};var $S=(le,w,Re)=>w in le?qS(le,w,{enumerable:!0,configurable:!0,writable:!0,value:Re}):le[w]=Re;var De=(le,w,Re)=>$S(le,typeof w!="symbol"?w+"":w,Re),bl=(le,w,Re)=>w.has(le)||e2("Cannot "+Re);var F=(le,w,Re)=>(bl(le,w,"read from private field"),Re?Re.call(le):w.get(le)),ce=(le,w,Re)=>w.has(le)?e2("Cannot add the same private member more than once"):w instanceof WeakSet?w.add(le):w.set(le,Re),U=(le,w,Re,d)=>(bl(le,w,"write to private field"),d?d.call(le,Re):w.set(le,Re),Re),ye=(le,w,Re)=>(bl(le,w,"access private method"),Re);var ja=(le,w,Re,d)=>({set _(Va){U(le,w,Va,Re)},get _(){return F(le,w,d)}});var hr,Mn,eo,Zp,to,Pn,no,Xp,gr,zp,ro,oo,Mt,mr,st,$o,br,$t,Sn,Yp,dn,Jp,fn,lt,yr,pn,Yn,qp,En,Qt,Qo,$p,We,jn,Bn,so,ao,Vn,io,co,Qp,Ct,xe,Uo,ut,Cr,lo,Gn,hn,Ko,uo,fo,xr,vr,Hn,po,ke,os,yl,Cl,xl,vl,El,Il,wl,t2,Up,Wn,Zn,xt,In,wn,Ba,_l,Kp;function Va(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const T=Va(w);var ge=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ga={exports:{}},bo={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var _l;function n2(){if(_l)return bo;_l=1;var e=w,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function a(i,c,l){var f,m={},b=null,v=null;l!==void 0&&(b=""+l),c.key!==void 0&&(b=""+c.key),c.ref!==void 0&&(v=c.ref);for(f in c)r.call(c,f)&&!s.hasOwnProperty(f)&&(m[f]=c[f]);if(i&&i.defaultProps)for(f in c=i.defaultProps,c)m[f]===void 0&&(m[f]=c[f]);return{$$typeof:t,type:i,key:b,ref:v,props:m,_owner:o.current}}return bo.Fragment=n,bo.jsx=a,bo.jsxs=a,bo}var yo={};/**
9
+ */var Sl;function n2(){if(Sl)return bo;Sl=1;var e=w,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function a(i,c,l){var f,m={},b=null,v=null;l!==void 0&&(b=""+l),c.key!==void 0&&(b=""+c.key),c.ref!==void 0&&(v=c.ref);for(f in c)r.call(c,f)&&!s.hasOwnProperty(f)&&(m[f]=c[f]);if(i&&i.defaultProps)for(f in c=i.defaultProps,c)m[f]===void 0&&(m[f]=c[f]);return{$$typeof:t,type:i,key:b,ref:v,props:m,_owner:o.current}}return bo.Fragment=n,bo.jsx=a,bo.jsxs=a,bo}var yo={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,25 +14,25 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Sl;function r2(){return Sl||(Sl=1,process.env.NODE_ENV!=="production"&&function(){var e=w,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),i=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),y=Symbol.iterator,p="@@iterator";function h(O){if(O===null||typeof O!="object")return null;var Z=y&&O[y]||O[p];return typeof Z=="function"?Z:null}var g=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(O){{for(var Z=arguments.length,Q=new Array(Z>1?Z-1:0),fe=1;fe<Z;fe++)Q[fe-1]=arguments[fe];x("error",O,Q)}}function x(O,Z,Q){{var fe=g.ReactDebugCurrentFrame,ee=fe.getStackAddendum();ee!==""&&(Z+="%s",Q=Q.concat([ee]));var ie=Q.map(function(he){return String(he)});ie.unshift("Warning: "+Z),Function.prototype.apply.call(console[O],console,ie)}}var I=!1,E=!1,_=!1,A=!1,S=!1,L;L=Symbol.for("react.module.reference");function k(O){return!!(typeof O=="string"||typeof O=="function"||O===r||O===s||S||O===o||O===l||O===f||A||O===v||I||E||_||typeof O=="object"&&O!==null&&(O.$$typeof===b||O.$$typeof===m||O.$$typeof===a||O.$$typeof===i||O.$$typeof===c||O.$$typeof===L||O.getModuleId!==void 0))}function D(O,Z,Q){var fe=O.displayName;if(fe)return fe;var ee=Z.displayName||Z.name||"";return ee!==""?Q+"("+ee+")":Q}function N(O){return O.displayName||"Context"}function M(O){if(O==null)return null;if(typeof O.tag=="number"&&C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof O=="function")return O.displayName||O.name||null;if(typeof O=="string")return O;switch(O){case r:return"Fragment";case n:return"Portal";case s:return"Profiler";case o:return"StrictMode";case l:return"Suspense";case f:return"SuspenseList"}if(typeof O=="object")switch(O.$$typeof){case i:var Z=O;return N(Z)+".Consumer";case a:var Q=O;return N(Q._context)+".Provider";case c:return D(O,O.render,"ForwardRef");case m:var fe=O.displayName||null;return fe!==null?fe:M(O.type)||"Memo";case b:{var ee=O,ie=ee._payload,he=ee._init;try{return M(he(ie))}catch{return null}}}return null}var V=Object.assign,J=0,$,H,X,q,se,de,B;function P(){}P.__reactDisabledLog=!0;function W(){{if(J===0){$=console.log,H=console.info,X=console.warn,q=console.error,se=console.group,de=console.groupCollapsed,B=console.groupEnd;var O={configurable:!0,enumerable:!0,value:P,writable:!0};Object.defineProperties(console,{info:O,log:O,warn:O,error:O,group:O,groupCollapsed:O,groupEnd:O})}J++}}function G(){{if(J--,J===0){var O={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:V({},O,{value:$}),info:V({},O,{value:H}),warn:V({},O,{value:X}),error:V({},O,{value:q}),group:V({},O,{value:se}),groupCollapsed:V({},O,{value:de}),groupEnd:V({},O,{value:B})})}J<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Y=g.ReactCurrentDispatcher,oe;function re(O,Z,Q){{if(oe===void 0)try{throw Error()}catch(ee){var fe=ee.stack.trim().match(/\n( *(at )?)/);oe=fe&&fe[1]||""}return`
17
+ */var Al;function r2(){return Al||(Al=1,process.env.NODE_ENV!=="production"&&function(){var e=w,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),i=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),y=Symbol.iterator,p="@@iterator";function h(O){if(O===null||typeof O!="object")return null;var Z=y&&O[y]||O[p];return typeof Z=="function"?Z:null}var g=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(O){{for(var Z=arguments.length,Q=new Array(Z>1?Z-1:0),fe=1;fe<Z;fe++)Q[fe-1]=arguments[fe];x("error",O,Q)}}function x(O,Z,Q){{var fe=g.ReactDebugCurrentFrame,ee=fe.getStackAddendum();ee!==""&&(Z+="%s",Q=Q.concat([ee]));var ie=Q.map(function(he){return String(he)});ie.unshift("Warning: "+Z),Function.prototype.apply.call(console[O],console,ie)}}var I=!1,E=!1,_=!1,A=!1,S=!1,L;L=Symbol.for("react.module.reference");function k(O){return!!(typeof O=="string"||typeof O=="function"||O===r||O===s||S||O===o||O===l||O===f||A||O===v||I||E||_||typeof O=="object"&&O!==null&&(O.$$typeof===b||O.$$typeof===m||O.$$typeof===a||O.$$typeof===i||O.$$typeof===c||O.$$typeof===L||O.getModuleId!==void 0))}function D(O,Z,Q){var fe=O.displayName;if(fe)return fe;var ee=Z.displayName||Z.name||"";return ee!==""?Q+"("+ee+")":Q}function N(O){return O.displayName||"Context"}function M(O){if(O==null)return null;if(typeof O.tag=="number"&&C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof O=="function")return O.displayName||O.name||null;if(typeof O=="string")return O;switch(O){case r:return"Fragment";case n:return"Portal";case s:return"Profiler";case o:return"StrictMode";case l:return"Suspense";case f:return"SuspenseList"}if(typeof O=="object")switch(O.$$typeof){case i:var Z=O;return N(Z)+".Consumer";case a:var Q=O;return N(Q._context)+".Provider";case c:return D(O,O.render,"ForwardRef");case m:var fe=O.displayName||null;return fe!==null?fe:M(O.type)||"Memo";case b:{var ee=O,ie=ee._payload,he=ee._init;try{return M(he(ie))}catch{return null}}}return null}var V=Object.assign,J=0,$,H,X,q,se,de,B;function P(){}P.__reactDisabledLog=!0;function W(){{if(J===0){$=console.log,H=console.info,X=console.warn,q=console.error,se=console.group,de=console.groupCollapsed,B=console.groupEnd;var O={configurable:!0,enumerable:!0,value:P,writable:!0};Object.defineProperties(console,{info:O,log:O,warn:O,error:O,group:O,groupCollapsed:O,groupEnd:O})}J++}}function G(){{if(J--,J===0){var O={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:V({},O,{value:$}),info:V({},O,{value:H}),warn:V({},O,{value:X}),error:V({},O,{value:q}),group:V({},O,{value:se}),groupCollapsed:V({},O,{value:de}),groupEnd:V({},O,{value:B})})}J<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Y=g.ReactCurrentDispatcher,oe;function re(O,Z,Q){{if(oe===void 0)try{throw Error()}catch(ee){var fe=ee.stack.trim().match(/\n( *(at )?)/);oe=fe&&fe[1]||""}return`
18
18
  `+oe+O}}var j=!1,te;{var Ee=typeof WeakMap=="function"?WeakMap:Map;te=new Ee}function z(O,Z){if(!O||j)return"";{var Q=te.get(O);if(Q!==void 0)return Q}var fe;j=!0;var ee=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ie;ie=Y.current,Y.current=null,W();try{if(Z){var he=function(){throw Error()};if(Object.defineProperty(he.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(he,[])}catch(It){fe=It}Reflect.construct(O,[],he)}else{try{he.call()}catch(It){fe=It}O.call(he.prototype)}}else{try{throw Error()}catch(It){fe=It}O()}}catch(It){if(It&&fe&&typeof It.stack=="string"){for(var me=It.stack.split(`
19
19
  `),pt=fe.stack.split(`
20
20
  `),ze=me.length-1,$e=pt.length-1;ze>=1&&$e>=0&&me[ze]!==pt[$e];)$e--;for(;ze>=1&&$e>=0;ze--,$e--)if(me[ze]!==pt[$e]){if(ze!==1||$e!==1)do if(ze--,$e--,$e<0||me[ze]!==pt[$e]){var Bt=`
21
21
  `+me[ze].replace(" at new "," at ");return O.displayName&&Bt.includes("<anonymous>")&&(Bt=Bt.replace("<anonymous>",O.displayName)),typeof O=="function"&&te.set(O,Bt),Bt}while(ze>=1&&$e>=0);break}}}finally{j=!1,Y.current=ie,G(),Error.prepareStackTrace=ee}var mo=O?O.displayName||O.name:"",Lr=mo?re(mo):"";return typeof O=="function"&&te.set(O,Lr),Lr}function Ve(O,Z,Q){return z(O,!1)}function Ne(O){var Z=O.prototype;return!!(Z&&Z.isReactComponent)}function Ue(O,Z,Q){if(O==null)return"";if(typeof O=="function")return z(O,Ne(O));if(typeof O=="string")return re(O);switch(O){case l:return re("Suspense");case f:return re("SuspenseList")}if(typeof O=="object")switch(O.$$typeof){case c:return Ve(O.render);case m:return Ue(O.type,Z,Q);case b:{var fe=O,ee=fe._payload,ie=fe._init;try{return Ue(ie(ee),Z,Q)}catch{}}}return""}var kt=Object.prototype.hasOwnProperty,gn={},vt=g.ReactDebugCurrentFrame;function Ze(O){if(O){var Z=O._owner,Q=Ue(O.type,O._source,Z?Z.type:null);vt.setExtraStackFrame(Q)}else vt.setExtraStackFrame(null)}function Xe(O,Z,Q,fe,ee){{var ie=Function.call.bind(kt);for(var he in O)if(ie(O,he)){var me=void 0;try{if(typeof O[he]!="function"){var pt=Error((fe||"React class")+": "+Q+" type `"+he+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof O[he]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw pt.name="Invariant Violation",pt}me=O[he](Z,he,fe,Q,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ze){me=ze}me&&!(me instanceof Error)&&(Ze(ee),C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",fe||"React class",Q,he,typeof me),Ze(null)),me instanceof Error&&!(me.message in gn)&&(gn[me.message]=!0,Ze(ee),C("Failed %s type: %s",Q,me.message),Ze(null))}}}var Xn=Array.isArray;function at(O){return Xn(O)}function Ut(O){{var Z=typeof Symbol=="function"&&Symbol.toStringTag,Q=Z&&O[Symbol.toStringTag]||O.constructor.name||"Object";return Q}}function zn(O){try{return Kt(O),!1}catch{return!0}}function Kt(O){return""+O}function Er(O){if(zn(O))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ut(O)),Kt(O)}var mn=g.ReactCurrentOwner,Ir={key:!0,ref:!0,__self:!0,__source:!0},wr,ho,_n;_n={};function go(O){if(kt.call(O,"ref")){var Z=Object.getOwnPropertyDescriptor(O,"ref").get;if(Z&&Z.isReactWarning)return!1}return O.ref!==void 0}function _r(O){if(kt.call(O,"key")){var Z=Object.getOwnPropertyDescriptor(O,"key").get;if(Z&&Z.isReactWarning)return!1}return O.key!==void 0}function pe(O,Z){if(typeof O.ref=="string"&&mn.current&&Z&&mn.current.stateNode!==Z){var Q=M(mn.current.type);_n[Q]||(C('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',M(mn.current.type),O.ref),_n[Q]=!0)}}function Ie(O,Z){{var Q=function(){wr||(wr=!0,C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",Z))};Q.isReactWarning=!0,Object.defineProperty(O,"key",{get:Q,configurable:!0})}}function Ke(O,Z){{var Q=function(){ho||(ho=!0,C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",Z))};Q.isReactWarning=!0,Object.defineProperty(O,"ref",{get:Q,configurable:!0})}}var dt=function(O,Z,Q,fe,ee,ie,he){var me={$$typeof:t,type:O,key:Z,ref:Q,props:he,_owner:ie};return me._store={},Object.defineProperty(me._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(me,"_self",{configurable:!1,enumerable:!1,writable:!1,value:fe}),Object.defineProperty(me,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ee}),Object.freeze&&(Object.freeze(me.props),Object.freeze(me)),me};function Et(O,Z,Q,fe,ee){{var ie,he={},me=null,pt=null;Q!==void 0&&(Er(Q),me=""+Q),_r(Z)&&(Er(Z.key),me=""+Z.key),go(Z)&&(pt=Z.ref,pe(Z,ee));for(ie in Z)kt.call(Z,ie)&&!Ir.hasOwnProperty(ie)&&(he[ie]=Z[ie]);if(O&&O.defaultProps){var ze=O.defaultProps;for(ie in ze)he[ie]===void 0&&(he[ie]=ze[ie])}if(me||pt){var $e=typeof O=="function"?O.displayName||O.name||"Unknown":O;me&&Ie(he,$e),pt&&Ke(he,$e)}return dt(O,me,pt,ee,fe,mn.current,he)}}var en=g.ReactCurrentOwner,Pt=g.ReactDebugCurrentFrame;function Dt(O){if(O){var Z=O._owner,Q=Ue(O.type,O._source,Z?Z.type:null);Pt.setExtraStackFrame(Q)}else Pt.setExtraStackFrame(null)}var jt;jt=!1;function Sr(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function Ar(){{if(en.current){var O=M(en.current.type);if(O)return`
22
22
 
23
- Check the render method of \``+O+"`."}return""}}function Tr(O){return""}var ft={};function dl(O){{var Z=Ar();if(!Z){var Q=typeof O=="string"?O:O.displayName||O.name;Q&&(Z=`
23
+ Check the render method of \``+O+"`."}return""}}function Tr(O){return""}var ft={};function fl(O){{var Z=Ar();if(!Z){var Q=typeof O=="string"?O:O.displayName||O.name;Q&&(Z=`
24
24
 
25
- Check the top-level render call using <`+Q+">.")}return Z}}function es(O,Z){{if(!O._store||O._store.validated||O.key!=null)return;O._store.validated=!0;var Q=dl(Z);if(ft[Q])return;ft[Q]=!0;var fe="";O&&O._owner&&O._owner!==en.current&&(fe=" It was passed a child from "+M(O._owner.type)+"."),Dt(O),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Q,fe),Dt(null)}}function Ra(O,Z){{if(typeof O!="object")return;if(at(O))for(var Q=0;Q<O.length;Q++){var fe=O[Q];Sr(fe)&&es(fe,Z)}else if(Sr(O))O._store&&(O._store.validated=!0);else if(O){var ee=h(O);if(typeof ee=="function"&&ee!==O.entries)for(var ie=ee.call(O),he;!(he=ie.next()).done;)Sr(he.value)&&es(he.value,Z)}}}function Ma(O){{var Z=O.type;if(Z==null||typeof Z=="string")return;var Q;if(typeof Z=="function")Q=Z.propTypes;else if(typeof Z=="object"&&(Z.$$typeof===c||Z.$$typeof===m))Q=Z.propTypes;else return;if(Q){var fe=M(Z);Xe(Q,O.props,"prop",fe,O)}else if(Z.PropTypes!==void 0&&!jt){jt=!0;var ee=M(Z);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ee||"Unknown")}typeof Z.getDefaultProps=="function"&&!Z.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function fl(O){{for(var Z=Object.keys(O.props),Q=0;Q<Z.length;Q++){var fe=Z[Q];if(fe!=="children"&&fe!=="key"){Dt(O),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",fe),Dt(null);break}}O.ref!==null&&(Dt(O),C("Invalid attribute `ref` supplied to `React.Fragment`."),Dt(null))}}var ts={};function ns(O,Z,Q,fe,ee,ie){{var he=k(O);if(!he){var me="";(O===void 0||typeof O=="object"&&O!==null&&Object.keys(O).length===0)&&(me+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var pt=Tr();pt?me+=pt:me+=Ar();var ze;O===null?ze="null":at(O)?ze="array":O!==void 0&&O.$$typeof===t?(ze="<"+(M(O.type)||"Unknown")+" />",me=" Did you accidentally export a JSX literal instead of a component?"):ze=typeof O,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ze,me)}var $e=Et(O,Z,Q,ee,ie);if($e==null)return $e;if(he){var Bt=Z.children;if(Bt!==void 0)if(fe)if(at(Bt)){for(var mo=0;mo<Bt.length;mo++)Ra(Bt[mo],O);Object.freeze&&Object.freeze(Bt)}else C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ra(Bt,O)}if(kt.call(Z,"key")){var Lr=M(O),It=Object.keys(Z).filter(function(JS){return JS!=="key"}),gl=It.length>0?"{key: someKey, "+It.join(": ..., ")+": ...}":"{key: someKey}";if(!ts[Lr+gl]){var YS=It.length>0?"{"+It.join(": ..., ")+": ...}":"{}";C(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+Q+">.")}return Z}}function es(O,Z){{if(!O._store||O._store.validated||O.key!=null)return;O._store.validated=!0;var Q=fl(Z);if(ft[Q])return;ft[Q]=!0;var fe="";O&&O._owner&&O._owner!==en.current&&(fe=" It was passed a child from "+M(O._owner.type)+"."),Dt(O),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Q,fe),Dt(null)}}function Ra(O,Z){{if(typeof O!="object")return;if(at(O))for(var Q=0;Q<O.length;Q++){var fe=O[Q];Sr(fe)&&es(fe,Z)}else if(Sr(O))O._store&&(O._store.validated=!0);else if(O){var ee=h(O);if(typeof ee=="function"&&ee!==O.entries)for(var ie=ee.call(O),he;!(he=ie.next()).done;)Sr(he.value)&&es(he.value,Z)}}}function Ma(O){{var Z=O.type;if(Z==null||typeof Z=="string")return;var Q;if(typeof Z=="function")Q=Z.propTypes;else if(typeof Z=="object"&&(Z.$$typeof===c||Z.$$typeof===m))Q=Z.propTypes;else return;if(Q){var fe=M(Z);Xe(Q,O.props,"prop",fe,O)}else if(Z.PropTypes!==void 0&&!jt){jt=!0;var ee=M(Z);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ee||"Unknown")}typeof Z.getDefaultProps=="function"&&!Z.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function pl(O){{for(var Z=Object.keys(O.props),Q=0;Q<Z.length;Q++){var fe=Z[Q];if(fe!=="children"&&fe!=="key"){Dt(O),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",fe),Dt(null);break}}O.ref!==null&&(Dt(O),C("Invalid attribute `ref` supplied to `React.Fragment`."),Dt(null))}}var ts={};function ns(O,Z,Q,fe,ee,ie){{var he=k(O);if(!he){var me="";(O===void 0||typeof O=="object"&&O!==null&&Object.keys(O).length===0)&&(me+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var pt=Tr();pt?me+=pt:me+=Ar();var ze;O===null?ze="null":at(O)?ze="array":O!==void 0&&O.$$typeof===t?(ze="<"+(M(O.type)||"Unknown")+" />",me=" Did you accidentally export a JSX literal instead of a component?"):ze=typeof O,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ze,me)}var $e=Et(O,Z,Q,ee,ie);if($e==null)return $e;if(he){var Bt=Z.children;if(Bt!==void 0)if(fe)if(at(Bt)){for(var mo=0;mo<Bt.length;mo++)Ra(Bt[mo],O);Object.freeze&&Object.freeze(Bt)}else C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ra(Bt,O)}if(kt.call(Z,"key")){var Lr=M(O),It=Object.keys(Z).filter(function(JS){return JS!=="key"}),ml=It.length>0?"{key: someKey, "+It.join(": ..., ")+": ...}":"{key: someKey}";if(!ts[Lr+ml]){var YS=It.length>0?"{"+It.join(": ..., ")+": ...}":"{}";C(`A props object containing a "key" prop is being spread into JSX:
26
26
  let props = %s;
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,gl,Lr,YS,Lr),ts[Lr+gl]=!0}}return O===r?fl($e):Ma($e),$e}}function pl(O,Z,Q){return ns(O,Z,Q,!0)}function Pa(O,Z,Q){return ns(O,Z,Q,!1)}var hl=Pa,rs=pl;yo.Fragment=r,yo.jsx=hl,yo.jsxs=rs}()),yo}process.env.NODE_ENV==="production"?Ga.exports=n2():Ga.exports=r2();var u=Ga.exports;function Al(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Al(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function An(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Al(e))&&(r&&(r+=" "),r+=t);return r}const Co=e=>typeof e=="number"&&!isNaN(e),Jn=e=>typeof e=="string",wt=e=>typeof e=="function",as=e=>Jn(e)||wt(e)?e:null,Ha=e=>w.isValidElement(e)||Jn(e)||wt(e)||Co(e);function o2(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:o}=e;requestAnimationFrame(()=>{o.minHeight="initial",o.height=r+"px",o.transition=`all ${n}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,n)})})}function is(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:o=!0,collapseDuration:s=300}=e;return function(a){let{children:i,position:c,preventExitTransition:l,done:f,nodeRef:m,isIn:b,playToast:v}=a;const y=r?`${t}--${c}`:t,p=r?`${n}--${c}`:n,h=w.useRef(0);return w.useLayoutEffect(()=>{const g=m.current,C=y.split(" "),x=I=>{I.target===m.current&&(v(),g.removeEventListener("animationend",x),g.removeEventListener("animationcancel",x),h.current===0&&I.type!=="animationcancel"&&g.classList.remove(...C))};g.classList.add(...C),g.addEventListener("animationend",x),g.addEventListener("animationcancel",x)},[]),w.useEffect(()=>{const g=m.current,C=()=>{g.removeEventListener("animationend",C),o?o2(g,f,s):f()};b||(l?C():(h.current=1,g.className+=` ${p}`,g.addEventListener("animationend",C)))},[b]),w.createElement(w.Fragment,null,i)}}function Tl(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const it=new Map;let xo=[];const Wa=new Set,s2=e=>Wa.forEach(t=>t(e)),Ll=()=>it.size>0;function Ol(e,t){var n;if(t)return!((n=it.get(t))==null||!n.isToastActive(e));let r=!1;return it.forEach(o=>{o.isToastActive(e)&&(r=!0)}),r}function Fl(e,t){Ha(e)&&(Ll()||xo.push({content:e,options:t}),it.forEach(n=>{n.buildToast(e,t)}))}function kl(e,t){it.forEach(n=>{t!=null&&t!=null&&t.containerId?(t==null?void 0:t.containerId)===n.id&&n.toggle(e,t==null?void 0:t.id):n.toggle(e,t==null?void 0:t.id)})}function a2(e){const{subscribe:t,getSnapshot:n,setProps:r}=w.useRef(function(s){const a=s.containerId||1;return{subscribe(i){const c=function(f,m,b){let v=1,y=0,p=[],h=[],g=[],C=m;const x=new Map,I=new Set,E=()=>{g=Array.from(x.values()),I.forEach(S=>S())},_=S=>{h=S==null?[]:h.filter(L=>L!==S),E()},A=S=>{const{toastId:L,onOpen:k,updateId:D,children:N}=S.props,M=D==null;S.staleId&&x.delete(S.staleId),x.set(L,S),h=[...h,S.props.toastId].filter(V=>V!==S.staleId),E(),b(Tl(S,M?"added":"updated")),M&&wt(k)&&k(w.isValidElement(N)&&N.props)};return{id:f,props:C,observe:S=>(I.add(S),()=>I.delete(S)),toggle:(S,L)=>{x.forEach(k=>{L!=null&&L!==k.props.toastId||wt(k.toggle)&&k.toggle(S)})},removeToast:_,toasts:x,clearQueue:()=>{y-=p.length,p=[]},buildToast:(S,L)=>{if((B=>{let{containerId:P,toastId:W,updateId:G}=B;const Y=P?P!==f:f!==1,oe=x.has(W)&&G==null;return Y||oe})(L))return;const{toastId:k,updateId:D,data:N,staleId:M,delay:V}=L,J=()=>{_(k)},$=D==null;$&&y++;const H={...C,style:C.toastStyle,key:v++,...Object.fromEntries(Object.entries(L).filter(B=>{let[P,W]=B;return W!=null})),toastId:k,updateId:D,data:N,closeToast:J,isIn:!1,className:as(L.className||C.toastClassName),bodyClassName:as(L.bodyClassName||C.bodyClassName),progressClassName:as(L.progressClassName||C.progressClassName),autoClose:!L.isLoading&&(X=L.autoClose,q=C.autoClose,X===!1||Co(X)&&X>0?X:q),deleteToast(){const B=x.get(k),{onClose:P,children:W}=B.props;wt(P)&&P(w.isValidElement(W)&&W.props),b(Tl(B,"removed")),x.delete(k),y--,y<0&&(y=0),p.length>0?A(p.shift()):E()}};var X,q;H.closeButton=C.closeButton,L.closeButton===!1||Ha(L.closeButton)?H.closeButton=L.closeButton:L.closeButton===!0&&(H.closeButton=!Ha(C.closeButton)||C.closeButton);let se=S;w.isValidElement(S)&&!Jn(S.type)?se=w.cloneElement(S,{closeToast:J,toastProps:H,data:N}):wt(S)&&(se=S({closeToast:J,toastProps:H,data:N}));const de={content:se,props:H,staleId:M};C.limit&&C.limit>0&&y>C.limit&&$?p.push(de):Co(V)?setTimeout(()=>{A(de)},V):A(de)},setProps(S){C=S},setToggle:(S,L)=>{x.get(S).toggle=L},isToastActive:S=>h.some(L=>L===S),getSnapshot:()=>C.newestOnTop?g.reverse():g}}(a,s,s2);it.set(a,c);const l=c.observe(i);return xo.forEach(f=>Fl(f.content,f.options)),xo=[],()=>{l(),it.delete(a)}},setProps(i){var c;(c=it.get(a))==null||c.setProps(i)},getSnapshot(){var i;return(i=it.get(a))==null?void 0:i.getSnapshot()}}}(e)).current;r(e);const o=w.useSyncExternalStore(t,n,n);return{getToastToRender:function(s){if(!o)return[];const a=new Map;return o.forEach(i=>{const{position:c}=i.props;a.has(c)||a.set(c,[]),a.get(c).push(i)}),Array.from(a,i=>s(i[0],i[1]))},isToastActive:Ol,count:o==null?void 0:o.length}}function i2(e){const[t,n]=w.useState(!1),[r,o]=w.useState(!1),s=w.useRef(null),a=w.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:i,pauseOnHover:c,closeToast:l,onClick:f,closeOnClick:m}=e;var b,v;function y(){n(!0)}function p(){n(!1)}function h(x){const I=s.current;a.canDrag&&I&&(a.didMove=!0,t&&p(),a.delta=e.draggableDirection==="x"?x.clientX-a.start:x.clientY-a.start,a.start!==x.clientX&&(a.canCloseOnClick=!1),I.style.transform=`translate3d(${e.draggableDirection==="x"?`${a.delta}px, var(--y)`:`0, calc(${a.delta}px + var(--y))`},0)`,I.style.opacity=""+(1-Math.abs(a.delta/a.removalDistance)))}function g(){document.removeEventListener("pointermove",h),document.removeEventListener("pointerup",g);const x=s.current;if(a.canDrag&&a.didMove&&x){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return o(!0),e.closeToast(),void e.collapseAll();x.style.transition="transform 0.2s, opacity 0.2s",x.style.removeProperty("transform"),x.style.removeProperty("opacity")}}(v=it.get((b={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||v.setToggle(b.id,b.fn),w.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||p(),window.addEventListener("focus",y),window.addEventListener("blur",p),()=>{window.removeEventListener("focus",y),window.removeEventListener("blur",p)}},[e.pauseOnFocusLoss]);const C={onPointerDown:function(x){if(e.draggable===!0||e.draggable===x.pointerType){a.didMove=!1,document.addEventListener("pointermove",h),document.addEventListener("pointerup",g);const I=s.current;a.canCloseOnClick=!0,a.canDrag=!0,I.style.transition="none",e.draggableDirection==="x"?(a.start=x.clientX,a.removalDistance=I.offsetWidth*(e.draggablePercent/100)):(a.start=x.clientY,a.removalDistance=I.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(x){const{top:I,bottom:E,left:_,right:A}=s.current.getBoundingClientRect();x.nativeEvent.type!=="touchend"&&e.pauseOnHover&&x.clientX>=_&&x.clientX<=A&&x.clientY>=I&&x.clientY<=E?p():y()}};return i&&c&&(C.onMouseEnter=p,e.stacked||(C.onMouseLeave=y)),m&&(C.onClick=x=>{f&&f(x),a.canCloseOnClick&&l()}),{playToast:y,pauseToast:p,isRunning:t,preventExitTransition:r,toastRef:s,eventHandlers:C}}function c2(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:s,className:a,style:i,controlledProgress:c,progress:l,rtl:f,isIn:m,theme:b}=e;const v=s||c&&l===0,y={...i,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};c&&(y.transform=`scaleX(${l})`);const p=An("Toastify__progress-bar",c?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${b}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":f}),h=wt(a)?a({rtl:f,type:o,defaultClassName:p}):An(p,a),g={[c&&l>=1?"onTransitionEnd":"onAnimationEnd"]:c&&l<1?null:()=>{m&&r()}};return w.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":v},w.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${b} Toastify__progress-bar--${o}`}),w.createElement("div",{role:"progressbar","aria-hidden":v?"true":"false","aria-label":"notification timer",className:h,style:y,...g}))}let l2=1;const Dl=()=>""+l2++;function u2(e){return e&&(Jn(e.toastId)||Co(e.toastId))?e.toastId:Dl()}function vo(e,t){return Fl(e,t),t.toastId}function cs(e,t){return{...t,type:t&&t.type||e,toastId:u2(t)}}function ls(e){return(t,n)=>vo(t,cs(e,n))}function Le(e,t){return vo(e,cs("default",t))}Le.loading=(e,t)=>vo(e,cs("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),Le.promise=function(e,t,n){let r,{pending:o,error:s,success:a}=t;o&&(r=Jn(o)?Le.loading(o,n):Le.loading(o.render,{...n,...o}));const i={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},c=(f,m,b)=>{if(m==null)return void Le.dismiss(r);const v={type:f,...i,...n,data:b},y=Jn(m)?{render:m}:m;return r?Le.update(r,{...v,...y}):Le(y.render,{...v,...y}),b},l=wt(e)?e():e;return l.then(f=>c("success",a,f)).catch(f=>c("error",s,f)),l},Le.success=ls("success"),Le.info=ls("info"),Le.error=ls("error"),Le.warning=ls("warning"),Le.warn=Le.warning,Le.dark=(e,t)=>vo(e,cs("default",{theme:"dark",...t})),Le.dismiss=function(e){(function(t){var n;if(Ll()){if(t==null||Jn(n=t)||Co(n))it.forEach(r=>{r.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const r=it.get(t.containerId);r?r.removeToast(t.id):it.forEach(o=>{o.removeToast(t.id)})}}else xo=xo.filter(r=>t!=null&&r.options.toastId!==t)})(e)},Le.clearWaitingQueue=function(e){e===void 0&&(e={}),it.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},Le.isActive=Ol,Le.update=function(e,t){t===void 0&&(t={});const n=((r,o)=>{var s;let{containerId:a}=o;return(s=it.get(a||1))==null?void 0:s.toasts.get(r)})(e,t);if(n){const{props:r,content:o}=n,s={delay:100,...r,...t,toastId:t.toastId||e,updateId:Dl()};s.toastId!==e&&(s.staleId=e);const a=s.render||o;delete s.render,vo(a,s)}},Le.done=e=>{Le.update(e,{progress:1})},Le.onChange=function(e){return Wa.add(e),()=>{Wa.delete(e)}},Le.play=e=>kl(!0,e),Le.pause=e=>kl(!1,e);const d2=typeof window<"u"?w.useLayoutEffect:w.useEffect,us=e=>{let{theme:t,type:n,isLoading:r,...o}=e;return w.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...o})},Za={info:function(e){return w.createElement(us,{...e},w.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return w.createElement(us,{...e},w.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return w.createElement(us,{...e},w.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return w.createElement(us,{...e},w.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return w.createElement("div",{className:"Toastify__spinner"})}},f2=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o,playToast:s}=i2(e),{closeButton:a,children:i,autoClose:c,onClick:l,type:f,hideProgressBar:m,closeToast:b,transition:v,position:y,className:p,style:h,bodyClassName:g,bodyStyle:C,progressClassName:x,progressStyle:I,updateId:E,role:_,progress:A,rtl:S,toastId:L,deleteToast:k,isIn:D,isLoading:N,closeOnClick:M,theme:V}=e,J=An("Toastify__toast",`Toastify__toast-theme--${V}`,`Toastify__toast--${f}`,{"Toastify__toast--rtl":S},{"Toastify__toast--close-on-click":M}),$=wt(p)?p({rtl:S,position:y,type:f,defaultClassName:J}):An(J,p),H=function(de){let{theme:B,type:P,isLoading:W,icon:G}=de,Y=null;const oe={theme:B,type:P};return G===!1||(wt(G)?Y=G({...oe,isLoading:W}):w.isValidElement(G)?Y=w.cloneElement(G,oe):W?Y=Za.spinner():(re=>re in Za)(P)&&(Y=Za[P](oe))),Y}(e),X=!!A||!c,q={closeToast:b,type:f,theme:V};let se=null;return a===!1||(se=wt(a)?a(q):w.isValidElement(a)?w.cloneElement(a,q):function(de){let{closeToast:B,theme:P,ariaLabel:W="close"}=de;return w.createElement("button",{className:`Toastify__close-button Toastify__close-button--${P}`,type:"button",onClick:G=>{G.stopPropagation(),B(G)},"aria-label":W},w.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},w.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(q)),w.createElement(v,{isIn:D,done:k,position:y,preventExitTransition:n,nodeRef:r,playToast:s},w.createElement("div",{id:L,onClick:l,"data-in":D,className:$,...o,style:h,ref:r},w.createElement("div",{...D&&{role:_},className:wt(g)?g({type:f}):An("Toastify__toast-body",g),style:C},H!=null&&w.createElement("div",{className:An("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!N})},H),w.createElement("div",null,i)),se,w.createElement(c2,{...E&&!X?{key:`pb-${E}`}:{},rtl:S,theme:V,delay:c,isRunning:t,isIn:D,closeToast:b,hide:m,type:f,style:I,className:x,controlledProgress:X,progress:A||0})))},ds=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},p2=is(ds("bounce",!0));is(ds("slide",!0)),is(ds("zoom")),is(ds("flip"));const h2={position:"top-right",transition:p2,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function Xa(e){let t={...h2,...e};const n=e.stacked,[r,o]=w.useState(!0),s=w.useRef(null),{getToastToRender:a,isToastActive:i,count:c}=a2(t),{className:l,style:f,rtl:m,containerId:b}=t;function v(p){const h=An("Toastify__toast-container",`Toastify__toast-container--${p}`,{"Toastify__toast-container--rtl":m});return wt(l)?l({position:p,rtl:m,defaultClassName:h}):An(h,as(l))}function y(){n&&(o(!0),Le.play())}return d2(()=>{if(n){var p;const h=s.current.querySelectorAll('[data-in="true"]'),g=12,C=(p=t.position)==null?void 0:p.includes("top");let x=0,I=0;Array.from(h).reverse().forEach((E,_)=>{const A=E;A.classList.add("Toastify__toast--stacked"),_>0&&(A.dataset.collapsed=`${r}`),A.dataset.pos||(A.dataset.pos=C?"top":"bot");const S=x*(r?.2:1)+(r?0:g*_);A.style.setProperty("--y",`${C?S:-1*S}px`),A.style.setProperty("--g",`${g}`),A.style.setProperty("--s",""+(1-(r?I:0))),x+=A.offsetHeight,I+=.025})}},[r,c,n]),w.createElement("div",{ref:s,className:"Toastify",id:b,onMouseEnter:()=>{n&&(o(!1),Le.pause())},onMouseLeave:y},a((p,h)=>{const g=h.length?{...f}:{...f,pointerEvents:"none"};return w.createElement("div",{className:v(p),style:g,key:`container-${p}`},h.map(C=>{let{content:x,props:I}=C;return w.createElement(f2,{...I,stacked:n,collapseAll:y,isIn:i(I.toastId,I.containerId),style:I.style,key:`toast-${I.key}`},x)}))}))}var Or=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},qn=typeof window>"u"||"Deno"in globalThis;function Nt(){}function g2(e,t){return typeof e=="function"?e(t):e}function za(e){return typeof e=="number"&&e>=0&&e!==1/0}function Nl(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Fr(e,t){return typeof e=="function"?e(t):e}function Vt(e,t){return typeof e=="function"?e(t):e}function Rl(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:a,stale:i}=e;if(a){if(r){if(t.queryHash!==Ya(a,t.options))return!1}else if(!Eo(t.queryKey,a))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof i=="boolean"&&t.isStale()!==i||o&&o!==t.state.fetchStatus||s&&!s(t))}function Ml(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if($n(t.options.mutationKey)!==$n(s))return!1}else if(!Eo(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Ya(e,t){return((t==null?void 0:t.queryKeyHashFn)||$n)(e)}function $n(e){return JSON.stringify(e,(t,n)=>qa(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Eo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Eo(e[n],t[n])):!1}function Ja(e,t){if(e===t)return e;const n=Pl(e)&&Pl(t);if(n||qa(e)&&qa(t)){const r=n?e:Object.keys(e),o=r.length,s=n?t:Object.keys(t),a=s.length,i=n?[]:{};let c=0;for(let l=0;l<a;l++){const f=n?l:s[l];(!n&&r.includes(f)||n)&&e[f]===void 0&&t[f]===void 0?(i[f]=void 0,c++):(i[f]=Ja(e[f],t[f]),i[f]===e[f]&&e[f]!==void 0&&c++)}return o===a&&c===o?e:i}return t}function fs(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Pl(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function qa(e){if(!jl(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!jl(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function jl(e){return Object.prototype.toString.call(e)==="[object Object]"}function m2(e){return new Promise(t=>{setTimeout(t,e)})}function $a(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return Ja(e,t)}catch(r){console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`)}return Ja(e,t)}return t}function b2(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function y2(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ps=Symbol();function Bl(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===ps&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===ps?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var C2=(Zp=class extends Or{constructor(){super();ce(this,hr);ce(this,Mn);ce(this,eo);U(this,eo,t=>{if(!qn&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){F(this,Mn)||this.setEventListener(F(this,eo))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,Mn))==null||t.call(this),U(this,Mn,void 0))}setEventListener(t){var n;U(this,eo,t),(n=F(this,Mn))==null||n.call(this),U(this,Mn,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){F(this,hr)!==t&&(U(this,hr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof F(this,hr)=="boolean"?F(this,hr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},hr=new WeakMap,Mn=new WeakMap,eo=new WeakMap,Zp),Qa=new C2,x2=(Xp=class extends Or{constructor(){super();ce(this,to,!0);ce(this,Pn);ce(this,no);U(this,no,t=>{if(!qn&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){F(this,Pn)||this.setEventListener(F(this,no))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,Pn))==null||t.call(this),U(this,Pn,void 0))}setEventListener(t){var n;U(this,no,t),(n=F(this,Pn))==null||n.call(this),U(this,Pn,t(this.setOnline.bind(this)))}setOnline(t){F(this,to)!==t&&(U(this,to,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return F(this,to)}},to=new WeakMap,Pn=new WeakMap,no=new WeakMap,Xp),hs=new x2;function Ua(){let e,t;const n=new Promise((o,s)=>{e=o,t=s});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function v2(e){return Math.min(1e3*2**e,3e4)}function Vl(e){return(e??"online")==="online"?hs.isOnline():!0}var Gl=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ka(e){return e instanceof Gl}function Hl(e){let t=!1,n=0,r=!1,o;const s=Ua(),a=p=>{var h;r||(b(new Gl(p)),(h=e.abort)==null||h.call(e))},i=()=>{t=!0},c=()=>{t=!1},l=()=>Qa.isFocused()&&(e.networkMode==="always"||hs.isOnline())&&e.canRun(),f=()=>Vl(e.networkMode)&&e.canRun(),m=p=>{var h;r||(r=!0,(h=e.onSuccess)==null||h.call(e,p),o==null||o(),s.resolve(p))},b=p=>{var h;r||(r=!0,(h=e.onError)==null||h.call(e,p),o==null||o(),s.reject(p))},v=()=>new Promise(p=>{var h;o=g=>{(r||l())&&p(g)},(h=e.onPause)==null||h.call(e)}).then(()=>{var p;o=void 0,r||(p=e.onContinue)==null||p.call(e)}),y=()=>{if(r)return;let p;const h=n===0?e.initialPromise:void 0;try{p=h??e.fn()}catch(g){p=Promise.reject(g)}Promise.resolve(p).then(m).catch(g=>{var _;if(r)return;const C=e.retry??(qn?0:3),x=e.retryDelay??v2,I=typeof x=="function"?x(n,g):x,E=C===!0||typeof C=="number"&&n<C||typeof C=="function"&&C(n,g);if(t||!E){b(g);return}n++,(_=e.onFail)==null||_.call(e,n,g),m2(I).then(()=>l()?void 0:v()).then(()=>{t?b(g):y()})})};return{promise:s,cancel:a,continue:()=>(o==null||o(),s),cancelRetry:i,continueRetry:c,canStart:f,start:()=>(f()?y():v().then(y),s)}}function E2(){let e=[],t=0,n=i=>{i()},r=i=>{i()},o=i=>setTimeout(i,0);const s=i=>{t?e.push(i):o(()=>{n(i)})},a=()=>{const i=e;e=[],i.length&&o(()=>{r(()=>{i.forEach(c=>{n(c)})})})};return{batch:i=>{let c;t++;try{c=i()}finally{t--,t||a()}return c},batchCalls:i=>(...c)=>{s(()=>{i(...c)})},schedule:s,setNotifyFunction:i=>{n=i},setBatchNotifyFunction:i=>{r=i},setScheduler:i=>{o=i}}}var Qe=E2(),Wl=(zp=class{constructor(){ce(this,gr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),za(this.gcTime)&&U(this,gr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(qn?1/0:5*60*1e3))}clearGcTimeout(){F(this,gr)&&(clearTimeout(F(this,gr)),U(this,gr,void 0))}},gr=new WeakMap,zp),I2=(Yp=class extends Wl{constructor(t){super();ce(this,$t);ce(this,ro);ce(this,oo);ce(this,Mt);ce(this,mr);ce(this,st);ce(this,$o);ce(this,br);U(this,br,!1),U(this,$o,t.defaultOptions),this.setOptions(t.options),this.observers=[],U(this,mr,t.client),U(this,Mt,F(this,mr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,U(this,ro,w2(this.options)),this.state=t.state??F(this,ro),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=F(this,st))==null?void 0:t.promise}setOptions(t){this.options={...F(this,$o),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&F(this,Mt).remove(this)}setData(t,n){const r=$a(this.state.data,t,this.options);return ye(this,$t,Sn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ye(this,$t,Sn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=F(this,st))==null?void 0:r.promise;return(o=F(this,st))==null||o.cancel(t),n?n.then(Nt).catch(Nt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(F(this,ro))}isActive(){return this.observers.some(t=>Vt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ps||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!Nl(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=F(this,st))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=F(this,st))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),F(this,Mt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(F(this,st)&&(F(this,br)?F(this,st).cancel({revert:!0}):F(this,st).cancelRetry()),this.scheduleGc()),F(this,Mt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ye(this,$t,Sn).call(this,{type:"invalidate"})}fetch(t,n){var c,l,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(F(this,st))return F(this,st).continueRetry(),F(this,st).promise}if(t&&this.setOptions(t),!this.options.queryFn){const m=this.observers.find(b=>b.options.queryFn);m&&this.setOptions(m.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const r=new AbortController,o=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(U(this,br,!0),r.signal)})},s=()=>{const m=Bl(this.options,n),b={client:F(this,mr),queryKey:this.queryKey,meta:this.meta};return o(b),U(this,br,!1),this.options.persister?this.options.persister(m,b,this):m(b)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:F(this,mr),state:this.state,fetchFn:s};o(a),(c=this.options.behavior)==null||c.onFetch(a,this),U(this,oo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((l=a.fetchOptions)==null?void 0:l.meta))&&ye(this,$t,Sn).call(this,{type:"fetch",meta:(f=a.fetchOptions)==null?void 0:f.meta});const i=m=>{var b,v,y,p;Ka(m)&&m.silent||ye(this,$t,Sn).call(this,{type:"error",error:m}),Ka(m)||((v=(b=F(this,Mt).config).onError)==null||v.call(b,m,this),(p=(y=F(this,Mt).config).onSettled)==null||p.call(y,this.state.data,m,this)),this.scheduleGc()};return U(this,st,Hl({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:m=>{var b,v,y,p;if(m===void 0){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),i(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(m)}catch(h){i(h);return}(v=(b=F(this,Mt).config).onSuccess)==null||v.call(b,m,this),(p=(y=F(this,Mt).config).onSettled)==null||p.call(y,m,this.state.error,this),this.scheduleGc()},onError:i,onFail:(m,b)=>{ye(this,$t,Sn).call(this,{type:"failed",failureCount:m,error:b})},onPause:()=>{ye(this,$t,Sn).call(this,{type:"pause"})},onContinue:()=>{ye(this,$t,Sn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),F(this,st).start()}},ro=new WeakMap,oo=new WeakMap,Mt=new WeakMap,mr=new WeakMap,st=new WeakMap,$o=new WeakMap,br=new WeakMap,$t=new WeakSet,Sn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Zl(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return Ka(o)&&o.revert&&F(this,oo)?{...F(this,oo),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Qe.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),F(this,Mt).notify({query:this,type:"updated",action:t})})},Yp);function Zl(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Vl(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function w2(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var _2=(Jp=class extends Or{constructor(t={}){super();ce(this,dn);this.config=t,U(this,dn,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??Ya(o,n);let a=this.get(s);return a||(a=new I2({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){F(this,dn).has(t.queryHash)||(F(this,dn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=F(this,dn).get(t.queryHash);n&&(t.destroy(),n===t&&F(this,dn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Qe.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return F(this,dn).get(t)}getAll(){return[...F(this,dn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Rl(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Rl(t,r)):n}notify(t){Qe.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Qe.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Qe.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},dn=new WeakMap,Jp),S2=(qp=class extends Wl{constructor(t){super();ce(this,pn);ce(this,fn);ce(this,lt);ce(this,yr);this.mutationId=t.mutationId,U(this,lt,t.mutationCache),U(this,fn,[]),this.state=t.state||Xl(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){F(this,fn).includes(t)||(F(this,fn).push(t),this.clearGcTimeout(),F(this,lt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){U(this,fn,F(this,fn).filter(n=>n!==t)),this.scheduleGc(),F(this,lt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){F(this,fn).length||(this.state.status==="pending"?this.scheduleGc():F(this,lt).remove(this))}continue(){var t;return((t=F(this,yr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,s,a,i,c,l,f,m,b,v,y,p,h,g,C,x,I,E,_,A;U(this,yr,Hl({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(S,L)=>{ye(this,pn,Yn).call(this,{type:"failed",failureCount:S,error:L})},onPause:()=>{ye(this,pn,Yn).call(this,{type:"pause"})},onContinue:()=>{ye(this,pn,Yn).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>F(this,lt).canRun(this)}));const n=this.state.status==="pending",r=!F(this,yr).canStart();try{if(!n){ye(this,pn,Yn).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(o=F(this,lt).config).onMutate)==null?void 0:s.call(o,t,this));const L=await((i=(a=this.options).onMutate)==null?void 0:i.call(a,t));L!==this.state.context&&ye(this,pn,Yn).call(this,{type:"pending",context:L,variables:t,isPaused:r})}const S=await F(this,yr).start();return await((l=(c=F(this,lt).config).onSuccess)==null?void 0:l.call(c,S,t,this.state.context,this)),await((m=(f=this.options).onSuccess)==null?void 0:m.call(f,S,t,this.state.context)),await((v=(b=F(this,lt).config).onSettled)==null?void 0:v.call(b,S,null,this.state.variables,this.state.context,this)),await((p=(y=this.options).onSettled)==null?void 0:p.call(y,S,null,t,this.state.context)),ye(this,pn,Yn).call(this,{type:"success",data:S}),S}catch(S){try{throw await((g=(h=F(this,lt).config).onError)==null?void 0:g.call(h,S,t,this.state.context,this)),await((x=(C=this.options).onError)==null?void 0:x.call(C,S,t,this.state.context)),await((E=(I=F(this,lt).config).onSettled)==null?void 0:E.call(I,void 0,S,this.state.variables,this.state.context,this)),await((A=(_=this.options).onSettled)==null?void 0:A.call(_,void 0,S,t,this.state.context)),S}finally{ye(this,pn,Yn).call(this,{type:"error",error:S})}}finally{F(this,lt).runNext(this)}}},fn=new WeakMap,lt=new WeakMap,yr=new WeakMap,pn=new WeakSet,Yn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Qe.batch(()=>{F(this,fn).forEach(r=>{r.onMutationUpdate(t)}),F(this,lt).notify({mutation:this,type:"updated",action:t})})},qp);function Xl(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var A2=($p=class extends Or{constructor(t={}){super();ce(this,En);ce(this,Qt);ce(this,Qo);this.config=t,U(this,En,new Set),U(this,Qt,new Map),U(this,Qo,0)}build(t,n,r){const o=new S2({mutationCache:this,mutationId:++ja(this,Qo)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){F(this,En).add(t);const n=gs(t);if(typeof n=="string"){const r=F(this,Qt).get(n);r?r.push(t):F(this,Qt).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(F(this,En).delete(t)){const n=gs(t);if(typeof n=="string"){const r=F(this,Qt).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&F(this,Qt).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=gs(t);if(typeof n=="string"){const r=F(this,Qt).get(n),o=r==null?void 0:r.find(s=>s.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=gs(t);if(typeof n=="string"){const o=(r=F(this,Qt).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Qe.batch(()=>{F(this,En).forEach(t=>{this.notify({type:"removed",mutation:t})}),F(this,En).clear(),F(this,Qt).clear()})}getAll(){return Array.from(F(this,En))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Ml(n,r))}findAll(t={}){return this.getAll().filter(n=>Ml(t,n))}notify(t){Qe.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Qe.batch(()=>Promise.all(t.map(n=>n.continue().catch(Nt))))}},En=new WeakMap,Qt=new WeakMap,Qo=new WeakMap,$p);function gs(e){var t;return(t=e.options.scope)==null?void 0:t.id}function zl(e){return{onFetch:(t,n)=>{var f,m,b,v,y;const r=t.options,o=(b=(m=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:m.fetchMore)==null?void 0:b.direction,s=((v=t.state.data)==null?void 0:v.pages)||[],a=((y=t.state.data)==null?void 0:y.pageParams)||[];let i={pages:[],pageParams:[]},c=0;const l=async()=>{let p=!1;const h=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?p=!0:t.signal.addEventListener("abort",()=>{p=!0}),t.signal)})},g=Bl(t.options,t.fetchOptions),C=async(x,I,E)=>{if(p)return Promise.reject();if(I==null&&x.pages.length)return Promise.resolve(x);const _={client:t.client,queryKey:t.queryKey,pageParam:I,direction:E?"backward":"forward",meta:t.options.meta};h(_);const A=await g(_),{maxPages:S}=t.options,L=E?y2:b2;return{pages:L(x.pages,A,S),pageParams:L(x.pageParams,I,S)}};if(o&&s.length){const x=o==="backward",I=x?T2:Yl,E={pages:s,pageParams:a},_=I(r,E);i=await C(E,_,x)}else{const x=e??s.length;do{const I=c===0?a[0]??r.initialPageParam:Yl(r,i);if(c>0&&I==null)break;i=await C(i,I),c++}while(c<x)}return i};t.options.persister?t.fetchFn=()=>{var p,h;return(h=(p=t.options).persister)==null?void 0:h.call(p,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=l}}}function Yl(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function T2(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var L2=(Qp=class{constructor(e={}){ce(this,We);ce(this,jn);ce(this,Bn);ce(this,so);ce(this,ao);ce(this,Vn);ce(this,io);ce(this,co);U(this,We,e.queryCache||new _2),U(this,jn,e.mutationCache||new A2),U(this,Bn,e.defaultOptions||{}),U(this,so,new Map),U(this,ao,new Map),U(this,Vn,0)}mount(){ja(this,Vn)._++,F(this,Vn)===1&&(U(this,io,Qa.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,We).onFocus())})),U(this,co,hs.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,We).onOnline())})))}unmount(){var e,t;ja(this,Vn)._--,F(this,Vn)===0&&((e=F(this,io))==null||e.call(this),U(this,io,void 0),(t=F(this,co))==null||t.call(this),U(this,co,void 0))}isFetching(e){return F(this,We).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return F(this,jn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=F(this,We).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=F(this,We).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Fr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return F(this,We).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=F(this,We).get(r.queryHash),s=o==null?void 0:o.state.data,a=g2(t,s);if(a!==void 0)return F(this,We).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Qe.batch(()=>F(this,We).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=F(this,We).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=F(this,We);Qe.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=F(this,We);return Qe.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Qe.batch(()=>F(this,We).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Nt).catch(Nt)}invalidateQueries(e,t={}){return Qe.batch(()=>(F(this,We).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Qe.batch(()=>F(this,We).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(Nt)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Nt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=F(this,We).build(this,t);return n.isStaleByTime(Fr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Nt).catch(Nt)}fetchInfiniteQuery(e){return e.behavior=zl(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Nt).catch(Nt)}ensureInfiniteQueryData(e){return e.behavior=zl(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return hs.isOnline()?F(this,jn).resumePausedMutations():Promise.resolve()}getQueryCache(){return F(this,We)}getMutationCache(){return F(this,jn)}getDefaultOptions(){return F(this,Bn)}setDefaultOptions(e){U(this,Bn,e)}setQueryDefaults(e,t){F(this,so).set($n(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...F(this,so).values()],n={};return t.forEach(r=>{Eo(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){F(this,ao).set($n(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...F(this,ao).values()],n={};return t.forEach(r=>{Eo(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...F(this,Bn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ya(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ps&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...F(this,Bn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){F(this,We).clear(),F(this,jn).clear()}},We=new WeakMap,jn=new WeakMap,Bn=new WeakMap,so=new WeakMap,ao=new WeakMap,Vn=new WeakMap,io=new WeakMap,co=new WeakMap,Qp),O2=(Up=class extends Or{constructor(t,n){super();ce(this,ke);ce(this,Ct);ce(this,xe);ce(this,Uo);ce(this,ut);ce(this,Cr);ce(this,lo);ce(this,Gn);ce(this,hn);ce(this,Ko);ce(this,uo);ce(this,fo);ce(this,xr);ce(this,vr);ce(this,Hn);ce(this,po,new Set);this.options=n,U(this,Ct,t),U(this,hn,null),U(this,Gn,Ua()),this.options.experimental_prefetchInRender||F(this,Gn).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(F(this,xe).addObserver(this),Jl(F(this,xe),this.options)?ye(this,ke,os).call(this):this.updateResult(),ye(this,ke,xl).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ei(F(this,xe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ei(F(this,xe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ye(this,ke,vl).call(this),ye(this,ke,El).call(this),F(this,xe).removeObserver(this)}setOptions(t,n){const r=this.options,o=F(this,xe);if(this.options=F(this,Ct).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Vt(this.options.enabled,F(this,xe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ye(this,ke,Il).call(this),F(this,xe).setOptions(this.options),r._defaulted&&!fs(this.options,r)&&F(this,Ct).getQueryCache().notify({type:"observerOptionsUpdated",query:F(this,xe),observer:this});const s=this.hasListeners();s&&ql(F(this,xe),o,this.options,r)&&ye(this,ke,os).call(this),this.updateResult(n),s&&(F(this,xe)!==o||Vt(this.options.enabled,F(this,xe))!==Vt(r.enabled,F(this,xe))||Fr(this.options.staleTime,F(this,xe))!==Fr(r.staleTime,F(this,xe)))&&ye(this,ke,bl).call(this);const a=ye(this,ke,yl).call(this);s&&(F(this,xe)!==o||Vt(this.options.enabled,F(this,xe))!==Vt(r.enabled,F(this,xe))||a!==F(this,Hn))&&ye(this,ke,Cl).call(this,a)}getOptimisticResult(t){const n=F(this,Ct).getQueryCache().build(F(this,Ct),t),r=this.createResult(n,t);return k2(this,r)&&(U(this,ut,r),U(this,lo,this.options),U(this,Cr,F(this,xe).state)),r}getCurrentResult(){return F(this,ut)}trackResult(t,n){const r={};return Object.keys(t).forEach(o=>{Object.defineProperty(r,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),n==null||n(o),t[o])})}),r}trackProp(t){F(this,po).add(t)}getCurrentQuery(){return F(this,xe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=F(this,Ct).defaultQueryOptions(t),r=F(this,Ct).getQueryCache().build(F(this,Ct),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ye(this,ke,os).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),F(this,ut)))}createResult(t,n){var S;const r=F(this,xe),o=this.options,s=F(this,ut),a=F(this,Cr),i=F(this,lo),l=t!==r?t.state:F(this,Uo),{state:f}=t;let m={...f},b=!1,v;if(n._optimisticResults){const L=this.hasListeners(),k=!L&&Jl(t,n),D=L&&ql(t,r,n,o);(k||D)&&(m={...m,...Zl(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:y,errorUpdatedAt:p,status:h}=m;if(n.select&&m.data!==void 0)if(s&&m.data===(a==null?void 0:a.data)&&n.select===F(this,Ko))v=F(this,uo);else try{U(this,Ko,n.select),v=n.select(m.data),v=$a(s==null?void 0:s.data,v,n),U(this,uo,v),U(this,hn,null)}catch(L){U(this,hn,L)}else v=m.data;if(n.placeholderData!==void 0&&v===void 0&&h==="pending"){let L;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(i==null?void 0:i.placeholderData))L=s.data;else if(L=typeof n.placeholderData=="function"?n.placeholderData((S=F(this,fo))==null?void 0:S.state.data,F(this,fo)):n.placeholderData,n.select&&L!==void 0)try{L=n.select(L),U(this,hn,null)}catch(k){U(this,hn,k)}L!==void 0&&(h="success",v=$a(s==null?void 0:s.data,L,n),b=!0)}F(this,hn)&&(y=F(this,hn),v=F(this,uo),p=Date.now(),h="error");const g=m.fetchStatus==="fetching",C=h==="pending",x=h==="error",I=C&&g,E=v!==void 0,A={status:h,fetchStatus:m.fetchStatus,isPending:C,isSuccess:h==="success",isError:x,isInitialLoading:I,isLoading:I,data:v,dataUpdatedAt:m.dataUpdatedAt,error:y,errorUpdatedAt:p,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>l.dataUpdateCount||m.errorUpdateCount>l.errorUpdateCount,isFetching:g,isRefetching:g&&!C,isLoadingError:x&&!E,isPaused:m.fetchStatus==="paused",isPlaceholderData:b,isRefetchError:x&&E,isStale:ti(t,n),refetch:this.refetch,promise:F(this,Gn)};if(this.options.experimental_prefetchInRender){const L=N=>{A.status==="error"?N.reject(A.error):A.data!==void 0&&N.resolve(A.data)},k=()=>{const N=U(this,Gn,A.promise=Ua());L(N)},D=F(this,Gn);switch(D.status){case"pending":t.queryHash===r.queryHash&&L(D);break;case"fulfilled":(A.status==="error"||A.data!==D.value)&&k();break;case"rejected":(A.status!=="error"||A.error!==D.reason)&&k();break}}return A}updateResult(t){const n=F(this,ut),r=this.createResult(F(this,xe),this.options);if(U(this,Cr,F(this,xe).state),U(this,lo,this.options),F(this,Cr).data!==void 0&&U(this,fo,F(this,xe)),fs(r,n))return;U(this,ut,r);const o={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:a}=this.options,i=typeof a=="function"?a():a;if(i==="all"||!i&&!F(this,po).size)return!0;const c=new Set(i??F(this,po));return this.options.throwOnError&&c.add("error"),Object.keys(F(this,ut)).some(l=>{const f=l;return F(this,ut)[f]!==n[f]&&c.has(f)})};(t==null?void 0:t.listeners)!==!1&&s()&&(o.listeners=!0),ye(this,ke,t2).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ye(this,ke,xl).call(this)}},Ct=new WeakMap,xe=new WeakMap,Uo=new WeakMap,ut=new WeakMap,Cr=new WeakMap,lo=new WeakMap,Gn=new WeakMap,hn=new WeakMap,Ko=new WeakMap,uo=new WeakMap,fo=new WeakMap,xr=new WeakMap,vr=new WeakMap,Hn=new WeakMap,po=new WeakMap,ke=new WeakSet,os=function(t){ye(this,ke,Il).call(this);let n=F(this,xe).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Nt)),n},bl=function(){ye(this,ke,vl).call(this);const t=Fr(this.options.staleTime,F(this,xe));if(qn||F(this,ut).isStale||!za(t))return;const r=Nl(F(this,ut).dataUpdatedAt,t)+1;U(this,xr,setTimeout(()=>{F(this,ut).isStale||this.updateResult()},r))},yl=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(F(this,xe)):this.options.refetchInterval)??!1},Cl=function(t){ye(this,ke,El).call(this),U(this,Hn,t),!(qn||Vt(this.options.enabled,F(this,xe))===!1||!za(F(this,Hn))||F(this,Hn)===0)&&U(this,vr,setInterval(()=>{(this.options.refetchIntervalInBackground||Qa.isFocused())&&ye(this,ke,os).call(this)},F(this,Hn)))},xl=function(){ye(this,ke,bl).call(this),ye(this,ke,Cl).call(this,ye(this,ke,yl).call(this))},vl=function(){F(this,xr)&&(clearTimeout(F(this,xr)),U(this,xr,void 0))},El=function(){F(this,vr)&&(clearInterval(F(this,vr)),U(this,vr,void 0))},Il=function(){const t=F(this,Ct).getQueryCache().build(F(this,Ct),this.options);if(t===F(this,xe))return;const n=F(this,xe);U(this,xe,t),U(this,Uo,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},t2=function(t){Qe.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(F(this,ut))}),F(this,Ct).getQueryCache().notify({query:F(this,xe),type:"observerResultsUpdated"})})},Up);function F2(e,t){return Vt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Jl(e,t){return F2(e,t)||e.state.data!==void 0&&ei(e,t,t.refetchOnMount)}function ei(e,t,n){if(Vt(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&ti(e,t)}return!1}function ql(e,t,n,r){return(e!==t||Vt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&ti(e,n)}function ti(e,t){return Vt(t.enabled,e)!==!1&&e.isStaleByTime(Fr(t.staleTime,e))}function k2(e,t){return!fs(e.getCurrentResult(),t)}var D2=(Kp=class extends Or{constructor(n,r){super();ce(this,wn);ce(this,Wn);ce(this,Zn);ce(this,xt);ce(this,In);U(this,Wn,n),this.setOptions(r),this.bindMethods(),ye(this,wn,Ba).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=F(this,Wn).defaultMutationOptions(n),fs(this.options,r)||F(this,Wn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:F(this,xt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&$n(r.mutationKey)!==$n(this.options.mutationKey)?this.reset():((o=F(this,xt))==null?void 0:o.state.status)==="pending"&&F(this,xt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=F(this,xt))==null||n.removeObserver(this)}onMutationUpdate(n){ye(this,wn,Ba).call(this),ye(this,wn,wl).call(this,n)}getCurrentResult(){return F(this,Zn)}reset(){var n;(n=F(this,xt))==null||n.removeObserver(this),U(this,xt,void 0),ye(this,wn,Ba).call(this),ye(this,wn,wl).call(this)}mutate(n,r){var o;return U(this,In,r),(o=F(this,xt))==null||o.removeObserver(this),U(this,xt,F(this,Wn).getMutationCache().build(F(this,Wn),this.options)),F(this,xt).addObserver(this),F(this,xt).execute(n)}},Wn=new WeakMap,Zn=new WeakMap,xt=new WeakMap,In=new WeakMap,wn=new WeakSet,Ba=function(){var r;const n=((r=F(this,xt))==null?void 0:r.state)??Xl();U(this,Zn,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},wl=function(n){Qe.batch(()=>{var r,o,s,a,i,c,l,f;if(F(this,In)&&this.hasListeners()){const m=F(this,Zn).variables,b=F(this,Zn).context;(n==null?void 0:n.type)==="success"?((o=(r=F(this,In)).onSuccess)==null||o.call(r,n.data,m,b),(a=(s=F(this,In)).onSettled)==null||a.call(s,n.data,null,m,b)):(n==null?void 0:n.type)==="error"&&((c=(i=F(this,In)).onError)==null||c.call(i,n.error,m,b),(f=(l=F(this,In)).onSettled)==null||f.call(l,void 0,n.error,m,b))}this.listeners.forEach(m=>{m(F(this,Zn))})})},Kp),$l=T.createContext(void 0),Io=e=>{const t=T.useContext($l);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},N2=({client:e,children:t})=>(T.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx($l.Provider,{value:e,children:t})),Ql=T.createContext(!1),R2=()=>T.useContext(Ql);Ql.Provider;function M2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var P2=T.createContext(M2()),j2=()=>T.useContext(P2);function Ul(e,t){return typeof e=="function"?e(...t):!!e}function ni(){}var B2=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},V2=e=>{T.useEffect(()=>{e.clearReset()},[e])},G2=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Ul(n,[e.error,r])),H2=e=>{const t=e.staleTime;e.suspense&&(e.staleTime=typeof t=="function"?(...n)=>Math.max(t(...n),1e3):Math.max(t??1e3,1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},W2=(e,t)=>e.isLoading&&e.isFetching&&!t,Z2=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Kl=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function X2(e,t,n){var m,b,v,y,p;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=Io(),o=R2(),s=j2(),a=r.defaultQueryOptions(e);(b=(m=r.getDefaultOptions().queries)==null?void 0:m._experimental_beforeQuery)==null||b.call(m,a),process.env.NODE_ENV!=="production"&&(a.queryFn||console.error(`[${a.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),a._optimisticResults=o?"isRestoring":"optimistic",H2(a),B2(a,s),V2(s);const i=!r.getQueryCache().get(a.queryHash),[c]=T.useState(()=>new t(r,a)),l=c.getOptimisticResult(a),f=!o&&e.subscribed!==!1;if(T.useSyncExternalStore(T.useCallback(h=>{const g=f?c.subscribe(Qe.batchCalls(h)):ni;return c.updateResult(),g},[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),T.useEffect(()=>{c.setOptions(a,{listeners:!1})},[a,c]),Z2(a,l))throw Kl(a,c,s);if(G2({result:l,errorResetBoundary:s,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw l.error;if((y=(v=r.getDefaultOptions().queries)==null?void 0:v._experimental_afterQuery)==null||y.call(v,a,l),a.experimental_prefetchInRender&&!qn&&W2(l,o)){const h=i?Kl(a,c,s):(p=r.getQueryCache().get(a.queryHash))==null?void 0:p.promise;h==null||h.catch(ni).finally(()=>{c.updateResult()})}return a.notifyOnChangeProps?l:c.trackResult(l)}function Tn(e,t){return X2(e,O2)}function tn(e,t){const n=Io(),[r]=T.useState(()=>new D2(n,e));T.useEffect(()=>{r.setOptions(e)},[r,e]);const o=T.useSyncExternalStore(T.useCallback(a=>r.subscribe(Qe.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=T.useCallback((a,i)=>{r.mutate(a,i).catch(ni)},[r]);if(o.error&&Ul(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}const ri=(e,t)=>t.some(n=>e instanceof n);let eu,tu;function z2(){return eu||(eu=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Y2(){return tu||(tu=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const oi=new WeakMap,si=new WeakMap,ms=new WeakMap;function J2(e){const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("success",s),e.removeEventListener("error",a)},s=()=>{n(Qn(e.result)),o()},a=()=>{r(e.error),o()};e.addEventListener("success",s),e.addEventListener("error",a)});return ms.set(t,e),t}function q2(e){if(oi.has(e))return;const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("complete",s),e.removeEventListener("error",a),e.removeEventListener("abort",a)},s=()=>{n(),o()},a=()=>{r(e.error||new DOMException("AbortError","AbortError")),o()};e.addEventListener("complete",s),e.addEventListener("error",a),e.addEventListener("abort",a)});oi.set(e,t)}let ai={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return oi.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Qn(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function nu(e){ai=e(ai)}function $2(e){return Y2().includes(e)?function(...t){return e.apply(ii(this),t),Qn(this.request)}:function(...t){return Qn(e.apply(ii(this),t))}}function Q2(e){return typeof e=="function"?$2(e):(e instanceof IDBTransaction&&q2(e),ri(e,z2())?new Proxy(e,ai):e)}function Qn(e){if(e instanceof IDBRequest)return J2(e);if(si.has(e))return si.get(e);const t=Q2(e);return t!==e&&(si.set(e,t),ms.set(t,e)),t}const ii=e=>ms.get(e);function U2(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const a=indexedDB.open(e,t),i=Qn(a);return r&&a.addEventListener("upgradeneeded",c=>{r(Qn(a.result),c.oldVersion,c.newVersion,Qn(a.transaction),c)}),n&&a.addEventListener("blocked",c=>n(c.oldVersion,c.newVersion,c)),i.then(c=>{s&&c.addEventListener("close",()=>s()),o&&c.addEventListener("versionchange",l=>o(l.oldVersion,l.newVersion,l))}).catch(()=>{}),i}const K2=["get","getKey","getAll","getAllKeys","count"],eh=["put","add","delete","clear"],ci=new Map;function ru(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(ci.get(t))return ci.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=eh.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(o||K2.includes(n)))return;const s=async function(a,...i){const c=this.transaction(a,o?"readwrite":"readonly");let l=c.store;return r&&(l=l.index(i.shift())),(await Promise.all([l[n](...i),o&&c.done]))[0]};return ci.set(t,s),s}nu(e=>({...e,get:(t,n,r)=>ru(t,n)||e.get(t,n,r),has:(t,n)=>!!ru(t,n)||e.has(t,n)}));const th=["continue","continuePrimaryKey","advance"],ou={},li=new WeakMap,su=new WeakMap,nh={get(e,t){if(!th.includes(t))return e[t];let n=ou[t];return n||(n=ou[t]=function(...r){li.set(this,su.get(this)[t](...r))}),n}};async function*rh(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const n=new Proxy(t,nh);for(su.set(n,t),ms.set(n,ii(t));t;)yield n,t=await(li.get(n)||t.continue()),li.delete(n)}function au(e,t){return t===Symbol.asyncIterator&&ri(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&ri(e,[IDBIndex,IDBObjectStore])}nu(e=>({...e,get(t,n,r){return au(t,n)?rh:e.get(t,n,r)},has(t,n){return au(t,n)||e.has(t,n)}}));const oh="connector-db",sh=1,bs={FEEDBACK:"feedback"},wo=`${bs.FEEDBACK}:data`,ys=`${bs.FEEDBACK}:last_submitted`,_o=`${bs.FEEDBACK}:capture_on_demand`,So=`${bs.FEEDBACK}:show_notification`,ah=12*60*60*1e3,ui=(e,t=new Date)=>e?Math.abs(t.getTime()-e.getTime())>=ah:!0,iu=(e,t=!1)=>e.captureFeedback&&(ui(e.firstViewed)&&(!e.lastSubmittedFeedback||ui(e.lastSubmittedFeedback))||!!t);let Un=null;const Ln=async()=>{try{Un||(Un=await U2(oh,sh,{upgrade(e){e.objectStoreNames.contains(wo)||e.createObjectStore(wo),e.objectStoreNames.contains(ys)||e.createObjectStore(ys),e.objectStoreNames.contains(_o)||e.createObjectStore(_o),e.objectStoreNames.contains(So)||e.createObjectStore(So)},blocked(){console.warn("Upgrade blocked! Close other tabs using this DB.")},blocking(){console.warn("Another tab is trying to upgrade. Closing connection to allow upgrade."),Un&&(Un.close(),Un=null)},terminated(){console.error("DB connection unexpectedly closed. Resetting connection."),Un=null}}))}catch(e){console.error("Error opening IndexedDB connection:",e)}return Un},di=async e=>{if(!e)return[];const t=await Ln();if(!t)return[];try{return await t.get(wo,e)||[]}catch(n){return console.error("Error fetching user feedback data:",n),[]}},ih=async e=>{if(!e)return null;const t=await Ln();if(!t)return null;try{return await t.get(ys,e)||null}catch(n){return console.error("Error fetching last submitted feedback:",n),null}},Cs=async e=>{if(!e)return;const t=await Ln();if(t)try{return await t.get(_o,e)}catch(n){console.error("Error fetching capture on demand status:",n);return}},ch=async e=>{if(!e)return!1;const t=await Ln();if(!t)return!1;try{return await t.get(So,e)??!1}catch(n){return console.error("Error fetching show notification status:",n),!1}},lh=async(e,t)=>{if(!e||!t||!t.length)return;const n=await Ln();if(n)try{const r=await di(e),o=new Set(r.map(a=>a.connectorId)),s=t.filter(a=>!o.has(a.connector_id)).map(a=>({connectorId:a.connector_id,captureFeedback:!0,firstViewed:new Date}));if(s.length>0){const a=[...r,...s];await n.put(wo,a,e),await n.put(So,!0,e)}}catch(r){console.error("Error updating connectors feedback data:",r)}},uh=async e=>{if(!e)return;const t=await Ln();if(t)try{const n=await di(e),r=await Cs(e),o=new Date,s=n.map(a=>{const i=iu(a,r);return{...a,lastSubmittedFeedback:i?o:a.lastSubmittedFeedback,captureFeedback:a.captureFeedback!==i}});await t.put(wo,s,e),await t.put(ys,o,e),r&&await t.put(_o,!1,e)}catch(n){console.error("Error updating feedback submission date:",n)}},cu=async(e,t)=>{if(!e)return;const n=await Ln();if(n)try{await n.put(_o,t,e)}catch(r){console.error("Error updating capture on demand:",r)}},dh=async e=>{if(!e)return;const t=await Ln();if(t)try{await t.put(So,!1,e)}catch(n){console.error("Error resetting show notification status:",n)}},fh=async e=>{const t=await di(e),n=await Cs(e);return t.filter(o=>iu(o,n))},fi=async e=>{const t=await ih(e);return t&&!ui(t)?!1:await Cs(e)&&!t?!0:!!(await fh(e)).length},ph=async(e,t)=>{await lh(e,t)},xs=async e=>{e&&await uh(e)},hh=async(e,t)=>{const n=await Cs(e);t?n!==!1&&await cu(e,t):await cu(e,void 0)},lu=async e=>await ch(e)&&await fi(e),uu=async e=>{await dh(e)};var pi={},Kn={};function du(e,t){return function(){return e.apply(t,arguments)}}const{toString:gh}=Object.prototype,{getPrototypeOf:hi}=Object,vs=(e=>t=>{const n=gh.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Gt=e=>(e=e.toLowerCase(),t=>vs(t)===e),Es=e=>t=>typeof t===e,{isArray:kr}=Array,Ao=Es("undefined");function mh(e){return e!==null&&!Ao(e)&&e.constructor!==null&&!Ao(e.constructor)&&_t(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const fu=Gt("ArrayBuffer");function bh(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&fu(e.buffer),t}const yh=Es("string"),_t=Es("function"),pu=Es("number"),Is=e=>e!==null&&typeof e=="object",Ch=e=>e===!0||e===!1,ws=e=>{if(vs(e)!=="object")return!1;const t=hi(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},xh=Gt("Date"),vh=Gt("File"),Eh=Gt("Blob"),Ih=Gt("FileList"),wh=e=>Is(e)&&_t(e.pipe),_h=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||_t(e.append)&&((t=vs(e))==="formdata"||t==="object"&&_t(e.toString)&&e.toString()==="[object FormData]"))},Sh=Gt("URLSearchParams"),[Ah,Th,Lh,Oh]=["ReadableStream","Request","Response","Headers"].map(Gt),Fh=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function To(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),kr(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let i;for(r=0;r<a;r++)i=s[r],t.call(null,e[i],i,e)}}function hu(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const er=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:ge,gu=e=>!Ao(e)&&e!==er;function gi(){const{caseless:e}=gu(this)&&this||{},t={},n=(r,o)=>{const s=e&&hu(t,o)||o;ws(t[s])&&ws(r)?t[s]=gi(t[s],r):ws(r)?t[s]=gi({},r):kr(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&To(arguments[r],n);return t}const kh=(e,t,n,{allOwnKeys:r}={})=>(To(t,(o,s)=>{n&&_t(o)?e[s]=du(o,n):e[s]=o},{allOwnKeys:r}),e),Dh=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Nh=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Rh=(e,t,n,r)=>{let o,s,a;const i={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)a=o[s],(!r||r(a,e,t))&&!i[a]&&(t[a]=e[a],i[a]=!0);e=n!==!1&&hi(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Mh=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Ph=e=>{if(!e)return null;if(kr(e))return e;let t=e.length;if(!pu(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},jh=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&hi(Uint8Array)),Bh=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},Vh=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Gh=Gt("HTMLFormElement"),Hh=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),mu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Wh=Gt("RegExp"),bu=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};To(n,(o,s)=>{let a;(a=t(o,s,e))!==!1&&(r[s]=a||o)}),Object.defineProperties(e,r)},Zh=e=>{bu(e,(t,n)=>{if(_t(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(_t(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Xh=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return kr(e)?r(e):r(String(e).split(t)),n},zh=()=>{},Yh=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,mi="abcdefghijklmnopqrstuvwxyz",yu="0123456789",Cu={DIGIT:yu,ALPHA:mi,ALPHA_DIGIT:mi+mi.toUpperCase()+yu},Jh=(e=16,t=Cu.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function qh(e){return!!(e&&_t(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const $h=e=>{const t=new Array(10),n=(r,o)=>{if(Is(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=kr(r)?[]:{};return To(r,(a,i)=>{const c=n(a,o+1);!Ao(c)&&(s[i]=c)}),t[o]=void 0,s}}return r};return n(e,0)},Qh=Gt("AsyncFunction"),Uh=e=>e&&(Is(e)||_t(e))&&_t(e.then)&&_t(e.catch),xu=((e,t)=>e?setImmediate:t?((n,r)=>(er.addEventListener("message",({source:o,data:s})=>{o===er&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),er.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",_t(er.postMessage)),Kh=typeof queueMicrotask<"u"?queueMicrotask.bind(er):typeof process<"u"&&process.nextTick||xu;var R={isArray:kr,isArrayBuffer:fu,isBuffer:mh,isFormData:_h,isArrayBufferView:bh,isString:yh,isNumber:pu,isBoolean:Ch,isObject:Is,isPlainObject:ws,isReadableStream:Ah,isRequest:Th,isResponse:Lh,isHeaders:Oh,isUndefined:Ao,isDate:xh,isFile:vh,isBlob:Eh,isRegExp:Wh,isFunction:_t,isStream:wh,isURLSearchParams:Sh,isTypedArray:jh,isFileList:Ih,forEach:To,merge:gi,extend:kh,trim:Fh,stripBOM:Dh,inherits:Nh,toFlatObject:Rh,kindOf:vs,kindOfTest:Gt,endsWith:Mh,toArray:Ph,forEachEntry:Bh,matchAll:Vh,isHTMLForm:Gh,hasOwnProperty:mu,hasOwnProp:mu,reduceDescriptors:bu,freezeMethods:Zh,toObjectSet:Xh,toCamelCase:Hh,noop:zh,toFiniteNumber:Yh,findKey:hu,global:er,isContextDefined:gu,ALPHABET:Cu,generateString:Jh,isSpecCompliantForm:qh,toJSONObject:$h,isAsyncFn:Qh,isThenable:Uh,setImmediate:xu,asap:Kh};function be(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}R.inherits(be,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:R.toJSONObject(this.config),code:this.code,status:this.status}}});const vu=be.prototype,Eu={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Eu[e]={value:e}}),Object.defineProperties(be,Eu),Object.defineProperty(vu,"isAxiosError",{value:!0}),be.from=(e,t,n,r,o,s)=>{const a=Object.create(vu);return R.toFlatObject(e,a,function(c){return c!==Error.prototype},i=>i!=="isAxiosError"),be.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,s&&Object.assign(a,s),a};var eg=null;function bi(e){return R.isPlainObject(e)||R.isArray(e)}function Iu(e){return R.endsWith(e,"[]")?e.slice(0,-2):e}function wu(e,t,n){return e?e.concat(t).map(function(o,s){return o=Iu(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function tg(e){return R.isArray(e)&&!e.some(bi)}const ng=R.toFlatObject(R,{},null,function(t){return/^is[A-Z]/.test(t)});function _s(e,t,n){if(!R.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=R.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,h){return!R.isUndefined(h[p])});const r=n.metaTokens,o=n.visitor||f,s=n.dots,a=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&R.isSpecCompliantForm(t);if(!R.isFunction(o))throw new TypeError("visitor must be a function");function l(y){if(y===null)return"";if(R.isDate(y))return y.toISOString();if(!c&&R.isBlob(y))throw new be("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(y)||R.isTypedArray(y)?c&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function f(y,p,h){let g=y;if(y&&!h&&typeof y=="object"){if(R.endsWith(p,"{}"))p=r?p:p.slice(0,-2),y=JSON.stringify(y);else if(R.isArray(y)&&tg(y)||(R.isFileList(y)||R.endsWith(p,"[]"))&&(g=R.toArray(y)))return p=Iu(p),g.forEach(function(x,I){!(R.isUndefined(x)||x===null)&&t.append(a===!0?wu([p],I,s):a===null?p:p+"[]",l(x))}),!1}return bi(y)?!0:(t.append(wu(h,p,s),l(y)),!1)}const m=[],b=Object.assign(ng,{defaultVisitor:f,convertValue:l,isVisitable:bi});function v(y,p){if(!R.isUndefined(y)){if(m.indexOf(y)!==-1)throw Error("Circular reference detected in "+p.join("."));m.push(y),R.forEach(y,function(g,C){(!(R.isUndefined(g)||g===null)&&o.call(t,g,R.isString(C)?C.trim():C,p,b))===!0&&v(g,p?p.concat(C):[C])}),m.pop()}}if(!R.isObject(e))throw new TypeError("data must be an object");return v(e),t}function _u(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function yi(e,t){this._pairs=[],e&&_s(e,this,t)}const Su=yi.prototype;Su.append=function(t,n){this._pairs.push([t,n])},Su.toString=function(t){const n=t?function(r){return t.call(this,r,_u)}:_u;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function rg(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Au(e,t,n){if(!t)return e;const r=n&&n.encode||rg,o=n&&n.serialize;let s;if(o?s=o(t,n):s=R.isURLSearchParams(t)?t.toString():new yi(t,n).toString(r),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class og{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){R.forEach(this.handlers,function(r){r!==null&&t(r)})}}var Tu=og,Lu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},sg=typeof URLSearchParams<"u"?URLSearchParams:yi,ag=typeof FormData<"u"?FormData:null,ig=typeof Blob<"u"?Blob:null,cg={isBrowser:!0,classes:{URLSearchParams:sg,FormData:ag,Blob:ig},protocols:["http","https","file","blob","url","data"]};const Ci=typeof window<"u"&&typeof document<"u",xi=typeof navigator=="object"&&navigator||void 0,lg=Ci&&(!xi||["ReactNative","NativeScript","NS"].indexOf(xi.product)<0),ug=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",dg=Ci&&window.location.href||"http://localhost";var fg=Object.freeze({__proto__:null,hasBrowserEnv:Ci,hasStandardBrowserWebWorkerEnv:ug,hasStandardBrowserEnv:lg,navigator:xi,origin:dg}),ht={...fg,...cg};function pg(e,t){return _s(e,new ht.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return ht.isNode&&R.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function hg(e){return R.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function gg(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}function Ou(e){function t(n,r,o,s){let a=n[s++];if(a==="__proto__")return!0;const i=Number.isFinite(+a),c=s>=n.length;return a=!a&&R.isArray(o)?o.length:a,c?(R.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!i):((!o[a]||!R.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],s)&&R.isArray(o[a])&&(o[a]=gg(o[a])),!i)}if(R.isFormData(e)&&R.isFunction(e.entries)){const n={};return R.forEachEntry(e,(r,o)=>{t(hg(r),o,n,0)}),n}return null}function mg(e,t,n){if(R.isString(e))try{return(t||JSON.parse)(e),R.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const vi={transitional:Lu,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=R.isObject(t);if(s&&R.isHTMLForm(t)&&(t=new FormData(t)),R.isFormData(t))return o?JSON.stringify(Ou(t)):t;if(R.isArrayBuffer(t)||R.isBuffer(t)||R.isStream(t)||R.isFile(t)||R.isBlob(t)||R.isReadableStream(t))return t;if(R.isArrayBufferView(t))return t.buffer;if(R.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return pg(t,this.formSerializer).toString();if((i=R.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return _s(i?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),mg(t)):t}],transformResponse:[function(t){const n=this.transitional||vi.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(R.isResponse(t)||R.isReadableStream(t))return t;if(t&&R.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(i){if(a)throw i.name==="SyntaxError"?be.from(i,be.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ht.classes.FormData,Blob:ht.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};R.forEach(["delete","get","head","post","put","patch"],e=>{vi.headers[e]={}});var Ei=vi;const bg=R.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var yg=e=>{const t={};let n,r,o;return e&&e.split(`
31
- `).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&bg[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};const Fu=Symbol("internals");function Lo(e){return e&&String(e).trim().toLowerCase()}function Ss(e){return e===!1||e==null?e:R.isArray(e)?e.map(Ss):String(e)}function Cg(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const xg=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ii(e,t,n,r,o){if(R.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!R.isString(t)){if(R.isString(r))return t.indexOf(r)!==-1;if(R.isRegExp(r))return r.test(t)}}function vg(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Eg(e,t){const n=R.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,s,a){return this[r].call(this,t,o,s,a)},configurable:!0})})}class As{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(i,c,l){const f=Lo(c);if(!f)throw new Error("header name must be a non-empty string");const m=R.findKey(o,f);(!m||o[m]===void 0||l===!0||l===void 0&&o[m]!==!1)&&(o[m||c]=Ss(i))}const a=(i,c)=>R.forEach(i,(l,f)=>s(l,f,c));if(R.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(R.isString(t)&&(t=t.trim())&&!xg(t))a(yg(t),n);else if(R.isHeaders(t))for(const[i,c]of t.entries())s(c,i,r);else t!=null&&s(n,t,r);return this}get(t,n){if(t=Lo(t),t){const r=R.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Cg(o);if(R.isFunction(n))return n.call(this,o,r);if(R.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Lo(t),t){const r=R.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ii(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(a){if(a=Lo(a),a){const i=R.findKey(r,a);i&&(!n||Ii(r,r[i],i,n))&&(delete r[i],o=!0)}}return R.isArray(t)?t.forEach(s):s(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const s=n[r];(!t||Ii(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return R.forEach(this,(o,s)=>{const a=R.findKey(r,s);if(a){n[a]=Ss(o),delete n[s];return}const i=t?vg(s):String(s).trim();i!==s&&delete n[s],n[i]=Ss(o),r[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return R.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&R.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
32
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[Fu]=this[Fu]={accessors:{}}).accessors,o=this.prototype;function s(a){const i=Lo(a);r[i]||(Eg(o,a),r[i]=!0)}return R.isArray(t)?t.forEach(s):s(t),this}}As.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),R.reduceDescriptors(As.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),R.freezeMethods(As);var Ht=As;function wi(e,t){const n=this||Ei,r=t||n,o=Ht.from(r.headers);let s=r.data;return R.forEach(e,function(i){s=i.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function ku(e){return!!(e&&e.__CANCEL__)}function Dr(e,t,n){be.call(this,e??"canceled",be.ERR_CANCELED,t,n),this.name="CanceledError"}R.inherits(Dr,be,{__CANCEL__:!0});function Du(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new be("Request failed with status code "+n.status,[be.ERR_BAD_REQUEST,be.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Ig(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function wg(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,s=0,a;return t=t!==void 0?t:1e3,function(c){const l=Date.now(),f=r[s];a||(a=l),n[o]=c,r[o]=l;let m=s,b=0;for(;m!==o;)b+=n[m++],m=m%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-a<t)return;const v=f&&l-f;return v?Math.round(b*1e3/v):void 0}}function _g(e,t){let n=0,r=1e3/t,o,s;const a=(l,f=Date.now())=>{n=f,o=null,s&&(clearTimeout(s),s=null),e.apply(null,l)};return[(...l)=>{const f=Date.now(),m=f-n;m>=r?a(l,f):(o=l,s||(s=setTimeout(()=>{s=null,a(o)},r-m)))},()=>o&&a(o)]}const Ts=(e,t,n=3)=>{let r=0;const o=wg(50,250);return _g(s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,c=a-r,l=o(c),f=a<=i;r=a;const m={loaded:a,total:i,progress:i?a/i:void 0,bytes:c,rate:l||void 0,estimated:l&&i&&f?(i-a)/l:void 0,event:s,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(m)},n)},Nu=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ru=e=>(...t)=>R.asap(()=>e(...t));var Sg=ht.hasStandardBrowserEnv?function(){const t=ht.navigator&&/(msie|trident)/i.test(ht.navigator.userAgent),n=document.createElement("a");let r;function o(s){let a=s;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(a){const i=R.isString(a)?o(a):a;return i.protocol===r.protocol&&i.host===r.host}}():function(){return function(){return!0}}(),Ag=ht.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const a=[e+"="+encodeURIComponent(t)];R.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),R.isString(r)&&a.push("path="+r),R.isString(o)&&a.push("domain="+o),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Tg(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Lg(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Mu(e,t){return e&&!Tg(t)?Lg(e,t):t}const Pu=e=>e instanceof Ht?{...e}:e;function tr(e,t){t=t||{};const n={};function r(l,f,m){return R.isPlainObject(l)&&R.isPlainObject(f)?R.merge.call({caseless:m},l,f):R.isPlainObject(f)?R.merge({},f):R.isArray(f)?f.slice():f}function o(l,f,m){if(R.isUndefined(f)){if(!R.isUndefined(l))return r(void 0,l,m)}else return r(l,f,m)}function s(l,f){if(!R.isUndefined(f))return r(void 0,f)}function a(l,f){if(R.isUndefined(f)){if(!R.isUndefined(l))return r(void 0,l)}else return r(void 0,f)}function i(l,f,m){if(m in t)return r(l,f);if(m in e)return r(void 0,l)}const c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:i,headers:(l,f)=>o(Pu(l),Pu(f),!0)};return R.forEach(Object.keys(Object.assign({},e,t)),function(f){const m=c[f]||o,b=m(e[f],t[f],f);R.isUndefined(b)&&m!==i||(n[f]=b)}),n}var ju=e=>{const t=tr({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:i}=t;t.headers=a=Ht.from(a),t.url=Au(Mu(t.baseURL,t.url),e.params,e.paramsSerializer),i&&a.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):"")));let c;if(R.isFormData(n)){if(ht.hasStandardBrowserEnv||ht.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((c=a.getContentType())!==!1){const[l,...f]=c?c.split(";").map(m=>m.trim()).filter(Boolean):[];a.setContentType([l||"multipart/form-data",...f].join("; "))}}if(ht.hasStandardBrowserEnv&&(r&&R.isFunction(r)&&(r=r(t)),r||r!==!1&&Sg(t.url))){const l=o&&s&&Ag.read(s);l&&a.set(o,l)}return t},Og=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=ju(e);let s=o.data;const a=Ht.from(o.headers).normalize();let{responseType:i,onUploadProgress:c,onDownloadProgress:l}=o,f,m,b,v,y;function p(){v&&v(),y&&y(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let h=new XMLHttpRequest;h.open(o.method.toUpperCase(),o.url,!0),h.timeout=o.timeout;function g(){if(!h)return;const x=Ht.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),E={data:!i||i==="text"||i==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:x,config:e,request:h};Du(function(A){n(A),p()},function(A){r(A),p()},E),h=null}"onloadend"in h?h.onloadend=g:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(g)},h.onabort=function(){h&&(r(new be("Request aborted",be.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new be("Network Error",be.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let I=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const E=o.transitional||Lu;o.timeoutErrorMessage&&(I=o.timeoutErrorMessage),r(new be(I,E.clarifyTimeoutError?be.ETIMEDOUT:be.ECONNABORTED,e,h)),h=null},s===void 0&&a.setContentType(null),"setRequestHeader"in h&&R.forEach(a.toJSON(),function(I,E){h.setRequestHeader(E,I)}),R.isUndefined(o.withCredentials)||(h.withCredentials=!!o.withCredentials),i&&i!=="json"&&(h.responseType=o.responseType),l&&([b,y]=Ts(l,!0),h.addEventListener("progress",b)),c&&h.upload&&([m,v]=Ts(c),h.upload.addEventListener("progress",m),h.upload.addEventListener("loadend",v)),(o.cancelToken||o.signal)&&(f=x=>{h&&(r(!x||x.type?new Dr(null,e,h):x),h.abort(),h=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const C=Ig(o.url);if(C&&ht.protocols.indexOf(C)===-1){r(new be("Unsupported protocol "+C+":",be.ERR_BAD_REQUEST,e));return}h.send(s||null)})},Fg=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const s=function(l){if(!o){o=!0,i();const f=l instanceof Error?l:this.reason;r.abort(f instanceof be?f:new Dr(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new be(`timeout ${t} of ms exceeded`,be.ETIMEDOUT))},t);const i=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),e=null)};e.forEach(l=>l.addEventListener("abort",s));const{signal:c}=r;return c.unsubscribe=()=>R.asap(i),c}};const kg=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},Dg=async function*(e,t){for await(const n of Ng(e))yield*kg(n,t)},Ng=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Bu=(e,t,n,r)=>{const o=Dg(e,t);let s=0,a,i=c=>{a||(a=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:l,value:f}=await o.next();if(l){i(),c.close();return}let m=f.byteLength;if(n){let b=s+=m;n(b)}c.enqueue(new Uint8Array(f))}catch(l){throw i(l),l}},cancel(c){return i(c),o.return()}},{highWaterMark:2})},Ls=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Vu=Ls&&typeof ReadableStream=="function",Rg=Ls&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Gu=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Mg=Vu&&Gu(()=>{let e=!1;const t=new Request(ht.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Hu=64*1024,_i=Vu&&Gu(()=>R.isReadableStream(new Response("").body)),Os={stream:_i&&(e=>e.body)};Ls&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Os[t]&&(Os[t]=R.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new be(`Response type '${t}' is not supported`,be.ERR_NOT_SUPPORT,r)})})})(new Response);const Pg=async e=>{if(e==null)return 0;if(R.isBlob(e))return e.size;if(R.isSpecCompliantForm(e))return(await new Request(ht.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(R.isArrayBufferView(e)||R.isArrayBuffer(e))return e.byteLength;if(R.isURLSearchParams(e)&&(e=e+""),R.isString(e))return(await Rg(e)).byteLength},jg=async(e,t)=>{const n=R.toFiniteNumber(e.getContentLength());return n??Pg(t)};var Bg=Ls&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:a,onDownloadProgress:i,onUploadProgress:c,responseType:l,headers:f,withCredentials:m="same-origin",fetchOptions:b}=ju(e);l=l?(l+"").toLowerCase():"text";let v=Fg([o,s&&s.toAbortSignal()],a),y;const p=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let h;try{if(c&&Mg&&n!=="get"&&n!=="head"&&(h=await jg(f,r))!==0){let E=new Request(t,{method:"POST",body:r,duplex:"half"}),_;if(R.isFormData(r)&&(_=E.headers.get("content-type"))&&f.setContentType(_),E.body){const[A,S]=Nu(h,Ts(Ru(c)));r=Bu(E.body,Hu,A,S)}}R.isString(m)||(m=m?"include":"omit");const g="credentials"in Request.prototype;y=new Request(t,{...b,signal:v,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:g?m:void 0});let C=await fetch(y);const x=_i&&(l==="stream"||l==="response");if(_i&&(i||x&&p)){const E={};["status","statusText","headers"].forEach(L=>{E[L]=C[L]});const _=R.toFiniteNumber(C.headers.get("content-length")),[A,S]=i&&Nu(_,Ts(Ru(i),!0))||[];C=new Response(Bu(C.body,Hu,A,()=>{S&&S(),p&&p()}),E)}l=l||"text";let I=await Os[R.findKey(Os,l)||"text"](C,e);return!x&&p&&p(),await new Promise((E,_)=>{Du(E,_,{data:I,headers:Ht.from(C.headers),status:C.status,statusText:C.statusText,config:e,request:y})})}catch(g){throw p&&p(),g&&g.name==="TypeError"&&/fetch/i.test(g.message)?Object.assign(new be("Network Error",be.ERR_NETWORK,e,y),{cause:g.cause||g}):be.from(g,g&&g.code,e,y)}});const Si={http:eg,xhr:Og,fetch:Bg};R.forEach(Si,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Wu=e=>`- ${e}`,Vg=e=>R.isFunction(e)||e===null||e===!1;var Zu={getAdapter:e=>{e=R.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let s=0;s<t;s++){n=e[s];let a;if(r=n,!Vg(n)&&(r=Si[(a=String(n)).toLowerCase()],r===void 0))throw new be(`Unknown adapter '${a}'`);if(r)break;o[a||"#"+s]=r}if(!r){const s=Object.entries(o).map(([i,c])=>`adapter ${i} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=t?s.length>1?`since :
33
- `+s.map(Wu).join(`
34
- `):" "+Wu(s[0]):"as no adapter specified";throw new be("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:Si};function Ai(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Dr(null,e)}function Xu(e){return Ai(e),e.headers=Ht.from(e.headers),e.data=wi.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Zu.getAdapter(e.adapter||Ei.adapter)(e).then(function(r){return Ai(e),r.data=wi.call(e,e.transformResponse,r),r.headers=Ht.from(r.headers),r},function(r){return ku(r)||(Ai(e),r&&r.response&&(r.response.data=wi.call(e,e.transformResponse,r.response),r.response.headers=Ht.from(r.response.headers))),Promise.reject(r)})}const zu="1.7.7",Ti={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ti[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Yu={};Ti.transitional=function(t,n,r){function o(s,a){return"[Axios v"+zu+"] Transitional option '"+s+"'"+a+(r?". "+r:"")}return(s,a,i)=>{if(t===!1)throw new be(o(a," has been removed"+(n?" in "+n:"")),be.ERR_DEPRECATED);return n&&!Yu[a]&&(Yu[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,a,i):!0}};function Gg(e,t,n){if(typeof e!="object")throw new be("options must be an object",be.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],a=t[s];if(a){const i=e[s],c=i===void 0||a(i,s,e);if(c!==!0)throw new be("option "+s+" must be "+c,be.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new be("Unknown option "+s,be.ERR_BAD_OPTION)}}var Li={assertOptions:Gg,validators:Ti};const On=Li.validators;let Fs=class{constructor(t){this.defaults=t,this.interceptors={request:new Tu,response:new Tu}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const s=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
35
- `+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=tr(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&Li.assertOptions(r,{silentJSONParsing:On.transitional(On.boolean),forcedJSONParsing:On.transitional(On.boolean),clarifyTimeoutError:On.transitional(On.boolean)},!1),o!=null&&(R.isFunction(o)?n.paramsSerializer={serialize:o}:Li.assertOptions(o,{encode:On.function,serialize:On.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&R.merge(s.common,s[n.method]);s&&R.forEach(["delete","get","head","post","put","patch","common"],y=>{delete s[y]}),n.headers=Ht.concat(a,s);const i=[];let c=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(c=c&&p.synchronous,i.unshift(p.fulfilled,p.rejected))});const l=[];this.interceptors.response.forEach(function(p){l.push(p.fulfilled,p.rejected)});let f,m=0,b;if(!c){const y=[Xu.bind(this),void 0];for(y.unshift.apply(y,i),y.push.apply(y,l),b=y.length,f=Promise.resolve(n);m<b;)f=f.then(y[m++],y[m++]);return f}b=i.length;let v=n;for(m=0;m<b;){const y=i[m++],p=i[m++];try{v=y(v)}catch(h){p.call(this,h);break}}try{f=Xu.call(this,v)}catch(y){return Promise.reject(y)}for(m=0,b=l.length;m<b;)f=f.then(l[m++],l[m++]);return f}getUri(t){t=tr(this.defaults,t);const n=Mu(t.baseURL,t.url);return Au(n,t.params,t.paramsSerializer)}};R.forEach(["delete","get","head","options"],function(t){Fs.prototype[t]=function(n,r){return this.request(tr(r||{},{method:t,url:n,data:(r||{}).data}))}}),R.forEach(["post","put","patch"],function(t){function n(r){return function(s,a,i){return this.request(tr(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}Fs.prototype[t]=n(),Fs.prototype[t+"Form"]=n(!0)});var ks=Fs;class Oi{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(o=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const a=new Promise(i=>{r.subscribe(i),s=i}).then(o);return a.cancel=function(){r.unsubscribe(s)},a},t(function(s,a,i){r.reason||(r.reason=new Dr(s,a,i),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Oi(function(o){t=o}),cancel:t}}}var Hg=Oi;function Wg(e){return function(n){return e.apply(null,n)}}function Zg(e){return R.isObject(e)&&e.isAxiosError===!0}const Fi={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Fi).forEach(([e,t])=>{Fi[t]=e});var Xg=Fi;function Ju(e){const t=new ks(e),n=du(ks.prototype.request,t);return R.extend(n,ks.prototype,t,{allOwnKeys:!0}),R.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Ju(tr(e,o))},n}const Ye=Ju(Ei);Ye.Axios=ks,Ye.CanceledError=Dr,Ye.CancelToken=Hg,Ye.isCancel=ku,Ye.VERSION=zu,Ye.toFormData=_s,Ye.AxiosError=be,Ye.Cancel=Ye.CanceledError,Ye.all=function(t){return Promise.all(t)},Ye.spread=Wg,Ye.isAxiosError=Zg,Ye.mergeConfig=tr,Ye.AxiosHeaders=Ht,Ye.formToJSON=e=>Ou(R.isHTMLForm(e)?new FormData(e):e),Ye.getAdapter=Zu.getAdapter,Ye.HttpStatusCode=Xg,Ye.default=Ye;var qu=Ye,Se={},Fn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PLATFORM=e.TENANT_PLATFORM=e.API_CALL_ORIGIN=e.TIERS=e.APP_UI=e.CONFIG_HIVER=e.DEFAULT_INIT_CONFIG_HIVER=e.TWO_MINUTES_IN_MS=e.REFETCH_CHECK_DELAY=e.RETRY_DELAY_IN_CASE_OF_CORRUPTED_EXPIRY=e.INITIAL_RETRY_DELAY=e.MAX_BACKOFF_LIMIT=e.MAX_CONFLICT_RETRY_DELAY=e.MAX_RETRY_DELAY=e.GET_METHOD=void 0,e.GET_METHOD="GET",e.MAX_RETRY_DELAY=18e4,e.MAX_CONFLICT_RETRY_DELAY=63e3,e.MAX_BACKOFF_LIMIT=8e3,e.INITIAL_RETRY_DELAY=1e3,e.RETRY_DELAY_IN_CASE_OF_CORRUPTED_EXPIRY=3e3,e.REFETCH_CHECK_DELAY=168e4,e.TWO_MINUTES_IN_MS=2*60*1e3,e.DEFAULT_INIT_CONFIG_HIVER={getToken:!0,isHiverApiDomain:!0,fetchCsrfToken:function(){return""}},e.CONFIG_HIVER={getToken:!1,fetchCsrfToken:function(){return""},isHiverApiDomain:!0},e.APP_UI={COLLAB_SPACE:"collab-space",DEFAULT:"default"},e.TIERS={DEV:"dev",SIT:"sit",QA:"qa",PRODUCTION:"production",PROD:"prod"},e.API_CALL_ORIGIN={API_RETRY:"Api Retry"},e.TENANT_PLATFORM={GMAIL:"GMAIL",HIVERWEB:"HIVERWEB"},function(t){t[t.WEB=0]="WEB",t[t.MOBILE=1]="MOBILE"}(e.PLATFORM||(e.PLATFORM={}))})(Fn);var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.getProdHqConfig=gt.getProdApiConfig=gt.getSitHqConfig=gt.getSitApiConfig=gt.getDevHqConfig=gt.getDevApiConfig=void 0;var Nr={heimdallTokenFetch:"/v1/token/get",heimdallLogin:"/v1/login/code",heimdallLogout:"/v1/logout",v2Login:"/api/auth/login/code",hotLogin:"/api/auth/login/code"},zg=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api",hotUrl:"http://local.hiverhq.co.in:3000",apiEndpoints:Nr}};gt.getDevApiConfig=zg;var Yg=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api2",hotUrl:"http://local.hiverhq.co.in:3000",apiEndpoints:Nr}};gt.getDevHqConfig=Yg;var Jg=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api"),hotUrl:"https://api-staging.hiverhq.co.in",apiEndpoints:Nr}};gt.getSitApiConfig=Jg;var qg=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api2"),hotUrl:"https://api-staging.hiverhq.co.in",apiEndpoints:Nr}};gt.getSitHqConfig=qg;var $g=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall.hiverapi.com",hotUrl:"https://app.hiverhq.com",apiEndpoints:Nr}};gt.getProdApiConfig=$g;var Qg=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall2.hiverhq.com",hotUrl:"https://app.hiverhq.com",apiEndpoints:Nr}};gt.getProdHqConfig=Qg;var nn={},rn={};Object.defineProperty(rn,"__esModule",{value:!0}),rn.removeValue=rn.getValue=rn.setValue=void 0;var ki={};function Ug(e,t){ki[e]=t}rn.setValue=Ug;function Kg(e){return ki[e]}rn.getValue=Kg;function em(e){delete ki[e]}rn.removeValue=em,Object.defineProperty(nn,"__esModule",{value:!0}),nn.removeItemFromStorage=nn.setItemInStorage=nn.getItemFromStorage=void 0;var Rr=Fn,Mr=rn,tm=function(e,t){switch(t===void 0&&(t=(0,Mr.getValue)("PLATFORM")),t){case Rr.PLATFORM.WEB:return sessionStorage.getItem(e);case Rr.PLATFORM.MOBILE:return(0,Mr.getValue)(e);default:throw Error("Invalid PLATFORM ".concat(t))}};nn.getItemFromStorage=tm;var nm=function(e,t,n){switch(n===void 0&&(n=(0,Mr.getValue)("PLATFORM")),n){case Rr.PLATFORM.WEB:return sessionStorage.setItem(e,t);case Rr.PLATFORM.MOBILE:return(0,Mr.setValue)(e,t);default:throw Error("Invalid PLATFORM ".concat(n))}};nn.setItemInStorage=nm;var rm=function(e,t){switch(t===void 0&&(t=(0,Mr.getValue)("PLATFORM")),t){case Rr.PLATFORM.WEB:sessionStorage.removeItem(e);break;case Rr.PLATFORM.MOBILE:(0,Mr.removeValue)(e);break;default:throw Error("Invalid PLATFORM ".concat(t))}};nn.removeItemFromStorage=rm;var om=ge&&ge.__awaiter||function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function i(f){try{l(r.next(f))}catch(m){a(m)}}function c(f){try{l(r.throw(f))}catch(m){a(m)}}function l(f){f.done?s(f.value):o(f.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},sm=ge&&ge.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,a;return a={next:i(0),throw:i(1),return:i(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function i(l){return function(f){return c([l,f])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,o&&(s=l[0]&2?o.return:l[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,l[1])).done)return s;switch(o=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(f){l=[6,f],o=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(Se,"__esModule",{value:!0}),Se.expireToken=Se.invalidateToken=Se.validateToken=Se.validateAccount=Se.getConfig=Se.introduceDelay=Se.isTokenInExpiryWindow=Se.getStoredAuthData=Se.setUserDetails=Se.getRefreshInterval=Se.setTokenAndExpiry=Se.getRandomDelay=Se.hasValidToken=void 0;var bn=Fn,Pr=gt,St=nn,Di=function(){var e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4);return t},Ni=function(e){var t=parseInt((0,St.getItemFromStorage)("hiverAuthUserId")||"0"),n=parseInt((0,St.getItemFromStorage)("hiverAuthUserGroupId")||"0"),r=e.userId,o=e.usergroupId;return t===r&&o===n};Se.validateAccount=Ni;var am=function(e){var t=Ni(e);return!$u()&&t};Se.validateToken=am;var im=function(e){return e.apiRetry?e.apiRetry>0:!1};Se.invalidateToken=im;var cm=function(){try{sessionStorage.removeItem("hiverAuthTokenExpiry")}catch{console.log("Heimdall: Unable to Remove token.")}};Se.expireToken=cm;var lm=function(e){var t=(0,St.getItemFromStorage)("hiverAuthTokenExpiry")||"",n=new Date(t),r=Di(),o=Ni(e);return console.log("Heimdall: checking if there is a valid token",r<n&&o),r<n&&o};Se.hasValidToken=lm;var um=function(){return Math.floor(Math.random()*6e4)+6e4};Se.getRandomDelay=um;var dm=function(e,t){if(!e||!t)throw new Error("User Id or user group Id not found in the response");(0,St.setItemInStorage)("hiverAuthUserId",e),(0,St.setItemInStorage)("hiverAuthUserGroupId",t)};Se.setUserDetails=dm;var fm=function(e,t){if(!e)throw new Error("Token not found in the response");(0,St.setItemInStorage)("hiverAuthToken",e),(0,St.setItemInStorage)("hiverAuthTokenExpiry",t)};Se.setTokenAndExpiry=fm;var pm=function(){var e=(0,St.getItemFromStorage)("hiverAuthTokenExpiry"),t=(0,St.getItemFromStorage)("hiverAuthToken"),n=(0,St.getItemFromStorage)("hiverAuthUserId"),r=(0,St.getItemFromStorage)("hiverAuthUserGroupId");return{token:t,expiryTime:e,userId:n,usergroupId:r}};Se.getStoredAuthData=pm;var $u=function(){var e=(0,St.getItemFromStorage)("hiverAuthTokenExpiry")||"";if(!e)return!0;var t=Di(),n=new Date(e),r=4*60*1e3,o=n.getTime()-t.getTime()<r;return console.log({currentTime:t,expiry:n,isInExpiryWindow:o}),o};Se.isTokenInExpiryWindow=$u;var hm=function(e){return om(void 0,void 0,void 0,function(){return sm(this,function(t){switch(t.label){case 0:return[4,new Promise(function(n){return setTimeout(n,e)})];case 1:return t.sent(),[2]}})})};Se.introduceDelay=hm;var gm=function(e,t,n){switch(n===void 0&&(n=!0),t){case bn.TIERS.SIT:case bn.TIERS.QA:return n?(0,Pr.getSitApiConfig)(e):(0,Pr.getSitHqConfig)(e);case bn.TIERS.PRODUCTION:case bn.TIERS.PROD:return n?(0,Pr.getProdApiConfig)():(0,Pr.getProdHqConfig)();case bn.TIERS.DEV:default:return n?(0,Pr.getDevApiConfig)():(0,Pr.getDevHqConfig)()}};Se.getConfig=gm;var mm=function(){try{var e=(0,St.getItemFromStorage)("hiverAuthTokenExpiry");if(!e)return bn.RETRY_DELAY_IN_CASE_OF_CORRUPTED_EXPIRY;var t=new Date(e),n=Di();return t.getTime()-n.getTime()>bn.TWO_MINUTES_IN_MS?t.getTime()-bn.TWO_MINUTES_IN_MS:t.getTime()-n.getTime()}catch(r){return console.error("Heimdall: Error in getRefreshInterval",r),bn.REFETCH_CHECK_DELAY}};Se.getRefreshInterval=mm;var Oo={},Wt={},Qu;function Uu(){if(Qu)return Wt;Qu=1;var e=ge&&ge.__awaiter||function(y,p,h,g){function C(x){return x instanceof h?x:new h(function(I){I(x)})}return new(h||(h=Promise))(function(x,I){function E(S){try{A(g.next(S))}catch(L){I(L)}}function _(S){try{A(g.throw(S))}catch(L){I(L)}}function A(S){S.done?x(S.value):C(S.value).then(E,_)}A((g=g.apply(y,p||[])).next())})},t=ge&&ge.__generator||function(y,p){var h={label:0,sent:function(){if(x[0]&1)throw x[1];return x[1]},trys:[],ops:[]},g,C,x,I;return I={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(I[Symbol.iterator]=function(){return this}),I;function E(A){return function(S){return _([A,S])}}function _(A){if(g)throw new TypeError("Generator is already executing.");for(;I&&(I=0,A[0]&&(h=0)),h;)try{if(g=1,C&&(x=A[0]&2?C.return:A[0]?C.throw||((x=C.return)&&x.call(C),0):C.next)&&!(x=x.call(C,A[1])).done)return x;switch(C=0,x&&(A=[A[0]&2,x.value]),A[0]){case 0:case 1:x=A;break;case 4:return h.label++,{value:A[1],done:!1};case 5:h.label++,C=A[1],A=[0];continue;case 7:A=h.ops.pop(),h.trys.pop();continue;default:if(x=h.trys,!(x=x.length>0&&x[x.length-1])&&(A[0]===6||A[0]===2)){h=0;continue}if(A[0]===3&&(!x||A[1]>x[0]&&A[1]<x[3])){h.label=A[1];break}if(A[0]===6&&h.label<x[1]){h.label=x[1],x=A;break}if(x&&h.label<x[2]){h.label=x[2],h.ops.push(A);break}x[2]&&h.ops.pop(),h.trys.pop();continue}A=p.call(y,h)}catch(S){A=[6,S],C=0}finally{g=x=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}};Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.logoutFromHeimdall=Wt.getTenantLoginCode=Wt.getLoginToken=Wt.getAccessToken=void 0;var n=Fn,r=rd(),o=Se,s=function(y,p,h,g){var C=(0,o.getStoredAuthData)(),x=h===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:y.heimdallUrl,url:y.apiEndpoints.heimdallTokenFetch,method:n.GET_METHOD,headers:{"x-hiver-tenant":x},data:{user_id:p.userId,usergroup_id:p.usergroupId,access_token:(C==null?void 0:C.token)||"",source:g}}},a=function(y,p,h,g,C){var x=h===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:p.heimdallUrl,url:p.apiEndpoints.heimdallLogin,method:n.GET_METHOD,data:{code:y},headers:{"x-hiver-tenant":x,"x-hiver-userid":g,"x-hiver-usergroupid":C}}},i=function(y,p){var h=p===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:y.heimdallUrl,url:y.apiEndpoints.heimdallLogout,method:n.GET_METHOD,headers:{"x-hiver-tenant":h}}},c=function(y){return parseInt(y,10)},l=function(y,p,h,g){return{root_url:h===n.TENANT_PLATFORM.HIVERWEB?y.hotUrl:y.v2Url,url:h===n.TENANT_PLATFORM.HIVERWEB?y.apiEndpoints.hotLogin:y.apiEndpoints.v2Login,method:n.GET_METHOD,data:{usersession:c(p.userId),app:g||n.APP_UI.DEFAULT}}},f=function(y,p,h,g,C){return e(void 0,void 0,void 0,function(){var x,I,E,_,A,S,L;return t(this,function(k){switch(k.label){case 0:console.log("GETTOKEN tenantPlatform -> ",g),k.label=1;case 1:return k.trys.push([1,5,,6]),!(0,o.validateToken)(h)||(0,o.invalidateToken)(h)?(console.log("HEIMDALL: No valid token, fetching token"),x=s(p,h,g,C),[4,(0,r.performAxiosCall)(x)]):[3,3];case 2:return I=k.sent(),[2,{atToken:(_=I==null?void 0:I.data.at)===null||_===void 0?void 0:_.token,expiryTime:(A=I==null?void 0:I.data.at)===null||A===void 0?void 0:A.expires_at,userId:(S=I==null?void 0:I.data)===null||S===void 0?void 0:S.user_id,userGroupId:(L=I==null?void 0:I.data)===null||L===void 0?void 0:L.usergroup_id}];case 3:return console.log("Heimdall: Valid token already exists"),[2,{}];case 4:return[3,6];case 5:throw E=k.sent(),E;case 6:return[2]}})})};Wt.getAccessToken=f;var m=function(y,p,h,g,C,x){return e(void 0,void 0,void 0,function(){var I,E,_,A,S,L,k;return t(this,function(D){switch(D.label){case 0:I=a(y,h,g,C,x),D.label=1;case 1:return D.trys.push([1,3,,4]),[4,(0,r.performAxiosCall)(I)];case 2:return E=D.sent(),[2,{userId:(A=E==null?void 0:E.data)===null||A===void 0?void 0:A.user_id,userGroupId:(S=E==null?void 0:E.data)===null||S===void 0?void 0:S.usergroup_id,atToken:(L=E==null?void 0:E.data.at)===null||L===void 0?void 0:L.token,expiryTime:(k=E==null?void 0:E.data.at)===null||k===void 0?void 0:k.expires_at}];case 3:throw _=D.sent(),_;case 4:return[2]}})})};Wt.getLoginToken=m;var b=function(y,p,h,g,C){return e(void 0,void 0,void 0,function(){var x,I,E;return t(this,function(_){switch(_.label){case 0:return _.trys.push([0,2,,3]),console.log("ERROR debug: in getTenantLoginCode:",C),x=l(p,h,g,C),[4,(0,r.performAxiosCall)(x)];case 1:return I=_.sent(),[2,I==null?void 0:I.data.code];case 2:throw E=_.sent(),E;case 3:return[2]}})})};Wt.getTenantLoginCode=b;var v=function(y,p,h){return h===void 0&&(h=0),e(void 0,void 0,void 0,function(){var g,C,x;return t(this,function(I){switch(I.label){case 0:return I.trys.push([0,2,,5]),g=i(y,p),[4,(0,r.performAxiosCall)(g)];case 1:return C=I.sent(),[2,C==null?void 0:C.status];case 2:return x=I.sent(),h<2?[4,v(y,p,h+1)]:[3,4];case 3:I.sent(),I.label=4;case 4:throw x;case 5:return[2]}})})};return Wt.logoutFromHeimdall=v,Wt}var Ds={},bm=ge&&ge.__awaiter||function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function i(f){try{l(r.next(f))}catch(m){a(m)}}function c(f){try{l(r.throw(f))}catch(m){a(m)}}function l(f){f.done?s(f.value):o(f.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},ym=ge&&ge.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,a;return a={next:i(0),throw:i(1),return:i(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function i(l){return function(f){return c([l,f])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,o&&(s=l[0]&2?o.return:l[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,l[1])).done)return s;switch(o=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(f){l=[6,f],o=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(Ds,"__esModule",{value:!0}),Ds.subscribeToOnlineEvent=void 0;var Ku=Fn,Cm=rn,xm=function(e,t){switch(t===void 0&&(t=(0,Cm.getValue)("PLATFORM")),console.log("Online status detected. Fetching token..."),t){case Ku.PLATFORM.WEB:return window.addEventListener("online",function(){return bm(void 0,void 0,void 0,function(){return ym(this,function(n){switch(n.label){case 0:return console.log("Online status detected. Fetching token..."),[4,e()];case 1:return n.sent(),[2]}})})});case Ku.PLATFORM.MOBILE:e();return;default:throw Error("Invalid PLATFORM ".concat(t))}};Ds.subscribeToOnlineEvent=xm;var ed;function td(){if(ed)return Oo;ed=1;var e=ge&&ge.__awaiter||function(y,p,h,g){function C(x){return x instanceof h?x:new h(function(I){I(x)})}return new(h||(h=Promise))(function(x,I){function E(S){try{A(g.next(S))}catch(L){I(L)}}function _(S){try{A(g.throw(S))}catch(L){I(L)}}function A(S){S.done?x(S.value):C(S.value).then(E,_)}A((g=g.apply(y,p||[])).next())})},t=ge&&ge.__generator||function(y,p){var h={label:0,sent:function(){if(x[0]&1)throw x[1];return x[1]},trys:[],ops:[]},g,C,x,I;return I={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(I[Symbol.iterator]=function(){return this}),I;function E(A){return function(S){return _([A,S])}}function _(A){if(g)throw new TypeError("Generator is already executing.");for(;I&&(I=0,A[0]&&(h=0)),h;)try{if(g=1,C&&(x=A[0]&2?C.return:A[0]?C.throw||((x=C.return)&&x.call(C),0):C.next)&&!(x=x.call(C,A[1])).done)return x;switch(C=0,x&&(A=[A[0]&2,x.value]),A[0]){case 0:case 1:x=A;break;case 4:return h.label++,{value:A[1],done:!1};case 5:h.label++,C=A[1],A=[0];continue;case 7:A=h.ops.pop(),h.trys.pop();continue;default:if(x=h.trys,!(x=x.length>0&&x[x.length-1])&&(A[0]===6||A[0]===2)){h=0;continue}if(A[0]===3&&(!x||A[1]>x[0]&&A[1]<x[3])){h.label=A[1];break}if(A[0]===6&&h.label<x[1]){h.label=x[1],x=A;break}if(x&&h.label<x[2]){h.label=x[2],h.ops.push(A);break}x[2]&&h.ops.pop(),h.trys.pop();continue}A=p.call(y,h)}catch(S){A=[6,S],C=0}finally{g=x=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}};Object.defineProperty(Oo,"__esModule",{value:!0}),Oo.fetchAccessToken=void 0;var n=Uu(),r=Fn,o=Se,s=Ds,a,i,c,l=function(y,p,h,g,C,x){return x===void 0&&(x=r.APP_UI.DEFAULT),e(void 0,void 0,void 0,function(){var I,E,_,A,S,L,k,D,N;return t(this,function(M){switch(M.label){case 0:I=2,M.label=1;case 1:return M.trys.push([1,7,,12]),console.log("ERROR debug: in login:",x,g),E=void 0,C?[4,C()]:[3,3];case 2:return E=M.sent(),[3,5];case 3:return[4,(0,n.getTenantLoginCode)(r.CONFIG_HIVER,y,p,g,x)];case 4:E=M.sent(),M.label=5;case 5:return[4,(0,n.getLoginToken)(E,r.CONFIG_HIVER,y,g,p.userId,p.usergroupId)];case 6:return _=M.sent(),A=_.userId,S=_.userGroupId,L=_.atToken,k=_.expiryTime,(0,o.setTokenAndExpiry)(L,k),(0,o.setUserDetails)(A,S),[3,12];case 7:D=M.sent(),console.log("ERROR debug: in error login:",D,x),N=h,M.label=8;case 8:return N<I?[4,l(y,p,N+1,g,C,x)]:[3,11];case 9:M.sent(),M.label=10;case 10:return N++,[3,8];case 11:throw D;case 12:return[2]}})})},f=function(y,p,h,g,C){return e(void 0,void 0,void 0,function(){var x,I,E,_;return t(this,function(A){switch(A.label){case 0:return p<r.MAX_CONFLICT_RETRY_DELAY?[4,new Promise(function(S){return setTimeout(S,y)})]:[3,3];case 1:return A.sent(),p+=y,y*2<=r.MAX_BACKOFF_LIMIT?y*=2:y=r.MAX_BACKOFF_LIMIT,console.log("Heimdall: Fetch token post doubling conflict retry delay",y),x=h.retryDelay,I=h.configs,E=h.apiParams,_=h.appUI,[4,m(x,y,p,I,E,g,C,_)];case 2:A.sent(),A.label=3;case 3:return[2]}})})},m=function(y,p,h,g,C,x,I,E,_){return E===void 0&&(E="default"),e(void 0,void 0,void 0,function(){var A,S,L,k,D,N,M,V,J,$,H,X,q,se;return t(this,function(de){switch(de.label){case 0:return de.trys.push([0,2,,12]),console.log("Heimdall: Interval Set on fetch token in fetchAndSaveToken:",c),[4,(0,n.getAccessToken)(r.CONFIG_HIVER,g,C,x,E)];case 1:return A=de.sent(),S=A.atToken,L=A.expiryTime,k=A.userId,D=A.userGroupId,S&&L&&(0,o.setTokenAndExpiry)(S,L),k&&D&&(0,o.setUserDetails)(k,D),y=r.INITIAL_RETRY_DELAY,p=r.INITIAL_RETRY_DELAY,h=0,[3,12];case 2:return N=de.sent(),console.log("ERROR: Heimdall fetch token",N),((J=N.response)===null||J===void 0?void 0:J.status)===401||(($=N.request)===null||$===void 0?void 0:$.status)===401?(M=1,[4,l(g,C,M,x,I,_)]):[3,4];case 3:return de.sent(),[3,11];case 4:return((H=N.response)===null||H===void 0?void 0:H.status)===409||((X=N.request)===null||X===void 0?void 0:X.status)===409?(console.log("Heimdall: Fetching token post 409 in fetch And Save Token"),V={retryDelay:y,configs:g,apiParams:C,appUI:_},[4,f(p,h,V,x,I)]):[3,6];case 5:if(de.sent(),h>=r.MAX_CONFLICT_RETRY_DELAY)throw N;return[3,11];case 6:if(!(((q=N.response)===null||q===void 0?void 0:q.status)===422||((se=N.request)===null||se===void 0?void 0:se.status)===422))return[3,7];throw console.log("ERROR: Throwing error",N.response.status),N;case 7:return y<=r.MAX_RETRY_DELAY?[4,new Promise(function(B){return setTimeout(B,y)})]:[3,10];case 8:return de.sent(),y*=2,console.log("Heimdall: Fetch token post doubling retry delay",y),[4,m(y,p,h,g,C,x,I,_)];case 9:return de.sent(),[3,11];case 10:throw N;case 11:return[3,12];case 12:return[2]}})})},b=function(y,p,h,g,C,x,I,E){return h===void 0&&(h=r.INITIAL_RETRY_DELAY),g===void 0&&(g=r.INITIAL_RETRY_DELAY),e(void 0,void 0,void 0,function(){var _,A,S;return t(this,function(L){switch(L.label){case 0:return L.trys.push([0,4,,5]),_=(0,o.isTokenInExpiryWindow)(),_?(A=(0,o.getRandomDelay)(),[4,(0,o.introduceDelay)(A)]):[3,3];case 1:return L.sent(),console.log("Heimdall: Fetching token - in expiry window"),[4,m(h,g,C,y,p,x,I,E)];case 2:L.sent(),L.label=3;case 3:return[3,5];case 4:throw S=L.sent(),S;case 5:return[2]}})})},v=function(y,p,h,g,C,x,I){return e(void 0,void 0,void 0,function(){var E,_,A,S,L,k;return t(this,function(D){switch(D.label){case 0:a=y,i=p,E=r.INITIAL_RETRY_DELAY,_=r.INITIAL_RETRY_DELAY,A=0,S=(0,o.getConfig)(a,i),console.log("Instance: Fetch Call"),D.label=1;case 1:return D.trys.push([1,3,,4]),[4,m(E,_,A,S,h,g,C,x,I)];case 2:return D.sent(),console.log("Heimdall: Interval Set on fetch token when fetch token is called:",c),clearInterval(c),c=setInterval(function(){return b(S,h,r.INITIAL_RETRY_DELAY,r.INITIAL_RETRY_DELAY,0,g,C,I)},r.REFETCH_CHECK_DELAY),L=function(){return e(void 0,void 0,void 0,function(){return t(this,function(N){switch(N.label){case 0:return[4,b(S,h,r.INITIAL_RETRY_DELAY,r.INITIAL_RETRY_DELAY,0,g,C,I)];case 1:return N.sent(),[2]}})})},console.log("Heimdall: Interval Set on fetch token:",c),(0,s.subscribeToOnlineEvent)(L),[3,4];case 3:return k=D.sent(),console.log("ERROR: Fetching token failed",k),[3,4];case 4:return[2]}})})};return Oo.fetchAccessToken=v,Oo}var nd;function rd(){if(nd)return Kn;nd=1;var e=ge&&ge.__assign||function(){return e=Object.assign||function(p){for(var h,g=1,C=arguments.length;g<C;g++){h=arguments[g];for(var x in h)Object.prototype.hasOwnProperty.call(h,x)&&(p[x]=h[x])}return p},e.apply(this,arguments)},t=ge&&ge.__awaiter||function(p,h,g,C){function x(I){return I instanceof g?I:new g(function(E){E(I)})}return new(g||(g=Promise))(function(I,E){function _(L){try{S(C.next(L))}catch(k){E(k)}}function A(L){try{S(C.throw(L))}catch(k){E(k)}}function S(L){L.done?I(L.value):x(L.value).then(_,A)}S((C=C.apply(p,h||[])).next())})},n=ge&&ge.__generator||function(p,h){var g={label:0,sent:function(){if(I[0]&1)throw I[1];return I[1]},trys:[],ops:[]},C,x,I,E;return E={next:_(0),throw:_(1),return:_(2)},typeof Symbol=="function"&&(E[Symbol.iterator]=function(){return this}),E;function _(S){return function(L){return A([S,L])}}function A(S){if(C)throw new TypeError("Generator is already executing.");for(;E&&(E=0,S[0]&&(g=0)),g;)try{if(C=1,x&&(I=S[0]&2?x.return:S[0]?x.throw||((I=x.return)&&I.call(x),0):x.next)&&!(I=I.call(x,S[1])).done)return I;switch(x=0,I&&(S=[S[0]&2,I.value]),S[0]){case 0:case 1:I=S;break;case 4:return g.label++,{value:S[1],done:!1};case 5:g.label++,x=S[1],S=[0];continue;case 7:S=g.ops.pop(),g.trys.pop();continue;default:if(I=g.trys,!(I=I.length>0&&I[I.length-1])&&(S[0]===6||S[0]===2)){g=0;continue}if(S[0]===3&&(!I||S[1]>I[0]&&S[1]<I[3])){g.label=S[1];break}if(S[0]===6&&g.label<I[1]){g.label=I[1],I=S;break}if(I&&g.label<I[2]){g.label=I[2],g.ops.push(S);break}I[2]&&g.ops.pop(),g.trys.pop();continue}S=h.call(p,g)}catch(L){S=[6,L],x=0}finally{C=I=0}if(S[0]&5)throw S[1];return{value:S[0]?S[1]:void 0,done:!0}}};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.hiverAxiosCall=Kn.performAxiosCall=void 0;var r=qu,o=Se,s=td(),a=nn,i=Fn,c,l=2,f=function(p,h){var g=h.fetchCsrfToken();p.formData?p.formData.append("_csrf_token",g):(p.data=p.data||{},p.data._csrf_token=g)},m=function(p,h){var g={};!p.method||p.method.toLowerCase()==="get"?g={params:p.params?p.params:p.data}:g=p.params?{params:p,data:p.data}:{data:p.data};var C=e(e({method:p.method,url:"".concat(p.root_url).concat(p.url),headers:p.headers},g),{withCredentials:h,responseType:(p==null?void 0:p.responseType)||""});return C};function b(p,h){return h===void 0&&(h=!0),t(this,void 0,void 0,function(){var g;return n(this,function(C){return g=m(p,h),[2,(0,r.default)(g).then(function(x){return x}).catch(function(x){throw x})]})})}Kn.performAxiosCall=b;function v(p,h,g){return t(this,void 0,void 0,function(){var C,x,I;return n(this,function(E){switch(E.label){case 0:return E.trys.push([0,6,,8]),p.authTokenFetchingInProgress?[3,2]:(p.authTokenFetchingInProgress=!0,C=p.appEnv,x=p.tier,[4,(0,s.fetchAccessToken)(C,x,h,p.tenantPlatform,p.getTokenForLogin,g)]);case 1:return E.sent(),p.authTokenFetchingInProgress=!1,[3,5];case 2:return[4,new Promise(function(_){return setTimeout(_,100)})];case 3:return E.sent(),console.log("Heimdall: Retrying fetchAccessToken after 100ms..."),[4,v(p,h,g)];case 4:E.sent(),E.label=5;case 5:return[3,8];case 6:return I=E.sent(),console.log("Error while fetching Auth Token :",I),p.authTokenFetchingInProgress=!1,[4,v(p,h,g)];case 7:return E.sent(),[3,8];case 8:return[2]}})})}function y(p,h,g,C,x){var I,E;return x===void 0&&(x=0),t(this,void 0,void 0,function(){var _,A,S,L,k,D,N;return n(this,function(M){switch(M.label){case 0:if(M.trys.push([0,4,,5]),!(g.getToken&&!(0,o.hasValidToken)(h)))return[3,2];if(_=p.appEnv,A=p.tier,!_||!A)throw Error("appEnv or tier missing : ".concat(_,"/").concat(A));return"userId"in h&&"usergroupId"in h?(S={userId:h.userId,usergroupId:h.usergroupId},[4,v(p,S,C)]):[3,2];case 1:M.sent(),M.label=2;case 2:return p.csrfToken&&f(h,g),L=p.tenantPlatform===i.TENANT_PLATFORM.HIVERWEB?i.TENANT_PLATFORM.HIVERWEB:i.TENANT_PLATFORM.GMAIL,h.headers=e(e({},h.headers),{"x-hiver-tenant":L,"x-hiver-userid":(0,a.getItemFromStorage)("hiverAuthUserId")||"0","x-hiver-usergroupid":(0,a.getItemFromStorage)("hiverAuthUserGroupId")||"0"}),g.getToken&&(c=(0,a.getItemFromStorage)("hiverAuthToken")||"",h.headers=e(e({},h.headers),{Authorization:"Bearer ".concat(c)})),console.log("Performing axios call for:",h),[4,b(h,p.withCredentials)];case 3:return k=M.sent(),h.onSuccess&&h.onSuccess(k),[2,k];case 4:if(D=M.sent(),N=((I=D.response)===null||I===void 0?void 0:I.status)===403||((E=D.request)===null||E===void 0?void 0:E.status)===403,x<l&&N)return(0,o.expireToken)(),[2,y(p,h,g,C,x+1)];if(x>=l&&N||!N)throw h.onFail&&h.onFail(D),console.log("ERROR: Reached make Axios",D),D;return[3,5];case 5:return[2]}})})}return Kn.hiverAxiosCall=y,Kn}var Fo={},je={},Ge={};Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.TIERS=Ge.APP_UI=Ge.CONFIG_HIVER=Ge.REFETCH_CHECK_DELAY=Ge.INITIAL_RETRY_DELAY=Ge.MAX_BACKOFF_LIMIT=Ge.MAX_CONFLICT_RETRY_DELAY=Ge.MAX_RETRY_DELAY=Ge.GET_METHOD=void 0,Ge.GET_METHOD="GET",Ge.MAX_RETRY_DELAY=18e4,Ge.MAX_CONFLICT_RETRY_DELAY=63e3,Ge.MAX_BACKOFF_LIMIT=8e3,Ge.INITIAL_RETRY_DELAY=1e3,Ge.REFETCH_CHECK_DELAY=168e4,Ge.CONFIG_HIVER={getToken:!1,fetchCsrfToken:function(){return""},isHiverApiDomain:!0},Ge.APP_UI={COLLAB_SPACE:"collab-space",DEFAULT:"default"},Ge.TIERS={DEV:"dev",SIT:"sit",PROD:"production"};var mt={};Object.defineProperty(mt,"__esModule",{value:!0}),mt.getProdHqConfig=mt.getProdApiConfig=mt.getSitHqConfig=mt.getSitApiConfig=mt.getDevHqConfig=mt.getDevApiConfig=void 0;var jr={heimdallTokenFetch:"/v1/token/get",heimdallLogin:"/v1/login/code",v2Login:"/api/auth/login/code"},vm=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api",apiEndpoints:jr}};mt.getDevApiConfig=vm;var Em=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api2",apiEndpoints:jr}};mt.getDevHqConfig=Em;var Im=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api"),apiEndpoints:jr}};mt.getSitApiConfig=Im;var wm=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api2"),apiEndpoints:jr}};mt.getSitHqConfig=wm;var _m=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall.hiverapi.com",apiEndpoints:jr}};mt.getProdApiConfig=_m;var Sm=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall2.hiverhq.com",apiEndpoints:jr}};mt.getProdHqConfig=Sm;var Am=ge&&ge.__awaiter||function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function i(f){try{l(r.next(f))}catch(m){a(m)}}function c(f){try{l(r.throw(f))}catch(m){a(m)}}function l(f){f.done?s(f.value):o(f.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},Tm=ge&&ge.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,a;return a={next:i(0),throw:i(1),return:i(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function i(l){return function(f){return c([l,f])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,o&&(s=l[0]&2?o.return:l[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,l[1])).done)return s;switch(o=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(f){l=[6,f],o=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(je,"__esModule",{value:!0}),je.expireToken=je.validateToken=je.validateAccount=je.getConfig=je.introduceDelay=je.isTokenInExpiryWindow=je.getStoredAuthData=je.setUserDetails=je.setTokenAndExpiry=je.getRandomDelay=je.hasValidToken=void 0;var Ri=Ge,nr=mt,od=function(){var e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4);return t},Mi=function(e){var t=parseInt(sessionStorage.getItem("hiverAuthUserId")||"0"),n=parseInt(sessionStorage.getItem("hiverAuthUserGroupId")||"0"),r=e.userId,o=e.usergroupId;return t===r&&o===n};je.validateAccount=Mi;var Lm=function(e){var t=Mi(e);return!sd()&&t};je.validateToken=Lm;var Om=function(){try{sessionStorage.removeItem("hiverAuthTokenExpiry")}catch{console.log("Heimdall: Unable to Remove token.")}};je.expireToken=Om;var Fm=function(e){console.log("Heimdall: checking if there is a valid token");var t=sessionStorage.getItem("hiverAuthTokenExpiry")||"",n=new Date(t),r=od(),o=Mi(e);return r<n&&o};je.hasValidToken=Fm;var km=function(){return Math.floor(Math.random()*6e4)+6e4};je.getRandomDelay=km;var Dm=function(e,t){if(!e||!t)throw new Error("User Id or user group Id not found in the response");sessionStorage.setItem("hiverAuthUserId",e),sessionStorage.setItem("hiverAuthUserGroupId",t)};je.setUserDetails=Dm;var Nm=function(e,t){if(!e)throw new Error("Token not found in the response");sessionStorage.setItem("hiverAuthToken",e),sessionStorage.setItem("hiverAuthTokenExpiry",t)};je.setTokenAndExpiry=Nm;var Rm=function(){var e=sessionStorage.getItem("hiverAuthTokenExpiry"),t=sessionStorage.getItem("hiverAuthToken"),n=sessionStorage.getItem("hiverAuthUserId"),r=sessionStorage.getItem("hiverAuthUserGroupId");return{token:t,expiryTime:e,userId:n,usergroupId:r}};je.getStoredAuthData=Rm;var sd=function(){var e=sessionStorage.getItem("hiverAuthTokenExpiry")||"";if(!e)return!0;var t=od(),n=new Date(e),r=4*60*1e3,o=n.getTime()-t.getTime()<r;return console.log({currentTime:t,expiry:n,isInExpiryWindow:o}),o};je.isTokenInExpiryWindow=sd;var Mm=function(e){return Am(void 0,void 0,void 0,function(){return Tm(this,function(t){switch(t.label){case 0:return[4,new Promise(function(n){return setTimeout(n,e)})];case 1:return t.sent(),[2]}})})};je.introduceDelay=Mm;var Pm=function(e,t,n){switch(t){case Ri.TIERS.SIT:return console.log("ISHIVERAPIDOMAIN:",n,(0,nr.getSitHqConfig)(e)),n?(0,nr.getSitApiConfig)(e):(0,nr.getSitHqConfig)(e);case Ri.TIERS.PROD:return n?(0,nr.getProdApiConfig)():(0,nr.getProdHqConfig)();case Ri.TIERS.DEV:default:return n?(0,nr.getDevApiConfig)():(0,nr.getDevHqConfig)()}};je.getConfig=Pm;var ko={},yn={},ad;function jm(){if(ad)return yn;ad=1;var e=ge&&ge.__awaiter||function(b,v,y,p){function h(g){return g instanceof y?g:new y(function(C){C(g)})}return new(y||(y=Promise))(function(g,C){function x(_){try{E(p.next(_))}catch(A){C(A)}}function I(_){try{E(p.throw(_))}catch(A){C(A)}}function E(_){_.done?g(_.value):h(_.value).then(x,I)}E((p=p.apply(b,v||[])).next())})},t=ge&&ge.__generator||function(b,v){var y={label:0,sent:function(){if(g[0]&1)throw g[1];return g[1]},trys:[],ops:[]},p,h,g,C;return C={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function x(E){return function(_){return I([E,_])}}function I(E){if(p)throw new TypeError("Generator is already executing.");for(;C&&(C=0,E[0]&&(y=0)),y;)try{if(p=1,h&&(g=E[0]&2?h.return:E[0]?h.throw||((g=h.return)&&g.call(h),0):h.next)&&!(g=g.call(h,E[1])).done)return g;switch(h=0,g&&(E=[E[0]&2,g.value]),E[0]){case 0:case 1:g=E;break;case 4:return y.label++,{value:E[1],done:!1};case 5:y.label++,h=E[1],E=[0];continue;case 7:E=y.ops.pop(),y.trys.pop();continue;default:if(g=y.trys,!(g=g.length>0&&g[g.length-1])&&(E[0]===6||E[0]===2)){y=0;continue}if(E[0]===3&&(!g||E[1]>g[0]&&E[1]<g[3])){y.label=E[1];break}if(E[0]===6&&y.label<g[1]){y.label=g[1],g=E;break}if(g&&y.label<g[2]){y.label=g[2],y.ops.push(E);break}g[2]&&y.ops.pop(),y.trys.pop();continue}E=v.call(b,y)}catch(_){E=[6,_],h=0}finally{p=g=0}if(E[0]&5)throw E[1];return{value:E[0]?E[1]:void 0,done:!0}}};Object.defineProperty(yn,"__esModule",{value:!0}),yn.getV2LoginCode=yn.getLoginToken=yn.getAccessToken=void 0;var n=Ge,r=ud(),o=je,s=function(b,v,y){var p=(0,o.getStoredAuthData)();return{root_url:b.heimdallUrl,url:b.apiEndpoints.heimdallTokenFetch,method:n.GET_METHOD,data:{user_id:v.userId,usergroup_id:v.usergroupId,access_token:(p==null?void 0:p.token)||"",source:y},withCredentials:!0}},a=function(b,v){return{root_url:v.heimdallUrl,url:v.apiEndpoints.heimdallLogin,method:n.GET_METHOD,data:{code:b},withCredentials:!0}},i=function(b){return parseInt(b,10)},c=function(b,v){return{root_url:b.v2Url,url:b.apiEndpoints.v2Login,method:n.GET_METHOD,withCredentials:!0,data:{usersession:i(localStorage.getItem("hiver-config.usersession")),app:v||n.APP_UI.DEFAULT}}},l=function(b,v,y,p){return e(void 0,void 0,void 0,function(){var h,g,C,x,I,E,_;return t(this,function(A){switch(A.label){case 0:return A.trys.push([0,4,,5]),(0,o.validateToken)(y)?[3,2]:(console.log("HEIMDALL: No valid token, fetching token"),h=s(v,y,p),[4,(0,r.makeAxiosCall)(h,b)]);case 1:return g=A.sent(),[2,{atToken:(x=g==null?void 0:g.data.at)===null||x===void 0?void 0:x.token,expiryTime:(I=g==null?void 0:g.data.at)===null||I===void 0?void 0:I.expires_at,userId:(E=g==null?void 0:g.data)===null||E===void 0?void 0:E.user_id,userGroupId:(_=g==null?void 0:g.data)===null||_===void 0?void 0:_.usergroup_id}];case 2:return console.log("Heimdall: Valid token already exists"),[2,{}];case 3:return[3,5];case 4:throw C=A.sent(),C;case 5:return[2]}})})};yn.getAccessToken=l;var f=function(b,v,y){return e(void 0,void 0,void 0,function(){var p,h,g,C,x,I,E;return t(this,function(_){switch(_.label){case 0:p=a(b,y),_.label=1;case 1:return _.trys.push([1,3,,4]),[4,(0,r.makeAxiosCall)(p,v)];case 2:return h=_.sent(),[2,{userId:(C=h==null?void 0:h.data)===null||C===void 0?void 0:C.user_id,userGroupId:(x=h==null?void 0:h.data)===null||x===void 0?void 0:x.usergroup_id,atToken:(I=h==null?void 0:h.data.at)===null||I===void 0?void 0:I.token,expiryTime:(E=h==null?void 0:h.data.at)===null||E===void 0?void 0:E.expires_at}];case 3:throw g=_.sent(),g;case 4:return[2]}})})};yn.getLoginToken=f;var m=function(b,v,y){return e(void 0,void 0,void 0,function(){var p,h,g;return t(this,function(C){switch(C.label){case 0:return C.trys.push([0,2,,3]),console.log("ERROR debug: in getV2loginCode:",y),p=c(v,y),[4,(0,r.makeAxiosCall)(p,b)];case 1:return h=C.sent(),console.log("DEBUG HEIMDALL: local storage:",h==null?void 0:h.data),[2,h==null?void 0:h.data.code];case 2:throw g=C.sent(),g;case 3:return[2]}})})};return yn.getV2LoginCode=m,yn}var id;function cd(){if(id)return ko;id=1;var e=ge&&ge.__awaiter||function(v,y,p,h){function g(C){return C instanceof p?C:new p(function(x){x(C)})}return new(p||(p=Promise))(function(C,x){function I(A){try{_(h.next(A))}catch(S){x(S)}}function E(A){try{_(h.throw(A))}catch(S){x(S)}}function _(A){A.done?C(A.value):g(A.value).then(I,E)}_((h=h.apply(v,y||[])).next())})},t=ge&&ge.__generator||function(v,y){var p={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},h,g,C,x;return x={next:I(0),throw:I(1),return:I(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function I(_){return function(A){return E([_,A])}}function E(_){if(h)throw new TypeError("Generator is already executing.");for(;x&&(x=0,_[0]&&(p=0)),p;)try{if(h=1,g&&(C=_[0]&2?g.return:_[0]?g.throw||((C=g.return)&&C.call(g),0):g.next)&&!(C=C.call(g,_[1])).done)return C;switch(g=0,C&&(_=[_[0]&2,C.value]),_[0]){case 0:case 1:C=_;break;case 4:return p.label++,{value:_[1],done:!1};case 5:p.label++,g=_[1],_=[0];continue;case 7:_=p.ops.pop(),p.trys.pop();continue;default:if(C=p.trys,!(C=C.length>0&&C[C.length-1])&&(_[0]===6||_[0]===2)){p=0;continue}if(_[0]===3&&(!C||_[1]>C[0]&&_[1]<C[3])){p.label=_[1];break}if(_[0]===6&&p.label<C[1]){p.label=C[1],C=_;break}if(C&&p.label<C[2]){p.label=C[2],p.ops.push(_);break}C[2]&&p.ops.pop(),p.trys.pop();continue}_=y.call(v,p)}catch(A){_=[6,A],g=0}finally{h=C=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}};Object.defineProperty(ko,"__esModule",{value:!0}),ko.fetchToken=void 0;var n=jm(),r=Ge,o=je,s,a,i,c=function(v,y,p){return p===void 0&&(p=r.APP_UI.DEFAULT),e(void 0,void 0,void 0,function(){var h,g,C,x,I,E,_,A,S;return t(this,function(L){switch(L.label){case 0:h=2,L.label=1;case 1:return L.trys.push([1,4,,9]),console.log("ERROR debug: in login:",p),[4,(0,n.getV2LoginCode)(r.CONFIG_HIVER,v,p)];case 2:return g=L.sent(),[4,(0,n.getLoginToken)(g,r.CONFIG_HIVER,v)];case 3:return C=L.sent(),x=C.userId,I=C.userGroupId,E=C.atToken,_=C.expiryTime,(0,o.setTokenAndExpiry)(E,_),(0,o.setUserDetails)(x,I),[3,9];case 4:A=L.sent(),console.log("ERROR debug: in error login:",A,p),S=y,L.label=5;case 5:return S<h?[4,c(v,S+1,p)]:[3,8];case 6:L.sent(),L.label=7;case 7:return S++,[3,5];case 8:throw A;case 9:return[2]}})})},l=function(v,y,p){return e(void 0,void 0,void 0,function(){var h,g,C,x;return t(this,function(I){switch(I.label){case 0:return y<r.MAX_CONFLICT_RETRY_DELAY?[4,new Promise(function(E){return setTimeout(E,v)})]:[3,3];case 1:return I.sent(),y+=v,v*2<=r.MAX_BACKOFF_LIMIT?v*=2:v=r.MAX_BACKOFF_LIMIT,console.log("Heimdall: Fetch token post doubling conflict retry delay",v),h=p.retryDelay,g=p.configs,C=p.api_params,x=p.appUI,[4,f(h,v,y,g,C,x)];case 2:I.sent(),I.label=3;case 3:return[2]}})})},f=function(v,y,p,h,g,C,x){return C===void 0&&(C="default"),e(void 0,void 0,void 0,function(){var I,E,_,A,S,L,k,D,N,M,V,J,$,H;return t(this,function(X){switch(X.label){case 0:return X.trys.push([0,2,,12]),console.log("Heimdall: Interval Set on fetch token in fetchAndSaveToken:",i),[4,(0,n.getAccessToken)(r.CONFIG_HIVER,h,g,C)];case 1:return I=X.sent(),E=I.atToken,_=I.expiryTime,A=I.userId,S=I.userGroupId,E&&_&&(0,o.setTokenAndExpiry)(E,_),A&&S&&(0,o.setUserDetails)(A,S),v=r.INITIAL_RETRY_DELAY,y=r.INITIAL_RETRY_DELAY,p=0,[3,12];case 2:return L=X.sent(),console.log("ERROR: Heimdall fetch token",L),((N=L.response)===null||N===void 0?void 0:N.status)===401||((M=L.request)===null||M===void 0?void 0:M.status)===401?(k=1,[4,c(h,k,x)]):[3,4];case 3:return X.sent(),[3,11];case 4:return((V=L.response)===null||V===void 0?void 0:V.status)===409||((J=L.request)===null||J===void 0?void 0:J.status)===409?(console.log("Heimdall: Fetching token post 409 in fetch And Save Token"),D={retryDelay:v,configs:h,api_params:g,appUI:x},[4,l(y,p,D)]):[3,6];case 5:if(X.sent(),p>=r.MAX_CONFLICT_RETRY_DELAY)throw L;return[3,11];case 6:if(!((($=L.response)===null||$===void 0?void 0:$.status)===422||((H=L.request)===null||H===void 0?void 0:H.status)===422))return[3,7];throw console.log("ERROR: Throwing error",L.response.status),L;case 7:return v<=r.MAX_RETRY_DELAY?[4,new Promise(function(q){return setTimeout(q,v)})]:[3,10];case 8:return X.sent(),v*=2,console.log("Heimdall: Fetch token post doubling retry delay",v),[4,f(v,y,p,h,g,x)];case 9:return X.sent(),[3,11];case 10:throw L;case 11:return[3,12];case 12:return[2]}})})},m=function(v,y,p,h,g,C){return p===void 0&&(p=r.INITIAL_RETRY_DELAY),h===void 0&&(h=r.INITIAL_RETRY_DELAY),g===void 0&&(g=0),e(void 0,void 0,void 0,function(){var x,I,E;return t(this,function(_){switch(_.label){case 0:return _.trys.push([0,4,,5]),x=(0,o.isTokenInExpiryWindow)(),x?(I=(0,o.getRandomDelay)(),[4,(0,o.introduceDelay)(I)]):[3,3];case 1:return _.sent(),console.log("Heimdall: Fetching token - in expiry window"),[4,f(p,h,g,v,y,C)];case 2:_.sent(),_.label=3;case 3:return[3,5];case 4:throw E=_.sent(),E;case 5:return[2]}})})},b=function(v,y,p,h,g,C){return e(void 0,void 0,void 0,function(){var x,I,E,_,A;return t(this,function(S){switch(S.label){case 0:s=v,a=y,x=r.INITIAL_RETRY_DELAY,I=r.INITIAL_RETRY_DELAY,E=0,_=(0,o.getConfig)(s,a,h),S.label=1;case 1:return S.trys.push([1,3,,4]),[4,f(x,I,E,_,p,g,C)];case 2:return S.sent(),console.log("Heimdall: Interval Set on fetch token when fetch token is called:",i),clearInterval(i),i=setInterval(function(){return m(_,p)},r.REFETCH_CHECK_DELAY),console.log("Heimdall: Interval Set on fetch token:",i),window.addEventListener("online",function(){return e(void 0,void 0,void 0,function(){return t(this,function(L){switch(L.label){case 0:return console.log("Online status detected. Fetching token..."),[4,m(_,p)];case 1:return L.sent(),[2]}})})}),[3,4];case 3:throw A=S.sent(),A;case 4:return[2]}})})};return ko.fetchToken=b,ko}var ld;function ud(){if(ld)return Fo;ld=1;var e=ge&&ge.__assign||function(){return e=Object.assign||function(b){for(var v,y=1,p=arguments.length;y<p;y++){v=arguments[y];for(var h in v)Object.prototype.hasOwnProperty.call(v,h)&&(b[h]=v[h])}return b},e.apply(this,arguments)},t=ge&&ge.__awaiter||function(b,v,y,p){function h(g){return g instanceof y?g:new y(function(C){C(g)})}return new(y||(y=Promise))(function(g,C){function x(_){try{E(p.next(_))}catch(A){C(A)}}function I(_){try{E(p.throw(_))}catch(A){C(A)}}function E(_){_.done?g(_.value):h(_.value).then(x,I)}E((p=p.apply(b,v||[])).next())})},n=ge&&ge.__generator||function(b,v){var y={label:0,sent:function(){if(g[0]&1)throw g[1];return g[1]},trys:[],ops:[]},p,h,g,C;return C={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function x(E){return function(_){return I([E,_])}}function I(E){if(p)throw new TypeError("Generator is already executing.");for(;C&&(C=0,E[0]&&(y=0)),y;)try{if(p=1,h&&(g=E[0]&2?h.return:E[0]?h.throw||((g=h.return)&&g.call(h),0):h.next)&&!(g=g.call(h,E[1])).done)return g;switch(h=0,g&&(E=[E[0]&2,g.value]),E[0]){case 0:case 1:g=E;break;case 4:return y.label++,{value:E[1],done:!1};case 5:y.label++,h=E[1],E=[0];continue;case 7:E=y.ops.pop(),y.trys.pop();continue;default:if(g=y.trys,!(g=g.length>0&&g[g.length-1])&&(E[0]===6||E[0]===2)){y=0;continue}if(E[0]===3&&(!g||E[1]>g[0]&&E[1]<g[3])){y.label=E[1];break}if(E[0]===6&&y.label<g[1]){y.label=g[1],g=E;break}if(g&&y.label<g[2]){y.label=g[2],y.ops.push(E);break}g[2]&&y.ops.pop(),y.trys.pop();continue}E=v.call(b,y)}catch(_){E=[6,_],h=0}finally{p=g=0}if(E[0]&5)throw E[1];return{value:E[0]?E[1]:void 0,done:!0}}};Object.defineProperty(Fo,"__esModule",{value:!0}),Fo.makeAxiosCall=void 0;var r=qu,o=je,s=cd(),a,i=2,c=function(b,v){var y=v.fetchCsrfToken();b.formData?b.formData.append("_csrf_token",y):(b.data=b.data||{},b.data._csrf_token=y)},l=function(b){var v=!b.method||b.method.toLowerCase()==="get"?{params:b.data}:{data:b.data},y=e(e({method:b.method,url:"".concat(b.root_url).concat(b.url),headers:b.headers},v),{withCredentials:b.withCredentials,responseType:(b==null?void 0:b.responseType)||""});return y};function f(b){return t(this,void 0,void 0,function(){var v;return n(this,function(y){return v=l(b),[2,(0,r.default)(v).then(function(p){return p}).catch(function(p){throw p})]})})}function m(b,v,y,p){var h,g;return p===void 0&&(p=0),t(this,void 0,void 0,function(){var C,x,I,E,_,A;return n(this,function(S){switch(S.label){case 0:if(S.trys.push([0,4,,5]),!(v.getToken&&!(0,o.hasValidToken)(b)))return[3,2];if(C=b.app_env,x=b.tier,!C||!x)throw Error("app_env or tier missing : ".concat(C,"/").concat(x));return"userId"in b&&"usergroupId"in b?(I={userId:b.userId,usergroupId:b.usergroupId},typeof v.isHiverApiDomain!="boolean"&&(v.isHiverApiDomain=!0),[4,(0,s.fetchToken)(C,x,I,v.isHiverApiDomain,y)]):[3,2];case 1:S.sent(),S.label=2;case 2:return b.csrfToken&&c(b,v),v.getToken&&(a=sessionStorage.getItem("hiverAuthToken")||"",b.headers=e(e({},b.headers),{Authorization:"Bearer ".concat(a)})),[4,f(b)];case 3:return E=S.sent(),b.onSuccess&&b.onSuccess(E),[2,E];case 4:if(_=S.sent(),A=((h=_.response)===null||h===void 0?void 0:h.status)===403||((g=_.request)===null||g===void 0?void 0:g.status)===403,p<i&&A)return(0,o.expireToken)(),[2,m(b,v,y,p+1)];if(p>=i&&A||!A)throw b.onFail&&b.onFail(_),console.log("ERROR: Reached make Axios",_),_;return[3,5];case 5:return[2]}})})}return Fo.makeAxiosCall=m,Fo}(function(e){var t=ge&&ge.__awaiter||function(v,y,p,h){function g(C){return C instanceof p?C:new p(function(x){x(C)})}return new(p||(p=Promise))(function(C,x){function I(A){try{_(h.next(A))}catch(S){x(S)}}function E(A){try{_(h.throw(A))}catch(S){x(S)}}function _(A){A.done?C(A.value):g(A.value).then(I,E)}_((h=h.apply(v,y||[])).next())})},n=ge&&ge.__generator||function(v,y){var p={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},h,g,C,x;return x={next:I(0),throw:I(1),return:I(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function I(_){return function(A){return E([_,A])}}function E(_){if(h)throw new TypeError("Generator is already executing.");for(;x&&(x=0,_[0]&&(p=0)),p;)try{if(h=1,g&&(C=_[0]&2?g.return:_[0]?g.throw||((C=g.return)&&C.call(g),0):g.next)&&!(C=C.call(g,_[1])).done)return C;switch(g=0,C&&(_=[_[0]&2,C.value]),_[0]){case 0:case 1:C=_;break;case 4:return p.label++,{value:_[1],done:!1};case 5:p.label++,g=_[1],_=[0];continue;case 7:_=p.ops.pop(),p.trys.pop();continue;default:if(C=p.trys,!(C=C.length>0&&C[C.length-1])&&(_[0]===6||_[0]===2)){p=0;continue}if(_[0]===3&&(!C||_[1]>C[0]&&_[1]<C[3])){p.label=_[1];break}if(_[0]===6&&p.label<C[1]){p.label=C[1],C=_;break}if(C&&p.label<C[2]){p.label=C[2],p.ops.push(_);break}C[2]&&p.ops.pop(),p.trys.pop();continue}_=y.call(v,p)}catch(A){_=[6,A],g=0}finally{h=C=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}};Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_INIT_CONFIG_HIVER=e.TENANT_PLATFORM=e.fetchToken=e.makeAxiosCall=e.Bifrost=void 0;var r=rd(),o=td(),s=Fn;Object.defineProperty(e,"TENANT_PLATFORM",{enumerable:!0,get:function(){return s.TENANT_PLATFORM}}),Object.defineProperty(e,"DEFAULT_INIT_CONFIG_HIVER",{enumerable:!0,get:function(){return s.DEFAULT_INIT_CONFIG_HIVER}});var a=Uu(),i=Se,c=nn,l=ud();Object.defineProperty(e,"makeAxiosCall",{enumerable:!0,get:function(){return l.makeAxiosCall}});var f=cd();Object.defineProperty(e,"fetchToken",{enumerable:!0,get:function(){return f.fetchToken}});var m=rn,b=function(){function v(y,p,h,g,C,x){h===void 0&&(h=s.TENANT_PLATFORM.GMAIL),g===void 0&&(g=null),C===void 0&&(C=!0),x===void 0&&(x=!1),this.setEnvironment(),this.appEnv=y,this.tier=p,this.tenantPlatform=h,this.authTokenFetchingInProgress=!1,this.getTokenForLogin=g,this.withCredentials=C,this.csrfToken=x}return v.prototype.setEnvironment=function(){typeof window<"u"&&window.document?(0,m.setValue)("PLATFORM",s.PLATFORM.WEB):(0,m.setValue)("PLATFORM",s.PLATFORM.MOBILE)},v.prototype.hiverAxios=function(y,p,h,g){return p===void 0&&(p=s.DEFAULT_INIT_CONFIG_HIVER),t(this,void 0,void 0,function(){var C,x;return n(this,function(I){switch(I.label){case 0:return I.trys.push([0,4,,5]),g&&g<2?(C={userId:y.userId,usergroupId:y.usergroupId,apiRetry:g},console.log("THIS IS THE TENNANTPLAORM -> ",this.tenantPlatform),[4,(0,o.fetchAccessToken)(this.appEnv,this.tier,C,this.tenantPlatform,this.getTokenForLogin,s.API_CALL_ORIGIN.API_RETRY)]):[3,2];case 1:I.sent(),I.label=2;case 2:return[4,(0,r.hiverAxiosCall)(this,y,p,h)];case 3:return[2,I.sent()];case 4:throw x=I.sent(),console.log("ERROR: Axios call failed",x),x;case 5:return[2]}})})},v.prototype.fetchAuthToken=function(y,p,h){return t(this,void 0,void 0,function(){var g;return n(this,function(C){switch(C.label){case 0:return C.trys.push([0,4,7,8]),this.authTokenFetchingInProgress?[3,2]:(this.authTokenFetchingInProgress=!0,[4,(0,o.fetchAccessToken)(this.appEnv,this.tier,y,this.tenantPlatform,this.getTokenForLogin,p,h)]);case 1:return C.sent(),[3,3];case 2:console.log("Heimdall: AuthToken Fetching InProgress",this.authTokenFetchingInProgress),C.label=3;case 3:return[3,8];case 4:return g=C.sent(),console.log("ERROR: Fetching token failed",g),this.authTokenFetchingInProgress=!1,[4,new Promise(function(x){return setTimeout(x,100)})];case 5:return C.sent(),console.log("Heimdall: Retrying fetchAccessToken after 100ms..."),[4,this.fetchAuthToken(y,p,h)];case 6:return C.sent(),[3,8];case 7:return this.authTokenFetchingInProgress=!1,[7];case 8:return[2]}})})},v.prototype.logout=function(){return t(this,void 0,void 0,function(){var y,p;return n(this,function(h){switch(h.label){case 0:return h.trys.push([0,2,,3]),y=(0,i.getConfig)(this.appEnv,this.tier),[4,(0,a.logoutFromHeimdall)(y,this.tenantPlatform)];case 1:return h.sent(),(0,c.removeItemFromStorage)("hiverAuthToken"),(0,c.removeItemFromStorage)("hiverAuthTokenExpiry"),(0,c.removeItemFromStorage)("hiverAuthUserId"),(0,c.removeItemFromStorage)("hiverAuthUserGroupId"),[3,3];case 2:throw p=h.sent(),console.error("Heimdall: Logout failed",p),p;case 3:return[2]}})})},v.prototype.isTokenFetchingInProgress=function(){return this.authTokenFetchingInProgress},v}();e.Bifrost=b})(pi);const Zt={userId:"",userGroupId:"",baseUrl:"",appEnv:"",tier:"",bifrost:null,isInitiated:!1},Xt=()=>{if(!Zt.isInitiated)return null;if(!Zt.baseUrl)throw new Error("Base url is not setup. please call the initConnectorsBifrost function with the appropriate value");return Zt},Bm=({baseUrl:e,appEnv:t,tier:n,userId:r,userGroupId:o,tenantPlatform:s=pi.TENANT_PLATFORM.GMAIL,withCredentials:a=!0,getTokenForLogin:i})=>{Zt.baseUrl=e,Zt.appEnv=t,Zt.tier=n,Zt.userGroupId=o,Zt.userId=r,Zt.tenantPlatform=s,Zt.bifrost=new pi.Bifrost(t,n,s,i,a),Zt.isInitiated=!0},we=(({configHiver:e})=>async n=>{const r=Xt();if(!r)throw new Error("Please call initConnectorsBifrost before making any api calls");const{bifrost:o,userGroupId:s,userId:a}=r,{url:i,method:c,root_url:l}=n,m={root_url:(l||r.baseUrl)+((n==null?void 0:n.prefix)||""),url:i,method:c,headers:n==null?void 0:n.headers,onSuccess:n==null?void 0:n.onSuccess,onFail:n==null?void 0:n.onFail,data:n==null?void 0:n.data,params:n==null?void 0:n.params,formData:n==null?void 0:n.formData,responseType:n==null?void 0:n.responseType,userId:Number(a),usergroupId:Number(s)};try{return await(o==null?void 0:o.hiverAxios(m,{...e,isHiverApiDomain:!0}))}catch(b){throw console.error("API call failed with error: ",b),b}})({configHiver:{getToken:!0,fetchCsrfToken:()=>"",isHiverApiDomain:!0},withCredentials:!0}),Vm=e=>T.createElement("svg",{width:17,height:17,viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_1180_840)"},T.createElement("path",{d:"M5.16667 10.12H9.83333V11.4533H5.16667V10.12ZM5.16667 7.45329H11.8333V8.78662H5.16667V7.45329ZM5.16667 4.78662H11.8333V6.11995H5.16667V4.78662ZM13.1667 2.11995H10.38C10.1 1.34662 9.36667 0.786621 8.5 0.786621C7.63333 0.786621 6.9 1.34662 6.62 2.11995H3.83333C3.74 2.11995 3.65333 2.12662 3.56667 2.14662C3.30667 2.19995 3.07333 2.33329 2.89333 2.51329C2.77333 2.63329 2.67333 2.77995 2.60667 2.93995C2.54 3.09329 2.5 3.26662 2.5 3.45329V12.7866C2.5 12.9666 2.54 13.1466 2.60667 13.3066C2.67333 13.4666 2.77333 13.6066 2.89333 13.7333C3.07333 13.9133 3.30667 14.0466 3.56667 14.1C3.65333 14.1133 3.74 14.12 3.83333 14.12H13.1667C13.9 14.12 14.5 13.52 14.5 12.7866V3.45329C14.5 2.71995 13.9 2.11995 13.1667 2.11995ZM8.5 1.95329C8.77333 1.95329 9 2.17995 9 2.45329C9 2.72662 8.77333 2.95329 8.5 2.95329C8.22667 2.95329 8 2.72662 8 2.45329C8 2.17995 8.22667 1.95329 8.5 1.95329ZM13.1667 12.7866H3.83333V3.45329H13.1667V12.7866Z",fill:"#343C45"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_1180_840"},T.createElement("rect",{width:16,height:16,fill:"white",transform:"translate(0.5 0.120117)"})))),Gm=e=>T.createElement("svg",{width:24,height:22,viewBox:"0 0 24 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("rect",{x:3.63636,y:2.27393,width:15.2727,height:17.2308,rx:2.90909,fill:"#F6C035"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.4621 12.0506C22.1745 11.7669 21.7845 11.6074 21.3779 11.6074C20.9712 11.6074 20.5812 11.7669 20.2937 12.0506L19.9323 12.4079L22.4626 14.9057L22.8235 14.549C22.9659 14.4084 23.0789 14.2415 23.156 14.0578C23.2331 13.8741 23.2727 13.6773 23.2727 13.4784C23.2727 13.2796 23.2331 13.0827 23.156 12.8991C23.0789 12.7154 22.9659 12.5485 22.8235 12.4079L22.4621 12.0506ZM21.7393 15.6192L19.209 13.1214L14.5624 17.7088C14.4607 17.8092 14.3897 17.9358 14.3574 18.0742L13.8314 20.3222C13.8118 20.4056 13.814 20.4927 13.8379 20.575C13.8618 20.6574 13.9065 20.7324 13.9679 20.793C14.0293 20.8535 14.1052 20.8977 14.1887 20.9213C14.2721 20.9448 14.3603 20.9471 14.4448 20.9277L16.7226 20.409C16.8626 20.377 16.9906 20.3069 17.0922 20.2066L21.7393 15.6192Z",fill:"#FFE298"}),T.createElement("rect",{x:6.54546,y:6.58154,width:10.1818,height:1.4359,rx:.717949,fill:"#FFDC83"}),T.createElement("rect",{x:6.54546,y:10.1714,width:10.1818,height:1.4359,rx:.717949,fill:"#FFDC83"}),T.createElement("rect",{x:6.54546,y:13.7612,width:6.54545,height:1.4359,rx:.717949,fill:"#FFDC83"})),Hm=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_825_73646)"},T.createElement("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z",fill:"#6F7C90"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_825_73646"},T.createElement("rect",{width:24,height:24,fill:"white"})))),Wm="Rate your experience with Hiver Apps",Zm="Share feedback on Apps",Xm="Got any feedback?",dd="https://txeep2wshyx.typeform.com/to/RuOwF9SG",zm="https://txeep2wshyx.typeform.com/to/Tfa8IrCd",Ym="https://cdn.hiverhq.com/chat-support/hiver-chat.html",Jm="enable_connectors_clicked",qm="learn_more_clicked",$m="connector_card_expand_clicked",Qm="connector_card_collapsed_clicked",Um="connector_card_refresh_clicked",Km="connector_cards_loaded",e3="connector_whats_new_card_viewed",t3="connector_whats_new_explore_now_clicked",n3="connector_whats_new_learn_more_clicked",r3="connector_whats_new_dismissed",o3="connector_create_new_object_clicked",s3="connector_link_new_object_clicked",a3="connector_new_object_created_by_form",i3="connector_new_object_linked_by_form",c3="connector_object_unlinked_by_form",l3="connector_link_preview_clicked",u3="connector_create_panel_cancel_clicked",d3="connector_create_panel_back_clicked",f3="card_loaded_on_click",p3="card_loaded",h3="schedule_call_clicked",g3="schedule_call_cross_clicked",fd="CONNECTOR_EDIT_CLICKED",m3="CONNECTOR_EDIT_REQUEST_SEND",b3="CONNECTOR_EDIT_CANCELLED",y3="CONNECTOR_EDIT_BACK_CLICKED",C3="CONNECTOR_EDIT_SUCCESS",x3="connector_video_clicked",v3="connector_card_error",Pi="got_any_feedback_clicked",E3="connector_deeplink_clicked",I3="search_bar_tapped",w3="search_suggestions_selected",_3="search_initiated",S3="no_results_found",A3="search_results_found",T3="search_result_selected",L3="search_result_linked",O3="feedback_closed_clicked",F3="help_btn_clicked",k3="connector_chat_support_clicked",D3="add_custom_field_clicked",N3="add_custom_field_success",R3="update_custom_field_success",pd="clicked_on_lookup_config",M3="clicked_on_lookup_field",P3="saved_lookup_config",j3={userEmail:"",email:"",baseUrls:{},currentSmIds:[],metaData:void 0,availableFeatures:{},sendTrackingEvent:()=>{},conversationId:void 0,isAdmin:!1,connectorFunctions:{redirectToAdmin:()=>{}},stackingContext:{}},Be=w.createContext(j3),Ns="hiver_connectors",ji={NOT_FOUND:404},B3="ftr-connector-blue-dot",hd="ftr-connectors-write-flow",V3="ftr-connectors-enhancements",G3="ftr-connector-schedule-call-agent",H3="ftr-connectors-edit",W3="enableAllConnectorFtr",Z3="ftr-cards-open-state",X3="ftr-connectors-global-search",z3="ftr-connectors-smart-suggestions",Y3="ftr-connectors-email-selection",J3="ftr-connector-agent-feedback",Rs="ftr-connector-unified-view",q3="ftr-connectors-expanded-form",gd="ftr-apps-lookup-revamp",$3="ftr-ci-configurable-fields",md="Please refresh and try again",Q3="No data available",Ms="-",bd="Refresh",yd="Minimize",Bi="Expand",Cd="Connectors",Vi="Apps",U3="Collapse",K3="Close",xd="Link",e5="Create",t5="Update",vd="Unlink",Ed="Edit",Gi="Cancel",Id="Create new object",wd="Link existing object",n5="Are you sure you want to unlink this object?",r5="The object will be removed from this conversation for all users. However the object will still be available on {{connectorName}} if you'd like to link it back in the future.",o5="Edit card",s5="bullet_list",a5="Expanded",i5="Collapsed",_d="Something is wrong with the {{connector_name}} Connector setup. Please check our help guide <>here<>.",Sd="UNKNOWN_ERROR",c5="https://help.hiverhq.com/custom-connectors/common-connector-errors",Ad={MAIN_BUTTON:"main_button",ICON:"create_icon"},l5=" Add custom field",Hi=e=>{let t=localStorage.getItem(Ns);return t=t?JSON.parse(t):!1,t==null?void 0:t[e]},u5=e=>!!Hi(e),Td=()=>{const{userId:e=""}=Xt()||{};return String(e)},d5=(e,t=Td())=>{const n=Hi(e);return((n==null?void 0:n.isExtensionNew)??[]).includes(t)},Wi=(e,t=!1,n=!1)=>{const r=Td(),o=Hi(e);if(t||!o){localStorage.removeItem(Ns);const s={[e]:{...!n&&{isExtensionNew:t?[]:[r]},...n&&{extensionExpand:[r]}}};localStorage.setItem(Ns,JSON.stringify(s));return}else{const s=(o==null?void 0:o.isExtensionNew)??[],a=(o==null?void 0:o.extensionExpand)??[],i={[e]:{...o,...!n&&{isExtensionNew:[...new Set([...s,r])]},...n&&{extensionExpand:[...new Set([...a,r])]}}};localStorage.setItem(Ns,JSON.stringify(i));return}},et=(e={},t)=>e&&typeof e[t]>"u"?(e==null?void 0:e[W3])===!0:(e==null?void 0:e[t])===!0,ct=(e,t)=>e.replace(/:(\w+)/g,(n,r)=>String(t[r])||""),Ld=(e,t,n,r=!1)=>{var s;const o={};return o.card_title=t,o.card_state=n?a5:i5,r&&e?(o.data_state=e==null?void 0:e.status,o.connector_names=(s=e==null?void 0:e.data)==null?void 0:s.connectorNames):e&&(o.data_state=(e==null?void 0:e.status)||"unknown_error"),o},Od=e=>{switch(e.cardType){case"flat":if(Array.isArray(e.data.flatDisplay)){const t=e.data.flatDisplay.filter(n=>Number(n.statusCode)!==ji.NOT_FOUND).sort((n,r)=>n.priority-r.priority);e.data.flatDisplay={data:t}}else{const t=e.data.flatDisplay.data.filter(n=>Number(n.statusCode)!==ji.NOT_FOUND).sort((n,r)=>n.priority-r.priority);e.data.flatDisplay.data=t}break;case"flat_with_list":e.data.listItems.fields=e.data.listItems.fields.map(t=>Array.isArray(t)?{data:t.sort((r,o)=>r.priority-o.priority)}:{data:t.data.sort((r,o)=>r.priority-o.priority),externalResourceId:t.externalResourceId});break}return e},f5=e=>{if(!e||Object.keys(e).length===0)return[];const t=new Set;return Object.values(e).forEach(n=>{n.connectorNames&&n.connectorNames.forEach(r=>t.add(r))}),Array.from(t)},Zi=({url:e,params:t})=>{const n=Object.entries(t).reduce((o,[s,a])=>(a!==void 0&&a!==""&&a!==null&&(o[s]=a),o),{}),r=new URL(e);return Object.entries(n).forEach(([o,s])=>{r.searchParams.set(o,s)}),r.toString()};function Fd(e,t){return e.length>t?e.substring(0,t)+"...":e}const p5=e=>T.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_1187_180)"},T.createElement("path",{d:"M18.3333 7.81995L12.3417 7.30329L10 1.78662L7.65833 7.31162L1.66666 7.81995L6.21666 11.7616L4.85 17.62L10 14.5116L15.15 17.62L13.7917 11.7616L18.3333 7.81995ZM10 12.9533L6.86666 14.845L7.7 11.2783L4.93333 8.87829L8.58333 8.56162L10 5.20329L11.425 8.56995L15.075 8.88662L12.3083 11.2866L13.1417 14.8533L10 12.9533Z",fill:"#4D596C"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_1187_180"},T.createElement("rect",{width:20,height:20,fill:"white",transform:"translate(0 0.120117)"})))),h5=e=>T.createElement("svg",{width:21,height:20,viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_847_49587)"},T.createElement("path",{d:"M10.6668 14.392L15.8168 17.5003L14.4502 11.642L19.0002 7.70033L13.0085 7.19199L10.6668 1.66699L8.32516 7.19199L2.3335 7.70033L6.8835 11.642L5.51683 17.5003L10.6668 14.392Z",fill:"#FFE250"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_847_49587"},T.createElement("rect",{width:20,height:20,fill:"white",transform:"translate(0.666992)"})))),g5=d.keyframes`
30
+ <%s key={someKey} {...props} />`,ml,Lr,YS,Lr),ts[Lr+ml]=!0}}return O===r?pl($e):Ma($e),$e}}function hl(O,Z,Q){return ns(O,Z,Q,!0)}function Pa(O,Z,Q){return ns(O,Z,Q,!1)}var gl=Pa,rs=hl;yo.Fragment=r,yo.jsx=gl,yo.jsxs=rs}()),yo}process.env.NODE_ENV==="production"?Ga.exports=n2():Ga.exports=r2();var u=Ga.exports;function Tl(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Tl(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function An(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Tl(e))&&(r&&(r+=" "),r+=t);return r}const Co=e=>typeof e=="number"&&!isNaN(e),Jn=e=>typeof e=="string",wt=e=>typeof e=="function",as=e=>Jn(e)||wt(e)?e:null,Ha=e=>w.isValidElement(e)||Jn(e)||wt(e)||Co(e);function o2(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:o}=e;requestAnimationFrame(()=>{o.minHeight="initial",o.height=r+"px",o.transition=`all ${n}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,n)})})}function is(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:o=!0,collapseDuration:s=300}=e;return function(a){let{children:i,position:c,preventExitTransition:l,done:f,nodeRef:m,isIn:b,playToast:v}=a;const y=r?`${t}--${c}`:t,p=r?`${n}--${c}`:n,h=w.useRef(0);return w.useLayoutEffect(()=>{const g=m.current,C=y.split(" "),x=I=>{I.target===m.current&&(v(),g.removeEventListener("animationend",x),g.removeEventListener("animationcancel",x),h.current===0&&I.type!=="animationcancel"&&g.classList.remove(...C))};g.classList.add(...C),g.addEventListener("animationend",x),g.addEventListener("animationcancel",x)},[]),w.useEffect(()=>{const g=m.current,C=()=>{g.removeEventListener("animationend",C),o?o2(g,f,s):f()};b||(l?C():(h.current=1,g.className+=` ${p}`,g.addEventListener("animationend",C)))},[b]),w.createElement(w.Fragment,null,i)}}function Ll(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const it=new Map;let xo=[];const Wa=new Set,s2=e=>Wa.forEach(t=>t(e)),Ol=()=>it.size>0;function Fl(e,t){var n;if(t)return!((n=it.get(t))==null||!n.isToastActive(e));let r=!1;return it.forEach(o=>{o.isToastActive(e)&&(r=!0)}),r}function kl(e,t){Ha(e)&&(Ol()||xo.push({content:e,options:t}),it.forEach(n=>{n.buildToast(e,t)}))}function Dl(e,t){it.forEach(n=>{t!=null&&t!=null&&t.containerId?(t==null?void 0:t.containerId)===n.id&&n.toggle(e,t==null?void 0:t.id):n.toggle(e,t==null?void 0:t.id)})}function a2(e){const{subscribe:t,getSnapshot:n,setProps:r}=w.useRef(function(s){const a=s.containerId||1;return{subscribe(i){const c=function(f,m,b){let v=1,y=0,p=[],h=[],g=[],C=m;const x=new Map,I=new Set,E=()=>{g=Array.from(x.values()),I.forEach(S=>S())},_=S=>{h=S==null?[]:h.filter(L=>L!==S),E()},A=S=>{const{toastId:L,onOpen:k,updateId:D,children:N}=S.props,M=D==null;S.staleId&&x.delete(S.staleId),x.set(L,S),h=[...h,S.props.toastId].filter(V=>V!==S.staleId),E(),b(Ll(S,M?"added":"updated")),M&&wt(k)&&k(w.isValidElement(N)&&N.props)};return{id:f,props:C,observe:S=>(I.add(S),()=>I.delete(S)),toggle:(S,L)=>{x.forEach(k=>{L!=null&&L!==k.props.toastId||wt(k.toggle)&&k.toggle(S)})},removeToast:_,toasts:x,clearQueue:()=>{y-=p.length,p=[]},buildToast:(S,L)=>{if((B=>{let{containerId:P,toastId:W,updateId:G}=B;const Y=P?P!==f:f!==1,oe=x.has(W)&&G==null;return Y||oe})(L))return;const{toastId:k,updateId:D,data:N,staleId:M,delay:V}=L,J=()=>{_(k)},$=D==null;$&&y++;const H={...C,style:C.toastStyle,key:v++,...Object.fromEntries(Object.entries(L).filter(B=>{let[P,W]=B;return W!=null})),toastId:k,updateId:D,data:N,closeToast:J,isIn:!1,className:as(L.className||C.toastClassName),bodyClassName:as(L.bodyClassName||C.bodyClassName),progressClassName:as(L.progressClassName||C.progressClassName),autoClose:!L.isLoading&&(X=L.autoClose,q=C.autoClose,X===!1||Co(X)&&X>0?X:q),deleteToast(){const B=x.get(k),{onClose:P,children:W}=B.props;wt(P)&&P(w.isValidElement(W)&&W.props),b(Ll(B,"removed")),x.delete(k),y--,y<0&&(y=0),p.length>0?A(p.shift()):E()}};var X,q;H.closeButton=C.closeButton,L.closeButton===!1||Ha(L.closeButton)?H.closeButton=L.closeButton:L.closeButton===!0&&(H.closeButton=!Ha(C.closeButton)||C.closeButton);let se=S;w.isValidElement(S)&&!Jn(S.type)?se=w.cloneElement(S,{closeToast:J,toastProps:H,data:N}):wt(S)&&(se=S({closeToast:J,toastProps:H,data:N}));const de={content:se,props:H,staleId:M};C.limit&&C.limit>0&&y>C.limit&&$?p.push(de):Co(V)?setTimeout(()=>{A(de)},V):A(de)},setProps(S){C=S},setToggle:(S,L)=>{x.get(S).toggle=L},isToastActive:S=>h.some(L=>L===S),getSnapshot:()=>C.newestOnTop?g.reverse():g}}(a,s,s2);it.set(a,c);const l=c.observe(i);return xo.forEach(f=>kl(f.content,f.options)),xo=[],()=>{l(),it.delete(a)}},setProps(i){var c;(c=it.get(a))==null||c.setProps(i)},getSnapshot(){var i;return(i=it.get(a))==null?void 0:i.getSnapshot()}}}(e)).current;r(e);const o=w.useSyncExternalStore(t,n,n);return{getToastToRender:function(s){if(!o)return[];const a=new Map;return o.forEach(i=>{const{position:c}=i.props;a.has(c)||a.set(c,[]),a.get(c).push(i)}),Array.from(a,i=>s(i[0],i[1]))},isToastActive:Fl,count:o==null?void 0:o.length}}function i2(e){const[t,n]=w.useState(!1),[r,o]=w.useState(!1),s=w.useRef(null),a=w.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:i,pauseOnHover:c,closeToast:l,onClick:f,closeOnClick:m}=e;var b,v;function y(){n(!0)}function p(){n(!1)}function h(x){const I=s.current;a.canDrag&&I&&(a.didMove=!0,t&&p(),a.delta=e.draggableDirection==="x"?x.clientX-a.start:x.clientY-a.start,a.start!==x.clientX&&(a.canCloseOnClick=!1),I.style.transform=`translate3d(${e.draggableDirection==="x"?`${a.delta}px, var(--y)`:`0, calc(${a.delta}px + var(--y))`},0)`,I.style.opacity=""+(1-Math.abs(a.delta/a.removalDistance)))}function g(){document.removeEventListener("pointermove",h),document.removeEventListener("pointerup",g);const x=s.current;if(a.canDrag&&a.didMove&&x){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return o(!0),e.closeToast(),void e.collapseAll();x.style.transition="transform 0.2s, opacity 0.2s",x.style.removeProperty("transform"),x.style.removeProperty("opacity")}}(v=it.get((b={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||v.setToggle(b.id,b.fn),w.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||p(),window.addEventListener("focus",y),window.addEventListener("blur",p),()=>{window.removeEventListener("focus",y),window.removeEventListener("blur",p)}},[e.pauseOnFocusLoss]);const C={onPointerDown:function(x){if(e.draggable===!0||e.draggable===x.pointerType){a.didMove=!1,document.addEventListener("pointermove",h),document.addEventListener("pointerup",g);const I=s.current;a.canCloseOnClick=!0,a.canDrag=!0,I.style.transition="none",e.draggableDirection==="x"?(a.start=x.clientX,a.removalDistance=I.offsetWidth*(e.draggablePercent/100)):(a.start=x.clientY,a.removalDistance=I.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(x){const{top:I,bottom:E,left:_,right:A}=s.current.getBoundingClientRect();x.nativeEvent.type!=="touchend"&&e.pauseOnHover&&x.clientX>=_&&x.clientX<=A&&x.clientY>=I&&x.clientY<=E?p():y()}};return i&&c&&(C.onMouseEnter=p,e.stacked||(C.onMouseLeave=y)),m&&(C.onClick=x=>{f&&f(x),a.canCloseOnClick&&l()}),{playToast:y,pauseToast:p,isRunning:t,preventExitTransition:r,toastRef:s,eventHandlers:C}}function c2(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:s,className:a,style:i,controlledProgress:c,progress:l,rtl:f,isIn:m,theme:b}=e;const v=s||c&&l===0,y={...i,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};c&&(y.transform=`scaleX(${l})`);const p=An("Toastify__progress-bar",c?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${b}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":f}),h=wt(a)?a({rtl:f,type:o,defaultClassName:p}):An(p,a),g={[c&&l>=1?"onTransitionEnd":"onAnimationEnd"]:c&&l<1?null:()=>{m&&r()}};return w.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":v},w.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${b} Toastify__progress-bar--${o}`}),w.createElement("div",{role:"progressbar","aria-hidden":v?"true":"false","aria-label":"notification timer",className:h,style:y,...g}))}let l2=1;const Nl=()=>""+l2++;function u2(e){return e&&(Jn(e.toastId)||Co(e.toastId))?e.toastId:Nl()}function vo(e,t){return kl(e,t),t.toastId}function cs(e,t){return{...t,type:t&&t.type||e,toastId:u2(t)}}function ls(e){return(t,n)=>vo(t,cs(e,n))}function Le(e,t){return vo(e,cs("default",t))}Le.loading=(e,t)=>vo(e,cs("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),Le.promise=function(e,t,n){let r,{pending:o,error:s,success:a}=t;o&&(r=Jn(o)?Le.loading(o,n):Le.loading(o.render,{...n,...o}));const i={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},c=(f,m,b)=>{if(m==null)return void Le.dismiss(r);const v={type:f,...i,...n,data:b},y=Jn(m)?{render:m}:m;return r?Le.update(r,{...v,...y}):Le(y.render,{...v,...y}),b},l=wt(e)?e():e;return l.then(f=>c("success",a,f)).catch(f=>c("error",s,f)),l},Le.success=ls("success"),Le.info=ls("info"),Le.error=ls("error"),Le.warning=ls("warning"),Le.warn=Le.warning,Le.dark=(e,t)=>vo(e,cs("default",{theme:"dark",...t})),Le.dismiss=function(e){(function(t){var n;if(Ol()){if(t==null||Jn(n=t)||Co(n))it.forEach(r=>{r.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const r=it.get(t.containerId);r?r.removeToast(t.id):it.forEach(o=>{o.removeToast(t.id)})}}else xo=xo.filter(r=>t!=null&&r.options.toastId!==t)})(e)},Le.clearWaitingQueue=function(e){e===void 0&&(e={}),it.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},Le.isActive=Fl,Le.update=function(e,t){t===void 0&&(t={});const n=((r,o)=>{var s;let{containerId:a}=o;return(s=it.get(a||1))==null?void 0:s.toasts.get(r)})(e,t);if(n){const{props:r,content:o}=n,s={delay:100,...r,...t,toastId:t.toastId||e,updateId:Nl()};s.toastId!==e&&(s.staleId=e);const a=s.render||o;delete s.render,vo(a,s)}},Le.done=e=>{Le.update(e,{progress:1})},Le.onChange=function(e){return Wa.add(e),()=>{Wa.delete(e)}},Le.play=e=>Dl(!0,e),Le.pause=e=>Dl(!1,e);const d2=typeof window<"u"?w.useLayoutEffect:w.useEffect,us=e=>{let{theme:t,type:n,isLoading:r,...o}=e;return w.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...o})},Za={info:function(e){return w.createElement(us,{...e},w.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return w.createElement(us,{...e},w.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return w.createElement(us,{...e},w.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return w.createElement(us,{...e},w.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return w.createElement("div",{className:"Toastify__spinner"})}},f2=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o,playToast:s}=i2(e),{closeButton:a,children:i,autoClose:c,onClick:l,type:f,hideProgressBar:m,closeToast:b,transition:v,position:y,className:p,style:h,bodyClassName:g,bodyStyle:C,progressClassName:x,progressStyle:I,updateId:E,role:_,progress:A,rtl:S,toastId:L,deleteToast:k,isIn:D,isLoading:N,closeOnClick:M,theme:V}=e,J=An("Toastify__toast",`Toastify__toast-theme--${V}`,`Toastify__toast--${f}`,{"Toastify__toast--rtl":S},{"Toastify__toast--close-on-click":M}),$=wt(p)?p({rtl:S,position:y,type:f,defaultClassName:J}):An(J,p),H=function(de){let{theme:B,type:P,isLoading:W,icon:G}=de,Y=null;const oe={theme:B,type:P};return G===!1||(wt(G)?Y=G({...oe,isLoading:W}):w.isValidElement(G)?Y=w.cloneElement(G,oe):W?Y=Za.spinner():(re=>re in Za)(P)&&(Y=Za[P](oe))),Y}(e),X=!!A||!c,q={closeToast:b,type:f,theme:V};let se=null;return a===!1||(se=wt(a)?a(q):w.isValidElement(a)?w.cloneElement(a,q):function(de){let{closeToast:B,theme:P,ariaLabel:W="close"}=de;return w.createElement("button",{className:`Toastify__close-button Toastify__close-button--${P}`,type:"button",onClick:G=>{G.stopPropagation(),B(G)},"aria-label":W},w.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},w.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(q)),w.createElement(v,{isIn:D,done:k,position:y,preventExitTransition:n,nodeRef:r,playToast:s},w.createElement("div",{id:L,onClick:l,"data-in":D,className:$,...o,style:h,ref:r},w.createElement("div",{...D&&{role:_},className:wt(g)?g({type:f}):An("Toastify__toast-body",g),style:C},H!=null&&w.createElement("div",{className:An("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!N})},H),w.createElement("div",null,i)),se,w.createElement(c2,{...E&&!X?{key:`pb-${E}`}:{},rtl:S,theme:V,delay:c,isRunning:t,isIn:D,closeToast:b,hide:m,type:f,style:I,className:x,controlledProgress:X,progress:A||0})))},ds=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},p2=is(ds("bounce",!0));is(ds("slide",!0)),is(ds("zoom")),is(ds("flip"));const h2={position:"top-right",transition:p2,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function Xa(e){let t={...h2,...e};const n=e.stacked,[r,o]=w.useState(!0),s=w.useRef(null),{getToastToRender:a,isToastActive:i,count:c}=a2(t),{className:l,style:f,rtl:m,containerId:b}=t;function v(p){const h=An("Toastify__toast-container",`Toastify__toast-container--${p}`,{"Toastify__toast-container--rtl":m});return wt(l)?l({position:p,rtl:m,defaultClassName:h}):An(h,as(l))}function y(){n&&(o(!0),Le.play())}return d2(()=>{if(n){var p;const h=s.current.querySelectorAll('[data-in="true"]'),g=12,C=(p=t.position)==null?void 0:p.includes("top");let x=0,I=0;Array.from(h).reverse().forEach((E,_)=>{const A=E;A.classList.add("Toastify__toast--stacked"),_>0&&(A.dataset.collapsed=`${r}`),A.dataset.pos||(A.dataset.pos=C?"top":"bot");const S=x*(r?.2:1)+(r?0:g*_);A.style.setProperty("--y",`${C?S:-1*S}px`),A.style.setProperty("--g",`${g}`),A.style.setProperty("--s",""+(1-(r?I:0))),x+=A.offsetHeight,I+=.025})}},[r,c,n]),w.createElement("div",{ref:s,className:"Toastify",id:b,onMouseEnter:()=>{n&&(o(!1),Le.pause())},onMouseLeave:y},a((p,h)=>{const g=h.length?{...f}:{...f,pointerEvents:"none"};return w.createElement("div",{className:v(p),style:g,key:`container-${p}`},h.map(C=>{let{content:x,props:I}=C;return w.createElement(f2,{...I,stacked:n,collapseAll:y,isIn:i(I.toastId,I.containerId),style:I.style,key:`toast-${I.key}`},x)}))}))}var Or=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},qn=typeof window>"u"||"Deno"in globalThis;function Nt(){}function g2(e,t){return typeof e=="function"?e(t):e}function za(e){return typeof e=="number"&&e>=0&&e!==1/0}function Rl(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Fr(e,t){return typeof e=="function"?e(t):e}function Vt(e,t){return typeof e=="function"?e(t):e}function Ml(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:a,stale:i}=e;if(a){if(r){if(t.queryHash!==Ya(a,t.options))return!1}else if(!Eo(t.queryKey,a))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof i=="boolean"&&t.isStale()!==i||o&&o!==t.state.fetchStatus||s&&!s(t))}function Pl(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if($n(t.options.mutationKey)!==$n(s))return!1}else if(!Eo(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Ya(e,t){return((t==null?void 0:t.queryKeyHashFn)||$n)(e)}function $n(e){return JSON.stringify(e,(t,n)=>qa(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Eo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Eo(e[n],t[n])):!1}function Ja(e,t){if(e===t)return e;const n=jl(e)&&jl(t);if(n||qa(e)&&qa(t)){const r=n?e:Object.keys(e),o=r.length,s=n?t:Object.keys(t),a=s.length,i=n?[]:{};let c=0;for(let l=0;l<a;l++){const f=n?l:s[l];(!n&&r.includes(f)||n)&&e[f]===void 0&&t[f]===void 0?(i[f]=void 0,c++):(i[f]=Ja(e[f],t[f]),i[f]===e[f]&&e[f]!==void 0&&c++)}return o===a&&c===o?e:i}return t}function fs(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function jl(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function qa(e){if(!Bl(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Bl(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Bl(e){return Object.prototype.toString.call(e)==="[object Object]"}function m2(e){return new Promise(t=>{setTimeout(t,e)})}function $a(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return Ja(e,t)}catch(r){console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`)}return Ja(e,t)}return t}function b2(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function y2(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ps=Symbol();function Vl(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===ps&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===ps?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var C2=(Zp=class extends Or{constructor(){super();ce(this,hr);ce(this,Mn);ce(this,eo);U(this,eo,t=>{if(!qn&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){F(this,Mn)||this.setEventListener(F(this,eo))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,Mn))==null||t.call(this),U(this,Mn,void 0))}setEventListener(t){var n;U(this,eo,t),(n=F(this,Mn))==null||n.call(this),U(this,Mn,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){F(this,hr)!==t&&(U(this,hr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof F(this,hr)=="boolean"?F(this,hr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},hr=new WeakMap,Mn=new WeakMap,eo=new WeakMap,Zp),Qa=new C2,x2=(Xp=class extends Or{constructor(){super();ce(this,to,!0);ce(this,Pn);ce(this,no);U(this,no,t=>{if(!qn&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){F(this,Pn)||this.setEventListener(F(this,no))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,Pn))==null||t.call(this),U(this,Pn,void 0))}setEventListener(t){var n;U(this,no,t),(n=F(this,Pn))==null||n.call(this),U(this,Pn,t(this.setOnline.bind(this)))}setOnline(t){F(this,to)!==t&&(U(this,to,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return F(this,to)}},to=new WeakMap,Pn=new WeakMap,no=new WeakMap,Xp),hs=new x2;function Ua(){let e,t;const n=new Promise((o,s)=>{e=o,t=s});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function v2(e){return Math.min(1e3*2**e,3e4)}function Gl(e){return(e??"online")==="online"?hs.isOnline():!0}var Hl=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ka(e){return e instanceof Hl}function Wl(e){let t=!1,n=0,r=!1,o;const s=Ua(),a=p=>{var h;r||(b(new Hl(p)),(h=e.abort)==null||h.call(e))},i=()=>{t=!0},c=()=>{t=!1},l=()=>Qa.isFocused()&&(e.networkMode==="always"||hs.isOnline())&&e.canRun(),f=()=>Gl(e.networkMode)&&e.canRun(),m=p=>{var h;r||(r=!0,(h=e.onSuccess)==null||h.call(e,p),o==null||o(),s.resolve(p))},b=p=>{var h;r||(r=!0,(h=e.onError)==null||h.call(e,p),o==null||o(),s.reject(p))},v=()=>new Promise(p=>{var h;o=g=>{(r||l())&&p(g)},(h=e.onPause)==null||h.call(e)}).then(()=>{var p;o=void 0,r||(p=e.onContinue)==null||p.call(e)}),y=()=>{if(r)return;let p;const h=n===0?e.initialPromise:void 0;try{p=h??e.fn()}catch(g){p=Promise.reject(g)}Promise.resolve(p).then(m).catch(g=>{var _;if(r)return;const C=e.retry??(qn?0:3),x=e.retryDelay??v2,I=typeof x=="function"?x(n,g):x,E=C===!0||typeof C=="number"&&n<C||typeof C=="function"&&C(n,g);if(t||!E){b(g);return}n++,(_=e.onFail)==null||_.call(e,n,g),m2(I).then(()=>l()?void 0:v()).then(()=>{t?b(g):y()})})};return{promise:s,cancel:a,continue:()=>(o==null||o(),s),cancelRetry:i,continueRetry:c,canStart:f,start:()=>(f()?y():v().then(y),s)}}function E2(){let e=[],t=0,n=i=>{i()},r=i=>{i()},o=i=>setTimeout(i,0);const s=i=>{t?e.push(i):o(()=>{n(i)})},a=()=>{const i=e;e=[],i.length&&o(()=>{r(()=>{i.forEach(c=>{n(c)})})})};return{batch:i=>{let c;t++;try{c=i()}finally{t--,t||a()}return c},batchCalls:i=>(...c)=>{s(()=>{i(...c)})},schedule:s,setNotifyFunction:i=>{n=i},setBatchNotifyFunction:i=>{r=i},setScheduler:i=>{o=i}}}var Qe=E2(),Zl=(zp=class{constructor(){ce(this,gr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),za(this.gcTime)&&U(this,gr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(qn?1/0:5*60*1e3))}clearGcTimeout(){F(this,gr)&&(clearTimeout(F(this,gr)),U(this,gr,void 0))}},gr=new WeakMap,zp),I2=(Yp=class extends Zl{constructor(t){super();ce(this,$t);ce(this,ro);ce(this,oo);ce(this,Mt);ce(this,mr);ce(this,st);ce(this,$o);ce(this,br);U(this,br,!1),U(this,$o,t.defaultOptions),this.setOptions(t.options),this.observers=[],U(this,mr,t.client),U(this,Mt,F(this,mr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,U(this,ro,w2(this.options)),this.state=t.state??F(this,ro),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=F(this,st))==null?void 0:t.promise}setOptions(t){this.options={...F(this,$o),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&F(this,Mt).remove(this)}setData(t,n){const r=$a(this.state.data,t,this.options);return ye(this,$t,Sn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ye(this,$t,Sn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=F(this,st))==null?void 0:r.promise;return(o=F(this,st))==null||o.cancel(t),n?n.then(Nt).catch(Nt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(F(this,ro))}isActive(){return this.observers.some(t=>Vt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ps||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!Rl(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=F(this,st))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=F(this,st))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),F(this,Mt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(F(this,st)&&(F(this,br)?F(this,st).cancel({revert:!0}):F(this,st).cancelRetry()),this.scheduleGc()),F(this,Mt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ye(this,$t,Sn).call(this,{type:"invalidate"})}fetch(t,n){var c,l,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(F(this,st))return F(this,st).continueRetry(),F(this,st).promise}if(t&&this.setOptions(t),!this.options.queryFn){const m=this.observers.find(b=>b.options.queryFn);m&&this.setOptions(m.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const r=new AbortController,o=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(U(this,br,!0),r.signal)})},s=()=>{const m=Vl(this.options,n),b={client:F(this,mr),queryKey:this.queryKey,meta:this.meta};return o(b),U(this,br,!1),this.options.persister?this.options.persister(m,b,this):m(b)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:F(this,mr),state:this.state,fetchFn:s};o(a),(c=this.options.behavior)==null||c.onFetch(a,this),U(this,oo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((l=a.fetchOptions)==null?void 0:l.meta))&&ye(this,$t,Sn).call(this,{type:"fetch",meta:(f=a.fetchOptions)==null?void 0:f.meta});const i=m=>{var b,v,y,p;Ka(m)&&m.silent||ye(this,$t,Sn).call(this,{type:"error",error:m}),Ka(m)||((v=(b=F(this,Mt).config).onError)==null||v.call(b,m,this),(p=(y=F(this,Mt).config).onSettled)==null||p.call(y,this.state.data,m,this)),this.scheduleGc()};return U(this,st,Wl({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:m=>{var b,v,y,p;if(m===void 0){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),i(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(m)}catch(h){i(h);return}(v=(b=F(this,Mt).config).onSuccess)==null||v.call(b,m,this),(p=(y=F(this,Mt).config).onSettled)==null||p.call(y,m,this.state.error,this),this.scheduleGc()},onError:i,onFail:(m,b)=>{ye(this,$t,Sn).call(this,{type:"failed",failureCount:m,error:b})},onPause:()=>{ye(this,$t,Sn).call(this,{type:"pause"})},onContinue:()=>{ye(this,$t,Sn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),F(this,st).start()}},ro=new WeakMap,oo=new WeakMap,Mt=new WeakMap,mr=new WeakMap,st=new WeakMap,$o=new WeakMap,br=new WeakMap,$t=new WeakSet,Sn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Xl(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return Ka(o)&&o.revert&&F(this,oo)?{...F(this,oo),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Qe.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),F(this,Mt).notify({query:this,type:"updated",action:t})})},Yp);function Xl(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Gl(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function w2(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var _2=(Jp=class extends Or{constructor(t={}){super();ce(this,dn);this.config=t,U(this,dn,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??Ya(o,n);let a=this.get(s);return a||(a=new I2({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){F(this,dn).has(t.queryHash)||(F(this,dn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=F(this,dn).get(t.queryHash);n&&(t.destroy(),n===t&&F(this,dn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Qe.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return F(this,dn).get(t)}getAll(){return[...F(this,dn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Ml(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Ml(t,r)):n}notify(t){Qe.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Qe.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Qe.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},dn=new WeakMap,Jp),S2=(qp=class extends Zl{constructor(t){super();ce(this,pn);ce(this,fn);ce(this,lt);ce(this,yr);this.mutationId=t.mutationId,U(this,lt,t.mutationCache),U(this,fn,[]),this.state=t.state||zl(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){F(this,fn).includes(t)||(F(this,fn).push(t),this.clearGcTimeout(),F(this,lt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){U(this,fn,F(this,fn).filter(n=>n!==t)),this.scheduleGc(),F(this,lt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){F(this,fn).length||(this.state.status==="pending"?this.scheduleGc():F(this,lt).remove(this))}continue(){var t;return((t=F(this,yr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,s,a,i,c,l,f,m,b,v,y,p,h,g,C,x,I,E,_,A;U(this,yr,Wl({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(S,L)=>{ye(this,pn,Yn).call(this,{type:"failed",failureCount:S,error:L})},onPause:()=>{ye(this,pn,Yn).call(this,{type:"pause"})},onContinue:()=>{ye(this,pn,Yn).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>F(this,lt).canRun(this)}));const n=this.state.status==="pending",r=!F(this,yr).canStart();try{if(!n){ye(this,pn,Yn).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(o=F(this,lt).config).onMutate)==null?void 0:s.call(o,t,this));const L=await((i=(a=this.options).onMutate)==null?void 0:i.call(a,t));L!==this.state.context&&ye(this,pn,Yn).call(this,{type:"pending",context:L,variables:t,isPaused:r})}const S=await F(this,yr).start();return await((l=(c=F(this,lt).config).onSuccess)==null?void 0:l.call(c,S,t,this.state.context,this)),await((m=(f=this.options).onSuccess)==null?void 0:m.call(f,S,t,this.state.context)),await((v=(b=F(this,lt).config).onSettled)==null?void 0:v.call(b,S,null,this.state.variables,this.state.context,this)),await((p=(y=this.options).onSettled)==null?void 0:p.call(y,S,null,t,this.state.context)),ye(this,pn,Yn).call(this,{type:"success",data:S}),S}catch(S){try{throw await((g=(h=F(this,lt).config).onError)==null?void 0:g.call(h,S,t,this.state.context,this)),await((x=(C=this.options).onError)==null?void 0:x.call(C,S,t,this.state.context)),await((E=(I=F(this,lt).config).onSettled)==null?void 0:E.call(I,void 0,S,this.state.variables,this.state.context,this)),await((A=(_=this.options).onSettled)==null?void 0:A.call(_,void 0,S,t,this.state.context)),S}finally{ye(this,pn,Yn).call(this,{type:"error",error:S})}}finally{F(this,lt).runNext(this)}}},fn=new WeakMap,lt=new WeakMap,yr=new WeakMap,pn=new WeakSet,Yn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Qe.batch(()=>{F(this,fn).forEach(r=>{r.onMutationUpdate(t)}),F(this,lt).notify({mutation:this,type:"updated",action:t})})},qp);function zl(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var A2=($p=class extends Or{constructor(t={}){super();ce(this,En);ce(this,Qt);ce(this,Qo);this.config=t,U(this,En,new Set),U(this,Qt,new Map),U(this,Qo,0)}build(t,n,r){const o=new S2({mutationCache:this,mutationId:++ja(this,Qo)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){F(this,En).add(t);const n=gs(t);if(typeof n=="string"){const r=F(this,Qt).get(n);r?r.push(t):F(this,Qt).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(F(this,En).delete(t)){const n=gs(t);if(typeof n=="string"){const r=F(this,Qt).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&F(this,Qt).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=gs(t);if(typeof n=="string"){const r=F(this,Qt).get(n),o=r==null?void 0:r.find(s=>s.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=gs(t);if(typeof n=="string"){const o=(r=F(this,Qt).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Qe.batch(()=>{F(this,En).forEach(t=>{this.notify({type:"removed",mutation:t})}),F(this,En).clear(),F(this,Qt).clear()})}getAll(){return Array.from(F(this,En))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Pl(n,r))}findAll(t={}){return this.getAll().filter(n=>Pl(t,n))}notify(t){Qe.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Qe.batch(()=>Promise.all(t.map(n=>n.continue().catch(Nt))))}},En=new WeakMap,Qt=new WeakMap,Qo=new WeakMap,$p);function gs(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Yl(e){return{onFetch:(t,n)=>{var f,m,b,v,y;const r=t.options,o=(b=(m=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:m.fetchMore)==null?void 0:b.direction,s=((v=t.state.data)==null?void 0:v.pages)||[],a=((y=t.state.data)==null?void 0:y.pageParams)||[];let i={pages:[],pageParams:[]},c=0;const l=async()=>{let p=!1;const h=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?p=!0:t.signal.addEventListener("abort",()=>{p=!0}),t.signal)})},g=Vl(t.options,t.fetchOptions),C=async(x,I,E)=>{if(p)return Promise.reject();if(I==null&&x.pages.length)return Promise.resolve(x);const _={client:t.client,queryKey:t.queryKey,pageParam:I,direction:E?"backward":"forward",meta:t.options.meta};h(_);const A=await g(_),{maxPages:S}=t.options,L=E?y2:b2;return{pages:L(x.pages,A,S),pageParams:L(x.pageParams,I,S)}};if(o&&s.length){const x=o==="backward",I=x?T2:Jl,E={pages:s,pageParams:a},_=I(r,E);i=await C(E,_,x)}else{const x=e??s.length;do{const I=c===0?a[0]??r.initialPageParam:Jl(r,i);if(c>0&&I==null)break;i=await C(i,I),c++}while(c<x)}return i};t.options.persister?t.fetchFn=()=>{var p,h;return(h=(p=t.options).persister)==null?void 0:h.call(p,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=l}}}function Jl(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function T2(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var L2=(Qp=class{constructor(e={}){ce(this,We);ce(this,jn);ce(this,Bn);ce(this,so);ce(this,ao);ce(this,Vn);ce(this,io);ce(this,co);U(this,We,e.queryCache||new _2),U(this,jn,e.mutationCache||new A2),U(this,Bn,e.defaultOptions||{}),U(this,so,new Map),U(this,ao,new Map),U(this,Vn,0)}mount(){ja(this,Vn)._++,F(this,Vn)===1&&(U(this,io,Qa.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,We).onFocus())})),U(this,co,hs.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,We).onOnline())})))}unmount(){var e,t;ja(this,Vn)._--,F(this,Vn)===0&&((e=F(this,io))==null||e.call(this),U(this,io,void 0),(t=F(this,co))==null||t.call(this),U(this,co,void 0))}isFetching(e){return F(this,We).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return F(this,jn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=F(this,We).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=F(this,We).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Fr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return F(this,We).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=F(this,We).get(r.queryHash),s=o==null?void 0:o.state.data,a=g2(t,s);if(a!==void 0)return F(this,We).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Qe.batch(()=>F(this,We).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=F(this,We).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=F(this,We);Qe.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=F(this,We);return Qe.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Qe.batch(()=>F(this,We).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Nt).catch(Nt)}invalidateQueries(e,t={}){return Qe.batch(()=>(F(this,We).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Qe.batch(()=>F(this,We).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(Nt)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Nt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=F(this,We).build(this,t);return n.isStaleByTime(Fr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Nt).catch(Nt)}fetchInfiniteQuery(e){return e.behavior=Yl(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Nt).catch(Nt)}ensureInfiniteQueryData(e){return e.behavior=Yl(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return hs.isOnline()?F(this,jn).resumePausedMutations():Promise.resolve()}getQueryCache(){return F(this,We)}getMutationCache(){return F(this,jn)}getDefaultOptions(){return F(this,Bn)}setDefaultOptions(e){U(this,Bn,e)}setQueryDefaults(e,t){F(this,so).set($n(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...F(this,so).values()],n={};return t.forEach(r=>{Eo(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){F(this,ao).set($n(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...F(this,ao).values()],n={};return t.forEach(r=>{Eo(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...F(this,Bn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ya(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ps&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...F(this,Bn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){F(this,We).clear(),F(this,jn).clear()}},We=new WeakMap,jn=new WeakMap,Bn=new WeakMap,so=new WeakMap,ao=new WeakMap,Vn=new WeakMap,io=new WeakMap,co=new WeakMap,Qp),O2=(Up=class extends Or{constructor(t,n){super();ce(this,ke);ce(this,Ct);ce(this,xe);ce(this,Uo);ce(this,ut);ce(this,Cr);ce(this,lo);ce(this,Gn);ce(this,hn);ce(this,Ko);ce(this,uo);ce(this,fo);ce(this,xr);ce(this,vr);ce(this,Hn);ce(this,po,new Set);this.options=n,U(this,Ct,t),U(this,hn,null),U(this,Gn,Ua()),this.options.experimental_prefetchInRender||F(this,Gn).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(F(this,xe).addObserver(this),ql(F(this,xe),this.options)?ye(this,ke,os).call(this):this.updateResult(),ye(this,ke,vl).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ei(F(this,xe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ei(F(this,xe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ye(this,ke,El).call(this),ye(this,ke,Il).call(this),F(this,xe).removeObserver(this)}setOptions(t,n){const r=this.options,o=F(this,xe);if(this.options=F(this,Ct).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Vt(this.options.enabled,F(this,xe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ye(this,ke,wl).call(this),F(this,xe).setOptions(this.options),r._defaulted&&!fs(this.options,r)&&F(this,Ct).getQueryCache().notify({type:"observerOptionsUpdated",query:F(this,xe),observer:this});const s=this.hasListeners();s&&$l(F(this,xe),o,this.options,r)&&ye(this,ke,os).call(this),this.updateResult(n),s&&(F(this,xe)!==o||Vt(this.options.enabled,F(this,xe))!==Vt(r.enabled,F(this,xe))||Fr(this.options.staleTime,F(this,xe))!==Fr(r.staleTime,F(this,xe)))&&ye(this,ke,yl).call(this);const a=ye(this,ke,Cl).call(this);s&&(F(this,xe)!==o||Vt(this.options.enabled,F(this,xe))!==Vt(r.enabled,F(this,xe))||a!==F(this,Hn))&&ye(this,ke,xl).call(this,a)}getOptimisticResult(t){const n=F(this,Ct).getQueryCache().build(F(this,Ct),t),r=this.createResult(n,t);return k2(this,r)&&(U(this,ut,r),U(this,lo,this.options),U(this,Cr,F(this,xe).state)),r}getCurrentResult(){return F(this,ut)}trackResult(t,n){const r={};return Object.keys(t).forEach(o=>{Object.defineProperty(r,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),n==null||n(o),t[o])})}),r}trackProp(t){F(this,po).add(t)}getCurrentQuery(){return F(this,xe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=F(this,Ct).defaultQueryOptions(t),r=F(this,Ct).getQueryCache().build(F(this,Ct),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ye(this,ke,os).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),F(this,ut)))}createResult(t,n){var S;const r=F(this,xe),o=this.options,s=F(this,ut),a=F(this,Cr),i=F(this,lo),l=t!==r?t.state:F(this,Uo),{state:f}=t;let m={...f},b=!1,v;if(n._optimisticResults){const L=this.hasListeners(),k=!L&&ql(t,n),D=L&&$l(t,r,n,o);(k||D)&&(m={...m,...Xl(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:y,errorUpdatedAt:p,status:h}=m;if(n.select&&m.data!==void 0)if(s&&m.data===(a==null?void 0:a.data)&&n.select===F(this,Ko))v=F(this,uo);else try{U(this,Ko,n.select),v=n.select(m.data),v=$a(s==null?void 0:s.data,v,n),U(this,uo,v),U(this,hn,null)}catch(L){U(this,hn,L)}else v=m.data;if(n.placeholderData!==void 0&&v===void 0&&h==="pending"){let L;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(i==null?void 0:i.placeholderData))L=s.data;else if(L=typeof n.placeholderData=="function"?n.placeholderData((S=F(this,fo))==null?void 0:S.state.data,F(this,fo)):n.placeholderData,n.select&&L!==void 0)try{L=n.select(L),U(this,hn,null)}catch(k){U(this,hn,k)}L!==void 0&&(h="success",v=$a(s==null?void 0:s.data,L,n),b=!0)}F(this,hn)&&(y=F(this,hn),v=F(this,uo),p=Date.now(),h="error");const g=m.fetchStatus==="fetching",C=h==="pending",x=h==="error",I=C&&g,E=v!==void 0,A={status:h,fetchStatus:m.fetchStatus,isPending:C,isSuccess:h==="success",isError:x,isInitialLoading:I,isLoading:I,data:v,dataUpdatedAt:m.dataUpdatedAt,error:y,errorUpdatedAt:p,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>l.dataUpdateCount||m.errorUpdateCount>l.errorUpdateCount,isFetching:g,isRefetching:g&&!C,isLoadingError:x&&!E,isPaused:m.fetchStatus==="paused",isPlaceholderData:b,isRefetchError:x&&E,isStale:ti(t,n),refetch:this.refetch,promise:F(this,Gn)};if(this.options.experimental_prefetchInRender){const L=N=>{A.status==="error"?N.reject(A.error):A.data!==void 0&&N.resolve(A.data)},k=()=>{const N=U(this,Gn,A.promise=Ua());L(N)},D=F(this,Gn);switch(D.status){case"pending":t.queryHash===r.queryHash&&L(D);break;case"fulfilled":(A.status==="error"||A.data!==D.value)&&k();break;case"rejected":(A.status!=="error"||A.error!==D.reason)&&k();break}}return A}updateResult(t){const n=F(this,ut),r=this.createResult(F(this,xe),this.options);if(U(this,Cr,F(this,xe).state),U(this,lo,this.options),F(this,Cr).data!==void 0&&U(this,fo,F(this,xe)),fs(r,n))return;U(this,ut,r);const o={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:a}=this.options,i=typeof a=="function"?a():a;if(i==="all"||!i&&!F(this,po).size)return!0;const c=new Set(i??F(this,po));return this.options.throwOnError&&c.add("error"),Object.keys(F(this,ut)).some(l=>{const f=l;return F(this,ut)[f]!==n[f]&&c.has(f)})};(t==null?void 0:t.listeners)!==!1&&s()&&(o.listeners=!0),ye(this,ke,t2).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ye(this,ke,vl).call(this)}},Ct=new WeakMap,xe=new WeakMap,Uo=new WeakMap,ut=new WeakMap,Cr=new WeakMap,lo=new WeakMap,Gn=new WeakMap,hn=new WeakMap,Ko=new WeakMap,uo=new WeakMap,fo=new WeakMap,xr=new WeakMap,vr=new WeakMap,Hn=new WeakMap,po=new WeakMap,ke=new WeakSet,os=function(t){ye(this,ke,wl).call(this);let n=F(this,xe).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Nt)),n},yl=function(){ye(this,ke,El).call(this);const t=Fr(this.options.staleTime,F(this,xe));if(qn||F(this,ut).isStale||!za(t))return;const r=Rl(F(this,ut).dataUpdatedAt,t)+1;U(this,xr,setTimeout(()=>{F(this,ut).isStale||this.updateResult()},r))},Cl=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(F(this,xe)):this.options.refetchInterval)??!1},xl=function(t){ye(this,ke,Il).call(this),U(this,Hn,t),!(qn||Vt(this.options.enabled,F(this,xe))===!1||!za(F(this,Hn))||F(this,Hn)===0)&&U(this,vr,setInterval(()=>{(this.options.refetchIntervalInBackground||Qa.isFocused())&&ye(this,ke,os).call(this)},F(this,Hn)))},vl=function(){ye(this,ke,yl).call(this),ye(this,ke,xl).call(this,ye(this,ke,Cl).call(this))},El=function(){F(this,xr)&&(clearTimeout(F(this,xr)),U(this,xr,void 0))},Il=function(){F(this,vr)&&(clearInterval(F(this,vr)),U(this,vr,void 0))},wl=function(){const t=F(this,Ct).getQueryCache().build(F(this,Ct),this.options);if(t===F(this,xe))return;const n=F(this,xe);U(this,xe,t),U(this,Uo,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},t2=function(t){Qe.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(F(this,ut))}),F(this,Ct).getQueryCache().notify({query:F(this,xe),type:"observerResultsUpdated"})})},Up);function F2(e,t){return Vt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function ql(e,t){return F2(e,t)||e.state.data!==void 0&&ei(e,t,t.refetchOnMount)}function ei(e,t,n){if(Vt(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&ti(e,t)}return!1}function $l(e,t,n,r){return(e!==t||Vt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&ti(e,n)}function ti(e,t){return Vt(t.enabled,e)!==!1&&e.isStaleByTime(Fr(t.staleTime,e))}function k2(e,t){return!fs(e.getCurrentResult(),t)}var D2=(Kp=class extends Or{constructor(n,r){super();ce(this,wn);ce(this,Wn);ce(this,Zn);ce(this,xt);ce(this,In);U(this,Wn,n),this.setOptions(r),this.bindMethods(),ye(this,wn,Ba).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=F(this,Wn).defaultMutationOptions(n),fs(this.options,r)||F(this,Wn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:F(this,xt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&$n(r.mutationKey)!==$n(this.options.mutationKey)?this.reset():((o=F(this,xt))==null?void 0:o.state.status)==="pending"&&F(this,xt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=F(this,xt))==null||n.removeObserver(this)}onMutationUpdate(n){ye(this,wn,Ba).call(this),ye(this,wn,_l).call(this,n)}getCurrentResult(){return F(this,Zn)}reset(){var n;(n=F(this,xt))==null||n.removeObserver(this),U(this,xt,void 0),ye(this,wn,Ba).call(this),ye(this,wn,_l).call(this)}mutate(n,r){var o;return U(this,In,r),(o=F(this,xt))==null||o.removeObserver(this),U(this,xt,F(this,Wn).getMutationCache().build(F(this,Wn),this.options)),F(this,xt).addObserver(this),F(this,xt).execute(n)}},Wn=new WeakMap,Zn=new WeakMap,xt=new WeakMap,In=new WeakMap,wn=new WeakSet,Ba=function(){var r;const n=((r=F(this,xt))==null?void 0:r.state)??zl();U(this,Zn,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},_l=function(n){Qe.batch(()=>{var r,o,s,a,i,c,l,f;if(F(this,In)&&this.hasListeners()){const m=F(this,Zn).variables,b=F(this,Zn).context;(n==null?void 0:n.type)==="success"?((o=(r=F(this,In)).onSuccess)==null||o.call(r,n.data,m,b),(a=(s=F(this,In)).onSettled)==null||a.call(s,n.data,null,m,b)):(n==null?void 0:n.type)==="error"&&((c=(i=F(this,In)).onError)==null||c.call(i,n.error,m,b),(f=(l=F(this,In)).onSettled)==null||f.call(l,void 0,n.error,m,b))}this.listeners.forEach(m=>{m(F(this,Zn))})})},Kp),Ql=T.createContext(void 0),Io=e=>{const t=T.useContext(Ql);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},N2=({client:e,children:t})=>(T.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx(Ql.Provider,{value:e,children:t})),Ul=T.createContext(!1),R2=()=>T.useContext(Ul);Ul.Provider;function M2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var P2=T.createContext(M2()),j2=()=>T.useContext(P2);function Kl(e,t){return typeof e=="function"?e(...t):!!e}function ni(){}var B2=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},V2=e=>{T.useEffect(()=>{e.clearReset()},[e])},G2=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Kl(n,[e.error,r])),H2=e=>{const t=e.staleTime;e.suspense&&(e.staleTime=typeof t=="function"?(...n)=>Math.max(t(...n),1e3):Math.max(t??1e3,1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},W2=(e,t)=>e.isLoading&&e.isFetching&&!t,Z2=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,eu=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function X2(e,t,n){var m,b,v,y,p;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=Io(),o=R2(),s=j2(),a=r.defaultQueryOptions(e);(b=(m=r.getDefaultOptions().queries)==null?void 0:m._experimental_beforeQuery)==null||b.call(m,a),process.env.NODE_ENV!=="production"&&(a.queryFn||console.error(`[${a.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),a._optimisticResults=o?"isRestoring":"optimistic",H2(a),B2(a,s),V2(s);const i=!r.getQueryCache().get(a.queryHash),[c]=T.useState(()=>new t(r,a)),l=c.getOptimisticResult(a),f=!o&&e.subscribed!==!1;if(T.useSyncExternalStore(T.useCallback(h=>{const g=f?c.subscribe(Qe.batchCalls(h)):ni;return c.updateResult(),g},[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),T.useEffect(()=>{c.setOptions(a,{listeners:!1})},[a,c]),Z2(a,l))throw eu(a,c,s);if(G2({result:l,errorResetBoundary:s,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw l.error;if((y=(v=r.getDefaultOptions().queries)==null?void 0:v._experimental_afterQuery)==null||y.call(v,a,l),a.experimental_prefetchInRender&&!qn&&W2(l,o)){const h=i?eu(a,c,s):(p=r.getQueryCache().get(a.queryHash))==null?void 0:p.promise;h==null||h.catch(ni).finally(()=>{c.updateResult()})}return a.notifyOnChangeProps?l:c.trackResult(l)}function Tn(e,t){return X2(e,O2)}function tn(e,t){const n=Io(),[r]=T.useState(()=>new D2(n,e));T.useEffect(()=>{r.setOptions(e)},[r,e]);const o=T.useSyncExternalStore(T.useCallback(a=>r.subscribe(Qe.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=T.useCallback((a,i)=>{r.mutate(a,i).catch(ni)},[r]);if(o.error&&Kl(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}const ri=(e,t)=>t.some(n=>e instanceof n);let tu,nu;function z2(){return tu||(tu=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Y2(){return nu||(nu=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const oi=new WeakMap,si=new WeakMap,ms=new WeakMap;function J2(e){const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("success",s),e.removeEventListener("error",a)},s=()=>{n(Qn(e.result)),o()},a=()=>{r(e.error),o()};e.addEventListener("success",s),e.addEventListener("error",a)});return ms.set(t,e),t}function q2(e){if(oi.has(e))return;const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("complete",s),e.removeEventListener("error",a),e.removeEventListener("abort",a)},s=()=>{n(),o()},a=()=>{r(e.error||new DOMException("AbortError","AbortError")),o()};e.addEventListener("complete",s),e.addEventListener("error",a),e.addEventListener("abort",a)});oi.set(e,t)}let ai={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return oi.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Qn(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function ru(e){ai=e(ai)}function $2(e){return Y2().includes(e)?function(...t){return e.apply(ii(this),t),Qn(this.request)}:function(...t){return Qn(e.apply(ii(this),t))}}function Q2(e){return typeof e=="function"?$2(e):(e instanceof IDBTransaction&&q2(e),ri(e,z2())?new Proxy(e,ai):e)}function Qn(e){if(e instanceof IDBRequest)return J2(e);if(si.has(e))return si.get(e);const t=Q2(e);return t!==e&&(si.set(e,t),ms.set(t,e)),t}const ii=e=>ms.get(e);function U2(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const a=indexedDB.open(e,t),i=Qn(a);return r&&a.addEventListener("upgradeneeded",c=>{r(Qn(a.result),c.oldVersion,c.newVersion,Qn(a.transaction),c)}),n&&a.addEventListener("blocked",c=>n(c.oldVersion,c.newVersion,c)),i.then(c=>{s&&c.addEventListener("close",()=>s()),o&&c.addEventListener("versionchange",l=>o(l.oldVersion,l.newVersion,l))}).catch(()=>{}),i}const K2=["get","getKey","getAll","getAllKeys","count"],eh=["put","add","delete","clear"],ci=new Map;function ou(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(ci.get(t))return ci.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=eh.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(o||K2.includes(n)))return;const s=async function(a,...i){const c=this.transaction(a,o?"readwrite":"readonly");let l=c.store;return r&&(l=l.index(i.shift())),(await Promise.all([l[n](...i),o&&c.done]))[0]};return ci.set(t,s),s}ru(e=>({...e,get:(t,n,r)=>ou(t,n)||e.get(t,n,r),has:(t,n)=>!!ou(t,n)||e.has(t,n)}));const th=["continue","continuePrimaryKey","advance"],su={},li=new WeakMap,au=new WeakMap,nh={get(e,t){if(!th.includes(t))return e[t];let n=su[t];return n||(n=su[t]=function(...r){li.set(this,au.get(this)[t](...r))}),n}};async function*rh(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const n=new Proxy(t,nh);for(au.set(n,t),ms.set(n,ii(t));t;)yield n,t=await(li.get(n)||t.continue()),li.delete(n)}function iu(e,t){return t===Symbol.asyncIterator&&ri(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&ri(e,[IDBIndex,IDBObjectStore])}ru(e=>({...e,get(t,n,r){return iu(t,n)?rh:e.get(t,n,r)},has(t,n){return iu(t,n)||e.has(t,n)}}));const oh="connector-db",sh=1,bs={FEEDBACK:"feedback"},wo=`${bs.FEEDBACK}:data`,ys=`${bs.FEEDBACK}:last_submitted`,_o=`${bs.FEEDBACK}:capture_on_demand`,So=`${bs.FEEDBACK}:show_notification`,ah=12*60*60*1e3,ui=(e,t=new Date)=>e?Math.abs(t.getTime()-e.getTime())>=ah:!0,cu=(e,t=!1)=>e.captureFeedback&&(ui(e.firstViewed)&&(!e.lastSubmittedFeedback||ui(e.lastSubmittedFeedback))||!!t);let Un=null;const Ln=async()=>{try{Un||(Un=await U2(oh,sh,{upgrade(e){e.objectStoreNames.contains(wo)||e.createObjectStore(wo),e.objectStoreNames.contains(ys)||e.createObjectStore(ys),e.objectStoreNames.contains(_o)||e.createObjectStore(_o),e.objectStoreNames.contains(So)||e.createObjectStore(So)},blocked(){console.warn("Upgrade blocked! Close other tabs using this DB.")},blocking(){console.warn("Another tab is trying to upgrade. Closing connection to allow upgrade."),Un&&(Un.close(),Un=null)},terminated(){console.error("DB connection unexpectedly closed. Resetting connection."),Un=null}}))}catch(e){console.error("Error opening IndexedDB connection:",e)}return Un},di=async e=>{if(!e)return[];const t=await Ln();if(!t)return[];try{return await t.get(wo,e)||[]}catch(n){return console.error("Error fetching user feedback data:",n),[]}},ih=async e=>{if(!e)return null;const t=await Ln();if(!t)return null;try{return await t.get(ys,e)||null}catch(n){return console.error("Error fetching last submitted feedback:",n),null}},Cs=async e=>{if(!e)return;const t=await Ln();if(t)try{return await t.get(_o,e)}catch(n){console.error("Error fetching capture on demand status:",n);return}},ch=async e=>{if(!e)return!1;const t=await Ln();if(!t)return!1;try{return await t.get(So,e)??!1}catch(n){return console.error("Error fetching show notification status:",n),!1}},lh=async(e,t)=>{if(!e||!t||!t.length)return;const n=await Ln();if(n)try{const r=await di(e),o=new Set(r.map(a=>a.connectorId)),s=t.filter(a=>!o.has(a.connector_id)).map(a=>({connectorId:a.connector_id,captureFeedback:!0,firstViewed:new Date}));if(s.length>0){const a=[...r,...s];await n.put(wo,a,e),await n.put(So,!0,e)}}catch(r){console.error("Error updating connectors feedback data:",r)}},uh=async e=>{if(!e)return;const t=await Ln();if(t)try{const n=await di(e),r=await Cs(e),o=new Date,s=n.map(a=>{const i=cu(a,r);return{...a,lastSubmittedFeedback:i?o:a.lastSubmittedFeedback,captureFeedback:a.captureFeedback!==i}});await t.put(wo,s,e),await t.put(ys,o,e),r&&await t.put(_o,!1,e)}catch(n){console.error("Error updating feedback submission date:",n)}},lu=async(e,t)=>{if(!e)return;const n=await Ln();if(n)try{await n.put(_o,t,e)}catch(r){console.error("Error updating capture on demand:",r)}},dh=async e=>{if(!e)return;const t=await Ln();if(t)try{await t.put(So,!1,e)}catch(n){console.error("Error resetting show notification status:",n)}},fh=async e=>{const t=await di(e),n=await Cs(e);return t.filter(o=>cu(o,n))},fi=async e=>{const t=await ih(e);return t&&!ui(t)?!1:await Cs(e)&&!t?!0:!!(await fh(e)).length},ph=async(e,t)=>{await lh(e,t)},xs=async e=>{e&&await uh(e)},hh=async(e,t)=>{const n=await Cs(e);t?n!==!1&&await lu(e,t):await lu(e,void 0)},uu=async e=>await ch(e)&&await fi(e),du=async e=>{await dh(e)};var pi={},Kn={};function fu(e,t){return function(){return e.apply(t,arguments)}}const{toString:gh}=Object.prototype,{getPrototypeOf:hi}=Object,vs=(e=>t=>{const n=gh.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Gt=e=>(e=e.toLowerCase(),t=>vs(t)===e),Es=e=>t=>typeof t===e,{isArray:kr}=Array,Ao=Es("undefined");function mh(e){return e!==null&&!Ao(e)&&e.constructor!==null&&!Ao(e.constructor)&&_t(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const pu=Gt("ArrayBuffer");function bh(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&pu(e.buffer),t}const yh=Es("string"),_t=Es("function"),hu=Es("number"),Is=e=>e!==null&&typeof e=="object",Ch=e=>e===!0||e===!1,ws=e=>{if(vs(e)!=="object")return!1;const t=hi(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},xh=Gt("Date"),vh=Gt("File"),Eh=Gt("Blob"),Ih=Gt("FileList"),wh=e=>Is(e)&&_t(e.pipe),_h=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||_t(e.append)&&((t=vs(e))==="formdata"||t==="object"&&_t(e.toString)&&e.toString()==="[object FormData]"))},Sh=Gt("URLSearchParams"),[Ah,Th,Lh,Oh]=["ReadableStream","Request","Response","Headers"].map(Gt),Fh=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function To(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),kr(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let i;for(r=0;r<a;r++)i=s[r],t.call(null,e[i],i,e)}}function gu(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const er=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:ge,mu=e=>!Ao(e)&&e!==er;function gi(){const{caseless:e}=mu(this)&&this||{},t={},n=(r,o)=>{const s=e&&gu(t,o)||o;ws(t[s])&&ws(r)?t[s]=gi(t[s],r):ws(r)?t[s]=gi({},r):kr(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&To(arguments[r],n);return t}const kh=(e,t,n,{allOwnKeys:r}={})=>(To(t,(o,s)=>{n&&_t(o)?e[s]=fu(o,n):e[s]=o},{allOwnKeys:r}),e),Dh=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Nh=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Rh=(e,t,n,r)=>{let o,s,a;const i={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)a=o[s],(!r||r(a,e,t))&&!i[a]&&(t[a]=e[a],i[a]=!0);e=n!==!1&&hi(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Mh=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Ph=e=>{if(!e)return null;if(kr(e))return e;let t=e.length;if(!hu(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},jh=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&hi(Uint8Array)),Bh=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},Vh=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Gh=Gt("HTMLFormElement"),Hh=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),bu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Wh=Gt("RegExp"),yu=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};To(n,(o,s)=>{let a;(a=t(o,s,e))!==!1&&(r[s]=a||o)}),Object.defineProperties(e,r)},Zh=e=>{yu(e,(t,n)=>{if(_t(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(_t(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Xh=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return kr(e)?r(e):r(String(e).split(t)),n},zh=()=>{},Yh=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,mi="abcdefghijklmnopqrstuvwxyz",Cu="0123456789",xu={DIGIT:Cu,ALPHA:mi,ALPHA_DIGIT:mi+mi.toUpperCase()+Cu},Jh=(e=16,t=xu.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function qh(e){return!!(e&&_t(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const $h=e=>{const t=new Array(10),n=(r,o)=>{if(Is(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=kr(r)?[]:{};return To(r,(a,i)=>{const c=n(a,o+1);!Ao(c)&&(s[i]=c)}),t[o]=void 0,s}}return r};return n(e,0)},Qh=Gt("AsyncFunction"),Uh=e=>e&&(Is(e)||_t(e))&&_t(e.then)&&_t(e.catch),vu=((e,t)=>e?setImmediate:t?((n,r)=>(er.addEventListener("message",({source:o,data:s})=>{o===er&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),er.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",_t(er.postMessage)),Kh=typeof queueMicrotask<"u"?queueMicrotask.bind(er):typeof process<"u"&&process.nextTick||vu;var R={isArray:kr,isArrayBuffer:pu,isBuffer:mh,isFormData:_h,isArrayBufferView:bh,isString:yh,isNumber:hu,isBoolean:Ch,isObject:Is,isPlainObject:ws,isReadableStream:Ah,isRequest:Th,isResponse:Lh,isHeaders:Oh,isUndefined:Ao,isDate:xh,isFile:vh,isBlob:Eh,isRegExp:Wh,isFunction:_t,isStream:wh,isURLSearchParams:Sh,isTypedArray:jh,isFileList:Ih,forEach:To,merge:gi,extend:kh,trim:Fh,stripBOM:Dh,inherits:Nh,toFlatObject:Rh,kindOf:vs,kindOfTest:Gt,endsWith:Mh,toArray:Ph,forEachEntry:Bh,matchAll:Vh,isHTMLForm:Gh,hasOwnProperty:bu,hasOwnProp:bu,reduceDescriptors:yu,freezeMethods:Zh,toObjectSet:Xh,toCamelCase:Hh,noop:zh,toFiniteNumber:Yh,findKey:gu,global:er,isContextDefined:mu,ALPHABET:xu,generateString:Jh,isSpecCompliantForm:qh,toJSONObject:$h,isAsyncFn:Qh,isThenable:Uh,setImmediate:vu,asap:Kh};function be(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}R.inherits(be,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:R.toJSONObject(this.config),code:this.code,status:this.status}}});const Eu=be.prototype,Iu={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Iu[e]={value:e}}),Object.defineProperties(be,Iu),Object.defineProperty(Eu,"isAxiosError",{value:!0}),be.from=(e,t,n,r,o,s)=>{const a=Object.create(Eu);return R.toFlatObject(e,a,function(c){return c!==Error.prototype},i=>i!=="isAxiosError"),be.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,s&&Object.assign(a,s),a};var eg=null;function bi(e){return R.isPlainObject(e)||R.isArray(e)}function wu(e){return R.endsWith(e,"[]")?e.slice(0,-2):e}function _u(e,t,n){return e?e.concat(t).map(function(o,s){return o=wu(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function tg(e){return R.isArray(e)&&!e.some(bi)}const ng=R.toFlatObject(R,{},null,function(t){return/^is[A-Z]/.test(t)});function _s(e,t,n){if(!R.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=R.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,h){return!R.isUndefined(h[p])});const r=n.metaTokens,o=n.visitor||f,s=n.dots,a=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&R.isSpecCompliantForm(t);if(!R.isFunction(o))throw new TypeError("visitor must be a function");function l(y){if(y===null)return"";if(R.isDate(y))return y.toISOString();if(!c&&R.isBlob(y))throw new be("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(y)||R.isTypedArray(y)?c&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function f(y,p,h){let g=y;if(y&&!h&&typeof y=="object"){if(R.endsWith(p,"{}"))p=r?p:p.slice(0,-2),y=JSON.stringify(y);else if(R.isArray(y)&&tg(y)||(R.isFileList(y)||R.endsWith(p,"[]"))&&(g=R.toArray(y)))return p=wu(p),g.forEach(function(x,I){!(R.isUndefined(x)||x===null)&&t.append(a===!0?_u([p],I,s):a===null?p:p+"[]",l(x))}),!1}return bi(y)?!0:(t.append(_u(h,p,s),l(y)),!1)}const m=[],b=Object.assign(ng,{defaultVisitor:f,convertValue:l,isVisitable:bi});function v(y,p){if(!R.isUndefined(y)){if(m.indexOf(y)!==-1)throw Error("Circular reference detected in "+p.join("."));m.push(y),R.forEach(y,function(g,C){(!(R.isUndefined(g)||g===null)&&o.call(t,g,R.isString(C)?C.trim():C,p,b))===!0&&v(g,p?p.concat(C):[C])}),m.pop()}}if(!R.isObject(e))throw new TypeError("data must be an object");return v(e),t}function Su(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function yi(e,t){this._pairs=[],e&&_s(e,this,t)}const Au=yi.prototype;Au.append=function(t,n){this._pairs.push([t,n])},Au.toString=function(t){const n=t?function(r){return t.call(this,r,Su)}:Su;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function rg(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Tu(e,t,n){if(!t)return e;const r=n&&n.encode||rg,o=n&&n.serialize;let s;if(o?s=o(t,n):s=R.isURLSearchParams(t)?t.toString():new yi(t,n).toString(r),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class og{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){R.forEach(this.handlers,function(r){r!==null&&t(r)})}}var Lu=og,Ou={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},sg=typeof URLSearchParams<"u"?URLSearchParams:yi,ag=typeof FormData<"u"?FormData:null,ig=typeof Blob<"u"?Blob:null,cg={isBrowser:!0,classes:{URLSearchParams:sg,FormData:ag,Blob:ig},protocols:["http","https","file","blob","url","data"]};const Ci=typeof window<"u"&&typeof document<"u",xi=typeof navigator=="object"&&navigator||void 0,lg=Ci&&(!xi||["ReactNative","NativeScript","NS"].indexOf(xi.product)<0),ug=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",dg=Ci&&window.location.href||"http://localhost";var fg=Object.freeze({__proto__:null,hasBrowserEnv:Ci,hasStandardBrowserWebWorkerEnv:ug,hasStandardBrowserEnv:lg,navigator:xi,origin:dg}),ht={...fg,...cg};function pg(e,t){return _s(e,new ht.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return ht.isNode&&R.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function hg(e){return R.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function gg(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}function Fu(e){function t(n,r,o,s){let a=n[s++];if(a==="__proto__")return!0;const i=Number.isFinite(+a),c=s>=n.length;return a=!a&&R.isArray(o)?o.length:a,c?(R.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!i):((!o[a]||!R.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],s)&&R.isArray(o[a])&&(o[a]=gg(o[a])),!i)}if(R.isFormData(e)&&R.isFunction(e.entries)){const n={};return R.forEachEntry(e,(r,o)=>{t(hg(r),o,n,0)}),n}return null}function mg(e,t,n){if(R.isString(e))try{return(t||JSON.parse)(e),R.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const vi={transitional:Ou,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=R.isObject(t);if(s&&R.isHTMLForm(t)&&(t=new FormData(t)),R.isFormData(t))return o?JSON.stringify(Fu(t)):t;if(R.isArrayBuffer(t)||R.isBuffer(t)||R.isStream(t)||R.isFile(t)||R.isBlob(t)||R.isReadableStream(t))return t;if(R.isArrayBufferView(t))return t.buffer;if(R.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return pg(t,this.formSerializer).toString();if((i=R.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return _s(i?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),mg(t)):t}],transformResponse:[function(t){const n=this.transitional||vi.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(R.isResponse(t)||R.isReadableStream(t))return t;if(t&&R.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(i){if(a)throw i.name==="SyntaxError"?be.from(i,be.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ht.classes.FormData,Blob:ht.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};R.forEach(["delete","get","head","post","put","patch"],e=>{vi.headers[e]={}});var Ei=vi;const bg=R.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var yg=e=>{const t={};let n,r,o;return e&&e.split(`
31
+ `).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&bg[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};const ku=Symbol("internals");function Lo(e){return e&&String(e).trim().toLowerCase()}function Ss(e){return e===!1||e==null?e:R.isArray(e)?e.map(Ss):String(e)}function Cg(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const xg=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ii(e,t,n,r,o){if(R.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!R.isString(t)){if(R.isString(r))return t.indexOf(r)!==-1;if(R.isRegExp(r))return r.test(t)}}function vg(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Eg(e,t){const n=R.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,s,a){return this[r].call(this,t,o,s,a)},configurable:!0})})}class As{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(i,c,l){const f=Lo(c);if(!f)throw new Error("header name must be a non-empty string");const m=R.findKey(o,f);(!m||o[m]===void 0||l===!0||l===void 0&&o[m]!==!1)&&(o[m||c]=Ss(i))}const a=(i,c)=>R.forEach(i,(l,f)=>s(l,f,c));if(R.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(R.isString(t)&&(t=t.trim())&&!xg(t))a(yg(t),n);else if(R.isHeaders(t))for(const[i,c]of t.entries())s(c,i,r);else t!=null&&s(n,t,r);return this}get(t,n){if(t=Lo(t),t){const r=R.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Cg(o);if(R.isFunction(n))return n.call(this,o,r);if(R.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Lo(t),t){const r=R.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ii(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(a){if(a=Lo(a),a){const i=R.findKey(r,a);i&&(!n||Ii(r,r[i],i,n))&&(delete r[i],o=!0)}}return R.isArray(t)?t.forEach(s):s(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const s=n[r];(!t||Ii(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return R.forEach(this,(o,s)=>{const a=R.findKey(r,s);if(a){n[a]=Ss(o),delete n[s];return}const i=t?vg(s):String(s).trim();i!==s&&delete n[s],n[i]=Ss(o),r[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return R.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&R.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
32
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[ku]=this[ku]={accessors:{}}).accessors,o=this.prototype;function s(a){const i=Lo(a);r[i]||(Eg(o,a),r[i]=!0)}return R.isArray(t)?t.forEach(s):s(t),this}}As.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),R.reduceDescriptors(As.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),R.freezeMethods(As);var Ht=As;function wi(e,t){const n=this||Ei,r=t||n,o=Ht.from(r.headers);let s=r.data;return R.forEach(e,function(i){s=i.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function Du(e){return!!(e&&e.__CANCEL__)}function Dr(e,t,n){be.call(this,e??"canceled",be.ERR_CANCELED,t,n),this.name="CanceledError"}R.inherits(Dr,be,{__CANCEL__:!0});function Nu(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new be("Request failed with status code "+n.status,[be.ERR_BAD_REQUEST,be.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Ig(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function wg(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,s=0,a;return t=t!==void 0?t:1e3,function(c){const l=Date.now(),f=r[s];a||(a=l),n[o]=c,r[o]=l;let m=s,b=0;for(;m!==o;)b+=n[m++],m=m%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-a<t)return;const v=f&&l-f;return v?Math.round(b*1e3/v):void 0}}function _g(e,t){let n=0,r=1e3/t,o,s;const a=(l,f=Date.now())=>{n=f,o=null,s&&(clearTimeout(s),s=null),e.apply(null,l)};return[(...l)=>{const f=Date.now(),m=f-n;m>=r?a(l,f):(o=l,s||(s=setTimeout(()=>{s=null,a(o)},r-m)))},()=>o&&a(o)]}const Ts=(e,t,n=3)=>{let r=0;const o=wg(50,250);return _g(s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,c=a-r,l=o(c),f=a<=i;r=a;const m={loaded:a,total:i,progress:i?a/i:void 0,bytes:c,rate:l||void 0,estimated:l&&i&&f?(i-a)/l:void 0,event:s,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(m)},n)},Ru=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Mu=e=>(...t)=>R.asap(()=>e(...t));var Sg=ht.hasStandardBrowserEnv?function(){const t=ht.navigator&&/(msie|trident)/i.test(ht.navigator.userAgent),n=document.createElement("a");let r;function o(s){let a=s;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(a){const i=R.isString(a)?o(a):a;return i.protocol===r.protocol&&i.host===r.host}}():function(){return function(){return!0}}(),Ag=ht.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const a=[e+"="+encodeURIComponent(t)];R.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),R.isString(r)&&a.push("path="+r),R.isString(o)&&a.push("domain="+o),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Tg(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Lg(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Pu(e,t){return e&&!Tg(t)?Lg(e,t):t}const ju=e=>e instanceof Ht?{...e}:e;function tr(e,t){t=t||{};const n={};function r(l,f,m){return R.isPlainObject(l)&&R.isPlainObject(f)?R.merge.call({caseless:m},l,f):R.isPlainObject(f)?R.merge({},f):R.isArray(f)?f.slice():f}function o(l,f,m){if(R.isUndefined(f)){if(!R.isUndefined(l))return r(void 0,l,m)}else return r(l,f,m)}function s(l,f){if(!R.isUndefined(f))return r(void 0,f)}function a(l,f){if(R.isUndefined(f)){if(!R.isUndefined(l))return r(void 0,l)}else return r(void 0,f)}function i(l,f,m){if(m in t)return r(l,f);if(m in e)return r(void 0,l)}const c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:i,headers:(l,f)=>o(ju(l),ju(f),!0)};return R.forEach(Object.keys(Object.assign({},e,t)),function(f){const m=c[f]||o,b=m(e[f],t[f],f);R.isUndefined(b)&&m!==i||(n[f]=b)}),n}var Bu=e=>{const t=tr({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:i}=t;t.headers=a=Ht.from(a),t.url=Tu(Pu(t.baseURL,t.url),e.params,e.paramsSerializer),i&&a.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):"")));let c;if(R.isFormData(n)){if(ht.hasStandardBrowserEnv||ht.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((c=a.getContentType())!==!1){const[l,...f]=c?c.split(";").map(m=>m.trim()).filter(Boolean):[];a.setContentType([l||"multipart/form-data",...f].join("; "))}}if(ht.hasStandardBrowserEnv&&(r&&R.isFunction(r)&&(r=r(t)),r||r!==!1&&Sg(t.url))){const l=o&&s&&Ag.read(s);l&&a.set(o,l)}return t},Og=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=Bu(e);let s=o.data;const a=Ht.from(o.headers).normalize();let{responseType:i,onUploadProgress:c,onDownloadProgress:l}=o,f,m,b,v,y;function p(){v&&v(),y&&y(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let h=new XMLHttpRequest;h.open(o.method.toUpperCase(),o.url,!0),h.timeout=o.timeout;function g(){if(!h)return;const x=Ht.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),E={data:!i||i==="text"||i==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:x,config:e,request:h};Nu(function(A){n(A),p()},function(A){r(A),p()},E),h=null}"onloadend"in h?h.onloadend=g:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(g)},h.onabort=function(){h&&(r(new be("Request aborted",be.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new be("Network Error",be.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let I=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const E=o.transitional||Ou;o.timeoutErrorMessage&&(I=o.timeoutErrorMessage),r(new be(I,E.clarifyTimeoutError?be.ETIMEDOUT:be.ECONNABORTED,e,h)),h=null},s===void 0&&a.setContentType(null),"setRequestHeader"in h&&R.forEach(a.toJSON(),function(I,E){h.setRequestHeader(E,I)}),R.isUndefined(o.withCredentials)||(h.withCredentials=!!o.withCredentials),i&&i!=="json"&&(h.responseType=o.responseType),l&&([b,y]=Ts(l,!0),h.addEventListener("progress",b)),c&&h.upload&&([m,v]=Ts(c),h.upload.addEventListener("progress",m),h.upload.addEventListener("loadend",v)),(o.cancelToken||o.signal)&&(f=x=>{h&&(r(!x||x.type?new Dr(null,e,h):x),h.abort(),h=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const C=Ig(o.url);if(C&&ht.protocols.indexOf(C)===-1){r(new be("Unsupported protocol "+C+":",be.ERR_BAD_REQUEST,e));return}h.send(s||null)})},Fg=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const s=function(l){if(!o){o=!0,i();const f=l instanceof Error?l:this.reason;r.abort(f instanceof be?f:new Dr(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new be(`timeout ${t} of ms exceeded`,be.ETIMEDOUT))},t);const i=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),e=null)};e.forEach(l=>l.addEventListener("abort",s));const{signal:c}=r;return c.unsubscribe=()=>R.asap(i),c}};const kg=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},Dg=async function*(e,t){for await(const n of Ng(e))yield*kg(n,t)},Ng=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Vu=(e,t,n,r)=>{const o=Dg(e,t);let s=0,a,i=c=>{a||(a=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:l,value:f}=await o.next();if(l){i(),c.close();return}let m=f.byteLength;if(n){let b=s+=m;n(b)}c.enqueue(new Uint8Array(f))}catch(l){throw i(l),l}},cancel(c){return i(c),o.return()}},{highWaterMark:2})},Ls=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Gu=Ls&&typeof ReadableStream=="function",Rg=Ls&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Hu=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Mg=Gu&&Hu(()=>{let e=!1;const t=new Request(ht.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Wu=64*1024,_i=Gu&&Hu(()=>R.isReadableStream(new Response("").body)),Os={stream:_i&&(e=>e.body)};Ls&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Os[t]&&(Os[t]=R.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new be(`Response type '${t}' is not supported`,be.ERR_NOT_SUPPORT,r)})})})(new Response);const Pg=async e=>{if(e==null)return 0;if(R.isBlob(e))return e.size;if(R.isSpecCompliantForm(e))return(await new Request(ht.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(R.isArrayBufferView(e)||R.isArrayBuffer(e))return e.byteLength;if(R.isURLSearchParams(e)&&(e=e+""),R.isString(e))return(await Rg(e)).byteLength},jg=async(e,t)=>{const n=R.toFiniteNumber(e.getContentLength());return n??Pg(t)};var Bg=Ls&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:a,onDownloadProgress:i,onUploadProgress:c,responseType:l,headers:f,withCredentials:m="same-origin",fetchOptions:b}=Bu(e);l=l?(l+"").toLowerCase():"text";let v=Fg([o,s&&s.toAbortSignal()],a),y;const p=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let h;try{if(c&&Mg&&n!=="get"&&n!=="head"&&(h=await jg(f,r))!==0){let E=new Request(t,{method:"POST",body:r,duplex:"half"}),_;if(R.isFormData(r)&&(_=E.headers.get("content-type"))&&f.setContentType(_),E.body){const[A,S]=Ru(h,Ts(Mu(c)));r=Vu(E.body,Wu,A,S)}}R.isString(m)||(m=m?"include":"omit");const g="credentials"in Request.prototype;y=new Request(t,{...b,signal:v,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:g?m:void 0});let C=await fetch(y);const x=_i&&(l==="stream"||l==="response");if(_i&&(i||x&&p)){const E={};["status","statusText","headers"].forEach(L=>{E[L]=C[L]});const _=R.toFiniteNumber(C.headers.get("content-length")),[A,S]=i&&Ru(_,Ts(Mu(i),!0))||[];C=new Response(Vu(C.body,Wu,A,()=>{S&&S(),p&&p()}),E)}l=l||"text";let I=await Os[R.findKey(Os,l)||"text"](C,e);return!x&&p&&p(),await new Promise((E,_)=>{Nu(E,_,{data:I,headers:Ht.from(C.headers),status:C.status,statusText:C.statusText,config:e,request:y})})}catch(g){throw p&&p(),g&&g.name==="TypeError"&&/fetch/i.test(g.message)?Object.assign(new be("Network Error",be.ERR_NETWORK,e,y),{cause:g.cause||g}):be.from(g,g&&g.code,e,y)}});const Si={http:eg,xhr:Og,fetch:Bg};R.forEach(Si,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Zu=e=>`- ${e}`,Vg=e=>R.isFunction(e)||e===null||e===!1;var Xu={getAdapter:e=>{e=R.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let s=0;s<t;s++){n=e[s];let a;if(r=n,!Vg(n)&&(r=Si[(a=String(n)).toLowerCase()],r===void 0))throw new be(`Unknown adapter '${a}'`);if(r)break;o[a||"#"+s]=r}if(!r){const s=Object.entries(o).map(([i,c])=>`adapter ${i} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=t?s.length>1?`since :
33
+ `+s.map(Zu).join(`
34
+ `):" "+Zu(s[0]):"as no adapter specified";throw new be("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:Si};function Ai(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Dr(null,e)}function zu(e){return Ai(e),e.headers=Ht.from(e.headers),e.data=wi.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Xu.getAdapter(e.adapter||Ei.adapter)(e).then(function(r){return Ai(e),r.data=wi.call(e,e.transformResponse,r),r.headers=Ht.from(r.headers),r},function(r){return Du(r)||(Ai(e),r&&r.response&&(r.response.data=wi.call(e,e.transformResponse,r.response),r.response.headers=Ht.from(r.response.headers))),Promise.reject(r)})}const Yu="1.7.7",Ti={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ti[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Ju={};Ti.transitional=function(t,n,r){function o(s,a){return"[Axios v"+Yu+"] Transitional option '"+s+"'"+a+(r?". "+r:"")}return(s,a,i)=>{if(t===!1)throw new be(o(a," has been removed"+(n?" in "+n:"")),be.ERR_DEPRECATED);return n&&!Ju[a]&&(Ju[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,a,i):!0}};function Gg(e,t,n){if(typeof e!="object")throw new be("options must be an object",be.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],a=t[s];if(a){const i=e[s],c=i===void 0||a(i,s,e);if(c!==!0)throw new be("option "+s+" must be "+c,be.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new be("Unknown option "+s,be.ERR_BAD_OPTION)}}var Li={assertOptions:Gg,validators:Ti};const On=Li.validators;let Fs=class{constructor(t){this.defaults=t,this.interceptors={request:new Lu,response:new Lu}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const s=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
35
+ `+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=tr(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&Li.assertOptions(r,{silentJSONParsing:On.transitional(On.boolean),forcedJSONParsing:On.transitional(On.boolean),clarifyTimeoutError:On.transitional(On.boolean)},!1),o!=null&&(R.isFunction(o)?n.paramsSerializer={serialize:o}:Li.assertOptions(o,{encode:On.function,serialize:On.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&R.merge(s.common,s[n.method]);s&&R.forEach(["delete","get","head","post","put","patch","common"],y=>{delete s[y]}),n.headers=Ht.concat(a,s);const i=[];let c=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(c=c&&p.synchronous,i.unshift(p.fulfilled,p.rejected))});const l=[];this.interceptors.response.forEach(function(p){l.push(p.fulfilled,p.rejected)});let f,m=0,b;if(!c){const y=[zu.bind(this),void 0];for(y.unshift.apply(y,i),y.push.apply(y,l),b=y.length,f=Promise.resolve(n);m<b;)f=f.then(y[m++],y[m++]);return f}b=i.length;let v=n;for(m=0;m<b;){const y=i[m++],p=i[m++];try{v=y(v)}catch(h){p.call(this,h);break}}try{f=zu.call(this,v)}catch(y){return Promise.reject(y)}for(m=0,b=l.length;m<b;)f=f.then(l[m++],l[m++]);return f}getUri(t){t=tr(this.defaults,t);const n=Pu(t.baseURL,t.url);return Tu(n,t.params,t.paramsSerializer)}};R.forEach(["delete","get","head","options"],function(t){Fs.prototype[t]=function(n,r){return this.request(tr(r||{},{method:t,url:n,data:(r||{}).data}))}}),R.forEach(["post","put","patch"],function(t){function n(r){return function(s,a,i){return this.request(tr(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}Fs.prototype[t]=n(),Fs.prototype[t+"Form"]=n(!0)});var ks=Fs;class Oi{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(o=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const a=new Promise(i=>{r.subscribe(i),s=i}).then(o);return a.cancel=function(){r.unsubscribe(s)},a},t(function(s,a,i){r.reason||(r.reason=new Dr(s,a,i),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Oi(function(o){t=o}),cancel:t}}}var Hg=Oi;function Wg(e){return function(n){return e.apply(null,n)}}function Zg(e){return R.isObject(e)&&e.isAxiosError===!0}const Fi={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Fi).forEach(([e,t])=>{Fi[t]=e});var Xg=Fi;function qu(e){const t=new ks(e),n=fu(ks.prototype.request,t);return R.extend(n,ks.prototype,t,{allOwnKeys:!0}),R.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return qu(tr(e,o))},n}const Ye=qu(Ei);Ye.Axios=ks,Ye.CanceledError=Dr,Ye.CancelToken=Hg,Ye.isCancel=Du,Ye.VERSION=Yu,Ye.toFormData=_s,Ye.AxiosError=be,Ye.Cancel=Ye.CanceledError,Ye.all=function(t){return Promise.all(t)},Ye.spread=Wg,Ye.isAxiosError=Zg,Ye.mergeConfig=tr,Ye.AxiosHeaders=Ht,Ye.formToJSON=e=>Fu(R.isHTMLForm(e)?new FormData(e):e),Ye.getAdapter=Xu.getAdapter,Ye.HttpStatusCode=Xg,Ye.default=Ye;var $u=Ye,Se={},Fn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PLATFORM=e.TENANT_PLATFORM=e.API_CALL_ORIGIN=e.TIERS=e.APP_UI=e.CONFIG_HIVER=e.DEFAULT_INIT_CONFIG_HIVER=e.TWO_MINUTES_IN_MS=e.REFETCH_CHECK_DELAY=e.RETRY_DELAY_IN_CASE_OF_CORRUPTED_EXPIRY=e.INITIAL_RETRY_DELAY=e.MAX_BACKOFF_LIMIT=e.MAX_CONFLICT_RETRY_DELAY=e.MAX_RETRY_DELAY=e.GET_METHOD=void 0,e.GET_METHOD="GET",e.MAX_RETRY_DELAY=18e4,e.MAX_CONFLICT_RETRY_DELAY=63e3,e.MAX_BACKOFF_LIMIT=8e3,e.INITIAL_RETRY_DELAY=1e3,e.RETRY_DELAY_IN_CASE_OF_CORRUPTED_EXPIRY=3e3,e.REFETCH_CHECK_DELAY=168e4,e.TWO_MINUTES_IN_MS=2*60*1e3,e.DEFAULT_INIT_CONFIG_HIVER={getToken:!0,isHiverApiDomain:!0,fetchCsrfToken:function(){return""}},e.CONFIG_HIVER={getToken:!1,fetchCsrfToken:function(){return""},isHiverApiDomain:!0},e.APP_UI={COLLAB_SPACE:"collab-space",DEFAULT:"default"},e.TIERS={DEV:"dev",SIT:"sit",QA:"qa",PRODUCTION:"production",PROD:"prod"},e.API_CALL_ORIGIN={API_RETRY:"Api Retry"},e.TENANT_PLATFORM={GMAIL:"GMAIL",HIVERWEB:"HIVERWEB"},function(t){t[t.WEB=0]="WEB",t[t.MOBILE=1]="MOBILE"}(e.PLATFORM||(e.PLATFORM={}))})(Fn);var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.getProdHqConfig=gt.getProdApiConfig=gt.getSitHqConfig=gt.getSitApiConfig=gt.getDevHqConfig=gt.getDevApiConfig=void 0;var Nr={heimdallTokenFetch:"/v1/token/get",heimdallLogin:"/v1/login/code",heimdallLogout:"/v1/logout",v2Login:"/api/auth/login/code",hotLogin:"/api/auth/login/code"},zg=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api",hotUrl:"http://local.hiverhq.co.in:3000",apiEndpoints:Nr}};gt.getDevApiConfig=zg;var Yg=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api2",hotUrl:"http://local.hiverhq.co.in:3000",apiEndpoints:Nr}};gt.getDevHqConfig=Yg;var Jg=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api"),hotUrl:"https://api-staging.hiverhq.co.in",apiEndpoints:Nr}};gt.getSitApiConfig=Jg;var qg=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api2"),hotUrl:"https://api-staging.hiverhq.co.in",apiEndpoints:Nr}};gt.getSitHqConfig=qg;var $g=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall.hiverapi.com",hotUrl:"https://app.hiverhq.com",apiEndpoints:Nr}};gt.getProdApiConfig=$g;var Qg=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall2.hiverhq.com",hotUrl:"https://app.hiverhq.com",apiEndpoints:Nr}};gt.getProdHqConfig=Qg;var nn={},rn={};Object.defineProperty(rn,"__esModule",{value:!0}),rn.removeValue=rn.getValue=rn.setValue=void 0;var ki={};function Ug(e,t){ki[e]=t}rn.setValue=Ug;function Kg(e){return ki[e]}rn.getValue=Kg;function em(e){delete ki[e]}rn.removeValue=em,Object.defineProperty(nn,"__esModule",{value:!0}),nn.removeItemFromStorage=nn.setItemInStorage=nn.getItemFromStorage=void 0;var Rr=Fn,Mr=rn,tm=function(e,t){switch(t===void 0&&(t=(0,Mr.getValue)("PLATFORM")),t){case Rr.PLATFORM.WEB:return sessionStorage.getItem(e);case Rr.PLATFORM.MOBILE:return(0,Mr.getValue)(e);default:throw Error("Invalid PLATFORM ".concat(t))}};nn.getItemFromStorage=tm;var nm=function(e,t,n){switch(n===void 0&&(n=(0,Mr.getValue)("PLATFORM")),n){case Rr.PLATFORM.WEB:return sessionStorage.setItem(e,t);case Rr.PLATFORM.MOBILE:return(0,Mr.setValue)(e,t);default:throw Error("Invalid PLATFORM ".concat(n))}};nn.setItemInStorage=nm;var rm=function(e,t){switch(t===void 0&&(t=(0,Mr.getValue)("PLATFORM")),t){case Rr.PLATFORM.WEB:sessionStorage.removeItem(e);break;case Rr.PLATFORM.MOBILE:(0,Mr.removeValue)(e);break;default:throw Error("Invalid PLATFORM ".concat(t))}};nn.removeItemFromStorage=rm;var om=ge&&ge.__awaiter||function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function i(f){try{l(r.next(f))}catch(m){a(m)}}function c(f){try{l(r.throw(f))}catch(m){a(m)}}function l(f){f.done?s(f.value):o(f.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},sm=ge&&ge.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,a;return a={next:i(0),throw:i(1),return:i(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function i(l){return function(f){return c([l,f])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,o&&(s=l[0]&2?o.return:l[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,l[1])).done)return s;switch(o=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(f){l=[6,f],o=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(Se,"__esModule",{value:!0}),Se.expireToken=Se.invalidateToken=Se.validateToken=Se.validateAccount=Se.getConfig=Se.introduceDelay=Se.isTokenInExpiryWindow=Se.getStoredAuthData=Se.setUserDetails=Se.getRefreshInterval=Se.setTokenAndExpiry=Se.getRandomDelay=Se.hasValidToken=void 0;var bn=Fn,Pr=gt,St=nn,Di=function(){var e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4);return t},Ni=function(e){var t=parseInt((0,St.getItemFromStorage)("hiverAuthUserId")||"0"),n=parseInt((0,St.getItemFromStorage)("hiverAuthUserGroupId")||"0"),r=e.userId,o=e.usergroupId;return t===r&&o===n};Se.validateAccount=Ni;var am=function(e){var t=Ni(e);return!Qu()&&t};Se.validateToken=am;var im=function(e){return e.apiRetry?e.apiRetry>0:!1};Se.invalidateToken=im;var cm=function(){try{sessionStorage.removeItem("hiverAuthTokenExpiry")}catch{console.log("Heimdall: Unable to Remove token.")}};Se.expireToken=cm;var lm=function(e){var t=(0,St.getItemFromStorage)("hiverAuthTokenExpiry")||"",n=new Date(t),r=Di(),o=Ni(e);return console.log("Heimdall: checking if there is a valid token",r<n&&o),r<n&&o};Se.hasValidToken=lm;var um=function(){return Math.floor(Math.random()*6e4)+6e4};Se.getRandomDelay=um;var dm=function(e,t){if(!e||!t)throw new Error("User Id or user group Id not found in the response");(0,St.setItemInStorage)("hiverAuthUserId",e),(0,St.setItemInStorage)("hiverAuthUserGroupId",t)};Se.setUserDetails=dm;var fm=function(e,t){if(!e)throw new Error("Token not found in the response");(0,St.setItemInStorage)("hiverAuthToken",e),(0,St.setItemInStorage)("hiverAuthTokenExpiry",t)};Se.setTokenAndExpiry=fm;var pm=function(){var e=(0,St.getItemFromStorage)("hiverAuthTokenExpiry"),t=(0,St.getItemFromStorage)("hiverAuthToken"),n=(0,St.getItemFromStorage)("hiverAuthUserId"),r=(0,St.getItemFromStorage)("hiverAuthUserGroupId");return{token:t,expiryTime:e,userId:n,usergroupId:r}};Se.getStoredAuthData=pm;var Qu=function(){var e=(0,St.getItemFromStorage)("hiverAuthTokenExpiry")||"";if(!e)return!0;var t=Di(),n=new Date(e),r=4*60*1e3,o=n.getTime()-t.getTime()<r;return console.log({currentTime:t,expiry:n,isInExpiryWindow:o}),o};Se.isTokenInExpiryWindow=Qu;var hm=function(e){return om(void 0,void 0,void 0,function(){return sm(this,function(t){switch(t.label){case 0:return[4,new Promise(function(n){return setTimeout(n,e)})];case 1:return t.sent(),[2]}})})};Se.introduceDelay=hm;var gm=function(e,t,n){switch(n===void 0&&(n=!0),t){case bn.TIERS.SIT:case bn.TIERS.QA:return n?(0,Pr.getSitApiConfig)(e):(0,Pr.getSitHqConfig)(e);case bn.TIERS.PRODUCTION:case bn.TIERS.PROD:return n?(0,Pr.getProdApiConfig)():(0,Pr.getProdHqConfig)();case bn.TIERS.DEV:default:return n?(0,Pr.getDevApiConfig)():(0,Pr.getDevHqConfig)()}};Se.getConfig=gm;var mm=function(){try{var e=(0,St.getItemFromStorage)("hiverAuthTokenExpiry");if(!e)return bn.RETRY_DELAY_IN_CASE_OF_CORRUPTED_EXPIRY;var t=new Date(e),n=Di();return t.getTime()-n.getTime()>bn.TWO_MINUTES_IN_MS?t.getTime()-bn.TWO_MINUTES_IN_MS:t.getTime()-n.getTime()}catch(r){return console.error("Heimdall: Error in getRefreshInterval",r),bn.REFETCH_CHECK_DELAY}};Se.getRefreshInterval=mm;var Oo={},Wt={},Uu;function Ku(){if(Uu)return Wt;Uu=1;var e=ge&&ge.__awaiter||function(y,p,h,g){function C(x){return x instanceof h?x:new h(function(I){I(x)})}return new(h||(h=Promise))(function(x,I){function E(S){try{A(g.next(S))}catch(L){I(L)}}function _(S){try{A(g.throw(S))}catch(L){I(L)}}function A(S){S.done?x(S.value):C(S.value).then(E,_)}A((g=g.apply(y,p||[])).next())})},t=ge&&ge.__generator||function(y,p){var h={label:0,sent:function(){if(x[0]&1)throw x[1];return x[1]},trys:[],ops:[]},g,C,x,I;return I={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(I[Symbol.iterator]=function(){return this}),I;function E(A){return function(S){return _([A,S])}}function _(A){if(g)throw new TypeError("Generator is already executing.");for(;I&&(I=0,A[0]&&(h=0)),h;)try{if(g=1,C&&(x=A[0]&2?C.return:A[0]?C.throw||((x=C.return)&&x.call(C),0):C.next)&&!(x=x.call(C,A[1])).done)return x;switch(C=0,x&&(A=[A[0]&2,x.value]),A[0]){case 0:case 1:x=A;break;case 4:return h.label++,{value:A[1],done:!1};case 5:h.label++,C=A[1],A=[0];continue;case 7:A=h.ops.pop(),h.trys.pop();continue;default:if(x=h.trys,!(x=x.length>0&&x[x.length-1])&&(A[0]===6||A[0]===2)){h=0;continue}if(A[0]===3&&(!x||A[1]>x[0]&&A[1]<x[3])){h.label=A[1];break}if(A[0]===6&&h.label<x[1]){h.label=x[1],x=A;break}if(x&&h.label<x[2]){h.label=x[2],h.ops.push(A);break}x[2]&&h.ops.pop(),h.trys.pop();continue}A=p.call(y,h)}catch(S){A=[6,S],C=0}finally{g=x=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}};Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.logoutFromHeimdall=Wt.getTenantLoginCode=Wt.getLoginToken=Wt.getAccessToken=void 0;var n=Fn,r=od(),o=Se,s=function(y,p,h,g){var C=(0,o.getStoredAuthData)(),x=h===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:y.heimdallUrl,url:y.apiEndpoints.heimdallTokenFetch,method:n.GET_METHOD,headers:{"x-hiver-tenant":x},data:{user_id:p.userId,usergroup_id:p.usergroupId,access_token:(C==null?void 0:C.token)||"",source:g}}},a=function(y,p,h,g,C){var x=h===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:p.heimdallUrl,url:p.apiEndpoints.heimdallLogin,method:n.GET_METHOD,data:{code:y},headers:{"x-hiver-tenant":x,"x-hiver-userid":g,"x-hiver-usergroupid":C}}},i=function(y,p){var h=p===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:y.heimdallUrl,url:y.apiEndpoints.heimdallLogout,method:n.GET_METHOD,headers:{"x-hiver-tenant":h}}},c=function(y){return parseInt(y,10)},l=function(y,p,h,g){return{root_url:h===n.TENANT_PLATFORM.HIVERWEB?y.hotUrl:y.v2Url,url:h===n.TENANT_PLATFORM.HIVERWEB?y.apiEndpoints.hotLogin:y.apiEndpoints.v2Login,method:n.GET_METHOD,data:{usersession:c(p.userId),app:g||n.APP_UI.DEFAULT}}},f=function(y,p,h,g,C){return e(void 0,void 0,void 0,function(){var x,I,E,_,A,S,L;return t(this,function(k){switch(k.label){case 0:console.log("GETTOKEN tenantPlatform -> ",g),k.label=1;case 1:return k.trys.push([1,5,,6]),!(0,o.validateToken)(h)||(0,o.invalidateToken)(h)?(console.log("HEIMDALL: No valid token, fetching token"),x=s(p,h,g,C),[4,(0,r.performAxiosCall)(x)]):[3,3];case 2:return I=k.sent(),[2,{atToken:(_=I==null?void 0:I.data.at)===null||_===void 0?void 0:_.token,expiryTime:(A=I==null?void 0:I.data.at)===null||A===void 0?void 0:A.expires_at,userId:(S=I==null?void 0:I.data)===null||S===void 0?void 0:S.user_id,userGroupId:(L=I==null?void 0:I.data)===null||L===void 0?void 0:L.usergroup_id}];case 3:return console.log("Heimdall: Valid token already exists"),[2,{}];case 4:return[3,6];case 5:throw E=k.sent(),E;case 6:return[2]}})})};Wt.getAccessToken=f;var m=function(y,p,h,g,C,x){return e(void 0,void 0,void 0,function(){var I,E,_,A,S,L,k;return t(this,function(D){switch(D.label){case 0:I=a(y,h,g,C,x),D.label=1;case 1:return D.trys.push([1,3,,4]),[4,(0,r.performAxiosCall)(I)];case 2:return E=D.sent(),[2,{userId:(A=E==null?void 0:E.data)===null||A===void 0?void 0:A.user_id,userGroupId:(S=E==null?void 0:E.data)===null||S===void 0?void 0:S.usergroup_id,atToken:(L=E==null?void 0:E.data.at)===null||L===void 0?void 0:L.token,expiryTime:(k=E==null?void 0:E.data.at)===null||k===void 0?void 0:k.expires_at}];case 3:throw _=D.sent(),_;case 4:return[2]}})})};Wt.getLoginToken=m;var b=function(y,p,h,g,C){return e(void 0,void 0,void 0,function(){var x,I,E;return t(this,function(_){switch(_.label){case 0:return _.trys.push([0,2,,3]),console.log("ERROR debug: in getTenantLoginCode:",C),x=l(p,h,g,C),[4,(0,r.performAxiosCall)(x)];case 1:return I=_.sent(),[2,I==null?void 0:I.data.code];case 2:throw E=_.sent(),E;case 3:return[2]}})})};Wt.getTenantLoginCode=b;var v=function(y,p,h){return h===void 0&&(h=0),e(void 0,void 0,void 0,function(){var g,C,x;return t(this,function(I){switch(I.label){case 0:return I.trys.push([0,2,,5]),g=i(y,p),[4,(0,r.performAxiosCall)(g)];case 1:return C=I.sent(),[2,C==null?void 0:C.status];case 2:return x=I.sent(),h<2?[4,v(y,p,h+1)]:[3,4];case 3:I.sent(),I.label=4;case 4:throw x;case 5:return[2]}})})};return Wt.logoutFromHeimdall=v,Wt}var Ds={},bm=ge&&ge.__awaiter||function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function i(f){try{l(r.next(f))}catch(m){a(m)}}function c(f){try{l(r.throw(f))}catch(m){a(m)}}function l(f){f.done?s(f.value):o(f.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},ym=ge&&ge.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,a;return a={next:i(0),throw:i(1),return:i(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function i(l){return function(f){return c([l,f])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,o&&(s=l[0]&2?o.return:l[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,l[1])).done)return s;switch(o=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(f){l=[6,f],o=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(Ds,"__esModule",{value:!0}),Ds.subscribeToOnlineEvent=void 0;var ed=Fn,Cm=rn,xm=function(e,t){switch(t===void 0&&(t=(0,Cm.getValue)("PLATFORM")),console.log("Online status detected. Fetching token..."),t){case ed.PLATFORM.WEB:return window.addEventListener("online",function(){return bm(void 0,void 0,void 0,function(){return ym(this,function(n){switch(n.label){case 0:return console.log("Online status detected. Fetching token..."),[4,e()];case 1:return n.sent(),[2]}})})});case ed.PLATFORM.MOBILE:e();return;default:throw Error("Invalid PLATFORM ".concat(t))}};Ds.subscribeToOnlineEvent=xm;var td;function nd(){if(td)return Oo;td=1;var e=ge&&ge.__awaiter||function(y,p,h,g){function C(x){return x instanceof h?x:new h(function(I){I(x)})}return new(h||(h=Promise))(function(x,I){function E(S){try{A(g.next(S))}catch(L){I(L)}}function _(S){try{A(g.throw(S))}catch(L){I(L)}}function A(S){S.done?x(S.value):C(S.value).then(E,_)}A((g=g.apply(y,p||[])).next())})},t=ge&&ge.__generator||function(y,p){var h={label:0,sent:function(){if(x[0]&1)throw x[1];return x[1]},trys:[],ops:[]},g,C,x,I;return I={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(I[Symbol.iterator]=function(){return this}),I;function E(A){return function(S){return _([A,S])}}function _(A){if(g)throw new TypeError("Generator is already executing.");for(;I&&(I=0,A[0]&&(h=0)),h;)try{if(g=1,C&&(x=A[0]&2?C.return:A[0]?C.throw||((x=C.return)&&x.call(C),0):C.next)&&!(x=x.call(C,A[1])).done)return x;switch(C=0,x&&(A=[A[0]&2,x.value]),A[0]){case 0:case 1:x=A;break;case 4:return h.label++,{value:A[1],done:!1};case 5:h.label++,C=A[1],A=[0];continue;case 7:A=h.ops.pop(),h.trys.pop();continue;default:if(x=h.trys,!(x=x.length>0&&x[x.length-1])&&(A[0]===6||A[0]===2)){h=0;continue}if(A[0]===3&&(!x||A[1]>x[0]&&A[1]<x[3])){h.label=A[1];break}if(A[0]===6&&h.label<x[1]){h.label=x[1],x=A;break}if(x&&h.label<x[2]){h.label=x[2],h.ops.push(A);break}x[2]&&h.ops.pop(),h.trys.pop();continue}A=p.call(y,h)}catch(S){A=[6,S],C=0}finally{g=x=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}};Object.defineProperty(Oo,"__esModule",{value:!0}),Oo.fetchAccessToken=void 0;var n=Ku(),r=Fn,o=Se,s=Ds,a,i,c,l=function(y,p,h,g,C,x){return x===void 0&&(x=r.APP_UI.DEFAULT),e(void 0,void 0,void 0,function(){var I,E,_,A,S,L,k,D,N;return t(this,function(M){switch(M.label){case 0:I=2,M.label=1;case 1:return M.trys.push([1,7,,12]),console.log("ERROR debug: in login:",x,g),E=void 0,C?[4,C()]:[3,3];case 2:return E=M.sent(),[3,5];case 3:return[4,(0,n.getTenantLoginCode)(r.CONFIG_HIVER,y,p,g,x)];case 4:E=M.sent(),M.label=5;case 5:return[4,(0,n.getLoginToken)(E,r.CONFIG_HIVER,y,g,p.userId,p.usergroupId)];case 6:return _=M.sent(),A=_.userId,S=_.userGroupId,L=_.atToken,k=_.expiryTime,(0,o.setTokenAndExpiry)(L,k),(0,o.setUserDetails)(A,S),[3,12];case 7:D=M.sent(),console.log("ERROR debug: in error login:",D,x),N=h,M.label=8;case 8:return N<I?[4,l(y,p,N+1,g,C,x)]:[3,11];case 9:M.sent(),M.label=10;case 10:return N++,[3,8];case 11:throw D;case 12:return[2]}})})},f=function(y,p,h,g,C){return e(void 0,void 0,void 0,function(){var x,I,E,_;return t(this,function(A){switch(A.label){case 0:return p<r.MAX_CONFLICT_RETRY_DELAY?[4,new Promise(function(S){return setTimeout(S,y)})]:[3,3];case 1:return A.sent(),p+=y,y*2<=r.MAX_BACKOFF_LIMIT?y*=2:y=r.MAX_BACKOFF_LIMIT,console.log("Heimdall: Fetch token post doubling conflict retry delay",y),x=h.retryDelay,I=h.configs,E=h.apiParams,_=h.appUI,[4,m(x,y,p,I,E,g,C,_)];case 2:A.sent(),A.label=3;case 3:return[2]}})})},m=function(y,p,h,g,C,x,I,E,_){return E===void 0&&(E="default"),e(void 0,void 0,void 0,function(){var A,S,L,k,D,N,M,V,J,$,H,X,q,se;return t(this,function(de){switch(de.label){case 0:return de.trys.push([0,2,,12]),console.log("Heimdall: Interval Set on fetch token in fetchAndSaveToken:",c),[4,(0,n.getAccessToken)(r.CONFIG_HIVER,g,C,x,E)];case 1:return A=de.sent(),S=A.atToken,L=A.expiryTime,k=A.userId,D=A.userGroupId,S&&L&&(0,o.setTokenAndExpiry)(S,L),k&&D&&(0,o.setUserDetails)(k,D),y=r.INITIAL_RETRY_DELAY,p=r.INITIAL_RETRY_DELAY,h=0,[3,12];case 2:return N=de.sent(),console.log("ERROR: Heimdall fetch token",N),((J=N.response)===null||J===void 0?void 0:J.status)===401||(($=N.request)===null||$===void 0?void 0:$.status)===401?(M=1,[4,l(g,C,M,x,I,_)]):[3,4];case 3:return de.sent(),[3,11];case 4:return((H=N.response)===null||H===void 0?void 0:H.status)===409||((X=N.request)===null||X===void 0?void 0:X.status)===409?(console.log("Heimdall: Fetching token post 409 in fetch And Save Token"),V={retryDelay:y,configs:g,apiParams:C,appUI:_},[4,f(p,h,V,x,I)]):[3,6];case 5:if(de.sent(),h>=r.MAX_CONFLICT_RETRY_DELAY)throw N;return[3,11];case 6:if(!(((q=N.response)===null||q===void 0?void 0:q.status)===422||((se=N.request)===null||se===void 0?void 0:se.status)===422))return[3,7];throw console.log("ERROR: Throwing error",N.response.status),N;case 7:return y<=r.MAX_RETRY_DELAY?[4,new Promise(function(B){return setTimeout(B,y)})]:[3,10];case 8:return de.sent(),y*=2,console.log("Heimdall: Fetch token post doubling retry delay",y),[4,m(y,p,h,g,C,x,I,_)];case 9:return de.sent(),[3,11];case 10:throw N;case 11:return[3,12];case 12:return[2]}})})},b=function(y,p,h,g,C,x,I,E){return h===void 0&&(h=r.INITIAL_RETRY_DELAY),g===void 0&&(g=r.INITIAL_RETRY_DELAY),e(void 0,void 0,void 0,function(){var _,A,S;return t(this,function(L){switch(L.label){case 0:return L.trys.push([0,4,,5]),_=(0,o.isTokenInExpiryWindow)(),_?(A=(0,o.getRandomDelay)(),[4,(0,o.introduceDelay)(A)]):[3,3];case 1:return L.sent(),console.log("Heimdall: Fetching token - in expiry window"),[4,m(h,g,C,y,p,x,I,E)];case 2:L.sent(),L.label=3;case 3:return[3,5];case 4:throw S=L.sent(),S;case 5:return[2]}})})},v=function(y,p,h,g,C,x,I){return e(void 0,void 0,void 0,function(){var E,_,A,S,L,k;return t(this,function(D){switch(D.label){case 0:a=y,i=p,E=r.INITIAL_RETRY_DELAY,_=r.INITIAL_RETRY_DELAY,A=0,S=(0,o.getConfig)(a,i),console.log("Instance: Fetch Call"),D.label=1;case 1:return D.trys.push([1,3,,4]),[4,m(E,_,A,S,h,g,C,x,I)];case 2:return D.sent(),console.log("Heimdall: Interval Set on fetch token when fetch token is called:",c),clearInterval(c),c=setInterval(function(){return b(S,h,r.INITIAL_RETRY_DELAY,r.INITIAL_RETRY_DELAY,0,g,C,I)},r.REFETCH_CHECK_DELAY),L=function(){return e(void 0,void 0,void 0,function(){return t(this,function(N){switch(N.label){case 0:return[4,b(S,h,r.INITIAL_RETRY_DELAY,r.INITIAL_RETRY_DELAY,0,g,C,I)];case 1:return N.sent(),[2]}})})},console.log("Heimdall: Interval Set on fetch token:",c),(0,s.subscribeToOnlineEvent)(L),[3,4];case 3:return k=D.sent(),console.log("ERROR: Fetching token failed",k),[3,4];case 4:return[2]}})})};return Oo.fetchAccessToken=v,Oo}var rd;function od(){if(rd)return Kn;rd=1;var e=ge&&ge.__assign||function(){return e=Object.assign||function(p){for(var h,g=1,C=arguments.length;g<C;g++){h=arguments[g];for(var x in h)Object.prototype.hasOwnProperty.call(h,x)&&(p[x]=h[x])}return p},e.apply(this,arguments)},t=ge&&ge.__awaiter||function(p,h,g,C){function x(I){return I instanceof g?I:new g(function(E){E(I)})}return new(g||(g=Promise))(function(I,E){function _(L){try{S(C.next(L))}catch(k){E(k)}}function A(L){try{S(C.throw(L))}catch(k){E(k)}}function S(L){L.done?I(L.value):x(L.value).then(_,A)}S((C=C.apply(p,h||[])).next())})},n=ge&&ge.__generator||function(p,h){var g={label:0,sent:function(){if(I[0]&1)throw I[1];return I[1]},trys:[],ops:[]},C,x,I,E;return E={next:_(0),throw:_(1),return:_(2)},typeof Symbol=="function"&&(E[Symbol.iterator]=function(){return this}),E;function _(S){return function(L){return A([S,L])}}function A(S){if(C)throw new TypeError("Generator is already executing.");for(;E&&(E=0,S[0]&&(g=0)),g;)try{if(C=1,x&&(I=S[0]&2?x.return:S[0]?x.throw||((I=x.return)&&I.call(x),0):x.next)&&!(I=I.call(x,S[1])).done)return I;switch(x=0,I&&(S=[S[0]&2,I.value]),S[0]){case 0:case 1:I=S;break;case 4:return g.label++,{value:S[1],done:!1};case 5:g.label++,x=S[1],S=[0];continue;case 7:S=g.ops.pop(),g.trys.pop();continue;default:if(I=g.trys,!(I=I.length>0&&I[I.length-1])&&(S[0]===6||S[0]===2)){g=0;continue}if(S[0]===3&&(!I||S[1]>I[0]&&S[1]<I[3])){g.label=S[1];break}if(S[0]===6&&g.label<I[1]){g.label=I[1],I=S;break}if(I&&g.label<I[2]){g.label=I[2],g.ops.push(S);break}I[2]&&g.ops.pop(),g.trys.pop();continue}S=h.call(p,g)}catch(L){S=[6,L],x=0}finally{C=I=0}if(S[0]&5)throw S[1];return{value:S[0]?S[1]:void 0,done:!0}}};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.hiverAxiosCall=Kn.performAxiosCall=void 0;var r=$u,o=Se,s=nd(),a=nn,i=Fn,c,l=2,f=function(p,h){var g=h.fetchCsrfToken();p.formData?p.formData.append("_csrf_token",g):(p.data=p.data||{},p.data._csrf_token=g)},m=function(p,h){var g={};!p.method||p.method.toLowerCase()==="get"?g={params:p.params?p.params:p.data}:g=p.params?{params:p,data:p.data}:{data:p.data};var C=e(e({method:p.method,url:"".concat(p.root_url).concat(p.url),headers:p.headers},g),{withCredentials:h,responseType:(p==null?void 0:p.responseType)||""});return C};function b(p,h){return h===void 0&&(h=!0),t(this,void 0,void 0,function(){var g;return n(this,function(C){return g=m(p,h),[2,(0,r.default)(g).then(function(x){return x}).catch(function(x){throw x})]})})}Kn.performAxiosCall=b;function v(p,h,g){return t(this,void 0,void 0,function(){var C,x,I;return n(this,function(E){switch(E.label){case 0:return E.trys.push([0,6,,8]),p.authTokenFetchingInProgress?[3,2]:(p.authTokenFetchingInProgress=!0,C=p.appEnv,x=p.tier,[4,(0,s.fetchAccessToken)(C,x,h,p.tenantPlatform,p.getTokenForLogin,g)]);case 1:return E.sent(),p.authTokenFetchingInProgress=!1,[3,5];case 2:return[4,new Promise(function(_){return setTimeout(_,100)})];case 3:return E.sent(),console.log("Heimdall: Retrying fetchAccessToken after 100ms..."),[4,v(p,h,g)];case 4:E.sent(),E.label=5;case 5:return[3,8];case 6:return I=E.sent(),console.log("Error while fetching Auth Token :",I),p.authTokenFetchingInProgress=!1,[4,v(p,h,g)];case 7:return E.sent(),[3,8];case 8:return[2]}})})}function y(p,h,g,C,x){var I,E;return x===void 0&&(x=0),t(this,void 0,void 0,function(){var _,A,S,L,k,D,N;return n(this,function(M){switch(M.label){case 0:if(M.trys.push([0,4,,5]),!(g.getToken&&!(0,o.hasValidToken)(h)))return[3,2];if(_=p.appEnv,A=p.tier,!_||!A)throw Error("appEnv or tier missing : ".concat(_,"/").concat(A));return"userId"in h&&"usergroupId"in h?(S={userId:h.userId,usergroupId:h.usergroupId},[4,v(p,S,C)]):[3,2];case 1:M.sent(),M.label=2;case 2:return p.csrfToken&&f(h,g),L=p.tenantPlatform===i.TENANT_PLATFORM.HIVERWEB?i.TENANT_PLATFORM.HIVERWEB:i.TENANT_PLATFORM.GMAIL,h.headers=e(e({},h.headers),{"x-hiver-tenant":L,"x-hiver-userid":(0,a.getItemFromStorage)("hiverAuthUserId")||"0","x-hiver-usergroupid":(0,a.getItemFromStorage)("hiverAuthUserGroupId")||"0"}),g.getToken&&(c=(0,a.getItemFromStorage)("hiverAuthToken")||"",h.headers=e(e({},h.headers),{Authorization:"Bearer ".concat(c)})),console.log("Performing axios call for:",h),[4,b(h,p.withCredentials)];case 3:return k=M.sent(),h.onSuccess&&h.onSuccess(k),[2,k];case 4:if(D=M.sent(),N=((I=D.response)===null||I===void 0?void 0:I.status)===403||((E=D.request)===null||E===void 0?void 0:E.status)===403,x<l&&N)return(0,o.expireToken)(),[2,y(p,h,g,C,x+1)];if(x>=l&&N||!N)throw h.onFail&&h.onFail(D),console.log("ERROR: Reached make Axios",D),D;return[3,5];case 5:return[2]}})})}return Kn.hiverAxiosCall=y,Kn}var Fo={},je={},Ge={};Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.TIERS=Ge.APP_UI=Ge.CONFIG_HIVER=Ge.REFETCH_CHECK_DELAY=Ge.INITIAL_RETRY_DELAY=Ge.MAX_BACKOFF_LIMIT=Ge.MAX_CONFLICT_RETRY_DELAY=Ge.MAX_RETRY_DELAY=Ge.GET_METHOD=void 0,Ge.GET_METHOD="GET",Ge.MAX_RETRY_DELAY=18e4,Ge.MAX_CONFLICT_RETRY_DELAY=63e3,Ge.MAX_BACKOFF_LIMIT=8e3,Ge.INITIAL_RETRY_DELAY=1e3,Ge.REFETCH_CHECK_DELAY=168e4,Ge.CONFIG_HIVER={getToken:!1,fetchCsrfToken:function(){return""},isHiverApiDomain:!0},Ge.APP_UI={COLLAB_SPACE:"collab-space",DEFAULT:"default"},Ge.TIERS={DEV:"dev",SIT:"sit",PROD:"production"};var mt={};Object.defineProperty(mt,"__esModule",{value:!0}),mt.getProdHqConfig=mt.getProdApiConfig=mt.getSitHqConfig=mt.getSitApiConfig=mt.getDevHqConfig=mt.getDevApiConfig=void 0;var jr={heimdallTokenFetch:"/v1/token/get",heimdallLogin:"/v1/login/code",v2Login:"/api/auth/login/code"},vm=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api",apiEndpoints:jr}};mt.getDevApiConfig=vm;var Em=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api2",apiEndpoints:jr}};mt.getDevHqConfig=Em;var Im=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api"),apiEndpoints:jr}};mt.getSitApiConfig=Im;var wm=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api2"),apiEndpoints:jr}};mt.getSitHqConfig=wm;var _m=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall.hiverapi.com",apiEndpoints:jr}};mt.getProdApiConfig=_m;var Sm=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall2.hiverhq.com",apiEndpoints:jr}};mt.getProdHqConfig=Sm;var Am=ge&&ge.__awaiter||function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function i(f){try{l(r.next(f))}catch(m){a(m)}}function c(f){try{l(r.throw(f))}catch(m){a(m)}}function l(f){f.done?s(f.value):o(f.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},Tm=ge&&ge.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,a;return a={next:i(0),throw:i(1),return:i(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function i(l){return function(f){return c([l,f])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,o&&(s=l[0]&2?o.return:l[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,l[1])).done)return s;switch(o=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(f){l=[6,f],o=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(je,"__esModule",{value:!0}),je.expireToken=je.validateToken=je.validateAccount=je.getConfig=je.introduceDelay=je.isTokenInExpiryWindow=je.getStoredAuthData=je.setUserDetails=je.setTokenAndExpiry=je.getRandomDelay=je.hasValidToken=void 0;var Ri=Ge,nr=mt,sd=function(){var e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4);return t},Mi=function(e){var t=parseInt(sessionStorage.getItem("hiverAuthUserId")||"0"),n=parseInt(sessionStorage.getItem("hiverAuthUserGroupId")||"0"),r=e.userId,o=e.usergroupId;return t===r&&o===n};je.validateAccount=Mi;var Lm=function(e){var t=Mi(e);return!ad()&&t};je.validateToken=Lm;var Om=function(){try{sessionStorage.removeItem("hiverAuthTokenExpiry")}catch{console.log("Heimdall: Unable to Remove token.")}};je.expireToken=Om;var Fm=function(e){console.log("Heimdall: checking if there is a valid token");var t=sessionStorage.getItem("hiverAuthTokenExpiry")||"",n=new Date(t),r=sd(),o=Mi(e);return r<n&&o};je.hasValidToken=Fm;var km=function(){return Math.floor(Math.random()*6e4)+6e4};je.getRandomDelay=km;var Dm=function(e,t){if(!e||!t)throw new Error("User Id or user group Id not found in the response");sessionStorage.setItem("hiverAuthUserId",e),sessionStorage.setItem("hiverAuthUserGroupId",t)};je.setUserDetails=Dm;var Nm=function(e,t){if(!e)throw new Error("Token not found in the response");sessionStorage.setItem("hiverAuthToken",e),sessionStorage.setItem("hiverAuthTokenExpiry",t)};je.setTokenAndExpiry=Nm;var Rm=function(){var e=sessionStorage.getItem("hiverAuthTokenExpiry"),t=sessionStorage.getItem("hiverAuthToken"),n=sessionStorage.getItem("hiverAuthUserId"),r=sessionStorage.getItem("hiverAuthUserGroupId");return{token:t,expiryTime:e,userId:n,usergroupId:r}};je.getStoredAuthData=Rm;var ad=function(){var e=sessionStorage.getItem("hiverAuthTokenExpiry")||"";if(!e)return!0;var t=sd(),n=new Date(e),r=4*60*1e3,o=n.getTime()-t.getTime()<r;return console.log({currentTime:t,expiry:n,isInExpiryWindow:o}),o};je.isTokenInExpiryWindow=ad;var Mm=function(e){return Am(void 0,void 0,void 0,function(){return Tm(this,function(t){switch(t.label){case 0:return[4,new Promise(function(n){return setTimeout(n,e)})];case 1:return t.sent(),[2]}})})};je.introduceDelay=Mm;var Pm=function(e,t,n){switch(t){case Ri.TIERS.SIT:return console.log("ISHIVERAPIDOMAIN:",n,(0,nr.getSitHqConfig)(e)),n?(0,nr.getSitApiConfig)(e):(0,nr.getSitHqConfig)(e);case Ri.TIERS.PROD:return n?(0,nr.getProdApiConfig)():(0,nr.getProdHqConfig)();case Ri.TIERS.DEV:default:return n?(0,nr.getDevApiConfig)():(0,nr.getDevHqConfig)()}};je.getConfig=Pm;var ko={},yn={},id;function jm(){if(id)return yn;id=1;var e=ge&&ge.__awaiter||function(b,v,y,p){function h(g){return g instanceof y?g:new y(function(C){C(g)})}return new(y||(y=Promise))(function(g,C){function x(_){try{E(p.next(_))}catch(A){C(A)}}function I(_){try{E(p.throw(_))}catch(A){C(A)}}function E(_){_.done?g(_.value):h(_.value).then(x,I)}E((p=p.apply(b,v||[])).next())})},t=ge&&ge.__generator||function(b,v){var y={label:0,sent:function(){if(g[0]&1)throw g[1];return g[1]},trys:[],ops:[]},p,h,g,C;return C={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function x(E){return function(_){return I([E,_])}}function I(E){if(p)throw new TypeError("Generator is already executing.");for(;C&&(C=0,E[0]&&(y=0)),y;)try{if(p=1,h&&(g=E[0]&2?h.return:E[0]?h.throw||((g=h.return)&&g.call(h),0):h.next)&&!(g=g.call(h,E[1])).done)return g;switch(h=0,g&&(E=[E[0]&2,g.value]),E[0]){case 0:case 1:g=E;break;case 4:return y.label++,{value:E[1],done:!1};case 5:y.label++,h=E[1],E=[0];continue;case 7:E=y.ops.pop(),y.trys.pop();continue;default:if(g=y.trys,!(g=g.length>0&&g[g.length-1])&&(E[0]===6||E[0]===2)){y=0;continue}if(E[0]===3&&(!g||E[1]>g[0]&&E[1]<g[3])){y.label=E[1];break}if(E[0]===6&&y.label<g[1]){y.label=g[1],g=E;break}if(g&&y.label<g[2]){y.label=g[2],y.ops.push(E);break}g[2]&&y.ops.pop(),y.trys.pop();continue}E=v.call(b,y)}catch(_){E=[6,_],h=0}finally{p=g=0}if(E[0]&5)throw E[1];return{value:E[0]?E[1]:void 0,done:!0}}};Object.defineProperty(yn,"__esModule",{value:!0}),yn.getV2LoginCode=yn.getLoginToken=yn.getAccessToken=void 0;var n=Ge,r=dd(),o=je,s=function(b,v,y){var p=(0,o.getStoredAuthData)();return{root_url:b.heimdallUrl,url:b.apiEndpoints.heimdallTokenFetch,method:n.GET_METHOD,data:{user_id:v.userId,usergroup_id:v.usergroupId,access_token:(p==null?void 0:p.token)||"",source:y},withCredentials:!0}},a=function(b,v){return{root_url:v.heimdallUrl,url:v.apiEndpoints.heimdallLogin,method:n.GET_METHOD,data:{code:b},withCredentials:!0}},i=function(b){return parseInt(b,10)},c=function(b,v){return{root_url:b.v2Url,url:b.apiEndpoints.v2Login,method:n.GET_METHOD,withCredentials:!0,data:{usersession:i(localStorage.getItem("hiver-config.usersession")),app:v||n.APP_UI.DEFAULT}}},l=function(b,v,y,p){return e(void 0,void 0,void 0,function(){var h,g,C,x,I,E,_;return t(this,function(A){switch(A.label){case 0:return A.trys.push([0,4,,5]),(0,o.validateToken)(y)?[3,2]:(console.log("HEIMDALL: No valid token, fetching token"),h=s(v,y,p),[4,(0,r.makeAxiosCall)(h,b)]);case 1:return g=A.sent(),[2,{atToken:(x=g==null?void 0:g.data.at)===null||x===void 0?void 0:x.token,expiryTime:(I=g==null?void 0:g.data.at)===null||I===void 0?void 0:I.expires_at,userId:(E=g==null?void 0:g.data)===null||E===void 0?void 0:E.user_id,userGroupId:(_=g==null?void 0:g.data)===null||_===void 0?void 0:_.usergroup_id}];case 2:return console.log("Heimdall: Valid token already exists"),[2,{}];case 3:return[3,5];case 4:throw C=A.sent(),C;case 5:return[2]}})})};yn.getAccessToken=l;var f=function(b,v,y){return e(void 0,void 0,void 0,function(){var p,h,g,C,x,I,E;return t(this,function(_){switch(_.label){case 0:p=a(b,y),_.label=1;case 1:return _.trys.push([1,3,,4]),[4,(0,r.makeAxiosCall)(p,v)];case 2:return h=_.sent(),[2,{userId:(C=h==null?void 0:h.data)===null||C===void 0?void 0:C.user_id,userGroupId:(x=h==null?void 0:h.data)===null||x===void 0?void 0:x.usergroup_id,atToken:(I=h==null?void 0:h.data.at)===null||I===void 0?void 0:I.token,expiryTime:(E=h==null?void 0:h.data.at)===null||E===void 0?void 0:E.expires_at}];case 3:throw g=_.sent(),g;case 4:return[2]}})})};yn.getLoginToken=f;var m=function(b,v,y){return e(void 0,void 0,void 0,function(){var p,h,g;return t(this,function(C){switch(C.label){case 0:return C.trys.push([0,2,,3]),console.log("ERROR debug: in getV2loginCode:",y),p=c(v,y),[4,(0,r.makeAxiosCall)(p,b)];case 1:return h=C.sent(),console.log("DEBUG HEIMDALL: local storage:",h==null?void 0:h.data),[2,h==null?void 0:h.data.code];case 2:throw g=C.sent(),g;case 3:return[2]}})})};return yn.getV2LoginCode=m,yn}var cd;function ld(){if(cd)return ko;cd=1;var e=ge&&ge.__awaiter||function(v,y,p,h){function g(C){return C instanceof p?C:new p(function(x){x(C)})}return new(p||(p=Promise))(function(C,x){function I(A){try{_(h.next(A))}catch(S){x(S)}}function E(A){try{_(h.throw(A))}catch(S){x(S)}}function _(A){A.done?C(A.value):g(A.value).then(I,E)}_((h=h.apply(v,y||[])).next())})},t=ge&&ge.__generator||function(v,y){var p={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},h,g,C,x;return x={next:I(0),throw:I(1),return:I(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function I(_){return function(A){return E([_,A])}}function E(_){if(h)throw new TypeError("Generator is already executing.");for(;x&&(x=0,_[0]&&(p=0)),p;)try{if(h=1,g&&(C=_[0]&2?g.return:_[0]?g.throw||((C=g.return)&&C.call(g),0):g.next)&&!(C=C.call(g,_[1])).done)return C;switch(g=0,C&&(_=[_[0]&2,C.value]),_[0]){case 0:case 1:C=_;break;case 4:return p.label++,{value:_[1],done:!1};case 5:p.label++,g=_[1],_=[0];continue;case 7:_=p.ops.pop(),p.trys.pop();continue;default:if(C=p.trys,!(C=C.length>0&&C[C.length-1])&&(_[0]===6||_[0]===2)){p=0;continue}if(_[0]===3&&(!C||_[1]>C[0]&&_[1]<C[3])){p.label=_[1];break}if(_[0]===6&&p.label<C[1]){p.label=C[1],C=_;break}if(C&&p.label<C[2]){p.label=C[2],p.ops.push(_);break}C[2]&&p.ops.pop(),p.trys.pop();continue}_=y.call(v,p)}catch(A){_=[6,A],g=0}finally{h=C=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}};Object.defineProperty(ko,"__esModule",{value:!0}),ko.fetchToken=void 0;var n=jm(),r=Ge,o=je,s,a,i,c=function(v,y,p){return p===void 0&&(p=r.APP_UI.DEFAULT),e(void 0,void 0,void 0,function(){var h,g,C,x,I,E,_,A,S;return t(this,function(L){switch(L.label){case 0:h=2,L.label=1;case 1:return L.trys.push([1,4,,9]),console.log("ERROR debug: in login:",p),[4,(0,n.getV2LoginCode)(r.CONFIG_HIVER,v,p)];case 2:return g=L.sent(),[4,(0,n.getLoginToken)(g,r.CONFIG_HIVER,v)];case 3:return C=L.sent(),x=C.userId,I=C.userGroupId,E=C.atToken,_=C.expiryTime,(0,o.setTokenAndExpiry)(E,_),(0,o.setUserDetails)(x,I),[3,9];case 4:A=L.sent(),console.log("ERROR debug: in error login:",A,p),S=y,L.label=5;case 5:return S<h?[4,c(v,S+1,p)]:[3,8];case 6:L.sent(),L.label=7;case 7:return S++,[3,5];case 8:throw A;case 9:return[2]}})})},l=function(v,y,p){return e(void 0,void 0,void 0,function(){var h,g,C,x;return t(this,function(I){switch(I.label){case 0:return y<r.MAX_CONFLICT_RETRY_DELAY?[4,new Promise(function(E){return setTimeout(E,v)})]:[3,3];case 1:return I.sent(),y+=v,v*2<=r.MAX_BACKOFF_LIMIT?v*=2:v=r.MAX_BACKOFF_LIMIT,console.log("Heimdall: Fetch token post doubling conflict retry delay",v),h=p.retryDelay,g=p.configs,C=p.api_params,x=p.appUI,[4,f(h,v,y,g,C,x)];case 2:I.sent(),I.label=3;case 3:return[2]}})})},f=function(v,y,p,h,g,C,x){return C===void 0&&(C="default"),e(void 0,void 0,void 0,function(){var I,E,_,A,S,L,k,D,N,M,V,J,$,H;return t(this,function(X){switch(X.label){case 0:return X.trys.push([0,2,,12]),console.log("Heimdall: Interval Set on fetch token in fetchAndSaveToken:",i),[4,(0,n.getAccessToken)(r.CONFIG_HIVER,h,g,C)];case 1:return I=X.sent(),E=I.atToken,_=I.expiryTime,A=I.userId,S=I.userGroupId,E&&_&&(0,o.setTokenAndExpiry)(E,_),A&&S&&(0,o.setUserDetails)(A,S),v=r.INITIAL_RETRY_DELAY,y=r.INITIAL_RETRY_DELAY,p=0,[3,12];case 2:return L=X.sent(),console.log("ERROR: Heimdall fetch token",L),((N=L.response)===null||N===void 0?void 0:N.status)===401||((M=L.request)===null||M===void 0?void 0:M.status)===401?(k=1,[4,c(h,k,x)]):[3,4];case 3:return X.sent(),[3,11];case 4:return((V=L.response)===null||V===void 0?void 0:V.status)===409||((J=L.request)===null||J===void 0?void 0:J.status)===409?(console.log("Heimdall: Fetching token post 409 in fetch And Save Token"),D={retryDelay:v,configs:h,api_params:g,appUI:x},[4,l(y,p,D)]):[3,6];case 5:if(X.sent(),p>=r.MAX_CONFLICT_RETRY_DELAY)throw L;return[3,11];case 6:if(!((($=L.response)===null||$===void 0?void 0:$.status)===422||((H=L.request)===null||H===void 0?void 0:H.status)===422))return[3,7];throw console.log("ERROR: Throwing error",L.response.status),L;case 7:return v<=r.MAX_RETRY_DELAY?[4,new Promise(function(q){return setTimeout(q,v)})]:[3,10];case 8:return X.sent(),v*=2,console.log("Heimdall: Fetch token post doubling retry delay",v),[4,f(v,y,p,h,g,x)];case 9:return X.sent(),[3,11];case 10:throw L;case 11:return[3,12];case 12:return[2]}})})},m=function(v,y,p,h,g,C){return p===void 0&&(p=r.INITIAL_RETRY_DELAY),h===void 0&&(h=r.INITIAL_RETRY_DELAY),g===void 0&&(g=0),e(void 0,void 0,void 0,function(){var x,I,E;return t(this,function(_){switch(_.label){case 0:return _.trys.push([0,4,,5]),x=(0,o.isTokenInExpiryWindow)(),x?(I=(0,o.getRandomDelay)(),[4,(0,o.introduceDelay)(I)]):[3,3];case 1:return _.sent(),console.log("Heimdall: Fetching token - in expiry window"),[4,f(p,h,g,v,y,C)];case 2:_.sent(),_.label=3;case 3:return[3,5];case 4:throw E=_.sent(),E;case 5:return[2]}})})},b=function(v,y,p,h,g,C){return e(void 0,void 0,void 0,function(){var x,I,E,_,A;return t(this,function(S){switch(S.label){case 0:s=v,a=y,x=r.INITIAL_RETRY_DELAY,I=r.INITIAL_RETRY_DELAY,E=0,_=(0,o.getConfig)(s,a,h),S.label=1;case 1:return S.trys.push([1,3,,4]),[4,f(x,I,E,_,p,g,C)];case 2:return S.sent(),console.log("Heimdall: Interval Set on fetch token when fetch token is called:",i),clearInterval(i),i=setInterval(function(){return m(_,p)},r.REFETCH_CHECK_DELAY),console.log("Heimdall: Interval Set on fetch token:",i),window.addEventListener("online",function(){return e(void 0,void 0,void 0,function(){return t(this,function(L){switch(L.label){case 0:return console.log("Online status detected. Fetching token..."),[4,m(_,p)];case 1:return L.sent(),[2]}})})}),[3,4];case 3:throw A=S.sent(),A;case 4:return[2]}})})};return ko.fetchToken=b,ko}var ud;function dd(){if(ud)return Fo;ud=1;var e=ge&&ge.__assign||function(){return e=Object.assign||function(b){for(var v,y=1,p=arguments.length;y<p;y++){v=arguments[y];for(var h in v)Object.prototype.hasOwnProperty.call(v,h)&&(b[h]=v[h])}return b},e.apply(this,arguments)},t=ge&&ge.__awaiter||function(b,v,y,p){function h(g){return g instanceof y?g:new y(function(C){C(g)})}return new(y||(y=Promise))(function(g,C){function x(_){try{E(p.next(_))}catch(A){C(A)}}function I(_){try{E(p.throw(_))}catch(A){C(A)}}function E(_){_.done?g(_.value):h(_.value).then(x,I)}E((p=p.apply(b,v||[])).next())})},n=ge&&ge.__generator||function(b,v){var y={label:0,sent:function(){if(g[0]&1)throw g[1];return g[1]},trys:[],ops:[]},p,h,g,C;return C={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function x(E){return function(_){return I([E,_])}}function I(E){if(p)throw new TypeError("Generator is already executing.");for(;C&&(C=0,E[0]&&(y=0)),y;)try{if(p=1,h&&(g=E[0]&2?h.return:E[0]?h.throw||((g=h.return)&&g.call(h),0):h.next)&&!(g=g.call(h,E[1])).done)return g;switch(h=0,g&&(E=[E[0]&2,g.value]),E[0]){case 0:case 1:g=E;break;case 4:return y.label++,{value:E[1],done:!1};case 5:y.label++,h=E[1],E=[0];continue;case 7:E=y.ops.pop(),y.trys.pop();continue;default:if(g=y.trys,!(g=g.length>0&&g[g.length-1])&&(E[0]===6||E[0]===2)){y=0;continue}if(E[0]===3&&(!g||E[1]>g[0]&&E[1]<g[3])){y.label=E[1];break}if(E[0]===6&&y.label<g[1]){y.label=g[1],g=E;break}if(g&&y.label<g[2]){y.label=g[2],y.ops.push(E);break}g[2]&&y.ops.pop(),y.trys.pop();continue}E=v.call(b,y)}catch(_){E=[6,_],h=0}finally{p=g=0}if(E[0]&5)throw E[1];return{value:E[0]?E[1]:void 0,done:!0}}};Object.defineProperty(Fo,"__esModule",{value:!0}),Fo.makeAxiosCall=void 0;var r=$u,o=je,s=ld(),a,i=2,c=function(b,v){var y=v.fetchCsrfToken();b.formData?b.formData.append("_csrf_token",y):(b.data=b.data||{},b.data._csrf_token=y)},l=function(b){var v=!b.method||b.method.toLowerCase()==="get"?{params:b.data}:{data:b.data},y=e(e({method:b.method,url:"".concat(b.root_url).concat(b.url),headers:b.headers},v),{withCredentials:b.withCredentials,responseType:(b==null?void 0:b.responseType)||""});return y};function f(b){return t(this,void 0,void 0,function(){var v;return n(this,function(y){return v=l(b),[2,(0,r.default)(v).then(function(p){return p}).catch(function(p){throw p})]})})}function m(b,v,y,p){var h,g;return p===void 0&&(p=0),t(this,void 0,void 0,function(){var C,x,I,E,_,A;return n(this,function(S){switch(S.label){case 0:if(S.trys.push([0,4,,5]),!(v.getToken&&!(0,o.hasValidToken)(b)))return[3,2];if(C=b.app_env,x=b.tier,!C||!x)throw Error("app_env or tier missing : ".concat(C,"/").concat(x));return"userId"in b&&"usergroupId"in b?(I={userId:b.userId,usergroupId:b.usergroupId},typeof v.isHiverApiDomain!="boolean"&&(v.isHiverApiDomain=!0),[4,(0,s.fetchToken)(C,x,I,v.isHiverApiDomain,y)]):[3,2];case 1:S.sent(),S.label=2;case 2:return b.csrfToken&&c(b,v),v.getToken&&(a=sessionStorage.getItem("hiverAuthToken")||"",b.headers=e(e({},b.headers),{Authorization:"Bearer ".concat(a)})),[4,f(b)];case 3:return E=S.sent(),b.onSuccess&&b.onSuccess(E),[2,E];case 4:if(_=S.sent(),A=((h=_.response)===null||h===void 0?void 0:h.status)===403||((g=_.request)===null||g===void 0?void 0:g.status)===403,p<i&&A)return(0,o.expireToken)(),[2,m(b,v,y,p+1)];if(p>=i&&A||!A)throw b.onFail&&b.onFail(_),console.log("ERROR: Reached make Axios",_),_;return[3,5];case 5:return[2]}})})}return Fo.makeAxiosCall=m,Fo}(function(e){var t=ge&&ge.__awaiter||function(v,y,p,h){function g(C){return C instanceof p?C:new p(function(x){x(C)})}return new(p||(p=Promise))(function(C,x){function I(A){try{_(h.next(A))}catch(S){x(S)}}function E(A){try{_(h.throw(A))}catch(S){x(S)}}function _(A){A.done?C(A.value):g(A.value).then(I,E)}_((h=h.apply(v,y||[])).next())})},n=ge&&ge.__generator||function(v,y){var p={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},h,g,C,x;return x={next:I(0),throw:I(1),return:I(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function I(_){return function(A){return E([_,A])}}function E(_){if(h)throw new TypeError("Generator is already executing.");for(;x&&(x=0,_[0]&&(p=0)),p;)try{if(h=1,g&&(C=_[0]&2?g.return:_[0]?g.throw||((C=g.return)&&C.call(g),0):g.next)&&!(C=C.call(g,_[1])).done)return C;switch(g=0,C&&(_=[_[0]&2,C.value]),_[0]){case 0:case 1:C=_;break;case 4:return p.label++,{value:_[1],done:!1};case 5:p.label++,g=_[1],_=[0];continue;case 7:_=p.ops.pop(),p.trys.pop();continue;default:if(C=p.trys,!(C=C.length>0&&C[C.length-1])&&(_[0]===6||_[0]===2)){p=0;continue}if(_[0]===3&&(!C||_[1]>C[0]&&_[1]<C[3])){p.label=_[1];break}if(_[0]===6&&p.label<C[1]){p.label=C[1],C=_;break}if(C&&p.label<C[2]){p.label=C[2],p.ops.push(_);break}C[2]&&p.ops.pop(),p.trys.pop();continue}_=y.call(v,p)}catch(A){_=[6,A],g=0}finally{h=C=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}};Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_INIT_CONFIG_HIVER=e.TENANT_PLATFORM=e.fetchToken=e.makeAxiosCall=e.Bifrost=void 0;var r=od(),o=nd(),s=Fn;Object.defineProperty(e,"TENANT_PLATFORM",{enumerable:!0,get:function(){return s.TENANT_PLATFORM}}),Object.defineProperty(e,"DEFAULT_INIT_CONFIG_HIVER",{enumerable:!0,get:function(){return s.DEFAULT_INIT_CONFIG_HIVER}});var a=Ku(),i=Se,c=nn,l=dd();Object.defineProperty(e,"makeAxiosCall",{enumerable:!0,get:function(){return l.makeAxiosCall}});var f=ld();Object.defineProperty(e,"fetchToken",{enumerable:!0,get:function(){return f.fetchToken}});var m=rn,b=function(){function v(y,p,h,g,C,x){h===void 0&&(h=s.TENANT_PLATFORM.GMAIL),g===void 0&&(g=null),C===void 0&&(C=!0),x===void 0&&(x=!1),this.setEnvironment(),this.appEnv=y,this.tier=p,this.tenantPlatform=h,this.authTokenFetchingInProgress=!1,this.getTokenForLogin=g,this.withCredentials=C,this.csrfToken=x}return v.prototype.setEnvironment=function(){typeof window<"u"&&window.document?(0,m.setValue)("PLATFORM",s.PLATFORM.WEB):(0,m.setValue)("PLATFORM",s.PLATFORM.MOBILE)},v.prototype.hiverAxios=function(y,p,h,g){return p===void 0&&(p=s.DEFAULT_INIT_CONFIG_HIVER),t(this,void 0,void 0,function(){var C,x;return n(this,function(I){switch(I.label){case 0:return I.trys.push([0,4,,5]),g&&g<2?(C={userId:y.userId,usergroupId:y.usergroupId,apiRetry:g},console.log("THIS IS THE TENNANTPLAORM -> ",this.tenantPlatform),[4,(0,o.fetchAccessToken)(this.appEnv,this.tier,C,this.tenantPlatform,this.getTokenForLogin,s.API_CALL_ORIGIN.API_RETRY)]):[3,2];case 1:I.sent(),I.label=2;case 2:return[4,(0,r.hiverAxiosCall)(this,y,p,h)];case 3:return[2,I.sent()];case 4:throw x=I.sent(),console.log("ERROR: Axios call failed",x),x;case 5:return[2]}})})},v.prototype.fetchAuthToken=function(y,p,h){return t(this,void 0,void 0,function(){var g;return n(this,function(C){switch(C.label){case 0:return C.trys.push([0,4,7,8]),this.authTokenFetchingInProgress?[3,2]:(this.authTokenFetchingInProgress=!0,[4,(0,o.fetchAccessToken)(this.appEnv,this.tier,y,this.tenantPlatform,this.getTokenForLogin,p,h)]);case 1:return C.sent(),[3,3];case 2:console.log("Heimdall: AuthToken Fetching InProgress",this.authTokenFetchingInProgress),C.label=3;case 3:return[3,8];case 4:return g=C.sent(),console.log("ERROR: Fetching token failed",g),this.authTokenFetchingInProgress=!1,[4,new Promise(function(x){return setTimeout(x,100)})];case 5:return C.sent(),console.log("Heimdall: Retrying fetchAccessToken after 100ms..."),[4,this.fetchAuthToken(y,p,h)];case 6:return C.sent(),[3,8];case 7:return this.authTokenFetchingInProgress=!1,[7];case 8:return[2]}})})},v.prototype.logout=function(){return t(this,void 0,void 0,function(){var y,p;return n(this,function(h){switch(h.label){case 0:return h.trys.push([0,2,,3]),y=(0,i.getConfig)(this.appEnv,this.tier),[4,(0,a.logoutFromHeimdall)(y,this.tenantPlatform)];case 1:return h.sent(),(0,c.removeItemFromStorage)("hiverAuthToken"),(0,c.removeItemFromStorage)("hiverAuthTokenExpiry"),(0,c.removeItemFromStorage)("hiverAuthUserId"),(0,c.removeItemFromStorage)("hiverAuthUserGroupId"),[3,3];case 2:throw p=h.sent(),console.error("Heimdall: Logout failed",p),p;case 3:return[2]}})})},v.prototype.isTokenFetchingInProgress=function(){return this.authTokenFetchingInProgress},v}();e.Bifrost=b})(pi);const Zt={userId:"",userGroupId:"",baseUrl:"",appEnv:"",tier:"",bifrost:null,isInitiated:!1},Xt=()=>{if(!Zt.isInitiated)return null;if(!Zt.baseUrl)throw new Error("Base url is not setup. please call the initConnectorsBifrost function with the appropriate value");return Zt},Bm=({baseUrl:e,appEnv:t,tier:n,userId:r,userGroupId:o,tenantPlatform:s=pi.TENANT_PLATFORM.GMAIL,withCredentials:a=!0,getTokenForLogin:i})=>{Zt.baseUrl=e,Zt.appEnv=t,Zt.tier=n,Zt.userGroupId=o,Zt.userId=r,Zt.tenantPlatform=s,Zt.bifrost=new pi.Bifrost(t,n,s,i,a),Zt.isInitiated=!0},we=(({configHiver:e})=>async n=>{const r=Xt();if(!r)throw new Error("Please call initConnectorsBifrost before making any api calls");const{bifrost:o,userGroupId:s,userId:a}=r,{url:i,method:c,root_url:l}=n,m={root_url:(l||r.baseUrl)+((n==null?void 0:n.prefix)||""),url:i,method:c,headers:n==null?void 0:n.headers,onSuccess:n==null?void 0:n.onSuccess,onFail:n==null?void 0:n.onFail,data:n==null?void 0:n.data,params:n==null?void 0:n.params,formData:n==null?void 0:n.formData,responseType:n==null?void 0:n.responseType,userId:Number(a),usergroupId:Number(s)};try{return await(o==null?void 0:o.hiverAxios(m,{...e,isHiverApiDomain:!0}))}catch(b){throw console.error("API call failed with error: ",b),b}})({configHiver:{getToken:!0,fetchCsrfToken:()=>"",isHiverApiDomain:!0},withCredentials:!0}),Vm=e=>T.createElement("svg",{width:17,height:17,viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_1180_840)"},T.createElement("path",{d:"M5.16667 10.12H9.83333V11.4533H5.16667V10.12ZM5.16667 7.45329H11.8333V8.78662H5.16667V7.45329ZM5.16667 4.78662H11.8333V6.11995H5.16667V4.78662ZM13.1667 2.11995H10.38C10.1 1.34662 9.36667 0.786621 8.5 0.786621C7.63333 0.786621 6.9 1.34662 6.62 2.11995H3.83333C3.74 2.11995 3.65333 2.12662 3.56667 2.14662C3.30667 2.19995 3.07333 2.33329 2.89333 2.51329C2.77333 2.63329 2.67333 2.77995 2.60667 2.93995C2.54 3.09329 2.5 3.26662 2.5 3.45329V12.7866C2.5 12.9666 2.54 13.1466 2.60667 13.3066C2.67333 13.4666 2.77333 13.6066 2.89333 13.7333C3.07333 13.9133 3.30667 14.0466 3.56667 14.1C3.65333 14.1133 3.74 14.12 3.83333 14.12H13.1667C13.9 14.12 14.5 13.52 14.5 12.7866V3.45329C14.5 2.71995 13.9 2.11995 13.1667 2.11995ZM8.5 1.95329C8.77333 1.95329 9 2.17995 9 2.45329C9 2.72662 8.77333 2.95329 8.5 2.95329C8.22667 2.95329 8 2.72662 8 2.45329C8 2.17995 8.22667 1.95329 8.5 1.95329ZM13.1667 12.7866H3.83333V3.45329H13.1667V12.7866Z",fill:"#343C45"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_1180_840"},T.createElement("rect",{width:16,height:16,fill:"white",transform:"translate(0.5 0.120117)"})))),Gm=e=>T.createElement("svg",{width:24,height:22,viewBox:"0 0 24 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("rect",{x:3.63636,y:2.27393,width:15.2727,height:17.2308,rx:2.90909,fill:"#F6C035"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.4621 12.0506C22.1745 11.7669 21.7845 11.6074 21.3779 11.6074C20.9712 11.6074 20.5812 11.7669 20.2937 12.0506L19.9323 12.4079L22.4626 14.9057L22.8235 14.549C22.9659 14.4084 23.0789 14.2415 23.156 14.0578C23.2331 13.8741 23.2727 13.6773 23.2727 13.4784C23.2727 13.2796 23.2331 13.0827 23.156 12.8991C23.0789 12.7154 22.9659 12.5485 22.8235 12.4079L22.4621 12.0506ZM21.7393 15.6192L19.209 13.1214L14.5624 17.7088C14.4607 17.8092 14.3897 17.9358 14.3574 18.0742L13.8314 20.3222C13.8118 20.4056 13.814 20.4927 13.8379 20.575C13.8618 20.6574 13.9065 20.7324 13.9679 20.793C14.0293 20.8535 14.1052 20.8977 14.1887 20.9213C14.2721 20.9448 14.3603 20.9471 14.4448 20.9277L16.7226 20.409C16.8626 20.377 16.9906 20.3069 17.0922 20.2066L21.7393 15.6192Z",fill:"#FFE298"}),T.createElement("rect",{x:6.54546,y:6.58154,width:10.1818,height:1.4359,rx:.717949,fill:"#FFDC83"}),T.createElement("rect",{x:6.54546,y:10.1714,width:10.1818,height:1.4359,rx:.717949,fill:"#FFDC83"}),T.createElement("rect",{x:6.54546,y:13.7612,width:6.54545,height:1.4359,rx:.717949,fill:"#FFDC83"})),Hm=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_825_73646)"},T.createElement("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z",fill:"#6F7C90"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_825_73646"},T.createElement("rect",{width:24,height:24,fill:"white"})))),Wm="Rate your experience with Hiver Apps",Zm="Share feedback on Apps",Xm="Got any feedback?",fd="https://txeep2wshyx.typeform.com/to/RuOwF9SG",zm="https://txeep2wshyx.typeform.com/to/Tfa8IrCd",Ym="https://cdn.hiverhq.com/chat-support/hiver-chat.html",Jm="enable_connectors_clicked",qm="learn_more_clicked",$m="connector_card_expand_clicked",Qm="connector_card_collapsed_clicked",Um="connector_card_refresh_clicked",Km="connector_cards_loaded",e3="connector_whats_new_card_viewed",t3="connector_whats_new_explore_now_clicked",n3="connector_whats_new_learn_more_clicked",r3="connector_whats_new_dismissed",o3="connector_create_new_object_clicked",s3="connector_link_new_object_clicked",a3="connector_new_object_created_by_form",i3="connector_new_object_linked_by_form",c3="connector_object_unlinked_by_form",l3="connector_link_preview_clicked",u3="connector_create_panel_cancel_clicked",d3="connector_create_panel_back_clicked",f3="card_loaded_on_click",p3="card_loaded",h3="schedule_call_clicked",g3="schedule_call_cross_clicked",pd="CONNECTOR_EDIT_CLICKED",m3="CONNECTOR_EDIT_REQUEST_SEND",b3="CONNECTOR_EDIT_CANCELLED",y3="CONNECTOR_EDIT_BACK_CLICKED",C3="CONNECTOR_EDIT_SUCCESS",x3="connector_video_clicked",v3="connector_card_error",Pi="got_any_feedback_clicked",E3="connector_deeplink_clicked",I3="search_bar_tapped",w3="search_suggestions_selected",_3="search_initiated",S3="no_results_found",A3="search_results_found",T3="search_result_selected",L3="search_result_linked",O3="feedback_closed_clicked",F3="help_btn_clicked",k3="connector_chat_support_clicked",D3="add_custom_field_clicked",N3="add_custom_field_success",R3="update_custom_field_success",hd="clicked_on_lookup_config",M3="clicked_on_lookup_field",P3="saved_lookup_config",j3={userEmail:"",email:"",baseUrls:{},currentSmIds:[],metaData:void 0,availableFeatures:{},sendTrackingEvent:()=>{},conversationId:void 0,isAdmin:!1,connectorFunctions:{redirectToAdmin:()=>{}},stackingContext:{}},Be=w.createContext(j3),Ns="hiver_connectors",ji={NOT_FOUND:404},B3="ftr-connector-blue-dot",gd="ftr-connectors-write-flow",V3="ftr-connectors-enhancements",G3="ftr-connector-schedule-call-agent",H3="ftr-connectors-edit",W3="enableAllConnectorFtr",Z3="ftr-cards-open-state",X3="ftr-connectors-global-search",z3="ftr-connectors-smart-suggestions",Y3="ftr-connectors-email-selection",J3="ftr-connector-agent-feedback",Rs="ftr-connector-unified-view",q3="ftr-connectors-expanded-form",md="ftr-apps-lookup-revamp",$3="ftr-ci-configurable-fields",bd="Please refresh and try again",Q3="No data available",Ms="-",yd="Refresh",Cd="Minimize",Bi="Expand",xd="Connectors",Vi="Apps",U3="Collapse",K3="Close",vd="Link",e5="Create",t5="Update",Ed="Unlink",Id="Edit",Gi="Cancel",Hi="Create new object",wd="Link existing object",n5="Are you sure you want to unlink this object?",r5="The object will be removed from this conversation for all users. However the object will still be available on {{connectorName}} if you'd like to link it back in the future.",o5="Edit card",s5="bullet_list",a5="Expanded",i5="Collapsed",_d="Something is wrong with the {{connector_name}} Connector setup. Please check our help guide <>here<>.",Sd="UNKNOWN_ERROR",c5="https://help.hiverhq.com/custom-connectors/common-connector-errors",Ad={MAIN_BUTTON:"main_button",ICON:"create_icon"},l5=" Add custom field",Wi=e=>{let t=localStorage.getItem(Ns);return t=t?JSON.parse(t):!1,t==null?void 0:t[e]},u5=e=>!!Wi(e),Td=()=>{const{userId:e=""}=Xt()||{};return String(e)},d5=(e,t=Td())=>{const n=Wi(e);return((n==null?void 0:n.isExtensionNew)??[]).includes(t)},Zi=(e,t=!1,n=!1)=>{const r=Td(),o=Wi(e);if(t||!o){localStorage.removeItem(Ns);const s={[e]:{...!n&&{isExtensionNew:t?[]:[r]},...n&&{extensionExpand:[r]}}};localStorage.setItem(Ns,JSON.stringify(s));return}else{const s=(o==null?void 0:o.isExtensionNew)??[],a=(o==null?void 0:o.extensionExpand)??[],i={[e]:{...o,...!n&&{isExtensionNew:[...new Set([...s,r])]},...n&&{extensionExpand:[...new Set([...a,r])]}}};localStorage.setItem(Ns,JSON.stringify(i));return}},et=(e={},t)=>e&&typeof e[t]>"u"?(e==null?void 0:e[W3])===!0:(e==null?void 0:e[t])===!0,ct=(e,t)=>e.replace(/:(\w+)/g,(n,r)=>String(t[r])||""),Ld=(e,t,n,r=!1)=>{var s;const o={};return o.card_title=t,o.card_state=n?a5:i5,r&&e?(o.data_state=e==null?void 0:e.status,o.connector_names=(s=e==null?void 0:e.data)==null?void 0:s.connectorNames):e&&(o.data_state=(e==null?void 0:e.status)||"unknown_error"),o},Od=e=>{switch(e.cardType){case"flat":if(Array.isArray(e.data.flatDisplay)){const t=e.data.flatDisplay.filter(n=>Number(n.statusCode)!==ji.NOT_FOUND).sort((n,r)=>n.priority-r.priority);e.data.flatDisplay={data:t}}else{const t=e.data.flatDisplay.data.filter(n=>Number(n.statusCode)!==ji.NOT_FOUND).sort((n,r)=>n.priority-r.priority);e.data.flatDisplay.data=t}break;case"flat_with_list":e.data.listItems.fields=e.data.listItems.fields.map(t=>Array.isArray(t)?{data:t.sort((r,o)=>r.priority-o.priority)}:{data:t.data.sort((r,o)=>r.priority-o.priority),externalResourceId:t.externalResourceId});break}return e},f5=e=>{if(!e||Object.keys(e).length===0)return[];const t=new Set;return Object.values(e).forEach(n=>{n.connectorNames&&n.connectorNames.forEach(r=>t.add(r))}),Array.from(t)},Xi=({url:e,params:t})=>{const n=Object.entries(t).reduce((o,[s,a])=>(a!==void 0&&a!==""&&a!==null&&(o[s]=a),o),{}),r=new URL(e);return Object.entries(n).forEach(([o,s])=>{r.searchParams.set(o,s)}),r.toString()};function Fd(e,t){return e.length>t?e.substring(0,t)+"...":e}const p5=e=>T.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_1187_180)"},T.createElement("path",{d:"M18.3333 7.81995L12.3417 7.30329L10 1.78662L7.65833 7.31162L1.66666 7.81995L6.21666 11.7616L4.85 17.62L10 14.5116L15.15 17.62L13.7917 11.7616L18.3333 7.81995ZM10 12.9533L6.86666 14.845L7.7 11.2783L4.93333 8.87829L8.58333 8.56162L10 5.20329L11.425 8.56995L15.075 8.88662L12.3083 11.2866L13.1417 14.8533L10 12.9533Z",fill:"#4D596C"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_1187_180"},T.createElement("rect",{width:20,height:20,fill:"white",transform:"translate(0 0.120117)"})))),h5=e=>T.createElement("svg",{width:21,height:20,viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_847_49587)"},T.createElement("path",{d:"M10.6668 14.392L15.8168 17.5003L14.4502 11.642L19.0002 7.70033L13.0085 7.19199L10.6668 1.66699L8.32516 7.19199L2.3335 7.70033L6.8835 11.642L5.51683 17.5003L10.6668 14.392Z",fill:"#FFE250"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_847_49587"},T.createElement("rect",{width:20,height:20,fill:"white",transform:"translate(0.666992)"})))),g5=d.keyframes`
36
36
  from {
37
37
  transform: translateY(-100%);
38
38
  opacity: 0;
@@ -149,7 +149,7 @@ React keys must be passed directly to JSX without using spread:
149
149
  }
150
150
  `,E5=d.styled(d.Typography)`
151
151
  letter-spacing: 0.042px;
152
- `,I5=({rating:e,setRating:t,count:n=5})=>{const[r,o]=w.useState(e),s=r??e,a=l=>{t(l)},i=l=>{o(l)},c=()=>{o(0)};return u.jsx(x5,{onMouseLeave:c,children:Array.from({length:n},(l,f)=>{const m=f<s;return u.jsx(v5,{onClick:()=>a(f+1),onMouseEnter:()=>i(f+1),children:u.jsxs("div",{children:[u.jsx(h5,{width:"20px",height:"20px",style:{opacity:m?1:0,zIndex:m?2:1}}),u.jsx(p5,{width:"20px",height:"20px",style:{opacity:m?0:1,zIndex:m?1:2}})]})},f)})})},w5=({connectors:e,expanded:t=!1})=>{const{currentSmIds:n,sendTrackingEvent:r,userEmail:o}=w.useContext(Be),{userGroupId:s,userId:a}=Xt()||{},i=Zi({url:dd,params:{email:o,user_id:a,ug_id:s,sm_ids:n.join(","),connector_names:e.join(","),source:"collapsed_feedback_btn"}}),[c,l]=w.useState(t),[f,m]=w.useState(!1),[b,v]=w.useState(0),y=()=>{r(Pi,{sm_ids:n,ug_id:s,connector_names:e,source:"collapsed_feedback_btn",star_rating:0}),xs(a)},p=C=>{r(Pi,{sm_ids:n,ug_id:s,connector_names:e,source:"expanded_feedback_btn",star_rating:C});const x=Zi({url:zm,params:{email:o,user_id:a,ug_id:s,sm_ids:n.join(","),connector_names:e.join(","),star_rating:String(C)}});v(C),window.open(x,"_blank"),l(!1),xs(a)},h=()=>{r(O3,{sm_ids:n,ug_id:s,connector_names:e,source:"expanded_feedback_btn"}),m(!0),xs(a)},g=()=>{f&&(l(!1),m(!1))};return u.jsxs(u.Fragment,{children:[u.jsxs(y5,{className:f||!c?"slide-down-out":"",onAnimationEnd:g,children:[u.jsxs(d.Stack,{width:"100%",direction:"row",gap:"8px",children:[u.jsx(Gm,{}),u.jsxs(d.Box,{width:"175px",children:[u.jsx(E5,{variant:"h3",children:Wm}),u.jsx(I5,{rating:b,setRating:p})]})]}),u.jsx(d.Box,{position:"relative",children:u.jsx(d.Tooltip,{title:"Close",children:u.jsx(C5,{onClick:h,children:u.jsx(Hm,{width:"16px",height:"16px"})})})})]}),u.jsx(b5,{className:f||!c?"fade-in":"",children:u.jsxs(d.Button,{size:"small",variant:"outlined",color:"tertiary",href:i,target:"_blank",onClick:y,children:[u.jsx(Vm,{}),Zm]})})]})},_5="Need setup help?",S5="Expert setup assistance available! Book a 15 min call with our integration specialist.",A5="Schedule call",T5="https://calendar.app.google/V2cJcwKMV4ax9rpk9",kd="agent_panel",Xi="hiver_schedule_call_close_button_click",L5=d.styled(d.Stack)`
152
+ `,I5=({rating:e,setRating:t,count:n=5})=>{const[r,o]=w.useState(e),s=r??e,a=l=>{t(l)},i=l=>{o(l)},c=()=>{o(0)};return u.jsx(x5,{onMouseLeave:c,children:Array.from({length:n},(l,f)=>{const m=f<s;return u.jsx(v5,{onClick:()=>a(f+1),onMouseEnter:()=>i(f+1),children:u.jsxs("div",{children:[u.jsx(h5,{width:"20px",height:"20px",style:{opacity:m?1:0,zIndex:m?2:1}}),u.jsx(p5,{width:"20px",height:"20px",style:{opacity:m?0:1,zIndex:m?1:2}})]})},f)})})},w5=({connectors:e,expanded:t=!1})=>{const{currentSmIds:n,sendTrackingEvent:r,userEmail:o}=w.useContext(Be),{userGroupId:s,userId:a}=Xt()||{},i=Xi({url:fd,params:{email:o,user_id:a,ug_id:s,sm_ids:n.join(","),connector_names:e.join(","),source:"collapsed_feedback_btn"}}),[c,l]=w.useState(t),[f,m]=w.useState(!1),[b,v]=w.useState(0),y=()=>{window.open(i,"_blank","noopener,noreferrer"),r(Pi,{sm_ids:n,ug_id:s,connector_names:e,source:"collapsed_feedback_btn",star_rating:0}),xs(a)},p=C=>{r(Pi,{sm_ids:n,ug_id:s,connector_names:e,source:"expanded_feedback_btn",star_rating:C});const x=Xi({url:zm,params:{email:o,user_id:a,ug_id:s,sm_ids:n.join(","),connector_names:e.join(","),star_rating:String(C)}});v(C),window.open(x,"_blank"),l(!1),xs(a)},h=()=>{r(O3,{sm_ids:n,ug_id:s,connector_names:e,source:"expanded_feedback_btn"}),m(!0),xs(a)},g=()=>{f&&(l(!1),m(!1))};return u.jsxs(u.Fragment,{children:[u.jsxs(y5,{className:f||!c?"slide-down-out":"",onAnimationEnd:g,children:[u.jsxs(d.Stack,{width:"100%",direction:"row",gap:"8px",children:[u.jsx(Gm,{}),u.jsxs(d.Box,{width:"175px",children:[u.jsx(E5,{variant:"h3",children:Wm}),u.jsx(I5,{rating:b,setRating:p})]})]}),u.jsx(d.Box,{position:"relative",children:u.jsx(d.Tooltip,{title:"Close",children:u.jsx(C5,{onClick:h,children:u.jsx(Hm,{width:"16px",height:"16px"})})})})]}),u.jsx(b5,{className:f||!c?"fade-in":"",children:u.jsxs(d.Button,{size:"small",variant:"outlined",color:"tertiary",onClick:y,children:[u.jsx(Vm,{}),Zm]})})]})},_5="Need setup help?",S5="Expert setup assistance available! Book a 15 min call with our integration specialist.",A5="Schedule call",T5="https://calendar.app.google/V2cJcwKMV4ax9rpk9",kd="agent_panel",zi="hiver_schedule_call_close_button_click",L5=d.styled(d.Stack)`
153
153
  padding: 12px;
154
154
  width: 250px;
155
155
  min-height: 151px;
@@ -186,7 +186,7 @@ React keys must be passed directly to JSX without using spread:
186
186
  color: ${d.theme.palette.gray.black};
187
187
  `,R5=d.styled(d.Typography)`
188
188
  color: ${d.theme.palette.gray.gray2};
189
- `,M5=()=>{const{availableFeatures:e,sendTrackingEvent:t,isAdmin:n}=w.useContext(Be),[r,o]=w.useState(()=>!(localStorage.getItem(Xi)==="true")&&et(e,G3));w.useEffect(()=>{localStorage.getItem(Xi)==="true"&&o(!1)},[]);const s=()=>{localStorage.setItem(Xi,"true"),o(!1),t(g3,{source:kd})},a=()=>{window.open(T5,"_blank"),t(h3,{source:kd})};return!r||!n?null:u.jsxs(L5,{justifyContent:"space-between",alignItems:"baseline",gap:"16px",children:[u.jsxs(O5,{gap:"4px",children:[u.jsxs(d.Stack,{direction:"row",justifyContent:"space-between",children:[u.jsx(N5,{variant:"body1_medium",children:_5}),u.jsx(d.Stack,{onClick:s,position:"absolute",top:"4px",right:"4px",children:u.jsx(d.Tooltip,{title:"Close",placement:"bottom",children:u.jsx(d.IconButton,{children:u.jsx(k5,{})})})})]}),u.jsx(R5,{variant:"body2",children:S5})]}),u.jsx(d.Stack,{onClick:a,direction:"row",alignItems:"center",children:u.jsxs(F5,{variant:"outlined",size:"small",children:[u.jsx(D5,{}),A5]})})]})},P5="data:image/svg+xml,%3csvg%20width='20'%20height='21'%20viewBox='0%200%2020%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='mask0_4649_80352'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='20'%20height='21'%3e%3crect%20y='0.320312'%20width='20'%20height='20'%20fill='%23D9D9D9'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_4649_80352)'%3e%3cpath%20d='M9.16797%2014.4873H10.8346V11.154H14.168V9.4873H10.8346V6.15397H9.16797V9.4873H5.83464V11.154H9.16797V14.4873ZM10.0013%2018.654C8.84852%2018.654%207.76519%2018.4352%206.7513%2017.9977C5.73741%2017.5602%204.85547%2016.9665%204.10547%2016.2165C3.35547%2015.4665%202.76172%2014.5845%202.32422%2013.5706C1.88672%2012.5567%201.66797%2011.4734%201.66797%2010.3206C1.66797%209.16786%201.88672%208.08453%202.32422%207.07064C2.76172%206.05675%203.35547%205.1748%204.10547%204.4248C4.85547%203.6748%205.73741%203.08105%206.7513%202.64355C7.76519%202.20605%208.84852%201.9873%2010.0013%201.9873C11.1541%201.9873%2012.2374%202.20605%2013.2513%202.64355C14.2652%203.08105%2015.1471%203.6748%2015.8971%204.4248C16.6471%205.1748%2017.2409%206.05675%2017.6784%207.07064C18.1159%208.08453%2018.3346%209.16786%2018.3346%2010.3206C18.3346%2011.4734%2018.1159%2012.5567%2017.6784%2013.5706C17.2409%2014.5845%2016.6471%2015.4665%2015.8971%2016.2165C15.1471%2016.9665%2014.2652%2017.5602%2013.2513%2017.9977C12.2374%2018.4352%2011.1541%2018.654%2010.0013%2018.654ZM10.0013%2016.9873C11.8624%2016.9873%2013.4388%2016.3415%2014.7305%2015.0498C16.0221%2013.7581%2016.668%2012.1817%2016.668%2010.3206C16.668%208.45953%2016.0221%206.88314%2014.7305%205.59147C13.4388%204.2998%2011.8624%203.65397%2010.0013%203.65397C8.14019%203.65397%206.5638%204.2998%205.27214%205.59147C3.98047%206.88314%203.33464%208.45953%203.33464%2010.3206C3.33464%2012.1817%203.98047%2013.7581%205.27214%2015.0498C6.5638%2016.3415%208.14019%2016.9873%2010.0013%2016.9873Z'%20fill='%234D596C'/%3e%3c/g%3e%3c/svg%3e",Dd=e=>T.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M15.505 1.84634C15.1241 1.46545 14.6074 1.25146 14.0688 1.25146C13.5301 1.25146 13.0134 1.46545 12.6325 1.84634L10.6244 3.85447C10.6108 3.3249 10.391 2.82156 10.0116 2.45179C9.63228 2.08203 9.12349 1.87508 8.59375 1.87509H3.90625C3.36753 1.87509 2.85087 2.0891 2.46994 2.47003C2.08901 2.85097 1.875 3.36762 1.875 3.90634V16.0938C1.875 16.6326 2.08901 17.1492 2.46994 17.5302C2.85087 17.9111 3.36753 18.1251 3.90625 18.1251H16.0938C16.6325 18.1251 17.1491 17.9111 17.5301 17.5302C17.911 17.1492 18.125 16.6326 18.125 16.0938V11.4063C18.125 10.8775 17.9189 10.3696 17.5503 9.99039C17.1817 9.6112 16.6798 9.39069 16.1512 9.37572L18.1569 7.37072C18.5378 6.98979 18.7518 6.47316 18.7518 5.93447C18.7518 5.39578 18.5378 4.87915 18.1569 4.49822L15.505 1.84634ZM11.985 9.37509H10.625V8.01509L11.985 9.37509ZM13.5162 2.73009C13.5888 2.65753 13.6749 2.59996 13.7697 2.56069C13.8645 2.52141 13.9661 2.5012 14.0688 2.5012C14.1714 2.5012 14.273 2.52141 14.3678 2.56069C14.4626 2.59996 14.5487 2.65753 14.6212 2.73009L17.2725 5.38197C17.3451 5.45452 17.4026 5.54065 17.4419 5.63545C17.4812 5.73025 17.5014 5.83186 17.5014 5.93447C17.5014 6.03708 17.4812 6.13869 17.4419 6.23349C17.4026 6.32829 17.3451 6.41442 17.2725 6.48697L14.6212 9.13822C14.5487 9.21079 14.4626 9.26835 14.3678 9.30763C14.273 9.3469 14.1714 9.36711 14.0688 9.36711C13.9661 9.36711 13.8645 9.3469 13.7697 9.30763C13.6749 9.26835 13.5888 9.21079 13.5162 9.13822L10.8644 6.48697C10.7918 6.41442 10.7342 6.32829 10.695 6.23349C10.6557 6.13869 10.6355 6.03708 10.6355 5.93447C10.6355 5.83186 10.6557 5.73025 10.695 5.63545C10.7342 5.54065 10.7918 5.45452 10.8644 5.38197L13.5162 2.73009ZM9.375 3.90634V9.37509H3.125V3.90634C3.125 3.47509 3.475 3.12509 3.90625 3.12509H8.59375C9.025 3.12509 9.375 3.47509 9.375 3.90634ZM3.125 16.0938V10.6251H9.375V16.8751H3.90625C3.475 16.8751 3.125 16.5251 3.125 16.0938ZM10.625 10.6251H16.0938C16.525 10.6251 16.875 10.9751 16.875 11.4063V16.0938C16.875 16.5251 16.525 16.8751 16.0938 16.8751H10.625V10.6251Z",fill:"#3E4C5A"}),T.createElement("rect",{x:10.877,y:5.90918,width:4.54545,height:4.54545,rx:1,transform:"rotate(-45 10.877 5.90918)",fill:"#FFE250"}),T.createElement("path",{d:"M3.77344 12.2727C3.77344 11.7204 4.22115 11.2727 4.77344 11.2727H7.77344C8.32572 11.2727 8.77344 11.7204 8.77344 12.2727V15.2727C8.77344 15.825 8.32572 16.2727 7.77344 16.2727H4.77344C4.22115 16.2727 3.77344 15.825 3.77344 15.2727L3.77344 12.2727Z",fill:"#FFE250"})),j5="data:image/svg+xml,%3csvg%20width='21'%20height='21'%20viewBox='0%200%2021%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1012_80924)'%3e%3cpath%20d='M9.66663%2015.1202H11.3333V13.4535H9.66663V15.1202ZM10.5%201.78687C5.89996%201.78687%202.16663%205.5202%202.16663%2010.1202C2.16663%2014.7202%205.89996%2018.4535%2010.5%2018.4535C15.1%2018.4535%2018.8333%2014.7202%2018.8333%2010.1202C18.8333%205.5202%2015.1%201.78687%2010.5%201.78687ZM10.5%2016.7869C6.82496%2016.7869%203.83329%2013.7952%203.83329%2010.1202C3.83329%206.4452%206.82496%203.45353%2010.5%203.45353C14.175%203.45353%2017.1666%206.4452%2017.1666%2010.1202C17.1666%2013.7952%2014.175%2016.7869%2010.5%2016.7869ZM10.5%205.1202C8.65829%205.1202%207.16663%206.61187%207.16663%208.45353H8.83329C8.83329%207.53687%209.58329%206.78687%2010.5%206.78687C11.4166%206.78687%2012.1666%207.53687%2012.1666%208.45353C12.1666%2010.1202%209.66663%209.91187%209.66663%2012.6202H11.3333C11.3333%2010.7452%2013.8333%2010.5369%2013.8333%208.45353C13.8333%206.61187%2012.3416%205.1202%2010.5%205.1202Z'%20fill='%234D596C'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1012_80924'%3e%3crect%20width='20'%20height='20'%20fill='white'%20transform='translate(0.5%200.120117)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",B5=e=>T.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_1329_1727)"},T.createElement("path",{d:"M15 1.5H3C2.175 1.5 1.5 2.175 1.5 3V16.5L4.5 13.5H15C15.825 13.5 16.5 12.825 16.5 12V3C16.5 2.175 15.825 1.5 15 1.5ZM15 12H4.5L3 13.5V3H15V12ZM5.25 6.75H6.75V8.25H5.25V6.75ZM8.25 6.75H9.75V8.25H8.25V6.75ZM11.25 6.75H12.75V8.25H11.25V6.75Z",fill:"#6F7C90"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_1329_1727"},T.createElement("rect",{width:18,height:18,fill:"white"})))),V5=e=>T.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_1329_1720)"},T.createElement("path",{d:"M16.5 6.93L11.1075 6.465L9 1.5L6.8925 6.4725L1.5 6.93L5.595 10.4775L4.365 15.75L9 12.9525L13.635 15.75L12.4125 10.4775L16.5 6.93ZM9 11.55L6.18 13.2525L6.93 10.0425L4.44 7.8825L7.725 7.5975L9 4.575L10.2825 7.605L13.5675 7.89L11.0775 10.05L11.8275 13.26L9 11.55Z",fill:"#6F7C90"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_1329_1720"},T.createElement("rect",{width:18,height:18,fill:"white"})))),G5="data:image/svg+xml,%3csvg%20width='20'%20height='21'%20viewBox='0%200%2020%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.3462%208.73757C14.0406%208.43198%2013.5451%208.43198%2013.2395%208.73757C12.9339%209.04316%2012.9339%209.53863%2013.2395%209.84422L14.3462%208.73757ZM15.2392%2010.7372L15.7925%2010.1839L15.2392%2010.7372ZM16.2377%2013.1478L15.4552%2013.1478L16.2377%2013.1478ZM15.2392%2015.5584L14.6859%2015.0051L15.2392%2015.5584ZM10.418%2015.5584L9.86469%2016.1118L10.418%2015.5584ZM9.52499%2013.5588C9.2194%2013.2532%208.72393%2013.2532%208.41834%2013.5588C8.11275%2013.8643%208.11275%2014.3598%208.41834%2014.6654L9.52499%2013.5588ZM5.52477%2011.7731C5.83036%2012.0787%206.32583%2012.0787%206.63142%2011.7731C6.93701%2011.4675%206.93701%2010.972%206.63142%2010.6665L5.52477%2011.7731ZM9.45292%204.95224L10.0062%204.39892L9.45292%204.95224ZM10.346%206.95192C10.6515%207.25752%2011.147%207.25752%2011.4526%206.95192C11.7582%206.64633%2011.7582%206.15087%2011.4526%205.84527L10.346%206.95192ZM13.2395%209.84422L14.6859%2011.2906L15.7925%2010.1839L14.3462%208.73757L13.2395%209.84422ZM14.6859%2011.2906C15.1785%2011.7832%2015.4552%2012.4512%2015.4552%2013.1478L17.0202%2013.1478C17.0202%2012.0362%2016.5786%2010.97%2015.7925%2010.1839L14.6859%2011.2906ZM15.4552%2013.1478C15.4552%2013.8445%2015.1785%2014.5125%2014.6859%2015.0051L15.7925%2016.1118C16.5786%2015.3257%2017.0202%2014.2595%2017.0202%2013.1478L15.4552%2013.1478ZM14.6859%2015.0051C13.6601%2016.0308%2011.9971%2016.0308%2010.9713%2015.0051L9.86469%2016.1118C11.5016%2017.7487%2014.1556%2017.7487%2015.7925%2016.1118L14.6859%2015.0051ZM10.9713%2015.0051L9.52499%2013.5588L8.41834%2014.6654L9.86469%2016.1118L10.9713%2015.0051ZM6.63142%2010.6665L5.18507%209.2201L4.07842%2010.3268L5.52477%2011.7731L6.63142%2010.6665ZM5.18507%209.2201C4.69249%208.72752%204.41576%208.05944%204.41576%207.36283H2.85072C2.85072%208.47452%203.29234%209.54067%204.07842%2010.3268L5.18507%209.2201ZM4.41576%207.36283C4.41576%206.66622%204.69249%205.99815%205.18507%205.50557L4.07842%204.39892C3.29234%205.185%202.85072%206.25115%202.85072%207.36283H4.41576ZM5.18507%205.50557C6.21081%204.47983%207.87386%204.47983%208.8996%205.50557L10.0062%204.39892C8.36932%202.76199%205.71534%202.76199%204.07842%204.39892L5.18507%205.50557ZM8.8996%205.50557L10.346%206.95192L11.4526%205.84527L10.0062%204.39892L8.8996%205.50557Z'%20fill='%234D596C'/%3e%3crect%20x='6.36328'%20y='7.91895'%20width='1.66667'%20height='8.33333'%20rx='0.833333'%20transform='rotate(-45%206.36328%207.91895)'%20fill='%234D596C'/%3e%3c/svg%3e",H5=({options:e,anchor:t,open:n,onClose:r})=>u.jsx(d.Menu,{id:"help-dropdown",open:n,onClose:r,anchorEl:t,children:e.map(o=>u.jsxs(d.MenuItem,{onClick:o.onClick,children:[u.jsx(d.ListItemIcon,{children:o.icon}),o.label]},o.id))}),Nd="connector-header-stuck",W5=d.styled(d.Stack)`
189
+ `,M5=()=>{const{availableFeatures:e,sendTrackingEvent:t,isAdmin:n}=w.useContext(Be),[r,o]=w.useState(()=>!(localStorage.getItem(zi)==="true")&&et(e,G3));w.useEffect(()=>{localStorage.getItem(zi)==="true"&&o(!1)},[]);const s=()=>{localStorage.setItem(zi,"true"),o(!1),t(g3,{source:kd})},a=()=>{window.open(T5,"_blank"),t(h3,{source:kd})};return!r||!n?null:u.jsxs(L5,{justifyContent:"space-between",alignItems:"baseline",gap:"16px",children:[u.jsxs(O5,{gap:"4px",children:[u.jsxs(d.Stack,{direction:"row",justifyContent:"space-between",children:[u.jsx(N5,{variant:"body1_medium",children:_5}),u.jsx(d.Stack,{onClick:s,position:"absolute",top:"4px",right:"4px",children:u.jsx(d.Tooltip,{title:"Close",placement:"bottom",children:u.jsx(d.IconButton,{children:u.jsx(k5,{})})})})]}),u.jsx(R5,{variant:"body2",children:S5})]}),u.jsx(d.Stack,{onClick:a,direction:"row",alignItems:"center",children:u.jsxs(F5,{variant:"outlined",size:"small",children:[u.jsx(D5,{}),A5]})})]})},P5="data:image/svg+xml,%3csvg%20width='20'%20height='21'%20viewBox='0%200%2020%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='mask0_4649_80352'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='20'%20height='21'%3e%3crect%20y='0.320312'%20width='20'%20height='20'%20fill='%23D9D9D9'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_4649_80352)'%3e%3cpath%20d='M9.16797%2014.4873H10.8346V11.154H14.168V9.4873H10.8346V6.15397H9.16797V9.4873H5.83464V11.154H9.16797V14.4873ZM10.0013%2018.654C8.84852%2018.654%207.76519%2018.4352%206.7513%2017.9977C5.73741%2017.5602%204.85547%2016.9665%204.10547%2016.2165C3.35547%2015.4665%202.76172%2014.5845%202.32422%2013.5706C1.88672%2012.5567%201.66797%2011.4734%201.66797%2010.3206C1.66797%209.16786%201.88672%208.08453%202.32422%207.07064C2.76172%206.05675%203.35547%205.1748%204.10547%204.4248C4.85547%203.6748%205.73741%203.08105%206.7513%202.64355C7.76519%202.20605%208.84852%201.9873%2010.0013%201.9873C11.1541%201.9873%2012.2374%202.20605%2013.2513%202.64355C14.2652%203.08105%2015.1471%203.6748%2015.8971%204.4248C16.6471%205.1748%2017.2409%206.05675%2017.6784%207.07064C18.1159%208.08453%2018.3346%209.16786%2018.3346%2010.3206C18.3346%2011.4734%2018.1159%2012.5567%2017.6784%2013.5706C17.2409%2014.5845%2016.6471%2015.4665%2015.8971%2016.2165C15.1471%2016.9665%2014.2652%2017.5602%2013.2513%2017.9977C12.2374%2018.4352%2011.1541%2018.654%2010.0013%2018.654ZM10.0013%2016.9873C11.8624%2016.9873%2013.4388%2016.3415%2014.7305%2015.0498C16.0221%2013.7581%2016.668%2012.1817%2016.668%2010.3206C16.668%208.45953%2016.0221%206.88314%2014.7305%205.59147C13.4388%204.2998%2011.8624%203.65397%2010.0013%203.65397C8.14019%203.65397%206.5638%204.2998%205.27214%205.59147C3.98047%206.88314%203.33464%208.45953%203.33464%2010.3206C3.33464%2012.1817%203.98047%2013.7581%205.27214%2015.0498C6.5638%2016.3415%208.14019%2016.9873%2010.0013%2016.9873Z'%20fill='%234D596C'/%3e%3c/g%3e%3c/svg%3e",Dd=e=>T.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M15.505 1.84634C15.1241 1.46545 14.6074 1.25146 14.0688 1.25146C13.5301 1.25146 13.0134 1.46545 12.6325 1.84634L10.6244 3.85447C10.6108 3.3249 10.391 2.82156 10.0116 2.45179C9.63228 2.08203 9.12349 1.87508 8.59375 1.87509H3.90625C3.36753 1.87509 2.85087 2.0891 2.46994 2.47003C2.08901 2.85097 1.875 3.36762 1.875 3.90634V16.0938C1.875 16.6326 2.08901 17.1492 2.46994 17.5302C2.85087 17.9111 3.36753 18.1251 3.90625 18.1251H16.0938C16.6325 18.1251 17.1491 17.9111 17.5301 17.5302C17.911 17.1492 18.125 16.6326 18.125 16.0938V11.4063C18.125 10.8775 17.9189 10.3696 17.5503 9.99039C17.1817 9.6112 16.6798 9.39069 16.1512 9.37572L18.1569 7.37072C18.5378 6.98979 18.7518 6.47316 18.7518 5.93447C18.7518 5.39578 18.5378 4.87915 18.1569 4.49822L15.505 1.84634ZM11.985 9.37509H10.625V8.01509L11.985 9.37509ZM13.5162 2.73009C13.5888 2.65753 13.6749 2.59996 13.7697 2.56069C13.8645 2.52141 13.9661 2.5012 14.0688 2.5012C14.1714 2.5012 14.273 2.52141 14.3678 2.56069C14.4626 2.59996 14.5487 2.65753 14.6212 2.73009L17.2725 5.38197C17.3451 5.45452 17.4026 5.54065 17.4419 5.63545C17.4812 5.73025 17.5014 5.83186 17.5014 5.93447C17.5014 6.03708 17.4812 6.13869 17.4419 6.23349C17.4026 6.32829 17.3451 6.41442 17.2725 6.48697L14.6212 9.13822C14.5487 9.21079 14.4626 9.26835 14.3678 9.30763C14.273 9.3469 14.1714 9.36711 14.0688 9.36711C13.9661 9.36711 13.8645 9.3469 13.7697 9.30763C13.6749 9.26835 13.5888 9.21079 13.5162 9.13822L10.8644 6.48697C10.7918 6.41442 10.7342 6.32829 10.695 6.23349C10.6557 6.13869 10.6355 6.03708 10.6355 5.93447C10.6355 5.83186 10.6557 5.73025 10.695 5.63545C10.7342 5.54065 10.7918 5.45452 10.8644 5.38197L13.5162 2.73009ZM9.375 3.90634V9.37509H3.125V3.90634C3.125 3.47509 3.475 3.12509 3.90625 3.12509H8.59375C9.025 3.12509 9.375 3.47509 9.375 3.90634ZM3.125 16.0938V10.6251H9.375V16.8751H3.90625C3.475 16.8751 3.125 16.5251 3.125 16.0938ZM10.625 10.6251H16.0938C16.525 10.6251 16.875 10.9751 16.875 11.4063V16.0938C16.875 16.5251 16.525 16.8751 16.0938 16.8751H10.625V10.6251Z",fill:"#3E4C5A"}),T.createElement("rect",{x:10.877,y:5.90918,width:4.54545,height:4.54545,rx:1,transform:"rotate(-45 10.877 5.90918)",fill:"#FFE250"}),T.createElement("path",{d:"M3.77344 12.2727C3.77344 11.7204 4.22115 11.2727 4.77344 11.2727H7.77344C8.32572 11.2727 8.77344 11.7204 8.77344 12.2727V15.2727C8.77344 15.825 8.32572 16.2727 7.77344 16.2727H4.77344C4.22115 16.2727 3.77344 15.825 3.77344 15.2727L3.77344 12.2727Z",fill:"#FFE250"})),j5="data:image/svg+xml,%3csvg%20width='21'%20height='21'%20viewBox='0%200%2021%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1012_80924)'%3e%3cpath%20d='M9.66663%2015.1202H11.3333V13.4535H9.66663V15.1202ZM10.5%201.78687C5.89996%201.78687%202.16663%205.5202%202.16663%2010.1202C2.16663%2014.7202%205.89996%2018.4535%2010.5%2018.4535C15.1%2018.4535%2018.8333%2014.7202%2018.8333%2010.1202C18.8333%205.5202%2015.1%201.78687%2010.5%201.78687ZM10.5%2016.7869C6.82496%2016.7869%203.83329%2013.7952%203.83329%2010.1202C3.83329%206.4452%206.82496%203.45353%2010.5%203.45353C14.175%203.45353%2017.1666%206.4452%2017.1666%2010.1202C17.1666%2013.7952%2014.175%2016.7869%2010.5%2016.7869ZM10.5%205.1202C8.65829%205.1202%207.16663%206.61187%207.16663%208.45353H8.83329C8.83329%207.53687%209.58329%206.78687%2010.5%206.78687C11.4166%206.78687%2012.1666%207.53687%2012.1666%208.45353C12.1666%2010.1202%209.66663%209.91187%209.66663%2012.6202H11.3333C11.3333%2010.7452%2013.8333%2010.5369%2013.8333%208.45353C13.8333%206.61187%2012.3416%205.1202%2010.5%205.1202Z'%20fill='%234D596C'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1012_80924'%3e%3crect%20width='20'%20height='20'%20fill='white'%20transform='translate(0.5%200.120117)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",B5=e=>T.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_1329_1727)"},T.createElement("path",{d:"M15 1.5H3C2.175 1.5 1.5 2.175 1.5 3V16.5L4.5 13.5H15C15.825 13.5 16.5 12.825 16.5 12V3C16.5 2.175 15.825 1.5 15 1.5ZM15 12H4.5L3 13.5V3H15V12ZM5.25 6.75H6.75V8.25H5.25V6.75ZM8.25 6.75H9.75V8.25H8.25V6.75ZM11.25 6.75H12.75V8.25H11.25V6.75Z",fill:"#6F7C90"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_1329_1727"},T.createElement("rect",{width:18,height:18,fill:"white"})))),V5=e=>T.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_1329_1720)"},T.createElement("path",{d:"M16.5 6.93L11.1075 6.465L9 1.5L6.8925 6.4725L1.5 6.93L5.595 10.4775L4.365 15.75L9 12.9525L13.635 15.75L12.4125 10.4775L16.5 6.93ZM9 11.55L6.18 13.2525L6.93 10.0425L4.44 7.8825L7.725 7.5975L9 4.575L10.2825 7.605L13.5675 7.89L11.0775 10.05L11.8275 13.26L9 11.55Z",fill:"#6F7C90"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_1329_1720"},T.createElement("rect",{width:18,height:18,fill:"white"})))),G5="data:image/svg+xml,%3csvg%20width='20'%20height='21'%20viewBox='0%200%2020%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.3462%208.73757C14.0406%208.43198%2013.5451%208.43198%2013.2395%208.73757C12.9339%209.04316%2012.9339%209.53863%2013.2395%209.84422L14.3462%208.73757ZM15.2392%2010.7372L15.7925%2010.1839L15.2392%2010.7372ZM16.2377%2013.1478L15.4552%2013.1478L16.2377%2013.1478ZM15.2392%2015.5584L14.6859%2015.0051L15.2392%2015.5584ZM10.418%2015.5584L9.86469%2016.1118L10.418%2015.5584ZM9.52499%2013.5588C9.2194%2013.2532%208.72393%2013.2532%208.41834%2013.5588C8.11275%2013.8643%208.11275%2014.3598%208.41834%2014.6654L9.52499%2013.5588ZM5.52477%2011.7731C5.83036%2012.0787%206.32583%2012.0787%206.63142%2011.7731C6.93701%2011.4675%206.93701%2010.972%206.63142%2010.6665L5.52477%2011.7731ZM9.45292%204.95224L10.0062%204.39892L9.45292%204.95224ZM10.346%206.95192C10.6515%207.25752%2011.147%207.25752%2011.4526%206.95192C11.7582%206.64633%2011.7582%206.15087%2011.4526%205.84527L10.346%206.95192ZM13.2395%209.84422L14.6859%2011.2906L15.7925%2010.1839L14.3462%208.73757L13.2395%209.84422ZM14.6859%2011.2906C15.1785%2011.7832%2015.4552%2012.4512%2015.4552%2013.1478L17.0202%2013.1478C17.0202%2012.0362%2016.5786%2010.97%2015.7925%2010.1839L14.6859%2011.2906ZM15.4552%2013.1478C15.4552%2013.8445%2015.1785%2014.5125%2014.6859%2015.0051L15.7925%2016.1118C16.5786%2015.3257%2017.0202%2014.2595%2017.0202%2013.1478L15.4552%2013.1478ZM14.6859%2015.0051C13.6601%2016.0308%2011.9971%2016.0308%2010.9713%2015.0051L9.86469%2016.1118C11.5016%2017.7487%2014.1556%2017.7487%2015.7925%2016.1118L14.6859%2015.0051ZM10.9713%2015.0051L9.52499%2013.5588L8.41834%2014.6654L9.86469%2016.1118L10.9713%2015.0051ZM6.63142%2010.6665L5.18507%209.2201L4.07842%2010.3268L5.52477%2011.7731L6.63142%2010.6665ZM5.18507%209.2201C4.69249%208.72752%204.41576%208.05944%204.41576%207.36283H2.85072C2.85072%208.47452%203.29234%209.54067%204.07842%2010.3268L5.18507%209.2201ZM4.41576%207.36283C4.41576%206.66622%204.69249%205.99815%205.18507%205.50557L4.07842%204.39892C3.29234%205.185%202.85072%206.25115%202.85072%207.36283H4.41576ZM5.18507%205.50557C6.21081%204.47983%207.87386%204.47983%208.8996%205.50557L10.0062%204.39892C8.36932%202.76199%205.71534%202.76199%204.07842%204.39892L5.18507%205.50557ZM8.8996%205.50557L10.346%206.95192L11.4526%205.84527L10.0062%204.39892L8.8996%205.50557Z'%20fill='%234D596C'/%3e%3crect%20x='6.36328'%20y='7.91895'%20width='1.66667'%20height='8.33333'%20rx='0.833333'%20transform='rotate(-45%206.36328%207.91895)'%20fill='%234D596C'/%3e%3c/svg%3e",H5=({options:e,anchor:t,open:n,onClose:r})=>u.jsx(d.Menu,{id:"help-dropdown",open:n,onClose:r,anchorEl:t,children:e.map(o=>u.jsxs(d.MenuItem,{onClick:o.onClick,children:[u.jsx(d.ListItemIcon,{children:o.icon}),o.label]},o.id))}),Nd="connector-header-stuck",W5=d.styled(d.Stack)`
190
190
  position: sticky;
191
191
  top: 0;
192
192
  box-sizing: content-box;
@@ -210,12 +210,8 @@ React keys must be passed directly to JSX without using spread:
210
210
  width: 20px;
211
211
  height: 20px;
212
212
  `,Md=d.styled(d.Typography)`
213
- font-size: 14px;
214
- font-weight: 400;
215
- line-height: 20px;
216
- letter-spacing: 0.1px;
217
213
  text-align: left;
218
- color: #323c3d;
214
+ color: ${d.theme.palette.gray.black};
219
215
  `,Pd=d.styled(d.Grid)`
220
216
  position: relative;
221
217
  width: 100%;
@@ -321,7 +317,7 @@ React keys must be passed directly to JSX without using spread:
321
317
  text-overflow: ellipsis;
322
318
  -webkit-line-clamp: 3;
323
319
  color: ${d.theme.palette.gray.gray1};
324
- `,zi=d.styled(d.Box)`
320
+ `,Yi=d.styled(d.Box)`
325
321
  position: relative;
326
322
  top: 1px;
327
323
  content: '';
@@ -461,7 +457,6 @@ React keys must be passed directly to JSX without using spread:
461
457
  transform: rotate(${e=>e.transformAngle}deg);
462
458
  `,l4=d.styled(d.Typography)`
463
459
  display: flex;
464
- font-size: 12px;
465
460
  color: ${d.theme.palette.blue.primary};
466
461
  justify-content: flex-end;
467
462
  align-items: center;
@@ -543,7 +538,7 @@ React keys must be passed directly to JSX without using spread:
543
538
  width: calc(100% - 20px);
544
539
  display: inline-block;
545
540
  color: ${d.theme.palette.gray.gray2};
546
- `,I4=({connectors:e,isWriteFlowEnabled:t,haveCreateObjects:n,haveLinkObjects:r,cards:o,handleCreateNewObject:s,handleLinkNewObject:a})=>{const i=w.useRef(null),c=w.useRef(null),[l,f]=w.useState(null),m=!!l,{availableFeatures:b,sendTrackingEvent:v,currentSmIds:y,userEmail:p}=w.useContext(Be),{userGroupId:h,userId:g}=Xt()||{},C=et(b,Rs),x=[{id:"rate-experience",label:"Rate your experience",icon:u.jsx(V5,{}),onClick:()=>{f(null);const _=Zi({url:dd,params:{email:p,user_id:g,ug_id:h,sm_ids:y.join(","),connector_names:e.join(","),source:"help_drop_down"}});window.open(_,"_blank"),v(Pi,{sm_ids:y,ug_id:h,connector_names:e,source:"help_drop_down"}),xs(g)}},{id:"instant-chat",label:"Instant chat with support",icon:u.jsx(B5,{}),onClick:()=>{f(null),window.open(Ym,"_blank"),v(k3,{sm_ids:y,ug_id:h,connector_names:e,source:"help_drop_down"})}}],I=w.useCallback(_=>{const A=document.getElementById("connector-agent-container");if(!_||!A)return;c.current&&c.current.disconnect();const S=new IntersectionObserver(L=>{const k=i.current;for(const D of L)k==null||k.classList.toggle(Nd,D.intersectionRatio===0)},{root:A});S.observe(_),c.current=S},[]),E=_=>{v(F3,{sm_ids:y,ug_id:h,connector_names:e}),f(_.currentTarget)};return u.jsxs(u.Fragment,{children:[u.jsx(Z5,{ref:I}),u.jsx(H5,{options:x,anchor:l,open:m,onClose:()=>f(null)}),u.jsxs(W5,{ref:i,children:[u.jsxs(d.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[C?u.jsx(Dd,{width:"20px",height:"20px"}):u.jsx(Rd,{}),u.jsx(Md,{variant:"h2",children:C?Vi:Cd})]}),u.jsxs(d.Stack,{direction:"row",children:[u.jsx(d.Tooltip,{title:Xm,placement:"bottom",children:u.jsx(d.IconButton,{onClick:E,id:"help-button",sx:{height:"36px",width:"36px"},children:u.jsx("img",{src:j5,alt:"Help",height:"20px"})})}),t&&(o!=null&&o.length)?u.jsxs(u.Fragment,{children:[r?u.jsx(d.Tooltip,{title:wd,placement:"bottom",children:u.jsx(d.IconButton,{onClick:a,sx:{height:"36px",width:"36px"},children:u.jsx("img",{src:G5,alt:"Link Task",height:"20px"})})}):null,n?u.jsx(d.Tooltip,{title:Id,placement:"bottom",children:u.jsx(d.IconButton,{onClick:s,sx:{height:"36px",width:"36px"},children:u.jsx("img",{src:P5,alt:"Add",height:"20px"})})}):null]}):null]})]})]})};var Yi={exports:{}},Ji={};/**
541
+ `,I4=({connectors:e,isWriteFlowEnabled:t,haveCreateObjects:n,haveLinkObjects:r,cards:o,handleCreateNewObject:s,handleLinkNewObject:a})=>{const i=w.useRef(null),c=w.useRef(null),[l,f]=w.useState(null),m=!!l,{availableFeatures:b,sendTrackingEvent:v,currentSmIds:y,userEmail:p}=w.useContext(Be),{userGroupId:h,userId:g}=Xt()||{},C=et(b,Rs),x=[{id:"rate-experience",label:"Rate your experience",icon:u.jsx(V5,{}),onClick:()=>{f(null);const _=Xi({url:fd,params:{email:p,user_id:g,ug_id:h,sm_ids:y.join(","),connector_names:e.join(","),source:"help_drop_down"}});window.open(_,"_blank"),v(Pi,{sm_ids:y,ug_id:h,connector_names:e,source:"help_drop_down"}),xs(g)}},{id:"instant-chat",label:"Instant chat with support",icon:u.jsx(B5,{}),onClick:()=>{f(null),window.open(Ym,"_blank"),v(k3,{sm_ids:y,ug_id:h,connector_names:e,source:"help_drop_down"})}}],I=w.useCallback(_=>{const A=document.getElementById("connector-agent-container");if(!_||!A)return;c.current&&c.current.disconnect();const S=new IntersectionObserver(L=>{const k=i.current;for(const D of L)k==null||k.classList.toggle(Nd,D.intersectionRatio===0)},{root:A});S.observe(_),c.current=S},[]),E=_=>{v(F3,{sm_ids:y,ug_id:h,connector_names:e}),f(_.currentTarget)};return u.jsxs(u.Fragment,{children:[u.jsx(Z5,{ref:I}),u.jsx(H5,{options:x,anchor:l,open:m,onClose:()=>f(null)}),u.jsxs(W5,{ref:i,children:[u.jsxs(d.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[C?u.jsx(Dd,{width:"20px",height:"20px"}):u.jsx(Rd,{}),u.jsx(Md,{variant:"body_sm_medium",children:C?Vi:xd})]}),u.jsxs(d.Stack,{direction:"row",children:[u.jsx(d.Tooltip,{title:Xm,placement:"bottom",children:u.jsx(d.IconButton,{onClick:E,id:"help-button",sx:{height:"36px",width:"36px"},children:u.jsx("img",{src:j5,alt:"Help",height:"20px"})})}),t&&(o!=null&&o.length)?u.jsxs(u.Fragment,{children:[r?u.jsx(d.Tooltip,{title:wd,placement:"bottom",children:u.jsx(d.IconButton,{onClick:a,sx:{height:"36px",width:"36px"},children:u.jsx("img",{src:G5,alt:"Link Task",height:"20px"})})}):null,n?u.jsx(d.Tooltip,{title:Hi,placement:"bottom",children:u.jsx(d.IconButton,{onClick:s,sx:{height:"36px",width:"36px"},children:u.jsx("img",{src:P5,alt:"Add",height:"20px"})})}):null]}):null]})]})]})};var Ji={exports:{}},qi={};/**
547
542
  * @license React
548
543
  * use-sync-external-store-with-selector.production.min.js
549
544
  *
@@ -551,7 +546,7 @@ React keys must be passed directly to JSX without using spread:
551
546
  *
552
547
  * This source code is licensed under the MIT license found in the
553
548
  * LICENSE file in the root directory of this source tree.
554
- */var Gd;function w4(){if(Gd)return Ji;Gd=1;var e=w;function t(c,l){return c===l&&(c!==0||1/c===1/l)||c!==c&&l!==l}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,o=e.useRef,s=e.useEffect,a=e.useMemo,i=e.useDebugValue;return Ji.useSyncExternalStoreWithSelector=function(c,l,f,m,b){var v=o(null);if(v.current===null){var y={hasValue:!1,value:null};v.current=y}else y=v.current;v=a(function(){function h(E){if(!g){if(g=!0,C=E,E=m(E),b!==void 0&&y.hasValue){var _=y.value;if(b(_,E))return x=_}return x=E}if(_=x,n(C,E))return _;var A=m(E);return b!==void 0&&b(_,A)?_:(C=E,x=A)}var g=!1,C,x,I=f===void 0?null:f;return[function(){return h(l())},I===null?void 0:function(){return h(I())}]},[l,f,m,b]);var p=r(c,v[0],v[1]);return s(function(){y.hasValue=!0,y.value=p},[p]),i(p),p},Ji}var qi={};/**
549
+ */var Gd;function w4(){if(Gd)return qi;Gd=1;var e=w;function t(c,l){return c===l&&(c!==0||1/c===1/l)||c!==c&&l!==l}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,o=e.useRef,s=e.useEffect,a=e.useMemo,i=e.useDebugValue;return qi.useSyncExternalStoreWithSelector=function(c,l,f,m,b){var v=o(null);if(v.current===null){var y={hasValue:!1,value:null};v.current=y}else y=v.current;v=a(function(){function h(E){if(!g){if(g=!0,C=E,E=m(E),b!==void 0&&y.hasValue){var _=y.value;if(b(_,E))return x=_}return x=E}if(_=x,n(C,E))return _;var A=m(E);return b!==void 0&&b(_,A)?_:(C=E,x=A)}var g=!1,C,x,I=f===void 0?null:f;return[function(){return h(l())},I===null?void 0:function(){return h(I())}]},[l,f,m,b]);var p=r(c,v[0],v[1]);return s(function(){y.hasValue=!0,y.value=p},[p]),i(p),p},qi}var $i={};/**
555
550
  * @license React
556
551
  * use-sync-external-store-with-selector.development.js
557
552
  *
@@ -559,9 +554,9 @@ React keys must be passed directly to JSX without using spread:
559
554
  *
560
555
  * This source code is licensed under the MIT license found in the
561
556
  * LICENSE file in the root directory of this source tree.
562
- */var Hd;function _4(){return Hd||(Hd=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=w;function t(l,f){return l===f&&(l!==0||1/l===1/f)||l!==l&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,o=e.useRef,s=e.useEffect,a=e.useMemo,i=e.useDebugValue;function c(l,f,m,b,v){var y=o(null),p;y.current===null?(p={hasValue:!1,value:null},y.current=p):p=y.current;var h=a(function(){var I=!1,E,_,A=function(D){if(!I){I=!0,E=D;var N=b(D);if(v!==void 0&&p.hasValue){var M=p.value;if(v(M,N))return _=M,M}return _=N,N}var V=E,J=_;if(n(V,D))return J;var $=b(D);return v!==void 0&&v(J,$)?J:(E=D,_=$,$)},S=m===void 0?null:m,L=function(){return A(f())},k=S===null?void 0:function(){return A(S())};return[L,k]},[f,m,b,v]),g=h[0],C=h[1],x=r(l,g,C);return s(function(){p.hasValue=!0,p.value=x},[x]),i(x),x}qi.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),qi}process.env.NODE_ENV==="production"?Yi.exports=w4():Yi.exports=_4();var S4=Yi.exports,At="default"in T?T.default:T,Wd=Symbol.for("react-redux-context"),Zd=typeof globalThis<"u"?globalThis:{};function A4(){if(!At.createContext)return{};const e=Zd[Wd]??(Zd[Wd]=new Map);let t=e.get(At.createContext);return t||(t=At.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(At.createContext,t)),t}var Dn=A4(),T4=()=>{throw new Error("uSES not initialized!")};function $i(e=Dn){return function(){const n=At.useContext(e);if(process.env.NODE_ENV!=="production"&&!n)throw new Error("could not find react-redux context value; please ensure the component is wrapped in a <Provider>");return n}}var Xd=$i(),zd=T4,L4=e=>{zd=e},O4=(e,t)=>e===t;function F4(e=Dn){const t=e===Dn?Xd:$i(e),n=(r,o={})=>{const{equalityFn:s=O4,devModeChecks:a={}}=typeof o=="function"?{equalityFn:o}:o;if(process.env.NODE_ENV!=="production"){if(!r)throw new Error("You must pass a selector to useSelector");if(typeof r!="function")throw new Error("You must pass a function as a selector to useSelector");if(typeof s!="function")throw new Error("You must pass a function as an equality function to useSelector")}const{store:i,subscription:c,getServerState:l,stabilityCheck:f,identityFunctionCheck:m}=t(),b=At.useRef(!0),v=At.useCallback({[r.name](p){const h=r(p);if(process.env.NODE_ENV!=="production"){const{identityFunctionCheck:g,stabilityCheck:C}={stabilityCheck:f,identityFunctionCheck:m,...a};if(C==="always"||C==="once"&&b.current){const x=r(p);if(!s(h,x)){let I;try{throw new Error}catch(E){({stack:I}=E)}console.warn("Selector "+(r.name||"unknown")+` returned a different result when called with the same parameters. This can lead to unnecessary rerenders.
557
+ */var Hd;function _4(){return Hd||(Hd=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=w;function t(l,f){return l===f&&(l!==0||1/l===1/f)||l!==l&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,o=e.useRef,s=e.useEffect,a=e.useMemo,i=e.useDebugValue;function c(l,f,m,b,v){var y=o(null),p;y.current===null?(p={hasValue:!1,value:null},y.current=p):p=y.current;var h=a(function(){var I=!1,E,_,A=function(D){if(!I){I=!0,E=D;var N=b(D);if(v!==void 0&&p.hasValue){var M=p.value;if(v(M,N))return _=M,M}return _=N,N}var V=E,J=_;if(n(V,D))return J;var $=b(D);return v!==void 0&&v(J,$)?J:(E=D,_=$,$)},S=m===void 0?null:m,L=function(){return A(f())},k=S===null?void 0:function(){return A(S())};return[L,k]},[f,m,b,v]),g=h[0],C=h[1],x=r(l,g,C);return s(function(){p.hasValue=!0,p.value=x},[x]),i(x),x}$i.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),$i}process.env.NODE_ENV==="production"?Ji.exports=w4():Ji.exports=_4();var S4=Ji.exports,At="default"in T?T.default:T,Wd=Symbol.for("react-redux-context"),Zd=typeof globalThis<"u"?globalThis:{};function A4(){if(!At.createContext)return{};const e=Zd[Wd]??(Zd[Wd]=new Map);let t=e.get(At.createContext);return t||(t=At.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(At.createContext,t)),t}var Dn=A4(),T4=()=>{throw new Error("uSES not initialized!")};function Qi(e=Dn){return function(){const n=At.useContext(e);if(process.env.NODE_ENV!=="production"&&!n)throw new Error("could not find react-redux context value; please ensure the component is wrapped in a <Provider>");return n}}var Xd=Qi(),zd=T4,L4=e=>{zd=e},O4=(e,t)=>e===t;function F4(e=Dn){const t=e===Dn?Xd:Qi(e),n=(r,o={})=>{const{equalityFn:s=O4,devModeChecks:a={}}=typeof o=="function"?{equalityFn:o}:o;if(process.env.NODE_ENV!=="production"){if(!r)throw new Error("You must pass a selector to useSelector");if(typeof r!="function")throw new Error("You must pass a function as a selector to useSelector");if(typeof s!="function")throw new Error("You must pass a function as an equality function to useSelector")}const{store:i,subscription:c,getServerState:l,stabilityCheck:f,identityFunctionCheck:m}=t(),b=At.useRef(!0),v=At.useCallback({[r.name](p){const h=r(p);if(process.env.NODE_ENV!=="production"){const{identityFunctionCheck:g,stabilityCheck:C}={stabilityCheck:f,identityFunctionCheck:m,...a};if(C==="always"||C==="once"&&b.current){const x=r(p);if(!s(h,x)){let I;try{throw new Error}catch(E){({stack:I}=E)}console.warn("Selector "+(r.name||"unknown")+` returned a different result when called with the same parameters. This can lead to unnecessary rerenders.
563
558
  Selectors that return a new reference (such as an object or an array) should be memoized: https://redux.js.org/usage/deriving-data-selectors#optimizing-selectors-with-memoization`,{state:p,selected:h,selected2:x,stack:I})}}if((g==="always"||g==="once"&&b.current)&&h===p){let x;try{throw new Error}catch(I){({stack:x}=I)}console.warn("Selector "+(r.name||"unknown")+` returned the root state when called. This can lead to unnecessary rerenders.
564
- Selectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.`,{stack:x})}b.current&&(b.current=!1)}return h}}[r.name],[r,f,a.stabilityCheck]),y=zd(c.addNestedSub,i.getState,l||i.getState,v,s);return At.useDebugValue(y),y};return Object.assign(n,{withTypes:()=>n}),n}var k4=F4();function D4(e){e()}function N4(){let e=null,t=null;return{clear(){e=null,t=null},notify(){D4(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},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||e===null||(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var Yd={notify(){},get:()=>[]};function R4(e,t){let n,r=Yd,o=0,s=!1;function a(p){f();const h=r.subscribe(p);let g=!1;return()=>{g||(g=!0,h(),m())}}function i(){r.notify()}function c(){y.onStateChange&&y.onStateChange()}function l(){return s}function f(){o++,n||(n=e.subscribe(c),r=N4())}function m(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=Yd)}function b(){s||(s=!0,f())}function v(){s&&(s=!1,m())}const y={addNestedSub:a,notifyNestedSubs:i,handleChangeWrapper:c,isSubscribed:l,trySubscribe:b,tryUnsubscribe:v,getListeners:()=>r};return y}var M4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",P4=typeof navigator<"u"&&navigator.product==="ReactNative",j4=M4||P4?At.useLayoutEffect:At.useEffect;function B4({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:s="once"}){const a=At.useMemo(()=>{const l=R4(e);return{store:e,subscription:l,getServerState:r?()=>r:void 0,stabilityCheck:o,identityFunctionCheck:s}},[e,r,o,s]),i=At.useMemo(()=>e.getState(),[e]);j4(()=>{const{subscription:l}=a;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),i!==e.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[a,i]);const c=t||Dn;return At.createElement(c.Provider,{value:a},n)}var Qi=B4;function Jd(e=Dn){const t=e===Dn?Xd:$i(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var V4=Jd();function G4(e=Dn){const t=e===Dn?V4:Jd(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var H4=G4();L4(S4.useSyncExternalStoreWithSelector);const zt=H4.withTypes(),Ce=k4.withTypes(),Me={GET:"GET",POST:"POST",DELETE:"DELETE",PATCH:"PATCH",PUT:"PUT"},K={IDLE:"idle",LOADING:"loading",FAILED:"failed"},W4="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8.7%209.71005L6.19497%207.20503C5.92161%206.93166%205.47839%206.93166%205.20503%207.20503C4.93166%207.47839%204.93166%207.92161%205.20503%208.19497L8.20503%2011.195C8.47839%2011.4683%208.92161%2011.4683%209.19497%2011.195L12.195%208.19497C12.4683%207.92161%2012.4683%207.47839%2012.195%207.20503C11.9216%206.93166%2011.4784%206.93166%2011.205%207.20503L8.7%209.71005Z'%20fill='%23196FE0'/%3e%3c/svg%3e",qd="Show more",Z4="Show less",X4="Show preview",z4="Hide preview",Y4="Select email";function nt(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 J4=typeof Symbol=="function"&&Symbol.observable||"@@observable",$d=J4,Ui=()=>Math.random().toString(36).substring(7).split("").join("."),q4={INIT:`@@redux/INIT${Ui()}`,REPLACE:`@@redux/REPLACE${Ui()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ui()}`},rr=q4;function Do(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function $4(e){if(e===void 0)return"undefined";if(e===null)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(K4(e))return"date";if(U4(e))return"error";const n=Q4(e);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}function Q4(e){return typeof e.constructor=="function"?e.constructor.name:null}function U4(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function K4(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Nn(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=$4(e)),t}function Qd(e,t,n){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?nt(2):`Expected the root reducer to be a function. Instead, received: '${Nn(e)}'`);if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?nt(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?nt(1):`Expected the enhancer to be a function. Instead, received: '${Nn(n)}'`);return n(Qd)(e,t)}let r=e,o=t,s=new Map,a=s,i=0,c=!1;function l(){a===s&&(a=new Map,s.forEach((h,g)=>{a.set(g,h)}))}function f(){if(c)throw new Error(process.env.NODE_ENV==="production"?nt(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function m(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?nt(4):`Expected the listener to be a function. Instead, received: '${Nn(h)}'`);if(c)throw new Error(process.env.NODE_ENV==="production"?nt(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let g=!0;l();const C=i++;return a.set(C,h),function(){if(g){if(c)throw new Error(process.env.NODE_ENV==="production"?nt(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");g=!1,l(),a.delete(C),s=null}}}function b(h){if(!Do(h))throw new Error(process.env.NODE_ENV==="production"?nt(7):`Actions must be plain objects. Instead, the actual type was: '${Nn(h)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(typeof h.type>"u")throw new Error(process.env.NODE_ENV==="production"?nt(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof h.type!="string")throw new Error(process.env.NODE_ENV==="production"?nt(17):`Action "type" property must be a string. Instead, the actual type was: '${Nn(h.type)}'. Value was: '${h.type}' (stringified)`);if(c)throw new Error(process.env.NODE_ENV==="production"?nt(9):"Reducers may not dispatch actions.");try{c=!0,o=r(o,h)}finally{c=!1}return(s=a).forEach(C=>{C()}),h}function v(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?nt(10):`Expected the nextReducer to be a function. Instead, received: '${Nn(h)}`);r=h,b({type:rr.REPLACE})}function y(){const h=m;return{subscribe(g){if(typeof g!="object"||g===null)throw new Error(process.env.NODE_ENV==="production"?nt(11):`Expected the observer to be an object. Instead, received: '${Nn(g)}'`);function C(){const I=g;I.next&&I.next(f())}return C(),{unsubscribe:h(C)}},[$d](){return this}}}return b({type:rr.INIT}),{dispatch:b,subscribe:m,getState:f,replaceReducer:v,[$d]:y}}function Ud(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function eb(e,t,n,r){const o=Object.keys(t),s=n&&n.type===rr.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(o.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!Do(e))return`The ${s} has unexpected type of "${Nn(e)}". Expected argument to be an object with the following keys: "${o.join('", "')}"`;const a=Object.keys(e).filter(i=>!t.hasOwnProperty(i)&&!r[i]);if(a.forEach(i=>{r[i]=!0}),!(n&&n.type===rr.REPLACE)&&a.length>0)return`Unexpected ${a.length>1?"keys":"key"} "${a.join('", "')}" found in ${s}. Expected to find one of the known reducer keys instead: "${o.join('", "')}". Unexpected keys will be ignored.`}function tb(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:rr.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?nt(12):`The slice reducer for key "${t}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof n(void 0,{type:rr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?nt(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${rr.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}function Kd(e){const t=Object.keys(e),n={};for(let a=0;a<t.length;a++){const i=t[a];process.env.NODE_ENV!=="production"&&typeof e[i]>"u"&&Ud(`No reducer provided for key "${i}"`),typeof e[i]=="function"&&(n[i]=e[i])}const r=Object.keys(n);let o;process.env.NODE_ENV!=="production"&&(o={});let s;try{tb(n)}catch(a){s=a}return function(i={},c){if(s)throw s;if(process.env.NODE_ENV!=="production"){const m=eb(i,n,c,o);m&&Ud(m)}let l=!1;const f={};for(let m=0;m<r.length;m++){const b=r[m],v=n[b],y=i[b],p=v(y,c);if(typeof p>"u"){const h=c&&c.type;throw new Error(process.env.NODE_ENV==="production"?nt(14):`When called with an action of type ${h?`"${String(h)}"`:"(unknown type)"}, the slice reducer for key "${b}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}f[b]=p,l=l||p!==y}return l=l||r.length!==Object.keys(i).length,l?f:i}}function Ps(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function nb(...e){return t=>(n,r)=>{const o=t(n,r);let s=()=>{throw new Error(process.env.NODE_ENV==="production"?nt(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const a={getState:o.getState,dispatch:(c,...l)=>s(c,...l)},i=e.map(c=>c(a));return s=Ps(...i)(o.dispatch),{...o,dispatch:s}}}function e0(e){return Do(e)&&"type"in e&&typeof e.type=="string"}var t0=Symbol.for("immer-nothing"),n0=Symbol.for("immer-draftable"),Tt=Symbol.for("immer-state"),rb=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function bt(e,...t){if(process.env.NODE_ENV!=="production"){const n=rb[e],r=typeof n=="function"?n.apply(null,t):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Vr=Object.getPrototypeOf;function or(e){return!!e&&!!e[Tt]}function Cn(e){var t;return e?r0(e)||Array.isArray(e)||!!e[n0]||!!((t=e.constructor)!=null&&t[n0])||Vs(e)||Gs(e):!1}var ob=Object.prototype.constructor.toString();function r0(e){if(!e||typeof e!="object")return!1;const t=Vr(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===ob}function js(e,t){Bs(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Bs(e){const t=e[Tt];return t?t.type_:Array.isArray(e)?1:Vs(e)?2:Gs(e)?3:0}function Ki(e,t){return Bs(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function o0(e,t,n){const r=Bs(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function sb(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Vs(e){return e instanceof Map}function Gs(e){return e instanceof Set}function sr(e){return e.copy_||e.base_}function ec(e,t){if(Vs(e))return new Map(e);if(Gs(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=r0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Tt];let o=Reflect.ownKeys(r);for(let s=0;s<o.length;s++){const a=o[s],i=r[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(r[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[a]})}return Object.create(Vr(e),r)}else{const r=Vr(e);if(r!==null&&n)return{...e};const o=Object.create(r);return Object.assign(o,e)}}function tc(e,t=!1){return Hs(e)||or(e)||!Cn(e)||(Bs(e)>1&&(e.set=e.add=e.clear=e.delete=ab),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>tc(r,!0))),e}function ab(){bt(2)}function Hs(e){return Object.isFrozen(e)}var ib={};function ar(e){const t=ib[e];return t||bt(0,e),t}var No;function s0(){return No}function cb(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function a0(e,t){t&&(ar("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function nc(e){rc(e),e.drafts_.forEach(lb),e.drafts_=null}function rc(e){e===No&&(No=e.parent_)}function i0(e){return No=cb(No,e)}function lb(e){const t=e[Tt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function c0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Tt].modified_&&(nc(t),bt(4)),Cn(e)&&(e=Ws(t,e),t.parent_||Zs(t,e)),t.patches_&&ar("Patches").generateReplacementPatches_(n[Tt].base_,e,t.patches_,t.inversePatches_)):e=Ws(t,n,[]),nc(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==t0?e:void 0}function Ws(e,t,n){if(Hs(t))return t;const r=t[Tt];if(!r)return js(t,(o,s)=>l0(e,r,t,o,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Zs(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let s=o,a=!1;r.type_===3&&(s=new Set(o),o.clear(),a=!0),js(s,(i,c)=>l0(e,r,o,i,c,n,a)),Zs(e,o,!1),n&&e.patches_&&ar("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function l0(e,t,n,r,o,s,a){if(process.env.NODE_ENV!=="production"&&o===n&&bt(5),or(o)){const i=s&&t&&t.type_!==3&&!Ki(t.assigned_,r)?s.concat(r):void 0,c=Ws(e,o,i);if(o0(n,r,c),or(c))e.canAutoFreeze_=!1;else return}else a&&n.add(o);if(Cn(o)&&!Hs(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Ws(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Zs(e,o)}}function Zs(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&tc(t,n)}function ub(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:s0(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,s=oc;n&&(o=[r],s=Ro);const{revoke:a,proxy:i}=Proxy.revocable(o,s);return r.draft_=i,r.revoke_=a,i}var oc={get(e,t){if(t===Tt)return e;const n=sr(e);if(!Ki(n,t))return db(e,n,t);const r=n[t];return e.finalized_||!Cn(r)?r:r===sc(e.base_,t)?(ic(e),e.copy_[t]=cc(r,e)):r},has(e,t){return t in sr(e)},ownKeys(e){return Reflect.ownKeys(sr(e))},set(e,t,n){const r=u0(sr(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=sc(sr(e),t),s=o==null?void 0:o[Tt];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(sb(n,o)&&(n!==void 0||Ki(e.base_,t)))return!0;ic(e),ac(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return sc(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,ic(e),ac(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=sr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){bt(11)},getPrototypeOf(e){return Vr(e.base_)},setPrototypeOf(){bt(12)}},Ro={};js(oc,(e,t)=>{Ro[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Ro.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&bt(13),Ro.set.call(this,e,t,void 0)},Ro.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&bt(14),oc.set.call(this,e[0],t,n,e[0])};function sc(e,t){const n=e[Tt];return(n?sr(n):e)[t]}function db(e,t,n){var o;const r=u0(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function u0(e,t){if(!(t in e))return;let n=Vr(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Vr(n)}}function ac(e){e.modified_||(e.modified_=!0,e.parent_&&ac(e.parent_))}function ic(e){e.copy_||(e.copy_=ec(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var fb=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const s=n;n=t;const a=this;return function(c=s,...l){return a.produce(c,f=>n.call(this,f,...l))}}typeof n!="function"&&bt(6),r!==void 0&&typeof r!="function"&&bt(7);let o;if(Cn(t)){const s=i0(this),a=cc(t,void 0);let i=!0;try{o=n(a),i=!1}finally{i?nc(s):rc(s)}return a0(s,r),c0(o,s)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===t0&&(o=void 0),this.autoFreeze_&&tc(o,!0),r){const s=[],a=[];ar("Patches").generateReplacementPatches_(t,o,s,a),r(s,a)}return o}else bt(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...i)=>this.produceWithPatches(a,c=>t(c,...i));let r,o;return[this.produce(t,n,(a,i)=>{r=a,o=i}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Cn(e)||bt(8),or(e)&&(e=pb(e));const t=i0(this),n=cc(e,void 0);return n[Tt].isManual_=!0,rc(t),n}finishDraft(e,t){const n=e&&e[Tt];(!n||!n.isManual_)&&bt(9);const{scope_:r}=n;return a0(r,t),c0(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=ar("Patches").applyPatches_;return or(e)?r(e,t):this.produce(e,o=>r(o,t))}};function cc(e,t){const n=Vs(e)?ar("MapSet").proxyMap_(e,t):Gs(e)?ar("MapSet").proxySet_(e,t):ub(e,t);return(t?t.scope_:s0()).drafts_.push(n),n}function pb(e){return or(e)||bt(10,e),d0(e)}function d0(e){if(!Cn(e)||Hs(e))return e;const t=e[Tt];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=ec(e,t.scope_.immer_.useStrictShallowCopy_)}else n=ec(e,!0);return js(n,(r,o)=>{o0(n,r,d0(o))}),t&&(t.finalized_=!1),n}var Lt=new fb,f0=Lt.produce;Lt.produceWithPatches.bind(Lt),Lt.setAutoFreeze.bind(Lt),Lt.setUseStrictShallowCopy.bind(Lt),Lt.applyPatches.bind(Lt),Lt.createDraft.bind(Lt),Lt.finishDraft.bind(Lt);var hb=(e,t,n)=>{if(t.length===1&&t[0]===n){let r=!1;try{const o={};e(o)===o&&(r=!0)}catch{}if(r){let o;try{throw new Error}catch(s){({stack:o}=s)}console.warn(`The result function returned its own inputs without modification. e.g
559
+ Selectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.`,{stack:x})}b.current&&(b.current=!1)}return h}}[r.name],[r,f,a.stabilityCheck]),y=zd(c.addNestedSub,i.getState,l||i.getState,v,s);return At.useDebugValue(y),y};return Object.assign(n,{withTypes:()=>n}),n}var k4=F4();function D4(e){e()}function N4(){let e=null,t=null;return{clear(){e=null,t=null},notify(){D4(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},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||e===null||(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var Yd={notify(){},get:()=>[]};function R4(e,t){let n,r=Yd,o=0,s=!1;function a(p){f();const h=r.subscribe(p);let g=!1;return()=>{g||(g=!0,h(),m())}}function i(){r.notify()}function c(){y.onStateChange&&y.onStateChange()}function l(){return s}function f(){o++,n||(n=e.subscribe(c),r=N4())}function m(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=Yd)}function b(){s||(s=!0,f())}function v(){s&&(s=!1,m())}const y={addNestedSub:a,notifyNestedSubs:i,handleChangeWrapper:c,isSubscribed:l,trySubscribe:b,tryUnsubscribe:v,getListeners:()=>r};return y}var M4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",P4=typeof navigator<"u"&&navigator.product==="ReactNative",j4=M4||P4?At.useLayoutEffect:At.useEffect;function B4({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:s="once"}){const a=At.useMemo(()=>{const l=R4(e);return{store:e,subscription:l,getServerState:r?()=>r:void 0,stabilityCheck:o,identityFunctionCheck:s}},[e,r,o,s]),i=At.useMemo(()=>e.getState(),[e]);j4(()=>{const{subscription:l}=a;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),i!==e.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[a,i]);const c=t||Dn;return At.createElement(c.Provider,{value:a},n)}var Ui=B4;function Jd(e=Dn){const t=e===Dn?Xd:Qi(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var V4=Jd();function G4(e=Dn){const t=e===Dn?V4:Jd(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var H4=G4();L4(S4.useSyncExternalStoreWithSelector);const zt=H4.withTypes(),Ce=k4.withTypes(),Me={GET:"GET",POST:"POST",DELETE:"DELETE",PATCH:"PATCH",PUT:"PUT"},K={IDLE:"idle",LOADING:"loading",FAILED:"failed"},W4="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8.7%209.71005L6.19497%207.20503C5.92161%206.93166%205.47839%206.93166%205.20503%207.20503C4.93166%207.47839%204.93166%207.92161%205.20503%208.19497L8.20503%2011.195C8.47839%2011.4683%208.92161%2011.4683%209.19497%2011.195L12.195%208.19497C12.4683%207.92161%2012.4683%207.47839%2012.195%207.20503C11.9216%206.93166%2011.4784%206.93166%2011.205%207.20503L8.7%209.71005Z'%20fill='%23196FE0'/%3e%3c/svg%3e",qd="Show more",Z4="Show less",X4="Show preview",z4="Hide preview",Y4="Select email";function nt(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 J4=typeof Symbol=="function"&&Symbol.observable||"@@observable",$d=J4,Ki=()=>Math.random().toString(36).substring(7).split("").join("."),q4={INIT:`@@redux/INIT${Ki()}`,REPLACE:`@@redux/REPLACE${Ki()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ki()}`},rr=q4;function Do(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function $4(e){if(e===void 0)return"undefined";if(e===null)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(K4(e))return"date";if(U4(e))return"error";const n=Q4(e);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}function Q4(e){return typeof e.constructor=="function"?e.constructor.name:null}function U4(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function K4(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Nn(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=$4(e)),t}function Qd(e,t,n){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?nt(2):`Expected the root reducer to be a function. Instead, received: '${Nn(e)}'`);if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?nt(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?nt(1):`Expected the enhancer to be a function. Instead, received: '${Nn(n)}'`);return n(Qd)(e,t)}let r=e,o=t,s=new Map,a=s,i=0,c=!1;function l(){a===s&&(a=new Map,s.forEach((h,g)=>{a.set(g,h)}))}function f(){if(c)throw new Error(process.env.NODE_ENV==="production"?nt(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function m(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?nt(4):`Expected the listener to be a function. Instead, received: '${Nn(h)}'`);if(c)throw new Error(process.env.NODE_ENV==="production"?nt(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let g=!0;l();const C=i++;return a.set(C,h),function(){if(g){if(c)throw new Error(process.env.NODE_ENV==="production"?nt(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");g=!1,l(),a.delete(C),s=null}}}function b(h){if(!Do(h))throw new Error(process.env.NODE_ENV==="production"?nt(7):`Actions must be plain objects. Instead, the actual type was: '${Nn(h)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(typeof h.type>"u")throw new Error(process.env.NODE_ENV==="production"?nt(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof h.type!="string")throw new Error(process.env.NODE_ENV==="production"?nt(17):`Action "type" property must be a string. Instead, the actual type was: '${Nn(h.type)}'. Value was: '${h.type}' (stringified)`);if(c)throw new Error(process.env.NODE_ENV==="production"?nt(9):"Reducers may not dispatch actions.");try{c=!0,o=r(o,h)}finally{c=!1}return(s=a).forEach(C=>{C()}),h}function v(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?nt(10):`Expected the nextReducer to be a function. Instead, received: '${Nn(h)}`);r=h,b({type:rr.REPLACE})}function y(){const h=m;return{subscribe(g){if(typeof g!="object"||g===null)throw new Error(process.env.NODE_ENV==="production"?nt(11):`Expected the observer to be an object. Instead, received: '${Nn(g)}'`);function C(){const I=g;I.next&&I.next(f())}return C(),{unsubscribe:h(C)}},[$d](){return this}}}return b({type:rr.INIT}),{dispatch:b,subscribe:m,getState:f,replaceReducer:v,[$d]:y}}function Ud(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function eb(e,t,n,r){const o=Object.keys(t),s=n&&n.type===rr.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(o.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!Do(e))return`The ${s} has unexpected type of "${Nn(e)}". Expected argument to be an object with the following keys: "${o.join('", "')}"`;const a=Object.keys(e).filter(i=>!t.hasOwnProperty(i)&&!r[i]);if(a.forEach(i=>{r[i]=!0}),!(n&&n.type===rr.REPLACE)&&a.length>0)return`Unexpected ${a.length>1?"keys":"key"} "${a.join('", "')}" found in ${s}. Expected to find one of the known reducer keys instead: "${o.join('", "')}". Unexpected keys will be ignored.`}function tb(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:rr.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?nt(12):`The slice reducer for key "${t}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof n(void 0,{type:rr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?nt(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${rr.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}function Kd(e){const t=Object.keys(e),n={};for(let a=0;a<t.length;a++){const i=t[a];process.env.NODE_ENV!=="production"&&typeof e[i]>"u"&&Ud(`No reducer provided for key "${i}"`),typeof e[i]=="function"&&(n[i]=e[i])}const r=Object.keys(n);let o;process.env.NODE_ENV!=="production"&&(o={});let s;try{tb(n)}catch(a){s=a}return function(i={},c){if(s)throw s;if(process.env.NODE_ENV!=="production"){const m=eb(i,n,c,o);m&&Ud(m)}let l=!1;const f={};for(let m=0;m<r.length;m++){const b=r[m],v=n[b],y=i[b],p=v(y,c);if(typeof p>"u"){const h=c&&c.type;throw new Error(process.env.NODE_ENV==="production"?nt(14):`When called with an action of type ${h?`"${String(h)}"`:"(unknown type)"}, the slice reducer for key "${b}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}f[b]=p,l=l||p!==y}return l=l||r.length!==Object.keys(i).length,l?f:i}}function Ps(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function nb(...e){return t=>(n,r)=>{const o=t(n,r);let s=()=>{throw new Error(process.env.NODE_ENV==="production"?nt(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const a={getState:o.getState,dispatch:(c,...l)=>s(c,...l)},i=e.map(c=>c(a));return s=Ps(...i)(o.dispatch),{...o,dispatch:s}}}function e0(e){return Do(e)&&"type"in e&&typeof e.type=="string"}var t0=Symbol.for("immer-nothing"),n0=Symbol.for("immer-draftable"),Tt=Symbol.for("immer-state"),rb=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function bt(e,...t){if(process.env.NODE_ENV!=="production"){const n=rb[e],r=typeof n=="function"?n.apply(null,t):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Vr=Object.getPrototypeOf;function or(e){return!!e&&!!e[Tt]}function Cn(e){var t;return e?r0(e)||Array.isArray(e)||!!e[n0]||!!((t=e.constructor)!=null&&t[n0])||Vs(e)||Gs(e):!1}var ob=Object.prototype.constructor.toString();function r0(e){if(!e||typeof e!="object")return!1;const t=Vr(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===ob}function js(e,t){Bs(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Bs(e){const t=e[Tt];return t?t.type_:Array.isArray(e)?1:Vs(e)?2:Gs(e)?3:0}function ec(e,t){return Bs(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function o0(e,t,n){const r=Bs(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function sb(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Vs(e){return e instanceof Map}function Gs(e){return e instanceof Set}function sr(e){return e.copy_||e.base_}function tc(e,t){if(Vs(e))return new Map(e);if(Gs(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=r0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Tt];let o=Reflect.ownKeys(r);for(let s=0;s<o.length;s++){const a=o[s],i=r[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(r[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[a]})}return Object.create(Vr(e),r)}else{const r=Vr(e);if(r!==null&&n)return{...e};const o=Object.create(r);return Object.assign(o,e)}}function nc(e,t=!1){return Hs(e)||or(e)||!Cn(e)||(Bs(e)>1&&(e.set=e.add=e.clear=e.delete=ab),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>nc(r,!0))),e}function ab(){bt(2)}function Hs(e){return Object.isFrozen(e)}var ib={};function ar(e){const t=ib[e];return t||bt(0,e),t}var No;function s0(){return No}function cb(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function a0(e,t){t&&(ar("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function rc(e){oc(e),e.drafts_.forEach(lb),e.drafts_=null}function oc(e){e===No&&(No=e.parent_)}function i0(e){return No=cb(No,e)}function lb(e){const t=e[Tt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function c0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Tt].modified_&&(rc(t),bt(4)),Cn(e)&&(e=Ws(t,e),t.parent_||Zs(t,e)),t.patches_&&ar("Patches").generateReplacementPatches_(n[Tt].base_,e,t.patches_,t.inversePatches_)):e=Ws(t,n,[]),rc(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==t0?e:void 0}function Ws(e,t,n){if(Hs(t))return t;const r=t[Tt];if(!r)return js(t,(o,s)=>l0(e,r,t,o,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Zs(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let s=o,a=!1;r.type_===3&&(s=new Set(o),o.clear(),a=!0),js(s,(i,c)=>l0(e,r,o,i,c,n,a)),Zs(e,o,!1),n&&e.patches_&&ar("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function l0(e,t,n,r,o,s,a){if(process.env.NODE_ENV!=="production"&&o===n&&bt(5),or(o)){const i=s&&t&&t.type_!==3&&!ec(t.assigned_,r)?s.concat(r):void 0,c=Ws(e,o,i);if(o0(n,r,c),or(c))e.canAutoFreeze_=!1;else return}else a&&n.add(o);if(Cn(o)&&!Hs(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Ws(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Zs(e,o)}}function Zs(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&nc(t,n)}function ub(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:s0(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,s=sc;n&&(o=[r],s=Ro);const{revoke:a,proxy:i}=Proxy.revocable(o,s);return r.draft_=i,r.revoke_=a,i}var sc={get(e,t){if(t===Tt)return e;const n=sr(e);if(!ec(n,t))return db(e,n,t);const r=n[t];return e.finalized_||!Cn(r)?r:r===ac(e.base_,t)?(cc(e),e.copy_[t]=lc(r,e)):r},has(e,t){return t in sr(e)},ownKeys(e){return Reflect.ownKeys(sr(e))},set(e,t,n){const r=u0(sr(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=ac(sr(e),t),s=o==null?void 0:o[Tt];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(sb(n,o)&&(n!==void 0||ec(e.base_,t)))return!0;cc(e),ic(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return ac(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,cc(e),ic(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=sr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){bt(11)},getPrototypeOf(e){return Vr(e.base_)},setPrototypeOf(){bt(12)}},Ro={};js(sc,(e,t)=>{Ro[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Ro.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&bt(13),Ro.set.call(this,e,t,void 0)},Ro.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&bt(14),sc.set.call(this,e[0],t,n,e[0])};function ac(e,t){const n=e[Tt];return(n?sr(n):e)[t]}function db(e,t,n){var o;const r=u0(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function u0(e,t){if(!(t in e))return;let n=Vr(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Vr(n)}}function ic(e){e.modified_||(e.modified_=!0,e.parent_&&ic(e.parent_))}function cc(e){e.copy_||(e.copy_=tc(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var fb=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const s=n;n=t;const a=this;return function(c=s,...l){return a.produce(c,f=>n.call(this,f,...l))}}typeof n!="function"&&bt(6),r!==void 0&&typeof r!="function"&&bt(7);let o;if(Cn(t)){const s=i0(this),a=lc(t,void 0);let i=!0;try{o=n(a),i=!1}finally{i?rc(s):oc(s)}return a0(s,r),c0(o,s)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===t0&&(o=void 0),this.autoFreeze_&&nc(o,!0),r){const s=[],a=[];ar("Patches").generateReplacementPatches_(t,o,s,a),r(s,a)}return o}else bt(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...i)=>this.produceWithPatches(a,c=>t(c,...i));let r,o;return[this.produce(t,n,(a,i)=>{r=a,o=i}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Cn(e)||bt(8),or(e)&&(e=pb(e));const t=i0(this),n=lc(e,void 0);return n[Tt].isManual_=!0,oc(t),n}finishDraft(e,t){const n=e&&e[Tt];(!n||!n.isManual_)&&bt(9);const{scope_:r}=n;return a0(r,t),c0(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=ar("Patches").applyPatches_;return or(e)?r(e,t):this.produce(e,o=>r(o,t))}};function lc(e,t){const n=Vs(e)?ar("MapSet").proxyMap_(e,t):Gs(e)?ar("MapSet").proxySet_(e,t):ub(e,t);return(t?t.scope_:s0()).drafts_.push(n),n}function pb(e){return or(e)||bt(10,e),d0(e)}function d0(e){if(!Cn(e)||Hs(e))return e;const t=e[Tt];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=tc(e,t.scope_.immer_.useStrictShallowCopy_)}else n=tc(e,!0);return js(n,(r,o)=>{o0(n,r,d0(o))}),t&&(t.finalized_=!1),n}var Lt=new fb,f0=Lt.produce;Lt.produceWithPatches.bind(Lt),Lt.setAutoFreeze.bind(Lt),Lt.setUseStrictShallowCopy.bind(Lt),Lt.applyPatches.bind(Lt),Lt.createDraft.bind(Lt),Lt.finishDraft.bind(Lt);var hb=(e,t,n)=>{if(t.length===1&&t[0]===n){let r=!1;try{const o={};e(o)===o&&(r=!0)}catch{}if(r){let o;try{throw new Error}catch(s){({stack:o}=s)}console.warn(`The result function returned its own inputs without modification. e.g
565
560
  \`createSelector([state => state.todos], todos => todos)\`
566
561
  This could lead to inefficient memoization and unnecessary re-renders.
567
562
  Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},gb=(e,t,n)=>{const{memoize:r,memoizeOptions:o}=t,{inputSelectorResults:s,inputSelectorResultsCopy:a}=e,i=r(()=>({}),...o);if(!(i.apply(null,s)===i.apply(null,a))){let l;try{throw new Error}catch(f){({stack:l}=f)}console.warn(`An input selector returned a different result when passed same arguments.
@@ -570,12 +565,12 @@ Avoid returning a new reference inside your input selector, e.g.
570
565
  \`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:s,secondInputs:a,stack:l})}},mb={inputStabilityCheck:"once",identityFunctionCheck:"once"};function bb(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function yb(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Cb(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var p0=e=>Array.isArray(e)?e:[e];function xb(e){const t=Array.isArray(e[0])?e[0]:e;return Cb(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function h0(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var vb=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...mb,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:hb},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:gb}}},Eb=class{constructor(e){this.value=e}deref(){return this.value}},Ib=typeof WeakRef<"u"?WeakRef:Eb,wb=0,g0=1;function Xs(){return{s:wb,v:void 0,o:null,p:null}}function m0(e,t={}){let n=Xs();const{resultEqualityCheck:r}=t;let o,s=0;function a(){var m;let i=n;const{length:c}=arguments;for(let b=0,v=c;b<v;b++){const y=arguments[b];if(typeof y=="function"||typeof y=="object"&&y!==null){let p=i.o;p===null&&(i.o=p=new WeakMap);const h=p.get(y);h===void 0?(i=Xs(),p.set(y,i)):i=h}else{let p=i.p;p===null&&(i.p=p=new Map);const h=p.get(y);h===void 0?(i=Xs(),p.set(y,i)):i=h}}const l=i;let f;if(i.s===g0)f=i.v;else if(f=e.apply(null,arguments),s++,r){const b=((m=o==null?void 0:o.deref)==null?void 0:m.call(o))??o;b!=null&&r(b,f)&&(f=b,s!==0&&s--),o=typeof f=="object"&&f!==null||typeof f=="function"?new Ib(f):f}return l.s=g0,l.v=f,f}return a.clearCache=()=>{n=Xs(),a.resetResultsCount()},a.resultsCount=()=>s,a.resetResultsCount=()=>{s=0},a}function _b(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let s=0,a=0,i,c={},l=o.pop();typeof l=="object"&&(c=l,l=o.pop()),bb(l,`createSelector expects an output function after the inputs, but received: [${typeof l}]`);const f={...n,...c},{memoize:m,memoizeOptions:b=[],argsMemoize:v=m0,argsMemoizeOptions:y=[],devModeChecks:p={}}=f,h=p0(b),g=p0(y),C=xb(o),x=m(function(){return s++,l.apply(null,arguments)},...h);let I=!0;const E=v(function(){a++;const A=h0(C,arguments);if(i=x.apply(null,A),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:S,inputStabilityCheck:L}=vb(I,p);if(S.shouldRun&&S.run(l,A,i),L.shouldRun){const k=h0(C,arguments);L.run({inputSelectorResults:A,inputSelectorResultsCopy:k},{memoize:m,memoizeOptions:h},arguments)}I&&(I=!1)}return i},...g);return Object.assign(E,{resultFunc:l,memoizedResultFunc:x,dependencies:C,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>i,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:m,argsMemoize:v})};return Object.assign(r,{withTypes:()=>r}),r}var Sb=_b(m0),Ab=Object.assign((e,t=Sb)=>{yb(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),r=n.map(s=>e[s]);return t(r,(...s)=>s.reduce((a,i,c)=>(a[n[c]]=i,a),{}))},{withTypes:()=>Ab});function b0(e){return({dispatch:n,getState:r})=>o=>s=>typeof s=="function"?s(n,r,e):o(s)}var Tb=b0(),Lb=b0,Ob=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ps:Ps.apply(null,arguments)},y0=e=>e&&typeof e.match=="function";function Mo(e,t){function n(...r){if(t){let o=t(...r);if(!o)throw new Error(process.env.NODE_ENV==="production"?Pe(0):"prepareAction did not return an object");return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>e0(r)&&r.type===e,n}function Fb(e){return typeof e=="function"&&"type"in e&&y0(e)}function kb(e){const t=e?`${e}`.split("/"):[],n=t[t.length-1]||"actionCreator";return`Detected an action creator with type "${e||"unknown"}" being dispatched.
571
566
  Make sure you're calling the action creator before dispatching, i.e. \`dispatch(${n}())\` instead of \`dispatch(${n})\`. This is necessary even if the action has no payload.`}function Db(e={}){if(process.env.NODE_ENV==="production")return()=>n=>r=>n(r);const{isActionCreator:t=Fb}=e;return()=>n=>r=>(t(r)&&console.warn(kb(r.type)),n(r))}function C0(e,t){let n=0;return{measureTime(r){const o=Date.now();try{return r()}finally{const s=Date.now();n+=s-o}},warnIfExceeded(){n>e&&console.warn(`${t} took ${n}ms, which is more than the warning threshold of ${e}ms.
572
567
  If your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.
573
- It is disabled in production builds, so you don't need to worry about that.`)}}}var x0=class ss extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ss.prototype)}static get[Symbol.species](){return ss}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ss(...t[0].concat(this)):new ss(...t.concat(this))}};function v0(e){return Cn(e)?f0(e,()=>{}):e}function E0(e,t,n){if(e.has(t)){let o=e.get(t);return n.update&&(o=n.update(o,t,e),e.set(t,o)),o}if(!n.insert)throw new Error(process.env.NODE_ENV==="production"?Pe(10):"No insert provided for key not already in map");const r=n.insert(t,e);return e.set(t,r),r}function Nb(e){return typeof e!="object"||e==null||Object.isFrozen(e)}function Rb(e,t,n){const r=I0(e,t,n);return{detectMutations(){return w0(e,t,r,n)}}}function I0(e,t=[],n,r="",o=new Set){const s={value:n};if(!e(n)&&!o.has(n)){o.add(n),s.children={};for(const a in n){const i=r?r+"."+a:a;t.length&&t.indexOf(i)!==-1||(s.children[a]=I0(e,t,n[a],i))}}return s}function w0(e,t=[],n,r,o=!1,s=""){const a=n?n.value:void 0,i=a===r;if(o&&!i&&!Number.isNaN(r))return{wasMutated:!0,path:s};if(e(a)||e(r))return{wasMutated:!1};const c={};for(let f in n.children)c[f]=!0;for(let f in r)c[f]=!0;const l=t.length>0;for(let f in c){const m=s?s+"."+f:f;if(l&&t.some(y=>y instanceof RegExp?y.test(m):m===y))continue;const b=w0(e,t,n.children[f],r[f],i,m);if(b.wasMutated)return b}return{wasMutated:!1}}function Mb(e={}){if(process.env.NODE_ENV==="production")return()=>t=>n=>t(n);{let t=function(i,c,l,f){return JSON.stringify(i,n(c,f),l)},n=function(i,c){let l=[],f=[];return c||(c=function(m,b){return l[0]===b?"[Circular ~]":"[Circular ~."+f.slice(0,l.indexOf(b)).join(".")+"]"}),function(m,b){if(l.length>0){var v=l.indexOf(this);~v?l.splice(v+1):l.push(this),~v?f.splice(v,1/0,m):f.push(m),~l.indexOf(b)&&(b=c.call(this,m,b))}else l.push(b);return i==null?b:i.call(this,m,b)}},{isImmutable:r=Nb,ignoredPaths:o,warnAfter:s=32}=e;const a=Rb.bind(null,r,o);return({getState:i})=>{let c=i(),l=a(c),f;return m=>b=>{const v=C0(s,"ImmutableStateInvariantMiddleware");v.measureTime(()=>{if(c=i(),f=l.detectMutations(),l=a(c),f.wasMutated)throw new Error(process.env.NODE_ENV==="production"?Pe(19):`A state mutation was detected between dispatches, in the path '${f.path||""}'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)});const y=m(b);return v.measureTime(()=>{if(c=i(),f=l.detectMutations(),l=a(c),f.wasMutated)throw new Error(process.env.NODE_ENV==="production"?Pe(20):`A state mutation was detected inside a dispatch, in the path: ${f.path||""}. Take a look at the reducer(s) handling the action ${t(b)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)}),v.warnIfExceeded(),y}}}}function _0(e){const t=typeof e;return e==null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||Do(e)}function lc(e,t="",n=_0,r,o=[],s){let a;if(!n(e))return{keyPath:t||"<root>",value:e};if(typeof e!="object"||e===null||s!=null&&s.has(e))return!1;const i=r!=null?r(e):Object.entries(e),c=o.length>0;for(const[l,f]of i){const m=t?t+"."+l:l;if(!(c&&o.some(v=>v instanceof RegExp?v.test(m):m===v))){if(!n(f))return{keyPath:m,value:f};if(typeof f=="object"&&(a=lc(f,m,n,r,o,s),a))return a}}return s&&S0(e)&&s.add(e),!1}function S0(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if(!(typeof t!="object"||t===null)&&!S0(t))return!1;return!0}function Pb(e={}){if(process.env.NODE_ENV==="production")return()=>t=>n=>t(n);{const{isSerializable:t=_0,getEntries:n,ignoredActions:r=[],ignoredActionPaths:o=["meta.arg","meta.baseQueryMeta"],ignoredPaths:s=[],warnAfter:a=32,ignoreState:i=!1,ignoreActions:c=!1,disableCache:l=!1}=e,f=!l&&WeakSet?new WeakSet:void 0;return m=>b=>v=>{if(!e0(v))return b(v);const y=b(v),p=C0(a,"SerializableStateInvariantMiddleware");return!c&&!(r.length&&r.indexOf(v.type)!==-1)&&p.measureTime(()=>{const h=lc(v,"",t,n,o,f);if(h){const{keyPath:g,value:C}=h;console.error(`A non-serializable value was detected in an action, in the path: \`${g}\`. Value:`,C,`
568
+ It is disabled in production builds, so you don't need to worry about that.`)}}}var x0=class ss extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ss.prototype)}static get[Symbol.species](){return ss}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ss(...t[0].concat(this)):new ss(...t.concat(this))}};function v0(e){return Cn(e)?f0(e,()=>{}):e}function E0(e,t,n){if(e.has(t)){let o=e.get(t);return n.update&&(o=n.update(o,t,e),e.set(t,o)),o}if(!n.insert)throw new Error(process.env.NODE_ENV==="production"?Pe(10):"No insert provided for key not already in map");const r=n.insert(t,e);return e.set(t,r),r}function Nb(e){return typeof e!="object"||e==null||Object.isFrozen(e)}function Rb(e,t,n){const r=I0(e,t,n);return{detectMutations(){return w0(e,t,r,n)}}}function I0(e,t=[],n,r="",o=new Set){const s={value:n};if(!e(n)&&!o.has(n)){o.add(n),s.children={};for(const a in n){const i=r?r+"."+a:a;t.length&&t.indexOf(i)!==-1||(s.children[a]=I0(e,t,n[a],i))}}return s}function w0(e,t=[],n,r,o=!1,s=""){const a=n?n.value:void 0,i=a===r;if(o&&!i&&!Number.isNaN(r))return{wasMutated:!0,path:s};if(e(a)||e(r))return{wasMutated:!1};const c={};for(let f in n.children)c[f]=!0;for(let f in r)c[f]=!0;const l=t.length>0;for(let f in c){const m=s?s+"."+f:f;if(l&&t.some(y=>y instanceof RegExp?y.test(m):m===y))continue;const b=w0(e,t,n.children[f],r[f],i,m);if(b.wasMutated)return b}return{wasMutated:!1}}function Mb(e={}){if(process.env.NODE_ENV==="production")return()=>t=>n=>t(n);{let t=function(i,c,l,f){return JSON.stringify(i,n(c,f),l)},n=function(i,c){let l=[],f=[];return c||(c=function(m,b){return l[0]===b?"[Circular ~]":"[Circular ~."+f.slice(0,l.indexOf(b)).join(".")+"]"}),function(m,b){if(l.length>0){var v=l.indexOf(this);~v?l.splice(v+1):l.push(this),~v?f.splice(v,1/0,m):f.push(m),~l.indexOf(b)&&(b=c.call(this,m,b))}else l.push(b);return i==null?b:i.call(this,m,b)}},{isImmutable:r=Nb,ignoredPaths:o,warnAfter:s=32}=e;const a=Rb.bind(null,r,o);return({getState:i})=>{let c=i(),l=a(c),f;return m=>b=>{const v=C0(s,"ImmutableStateInvariantMiddleware");v.measureTime(()=>{if(c=i(),f=l.detectMutations(),l=a(c),f.wasMutated)throw new Error(process.env.NODE_ENV==="production"?Pe(19):`A state mutation was detected between dispatches, in the path '${f.path||""}'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)});const y=m(b);return v.measureTime(()=>{if(c=i(),f=l.detectMutations(),l=a(c),f.wasMutated)throw new Error(process.env.NODE_ENV==="production"?Pe(20):`A state mutation was detected inside a dispatch, in the path: ${f.path||""}. Take a look at the reducer(s) handling the action ${t(b)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)}),v.warnIfExceeded(),y}}}}function _0(e){const t=typeof e;return e==null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||Do(e)}function uc(e,t="",n=_0,r,o=[],s){let a;if(!n(e))return{keyPath:t||"<root>",value:e};if(typeof e!="object"||e===null||s!=null&&s.has(e))return!1;const i=r!=null?r(e):Object.entries(e),c=o.length>0;for(const[l,f]of i){const m=t?t+"."+l:l;if(!(c&&o.some(v=>v instanceof RegExp?v.test(m):m===v))){if(!n(f))return{keyPath:m,value:f};if(typeof f=="object"&&(a=uc(f,m,n,r,o,s),a))return a}}return s&&S0(e)&&s.add(e),!1}function S0(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if(!(typeof t!="object"||t===null)&&!S0(t))return!1;return!0}function Pb(e={}){if(process.env.NODE_ENV==="production")return()=>t=>n=>t(n);{const{isSerializable:t=_0,getEntries:n,ignoredActions:r=[],ignoredActionPaths:o=["meta.arg","meta.baseQueryMeta"],ignoredPaths:s=[],warnAfter:a=32,ignoreState:i=!1,ignoreActions:c=!1,disableCache:l=!1}=e,f=!l&&WeakSet?new WeakSet:void 0;return m=>b=>v=>{if(!e0(v))return b(v);const y=b(v),p=C0(a,"SerializableStateInvariantMiddleware");return!c&&!(r.length&&r.indexOf(v.type)!==-1)&&p.measureTime(()=>{const h=uc(v,"",t,n,o,f);if(h){const{keyPath:g,value:C}=h;console.error(`A non-serializable value was detected in an action, in the path: \`${g}\`. Value:`,C,`
574
569
  Take a look at the logic that dispatched this action: `,v,`
575
570
  (See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)`,`
576
- (To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)`)}}),i||(p.measureTime(()=>{const h=m.getState(),g=lc(h,"",t,n,s,f);if(g){const{keyPath:C,value:x}=g;console.error(`A non-serializable value was detected in the state, in the path: \`${C}\`. Value:`,x,`
571
+ (To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)`)}}),i||(p.measureTime(()=>{const h=m.getState(),g=uc(h,"",t,n,s,f);if(g){const{keyPath:C,value:x}=g;console.error(`A non-serializable value was detected in the state, in the path: \`${C}\`. Value:`,x,`
577
572
  Take a look at the reducer(s) handling this action type: ${v.type}.
578
- (See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),p.warnIfExceeded()),y}}}function zs(e){return typeof e=="boolean"}var jb=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:s=!0}=t??{};let a=new x0;if(n&&(zs(n)?a.push(Tb):a.push(Lb(n.extraArgument))),process.env.NODE_ENV!=="production"){if(r){let i={};zs(r)||(i=r),a.unshift(Mb(i))}if(o){let i={};zs(o)||(i=o),a.push(Pb(i))}if(s){let i={};zs(s)||(i=s),a.unshift(Db(i))}}return a},Bb="RTK_autoBatch",A0=e=>t=>{setTimeout(t,e)},Vb=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:A0(10),Gb=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,s=!1,a=!1;const i=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?Vb:e.type==="callback"?e.queueNotification:A0(e.timeout),l=()=>{a=!1,s&&(s=!1,i.forEach(f=>f()))};return Object.assign({},r,{subscribe(f){const m=()=>o&&f(),b=r.subscribe(m);return i.add(f),()=>{b(),i.delete(f)}},dispatch(f){var m;try{return o=!((m=f==null?void 0:f.meta)!=null&&m[Bb]),s=!o,s&&(a||(a=!0,c(l))),r.dispatch(f)}finally{o=!0}}})},Hb=e=>function(n){const{autoBatch:r=!0}=n??{};let o=new x0(e);return r&&o.push(Gb(typeof r=="object"?r:void 0)),o};function Wb(e){const t=jb(),{reducer:n=void 0,middleware:r,devTools:o=!0,preloadedState:s=void 0,enhancers:a=void 0}=e||{};let i;if(typeof n=="function")i=n;else if(Do(n))i=Kd(n);else throw new Error(process.env.NODE_ENV==="production"?Pe(1):"`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");if(process.env.NODE_ENV!=="production"&&r&&typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?Pe(2):"`middleware` field must be a callback");let c;if(typeof r=="function"){if(c=r(t),process.env.NODE_ENV!=="production"&&!Array.isArray(c))throw new Error(process.env.NODE_ENV==="production"?Pe(3):"when using a middleware builder function, an array of middleware must be returned")}else c=t();if(process.env.NODE_ENV!=="production"&&c.some(y=>typeof y!="function"))throw new Error(process.env.NODE_ENV==="production"?Pe(4):"each middleware provided to configureStore must be a function");let l=Ps;o&&(l=Ob({trace:process.env.NODE_ENV!=="production",...typeof o=="object"&&o}));const f=nb(...c),m=Hb(f);if(process.env.NODE_ENV!=="production"&&a&&typeof a!="function")throw new Error(process.env.NODE_ENV==="production"?Pe(5):"`enhancers` field must be a callback");let b=typeof a=="function"?a(m):m();if(process.env.NODE_ENV!=="production"&&!Array.isArray(b))throw new Error(process.env.NODE_ENV==="production"?Pe(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&b.some(y=>typeof y!="function"))throw new Error(process.env.NODE_ENV==="production"?Pe(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&c.length&&!b.includes(f)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const v=l(...b);return Qd(i,s,v)}function T0(e){const t={},n=[];let r;const o={addCase(s,a){if(process.env.NODE_ENV!=="production"){if(n.length>0)throw new Error(process.env.NODE_ENV==="production"?Pe(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw new Error(process.env.NODE_ENV==="production"?Pe(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const i=typeof s=="string"?s:s.type;if(!i)throw new Error(process.env.NODE_ENV==="production"?Pe(28):"`builder.addCase` cannot be called with an empty action type");if(i in t)throw new Error(process.env.NODE_ENV==="production"?Pe(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${i}'`);return t[i]=a,o},addMatcher(s,a){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?Pe(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return n.push({matcher:s,reducer:a}),o},addDefaultCase(s){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?Pe(31):"`builder.addDefaultCase` can only be called once");return r=s,o}};return e(o),[t,n,r]}function Zb(e){return typeof e=="function"}function Xb(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?Pe(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let[n,r,o]=T0(t),s;if(Zb(e))s=()=>v0(e());else{const i=v0(e);s=()=>i}function a(i=s(),c){let l=[n[c.type],...r.filter(({matcher:f})=>f(c)).map(({reducer:f})=>f)];return l.filter(f=>!!f).length===0&&(l=[o]),l.reduce((f,m)=>{if(m)if(or(f)){const v=m(f,c);return v===void 0?f:v}else{if(Cn(f))return f0(f,b=>m(b,c));{const b=m(f,c);if(b===void 0){if(f===null)return f;throw new Error(process.env.NODE_ENV==="production"?Pe(9):"A case reducer on a non-draftable value must not return undefined")}return b}}return f},i)}return a.getInitialState=s,a}var zb=(e,t)=>y0(e)?e.match(t):e(t);function Yb(...e){return t=>e.some(n=>zb(n,t))}var Jb="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",qb=(e=21)=>{let t="",n=e;for(;n--;)t+=Jb[Math.random()*64|0];return t},$b=["name","message","stack","code"],uc=class{constructor(e,t){De(this,"_type");this.payload=e,this.meta=t}},L0=class{constructor(e,t){De(this,"_type");this.payload=e,this.meta=t}},Qb=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of $b)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},Yt=(()=>{function e(t,n,r){const o=Mo(t+"/fulfilled",(c,l,f,m)=>({payload:c,meta:{...m||{},arg:f,requestId:l,requestStatus:"fulfilled"}})),s=Mo(t+"/pending",(c,l,f)=>({payload:void 0,meta:{...f||{},arg:l,requestId:c,requestStatus:"pending"}})),a=Mo(t+"/rejected",(c,l,f,m,b)=>({payload:m,error:(r&&r.serializeError||Qb)(c||"Rejected"),meta:{...b||{},arg:f,requestId:l,rejectedWithValue:!!m,requestStatus:"rejected",aborted:(c==null?void 0:c.name)==="AbortError",condition:(c==null?void 0:c.name)==="ConditionError"}}));function i(c){return(l,f,m)=>{const b=r!=null&&r.idGenerator?r.idGenerator(c):qb(),v=new AbortController;let y,p;function h(C){p=C,v.abort()}const g=async function(){var I,E;let C;try{let _=(I=r==null?void 0:r.condition)==null?void 0:I.call(r,c,{getState:f,extra:m});if(Kb(_)&&(_=await _),_===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const A=new Promise((S,L)=>{y=()=>{L({name:"AbortError",message:p||"Aborted"})},v.signal.addEventListener("abort",y)});l(s(b,c,(E=r==null?void 0:r.getPendingMeta)==null?void 0:E.call(r,{requestId:b,arg:c},{getState:f,extra:m}))),C=await Promise.race([A,Promise.resolve(n(c,{dispatch:l,getState:f,extra:m,requestId:b,signal:v.signal,abort:h,rejectWithValue:(S,L)=>new uc(S,L),fulfillWithValue:(S,L)=>new L0(S,L)})).then(S=>{if(S instanceof uc)throw S;return S instanceof L0?o(S.payload,b,c,S.meta):o(S,b,c)})])}catch(_){C=_ instanceof uc?a(null,b,c,_.payload,_.meta):a(_,b,c)}finally{y&&v.signal.removeEventListener("abort",y)}return r&&!r.dispatchConditionRejection&&a.match(C)&&C.meta.condition||l(C),C}();return Object.assign(g,{abort:h,requestId:b,arg:c,unwrap(){return g.then(Ub)}})}}return Object.assign(i,{pending:s,rejected:a,fulfilled:o,settled:Yb(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function Ub(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Kb(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var ey=Symbol.for("rtk-slice-createasyncthunk");function ty(e,t){return`${e}/${t}`}function ny({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[ey];return function(o){const{name:s,reducerPath:a=s}=o;if(!s)throw new Error(process.env.NODE_ENV==="production"?Pe(11):"`name` is a required option for createSlice");typeof process<"u"&&process.env.NODE_ENV==="development"&&o.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const i=(typeof o.reducers=="function"?o.reducers(oy()):o.reducers)||{},c=Object.keys(i),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},f={addCase(x,I){const E=typeof x=="string"?x:x.type;if(!E)throw new Error(process.env.NODE_ENV==="production"?Pe(12):"`context.addCase` cannot be called with an empty action type");if(E in l.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?Pe(13):"`context.addCase` cannot be called with two reducers for the same action type: "+E);return l.sliceCaseReducersByType[E]=I,f},addMatcher(x,I){return l.sliceMatchers.push({matcher:x,reducer:I}),f},exposeAction(x,I){return l.actionCreators[x]=I,f},exposeCaseReducer(x,I){return l.sliceCaseReducersByName[x]=I,f}};c.forEach(x=>{const I=i[x],E={reducerName:x,type:ty(s,x),createNotation:typeof o.reducers=="function"};ay(I)?cy(E,I,f,t):sy(E,I,f)});function m(){if(process.env.NODE_ENV!=="production"&&typeof o.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?Pe(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[x={},I=[],E=void 0]=typeof o.extraReducers=="function"?T0(o.extraReducers):[o.extraReducers],_={...x,...l.sliceCaseReducersByType};return Xb(o.initialState,A=>{for(let S in _)A.addCase(S,_[S]);for(let S of l.sliceMatchers)A.addMatcher(S.matcher,S.reducer);for(let S of I)A.addMatcher(S.matcher,S.reducer);E&&A.addDefaultCase(E)})}const b=x=>x,v=new Map;let y;function p(x,I){return y||(y=m()),y(x,I)}function h(){return y||(y=m()),y.getInitialState()}function g(x,I=!1){function E(A){let S=A[x];if(typeof S>"u"){if(I)S=h();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Pe(15):"selectSlice returned undefined for an uninjected slice reducer")}return S}function _(A=b){const S=E0(v,I,{insert:()=>new WeakMap});return E0(S,A,{insert:()=>{const L={};for(const[k,D]of Object.entries(o.selectors??{}))L[k]=ry(D,A,h,I);return L}})}return{reducerPath:x,getSelectors:_,get selectors(){return _(E)},selectSlice:E}}const C={name:s,reducer:p,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:h,...g(a),injectInto(x,{reducerPath:I,...E}={}){const _=I??a;return x.inject({reducerPath:_,reducer:p},E),{...C,...g(_,!0)}}};return C}}function ry(e,t,n,r){function o(s,...a){let i=t(s);if(typeof i>"u"){if(r)i=n();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Pe(16):"selectState returned undefined for an uninjected slice reducer")}return e(i,...a)}return o.unwrapped=e,o}var dc=ny();function oy(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function sy({type:e,reducerName:t,createNotation:n},r,o){let s,a;if("reducer"in r){if(n&&!iy(r))throw new Error(process.env.NODE_ENV==="production"?Pe(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");s=r.reducer,a=r.prepare}else s=r;o.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,a?Mo(e,a):Mo(e))}function ay(e){return e._reducerDefinitionType==="asyncThunk"}function iy(e){return e._reducerDefinitionType==="reducerWithPrepare"}function cy({type:e,reducerName:t},n,r,o){if(!o)throw new Error(process.env.NODE_ENV==="production"?Pe(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:s,fulfilled:a,pending:i,rejected:c,settled:l,options:f}=n,m=o(e,s,f);r.exposeAction(t,m),a&&r.addCase(m.fulfilled,a),i&&r.addCase(m.pending,i),c&&r.addCase(m.rejected,c),l&&r.addMatcher(m.settled,l),r.exposeCaseReducer(t,{fulfilled:a||Ys,pending:i||Ys,rejected:c||Ys,settled:l||Ys})}function Ys(){}function Pe(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. `}const on="success",Je="error",O0="Some error occured. Please contact support@hiverhq.com",F0="Card refreshed successfully",ly="Card linked successfully",uy="Error in linking the card",dy="Card unlinked successfully",fy="Failed to unlink the card",xn="Something went wrong",py="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='15'%20height='15'%20viewBox='0%200%2015%2015'%3e%3cpath%20fill='%23ffffff'%20fill-rule='nonzero'%20d='M8.821%207.496L14.716%201.6A.937.937%200%201%200%2013.391.275L7.496%206.17%201.6.275A.937.937%200%201%200%20.275%201.601L6.17%207.496.275%2013.39A.937.937%200%201%200%201.6%2014.716L7.496%208.82l5.895%205.895a.935.935%200%200%200%201.325%200%20.937.937%200%200%200%200-1.326L8.821%207.496z'%20opacity='.8'/%3e%3c/svg%3e",hy=d.styled(d.Box)`
573
+ (See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),p.warnIfExceeded()),y}}}function zs(e){return typeof e=="boolean"}var jb=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:s=!0}=t??{};let a=new x0;if(n&&(zs(n)?a.push(Tb):a.push(Lb(n.extraArgument))),process.env.NODE_ENV!=="production"){if(r){let i={};zs(r)||(i=r),a.unshift(Mb(i))}if(o){let i={};zs(o)||(i=o),a.push(Pb(i))}if(s){let i={};zs(s)||(i=s),a.unshift(Db(i))}}return a},Bb="RTK_autoBatch",A0=e=>t=>{setTimeout(t,e)},Vb=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:A0(10),Gb=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,s=!1,a=!1;const i=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?Vb:e.type==="callback"?e.queueNotification:A0(e.timeout),l=()=>{a=!1,s&&(s=!1,i.forEach(f=>f()))};return Object.assign({},r,{subscribe(f){const m=()=>o&&f(),b=r.subscribe(m);return i.add(f),()=>{b(),i.delete(f)}},dispatch(f){var m;try{return o=!((m=f==null?void 0:f.meta)!=null&&m[Bb]),s=!o,s&&(a||(a=!0,c(l))),r.dispatch(f)}finally{o=!0}}})},Hb=e=>function(n){const{autoBatch:r=!0}=n??{};let o=new x0(e);return r&&o.push(Gb(typeof r=="object"?r:void 0)),o};function Wb(e){const t=jb(),{reducer:n=void 0,middleware:r,devTools:o=!0,preloadedState:s=void 0,enhancers:a=void 0}=e||{};let i;if(typeof n=="function")i=n;else if(Do(n))i=Kd(n);else throw new Error(process.env.NODE_ENV==="production"?Pe(1):"`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");if(process.env.NODE_ENV!=="production"&&r&&typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?Pe(2):"`middleware` field must be a callback");let c;if(typeof r=="function"){if(c=r(t),process.env.NODE_ENV!=="production"&&!Array.isArray(c))throw new Error(process.env.NODE_ENV==="production"?Pe(3):"when using a middleware builder function, an array of middleware must be returned")}else c=t();if(process.env.NODE_ENV!=="production"&&c.some(y=>typeof y!="function"))throw new Error(process.env.NODE_ENV==="production"?Pe(4):"each middleware provided to configureStore must be a function");let l=Ps;o&&(l=Ob({trace:process.env.NODE_ENV!=="production",...typeof o=="object"&&o}));const f=nb(...c),m=Hb(f);if(process.env.NODE_ENV!=="production"&&a&&typeof a!="function")throw new Error(process.env.NODE_ENV==="production"?Pe(5):"`enhancers` field must be a callback");let b=typeof a=="function"?a(m):m();if(process.env.NODE_ENV!=="production"&&!Array.isArray(b))throw new Error(process.env.NODE_ENV==="production"?Pe(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&b.some(y=>typeof y!="function"))throw new Error(process.env.NODE_ENV==="production"?Pe(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&c.length&&!b.includes(f)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const v=l(...b);return Qd(i,s,v)}function T0(e){const t={},n=[];let r;const o={addCase(s,a){if(process.env.NODE_ENV!=="production"){if(n.length>0)throw new Error(process.env.NODE_ENV==="production"?Pe(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw new Error(process.env.NODE_ENV==="production"?Pe(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const i=typeof s=="string"?s:s.type;if(!i)throw new Error(process.env.NODE_ENV==="production"?Pe(28):"`builder.addCase` cannot be called with an empty action type");if(i in t)throw new Error(process.env.NODE_ENV==="production"?Pe(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${i}'`);return t[i]=a,o},addMatcher(s,a){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?Pe(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return n.push({matcher:s,reducer:a}),o},addDefaultCase(s){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?Pe(31):"`builder.addDefaultCase` can only be called once");return r=s,o}};return e(o),[t,n,r]}function Zb(e){return typeof e=="function"}function Xb(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?Pe(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let[n,r,o]=T0(t),s;if(Zb(e))s=()=>v0(e());else{const i=v0(e);s=()=>i}function a(i=s(),c){let l=[n[c.type],...r.filter(({matcher:f})=>f(c)).map(({reducer:f})=>f)];return l.filter(f=>!!f).length===0&&(l=[o]),l.reduce((f,m)=>{if(m)if(or(f)){const v=m(f,c);return v===void 0?f:v}else{if(Cn(f))return f0(f,b=>m(b,c));{const b=m(f,c);if(b===void 0){if(f===null)return f;throw new Error(process.env.NODE_ENV==="production"?Pe(9):"A case reducer on a non-draftable value must not return undefined")}return b}}return f},i)}return a.getInitialState=s,a}var zb=(e,t)=>y0(e)?e.match(t):e(t);function Yb(...e){return t=>e.some(n=>zb(n,t))}var Jb="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",qb=(e=21)=>{let t="",n=e;for(;n--;)t+=Jb[Math.random()*64|0];return t},$b=["name","message","stack","code"],dc=class{constructor(e,t){De(this,"_type");this.payload=e,this.meta=t}},L0=class{constructor(e,t){De(this,"_type");this.payload=e,this.meta=t}},Qb=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of $b)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},Yt=(()=>{function e(t,n,r){const o=Mo(t+"/fulfilled",(c,l,f,m)=>({payload:c,meta:{...m||{},arg:f,requestId:l,requestStatus:"fulfilled"}})),s=Mo(t+"/pending",(c,l,f)=>({payload:void 0,meta:{...f||{},arg:l,requestId:c,requestStatus:"pending"}})),a=Mo(t+"/rejected",(c,l,f,m,b)=>({payload:m,error:(r&&r.serializeError||Qb)(c||"Rejected"),meta:{...b||{},arg:f,requestId:l,rejectedWithValue:!!m,requestStatus:"rejected",aborted:(c==null?void 0:c.name)==="AbortError",condition:(c==null?void 0:c.name)==="ConditionError"}}));function i(c){return(l,f,m)=>{const b=r!=null&&r.idGenerator?r.idGenerator(c):qb(),v=new AbortController;let y,p;function h(C){p=C,v.abort()}const g=async function(){var I,E;let C;try{let _=(I=r==null?void 0:r.condition)==null?void 0:I.call(r,c,{getState:f,extra:m});if(Kb(_)&&(_=await _),_===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const A=new Promise((S,L)=>{y=()=>{L({name:"AbortError",message:p||"Aborted"})},v.signal.addEventListener("abort",y)});l(s(b,c,(E=r==null?void 0:r.getPendingMeta)==null?void 0:E.call(r,{requestId:b,arg:c},{getState:f,extra:m}))),C=await Promise.race([A,Promise.resolve(n(c,{dispatch:l,getState:f,extra:m,requestId:b,signal:v.signal,abort:h,rejectWithValue:(S,L)=>new dc(S,L),fulfillWithValue:(S,L)=>new L0(S,L)})).then(S=>{if(S instanceof dc)throw S;return S instanceof L0?o(S.payload,b,c,S.meta):o(S,b,c)})])}catch(_){C=_ instanceof dc?a(null,b,c,_.payload,_.meta):a(_,b,c)}finally{y&&v.signal.removeEventListener("abort",y)}return r&&!r.dispatchConditionRejection&&a.match(C)&&C.meta.condition||l(C),C}();return Object.assign(g,{abort:h,requestId:b,arg:c,unwrap(){return g.then(Ub)}})}}return Object.assign(i,{pending:s,rejected:a,fulfilled:o,settled:Yb(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function Ub(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Kb(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var ey=Symbol.for("rtk-slice-createasyncthunk");function ty(e,t){return`${e}/${t}`}function ny({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[ey];return function(o){const{name:s,reducerPath:a=s}=o;if(!s)throw new Error(process.env.NODE_ENV==="production"?Pe(11):"`name` is a required option for createSlice");typeof process<"u"&&process.env.NODE_ENV==="development"&&o.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const i=(typeof o.reducers=="function"?o.reducers(oy()):o.reducers)||{},c=Object.keys(i),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},f={addCase(x,I){const E=typeof x=="string"?x:x.type;if(!E)throw new Error(process.env.NODE_ENV==="production"?Pe(12):"`context.addCase` cannot be called with an empty action type");if(E in l.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?Pe(13):"`context.addCase` cannot be called with two reducers for the same action type: "+E);return l.sliceCaseReducersByType[E]=I,f},addMatcher(x,I){return l.sliceMatchers.push({matcher:x,reducer:I}),f},exposeAction(x,I){return l.actionCreators[x]=I,f},exposeCaseReducer(x,I){return l.sliceCaseReducersByName[x]=I,f}};c.forEach(x=>{const I=i[x],E={reducerName:x,type:ty(s,x),createNotation:typeof o.reducers=="function"};ay(I)?cy(E,I,f,t):sy(E,I,f)});function m(){if(process.env.NODE_ENV!=="production"&&typeof o.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?Pe(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[x={},I=[],E=void 0]=typeof o.extraReducers=="function"?T0(o.extraReducers):[o.extraReducers],_={...x,...l.sliceCaseReducersByType};return Xb(o.initialState,A=>{for(let S in _)A.addCase(S,_[S]);for(let S of l.sliceMatchers)A.addMatcher(S.matcher,S.reducer);for(let S of I)A.addMatcher(S.matcher,S.reducer);E&&A.addDefaultCase(E)})}const b=x=>x,v=new Map;let y;function p(x,I){return y||(y=m()),y(x,I)}function h(){return y||(y=m()),y.getInitialState()}function g(x,I=!1){function E(A){let S=A[x];if(typeof S>"u"){if(I)S=h();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Pe(15):"selectSlice returned undefined for an uninjected slice reducer")}return S}function _(A=b){const S=E0(v,I,{insert:()=>new WeakMap});return E0(S,A,{insert:()=>{const L={};for(const[k,D]of Object.entries(o.selectors??{}))L[k]=ry(D,A,h,I);return L}})}return{reducerPath:x,getSelectors:_,get selectors(){return _(E)},selectSlice:E}}const C={name:s,reducer:p,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:h,...g(a),injectInto(x,{reducerPath:I,...E}={}){const _=I??a;return x.inject({reducerPath:_,reducer:p},E),{...C,...g(_,!0)}}};return C}}function ry(e,t,n,r){function o(s,...a){let i=t(s);if(typeof i>"u"){if(r)i=n();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Pe(16):"selectState returned undefined for an uninjected slice reducer")}return e(i,...a)}return o.unwrapped=e,o}var fc=ny();function oy(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function sy({type:e,reducerName:t,createNotation:n},r,o){let s,a;if("reducer"in r){if(n&&!iy(r))throw new Error(process.env.NODE_ENV==="production"?Pe(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");s=r.reducer,a=r.prepare}else s=r;o.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,a?Mo(e,a):Mo(e))}function ay(e){return e._reducerDefinitionType==="asyncThunk"}function iy(e){return e._reducerDefinitionType==="reducerWithPrepare"}function cy({type:e,reducerName:t},n,r,o){if(!o)throw new Error(process.env.NODE_ENV==="production"?Pe(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:s,fulfilled:a,pending:i,rejected:c,settled:l,options:f}=n,m=o(e,s,f);r.exposeAction(t,m),a&&r.addCase(m.fulfilled,a),i&&r.addCase(m.pending,i),c&&r.addCase(m.rejected,c),l&&r.addMatcher(m.settled,l),r.exposeCaseReducer(t,{fulfilled:a||Ys,pending:i||Ys,rejected:c||Ys,settled:l||Ys})}function Ys(){}function Pe(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. `}const on="success",Je="error",O0="Some error occured. Please contact support@hiverhq.com",F0="Card refreshed successfully",ly="Card linked successfully",uy="Error in linking the card",dy="Card unlinked successfully",fy="Failed to unlink the card",xn="Something went wrong",py="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='15'%20height='15'%20viewBox='0%200%2015%2015'%3e%3cpath%20fill='%23ffffff'%20fill-rule='nonzero'%20d='M8.821%207.496L14.716%201.6A.937.937%200%201%200%2013.391.275L7.496%206.17%201.6.275A.937.937%200%201%200%20.275%201.601L6.17%207.496.275%2013.39A.937.937%200%201%200%201.6%2014.716L7.496%208.82l5.895%205.895a.935.935%200%200%200%201.325%200%20.937.937%200%200%200%200-1.326L8.821%207.496z'%20opacity='.8'/%3e%3c/svg%3e",hy=d.styled(d.Box)`
579
574
  display: flex;
580
575
  flex-direction: row;
581
576
  align-items: center;
@@ -592,9 +587,9 @@ Take a look at the reducer(s) handling this action type: ${v.type}.
592
587
  fill: #ffffff;
593
588
  width: 10px;
594
589
  }
595
- `,yy=(e,{closeToast:t})=>u.jsx(by,{children:u.jsx("img",{src:py,onClick:t})}),Js=({message:e})=>u.jsxs(hy,{children:[u.jsx(my,{}),u.jsx(gy,{children:e})]});function _e(e){const{message:t,type:n,autoClose:r}=e,o={closeButton:u.jsx(yy,{}),autoClose:r??5e3,pauseOnHover:!0,position:"bottom-left",rtl:!1,draggable:!0,closeOnClick:!0,hideProgressBar:!0};let s;switch(n){case"success":{s=Le.success(u.jsx(Js,{message:t}),{...o,icon:!1});break}case"error":{s=Le.error(u.jsx(Js,{message:t}),{...o,icon:!1});break}case"info-dark":{s=Le.info(u.jsx(Js,{message:t}),{...o,icon:!1,className:"toast_dark"});break}default:{s=Le.info(u.jsx(Js,{message:t}),{...o,icon:!1});break}}return setTimeout(()=>{Cy(s)},r&&!isNaN(r)?Number(r):5e3),s}function Cy(e){Le.dismiss(e)}const k0={updateFormApiStatus:K.IDLE,createObjectList:[],createObjectConnectorNamesList:[],linkObjectList:[],editObjectList:[],searchObjectList:[],objectDict:null,formFields:null,objectListApiStatus:K.IDLE,unlinkCardApiStatus:K.IDLE,linkCardApiStatus:K.IDLE,optionsMap:null,dropdownOptionsApis:K.IDLE,dependentFieldsMap:{},createFormApiStatus:K.IDLE,currentResourceDetailsApiStatus:K.IDLE,currentResourceDetails:null,currentCardInEdit:null,hasUnsavedChanges:!1},xy="/v1/api"+"/templates/metadata",D0={GET:"GET",POST:"POST",DELETE:"DELETE",PATCH:"PATCH",PUT:"PUT"},vy="Required Field",Ey="Invalid date",N0=/^https:\/\/([a-z0-9-]+(\.[a-z0-9-]+)+)(:[0-9]{1,5})?(\/[^\s/]*)*$/i,Iy=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,R0="Please enter a valid URL",wy="Please enter valid ID",_y="Please enter valid input",Sy="URL must start with https://",Ay="URL should not end with a slash",Ty="Invalid email address",Ly="Email must be a string",M0="Invalid date",Oy="Date cannot be in the past",Fy="Date cannot be in the future",ky="Invalid number",Dy="Invalid text",Ny=async e=>{const t=new URLSearchParams,{inboxIds:n,channelType:r,conversationId:o,fetchAuthenticatedConnectors:s}=e||{};return n==null||n.forEach(i=>{t.append("inbox_ids",i)}),[["channel_type",r],["conversation_id",o],["fetch_authenticated_connectors",s==null?void 0:s.toString()]].forEach(([i,c])=>{c!==void 0&&t.append(i,c)}),we({url:`${xy}?${t.toString()}`,method:D0.GET})},Ry="/v1/api/connectors/ug?onlyEnabledAuthenticated=true&minimal=true",My=async()=>{const e=await we({url:Ry,method:D0.GET}),t=e==null?void 0:e.data;return Array.isArray(t)?t.map(({id:n,name:r,logo:o,connectorType:s})=>({id:n,name:r,logo:o,connectorType:s})).filter(({logo:n})=>!!n):[]};let Gr={};const Py={get length(){return Object.keys(Gr).length},getItem(e){return Gr[e]??null},setItem(e,t){Gr[e]=t},removeItem(e){delete Gr[e]},clear(){Gr={}},key(e){return Object.keys(Gr)[e]}},jy={LOCAL:window==null?void 0:window.localStorage,SESSION:window==null?void 0:window.sessionStorage},P0=(e="LOCAL")=>jy[e]??Py,By=(e="LOCAL")=>{const t=P0(e);return{...t,getItem(n){const r=t.getItem(n);if(!r)return r;try{return JSON.parse(r)}catch(o){return console.warn(o),r}},setItem(n,r){try{const o=JSON.stringify(r);t.setItem(n,o)}catch(o){console.warn(o)}}}};var fc=(e=>(e.ADD="ADD",e.MULTIPLY="MULTIPLY",e))(fc||{});const Vy={[fc.ADD]:(e,t)=>e+t,[fc.MULTIPLY]:(e,t)=>e*t},Gy=e=>e,j0=()=>{if("crypto"in window&&"randomUUID"in window.crypto)return window.crypto.randomUUID();const e=Date.now().toString(16),t=Math.random().toString(16).substring(2,8);return`${e}-${t}`},B0=(e,t)=>{let n;const r=Vy[t]??Gy;for(const o of e){const s=Number(o);isNaN(s)||(n=n===void 0?s:r(n,s))}return(n??0).toFixed(2)},V0=(e,t=n=>n)=>{const n=new Set,r=[];for(const o of e){const s=t(o);n.has(s)||(n.add(s),r.push(o))}return r},Hy=e=>t=>{if(t&&typeof t=="string"){const n=t.replace(/\/$/,"");return n.startsWith("https://")?t.endsWith("/")?Ay:N0.test(n)?!0:e||R0:Sy}return!1},Wy=e=>t=>t&&typeof t=="string"?Iy.test(t)?!0:e||Ty:Ly,Zy=e=>t=>t==null||t===""?e||vy:!0,Xy=e=>(t,n)=>{var r;if(!t||(t==null?void 0:t.toString())===Ey)return M0;if(typeof t=="object"){const o=t,s=new Date;s.setHours(0,0,0,0);const a=n.disablePast,i=n.disableFuture;return a&&o<s?e||Oy:i&&o>s?e||Fy:!0}return typeof t=="string"&&((r=new Date(t))==null?void 0:r.toString())!=="Invalid Date"?!0:M0},zy=e=>(t,n)=>{if(t=Number(t),typeof t=="number"&&!isNaN(t)){const r=n.min,o=n.max;return r!==void 0&&t<r?e||`Value should not be less than ${r}`:o!==void 0&&t>o?e||`Value should not be greater than ${o}`:!0}return e||ky},pc=e=>(t,n)=>{if(typeof t=="string"){const r=n.limit;return r!==void 0&&t.length>r?e||`Maximum characters allowed are ${r}`:!0}return e||Dy},Yy=e=>t=>typeof t=="string"?t.startsWith("https:")?N0.test(t)?!0:e||R0:t.trim().length>0?!0:e||wy:e||_y;function ir(e){"@babel/helpers - typeof";return ir=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ir(e)}function Jy(e,t){if(ir(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ir(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function G0(e){var t=Jy(e,"string");return ir(t)=="symbol"?t:t+""}function Hr(e,t,n){return(t=G0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?H0(Object(n),!0).forEach(function(r){Hr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qy(e){if(Array.isArray(e))return e}function $y(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,s,a,i=[],c=!0,l=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=s.call(n)).done)&&(i.push(r.value),i.length!==t);c=!0);}catch(f){l=!0,o=f}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return i}}function hc(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function W0(e,t){if(e){if(typeof e=="string")return hc(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hc(e,t):void 0}}function Qy(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
596
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tt(e,t){return qy(e)||$y(e,t)||W0(e,t)||Qy()}function Uy(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function Jt(e,t){if(e==null)return{};var n,r,o=Uy(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ky=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function gc(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,o=r===void 0?!1:r,s=e.defaultValue,a=s===void 0?null:s,i=e.inputValue,c=e.menuIsOpen,l=e.onChange,f=e.onInputChange,m=e.onMenuClose,b=e.onMenuOpen,v=e.value,y=Jt(e,Ky),p=w.useState(i!==void 0?i:n),h=tt(p,2),g=h[0],C=h[1],x=w.useState(c!==void 0?c:o),I=tt(x,2),E=I[0],_=I[1],A=w.useState(v!==void 0?v:a),S=tt(A,2),L=S[0],k=S[1],D=w.useCallback(function(X,q){typeof l=="function"&&l(X,q),k(X)},[l]),N=w.useCallback(function(X,q){var se;typeof f=="function"&&(se=f(X,q)),C(se!==void 0?se:X)},[f]),M=w.useCallback(function(){typeof b=="function"&&b(),_(!0)},[b]),V=w.useCallback(function(){typeof m=="function"&&m(),_(!1)},[m]),J=i!==void 0?i:g,$=c!==void 0?c:E,H=v!==void 0?v:L;return ne(ne({},y),{},{inputValue:J,menuIsOpen:$,onChange:D,onInputChange:N,onMenuClose:V,onMenuOpen:M,value:H})}function ue(){return ue=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},ue.apply(null,arguments)}function e9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Z0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,G0(r.key),r)}}function t9(e,t,n){return t&&Z0(e.prototype,t),n&&Z0(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function mc(e,t){return mc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},mc(e,t)}function n9(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mc(e,t)}function qs(e){return qs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},qs(e)}function X0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(X0=function(){return!!e})()}function r9(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o9(e,t){if(t&&(ir(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return r9(e)}function s9(e){var t=X0();return function(){var n,r=qs(e);if(t){var o=qs(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return o9(this,n)}}function a9(e){if(Array.isArray(e))return hc(e)}function i9(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function c9(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
597
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wr(e){return a9(e)||i9(e)||W0(e)||c9()}var l9=!1;function u9(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function d9(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var f9=function(){function e(n){var r=this;this._insertTag=function(o){var s;r.tags.length===0?r.insertionPoint?s=r.insertionPoint.nextSibling:r.prepend?s=r.container.firstChild:s=r.before:s=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,s),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!l9:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(d9(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=u9(o);try{s.insertRule(r,s.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var o;return(o=r.parentNode)==null?void 0:o.removeChild(r)}),this.tags=[],this.ctr=0},e}(),ot="-ms-",$s="-moz-",Ae="-webkit-",z0="comm",bc="rule",yc="decl",p9="@import",Y0="@keyframes",h9="@layer",g9=Math.abs,Qs=String.fromCharCode,m9=Object.assign;function b9(e,t){return rt(e,0)^45?(((t<<2^rt(e,0))<<2^rt(e,1))<<2^rt(e,2))<<2^rt(e,3):0}function J0(e){return e.trim()}function y9(e,t){return(e=t.exec(e))?e[0]:e}function Te(e,t,n){return e.replace(t,n)}function Cc(e,t){return e.indexOf(t)}function rt(e,t){return e.charCodeAt(t)|0}function Po(e,t,n){return e.slice(t,n)}function sn(e){return e.length}function xc(e){return e.length}function Us(e,t){return t.push(e),e}function C9(e,t){return e.map(t).join("")}var Ks=1,Zr=1,q0=0,yt=0,qe=0,Xr="";function ea(e,t,n,r,o,s,a){return{value:e,root:t,parent:n,type:r,props:o,children:s,line:Ks,column:Zr,length:a,return:""}}function jo(e,t){return m9(ea("",null,null,"",null,null,0),e,{length:-e.length},t)}function x9(){return qe}function v9(){return qe=yt>0?rt(Xr,--yt):0,Zr--,qe===10&&(Zr=1,Ks--),qe}function Ot(){return qe=yt<q0?rt(Xr,yt++):0,Zr++,qe===10&&(Zr=1,Ks++),qe}function an(){return rt(Xr,yt)}function ta(){return yt}function Bo(e,t){return Po(Xr,e,t)}function Vo(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 $0(e){return Ks=Zr=1,q0=sn(Xr=e),yt=0,[]}function Q0(e){return Xr="",e}function na(e){return J0(Bo(yt-1,vc(e===91?e+2:e===40?e+1:e)))}function E9(e){for(;(qe=an())&&qe<33;)Ot();return Vo(e)>2||Vo(qe)>3?"":" "}function I9(e,t){for(;--t&&Ot()&&!(qe<48||qe>102||qe>57&&qe<65||qe>70&&qe<97););return Bo(e,ta()+(t<6&&an()==32&&Ot()==32))}function vc(e){for(;Ot();)switch(qe){case e:return yt;case 34:case 39:e!==34&&e!==39&&vc(qe);break;case 40:e===41&&vc(e);break;case 92:Ot();break}return yt}function w9(e,t){for(;Ot()&&e+qe!==57;)if(e+qe===84&&an()===47)break;return"/*"+Bo(t,yt-1)+"*"+Qs(e===47?e:Ot())}function _9(e){for(;!Vo(an());)Ot();return Bo(e,yt)}function S9(e){return Q0(ra("",null,null,null,[""],e=$0(e),0,[0],e))}function ra(e,t,n,r,o,s,a,i,c){for(var l=0,f=0,m=a,b=0,v=0,y=0,p=1,h=1,g=1,C=0,x="",I=o,E=s,_=r,A=x;h;)switch(y=C,C=Ot()){case 40:if(y!=108&&rt(A,m-1)==58){Cc(A+=Te(na(C),"&","&\f"),"&\f")!=-1&&(g=-1);break}case 34:case 39:case 91:A+=na(C);break;case 9:case 10:case 13:case 32:A+=E9(y);break;case 92:A+=I9(ta()-1,7);continue;case 47:switch(an()){case 42:case 47:Us(A9(w9(Ot(),ta()),t,n),c);break;default:A+="/"}break;case 123*p:i[l++]=sn(A)*g;case 125*p:case 59:case 0:switch(C){case 0:case 125:h=0;case 59+f:g==-1&&(A=Te(A,/\f/g,"")),v>0&&sn(A)-m&&Us(v>32?K0(A+";",r,n,m-1):K0(Te(A," ","")+";",r,n,m-2),c);break;case 59:A+=";";default:if(Us(_=U0(A,t,n,l,f,o,i,x,I=[],E=[],m),s),C===123)if(f===0)ra(A,t,_,_,I,s,m,i,E);else switch(b===99&&rt(A,3)===110?100:b){case 100:case 108:case 109:case 115:ra(e,_,_,r&&Us(U0(e,_,_,0,0,o,i,x,o,I=[],m),E),o,E,m,i,r?I:E);break;default:ra(A,_,_,_,[""],E,0,i,E)}}l=f=v=0,p=g=1,x=A="",m=a;break;case 58:m=1+sn(A),v=y;default:if(p<1){if(C==123)--p;else if(C==125&&p++==0&&v9()==125)continue}switch(A+=Qs(C),C*p){case 38:g=f>0?1:(A+="\f",-1);break;case 44:i[l++]=(sn(A)-1)*g,g=1;break;case 64:an()===45&&(A+=na(Ot())),b=an(),f=m=sn(x=A+=_9(ta())),C++;break;case 45:y===45&&sn(A)==2&&(p=0)}}return s}function U0(e,t,n,r,o,s,a,i,c,l,f){for(var m=o-1,b=o===0?s:[""],v=xc(b),y=0,p=0,h=0;y<r;++y)for(var g=0,C=Po(e,m+1,m=g9(p=a[y])),x=e;g<v;++g)(x=J0(p>0?b[g]+" "+C:Te(C,/&\f/g,b[g])))&&(c[h++]=x);return ea(e,t,n,o===0?bc:i,c,l,f)}function A9(e,t,n){return ea(e,t,n,z0,Qs(x9()),Po(e,2,-2),0)}function K0(e,t,n,r){return ea(e,t,n,yc,Po(e,0,r),Po(e,r+1,-1),r)}function zr(e,t){for(var n="",r=xc(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function T9(e,t,n,r){switch(e.type){case h9:if(e.children.length)break;case p9:case yc:return e.return=e.return||e.value;case z0:return"";case Y0:return e.return=e.value+"{"+zr(e.children,r)+"}";case bc:e.value=e.props.join(",")}return sn(n=zr(e.children,r))?e.return=e.value+"{"+n+"}":""}function L9(e){var t=xc(e);return function(n,r,o,s){for(var a="",i=0;i<t;i++)a+=e[i](n,r,o,s)||"";return a}}function O9(e){return function(t){t.root||(t=t.return)&&e(t)}}function F9(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var k9=function(t,n,r){for(var o=0,s=0;o=s,s=an(),o===38&&s===12&&(n[r]=1),!Vo(s);)Ot();return Bo(t,yt)},D9=function(t,n){var r=-1,o=44;do switch(Vo(o)){case 0:o===38&&an()===12&&(n[r]=1),t[r]+=k9(yt-1,n,r);break;case 2:t[r]+=na(o);break;case 4:if(o===44){t[++r]=an()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Qs(o)}while(o=Ot());return t},N9=function(t,n){return Q0(D9($0(t),n))},ef=new WeakMap,R9=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,o=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!ef.get(r))&&!o){ef.set(t,!0);for(var s=[],a=N9(n,s),i=r.props,c=0,l=0;c<a.length;c++)for(var f=0;f<i.length;f++,l++)t.props[l]=s[c]?a[c].replace(/&\f/g,i[f]):i[f]+" "+a[c]}}},M9=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function tf(e,t){switch(b9(e,t)){case 5103:return Ae+"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 Ae+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ae+e+$s+e+ot+e+e;case 6828:case 4268:return Ae+e+ot+e+e;case 6165:return Ae+e+ot+"flex-"+e+e;case 5187:return Ae+e+Te(e,/(\w+).+(:[^]+)/,Ae+"box-$1$2"+ot+"flex-$1$2")+e;case 5443:return Ae+e+ot+"flex-item-"+Te(e,/flex-|-self/,"")+e;case 4675:return Ae+e+ot+"flex-line-pack"+Te(e,/align-content|flex-|-self/,"")+e;case 5548:return Ae+e+ot+Te(e,"shrink","negative")+e;case 5292:return Ae+e+ot+Te(e,"basis","preferred-size")+e;case 6060:return Ae+"box-"+Te(e,"-grow","")+Ae+e+ot+Te(e,"grow","positive")+e;case 4554:return Ae+Te(e,/([^-])(transform)/g,"$1"+Ae+"$2")+e;case 6187:return Te(Te(Te(e,/(zoom-|grab)/,Ae+"$1"),/(image-set)/,Ae+"$1"),e,"")+e;case 5495:case 3959:return Te(e,/(image-set\([^]*)/,Ae+"$1$`$1");case 4968:return Te(Te(e,/(.+:)(flex-)?(.*)/,Ae+"box-pack:$3"+ot+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ae+e+e;case 4095:case 3583:case 4068:case 2532:return Te(e,/(.+)-inline(.+)/,Ae+"$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(sn(e)-1-t>6)switch(rt(e,t+1)){case 109:if(rt(e,t+4)!==45)break;case 102:return Te(e,/(.+:)(.+)-([^]+)/,"$1"+Ae+"$2-$3$1"+$s+(rt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Cc(e,"stretch")?tf(Te(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(rt(e,t+1)!==115)break;case 6444:switch(rt(e,sn(e)-3-(~Cc(e,"!important")&&10))){case 107:return Te(e,":",":"+Ae)+e;case 101:return Te(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ae+(rt(e,14)===45?"inline-":"")+"box$3$1"+Ae+"$2$3$1"+ot+"$2box$3")+e}break;case 5936:switch(rt(e,t+11)){case 114:return Ae+e+ot+Te(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ae+e+ot+Te(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ae+e+ot+Te(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ae+e+ot+e+e}return e}var P9=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case yc:t.return=tf(t.value,t.length);break;case Y0:return zr([jo(t,{value:Te(t.value,"@","@"+Ae)})],o);case bc:if(t.length)return C9(t.props,function(s){switch(y9(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return zr([jo(t,{props:[Te(s,/:(read-\w+)/,":"+$s+"$1")]})],o);case"::placeholder":return zr([jo(t,{props:[Te(s,/:(plac\w+)/,":"+Ae+"input-$1")]}),jo(t,{props:[Te(s,/:(plac\w+)/,":"+$s+"$1")]}),jo(t,{props:[Te(s,/:(plac\w+)/,ot+"input-$1")]})],o)}return""})}},j9=[P9],B9=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(p){var h=p.getAttribute("data-emotion");h.indexOf(" ")!==-1&&(document.head.appendChild(p),p.setAttribute("data-s",""))})}var o=t.stylisPlugins||j9,s={},a,i=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(p){for(var h=p.getAttribute("data-emotion").split(" "),g=1;g<h.length;g++)s[h[g]]=!0;i.push(p)});var c,l=[R9,M9];{var f,m=[T9,O9(function(p){f.insert(p)})],b=L9(l.concat(o,m)),v=function(h){return zr(S9(h),b)};c=function(h,g,C,x){f=C,v(h?h+"{"+g.styles+"}":g.styles),x&&(y.inserted[g.name]=!0)}}var y={key:n,sheet:new f9({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:c};return y.sheet.hydrate(i),y},Ec={exports:{}},Oe={};/** @license React v16.13.1
590
+ `,yy=(e,{closeToast:t})=>u.jsx(by,{children:u.jsx("img",{src:py,onClick:t})}),Js=({message:e})=>u.jsxs(hy,{children:[u.jsx(my,{}),u.jsx(gy,{children:e})]});function _e(e){const{message:t,type:n,autoClose:r}=e,o={closeButton:u.jsx(yy,{}),autoClose:r??5e3,pauseOnHover:!0,position:"bottom-left",rtl:!1,draggable:!0,closeOnClick:!0,hideProgressBar:!0};let s;switch(n){case"success":{s=Le.success(u.jsx(Js,{message:t}),{...o,icon:!1});break}case"error":{s=Le.error(u.jsx(Js,{message:t}),{...o,icon:!1});break}case"info-dark":{s=Le.info(u.jsx(Js,{message:t}),{...o,icon:!1,className:"toast_dark"});break}default:{s=Le.info(u.jsx(Js,{message:t}),{...o,icon:!1});break}}return setTimeout(()=>{Cy(s)},r&&!isNaN(r)?Number(r):5e3),s}function Cy(e){Le.dismiss(e)}const k0={updateFormApiStatus:K.IDLE,createObjectList:[],createObjectConnectorNamesList:[],linkObjectList:[],editObjectList:[],searchObjectList:[],objectDict:null,formFields:null,objectListApiStatus:K.IDLE,unlinkCardApiStatus:K.IDLE,linkCardApiStatus:K.IDLE,optionsMap:null,dropdownOptionsApis:K.IDLE,dependentFieldsMap:{},createFormApiStatus:K.IDLE,currentResourceDetailsApiStatus:K.IDLE,currentResourceDetails:null,currentCardInEdit:null,hasUnsavedChanges:!1},xy="/v1/api"+"/templates/metadata",D0={GET:"GET",POST:"POST",DELETE:"DELETE",PATCH:"PATCH",PUT:"PUT"},vy="Required Field",Ey="Invalid date",N0=/^https:\/\/([a-z0-9-]+(\.[a-z0-9-]+)+)(:[0-9]{1,5})?(\/[^\s/]*)*$/i,Iy=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,R0="Please enter a valid URL",wy="Please enter valid ID",_y="Please enter valid input",Sy="URL must start with https://",Ay="URL should not end with a slash",Ty="Invalid email address",Ly="Email must be a string",M0="Invalid date",Oy="Date cannot be in the past",Fy="Date cannot be in the future",ky="Invalid number",Dy="Invalid text",Ny=async e=>{const t=new URLSearchParams,{inboxIds:n,channelType:r,conversationId:o,fetchAuthenticatedConnectors:s}=e||{};return n==null||n.forEach(i=>{t.append("inbox_ids",i)}),[["channel_type",r],["conversation_id",o],["fetch_authenticated_connectors",s==null?void 0:s.toString()]].forEach(([i,c])=>{c!==void 0&&t.append(i,c)}),we({url:`${xy}?${t.toString()}`,method:D0.GET})},Ry="/v1/api/connectors/ug?onlyEnabledAuthenticated=true&minimal=true",My=async()=>{const e=await we({url:Ry,method:D0.GET}),t=e==null?void 0:e.data;return Array.isArray(t)?t.map(({id:n,name:r,logo:o,connectorType:s})=>({id:n,name:r,logo:o,connectorType:s})).filter(({logo:n})=>!!n):[]};let Gr={};const Py={get length(){return Object.keys(Gr).length},getItem(e){return Gr[e]??null},setItem(e,t){Gr[e]=t},removeItem(e){delete Gr[e]},clear(){Gr={}},key(e){return Object.keys(Gr)[e]}},jy={LOCAL:window==null?void 0:window.localStorage,SESSION:window==null?void 0:window.sessionStorage},P0=(e="LOCAL")=>jy[e]??Py,By=(e="LOCAL")=>{const t=P0(e);return{...t,getItem(n){const r=t.getItem(n);if(!r)return r;try{return JSON.parse(r)}catch(o){return console.warn(o),r}},setItem(n,r){try{const o=JSON.stringify(r);t.setItem(n,o)}catch(o){console.warn(o)}}}};var pc=(e=>(e.ADD="ADD",e.MULTIPLY="MULTIPLY",e))(pc||{});const Vy={[pc.ADD]:(e,t)=>e+t,[pc.MULTIPLY]:(e,t)=>e*t},Gy=e=>e,j0=()=>{if("crypto"in window&&"randomUUID"in window.crypto)return window.crypto.randomUUID();const e=Date.now().toString(16),t=Math.random().toString(16).substring(2,8);return`${e}-${t}`},B0=(e,t)=>{let n;const r=Vy[t]??Gy;for(const o of e){const s=Number(o);isNaN(s)||(n=n===void 0?s:r(n,s))}return(n??0).toFixed(2)},V0=(e,t=n=>n)=>{const n=new Set,r=[];for(const o of e){const s=t(o);n.has(s)||(n.add(s),r.push(o))}return r},Hy=e=>t=>{if(t&&typeof t=="string"){const n=t.replace(/\/$/,"");return n.startsWith("https://")?t.endsWith("/")?Ay:N0.test(n)?!0:e||R0:Sy}return!1},Wy=e=>t=>t&&typeof t=="string"?Iy.test(t)?!0:e||Ty:Ly,Zy=e=>t=>t==null||t===""?e||vy:!0,Xy=e=>(t,n)=>{var r;if(!t||(t==null?void 0:t.toString())===Ey)return M0;if(typeof t=="object"){const o=t,s=new Date;s.setHours(0,0,0,0);const a=n.disablePast,i=n.disableFuture;return a&&o<s?e||Oy:i&&o>s?e||Fy:!0}return typeof t=="string"&&((r=new Date(t))==null?void 0:r.toString())!=="Invalid Date"?!0:M0},zy=e=>(t,n)=>{if(t=Number(t),typeof t=="number"&&!isNaN(t)){const r=n.min,o=n.max;return r!==void 0&&t<r?e||`Value should not be less than ${r}`:o!==void 0&&t>o?e||`Value should not be greater than ${o}`:!0}return e||ky},hc=e=>(t,n)=>{if(typeof t=="string"){const r=n.limit;return r!==void 0&&t.length>r?e||`Maximum characters allowed are ${r}`:!0}return e||Dy},Yy=e=>t=>typeof t=="string"?t.startsWith("https:")?N0.test(t)?!0:e||R0:t.trim().length>0?!0:e||wy:e||_y;function ir(e){"@babel/helpers - typeof";return ir=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ir(e)}function Jy(e,t){if(ir(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ir(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function G0(e){var t=Jy(e,"string");return ir(t)=="symbol"?t:t+""}function Hr(e,t,n){return(t=G0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?H0(Object(n),!0).forEach(function(r){Hr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qy(e){if(Array.isArray(e))return e}function $y(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,s,a,i=[],c=!0,l=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=s.call(n)).done)&&(i.push(r.value),i.length!==t);c=!0);}catch(f){l=!0,o=f}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return i}}function gc(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function W0(e,t){if(e){if(typeof e=="string")return gc(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gc(e,t):void 0}}function Qy(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
591
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tt(e,t){return qy(e)||$y(e,t)||W0(e,t)||Qy()}function Uy(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function Jt(e,t){if(e==null)return{};var n,r,o=Uy(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ky=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function mc(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,o=r===void 0?!1:r,s=e.defaultValue,a=s===void 0?null:s,i=e.inputValue,c=e.menuIsOpen,l=e.onChange,f=e.onInputChange,m=e.onMenuClose,b=e.onMenuOpen,v=e.value,y=Jt(e,Ky),p=w.useState(i!==void 0?i:n),h=tt(p,2),g=h[0],C=h[1],x=w.useState(c!==void 0?c:o),I=tt(x,2),E=I[0],_=I[1],A=w.useState(v!==void 0?v:a),S=tt(A,2),L=S[0],k=S[1],D=w.useCallback(function(X,q){typeof l=="function"&&l(X,q),k(X)},[l]),N=w.useCallback(function(X,q){var se;typeof f=="function"&&(se=f(X,q)),C(se!==void 0?se:X)},[f]),M=w.useCallback(function(){typeof b=="function"&&b(),_(!0)},[b]),V=w.useCallback(function(){typeof m=="function"&&m(),_(!1)},[m]),J=i!==void 0?i:g,$=c!==void 0?c:E,H=v!==void 0?v:L;return ne(ne({},y),{},{inputValue:J,menuIsOpen:$,onChange:D,onInputChange:N,onMenuClose:V,onMenuOpen:M,value:H})}function ue(){return ue=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},ue.apply(null,arguments)}function e9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Z0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,G0(r.key),r)}}function t9(e,t,n){return t&&Z0(e.prototype,t),n&&Z0(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function bc(e,t){return bc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},bc(e,t)}function n9(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bc(e,t)}function qs(e){return qs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},qs(e)}function X0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(X0=function(){return!!e})()}function r9(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o9(e,t){if(t&&(ir(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return r9(e)}function s9(e){var t=X0();return function(){var n,r=qs(e);if(t){var o=qs(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return o9(this,n)}}function a9(e){if(Array.isArray(e))return gc(e)}function i9(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function c9(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
592
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wr(e){return a9(e)||i9(e)||W0(e)||c9()}var l9=!1;function u9(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function d9(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var f9=function(){function e(n){var r=this;this._insertTag=function(o){var s;r.tags.length===0?r.insertionPoint?s=r.insertionPoint.nextSibling:r.prepend?s=r.container.firstChild:s=r.before:s=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,s),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!l9:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(d9(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=u9(o);try{s.insertRule(r,s.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var o;return(o=r.parentNode)==null?void 0:o.removeChild(r)}),this.tags=[],this.ctr=0},e}(),ot="-ms-",$s="-moz-",Ae="-webkit-",z0="comm",yc="rule",Cc="decl",p9="@import",Y0="@keyframes",h9="@layer",g9=Math.abs,Qs=String.fromCharCode,m9=Object.assign;function b9(e,t){return rt(e,0)^45?(((t<<2^rt(e,0))<<2^rt(e,1))<<2^rt(e,2))<<2^rt(e,3):0}function J0(e){return e.trim()}function y9(e,t){return(e=t.exec(e))?e[0]:e}function Te(e,t,n){return e.replace(t,n)}function xc(e,t){return e.indexOf(t)}function rt(e,t){return e.charCodeAt(t)|0}function Po(e,t,n){return e.slice(t,n)}function sn(e){return e.length}function vc(e){return e.length}function Us(e,t){return t.push(e),e}function C9(e,t){return e.map(t).join("")}var Ks=1,Zr=1,q0=0,yt=0,qe=0,Xr="";function ea(e,t,n,r,o,s,a){return{value:e,root:t,parent:n,type:r,props:o,children:s,line:Ks,column:Zr,length:a,return:""}}function jo(e,t){return m9(ea("",null,null,"",null,null,0),e,{length:-e.length},t)}function x9(){return qe}function v9(){return qe=yt>0?rt(Xr,--yt):0,Zr--,qe===10&&(Zr=1,Ks--),qe}function Ot(){return qe=yt<q0?rt(Xr,yt++):0,Zr++,qe===10&&(Zr=1,Ks++),qe}function an(){return rt(Xr,yt)}function ta(){return yt}function Bo(e,t){return Po(Xr,e,t)}function Vo(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 $0(e){return Ks=Zr=1,q0=sn(Xr=e),yt=0,[]}function Q0(e){return Xr="",e}function na(e){return J0(Bo(yt-1,Ec(e===91?e+2:e===40?e+1:e)))}function E9(e){for(;(qe=an())&&qe<33;)Ot();return Vo(e)>2||Vo(qe)>3?"":" "}function I9(e,t){for(;--t&&Ot()&&!(qe<48||qe>102||qe>57&&qe<65||qe>70&&qe<97););return Bo(e,ta()+(t<6&&an()==32&&Ot()==32))}function Ec(e){for(;Ot();)switch(qe){case e:return yt;case 34:case 39:e!==34&&e!==39&&Ec(qe);break;case 40:e===41&&Ec(e);break;case 92:Ot();break}return yt}function w9(e,t){for(;Ot()&&e+qe!==57;)if(e+qe===84&&an()===47)break;return"/*"+Bo(t,yt-1)+"*"+Qs(e===47?e:Ot())}function _9(e){for(;!Vo(an());)Ot();return Bo(e,yt)}function S9(e){return Q0(ra("",null,null,null,[""],e=$0(e),0,[0],e))}function ra(e,t,n,r,o,s,a,i,c){for(var l=0,f=0,m=a,b=0,v=0,y=0,p=1,h=1,g=1,C=0,x="",I=o,E=s,_=r,A=x;h;)switch(y=C,C=Ot()){case 40:if(y!=108&&rt(A,m-1)==58){xc(A+=Te(na(C),"&","&\f"),"&\f")!=-1&&(g=-1);break}case 34:case 39:case 91:A+=na(C);break;case 9:case 10:case 13:case 32:A+=E9(y);break;case 92:A+=I9(ta()-1,7);continue;case 47:switch(an()){case 42:case 47:Us(A9(w9(Ot(),ta()),t,n),c);break;default:A+="/"}break;case 123*p:i[l++]=sn(A)*g;case 125*p:case 59:case 0:switch(C){case 0:case 125:h=0;case 59+f:g==-1&&(A=Te(A,/\f/g,"")),v>0&&sn(A)-m&&Us(v>32?K0(A+";",r,n,m-1):K0(Te(A," ","")+";",r,n,m-2),c);break;case 59:A+=";";default:if(Us(_=U0(A,t,n,l,f,o,i,x,I=[],E=[],m),s),C===123)if(f===0)ra(A,t,_,_,I,s,m,i,E);else switch(b===99&&rt(A,3)===110?100:b){case 100:case 108:case 109:case 115:ra(e,_,_,r&&Us(U0(e,_,_,0,0,o,i,x,o,I=[],m),E),o,E,m,i,r?I:E);break;default:ra(A,_,_,_,[""],E,0,i,E)}}l=f=v=0,p=g=1,x=A="",m=a;break;case 58:m=1+sn(A),v=y;default:if(p<1){if(C==123)--p;else if(C==125&&p++==0&&v9()==125)continue}switch(A+=Qs(C),C*p){case 38:g=f>0?1:(A+="\f",-1);break;case 44:i[l++]=(sn(A)-1)*g,g=1;break;case 64:an()===45&&(A+=na(Ot())),b=an(),f=m=sn(x=A+=_9(ta())),C++;break;case 45:y===45&&sn(A)==2&&(p=0)}}return s}function U0(e,t,n,r,o,s,a,i,c,l,f){for(var m=o-1,b=o===0?s:[""],v=vc(b),y=0,p=0,h=0;y<r;++y)for(var g=0,C=Po(e,m+1,m=g9(p=a[y])),x=e;g<v;++g)(x=J0(p>0?b[g]+" "+C:Te(C,/&\f/g,b[g])))&&(c[h++]=x);return ea(e,t,n,o===0?yc:i,c,l,f)}function A9(e,t,n){return ea(e,t,n,z0,Qs(x9()),Po(e,2,-2),0)}function K0(e,t,n,r){return ea(e,t,n,Cc,Po(e,0,r),Po(e,r+1,-1),r)}function zr(e,t){for(var n="",r=vc(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function T9(e,t,n,r){switch(e.type){case h9:if(e.children.length)break;case p9:case Cc:return e.return=e.return||e.value;case z0:return"";case Y0:return e.return=e.value+"{"+zr(e.children,r)+"}";case yc:e.value=e.props.join(",")}return sn(n=zr(e.children,r))?e.return=e.value+"{"+n+"}":""}function L9(e){var t=vc(e);return function(n,r,o,s){for(var a="",i=0;i<t;i++)a+=e[i](n,r,o,s)||"";return a}}function O9(e){return function(t){t.root||(t=t.return)&&e(t)}}function F9(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var k9=function(t,n,r){for(var o=0,s=0;o=s,s=an(),o===38&&s===12&&(n[r]=1),!Vo(s);)Ot();return Bo(t,yt)},D9=function(t,n){var r=-1,o=44;do switch(Vo(o)){case 0:o===38&&an()===12&&(n[r]=1),t[r]+=k9(yt-1,n,r);break;case 2:t[r]+=na(o);break;case 4:if(o===44){t[++r]=an()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Qs(o)}while(o=Ot());return t},N9=function(t,n){return Q0(D9($0(t),n))},ef=new WeakMap,R9=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,o=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!ef.get(r))&&!o){ef.set(t,!0);for(var s=[],a=N9(n,s),i=r.props,c=0,l=0;c<a.length;c++)for(var f=0;f<i.length;f++,l++)t.props[l]=s[c]?a[c].replace(/&\f/g,i[f]):i[f]+" "+a[c]}}},M9=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function tf(e,t){switch(b9(e,t)){case 5103:return Ae+"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 Ae+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ae+e+$s+e+ot+e+e;case 6828:case 4268:return Ae+e+ot+e+e;case 6165:return Ae+e+ot+"flex-"+e+e;case 5187:return Ae+e+Te(e,/(\w+).+(:[^]+)/,Ae+"box-$1$2"+ot+"flex-$1$2")+e;case 5443:return Ae+e+ot+"flex-item-"+Te(e,/flex-|-self/,"")+e;case 4675:return Ae+e+ot+"flex-line-pack"+Te(e,/align-content|flex-|-self/,"")+e;case 5548:return Ae+e+ot+Te(e,"shrink","negative")+e;case 5292:return Ae+e+ot+Te(e,"basis","preferred-size")+e;case 6060:return Ae+"box-"+Te(e,"-grow","")+Ae+e+ot+Te(e,"grow","positive")+e;case 4554:return Ae+Te(e,/([^-])(transform)/g,"$1"+Ae+"$2")+e;case 6187:return Te(Te(Te(e,/(zoom-|grab)/,Ae+"$1"),/(image-set)/,Ae+"$1"),e,"")+e;case 5495:case 3959:return Te(e,/(image-set\([^]*)/,Ae+"$1$`$1");case 4968:return Te(Te(e,/(.+:)(flex-)?(.*)/,Ae+"box-pack:$3"+ot+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ae+e+e;case 4095:case 3583:case 4068:case 2532:return Te(e,/(.+)-inline(.+)/,Ae+"$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(sn(e)-1-t>6)switch(rt(e,t+1)){case 109:if(rt(e,t+4)!==45)break;case 102:return Te(e,/(.+:)(.+)-([^]+)/,"$1"+Ae+"$2-$3$1"+$s+(rt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~xc(e,"stretch")?tf(Te(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(rt(e,t+1)!==115)break;case 6444:switch(rt(e,sn(e)-3-(~xc(e,"!important")&&10))){case 107:return Te(e,":",":"+Ae)+e;case 101:return Te(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ae+(rt(e,14)===45?"inline-":"")+"box$3$1"+Ae+"$2$3$1"+ot+"$2box$3")+e}break;case 5936:switch(rt(e,t+11)){case 114:return Ae+e+ot+Te(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ae+e+ot+Te(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ae+e+ot+Te(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ae+e+ot+e+e}return e}var P9=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case Cc:t.return=tf(t.value,t.length);break;case Y0:return zr([jo(t,{value:Te(t.value,"@","@"+Ae)})],o);case yc:if(t.length)return C9(t.props,function(s){switch(y9(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return zr([jo(t,{props:[Te(s,/:(read-\w+)/,":"+$s+"$1")]})],o);case"::placeholder":return zr([jo(t,{props:[Te(s,/:(plac\w+)/,":"+Ae+"input-$1")]}),jo(t,{props:[Te(s,/:(plac\w+)/,":"+$s+"$1")]}),jo(t,{props:[Te(s,/:(plac\w+)/,ot+"input-$1")]})],o)}return""})}},j9=[P9],B9=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(p){var h=p.getAttribute("data-emotion");h.indexOf(" ")!==-1&&(document.head.appendChild(p),p.setAttribute("data-s",""))})}var o=t.stylisPlugins||j9,s={},a,i=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(p){for(var h=p.getAttribute("data-emotion").split(" "),g=1;g<h.length;g++)s[h[g]]=!0;i.push(p)});var c,l=[R9,M9];{var f,m=[T9,O9(function(p){f.insert(p)})],b=L9(l.concat(o,m)),v=function(h){return zr(S9(h),b)};c=function(h,g,C,x){f=C,v(h?h+"{"+g.styles+"}":g.styles),x&&(y.inserted[g.name]=!0)}}var y={key:n,sheet:new f9({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:c};return y.sheet.hydrate(i),y},Ic={exports:{}},Oe={};/** @license React v16.13.1
598
593
  * react-is.production.min.js
599
594
  *
600
595
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -608,16 +603,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
608
603
  *
609
604
  * This source code is licensed under the MIT license found in the
610
605
  * LICENSE file in the root directory of this source tree.
611
- */var rf;function G9(){return rf||(rf=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function x(z){return typeof z=="string"||typeof z=="function"||z===r||z===l||z===s||z===o||z===m||z===b||typeof z=="object"&&z!==null&&(z.$$typeof===y||z.$$typeof===v||z.$$typeof===a||z.$$typeof===i||z.$$typeof===f||z.$$typeof===h||z.$$typeof===g||z.$$typeof===C||z.$$typeof===p)}function I(z){if(typeof z=="object"&&z!==null){var Ve=z.$$typeof;switch(Ve){case t:var Ne=z.type;switch(Ne){case c:case l:case r:case s:case o:case m:return Ne;default:var Ue=Ne&&Ne.$$typeof;switch(Ue){case i:case f:case y:case v:case a:return Ue;default:return Ve}}case n:return Ve}}}var E=c,_=l,A=i,S=a,L=t,k=f,D=r,N=y,M=v,V=n,J=s,$=o,H=m,X=!1;function q(z){return X||(X=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),se(z)||I(z)===c}function se(z){return I(z)===l}function de(z){return I(z)===i}function B(z){return I(z)===a}function P(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function W(z){return I(z)===f}function G(z){return I(z)===r}function Y(z){return I(z)===y}function oe(z){return I(z)===v}function re(z){return I(z)===n}function j(z){return I(z)===s}function te(z){return I(z)===o}function Ee(z){return I(z)===m}Fe.AsyncMode=E,Fe.ConcurrentMode=_,Fe.ContextConsumer=A,Fe.ContextProvider=S,Fe.Element=L,Fe.ForwardRef=k,Fe.Fragment=D,Fe.Lazy=N,Fe.Memo=M,Fe.Portal=V,Fe.Profiler=J,Fe.StrictMode=$,Fe.Suspense=H,Fe.isAsyncMode=q,Fe.isConcurrentMode=se,Fe.isContextConsumer=de,Fe.isContextProvider=B,Fe.isElement=P,Fe.isForwardRef=W,Fe.isFragment=G,Fe.isLazy=Y,Fe.isMemo=oe,Fe.isPortal=re,Fe.isProfiler=j,Fe.isStrictMode=te,Fe.isSuspense=Ee,Fe.isValidElementType=x,Fe.typeOf=I}()),Fe}process.env.NODE_ENV==="production"?Ec.exports=V9():Ec.exports=G9();var H9=Ec.exports,of=H9,W9={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Z9={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},sf={};sf[of.ForwardRef]=W9,sf[of.Memo]=Z9;var X9=!0;function z9(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(r+=o+" ")}),r}var af=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||X9===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},Y9=function(t,n,r){af(t,n,r);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var s=n;do t.insert(n===s?"."+o:"",s,t.sheet,!0),s=s.next;while(s!==void 0)}};function J9(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var q9={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,scale: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},$9=!1,Q9=/[A-Z]|^ms/g,U9=/_EMO_([^_]+?)_([^]*?)_EMO_/g,cf=function(t){return t.charCodeAt(1)===45},lf=function(t){return t!=null&&typeof t!="boolean"},Ic=F9(function(e){return cf(e)?e:e.replace(Q9,"-$&").toLowerCase()}),uf=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(U9,function(r,o,s){return cn={name:o,styles:s,next:cn},o})}return q9[t]!==1&&!cf(t)&&typeof n=="number"&&n!==0?n+"px":n},K9="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Go(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return cn={name:o.name,styles:o.styles,next:cn},o.name;var s=n;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)cn={name:a.name,styles:a.styles,next:cn},a=a.next;var i=s.styles+";";return i}return e6(e,t,n)}case"function":{if(e!==void 0){var c=cn,l=n(e);return cn=c,Go(e,t,l)}break}}var f=n;return f}function e6(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Go(e,t,n[o])+";";else for(var s in n){var a=n[s];if(typeof a!="object"){var i=a;lf(i)&&(r+=Ic(s)+":"+uf(s,i)+";")}else{if(s==="NO_COMPONENT_SELECTOR"&&$9)throw new Error(K9);if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var c=0;c<a.length;c++)lf(a[c])&&(r+=Ic(s)+":"+uf(s,a[c])+";");else{var l=Go(e,t,a);switch(s){case"animation":case"animationName":{r+=Ic(s)+":"+l+";";break}default:r+=s+"{"+l+"}"}}}}return r}var df=/label:\s*([^\s;{]+)\s*(;|$)/g,cn;function ff(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,o="";cn=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,o+=Go(n,t,s);else{var a=s;o+=a[0]}for(var i=1;i<e.length;i++)if(o+=Go(n,t,e[i]),r){var c=s;o+=c[i]}df.lastIndex=0;for(var l="",f;(f=df.exec(o))!==null;)l+="-"+f[1];var m=J9(o)+l;return{name:m,styles:o,next:cn}}var t6=function(t){return t()},n6=T.useInsertionEffect?T.useInsertionEffect:!1,r6=n6||t6,o6=!1,pf=T.createContext(typeof HTMLElement<"u"?B9({key:"css"}):null);pf.Provider;var s6=function(t){return w.forwardRef(function(n,r){var o=w.useContext(pf);return t(n,o,r)})},a6=T.createContext({}),wc={}.hasOwnProperty,_c="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",i6=function(t,n){var r={};for(var o in n)wc.call(n,o)&&(r[o]=n[o]);return r[_c]=t,r},c6=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return af(n,r,o),r6(function(){return Y9(n,r,o)}),null},l6=s6(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[_c],s=[r],a="";typeof e.className=="string"?a=z9(t.registered,s,e.className):e.className!=null&&(a=e.className+" ");var i=ff(s,void 0,T.useContext(a6));a+=t.key+"-"+i.name;var c={};for(var l in e)wc.call(e,l)&&l!=="css"&&l!==_c&&!o6&&(c[l]=e[l]);return c.className=a,n&&(c.ref=n),T.createElement(T.Fragment,null,T.createElement(c6,{cache:t,serialized:i,isStringTag:typeof o=="string"}),T.createElement(o,c))}),u6=l6,ae=function(t,n){var r=arguments;if(n==null||!wc.call(n,"css"))return T.createElement.apply(void 0,r);var o=r.length,s=new Array(o);s[0]=u6,s[1]=i6(t,n);for(var a=2;a<o;a++)s[a]=r[a];return T.createElement.apply(null,s)};function Sc(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ff(t)}var d6=function(){var t=Sc.apply(void 0,arguments),n="animation-"+t.name;return{name:n,styles:"@keyframes "+n+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};function f6(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const p6=Math.min,h6=Math.max,oa=Math.round,sa=Math.floor,aa=e=>({x:e,y:e});function g6(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function ia(){return typeof window<"u"}function hf(e){return mf(e)?(e.nodeName||"").toLowerCase():"#document"}function vn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function gf(e){var t;return(t=(mf(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function mf(e){return ia()?e instanceof Node||e instanceof vn(e).Node:!1}function m6(e){return ia()?e instanceof Element||e instanceof vn(e).Element:!1}function Ac(e){return ia()?e instanceof HTMLElement||e instanceof vn(e).HTMLElement:!1}function bf(e){return!ia()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof vn(e).ShadowRoot}function yf(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Tc(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function b6(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function y6(e){return["html","body","#document"].includes(hf(e))}function Tc(e){return vn(e).getComputedStyle(e)}function C6(e){if(hf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||bf(e)&&e.host||gf(e);return bf(t)?t.host:t}function Cf(e){const t=C6(e);return y6(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ac(t)&&yf(t)?t:Cf(t)}function ca(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Cf(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=vn(o);if(s){const i=Lc(a);return t.concat(a,a.visualViewport||[],yf(o)?o:[],i&&n?ca(i):[])}return t.concat(o,ca(o,[],n))}function Lc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function x6(e){const t=Tc(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ac(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,i=oa(n)!==s||oa(r)!==a;return i&&(n=s,r=a),{width:n,height:r,$:i}}function Oc(e){return m6(e)?e:e.contextElement}function xf(e){const t=Oc(e);if(!Ac(t))return aa(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=x6(t);let a=(s?oa(n.width):n.width)/r,i=(s?oa(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const v6=aa(0);function E6(e){const t=vn(e);return!b6()||!t.visualViewport?v6:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function I6(e,t,n){return!1}function vf(e,t,n,r){t===void 0&&(t=!1);const o=e.getBoundingClientRect(),s=Oc(e);let a=aa(1);t&&(a=xf(e));const i=I6()?E6(s):aa(0);let c=(o.left+i.x)/a.x,l=(o.top+i.y)/a.y,f=o.width/a.x,m=o.height/a.y;if(s){const b=vn(s),v=r;let y=b,p=Lc(y);for(;p&&r&&v!==y;){const h=xf(p),g=p.getBoundingClientRect(),C=Tc(p),x=g.left+(p.clientLeft+parseFloat(C.paddingLeft))*h.x,I=g.top+(p.clientTop+parseFloat(C.paddingTop))*h.y;c*=h.x,l*=h.y,f*=h.x,m*=h.y,c+=x,l+=I,y=vn(p),p=Lc(y)}}return g6({width:f,height:m,x:c,y:l})}function w6(e,t){let n=null,r;const o=gf(e);function s(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function a(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),s();const{left:l,top:f,width:m,height:b}=e.getBoundingClientRect();if(i||t(),!m||!b)return;const v=sa(f),y=sa(o.clientWidth-(l+m)),p=sa(o.clientHeight-(f+b)),h=sa(l),C={rootMargin:-v+"px "+-y+"px "+-p+"px "+-h+"px",threshold:h6(0,p6(1,c))||1};let x=!0;function I(E){const _=E[0].intersectionRatio;if(_!==c){if(!x)return a();_?a(!1,_):r=setTimeout(()=>{a(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(I,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(I,C)}n.observe(e)}return a(!0),s}function _6(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=Oc(e),f=o||s?[...l?ca(l):[],...ca(t)]:[];f.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const m=l&&i?w6(l,n):null;let b=-1,v=null;a&&(v=new ResizeObserver(g=>{let[C]=g;C&&C.target===l&&v&&(v.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var x;(x=v)==null||x.observe(t)})),n()}),l&&!c&&v.observe(l),v.observe(t));let y,p=c?vf(e):null;c&&h();function h(){const g=vf(e);p&&(g.x!==p.x||g.y!==p.y||g.width!==p.width||g.height!==p.height)&&n(),p=g,y=requestAnimationFrame(h)}return n(),()=>{var g;f.forEach(C=>{o&&C.removeEventListener("scroll",n),s&&C.removeEventListener("resize",n)}),m==null||m(),(g=v)==null||g.disconnect(),v=null,c&&cancelAnimationFrame(y)}}var Fc=w.useLayoutEffect,S6=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],la=function(){};function A6(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function T6(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];var s=[].concat(r);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&s.push("".concat(A6(e,a)));return s.filter(function(i){return i}).map(function(i){return String(i).trim()}).join(" ")}var ua=function(t){return j6(t)?t.filter(Boolean):ir(t)==="object"&&t!==null?[t]:[]},Ef=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=Jt(t,S6);return ne({},n)},He=function(t,n,r){var o=t.cx,s=t.getStyles,a=t.getClassNames,i=t.className;return{css:s(n,t),className:o(r??{},a(n,t),i)}};function L6(e,t,n){if(n){var r=n(e,t);if(typeof r=="string")return r}return e}function da(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function O6(e){return da(e)?window.innerHeight:e.clientHeight}function If(e){return da(e)?window.pageYOffset:e.scrollTop}function fa(e,t){if(da(e)){window.scrollTo(0,t);return}e.scrollTop=t}function F6(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}function k6(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function pa(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:la,o=If(e),s=t-o,a=10,i=0;function c(){i+=a;var l=k6(i,o,s,n);fa(e,l),i<n?window.requestAnimationFrame(c):r(e)}c()}function wf(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?fa(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&fa(e,Math.max(t.offsetTop-o,0))}function D6(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function _f(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function N6(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var Sf=!1,R6={get passive(){return Sf=!0}},ha=typeof window<"u"?window:{};ha.addEventListener&&ha.removeEventListener&&(ha.addEventListener("p",la,R6),ha.removeEventListener("p",la,!1));var M6=Sf;function P6(e){return e!=null}function j6(e){return Array.isArray(e)}function Ho(e,t,n){return e?t:n}function tA(e){return e}function nA(e){return e}var B6=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var s=Object.entries(t).filter(function(a){var i=tt(a,1),c=i[0];return!r.includes(c)});return s.reduce(function(a,i){var c=tt(i,2),l=c[0],f=c[1];return a[l]=f,a},{})},V6=["children","innerProps"],G6=["children","innerProps"];function H6(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,s=e.shouldScroll,a=e.isFixedPosition,i=e.controlHeight,c=F6(n),l={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return l;var f=c.getBoundingClientRect(),m=f.height,b=n.getBoundingClientRect(),v=b.bottom,y=b.height,p=b.top,h=n.offsetParent.getBoundingClientRect(),g=h.top,C=a?window.innerHeight:O6(c),x=If(c),I=parseInt(getComputedStyle(n).marginBottom,10),E=parseInt(getComputedStyle(n).marginTop,10),_=g-E,A=C-p,S=_+x,L=m-x-p,k=v-C+x+I,D=x+p-E,N=160;switch(o){case"auto":case"bottom":if(A>=y)return{placement:"bottom",maxHeight:t};if(L>=y&&!a)return s&&pa(c,k,N),{placement:"bottom",maxHeight:t};if(!a&&L>=r||a&&A>=r){s&&pa(c,k,N);var M=a?A-I:L-I;return{placement:"bottom",maxHeight:M}}if(o==="auto"||a){var V=t,J=a?_:S;return J>=r&&(V=Math.min(J-I-i,t)),{placement:"top",maxHeight:V}}if(o==="bottom")return s&&fa(c,k),{placement:"bottom",maxHeight:t};break;case"top":if(_>=y)return{placement:"top",maxHeight:t};if(S>=y&&!a)return s&&pa(c,D,N),{placement:"top",maxHeight:t};if(!a&&S>=r||a&&_>=r){var $=t;return(!a&&S>=r||a&&_>=r)&&($=a?_-E:S-E),s&&pa(c,D,N),{placement:"top",maxHeight:$}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return l}function W6(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var Af=function(t){return t==="auto"?"bottom":t},Z6=function(t,n){var r,o=t.placement,s=t.theme,a=s.borderRadius,i=s.spacing,c=s.colors;return ne((r={label:"menu"},Hr(r,W6(o),"100%"),Hr(r,"position","absolute"),Hr(r,"width","100%"),Hr(r,"zIndex",1),r),n?{}:{backgroundColor:c.neutral0,borderRadius:a,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:i.menuGutter,marginTop:i.menuGutter})},Tf=w.createContext(null),X6=function(t){var n=t.children,r=t.minMenuHeight,o=t.maxMenuHeight,s=t.menuPlacement,a=t.menuPosition,i=t.menuShouldScrollIntoView,c=t.theme,l=w.useContext(Tf)||{},f=l.setPortalPlacement,m=w.useRef(null),b=w.useState(o),v=tt(b,2),y=v[0],p=v[1],h=w.useState(null),g=tt(h,2),C=g[0],x=g[1],I=c.spacing.controlHeight;return Fc(function(){var E=m.current;if(E){var _=a==="fixed",A=i&&!_,S=H6({maxHeight:o,menuEl:E,minHeight:r,placement:s,shouldScroll:A,isFixedPosition:_,controlHeight:I});p(S.maxHeight),x(S.placement),f==null||f(S.placement)}},[o,s,a,i,r,f,I]),n({ref:m,placerProps:ne(ne({},t),{},{placement:C||Af(s),maxHeight:y})})},z6=function(t){var n=t.children,r=t.innerRef,o=t.innerProps;return ae("div",ue({},He(t,"menu",{menu:!0}),{ref:r},o),n)},Y6=z6,J6=function(t,n){var r=t.maxHeight,o=t.theme.spacing.baseUnit;return ne({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:o,paddingTop:o})},q6=function(t){var n=t.children,r=t.innerProps,o=t.innerRef,s=t.isMulti;return ae("div",ue({},He(t,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:o},r),n)},Lf=function(t,n){var r=t.theme,o=r.spacing.baseUnit,s=r.colors;return ne({textAlign:"center"},n?{}:{color:s.neutral40,padding:"".concat(o*2,"px ").concat(o*3,"px")})},$6=Lf,Q6=Lf,U6=function(t){var n=t.children,r=n===void 0?"No options":n,o=t.innerProps,s=Jt(t,V6);return ae("div",ue({},He(ne(ne({},s),{},{children:r,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),r)},K6=function(t){var n=t.children,r=n===void 0?"Loading...":n,o=t.innerProps,s=Jt(t,G6);return ae("div",ue({},He(ne(ne({},s),{},{children:r,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),r)},eC=function(t){var n=t.rect,r=t.offset,o=t.position;return{left:n.left,position:o,top:r,width:n.width,zIndex:1}},tC=function(t){var n=t.appendTo,r=t.children,o=t.controlElement,s=t.innerProps,a=t.menuPlacement,i=t.menuPosition,c=w.useRef(null),l=w.useRef(null),f=w.useState(Af(a)),m=tt(f,2),b=m[0],v=m[1],y=w.useMemo(function(){return{setPortalPlacement:v}},[]),p=w.useState(null),h=tt(p,2),g=h[0],C=h[1],x=w.useCallback(function(){if(o){var A=D6(o),S=i==="fixed"?0:window.pageYOffset,L=A[b]+S;(L!==(g==null?void 0:g.offset)||A.left!==(g==null?void 0:g.rect.left)||A.width!==(g==null?void 0:g.rect.width))&&C({offset:L,rect:A})}},[o,i,b,g==null?void 0:g.offset,g==null?void 0:g.rect.left,g==null?void 0:g.rect.width]);Fc(function(){x()},[x]);var I=w.useCallback(function(){typeof l.current=="function"&&(l.current(),l.current=null),o&&c.current&&(l.current=_6(o,c.current,x,{elementResize:"ResizeObserver"in window}))},[o,x]);Fc(function(){I()},[I]);var E=w.useCallback(function(A){c.current=A,I()},[I]);if(!n&&i!=="fixed"||!g)return null;var _=ae("div",ue({ref:E},He(ne(ne({},t),{},{offset:g.offset,position:i,rect:g.rect}),"menuPortal",{"menu-portal":!0}),s),r);return ae(Tf.Provider,{value:y},n?Re.createPortal(_,n):_)},nC=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},rC=function(t){var n=t.children,r=t.innerProps,o=t.isDisabled,s=t.isRtl;return ae("div",ue({},He(t,"container",{"--is-disabled":o,"--is-rtl":s}),r),n)},oC=function(t,n){var r=t.theme.spacing,o=t.isMulti,s=t.hasValue,a=t.selectProps.controlShouldRenderValue;return ne({alignItems:"center",display:o&&s&&a?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},sC=function(t){var n=t.children,r=t.innerProps,o=t.isMulti,s=t.hasValue;return ae("div",ue({},He(t,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s}),r),n)},aC=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},iC=function(t){var n=t.children,r=t.innerProps;return ae("div",ue({},He(t,"indicatorsContainer",{indicators:!0}),r),n)},Of,cC=["size"],lC=["innerProps","isRtl","size"];function uC(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var dC=process.env.NODE_ENV==="production"?{name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"}:{name:"tj5bde-Svg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;label:Svg;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4LCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7XG4gIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lLFxuICBDU1NPYmplY3RXaXRoTGFiZWwsXG4gIEdyb3VwQmFzZSxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgZ2V0U3R5bGVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEljb25zXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgU3ZnID0gKHtcbiAgc2l6ZSxcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU6IG51bWJlciB9KSA9PiAoXG4gIDxzdmdcbiAgICBoZWlnaHQ9e3NpemV9XG4gICAgd2lkdGg9e3NpemV9XG4gICAgdmlld0JveD1cIjAgMCAyMCAyMFwiXG4gICAgYXJpYS1oaWRkZW49XCJ0cnVlXCJcbiAgICBmb2N1c2FibGU9XCJmYWxzZVwiXG4gICAgY3NzPXt7XG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIGZpbGw6ICdjdXJyZW50Q29sb3InLFxuICAgICAgbGluZUhlaWdodDogMSxcbiAgICAgIHN0cm9rZTogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBzdHJva2VXaWR0aDogMCxcbiAgICB9fVxuICAgIHsuLi5wcm9wc31cbiAgLz5cbik7XG5cbmV4cG9ydCB0eXBlIENyb3NzSWNvblByb3BzID0gSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZT86IG51bWJlciB9O1xuZXhwb3J0IGNvbnN0IENyb3NzSWNvbiA9IChwcm9wczogQ3Jvc3NJY29uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTE0LjM0OCAxNC44NDljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDBsLTIuNjUxLTMuMDMwLTIuNjUxIDMuMDI5Yy0wLjQ2OSAwLjQ2OS0xLjIyOSAwLjQ2OS0xLjY5NyAwLTAuNDY5LTAuNDY5LTAuNDY5LTEuMjI5IDAtMS42OTdsMi43NTgtMy4xNS0yLjc1OS0zLjE1MmMtMC40NjktMC40NjktMC40NjktMS4yMjggMC0xLjY5N3MxLjIyOC0wLjQ2OSAxLjY5NyAwbDIuNjUyIDMuMDMxIDIuNjUxLTMuMDMxYzAuNDY5LTAuNDY5IDEuMjI4LTAuNDY5IDEuNjk3IDBzMC40NjkgMS4yMjkgMCAxLjY5N2wtMi43NTggMy4xNTIgMi43NTggMy4xNWMwLjQ2OSAwLjQ2OSAwLjQ2OSAxLjIyOSAwIDEuNjk4elwiIC8+XG4gIDwvU3ZnPlxuKTtcbmV4cG9ydCB0eXBlIERvd25DaGV2cm9uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgRG93bkNoZXZyb24gPSAocHJvcHM6IERvd25DaGV2cm9uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTQuNTE2IDcuNTQ4YzAuNDM2LTAuNDQ2IDEuMDQzLTAuNDgxIDEuNTc2IDBsMy45MDggMy43NDcgMy45MDgtMy43NDdjMC41MzMtMC40ODEgMS4xNDEtMC40NDYgMS41NzQgMCAwLjQzNiAwLjQ0NSAwLjQwOCAxLjE5NyAwIDEuNjE1LTAuNDA2IDAuNDE4LTQuNjk1IDQuNTAyLTQuNjk1IDQuNTAyLTAuMjE3IDAuMjIzLTAuNTAyIDAuMzM1LTAuNzg3IDAuMzM1cy0wLjU3LTAuMTEyLTAuNzg5LTAuMzM1YzAgMC00LjI4Ny00LjA4NC00LjY5NS00LjUwMnMtMC40MzYtMS4xNyAwLTEuNjE1elwiIC8+XG4gIDwvU3ZnPlxuKTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEJ1dHRvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xufVxuXG5jb25zdCBiYXNlQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTpcbiAgICB8IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbiAgICB8IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JDb250YWluZXInLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICAgICc6aG92ZXInOiB7XG4gICAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsODAgOiBjb2xvcnMubmV1dHJhbDQwLFxuICAgICAgICB9LFxuICAgICAgfSksXG59KTtcblxuZXhwb3J0IGNvbnN0IGRyb3Bkb3duSW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBEcm9wZG93bkluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2Ryb3Bkb3duSW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdkcm9wZG93bi1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPERvd25DaGV2cm9uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuZXhwb3J0IGludGVyZmFjZSBDbGVhckluZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFRoZSBjaGlsZHJlbiB0byBiZSByZW5kZXJlZCBpbnNpZGUgdGhlIGluZGljYXRvci4gKi9cbiAgY2hpbGRyZW4/OiBSZWFjdE5vZGU7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbn1cblxuZXhwb3J0IGNvbnN0IGNsZWFySW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBDbGVhckluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2NsZWFySW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdjbGVhci1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPENyb3NzSWNvbiAvPn1cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG5cbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuLy8gU2VwYXJhdG9yXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuZXhwb3J0IGludGVyZmFjZSBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaW5uZXJQcm9wcz86IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3BhbiddO1xufVxuXG5leHBvcnQgY29uc3QgaW5kaWNhdG9yU2VwYXJhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNEaXNhYmxlZCxcbiAgICB0aGVtZToge1xuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgICAgY29sb3JzLFxuICAgIH0sXG4gIH06IEluZGljYXRvclNlcGFyYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+LFxuICB1bnN0eWxlZDogYm9vbGVhblxuKTogQ1NTT2JqZWN0V2l0aExhYmVsID0+ICh7XG4gIGxhYmVsOiAnaW5kaWNhdG9yU2VwYXJhdG9yJyxcbiAgYWxpZ25TZWxmOiAnc3RyZXRjaCcsXG4gIHdpZHRoOiAxLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGJhY2tncm91bmRDb2xvcjogaXNEaXNhYmxlZCA/IGNvbG9ycy5uZXV0cmFsMTAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBtYXJnaW5Cb3R0b206IGJhc2VVbml0ICogMixcbiAgICAgICAgbWFyZ2luVG9wOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU2VwYXJhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxzcGFuXG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnaW5kaWNhdG9yU2VwYXJhdG9yJywge1xuICAgICAgICAnaW5kaWNhdG9yLXNlcGFyYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAvPlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBMb2FkaW5nXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgbG9hZGluZ0RvdEFuaW1hdGlvbnMgPSBrZXlmcmFtZXNgXG4gIDAlLCA4MCUsIDEwMCUgeyBvcGFjaXR5OiAwOyB9XG4gIDQwJSB7IG9wYWNpdHk6IDE7IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBsb2FkaW5nSW5kaWNhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHNpemUsXG4gICAgdGhlbWU6IHtcbiAgICAgIGNvbG9ycyxcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICB9LFxuICB9OiBMb2FkaW5nSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdsb2FkaW5nSW5kaWNhdG9yJyxcbiAgZGlzcGxheTogJ2ZsZXgnLFxuICB0cmFuc2l0aW9uOiAnY29sb3IgMTUwbXMnLFxuICBhbGlnblNlbGY6ICdjZW50ZXInLFxuICBmb250U2l6ZTogc2l6ZSxcbiAgbGluZUhlaWdodDogMSxcbiAgbWFyZ2luUmlnaHQ6IHNpemUsXG4gIHRleHRBbGlnbjogJ2NlbnRlcicsXG4gIHZlcnRpY2FsQWxpZ246ICdtaWRkbGUnLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGNvbG9yOiBpc0ZvY3VzZWQgPyBjb2xvcnMubmV1dHJhbDYwIDogY29sb3JzLm5ldXRyYWwyMCxcbiAgICAgICAgcGFkZGluZzogYmFzZVVuaXQgKiAyLFxuICAgICAgfSksXG59KTtcblxuaW50ZXJmYWNlIExvYWRpbmdEb3RQcm9wcyB7XG4gIGRlbGF5OiBudW1iZXI7XG4gIG9mZnNldDogYm9vbGVhbjtcbn1cbmNvbnN0IExvYWRpbmdEb3QgPSAoeyBkZWxheSwgb2Zmc2V0IH06IExvYWRpbmdEb3RQcm9wcykgPT4gKFxuICA8c3BhblxuICAgIGNzcz17e1xuICAgICAgYW5pbWF0aW9uOiBgJHtsb2FkaW5nRG90QW5pbWF0aW9uc30gMXMgZWFzZS1pbi1vdXQgJHtkZWxheX1tcyBpbmZpbml0ZTtgLFxuICAgICAgYmFja2dyb3VuZENvbG9yOiAnY3VycmVudENvbG9yJyxcbiAgICAgIGJvcmRlclJhZGl1czogJzFlbScsXG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIG1hcmdpbkxlZnQ6IG9mZnNldCA/ICcxZW0nIDogdW5kZWZpbmVkLFxuICAgICAgaGVpZ2h0OiAnMWVtJyxcbiAgICAgIHZlcnRpY2FsQWxpZ246ICd0b3AnLFxuICAgICAgd2lkdGg6ICcxZW0nLFxuICAgIH19XG4gIC8+XG4pO1xuXG5leHBvcnQgaW50ZXJmYWNlIExvYWRpbmdJbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgLyoqIFNldCBzaXplIG9mIHRoZSBjb250YWluZXIuICovXG4gIHNpemU6IG51bWJlcjtcbn1cbmV4cG9ydCBjb25zdCBMb2FkaW5nSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KHtcbiAgaW5uZXJQcm9wcyxcbiAgaXNSdGwsXG4gIHNpemUgPSA0LFxuICAuLi5yZXN0UHJvcHNcbn06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPikgPT4ge1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKFxuICAgICAgICB7IC4uLnJlc3RQcm9wcywgaW5uZXJQcm9wcywgaXNSdGwsIHNpemUgfSxcbiAgICAgICAgJ2xvYWRpbmdJbmRpY2F0b3InLFxuICAgICAgICB7XG4gICAgICAgICAgaW5kaWNhdG9yOiB0cnVlLFxuICAgICAgICAgICdsb2FkaW5nLWluZGljYXRvcic6IHRydWUsXG4gICAgICAgIH1cbiAgICAgICl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MH0gb2Zmc2V0PXtpc1J0bH0gLz5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXsxNjB9IG9mZnNldCAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezMyMH0gb2Zmc2V0PXshaXNSdGx9IC8+XG4gICAgPC9kaXY+XG4gICk7XG59O1xuIl19 */",toString:uC},Ff=function(t){var n=t.size,r=Jt(t,cC);return ae("svg",ue({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:dC},r))},kc=function(t){return ae(Ff,ue({size:20},t),ae("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},kf=function(t){return ae(Ff,ue({size:20},t),ae("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Df=function(t,n){var r=t.isFocused,o=t.theme,s=o.spacing.baseUnit,a=o.colors;return ne({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?a.neutral60:a.neutral20,padding:s*2,":hover":{color:r?a.neutral80:a.neutral40}})},fC=Df,pC=function(t){var n=t.children,r=t.innerProps;return ae("div",ue({},He(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||ae(kf,null))},hC=Df,gC=function(t){var n=t.children,r=t.innerProps;return ae("div",ue({},He(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||ae(kc,null))},mC=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing.baseUnit,a=o.colors;return ne({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?a.neutral10:a.neutral20,marginBottom:s*2,marginTop:s*2})},bC=function(t){var n=t.innerProps;return ae("span",ue({},n,He(t,"indicatorSeparator",{"indicator-separator":!0})))},yC=d6(Of||(Of=f6([`
606
+ */var rf;function G9(){return rf||(rf=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function x(z){return typeof z=="string"||typeof z=="function"||z===r||z===l||z===s||z===o||z===m||z===b||typeof z=="object"&&z!==null&&(z.$$typeof===y||z.$$typeof===v||z.$$typeof===a||z.$$typeof===i||z.$$typeof===f||z.$$typeof===h||z.$$typeof===g||z.$$typeof===C||z.$$typeof===p)}function I(z){if(typeof z=="object"&&z!==null){var Ve=z.$$typeof;switch(Ve){case t:var Ne=z.type;switch(Ne){case c:case l:case r:case s:case o:case m:return Ne;default:var Ue=Ne&&Ne.$$typeof;switch(Ue){case i:case f:case y:case v:case a:return Ue;default:return Ve}}case n:return Ve}}}var E=c,_=l,A=i,S=a,L=t,k=f,D=r,N=y,M=v,V=n,J=s,$=o,H=m,X=!1;function q(z){return X||(X=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),se(z)||I(z)===c}function se(z){return I(z)===l}function de(z){return I(z)===i}function B(z){return I(z)===a}function P(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function W(z){return I(z)===f}function G(z){return I(z)===r}function Y(z){return I(z)===y}function oe(z){return I(z)===v}function re(z){return I(z)===n}function j(z){return I(z)===s}function te(z){return I(z)===o}function Ee(z){return I(z)===m}Fe.AsyncMode=E,Fe.ConcurrentMode=_,Fe.ContextConsumer=A,Fe.ContextProvider=S,Fe.Element=L,Fe.ForwardRef=k,Fe.Fragment=D,Fe.Lazy=N,Fe.Memo=M,Fe.Portal=V,Fe.Profiler=J,Fe.StrictMode=$,Fe.Suspense=H,Fe.isAsyncMode=q,Fe.isConcurrentMode=se,Fe.isContextConsumer=de,Fe.isContextProvider=B,Fe.isElement=P,Fe.isForwardRef=W,Fe.isFragment=G,Fe.isLazy=Y,Fe.isMemo=oe,Fe.isPortal=re,Fe.isProfiler=j,Fe.isStrictMode=te,Fe.isSuspense=Ee,Fe.isValidElementType=x,Fe.typeOf=I}()),Fe}process.env.NODE_ENV==="production"?Ic.exports=V9():Ic.exports=G9();var H9=Ic.exports,of=H9,W9={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Z9={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},sf={};sf[of.ForwardRef]=W9,sf[of.Memo]=Z9;var X9=!0;function z9(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(r+=o+" ")}),r}var af=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||X9===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},Y9=function(t,n,r){af(t,n,r);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var s=n;do t.insert(n===s?"."+o:"",s,t.sheet,!0),s=s.next;while(s!==void 0)}};function J9(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var q9={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,scale: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},$9=!1,Q9=/[A-Z]|^ms/g,U9=/_EMO_([^_]+?)_([^]*?)_EMO_/g,cf=function(t){return t.charCodeAt(1)===45},lf=function(t){return t!=null&&typeof t!="boolean"},wc=F9(function(e){return cf(e)?e:e.replace(Q9,"-$&").toLowerCase()}),uf=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(U9,function(r,o,s){return cn={name:o,styles:s,next:cn},o})}return q9[t]!==1&&!cf(t)&&typeof n=="number"&&n!==0?n+"px":n},K9="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Go(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return cn={name:o.name,styles:o.styles,next:cn},o.name;var s=n;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)cn={name:a.name,styles:a.styles,next:cn},a=a.next;var i=s.styles+";";return i}return e6(e,t,n)}case"function":{if(e!==void 0){var c=cn,l=n(e);return cn=c,Go(e,t,l)}break}}var f=n;return f}function e6(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Go(e,t,n[o])+";";else for(var s in n){var a=n[s];if(typeof a!="object"){var i=a;lf(i)&&(r+=wc(s)+":"+uf(s,i)+";")}else{if(s==="NO_COMPONENT_SELECTOR"&&$9)throw new Error(K9);if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var c=0;c<a.length;c++)lf(a[c])&&(r+=wc(s)+":"+uf(s,a[c])+";");else{var l=Go(e,t,a);switch(s){case"animation":case"animationName":{r+=wc(s)+":"+l+";";break}default:r+=s+"{"+l+"}"}}}}return r}var df=/label:\s*([^\s;{]+)\s*(;|$)/g,cn;function ff(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,o="";cn=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,o+=Go(n,t,s);else{var a=s;o+=a[0]}for(var i=1;i<e.length;i++)if(o+=Go(n,t,e[i]),r){var c=s;o+=c[i]}df.lastIndex=0;for(var l="",f;(f=df.exec(o))!==null;)l+="-"+f[1];var m=J9(o)+l;return{name:m,styles:o,next:cn}}var t6=function(t){return t()},n6=T.useInsertionEffect?T.useInsertionEffect:!1,r6=n6||t6,o6=!1,pf=T.createContext(typeof HTMLElement<"u"?B9({key:"css"}):null);pf.Provider;var s6=function(t){return w.forwardRef(function(n,r){var o=w.useContext(pf);return t(n,o,r)})},a6=T.createContext({}),_c={}.hasOwnProperty,Sc="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",i6=function(t,n){var r={};for(var o in n)_c.call(n,o)&&(r[o]=n[o]);return r[Sc]=t,r},c6=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return af(n,r,o),r6(function(){return Y9(n,r,o)}),null},l6=s6(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[Sc],s=[r],a="";typeof e.className=="string"?a=z9(t.registered,s,e.className):e.className!=null&&(a=e.className+" ");var i=ff(s,void 0,T.useContext(a6));a+=t.key+"-"+i.name;var c={};for(var l in e)_c.call(e,l)&&l!=="css"&&l!==Sc&&!o6&&(c[l]=e[l]);return c.className=a,n&&(c.ref=n),T.createElement(T.Fragment,null,T.createElement(c6,{cache:t,serialized:i,isStringTag:typeof o=="string"}),T.createElement(o,c))}),u6=l6,ae=function(t,n){var r=arguments;if(n==null||!_c.call(n,"css"))return T.createElement.apply(void 0,r);var o=r.length,s=new Array(o);s[0]=u6,s[1]=i6(t,n);for(var a=2;a<o;a++)s[a]=r[a];return T.createElement.apply(null,s)};function Ac(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ff(t)}var d6=function(){var t=Ac.apply(void 0,arguments),n="animation-"+t.name;return{name:n,styles:"@keyframes "+n+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};function f6(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const p6=Math.min,h6=Math.max,oa=Math.round,sa=Math.floor,aa=e=>({x:e,y:e});function g6(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function ia(){return typeof window<"u"}function hf(e){return mf(e)?(e.nodeName||"").toLowerCase():"#document"}function vn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function gf(e){var t;return(t=(mf(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function mf(e){return ia()?e instanceof Node||e instanceof vn(e).Node:!1}function m6(e){return ia()?e instanceof Element||e instanceof vn(e).Element:!1}function Tc(e){return ia()?e instanceof HTMLElement||e instanceof vn(e).HTMLElement:!1}function bf(e){return!ia()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof vn(e).ShadowRoot}function yf(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Lc(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function b6(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function y6(e){return["html","body","#document"].includes(hf(e))}function Lc(e){return vn(e).getComputedStyle(e)}function C6(e){if(hf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||bf(e)&&e.host||gf(e);return bf(t)?t.host:t}function Cf(e){const t=C6(e);return y6(t)?e.ownerDocument?e.ownerDocument.body:e.body:Tc(t)&&yf(t)?t:Cf(t)}function ca(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Cf(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=vn(o);if(s){const i=Oc(a);return t.concat(a,a.visualViewport||[],yf(o)?o:[],i&&n?ca(i):[])}return t.concat(o,ca(o,[],n))}function Oc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function x6(e){const t=Lc(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Tc(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,i=oa(n)!==s||oa(r)!==a;return i&&(n=s,r=a),{width:n,height:r,$:i}}function Fc(e){return m6(e)?e:e.contextElement}function xf(e){const t=Fc(e);if(!Tc(t))return aa(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=x6(t);let a=(s?oa(n.width):n.width)/r,i=(s?oa(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const v6=aa(0);function E6(e){const t=vn(e);return!b6()||!t.visualViewport?v6:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function I6(e,t,n){return!1}function vf(e,t,n,r){t===void 0&&(t=!1);const o=e.getBoundingClientRect(),s=Fc(e);let a=aa(1);t&&(a=xf(e));const i=I6()?E6(s):aa(0);let c=(o.left+i.x)/a.x,l=(o.top+i.y)/a.y,f=o.width/a.x,m=o.height/a.y;if(s){const b=vn(s),v=r;let y=b,p=Oc(y);for(;p&&r&&v!==y;){const h=xf(p),g=p.getBoundingClientRect(),C=Lc(p),x=g.left+(p.clientLeft+parseFloat(C.paddingLeft))*h.x,I=g.top+(p.clientTop+parseFloat(C.paddingTop))*h.y;c*=h.x,l*=h.y,f*=h.x,m*=h.y,c+=x,l+=I,y=vn(p),p=Oc(y)}}return g6({width:f,height:m,x:c,y:l})}function w6(e,t){let n=null,r;const o=gf(e);function s(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function a(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),s();const{left:l,top:f,width:m,height:b}=e.getBoundingClientRect();if(i||t(),!m||!b)return;const v=sa(f),y=sa(o.clientWidth-(l+m)),p=sa(o.clientHeight-(f+b)),h=sa(l),C={rootMargin:-v+"px "+-y+"px "+-p+"px "+-h+"px",threshold:h6(0,p6(1,c))||1};let x=!0;function I(E){const _=E[0].intersectionRatio;if(_!==c){if(!x)return a();_?a(!1,_):r=setTimeout(()=>{a(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(I,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(I,C)}n.observe(e)}return a(!0),s}function _6(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=Fc(e),f=o||s?[...l?ca(l):[],...ca(t)]:[];f.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const m=l&&i?w6(l,n):null;let b=-1,v=null;a&&(v=new ResizeObserver(g=>{let[C]=g;C&&C.target===l&&v&&(v.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var x;(x=v)==null||x.observe(t)})),n()}),l&&!c&&v.observe(l),v.observe(t));let y,p=c?vf(e):null;c&&h();function h(){const g=vf(e);p&&(g.x!==p.x||g.y!==p.y||g.width!==p.width||g.height!==p.height)&&n(),p=g,y=requestAnimationFrame(h)}return n(),()=>{var g;f.forEach(C=>{o&&C.removeEventListener("scroll",n),s&&C.removeEventListener("resize",n)}),m==null||m(),(g=v)==null||g.disconnect(),v=null,c&&cancelAnimationFrame(y)}}var kc=w.useLayoutEffect,S6=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],la=function(){};function A6(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function T6(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];var s=[].concat(r);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&s.push("".concat(A6(e,a)));return s.filter(function(i){return i}).map(function(i){return String(i).trim()}).join(" ")}var ua=function(t){return j6(t)?t.filter(Boolean):ir(t)==="object"&&t!==null?[t]:[]},Ef=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=Jt(t,S6);return ne({},n)},He=function(t,n,r){var o=t.cx,s=t.getStyles,a=t.getClassNames,i=t.className;return{css:s(n,t),className:o(r??{},a(n,t),i)}};function L6(e,t,n){if(n){var r=n(e,t);if(typeof r=="string")return r}return e}function da(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function O6(e){return da(e)?window.innerHeight:e.clientHeight}function If(e){return da(e)?window.pageYOffset:e.scrollTop}function fa(e,t){if(da(e)){window.scrollTo(0,t);return}e.scrollTop=t}function F6(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}function k6(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function pa(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:la,o=If(e),s=t-o,a=10,i=0;function c(){i+=a;var l=k6(i,o,s,n);fa(e,l),i<n?window.requestAnimationFrame(c):r(e)}c()}function wf(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?fa(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&fa(e,Math.max(t.offsetTop-o,0))}function D6(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function _f(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function N6(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var Sf=!1,R6={get passive(){return Sf=!0}},ha=typeof window<"u"?window:{};ha.addEventListener&&ha.removeEventListener&&(ha.addEventListener("p",la,R6),ha.removeEventListener("p",la,!1));var M6=Sf;function P6(e){return e!=null}function j6(e){return Array.isArray(e)}function Ho(e,t,n){return e?t:n}function tA(e){return e}function nA(e){return e}var B6=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var s=Object.entries(t).filter(function(a){var i=tt(a,1),c=i[0];return!r.includes(c)});return s.reduce(function(a,i){var c=tt(i,2),l=c[0],f=c[1];return a[l]=f,a},{})},V6=["children","innerProps"],G6=["children","innerProps"];function H6(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,s=e.shouldScroll,a=e.isFixedPosition,i=e.controlHeight,c=F6(n),l={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return l;var f=c.getBoundingClientRect(),m=f.height,b=n.getBoundingClientRect(),v=b.bottom,y=b.height,p=b.top,h=n.offsetParent.getBoundingClientRect(),g=h.top,C=a?window.innerHeight:O6(c),x=If(c),I=parseInt(getComputedStyle(n).marginBottom,10),E=parseInt(getComputedStyle(n).marginTop,10),_=g-E,A=C-p,S=_+x,L=m-x-p,k=v-C+x+I,D=x+p-E,N=160;switch(o){case"auto":case"bottom":if(A>=y)return{placement:"bottom",maxHeight:t};if(L>=y&&!a)return s&&pa(c,k,N),{placement:"bottom",maxHeight:t};if(!a&&L>=r||a&&A>=r){s&&pa(c,k,N);var M=a?A-I:L-I;return{placement:"bottom",maxHeight:M}}if(o==="auto"||a){var V=t,J=a?_:S;return J>=r&&(V=Math.min(J-I-i,t)),{placement:"top",maxHeight:V}}if(o==="bottom")return s&&fa(c,k),{placement:"bottom",maxHeight:t};break;case"top":if(_>=y)return{placement:"top",maxHeight:t};if(S>=y&&!a)return s&&pa(c,D,N),{placement:"top",maxHeight:t};if(!a&&S>=r||a&&_>=r){var $=t;return(!a&&S>=r||a&&_>=r)&&($=a?_-E:S-E),s&&pa(c,D,N),{placement:"top",maxHeight:$}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return l}function W6(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var Af=function(t){return t==="auto"?"bottom":t},Z6=function(t,n){var r,o=t.placement,s=t.theme,a=s.borderRadius,i=s.spacing,c=s.colors;return ne((r={label:"menu"},Hr(r,W6(o),"100%"),Hr(r,"position","absolute"),Hr(r,"width","100%"),Hr(r,"zIndex",1),r),n?{}:{backgroundColor:c.neutral0,borderRadius:a,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:i.menuGutter,marginTop:i.menuGutter})},Tf=w.createContext(null),X6=function(t){var n=t.children,r=t.minMenuHeight,o=t.maxMenuHeight,s=t.menuPlacement,a=t.menuPosition,i=t.menuShouldScrollIntoView,c=t.theme,l=w.useContext(Tf)||{},f=l.setPortalPlacement,m=w.useRef(null),b=w.useState(o),v=tt(b,2),y=v[0],p=v[1],h=w.useState(null),g=tt(h,2),C=g[0],x=g[1],I=c.spacing.controlHeight;return kc(function(){var E=m.current;if(E){var _=a==="fixed",A=i&&!_,S=H6({maxHeight:o,menuEl:E,minHeight:r,placement:s,shouldScroll:A,isFixedPosition:_,controlHeight:I});p(S.maxHeight),x(S.placement),f==null||f(S.placement)}},[o,s,a,i,r,f,I]),n({ref:m,placerProps:ne(ne({},t),{},{placement:C||Af(s),maxHeight:y})})},z6=function(t){var n=t.children,r=t.innerRef,o=t.innerProps;return ae("div",ue({},He(t,"menu",{menu:!0}),{ref:r},o),n)},Y6=z6,J6=function(t,n){var r=t.maxHeight,o=t.theme.spacing.baseUnit;return ne({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:o,paddingTop:o})},q6=function(t){var n=t.children,r=t.innerProps,o=t.innerRef,s=t.isMulti;return ae("div",ue({},He(t,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:o},r),n)},Lf=function(t,n){var r=t.theme,o=r.spacing.baseUnit,s=r.colors;return ne({textAlign:"center"},n?{}:{color:s.neutral40,padding:"".concat(o*2,"px ").concat(o*3,"px")})},$6=Lf,Q6=Lf,U6=function(t){var n=t.children,r=n===void 0?"No options":n,o=t.innerProps,s=Jt(t,V6);return ae("div",ue({},He(ne(ne({},s),{},{children:r,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),r)},K6=function(t){var n=t.children,r=n===void 0?"Loading...":n,o=t.innerProps,s=Jt(t,G6);return ae("div",ue({},He(ne(ne({},s),{},{children:r,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),r)},eC=function(t){var n=t.rect,r=t.offset,o=t.position;return{left:n.left,position:o,top:r,width:n.width,zIndex:1}},tC=function(t){var n=t.appendTo,r=t.children,o=t.controlElement,s=t.innerProps,a=t.menuPlacement,i=t.menuPosition,c=w.useRef(null),l=w.useRef(null),f=w.useState(Af(a)),m=tt(f,2),b=m[0],v=m[1],y=w.useMemo(function(){return{setPortalPlacement:v}},[]),p=w.useState(null),h=tt(p,2),g=h[0],C=h[1],x=w.useCallback(function(){if(o){var A=D6(o),S=i==="fixed"?0:window.pageYOffset,L=A[b]+S;(L!==(g==null?void 0:g.offset)||A.left!==(g==null?void 0:g.rect.left)||A.width!==(g==null?void 0:g.rect.width))&&C({offset:L,rect:A})}},[o,i,b,g==null?void 0:g.offset,g==null?void 0:g.rect.left,g==null?void 0:g.rect.width]);kc(function(){x()},[x]);var I=w.useCallback(function(){typeof l.current=="function"&&(l.current(),l.current=null),o&&c.current&&(l.current=_6(o,c.current,x,{elementResize:"ResizeObserver"in window}))},[o,x]);kc(function(){I()},[I]);var E=w.useCallback(function(A){c.current=A,I()},[I]);if(!n&&i!=="fixed"||!g)return null;var _=ae("div",ue({ref:E},He(ne(ne({},t),{},{offset:g.offset,position:i,rect:g.rect}),"menuPortal",{"menu-portal":!0}),s),r);return ae(Tf.Provider,{value:y},n?Re.createPortal(_,n):_)},nC=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},rC=function(t){var n=t.children,r=t.innerProps,o=t.isDisabled,s=t.isRtl;return ae("div",ue({},He(t,"container",{"--is-disabled":o,"--is-rtl":s}),r),n)},oC=function(t,n){var r=t.theme.spacing,o=t.isMulti,s=t.hasValue,a=t.selectProps.controlShouldRenderValue;return ne({alignItems:"center",display:o&&s&&a?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},sC=function(t){var n=t.children,r=t.innerProps,o=t.isMulti,s=t.hasValue;return ae("div",ue({},He(t,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s}),r),n)},aC=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},iC=function(t){var n=t.children,r=t.innerProps;return ae("div",ue({},He(t,"indicatorsContainer",{indicators:!0}),r),n)},Of,cC=["size"],lC=["innerProps","isRtl","size"];function uC(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var dC=process.env.NODE_ENV==="production"?{name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"}:{name:"tj5bde-Svg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;label:Svg;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4LCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7XG4gIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lLFxuICBDU1NPYmplY3RXaXRoTGFiZWwsXG4gIEdyb3VwQmFzZSxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgZ2V0U3R5bGVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEljb25zXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgU3ZnID0gKHtcbiAgc2l6ZSxcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU6IG51bWJlciB9KSA9PiAoXG4gIDxzdmdcbiAgICBoZWlnaHQ9e3NpemV9XG4gICAgd2lkdGg9e3NpemV9XG4gICAgdmlld0JveD1cIjAgMCAyMCAyMFwiXG4gICAgYXJpYS1oaWRkZW49XCJ0cnVlXCJcbiAgICBmb2N1c2FibGU9XCJmYWxzZVwiXG4gICAgY3NzPXt7XG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIGZpbGw6ICdjdXJyZW50Q29sb3InLFxuICAgICAgbGluZUhlaWdodDogMSxcbiAgICAgIHN0cm9rZTogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBzdHJva2VXaWR0aDogMCxcbiAgICB9fVxuICAgIHsuLi5wcm9wc31cbiAgLz5cbik7XG5cbmV4cG9ydCB0eXBlIENyb3NzSWNvblByb3BzID0gSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZT86IG51bWJlciB9O1xuZXhwb3J0IGNvbnN0IENyb3NzSWNvbiA9IChwcm9wczogQ3Jvc3NJY29uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTE0LjM0OCAxNC44NDljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDBsLTIuNjUxLTMuMDMwLTIuNjUxIDMuMDI5Yy0wLjQ2OSAwLjQ2OS0xLjIyOSAwLjQ2OS0xLjY5NyAwLTAuNDY5LTAuNDY5LTAuNDY5LTEuMjI5IDAtMS42OTdsMi43NTgtMy4xNS0yLjc1OS0zLjE1MmMtMC40NjktMC40NjktMC40NjktMS4yMjggMC0xLjY5N3MxLjIyOC0wLjQ2OSAxLjY5NyAwbDIuNjUyIDMuMDMxIDIuNjUxLTMuMDMxYzAuNDY5LTAuNDY5IDEuMjI4LTAuNDY5IDEuNjk3IDBzMC40NjkgMS4yMjkgMCAxLjY5N2wtMi43NTggMy4xNTIgMi43NTggMy4xNWMwLjQ2OSAwLjQ2OSAwLjQ2OSAxLjIyOSAwIDEuNjk4elwiIC8+XG4gIDwvU3ZnPlxuKTtcbmV4cG9ydCB0eXBlIERvd25DaGV2cm9uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgRG93bkNoZXZyb24gPSAocHJvcHM6IERvd25DaGV2cm9uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTQuNTE2IDcuNTQ4YzAuNDM2LTAuNDQ2IDEuMDQzLTAuNDgxIDEuNTc2IDBsMy45MDggMy43NDcgMy45MDgtMy43NDdjMC41MzMtMC40ODEgMS4xNDEtMC40NDYgMS41NzQgMCAwLjQzNiAwLjQ0NSAwLjQwOCAxLjE5NyAwIDEuNjE1LTAuNDA2IDAuNDE4LTQuNjk1IDQuNTAyLTQuNjk1IDQuNTAyLTAuMjE3IDAuMjIzLTAuNTAyIDAuMzM1LTAuNzg3IDAuMzM1cy0wLjU3LTAuMTEyLTAuNzg5LTAuMzM1YzAgMC00LjI4Ny00LjA4NC00LjY5NS00LjUwMnMtMC40MzYtMS4xNyAwLTEuNjE1elwiIC8+XG4gIDwvU3ZnPlxuKTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEJ1dHRvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xufVxuXG5jb25zdCBiYXNlQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTpcbiAgICB8IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbiAgICB8IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JDb250YWluZXInLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICAgICc6aG92ZXInOiB7XG4gICAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsODAgOiBjb2xvcnMubmV1dHJhbDQwLFxuICAgICAgICB9LFxuICAgICAgfSksXG59KTtcblxuZXhwb3J0IGNvbnN0IGRyb3Bkb3duSW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBEcm9wZG93bkluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2Ryb3Bkb3duSW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdkcm9wZG93bi1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPERvd25DaGV2cm9uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuZXhwb3J0IGludGVyZmFjZSBDbGVhckluZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFRoZSBjaGlsZHJlbiB0byBiZSByZW5kZXJlZCBpbnNpZGUgdGhlIGluZGljYXRvci4gKi9cbiAgY2hpbGRyZW4/OiBSZWFjdE5vZGU7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbn1cblxuZXhwb3J0IGNvbnN0IGNsZWFySW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBDbGVhckluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2NsZWFySW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdjbGVhci1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPENyb3NzSWNvbiAvPn1cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG5cbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuLy8gU2VwYXJhdG9yXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuZXhwb3J0IGludGVyZmFjZSBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaW5uZXJQcm9wcz86IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3BhbiddO1xufVxuXG5leHBvcnQgY29uc3QgaW5kaWNhdG9yU2VwYXJhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNEaXNhYmxlZCxcbiAgICB0aGVtZToge1xuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgICAgY29sb3JzLFxuICAgIH0sXG4gIH06IEluZGljYXRvclNlcGFyYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+LFxuICB1bnN0eWxlZDogYm9vbGVhblxuKTogQ1NTT2JqZWN0V2l0aExhYmVsID0+ICh7XG4gIGxhYmVsOiAnaW5kaWNhdG9yU2VwYXJhdG9yJyxcbiAgYWxpZ25TZWxmOiAnc3RyZXRjaCcsXG4gIHdpZHRoOiAxLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGJhY2tncm91bmRDb2xvcjogaXNEaXNhYmxlZCA/IGNvbG9ycy5uZXV0cmFsMTAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBtYXJnaW5Cb3R0b206IGJhc2VVbml0ICogMixcbiAgICAgICAgbWFyZ2luVG9wOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU2VwYXJhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxzcGFuXG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnaW5kaWNhdG9yU2VwYXJhdG9yJywge1xuICAgICAgICAnaW5kaWNhdG9yLXNlcGFyYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAvPlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBMb2FkaW5nXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgbG9hZGluZ0RvdEFuaW1hdGlvbnMgPSBrZXlmcmFtZXNgXG4gIDAlLCA4MCUsIDEwMCUgeyBvcGFjaXR5OiAwOyB9XG4gIDQwJSB7IG9wYWNpdHk6IDE7IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBsb2FkaW5nSW5kaWNhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHNpemUsXG4gICAgdGhlbWU6IHtcbiAgICAgIGNvbG9ycyxcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICB9LFxuICB9OiBMb2FkaW5nSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdsb2FkaW5nSW5kaWNhdG9yJyxcbiAgZGlzcGxheTogJ2ZsZXgnLFxuICB0cmFuc2l0aW9uOiAnY29sb3IgMTUwbXMnLFxuICBhbGlnblNlbGY6ICdjZW50ZXInLFxuICBmb250U2l6ZTogc2l6ZSxcbiAgbGluZUhlaWdodDogMSxcbiAgbWFyZ2luUmlnaHQ6IHNpemUsXG4gIHRleHRBbGlnbjogJ2NlbnRlcicsXG4gIHZlcnRpY2FsQWxpZ246ICdtaWRkbGUnLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGNvbG9yOiBpc0ZvY3VzZWQgPyBjb2xvcnMubmV1dHJhbDYwIDogY29sb3JzLm5ldXRyYWwyMCxcbiAgICAgICAgcGFkZGluZzogYmFzZVVuaXQgKiAyLFxuICAgICAgfSksXG59KTtcblxuaW50ZXJmYWNlIExvYWRpbmdEb3RQcm9wcyB7XG4gIGRlbGF5OiBudW1iZXI7XG4gIG9mZnNldDogYm9vbGVhbjtcbn1cbmNvbnN0IExvYWRpbmdEb3QgPSAoeyBkZWxheSwgb2Zmc2V0IH06IExvYWRpbmdEb3RQcm9wcykgPT4gKFxuICA8c3BhblxuICAgIGNzcz17e1xuICAgICAgYW5pbWF0aW9uOiBgJHtsb2FkaW5nRG90QW5pbWF0aW9uc30gMXMgZWFzZS1pbi1vdXQgJHtkZWxheX1tcyBpbmZpbml0ZTtgLFxuICAgICAgYmFja2dyb3VuZENvbG9yOiAnY3VycmVudENvbG9yJyxcbiAgICAgIGJvcmRlclJhZGl1czogJzFlbScsXG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIG1hcmdpbkxlZnQ6IG9mZnNldCA/ICcxZW0nIDogdW5kZWZpbmVkLFxuICAgICAgaGVpZ2h0OiAnMWVtJyxcbiAgICAgIHZlcnRpY2FsQWxpZ246ICd0b3AnLFxuICAgICAgd2lkdGg6ICcxZW0nLFxuICAgIH19XG4gIC8+XG4pO1xuXG5leHBvcnQgaW50ZXJmYWNlIExvYWRpbmdJbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgLyoqIFNldCBzaXplIG9mIHRoZSBjb250YWluZXIuICovXG4gIHNpemU6IG51bWJlcjtcbn1cbmV4cG9ydCBjb25zdCBMb2FkaW5nSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KHtcbiAgaW5uZXJQcm9wcyxcbiAgaXNSdGwsXG4gIHNpemUgPSA0LFxuICAuLi5yZXN0UHJvcHNcbn06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPikgPT4ge1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKFxuICAgICAgICB7IC4uLnJlc3RQcm9wcywgaW5uZXJQcm9wcywgaXNSdGwsIHNpemUgfSxcbiAgICAgICAgJ2xvYWRpbmdJbmRpY2F0b3InLFxuICAgICAgICB7XG4gICAgICAgICAgaW5kaWNhdG9yOiB0cnVlLFxuICAgICAgICAgICdsb2FkaW5nLWluZGljYXRvcic6IHRydWUsXG4gICAgICAgIH1cbiAgICAgICl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MH0gb2Zmc2V0PXtpc1J0bH0gLz5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXsxNjB9IG9mZnNldCAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezMyMH0gb2Zmc2V0PXshaXNSdGx9IC8+XG4gICAgPC9kaXY+XG4gICk7XG59O1xuIl19 */",toString:uC},Ff=function(t){var n=t.size,r=Jt(t,cC);return ae("svg",ue({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:dC},r))},Dc=function(t){return ae(Ff,ue({size:20},t),ae("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},kf=function(t){return ae(Ff,ue({size:20},t),ae("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Df=function(t,n){var r=t.isFocused,o=t.theme,s=o.spacing.baseUnit,a=o.colors;return ne({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?a.neutral60:a.neutral20,padding:s*2,":hover":{color:r?a.neutral80:a.neutral40}})},fC=Df,pC=function(t){var n=t.children,r=t.innerProps;return ae("div",ue({},He(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||ae(kf,null))},hC=Df,gC=function(t){var n=t.children,r=t.innerProps;return ae("div",ue({},He(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||ae(Dc,null))},mC=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing.baseUnit,a=o.colors;return ne({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?a.neutral10:a.neutral20,marginBottom:s*2,marginTop:s*2})},bC=function(t){var n=t.innerProps;return ae("span",ue({},n,He(t,"indicatorSeparator",{"indicator-separator":!0})))},yC=d6(Of||(Of=f6([`
612
607
  0%, 80%, 100% { opacity: 0; }
613
608
  40% { opacity: 1; }
614
- `]))),CC=function(t,n){var r=t.isFocused,o=t.size,s=t.theme,a=s.colors,i=s.spacing.baseUnit;return ne({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?a.neutral60:a.neutral20,padding:i*2})},Dc=function(t){var n=t.delay,r=t.offset;return ae("span",{css:Sc({animation:"".concat(yC," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},process.env.NODE_ENV==="production"?"":";label:LoadingDot;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4LCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7XG4gIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lLFxuICBDU1NPYmplY3RXaXRoTGFiZWwsXG4gIEdyb3VwQmFzZSxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgZ2V0U3R5bGVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEljb25zXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgU3ZnID0gKHtcbiAgc2l6ZSxcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU6IG51bWJlciB9KSA9PiAoXG4gIDxzdmdcbiAgICBoZWlnaHQ9e3NpemV9XG4gICAgd2lkdGg9e3NpemV9XG4gICAgdmlld0JveD1cIjAgMCAyMCAyMFwiXG4gICAgYXJpYS1oaWRkZW49XCJ0cnVlXCJcbiAgICBmb2N1c2FibGU9XCJmYWxzZVwiXG4gICAgY3NzPXt7XG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIGZpbGw6ICdjdXJyZW50Q29sb3InLFxuICAgICAgbGluZUhlaWdodDogMSxcbiAgICAgIHN0cm9rZTogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBzdHJva2VXaWR0aDogMCxcbiAgICB9fVxuICAgIHsuLi5wcm9wc31cbiAgLz5cbik7XG5cbmV4cG9ydCB0eXBlIENyb3NzSWNvblByb3BzID0gSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZT86IG51bWJlciB9O1xuZXhwb3J0IGNvbnN0IENyb3NzSWNvbiA9IChwcm9wczogQ3Jvc3NJY29uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTE0LjM0OCAxNC44NDljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDBsLTIuNjUxLTMuMDMwLTIuNjUxIDMuMDI5Yy0wLjQ2OSAwLjQ2OS0xLjIyOSAwLjQ2OS0xLjY5NyAwLTAuNDY5LTAuNDY5LTAuNDY5LTEuMjI5IDAtMS42OTdsMi43NTgtMy4xNS0yLjc1OS0zLjE1MmMtMC40NjktMC40NjktMC40NjktMS4yMjggMC0xLjY5N3MxLjIyOC0wLjQ2OSAxLjY5NyAwbDIuNjUyIDMuMDMxIDIuNjUxLTMuMDMxYzAuNDY5LTAuNDY5IDEuMjI4LTAuNDY5IDEuNjk3IDBzMC40NjkgMS4yMjkgMCAxLjY5N2wtMi43NTggMy4xNTIgMi43NTggMy4xNWMwLjQ2OSAwLjQ2OSAwLjQ2OSAxLjIyOSAwIDEuNjk4elwiIC8+XG4gIDwvU3ZnPlxuKTtcbmV4cG9ydCB0eXBlIERvd25DaGV2cm9uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgRG93bkNoZXZyb24gPSAocHJvcHM6IERvd25DaGV2cm9uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTQuNTE2IDcuNTQ4YzAuNDM2LTAuNDQ2IDEuMDQzLTAuNDgxIDEuNTc2IDBsMy45MDggMy43NDcgMy45MDgtMy43NDdjMC41MzMtMC40ODEgMS4xNDEtMC40NDYgMS41NzQgMCAwLjQzNiAwLjQ0NSAwLjQwOCAxLjE5NyAwIDEuNjE1LTAuNDA2IDAuNDE4LTQuNjk1IDQuNTAyLTQuNjk1IDQuNTAyLTAuMjE3IDAuMjIzLTAuNTAyIDAuMzM1LTAuNzg3IDAuMzM1cy0wLjU3LTAuMTEyLTAuNzg5LTAuMzM1YzAgMC00LjI4Ny00LjA4NC00LjY5NS00LjUwMnMtMC40MzYtMS4xNyAwLTEuNjE1elwiIC8+XG4gIDwvU3ZnPlxuKTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEJ1dHRvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xufVxuXG5jb25zdCBiYXNlQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTpcbiAgICB8IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbiAgICB8IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JDb250YWluZXInLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICAgICc6aG92ZXInOiB7XG4gICAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsODAgOiBjb2xvcnMubmV1dHJhbDQwLFxuICAgICAgICB9LFxuICAgICAgfSksXG59KTtcblxuZXhwb3J0IGNvbnN0IGRyb3Bkb3duSW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBEcm9wZG93bkluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2Ryb3Bkb3duSW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdkcm9wZG93bi1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPERvd25DaGV2cm9uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuZXhwb3J0IGludGVyZmFjZSBDbGVhckluZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFRoZSBjaGlsZHJlbiB0byBiZSByZW5kZXJlZCBpbnNpZGUgdGhlIGluZGljYXRvci4gKi9cbiAgY2hpbGRyZW4/OiBSZWFjdE5vZGU7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbn1cblxuZXhwb3J0IGNvbnN0IGNsZWFySW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBDbGVhckluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2NsZWFySW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdjbGVhci1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPENyb3NzSWNvbiAvPn1cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG5cbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuLy8gU2VwYXJhdG9yXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuZXhwb3J0IGludGVyZmFjZSBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaW5uZXJQcm9wcz86IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3BhbiddO1xufVxuXG5leHBvcnQgY29uc3QgaW5kaWNhdG9yU2VwYXJhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNEaXNhYmxlZCxcbiAgICB0aGVtZToge1xuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgICAgY29sb3JzLFxuICAgIH0sXG4gIH06IEluZGljYXRvclNlcGFyYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+LFxuICB1bnN0eWxlZDogYm9vbGVhblxuKTogQ1NTT2JqZWN0V2l0aExhYmVsID0+ICh7XG4gIGxhYmVsOiAnaW5kaWNhdG9yU2VwYXJhdG9yJyxcbiAgYWxpZ25TZWxmOiAnc3RyZXRjaCcsXG4gIHdpZHRoOiAxLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGJhY2tncm91bmRDb2xvcjogaXNEaXNhYmxlZCA/IGNvbG9ycy5uZXV0cmFsMTAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBtYXJnaW5Cb3R0b206IGJhc2VVbml0ICogMixcbiAgICAgICAgbWFyZ2luVG9wOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU2VwYXJhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxzcGFuXG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnaW5kaWNhdG9yU2VwYXJhdG9yJywge1xuICAgICAgICAnaW5kaWNhdG9yLXNlcGFyYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAvPlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBMb2FkaW5nXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgbG9hZGluZ0RvdEFuaW1hdGlvbnMgPSBrZXlmcmFtZXNgXG4gIDAlLCA4MCUsIDEwMCUgeyBvcGFjaXR5OiAwOyB9XG4gIDQwJSB7IG9wYWNpdHk6IDE7IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBsb2FkaW5nSW5kaWNhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHNpemUsXG4gICAgdGhlbWU6IHtcbiAgICAgIGNvbG9ycyxcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICB9LFxuICB9OiBMb2FkaW5nSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdsb2FkaW5nSW5kaWNhdG9yJyxcbiAgZGlzcGxheTogJ2ZsZXgnLFxuICB0cmFuc2l0aW9uOiAnY29sb3IgMTUwbXMnLFxuICBhbGlnblNlbGY6ICdjZW50ZXInLFxuICBmb250U2l6ZTogc2l6ZSxcbiAgbGluZUhlaWdodDogMSxcbiAgbWFyZ2luUmlnaHQ6IHNpemUsXG4gIHRleHRBbGlnbjogJ2NlbnRlcicsXG4gIHZlcnRpY2FsQWxpZ246ICdtaWRkbGUnLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGNvbG9yOiBpc0ZvY3VzZWQgPyBjb2xvcnMubmV1dHJhbDYwIDogY29sb3JzLm5ldXRyYWwyMCxcbiAgICAgICAgcGFkZGluZzogYmFzZVVuaXQgKiAyLFxuICAgICAgfSksXG59KTtcblxuaW50ZXJmYWNlIExvYWRpbmdEb3RQcm9wcyB7XG4gIGRlbGF5OiBudW1iZXI7XG4gIG9mZnNldDogYm9vbGVhbjtcbn1cbmNvbnN0IExvYWRpbmdEb3QgPSAoeyBkZWxheSwgb2Zmc2V0IH06IExvYWRpbmdEb3RQcm9wcykgPT4gKFxuICA8c3BhblxuICAgIGNzcz17e1xuICAgICAgYW5pbWF0aW9uOiBgJHtsb2FkaW5nRG90QW5pbWF0aW9uc30gMXMgZWFzZS1pbi1vdXQgJHtkZWxheX1tcyBpbmZpbml0ZTtgLFxuICAgICAgYmFja2dyb3VuZENvbG9yOiAnY3VycmVudENvbG9yJyxcbiAgICAgIGJvcmRlclJhZGl1czogJzFlbScsXG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIG1hcmdpbkxlZnQ6IG9mZnNldCA/ICcxZW0nIDogdW5kZWZpbmVkLFxuICAgICAgaGVpZ2h0OiAnMWVtJyxcbiAgICAgIHZlcnRpY2FsQWxpZ246ICd0b3AnLFxuICAgICAgd2lkdGg6ICcxZW0nLFxuICAgIH19XG4gIC8+XG4pO1xuXG5leHBvcnQgaW50ZXJmYWNlIExvYWRpbmdJbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgLyoqIFNldCBzaXplIG9mIHRoZSBjb250YWluZXIuICovXG4gIHNpemU6IG51bWJlcjtcbn1cbmV4cG9ydCBjb25zdCBMb2FkaW5nSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KHtcbiAgaW5uZXJQcm9wcyxcbiAgaXNSdGwsXG4gIHNpemUgPSA0LFxuICAuLi5yZXN0UHJvcHNcbn06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPikgPT4ge1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKFxuICAgICAgICB7IC4uLnJlc3RQcm9wcywgaW5uZXJQcm9wcywgaXNSdGwsIHNpemUgfSxcbiAgICAgICAgJ2xvYWRpbmdJbmRpY2F0b3InLFxuICAgICAgICB7XG4gICAgICAgICAgaW5kaWNhdG9yOiB0cnVlLFxuICAgICAgICAgICdsb2FkaW5nLWluZGljYXRvcic6IHRydWUsXG4gICAgICAgIH1cbiAgICAgICl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MH0gb2Zmc2V0PXtpc1J0bH0gLz5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXsxNjB9IG9mZnNldCAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezMyMH0gb2Zmc2V0PXshaXNSdGx9IC8+XG4gICAgPC9kaXY+XG4gICk7XG59O1xuIl19 */")})},xC=function(t){var n=t.innerProps,r=t.isRtl,o=t.size,s=o===void 0?4:o,a=Jt(t,lC);return ae("div",ue({},He(ne(ne({},a),{},{innerProps:n,isRtl:r,size:s}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),ae(Dc,{delay:0,offset:r}),ae(Dc,{delay:160,offset:!0}),ae(Dc,{delay:320,offset:!r}))},vC=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.theme,a=s.colors,i=s.borderRadius,c=s.spacing;return ne({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:c.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?a.neutral5:a.neutral0,borderColor:r?a.neutral10:o?a.primary:a.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(a.primary):void 0,"&:hover":{borderColor:o?a.primary:a.neutral30}})},EC=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.innerRef,a=t.innerProps,i=t.menuIsOpen;return ae("div",ue({ref:s},He(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":o,"control--menu-is-open":i}),a,{"aria-disabled":r||void 0}),n)},IC=EC,wC=["data"],_C=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},SC=function(t){var n=t.children,r=t.cx,o=t.getStyles,s=t.getClassNames,a=t.Heading,i=t.headingProps,c=t.innerProps,l=t.label,f=t.theme,m=t.selectProps;return ae("div",ue({},He(t,"group",{group:!0}),c),ae(a,ue({},i,{selectProps:m,theme:f,getStyles:o,getClassNames:s,cx:r}),l),ae("div",null,n))},AC=function(t,n){var r=t.theme,o=r.colors,s=r.spacing;return ne({label:"group",cursor:"default",display:"block"},n?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:s.baseUnit*3,paddingRight:s.baseUnit*3,textTransform:"uppercase"})},TC=function(t){var n=Ef(t);n.data;var r=Jt(n,wC);return ae("div",ue({},He(t,"groupHeading",{"group-heading":!0}),r))},LC=SC,OC=["innerRef","isDisabled","isHidden","inputClassName"],FC=function(t,n){var r=t.isDisabled,o=t.value,s=t.theme,a=s.spacing,i=s.colors;return ne(ne({visibility:r?"hidden":"visible",transform:o?"translateZ(0)":""},kC),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:i.neutral80})},Nf={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},kC={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":ne({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Nf)},DC=function(t){return ne({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},Nf)},NC=function(t){var n=t.cx,r=t.value,o=Ef(t),s=o.innerRef,a=o.isDisabled,i=o.isHidden,c=o.inputClassName,l=Jt(o,OC);return ae("div",ue({},He(t,"input",{"input-container":!0}),{"data-value":r||""}),ae("input",ue({className:n({input:!0},c),ref:s,style:DC(i),disabled:a},l)))},RC=NC,MC=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,a=r.colors;return ne({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:a.neutral10,borderRadius:s/2,margin:o.baseUnit/2})},PC=function(t,n){var r=t.theme,o=r.borderRadius,s=r.colors,a=t.cropWithEllipsis;return ne({overflow:"hidden",textOverflow:a||a===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:o/2,color:s.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},jC=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,a=r.colors,i=t.isFocused;return ne({alignItems:"center",display:"flex"},n?{}:{borderRadius:s/2,backgroundColor:i?a.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}})},Rf=function(t){var n=t.children,r=t.innerProps;return ae("div",r,n)},BC=Rf,VC=Rf;function GC(e){var t=e.children,n=e.innerProps;return ae("div",ue({role:"button"},n),t||ae(kc,{size:14}))}var HC=function(t){var n=t.children,r=t.components,o=t.data,s=t.innerProps,a=t.isDisabled,i=t.removeProps,c=t.selectProps,l=r.Container,f=r.Label,m=r.Remove;return ae(l,{data:o,innerProps:ne(ne({},He(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),s),selectProps:c},ae(f,{data:o,innerProps:ne({},He(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:c},n),ae(m,{data:o,innerProps:ne(ne({},He(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},i),selectProps:c}))},WC=HC,ZC=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.isSelected,a=t.theme,i=a.spacing,c=a.colors;return ne({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:s?c.primary:o?c.primary25:"transparent",color:r?c.neutral20:s?c.neutral0:"inherit",padding:"".concat(i.baseUnit*2,"px ").concat(i.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:s?c.primary:c.primary50}})},XC=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.isSelected,a=t.innerRef,i=t.innerProps;return ae("div",ue({},He(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":o,"option--is-selected":s}),{ref:a,"aria-disabled":r},i),n)},zC=XC,YC=function(t,n){var r=t.theme,o=r.spacing,s=r.colors;return ne({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:s.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},JC=function(t){var n=t.children,r=t.innerProps;return ae("div",ue({},He(t,"placeholder",{placeholder:!0}),r),n)},qC=JC,$C=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing,a=o.colors;return ne({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?a.neutral40:a.neutral80,marginLeft:s.baseUnit/2,marginRight:s.baseUnit/2})},QC=function(t){var n=t.children,r=t.isDisabled,o=t.innerProps;return ae("div",ue({},He(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),o),n)},UC=QC,ln={ClearIndicator:gC,Control:IC,DropdownIndicator:pC,DownChevron:kf,CrossIcon:kc,Group:LC,GroupHeading:TC,IndicatorsContainer:iC,IndicatorSeparator:bC,Input:RC,LoadingIndicator:xC,Menu:Y6,MenuList:q6,MenuPortal:tC,LoadingMessage:K6,NoOptionsMessage:U6,MultiValue:WC,MultiValueContainer:BC,MultiValueLabel:VC,MultiValueRemove:GC,Option:zC,Placeholder:qC,SelectContainer:rC,SingleValue:UC,ValueContainer:sC},KC=function(t){return ne(ne({},ln),t.components)},Mf=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function e7(e,t){return!!(e===t||Mf(e)&&Mf(t))}function t7(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!e7(e[n],t[n]))return!1;return!0}function n7(e,t){t===void 0&&(t=t7);var n=null;function r(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];if(n&&n.lastThis===this&&t(o,n.lastArgs))return n.lastResult;var a=e.apply(this,o);return n={lastResult:a,lastArgs:o,lastThis:this},a}return r.clear=function(){n=null},r}function r7(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}for(var o7=process.env.NODE_ENV==="production"?{name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"}:{name:"1f43avz-a11yText-A11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;label:A11yText;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFNSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",toString:r7},s7=function(t){return ae("span",ue({css:o7},t))},Pf=s7,a7={guidance:function(t){var n=t.isSearchable,r=t.isMulti,o=t.tabSelectsValue,s=t.context,a=t.isInitialFocus;switch(s){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return a?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,o=r===void 0?"":r,s=t.labels,a=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(o,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(s.length>1?"s":""," ").concat(s.join(","),", selected.");case"select-option":return a?"option ".concat(o," is disabled. Select another option."):"option ".concat(o,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,o=t.options,s=t.label,a=s===void 0?"":s,i=t.selectValue,c=t.isDisabled,l=t.isSelected,f=t.isAppleDevice,m=function(p,h){return p&&p.length?"".concat(p.indexOf(h)+1," of ").concat(p.length):""};if(n==="value"&&i)return"value ".concat(a," focused, ").concat(m(i,r),".");if(n==="menu"&&f){var b=c?" disabled":"",v="".concat(l?" selected":"").concat(b);return"".concat(a).concat(v,", ").concat(m(o,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},i7=function(t){var n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,s=t.focusableOptions,a=t.isFocused,i=t.selectValue,c=t.selectProps,l=t.id,f=t.isAppleDevice,m=c.ariaLiveMessages,b=c.getOptionLabel,v=c.inputValue,y=c.isMulti,p=c.isOptionDisabled,h=c.isSearchable,g=c.menuIsOpen,C=c.options,x=c.screenReaderStatus,I=c.tabSelectsValue,E=c.isLoading,_=c["aria-label"],A=c["aria-live"],S=w.useMemo(function(){return ne(ne({},a7),m||{})},[m]),L=w.useMemo(function(){var J="";if(n&&S.onChange){var $=n.option,H=n.options,X=n.removedValue,q=n.removedValues,se=n.value,de=function(re){return Array.isArray(re)?null:re},B=X||$||de(se),P=B?b(B):"",W=H||q||void 0,G=W?W.map(b):[],Y=ne({isDisabled:B&&p(B,i),label:P,labels:G},n);J=S.onChange(Y)}return J},[n,S,p,i,b]),k=w.useMemo(function(){var J="",$=r||o,H=!!(r&&i&&i.includes(r));if($&&S.onFocus){var X={focused:$,label:b($),isDisabled:p($,i),isSelected:H,options:s,context:$===r?"menu":"value",selectValue:i,isAppleDevice:f};J=S.onFocus(X)}return J},[r,o,b,p,S,s,i,f]),D=w.useMemo(function(){var J="";if(g&&C.length&&!E&&S.onFilter){var $=x({count:s.length});J=S.onFilter({inputValue:v,resultsMessage:$})}return J},[s,v,g,S,C,x,E]),N=(n==null?void 0:n.action)==="initial-input-focus",M=w.useMemo(function(){var J="";if(S.guidance){var $=o?"value":g?"menu":"input";J=S.guidance({"aria-label":_,context:$,isDisabled:r&&p(r,i),isMulti:y,isSearchable:h,tabSelectsValue:I,isInitialFocus:N})}return J},[_,r,o,y,p,h,g,S,i,I,N]),V=ae(w.Fragment,null,ae("span",{id:"aria-selection"},L),ae("span",{id:"aria-focused"},k),ae("span",{id:"aria-results"},D),ae("span",{id:"aria-guidance"},M));return ae(w.Fragment,null,ae(Pf,{id:l},N&&V),ae(Pf,{"aria-live":A,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!N&&V))},c7=i7,Nc=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],l7=new RegExp("["+Nc.map(function(e){return e.letters}).join("")+"]","g"),jf={},Rc=0;Rc<Nc.length;Rc++)for(var Mc=Nc[Rc],Pc=0;Pc<Mc.letters.length;Pc++)jf[Mc.letters[Pc]]=Mc.base;var Bf=function(t){return t.replace(l7,function(n){return jf[n]})},u7=n7(Bf),Vf=function(t){return t.replace(/^\s+|\s+$/g,"")},d7=function(t){return"".concat(t.label," ").concat(t.value)},f7=function(t){return function(n,r){if(n.data.__isNew__)return!0;var o=ne({ignoreCase:!0,ignoreAccents:!0,stringify:d7,trim:!0,matchFrom:"any"},t),s=o.ignoreCase,a=o.ignoreAccents,i=o.stringify,c=o.trim,l=o.matchFrom,f=c?Vf(r):r,m=c?Vf(i(n)):i(n);return s&&(f=f.toLowerCase(),m=m.toLowerCase()),a&&(f=u7(f),m=Bf(m)),l==="start"?m.substr(0,f.length)===f:m.indexOf(f)>-1}},p7=["innerRef"];function h7(e){var t=e.innerRef,n=Jt(e,p7),r=B6(n,"onExited","in","enter","exit","appear");return ae("input",ue({ref:t},r,{css:Sc({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},process.env.NODE_ENV==="production"?"":";label:DummyInput;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCTSIsImZpbGUiOiJEdW1teUlucHV0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVmIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgcmVtb3ZlUHJvcHMgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIER1bW15SW5wdXQoe1xuICBpbm5lclJlZixcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snaW5wdXQnXSAmIHtcbiAgcmVhZG9ubHkgaW5uZXJSZWY6IFJlZjxIVE1MSW5wdXRFbGVtZW50Pjtcbn0pIHtcbiAgLy8gUmVtb3ZlIGFuaW1hdGlvbiBwcm9wcyBub3QgbWVhbnQgZm9yIEhUTUwgZWxlbWVudHNcbiAgY29uc3QgZmlsdGVyZWRQcm9wcyA9IHJlbW92ZVByb3BzKFxuICAgIHByb3BzLFxuICAgICdvbkV4aXRlZCcsXG4gICAgJ2luJyxcbiAgICAnZW50ZXInLFxuICAgICdleGl0JyxcbiAgICAnYXBwZWFyJ1xuICApO1xuXG4gIHJldHVybiAoXG4gICAgPGlucHV0XG4gICAgICByZWY9e2lubmVyUmVmfVxuICAgICAgey4uLmZpbHRlcmVkUHJvcHN9XG4gICAgICBjc3M9e3tcbiAgICAgICAgbGFiZWw6ICdkdW1teUlucHV0JyxcbiAgICAgICAgLy8gZ2V0IHJpZCBvZiBhbnkgZGVmYXVsdCBzdHlsZXNcbiAgICAgICAgYmFja2dyb3VuZDogMCxcbiAgICAgICAgYm9yZGVyOiAwLFxuICAgICAgICAvLyBpbXBvcnRhbnQhIHRoaXMgaGlkZXMgdGhlIGZsYXNoaW5nIGN1cnNvclxuICAgICAgICBjYXJldENvbG9yOiAndHJhbnNwYXJlbnQnLFxuICAgICAgICBmb250U2l6ZTogJ2luaGVyaXQnLFxuICAgICAgICBncmlkQXJlYTogJzEgLyAxIC8gMiAvIDMnLFxuICAgICAgICBvdXRsaW5lOiAwLFxuICAgICAgICBwYWRkaW5nOiAwLFxuICAgICAgICAvLyBpbXBvcnRhbnQhIHdpdGhvdXQgYHdpZHRoYCBicm93c2VycyB3b24ndCBhbGxvdyBmb2N1c1xuICAgICAgICB3aWR0aDogMSxcblxuICAgICAgICAvLyByZW1vdmUgY3Vyc29yIG9uIGRlc2t0b3BcbiAgICAgICAgY29sb3I6ICd0cmFuc3BhcmVudCcsXG5cbiAgICAgICAgLy8gcmVtb3ZlIGN1cnNvciBvbiBtb2JpbGUgd2hpbHN0IG1haW50YWluaW5nIFwic2Nyb2xsIGludG8gdmlld1wiIGJlaGF2aW91clxuICAgICAgICBsZWZ0OiAtMTAwLFxuICAgICAgICBvcGFjaXR5OiAwLFxuICAgICAgICBwb3NpdGlvbjogJ3JlbGF0aXZlJyxcbiAgICAgICAgdHJhbnNmb3JtOiAnc2NhbGUoLjAxKScsXG4gICAgICB9fVxuICAgIC8+XG4gICk7XG59XG4iXX0= */")}))}var g7=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function m7(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,s=e.onTopLeave,a=w.useRef(!1),i=w.useRef(!1),c=w.useRef(0),l=w.useRef(null),f=w.useCallback(function(h,g){if(l.current!==null){var C=l.current,x=C.scrollTop,I=C.scrollHeight,E=C.clientHeight,_=l.current,A=g>0,S=I-E-x,L=!1;S>g&&a.current&&(r&&r(h),a.current=!1),A&&i.current&&(s&&s(h),i.current=!1),A&&g>S?(n&&!a.current&&n(h),_.scrollTop=I,L=!0,a.current=!0):!A&&-g>x&&(o&&!i.current&&o(h),_.scrollTop=0,L=!0,i.current=!0),L&&g7(h)}},[n,r,o,s]),m=w.useCallback(function(h){f(h,h.deltaY)},[f]),b=w.useCallback(function(h){c.current=h.changedTouches[0].clientY},[]),v=w.useCallback(function(h){var g=c.current-h.changedTouches[0].clientY;f(h,g)},[f]),y=w.useCallback(function(h){if(h){var g=M6?{passive:!1}:!1;h.addEventListener("wheel",m,g),h.addEventListener("touchstart",b,g),h.addEventListener("touchmove",v,g)}},[v,b,m]),p=w.useCallback(function(h){h&&(h.removeEventListener("wheel",m,!1),h.removeEventListener("touchstart",b,!1),h.removeEventListener("touchmove",v,!1))},[v,b,m]);return w.useEffect(function(){if(t){var h=l.current;return y(h),function(){p(h)}}},[t,y,p]),function(h){l.current=h}}var Gf=["boxSizing","height","overflow","paddingRight","position"],Hf={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Wf(e){e.preventDefault()}function Zf(e){e.stopPropagation()}function Xf(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function zf(){return"ontouchstart"in window||navigator.maxTouchPoints}var Yf=!!(typeof window<"u"&&window.document&&window.document.createElement),Wo=0,Yr={capture:!1,passive:!1};function b7(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,o=w.useRef({}),s=w.useRef(null),a=w.useCallback(function(c){if(Yf){var l=document.body,f=l&&l.style;if(r&&Gf.forEach(function(y){var p=f&&f[y];o.current[y]=p}),r&&Wo<1){var m=parseInt(o.current.paddingRight,10)||0,b=document.body?document.body.clientWidth:0,v=window.innerWidth-b+m||0;Object.keys(Hf).forEach(function(y){var p=Hf[y];f&&(f[y]=p)}),f&&(f.paddingRight="".concat(v,"px"))}l&&zf()&&(l.addEventListener("touchmove",Wf,Yr),c&&(c.addEventListener("touchstart",Xf,Yr),c.addEventListener("touchmove",Zf,Yr))),Wo+=1}},[r]),i=w.useCallback(function(c){if(Yf){var l=document.body,f=l&&l.style;Wo=Math.max(Wo-1,0),r&&Wo<1&&Gf.forEach(function(m){var b=o.current[m];f&&(f[m]=b)}),l&&zf()&&(l.removeEventListener("touchmove",Wf,Yr),c&&(c.removeEventListener("touchstart",Xf,Yr),c.removeEventListener("touchmove",Zf,Yr)))}},[r]);return w.useEffect(function(){if(t){var c=s.current;return a(c),function(){i(c)}}},[t,a,i]),function(c){s.current=c}}function y7(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var C7=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},x7=process.env.NODE_ENV==="production"?{name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"}:{name:"bp8cua-ScrollManager",styles:"position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9EVSIsImZpbGUiOiJTY3JvbGxNYW5hZ2VyLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgRnJhZ21lbnQsIFJlYWN0RWxlbWVudCwgUmVmQ2FsbGJhY2ssIE1vdXNlRXZlbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgdXNlU2Nyb2xsQ2FwdHVyZSBmcm9tICcuL3VzZVNjcm9sbENhcHR1cmUnO1xuaW1wb3J0IHVzZVNjcm9sbExvY2sgZnJvbSAnLi91c2VTY3JvbGxMb2NrJztcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgcmVhZG9ubHkgY2hpbGRyZW46IChyZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PikgPT4gUmVhY3RFbGVtZW50O1xuICByZWFkb25seSBsb2NrRW5hYmxlZDogYm9vbGVhbjtcbiAgcmVhZG9ubHkgY2FwdHVyZUVuYWJsZWQ6IGJvb2xlYW47XG4gIHJlYWRvbmx5IG9uQm90dG9tQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Cb3R0b21MZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG4gIHJlYWRvbmx5IG9uVG9wQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Ub3BMZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG59XG5cbmNvbnN0IGJsdXJTZWxlY3RJbnB1dCA9IChldmVudDogTW91c2VFdmVudDxIVE1MRGl2RWxlbWVudD4pID0+IHtcbiAgY29uc3QgZWxlbWVudCA9IGV2ZW50LnRhcmdldCBhcyBIVE1MRGl2RWxlbWVudDtcbiAgcmV0dXJuIChcbiAgICBlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCAmJlxuICAgIChlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCBhcyBIVE1MRWxlbWVudCkuYmx1cigpXG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBTY3JvbGxNYW5hZ2VyKHtcbiAgY2hpbGRyZW4sXG4gIGxvY2tFbmFibGVkLFxuICBjYXB0dXJlRW5hYmxlZCA9IHRydWUsXG4gIG9uQm90dG9tQXJyaXZlLFxuICBvbkJvdHRvbUxlYXZlLFxuICBvblRvcEFycml2ZSxcbiAgb25Ub3BMZWF2ZSxcbn06IFByb3BzKSB7XG4gIGNvbnN0IHNldFNjcm9sbENhcHR1cmVUYXJnZXQgPSB1c2VTY3JvbGxDYXB0dXJlKHtcbiAgICBpc0VuYWJsZWQ6IGNhcHR1cmVFbmFibGVkLFxuICAgIG9uQm90dG9tQXJyaXZlLFxuICAgIG9uQm90dG9tTGVhdmUsXG4gICAgb25Ub3BBcnJpdmUsXG4gICAgb25Ub3BMZWF2ZSxcbiAgfSk7XG4gIGNvbnN0IHNldFNjcm9sbExvY2tUYXJnZXQgPSB1c2VTY3JvbGxMb2NrKHsgaXNFbmFibGVkOiBsb2NrRW5hYmxlZCB9KTtcblxuICBjb25zdCB0YXJnZXRSZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PiA9IChlbGVtZW50KSA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPEZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */",toString:y7};function v7(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=r===void 0?!0:r,s=e.onBottomArrive,a=e.onBottomLeave,i=e.onTopArrive,c=e.onTopLeave,l=m7({isEnabled:o,onBottomArrive:s,onBottomLeave:a,onTopArrive:i,onTopLeave:c}),f=b7({isEnabled:n}),m=function(v){l(v),f(v)};return ae(w.Fragment,null,n&&ae("div",{onClick:C7,css:x7}),t(m))}function E7(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var I7=process.env.NODE_ENV==="production"?{name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"}:{name:"5kkxb2-requiredInput-RequiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%;label:RequiredInput;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVpcmVkSW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNJIiwiZmlsZSI6IlJlcXVpcmVkSW5wdXQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBGb2N1c0V2ZW50SGFuZGxlciwgRnVuY3Rpb25Db21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmNvbnN0IFJlcXVpcmVkSW5wdXQ6IEZ1bmN0aW9uQ29tcG9uZW50PHtcbiAgcmVhZG9ubHkgbmFtZT86IHN0cmluZztcbiAgcmVhZG9ubHkgb25Gb2N1czogRm9jdXNFdmVudEhhbmRsZXI8SFRNTElucHV0RWxlbWVudD47XG59PiA9ICh7IG5hbWUsIG9uRm9jdXMgfSkgPT4gKFxuICA8aW5wdXRcbiAgICByZXF1aXJlZFxuICAgIG5hbWU9e25hbWV9XG4gICAgdGFiSW5kZXg9ey0xfVxuICAgIGFyaWEtaGlkZGVuPVwidHJ1ZVwiXG4gICAgb25Gb2N1cz17b25Gb2N1c31cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAncmVxdWlyZWRJbnB1dCcsXG4gICAgICBvcGFjaXR5OiAwLFxuICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBib3R0b206IDAsXG4gICAgICBsZWZ0OiAwLFxuICAgICAgcmlnaHQ6IDAsXG4gICAgICB3aWR0aDogJzEwMCUnLFxuICAgIH19XG4gICAgLy8gUHJldmVudCBgU3dpdGNoaW5nIGZyb20gdW5jb250cm9sbGVkIHRvIGNvbnRyb2xsZWRgIGVycm9yXG4gICAgdmFsdWU9XCJcIlxuICAgIG9uQ2hhbmdlPXsoKSA9PiB7fX1cbiAgLz5cbik7XG5cbmV4cG9ydCBkZWZhdWx0IFJlcXVpcmVkSW5wdXQ7XG4iXX0= */",toString:E7},w7=function(t){var n=t.name,r=t.onFocus;return ae("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:I7,value:"",onChange:function(){}})},_7=w7;function jc(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function S7(){return jc(/^iPhone/i)}function Jf(){return jc(/^Mac/i)}function A7(){return jc(/^iPad/i)||Jf()&&navigator.maxTouchPoints>1}function T7(){return S7()||A7()}function L7(){return Jf()||T7()}var O7=function(t){return t.label},qf=function(t){return t.label},$f=function(t){return t.value},F7=function(t){return!!t.isDisabled},k7={clearIndicator:hC,container:nC,control:vC,dropdownIndicator:fC,group:_C,groupHeading:AC,indicatorsContainer:aC,indicatorSeparator:mC,input:FC,loadingIndicator:CC,loadingMessage:Q6,menu:Z6,menuList:J6,menuPortal:eC,multiValue:MC,multiValueLabel:PC,multiValueRemove:jC,noOptionsMessage:$6,option:ZC,placeholder:YC,singleValue:$C,valueContainer:oC},D7={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},N7=4,Qf=4,R7=38,M7=Qf*2,P7={baseUnit:Qf,controlHeight:R7,menuGutter:M7},Bc={borderRadius:N7,colors:D7,spacing:P7},j7={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:_f(),captureMenuScroll:!_f(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:f7(),formatGroupLabel:O7,getOptionLabel:qf,getOptionValue:$f,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:F7,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!N6(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Uf(e,t,n,r){var o=r1(e,t,n),s=o1(e,t,n),a=n1(e,t),i=ma(e,t);return{type:"option",data:t,isDisabled:o,isSelected:s,label:a,value:i,index:r}}function ga(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(a,i){return Uf(e,a,t,i)}).filter(function(a){return t1(e,a)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var s=Uf(e,n,t,r);return t1(e,s)?s:void 0}).filter(P6)}function Kf(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,Wr(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function e1(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,Wr(r.options.map(function(o){return{data:o.data,id:"".concat(t,"-").concat(r.index,"-").concat(o.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function B7(e,t){return Kf(ga(e,t))}function t1(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,s=t.isSelected,a=t.label,i=t.value;return(!a1(e)||!s)&&s1(e,{label:a,value:i,data:o},r)}function V7(e,t){var n=e.focusedValue,r=e.selectValue,o=r.indexOf(n);if(o>-1){var s=t.indexOf(n);if(s>-1)return n;if(o<t.length)return t[o]}return null}function G7(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var Vc=function(t,n){var r,o=(r=t.find(function(s){return s.data===n}))===null||r===void 0?void 0:r.id;return o||null},n1=function(t,n){return t.getOptionLabel(n)},ma=function(t,n){return t.getOptionValue(n)};function r1(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function o1(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=ma(e,t);return n.some(function(o){return ma(e,o)===r})}function s1(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var a1=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},H7=1,ba=function(e){n9(n,e);var t=s9(n);function n(r){var o;if(e9(this,n),o=t.call(this,r),o.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},o.blockOptionHover=!1,o.isComposing=!1,o.commonProps=void 0,o.initialTouchX=0,o.initialTouchY=0,o.openAfterFocus=!1,o.scrollToFocusedOptionOnUpdate=!1,o.userIsDragging=void 0,o.isAppleDevice=L7(),o.controlRef=null,o.getControlRef=function(c){o.controlRef=c},o.focusedOptionRef=null,o.getFocusedOptionRef=function(c){o.focusedOptionRef=c},o.menuListRef=null,o.getMenuListRef=function(c){o.menuListRef=c},o.inputRef=null,o.getInputRef=function(c){o.inputRef=c},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(c,l){var f=o.props,m=f.onChange,b=f.name;l.name=b,o.ariaOnChange(c,l),m(c,l)},o.setValue=function(c,l,f){var m=o.props,b=m.closeMenuOnSelect,v=m.isMulti,y=m.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:y}),b&&(o.setState({inputIsHiddenAfterUpdate:!v}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(c,{action:l,option:f})},o.selectOption=function(c){var l=o.props,f=l.blurInputOnSelect,m=l.isMulti,b=l.name,v=o.state.selectValue,y=m&&o.isOptionSelected(c,v),p=o.isOptionDisabled(c,v);if(y){var h=o.getOptionValue(c);o.setValue(v.filter(function(g){return o.getOptionValue(g)!==h}),"deselect-option",c)}else if(!p)m?o.setValue([].concat(Wr(v),[c]),"select-option",c):o.setValue(c,"select-option");else{o.ariaOnChange(c,{action:"select-option",option:c,name:b});return}f&&o.blurInput()},o.removeValue=function(c){var l=o.props.isMulti,f=o.state.selectValue,m=o.getOptionValue(c),b=f.filter(function(y){return o.getOptionValue(y)!==m}),v=Ho(l,b,b[0]||null);o.onChange(v,{action:"remove-value",removedValue:c}),o.focusInput()},o.clearValue=function(){var c=o.state.selectValue;o.onChange(Ho(o.props.isMulti,[],null),{action:"clear",removedValues:c})},o.popValue=function(){var c=o.props.isMulti,l=o.state.selectValue,f=l[l.length-1],m=l.slice(0,l.length-1),b=Ho(c,m,m[0]||null);f&&o.onChange(b,{action:"pop-value",removedValue:f})},o.getFocusedOptionId=function(c){return Vc(o.state.focusableOptionsWithIds,c)},o.getFocusableOptionsWithIds=function(){return e1(ga(o.props,o.state.selectValue),o.getElementId("option"))},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var c=arguments.length,l=new Array(c),f=0;f<c;f++)l[f]=arguments[f];return T6.apply(void 0,[o.props.classNamePrefix].concat(l))},o.getOptionLabel=function(c){return n1(o.props,c)},o.getOptionValue=function(c){return ma(o.props,c)},o.getStyles=function(c,l){var f=o.props.unstyled,m=k7[c](l,f);m.boxSizing="border-box";var b=o.props.styles[c];return b?b(m,l):m},o.getClassNames=function(c,l){var f,m;return(f=(m=o.props.classNames)[c])===null||f===void 0?void 0:f.call(m,l)},o.getElementId=function(c){return"".concat(o.state.instancePrefix,"-").concat(c)},o.getComponents=function(){return KC(o.props)},o.buildCategorizedOptions=function(){return ga(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return Kf(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(c,l){o.setState({ariaSelection:ne({value:c},l)})},o.onMenuMouseDown=function(c){c.button===0&&(c.stopPropagation(),c.preventDefault(),o.focusInput())},o.onMenuMouseMove=function(c){o.blockOptionHover=!1},o.onControlMouseDown=function(c){if(!c.defaultPrevented){var l=o.props.openMenuOnClick;o.state.isFocused?o.props.menuIsOpen?c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&o.onMenuClose():l&&o.openMenu("first"):(l&&(o.openAfterFocus=!0),o.focusInput()),c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&c.preventDefault()}},o.onDropdownIndicatorMouseDown=function(c){if(!(c&&c.type==="mousedown"&&c.button!==0)&&!o.props.isDisabled){var l=o.props,f=l.isMulti,m=l.menuIsOpen;o.focusInput(),m?(o.setState({inputIsHiddenAfterUpdate:!f}),o.onMenuClose()):o.openMenu("first"),c.preventDefault()}},o.onClearIndicatorMouseDown=function(c){c&&c.type==="mousedown"&&c.button!==0||(o.clearValue(),c.preventDefault(),o.openAfterFocus=!1,c.type==="touchend"?o.focusInput():setTimeout(function(){return o.focusInput()}))},o.onScroll=function(c){typeof o.props.closeMenuOnScroll=="boolean"?c.target instanceof HTMLElement&&da(c.target)&&o.props.onMenuClose():typeof o.props.closeMenuOnScroll=="function"&&o.props.closeMenuOnScroll(c)&&o.props.onMenuClose()},o.onCompositionStart=function(){o.isComposing=!0},o.onCompositionEnd=function(){o.isComposing=!1},o.onTouchStart=function(c){var l=c.touches,f=l&&l.item(0);f&&(o.initialTouchX=f.clientX,o.initialTouchY=f.clientY,o.userIsDragging=!1)},o.onTouchMove=function(c){var l=c.touches,f=l&&l.item(0);if(f){var m=Math.abs(f.clientX-o.initialTouchX),b=Math.abs(f.clientY-o.initialTouchY),v=5;o.userIsDragging=m>v||b>v}},o.onTouchEnd=function(c){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(c.target)&&o.menuListRef&&!o.menuListRef.contains(c.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(c){o.userIsDragging||o.onControlMouseDown(c)},o.onClearIndicatorTouchEnd=function(c){o.userIsDragging||o.onClearIndicatorMouseDown(c)},o.onDropdownIndicatorTouchEnd=function(c){o.userIsDragging||o.onDropdownIndicatorMouseDown(c)},o.handleInputChange=function(c){var l=o.props.inputValue,f=c.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(f,{action:"input-change",prevInputValue:l}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(c){o.props.onFocus&&o.props.onFocus(c),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(c){var l=o.props.inputValue;if(o.menuListRef&&o.menuListRef.contains(document.activeElement)){o.inputRef.focus();return}o.props.onBlur&&o.props.onBlur(c),o.onInputChange("",{action:"input-blur",prevInputValue:l}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1})},o.onOptionHover=function(c){if(!(o.blockOptionHover||o.state.focusedOption===c)){var l=o.getFocusableOptions(),f=l.indexOf(c);o.setState({focusedOption:c,focusedOptionId:f>-1?o.getFocusedOptionId(c):null})}},o.shouldHideSelectedOptions=function(){return a1(o.props)},o.onValueInputFocus=function(c){c.preventDefault(),c.stopPropagation(),o.focus()},o.onKeyDown=function(c){var l=o.props,f=l.isMulti,m=l.backspaceRemovesValue,b=l.escapeClearsValue,v=l.inputValue,y=l.isClearable,p=l.isDisabled,h=l.menuIsOpen,g=l.onKeyDown,C=l.tabSelectsValue,x=l.openMenuOnFocus,I=o.state,E=I.focusedOption,_=I.focusedValue,A=I.selectValue;if(!p&&!(typeof g=="function"&&(g(c),c.defaultPrevented))){switch(o.blockOptionHover=!0,c.key){case"ArrowLeft":if(!f||v)return;o.focusValue("previous");break;case"ArrowRight":if(!f||v)return;o.focusValue("next");break;case"Delete":case"Backspace":if(v)return;if(_)o.removeValue(_);else{if(!m)return;f?o.popValue():y&&o.clearValue()}break;case"Tab":if(o.isComposing||c.shiftKey||!h||!C||!E||x&&o.isOptionSelected(E,A))return;o.selectOption(E);break;case"Enter":if(c.keyCode===229)break;if(h){if(!E||o.isComposing)return;o.selectOption(E);break}return;case"Escape":h?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:v}),o.onMenuClose()):y&&b&&o.clearValue();break;case" ":if(v)return;if(!h){o.openMenu("first");break}if(!E)return;o.selectOption(E);break;case"ArrowUp":h?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":h?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!h)return;o.focusOption("pageup");break;case"PageDown":if(!h)return;o.focusOption("pagedown");break;case"Home":if(!h)return;o.focusOption("first");break;case"End":if(!h)return;o.focusOption("last");break;default:return}c.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++H7),o.state.selectValue=ua(r.value),r.menuIsOpen&&o.state.selectValue.length){var s=o.getFocusableOptionsWithIds(),a=o.buildFocusableOptions(),i=a.indexOf(o.state.selectValue[0]);o.state.focusableOptionsWithIds=s,o.state.focusedOption=a[i],o.state.focusedOptionId=Vc(s,a[i])}return o}return t9(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&wf(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(o){var s=this.props,a=s.isDisabled,i=s.menuIsOpen,c=this.state.isFocused;(c&&!a&&o.isDisabled||c&&i&&!o.menuIsOpen)&&this.focusInput(),c&&a&&!o.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!c&&!a&&o.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(wf(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(o,s){this.props.onInputChange(o,s)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(o){var s=this,a=this.state,i=a.selectValue,c=a.isFocused,l=this.buildFocusableOptions(),f=o==="first"?0:l.length-1;if(!this.props.isMulti){var m=l.indexOf(i[0]);m>-1&&(f=m)}this.scrollToFocusedOptionOnUpdate=!(c&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:l[f],focusedOptionId:this.getFocusedOptionId(l[f])},function(){return s.onMenuOpen()})}},{key:"focusValue",value:function(o){var s=this.state,a=s.selectValue,i=s.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var c=a.indexOf(i);i||(c=-1);var l=a.length-1,f=-1;if(a.length){switch(o){case"previous":c===0?f=0:c===-1?f=l:f=c-1;break;case"next":c>-1&&c<l&&(f=c+1);break}this.setState({inputIsHidden:f!==-1,focusedValue:a[f]})}}}},{key:"focusOption",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",s=this.props.pageSize,a=this.state.focusedOption,i=this.getFocusableOptions();if(i.length){var c=0,l=i.indexOf(a);a||(l=-1),o==="up"?c=l>0?l-1:i.length-1:o==="down"?c=(l+1)%i.length:o==="pageup"?(c=l-s,c<0&&(c=0)):o==="pagedown"?(c=l+s,c>i.length-1&&(c=i.length-1)):o==="last"&&(c=i.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:i[c],focusedValue:null,focusedOptionId:this.getFocusedOptionId(i[c])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Bc):ne(ne({},Bc),this.props.theme):Bc}},{key:"getCommonProps",value:function(){var o=this.clearValue,s=this.cx,a=this.getStyles,i=this.getClassNames,c=this.getValue,l=this.selectOption,f=this.setValue,m=this.props,b=m.isMulti,v=m.isRtl,y=m.options,p=this.hasValue();return{clearValue:o,cx:s,getStyles:a,getClassNames:i,getValue:c,hasValue:p,isMulti:b,isRtl:v,options:y,selectOption:l,selectProps:m,setValue:f,theme:this.getTheme()}}},{key:"hasValue",value:function(){var o=this.state.selectValue;return o.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var o=this.props,s=o.isClearable,a=o.isMulti;return s===void 0?a:s}},{key:"isOptionDisabled",value:function(o,s){return r1(this.props,o,s)}},{key:"isOptionSelected",value:function(o,s){return o1(this.props,o,s)}},{key:"filterOption",value:function(o,s){return s1(this.props,o,s)}},{key:"formatOptionLabel",value:function(o,s){if(typeof this.props.formatOptionLabel=="function"){var a=this.props.inputValue,i=this.state.selectValue;return this.props.formatOptionLabel(o,{context:s,inputValue:a,selectValue:i})}else return this.getOptionLabel(o)}},{key:"formatGroupLabel",value:function(o){return this.props.formatGroupLabel(o)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var o=this.props,s=o.isDisabled,a=o.isSearchable,i=o.inputId,c=o.inputValue,l=o.tabIndex,f=o.form,m=o.menuIsOpen,b=o.required,v=this.getComponents(),y=v.Input,p=this.state,h=p.inputIsHidden,g=p.ariaSelection,C=this.commonProps,x=i||this.getElementId("input"),I=ne(ne(ne({"aria-autocomplete":"list","aria-expanded":m,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":b,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},m&&{"aria-controls":this.getElementId("listbox")}),!a&&{"aria-readonly":!0}),this.hasValue()?(g==null?void 0:g.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?T.createElement(y,ue({},C,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:x,innerRef:this.getInputRef,isDisabled:s,isHidden:h,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:l,form:f,type:"text",value:c},I)):T.createElement(h7,ue({id:x,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:la,onFocus:this.onInputFocus,disabled:s,tabIndex:l,inputMode:"none",form:f,value:""},I))}},{key:"renderPlaceholderOrValue",value:function(){var o=this,s=this.getComponents(),a=s.MultiValue,i=s.MultiValueContainer,c=s.MultiValueLabel,l=s.MultiValueRemove,f=s.SingleValue,m=s.Placeholder,b=this.commonProps,v=this.props,y=v.controlShouldRenderValue,p=v.isDisabled,h=v.isMulti,g=v.inputValue,C=v.placeholder,x=this.state,I=x.selectValue,E=x.focusedValue,_=x.isFocused;if(!this.hasValue()||!y)return g?null:T.createElement(m,ue({},b,{key:"placeholder",isDisabled:p,isFocused:_,innerProps:{id:this.getElementId("placeholder")}}),C);if(h)return I.map(function(S,L){var k=S===E,D="".concat(o.getOptionLabel(S),"-").concat(o.getOptionValue(S));return T.createElement(a,ue({},b,{components:{Container:i,Label:c,Remove:l},isFocused:k,isDisabled:p,key:D,index:L,removeProps:{onClick:function(){return o.removeValue(S)},onTouchEnd:function(){return o.removeValue(S)},onMouseDown:function(M){M.preventDefault()}},data:S}),o.formatOptionLabel(S,"value"))});if(g)return null;var A=I[0];return T.createElement(f,ue({},b,{data:A,isDisabled:p}),this.formatOptionLabel(A,"value"))}},{key:"renderClearIndicator",value:function(){var o=this.getComponents(),s=o.ClearIndicator,a=this.commonProps,i=this.props,c=i.isDisabled,l=i.isLoading,f=this.state.isFocused;if(!this.isClearable()||!s||c||!this.hasValue()||l)return null;var m={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return T.createElement(s,ue({},a,{innerProps:m,isFocused:f}))}},{key:"renderLoadingIndicator",value:function(){var o=this.getComponents(),s=o.LoadingIndicator,a=this.commonProps,i=this.props,c=i.isDisabled,l=i.isLoading,f=this.state.isFocused;if(!s||!l)return null;var m={"aria-hidden":"true"};return T.createElement(s,ue({},a,{innerProps:m,isDisabled:c,isFocused:f}))}},{key:"renderIndicatorSeparator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator,a=o.IndicatorSeparator;if(!s||!a)return null;var i=this.commonProps,c=this.props.isDisabled,l=this.state.isFocused;return T.createElement(a,ue({},i,{isDisabled:c,isFocused:l}))}},{key:"renderDropdownIndicator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator;if(!s)return null;var a=this.commonProps,i=this.props.isDisabled,c=this.state.isFocused,l={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return T.createElement(s,ue({},a,{innerProps:l,isDisabled:i,isFocused:c}))}},{key:"renderMenu",value:function(){var o=this,s=this.getComponents(),a=s.Group,i=s.GroupHeading,c=s.Menu,l=s.MenuList,f=s.MenuPortal,m=s.LoadingMessage,b=s.NoOptionsMessage,v=s.Option,y=this.commonProps,p=this.state.focusedOption,h=this.props,g=h.captureMenuScroll,C=h.inputValue,x=h.isLoading,I=h.loadingMessage,E=h.minMenuHeight,_=h.maxMenuHeight,A=h.menuIsOpen,S=h.menuPlacement,L=h.menuPosition,k=h.menuPortalTarget,D=h.menuShouldBlockScroll,N=h.menuShouldScrollIntoView,M=h.noOptionsMessage,V=h.onMenuScrollToTop,J=h.onMenuScrollToBottom;if(!A)return null;var $=function(P,W){var G=P.type,Y=P.data,oe=P.isDisabled,re=P.isSelected,j=P.label,te=P.value,Ee=p===Y,z=oe?void 0:function(){return o.onOptionHover(Y)},Ve=oe?void 0:function(){return o.selectOption(Y)},Ne="".concat(o.getElementId("option"),"-").concat(W),Ue={id:Ne,onClick:Ve,onMouseMove:z,onMouseOver:z,tabIndex:-1,role:"option","aria-selected":o.isAppleDevice?void 0:re};return T.createElement(v,ue({},y,{innerProps:Ue,data:Y,isDisabled:oe,isSelected:re,key:Ne,label:j,type:G,value:te,isFocused:Ee,innerRef:Ee?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(P.data,"menu"))},H;if(this.hasOptions())H=this.getCategorizedOptions().map(function(B){if(B.type==="group"){var P=B.data,W=B.options,G=B.index,Y="".concat(o.getElementId("group"),"-").concat(G),oe="".concat(Y,"-heading");return T.createElement(a,ue({},y,{key:Y,data:P,options:W,Heading:i,headingProps:{id:oe,data:B.data},label:o.formatGroupLabel(B.data)}),B.options.map(function(re){return $(re,"".concat(G,"-").concat(re.index))}))}else if(B.type==="option")return $(B,"".concat(B.index))});else if(x){var X=I({inputValue:C});if(X===null)return null;H=T.createElement(m,y,X)}else{var q=M({inputValue:C});if(q===null)return null;H=T.createElement(b,y,q)}var se={minMenuHeight:E,maxMenuHeight:_,menuPlacement:S,menuPosition:L,menuShouldScrollIntoView:N},de=T.createElement(X6,ue({},y,se),function(B){var P=B.ref,W=B.placerProps,G=W.placement,Y=W.maxHeight;return T.createElement(c,ue({},y,se,{innerRef:P,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:x,placement:G}),T.createElement(v7,{captureEnabled:g,onTopArrive:V,onBottomArrive:J,lockEnabled:D},function(oe){return T.createElement(l,ue({},y,{innerRef:function(j){o.getMenuListRef(j),oe(j)},innerProps:{role:"listbox","aria-multiselectable":y.isMulti,id:o.getElementId("listbox")},isLoading:x,maxHeight:Y,focusedOption:p}),H)}))});return k||L==="fixed"?T.createElement(f,ue({},y,{appendTo:k,controlElement:this.controlRef,menuPlacement:S,menuPosition:L}),de):de}},{key:"renderFormField",value:function(){var o=this,s=this.props,a=s.delimiter,i=s.isDisabled,c=s.isMulti,l=s.name,f=s.required,m=this.state.selectValue;if(f&&!this.hasValue()&&!i)return T.createElement(_7,{name:l,onFocus:this.onValueInputFocus});if(!(!l||i))if(c)if(a){var b=m.map(function(p){return o.getOptionValue(p)}).join(a);return T.createElement("input",{name:l,type:"hidden",value:b})}else{var v=m.length>0?m.map(function(p,h){return T.createElement("input",{key:"i-".concat(h),name:l,type:"hidden",value:o.getOptionValue(p)})}):T.createElement("input",{name:l,type:"hidden",value:""});return T.createElement("div",null,v)}else{var y=m[0]?this.getOptionValue(m[0]):"";return T.createElement("input",{name:l,type:"hidden",value:y})}}},{key:"renderLiveRegion",value:function(){var o=this.commonProps,s=this.state,a=s.ariaSelection,i=s.focusedOption,c=s.focusedValue,l=s.isFocused,f=s.selectValue,m=this.getFocusableOptions();return T.createElement(c7,ue({},o,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:i,focusedValue:c,isFocused:l,selectValue:f,focusableOptions:m,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var o=this.getComponents(),s=o.Control,a=o.IndicatorsContainer,i=o.SelectContainer,c=o.ValueContainer,l=this.props,f=l.className,m=l.id,b=l.isDisabled,v=l.menuIsOpen,y=this.state.isFocused,p=this.commonProps=this.getCommonProps();return T.createElement(i,ue({},p,{className:f,innerProps:{id:m,onKeyDown:this.onKeyDown},isDisabled:b,isFocused:y}),this.renderLiveRegion(),T.createElement(s,ue({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:b,isFocused:y,menuIsOpen:v}),T.createElement(c,ue({},p,{isDisabled:b}),this.renderPlaceholderOrValue(),this.renderInput()),T.createElement(a,ue({},p,{isDisabled:b}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(o,s){var a=s.prevProps,i=s.clearFocusValueOnUpdate,c=s.inputIsHiddenAfterUpdate,l=s.ariaSelection,f=s.isFocused,m=s.prevWasFocused,b=s.instancePrefix,v=o.options,y=o.value,p=o.menuIsOpen,h=o.inputValue,g=o.isMulti,C=ua(y),x={};if(a&&(y!==a.value||v!==a.options||p!==a.menuIsOpen||h!==a.inputValue)){var I=p?B7(o,C):[],E=p?e1(ga(o,C),"".concat(b,"-option")):[],_=i?V7(s,C):null,A=G7(s,I),S=Vc(E,A);x={selectValue:C,focusedOption:A,focusedOptionId:S,focusableOptionsWithIds:E,focusedValue:_,clearFocusValueOnUpdate:!1}}var L=c!=null&&o!==a?{inputIsHidden:c,inputIsHiddenAfterUpdate:void 0}:{},k=l,D=f&&m;return f&&!D&&(k={value:Ho(g,C,C[0]||null),options:C,action:"initial-input-focus"},D=!m),(l==null?void 0:l.action)==="initial-input-focus"&&(k=null),ne(ne(ne({},x),L),{},{prevProps:o,ariaSelection:k,prevWasFocused:D})}}]),n}(w.Component);ba.defaultProps=j7;var W7=w.forwardRef(function(e,t){var n=gc(e);return T.createElement(ba,ue({ref:t},n))}),Z7=W7;const X7=d.styled(d.Box)`
609
+ `]))),CC=function(t,n){var r=t.isFocused,o=t.size,s=t.theme,a=s.colors,i=s.spacing.baseUnit;return ne({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?a.neutral60:a.neutral20,padding:i*2})},Nc=function(t){var n=t.delay,r=t.offset;return ae("span",{css:Ac({animation:"".concat(yC," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},process.env.NODE_ENV==="production"?"":";label:LoadingDot;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4LCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7XG4gIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lLFxuICBDU1NPYmplY3RXaXRoTGFiZWwsXG4gIEdyb3VwQmFzZSxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgZ2V0U3R5bGVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEljb25zXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgU3ZnID0gKHtcbiAgc2l6ZSxcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU6IG51bWJlciB9KSA9PiAoXG4gIDxzdmdcbiAgICBoZWlnaHQ9e3NpemV9XG4gICAgd2lkdGg9e3NpemV9XG4gICAgdmlld0JveD1cIjAgMCAyMCAyMFwiXG4gICAgYXJpYS1oaWRkZW49XCJ0cnVlXCJcbiAgICBmb2N1c2FibGU9XCJmYWxzZVwiXG4gICAgY3NzPXt7XG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIGZpbGw6ICdjdXJyZW50Q29sb3InLFxuICAgICAgbGluZUhlaWdodDogMSxcbiAgICAgIHN0cm9rZTogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBzdHJva2VXaWR0aDogMCxcbiAgICB9fVxuICAgIHsuLi5wcm9wc31cbiAgLz5cbik7XG5cbmV4cG9ydCB0eXBlIENyb3NzSWNvblByb3BzID0gSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZT86IG51bWJlciB9O1xuZXhwb3J0IGNvbnN0IENyb3NzSWNvbiA9IChwcm9wczogQ3Jvc3NJY29uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTE0LjM0OCAxNC44NDljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDBsLTIuNjUxLTMuMDMwLTIuNjUxIDMuMDI5Yy0wLjQ2OSAwLjQ2OS0xLjIyOSAwLjQ2OS0xLjY5NyAwLTAuNDY5LTAuNDY5LTAuNDY5LTEuMjI5IDAtMS42OTdsMi43NTgtMy4xNS0yLjc1OS0zLjE1MmMtMC40NjktMC40NjktMC40NjktMS4yMjggMC0xLjY5N3MxLjIyOC0wLjQ2OSAxLjY5NyAwbDIuNjUyIDMuMDMxIDIuNjUxLTMuMDMxYzAuNDY5LTAuNDY5IDEuMjI4LTAuNDY5IDEuNjk3IDBzMC40NjkgMS4yMjkgMCAxLjY5N2wtMi43NTggMy4xNTIgMi43NTggMy4xNWMwLjQ2OSAwLjQ2OSAwLjQ2OSAxLjIyOSAwIDEuNjk4elwiIC8+XG4gIDwvU3ZnPlxuKTtcbmV4cG9ydCB0eXBlIERvd25DaGV2cm9uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgRG93bkNoZXZyb24gPSAocHJvcHM6IERvd25DaGV2cm9uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTQuNTE2IDcuNTQ4YzAuNDM2LTAuNDQ2IDEuMDQzLTAuNDgxIDEuNTc2IDBsMy45MDggMy43NDcgMy45MDgtMy43NDdjMC41MzMtMC40ODEgMS4xNDEtMC40NDYgMS41NzQgMCAwLjQzNiAwLjQ0NSAwLjQwOCAxLjE5NyAwIDEuNjE1LTAuNDA2IDAuNDE4LTQuNjk1IDQuNTAyLTQuNjk1IDQuNTAyLTAuMjE3IDAuMjIzLTAuNTAyIDAuMzM1LTAuNzg3IDAuMzM1cy0wLjU3LTAuMTEyLTAuNzg5LTAuMzM1YzAgMC00LjI4Ny00LjA4NC00LjY5NS00LjUwMnMtMC40MzYtMS4xNyAwLTEuNjE1elwiIC8+XG4gIDwvU3ZnPlxuKTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEJ1dHRvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xufVxuXG5jb25zdCBiYXNlQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTpcbiAgICB8IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbiAgICB8IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JDb250YWluZXInLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICAgICc6aG92ZXInOiB7XG4gICAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsODAgOiBjb2xvcnMubmV1dHJhbDQwLFxuICAgICAgICB9LFxuICAgICAgfSksXG59KTtcblxuZXhwb3J0IGNvbnN0IGRyb3Bkb3duSW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBEcm9wZG93bkluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2Ryb3Bkb3duSW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdkcm9wZG93bi1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPERvd25DaGV2cm9uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuZXhwb3J0IGludGVyZmFjZSBDbGVhckluZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFRoZSBjaGlsZHJlbiB0byBiZSByZW5kZXJlZCBpbnNpZGUgdGhlIGluZGljYXRvci4gKi9cbiAgY2hpbGRyZW4/OiBSZWFjdE5vZGU7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbn1cblxuZXhwb3J0IGNvbnN0IGNsZWFySW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBDbGVhckluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2NsZWFySW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdjbGVhci1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPENyb3NzSWNvbiAvPn1cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG5cbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuLy8gU2VwYXJhdG9yXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuZXhwb3J0IGludGVyZmFjZSBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaW5uZXJQcm9wcz86IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3BhbiddO1xufVxuXG5leHBvcnQgY29uc3QgaW5kaWNhdG9yU2VwYXJhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNEaXNhYmxlZCxcbiAgICB0aGVtZToge1xuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgICAgY29sb3JzLFxuICAgIH0sXG4gIH06IEluZGljYXRvclNlcGFyYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+LFxuICB1bnN0eWxlZDogYm9vbGVhblxuKTogQ1NTT2JqZWN0V2l0aExhYmVsID0+ICh7XG4gIGxhYmVsOiAnaW5kaWNhdG9yU2VwYXJhdG9yJyxcbiAgYWxpZ25TZWxmOiAnc3RyZXRjaCcsXG4gIHdpZHRoOiAxLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGJhY2tncm91bmRDb2xvcjogaXNEaXNhYmxlZCA/IGNvbG9ycy5uZXV0cmFsMTAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBtYXJnaW5Cb3R0b206IGJhc2VVbml0ICogMixcbiAgICAgICAgbWFyZ2luVG9wOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU2VwYXJhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxzcGFuXG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnaW5kaWNhdG9yU2VwYXJhdG9yJywge1xuICAgICAgICAnaW5kaWNhdG9yLXNlcGFyYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAvPlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBMb2FkaW5nXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgbG9hZGluZ0RvdEFuaW1hdGlvbnMgPSBrZXlmcmFtZXNgXG4gIDAlLCA4MCUsIDEwMCUgeyBvcGFjaXR5OiAwOyB9XG4gIDQwJSB7IG9wYWNpdHk6IDE7IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBsb2FkaW5nSW5kaWNhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHNpemUsXG4gICAgdGhlbWU6IHtcbiAgICAgIGNvbG9ycyxcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICB9LFxuICB9OiBMb2FkaW5nSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdsb2FkaW5nSW5kaWNhdG9yJyxcbiAgZGlzcGxheTogJ2ZsZXgnLFxuICB0cmFuc2l0aW9uOiAnY29sb3IgMTUwbXMnLFxuICBhbGlnblNlbGY6ICdjZW50ZXInLFxuICBmb250U2l6ZTogc2l6ZSxcbiAgbGluZUhlaWdodDogMSxcbiAgbWFyZ2luUmlnaHQ6IHNpemUsXG4gIHRleHRBbGlnbjogJ2NlbnRlcicsXG4gIHZlcnRpY2FsQWxpZ246ICdtaWRkbGUnLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGNvbG9yOiBpc0ZvY3VzZWQgPyBjb2xvcnMubmV1dHJhbDYwIDogY29sb3JzLm5ldXRyYWwyMCxcbiAgICAgICAgcGFkZGluZzogYmFzZVVuaXQgKiAyLFxuICAgICAgfSksXG59KTtcblxuaW50ZXJmYWNlIExvYWRpbmdEb3RQcm9wcyB7XG4gIGRlbGF5OiBudW1iZXI7XG4gIG9mZnNldDogYm9vbGVhbjtcbn1cbmNvbnN0IExvYWRpbmdEb3QgPSAoeyBkZWxheSwgb2Zmc2V0IH06IExvYWRpbmdEb3RQcm9wcykgPT4gKFxuICA8c3BhblxuICAgIGNzcz17e1xuICAgICAgYW5pbWF0aW9uOiBgJHtsb2FkaW5nRG90QW5pbWF0aW9uc30gMXMgZWFzZS1pbi1vdXQgJHtkZWxheX1tcyBpbmZpbml0ZTtgLFxuICAgICAgYmFja2dyb3VuZENvbG9yOiAnY3VycmVudENvbG9yJyxcbiAgICAgIGJvcmRlclJhZGl1czogJzFlbScsXG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIG1hcmdpbkxlZnQ6IG9mZnNldCA/ICcxZW0nIDogdW5kZWZpbmVkLFxuICAgICAgaGVpZ2h0OiAnMWVtJyxcbiAgICAgIHZlcnRpY2FsQWxpZ246ICd0b3AnLFxuICAgICAgd2lkdGg6ICcxZW0nLFxuICAgIH19XG4gIC8+XG4pO1xuXG5leHBvcnQgaW50ZXJmYWNlIExvYWRpbmdJbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgLyoqIFNldCBzaXplIG9mIHRoZSBjb250YWluZXIuICovXG4gIHNpemU6IG51bWJlcjtcbn1cbmV4cG9ydCBjb25zdCBMb2FkaW5nSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KHtcbiAgaW5uZXJQcm9wcyxcbiAgaXNSdGwsXG4gIHNpemUgPSA0LFxuICAuLi5yZXN0UHJvcHNcbn06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPikgPT4ge1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKFxuICAgICAgICB7IC4uLnJlc3RQcm9wcywgaW5uZXJQcm9wcywgaXNSdGwsIHNpemUgfSxcbiAgICAgICAgJ2xvYWRpbmdJbmRpY2F0b3InLFxuICAgICAgICB7XG4gICAgICAgICAgaW5kaWNhdG9yOiB0cnVlLFxuICAgICAgICAgICdsb2FkaW5nLWluZGljYXRvcic6IHRydWUsXG4gICAgICAgIH1cbiAgICAgICl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MH0gb2Zmc2V0PXtpc1J0bH0gLz5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXsxNjB9IG9mZnNldCAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezMyMH0gb2Zmc2V0PXshaXNSdGx9IC8+XG4gICAgPC9kaXY+XG4gICk7XG59O1xuIl19 */")})},xC=function(t){var n=t.innerProps,r=t.isRtl,o=t.size,s=o===void 0?4:o,a=Jt(t,lC);return ae("div",ue({},He(ne(ne({},a),{},{innerProps:n,isRtl:r,size:s}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),ae(Nc,{delay:0,offset:r}),ae(Nc,{delay:160,offset:!0}),ae(Nc,{delay:320,offset:!r}))},vC=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.theme,a=s.colors,i=s.borderRadius,c=s.spacing;return ne({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:c.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?a.neutral5:a.neutral0,borderColor:r?a.neutral10:o?a.primary:a.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(a.primary):void 0,"&:hover":{borderColor:o?a.primary:a.neutral30}})},EC=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.innerRef,a=t.innerProps,i=t.menuIsOpen;return ae("div",ue({ref:s},He(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":o,"control--menu-is-open":i}),a,{"aria-disabled":r||void 0}),n)},IC=EC,wC=["data"],_C=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},SC=function(t){var n=t.children,r=t.cx,o=t.getStyles,s=t.getClassNames,a=t.Heading,i=t.headingProps,c=t.innerProps,l=t.label,f=t.theme,m=t.selectProps;return ae("div",ue({},He(t,"group",{group:!0}),c),ae(a,ue({},i,{selectProps:m,theme:f,getStyles:o,getClassNames:s,cx:r}),l),ae("div",null,n))},AC=function(t,n){var r=t.theme,o=r.colors,s=r.spacing;return ne({label:"group",cursor:"default",display:"block"},n?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:s.baseUnit*3,paddingRight:s.baseUnit*3,textTransform:"uppercase"})},TC=function(t){var n=Ef(t);n.data;var r=Jt(n,wC);return ae("div",ue({},He(t,"groupHeading",{"group-heading":!0}),r))},LC=SC,OC=["innerRef","isDisabled","isHidden","inputClassName"],FC=function(t,n){var r=t.isDisabled,o=t.value,s=t.theme,a=s.spacing,i=s.colors;return ne(ne({visibility:r?"hidden":"visible",transform:o?"translateZ(0)":""},kC),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:i.neutral80})},Nf={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},kC={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":ne({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Nf)},DC=function(t){return ne({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},Nf)},NC=function(t){var n=t.cx,r=t.value,o=Ef(t),s=o.innerRef,a=o.isDisabled,i=o.isHidden,c=o.inputClassName,l=Jt(o,OC);return ae("div",ue({},He(t,"input",{"input-container":!0}),{"data-value":r||""}),ae("input",ue({className:n({input:!0},c),ref:s,style:DC(i),disabled:a},l)))},RC=NC,MC=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,a=r.colors;return ne({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:a.neutral10,borderRadius:s/2,margin:o.baseUnit/2})},PC=function(t,n){var r=t.theme,o=r.borderRadius,s=r.colors,a=t.cropWithEllipsis;return ne({overflow:"hidden",textOverflow:a||a===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:o/2,color:s.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},jC=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,a=r.colors,i=t.isFocused;return ne({alignItems:"center",display:"flex"},n?{}:{borderRadius:s/2,backgroundColor:i?a.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}})},Rf=function(t){var n=t.children,r=t.innerProps;return ae("div",r,n)},BC=Rf,VC=Rf;function GC(e){var t=e.children,n=e.innerProps;return ae("div",ue({role:"button"},n),t||ae(Dc,{size:14}))}var HC=function(t){var n=t.children,r=t.components,o=t.data,s=t.innerProps,a=t.isDisabled,i=t.removeProps,c=t.selectProps,l=r.Container,f=r.Label,m=r.Remove;return ae(l,{data:o,innerProps:ne(ne({},He(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),s),selectProps:c},ae(f,{data:o,innerProps:ne({},He(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:c},n),ae(m,{data:o,innerProps:ne(ne({},He(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},i),selectProps:c}))},WC=HC,ZC=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.isSelected,a=t.theme,i=a.spacing,c=a.colors;return ne({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:s?c.primary:o?c.primary25:"transparent",color:r?c.neutral20:s?c.neutral0:"inherit",padding:"".concat(i.baseUnit*2,"px ").concat(i.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:s?c.primary:c.primary50}})},XC=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.isSelected,a=t.innerRef,i=t.innerProps;return ae("div",ue({},He(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":o,"option--is-selected":s}),{ref:a,"aria-disabled":r},i),n)},zC=XC,YC=function(t,n){var r=t.theme,o=r.spacing,s=r.colors;return ne({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:s.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},JC=function(t){var n=t.children,r=t.innerProps;return ae("div",ue({},He(t,"placeholder",{placeholder:!0}),r),n)},qC=JC,$C=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing,a=o.colors;return ne({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?a.neutral40:a.neutral80,marginLeft:s.baseUnit/2,marginRight:s.baseUnit/2})},QC=function(t){var n=t.children,r=t.isDisabled,o=t.innerProps;return ae("div",ue({},He(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),o),n)},UC=QC,ln={ClearIndicator:gC,Control:IC,DropdownIndicator:pC,DownChevron:kf,CrossIcon:Dc,Group:LC,GroupHeading:TC,IndicatorsContainer:iC,IndicatorSeparator:bC,Input:RC,LoadingIndicator:xC,Menu:Y6,MenuList:q6,MenuPortal:tC,LoadingMessage:K6,NoOptionsMessage:U6,MultiValue:WC,MultiValueContainer:BC,MultiValueLabel:VC,MultiValueRemove:GC,Option:zC,Placeholder:qC,SelectContainer:rC,SingleValue:UC,ValueContainer:sC},KC=function(t){return ne(ne({},ln),t.components)},Mf=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function e7(e,t){return!!(e===t||Mf(e)&&Mf(t))}function t7(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!e7(e[n],t[n]))return!1;return!0}function n7(e,t){t===void 0&&(t=t7);var n=null;function r(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];if(n&&n.lastThis===this&&t(o,n.lastArgs))return n.lastResult;var a=e.apply(this,o);return n={lastResult:a,lastArgs:o,lastThis:this},a}return r.clear=function(){n=null},r}function r7(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}for(var o7=process.env.NODE_ENV==="production"?{name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"}:{name:"1f43avz-a11yText-A11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;label:A11yText;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFNSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",toString:r7},s7=function(t){return ae("span",ue({css:o7},t))},Pf=s7,a7={guidance:function(t){var n=t.isSearchable,r=t.isMulti,o=t.tabSelectsValue,s=t.context,a=t.isInitialFocus;switch(s){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return a?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,o=r===void 0?"":r,s=t.labels,a=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(o,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(s.length>1?"s":""," ").concat(s.join(","),", selected.");case"select-option":return a?"option ".concat(o," is disabled. Select another option."):"option ".concat(o,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,o=t.options,s=t.label,a=s===void 0?"":s,i=t.selectValue,c=t.isDisabled,l=t.isSelected,f=t.isAppleDevice,m=function(p,h){return p&&p.length?"".concat(p.indexOf(h)+1," of ").concat(p.length):""};if(n==="value"&&i)return"value ".concat(a," focused, ").concat(m(i,r),".");if(n==="menu"&&f){var b=c?" disabled":"",v="".concat(l?" selected":"").concat(b);return"".concat(a).concat(v,", ").concat(m(o,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},i7=function(t){var n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,s=t.focusableOptions,a=t.isFocused,i=t.selectValue,c=t.selectProps,l=t.id,f=t.isAppleDevice,m=c.ariaLiveMessages,b=c.getOptionLabel,v=c.inputValue,y=c.isMulti,p=c.isOptionDisabled,h=c.isSearchable,g=c.menuIsOpen,C=c.options,x=c.screenReaderStatus,I=c.tabSelectsValue,E=c.isLoading,_=c["aria-label"],A=c["aria-live"],S=w.useMemo(function(){return ne(ne({},a7),m||{})},[m]),L=w.useMemo(function(){var J="";if(n&&S.onChange){var $=n.option,H=n.options,X=n.removedValue,q=n.removedValues,se=n.value,de=function(re){return Array.isArray(re)?null:re},B=X||$||de(se),P=B?b(B):"",W=H||q||void 0,G=W?W.map(b):[],Y=ne({isDisabled:B&&p(B,i),label:P,labels:G},n);J=S.onChange(Y)}return J},[n,S,p,i,b]),k=w.useMemo(function(){var J="",$=r||o,H=!!(r&&i&&i.includes(r));if($&&S.onFocus){var X={focused:$,label:b($),isDisabled:p($,i),isSelected:H,options:s,context:$===r?"menu":"value",selectValue:i,isAppleDevice:f};J=S.onFocus(X)}return J},[r,o,b,p,S,s,i,f]),D=w.useMemo(function(){var J="";if(g&&C.length&&!E&&S.onFilter){var $=x({count:s.length});J=S.onFilter({inputValue:v,resultsMessage:$})}return J},[s,v,g,S,C,x,E]),N=(n==null?void 0:n.action)==="initial-input-focus",M=w.useMemo(function(){var J="";if(S.guidance){var $=o?"value":g?"menu":"input";J=S.guidance({"aria-label":_,context:$,isDisabled:r&&p(r,i),isMulti:y,isSearchable:h,tabSelectsValue:I,isInitialFocus:N})}return J},[_,r,o,y,p,h,g,S,i,I,N]),V=ae(w.Fragment,null,ae("span",{id:"aria-selection"},L),ae("span",{id:"aria-focused"},k),ae("span",{id:"aria-results"},D),ae("span",{id:"aria-guidance"},M));return ae(w.Fragment,null,ae(Pf,{id:l},N&&V),ae(Pf,{"aria-live":A,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!N&&V))},c7=i7,Rc=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],l7=new RegExp("["+Rc.map(function(e){return e.letters}).join("")+"]","g"),jf={},Mc=0;Mc<Rc.length;Mc++)for(var Pc=Rc[Mc],jc=0;jc<Pc.letters.length;jc++)jf[Pc.letters[jc]]=Pc.base;var Bf=function(t){return t.replace(l7,function(n){return jf[n]})},u7=n7(Bf),Vf=function(t){return t.replace(/^\s+|\s+$/g,"")},d7=function(t){return"".concat(t.label," ").concat(t.value)},f7=function(t){return function(n,r){if(n.data.__isNew__)return!0;var o=ne({ignoreCase:!0,ignoreAccents:!0,stringify:d7,trim:!0,matchFrom:"any"},t),s=o.ignoreCase,a=o.ignoreAccents,i=o.stringify,c=o.trim,l=o.matchFrom,f=c?Vf(r):r,m=c?Vf(i(n)):i(n);return s&&(f=f.toLowerCase(),m=m.toLowerCase()),a&&(f=u7(f),m=Bf(m)),l==="start"?m.substr(0,f.length)===f:m.indexOf(f)>-1}},p7=["innerRef"];function h7(e){var t=e.innerRef,n=Jt(e,p7),r=B6(n,"onExited","in","enter","exit","appear");return ae("input",ue({ref:t},r,{css:Ac({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},process.env.NODE_ENV==="production"?"":";label:DummyInput;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCTSIsImZpbGUiOiJEdW1teUlucHV0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVmIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgcmVtb3ZlUHJvcHMgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIER1bW15SW5wdXQoe1xuICBpbm5lclJlZixcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snaW5wdXQnXSAmIHtcbiAgcmVhZG9ubHkgaW5uZXJSZWY6IFJlZjxIVE1MSW5wdXRFbGVtZW50Pjtcbn0pIHtcbiAgLy8gUmVtb3ZlIGFuaW1hdGlvbiBwcm9wcyBub3QgbWVhbnQgZm9yIEhUTUwgZWxlbWVudHNcbiAgY29uc3QgZmlsdGVyZWRQcm9wcyA9IHJlbW92ZVByb3BzKFxuICAgIHByb3BzLFxuICAgICdvbkV4aXRlZCcsXG4gICAgJ2luJyxcbiAgICAnZW50ZXInLFxuICAgICdleGl0JyxcbiAgICAnYXBwZWFyJ1xuICApO1xuXG4gIHJldHVybiAoXG4gICAgPGlucHV0XG4gICAgICByZWY9e2lubmVyUmVmfVxuICAgICAgey4uLmZpbHRlcmVkUHJvcHN9XG4gICAgICBjc3M9e3tcbiAgICAgICAgbGFiZWw6ICdkdW1teUlucHV0JyxcbiAgICAgICAgLy8gZ2V0IHJpZCBvZiBhbnkgZGVmYXVsdCBzdHlsZXNcbiAgICAgICAgYmFja2dyb3VuZDogMCxcbiAgICAgICAgYm9yZGVyOiAwLFxuICAgICAgICAvLyBpbXBvcnRhbnQhIHRoaXMgaGlkZXMgdGhlIGZsYXNoaW5nIGN1cnNvclxuICAgICAgICBjYXJldENvbG9yOiAndHJhbnNwYXJlbnQnLFxuICAgICAgICBmb250U2l6ZTogJ2luaGVyaXQnLFxuICAgICAgICBncmlkQXJlYTogJzEgLyAxIC8gMiAvIDMnLFxuICAgICAgICBvdXRsaW5lOiAwLFxuICAgICAgICBwYWRkaW5nOiAwLFxuICAgICAgICAvLyBpbXBvcnRhbnQhIHdpdGhvdXQgYHdpZHRoYCBicm93c2VycyB3b24ndCBhbGxvdyBmb2N1c1xuICAgICAgICB3aWR0aDogMSxcblxuICAgICAgICAvLyByZW1vdmUgY3Vyc29yIG9uIGRlc2t0b3BcbiAgICAgICAgY29sb3I6ICd0cmFuc3BhcmVudCcsXG5cbiAgICAgICAgLy8gcmVtb3ZlIGN1cnNvciBvbiBtb2JpbGUgd2hpbHN0IG1haW50YWluaW5nIFwic2Nyb2xsIGludG8gdmlld1wiIGJlaGF2aW91clxuICAgICAgICBsZWZ0OiAtMTAwLFxuICAgICAgICBvcGFjaXR5OiAwLFxuICAgICAgICBwb3NpdGlvbjogJ3JlbGF0aXZlJyxcbiAgICAgICAgdHJhbnNmb3JtOiAnc2NhbGUoLjAxKScsXG4gICAgICB9fVxuICAgIC8+XG4gICk7XG59XG4iXX0= */")}))}var g7=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function m7(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,s=e.onTopLeave,a=w.useRef(!1),i=w.useRef(!1),c=w.useRef(0),l=w.useRef(null),f=w.useCallback(function(h,g){if(l.current!==null){var C=l.current,x=C.scrollTop,I=C.scrollHeight,E=C.clientHeight,_=l.current,A=g>0,S=I-E-x,L=!1;S>g&&a.current&&(r&&r(h),a.current=!1),A&&i.current&&(s&&s(h),i.current=!1),A&&g>S?(n&&!a.current&&n(h),_.scrollTop=I,L=!0,a.current=!0):!A&&-g>x&&(o&&!i.current&&o(h),_.scrollTop=0,L=!0,i.current=!0),L&&g7(h)}},[n,r,o,s]),m=w.useCallback(function(h){f(h,h.deltaY)},[f]),b=w.useCallback(function(h){c.current=h.changedTouches[0].clientY},[]),v=w.useCallback(function(h){var g=c.current-h.changedTouches[0].clientY;f(h,g)},[f]),y=w.useCallback(function(h){if(h){var g=M6?{passive:!1}:!1;h.addEventListener("wheel",m,g),h.addEventListener("touchstart",b,g),h.addEventListener("touchmove",v,g)}},[v,b,m]),p=w.useCallback(function(h){h&&(h.removeEventListener("wheel",m,!1),h.removeEventListener("touchstart",b,!1),h.removeEventListener("touchmove",v,!1))},[v,b,m]);return w.useEffect(function(){if(t){var h=l.current;return y(h),function(){p(h)}}},[t,y,p]),function(h){l.current=h}}var Gf=["boxSizing","height","overflow","paddingRight","position"],Hf={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Wf(e){e.preventDefault()}function Zf(e){e.stopPropagation()}function Xf(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function zf(){return"ontouchstart"in window||navigator.maxTouchPoints}var Yf=!!(typeof window<"u"&&window.document&&window.document.createElement),Wo=0,Yr={capture:!1,passive:!1};function b7(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,o=w.useRef({}),s=w.useRef(null),a=w.useCallback(function(c){if(Yf){var l=document.body,f=l&&l.style;if(r&&Gf.forEach(function(y){var p=f&&f[y];o.current[y]=p}),r&&Wo<1){var m=parseInt(o.current.paddingRight,10)||0,b=document.body?document.body.clientWidth:0,v=window.innerWidth-b+m||0;Object.keys(Hf).forEach(function(y){var p=Hf[y];f&&(f[y]=p)}),f&&(f.paddingRight="".concat(v,"px"))}l&&zf()&&(l.addEventListener("touchmove",Wf,Yr),c&&(c.addEventListener("touchstart",Xf,Yr),c.addEventListener("touchmove",Zf,Yr))),Wo+=1}},[r]),i=w.useCallback(function(c){if(Yf){var l=document.body,f=l&&l.style;Wo=Math.max(Wo-1,0),r&&Wo<1&&Gf.forEach(function(m){var b=o.current[m];f&&(f[m]=b)}),l&&zf()&&(l.removeEventListener("touchmove",Wf,Yr),c&&(c.removeEventListener("touchstart",Xf,Yr),c.removeEventListener("touchmove",Zf,Yr)))}},[r]);return w.useEffect(function(){if(t){var c=s.current;return a(c),function(){i(c)}}},[t,a,i]),function(c){s.current=c}}function y7(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var C7=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},x7=process.env.NODE_ENV==="production"?{name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"}:{name:"bp8cua-ScrollManager",styles:"position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9EVSIsImZpbGUiOiJTY3JvbGxNYW5hZ2VyLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgRnJhZ21lbnQsIFJlYWN0RWxlbWVudCwgUmVmQ2FsbGJhY2ssIE1vdXNlRXZlbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgdXNlU2Nyb2xsQ2FwdHVyZSBmcm9tICcuL3VzZVNjcm9sbENhcHR1cmUnO1xuaW1wb3J0IHVzZVNjcm9sbExvY2sgZnJvbSAnLi91c2VTY3JvbGxMb2NrJztcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgcmVhZG9ubHkgY2hpbGRyZW46IChyZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PikgPT4gUmVhY3RFbGVtZW50O1xuICByZWFkb25seSBsb2NrRW5hYmxlZDogYm9vbGVhbjtcbiAgcmVhZG9ubHkgY2FwdHVyZUVuYWJsZWQ6IGJvb2xlYW47XG4gIHJlYWRvbmx5IG9uQm90dG9tQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Cb3R0b21MZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG4gIHJlYWRvbmx5IG9uVG9wQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Ub3BMZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG59XG5cbmNvbnN0IGJsdXJTZWxlY3RJbnB1dCA9IChldmVudDogTW91c2VFdmVudDxIVE1MRGl2RWxlbWVudD4pID0+IHtcbiAgY29uc3QgZWxlbWVudCA9IGV2ZW50LnRhcmdldCBhcyBIVE1MRGl2RWxlbWVudDtcbiAgcmV0dXJuIChcbiAgICBlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCAmJlxuICAgIChlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCBhcyBIVE1MRWxlbWVudCkuYmx1cigpXG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBTY3JvbGxNYW5hZ2VyKHtcbiAgY2hpbGRyZW4sXG4gIGxvY2tFbmFibGVkLFxuICBjYXB0dXJlRW5hYmxlZCA9IHRydWUsXG4gIG9uQm90dG9tQXJyaXZlLFxuICBvbkJvdHRvbUxlYXZlLFxuICBvblRvcEFycml2ZSxcbiAgb25Ub3BMZWF2ZSxcbn06IFByb3BzKSB7XG4gIGNvbnN0IHNldFNjcm9sbENhcHR1cmVUYXJnZXQgPSB1c2VTY3JvbGxDYXB0dXJlKHtcbiAgICBpc0VuYWJsZWQ6IGNhcHR1cmVFbmFibGVkLFxuICAgIG9uQm90dG9tQXJyaXZlLFxuICAgIG9uQm90dG9tTGVhdmUsXG4gICAgb25Ub3BBcnJpdmUsXG4gICAgb25Ub3BMZWF2ZSxcbiAgfSk7XG4gIGNvbnN0IHNldFNjcm9sbExvY2tUYXJnZXQgPSB1c2VTY3JvbGxMb2NrKHsgaXNFbmFibGVkOiBsb2NrRW5hYmxlZCB9KTtcblxuICBjb25zdCB0YXJnZXRSZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PiA9IChlbGVtZW50KSA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPEZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */",toString:y7};function v7(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=r===void 0?!0:r,s=e.onBottomArrive,a=e.onBottomLeave,i=e.onTopArrive,c=e.onTopLeave,l=m7({isEnabled:o,onBottomArrive:s,onBottomLeave:a,onTopArrive:i,onTopLeave:c}),f=b7({isEnabled:n}),m=function(v){l(v),f(v)};return ae(w.Fragment,null,n&&ae("div",{onClick:C7,css:x7}),t(m))}function E7(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var I7=process.env.NODE_ENV==="production"?{name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"}:{name:"5kkxb2-requiredInput-RequiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%;label:RequiredInput;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVpcmVkSW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNJIiwiZmlsZSI6IlJlcXVpcmVkSW5wdXQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBGb2N1c0V2ZW50SGFuZGxlciwgRnVuY3Rpb25Db21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmNvbnN0IFJlcXVpcmVkSW5wdXQ6IEZ1bmN0aW9uQ29tcG9uZW50PHtcbiAgcmVhZG9ubHkgbmFtZT86IHN0cmluZztcbiAgcmVhZG9ubHkgb25Gb2N1czogRm9jdXNFdmVudEhhbmRsZXI8SFRNTElucHV0RWxlbWVudD47XG59PiA9ICh7IG5hbWUsIG9uRm9jdXMgfSkgPT4gKFxuICA8aW5wdXRcbiAgICByZXF1aXJlZFxuICAgIG5hbWU9e25hbWV9XG4gICAgdGFiSW5kZXg9ey0xfVxuICAgIGFyaWEtaGlkZGVuPVwidHJ1ZVwiXG4gICAgb25Gb2N1cz17b25Gb2N1c31cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAncmVxdWlyZWRJbnB1dCcsXG4gICAgICBvcGFjaXR5OiAwLFxuICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBib3R0b206IDAsXG4gICAgICBsZWZ0OiAwLFxuICAgICAgcmlnaHQ6IDAsXG4gICAgICB3aWR0aDogJzEwMCUnLFxuICAgIH19XG4gICAgLy8gUHJldmVudCBgU3dpdGNoaW5nIGZyb20gdW5jb250cm9sbGVkIHRvIGNvbnRyb2xsZWRgIGVycm9yXG4gICAgdmFsdWU9XCJcIlxuICAgIG9uQ2hhbmdlPXsoKSA9PiB7fX1cbiAgLz5cbik7XG5cbmV4cG9ydCBkZWZhdWx0IFJlcXVpcmVkSW5wdXQ7XG4iXX0= */",toString:E7},w7=function(t){var n=t.name,r=t.onFocus;return ae("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:I7,value:"",onChange:function(){}})},_7=w7;function Bc(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function S7(){return Bc(/^iPhone/i)}function Jf(){return Bc(/^Mac/i)}function A7(){return Bc(/^iPad/i)||Jf()&&navigator.maxTouchPoints>1}function T7(){return S7()||A7()}function L7(){return Jf()||T7()}var O7=function(t){return t.label},qf=function(t){return t.label},$f=function(t){return t.value},F7=function(t){return!!t.isDisabled},k7={clearIndicator:hC,container:nC,control:vC,dropdownIndicator:fC,group:_C,groupHeading:AC,indicatorsContainer:aC,indicatorSeparator:mC,input:FC,loadingIndicator:CC,loadingMessage:Q6,menu:Z6,menuList:J6,menuPortal:eC,multiValue:MC,multiValueLabel:PC,multiValueRemove:jC,noOptionsMessage:$6,option:ZC,placeholder:YC,singleValue:$C,valueContainer:oC},D7={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},N7=4,Qf=4,R7=38,M7=Qf*2,P7={baseUnit:Qf,controlHeight:R7,menuGutter:M7},Vc={borderRadius:N7,colors:D7,spacing:P7},j7={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:_f(),captureMenuScroll:!_f(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:f7(),formatGroupLabel:O7,getOptionLabel:qf,getOptionValue:$f,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:F7,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!N6(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Uf(e,t,n,r){var o=r1(e,t,n),s=o1(e,t,n),a=n1(e,t),i=ma(e,t);return{type:"option",data:t,isDisabled:o,isSelected:s,label:a,value:i,index:r}}function ga(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(a,i){return Uf(e,a,t,i)}).filter(function(a){return t1(e,a)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var s=Uf(e,n,t,r);return t1(e,s)?s:void 0}).filter(P6)}function Kf(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,Wr(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function e1(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,Wr(r.options.map(function(o){return{data:o.data,id:"".concat(t,"-").concat(r.index,"-").concat(o.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function B7(e,t){return Kf(ga(e,t))}function t1(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,s=t.isSelected,a=t.label,i=t.value;return(!a1(e)||!s)&&s1(e,{label:a,value:i,data:o},r)}function V7(e,t){var n=e.focusedValue,r=e.selectValue,o=r.indexOf(n);if(o>-1){var s=t.indexOf(n);if(s>-1)return n;if(o<t.length)return t[o]}return null}function G7(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var Gc=function(t,n){var r,o=(r=t.find(function(s){return s.data===n}))===null||r===void 0?void 0:r.id;return o||null},n1=function(t,n){return t.getOptionLabel(n)},ma=function(t,n){return t.getOptionValue(n)};function r1(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function o1(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=ma(e,t);return n.some(function(o){return ma(e,o)===r})}function s1(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var a1=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},H7=1,ba=function(e){n9(n,e);var t=s9(n);function n(r){var o;if(e9(this,n),o=t.call(this,r),o.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},o.blockOptionHover=!1,o.isComposing=!1,o.commonProps=void 0,o.initialTouchX=0,o.initialTouchY=0,o.openAfterFocus=!1,o.scrollToFocusedOptionOnUpdate=!1,o.userIsDragging=void 0,o.isAppleDevice=L7(),o.controlRef=null,o.getControlRef=function(c){o.controlRef=c},o.focusedOptionRef=null,o.getFocusedOptionRef=function(c){o.focusedOptionRef=c},o.menuListRef=null,o.getMenuListRef=function(c){o.menuListRef=c},o.inputRef=null,o.getInputRef=function(c){o.inputRef=c},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(c,l){var f=o.props,m=f.onChange,b=f.name;l.name=b,o.ariaOnChange(c,l),m(c,l)},o.setValue=function(c,l,f){var m=o.props,b=m.closeMenuOnSelect,v=m.isMulti,y=m.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:y}),b&&(o.setState({inputIsHiddenAfterUpdate:!v}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(c,{action:l,option:f})},o.selectOption=function(c){var l=o.props,f=l.blurInputOnSelect,m=l.isMulti,b=l.name,v=o.state.selectValue,y=m&&o.isOptionSelected(c,v),p=o.isOptionDisabled(c,v);if(y){var h=o.getOptionValue(c);o.setValue(v.filter(function(g){return o.getOptionValue(g)!==h}),"deselect-option",c)}else if(!p)m?o.setValue([].concat(Wr(v),[c]),"select-option",c):o.setValue(c,"select-option");else{o.ariaOnChange(c,{action:"select-option",option:c,name:b});return}f&&o.blurInput()},o.removeValue=function(c){var l=o.props.isMulti,f=o.state.selectValue,m=o.getOptionValue(c),b=f.filter(function(y){return o.getOptionValue(y)!==m}),v=Ho(l,b,b[0]||null);o.onChange(v,{action:"remove-value",removedValue:c}),o.focusInput()},o.clearValue=function(){var c=o.state.selectValue;o.onChange(Ho(o.props.isMulti,[],null),{action:"clear",removedValues:c})},o.popValue=function(){var c=o.props.isMulti,l=o.state.selectValue,f=l[l.length-1],m=l.slice(0,l.length-1),b=Ho(c,m,m[0]||null);f&&o.onChange(b,{action:"pop-value",removedValue:f})},o.getFocusedOptionId=function(c){return Gc(o.state.focusableOptionsWithIds,c)},o.getFocusableOptionsWithIds=function(){return e1(ga(o.props,o.state.selectValue),o.getElementId("option"))},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var c=arguments.length,l=new Array(c),f=0;f<c;f++)l[f]=arguments[f];return T6.apply(void 0,[o.props.classNamePrefix].concat(l))},o.getOptionLabel=function(c){return n1(o.props,c)},o.getOptionValue=function(c){return ma(o.props,c)},o.getStyles=function(c,l){var f=o.props.unstyled,m=k7[c](l,f);m.boxSizing="border-box";var b=o.props.styles[c];return b?b(m,l):m},o.getClassNames=function(c,l){var f,m;return(f=(m=o.props.classNames)[c])===null||f===void 0?void 0:f.call(m,l)},o.getElementId=function(c){return"".concat(o.state.instancePrefix,"-").concat(c)},o.getComponents=function(){return KC(o.props)},o.buildCategorizedOptions=function(){return ga(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return Kf(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(c,l){o.setState({ariaSelection:ne({value:c},l)})},o.onMenuMouseDown=function(c){c.button===0&&(c.stopPropagation(),c.preventDefault(),o.focusInput())},o.onMenuMouseMove=function(c){o.blockOptionHover=!1},o.onControlMouseDown=function(c){if(!c.defaultPrevented){var l=o.props.openMenuOnClick;o.state.isFocused?o.props.menuIsOpen?c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&o.onMenuClose():l&&o.openMenu("first"):(l&&(o.openAfterFocus=!0),o.focusInput()),c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&c.preventDefault()}},o.onDropdownIndicatorMouseDown=function(c){if(!(c&&c.type==="mousedown"&&c.button!==0)&&!o.props.isDisabled){var l=o.props,f=l.isMulti,m=l.menuIsOpen;o.focusInput(),m?(o.setState({inputIsHiddenAfterUpdate:!f}),o.onMenuClose()):o.openMenu("first"),c.preventDefault()}},o.onClearIndicatorMouseDown=function(c){c&&c.type==="mousedown"&&c.button!==0||(o.clearValue(),c.preventDefault(),o.openAfterFocus=!1,c.type==="touchend"?o.focusInput():setTimeout(function(){return o.focusInput()}))},o.onScroll=function(c){typeof o.props.closeMenuOnScroll=="boolean"?c.target instanceof HTMLElement&&da(c.target)&&o.props.onMenuClose():typeof o.props.closeMenuOnScroll=="function"&&o.props.closeMenuOnScroll(c)&&o.props.onMenuClose()},o.onCompositionStart=function(){o.isComposing=!0},o.onCompositionEnd=function(){o.isComposing=!1},o.onTouchStart=function(c){var l=c.touches,f=l&&l.item(0);f&&(o.initialTouchX=f.clientX,o.initialTouchY=f.clientY,o.userIsDragging=!1)},o.onTouchMove=function(c){var l=c.touches,f=l&&l.item(0);if(f){var m=Math.abs(f.clientX-o.initialTouchX),b=Math.abs(f.clientY-o.initialTouchY),v=5;o.userIsDragging=m>v||b>v}},o.onTouchEnd=function(c){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(c.target)&&o.menuListRef&&!o.menuListRef.contains(c.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(c){o.userIsDragging||o.onControlMouseDown(c)},o.onClearIndicatorTouchEnd=function(c){o.userIsDragging||o.onClearIndicatorMouseDown(c)},o.onDropdownIndicatorTouchEnd=function(c){o.userIsDragging||o.onDropdownIndicatorMouseDown(c)},o.handleInputChange=function(c){var l=o.props.inputValue,f=c.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(f,{action:"input-change",prevInputValue:l}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(c){o.props.onFocus&&o.props.onFocus(c),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(c){var l=o.props.inputValue;if(o.menuListRef&&o.menuListRef.contains(document.activeElement)){o.inputRef.focus();return}o.props.onBlur&&o.props.onBlur(c),o.onInputChange("",{action:"input-blur",prevInputValue:l}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1})},o.onOptionHover=function(c){if(!(o.blockOptionHover||o.state.focusedOption===c)){var l=o.getFocusableOptions(),f=l.indexOf(c);o.setState({focusedOption:c,focusedOptionId:f>-1?o.getFocusedOptionId(c):null})}},o.shouldHideSelectedOptions=function(){return a1(o.props)},o.onValueInputFocus=function(c){c.preventDefault(),c.stopPropagation(),o.focus()},o.onKeyDown=function(c){var l=o.props,f=l.isMulti,m=l.backspaceRemovesValue,b=l.escapeClearsValue,v=l.inputValue,y=l.isClearable,p=l.isDisabled,h=l.menuIsOpen,g=l.onKeyDown,C=l.tabSelectsValue,x=l.openMenuOnFocus,I=o.state,E=I.focusedOption,_=I.focusedValue,A=I.selectValue;if(!p&&!(typeof g=="function"&&(g(c),c.defaultPrevented))){switch(o.blockOptionHover=!0,c.key){case"ArrowLeft":if(!f||v)return;o.focusValue("previous");break;case"ArrowRight":if(!f||v)return;o.focusValue("next");break;case"Delete":case"Backspace":if(v)return;if(_)o.removeValue(_);else{if(!m)return;f?o.popValue():y&&o.clearValue()}break;case"Tab":if(o.isComposing||c.shiftKey||!h||!C||!E||x&&o.isOptionSelected(E,A))return;o.selectOption(E);break;case"Enter":if(c.keyCode===229)break;if(h){if(!E||o.isComposing)return;o.selectOption(E);break}return;case"Escape":h?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:v}),o.onMenuClose()):y&&b&&o.clearValue();break;case" ":if(v)return;if(!h){o.openMenu("first");break}if(!E)return;o.selectOption(E);break;case"ArrowUp":h?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":h?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!h)return;o.focusOption("pageup");break;case"PageDown":if(!h)return;o.focusOption("pagedown");break;case"Home":if(!h)return;o.focusOption("first");break;case"End":if(!h)return;o.focusOption("last");break;default:return}c.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++H7),o.state.selectValue=ua(r.value),r.menuIsOpen&&o.state.selectValue.length){var s=o.getFocusableOptionsWithIds(),a=o.buildFocusableOptions(),i=a.indexOf(o.state.selectValue[0]);o.state.focusableOptionsWithIds=s,o.state.focusedOption=a[i],o.state.focusedOptionId=Gc(s,a[i])}return o}return t9(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&wf(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(o){var s=this.props,a=s.isDisabled,i=s.menuIsOpen,c=this.state.isFocused;(c&&!a&&o.isDisabled||c&&i&&!o.menuIsOpen)&&this.focusInput(),c&&a&&!o.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!c&&!a&&o.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(wf(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(o,s){this.props.onInputChange(o,s)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(o){var s=this,a=this.state,i=a.selectValue,c=a.isFocused,l=this.buildFocusableOptions(),f=o==="first"?0:l.length-1;if(!this.props.isMulti){var m=l.indexOf(i[0]);m>-1&&(f=m)}this.scrollToFocusedOptionOnUpdate=!(c&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:l[f],focusedOptionId:this.getFocusedOptionId(l[f])},function(){return s.onMenuOpen()})}},{key:"focusValue",value:function(o){var s=this.state,a=s.selectValue,i=s.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var c=a.indexOf(i);i||(c=-1);var l=a.length-1,f=-1;if(a.length){switch(o){case"previous":c===0?f=0:c===-1?f=l:f=c-1;break;case"next":c>-1&&c<l&&(f=c+1);break}this.setState({inputIsHidden:f!==-1,focusedValue:a[f]})}}}},{key:"focusOption",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",s=this.props.pageSize,a=this.state.focusedOption,i=this.getFocusableOptions();if(i.length){var c=0,l=i.indexOf(a);a||(l=-1),o==="up"?c=l>0?l-1:i.length-1:o==="down"?c=(l+1)%i.length:o==="pageup"?(c=l-s,c<0&&(c=0)):o==="pagedown"?(c=l+s,c>i.length-1&&(c=i.length-1)):o==="last"&&(c=i.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:i[c],focusedValue:null,focusedOptionId:this.getFocusedOptionId(i[c])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Vc):ne(ne({},Vc),this.props.theme):Vc}},{key:"getCommonProps",value:function(){var o=this.clearValue,s=this.cx,a=this.getStyles,i=this.getClassNames,c=this.getValue,l=this.selectOption,f=this.setValue,m=this.props,b=m.isMulti,v=m.isRtl,y=m.options,p=this.hasValue();return{clearValue:o,cx:s,getStyles:a,getClassNames:i,getValue:c,hasValue:p,isMulti:b,isRtl:v,options:y,selectOption:l,selectProps:m,setValue:f,theme:this.getTheme()}}},{key:"hasValue",value:function(){var o=this.state.selectValue;return o.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var o=this.props,s=o.isClearable,a=o.isMulti;return s===void 0?a:s}},{key:"isOptionDisabled",value:function(o,s){return r1(this.props,o,s)}},{key:"isOptionSelected",value:function(o,s){return o1(this.props,o,s)}},{key:"filterOption",value:function(o,s){return s1(this.props,o,s)}},{key:"formatOptionLabel",value:function(o,s){if(typeof this.props.formatOptionLabel=="function"){var a=this.props.inputValue,i=this.state.selectValue;return this.props.formatOptionLabel(o,{context:s,inputValue:a,selectValue:i})}else return this.getOptionLabel(o)}},{key:"formatGroupLabel",value:function(o){return this.props.formatGroupLabel(o)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var o=this.props,s=o.isDisabled,a=o.isSearchable,i=o.inputId,c=o.inputValue,l=o.tabIndex,f=o.form,m=o.menuIsOpen,b=o.required,v=this.getComponents(),y=v.Input,p=this.state,h=p.inputIsHidden,g=p.ariaSelection,C=this.commonProps,x=i||this.getElementId("input"),I=ne(ne(ne({"aria-autocomplete":"list","aria-expanded":m,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":b,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},m&&{"aria-controls":this.getElementId("listbox")}),!a&&{"aria-readonly":!0}),this.hasValue()?(g==null?void 0:g.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?T.createElement(y,ue({},C,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:x,innerRef:this.getInputRef,isDisabled:s,isHidden:h,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:l,form:f,type:"text",value:c},I)):T.createElement(h7,ue({id:x,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:la,onFocus:this.onInputFocus,disabled:s,tabIndex:l,inputMode:"none",form:f,value:""},I))}},{key:"renderPlaceholderOrValue",value:function(){var o=this,s=this.getComponents(),a=s.MultiValue,i=s.MultiValueContainer,c=s.MultiValueLabel,l=s.MultiValueRemove,f=s.SingleValue,m=s.Placeholder,b=this.commonProps,v=this.props,y=v.controlShouldRenderValue,p=v.isDisabled,h=v.isMulti,g=v.inputValue,C=v.placeholder,x=this.state,I=x.selectValue,E=x.focusedValue,_=x.isFocused;if(!this.hasValue()||!y)return g?null:T.createElement(m,ue({},b,{key:"placeholder",isDisabled:p,isFocused:_,innerProps:{id:this.getElementId("placeholder")}}),C);if(h)return I.map(function(S,L){var k=S===E,D="".concat(o.getOptionLabel(S),"-").concat(o.getOptionValue(S));return T.createElement(a,ue({},b,{components:{Container:i,Label:c,Remove:l},isFocused:k,isDisabled:p,key:D,index:L,removeProps:{onClick:function(){return o.removeValue(S)},onTouchEnd:function(){return o.removeValue(S)},onMouseDown:function(M){M.preventDefault()}},data:S}),o.formatOptionLabel(S,"value"))});if(g)return null;var A=I[0];return T.createElement(f,ue({},b,{data:A,isDisabled:p}),this.formatOptionLabel(A,"value"))}},{key:"renderClearIndicator",value:function(){var o=this.getComponents(),s=o.ClearIndicator,a=this.commonProps,i=this.props,c=i.isDisabled,l=i.isLoading,f=this.state.isFocused;if(!this.isClearable()||!s||c||!this.hasValue()||l)return null;var m={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return T.createElement(s,ue({},a,{innerProps:m,isFocused:f}))}},{key:"renderLoadingIndicator",value:function(){var o=this.getComponents(),s=o.LoadingIndicator,a=this.commonProps,i=this.props,c=i.isDisabled,l=i.isLoading,f=this.state.isFocused;if(!s||!l)return null;var m={"aria-hidden":"true"};return T.createElement(s,ue({},a,{innerProps:m,isDisabled:c,isFocused:f}))}},{key:"renderIndicatorSeparator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator,a=o.IndicatorSeparator;if(!s||!a)return null;var i=this.commonProps,c=this.props.isDisabled,l=this.state.isFocused;return T.createElement(a,ue({},i,{isDisabled:c,isFocused:l}))}},{key:"renderDropdownIndicator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator;if(!s)return null;var a=this.commonProps,i=this.props.isDisabled,c=this.state.isFocused,l={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return T.createElement(s,ue({},a,{innerProps:l,isDisabled:i,isFocused:c}))}},{key:"renderMenu",value:function(){var o=this,s=this.getComponents(),a=s.Group,i=s.GroupHeading,c=s.Menu,l=s.MenuList,f=s.MenuPortal,m=s.LoadingMessage,b=s.NoOptionsMessage,v=s.Option,y=this.commonProps,p=this.state.focusedOption,h=this.props,g=h.captureMenuScroll,C=h.inputValue,x=h.isLoading,I=h.loadingMessage,E=h.minMenuHeight,_=h.maxMenuHeight,A=h.menuIsOpen,S=h.menuPlacement,L=h.menuPosition,k=h.menuPortalTarget,D=h.menuShouldBlockScroll,N=h.menuShouldScrollIntoView,M=h.noOptionsMessage,V=h.onMenuScrollToTop,J=h.onMenuScrollToBottom;if(!A)return null;var $=function(P,W){var G=P.type,Y=P.data,oe=P.isDisabled,re=P.isSelected,j=P.label,te=P.value,Ee=p===Y,z=oe?void 0:function(){return o.onOptionHover(Y)},Ve=oe?void 0:function(){return o.selectOption(Y)},Ne="".concat(o.getElementId("option"),"-").concat(W),Ue={id:Ne,onClick:Ve,onMouseMove:z,onMouseOver:z,tabIndex:-1,role:"option","aria-selected":o.isAppleDevice?void 0:re};return T.createElement(v,ue({},y,{innerProps:Ue,data:Y,isDisabled:oe,isSelected:re,key:Ne,label:j,type:G,value:te,isFocused:Ee,innerRef:Ee?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(P.data,"menu"))},H;if(this.hasOptions())H=this.getCategorizedOptions().map(function(B){if(B.type==="group"){var P=B.data,W=B.options,G=B.index,Y="".concat(o.getElementId("group"),"-").concat(G),oe="".concat(Y,"-heading");return T.createElement(a,ue({},y,{key:Y,data:P,options:W,Heading:i,headingProps:{id:oe,data:B.data},label:o.formatGroupLabel(B.data)}),B.options.map(function(re){return $(re,"".concat(G,"-").concat(re.index))}))}else if(B.type==="option")return $(B,"".concat(B.index))});else if(x){var X=I({inputValue:C});if(X===null)return null;H=T.createElement(m,y,X)}else{var q=M({inputValue:C});if(q===null)return null;H=T.createElement(b,y,q)}var se={minMenuHeight:E,maxMenuHeight:_,menuPlacement:S,menuPosition:L,menuShouldScrollIntoView:N},de=T.createElement(X6,ue({},y,se),function(B){var P=B.ref,W=B.placerProps,G=W.placement,Y=W.maxHeight;return T.createElement(c,ue({},y,se,{innerRef:P,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:x,placement:G}),T.createElement(v7,{captureEnabled:g,onTopArrive:V,onBottomArrive:J,lockEnabled:D},function(oe){return T.createElement(l,ue({},y,{innerRef:function(j){o.getMenuListRef(j),oe(j)},innerProps:{role:"listbox","aria-multiselectable":y.isMulti,id:o.getElementId("listbox")},isLoading:x,maxHeight:Y,focusedOption:p}),H)}))});return k||L==="fixed"?T.createElement(f,ue({},y,{appendTo:k,controlElement:this.controlRef,menuPlacement:S,menuPosition:L}),de):de}},{key:"renderFormField",value:function(){var o=this,s=this.props,a=s.delimiter,i=s.isDisabled,c=s.isMulti,l=s.name,f=s.required,m=this.state.selectValue;if(f&&!this.hasValue()&&!i)return T.createElement(_7,{name:l,onFocus:this.onValueInputFocus});if(!(!l||i))if(c)if(a){var b=m.map(function(p){return o.getOptionValue(p)}).join(a);return T.createElement("input",{name:l,type:"hidden",value:b})}else{var v=m.length>0?m.map(function(p,h){return T.createElement("input",{key:"i-".concat(h),name:l,type:"hidden",value:o.getOptionValue(p)})}):T.createElement("input",{name:l,type:"hidden",value:""});return T.createElement("div",null,v)}else{var y=m[0]?this.getOptionValue(m[0]):"";return T.createElement("input",{name:l,type:"hidden",value:y})}}},{key:"renderLiveRegion",value:function(){var o=this.commonProps,s=this.state,a=s.ariaSelection,i=s.focusedOption,c=s.focusedValue,l=s.isFocused,f=s.selectValue,m=this.getFocusableOptions();return T.createElement(c7,ue({},o,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:i,focusedValue:c,isFocused:l,selectValue:f,focusableOptions:m,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var o=this.getComponents(),s=o.Control,a=o.IndicatorsContainer,i=o.SelectContainer,c=o.ValueContainer,l=this.props,f=l.className,m=l.id,b=l.isDisabled,v=l.menuIsOpen,y=this.state.isFocused,p=this.commonProps=this.getCommonProps();return T.createElement(i,ue({},p,{className:f,innerProps:{id:m,onKeyDown:this.onKeyDown},isDisabled:b,isFocused:y}),this.renderLiveRegion(),T.createElement(s,ue({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:b,isFocused:y,menuIsOpen:v}),T.createElement(c,ue({},p,{isDisabled:b}),this.renderPlaceholderOrValue(),this.renderInput()),T.createElement(a,ue({},p,{isDisabled:b}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(o,s){var a=s.prevProps,i=s.clearFocusValueOnUpdate,c=s.inputIsHiddenAfterUpdate,l=s.ariaSelection,f=s.isFocused,m=s.prevWasFocused,b=s.instancePrefix,v=o.options,y=o.value,p=o.menuIsOpen,h=o.inputValue,g=o.isMulti,C=ua(y),x={};if(a&&(y!==a.value||v!==a.options||p!==a.menuIsOpen||h!==a.inputValue)){var I=p?B7(o,C):[],E=p?e1(ga(o,C),"".concat(b,"-option")):[],_=i?V7(s,C):null,A=G7(s,I),S=Gc(E,A);x={selectValue:C,focusedOption:A,focusedOptionId:S,focusableOptionsWithIds:E,focusedValue:_,clearFocusValueOnUpdate:!1}}var L=c!=null&&o!==a?{inputIsHidden:c,inputIsHiddenAfterUpdate:void 0}:{},k=l,D=f&&m;return f&&!D&&(k={value:Ho(g,C,C[0]||null),options:C,action:"initial-input-focus"},D=!m),(l==null?void 0:l.action)==="initial-input-focus"&&(k=null),ne(ne(ne({},x),L),{},{prevProps:o,ariaSelection:k,prevWasFocused:D})}}]),n}(w.Component);ba.defaultProps=j7;var W7=w.forwardRef(function(e,t){var n=mc(e);return T.createElement(ba,ue({ref:t},n))}),Z7=W7;const X7=d.styled(d.Box)`
615
610
  display: flex;
616
611
  align-items: center;
617
612
  gap: 2px;
618
- font-family: ${d.theme.typography.fontFamily};
613
+ font-family: Inter, 'Open Sans', sans-serif;
619
614
  font-size: 13px;
620
- color: ${d.theme.palette.gray.gray1};
615
+ font-weight: 400;
616
+ line-height: 19px;
617
+ letter-spacing: -0.005em;
618
+ color: ${d.theme.palette.gray.black};
621
619
  & > span {
622
620
  max-width: 100%;
623
621
  overflow-wrap: break-word;
@@ -655,7 +653,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
655
653
  `,c1=e=>u.jsx(ln.ClearIndicator,{...e,children:u.jsx(Y7,{})}),l1=(e,t)=>({...e,placeholder:(n,r)=>{var o;return{...n,...(o=e==null?void 0:e.placeholder)==null?void 0:o.call(e,n,r),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},control:(n,r)=>{var o;return{...n,backgroundColor:"transparent",...(o=e==null?void 0:e.control)==null?void 0:o.call(e,n,r)}},...t?{menuPortal:(n,r)=>{var o;return{...n,...(o=e==null?void 0:e.menuPortal)==null?void 0:o.call(e,n,r),zIndex:t,fontFamily:d.theme.typography.fontFamily,fontSize:"13px"}}}:null}),J7=d.styled(d.Stack)`
656
654
  width: 0;
657
655
  height: 0;
658
- `,q7=({root:e,rootMargin:t,callback:n})=>{const r=w.useRef(null),o=w.useCallback(s=>{if(!s||!e)return;r.current&&r.current.disconnect();const a=new IntersectionObserver(i=>{const c=i[0];n(c)},{root:e,rootMargin:t});a.observe(s),r.current=a},[e,t,n]);return u.jsx(J7,{ref:o})},u1=({options:e,isMulti:t,isScrollTarget:n})=>{const r=w.useRef(),o=w.useMemo(()=>e?Object.fromEntries(e.map(i=>[i.value,i])):{},[e]);return{optionsMap:o,getValue:i=>{var f;if(t||typeof i=="object")return i;const c=o[i];return c&&(r.current=c),i===((f=r.current)==null?void 0:f.value)?r.current:i},closeMenuOnScroll:n?i=>{const c=i.target;return!n||!c?!1:n(c)}:void 0}},$7=e=>u.jsx(ln.DropdownIndicator,{...e,children:u.jsx(d.Icon,{children:e.selectProps.menuIsOpen?u.jsx(d.icons.ArrowDropUp,{}):u.jsx(d.icons.ArrowDropDown,{})})}),d1=()=>({ClearIndicator:c1,DropdownIndicator:$7,IndicatorSeparator:()=>null,Option:i1}),Zo=({stackIndex:e,isScrollTarget:t,...n})=>{const{value:r,options:o,isMulti:s}=n,[a,i]=w.useState(!1),c=w.useCallback(m=>{i(!m.isIntersecting)},[]),{getValue:l,closeMenuOnScroll:f}=u1({options:o,isMulti:s,isScrollTarget:t});return u.jsxs(u.Fragment,{children:[n.menuPortalTarget&&n.root?u.jsx(q7,{root:n.root,rootMargin:"-38px 0px 0px 0px",callback:c}):null,u.jsx(Z7,{...n,isDisabled:n.disabled,value:r?l(r):void 0,styles:l1(n.styles,e),components:n.components?n.components:d1(),closeMenuOnScroll:f,...a&&{menuIsOpen:!1}})]})};Zo.getDefaultComponents=d1;const f1="Required Field",Q7="Validation Failed";var p1=(e=>(e.DATE="DD/MM/YYYY",e))(p1||{}),U7=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function h1(e){var t=e.defaultOptions,n=t===void 0?!1:t,r=e.cacheOptions,o=r===void 0?!1:r,s=e.loadOptions;e.options;var a=e.isLoading,i=a===void 0?!1:a,c=e.onInputChange,l=e.filterOption,f=l===void 0?null:l,m=Jt(e,U7),b=m.inputValue,v=w.useRef(void 0),y=w.useRef(!1),p=w.useState(Array.isArray(n)?n:void 0),h=tt(p,2),g=h[0],C=h[1],x=w.useState(typeof b<"u"?b:""),I=tt(x,2),E=I[0],_=I[1],A=w.useState(n===!0),S=tt(A,2),L=S[0],k=S[1],D=w.useState(void 0),N=tt(D,2),M=N[0],V=N[1],J=w.useState([]),$=tt(J,2),H=$[0],X=$[1],q=w.useState(!1),se=tt(q,2),de=se[0],B=se[1],P=w.useState({}),W=tt(P,2),G=W[0],Y=W[1],oe=w.useState(void 0),re=tt(oe,2),j=re[0],te=re[1],Ee=w.useState(void 0),z=tt(Ee,2),Ve=z[0],Ne=z[1];o!==Ve&&(Y({}),Ne(o)),n!==j&&(C(Array.isArray(n)?n:void 0),te(n)),w.useEffect(function(){return y.current=!0,function(){y.current=!1}},[]);var Ue=w.useCallback(function(vt,Ze){if(!s)return Ze();var Xe=s(vt,Ze);Xe&&typeof Xe.then=="function"&&Xe.then(Ze,function(){return Ze()})},[s]);w.useEffect(function(){n===!0&&Ue(E,function(vt){y.current&&(C(vt||[]),k(!!v.current))})},[]);var kt=w.useCallback(function(vt,Ze){var Xe=L6(vt,Ze,c);if(!Xe){v.current=void 0,_(""),V(""),X([]),k(!1),B(!1);return}if(o&&G[Xe])_(Xe),V(Xe),X(G[Xe]),k(!1),B(!1);else{var Xn=v.current={};_(Xe),k(!0),B(!M),Ue(Xe,function(at){y&&Xn===v.current&&(v.current=void 0,k(!1),V(Xe),X(at||[]),B(!1),Y(at?ne(ne({},G),{},Hr({},Xe,at)):G))})}},[o,Ue,M,G,c]),gn=de?[]:E&&M?H:g||[];return ne(ne({},m),{},{options:gn,isLoading:L||i,onInputChange:kt,filterOption:f})}var K7=w.forwardRef(function(e,t){var n=h1(e),r=gc(n);return T.createElement(ba,ue({ref:t},r))}),e8=K7,t8=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],g1=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,o=String(t).toLowerCase(),s=String(r.getOptionValue(n)).toLowerCase(),a=String(r.getOptionLabel(n)).toLowerCase();return s===o||a===o},Gc={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,o){return!(!t||n.some(function(s){return g1(t,s,o)})||r.some(function(s){return g1(t,s,o)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function n8(e){var t=e.allowCreateWhileLoading,n=t===void 0?!1:t,r=e.createOptionPosition,o=r===void 0?"last":r,s=e.formatCreateLabel,a=s===void 0?Gc.formatCreateLabel:s,i=e.isValidNewOption,c=i===void 0?Gc.isValidNewOption:i,l=e.getNewOptionData,f=l===void 0?Gc.getNewOptionData:l,m=e.onCreateOption,b=e.options,v=b===void 0?[]:b,y=e.onChange,p=Jt(e,t8),h=p.getOptionValue,g=h===void 0?$f:h,C=p.getOptionLabel,x=C===void 0?qf:C,I=p.inputValue,E=p.isLoading,_=p.isMulti,A=p.value,S=p.name,L=w.useMemo(function(){return c(I,ua(A),v,{getOptionValue:g,getOptionLabel:x})?f(I,a(I)):void 0},[a,f,x,g,I,c,v,A]),k=w.useMemo(function(){return(n||!E)&&L?o==="first"?[L].concat(Wr(v)):[].concat(Wr(v),[L]):v},[n,o,E,L,v]),D=w.useCallback(function(N,M){if(M.action!=="select-option")return y(N,M);var V=Array.isArray(N)?N:[N];if(V[V.length-1]===L){if(m)m(I);else{var J=f(I,I),$={action:"create-option",name:S,option:J};y(Ho(_,[].concat(Wr(ua(A)),[J]),J),$)}return}y(N,M)},[f,I,_,S,L,m,y,A]);return ne(ne({},p),{},{options:k,onChange:D})}var r8=w.forwardRef(function(e,t){var n=h1(e),r=gc(n),o=n8(r);return T.createElement(ba,ue({ref:t},o))}),o8=r8;const s8=d.styled(d.Typography)`
656
+ `,q7=({root:e,rootMargin:t,callback:n})=>{const r=w.useRef(null),o=w.useCallback(s=>{if(!s||!e)return;r.current&&r.current.disconnect();const a=new IntersectionObserver(i=>{const c=i[0];n(c)},{root:e,rootMargin:t});a.observe(s),r.current=a},[e,t,n]);return u.jsx(J7,{ref:o})},u1=({options:e,isMulti:t,isScrollTarget:n})=>{const r=w.useRef(),o=w.useMemo(()=>e?Object.fromEntries(e.map(i=>[i.value,i])):{},[e]);return{optionsMap:o,getValue:i=>{var f;if(t||typeof i=="object")return i;const c=o[i];return c&&(r.current=c),i===((f=r.current)==null?void 0:f.value)?r.current:i},closeMenuOnScroll:n?i=>{const c=i.target;return!n||!c?!1:n(c)}:void 0}},$7=e=>u.jsx(ln.DropdownIndicator,{...e,children:u.jsx(d.Icon,{children:e.selectProps.menuIsOpen?u.jsx(d.icons.ArrowDropUp,{}):u.jsx(d.icons.ArrowDropDown,{})})}),d1=()=>({ClearIndicator:c1,DropdownIndicator:$7,IndicatorSeparator:()=>null,Option:i1}),Zo=({stackIndex:e,isScrollTarget:t,...n})=>{const{value:r,options:o,isMulti:s}=n,[a,i]=w.useState(!1),c=w.useCallback(m=>{i(!m.isIntersecting)},[]),{getValue:l,closeMenuOnScroll:f}=u1({options:o,isMulti:s,isScrollTarget:t});return u.jsxs(u.Fragment,{children:[n.menuPortalTarget&&n.root?u.jsx(q7,{root:n.root,rootMargin:"-38px 0px 0px 0px",callback:c}):null,u.jsx(Z7,{...n,isDisabled:n.disabled,value:r?l(r):void 0,styles:l1(n.styles,e),components:n.components?n.components:d1(),closeMenuOnScroll:f,...a&&{menuIsOpen:!1}})]})};Zo.getDefaultComponents=d1;const f1="Required Field",Q7="Validation Failed";var p1=(e=>(e.DATE="DD/MM/YYYY",e))(p1||{}),U7=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function h1(e){var t=e.defaultOptions,n=t===void 0?!1:t,r=e.cacheOptions,o=r===void 0?!1:r,s=e.loadOptions;e.options;var a=e.isLoading,i=a===void 0?!1:a,c=e.onInputChange,l=e.filterOption,f=l===void 0?null:l,m=Jt(e,U7),b=m.inputValue,v=w.useRef(void 0),y=w.useRef(!1),p=w.useState(Array.isArray(n)?n:void 0),h=tt(p,2),g=h[0],C=h[1],x=w.useState(typeof b<"u"?b:""),I=tt(x,2),E=I[0],_=I[1],A=w.useState(n===!0),S=tt(A,2),L=S[0],k=S[1],D=w.useState(void 0),N=tt(D,2),M=N[0],V=N[1],J=w.useState([]),$=tt(J,2),H=$[0],X=$[1],q=w.useState(!1),se=tt(q,2),de=se[0],B=se[1],P=w.useState({}),W=tt(P,2),G=W[0],Y=W[1],oe=w.useState(void 0),re=tt(oe,2),j=re[0],te=re[1],Ee=w.useState(void 0),z=tt(Ee,2),Ve=z[0],Ne=z[1];o!==Ve&&(Y({}),Ne(o)),n!==j&&(C(Array.isArray(n)?n:void 0),te(n)),w.useEffect(function(){return y.current=!0,function(){y.current=!1}},[]);var Ue=w.useCallback(function(vt,Ze){if(!s)return Ze();var Xe=s(vt,Ze);Xe&&typeof Xe.then=="function"&&Xe.then(Ze,function(){return Ze()})},[s]);w.useEffect(function(){n===!0&&Ue(E,function(vt){y.current&&(C(vt||[]),k(!!v.current))})},[]);var kt=w.useCallback(function(vt,Ze){var Xe=L6(vt,Ze,c);if(!Xe){v.current=void 0,_(""),V(""),X([]),k(!1),B(!1);return}if(o&&G[Xe])_(Xe),V(Xe),X(G[Xe]),k(!1),B(!1);else{var Xn=v.current={};_(Xe),k(!0),B(!M),Ue(Xe,function(at){y&&Xn===v.current&&(v.current=void 0,k(!1),V(Xe),X(at||[]),B(!1),Y(at?ne(ne({},G),{},Hr({},Xe,at)):G))})}},[o,Ue,M,G,c]),gn=de?[]:E&&M?H:g||[];return ne(ne({},m),{},{options:gn,isLoading:L||i,onInputChange:kt,filterOption:f})}var K7=w.forwardRef(function(e,t){var n=h1(e),r=mc(n);return T.createElement(ba,ue({ref:t},r))}),e8=K7,t8=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],g1=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,o=String(t).toLowerCase(),s=String(r.getOptionValue(n)).toLowerCase(),a=String(r.getOptionLabel(n)).toLowerCase();return s===o||a===o},Hc={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,o){return!(!t||n.some(function(s){return g1(t,s,o)})||r.some(function(s){return g1(t,s,o)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function n8(e){var t=e.allowCreateWhileLoading,n=t===void 0?!1:t,r=e.createOptionPosition,o=r===void 0?"last":r,s=e.formatCreateLabel,a=s===void 0?Hc.formatCreateLabel:s,i=e.isValidNewOption,c=i===void 0?Hc.isValidNewOption:i,l=e.getNewOptionData,f=l===void 0?Hc.getNewOptionData:l,m=e.onCreateOption,b=e.options,v=b===void 0?[]:b,y=e.onChange,p=Jt(e,t8),h=p.getOptionValue,g=h===void 0?$f:h,C=p.getOptionLabel,x=C===void 0?qf:C,I=p.inputValue,E=p.isLoading,_=p.isMulti,A=p.value,S=p.name,L=w.useMemo(function(){return c(I,ua(A),v,{getOptionValue:g,getOptionLabel:x})?f(I,a(I)):void 0},[a,f,x,g,I,c,v,A]),k=w.useMemo(function(){return(n||!E)&&L?o==="first"?[L].concat(Wr(v)):[].concat(Wr(v),[L]):v},[n,o,E,L,v]),D=w.useCallback(function(N,M){if(M.action!=="select-option")return y(N,M);var V=Array.isArray(N)?N:[N];if(V[V.length-1]===L){if(m)m(I);else{var J=f(I,I),$={action:"create-option",name:S,option:J};y(Ho(_,[].concat(Wr(ua(A)),[J]),J),$)}return}y(N,M)},[f,I,_,S,L,m,y,A]);return ne(ne({},p),{},{options:k,onChange:D})}var r8=w.forwardRef(function(e,t){var n=h1(e),r=mc(n),o=n8(r);return T.createElement(ba,ue({ref:t},o))}),o8=r8;const s8=d.styled(d.Typography)`
659
657
  display: block;
660
658
  white-space: nowrap;
661
659
  overflow: hidden;
@@ -691,7 +689,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
691
689
  `,h8=d.styled(b1)`
692
690
  --cell-padding: 10px ${Ca};
693
691
  border-bottom: 1px solid var(--border-color);
694
- `,Hc=d.styled(d.Box)`
692
+ `,Wc=d.styled(d.Box)`
695
693
  border: var(--border-size) solid transparent;
696
694
  border-right: var(--border-size) solid var(--border-color);
697
695
  padding: var(--cell-padding, 0);
@@ -764,7 +762,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
764
762
  --h-margin: calc((100% - 36px) / 2);
765
763
  margin: var(--v-margin) var(--h-margin);
766
764
  }
767
- `,v8=({onChange:e,onFocus:t,onBlur:n,...r})=>{const o=(s,a)=>{e==null||e(s,a)};return u.jsx(x8,{onChange:o,onFocus:t,onBlur:n,...r})},C1=({label:e,isRequired:t,prefixNode:n,...r})=>e?u.jsxs(d.Typography,{variant:"h4",component:"label",color:d.theme.palette.gray.gray1,className:"hiver__field--label",...r,children:[n,e,t?u.jsx("span",{className:"required__star",children:"*"}):null]}):null,E8=e=>T.createElement("svg",{width:"8px",height:"8px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9zm7.5-5-1-1h-5l-1 1H5v2h14V4z"})),x1=250,cr="__id",Xo={isExpandable:!0,isExpanded:!0,defaultNumberOfRows:1,fixedRows:!1,cellWidth:x1,arithmeticOperation:[]},xa=({name:e,value:t,data:n={},columns:r=[],validation:o={},meta:{defaultNumberOfRows:s=Xo.defaultNumberOfRows,fixedRows:a=Xo.fixedRows,cellWidth:i=Xo.cellWidth,arithmeticOperation:c=Xo.arithmeticOperation}=Xo,fetchConfig:l={},createConfig:f={},stackIndex:m,onChange:b=()=>{},onFocus:v,onValidationError:y})=>{const p=t??[],h=(o==null?void 0:o.validations)??{},g=w.useRef(),C=w.useRef({}),[x,I]=w.useState({}),{colsLength:E,colsTemplate:_,colWidth:A}=w.useMemo(()=>{let B=0,P="";for(const W of r){let G=W.cols?Number(W.cols):1;isNaN(G)&&(G=1),B+=G,P+=`${W.cols??G}fr `}return a||(B+=.5,P+="0.5fr"),{colsLength:B,colsTemplate:P.trim(),colWidth:`${isNaN(i)?x1:i}px`}},[r,i,a]),{fieldDependency:S,fieldConfigs:L}=w.useMemo(()=>{const B={},P={};for(const W of r){if(!W.valueConfig)continue;P[W.name]=W.valueConfig;const G=W.valueConfig.columnNames;for(const Y of G)B[Y]||(B[Y]=[]),B[Y].push(W.name)}return{fieldDependency:B,fieldConfigs:P}},[r]);w.useEffect(()=>{if(t)return;const B=[];for(let P=0;P<s;P++){const W=j0();B.push({[cr]:W})}b(B)},[t,b,s]);const k=()=>{const B=Object.entries(C.current).filter(P=>!!P[1])[0];return(B==null?void 0:B[1])??""},D=()=>{const B={[cr]:j0()};b([...p,B])},N=B=>{const P=p.filter(W=>W[cr]!==B);b(P),I(W=>({...W,[B]:{}}));for(const W in C.current)W.startsWith(`${B}.`)&&delete C.current[W];y==null||y(e,k())},M=(B,{columnNames:P=[],operationType:W})=>{const G=P.map(Y=>B[Y]);return""+B0(G,W)},V=(B,P)=>{const W=p.map(G=>B!==G[cr]?G:{...G,...P});b(W)},J=(B,P)=>{const W=p.map(G=>{if(B!==G[cr])return G;const Y={...G};for(const oe of P)delete Y[oe];return Y});b(W)},$=(B,P,W,G)=>{var re;const Y=((re=G==null?void 0:G.target)==null?void 0:re.value)??"",oe={...W,[P]:Y};if(S[P])for(const j of S[P]){const te=M(oe,L[j]);oe[j]=te}V(B,oe)},H=(B,P,W)=>{V(B,{[P]:W})},X=(B,P,W,G)=>{if(W&&typeof W=="object"&&"value"in W&&typeof W.value=="string"&&typeof G.name<"u"){const Y="prefillValues"in W&&W.prefillValues,oe={...P,[G.name]:W.value,...Y};for(const re in oe)if(S[re])for(const j of S[re]){const te=M(oe,L[j]);oe[j]=te}V(B,oe)}(G==null?void 0:G.action)==="clear"&&G.name&&J(B,[G.name])},q=(B,P,W)=>{V(B,{[P]:(W==null?void 0:W.toISOString())??""})},se=(B,P,W,G)=>{G&&I(Y=>{const oe=Y[B]??{};return{...Y,[B]:{...oe,[P]:W}}}),C.current={...C.current,[`${B}.${P}`]:typeof W=="string"?W:""},y==null||y(e,k())},de=B=>g.current===B;return u.jsxs(u8,{children:[u.jsx(d8,{ref:g,children:u.jsxs(f8,{gridColumns:_,minWidth:`calc( ${E} * ${A} )`,children:[u.jsx(h8,{children:r.map(({name:B,label:P,isRequired:W})=>u.jsx(Hc,{children:u.jsx(C1,{label:P,isRequired:W})},B))}),p.map(({[cr]:B,...P})=>u.jsxs(b1,{children:[r.map(({name:W,key:G,...Y})=>{var oe;return u.jsx(Hc,{hasError:!!((oe=x==null?void 0:x[B])!=null&&oe[W]),children:u.jsx(lr,{name:W,value:P[W],...Y,className:Jr,label:"",hideHelperText:!0,validation:h==null?void 0:h[W],onFocus:v,inputChangeHandler:re=>$(B,W,P,re),checkboxChangeHandler:(...re)=>H(B,W,re[1]),selectChangeHandler:(...re)=>X(B,P,...re),dateChangeHandler:(re,j)=>q(B,re,j),onValidationError:(...re)=>se(B,...re),fetchConfig:l==null?void 0:l[W],createConfig:f==null?void 0:f[W],isScrollTarget:de,...m?{menuPortalTarget:document.body,stackIndex:m}:null})},W??G)}),a?null:u.jsx(Hc,{children:u.jsx(d.Stack,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",children:u.jsx(y1,{onClick:()=>N(B),children:u.jsx(E8,{})})})})]},B))]})}),u.jsxs(p8,{children:[a?null:u.jsxs(g8,{onClick:D,children:[u.jsx(m1,{}),u.jsx(d.Typography,{children:"Add Line"})]}),c.length?u.jsx(m8,{children:c.map(({label:B,columnName:P,operationType:W,prefix:G="",prefixKey:Y,suffix:oe="",suffixKey:re})=>u.jsxs(b8,{children:[u.jsx(d.Typography,{fontWeight:500,children:B}),u.jsxs(d.Typography,{children:[u.jsxs("span",{children:[n[Y]??G," "]}),u.jsx("span",{children:B0(p.map(j=>j[P]),W)}),u.jsx("span",{children:n[re]??oe})]})]},B))}):null]})]})};xa.ROW_ID=cr;const I8=d.styled(d.Box)`
765
+ `,v8=({onChange:e,onFocus:t,onBlur:n,...r})=>{const o=(s,a)=>{e==null||e(s,a)};return u.jsx(x8,{onChange:o,onFocus:t,onBlur:n,...r})},C1=({label:e,isRequired:t,prefixNode:n,...r})=>e?u.jsxs(d.Typography,{variant:"body_sm_medium",component:"label",color:d.theme.palette.gray.gray1,className:"hiver__field--label",...r,children:[n,e,t?u.jsx("span",{className:"required__star",children:"*"}):null]}):null,E8=e=>T.createElement("svg",{width:"8px",height:"8px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9zm7.5-5-1-1h-5l-1 1H5v2h14V4z"})),x1=250,cr="__id",Xo={isExpandable:!0,isExpanded:!0,defaultNumberOfRows:1,fixedRows:!1,cellWidth:x1,arithmeticOperation:[]},xa=({name:e,value:t,data:n={},columns:r=[],validation:o={},meta:{defaultNumberOfRows:s=Xo.defaultNumberOfRows,fixedRows:a=Xo.fixedRows,cellWidth:i=Xo.cellWidth,arithmeticOperation:c=Xo.arithmeticOperation}=Xo,fetchConfig:l={},createConfig:f={},stackIndex:m,onChange:b=()=>{},onFocus:v,onValidationError:y})=>{const p=t??[],h=(o==null?void 0:o.validations)??{},g=w.useRef(),C=w.useRef({}),[x,I]=w.useState({}),{colsLength:E,colsTemplate:_,colWidth:A}=w.useMemo(()=>{let B=0,P="";for(const W of r){let G=W.cols?Number(W.cols):1;isNaN(G)&&(G=1),B+=G,P+=`${W.cols??G}fr `}return a||(B+=.5,P+="0.5fr"),{colsLength:B,colsTemplate:P.trim(),colWidth:`${isNaN(i)?x1:i}px`}},[r,i,a]),{fieldDependency:S,fieldConfigs:L}=w.useMemo(()=>{const B={},P={};for(const W of r){if(!W.valueConfig)continue;P[W.name]=W.valueConfig;const G=W.valueConfig.columnNames;for(const Y of G)B[Y]||(B[Y]=[]),B[Y].push(W.name)}return{fieldDependency:B,fieldConfigs:P}},[r]);w.useEffect(()=>{if(t)return;const B=[];for(let P=0;P<s;P++){const W=j0();B.push({[cr]:W})}b(B)},[t,b,s]);const k=()=>{const B=Object.entries(C.current).filter(P=>!!P[1])[0];return(B==null?void 0:B[1])??""},D=()=>{const B={[cr]:j0()};b([...p,B])},N=B=>{const P=p.filter(W=>W[cr]!==B);b(P),I(W=>({...W,[B]:{}}));for(const W in C.current)W.startsWith(`${B}.`)&&delete C.current[W];y==null||y(e,k())},M=(B,{columnNames:P=[],operationType:W})=>{const G=P.map(Y=>B[Y]);return""+B0(G,W)},V=(B,P)=>{const W=p.map(G=>B!==G[cr]?G:{...G,...P});b(W)},J=(B,P)=>{const W=p.map(G=>{if(B!==G[cr])return G;const Y={...G};for(const oe of P)delete Y[oe];return Y});b(W)},$=(B,P,W,G)=>{var re;const Y=((re=G==null?void 0:G.target)==null?void 0:re.value)??"",oe={...W,[P]:Y};if(S[P])for(const j of S[P]){const te=M(oe,L[j]);oe[j]=te}V(B,oe)},H=(B,P,W)=>{V(B,{[P]:W})},X=(B,P,W,G)=>{if(W&&typeof W=="object"&&"value"in W&&typeof W.value=="string"&&typeof G.name<"u"){const Y="prefillValues"in W&&W.prefillValues,oe={...P,[G.name]:W.value,...Y};for(const re in oe)if(S[re])for(const j of S[re]){const te=M(oe,L[j]);oe[j]=te}V(B,oe)}(G==null?void 0:G.action)==="clear"&&G.name&&J(B,[G.name])},q=(B,P,W)=>{V(B,{[P]:(W==null?void 0:W.toISOString())??""})},se=(B,P,W,G)=>{G&&I(Y=>{const oe=Y[B]??{};return{...Y,[B]:{...oe,[P]:W}}}),C.current={...C.current,[`${B}.${P}`]:typeof W=="string"?W:""},y==null||y(e,k())},de=B=>g.current===B;return u.jsxs(u8,{children:[u.jsx(d8,{ref:g,children:u.jsxs(f8,{gridColumns:_,minWidth:`calc( ${E} * ${A} )`,children:[u.jsx(h8,{children:r.map(({name:B,label:P,isRequired:W})=>u.jsx(Wc,{children:u.jsx(C1,{label:P,isRequired:W})},B))}),p.map(({[cr]:B,...P})=>u.jsxs(b1,{children:[r.map(({name:W,key:G,...Y})=>{var oe;return u.jsx(Wc,{hasError:!!((oe=x==null?void 0:x[B])!=null&&oe[W]),children:u.jsx(lr,{name:W,value:P[W],...Y,className:Jr,label:"",hideHelperText:!0,validation:h==null?void 0:h[W],onFocus:v,inputChangeHandler:re=>$(B,W,P,re),checkboxChangeHandler:(...re)=>H(B,W,re[1]),selectChangeHandler:(...re)=>X(B,P,...re),dateChangeHandler:(re,j)=>q(B,re,j),onValidationError:(...re)=>se(B,...re),fetchConfig:l==null?void 0:l[W],createConfig:f==null?void 0:f[W],isScrollTarget:de,...m?{menuPortalTarget:document.body,stackIndex:m}:null})},W??G)}),a?null:u.jsx(Wc,{children:u.jsx(d.Stack,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",children:u.jsx(y1,{onClick:()=>N(B),children:u.jsx(E8,{})})})})]},B))]})}),u.jsxs(p8,{children:[a?null:u.jsxs(g8,{onClick:D,children:[u.jsx(m1,{}),u.jsx(d.Typography,{children:"Add Line"})]}),c.length?u.jsx(m8,{children:c.map(({label:B,columnName:P,operationType:W,prefix:G="",prefixKey:Y,suffix:oe="",suffixKey:re})=>u.jsxs(b8,{children:[u.jsx(d.Typography,{fontWeight:500,children:B}),u.jsxs(d.Typography,{children:[u.jsxs("span",{children:[n[Y]??G," "]}),u.jsx("span",{children:B0(p.map(j=>j[P]),W)}),u.jsx("span",{children:n[re]??oe})]})]},B))}):null]})]})};xa.ROW_ID=cr;const I8=d.styled(d.Box)`
768
766
  box-sizing: border-box;
769
767
  &:not(:has(.${Jr})) {
770
768
  transform: translate(0, 5px);
@@ -799,6 +797,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
799
797
  }
800
798
  & .MuiOutlinedInput-root {
801
799
  font-size: 13px;
800
+ line-height: 19px;
802
801
  }
803
802
  &.MuiInputBase-root.MuiInputBase-multiline {
804
803
  padding: 0px 0px;
@@ -816,7 +815,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
816
815
  & .formField__select {
817
816
  font-size: 13px;
818
817
  font-weight: 400;
819
- line-height: 20px;
818
+ line-height: 19px;
820
819
  color: #3e4c5a;
821
820
  }
822
821
  & .hiverFormField__menu-list {
@@ -1036,8 +1035,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1036
1035
  width: 40px;
1037
1036
  height: 40px;
1038
1037
  }
1039
- `,M8=e=>T.createElement("svg",{width:35,height:35,viewBox:"0 0 35 35",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("rect",{x:9,y:9,width:15,height:17,fill:"white"}),T.createElement("g",{clipPath:"url(#clip0_7787_114457)"},T.createElement("path",{d:"M17.1981 2.86633C9.28704 2.86633 2.86646 9.28691 2.86646 17.198C2.86646 25.1091 9.28704 31.5296 17.1981 31.5296C25.1092 31.5296 31.5298 25.1091 31.5298 17.198C31.5298 9.28691 25.1092 2.86633 17.1981 2.86633ZM14.3318 23.6472V10.7487L22.9308 17.198L14.3318 23.6472Z",fill:"#4D596C"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_7787_114457"},T.createElement("rect",{width:34.396,height:34.396,fill:"white"})))),P8=({aspectRatio:e="auto",...t})=>{const[n,r]=w.useState(!1);return n?null:u.jsxs(R8,{aspectRatio:e,children:[u.jsx("img",{className:"preview-img",onError:()=>r(!0),...t}),u.jsx(M8,{className:"play-icon"})]})},w1=d.styled(({className:e,...t})=>u.jsx(d.Tooltip,{...t,classes:{popper:e}}))(({tooltipStyle:e,arrowStyle:t})=>({[`& .${d.tooltipClasses.arrow}`]:{...t},[`& .${d.tooltipClasses.tooltip}`]:{...e}})),Wc=(e,t,n)=>{let r=`${t}_${n}`;return Object.keys(e).forEach(o=>{r=`${r}_${o}:${e[o]}`}),r},j8=(e,t)=>t?Object.values(t).filter(r=>e.values[r]&&!e.errors[r]):[],zo=(e,t)=>t?Object.keys(t).reduce((r,o)=>{let s="";const a=t[o];return e.values&&e.values[a]&&typeof e.values[a]=="object"&&"value"in e.values[a]?s=e.values[a].value:e.values&&e.values[a]&&typeof e.values[a]!="object"?s=e.values[a]:s=null,{...r,[o]:s}},{}):{},Zc=({formFields:e})=>{const t={};return e.forEach(n=>{var r,o,s,a,i,c;if(t[n.name]={},(r=n.validations)!=null&&r.isRequired&&(typeof n.validations.isRequired=="object"?t[n.name].isRequired=Zy(n.validations.isRequired.msg):t[n.name].isRequired=!0),n.type==="date"){let l=typeof((o=n.validations)==null?void 0:o.disableFuture)=="object"?n.validations.disableFuture.msg:"";l=typeof((s=n.validations)==null?void 0:s.disablePast)=="object"?n.validations.disablePast.msg:l,t[n.name].validate=Xy(l);return}if(n.type==="number"&&((a=n.validations)!=null&&a.range)){t[n.name].validate=zy();return}if(n.type==="text"&&n.limit){t[n.name].validate=pc();return}if(n.type==="table"){const l=Zc({formFields:n.columns??[]});t[n.name].validations=l}if((i=n.validations)!=null&&i.isUrl){const l=typeof n.validations.isUrl=="object"?n.validations.isUrl.msg:"";t[n.name].validate=Hy(l)}else if((c=n.validations)!=null&&c.isEmail){const l=typeof n.validations.isEmail=="object"?n.validations.isEmail.msg:"";t[n.name].validate=Wy(l)}}),t},va={isMultiSelect:e=>Array.isArray(e)?e.every(t=>typeof t=="object"&&"label"in t&&"value"in t):!1,isTable:e=>Array.isArray(e)?e.some(n=>!!n[xa.ROW_ID]):!1,isSelect:e=>!!e&&typeof e=="object"&&"label"in e,isDate:e=>!!e&&typeof e=="object"&&"toISOString"in e},Yo=(e,t)=>Object.keys(t).reduce((n,r)=>{const o=e.values[t[r]];let s;return va.isMultiSelect(o)?s=o.map(a=>a.value):va.isTable(o)?s=o.map(({...i})=>(delete i[xa.ROW_ID],i)).filter(i=>Object.keys(i).length>0):va.isSelect(o)?s=o.value:va.isDate(o)?s=o.toISOString():s=o||"",n[r]=s,n},{}),B8=(e,t)=>{const n={},r=new Set;let o="";for(const s of e)s.rowId?(n[s.rowId]||(n[s.rowId]=[]),n[s.rowId].push(s),r.add(s.rowId),o=""):!n[o]||n[o].length>=t?(r.add(s.name),n[s.name]=[s],o=s.name):n[o].push(s);return[...r].map(s=>({id:s,formFields:n[s]}))},_1=(e,t)=>{if(!t||!Array.isArray(e))return 0;let n=0;for(const r of e){const o=t[r.name];if(r.type==="table"&&Array.isArray(o)){let s=0;for(const a of o){const i=_1(r.columns,a);s+=i}s>0&&n++;continue}o===""||o===void 0||o===null||n++}return n},ur="/v1/api",V8=`${ur}/connectors/conversation/:conversationId/metadata`,G8=`${ur}/connectors/forms/:formId/field/:fieldName/data`,H8=`${ur}/connectors/form/:formId`,W8=`${ur}/connectors/forms/:id/link`,Z8=`${ur}/connectors/forms/:id/preview`,X8=`${ur}/connectors/conversation/:conversationId/selected-email`,z8=`${ur}/connectors/app-cf-values`,Y8=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),we({url:ct(`${G8}?${r.toString()}`,e),method:Me.POST,data:t})},J8=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),we({url:ct(`${H8}?${r.toString()}`,e),method:Me.POST,data:t})},q8=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),we({url:`${Z8.replace(":id",e)}?${r.toString()}`,method:Me.POST,data:{args:t}})},$8="https://avatars.githubusercontent.com/u/62397590",S1={optionsMap:null,createOptionApi:K.IDLE,dropdownOptionsApis:K.IDLE,previewCardData:null,previewCardApiStatus:K.IDLE,selectedSuggestionType:"basic"},A1=dc({name:"commonSlice",initialState:S1,reducers:{resetState:()=>S1,resetPreviewCardData:e=>{e.previewCardData=null,e.previewCardApiStatus=K.IDLE},setSelectedSuggestionType:(e,t)=>{e.selectedSuggestionType=t.payload}},extraReducers:e=>{e.addCase(Ea.pending,t=>{t.createOptionApi=K.LOADING}).addCase(Ea.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,key:s}=n.payload;t.createOptionApi=K.IDLE,t.optionsMap={...r,[s]:{...r[s],options:o}}}).addCase(Ea.rejected,t=>{t.createOptionApi=K.FAILED}).addCase(dr.pending,t=>{t.dropdownOptionsApis=K.LOADING}).addCase(dr.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,hasMore:s,currentPage:a,searchTerm:i,key:c}=n.payload;t.dropdownOptionsApis=K.IDLE,t.optionsMap={...r,[c]:{options:o,hasMore:s,currentPage:a,searchTerm:i}}}).addCase(dr.rejected,t=>{t.dropdownOptionsApis=K.FAILED}).addCase(qr.pending,t=>{t.previewCardApiStatus=K.LOADING}).addCase(qr.fulfilled,(t,n)=>{const{data:r}=n.payload;r&&(t.previewCardData=r),t.previewCardApiStatus=K.IDLE}).addCase(qr.rejected,t=>{t.previewCardApiStatus=K.FAILED})}}),Ea=Yt("commonSlice/createDropDownOption",async(e,{getState:t,rejectWithValue:n})=>{var p,h,g;const{fieldName:r,label:o,formId:s,interfaceId:a,conversationId:i=null,args:c={},createArgs:l={},callback:f}=e,m=Wc(c||{},s,r),{common:b}=t(),{options:v=[],...y}=((p=b.optionsMap)==null?void 0:p[m])||{};try{const C=await J8({fieldName:r,formId:a},{args:l,conversation_id:i});if(!C||!("data"in C)||!("output_variables"in C.data)||!("external_resource_id"in C.data.output_variables))throw C;const x=C.data.output_variables,{external_resource_id:I,...E}=x,A=[{label:o,value:I,prefillValues:E},...v],S=V0(A,L=>L.value);return f==null||f(S),{optionsList:S,key:m,...y}}catch(C){f==null||f(v);const x=C,I=(h=x==null?void 0:x.response)==null?void 0:h.data,E=typeof I=="string"?I:(I==null?void 0:I.message)||xn;return _e({message:E,type:Je}),n((g=x==null?void 0:x.response)==null?void 0:g.status)}}),dr=Yt("commonSlice/fetchDropDownOptions",async(e,{getState:t,rejectWithValue:n})=>{var A,S,L;const{fieldName:r,formId:o,searchTerm:s,fieldConfig:a,callback:i,args:c={},interfaceId:l="",pagination:f={enabled:!1},controller:m}=e,b=Wc(c||{},o,r),{common:v}=t();let y=!1;a.meta&&"showAvatar"in a.meta&&typeof a.meta.showAvatar=="boolean"&&(y=a.meta.showAvatar);const p=((A=v.optionsMap)==null?void 0:A[b])||{},h=!e.isScrollToBottomEvent&&(!p||s!==p.searchTerm),g=h?[]:p.options||[],C=h?!0:p.hasMore??!0,x=h?0:p.currentPage??0,{enabled:I,limit:E}=f,_=E||10;try{let k;const D=m==null?void 0:m.signal,N=I?{pageNumber:x+1,searchTerm:s,limit:_,enabled:I}:null;if(C&&(k=await Y8({fieldName:r,formId:o},{pagination:N||{},args:c,interfaceId:l})),D!=null&&D.aborted)throw D.reason;if(!k||!k.data||!("data"in k.data)||!Array.isArray(k.data.data)||!k.data.data.length){const{common:X}=t(),q=(S=X.optionsMap)==null?void 0:S[b];return i==null||i(q.options??[]),{...q,optionsList:q.options??[],key:b,hasMore:!1}}const V=k.data.data.map(X=>y?{...X,avatarUrl:X.avatarUrl||$8}:(delete X.avatarUrl,X)),J=[...g,...V],$=I?V.length>=_:!1,H=V0(J,X=>X.value);return i==null||i(H),{optionsList:H,fieldName:r,formId:o,searchTerm:s,currentPage:x+1,hasMore:$,key:b}}catch(k){const{common:D}=t(),N=((L=D.optionsMap)==null?void 0:L[b])||{};return i==null||i(N.options??[]),n(k)}},{condition:(e,{getState:t})=>{var m;if(e.isScrollToBottomEvent)return!0;const{fieldName:n,formId:r,searchTerm:o,callback:s,args:a}=e,i=Wc(a||{},r,n),{common:c}=t(),l=(m=c.optionsMap)==null?void 0:m[i];if((l==null?void 0:l.searchTerm)!==o)return!0;const f=(l==null?void 0:l.options)||[];return f&&f.length?(s==null||s(f),!1):!0}}),qr=Yt("commonSlice/previewCard",async({id:e,args:t,channelType:n,isRefresh:r},{rejectWithValue:o})=>{var s;try{const a=await q8(e,t,n),i=a==null?void 0:a.data;return i?(r&&_e({message:F0,type:on}),{data:Od(i)}):(r&&_e({message:O0,type:Je}),{data:null})}catch(a){return o({status:(s=a.response)==null?void 0:s.status})}}),{resetState:rA,resetPreviewCardData:Q8,setSelectedSuggestionType:U8}=A1.actions,K8=A1.reducer,$r="/v1/api",ex=`${$r}/connectors/forms/list`,tx=`${$r}/connectors/cards/:id/unlink`,nx=`${$r}/connectors/forms/:id/link`,rx=`${$r}/connectors/form/:formId`,ox=`${$r}/connectors/forms/:formId/data`,sx=`${$r}/connectors/forms/:formId/get_forms_custom_fields`,ax=({inboxIds:e,channelType:t,conversationId:n})=>{const r=new URLSearchParams;return e.forEach(o=>r.append("inbox_ids",o)),r.append("channel_type",t),r.append("conversation_id",String(n)),we({url:`${ex}?${r.toString()}`,method:Me.GET})},T1=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),we({url:ct(`${rx}?${r.toString()}`,e),method:Me.POST,data:t})},ix=(e,t="email",n,r)=>{const o=new URLSearchParams;return o.append("channel_type",t),we({url:`${tx.replace(":id",e)}?${o.toString()}`,method:Me.POST,data:{externalResourceId:n,conversationId:r}})},cx=(e,t,n="email",r,o)=>{const s=new URLSearchParams;return s.append("channel_type",n),o&&s.append("senderEmail",o),we({url:`${nx.replace(":id",e)}?${s.toString()}`,method:Me.POST,data:{externalResourceId:t,conversationId:r}})},lx=(e,t="email",n,r,o)=>{const s=new URLSearchParams;return s.append("channel_type",t),s.append("conversation_id",String(n||"")),s.append("senderEmail",o),s.append("externalResourceId",r),we({url:`${ox.replace(":formId",e)}?${s.toString()}`,method:Me.GET})},ux="Error in previewing the card",L1="Link format isn't recognized. Please check that you've entered a valid URL",dx="Item already linked",fx="Card linked successfully",px="Error in linking the card",hx="New card created",gx="Card creation failed",mx="Create and link objects from different apps to this conversation",bx="Are you sure you want to change the primary object?",yx="Changing the primary object will reset all the information you’ve entered and all data will be lost and can’t be recovered.",Cx="Are you sure you want to leave?",xx=`If you go back now, all the information you’ve entered will be lost and can’t be recovered.
1040
- Do you want to continue?`,vx="Select an object to create",Ex="Select an object to link",O1="Select object",Ix="Paste URL or ID",wx="Object ID/Link",_x="Card updated",Sx="Card updation failed",F1=3,Xc=(e,t)=>{var r,o,s,a,i,c,l,f,m,b,v,y,p;let n={};switch(e.type){case"select":case"multi-select":{n={...e,defaultOptions:!!e.interfaceDetails,isInfiniteScrollable:((o=(r=e.interfaceDetails)==null?void 0:r.pagination)==null?void 0:o.enabled)||!1,loadOptionsOnFocus:Object.keys(((s=e.interfaceDetails)==null?void 0:s.args)||{}).length>0,isMultiSelect:e.type==="multi-select",type:e.interfaceDetails?"async-select":"select",isClearable:((a=e.meta)==null?void 0:a.isClearable)??!0};break}case"date":{n={...e,type:"date",disablePast:!!((i=e.validations)!=null&&i.disablePast)||!1,disableFuture:!!((c=e.validations)!=null&&c.disableFuture)||!1};break}case"number":{n={...e,type:"number",min:((f=(l=e.validations)==null?void 0:l.range)==null?void 0:f.min)||Number.MIN_SAFE_INTEGER,max:((b=(m=e.validations)==null?void 0:m.range)==null?void 0:b.max)||Number.MAX_SAFE_INTEGER};break}case"multiline":{n={...e,type:"text",maxRows:((v=e.validations)==null?void 0:v.maxRows)||5,limit:(y=e.validations)==null?void 0:y.maxCharacters,rows:5,multiline:!0};break}case"text":{n={...e,type:"text",limit:(p=e.validations)==null?void 0:p.maxCharacters};break}default:n={...e}}return"value"in n&&(n.defaultValue=n.value,delete n.value),{...n,...t}},k1=dc({name:"writeCapability",initialState:k0,reducers:{resetState:()=>k0,resetCurrentResourceDetails:e=>{e.currentResourceDetails=null,e.currentResourceDetailsApiStatus=K.IDLE},setCurrentCardInEdit:(e,t)=>{e.currentCardInEdit=t.payload},setHasUnsavedChanges:(e,t)=>{e.hasUnsavedChanges=t.payload}},extraReducers:e=>{e.addCase(Ia.pending,t=>{t.objectListApiStatus=K.LOADING}).addCase(Ia.fulfilled,(t,n)=>{const{createObjectList:r,createObjectConnectorNamesList:o,linkObjectList:s,editObjectList:a,searchObjectList:i,formFields:c,objectDict:l,dependentFieldsMap:f}=n.payload;t.objectListApiStatus=K.IDLE,t.createObjectList=r,t.createObjectConnectorNamesList=o,t.linkObjectList=s,t.editObjectList=a,t.searchObjectList=i,t.formFields=c,t.objectDict=l,t.dependentFieldsMap=f}).addCase(Ia.rejected,t=>{t.objectListApiStatus=K.FAILED}).addCase(dr.pending,t=>{t.dropdownOptionsApis=K.LOADING}).addCase(dr.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,hasMore:s,currentPage:a,key:i}=n.payload;t.dropdownOptionsApis=K.IDLE,t.optionsMap={...r,[i]:{options:o,hasMore:s,currentPage:a}}}).addCase(dr.rejected,t=>{t.dropdownOptionsApis=K.FAILED}).addCase(wa.pending,t=>{t.createFormApiStatus=K.LOADING}).addCase(wa.fulfilled,t=>{t.createFormApiStatus=K.IDLE}).addCase(wa.rejected,t=>{t.createFormApiStatus=K.FAILED}).addCase(Aa.pending,t=>{t.linkCardApiStatus=K.LOADING}).addCase(Aa.fulfilled,t=>{t.linkCardApiStatus=K.IDLE}).addCase(Aa.rejected,t=>{t.linkCardApiStatus=K.FAILED}).addCase(Sa.pending,t=>{t.unlinkCardApiStatus=K.LOADING}).addCase(Sa.fulfilled,t=>{t.unlinkCardApiStatus=K.IDLE}).addCase(Sa.rejected,t=>{t.unlinkCardApiStatus=K.FAILED}).addCase(_a.pending,t=>{t.updateFormApiStatus=K.LOADING}).addCase(_a.fulfilled,t=>{t.updateFormApiStatus=K.IDLE}).addCase(_a.rejected,t=>{t.updateFormApiStatus=K.FAILED}).addCase(Ta.pending,t=>{t.currentResourceDetailsApiStatus=K.LOADING}).addCase(Ta.fulfilled,(t,n)=>{const{data:r}=n.payload;r&&(t.currentResourceDetails=r),t.currentResourceDetailsApiStatus=K.IDLE}).addCase(Ta.rejected,t=>{t.currentResourceDetailsApiStatus=K.FAILED})}}),Ia=Yt("writeCapability/fetchObjectList",async e=>{const{inboxIds:t,channelType:n,conversationId:r,isExpandedFormEnabled:o}=e,s=await ax({inboxIds:t,channelType:n,conversationId:r});if(!s||!s.data||!("formsList"in s.data)||!Array.isArray(s.data.formsList))return{createObjectList:[],createObjectConnectorNamesList:[],linkObjectList:[],editObjectList:[],searchObjectList:[],formFields:null,objectDict:null,dependentFieldsMap:{}};const a=s.data.formsList,i={},c=[],l=[],f=[],m=[],b=[],v={},y={};return a==null||a.forEach(p=>{var g,C;if(p.expandedView&&!o)return;const h={...p};"fieldList"in h&&delete h.fieldList,y[p.id]=h,i[p.id]||(i[p.id]={}),v[p.id]||(v[p.id]=[]),p.type==="create"&&p.authenticated?(c.push({value:p.id,label:p.name,avatarUrl:p.logoUrl,connectorKey:p.connectorName}),p.connectorName&&!l.includes(p.connectorName)&&l.push(p.connectorName)):p.type==="link"&&p.authenticated?f.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}):p.type==="edit"&&p.authenticated?m.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}):p.type==="search_and_link"&&p.authenticated&&b.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}),(g=p.fieldList)==null||g.sort((x,I)=>x.priority-I.priority),(C=p.fieldList)==null||C.forEach(x=>{const I=Xc(x);if(I.columns&&(I.columns=I.columns.map(E=>Xc(E,{loadOptionsOnFocus:!0,defaultOptions:!1}))),v[p.id]=[...v[p.id],I],x.interfaceDetails&&(x.interfaceDetails.args||x.interfaceDetails.optionalArgs)){const E={...x.interfaceDetails.args,...x.interfaceDetails.optionalArgs};Object.values(E).forEach(_=>{i[p.id][_]?i[p.id][_]=[...i[p.id][_],x.name]:i[p.id][_]=[x.name]})}})}),{createObjectList:c,createObjectConnectorNamesList:l,linkObjectList:f,editObjectList:m,searchObjectList:b,formFields:v,objectDict:y,dependentFieldsMap:i}}),wa=Yt("writeCapability/createForm",async(e,{rejectWithValue:t})=>{var c;const{formId:n,successCallback:r,failureCallback:o,args:s={},interfaceId:a,conversationId:i}=e;try{await T1({formId:n},{args:s,interfaceId:a,conversationId:i}),r==null||r(),_e({message:hx,type:on})}catch(l){const f=l,m=(c=f==null?void 0:f.response)==null?void 0:c.data,b=(m==null?void 0:m.message)??gx;return o==null||o(l),_e({message:b,type:Je}),t(l)}}),_a=Yt("writeCapability/updateForm",async(e,{rejectWithValue:t})=>{const{formId:n,successCallback:r,failureCallback:o,args:s={},interfaceId:a,conversationId:i,externalResourceId:c,previousArgs:l={}}=e;try{await T1({formId:n},{args:s,interfaceId:a,conversationId:i,externalResourceId:c,previousArgs:l}),r==null||r(),_e({message:_x,type:on})}catch(f){return o==null||o(f),_e({message:Sx,type:Je}),t(f)}}),Sa=Yt("writeCapability/unlinkCard",async({id:e,channelType:t,externalResourceId:n,conversationId:r})=>{await ix(e,t,n,r)}),Aa=Yt("writeCapability/linkCard",async({id:e,externalResourceId:t,channelType:n,conversationId:r,email:o},{rejectWithValue:s})=>{var a;try{await cx(e,t,n,r,o)}catch(i){return s({status:(a=i.response)==null?void 0:a.status})}}),Ta=Yt("connectorCardLibrary/fetchCurrentResourceDetails",async(e,{rejectWithValue:t})=>{const{id:n,channelType:r,conversationId:o,externalResourceId:s,contactEmail:a}=e;try{const i=await lx(n,r,o,s,a),c=i==null?void 0:i.data,l=i==null?void 0:i.status,f={values:{},errors:{}};return Object.entries(c.formData).forEach(([m,b])=>{"label"in b&&(b.type&&b.type==="date"?f.values[m]=b.label?new Date(parseInt(b.label)).toISOString():"":b.type&&b.type==="multi-select"&&"value"in b&&"label"in b&&b.value&&b.label?f.values[m]=[{value:b.value,label:b.label}]:b.value?f.values[m]={value:b.value,label:b.label}:f.values[m]=b.label)}),{data:f,status:l}}catch(i){return _e({message:xn,type:Je}),t(i)}}),{resetState:oA,setCurrentCardInEdit:Qr,resetCurrentResourceDetails:Ax,setHasUnsavedChanges:D1}=k1.actions,Tx=k1.reducer,Lx=()=>{const[e,t]=w.useState(null),[n,r]=w.useState({isVertical:!1,isHorizontal:!1,isScrolling:!1}),o=w.useCallback(s=>{t(s)},[]);return w.useEffect(()=>{if(!e)return;e.dataset.prevScrollLeft="0",e.dataset.prevScrollTop="0";let s=null;const a=100;let i=null;const c=150,l=f=>{s||(s=window.setTimeout(()=>{const m=f.target,b=Number(e.dataset.prevScrollLeft)||0,v=Number(e.dataset.prevScrollTop)||0,y=m.scrollLeft,p=m.scrollTop,h=y-b,g=p-v,C=Math.abs(g)>Math.abs(h),x=Math.abs(h)>Math.abs(g);r({isVertical:C,isHorizontal:x,isScrolling:!0}),e.dataset.prevScrollLeft=String(y),e.dataset.prevScrollTop=String(p),s=null},a),i&&window.clearTimeout(i),i=window.setTimeout(()=>{r(m=>({...m,isScrolling:!1})),i=null},c))};return e.addEventListener("scroll",l),()=>{e.removeEventListener("scroll",l),s&&window.clearTimeout(s),i&&window.clearTimeout(i)}},[e]),[n,o]},Ox="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.8016%2011.709L12.3416%205.16893L11.4298%204.25712L4.88979%2010.7972V11.709H5.8016ZM6.33618%2012.9987H3.6001V10.2626L10.9739%202.88875C11.0948%202.76786%2011.2588%202.69995%2011.4298%202.69995C11.6008%202.69995%2011.7648%202.76786%2011.8857%202.88875L13.71%204.71302C13.8309%204.83395%2013.8988%204.99794%2013.8988%205.16893C13.8988%205.33992%2013.8309%205.50391%2013.71%205.62484L6.33618%2012.9987ZM3.6001%2014.2884H15.2073V15.578H3.6001V14.2884Z'%20fill='%236C7B94'/%3e%3c/svg%3e",Fx=({data:e,title:t,currentCard:n,setShowModal:r})=>{const o=zt(),{sendTrackingEvent:s,currentSmIds:a}=w.useContext(Be),{userGroupId:i}=Xt()||{},[c,l]=Lx(),{isScrolling:f,isVertical:m}=c,b=f&&m,v=w.useMemo(()=>(e==null?void 0:e[0].data.map(g=>g.label))||[],[e]),y=w.useMemo(()=>e.map(g=>{const C={cells:{},externalResourceId:g.externalResourceId};return g.data.forEach((x,I)=>{if(v[I]){let E=x.value?x.value:Ms;E&&x.type==="date"&&(E=new Date(parseInt(E)).toLocaleDateString(navigator.language)),C.cells[v[I]]={label:E,deepLink:x==null?void 0:x.deepLink}}}),C}),[e,v]),p=(g,C)=>u.jsx(s4,{align:"left",children:g.deepLink?u.jsx(d.Link,{target:"_blank",underline:"none",href:g.deepLink,children:g.label}):u.jsx(d.Typography,{variant:"body2",color:"gray.black",children:g.label})},`${C}_${g.label}`),h=g=>{!g||!n||(r(!1),s(fd,{card_title:n.title,connector_name:n.connectorName,ug_id:i,sm_ids:a}),o(Qr({...n,externalResourceId:g})))};return u.jsxs(d.Stack,{maxHeight:"340px",maxWidth:"700px",padding:"32px 0px 32px 32px",overflow:"auto",children:[u.jsx(d.Typography,{variant:"h2",color:"gray.black",marginBottom:"16px",children:t}),u.jsx(d.TableContainer,{ref:l,children:u.jsxs(d.Table,{stickyHeader:!0,children:[u.jsx(n4,{children:u.jsxs(d.TableRow,{children:[v.map(g=>u.jsx(r4,{sx:{whiteSpace:"nowrap"},children:u.jsx(d.Typography,{variant:"overline",color:"gray.gray3",children:g})},g)),u.jsx(i4,{})]})}),u.jsx(d.TableBody,{children:y.map((g,C)=>u.jsxs(o4,{children:[Object.values(g.cells).map((x,I)=>p(x,I)),u.jsx(a4,{children:!b&&g.externalResourceId&&u.jsx(d.Tooltip,{title:Ed,placement:"bottom",children:u.jsx(d.IconButton,{className:"row-edit",onClick:()=>h(g.externalResourceId),children:u.jsx("img",{src:Ox})})})})]},`id_${C}`))})]})})]})},kx=e=>e.cardList.connectorCards,Dx=e=>e.cardList.connectorsEnabled,Nx=e=>e.cardList.connectorApiStatus,Rx=e=>e.cardList.cardSpecificData,Mx=e=>e.cardList.specificConnectorApiStatus,Px=e=>e.cardList.specificConnectorErrorCode,jx=e=>{const{connectorApiStatus:t,specificConnectorApiStatus:n}=e.cardList;return t!==K.IDLE||!n?!1:Object.values(n).every(r=>r===K.IDLE||r===K.FAILED)},Bx="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9%204.8675L14.6475%2014.625H3.3525L9%204.8675ZM9%201.875L0.75%2016.125H17.25L9%201.875Z'%20fill='%23F07530'/%3e%3cpath%20d='M9.75%2012.375H8.25V13.875H9.75V12.375Z'%20fill='%23F07530'/%3e%3cpath%20d='M9.75%207.875H8.25V11.625H9.75V7.875Z'%20fill='%23F07530'/%3e%3c/svg%3e",N1=/^No\s.+\sfound\sfor\s(email|Email)\s.+@.+\..+$/,R1=e=>{const t=/\(Error code: (.*?)\)$/,n=e.match(t),r=n?n[1]:null,o=n?e.replace(t,"").trim():e;return{error_code:r,error_message:o}},Vx=(e,t)=>`${_d} (Error code: ${e})`.replace(/{{connector_name}}/g,(t==null?void 0:t[0])||""),Gx=(e,t,n)=>{var l,f,m,b,v;const r=e.externalResourceId?`${e.id}_${e.externalResourceId}`:e.id,o=t==null?void 0:t[r];if(!o)return!0;const s=o.cardType==="flat",a=(l=t==null?void 0:t[r])==null?void 0:l.data,i=s&&((f=a==null?void 0:a.flatDisplay)!=null&&f.data)?a.flatDisplay.data:!s&&((v=(b=(m=a==null?void 0:a.listItems)==null?void 0:m.fields)==null?void 0:b[0])!=null&&v.data)?a.listItems.fields[0].data:[],c=o.cardErrorMessage;return c&&N1.test(c)?!0:!M1(e,t,n)&&!i.length},M1=(e,t,n)=>{var f,m;const r=e.externalResourceId?`${e.id}_${e.externalResourceId}`:e.id,o=t==null?void 0:t[r];if(!o)return!1;const a=o.cardType==="flat"||(m=(f=o.data)==null?void 0:f.listItems)==null?void 0:m.errorMessage,i=(n==null?void 0:n[r])===K.FAILED,c=o.cardErrorMessage,l=c&&N1.test(c);return i||a||c&&!l};function Hx(e,t,n){const r={},o={};let s=0,a=0;for(const c of e){const l=c.externalResourceId?`${c.id}_${c.externalResourceId}`:c.id,f=t==null?void 0:t[l],m=(f==null?void 0:f.connectorNames)??[];for(const b of m)r[b]||(r[b]=[],o[b]={cards_visible:0,empty_cards:0,cards_with_error:0,card_key:[],card_title:[]}),r[b].push(c),o[b].cards_visible+=1,o[b].card_key.push(c.id),o[b].card_title.push(c.title),Gx(c,t,n)&&(o[b].empty_cards+=1,s+=1),M1(c,t,n)&&(o[b].cards_with_error+=1,a+=1)}return{cards_per_app:Object.entries(o).map(([c,l])=>({app_name:c,...l})),total_empty_cards:s,total_cards_with_errors:a}}const P1=e=>{const{value:t,error:n,deepLink:r,statusCode:o,isLoading:s,type:a,redirectToAdminTab:i,isFailed:c,connectorNames:l,cardTitle:f,currentCard:m,cardId:b,isCardLevelError:v,fieldName:y,showErrorIcon:p}=e,h=w.useRef(null),g=w.useRef(null),{email:C,currentSmIds:x,conversationId:I,sendTrackingEvent:E,connectorFunctions:_}=w.useContext(Be),A=Ce(Px),S=A==null?void 0:A[b],[L,k]=w.useState(!1),D=w.useMemo(()=>{if(n&&v){const{error_message:q}=R1(n);return q}return c?_d.replace(/{{connector_name}}/g,(l==null?void 0:l[0])||""):md},[n,c,l,v]),N=w.useCallback(()=>{const q=n||Vx(S,l),{error_code:se,error_message:de}=R1(q);E==null||E(v3,{sm_ids:x,frontend_req_params:{email:C,conversationId:I,externalResourceId:m==null?void 0:m.externalResourceId},card_title:f,connector_name:l!=null&&l.length?l:"",error_code:se,error_message:de})},[n,S,E,x,C,I,f,l,m==null?void 0:m.externalResourceId]);w.useEffect(()=>{(n&&v||c&&S)&&N()},[N,S,c,n,v]),w.useEffect(()=>{const q=r?g.current:h.current;if(q){const se=q.scrollHeight>q.clientHeight||q.scrollWidth>q.clientWidth;k(se)}},[t,r]);const M=o==ji.NOT_FOUND;let V=M?Ms:t;a==="date"&&V&&!M&&(V=new Date(parseInt(V)).toLocaleDateString(navigator.language));const J=!!n||c,$=()=>{i?_==null||_.redirectToAdmin():window.open(c5,"_blank")},H=()=>{E==null||E(E3,{sm_ids:x,card_title:f,field_name:y})},X=q=>{const se=/<>(.*?)<>/g,de=q.split(se);return u.jsx(w.Fragment,{children:de.map((B,P)=>P%2===1?u.jsx(U5,{variant:"body2",onClick:$,children:B},P):B)})};return s?u.jsx(kn,{variant:"rounded",width:"100%",height:16,animation:"wave",margin:"4px 0 0 0"}):J?u.jsxs(jd,{gap:"7px",children:[p?u.jsx(d.Stack,{marginTop:"3px",flexShrink:"0",children:u.jsx("img",{src:Bx,width:"18px",height:"18px"})}):null,u.jsx(Bd,{variant:"body2",children:D?X(D):md})]}):u.jsx(d.Tooltip,{title:L?V:null,placement:"bottom",children:r?u.jsx(Vd,{ref:g,target:"_blank",underline:"none",href:r,fontSize:"13px",onClick:H,children:V||Ms}):u.jsx(e4,{ref:h,variant:"body2",children:V||Ms})})},j1="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_825_73646)'%3e%3cpath%20d='M19%206.41L17.59%205L12%2010.59L6.41%205L5%206.41L10.59%2012L5%2017.59L6.41%2019L12%2013.41L17.59%2019L19%2017.59L13.41%2012L19%206.41Z'%20fill='%236F7C90'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_825_73646'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",fr=({shown:e,setShown:t,children:n,showCloseButton:r=!1,borderRadius:o=4,sx:s})=>u.jsx(d.Dialog,{open:e,onClose:()=>t(!1),PaperProps:{style:{borderRadius:o,padding:0,height:"fit-content",width:"fit-content",maxWidth:"none"}},sx:{...s},children:u.jsxs(d.Stack,{direction:"row",children:[r&&u.jsx(d.Box,{position:"absolute",right:10,top:10,children:u.jsx(d.Tooltip,{title:"Close",placement:"bottom",children:u.jsx(d.IconButton,{onClick:()=>t(!1),children:u.jsx("img",{src:j1})})})}),n]})}),B1=e=>{var B,P,W;const{id:t,cardTitle:n,specificCardData:r,specificConnectorApiStatus:o,isOpen:s,currentCard:a}=e,i=24,c=(o==null?void 0:o[t])===K.IDLE,l=(o==null?void 0:o[t])===K.LOADING,f=(o==null?void 0:o[t])===K.FAILED,{cardType:m,data:b,cardErrorMessage:v,redirectToAdminTab:y,connectorNames:p}=(r==null?void 0:r[t])||{},h=m==="flat",[g,C]=w.useState(!1),[x,I]=w.useState(!1),[E,_]=w.useState(!1),[A,S]=w.useState(!1),L=((B=b==null?void 0:b.listItems)==null?void 0:B.statusCode)!==401,k=w.useMemo(()=>{var G,Y,oe,re;return h&&((G=b==null?void 0:b.flatDisplay)!=null&&G.data)?b.flatDisplay.data:!h&&((re=(oe=(Y=b==null?void 0:b.listItems)==null?void 0:Y.fields)==null?void 0:oe[0])!=null&&re.data)?b.listItems.fields[0].data:[]},[h,b]),D=w.useMemo(()=>k==null?void 0:k.slice(0,5),[k]),[N,M]=w.useState([]),V=w.useRef(null),[J,$]=w.useState(0),H=g?-180:0,X=h?!1:!!((P=b==null?void 0:b.listItems)!=null&&P.errorMessage),q=X||f||v,se=c&&!X&&s&&(E||x);w.useLayoutEffect(()=>{var G;(G=V.current)!=null&&G.scrollHeight&&$(V.current.scrollHeight+i)},[o==null?void 0:o[t],N,V]),w.useEffect(()=>{var re,j;const G=((k==null?void 0:k.length)||0)>5,Y=!h&&(((j=(re=b==null?void 0:b.listItems)==null?void 0:re.fields)==null?void 0:j.length)||0)>1;_(G&&!Y),I(Y)},[b,h,k==null?void 0:k.length]),w.useEffect(()=>{M(g?k:D)},[b,g,D,k]);const de=()=>{E?C(G=>!G):S(G=>!G)};return u.jsxs(u.Fragment,{children:[u.jsx(fr,{shown:A,setShown:S,showCloseButton:!0,borderRadius:12,children:u.jsx(Fx,{data:((W=b==null?void 0:b.listItems)==null?void 0:W.fields)||[],title:n,currentCard:a,setShowModal:S})}),u.jsx($5,{className:s?"":"slideUp",height:J,children:u.jsx(d.Stack,{ref:V,gap:1,margin:"12px",children:l&&!(N!=null&&N.length)?u.jsxs(u.Fragment,{children:[u.jsx(kn,{variant:"rounded",width:"100%",height:20,animation:"wave"}),u.jsx(kn,{variant:"rounded",width:"100%",height:20,animation:"wave"})]}):u.jsx(u.Fragment,{children:q?u.jsx(d.Box,{margin:"8px 0",children:u.jsx(P1,{error:v,isLoading:l,redirectToAdminTab:y,isFailed:f,showErrorIcon:!L,connectorNames:p,cardId:t,cardTitle:n,currentCard:a,isCardLevelError:!0})}):N!=null&&N.length?N==null?void 0:N.map(G=>{const{value:Y,label:oe,deepLink:re,type:j}=G,te="errorMessage"in G?G.errorMessage:null,Ee="statusCode"in G?G.statusCode:null;return u.jsxs("div",{children:[u.jsx(Q5,{variant:"overline",children:oe}),u.jsx(P1,{value:Y,error:te,deepLink:re,statusCode:Ee,isLoading:l,type:j,cardTitle:n,currentCard:a,cardId:t,fieldName:oe})]},oe)}):u.jsx(d.Box,{margin:"8px 0",children:u.jsx(Bd,{children:Q3})})})})}),!v&&se&&u.jsx(l4,{variant:"body2_medium",onClick:de,children:E?u.jsxs(u.Fragment,{children:[g?Z4:qd,u.jsx(c4,{src:W4,transformAngle:H})]}):qd})]})},Wx={connectorCards:null,cardSpecificData:null,connectorApiStatus:K.IDLE,conversationMetaDataApiStatus:K.IDLE,specificConnectorApiStatus:null,threadId:null,connectorsEnabled:!1,specificConnectorErrorCode:null,conversationEmailHeaders:null},V1="/v1/api",Zx=`${V1}/connectors/cards`,Xx=`${V1}/connectors/cards/:id/data`,zx=({inboxIds:e,conversationId:t,channelType:n="email"})=>{const r=new URLSearchParams;return e.forEach(o=>r.append("inbox_ids",o)),r.append("channel_type",n),r.append("conversation_id",String(t||"")),we({url:`${Zx}?${r.toString()}`,method:Me.GET})},Yx=(e,t,n,r)=>{const o=new URLSearchParams;return o.append("senderEmail",t),o.append("conversation_id",String(n||"")),r&&o.append("externalResourceId",r),we({url:`${Xx.replace(":id",e)}?${o.toString()}`,method:Me.GET})},G1=dc({name:"connectorCardLibrary",initialState:Wx,reducers:{updateThreadId(e,t){const{payload:n}=t;e.threadId=n.threadId,e.connectorCards=null},clearConnectorList(e){e.connectorCards=null,e.cardSpecificData=null}},extraReducers:e=>{e.addCase(La.pending,t=>{t.connectorApiStatus=K.LOADING}).addCase(La.fulfilled,(t,n)=>{t.connectorApiStatus=K.IDLE,t.connectorCards=n.payload.cards,t.connectorsEnabled=n.payload.connectorsEnabled}).addCase(La.rejected,t=>{t.connectorApiStatus=K.FAILED}).addCase(Jo.pending,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:K.LOADING}}).addCase(Jo.fulfilled,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`);const{data:a}=n.payload||{};a&&(t.cardSpecificData={...t.cardSpecificData?t.cardSpecificData:{},[s]:a}),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:K.IDLE}}).addCase(Jo.rejected,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:K.FAILED};const a=n.payload&&typeof n.payload=="object"&&"code"in n.payload?String(n.payload.code):Sd;t.specificConnectorErrorCode={...t.specificConnectorErrorCode??{},[s]:a}})}}),La=Yt("connectorCardLibrary/fetchAllCard",async({inboxIds:e,channelType:t,conversationId:n})=>{var i;const r=await zx({inboxIds:e,channelType:t,conversationId:n});if(!Array.isArray((i=r==null?void 0:r.data)==null?void 0:i.cards))return{cards:[],connectorsEnabled:!1};const{cards:o,connectorsEnabled:s=!1}=r.data;return{cards:o.sort((c,l)=>(c==null?void 0:c.priority)-(l==null?void 0:l.priority)),connectorsEnabled:s}}),Jo=Yt("connectorCardLibrary/fetchSpecificCard",async({id:e,email:t,conversationId:n,isRefresh:r,externalResourceId:o},s)=>{try{const a=await Yx(e,t,n,o),i=a==null?void 0:a.data,c=a==null?void 0:a.status;return i?(r&&_e({message:F0,type:on}),{data:Od(i),status:c}):(r&&_e({message:O0,type:Je}),{data:{},status:c})}catch(a){const i=a;return s.rejectWithValue({...i,code:i.code||Sd})}}),Jx=G1.reducer,H1=G1.actions,W1="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.76618%202.23341C8.79952%201.26675%207.47285%200.666748%205.99952%200.666748C3.05285%200.666748%200.672852%203.05341%200.672852%206.00008C0.672852%208.94675%203.05285%2011.3334%205.99952%2011.3334C8.48619%2011.3334%2010.5595%209.63341%2011.1529%207.33341H9.76618C9.21952%208.88675%207.73952%2010.0001%205.99952%2010.0001C3.79285%2010.0001%201.99952%208.20675%201.99952%206.00008C1.99952%203.79341%203.79285%202.00008%205.99952%202.00008C7.10618%202.00008%208.09285%202.46008%208.81285%203.18675L6.66618%205.33341H11.3329V0.666748L9.76618%202.23341Z'%20fill='%236C7B94'/%3e%3c/svg%3e",qx="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.4587%206.7528C11.2244%206.51848%2010.8445%206.51848%2010.6102%206.7528C10.3759%206.98711%2010.3759%207.36701%2010.6102%207.60132L11.4587%206.7528ZM12.1916%208.33414L12.6158%207.90988L12.1916%208.33414ZM8.33462%2012.1911L8.75888%2011.7668L8.33462%2012.1911ZM7.6018%2010.6097C7.36748%2010.3754%206.98758%2010.3754%206.75327%2010.6097C6.51895%2010.8441%206.51895%2011.224%206.75327%2011.4583L7.6018%2010.6097ZM4.43911%209.14411C4.67343%209.37842%205.05333%209.37842%205.28764%209.14411C5.52196%208.9098%205.52196%208.5299%205.28764%208.29558L4.43911%209.14411ZM3.70629%207.56276L4.13056%207.1385L3.70629%207.56276ZM7.56324%203.70582L7.9875%203.28155L7.56324%203.70582ZM8.29606%205.28716C8.53037%205.52148%208.91027%205.52148%209.14459%205.28716C9.3789%205.05285%209.3789%204.67295%209.14459%204.43864L8.29606%205.28716ZM10.6102%207.60132L11.7673%208.75841L12.6158%207.90988L11.4587%206.7528L10.6102%207.60132ZM11.7673%208.75841C12.1662%209.15735%2012.3904%209.69843%2012.3904%2010.2626L13.5904%2010.2626C13.5904%209.38017%2013.2398%208.53387%2012.6158%207.90988L11.7673%208.75841ZM12.3904%2010.2626C12.3904%2010.8268%2012.1662%2011.3679%2011.7673%2011.7668L12.6158%2012.6154C13.2398%2011.9914%2013.5904%2011.1451%2013.5904%2010.2626L12.3904%2010.2626ZM11.7673%2011.7668C10.9365%2012.5976%209.58963%2012.5976%208.75888%2011.7668L7.91035%2012.6154C9.20973%2013.9147%2011.3164%2013.9147%2012.6158%2012.6154L11.7673%2011.7668ZM8.75888%2011.7668L7.6018%2010.6097L6.75327%2011.4583L7.91035%2012.6154L8.75888%2011.7668ZM5.28764%208.29558L4.13056%207.1385L3.28203%207.98703L4.43911%209.14411L5.28764%208.29558ZM4.13056%207.1385C3.73162%206.73956%203.50749%206.19848%203.50749%205.63429L2.30749%205.63429C2.30749%206.51674%202.65804%207.36304%203.28203%207.98703L4.13056%207.1385ZM3.50749%205.63429C3.50749%205.0701%203.73162%204.52902%204.13056%204.13008L3.28203%203.28155C2.65804%203.90554%202.30749%204.75184%202.30749%205.63429L3.50749%205.63429ZM4.13056%204.13008C4.96131%203.29933%206.30822%203.29933%207.13897%204.13008L7.9875%203.28155C6.68812%201.98217%204.58141%201.98217%203.28203%203.28155L4.13056%204.13008ZM7.13897%204.13008L8.29606%205.28716L9.14459%204.43864L7.9875%203.28155L7.13897%204.13008Z'%20fill='%236C7B94'/%3e%3crect%20x='5.08887'%20y='6.0791'%20width='1.33333'%20height='6.66667'%20rx='0.666667'%20transform='rotate(-45%205.08887%206.0791)'%20fill='%236C7B94'/%3e%3cpath%20d='M5.59961%2014.3998V12.7998'%20stroke='%236C7B94'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.7998%205.59961H14.3998'%20stroke='%236C7B94'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M2.40039%2011.2002H4.00039'%20stroke='%236C7B94'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.2002%202.40039V4.00039'%20stroke='%236C7B94'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",$x="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_5908_39767)'%3e%3cpath%20d='M9.37333%206.01333L9.98667%206.62667L3.94667%2012.6667H3.33333V12.0533L9.37333%206.01333ZM11.7733%202C11.6067%202%2011.4333%202.06667%2011.3067%202.19333L10.0867%203.41333L12.5867%205.91333L13.8067%204.69333C14.0667%204.43333%2014.0667%204.01333%2013.8067%203.75333L12.2467%202.19333C12.1133%202.06%2011.9467%202%2011.7733%202ZM9.37333%204.12667L2%2011.5V14H4.5L11.8733%206.62667L9.37333%204.12667Z'%20fill='%236C7B94'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_5908_39767'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Z1=e=>e.write.createObjectList,Qx=e=>e.write.createObjectConnectorNamesList,X1=e=>e.write.linkObjectList,Ux=e=>e.write.editObjectList,Kx=e=>e.write.objectDict,ev=e=>e.write.formFields,tv=e=>e.write.linkCardApiStatus,nv=e=>e.write.unlinkCardApiStatus,rv=e=>e.write.dependentFieldsMap,ov=e=>e.write.createFormApiStatus,sv=e=>e.write.updateFormApiStatus,av=e=>e.write.currentResourceDetails,iv=e=>e.write.currentResourceDetailsApiStatus,z1=e=>e.write.currentCardInEdit,Y1=e=>e.write.hasUnsavedChanges,cv=e=>typeof e=="string"?/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/.test(e):typeof e=="object"&&"_isValid"in e,J1=e=>Object.keys(e).sort((n,r)=>r.localeCompare(n)).reduce((n,r)=>{var o;return(typeof e[r]=="string"||typeof e[r]=="object"&&e[r]!==null)&&cv(e[r])?n[r]=(o=new Date(`${e[r]}`))==null?void 0:o.toString():n[r]=e[r],n},{}),lv=e=>r5.replace("{{connectorName}}",e),uv=({showUnlinkModal:e,setShowUnlinkModal:t,cardId:n,onCardUnlinking:r,externalResourceId:o,conversationId:s,connectorName:a})=>{const i=zt(),{sendTrackingEvent:c}=w.useContext(Be),f=Ce(nv)===K.LOADING,m=()=>{s&&o&&i(Sa({id:n,conversationId:s,externalResourceId:o})).unwrap().then(()=>{c(c3,{connector_name:a,conversation_id:s}),t(!1),r(),_e({message:dy,type:on})}).catch(()=>{_e({message:fy,type:on})})};return u.jsx(fr,{shown:e,setShown:t,showCloseButton:!0,children:u.jsxs(d.Stack,{width:"400px",padding:"20px",gap:"8px",children:[u.jsx(d.Typography,{variant:"h2",children:n5}),u.jsx(d.Typography,{variant:"body2",children:lv(a)}),u.jsxs(d.Stack,{direction:"row",gap:"8px",marginTop:"20px",justifyContent:"flex-end",children:[u.jsx(d.Button,{variant:"text",onClick:()=>t(!1),children:Gi}),u.jsx(d.Button,{disabled:f,color:"error",onClick:m,children:vd})]})]})})},dv=({actions:e,isHovered:t=!1})=>{const r=e.filter(i=>i.shown);if(r.length===0)return null;const o=r[r.length-1],s=r.slice(0,-1),a=t?(s.length+1)*32:32;return u.jsxs(t4,{width:a,isHovered:t,children:[u.jsx("div",{className:"hidden-actions",children:s.map(({id:i,disabled:c,label:l,iconSrc:f,action:m})=>u.jsx(d.Tooltip,{title:l,placement:"bottom",children:u.jsx(Br,{onClick:m,disabled:c,children:u.jsx("img",{src:f})})},i))}),o&&u.jsx(d.Tooltip,{title:o.label,placement:"bottom",children:u.jsx(Br,{onClick:o.action,disabled:o.disabled,children:u.jsx("img",{src:o.iconSrc})})},o.id)]})},fv=e=>{const{card:t,specificCardData:n,email:r,specificConnectorApiStatus:o,defaultOpenState:s=!1,onCardUnlinking:a}=e,i=zt(),{availableFeatures:c,sendTrackingEvent:l,conversationId:f,currentSmIds:m}=w.useContext(Be),{userGroupId:b}=Xt()||{},[v,y]=w.useState(!!s),[p,h]=w.useState(!1),[g,C]=w.useState(!1),[x,I]=w.useState(!1),{id:E,title:_,externalResourceId:A="",forms:S=[],logoUrl:L}=t;let k=E;A&&(k=`${k}_${A}`);const{data:D,cardType:N,cardErrorMessage:M,connectorNames:V}=(n==null?void 0:n[k])??{},J=(V==null?void 0:V[0])||"",$=(o==null?void 0:o[k])===K.LOADING,H=(o==null?void 0:o[k])===K.FAILED,X=!!(et(c,hd)&&A),q=w.useMemo(()=>{var j,te;if(M||H||!(et(c,H3)&&S.some(Ee=>Ee.type==="edit")))return!1;switch(N){case"flat":return!!((D==null?void 0:D.flatDisplay.externalResourceId)??t.externalResourceId);case"flat_with_list":return((j=D==null?void 0:D.listItems)==null?void 0:j.fields.length)===1?(te=D==null?void 0:D.listItems)==null?void 0:te.fields.some(Ee=>Ee.externalResourceId):!1;default:return!1}},[D,N,c,S,t,M,H]),se=w.useCallback((j=!1)=>{const te=j?p3:f3;r&&E&&f&&i(Jo({id:E,email:r,conversationId:f,externalResourceId:A})).unwrap().then(Ee=>{const z={...Ld(Ee,_,j,!0),sm_ids:m};l(te,z)}).catch(Ee=>{const z={...Ld(Ee,_,j,!1),sm_ids:m};l(te,z)})},[i,r,E,_,l,f,A,m]);w.useEffect(()=>{v&&se(!0)},[v,se]);const de=(j,te)=>{var z;j==null||j.stopPropagation(),i(Jo({id:te,email:r,conversationId:f,isRefresh:!0,externalResourceId:A})).unwrap().then(()=>{l(Um,{id:te})});const Ee=j.target.tagName==="BUTTON"?(z=j.target)==null?void 0:z.firstChild:j.target;Ee.className&&(Ee.className=""),setTimeout(()=>Ee.className="selected",1)},B=(j,te)=>{j.stopPropagation(),!(n!=null&&n[te])&&!$&&se(),l(v?Qm:$m,{id:te}),y(Ee=>!Ee)},P=j=>{j.stopPropagation();const te=j.currentTarget.offsetWidth<j.currentTarget.scrollWidth;h(!!te)},W=j=>{var Ee,z;j.stopPropagation(),l(fd,{card_title:_,connector_name:J,ug_id:b,sm_ids:m});let te;N==="flat"?te=(D==null?void 0:D.flatDisplay.externalResourceId)??t.externalResourceId:N==="flat_with_list"&&(te=(z=(Ee=D==null?void 0:D.listItems)==null?void 0:Ee.fields[0])==null?void 0:z.externalResourceId),te?i(Qr({...t,externalResourceId:te})):_e({message:xn,type:Je})},G=j=>{j.stopPropagation(),C(!0)},Y=()=>{I(!0)},oe=()=>{I(!1)},re=[{id:"unlink",label:vd,disabled:$,shown:X,iconSrc:qx,action:j=>G(j)},{id:"refresh",label:bd,disabled:$,shown:!0,iconSrc:W1,action:j=>de(j,E)},{id:"edit",label:Ed,disabled:$,shown:q,iconSrc:$x,action:j=>W(j)}];return u.jsxs(z5,{"data-testid":`test_${E}`,onMouseEnter:Y,onMouseLeave:oe,children:[u.jsxs(Y5,{className:v?"hiver-card-expanded":"",onClick:j=>B(j,k),children:[u.jsxs(J5,{children:[L&&u.jsx("img",{src:L,alt:_}),u.jsx(d.Tooltip,{title:p?_:"",placement:"bottom",children:u.jsx(q5,{variant:"h4",onMouseOver:j=>P(j),onMouseLeave:j=>P(j),children:_})})]}),u.jsxs(jd,{children:[u.jsx(dv,{actions:re,isHovered:x}),u.jsx(d.Tooltip,{title:v?yd:Bi,placement:"bottom",children:u.jsx(Br,{onClick:j=>B(j,k),children:u.jsx(zi,{className:v?"":"hiver-up"})})})]})]}),u.jsx(B1,{id:k,cardTitle:t.title,currentCard:t,specificCardData:n,specificConnectorApiStatus:o,isOpen:v}),u.jsx(uv,{showUnlinkModal:g,setShowUnlinkModal:C,cardId:E,onCardUnlinking:a,conversationId:f,externalResourceId:A,connectorName:J})]})},pv=Number.MAX_SAFE_INTEGER,hv=({cards:e,email:t,specificCardData:n,specificConnectorApiStatus:r,onCardUnlinking:o})=>{const{availableFeatures:s}=w.useContext(Be),i=et(s,Z3)?pv:1;return u.jsx(d.Box,{flexGrow:1,children:e.map((c,l)=>{const{id:f,externalResourceId:m}=c;let b=f;return m&&(b=`${b}_${m}`),u.jsx("div",{children:u.jsx(fv,{card:c,specificCardData:n,email:t??"",defaultOpenState:l<i,specificConnectorApiStatus:r,onCardUnlinking:o})},b)})})},Ur=({children:e})=>{if(!Array.isArray(e))return e;let t=null;return e.find(r=>typeof(r==null?void 0:r.type)!="function"?!1:(r.props.fallback&&(t=r),r.props.condition))??t};function Kr({children:e,condition:t,fallback:n=!1}){return!t&&!n?null:e}Ur.CaseView=Kr;const gv="Bring your favourite tools into Hiver",mv="Plugin image",bv="Integrate tools like Salesforce, HubSpot, and Shopify to boost productivity",yv="Enable Connectors",Cv="Enable Apps",xv="Learn more",vv="https://help.hiverhq.com/custom-connectors/hiver-s-custom-connectors",Ev="Contact your admin to enable this",Iv="https://youtu.be/ODcJnzZLb50",wv="connectors-module/assets/connectors-images/connector-mainpage.png",_v="connectors-module/assets/connectors-images/connector-mainpage-apps.png",Sv="Explore connectors",Av="Connectors",Tv=d.styled(d.Box)`
1038
+ `,M8=e=>T.createElement("svg",{width:35,height:35,viewBox:"0 0 35 35",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("rect",{x:9,y:9,width:15,height:17,fill:"white"}),T.createElement("g",{clipPath:"url(#clip0_7787_114457)"},T.createElement("path",{d:"M17.1981 2.86633C9.28704 2.86633 2.86646 9.28691 2.86646 17.198C2.86646 25.1091 9.28704 31.5296 17.1981 31.5296C25.1092 31.5296 31.5298 25.1091 31.5298 17.198C31.5298 9.28691 25.1092 2.86633 17.1981 2.86633ZM14.3318 23.6472V10.7487L22.9308 17.198L14.3318 23.6472Z",fill:"#4D596C"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_7787_114457"},T.createElement("rect",{width:34.396,height:34.396,fill:"white"})))),P8=({aspectRatio:e="auto",...t})=>{const[n,r]=w.useState(!1);return n?null:u.jsxs(R8,{aspectRatio:e,children:[u.jsx("img",{className:"preview-img",onError:()=>r(!0),...t}),u.jsx(M8,{className:"play-icon"})]})},w1=d.styled(({className:e,...t})=>u.jsx(d.Tooltip,{...t,classes:{popper:e}}))(({tooltipStyle:e,arrowStyle:t})=>({[`& .${d.tooltipClasses.arrow}`]:{...t},[`& .${d.tooltipClasses.tooltip}`]:{...e}})),Zc=(e,t,n)=>{let r=`${t}_${n}`;return Object.keys(e).forEach(o=>{r=`${r}_${o}:${e[o]}`}),r},j8=(e,t)=>t?Object.values(t).filter(r=>e.values[r]&&!e.errors[r]):[],zo=(e,t)=>t?Object.keys(t).reduce((r,o)=>{let s="";const a=t[o];return e.values&&e.values[a]&&typeof e.values[a]=="object"&&"value"in e.values[a]?s=e.values[a].value:e.values&&e.values[a]&&typeof e.values[a]!="object"?s=e.values[a]:s=null,{...r,[o]:s}},{}):{},Xc=({formFields:e})=>{const t={};return e.forEach(n=>{var r,o,s,a,i,c;if(t[n.name]={},(r=n.validations)!=null&&r.isRequired&&(typeof n.validations.isRequired=="object"?t[n.name].isRequired=Zy(n.validations.isRequired.msg):t[n.name].isRequired=!0),n.type==="date"){let l=typeof((o=n.validations)==null?void 0:o.disableFuture)=="object"?n.validations.disableFuture.msg:"";l=typeof((s=n.validations)==null?void 0:s.disablePast)=="object"?n.validations.disablePast.msg:l,t[n.name].validate=Xy(l);return}if(n.type==="number"&&((a=n.validations)!=null&&a.range)){t[n.name].validate=zy();return}if(n.type==="text"&&n.limit){t[n.name].validate=hc();return}if(n.type==="table"){const l=Xc({formFields:n.columns??[]});t[n.name].validations=l}if((i=n.validations)!=null&&i.isUrl){const l=typeof n.validations.isUrl=="object"?n.validations.isUrl.msg:"";t[n.name].validate=Hy(l)}else if((c=n.validations)!=null&&c.isEmail){const l=typeof n.validations.isEmail=="object"?n.validations.isEmail.msg:"";t[n.name].validate=Wy(l)}}),t},va={isMultiSelect:e=>Array.isArray(e)?e.every(t=>typeof t=="object"&&"label"in t&&"value"in t):!1,isTable:e=>Array.isArray(e)?e.some(n=>!!n[xa.ROW_ID]):!1,isSelect:e=>!!e&&typeof e=="object"&&"label"in e,isDate:e=>!!e&&typeof e=="object"&&"toISOString"in e},Yo=(e,t)=>Object.keys(t).reduce((n,r)=>{const o=e.values[t[r]];let s;return va.isMultiSelect(o)?s=o.map(a=>a.value):va.isTable(o)?s=o.map(({...i})=>(delete i[xa.ROW_ID],i)).filter(i=>Object.keys(i).length>0):va.isSelect(o)?s=o.value:va.isDate(o)?s=o.toISOString():s=o||"",n[r]=s,n},{}),B8=(e,t)=>{const n={},r=new Set;let o="";for(const s of e)s.rowId?(n[s.rowId]||(n[s.rowId]=[]),n[s.rowId].push(s),r.add(s.rowId),o=""):!n[o]||n[o].length>=t?(r.add(s.name),n[s.name]=[s],o=s.name):n[o].push(s);return[...r].map(s=>({id:s,formFields:n[s]}))},_1=(e,t)=>{if(!t||!Array.isArray(e))return 0;let n=0;for(const r of e){const o=t[r.name];if(r.type==="table"&&Array.isArray(o)){let s=0;for(const a of o){const i=_1(r.columns,a);s+=i}s>0&&n++;continue}o===""||o===void 0||o===null||n++}return n},ur="/v1/api",V8=`${ur}/connectors/conversation/:conversationId/metadata`,G8=`${ur}/connectors/forms/:formId/field/:fieldName/data`,H8=`${ur}/connectors/form/:formId`,W8=`${ur}/connectors/forms/:id/link`,Z8=`${ur}/connectors/forms/:id/preview`,X8=`${ur}/connectors/conversation/:conversationId/selected-email`,z8=`${ur}/connectors/app-cf-values`,Y8=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),we({url:ct(`${G8}?${r.toString()}`,e),method:Me.POST,data:t})},J8=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),we({url:ct(`${H8}?${r.toString()}`,e),method:Me.POST,data:t})},q8=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),we({url:`${Z8.replace(":id",e)}?${r.toString()}`,method:Me.POST,data:{args:t}})},$8="https://avatars.githubusercontent.com/u/62397590",S1={optionsMap:null,createOptionApi:K.IDLE,dropdownOptionsApis:K.IDLE,previewCardData:null,previewCardApiStatus:K.IDLE,selectedSuggestionType:"basic"},A1=fc({name:"commonSlice",initialState:S1,reducers:{resetState:()=>S1,resetPreviewCardData:e=>{e.previewCardData=null,e.previewCardApiStatus=K.IDLE},setSelectedSuggestionType:(e,t)=>{e.selectedSuggestionType=t.payload}},extraReducers:e=>{e.addCase(Ea.pending,t=>{t.createOptionApi=K.LOADING}).addCase(Ea.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,key:s}=n.payload;t.createOptionApi=K.IDLE,t.optionsMap={...r,[s]:{...r[s],options:o}}}).addCase(Ea.rejected,t=>{t.createOptionApi=K.FAILED}).addCase(dr.pending,t=>{t.dropdownOptionsApis=K.LOADING}).addCase(dr.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,hasMore:s,currentPage:a,searchTerm:i,key:c}=n.payload;t.dropdownOptionsApis=K.IDLE,t.optionsMap={...r,[c]:{options:o,hasMore:s,currentPage:a,searchTerm:i}}}).addCase(dr.rejected,t=>{t.dropdownOptionsApis=K.FAILED}).addCase(qr.pending,t=>{t.previewCardApiStatus=K.LOADING}).addCase(qr.fulfilled,(t,n)=>{const{data:r}=n.payload;r&&(t.previewCardData=r),t.previewCardApiStatus=K.IDLE}).addCase(qr.rejected,t=>{t.previewCardApiStatus=K.FAILED})}}),Ea=Yt("commonSlice/createDropDownOption",async(e,{getState:t,rejectWithValue:n})=>{var p,h,g;const{fieldName:r,label:o,formId:s,interfaceId:a,conversationId:i=null,args:c={},createArgs:l={},callback:f}=e,m=Zc(c||{},s,r),{common:b}=t(),{options:v=[],...y}=((p=b.optionsMap)==null?void 0:p[m])||{};try{const C=await J8({fieldName:r,formId:a},{args:l,conversation_id:i});if(!C||!("data"in C)||!("output_variables"in C.data)||!("external_resource_id"in C.data.output_variables))throw C;const x=C.data.output_variables,{external_resource_id:I,...E}=x,A=[{label:o,value:I,prefillValues:E},...v],S=V0(A,L=>L.value);return f==null||f(S),{optionsList:S,key:m,...y}}catch(C){f==null||f(v);const x=C,I=(h=x==null?void 0:x.response)==null?void 0:h.data,E=typeof I=="string"?I:(I==null?void 0:I.message)||xn;return _e({message:E,type:Je}),n((g=x==null?void 0:x.response)==null?void 0:g.status)}}),dr=Yt("commonSlice/fetchDropDownOptions",async(e,{getState:t,rejectWithValue:n})=>{var A,S,L;const{fieldName:r,formId:o,searchTerm:s,fieldConfig:a,callback:i,args:c={},interfaceId:l="",pagination:f={enabled:!1},controller:m}=e,b=Zc(c||{},o,r),{common:v}=t();let y=!1;a.meta&&"showAvatar"in a.meta&&typeof a.meta.showAvatar=="boolean"&&(y=a.meta.showAvatar);const p=((A=v.optionsMap)==null?void 0:A[b])||{},h=!e.isScrollToBottomEvent&&(!p||s!==p.searchTerm),g=h?[]:p.options||[],C=h?!0:p.hasMore??!0,x=h?0:p.currentPage??0,{enabled:I,limit:E}=f,_=E||10;try{let k;const D=m==null?void 0:m.signal,N=I?{pageNumber:x+1,searchTerm:s,limit:_,enabled:I}:null;if(C&&(k=await Y8({fieldName:r,formId:o},{pagination:N||{},args:c,interfaceId:l})),D!=null&&D.aborted)throw D.reason;if(!k||!k.data||!("data"in k.data)||!Array.isArray(k.data.data)||!k.data.data.length){const{common:X}=t(),q=(S=X.optionsMap)==null?void 0:S[b];return i==null||i(q.options??[]),{...q,optionsList:q.options??[],key:b,hasMore:!1}}const V=k.data.data.map(X=>y?{...X,avatarUrl:X.avatarUrl||$8}:(delete X.avatarUrl,X)),J=[...g,...V],$=I?V.length>=_:!1,H=V0(J,X=>X.value);return i==null||i(H),{optionsList:H,fieldName:r,formId:o,searchTerm:s,currentPage:x+1,hasMore:$,key:b}}catch(k){const{common:D}=t(),N=((L=D.optionsMap)==null?void 0:L[b])||{};return i==null||i(N.options??[]),n(k)}},{condition:(e,{getState:t})=>{var m;if(e.isScrollToBottomEvent)return!0;const{fieldName:n,formId:r,searchTerm:o,callback:s,args:a}=e,i=Zc(a||{},r,n),{common:c}=t(),l=(m=c.optionsMap)==null?void 0:m[i];if((l==null?void 0:l.searchTerm)!==o)return!0;const f=(l==null?void 0:l.options)||[];return f&&f.length?(s==null||s(f),!1):!0}}),qr=Yt("commonSlice/previewCard",async({id:e,args:t,channelType:n,isRefresh:r},{rejectWithValue:o})=>{var s;try{const a=await q8(e,t,n),i=a==null?void 0:a.data;return i?(r&&_e({message:F0,type:on}),{data:Od(i)}):(r&&_e({message:O0,type:Je}),{data:null})}catch(a){return o({status:(s=a.response)==null?void 0:s.status})}}),{resetState:rA,resetPreviewCardData:Q8,setSelectedSuggestionType:U8}=A1.actions,K8=A1.reducer,$r="/v1/api",ex=`${$r}/connectors/forms/list`,tx=`${$r}/connectors/cards/:id/unlink`,nx=`${$r}/connectors/forms/:id/link`,rx=`${$r}/connectors/form/:formId`,ox=`${$r}/connectors/forms/:formId/data`,sx=`${$r}/connectors/forms/:formId/get_forms_custom_fields`,ax=({inboxIds:e,channelType:t,conversationId:n})=>{const r=new URLSearchParams;return e.forEach(o=>r.append("inbox_ids",o)),r.append("channel_type",t),r.append("conversation_id",String(n)),we({url:`${ex}?${r.toString()}`,method:Me.GET})},T1=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),we({url:ct(`${rx}?${r.toString()}`,e),method:Me.POST,data:t})},ix=(e,t="email",n,r)=>{const o=new URLSearchParams;return o.append("channel_type",t),we({url:`${tx.replace(":id",e)}?${o.toString()}`,method:Me.POST,data:{externalResourceId:n,conversationId:r}})},cx=(e,t,n="email",r,o)=>{const s=new URLSearchParams;return s.append("channel_type",n),o&&s.append("senderEmail",o),we({url:`${nx.replace(":id",e)}?${s.toString()}`,method:Me.POST,data:{externalResourceId:t,conversationId:r}})},lx=(e,t="email",n,r,o)=>{const s=new URLSearchParams;return s.append("channel_type",t),s.append("conversation_id",String(n||"")),s.append("senderEmail",o),s.append("externalResourceId",r),we({url:`${ox.replace(":formId",e)}?${s.toString()}`,method:Me.GET})},ux="Error in previewing the card",L1="Link format isn't recognized. Please check that you've entered a valid URL",dx="Item already linked",fx="Card linked successfully",px="Error in linking the card",hx="New card created",gx="Card creation failed",mx="Create and link objects from different apps to this conversation",bx="Are you sure you want to change the primary object?",yx="Changing the primary object will reset all the information you’ve entered and all data will be lost and can’t be recovered.",Cx="Are you sure you want to leave?",xx=`If you go back now, all the information you’ve entered will be lost and can’t be recovered.
1039
+ Do you want to continue?`,vx="Select an object to create",Ex="Select an object to link",O1="Select object",Ix="Paste URL or ID",wx="Object ID/Link",_x="Card updated",Sx="Card updation failed",F1=3,zc=(e,t)=>{var r,o,s,a,i,c,l,f,m,b,v,y,p;let n={};switch(e.type){case"select":case"multi-select":{n={...e,defaultOptions:!!e.interfaceDetails,isInfiniteScrollable:((o=(r=e.interfaceDetails)==null?void 0:r.pagination)==null?void 0:o.enabled)||!1,loadOptionsOnFocus:Object.keys(((s=e.interfaceDetails)==null?void 0:s.args)||{}).length>0,isMultiSelect:e.type==="multi-select",type:e.interfaceDetails?"async-select":"select",isClearable:((a=e.meta)==null?void 0:a.isClearable)??!0};break}case"date":{n={...e,type:"date",disablePast:!!((i=e.validations)!=null&&i.disablePast)||!1,disableFuture:!!((c=e.validations)!=null&&c.disableFuture)||!1};break}case"number":{n={...e,type:"number",min:((f=(l=e.validations)==null?void 0:l.range)==null?void 0:f.min)||Number.MIN_SAFE_INTEGER,max:((b=(m=e.validations)==null?void 0:m.range)==null?void 0:b.max)||Number.MAX_SAFE_INTEGER};break}case"multiline":{n={...e,type:"text",maxRows:((v=e.validations)==null?void 0:v.maxRows)||5,limit:(y=e.validations)==null?void 0:y.maxCharacters,rows:5,multiline:!0};break}case"text":{n={...e,type:"text",limit:(p=e.validations)==null?void 0:p.maxCharacters};break}default:n={...e}}return"value"in n&&(n.defaultValue=n.value,delete n.value),{...n,...t}},k1=fc({name:"writeCapability",initialState:k0,reducers:{resetState:()=>k0,resetCurrentResourceDetails:e=>{e.currentResourceDetails=null,e.currentResourceDetailsApiStatus=K.IDLE},setCurrentCardInEdit:(e,t)=>{e.currentCardInEdit=t.payload},setHasUnsavedChanges:(e,t)=>{e.hasUnsavedChanges=t.payload}},extraReducers:e=>{e.addCase(Ia.pending,t=>{t.objectListApiStatus=K.LOADING}).addCase(Ia.fulfilled,(t,n)=>{const{createObjectList:r,createObjectConnectorNamesList:o,linkObjectList:s,editObjectList:a,searchObjectList:i,formFields:c,objectDict:l,dependentFieldsMap:f}=n.payload;t.objectListApiStatus=K.IDLE,t.createObjectList=r,t.createObjectConnectorNamesList=o,t.linkObjectList=s,t.editObjectList=a,t.searchObjectList=i,t.formFields=c,t.objectDict=l,t.dependentFieldsMap=f}).addCase(Ia.rejected,t=>{t.objectListApiStatus=K.FAILED}).addCase(dr.pending,t=>{t.dropdownOptionsApis=K.LOADING}).addCase(dr.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,hasMore:s,currentPage:a,key:i}=n.payload;t.dropdownOptionsApis=K.IDLE,t.optionsMap={...r,[i]:{options:o,hasMore:s,currentPage:a}}}).addCase(dr.rejected,t=>{t.dropdownOptionsApis=K.FAILED}).addCase(wa.pending,t=>{t.createFormApiStatus=K.LOADING}).addCase(wa.fulfilled,t=>{t.createFormApiStatus=K.IDLE}).addCase(wa.rejected,t=>{t.createFormApiStatus=K.FAILED}).addCase(Aa.pending,t=>{t.linkCardApiStatus=K.LOADING}).addCase(Aa.fulfilled,t=>{t.linkCardApiStatus=K.IDLE}).addCase(Aa.rejected,t=>{t.linkCardApiStatus=K.FAILED}).addCase(Sa.pending,t=>{t.unlinkCardApiStatus=K.LOADING}).addCase(Sa.fulfilled,t=>{t.unlinkCardApiStatus=K.IDLE}).addCase(Sa.rejected,t=>{t.unlinkCardApiStatus=K.FAILED}).addCase(_a.pending,t=>{t.updateFormApiStatus=K.LOADING}).addCase(_a.fulfilled,t=>{t.updateFormApiStatus=K.IDLE}).addCase(_a.rejected,t=>{t.updateFormApiStatus=K.FAILED}).addCase(Ta.pending,t=>{t.currentResourceDetailsApiStatus=K.LOADING}).addCase(Ta.fulfilled,(t,n)=>{const{data:r}=n.payload;r&&(t.currentResourceDetails=r),t.currentResourceDetailsApiStatus=K.IDLE}).addCase(Ta.rejected,t=>{t.currentResourceDetailsApiStatus=K.FAILED})}}),Ia=Yt("writeCapability/fetchObjectList",async e=>{const{inboxIds:t,channelType:n,conversationId:r,isExpandedFormEnabled:o}=e,s=await ax({inboxIds:t,channelType:n,conversationId:r});if(!s||!s.data||!("formsList"in s.data)||!Array.isArray(s.data.formsList))return{createObjectList:[],createObjectConnectorNamesList:[],linkObjectList:[],editObjectList:[],searchObjectList:[],formFields:null,objectDict:null,dependentFieldsMap:{}};const a=s.data.formsList,i={},c=[],l=[],f=[],m=[],b=[],v={},y={};return a==null||a.forEach(p=>{var g,C;if(p.expandedView&&!o)return;const h={...p};"fieldList"in h&&delete h.fieldList,y[p.id]=h,i[p.id]||(i[p.id]={}),v[p.id]||(v[p.id]=[]),p.type==="create"&&p.authenticated?(c.push({value:p.id,label:p.name,avatarUrl:p.logoUrl,connectorKey:p.connectorName}),p.connectorName&&!l.includes(p.connectorName)&&l.push(p.connectorName)):p.type==="link"&&p.authenticated?f.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}):p.type==="edit"&&p.authenticated?m.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}):p.type==="search_and_link"&&p.authenticated&&b.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}),(g=p.fieldList)==null||g.sort((x,I)=>x.priority-I.priority),(C=p.fieldList)==null||C.forEach(x=>{const I=zc(x);if(I.columns&&(I.columns=I.columns.map(E=>zc(E,{loadOptionsOnFocus:!0,defaultOptions:!1}))),v[p.id]=[...v[p.id],I],x.interfaceDetails&&(x.interfaceDetails.args||x.interfaceDetails.optionalArgs)){const E={...x.interfaceDetails.args,...x.interfaceDetails.optionalArgs};Object.values(E).forEach(_=>{i[p.id][_]?i[p.id][_]=[...i[p.id][_],x.name]:i[p.id][_]=[x.name]})}})}),{createObjectList:c,createObjectConnectorNamesList:l,linkObjectList:f,editObjectList:m,searchObjectList:b,formFields:v,objectDict:y,dependentFieldsMap:i}}),wa=Yt("writeCapability/createForm",async(e,{rejectWithValue:t})=>{var c;const{formId:n,successCallback:r,failureCallback:o,args:s={},interfaceId:a,conversationId:i}=e;try{await T1({formId:n},{args:s,interfaceId:a,conversationId:i}),r==null||r(),_e({message:hx,type:on})}catch(l){const f=l,m=(c=f==null?void 0:f.response)==null?void 0:c.data,b=(m==null?void 0:m.message)??gx;return o==null||o(l),_e({message:b,type:Je}),t(l)}}),_a=Yt("writeCapability/updateForm",async(e,{rejectWithValue:t})=>{const{formId:n,successCallback:r,failureCallback:o,args:s={},interfaceId:a,conversationId:i,externalResourceId:c,previousArgs:l={}}=e;try{await T1({formId:n},{args:s,interfaceId:a,conversationId:i,externalResourceId:c,previousArgs:l}),r==null||r(),_e({message:_x,type:on})}catch(f){return o==null||o(f),_e({message:Sx,type:Je}),t(f)}}),Sa=Yt("writeCapability/unlinkCard",async({id:e,channelType:t,externalResourceId:n,conversationId:r})=>{await ix(e,t,n,r)}),Aa=Yt("writeCapability/linkCard",async({id:e,externalResourceId:t,channelType:n,conversationId:r,email:o},{rejectWithValue:s})=>{var a;try{await cx(e,t,n,r,o)}catch(i){return s({status:(a=i.response)==null?void 0:a.status})}}),Ta=Yt("connectorCardLibrary/fetchCurrentResourceDetails",async(e,{rejectWithValue:t})=>{const{id:n,channelType:r,conversationId:o,externalResourceId:s,contactEmail:a}=e;try{const i=await lx(n,r,o,s,a),c=i==null?void 0:i.data,l=i==null?void 0:i.status,f={values:{},errors:{}};return Object.entries(c.formData).forEach(([m,b])=>{"label"in b&&(b.type&&b.type==="date"?f.values[m]=b.label?new Date(parseInt(b.label)).toISOString():"":b.type&&b.type==="multi-select"&&"value"in b&&"label"in b&&b.value&&b.label?f.values[m]=[{value:b.value,label:b.label}]:b.value?f.values[m]={value:b.value,label:b.label}:f.values[m]=b.label)}),{data:f,status:l}}catch(i){return _e({message:xn,type:Je}),t(i)}}),{resetState:oA,setCurrentCardInEdit:Qr,resetCurrentResourceDetails:Ax,setHasUnsavedChanges:D1}=k1.actions,Tx=k1.reducer,Lx=()=>{const[e,t]=w.useState(null),[n,r]=w.useState({isVertical:!1,isHorizontal:!1,isScrolling:!1}),o=w.useCallback(s=>{t(s)},[]);return w.useEffect(()=>{if(!e)return;e.dataset.prevScrollLeft="0",e.dataset.prevScrollTop="0";let s=null;const a=100;let i=null;const c=150,l=f=>{s||(s=window.setTimeout(()=>{const m=f.target,b=Number(e.dataset.prevScrollLeft)||0,v=Number(e.dataset.prevScrollTop)||0,y=m.scrollLeft,p=m.scrollTop,h=y-b,g=p-v,C=Math.abs(g)>Math.abs(h),x=Math.abs(h)>Math.abs(g);r({isVertical:C,isHorizontal:x,isScrolling:!0}),e.dataset.prevScrollLeft=String(y),e.dataset.prevScrollTop=String(p),s=null},a),i&&window.clearTimeout(i),i=window.setTimeout(()=>{r(m=>({...m,isScrolling:!1})),i=null},c))};return e.addEventListener("scroll",l),()=>{e.removeEventListener("scroll",l),s&&window.clearTimeout(s),i&&window.clearTimeout(i)}},[e]),[n,o]},Ox="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.8016%2011.709L12.3416%205.16893L11.4298%204.25712L4.88979%2010.7972V11.709H5.8016ZM6.33618%2012.9987H3.6001V10.2626L10.9739%202.88875C11.0948%202.76786%2011.2588%202.69995%2011.4298%202.69995C11.6008%202.69995%2011.7648%202.76786%2011.8857%202.88875L13.71%204.71302C13.8309%204.83395%2013.8988%204.99794%2013.8988%205.16893C13.8988%205.33992%2013.8309%205.50391%2013.71%205.62484L6.33618%2012.9987ZM3.6001%2014.2884H15.2073V15.578H3.6001V14.2884Z'%20fill='%236C7B94'/%3e%3c/svg%3e",Fx=({data:e,title:t,currentCard:n,setShowModal:r})=>{const o=zt(),{sendTrackingEvent:s,currentSmIds:a}=w.useContext(Be),{userGroupId:i}=Xt()||{},[c,l]=Lx(),{isScrolling:f,isVertical:m}=c,b=f&&m,v=w.useMemo(()=>(e==null?void 0:e[0].data.map(g=>g.label))||[],[e]),y=w.useMemo(()=>e.map(g=>{const C={cells:{},externalResourceId:g.externalResourceId};return g.data.forEach((x,I)=>{if(v[I]){let E=x.value?x.value:Ms;E&&x.type==="date"&&(E=new Date(parseInt(E)).toLocaleDateString(navigator.language)),C.cells[v[I]]={label:E,deepLink:x==null?void 0:x.deepLink}}}),C}),[e,v]),p=(g,C)=>u.jsx(s4,{align:"left",children:g.deepLink?u.jsx(d.Link,{target:"_blank",underline:"none",href:g.deepLink,children:g.label}):u.jsx(d.Typography,{variant:"body2",color:"gray.black",children:g.label})},`${C}_${g.label}`),h=g=>{!g||!n||(r(!1),s(pd,{card_title:n.title,connector_name:n.connectorName,ug_id:i,sm_ids:a}),o(Qr({...n,externalResourceId:g})))};return u.jsxs(d.Stack,{maxHeight:"340px",maxWidth:"700px",padding:"32px 0px 32px 32px",overflow:"auto",children:[u.jsx(d.Typography,{variant:"h2",color:"gray.black",marginBottom:"16px",children:t}),u.jsx(d.TableContainer,{ref:l,children:u.jsxs(d.Table,{stickyHeader:!0,children:[u.jsx(n4,{children:u.jsxs(d.TableRow,{children:[v.map(g=>u.jsx(r4,{sx:{whiteSpace:"nowrap"},children:u.jsx(d.Typography,{variant:"overline",color:"gray.gray3",children:g})},g)),u.jsx(i4,{})]})}),u.jsx(d.TableBody,{children:y.map((g,C)=>u.jsxs(o4,{children:[Object.values(g.cells).map((x,I)=>p(x,I)),u.jsx(a4,{children:!b&&g.externalResourceId&&u.jsx(d.Tooltip,{title:Id,placement:"bottom",children:u.jsx(d.IconButton,{className:"row-edit",onClick:()=>h(g.externalResourceId),children:u.jsx("img",{src:Ox})})})})]},`id_${C}`))})]})})]})},kx=e=>e.cardList.connectorCards,Dx=e=>e.cardList.connectorsEnabled,Nx=e=>e.cardList.connectorApiStatus,Rx=e=>e.cardList.cardSpecificData,Mx=e=>e.cardList.specificConnectorApiStatus,Px=e=>e.cardList.specificConnectorErrorCode,jx=e=>{const{connectorApiStatus:t,specificConnectorApiStatus:n}=e.cardList;return t!==K.IDLE||!n?!1:Object.values(n).every(r=>r===K.IDLE||r===K.FAILED)},Bx="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9%204.8675L14.6475%2014.625H3.3525L9%204.8675ZM9%201.875L0.75%2016.125H17.25L9%201.875Z'%20fill='%23F07530'/%3e%3cpath%20d='M9.75%2012.375H8.25V13.875H9.75V12.375Z'%20fill='%23F07530'/%3e%3cpath%20d='M9.75%207.875H8.25V11.625H9.75V7.875Z'%20fill='%23F07530'/%3e%3c/svg%3e",N1=/^No\s.+\sfound\sfor\s(email|Email)\s.+@.+\..+$/,R1=e=>{const t=/\(Error code: (.*?)\)$/,n=e.match(t),r=n?n[1]:null,o=n?e.replace(t,"").trim():e;return{error_code:r,error_message:o}},Vx=(e,t)=>`${_d} (Error code: ${e})`.replace(/{{connector_name}}/g,(t==null?void 0:t[0])||""),Gx=(e,t,n)=>{var l,f,m,b,v;const r=e.externalResourceId?`${e.id}_${e.externalResourceId}`:e.id,o=t==null?void 0:t[r];if(!o)return!0;const s=o.cardType==="flat",a=(l=t==null?void 0:t[r])==null?void 0:l.data,i=s&&((f=a==null?void 0:a.flatDisplay)!=null&&f.data)?a.flatDisplay.data:!s&&((v=(b=(m=a==null?void 0:a.listItems)==null?void 0:m.fields)==null?void 0:b[0])!=null&&v.data)?a.listItems.fields[0].data:[],c=o.cardErrorMessage;return c&&N1.test(c)?!0:!M1(e,t,n)&&!i.length},M1=(e,t,n)=>{var f,m;const r=e.externalResourceId?`${e.id}_${e.externalResourceId}`:e.id,o=t==null?void 0:t[r];if(!o)return!1;const a=o.cardType==="flat"||(m=(f=o.data)==null?void 0:f.listItems)==null?void 0:m.errorMessage,i=(n==null?void 0:n[r])===K.FAILED,c=o.cardErrorMessage,l=c&&N1.test(c);return i||a||c&&!l};function Hx(e,t,n){const r={},o={};let s=0,a=0;for(const c of e){const l=c.externalResourceId?`${c.id}_${c.externalResourceId}`:c.id,f=t==null?void 0:t[l],m=(f==null?void 0:f.connectorNames)??[];for(const b of m)r[b]||(r[b]=[],o[b]={cards_visible:0,empty_cards:0,cards_with_error:0,card_key:[],card_title:[]}),r[b].push(c),o[b].cards_visible+=1,o[b].card_key.push(c.id),o[b].card_title.push(c.title),Gx(c,t,n)&&(o[b].empty_cards+=1,s+=1),M1(c,t,n)&&(o[b].cards_with_error+=1,a+=1)}return{cards_per_app:Object.entries(o).map(([c,l])=>({app_name:c,...l})),total_empty_cards:s,total_cards_with_errors:a}}const P1=e=>{const{value:t,error:n,deepLink:r,statusCode:o,isLoading:s,type:a,redirectToAdminTab:i,isFailed:c,connectorNames:l,cardTitle:f,currentCard:m,cardId:b,isCardLevelError:v,fieldName:y,showErrorIcon:p}=e,h=w.useRef(null),g=w.useRef(null),{email:C,currentSmIds:x,conversationId:I,sendTrackingEvent:E,connectorFunctions:_}=w.useContext(Be),A=Ce(Px),S=A==null?void 0:A[b],[L,k]=w.useState(!1),D=w.useMemo(()=>{if(n&&v){const{error_message:q}=R1(n);return q}return c?_d.replace(/{{connector_name}}/g,(l==null?void 0:l[0])||""):bd},[n,c,l,v]),N=w.useCallback(()=>{const q=n||Vx(S,l),{error_code:se,error_message:de}=R1(q);E==null||E(v3,{sm_ids:x,frontend_req_params:{email:C,conversationId:I,externalResourceId:m==null?void 0:m.externalResourceId},card_title:f,connector_name:l!=null&&l.length?l:"",error_code:se,error_message:de})},[n,S,E,x,C,I,f,l,m==null?void 0:m.externalResourceId]);w.useEffect(()=>{(n&&v||c&&S)&&N()},[N,S,c,n,v]),w.useEffect(()=>{const q=r?g.current:h.current;if(q){const se=q.scrollHeight>q.clientHeight||q.scrollWidth>q.clientWidth;k(se)}},[t,r]);const M=o==ji.NOT_FOUND;let V=M?Ms:t;a==="date"&&V&&!M&&(V=new Date(parseInt(V)).toLocaleDateString(navigator.language));const J=!!n||c,$=()=>{i?_==null||_.redirectToAdmin():window.open(c5,"_blank")},H=()=>{E==null||E(E3,{sm_ids:x,card_title:f,field_name:y})},X=q=>{const se=/<>(.*?)<>/g,de=q.split(se);return u.jsx(w.Fragment,{children:de.map((B,P)=>P%2===1?u.jsx(U5,{variant:"body2",onClick:$,children:B},P):B)})};return s?u.jsx(kn,{variant:"rounded",width:"100%",height:16,animation:"wave",margin:"4px 0 0 0"}):J?u.jsxs(jd,{gap:"7px",children:[p?u.jsx(d.Stack,{marginTop:"3px",flexShrink:"0",children:u.jsx("img",{src:Bx,width:"18px",height:"18px"})}):null,u.jsx(Bd,{variant:"body_sm_regular",children:D?X(D):bd})]}):u.jsx(d.Tooltip,{title:L?V:null,placement:"bottom",children:r?u.jsx(Vd,{ref:g,target:"_blank",underline:"none",href:r,fontSize:"13px",onClick:H,children:V||Ms}):u.jsx(e4,{ref:h,variant:"caption_regular",children:V||Ms})})},j1="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_825_73646)'%3e%3cpath%20d='M19%206.41L17.59%205L12%2010.59L6.41%205L5%206.41L10.59%2012L5%2017.59L6.41%2019L12%2013.41L17.59%2019L19%2017.59L13.41%2012L19%206.41Z'%20fill='%236F7C90'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_825_73646'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",fr=({shown:e,setShown:t,children:n,showCloseButton:r=!1,borderRadius:o=4,sx:s})=>u.jsx(d.Dialog,{open:e,onClose:()=>t(!1),PaperProps:{style:{borderRadius:o,padding:0,height:"fit-content",width:"fit-content",maxWidth:"none"}},sx:{...s},children:u.jsxs(d.Stack,{direction:"row",children:[r&&u.jsx(d.Box,{position:"absolute",right:10,top:10,children:u.jsx(d.Tooltip,{title:"Close",placement:"bottom",children:u.jsx(d.IconButton,{onClick:()=>t(!1),children:u.jsx("img",{src:j1})})})}),n]})}),B1=e=>{var B,P,W;const{id:t,cardTitle:n,specificCardData:r,specificConnectorApiStatus:o,isOpen:s,currentCard:a}=e,i=24,c=(o==null?void 0:o[t])===K.IDLE,l=(o==null?void 0:o[t])===K.LOADING,f=(o==null?void 0:o[t])===K.FAILED,{cardType:m,data:b,cardErrorMessage:v,redirectToAdminTab:y,connectorNames:p}=(r==null?void 0:r[t])||{},h=m==="flat",[g,C]=w.useState(!1),[x,I]=w.useState(!1),[E,_]=w.useState(!1),[A,S]=w.useState(!1),L=((B=b==null?void 0:b.listItems)==null?void 0:B.statusCode)!==401,k=w.useMemo(()=>{var G,Y,oe,re;return h&&((G=b==null?void 0:b.flatDisplay)!=null&&G.data)?b.flatDisplay.data:!h&&((re=(oe=(Y=b==null?void 0:b.listItems)==null?void 0:Y.fields)==null?void 0:oe[0])!=null&&re.data)?b.listItems.fields[0].data:[]},[h,b]),D=w.useMemo(()=>k==null?void 0:k.slice(0,5),[k]),[N,M]=w.useState([]),V=w.useRef(null),[J,$]=w.useState(0),H=g?-180:0,X=h?!1:!!((P=b==null?void 0:b.listItems)!=null&&P.errorMessage),q=X||f||v,se=c&&!X&&s&&(E||x);w.useLayoutEffect(()=>{var G;(G=V.current)!=null&&G.scrollHeight&&$(V.current.scrollHeight+i)},[o==null?void 0:o[t],N,V]),w.useEffect(()=>{var re,j;const G=((k==null?void 0:k.length)||0)>5,Y=!h&&(((j=(re=b==null?void 0:b.listItems)==null?void 0:re.fields)==null?void 0:j.length)||0)>1;_(G&&!Y),I(Y)},[b,h,k==null?void 0:k.length]),w.useEffect(()=>{M(g?k:D)},[b,g,D,k]);const de=()=>{E?C(G=>!G):S(G=>!G)};return u.jsxs(u.Fragment,{children:[u.jsx(fr,{shown:A,setShown:S,showCloseButton:!0,borderRadius:12,children:u.jsx(Fx,{data:((W=b==null?void 0:b.listItems)==null?void 0:W.fields)||[],title:n,currentCard:a,setShowModal:S})}),u.jsx($5,{className:s?"":"slideUp",height:J,children:u.jsx(d.Stack,{ref:V,gap:1,margin:"12px",children:l&&!(N!=null&&N.length)?u.jsxs(u.Fragment,{children:[u.jsx(kn,{variant:"rounded",width:"100%",height:20,animation:"wave"}),u.jsx(kn,{variant:"rounded",width:"100%",height:20,animation:"wave"})]}):u.jsx(u.Fragment,{children:q?u.jsx(d.Box,{margin:"8px 0",children:u.jsx(P1,{error:v,isLoading:l,redirectToAdminTab:y,isFailed:f,showErrorIcon:!L,connectorNames:p,cardId:t,cardTitle:n,currentCard:a,isCardLevelError:!0})}):N!=null&&N.length?N==null?void 0:N.map(G=>{const{value:Y,label:oe,deepLink:re,type:j}=G,te="errorMessage"in G?G.errorMessage:null,Ee="statusCode"in G?G.statusCode:null;return u.jsxs("div",{children:[u.jsx(Q5,{variant:"overline_medium",children:oe}),u.jsx(P1,{value:Y,error:te,deepLink:re,statusCode:Ee,isLoading:l,type:j,cardTitle:n,currentCard:a,cardId:t,fieldName:oe})]},oe)}):u.jsx(d.Box,{margin:"8px 0",children:u.jsx(Bd,{variant:"body_sm_regular",children:Q3})})})})}),!v&&se&&u.jsx(l4,{variant:"body_xs_medium",onClick:de,children:E?u.jsxs(u.Fragment,{children:[g?Z4:qd,u.jsx(c4,{src:W4,transformAngle:H})]}):qd})]})},Wx={connectorCards:null,cardSpecificData:null,connectorApiStatus:K.IDLE,conversationMetaDataApiStatus:K.IDLE,specificConnectorApiStatus:null,threadId:null,connectorsEnabled:!1,specificConnectorErrorCode:null,conversationEmailHeaders:null},V1="/v1/api",Zx=`${V1}/connectors/cards`,Xx=`${V1}/connectors/cards/:id/data`,zx=({inboxIds:e,conversationId:t,channelType:n="email"})=>{const r=new URLSearchParams;return e.forEach(o=>r.append("inbox_ids",o)),r.append("channel_type",n),r.append("conversation_id",String(t||"")),we({url:`${Zx}?${r.toString()}`,method:Me.GET})},Yx=(e,t,n,r)=>{const o=new URLSearchParams;return o.append("senderEmail",t),o.append("conversation_id",String(n||"")),r&&o.append("externalResourceId",r),we({url:`${Xx.replace(":id",e)}?${o.toString()}`,method:Me.GET})},G1=fc({name:"connectorCardLibrary",initialState:Wx,reducers:{updateThreadId(e,t){const{payload:n}=t;e.threadId=n.threadId,e.connectorCards=null},clearConnectorList(e){e.connectorCards=null,e.cardSpecificData=null}},extraReducers:e=>{e.addCase(La.pending,t=>{t.connectorApiStatus=K.LOADING}).addCase(La.fulfilled,(t,n)=>{t.connectorApiStatus=K.IDLE,t.connectorCards=n.payload.cards,t.connectorsEnabled=n.payload.connectorsEnabled}).addCase(La.rejected,t=>{t.connectorApiStatus=K.FAILED}).addCase(Jo.pending,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:K.LOADING}}).addCase(Jo.fulfilled,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`);const{data:a}=n.payload||{};a&&(t.cardSpecificData={...t.cardSpecificData?t.cardSpecificData:{},[s]:a}),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:K.IDLE}}).addCase(Jo.rejected,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:K.FAILED};const a=n.payload&&typeof n.payload=="object"&&"code"in n.payload?String(n.payload.code):Sd;t.specificConnectorErrorCode={...t.specificConnectorErrorCode??{},[s]:a}})}}),La=Yt("connectorCardLibrary/fetchAllCard",async({inboxIds:e,channelType:t,conversationId:n})=>{var i;const r=await zx({inboxIds:e,channelType:t,conversationId:n});if(!Array.isArray((i=r==null?void 0:r.data)==null?void 0:i.cards))return{cards:[],connectorsEnabled:!1};const{cards:o,connectorsEnabled:s=!1}=r.data;return{cards:o.sort((c,l)=>(c==null?void 0:c.priority)-(l==null?void 0:l.priority)),connectorsEnabled:s}}),Jo=Yt("connectorCardLibrary/fetchSpecificCard",async({id:e,email:t,conversationId:n,isRefresh:r,externalResourceId:o},s)=>{try{const a=await Yx(e,t,n,o),i=a==null?void 0:a.data,c=a==null?void 0:a.status;return i?(r&&_e({message:F0,type:on}),{data:Od(i),status:c}):(r&&_e({message:O0,type:Je}),{data:{},status:c})}catch(a){const i=a;return s.rejectWithValue({...i,code:i.code||Sd})}}),Jx=G1.reducer,H1=G1.actions,W1="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.76618%202.23341C8.79952%201.26675%207.47285%200.666748%205.99952%200.666748C3.05285%200.666748%200.672852%203.05341%200.672852%206.00008C0.672852%208.94675%203.05285%2011.3334%205.99952%2011.3334C8.48619%2011.3334%2010.5595%209.63341%2011.1529%207.33341H9.76618C9.21952%208.88675%207.73952%2010.0001%205.99952%2010.0001C3.79285%2010.0001%201.99952%208.20675%201.99952%206.00008C1.99952%203.79341%203.79285%202.00008%205.99952%202.00008C7.10618%202.00008%208.09285%202.46008%208.81285%203.18675L6.66618%205.33341H11.3329V0.666748L9.76618%202.23341Z'%20fill='%236C7B94'/%3e%3c/svg%3e",qx="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.4587%206.7528C11.2244%206.51848%2010.8445%206.51848%2010.6102%206.7528C10.3759%206.98711%2010.3759%207.36701%2010.6102%207.60132L11.4587%206.7528ZM12.1916%208.33414L12.6158%207.90988L12.1916%208.33414ZM8.33462%2012.1911L8.75888%2011.7668L8.33462%2012.1911ZM7.6018%2010.6097C7.36748%2010.3754%206.98758%2010.3754%206.75327%2010.6097C6.51895%2010.8441%206.51895%2011.224%206.75327%2011.4583L7.6018%2010.6097ZM4.43911%209.14411C4.67343%209.37842%205.05333%209.37842%205.28764%209.14411C5.52196%208.9098%205.52196%208.5299%205.28764%208.29558L4.43911%209.14411ZM3.70629%207.56276L4.13056%207.1385L3.70629%207.56276ZM7.56324%203.70582L7.9875%203.28155L7.56324%203.70582ZM8.29606%205.28716C8.53037%205.52148%208.91027%205.52148%209.14459%205.28716C9.3789%205.05285%209.3789%204.67295%209.14459%204.43864L8.29606%205.28716ZM10.6102%207.60132L11.7673%208.75841L12.6158%207.90988L11.4587%206.7528L10.6102%207.60132ZM11.7673%208.75841C12.1662%209.15735%2012.3904%209.69843%2012.3904%2010.2626L13.5904%2010.2626C13.5904%209.38017%2013.2398%208.53387%2012.6158%207.90988L11.7673%208.75841ZM12.3904%2010.2626C12.3904%2010.8268%2012.1662%2011.3679%2011.7673%2011.7668L12.6158%2012.6154C13.2398%2011.9914%2013.5904%2011.1451%2013.5904%2010.2626L12.3904%2010.2626ZM11.7673%2011.7668C10.9365%2012.5976%209.58963%2012.5976%208.75888%2011.7668L7.91035%2012.6154C9.20973%2013.9147%2011.3164%2013.9147%2012.6158%2012.6154L11.7673%2011.7668ZM8.75888%2011.7668L7.6018%2010.6097L6.75327%2011.4583L7.91035%2012.6154L8.75888%2011.7668ZM5.28764%208.29558L4.13056%207.1385L3.28203%207.98703L4.43911%209.14411L5.28764%208.29558ZM4.13056%207.1385C3.73162%206.73956%203.50749%206.19848%203.50749%205.63429L2.30749%205.63429C2.30749%206.51674%202.65804%207.36304%203.28203%207.98703L4.13056%207.1385ZM3.50749%205.63429C3.50749%205.0701%203.73162%204.52902%204.13056%204.13008L3.28203%203.28155C2.65804%203.90554%202.30749%204.75184%202.30749%205.63429L3.50749%205.63429ZM4.13056%204.13008C4.96131%203.29933%206.30822%203.29933%207.13897%204.13008L7.9875%203.28155C6.68812%201.98217%204.58141%201.98217%203.28203%203.28155L4.13056%204.13008ZM7.13897%204.13008L8.29606%205.28716L9.14459%204.43864L7.9875%203.28155L7.13897%204.13008Z'%20fill='%236C7B94'/%3e%3crect%20x='5.08887'%20y='6.0791'%20width='1.33333'%20height='6.66667'%20rx='0.666667'%20transform='rotate(-45%205.08887%206.0791)'%20fill='%236C7B94'/%3e%3cpath%20d='M5.59961%2014.3998V12.7998'%20stroke='%236C7B94'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.7998%205.59961H14.3998'%20stroke='%236C7B94'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M2.40039%2011.2002H4.00039'%20stroke='%236C7B94'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.2002%202.40039V4.00039'%20stroke='%236C7B94'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",$x="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_5908_39767)'%3e%3cpath%20d='M9.37333%206.01333L9.98667%206.62667L3.94667%2012.6667H3.33333V12.0533L9.37333%206.01333ZM11.7733%202C11.6067%202%2011.4333%202.06667%2011.3067%202.19333L10.0867%203.41333L12.5867%205.91333L13.8067%204.69333C14.0667%204.43333%2014.0667%204.01333%2013.8067%203.75333L12.2467%202.19333C12.1133%202.06%2011.9467%202%2011.7733%202ZM9.37333%204.12667L2%2011.5V14H4.5L11.8733%206.62667L9.37333%204.12667Z'%20fill='%236C7B94'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_5908_39767'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Z1=e=>e.write.createObjectList,Qx=e=>e.write.createObjectConnectorNamesList,X1=e=>e.write.linkObjectList,Ux=e=>e.write.editObjectList,Kx=e=>e.write.objectDict,ev=e=>e.write.formFields,tv=e=>e.write.linkCardApiStatus,nv=e=>e.write.unlinkCardApiStatus,rv=e=>e.write.dependentFieldsMap,ov=e=>e.write.createFormApiStatus,sv=e=>e.write.updateFormApiStatus,av=e=>e.write.currentResourceDetails,iv=e=>e.write.currentResourceDetailsApiStatus,z1=e=>e.write.currentCardInEdit,Y1=e=>e.write.hasUnsavedChanges,cv=e=>typeof e=="string"?/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/.test(e):typeof e=="object"&&"_isValid"in e,J1=e=>Object.keys(e).sort((n,r)=>r.localeCompare(n)).reduce((n,r)=>{var o;return(typeof e[r]=="string"||typeof e[r]=="object"&&e[r]!==null)&&cv(e[r])?n[r]=(o=new Date(`${e[r]}`))==null?void 0:o.toString():n[r]=e[r],n},{}),lv=e=>r5.replace("{{connectorName}}",e),uv=({showUnlinkModal:e,setShowUnlinkModal:t,cardId:n,onCardUnlinking:r,externalResourceId:o,conversationId:s,connectorName:a})=>{const i=zt(),{sendTrackingEvent:c}=w.useContext(Be),f=Ce(nv)===K.LOADING,m=()=>{s&&o&&i(Sa({id:n,conversationId:s,externalResourceId:o})).unwrap().then(()=>{c(c3,{connector_name:a,conversation_id:s}),t(!1),r(),_e({message:dy,type:on})}).catch(()=>{_e({message:fy,type:on})})};return u.jsx(fr,{shown:e,setShown:t,showCloseButton:!0,children:u.jsxs(d.Stack,{width:"400px",padding:"20px",gap:"8px",children:[u.jsx(d.Typography,{variant:"h2",children:n5}),u.jsx(d.Typography,{variant:"body2",children:lv(a)}),u.jsxs(d.Stack,{direction:"row",gap:"8px",marginTop:"20px",justifyContent:"flex-end",children:[u.jsx(d.Button,{variant:"text",onClick:()=>t(!1),children:Gi}),u.jsx(d.Button,{disabled:f,color:"error",onClick:m,children:Ed})]})]})})},dv=({actions:e,isHovered:t=!1})=>{const r=e.filter(i=>i.shown);if(r.length===0)return null;const o=r[r.length-1],s=r.slice(0,-1),a=t?(s.length+1)*32:32;return u.jsxs(t4,{width:a,isHovered:t,children:[u.jsx("div",{className:"hidden-actions",children:s.map(({id:i,disabled:c,label:l,iconSrc:f,action:m})=>u.jsx(d.Tooltip,{title:l,placement:"bottom",children:u.jsx(Br,{onClick:m,disabled:c,children:u.jsx("img",{src:f})})},i))}),o&&u.jsx(d.Tooltip,{title:o.label,placement:"bottom",children:u.jsx(Br,{onClick:o.action,disabled:o.disabled,children:u.jsx("img",{src:o.iconSrc})})},o.id)]})},fv=e=>{const{card:t,specificCardData:n,email:r,specificConnectorApiStatus:o,defaultOpenState:s=!1,onCardUnlinking:a}=e,i=zt(),{availableFeatures:c,sendTrackingEvent:l,conversationId:f,currentSmIds:m}=w.useContext(Be),{userGroupId:b}=Xt()||{},[v,y]=w.useState(!!s),[p,h]=w.useState(!1),[g,C]=w.useState(!1),[x,I]=w.useState(!1),{id:E,title:_,externalResourceId:A="",forms:S=[],logoUrl:L}=t;let k=E;A&&(k=`${k}_${A}`);const{data:D,cardType:N,cardErrorMessage:M,connectorNames:V}=(n==null?void 0:n[k])??{},J=(V==null?void 0:V[0])||"",$=(o==null?void 0:o[k])===K.LOADING,H=(o==null?void 0:o[k])===K.FAILED,X=!!(et(c,gd)&&A),q=w.useMemo(()=>{var j,te;if(M||H||!(et(c,H3)&&S.some(Ee=>Ee.type==="edit")))return!1;switch(N){case"flat":return!!((D==null?void 0:D.flatDisplay.externalResourceId)??t.externalResourceId);case"flat_with_list":return((j=D==null?void 0:D.listItems)==null?void 0:j.fields.length)===1?(te=D==null?void 0:D.listItems)==null?void 0:te.fields.some(Ee=>Ee.externalResourceId):!1;default:return!1}},[D,N,c,S,t,M,H]),se=w.useCallback((j=!1)=>{const te=j?p3:f3;r&&E&&f&&i(Jo({id:E,email:r,conversationId:f,externalResourceId:A})).unwrap().then(Ee=>{const z={...Ld(Ee,_,j,!0),sm_ids:m};l(te,z)}).catch(Ee=>{const z={...Ld(Ee,_,j,!1),sm_ids:m};l(te,z)})},[i,r,E,_,l,f,A,m]);w.useEffect(()=>{v&&se(!0)},[v,se]);const de=(j,te)=>{var z;j==null||j.stopPropagation(),i(Jo({id:te,email:r,conversationId:f,isRefresh:!0,externalResourceId:A})).unwrap().then(()=>{l(Um,{id:te})});const Ee=j.target.tagName==="BUTTON"?(z=j.target)==null?void 0:z.firstChild:j.target;Ee.className&&(Ee.className=""),setTimeout(()=>Ee.className="selected",1)},B=(j,te)=>{j.stopPropagation(),!(n!=null&&n[te])&&!$&&se(),l(v?Qm:$m,{id:te}),y(Ee=>!Ee)},P=j=>{j.stopPropagation();const te=j.currentTarget.offsetWidth<j.currentTarget.scrollWidth;h(!!te)},W=j=>{var Ee,z;j.stopPropagation(),l(pd,{card_title:_,connector_name:J,ug_id:b,sm_ids:m});let te;N==="flat"?te=(D==null?void 0:D.flatDisplay.externalResourceId)??t.externalResourceId:N==="flat_with_list"&&(te=(z=(Ee=D==null?void 0:D.listItems)==null?void 0:Ee.fields[0])==null?void 0:z.externalResourceId),te?i(Qr({...t,externalResourceId:te})):_e({message:xn,type:Je})},G=j=>{j.stopPropagation(),C(!0)},Y=()=>{I(!0)},oe=()=>{I(!1)},re=[{id:"unlink",label:Ed,disabled:$,shown:X,iconSrc:qx,action:j=>G(j)},{id:"refresh",label:yd,disabled:$,shown:!0,iconSrc:W1,action:j=>de(j,E)},{id:"edit",label:Id,disabled:$,shown:q,iconSrc:$x,action:j=>W(j)}];return u.jsxs(z5,{"data-testid":`test_${E}`,onMouseEnter:Y,onMouseLeave:oe,children:[u.jsxs(Y5,{className:v?"hiver-card-expanded":"",onClick:j=>B(j,k),children:[u.jsxs(J5,{children:[L&&u.jsx("img",{src:L,alt:_}),u.jsx(d.Tooltip,{title:p?_:"",placement:"bottom",children:u.jsx(q5,{variant:"body_sm_regular",onMouseOver:j=>P(j),onMouseLeave:j=>P(j),children:_})})]}),u.jsxs(jd,{children:[u.jsx(dv,{actions:re,isHovered:x}),u.jsx(d.Tooltip,{title:v?Cd:Bi,placement:"bottom",children:u.jsx(Br,{onClick:j=>B(j,k),children:u.jsx(Yi,{className:v?"":"hiver-up"})})})]})]}),u.jsx(B1,{id:k,cardTitle:t.title,currentCard:t,specificCardData:n,specificConnectorApiStatus:o,isOpen:v}),u.jsx(uv,{showUnlinkModal:g,setShowUnlinkModal:C,cardId:E,onCardUnlinking:a,conversationId:f,externalResourceId:A,connectorName:J})]})},pv=Number.MAX_SAFE_INTEGER,hv=({cards:e,email:t,specificCardData:n,specificConnectorApiStatus:r,onCardUnlinking:o})=>{const{availableFeatures:s}=w.useContext(Be),i=et(s,Z3)?pv:1;return u.jsx(d.Box,{flexGrow:1,children:e.map((c,l)=>{const{id:f,externalResourceId:m}=c;let b=f;return m&&(b=`${b}_${m}`),u.jsx("div",{children:u.jsx(fv,{card:c,specificCardData:n,email:t??"",defaultOpenState:l<i,specificConnectorApiStatus:r,onCardUnlinking:o})},b)})})},Ur=({children:e})=>{if(!Array.isArray(e))return e;let t=null;return e.find(r=>typeof(r==null?void 0:r.type)!="function"?!1:(r.props.fallback&&(t=r),r.props.condition))??t};function Kr({children:e,condition:t,fallback:n=!1}){return!t&&!n?null:e}Ur.CaseView=Kr;const gv="Bring your favourite tools into Hiver",mv="Plugin image",bv="Integrate tools like Salesforce, HubSpot, and Shopify to boost productivity",yv="Enable Connectors",Cv="Enable Apps",xv="Learn more",vv="https://help.hiverhq.com/custom-connectors/hiver-s-custom-connectors",Ev="Contact your admin to enable this",Iv="https://youtu.be/ODcJnzZLb50",wv="connectors-module/assets/connectors-images/connector-mainpage.png",_v="connectors-module/assets/connectors-images/connector-mainpage-apps.png",Sv="Explore connectors",Av="Connectors",Tv=d.styled(d.Box)`
1041
1040
  padding-top: 20px;
1042
1041
  `,Lv=d.styled(d.Stack)`
1043
1042
  width: 100%;
@@ -1089,7 +1088,7 @@ Do you want to continue?`,vx="Select an object to create",Ex="Select an object t
1089
1088
  color: ${d.theme.palette.gray.gray3};
1090
1089
  `,Rv=d.styled(d.Typography)`
1091
1090
  color: ${d.theme.palette.gray.gray3};
1092
- `,Mv="https://cdn.hiverhq.com/connectors-module/assets/PlugIn.svg",Pv={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_HIVER_CDN_URL:"https://cdn.hiverhq.com/",VITE_MY_ENV_VAR:"myVariable From Agent"},{VITE_HIVER_CDN_URL:jv}=Pv,$1=({isAdmin:e=!0,hideHeading:t=!1})=>{const{sendTrackingEvent:n,availableFeatures:r,connectorFunctions:o}=w.useContext(Be),s=et(r,V3),a=et(r,Rs),i=m=>{m.stopPropagation(),n(Jm),o==null||o.redirectToAdmin()},c=m=>{m.stopPropagation(),n(qm),window.open(vv,"_blank")},l=()=>{n(x3,{source:"main_tab"})},f=a?_v:wv;return u.jsxs(Tv,{"data-testid":"noConnectors",children:[s?u.jsxs(u.Fragment,{children:[t?null:u.jsx(d.Typography,{variant:"h2",children:a?Vi:Av}),u.jsx(Fv,{onClick:l,href:Iv,target:"_blank",children:u.jsx(P8,{src:jv+f,alt:Sv,aspectRatio:"1000/783"})})]}):u.jsxs(Lv,{children:[u.jsx(Ov,{variant:"body1_medium",children:gv}),u.jsx("img",{src:Mv,alt:mv})]}),u.jsx(kv,{variant:"body2",children:bv}),e?u.jsx(q1,{endIcon:u.jsx(d.icons.ArrowForward,{}),onClick:i,...s&&{size:"medium"},children:a?Cv:yv}):u.jsxs(u.Fragment,{children:[u.jsx(q1,{onClick:c,children:xv}),u.jsxs(Dv,{direction:"row",children:[u.jsx(Nv,{}),u.jsx(Rv,{variant:"caption",children:Ev})]})]})]})},Bv=()=>{const{availableFeatures:e}=w.useContext(Be),t=et(e,Rs);return u.jsxs(Pd,{children:[u.jsxs(d.Stack,{direction:"row",boxSizing:"content-box",paddingTop:"20px",paddingBottom:"12px",height:"36px",gap:"8px",alignItems:"center",children:[t?u.jsx(Dd,{width:"20px",height:"20px"}):u.jsx(Rd,{}),u.jsx(Md,{variant:"h2",children:t?Vi:Cd})]}),u.jsxs(d.Stack,{gap:"12px",children:[u.jsx(kn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),u.jsx(kn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),u.jsx(kn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"})]})]})},Vv=()=>{const{metaData:e,sendTrackingEvent:t,isAdmin:n,connectorFunctions:r}=w.useContext(Be),[o,s]=w.useState(!1),a=w.useRef(null),[i,c]=w.useState(0),{templateUpdates:l}=e||{},{sections:f=[],actionButtons:m=[],title:b}=l||{},{version:v=""}=l||{},y=d5(v),p=w.useMemo(()=>u5(v),[v]),h=w.useMemo(()=>(m==null?void 0:m.filter(({isAdminPanelLink:I})=>!(!n&&I)))??[],[m,n]);if(w.useEffect(()=>{!p&&l&&Wi(v,!0)},[p,v,l]),w.useLayoutEffect(()=>{var I;(I=a.current)!=null&&I.scrollHeight&&c(a.current.scrollHeight)},[a]),w.useEffect(()=>{l&&!y&&t(e3,{update_version_id:v})},[]),!l||y)return null;const g=I=>{var E;I.stopPropagation(),s(_=>!_),(E=a.current)!=null&&E.scrollHeight&&c(a.current.scrollHeight),Wi(v,!1,!0)},C=(I,E="",_=!1,A=!1)=>{var S;if(I.stopPropagation(),_&&A?t(t3,{update_version_id:v}):A&&t(n3,{update_version_id:v}),!_&&E){(S=window.open(E,"_blank"))==null||S.focus();return}x(I,!1),r==null||r.redirectToAdmin()},x=(I,E=!0)=>{I.stopPropagation(),Wi(v,!1),s(!1),E&&t(r3,{update_version_id:v})};return u.jsxs(d4,{children:[u.jsxs(f4,{children:[u.jsx(u4,{variant:"h3",children:b}),u.jsxs(d.Box,{children:[o?u.jsx(d.Tooltip,{title:K3,placement:"bottom",children:u.jsx(d.IconButton,{onClick:x,children:u.jsx(d.icons.Close,{sx:{height:"16px",width:"16px",opacity:"0.8"}})})}):null,u.jsx(d.Tooltip,{title:o?U3:Bi,placement:"bottom",children:u.jsx(Br,{onClick:g,children:u.jsx(zi,{className:o?"":"hiver-up"})})})]})]}),u.jsx(p4,{className:o?"slideDown":"slideUp",ref:a,height:i,children:u.jsxs(h4,{children:[f.map(({title:I,items:E,type:_})=>u.jsxs(C4,{children:[u.jsx(d.Typography,{variant:"body2_medium",children:I}),E.map(A=>{const S=_===s5,{deeplink:L,textHtml:k,imageUrl:D}=A,N=()=>u.jsx(K5,{className:S?"":"ellipsisClass",component:"div",variant:"body2",dangerouslySetInnerHTML:{__html:k}});return u.jsx(g4,{component:"ul",children:u.jsxs(m4,{component:S?"li":"div",marginLeft:D?"0":"14px",children:[D?u.jsx("img",{src:D}):null,L?u.jsx(Vd,{target:"_blank",underline:"none",onClick:M=>C(M,L),fontSize:"13px",children:N()}):N()]})},k)})]},I)),u.jsx(d.Stack,{flexDirection:"row",gap:"8px",marginBottom:"11.5px",children:h.map(({text:I,link:E,isAdminPanelLink:_})=>u.jsx(b4,{variant:_?"contained":"text",children:u.jsx(y4,{variant:"caption",onClick:A=>C(A,E,_,!0),children:I})},I))})]})})]})},Gv=({selectedEmail:e,conversationId:t})=>we({url:X8.replace(":conversationId",""+t),method:Me.PATCH,data:{selectedEmail:e}}),Hv="data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='7'%20cy='7'%20r='7'%20fill='%23196FE0'/%3e%3cpath%20d='M10.8288%204.89995C10.5922%204.64324%2010.1976%204.63193%209.94761%204.87601L5.96804%208.75823L4.06989%206.75353C3.82948%206.49981%203.43531%206.49425%203.18845%206.74158C2.9418%206.98865%202.9366%207.39455%203.1768%207.64827L5.50404%2010.1061C5.626%2010.235%205.78808%2010.3%205.95059%2010.3C6.10477%2010.3%206.25896%2010.2414%206.37969%2010.124L10.8056%205.80646C11.0553%205.56278%2011.0659%205.15689%2010.8288%204.89995Z'%20fill='white'/%3e%3c/svg%3e",Q1=e=>{const t=w.useRef(null),[n,r]=w.useState(!1);return w.useEffect(()=>{t.current&&r(t.current.scrollWidth>t.current.clientWidth)},[e]),{textRef:t,isOverflow:n}},Wv=e=>{const{textRef:t,isOverflow:n}=Q1(e.data.label);return u.jsx(d.Tooltip,{title:n?e.data.value:null,placement:"bottom",children:u.jsx(x4,{ref:t,variant:"body2",paddingTop:n?"5px":"0px",children:e.data.label})})},Zv=e=>u.jsxs(ln.MenuList,{...e,children:[u.jsx(v4,{children:u.jsx(d.Typography,{variant:"body2_medium",children:Y4})}),e.children]}),Xv=e=>{const{isSelected:t}=e,{textRef:n,isOverflow:r}=Q1(e.data.label);return u.jsx(ln.Option,{...e,children:u.jsxs(d.Stack,{direction:"row",gap:"5px",justifyContent:"space-between",alignItems:"center",children:[u.jsx(d.Tooltip,{title:r?e.data.value:null,placement:"bottom",children:u.jsx(E4,{ref:n,className:"dropdown-item-text",variant:"body2",children:e.data.label})}),t?u.jsx("img",{src:Hv,width:"14px",height:"14px"}):null]})})},zv=e=>u.jsx(ln.ValueContainer,{...e,children:u.jsxs(d.Stack,{direction:"row",alignItems:"center",gap:"4px",children:[u.jsx(d.icons.AccountCircle,{sx:{height:"20px",width:"20px",color:d.theme.palette.gray.gray3,flexShrink:0}}),u.jsx(d.Stack,{direction:"row",alignItems:"center",sx:{flex:1,minWidth:0,overflow:"hidden"},children:e.children})]})}),Yv=e=>u.jsx(ln.DropdownIndicator,{...e,children:e.selectProps.menuIsOpen?u.jsx(d.icons.ArrowDropUp,{sx:{height:"18px",width:"18px",color:d.theme.palette.gray.gray3}}):u.jsx(d.icons.ArrowDropDown,{sx:{height:"18px",width:"18px",color:d.theme.palette.gray.gray3}})}),Jv={control:(e,t)=>({...e,border:`1px solid ${t.isFocused?d.theme.palette.gray.gray3:d.theme.palette.gray.gray5}`,borderRadius:"8px",boxShadow:t.isFocused?`0 0 0 1px ${d.theme.palette.gray.gray3}`:"none",backgroundColor:d.theme.palette.gray.gray7,cursor:"pointer","& > :first-child":{"& > :first-child":{paddingTop:"0px"},"& > :nth-child(2)":{height:"0px"}}}),option:(e,t)=>({...e,backgroundColor:d.theme.palette.gray.white,color:d.theme.palette.gray.black,height:"36px",padding:"6px 16px","&:hover":{backgroundColor:t.isFocused?d.theme.palette.gray.gray7:d.theme.palette.gray.white}}),singleValue:e=>({...e}),menuList:e=>({...e,maxHeight:"160px",borderRadius:"4px",overflowX:"hidden"}),menu:e=>({...e,boxShadow:"0px 3px 15px 0px #00000040",marginTop:"3px"}),menuPortal:e=>({...e,zIndex:2,maxHeight:"160px"})},qv=({selectedEmail:e,emailHeaders:t,root:n,isLoading:r,setSelectedEmail:o})=>{const{conversationId:s}=w.useContext(Be),a=t?Object.entries(t).map(([c])=>({value:c,label:c})):e?[{value:e,label:e}]:[];w.useEffect(()=>{if(!e&&!r&&t&&Object.keys(t).length>0){const c=Object.keys(t)[0];c&&o(c)}},[t,o,e,r]);const i=c=>{const l=String((c==null?void 0:c.value)||"");l&&s&&Gv({selectedEmail:l,conversationId:s}),o(l)};return u.jsx(d.Tooltip,{title:"Selected email",placement:"top",children:u.jsx("div",{style:{marginTop:"12px"},children:u.jsx(Zo,{options:a,value:e&&!r?{value:e,label:e}:null,placeholder:"Select an email",name:"email-selection",type:"select",onChange:i,components:{...Zo.getDefaultComponents(),MenuList:Zv,Option:Xv,SingleValue:Wv,DropdownIndicator:Yv,ValueContainer:zv},root:n,styles:Jv,isSearchable:!1,menuPortalTarget:document.body,isLoading:r})})})},$v=d.styled(d.Paper)`
1091
+ `,Mv="https://cdn.hiverhq.com/connectors-module/assets/PlugIn.svg",Pv={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_HIVER_CDN_URL:"https://cdn.hiverhq.com/",VITE_MY_ENV_VAR:"myVariable From Agent"},{VITE_HIVER_CDN_URL:jv}=Pv,$1=({isAdmin:e=!0,hideHeading:t=!1})=>{const{sendTrackingEvent:n,availableFeatures:r,connectorFunctions:o}=w.useContext(Be),s=et(r,V3),a=et(r,Rs),i=m=>{m.stopPropagation(),n(Jm),o==null||o.redirectToAdmin()},c=m=>{m.stopPropagation(),n(qm),window.open(vv,"_blank")},l=()=>{n(x3,{source:"main_tab"})},f=a?_v:wv;return u.jsxs(Tv,{"data-testid":"noConnectors",children:[s?u.jsxs(u.Fragment,{children:[t?null:u.jsx(d.Typography,{variant:"h2",children:a?Vi:Av}),u.jsx(Fv,{onClick:l,href:Iv,target:"_blank",children:u.jsx(P8,{src:jv+f,alt:Sv,aspectRatio:"1000/783"})})]}):u.jsxs(Lv,{children:[u.jsx(Ov,{variant:"body1_medium",children:gv}),u.jsx("img",{src:Mv,alt:mv})]}),u.jsx(kv,{variant:"body2",children:bv}),e?u.jsx(q1,{endIcon:u.jsx(d.icons.ArrowForward,{}),onClick:i,...s&&{size:"medium"},children:a?Cv:yv}):u.jsxs(u.Fragment,{children:[u.jsx(q1,{onClick:c,children:xv}),u.jsxs(Dv,{direction:"row",children:[u.jsx(Nv,{}),u.jsx(Rv,{variant:"caption",children:Ev})]})]})]})},Bv=()=>{const{availableFeatures:e}=w.useContext(Be),t=et(e,Rs);return u.jsxs(Pd,{children:[u.jsxs(d.Stack,{direction:"row",boxSizing:"content-box",paddingTop:"20px",paddingBottom:"12px",height:"36px",gap:"8px",alignItems:"center",children:[t?u.jsx(Dd,{width:"20px",height:"20px"}):u.jsx(Rd,{}),u.jsx(Md,{variant:"body_sm_medium",children:t?Vi:xd})]}),u.jsxs(d.Stack,{gap:"12px",children:[u.jsx(kn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),u.jsx(kn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),u.jsx(kn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"})]})]})},Vv=()=>{const{metaData:e,sendTrackingEvent:t,isAdmin:n,connectorFunctions:r}=w.useContext(Be),[o,s]=w.useState(!1),a=w.useRef(null),[i,c]=w.useState(0),{templateUpdates:l}=e||{},{sections:f=[],actionButtons:m=[],title:b}=l||{},{version:v=""}=l||{},y=d5(v),p=w.useMemo(()=>u5(v),[v]),h=w.useMemo(()=>(m==null?void 0:m.filter(({isAdminPanelLink:I})=>!(!n&&I)))??[],[m,n]);if(w.useEffect(()=>{!p&&l&&Zi(v,!0)},[p,v,l]),w.useLayoutEffect(()=>{var I;(I=a.current)!=null&&I.scrollHeight&&c(a.current.scrollHeight)},[a]),w.useEffect(()=>{l&&!y&&t(e3,{update_version_id:v})},[]),!l||y)return null;const g=I=>{var E;I.stopPropagation(),s(_=>!_),(E=a.current)!=null&&E.scrollHeight&&c(a.current.scrollHeight),Zi(v,!1,!0)},C=(I,E="",_=!1,A=!1)=>{var S;if(I.stopPropagation(),_&&A?t(t3,{update_version_id:v}):A&&t(n3,{update_version_id:v}),!_&&E){(S=window.open(E,"_blank"))==null||S.focus();return}x(I,!1),r==null||r.redirectToAdmin()},x=(I,E=!0)=>{I.stopPropagation(),Zi(v,!1),s(!1),E&&t(r3,{update_version_id:v})};return u.jsxs(d4,{children:[u.jsxs(f4,{children:[u.jsx(u4,{variant:"h3",children:b}),u.jsxs(d.Box,{children:[o?u.jsx(d.Tooltip,{title:K3,placement:"bottom",children:u.jsx(d.IconButton,{onClick:x,children:u.jsx(d.icons.Close,{sx:{height:"16px",width:"16px",opacity:"0.8"}})})}):null,u.jsx(d.Tooltip,{title:o?U3:Bi,placement:"bottom",children:u.jsx(Br,{onClick:g,children:u.jsx(Yi,{className:o?"":"hiver-up"})})})]})]}),u.jsx(p4,{className:o?"slideDown":"slideUp",ref:a,height:i,children:u.jsxs(h4,{children:[f.map(({title:I,items:E,type:_})=>u.jsxs(C4,{children:[u.jsx(d.Typography,{variant:"body2_medium",children:I}),E.map(A=>{const S=_===s5,{deeplink:L,textHtml:k,imageUrl:D}=A,N=()=>u.jsx(K5,{className:S?"":"ellipsisClass",component:"div",variant:"body2",dangerouslySetInnerHTML:{__html:k}});return u.jsx(g4,{component:"ul",children:u.jsxs(m4,{component:S?"li":"div",marginLeft:D?"0":"14px",children:[D?u.jsx("img",{src:D}):null,L?u.jsx(Vd,{target:"_blank",underline:"none",onClick:M=>C(M,L),fontSize:"13px",children:N()}):N()]})},k)})]},I)),u.jsx(d.Stack,{flexDirection:"row",gap:"8px",marginBottom:"11.5px",children:h.map(({text:I,link:E,isAdminPanelLink:_})=>u.jsx(b4,{variant:_?"contained":"text",children:u.jsx(y4,{variant:"caption",onClick:A=>C(A,E,_,!0),children:I})},I))})]})})]})},Gv=({selectedEmail:e,conversationId:t})=>we({url:X8.replace(":conversationId",""+t),method:Me.PATCH,data:{selectedEmail:e}}),Hv="data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='7'%20cy='7'%20r='7'%20fill='%23196FE0'/%3e%3cpath%20d='M10.8288%204.89995C10.5922%204.64324%2010.1976%204.63193%209.94761%204.87601L5.96804%208.75823L4.06989%206.75353C3.82948%206.49981%203.43531%206.49425%203.18845%206.74158C2.9418%206.98865%202.9366%207.39455%203.1768%207.64827L5.50404%2010.1061C5.626%2010.235%205.78808%2010.3%205.95059%2010.3C6.10477%2010.3%206.25896%2010.2414%206.37969%2010.124L10.8056%205.80646C11.0553%205.56278%2011.0659%205.15689%2010.8288%204.89995Z'%20fill='white'/%3e%3c/svg%3e",Q1=e=>{const t=w.useRef(null),[n,r]=w.useState(!1);return w.useEffect(()=>{t.current&&r(t.current.scrollWidth>t.current.clientWidth)},[e]),{textRef:t,isOverflow:n}},Wv=e=>{const{textRef:t,isOverflow:n}=Q1(e.data.label);return u.jsx(d.Tooltip,{title:n?e.data.value:null,placement:"bottom",children:u.jsx(x4,{ref:t,variant:"body_sm_regular",paddingTop:n?"5px":"0px",children:e.data.label})})},Zv=e=>u.jsxs(ln.MenuList,{...e,children:[u.jsx(v4,{children:u.jsx(d.Typography,{variant:"body_sm_medium",children:Y4})}),e.children]}),Xv=e=>{const{isSelected:t}=e,{textRef:n,isOverflow:r}=Q1(e.data.label);return u.jsx(ln.Option,{...e,children:u.jsxs(d.Stack,{direction:"row",gap:"5px",justifyContent:"space-between",alignItems:"center",children:[u.jsx(d.Tooltip,{title:r?e.data.value:null,placement:"bottom",children:u.jsx(E4,{ref:n,className:"dropdown-item-text",variant:"body_sm_regular",children:e.data.label})}),t?u.jsx("img",{src:Hv,width:"14px",height:"14px"}):null]})})},zv=e=>u.jsx(ln.ValueContainer,{...e,children:u.jsxs(d.Stack,{direction:"row",alignItems:"center",gap:"4px",children:[u.jsx(d.icons.AccountCircle,{sx:{height:"20px",width:"20px",color:d.theme.palette.gray.gray3,flexShrink:0}}),u.jsx(d.Stack,{direction:"row",alignItems:"center",sx:{flex:1,minWidth:0,overflow:"hidden"},children:e.children})]})}),Yv=e=>u.jsx(ln.DropdownIndicator,{...e,children:e.selectProps.menuIsOpen?u.jsx(d.icons.ArrowDropUp,{sx:{height:"18px",width:"18px",color:d.theme.palette.gray.gray3}}):u.jsx(d.icons.ArrowDropDown,{sx:{height:"18px",width:"18px",color:d.theme.palette.gray.gray3}})}),Jv={control:(e,t)=>({...e,border:`1px solid ${t.isFocused?d.theme.palette.gray.gray3:d.theme.palette.gray.gray5}`,borderRadius:"8px",boxShadow:t.isFocused?`0 0 0 1px ${d.theme.palette.gray.gray3}`:"none",backgroundColor:d.theme.palette.gray.gray7,cursor:"pointer","& > :first-child":{"& > :first-child":{paddingTop:"0px"},"& > :nth-child(2)":{height:"0px"}}}),option:(e,t)=>({...e,backgroundColor:d.theme.palette.gray.white,color:d.theme.palette.gray.black,height:"36px",padding:"6px 16px","&:hover":{backgroundColor:t.isFocused?d.theme.palette.gray.gray7:d.theme.palette.gray.white}}),singleValue:e=>({...e}),menuList:e=>({...e,maxHeight:"160px",borderRadius:"4px",overflowX:"hidden"}),menu:e=>({...e,boxShadow:"0px 3px 15px 0px #00000040",marginTop:"3px"}),menuPortal:e=>({...e,zIndex:2,maxHeight:"160px"})},qv=({selectedEmail:e,emailHeaders:t,root:n,isLoading:r,setSelectedEmail:o})=>{const{conversationId:s}=w.useContext(Be),a=t?Object.entries(t).map(([c])=>({value:c,label:c})):e?[{value:e,label:e}]:[];w.useEffect(()=>{if(!e&&!r&&t&&Object.keys(t).length>0){const c=Object.keys(t)[0];c&&o(c)}},[t,o,e,r]);const i=c=>{const l=String((c==null?void 0:c.value)||"");l&&s&&Gv({selectedEmail:l,conversationId:s}),o(l)};return u.jsx(d.Tooltip,{title:"Selected email",placement:"top",children:u.jsx("div",{style:{marginTop:"12px"},children:u.jsx(Zo,{options:a,value:e&&!r?{value:e,label:e}:null,placeholder:"Select an email",name:"email-selection",type:"select",onChange:i,components:{...Zo.getDefaultComponents(),MenuList:Zv,Option:Xv,SingleValue:Wv,DropdownIndicator:Yv,ValueContainer:zv},root:n,styles:Jv,isSearchable:!1,menuPortalTarget:document.body,isLoading:r})})})},$v=d.styled(d.Paper)`
1093
1092
  width: stretch;
1094
1093
  height: 100%;
1095
1094
  position: absolute;
@@ -1105,7 +1104,7 @@ Do you want to continue?`,vx="Select an object to create",Ex="Select an object t
1105
1104
  `,Uv=d.styled(d.Box)`
1106
1105
  margin-top: 12px;
1107
1106
  height: 100%;
1108
- `,Kv="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_4735_44625)'%3e%3cpath%20d='M7.9987%2013.334L8.9387%2012.394L5.2187%208.66732H13.332V7.33398L5.2187%207.33398L8.9387%203.60732L7.9987%202.66732L2.66537%208.00065L7.9987%2013.334Z'%20fill='%234D596C'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_4735_44625'%3e%3crect%20width='16'%20height='16'%20fill='white'%20transform='matrix(-1%200%200%20-1%2016%2016)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",zc=({children:e,isOpen:t,setIsOpen:n,onClose:r,title:o="Back",backButtonTooltip:s,portalId:a})=>{const i=w.useRef(null),[c,l]=w.useState(!1);return w.useEffect(()=>{a&&(i.current=document.querySelector(`[data-connectorid=${a}]`),l(!0))},[a,l]),w.useEffect(()=>()=>{n(!1)},[n]),t&&c&&i.current&&Re.createPortal(u.jsxs($v,{className:"layover-paper",elevation:0,children:[u.jsxs(d.Stack,{direction:"row",alignItems:"center",marginLeft:"-8px",children:[u.jsx(d.Tooltip,{title:s,placement:"bottom",children:u.jsx(d.IconButton,{onClick:r,children:u.jsx(Qv,{src:Kv})})}),u.jsx(d.Typography,{children:o})]}),u.jsx(Uv,{children:e})]}),i.current)},U1=e=>e.common.previewCardData,K1=e=>e.common.previewCardApiStatus,eE=e=>e.common.selectedSuggestionType,tE=d.styled(d.Stack)`
1107
+ `,Kv="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_4735_44625)'%3e%3cpath%20d='M7.9987%2013.334L8.9387%2012.394L5.2187%208.66732H13.332V7.33398L5.2187%207.33398L8.9387%203.60732L7.9987%202.66732L2.66537%208.00065L7.9987%2013.334Z'%20fill='%234D596C'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_4735_44625'%3e%3crect%20width='16'%20height='16'%20fill='white'%20transform='matrix(-1%200%200%20-1%2016%2016)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Yc=({children:e,isOpen:t,setIsOpen:n,onClose:r,title:o="Back",backButtonTooltip:s,portalId:a})=>{const i=w.useRef(null),[c,l]=w.useState(!1);return w.useEffect(()=>{a&&(i.current=document.querySelector(`[data-connectorid=${a}]`),l(!0))},[a,l]),w.useEffect(()=>()=>{n(!1)},[n]),t&&c&&i.current&&Re.createPortal(u.jsxs($v,{className:"layover-paper",elevation:0,children:[u.jsxs(d.Stack,{direction:"row",alignItems:"center",marginLeft:"-8px",children:[u.jsx(d.Tooltip,{title:s,placement:"bottom",children:u.jsx(d.IconButton,{onClick:r,children:u.jsx(Qv,{src:Kv})})}),u.jsx(d.Typography,{variant:"body_sm_medium",children:o})]}),u.jsx(Uv,{children:e})]}),i.current)},U1=e=>e.common.previewCardData,K1=e=>e.common.previewCardApiStatus,eE=e=>e.common.selectedSuggestionType,tE=d.styled(d.Stack)`
1109
1108
  width: 100%;
1110
1109
  border-radius: 8px;
1111
1110
  border: 1px solid ${d.theme.palette.gray.gray5};
@@ -1138,8 +1137,8 @@ Do you want to continue?`,vx="Select an object to create",Ex="Select an object t
1138
1137
  height: 20px;
1139
1138
  flex-shrink: 0;
1140
1139
  }
1141
- `,ep=({cardData:e,cardDataApiStatus:t,objectToLink:n,args:r})=>{const o=zt(),[s,a]=w.useState(!1),[i,c]=w.useState(!0),{id:l="",cardTitle:f="",logoUrl:m}=e||{},b=t===K.LOADING,v=p=>{p.stopPropagation();const h=p.currentTarget.offsetWidth<p.currentTarget.scrollWidth;a(!!h)},y=p=>{var g;o(qr({id:n,args:r,isRefresh:!0}));const h=p.target.tagName==="BUTTON"?(g=p.target)==null?void 0:g.firstChild:p.target;h.className&&(h.className=""),setTimeout(()=>h.className="selected",1)};return u.jsxs(tE,{children:[u.jsxs(nE,{direction:"row",justifyContent:"space-between",children:[b?u.jsxs(d.Stack,{gap:"6px",direction:"row",children:[u.jsx(kn,{width:"16px",height:"24px"}),u.jsx(kn,{width:"100px",height:"24px"})]}):u.jsxs(oE,{children:[m&&u.jsx("img",{src:m,alt:f}),u.jsx(d.Tooltip,{title:s?f:"",children:u.jsx(d.Typography,{variant:"h4",onMouseOver:p=>v(p),onMouseLeave:p=>v(p),children:f})})]}),u.jsxs(d.Stack,{direction:"row",alignItems:"center",children:[i?u.jsx(d.Tooltip,{title:bd,placement:"bottom",children:u.jsx(Br,{onClick:p=>y(p),children:u.jsx("img",{src:W1})})}):null,u.jsx(d.Tooltip,{title:i?yd:Bi,placement:"bottom",children:u.jsx(Br,{onClick:()=>c(p=>!p),children:u.jsx(zi,{className:i?"":"hiver-up"})})})]})]}),u.jsx(B1,{id:l,cardTitle:f,specificCardData:{[l]:e},specificConnectorApiStatus:{[l]:t},isOpen:i})]})},tp={values:{},errors:{}},Rt={SET_FIELD_VALUE:"SET_FIELD_VALUE",CLEAR_ERROR:"CLEAR_ERROR",SET_FIELD_ERROR:"SET_FIELD_ERROR",SET_FIELDS:"SET_FIELDS",CLEAR_FIELDS:"CLEAR_FIELDS",RESET_STATE:"RESET_STATE"},sE=(e,t)=>{const{type:n,payload:r}=t;switch(n){case Rt.SET_FIELD_VALUE:{if(!(r!=null&&r.value))return e;const{name:o,value:s}=r.value;return{...e,values:{...e.values,[o]:s}}}case Rt.SET_FIELD_ERROR:{if(!(r!=null&&r.value))return e;const{name:o,value:s}=r.value;return typeof s=="boolean"||typeof s=="string"?{...e,errors:{...e.errors,[o]:s}}:e}case Rt.CLEAR_ERROR:{if(!(r!=null&&r.value))return e;const{name:o}=r.value;return{...e,errors:{...e.errors,[o]:""}}}case Rt.SET_FIELDS:{if(!(r!=null&&r.values))return e;const{values:o}=r;return{...e,values:o}}case Rt.CLEAR_FIELDS:{const{fieldNames:o}=r??{};if(!Array.isArray(o))return e;const s={...e.values},a={...e.errors};for(const i of o)delete s[i],delete a[i];return{...e,values:s,errors:a}}case Rt.RESET_STATE:return tp}return e},np=()=>w.useReducer(sE,tp),rp=({state:e,dispatch:t,validations:n,dynamicFields:r})=>{const o=e.errors,s=(b,v)=>{t({type:Rt.SET_FIELD_VALUE,payload:{value:{value:v,name:b}}})},a=w.useCallback(()=>Object.keys(o).filter(v=>!!o[v]).length>0,[o]),i=b=>{b.stopPropagation();const{name:v,value:y}=(b==null?void 0:b.target)||{};s(v,y)},c=(b,v)=>{b.stopPropagation();const{name:y}=(b==null?void 0:b.target)||{};s(y,v)},l=(b,v)=>{s(b,v||"")},f=(b,v)=>{e.errors[b]!==v&&t({type:Rt.SET_FIELD_ERROR,payload:{value:{name:b,value:v}}})},m=(b,v)=>{if(v){const y=v[b];y==null||y.forEach(p=>{var h;s(p,""),v[p]&&m(p,v),(h=n[p])!=null&&h.isRequired&&f(p,!0)})}};return w.useEffect(()=>{if(Array.isArray(r))return()=>{const b=r.map(v=>v.name);t({type:Rt.CLEAR_FIELDS,payload:{fieldNames:b}})}},[r,t]),{setValue:s,isErrorInValidations:a,inputChangeHandler:i,checkboxChangeHandler:c,dateChangeHandler:l,handleValidationError:f,clearDependentFields:m}},op=({formFields:e,formId:t,formState:n,appDispatch:r})=>e.reduce((o,s)=>{if(s.type!=="async-select"||!s.interfaceDetails)return o;const a=s.interfaceDetails,i={loadOptions:(c,l,f,m)=>{let b=a;s.searchInterfaceDetails&&typeof c=="string"&&c.trim().length>0&&!f&&(b=s.searchInterfaceDetails);const v=j8(n,b==null?void 0:b.args),y=Object.values((b==null?void 0:b.args)||{});if(v.length===y.length){r(dr({fieldName:s.name,formId:String(t),searchTerm:c,fieldConfig:s,interfaceId:b==null?void 0:b.id,pagination:b==null?void 0:b.pagination,callback:l,args:{...zo(n,b==null?void 0:b.args),...zo(n,b==null?void 0:b.optionalArgs)},isScrollToBottomEvent:f,controller:m}));return}return l([])}};return{...o,[s.name]:i}},{}),sp=({formFields:e,formId:t,formState:n,conversationId:r,appDispatch:o})=>e.reduce((s,a)=>{if(!a.createOptionInterfaceDetails)return s;const i=a.createOptionInterfaceDetails;return{...s,[a.name]:{createOption:(c,l)=>{var m,b;if(!c)return;const f={values:{name:a.name,value:c},errors:{}};o(Ea({fieldName:a.name,formId:String(t),interfaceId:i.id,conversationId:r,label:c,callback:l,args:{...zo(n,(m=a==null?void 0:a.interfaceDetails)==null?void 0:m.args),...zo(n,(b=a==null?void 0:a.interfaceDetails)==null?void 0:b.optionalArgs)},createArgs:{...zo(f,i.args)}}))}}}},{}),ap=({formFields:e,formState:t,formId:n,conversationId:r})=>{const o=zt(),s=w.useMemo(()=>{if(e&&e.length){const i=op({formFields:e,formId:n,formState:t,appDispatch:o});return e.reduce((l,f)=>{const m=f.columns;if(!m)return l;const b=op({formFields:m,formId:n,formState:t,appDispatch:o});return{...l,[f.name]:{loadOptionsList:b}}},i)}return null},[e,t,n,o]),a=w.useMemo(()=>{const i=sp({formFields:e,formId:n,formState:t,conversationId:r,appDispatch:o});return e.reduce((l,f)=>{const m=f.columns;if(!m)return l;const b=sp({formFields:m,formId:n,formState:t,conversationId:r,appDispatch:o});return{...l,[f.name]:{createOptionList:b}}},i)},[e,n,t,r,o]);return{fetchConfig:s,createConfig:a}},aE=async({formId:e,args:t})=>{try{const n=await we({url:ct(sx,{formId:e}),data:{args:t},method:Me.POST});return(n==null?void 0:n.data).fieldList.map(o=>Xc(o))}catch(n){throw console.error(n),n}},iE=({formId:e,args:t,enabled:n,delay:r=500})=>{const[o,s]=w.useState(t);return w.useEffect(()=>{const a=setTimeout(()=>s(t),r);return()=>clearTimeout(a)},[t,r]),Tn({queryKey:["Global","WriteForm","CustomFields",e,o],queryFn:()=>aE({formId:e,args:t}),refetchOnMount:!1,enabled:n})},ip=({setShown:e,shown:t,title:n,description:r,buttons:o})=>u.jsx(fr,{shown:t,setShown:e,showCloseButton:!0,children:u.jsxs(d.Stack,{width:"400px",padding:"20px",children:[u.jsx(d.Typography,{variant:"h2",marginBottom:"8px",children:n}),u.jsx(d.Stack,{gap:"4px",marginBottom:"20px",children:r.split(`
1142
- `).map((s,a)=>u.jsx(d.Typography,{variant:"body2",children:s},a))}),u.jsx(d.Stack,{direction:"row",justifyContent:"flex-end",gap:"8px",children:o.map(s=>u.jsx(d.Button,{variant:s.variant,size:"medium",onClick:s.action,children:s.label},s.label.split(" ").join("_").toLowerCase()))})]})}),cp="connector-agent-expanded-write-form",lp=({metaData:e,isEdit:t=!1,defaultOption:n,onClose:r,onCreateSuccess:o,setMetaData:s})=>{var _r;const{userGroupId:a}=Xt()||{},[i,c]=w.useState(null),[l,f]=w.useState(!1),m=w.useRef(null),{conversationId:b,availableFeatures:v,sendTrackingEvent:y,currentSmIds:p,connectorFunctions:{redirectToAdmin:h,getFormElement:g,toggleFormElement:C},stackingContext:x,isAdmin:I}=w.useContext(Be),[E,_]=np(),A=Ce(z1),S=Ce(t?Ux:Z1),L=Ce(ev),k=Ce(Kx),D=Ce(rv),N=Ce(ov),M=Ce(sv),V=Ce(av),J=Ce(iv),$=Ce(Y1),H=k==null?void 0:k[(i==null?void 0:i.value)??""],X=et(v,$3),q=(H==null?void 0:H.hasCustomFields)??!1,{customFieldsArgsPresent:se,customFieldsArgs:de}=w.useMemo(()=>{if(!q)return{customFieldsArgsPresent:!1,customFieldsArgs:{}};const pe=Object.values((H==null?void 0:H.customFieldsArgs)??{}).every(dt=>!!E.values[dt]);if(!pe)return{customFieldsArgsPresent:!1,customFieldsArgs:{}};const Ie=(H==null?void 0:H.customFieldsArgs)??{},Ke=Yo(E,Ie);return{customFieldsArgsPresent:pe,customFieldsArgs:Ke}},[q,E,H==null?void 0:H.customFieldsArgs]),B=q&&se&&X,{data:P}=iE({formId:String(i==null?void 0:i.value),args:de,enabled:B}),W=w.useMemo(()=>B?P??[]:[],[B,P]),G=H==null?void 0:H.expandedView,{formConfigs:Y,formViewConfigs:oe}=w.useMemo(()=>{if(i&&"value"in i&&L&&L[i.value]&&Array.isArray(L[i.value])){const Ie=[...L[i.value],...W],Ke=[{id:i.value,formFields:Ie}];return{formConfigs:Ke,formViewConfigs:G?B8(Ie,F1):Ke}}const pe=[{id:"emptyFormId",formFields:[]}];return{formConfigs:pe,formViewConfigs:pe}},[L,W,i,G]),re=w.useMemo(()=>{var Ie;const pe=((Ie=Y==null?void 0:Y[0])==null?void 0:Ie.formFields)||[];return Zc({formFields:pe})},[Y]),{setValue:j,inputChangeHandler:te,checkboxChangeHandler:Ee,dateChangeHandler:z,clearDependentFields:Ve,handleValidationError:Ne,isErrorInValidations:Ue}=rp({state:E,dispatch:_,validations:re,dynamicFields:W}),{userGroupId:kt}=Xt()||{},{fetchConfig:gn,createConfig:vt}=ap({formFields:Y[0].formFields,formId:Y[0].id,formState:E,conversationId:b}),Ze=(_r=A==null?void 0:A.forms.find(pe=>pe.type==="edit"))==null?void 0:_r.id,{externalResourceId:Xe}=A??{},Xn=[N,M,J].includes(K.LOADING),at=w.useMemo(()=>!G||!g?null:g(),[G,g]),Ut=zt();w.useEffect(()=>(G&&C&&C(!0),()=>{G&&C&&C(!1)}),[G,C]),w.useEffect(()=>{Ut(D1(t?!(V&&"values"in V&&"values"in E&&JSON.stringify(J1(E.values))===JSON.stringify(J1(V.values))):(e==null?void 0:e.fields_filled)!==void 0&&e.fields_filled>0))},[t,e,V,E,Ut]),w.useEffect(()=>(t&&V&&_({type:Rt.SET_FIELDS,payload:V}),()=>{_({type:Rt.SET_FIELDS,payload:{values:{}}})}),[t,_,V]),w.useEffect(()=>{i!==null&&s(pe=>({...pe,object_type:i.label}))},[i,s]),w.useEffect(()=>{if(E.values){const pe=_1(Y[0].formFields,E.values);s(Ie=>({...Ie,fields_filled:pe}))}},[E,Y,s]),w.useEffect(()=>{if(n&&!t)return c(n);S&&S.length&&c(t&&Ze?S.find(pe=>pe.value===Ze)??null:pe=>pe||!k?pe:S.length===1?S[0]:S.find(Ke=>!k[Ke.value].expandedView)??null)},[S,k,t,Ze,n]);const zn=()=>{c(m.current),f(!1),_({type:Rt.RESET_STATE})},Kt=(pe,Ie)=>{j(pe,Ie)},Er=(pe,Ie,Ke)=>{if(Ie.action==="clear"&&Ie.name&&(j(Ie.name,""),i!=null&&i.value&&Ve(Ie.name,D==null?void 0:D[i.value]),re[Ie.name].isRequired&&Ne(Ie.name,!0)),pe&&typeof pe=="object"&&"label"in pe&&typeof pe.label=="string"&&"value"in pe&&(typeof pe.value=="string"||typeof pe.value=="number")&&typeof Ie.name<"u")if(Ie.name==="form-object")m.current={value:pe.value,label:pe.label},E.values&&pe.value!==(i==null?void 0:i.value)&&(Object.values(E.values).filter(Et=>Et!=="").length>0?f(!0):zn());else{let dt=!1;Ke&&(dt=Ke.isMultiSelect||!1);const Et=!dt&&"prefillValues"in pe&&pe.prefillValues,en=dt?[{value:pe.value,label:pe.label}]:{value:pe.value,label:pe.label};if(j(Ie.name,en),Et)for(const Pt in Et)j(Pt,Et[Pt]);i!=null&&i.value&&Ve(Ie.name,D==null?void 0:D[i.value])}},mn=()=>{if(!Ue()&&Ze&&(k!=null&&k[Ze])&&b&&Xe){const{connectorName:pe,title:Ie}=A;y(m3,{connector_name:pe,card_title:Ie,sm_ids:p,ug_id:kt});const Ke=k[Ze].interfaceDetails;if(!Ke||!V)return;const{id:dt,args:Et={},previousArgs:en={}}=Ke,Pt=Yo(V,en),Dt=Yo(E,Et);Ut(_a({formId:String(Ze),conversationId:b,args:Dt,previousArgs:Pt,externalResourceId:Xe,interfaceId:dt,successCallback:()=>{o()}})).unwrap().then(()=>{var Tr;y(C3,{connector_name:pe,card_title:Ie,sm_ids:p,ug_id:kt});const jt=((Tr=Y[0].formFields)==null?void 0:Tr.filter(ft=>ft.isCustomField))??[],Sr=jt.length>0,Ar=jt.some(ft=>E.values[ft.name]);y(R3,{sm_ids:p,ug_id:a,connector_name:H==null?void 0:H.connectorName,form_object:H==null?void 0:H.name,object_type:i==null?void 0:i.label,has_custom_fields:Sr,custom_fields_used:Ar})}).finally(()=>{Ut(Qr(null))})}},Ir=()=>{if(!Ue()&&i&&(k!=null&&k[i.value])&&b){const pe=k==null?void 0:k[i.value].interfaceDetails;if(!pe)return;const{id:Ie,args:Ke={}}=pe,dt=Yo(E,Ke);Ut(wa({formId:String(i.value),conversationId:b,args:dt,interfaceId:Ie,successCallback:()=>{o()}})).unwrap().then(()=>{var Dt;y(a3,{object_type:i});const Et=((Dt=Y[0].formFields)==null?void 0:Dt.filter(jt=>jt.isCustomField))??[],en=Et.length>0,Pt=Et.some(jt=>E.values[jt.name]);y(N3,{sm_ids:p,ug_id:a,connector_name:H==null?void 0:H.connectorName,form_object:H==null?void 0:H.name,object_type:i==null?void 0:i.label,has_custom_fields:en,custom_fields_used:Pt})})}},wr=[{label:"Cancel",action:()=>f(!1),variant:"text"},{label:"Continue",action:zn}],ho=()=>{h(H==null?void 0:H.connectorId,{isEdit:!0,tabIndex:2,editCard:(H==null?void 0:H.cardId)??""}),y(D3,{sm_ids:p,ug_id:a,connector_name:H==null?void 0:H.connectorName,form_object:H==null?void 0:H.name})},_n=I&&X&&(H==null?void 0:H.cardAccessMode)==="read_write",go=u.jsxs(pp,{className:G?cp:"",children:[u.jsx(ip,{shown:l,setShown:f,title:bx,description:yx,buttons:wr}),G?u.jsxs(cE,{children:[u.jsxs(d.Typography,{children:[t?"Edit":"Add"," to ",H.connectorName]}),u.jsx(d.Tooltip,{title:"Close Popup",placement:"bottom",children:u.jsx(d.IconButton,{onClick:r,children:u.jsx(lE,{src:j1})})})]}):null,u.jsxs(fp,{spacing:3,children:[!t&&!G?u.jsx(lr,{type:"select",placeholder:O1,options:S,value:i,name:"form-object",selectChangeHandler:Er,label:vx,labelSpacing:.5,validation:{isRequired:!0}}):null,u.jsx(I1,{showGlobalLoader:J===K.LOADING,formConfig:oe,selectChangeHandler:Er,inputChangeHandler:te,checkboxChangeHandler:Ee,dateChangeHandler:z,tableChangeHandler:Kt,onValidationError:Ne,fieldsSpacing:3,labelSpacing:.5,fetchConfig:gn,createConfig:vt,values:E.values,validations:re,...G?{cols:F1,stackIndex:x.expandedForm}:null}),_n?u.jsx(d.Stack,{marginTop:"28px",width:"100%",justifyContent:"center",children:u.jsx(d.Button,{variant:"text",startIcon:u.jsx(uE,{}),onClick:ho,size:"small",children:l5})}):null]}),u.jsxs(dp,{children:[u.jsx(d.Button,{disabled:Ue()||Xn||!$,onClick:t?mn:Ir,size:"small",...G?{style:{order:2}}:null,children:t?t5:e5}),u.jsx(hp,{variant:"outlined",color:"tertiary",size:"small",onClick:r,disabled:Xn,children:Gi})]})]});return G&&at?Re.createPortal(go,at):go},up=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:10,viewBox:"0 0 10 10",fill:"none",...e},T.createElement("path",{d:"M9.70785 5.66671H5.70785V9.66671H4.37451V5.66671H0.374512V4.33337H4.37451V0.333374H5.70785V4.33337H9.70785V5.66671Z",fill:"#4D596C"})),dp=d.styled(d.Box)`
1140
+ `,ep=({cardData:e,cardDataApiStatus:t,objectToLink:n,args:r})=>{const o=zt(),[s,a]=w.useState(!1),[i,c]=w.useState(!0),{id:l="",cardTitle:f="",logoUrl:m}=e||{},b=t===K.LOADING,v=p=>{p.stopPropagation();const h=p.currentTarget.offsetWidth<p.currentTarget.scrollWidth;a(!!h)},y=p=>{var g;o(qr({id:n,args:r,isRefresh:!0}));const h=p.target.tagName==="BUTTON"?(g=p.target)==null?void 0:g.firstChild:p.target;h.className&&(h.className=""),setTimeout(()=>h.className="selected",1)};return u.jsxs(tE,{children:[u.jsxs(nE,{direction:"row",justifyContent:"space-between",children:[b?u.jsxs(d.Stack,{gap:"6px",direction:"row",children:[u.jsx(kn,{width:"16px",height:"24px"}),u.jsx(kn,{width:"100px",height:"24px"})]}):u.jsxs(oE,{children:[m&&u.jsx("img",{src:m,alt:f}),u.jsx(d.Tooltip,{title:s?f:"",children:u.jsx(d.Typography,{variant:"h4",onMouseOver:p=>v(p),onMouseLeave:p=>v(p),children:f})})]}),u.jsxs(d.Stack,{direction:"row",alignItems:"center",children:[i?u.jsx(d.Tooltip,{title:yd,placement:"bottom",children:u.jsx(Br,{onClick:p=>y(p),children:u.jsx("img",{src:W1})})}):null,u.jsx(d.Tooltip,{title:i?Cd:Bi,placement:"bottom",children:u.jsx(Br,{onClick:()=>c(p=>!p),children:u.jsx(Yi,{className:i?"":"hiver-up"})})})]})]}),u.jsx(B1,{id:l,cardTitle:f,specificCardData:{[l]:e},specificConnectorApiStatus:{[l]:t},isOpen:i})]})},tp={values:{},errors:{}},Rt={SET_FIELD_VALUE:"SET_FIELD_VALUE",CLEAR_ERROR:"CLEAR_ERROR",SET_FIELD_ERROR:"SET_FIELD_ERROR",SET_FIELDS:"SET_FIELDS",CLEAR_FIELDS:"CLEAR_FIELDS",RESET_STATE:"RESET_STATE"},sE=(e,t)=>{const{type:n,payload:r}=t;switch(n){case Rt.SET_FIELD_VALUE:{if(!(r!=null&&r.value))return e;const{name:o,value:s}=r.value;return{...e,values:{...e.values,[o]:s}}}case Rt.SET_FIELD_ERROR:{if(!(r!=null&&r.value))return e;const{name:o,value:s}=r.value;return typeof s=="boolean"||typeof s=="string"?{...e,errors:{...e.errors,[o]:s}}:e}case Rt.CLEAR_ERROR:{if(!(r!=null&&r.value))return e;const{name:o}=r.value;return{...e,errors:{...e.errors,[o]:""}}}case Rt.SET_FIELDS:{if(!(r!=null&&r.values))return e;const{values:o}=r;return{...e,values:o}}case Rt.CLEAR_FIELDS:{const{fieldNames:o}=r??{};if(!Array.isArray(o))return e;const s={...e.values},a={...e.errors};for(const i of o)delete s[i],delete a[i];return{...e,values:s,errors:a}}case Rt.RESET_STATE:return tp}return e},np=()=>w.useReducer(sE,tp),rp=({state:e,dispatch:t,validations:n,dynamicFields:r})=>{const o=e.errors,s=(b,v)=>{t({type:Rt.SET_FIELD_VALUE,payload:{value:{value:v,name:b}}})},a=w.useCallback(()=>Object.keys(o).filter(v=>!!o[v]).length>0,[o]),i=b=>{b.stopPropagation();const{name:v,value:y}=(b==null?void 0:b.target)||{};s(v,y)},c=(b,v)=>{b.stopPropagation();const{name:y}=(b==null?void 0:b.target)||{};s(y,v)},l=(b,v)=>{s(b,v||"")},f=(b,v)=>{e.errors[b]!==v&&t({type:Rt.SET_FIELD_ERROR,payload:{value:{name:b,value:v}}})},m=(b,v)=>{if(v){const y=v[b];y==null||y.forEach(p=>{var h;s(p,""),v[p]&&m(p,v),(h=n[p])!=null&&h.isRequired&&f(p,!0)})}};return w.useEffect(()=>{if(Array.isArray(r))return()=>{const b=r.map(v=>v.name);t({type:Rt.CLEAR_FIELDS,payload:{fieldNames:b}})}},[r,t]),{setValue:s,isErrorInValidations:a,inputChangeHandler:i,checkboxChangeHandler:c,dateChangeHandler:l,handleValidationError:f,clearDependentFields:m}},op=({formFields:e,formId:t,formState:n,appDispatch:r})=>e.reduce((o,s)=>{if(s.type!=="async-select"||!s.interfaceDetails)return o;const a=s.interfaceDetails,i={loadOptions:(c,l,f,m)=>{let b=a;s.searchInterfaceDetails&&typeof c=="string"&&c.trim().length>0&&!f&&(b=s.searchInterfaceDetails);const v=j8(n,b==null?void 0:b.args),y=Object.values((b==null?void 0:b.args)||{});if(v.length===y.length){r(dr({fieldName:s.name,formId:String(t),searchTerm:c,fieldConfig:s,interfaceId:b==null?void 0:b.id,pagination:b==null?void 0:b.pagination,callback:l,args:{...zo(n,b==null?void 0:b.args),...zo(n,b==null?void 0:b.optionalArgs)},isScrollToBottomEvent:f,controller:m}));return}return l([])}};return{...o,[s.name]:i}},{}),sp=({formFields:e,formId:t,formState:n,conversationId:r,appDispatch:o})=>e.reduce((s,a)=>{if(!a.createOptionInterfaceDetails)return s;const i=a.createOptionInterfaceDetails;return{...s,[a.name]:{createOption:(c,l)=>{var m,b;if(!c)return;const f={values:{name:a.name,value:c},errors:{}};o(Ea({fieldName:a.name,formId:String(t),interfaceId:i.id,conversationId:r,label:c,callback:l,args:{...zo(n,(m=a==null?void 0:a.interfaceDetails)==null?void 0:m.args),...zo(n,(b=a==null?void 0:a.interfaceDetails)==null?void 0:b.optionalArgs)},createArgs:{...zo(f,i.args)}}))}}}},{}),ap=({formFields:e,formState:t,formId:n,conversationId:r})=>{const o=zt(),s=w.useMemo(()=>{if(e&&e.length){const i=op({formFields:e,formId:n,formState:t,appDispatch:o});return e.reduce((l,f)=>{const m=f.columns;if(!m)return l;const b=op({formFields:m,formId:n,formState:t,appDispatch:o});return{...l,[f.name]:{loadOptionsList:b}}},i)}return null},[e,t,n,o]),a=w.useMemo(()=>{const i=sp({formFields:e,formId:n,formState:t,conversationId:r,appDispatch:o});return e.reduce((l,f)=>{const m=f.columns;if(!m)return l;const b=sp({formFields:m,formId:n,formState:t,conversationId:r,appDispatch:o});return{...l,[f.name]:{createOptionList:b}}},i)},[e,n,t,r,o]);return{fetchConfig:s,createConfig:a}},aE=async({formId:e,args:t})=>{try{const n=await we({url:ct(sx,{formId:e}),data:{args:t},method:Me.POST});return(n==null?void 0:n.data).fieldList.map(o=>zc(o))}catch(n){throw console.error(n),n}},iE=({formId:e,args:t,enabled:n,delay:r=500})=>{const[o,s]=w.useState(t);return w.useEffect(()=>{const a=setTimeout(()=>s(t),r);return()=>clearTimeout(a)},[t,r]),Tn({queryKey:["Global","WriteForm","CustomFields",e,o],queryFn:()=>aE({formId:e,args:t}),refetchOnMount:!1,enabled:n})},ip=({setShown:e,shown:t,title:n,description:r,buttons:o})=>u.jsx(fr,{shown:t,setShown:e,showCloseButton:!0,children:u.jsxs(d.Stack,{width:"400px",padding:"20px",children:[u.jsx(d.Typography,{variant:"h2",marginBottom:"8px",children:n}),u.jsx(d.Stack,{gap:"4px",marginBottom:"20px",children:r.split(`
1141
+ `).map((s,a)=>u.jsx(d.Typography,{variant:"body2",children:s},a))}),u.jsx(d.Stack,{direction:"row",justifyContent:"flex-end",gap:"8px",children:o.map(s=>u.jsx(d.Button,{variant:s.variant,size:"medium",onClick:s.action,children:s.label},s.label.split(" ").join("_").toLowerCase()))})]})}),cp="connector-agent-expanded-write-form",lp=({metaData:e,isEdit:t=!1,defaultOption:n,onClose:r,onCreateSuccess:o,setMetaData:s})=>{var _r;const{userGroupId:a}=Xt()||{},[i,c]=w.useState(null),[l,f]=w.useState(!1),m=w.useRef(null),{conversationId:b,availableFeatures:v,sendTrackingEvent:y,currentSmIds:p,connectorFunctions:{redirectToAdmin:h,getFormElement:g,toggleFormElement:C},stackingContext:x,isAdmin:I}=w.useContext(Be),[E,_]=np(),A=Ce(z1),S=Ce(t?Ux:Z1),L=Ce(ev),k=Ce(Kx),D=Ce(rv),N=Ce(ov),M=Ce(sv),V=Ce(av),J=Ce(iv),$=Ce(Y1),H=k==null?void 0:k[(i==null?void 0:i.value)??""],X=et(v,$3),q=(H==null?void 0:H.hasCustomFields)??!1,{customFieldsArgsPresent:se,customFieldsArgs:de}=w.useMemo(()=>{if(!q)return{customFieldsArgsPresent:!1,customFieldsArgs:{}};const pe=Object.values((H==null?void 0:H.customFieldsArgs)??{}).every(dt=>!!E.values[dt]);if(!pe)return{customFieldsArgsPresent:!1,customFieldsArgs:{}};const Ie=(H==null?void 0:H.customFieldsArgs)??{},Ke=Yo(E,Ie);return{customFieldsArgsPresent:pe,customFieldsArgs:Ke}},[q,E,H==null?void 0:H.customFieldsArgs]),B=q&&se&&X,{data:P}=iE({formId:String(i==null?void 0:i.value),args:de,enabled:B}),W=w.useMemo(()=>B?P??[]:[],[B,P]),G=H==null?void 0:H.expandedView,{formConfigs:Y,formViewConfigs:oe}=w.useMemo(()=>{if(i&&"value"in i&&L&&L[i.value]&&Array.isArray(L[i.value])){const Ie=[...L[i.value],...W],Ke=[{id:i.value,formFields:Ie}];return{formConfigs:Ke,formViewConfigs:G?B8(Ie,F1):Ke}}const pe=[{id:"emptyFormId",formFields:[]}];return{formConfigs:pe,formViewConfigs:pe}},[L,W,i,G]),re=w.useMemo(()=>{var Ie;const pe=((Ie=Y==null?void 0:Y[0])==null?void 0:Ie.formFields)||[];return Xc({formFields:pe})},[Y]),{setValue:j,inputChangeHandler:te,checkboxChangeHandler:Ee,dateChangeHandler:z,clearDependentFields:Ve,handleValidationError:Ne,isErrorInValidations:Ue}=rp({state:E,dispatch:_,validations:re,dynamicFields:W}),{userGroupId:kt}=Xt()||{},{fetchConfig:gn,createConfig:vt}=ap({formFields:Y[0].formFields,formId:Y[0].id,formState:E,conversationId:b}),Ze=(_r=A==null?void 0:A.forms.find(pe=>pe.type==="edit"))==null?void 0:_r.id,{externalResourceId:Xe}=A??{},Xn=[N,M,J].includes(K.LOADING),at=w.useMemo(()=>!G||!g?null:g(),[G,g]),Ut=zt();w.useEffect(()=>(G&&C&&C(!0),()=>{G&&C&&C(!1)}),[G,C]),w.useEffect(()=>{Ut(D1(t?!(V&&"values"in V&&"values"in E&&JSON.stringify(J1(E.values))===JSON.stringify(J1(V.values))):(e==null?void 0:e.fields_filled)!==void 0&&e.fields_filled>0))},[t,e,V,E,Ut]),w.useEffect(()=>(t&&V&&_({type:Rt.SET_FIELDS,payload:V}),()=>{_({type:Rt.SET_FIELDS,payload:{values:{}}})}),[t,_,V]),w.useEffect(()=>{i!==null&&s(pe=>({...pe,object_type:i.label}))},[i,s]),w.useEffect(()=>{if(E.values){const pe=_1(Y[0].formFields,E.values);s(Ie=>({...Ie,fields_filled:pe}))}},[E,Y,s]),w.useEffect(()=>{if(n&&!t)return c(n);S&&S.length&&c(t&&Ze?S.find(pe=>pe.value===Ze)??null:pe=>pe||!k?pe:S.length===1?S[0]:S.find(Ke=>!k[Ke.value].expandedView)??null)},[S,k,t,Ze,n]);const zn=()=>{c(m.current),f(!1),_({type:Rt.RESET_STATE})},Kt=(pe,Ie)=>{j(pe,Ie)},Er=(pe,Ie,Ke)=>{if(Ie.action==="clear"&&Ie.name&&(j(Ie.name,""),i!=null&&i.value&&Ve(Ie.name,D==null?void 0:D[i.value]),re[Ie.name].isRequired&&Ne(Ie.name,!0)),pe&&typeof pe=="object"&&"label"in pe&&typeof pe.label=="string"&&"value"in pe&&(typeof pe.value=="string"||typeof pe.value=="number")&&typeof Ie.name<"u")if(Ie.name==="form-object")m.current={value:pe.value,label:pe.label},E.values&&pe.value!==(i==null?void 0:i.value)&&(Object.values(E.values).filter(Et=>Et!=="").length>0?f(!0):zn());else{let dt=!1;Ke&&(dt=Ke.isMultiSelect||!1);const Et=!dt&&"prefillValues"in pe&&pe.prefillValues,en=dt?[{value:pe.value,label:pe.label}]:{value:pe.value,label:pe.label};if(j(Ie.name,en),Et)for(const Pt in Et)j(Pt,Et[Pt]);i!=null&&i.value&&Ve(Ie.name,D==null?void 0:D[i.value])}},mn=()=>{if(!Ue()&&Ze&&(k!=null&&k[Ze])&&b&&Xe){const{connectorName:pe,title:Ie}=A;y(m3,{connector_name:pe,card_title:Ie,sm_ids:p,ug_id:kt});const Ke=k[Ze].interfaceDetails;if(!Ke||!V)return;const{id:dt,args:Et={},previousArgs:en={}}=Ke,Pt=Yo(V,en),Dt=Yo(E,Et);Ut(_a({formId:String(Ze),conversationId:b,args:Dt,previousArgs:Pt,externalResourceId:Xe,interfaceId:dt,successCallback:()=>{o()}})).unwrap().then(()=>{var Tr;y(C3,{connector_name:pe,card_title:Ie,sm_ids:p,ug_id:kt});const jt=((Tr=Y[0].formFields)==null?void 0:Tr.filter(ft=>ft.isCustomField))??[],Sr=jt.length>0,Ar=jt.some(ft=>E.values[ft.name]);y(R3,{sm_ids:p,ug_id:a,connector_name:H==null?void 0:H.connectorName,form_object:H==null?void 0:H.name,object_type:i==null?void 0:i.label,has_custom_fields:Sr,custom_fields_used:Ar})}).finally(()=>{Ut(Qr(null))})}},Ir=()=>{if(!Ue()&&i&&(k!=null&&k[i.value])&&b){const pe=k==null?void 0:k[i.value].interfaceDetails;if(!pe)return;const{id:Ie,args:Ke={}}=pe,dt=Yo(E,Ke);Ut(wa({formId:String(i.value),conversationId:b,args:dt,interfaceId:Ie,successCallback:()=>{o()}})).unwrap().then(()=>{var Dt;y(a3,{object_type:i});const Et=((Dt=Y[0].formFields)==null?void 0:Dt.filter(jt=>jt.isCustomField))??[],en=Et.length>0,Pt=Et.some(jt=>E.values[jt.name]);y(N3,{sm_ids:p,ug_id:a,connector_name:H==null?void 0:H.connectorName,form_object:H==null?void 0:H.name,object_type:i==null?void 0:i.label,has_custom_fields:en,custom_fields_used:Pt})})}},wr=[{label:"Cancel",action:()=>f(!1),variant:"text"},{label:"Continue",action:zn}],ho=()=>{h(H==null?void 0:H.connectorId,{isEdit:!0,tabIndex:2,editCard:(H==null?void 0:H.cardId)??""}),y(D3,{sm_ids:p,ug_id:a,connector_name:H==null?void 0:H.connectorName,form_object:H==null?void 0:H.name})},_n=I&&X&&(H==null?void 0:H.cardAccessMode)==="read_write",go=u.jsxs(pp,{className:G?cp:"",children:[u.jsx(ip,{shown:l,setShown:f,title:bx,description:yx,buttons:wr}),G?u.jsxs(cE,{children:[u.jsxs(d.Typography,{variant:"body_sm_medium",children:[t?"Edit":"Add"," to ",H.connectorName]}),u.jsx(d.Tooltip,{title:"Close Popup",placement:"bottom",children:u.jsx(d.IconButton,{onClick:r,children:u.jsx(lE,{src:j1})})})]}):null,u.jsxs(fp,{spacing:3,children:[!t&&!G?u.jsx(lr,{type:"select",placeholder:O1,options:S,value:i,name:"form-object",selectChangeHandler:Er,label:vx,labelSpacing:.5,validation:{isRequired:!0}}):null,u.jsx(I1,{showGlobalLoader:J===K.LOADING,formConfig:oe,selectChangeHandler:Er,inputChangeHandler:te,checkboxChangeHandler:Ee,dateChangeHandler:z,tableChangeHandler:Kt,onValidationError:Ne,fieldsSpacing:3,labelSpacing:.5,fetchConfig:gn,createConfig:vt,values:E.values,validations:re,...G?{cols:F1,stackIndex:x.expandedForm}:null}),_n?u.jsx(d.Stack,{marginTop:"28px",width:"100%",justifyContent:"center",children:u.jsx(d.Button,{variant:"text",startIcon:u.jsx(uE,{}),onClick:ho,size:"small",children:l5})}):null]}),u.jsxs(dp,{children:[u.jsx(d.Button,{disabled:Ue()||Xn||!$,onClick:t?mn:Ir,size:"small",...G?{style:{order:2}}:null,children:t?t5:e5}),u.jsx(hp,{variant:"outlined",color:"tertiary",size:"small",onClick:r,disabled:Xn,children:Gi})]})]});return G&&at?Re.createPortal(go,at):go},up=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:10,viewBox:"0 0 10 10",fill:"none",...e},T.createElement("path",{d:"M9.70785 5.66671H5.70785V9.66671H4.37451V5.66671H0.374512V4.33337H4.37451V0.333374H5.70785V4.33337H9.70785V5.66671Z",fill:"#4D596C"})),dp=d.styled(d.Box)`
1143
1142
  box-sizing: border-box;
1144
1143
  height: 52px;
1145
1144
  background-color: var(--form-background-color, inherit);
@@ -1211,7 +1210,7 @@ Do you want to continue?`,vx="Select an object to create",Ex="Select an object t
1211
1210
  path {
1212
1211
  fill: ${d.theme.palette.purple.primary} !important;
1213
1212
  }
1214
- `,dE=({setOpenTaskLinking:e,onLinkingSuccess:t})=>{const n=zt(),r=Ce(U1),o=Ce(K1),s=Ce(tv),a=Ce(X1),[i,c]=w.useState(!1),[l,f]=w.useState(null),[m,b]=w.useState(""),[v,y]=w.useState({}),{conversationId:p,sendTrackingEvent:h,email:g}=w.useContext(Be);w.useEffect(()=>{a&&a.length&&f(a[0])},[a]);const C={externalResourceId:m},x=o===K.LOADING,I=s===K.LOADING,E=()=>{!i&&l&&"value"in l&&(h(l3,{object_type:l.label}),n(qr({id:String(l==null?void 0:l.value),args:C})).unwrap().catch(N=>{(N==null?void 0:N.status)===400?_e({message:L1,type:Je}):_e({message:ux,type:Je})})),c(N=>!N)},_=()=>{l&&"value"in l&&p&&n(Aa({id:String(l.value),externalResourceId:m,conversationId:p,email:g})).unwrap().then(()=>{h(i3,{object_type:l.label,input_type:m}),_e({message:fx,type:on}),e(!1),t()}).catch(N=>{(N==null?void 0:N.status)===400?_e({message:L1,type:Je}):(N==null?void 0:N.status)===409?_e({message:dx,type:Je}):_e({message:px,type:Je})})},A=()=>{e(!1),c(!1)},S=(N,M)=>{N&&typeof N=="object"&&"label"in N&&typeof N.label=="string"&&"value"in N&&(typeof N.value=="string"||typeof N.value=="number")&&typeof M.name<"u"&&(f({value:N.value,label:N.label}),b(""))},L=N=>{N.stopPropagation();const{value:M}=(N==null?void 0:N.target)||{};b(M),c(!1)},k=(N,M)=>{y(V=>({...V,[N]:!!M}))},D=()=>Object.keys(v).filter(M=>v[M]).length>0;return u.jsxs(pp,{children:[u.jsxs(fp,{spacing:3,children:[u.jsx(lr,{type:"select",placeholder:O1,options:a,value:l,name:"form-object",selectChangeHandler:S,label:Ex,labelSpacing:.5,validation:{isRequired:!0},onValidationError:k}),u.jsx(lr,{type:"text",placeholder:Ix,value:m,name:"resourceId",inputChangeHandler:L,label:wx,labelSpacing:.5,validation:{isRequired:!0,validate:Yy()},onValidationError:k}),i?u.jsx(ep,{cardData:r,cardDataApiStatus:o,objectToLink:String((l==null?void 0:l.value)||""),args:C}):null,u.jsx(rE,{fullWidth:!0,disabled:D()||x,color:"tertiary",variant:"outlined",size:"small",onClick:E,children:i?z4:X4})]}),u.jsxs(dp,{children:[u.jsx(d.Button,{onClick:_,disabled:D()||I,size:"small",children:xd}),u.jsx(hp,{color:"tertiary",variant:"outlined",onClick:A,disabled:I,size:"small",children:Gi})]})]})},fE=d.styled(d.Button)`
1213
+ `,dE=({setOpenTaskLinking:e,onLinkingSuccess:t})=>{const n=zt(),r=Ce(U1),o=Ce(K1),s=Ce(tv),a=Ce(X1),[i,c]=w.useState(!1),[l,f]=w.useState(null),[m,b]=w.useState(""),[v,y]=w.useState({}),{conversationId:p,sendTrackingEvent:h,email:g}=w.useContext(Be);w.useEffect(()=>{a&&a.length&&f(a[0])},[a]);const C={externalResourceId:m},x=o===K.LOADING,I=s===K.LOADING,E=()=>{!i&&l&&"value"in l&&(h(l3,{object_type:l.label}),n(qr({id:String(l==null?void 0:l.value),args:C})).unwrap().catch(N=>{(N==null?void 0:N.status)===400?_e({message:L1,type:Je}):_e({message:ux,type:Je})})),c(N=>!N)},_=()=>{l&&"value"in l&&p&&n(Aa({id:String(l.value),externalResourceId:m,conversationId:p,email:g})).unwrap().then(()=>{h(i3,{object_type:l.label,input_type:m}),_e({message:fx,type:on}),e(!1),t()}).catch(N=>{(N==null?void 0:N.status)===400?_e({message:L1,type:Je}):(N==null?void 0:N.status)===409?_e({message:dx,type:Je}):_e({message:px,type:Je})})},A=()=>{e(!1),c(!1)},S=(N,M)=>{N&&typeof N=="object"&&"label"in N&&typeof N.label=="string"&&"value"in N&&(typeof N.value=="string"||typeof N.value=="number")&&typeof M.name<"u"&&(f({value:N.value,label:N.label}),b(""))},L=N=>{N.stopPropagation();const{value:M}=(N==null?void 0:N.target)||{};b(M),c(!1)},k=(N,M)=>{y(V=>({...V,[N]:!!M}))},D=()=>Object.keys(v).filter(M=>v[M]).length>0;return u.jsxs(pp,{children:[u.jsxs(fp,{spacing:3,children:[u.jsx(lr,{type:"select",placeholder:O1,options:a,value:l,name:"form-object",selectChangeHandler:S,label:Ex,labelSpacing:.5,validation:{isRequired:!0},onValidationError:k}),u.jsx(lr,{type:"text",placeholder:Ix,value:m,name:"resourceId",inputChangeHandler:L,label:wx,labelSpacing:.5,validation:{isRequired:!0,validate:Yy()},onValidationError:k}),i?u.jsx(ep,{cardData:r,cardDataApiStatus:o,objectToLink:String((l==null?void 0:l.value)||""),args:C}):null,u.jsx(rE,{fullWidth:!0,disabled:D()||x,color:"tertiary",variant:"outlined",size:"small",onClick:E,children:i?z4:X4})]}),u.jsxs(dp,{children:[u.jsx(d.Button,{onClick:_,disabled:D()||I,size:"small",children:vd}),u.jsx(hp,{color:"tertiary",variant:"outlined",onClick:A,disabled:I,size:"small",children:Gi})]})]})},fE=d.styled(d.Button)`
1215
1214
  &:hover {
1216
1215
  background-color: #e3e9ff !important;
1217
1216
  color: ${d.theme.palette.purple.primary} !important;
@@ -1232,7 +1231,7 @@ Do you want to continue?`,vx="Select an object to create",Ex="Select an object t
1232
1231
  & .content__btn {
1233
1232
  margin-left: 8px;
1234
1233
  }
1235
- `,hE=e=>T.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("mask",{id:"mask0_4649_80352",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:20,height:21},T.createElement("rect",{y:.320312,width:20,height:20,fill:"#D9D9D9"})),T.createElement("g",{mask:"url(#mask0_4649_80352)"},T.createElement("path",{d:"M9.16797 14.4873H10.8346V11.154H14.168V9.4873H10.8346V6.15397H9.16797V9.4873H5.83464V11.154H9.16797V14.4873ZM10.0013 18.654C8.84852 18.654 7.76519 18.4352 6.7513 17.9977C5.73741 17.5602 4.85547 16.9665 4.10547 16.2165C3.35547 15.4665 2.76172 14.5845 2.32422 13.5706C1.88672 12.5567 1.66797 11.4734 1.66797 10.3206C1.66797 9.16786 1.88672 8.08453 2.32422 7.07064C2.76172 6.05675 3.35547 5.1748 4.10547 4.4248C4.85547 3.6748 5.73741 3.08105 6.7513 2.64355C7.76519 2.20605 8.84852 1.9873 10.0013 1.9873C11.1541 1.9873 12.2374 2.20605 13.2513 2.64355C14.2652 3.08105 15.1471 3.6748 15.8971 4.4248C16.6471 5.1748 17.2409 6.05675 17.6784 7.07064C18.1159 8.08453 18.3346 9.16786 18.3346 10.3206C18.3346 11.4734 18.1159 12.5567 17.6784 13.5706C17.2409 14.5845 16.6471 15.4665 15.8971 16.2165C15.1471 16.9665 14.2652 17.5602 13.2513 17.9977C12.2374 18.4352 11.1541 18.654 10.0013 18.654ZM10.0013 16.9873C11.8624 16.9873 13.4388 16.3415 14.7305 15.0498C16.0221 13.7581 16.668 12.1817 16.668 10.3206C16.668 8.45953 16.0221 6.88314 14.7305 5.59147C13.4388 4.2998 11.8624 3.65397 10.0013 3.65397C8.14019 3.65397 6.5638 4.2998 5.27214 5.59147C3.98047 6.88314 3.33464 8.45953 3.33464 10.3206C3.33464 12.1817 3.98047 13.7581 5.27214 15.0498C6.5638 16.3415 8.14019 16.9873 10.0013 16.9873Z",fill:"#4D596C"}))),gE=e=>T.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M14.3462 8.73757C14.0406 8.43198 13.5451 8.43198 13.2395 8.73757C12.9339 9.04316 12.9339 9.53863 13.2395 9.84422L14.3462 8.73757ZM15.2392 10.7372L15.7925 10.1839L15.2392 10.7372ZM16.2377 13.1478L15.4552 13.1478L16.2377 13.1478ZM15.2392 15.5584L14.6859 15.0051L15.2392 15.5584ZM10.418 15.5584L9.86469 16.1118L10.418 15.5584ZM9.52499 13.5588C9.2194 13.2532 8.72393 13.2532 8.41834 13.5588C8.11275 13.8643 8.11275 14.3598 8.41834 14.6654L9.52499 13.5588ZM5.52477 11.7731C5.83036 12.0787 6.32583 12.0787 6.63142 11.7731C6.93701 11.4675 6.93701 10.972 6.63142 10.6665L5.52477 11.7731ZM9.45292 4.95224L10.0062 4.39892L9.45292 4.95224ZM10.346 6.95192C10.6515 7.25752 11.147 7.25752 11.4526 6.95192C11.7582 6.64633 11.7582 6.15087 11.4526 5.84527L10.346 6.95192ZM13.2395 9.84422L14.6859 11.2906L15.7925 10.1839L14.3462 8.73757L13.2395 9.84422ZM14.6859 11.2906C15.1785 11.7832 15.4552 12.4512 15.4552 13.1478L17.0202 13.1478C17.0202 12.0362 16.5786 10.97 15.7925 10.1839L14.6859 11.2906ZM15.4552 13.1478C15.4552 13.8445 15.1785 14.5125 14.6859 15.0051L15.7925 16.1118C16.5786 15.3257 17.0202 14.2595 17.0202 13.1478L15.4552 13.1478ZM14.6859 15.0051C13.6601 16.0308 11.9971 16.0308 10.9713 15.0051L9.86469 16.1118C11.5016 17.7487 14.1556 17.7487 15.7925 16.1118L14.6859 15.0051ZM10.9713 15.0051L9.52499 13.5588L8.41834 14.6654L9.86469 16.1118L10.9713 15.0051ZM6.63142 10.6665L5.18507 9.2201L4.07842 10.3268L5.52477 11.7731L6.63142 10.6665ZM5.18507 9.2201C4.69249 8.72752 4.41576 8.05944 4.41576 7.36283H2.85072C2.85072 8.47452 3.29234 9.54067 4.07842 10.3268L5.18507 9.2201ZM4.41576 7.36283C4.41576 6.66622 4.69249 5.99815 5.18507 5.50557L4.07842 4.39892C3.29234 5.185 2.85072 6.25115 2.85072 7.36283H4.41576ZM5.18507 5.50557C6.21081 4.47983 7.87386 4.47983 8.8996 5.50557L10.0062 4.39892C8.36932 2.76199 5.71534 2.76199 4.07842 4.39892L5.18507 5.50557ZM8.8996 5.50557L10.346 6.95192L11.4526 5.84527L10.0062 4.39892L8.8996 5.50557Z",fill:"#4D596C"}),T.createElement("rect",{x:6.36328,y:7.91895,width:1.66667,height:8.33333,rx:.833333,transform:"rotate(-45 6.36328 7.91895)",fill:"#4D596C"})),mE=({onCreateClick:e,onLinkClick:t,haveCreateObjects:n,haveLinkObjects:r})=>u.jsxs(d.Stack,{gap:2,marginTop:"12px",children:[u.jsx(d.Typography,{variant:"body2",color:d.theme.palette.gray.gray1,children:mx}),u.jsxs(d.Stack,{gap:"12px",children:[n?u.jsxs(pE,{fullWidth:!0,onClick:e,size:"medium",children:[u.jsx(hE,{}),u.jsx("span",{className:"content__btn",children:Id})]}):null,r?u.jsxs(fE,{fullWidth:!0,color:"tertiary",variant:"outlined",onClick:t,size:"medium",children:[u.jsx(gE,{}),u.jsx("span",{className:"content__btn",children:wd})]}):null]})]}),bE=e=>e.write.searchObjectList,gp=e=>e.write.objectDict,yE=e=>e.write.formFields,CE=e=>e.write.dependentFieldsMap,xE="Search in Connectors",vE="Search in Apps",EE="Start typing to search..",IE="Smart search suggestions",wE=":count result:countSuffix found for :searchObject in :connectorName",_E="Back to search results",SE="No search results found",mp=e=>T.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"#97A3B7",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{id:"icons/Actions/Search"},T.createElement("path",{id:"Shape",fillRule:"evenodd",clipRule:"evenodd",d:"M8.57633 7.54717H8.03431L7.8422 7.36192C8.51458 6.57976 8.91938 5.56432 8.91938 4.45969C8.91938 1.99657 6.92281 0 4.45969 0C1.99657 0 0 1.99657 0 4.45969C0 6.92281 1.99657 8.91938 4.45969 8.91938C5.56432 8.91938 6.57976 8.51458 7.36192 7.8422L7.54717 8.03431V8.57633L10.9777 12L12 10.9777L8.57633 7.54717ZM4.45969 7.54717C2.75129 7.54717 1.37221 6.1681 1.37221 4.45969C1.37221 2.75129 2.75129 1.37221 4.45969 1.37221C6.1681 1.37221 7.54717 2.75129 7.54717 4.45969C7.54717 6.1681 6.1681 7.54717 4.45969 7.54717Z"}))),AE=d.styled(d.Stack)`
1234
+ `,hE=e=>T.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("mask",{id:"mask0_4649_80352",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:20,height:21},T.createElement("rect",{y:.320312,width:20,height:20,fill:"#D9D9D9"})),T.createElement("g",{mask:"url(#mask0_4649_80352)"},T.createElement("path",{d:"M9.16797 14.4873H10.8346V11.154H14.168V9.4873H10.8346V6.15397H9.16797V9.4873H5.83464V11.154H9.16797V14.4873ZM10.0013 18.654C8.84852 18.654 7.76519 18.4352 6.7513 17.9977C5.73741 17.5602 4.85547 16.9665 4.10547 16.2165C3.35547 15.4665 2.76172 14.5845 2.32422 13.5706C1.88672 12.5567 1.66797 11.4734 1.66797 10.3206C1.66797 9.16786 1.88672 8.08453 2.32422 7.07064C2.76172 6.05675 3.35547 5.1748 4.10547 4.4248C4.85547 3.6748 5.73741 3.08105 6.7513 2.64355C7.76519 2.20605 8.84852 1.9873 10.0013 1.9873C11.1541 1.9873 12.2374 2.20605 13.2513 2.64355C14.2652 3.08105 15.1471 3.6748 15.8971 4.4248C16.6471 5.1748 17.2409 6.05675 17.6784 7.07064C18.1159 8.08453 18.3346 9.16786 18.3346 10.3206C18.3346 11.4734 18.1159 12.5567 17.6784 13.5706C17.2409 14.5845 16.6471 15.4665 15.8971 16.2165C15.1471 16.9665 14.2652 17.5602 13.2513 17.9977C12.2374 18.4352 11.1541 18.654 10.0013 18.654ZM10.0013 16.9873C11.8624 16.9873 13.4388 16.3415 14.7305 15.0498C16.0221 13.7581 16.668 12.1817 16.668 10.3206C16.668 8.45953 16.0221 6.88314 14.7305 5.59147C13.4388 4.2998 11.8624 3.65397 10.0013 3.65397C8.14019 3.65397 6.5638 4.2998 5.27214 5.59147C3.98047 6.88314 3.33464 8.45953 3.33464 10.3206C3.33464 12.1817 3.98047 13.7581 5.27214 15.0498C6.5638 16.3415 8.14019 16.9873 10.0013 16.9873Z",fill:"#4D596C"}))),gE=e=>T.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M14.3462 8.73757C14.0406 8.43198 13.5451 8.43198 13.2395 8.73757C12.9339 9.04316 12.9339 9.53863 13.2395 9.84422L14.3462 8.73757ZM15.2392 10.7372L15.7925 10.1839L15.2392 10.7372ZM16.2377 13.1478L15.4552 13.1478L16.2377 13.1478ZM15.2392 15.5584L14.6859 15.0051L15.2392 15.5584ZM10.418 15.5584L9.86469 16.1118L10.418 15.5584ZM9.52499 13.5588C9.2194 13.2532 8.72393 13.2532 8.41834 13.5588C8.11275 13.8643 8.11275 14.3598 8.41834 14.6654L9.52499 13.5588ZM5.52477 11.7731C5.83036 12.0787 6.32583 12.0787 6.63142 11.7731C6.93701 11.4675 6.93701 10.972 6.63142 10.6665L5.52477 11.7731ZM9.45292 4.95224L10.0062 4.39892L9.45292 4.95224ZM10.346 6.95192C10.6515 7.25752 11.147 7.25752 11.4526 6.95192C11.7582 6.64633 11.7582 6.15087 11.4526 5.84527L10.346 6.95192ZM13.2395 9.84422L14.6859 11.2906L15.7925 10.1839L14.3462 8.73757L13.2395 9.84422ZM14.6859 11.2906C15.1785 11.7832 15.4552 12.4512 15.4552 13.1478L17.0202 13.1478C17.0202 12.0362 16.5786 10.97 15.7925 10.1839L14.6859 11.2906ZM15.4552 13.1478C15.4552 13.8445 15.1785 14.5125 14.6859 15.0051L15.7925 16.1118C16.5786 15.3257 17.0202 14.2595 17.0202 13.1478L15.4552 13.1478ZM14.6859 15.0051C13.6601 16.0308 11.9971 16.0308 10.9713 15.0051L9.86469 16.1118C11.5016 17.7487 14.1556 17.7487 15.7925 16.1118L14.6859 15.0051ZM10.9713 15.0051L9.52499 13.5588L8.41834 14.6654L9.86469 16.1118L10.9713 15.0051ZM6.63142 10.6665L5.18507 9.2201L4.07842 10.3268L5.52477 11.7731L6.63142 10.6665ZM5.18507 9.2201C4.69249 8.72752 4.41576 8.05944 4.41576 7.36283H2.85072C2.85072 8.47452 3.29234 9.54067 4.07842 10.3268L5.18507 9.2201ZM4.41576 7.36283C4.41576 6.66622 4.69249 5.99815 5.18507 5.50557L4.07842 4.39892C3.29234 5.185 2.85072 6.25115 2.85072 7.36283H4.41576ZM5.18507 5.50557C6.21081 4.47983 7.87386 4.47983 8.8996 5.50557L10.0062 4.39892C8.36932 2.76199 5.71534 2.76199 4.07842 4.39892L5.18507 5.50557ZM8.8996 5.50557L10.346 6.95192L11.4526 5.84527L10.0062 4.39892L8.8996 5.50557Z",fill:"#4D596C"}),T.createElement("rect",{x:6.36328,y:7.91895,width:1.66667,height:8.33333,rx:.833333,transform:"rotate(-45 6.36328 7.91895)",fill:"#4D596C"})),mE=({onCreateClick:e,onLinkClick:t,haveCreateObjects:n,haveLinkObjects:r})=>u.jsxs(d.Stack,{gap:2,marginTop:"12px",children:[u.jsx(d.Typography,{variant:"body2",color:d.theme.palette.gray.gray1,children:mx}),u.jsxs(d.Stack,{gap:"12px",children:[n?u.jsxs(pE,{fullWidth:!0,onClick:e,size:"medium",children:[u.jsx(hE,{}),u.jsx("span",{className:"content__btn",children:Hi})]}):null,r?u.jsxs(fE,{fullWidth:!0,color:"tertiary",variant:"outlined",onClick:t,size:"medium",children:[u.jsx(gE,{}),u.jsx("span",{className:"content__btn",children:wd})]}):null]})]}),bE=e=>e.write.searchObjectList,gp=e=>e.write.objectDict,yE=e=>e.write.formFields,CE=e=>e.write.dependentFieldsMap,xE="Search in Connectors",vE="Search in Apps",EE="Start typing to search..",IE="Smart search suggestions",wE=":count result:countSuffix found for :searchObject in :connectorName",_E="Back to search results",SE="No search results found",mp=e=>T.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"#97A3B7",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{id:"icons/Actions/Search"},T.createElement("path",{id:"Shape",fillRule:"evenodd",clipRule:"evenodd",d:"M8.57633 7.54717H8.03431L7.8422 7.36192C8.51458 6.57976 8.91938 5.56432 8.91938 4.45969C8.91938 1.99657 6.92281 0 4.45969 0C1.99657 0 0 1.99657 0 4.45969C0 6.92281 1.99657 8.91938 4.45969 8.91938C5.56432 8.91938 6.57976 8.51458 7.36192 7.8422L7.54717 8.03431V8.57633L10.9777 12L12 10.9777L8.57633 7.54717ZM4.45969 7.54717C2.75129 7.54717 1.37221 6.1681 1.37221 4.45969C1.37221 2.75129 2.75129 1.37221 4.45969 1.37221C6.1681 1.37221 7.54717 2.75129 7.54717 4.45969C7.54717 6.1681 6.1681 7.54717 4.45969 7.54717Z"}))),AE=d.styled(d.Stack)`
1236
1235
  flex-flow: row nowrap;
1237
1236
  align-items: center;
1238
1237
  column-gap: 12px;
@@ -1252,7 +1251,7 @@ Do you want to continue?`,vx="Select an object to create",Ex="Select an object t
1252
1251
  padding: 10px 0 10px 10px;
1253
1252
  `,{Control:OE}=ln,FE=({children:e,...t})=>u.jsxs(OE,{...t,children:[u.jsx(LE,{children:u.jsx(mp,{})}),e]}),kE=e=>{const{data:t,isSelected:n,selectOption:r}=e;return u.jsx(bp,{data:t,isSelected:n,onSelect:r})},DE={control:(e,{isFocused:t})=>({...e,cursor:"pointer",boxShadow:"none",borderColor:t?"#196FE0 !important":"#D6DDE8",borderWidth:"1px"}),menu:e=>({...e,marginTop:0,padding:0,borderRadius:"4px",background:"#fff",boxShadow:"0px 3px 15px 0px rgba(0, 0, 0, 0.25)",zIndex:3}),input:e=>({...e,"& input":{opacity:"1 !important"}}),menuPortal:e=>({...e,zIndex:3})},NE=({options:e,value:t,inputValue:n,root:r,onChange:o,onInputChange:s,onReset:a,NoOptionsMessage:i,menuOpen:c})=>{const{availableFeatures:l,sendTrackingEvent:f,currentSmIds:m}=w.useContext(Be),b=et(l,Rs),v=(h,{action:g})=>{g==="input-change"&&(s(h),h||a())},y=h=>{o(h),h||(s(""),a())},p=()=>{const h=[...new Set(e.map(g=>g.connectorName))];f(I3,{connector_names:h,sm_ids:m})};return u.jsx(Zo,{name:"global-search",type:"select",value:t,inputValue:n,options:n?e:[],placeholder:b?vE:xE,isSearchable:!0,filterOption:null,styles:DE,onInputChange:v,onChange:y,isClearable:!0,menuPortalTarget:document.body,blurInputOnSelect:!0,onFocus:p,components:{DropdownIndicator:()=>null,IndicatorSeparator:()=>null,Option:kE,Control:FE,...i&&{NoOptionsMessage:i}},root:r,...typeof c=="boolean"&&{menuIsOpen:c}})},RE=d.styled(d.Stack)`
1254
1253
  margin: ${({isEmpty:e})=>e?"0":"12px 0"};
1255
- `,ME=({objectId:e,searchString:t,fetchSearchResults:n})=>{var I;const[r,o]=np(),s=w.useRef(null),a=Ce(gp),i=Ce(yE),c=Ce(CE),l=w.useMemo(()=>e&&i&&i[e]&&Array.isArray(i[e])?{id:e,formFields:i[e]}:{id:"emptyFormId",formFields:[]},[i,e]),f=w.useMemo(()=>{const E=(l==null?void 0:l.formFields)||[];return Zc({formFields:E})},[l]),{setValue:m,inputChangeHandler:b,dateChangeHandler:v,clearDependentFields:y,handleValidationError:p,isErrorInValidations:h}=rp({state:r,dispatch:o,validations:f}),{fetchConfig:g}=ap({formState:r,formFields:l.formFields,formId:l.id}),C=w.useCallback(E=>{s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{n(E)},500)},[n]);w.useEffect(()=>{const E=r.values,_=l.id,A=l.formFields;if(Object.values(E).filter(V=>!!V).length<A.length||!a||h()){s.current&&clearTimeout(s.current);return}const S=a[e].searchInterfaceDetails;if(!S)return;const L=a[e].connectorName,{id:k,args:D={}}=S,N=Yo(r,D);C({id:_,interfaceId:k,searchString:t,connectorName:L,args:N})},[r,l,a,e,t,h,C]),w.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]);const x=(E,_,A)=>{if(_.action==="clear"&&_.name&&(m(_.name,""),y(_.name,c[e]),f[_.name].isRequired&&p(_.name,!0)),E&&typeof E=="object"&&"label"in E&&typeof E.label=="string"&&"value"in E&&(typeof E.value=="string"||typeof E.value=="number")&&typeof _.name<"u"){let S=!1;A&&(S=A.isMultiSelect||!1);const L=S?[{value:E.value,label:E.label}]:{value:E.value,label:E.label};m(_.name,L),y(_.name,c[e])}};return u.jsx(RE,{isEmpty:((I=l.formFields)==null?void 0:I.length)===0,children:u.jsx(I1,{showGlobalLoader:!1,formConfig:[l],selectChangeHandler:x,inputChangeHandler:b,dateChangeHandler:v,onValidationError:p,labelSpacing:.5,fetchConfig:g,values:r.values,validations:f})})},Yc="@connector-agent-global-search-priority",Jc=By(),PE=({objectList:e})=>({sortedObjectList:w.useMemo(()=>{const r=Jc.getItem(Yc);return r?[...e].sort((o,s)=>(r[o.value]??0)>(r[s.value]??0)?-1:1):e},[e]),updatePriority:r=>{const o=Jc.getItem(Yc)??{};o[r]||(o[r]=0),o[r]++,Jc.setItem(Yc,o)}}),jE=d.styled(d.Stack)`
1254
+ `,ME=({objectId:e,searchString:t,fetchSearchResults:n})=>{var I;const[r,o]=np(),s=w.useRef(null),a=Ce(gp),i=Ce(yE),c=Ce(CE),l=w.useMemo(()=>e&&i&&i[e]&&Array.isArray(i[e])?{id:e,formFields:i[e]}:{id:"emptyFormId",formFields:[]},[i,e]),f=w.useMemo(()=>{const E=(l==null?void 0:l.formFields)||[];return Xc({formFields:E})},[l]),{setValue:m,inputChangeHandler:b,dateChangeHandler:v,clearDependentFields:y,handleValidationError:p,isErrorInValidations:h}=rp({state:r,dispatch:o,validations:f}),{fetchConfig:g}=ap({formState:r,formFields:l.formFields,formId:l.id}),C=w.useCallback(E=>{s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{n(E)},500)},[n]);w.useEffect(()=>{const E=r.values,_=l.id,A=l.formFields;if(Object.values(E).filter(V=>!!V).length<A.length||!a||h()){s.current&&clearTimeout(s.current);return}const S=a[e].searchInterfaceDetails;if(!S)return;const L=a[e].connectorName,{id:k,args:D={}}=S,N=Yo(r,D);C({id:_,interfaceId:k,searchString:t,connectorName:L,args:N})},[r,l,a,e,t,h,C]),w.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]);const x=(E,_,A)=>{if(_.action==="clear"&&_.name&&(m(_.name,""),y(_.name,c[e]),f[_.name].isRequired&&p(_.name,!0)),E&&typeof E=="object"&&"label"in E&&typeof E.label=="string"&&"value"in E&&(typeof E.value=="string"||typeof E.value=="number")&&typeof _.name<"u"){let S=!1;A&&(S=A.isMultiSelect||!1);const L=S?[{value:E.value,label:E.label}]:{value:E.value,label:E.label};m(_.name,L),y(_.name,c[e])}};return u.jsx(RE,{isEmpty:((I=l.formFields)==null?void 0:I.length)===0,children:u.jsx(I1,{showGlobalLoader:!1,formConfig:[l],selectChangeHandler:x,inputChangeHandler:b,dateChangeHandler:v,onValidationError:p,labelSpacing:.5,fetchConfig:g,values:r.values,validations:f})})},Jc="@connector-agent-global-search-priority",qc=By(),PE=({objectList:e})=>({sortedObjectList:w.useMemo(()=>{const r=qc.getItem(Jc);return r?[...e].sort((o,s)=>(r[o.value]??0)>(r[s.value]??0)?-1:1):e},[e]),updatePriority:r=>{const o=qc.getItem(Jc)??{};o[r]||(o[r]=0),o[r]++,qc.setItem(Jc,o)}}),jE=d.styled(d.Stack)`
1256
1255
  padding: 8px 0;
1257
1256
  `,BE=d.styled(d.Typography)`
1258
1257
  padding: 6px 16px;
@@ -1275,7 +1274,7 @@ Do you want to continue?`,vx="Select an object to create",Ex="Select an object t
1275
1274
  letter-spacing: 0.4px;
1276
1275
  text-align: center;
1277
1276
  vertical-align: middle;
1278
- `,tI=({meta:{externalResourceId:e,formId:t,searchKeyword:n,searchResultLabel:r},onBack:o,onLink:s})=>{const a=zt(),{conversationId:i,currentSmIds:c,sendTrackingEvent:l,email:f}=w.useContext(Be),m=Ce(U1),b=Ce(K1),{mutate:v,isPending:y}=UE({onSuccess:s}),p=b===K.LOADING,h={externalResourceId:e};w.useEffect(()=>{a(qr({id:t,args:{externalResourceId:e}}))},[e,t,a]);const g=()=>{l(L3,{search_keyword:n,search_result_label:r,sm_ids:c,card_title:m==null?void 0:m.cardTitle,connector_names:m==null?void 0:m.connectorNames}),v({id:t,externalResourceId:e,conversationId:i,email:f})};return u.jsxs(d.Stack,{gap:"12px",marginTop:"12px",children:[u.jsxs(eI,{onClick:o,children:[u.jsx("img",{src:KE,width:"16px",height:"16px"}),u.jsx(d.Typography,{children:_E})]}),u.jsxs(d.Stack,{gap:"24px",children:[u.jsx(ep,{cardData:m,cardDataApiStatus:b,objectToLink:t,args:h}),u.jsx(d.Stack,{alignItems:"flex-end",children:u.jsx(d.Button,{size:"small",disabled:p||y,onClick:g,children:xd})})]})]})},vp=d.styled(d.Stack)`
1277
+ `,tI=({meta:{externalResourceId:e,formId:t,searchKeyword:n,searchResultLabel:r},onBack:o,onLink:s})=>{const a=zt(),{conversationId:i,currentSmIds:c,sendTrackingEvent:l,email:f}=w.useContext(Be),m=Ce(U1),b=Ce(K1),{mutate:v,isPending:y}=UE({onSuccess:s}),p=b===K.LOADING,h={externalResourceId:e};w.useEffect(()=>{a(qr({id:t,args:{externalResourceId:e}}))},[e,t,a]);const g=()=>{l(L3,{search_keyword:n,search_result_label:r,sm_ids:c,card_title:m==null?void 0:m.cardTitle,connector_names:m==null?void 0:m.connectorNames}),v({id:t,externalResourceId:e,conversationId:i,email:f})};return u.jsxs(d.Stack,{gap:"12px",marginTop:"12px",children:[u.jsxs(eI,{onClick:o,children:[u.jsx("img",{src:KE,width:"16px",height:"16px"}),u.jsx(d.Typography,{children:_E})]}),u.jsxs(d.Stack,{gap:"24px",children:[u.jsx(ep,{cardData:m,cardDataApiStatus:b,objectToLink:t,args:h}),u.jsx(d.Stack,{alignItems:"flex-end",children:u.jsx(d.Button,{size:"small",disabled:p||y,onClick:g,children:vd})})]})]})},vp=d.styled(d.Stack)`
1279
1278
  padding: 12px 12px 12px 11px;
1280
1279
  border: 1px solid ${d.theme.palette.gray.gray5};
1281
1280
  border-radius: 8px;
@@ -1291,10 +1290,10 @@ Do you want to continue?`,vx="Select an object to create",Ex="Select an object t
1291
1290
  }
1292
1291
  }
1293
1292
  `};
1294
- `,nI="data:image/svg+xml,%3csvg%20width='124'%20height='107'%20viewBox='0%200%20124%20107'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M28.6168%2054.7446C28.6931%2052.5589%2031.0146%2051.1102%2033.0842%2051.8174C35.9985%2052.8133%2040.0375%2053.9024%2044.0621%2054.043C48.0034%2054.1806%2051.968%2053.4097%2054.8762%2052.6339C57.0264%2052.0602%2059.2927%2053.6932%2059.215%2055.9172C59.1742%2057.0856%2058.4742%2058.1269%2057.3723%2058.5178C54.8051%2059.4284%2049.7633%2060.8927%2044.3075%2060.7022C38.7694%2060.5088%2033.1999%2058.6241%2030.4004%2057.5311C29.2637%2057.0873%2028.5742%2055.9641%2028.6168%2054.7446Z'%20fill='url(%23paint0_linear_8481_102191)'/%3e%3cpath%20d='M47.223%2043.6373C44.4928%2030.7926%2052.6922%2018.1666%2065.5368%2015.4364C78.3815%2012.7062%2091.0075%2020.9055%2093.7377%2033.7502L105.079%2087.1053L84.1844%2091.5466C70.0346%2094.5542%2056.1258%2085.5217%2053.1182%2071.3719L47.223%2043.6373Z'%20fill='url(%23paint1_linear_8481_102191)'/%3e%3cmask%20id='mask0_8481_102191'%20style='mask-type:luminance'%20maskUnits='userSpaceOnUse'%20x='46'%20y='14'%20width='60'%20height='79'%3e%3cpath%20d='M47.223%2043.6373C44.4928%2030.7926%2052.6922%2018.1666%2065.5368%2015.4364C78.3815%2012.7062%2091.0075%2020.9055%2093.7377%2033.7502L105.079%2087.1053L84.1844%2091.5466C70.0346%2094.5542%2056.1258%2085.5217%2053.1182%2071.3719L47.223%2043.6373Z'%20fill='white'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_8481_102191)'%3e%3cellipse%20cx='63.7775'%20cy='46.8684'%20rx='1.48152'%20ry='1.39438'%20transform='rotate(-12%2063.7775%2046.8684)'%20fill='%23435C71'/%3e%3crect%20x='47.4368'%20y='59.3203'%20width='53.657'%20height='13.2235'%20transform='rotate(-12%2047.4368%2059.3203)'%20fill='url(%23paint2_linear_8481_102191)'/%3e%3crect%20x='51.1907'%20y='76.9824'%20width='53.657'%20height='10.4263'%20transform='rotate(-12%2051.1907%2076.9824)'%20fill='url(%23paint3_linear_8481_102191)'/%3e%3c/g%3e%3cpath%20opacity='0.883952'%20d='M113.939%2051.0679C114.775%2055%20112.265%2058.865%20108.333%2059.7008L107.842%2059.8052C103.639%2060.6986%2099.5073%2058.0155%2098.6139%2053.8123L97.205%2047.1837L105.307%2045.4616C109.239%2044.6259%20113.104%2047.1359%20113.939%2051.0679Z'%20fill='url(%23paint4_linear_8481_102191)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M68.7215%2066.4138C67.1801%2064.8725%2067.6745%2062.2062%2069.587%2061.1603C72.4457%2059.5969%2076.2861%2057.1773%2079.3785%2054.0849C82.4099%2051.0535%2084.752%2047.3461%2086.2775%2044.5465C87.3388%2042.5989%2090.0598%2042.0819%2091.6282%2043.6503C92.4782%2044.5003%2092.758%2045.7623%2092.2604%2046.8566C91.0829%2049.4466%2088.5191%2054.344%2084.4346%2058.4285C80.2853%2062.5778%2074.8639%2065.591%2072.0553%2066.9952C70.9363%2067.5548%2069.6062%2067.2985%2068.7215%2066.4138Z'%20fill='url(%23paint5_linear_8481_102191)'/%3e%3crect%20x='48.7264'%20y='33.7744'%20width='11.2108'%20height='11.2108'%20rx='5.59457'%20transform='rotate(-12%2048.7264%2033.7744)'%20fill='url(%23paint6_linear_8481_102191)'/%3e%3crect%20x='50.0175'%20y='35.8193'%20width='4.0158'%20height='3.84848'%20rx='1.92424'%20transform='rotate(-12%2050.0175%2035.8193)'%20fill='%23435C71'/%3e%3crect%20x='59.2875'%20y='31.5723'%20width='11.2108'%20height='11.2108'%20rx='5.59457'%20transform='rotate(-12%2059.2875%2031.5723)'%20fill='%23FFFEFE'/%3e%3cpath%20opacity='0.883952'%20d='M111.25%2038.5376C110.415%2034.6055%20106.55%2032.0955%20102.618%2032.9313L102.127%2033.0356C97.9234%2033.9291%2095.2403%2038.0607%2096.1337%2042.2639L97.5426%2048.8925L105.644%2047.1705C109.576%2046.3347%20112.086%2042.4696%20111.25%2038.5376Z'%20fill='url(%23paint7_linear_8481_102191)'/%3e%3crect%20x='60.0181'%20y='33.8037'%20width='3.84848'%20height='3.84848'%20rx='1.90724'%20transform='rotate(-12%2060.0181%2033.8037)'%20fill='%23435C71'/%3e%3cpath%20d='M36.9246%2059.1604C36.4487%2060.717%2034.7371%2061.6271%2033.1805%2061.1512C32.3613%2060.9007%2031.7241%2060.3475%2031.3259%2059.5987L25.2059%2046.7983C24.9784%2046.3703%2025.1286%2045.8788%2025.5566%2045.6513L28.338%2044.1724C28.7659%2043.9449%2029.2574%2044.0951%2029.4849%2044.5231L36.6496%2056.8367C37.0728%2057.5036%2037.15%2058.423%2036.9246%2059.1604Z'%20fill='%23FFDF9F'/%3e%3crect%20x='27.9973'%20y='44.333'%20width='2.39869'%20height='3.59807'%20transform='rotate(152%2027.9973%2044.333)'%20fill='%23FF9090'/%3e%3cpath%20d='M26.6628%2044.3769L26.9472%2044.9118L28.0169%2044.343L26.3106%2041.1338L24.171%2042.2714L25.0243%2043.876C25.6661%2043.5347%2026.3215%2043.7351%2026.6628%2044.3769Z'%20fill='%23FFB19F'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M7.26386%2027.248C9.3428%2020.4481%2016.5101%2016.6372%2023.31%2018.7161C30.11%2020.7951%2033.9209%2027.9624%2031.8419%2034.7623C29.763%2041.5622%2022.5956%2045.3731%2015.7958%2043.2942C8.99587%2041.2152%205.18493%2034.0479%207.26386%2027.248ZM9.72157%2027.9983C8.06843%2033.4055%2011.1399%2039.1821%2016.5471%2040.8352C21.9543%2042.4884%2027.7309%2039.4168%2029.384%2034.0096C31.0372%2028.6024%2027.9657%2022.8258%2022.5585%2021.1727C17.1513%2019.5196%2011.3747%2022.5911%209.72157%2027.9983Z'%20fill='%23FFE69F'/%3e%3ccircle%20opacity='0.414016'%20cx='19.5529'%20cy='31.0039'%20r='10.2804'%20transform='rotate(17%2019.5529%2031.0039)'%20fill='%23BBDEFC'/%3e%3cpath%20d='M14.3685%2030.6746C15.7299%2027.6867%2018.9391%2025.9803%2022.1776%2026.5225L22.2595%2026.5475C23.7024%2026.8095%2024.3854%2024.8682%2023.1497%2024.2218C22.3806%2023.8074%2021.5613%2023.557%2020.717%2023.3884C17.3715%2022.9031%2014.0553%2024.6664%2012.6939%2027.6543C12.2796%2028.4235%2012.0859%2029.3497%2012.0244%2030.1372C11.8444%2031.6051%2013.8607%2032.0424%2014.4503%2030.6997C14.3434%2030.7566%2014.3685%2030.6746%2014.3685%2030.6746Z'%20fill='%23F6FBFF'/%3e%3cpath%20d='M10.2904%2029.0679C11.9436%2023.6607%2017.7202%2020.5893%2023.1274%2022.2424C25.6671%2023.0189%2027.5785%2024.6783%2028.9301%2026.704C27.7539%2024.1048%2025.508%2022.0744%2022.5586%2021.1727C17.1514%2019.5196%2011.3748%2022.591%209.72165%2027.9982C8.81993%2030.9476%209.32924%2033.97%2010.7444%2036.3735C9.82081%2034.1203%209.51395%2031.6077%2010.2904%2029.0679Z'%20fill='%23ADCBE7'/%3e%3cpath%20opacity='0.406087'%20d='M36.4864%2056.8021L36.1373%2056.2691C36.3845%2056.8563%2036.428%2057.5516%2036.2372%2058.1754C35.9273%2059.189%2034.5593%2059.1971%2034.0713%2058.2806L28.3787%2047.5877C28.0534%2046.9767%2027.3508%2046.7619%2026.7395%2047.0866L25.7206%2047.6277L31.4395%2059.3516C31.7648%2059.9627%2032.27%2060.5434%2032.8706%2060.8123C33.7054%2061.1528%2034.6593%2061.1034%2035.3726%2060.7247C36.0858%2060.3459%2036.6602%2059.5837%2036.8444%2058.7021C37.0351%2058.0783%2036.8117%2057.4132%2036.4864%2056.8021Z'%20fill='white'/%3e%3cpath%20d='M29.8826%2048.4977C29.8006%2048.4726%2029.6368%2048.4225%2029.5799%2048.3155L28.1579%2045.6411C28.0442%2045.4272%2028.1193%2045.1814%2028.3332%2045.0677C28.5472%2044.9539%2028.7929%2045.0291%2028.9067%2045.243L30.3287%2047.9174C30.4424%2048.1313%2030.3673%2048.3771%2030.1534%2048.4908C30.1284%2048.5728%2029.9645%2048.5227%2029.8826%2048.4977Z'%20fill='%23FFF5EB'/%3e%3cellipse%20cx='29.2637'%20cy='54.631'%20rx='1.50593'%20ry='3.17918'%20transform='rotate(-23%2029.2637%2054.631)'%20fill='%23FFC478'/%3e%3cellipse%20cx='34.0592'%20cy='52.4078'%20rx='0.920288'%20ry='1.67325'%20transform='rotate(106%2034.0592%2052.4078)'%20fill='%23FFC478'/%3e%3cpath%20d='M89.1282%2019.2055L68.2257%2026.8725L45.9197%2028.3898L44.4929%2016.4082C44.3371%2013.798%2047.5283%2011.4502%2050.9859%2011.6309L65.1429%2012.369L67.3969%2012.4869C68.5309%2012.5463%2069.7066%2012.3289%2070.7522%2011.8627L78.6899%208.34726C81.725%206.99992%2085.3012%207.87475%2086.2125%2010.1876L89.1282%2019.2055Z'%20fill='url(%23paint8_linear_8481_102191)'/%3e%3cpath%20opacity='0.479771'%20d='M88.6262%2019.0953L68.3101%2026.5288L65.3314%2012.5149L67.5211%2012.6263C68.6228%2012.6824%2069.7652%2012.471%2070.7816%2012.0192L78.4972%208.61266C81.4474%207.30707%2084.9208%208.14856%2085.8036%2010.3829L88.6262%2019.0953Z'%20fill='%23ADCBE7'/%3e%3cpath%20d='M91.6332%2026.6212L46.9517%2036.1186L46.0387%2028.4438L89.2535%2019.2582L91.6332%2026.6212Z'%20fill='%23717DAD'/%3e%3cpath%20d='M102.961%2024.2033C103.125%2024.9722%20102.371%2025.7829%20101.278%2026.015L37.9675%2039.4722C36.8754%2039.7043%2035.8568%2039.2704%2035.6933%2038.5015C35.5301%2037.7336%2036.284%2036.922%2037.3761%2036.6898L100.687%2023.2327C101.779%2023.0005%20102.798%2023.4354%20102.961%2024.2033Z'%20fill='%239ED1FF'/%3e%3cpath%20d='M102.703%2024.1718C102.838%2024.805%20102.067%2025.5045%20100.983%2025.7349L69.5583%2032.4144L69.0712%2030.123L100.496%2023.4436C101.58%2023.2131%20102.569%2023.5394%20102.703%2024.1718Z'%20fill='%2378AFE1'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_8481_102191'%20x1='32.2665'%20y1='59.6553'%20x2='59.0518'%20y2='60.5906'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FFFDE0'/%3e%3cstop%20offset='1'%20stop-color='%23FFB362'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_8481_102191'%20x1='67.3434'%20y1='85.966'%20x2='103.216'%20y2='78.3411'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FFFABC'/%3e%3cstop%20offset='1'%20stop-color='%23FFA650'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint2_linear_8481_102191'%20x1='51.4347'%20y1='74.8197'%20x2='91.1539'%20y2='74.8197'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A3C1FF'/%3e%3cstop%20offset='1'%20stop-color='%234243FF'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint3_linear_8481_102191'%20x1='55.1887'%20y1='89.2031'%20x2='94.9078'%20y2='89.2031'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A3C1FF'/%3e%3cstop%20offset='1'%20stop-color='%234243FF'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint4_linear_8481_102191'%20x1='94.5023'%20y1='53.1799'%20x2='106.762'%20y2='58.7056'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF9498'/%3e%3cstop%20offset='1'%20stop-color='%23FFD671'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint5_linear_8481_102191'%20x1='74.9906'%20y1='66.9871'%20x2='94.9778'%20y2='46.9999'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FFFDE0'/%3e%3cstop%20offset='1'%20stop-color='%23FFB362'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint6_linear_8481_102191'%20x1='50.5805'%20y1='44.0581'%20x2='59.9372'%20y2='44.0581'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='white'/%3e%3cstop%20offset='1'%20stop-color='%23E3EEF3'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint7_linear_8481_102191'%20x1='88.4187'%20y1='43.3906'%20x2='99.3981'%20y2='25.1833'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF9498'/%3e%3cstop%20offset='1'%20stop-color='%23FFD671'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint8_linear_8481_102191'%20x1='56.4985'%20y1='29.5482'%20x2='100.532'%20y2='20.1885'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23ECF7FF'/%3e%3cstop%20offset='1'%20stop-color='%23C2E0FF'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",rI=()=>u.jsxs(d.Box,{justifyItems:"center",marginTop:"40px",children:[u.jsx("img",{src:nI,width:124,height:107}),u.jsx(d.Typography,{variant:"body2",color:d.theme.palette.gray.gray3,children:SE})]}),oI=({searchResults:e,selectedObject:t,onReset:n,fetchCards:r})=>{const o=zt(),{sendTrackingEvent:s,currentSmIds:a}=w.useContext(Be),[i,c]=w.useState(null),l=ct(wE,{count:e.length.toString(),countSuffix:e.length>1?"s":"",searchObject:t.objectName,connectorName:t.connectorName}),f=(v,y)=>{s(T3,{search_keyword:t.label,search_result_label:y,sm_ids:a,connector_name:t.connectorName}),c({externalResourceId:v,formId:t.value.toString(),searchKeyword:t.label,searchResultLabel:y})},m=()=>{c(null),o(Q8())},b=()=>{n(),r(),m()};return e.length?i?u.jsx(tI,{meta:i,onBack:m,onLink:b}):u.jsxs(d.Stack,{gap:"14px",marginTop:"12px",children:[u.jsx(d.Typography,{variant:"body2",children:l}),u.jsx(d.Stack,{gap:"17px",children:e==null?void 0:e.map(({externalResourceId:v,name:y,description:p})=>u.jsxs(vp,{onClick:()=>f(v,y),direction:"row",children:[u.jsxs(d.Stack,{flexGrow:1,children:[u.jsx(d.Typography,{variant:"body2",color:d.theme.palette.gray.gray1,children:y}),u.jsx(d.Typography,{variant:"caption",color:d.theme.palette.gray.gray3,children:p})]}),u.jsx(d.Box,{alignSelf:"center",className:"search-item__chevron",width:"20px",height:"20px",children:u.jsx("img",{src:$E})})]},v))})]}):u.jsx(rI,{})},qc=d.styled(d.Skeleton)`
1293
+ `,nI="data:image/svg+xml,%3csvg%20width='124'%20height='107'%20viewBox='0%200%20124%20107'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M28.6168%2054.7446C28.6931%2052.5589%2031.0146%2051.1102%2033.0842%2051.8174C35.9985%2052.8133%2040.0375%2053.9024%2044.0621%2054.043C48.0034%2054.1806%2051.968%2053.4097%2054.8762%2052.6339C57.0264%2052.0602%2059.2927%2053.6932%2059.215%2055.9172C59.1742%2057.0856%2058.4742%2058.1269%2057.3723%2058.5178C54.8051%2059.4284%2049.7633%2060.8927%2044.3075%2060.7022C38.7694%2060.5088%2033.1999%2058.6241%2030.4004%2057.5311C29.2637%2057.0873%2028.5742%2055.9641%2028.6168%2054.7446Z'%20fill='url(%23paint0_linear_8481_102191)'/%3e%3cpath%20d='M47.223%2043.6373C44.4928%2030.7926%2052.6922%2018.1666%2065.5368%2015.4364C78.3815%2012.7062%2091.0075%2020.9055%2093.7377%2033.7502L105.079%2087.1053L84.1844%2091.5466C70.0346%2094.5542%2056.1258%2085.5217%2053.1182%2071.3719L47.223%2043.6373Z'%20fill='url(%23paint1_linear_8481_102191)'/%3e%3cmask%20id='mask0_8481_102191'%20style='mask-type:luminance'%20maskUnits='userSpaceOnUse'%20x='46'%20y='14'%20width='60'%20height='79'%3e%3cpath%20d='M47.223%2043.6373C44.4928%2030.7926%2052.6922%2018.1666%2065.5368%2015.4364C78.3815%2012.7062%2091.0075%2020.9055%2093.7377%2033.7502L105.079%2087.1053L84.1844%2091.5466C70.0346%2094.5542%2056.1258%2085.5217%2053.1182%2071.3719L47.223%2043.6373Z'%20fill='white'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_8481_102191)'%3e%3cellipse%20cx='63.7775'%20cy='46.8684'%20rx='1.48152'%20ry='1.39438'%20transform='rotate(-12%2063.7775%2046.8684)'%20fill='%23435C71'/%3e%3crect%20x='47.4368'%20y='59.3203'%20width='53.657'%20height='13.2235'%20transform='rotate(-12%2047.4368%2059.3203)'%20fill='url(%23paint2_linear_8481_102191)'/%3e%3crect%20x='51.1907'%20y='76.9824'%20width='53.657'%20height='10.4263'%20transform='rotate(-12%2051.1907%2076.9824)'%20fill='url(%23paint3_linear_8481_102191)'/%3e%3c/g%3e%3cpath%20opacity='0.883952'%20d='M113.939%2051.0679C114.775%2055%20112.265%2058.865%20108.333%2059.7008L107.842%2059.8052C103.639%2060.6986%2099.5073%2058.0155%2098.6139%2053.8123L97.205%2047.1837L105.307%2045.4616C109.239%2044.6259%20113.104%2047.1359%20113.939%2051.0679Z'%20fill='url(%23paint4_linear_8481_102191)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M68.7215%2066.4138C67.1801%2064.8725%2067.6745%2062.2062%2069.587%2061.1603C72.4457%2059.5969%2076.2861%2057.1773%2079.3785%2054.0849C82.4099%2051.0535%2084.752%2047.3461%2086.2775%2044.5465C87.3388%2042.5989%2090.0598%2042.0819%2091.6282%2043.6503C92.4782%2044.5003%2092.758%2045.7623%2092.2604%2046.8566C91.0829%2049.4466%2088.5191%2054.344%2084.4346%2058.4285C80.2853%2062.5778%2074.8639%2065.591%2072.0553%2066.9952C70.9363%2067.5548%2069.6062%2067.2985%2068.7215%2066.4138Z'%20fill='url(%23paint5_linear_8481_102191)'/%3e%3crect%20x='48.7264'%20y='33.7744'%20width='11.2108'%20height='11.2108'%20rx='5.59457'%20transform='rotate(-12%2048.7264%2033.7744)'%20fill='url(%23paint6_linear_8481_102191)'/%3e%3crect%20x='50.0175'%20y='35.8193'%20width='4.0158'%20height='3.84848'%20rx='1.92424'%20transform='rotate(-12%2050.0175%2035.8193)'%20fill='%23435C71'/%3e%3crect%20x='59.2875'%20y='31.5723'%20width='11.2108'%20height='11.2108'%20rx='5.59457'%20transform='rotate(-12%2059.2875%2031.5723)'%20fill='%23FFFEFE'/%3e%3cpath%20opacity='0.883952'%20d='M111.25%2038.5376C110.415%2034.6055%20106.55%2032.0955%20102.618%2032.9313L102.127%2033.0356C97.9234%2033.9291%2095.2403%2038.0607%2096.1337%2042.2639L97.5426%2048.8925L105.644%2047.1705C109.576%2046.3347%20112.086%2042.4696%20111.25%2038.5376Z'%20fill='url(%23paint7_linear_8481_102191)'/%3e%3crect%20x='60.0181'%20y='33.8037'%20width='3.84848'%20height='3.84848'%20rx='1.90724'%20transform='rotate(-12%2060.0181%2033.8037)'%20fill='%23435C71'/%3e%3cpath%20d='M36.9246%2059.1604C36.4487%2060.717%2034.7371%2061.6271%2033.1805%2061.1512C32.3613%2060.9007%2031.7241%2060.3475%2031.3259%2059.5987L25.2059%2046.7983C24.9784%2046.3703%2025.1286%2045.8788%2025.5566%2045.6513L28.338%2044.1724C28.7659%2043.9449%2029.2574%2044.0951%2029.4849%2044.5231L36.6496%2056.8367C37.0728%2057.5036%2037.15%2058.423%2036.9246%2059.1604Z'%20fill='%23FFDF9F'/%3e%3crect%20x='27.9973'%20y='44.333'%20width='2.39869'%20height='3.59807'%20transform='rotate(152%2027.9973%2044.333)'%20fill='%23FF9090'/%3e%3cpath%20d='M26.6628%2044.3769L26.9472%2044.9118L28.0169%2044.343L26.3106%2041.1338L24.171%2042.2714L25.0243%2043.876C25.6661%2043.5347%2026.3215%2043.7351%2026.6628%2044.3769Z'%20fill='%23FFB19F'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M7.26386%2027.248C9.3428%2020.4481%2016.5101%2016.6372%2023.31%2018.7161C30.11%2020.7951%2033.9209%2027.9624%2031.8419%2034.7623C29.763%2041.5622%2022.5956%2045.3731%2015.7958%2043.2942C8.99587%2041.2152%205.18493%2034.0479%207.26386%2027.248ZM9.72157%2027.9983C8.06843%2033.4055%2011.1399%2039.1821%2016.5471%2040.8352C21.9543%2042.4884%2027.7309%2039.4168%2029.384%2034.0096C31.0372%2028.6024%2027.9657%2022.8258%2022.5585%2021.1727C17.1513%2019.5196%2011.3747%2022.5911%209.72157%2027.9983Z'%20fill='%23FFE69F'/%3e%3ccircle%20opacity='0.414016'%20cx='19.5529'%20cy='31.0039'%20r='10.2804'%20transform='rotate(17%2019.5529%2031.0039)'%20fill='%23BBDEFC'/%3e%3cpath%20d='M14.3685%2030.6746C15.7299%2027.6867%2018.9391%2025.9803%2022.1776%2026.5225L22.2595%2026.5475C23.7024%2026.8095%2024.3854%2024.8682%2023.1497%2024.2218C22.3806%2023.8074%2021.5613%2023.557%2020.717%2023.3884C17.3715%2022.9031%2014.0553%2024.6664%2012.6939%2027.6543C12.2796%2028.4235%2012.0859%2029.3497%2012.0244%2030.1372C11.8444%2031.6051%2013.8607%2032.0424%2014.4503%2030.6997C14.3434%2030.7566%2014.3685%2030.6746%2014.3685%2030.6746Z'%20fill='%23F6FBFF'/%3e%3cpath%20d='M10.2904%2029.0679C11.9436%2023.6607%2017.7202%2020.5893%2023.1274%2022.2424C25.6671%2023.0189%2027.5785%2024.6783%2028.9301%2026.704C27.7539%2024.1048%2025.508%2022.0744%2022.5586%2021.1727C17.1514%2019.5196%2011.3748%2022.591%209.72165%2027.9982C8.81993%2030.9476%209.32924%2033.97%2010.7444%2036.3735C9.82081%2034.1203%209.51395%2031.6077%2010.2904%2029.0679Z'%20fill='%23ADCBE7'/%3e%3cpath%20opacity='0.406087'%20d='M36.4864%2056.8021L36.1373%2056.2691C36.3845%2056.8563%2036.428%2057.5516%2036.2372%2058.1754C35.9273%2059.189%2034.5593%2059.1971%2034.0713%2058.2806L28.3787%2047.5877C28.0534%2046.9767%2027.3508%2046.7619%2026.7395%2047.0866L25.7206%2047.6277L31.4395%2059.3516C31.7648%2059.9627%2032.27%2060.5434%2032.8706%2060.8123C33.7054%2061.1528%2034.6593%2061.1034%2035.3726%2060.7247C36.0858%2060.3459%2036.6602%2059.5837%2036.8444%2058.7021C37.0351%2058.0783%2036.8117%2057.4132%2036.4864%2056.8021Z'%20fill='white'/%3e%3cpath%20d='M29.8826%2048.4977C29.8006%2048.4726%2029.6368%2048.4225%2029.5799%2048.3155L28.1579%2045.6411C28.0442%2045.4272%2028.1193%2045.1814%2028.3332%2045.0677C28.5472%2044.9539%2028.7929%2045.0291%2028.9067%2045.243L30.3287%2047.9174C30.4424%2048.1313%2030.3673%2048.3771%2030.1534%2048.4908C30.1284%2048.5728%2029.9645%2048.5227%2029.8826%2048.4977Z'%20fill='%23FFF5EB'/%3e%3cellipse%20cx='29.2637'%20cy='54.631'%20rx='1.50593'%20ry='3.17918'%20transform='rotate(-23%2029.2637%2054.631)'%20fill='%23FFC478'/%3e%3cellipse%20cx='34.0592'%20cy='52.4078'%20rx='0.920288'%20ry='1.67325'%20transform='rotate(106%2034.0592%2052.4078)'%20fill='%23FFC478'/%3e%3cpath%20d='M89.1282%2019.2055L68.2257%2026.8725L45.9197%2028.3898L44.4929%2016.4082C44.3371%2013.798%2047.5283%2011.4502%2050.9859%2011.6309L65.1429%2012.369L67.3969%2012.4869C68.5309%2012.5463%2069.7066%2012.3289%2070.7522%2011.8627L78.6899%208.34726C81.725%206.99992%2085.3012%207.87475%2086.2125%2010.1876L89.1282%2019.2055Z'%20fill='url(%23paint8_linear_8481_102191)'/%3e%3cpath%20opacity='0.479771'%20d='M88.6262%2019.0953L68.3101%2026.5288L65.3314%2012.5149L67.5211%2012.6263C68.6228%2012.6824%2069.7652%2012.471%2070.7816%2012.0192L78.4972%208.61266C81.4474%207.30707%2084.9208%208.14856%2085.8036%2010.3829L88.6262%2019.0953Z'%20fill='%23ADCBE7'/%3e%3cpath%20d='M91.6332%2026.6212L46.9517%2036.1186L46.0387%2028.4438L89.2535%2019.2582L91.6332%2026.6212Z'%20fill='%23717DAD'/%3e%3cpath%20d='M102.961%2024.2033C103.125%2024.9722%20102.371%2025.7829%20101.278%2026.015L37.9675%2039.4722C36.8754%2039.7043%2035.8568%2039.2704%2035.6933%2038.5015C35.5301%2037.7336%2036.284%2036.922%2037.3761%2036.6898L100.687%2023.2327C101.779%2023.0005%20102.798%2023.4354%20102.961%2024.2033Z'%20fill='%239ED1FF'/%3e%3cpath%20d='M102.703%2024.1718C102.838%2024.805%20102.067%2025.5045%20100.983%2025.7349L69.5583%2032.4144L69.0712%2030.123L100.496%2023.4436C101.58%2023.2131%20102.569%2023.5394%20102.703%2024.1718Z'%20fill='%2378AFE1'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_8481_102191'%20x1='32.2665'%20y1='59.6553'%20x2='59.0518'%20y2='60.5906'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FFFDE0'/%3e%3cstop%20offset='1'%20stop-color='%23FFB362'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_8481_102191'%20x1='67.3434'%20y1='85.966'%20x2='103.216'%20y2='78.3411'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FFFABC'/%3e%3cstop%20offset='1'%20stop-color='%23FFA650'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint2_linear_8481_102191'%20x1='51.4347'%20y1='74.8197'%20x2='91.1539'%20y2='74.8197'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A3C1FF'/%3e%3cstop%20offset='1'%20stop-color='%234243FF'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint3_linear_8481_102191'%20x1='55.1887'%20y1='89.2031'%20x2='94.9078'%20y2='89.2031'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A3C1FF'/%3e%3cstop%20offset='1'%20stop-color='%234243FF'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint4_linear_8481_102191'%20x1='94.5023'%20y1='53.1799'%20x2='106.762'%20y2='58.7056'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF9498'/%3e%3cstop%20offset='1'%20stop-color='%23FFD671'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint5_linear_8481_102191'%20x1='74.9906'%20y1='66.9871'%20x2='94.9778'%20y2='46.9999'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FFFDE0'/%3e%3cstop%20offset='1'%20stop-color='%23FFB362'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint6_linear_8481_102191'%20x1='50.5805'%20y1='44.0581'%20x2='59.9372'%20y2='44.0581'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='white'/%3e%3cstop%20offset='1'%20stop-color='%23E3EEF3'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint7_linear_8481_102191'%20x1='88.4187'%20y1='43.3906'%20x2='99.3981'%20y2='25.1833'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF9498'/%3e%3cstop%20offset='1'%20stop-color='%23FFD671'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint8_linear_8481_102191'%20x1='56.4985'%20y1='29.5482'%20x2='100.532'%20y2='20.1885'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23ECF7FF'/%3e%3cstop%20offset='1'%20stop-color='%23C2E0FF'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",rI=()=>u.jsxs(d.Box,{justifyItems:"center",marginTop:"40px",children:[u.jsx("img",{src:nI,width:124,height:107}),u.jsx(d.Typography,{variant:"body2",color:d.theme.palette.gray.gray3,children:SE})]}),oI=({searchResults:e,selectedObject:t,onReset:n,fetchCards:r})=>{const o=zt(),{sendTrackingEvent:s,currentSmIds:a}=w.useContext(Be),[i,c]=w.useState(null),l=ct(wE,{count:e.length.toString(),countSuffix:e.length>1?"s":"",searchObject:t.objectName,connectorName:t.connectorName}),f=(v,y)=>{s(T3,{search_keyword:t.label,search_result_label:y,sm_ids:a,connector_name:t.connectorName}),c({externalResourceId:v,formId:t.value.toString(),searchKeyword:t.label,searchResultLabel:y})},m=()=>{c(null),o(Q8())},b=()=>{n(),r(),m()};return e.length?i?u.jsx(tI,{meta:i,onBack:m,onLink:b}):u.jsxs(d.Stack,{gap:"14px",marginTop:"12px",children:[u.jsx(d.Typography,{variant:"body2",children:l}),u.jsx(d.Stack,{gap:"17px",children:e==null?void 0:e.map(({externalResourceId:v,name:y,description:p})=>u.jsxs(vp,{onClick:()=>f(v,y),direction:"row",children:[u.jsxs(d.Stack,{flexGrow:1,children:[u.jsx(d.Typography,{variant:"body2",color:d.theme.palette.gray.gray1,children:y}),u.jsx(d.Typography,{variant:"caption",color:d.theme.palette.gray.gray3,children:p})]}),u.jsx(d.Box,{alignSelf:"center",className:"search-item__chevron",width:"20px",height:"20px",children:u.jsx("img",{src:$E})})]},v))})]}):u.jsx(rI,{})},$c=d.styled(d.Skeleton)`
1295
1294
  display: block;
1296
1295
  margin: ${e=>e.margin?e.margin:0};
1297
- `,sI=()=>u.jsxs(d.Stack,{marginTop:"12px",children:[u.jsx(qc,{variant:"rounded",width:"50%",height:"16px",animation:"wave",margin:"0 0 18px 0"}),u.jsx(d.Stack,{gap:"17px",children:u.jsxs(vp,{gap:"8px",disableHover:!0,children:[u.jsx(qc,{variant:"rounded",width:"30%",height:"16px",animation:"wave"}),u.jsx(qc,{variant:"rounded",width:"70%",height:"16px",animation:"wave"})]})})]});let $c={};const Qc=new Set,aI=(e,t)=>{$c={...$c,[e]:t},Qc.forEach(n=>n())},iI=e=>(Qc.add(e),()=>Qc.delete(e)),cI=e=>w.useSyncExternalStore(iI,()=>$c)[e],lI=async({id:e,searchString:t,args:n})=>{try{if(e===void 0||t===void 0)return[];const r=await we({url:ZE.replace(":formId",e.toString()),method:Me.POST,data:{search_string:t,args:n}});let o=null;return r!=null&&r.data&&"data"in r.data&&(o=r.data.data),o}catch(r){_e({message:xn,type:Je}),console.error(r)}},uI=(e,t)=>tn({mutationFn:lI,onMutate:({searchString:n,connectorName:r})=>{e(n,r)},onSuccess:(n,{searchString:r,connectorName:o})=>{t(r,n,o)}}),Uc={OPEN_FORM_VIEW:"connector-agent-open-form-view"},dI=(e,t={})=>{const{delayAfterLoad:n=1e3}=t,r=w.useRef(!1),o=w.useRef(void 0),s=w.useCallback((c="auto")=>{const l=e.current;l&&l.scrollIntoView({behavior:c})},[e]),a=w.useCallback((c,l="smooth")=>{r.current||(o.current!==void 0&&clearTimeout(o.current),c&&(o.current=setTimeout(()=>{s(l),r.current=!0},n)))},[s,n]),i=w.useCallback(()=>{r.current=!1,o.current!==void 0&&clearTimeout(o.current)},[]);return w.useEffect(()=>()=>{o.current!==void 0&&clearTimeout(o.current)},[]),{scrollOnceAfterLoad:a,resetScrollState:i,hasScrolledOnce:r.current}},fI=e=>T.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.86993 0.652446C7.56922 0.248711 8.43078 0.248711 9.13007 0.652446L13.7981 3.34755C14.4974 3.75129 14.9282 4.49742 14.9282 5.30489V10.6951C14.9282 11.5026 14.4974 12.2487 13.7981 12.6524L9.13007 15.3476C8.43078 15.7513 7.56922 15.7513 6.86993 15.3476L2.20187 12.6524C1.50258 12.2487 1.0718 11.5026 1.0718 10.6951V5.30489C1.0718 4.49742 1.50258 3.75129 2.20187 3.34755L6.86993 0.652446Z",fill:"#FFD122"}),T.createElement("g",{filter:"url(#filter0_d_360_39563)"},T.createElement("path",{d:"M5.83154 4.43359V4.43359C6.84296 4.43359 7.66287 5.25351 7.66287 6.26492V11.5179V11.5179C6.65146 11.5179 5.83154 10.698 5.83154 9.68661V4.43359Z",fill:"white"})),T.createElement("g",{filter:"url(#filter1_d_360_39563)"},T.createElement("path",{d:"M8.57812 7.66211V7.66211C9.58954 7.66211 10.4095 8.48202 10.4095 9.49343V11.7103V11.7103C9.39804 11.7103 8.57812 10.8904 8.57812 9.87898V7.66211Z",fill:"white"})),T.createElement("defs",null,T.createElement("filter",{id:"filter0_d_360_39563",x:4.76488,y:3.36693,width:3.96488,height:9.21732,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},T.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),T.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),T.createElement("feOffset",null),T.createElement("feGaussianBlur",{stdDeviation:.533333}),T.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.114019 0"}),T.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_360_39563"}),T.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_360_39563",result:"shape"})),T.createElement("filter",{id:"filter1_d_360_39563",x:7.51146,y:6.59544,width:3.96488,height:6.18216,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},T.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),T.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),T.createElement("feOffset",null),T.createElement("feGaussianBlur",{stdDeviation:.533333}),T.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.114019 0"}),T.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_360_39563"}),T.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_360_39563",result:"shape"})))),pI="/v1/api/connectors/lookup/bulk",hI="/v1/api/connectors/lookup/bulk",gI=async e=>{const t=new URLSearchParams;e.forEach(o=>t.append("connector_ids",o));const n=`${pI}?${t.toString()}`,r=await we({url:n,method:Me.GET});return r==null?void 0:r.data},mI=async e=>{const t=await we({url:hI,method:Me.PUT,data:{entries:e}});return t==null?void 0:t.data},bI={fontSize:"14px",width:"209px",height:"40px",background:"#F6F8FC",borderRadius:"8px",fontWeight:400,"& .MuiOutlinedInput-notchedOutline":{borderColor:"#ECEFF6"}},yI={border:`1px solid ${d.theme.palette.gray.gray5}`,borderRadius:"8px",padding:"12px"},Ep={flex:1,height:"1px",backgroundColor:d.theme.palette.gray.gray6},CI={flexShrink:0,border:`1px solid ${d.theme.palette.gray.gray6}`,borderRadius:"15px"},xI={border:`1px solid ${d.theme.palette.gray.gray6}`,backgroundColor:d.theme.palette.gray.gray6a,borderRadius:"8px",padding:"8px 10px"},vI=w.memo(function({connector:t,selectedHiverParam:n,onChange:r,sendTrackingEvent:o}){var i;const s=((i=(t.presets??[]).find(c=>c.hiverParam===n))==null?void 0:i.objectParamLabel)??"",a=w.useCallback(c=>{o(M3,{hiver_param:c.target.value,connector_name:t.connectorName,page:"agent_connector_panel"}),r(t.connectorId,c.target.value)},[t.connectorId,t.connectorName,r,o]);return u.jsxs(d.Stack,{direction:"row",alignItems:"center",gap:"0px",justifyContent:"space-between",children:[u.jsx(d.Select,{value:n,onChange:a,size:"small",variant:"outlined",sx:bI,MenuProps:{sx:{zIndex:1500}},renderValue:c=>{var f;const l=((f=(t.presets??[]).find(m=>m.hiverParam===c))==null?void 0:f.label)??"";return u.jsxs(d.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[u.jsx(fI,{width:18,height:18}),u.jsx("span",{children:l})]})},children:(t.presets??[]).map(c=>u.jsx(d.MenuItem,{value:c.hiverParam,sx:{fontSize:"14px"},children:c.label},c.hiverParam))}),u.jsx(d.Box,{sx:Ep}),u.jsxs(d.Stack,{direction:"row",alignItems:"center",gap:"4px",padding:"4px 12px",sx:CI,children:[t.logo&&u.jsx("img",{src:t.logo,width:16,height:16,alt:t.connectorName}),u.jsxs(d.Typography,{variant:"body2",color:d.theme.palette.gray.gray3,children:["Matches with ",t.connectorName,"'s"]})]}),u.jsx(d.Box,{sx:Ep}),u.jsx(d.Box,{sx:xI,children:u.jsx(d.Typography,{variant:"body2",fontSize:14,children:s})})]})}),EI=w.memo(function({open:t,onClose:n,connectors:r,onSaveSuccess:o}){const{sendTrackingEvent:s}=w.useContext(Be),[a,i]=w.useState({});w.useEffect(()=>{if(t&&r.length>0){const y={};r.filter(p=>{var h;return((h=p.presets)==null?void 0:h.length)>1}).forEach(p=>{y[p.connectorId]=p.hiverParam}),i(y)}},[t,r]);const c=Io(),{mutate:l,isPending:f}=tn({mutationFn:mI,onSuccess:y=>{const p={};y.results.forEach(({connectorId:h,hiverParam:g})=>{p[h]=g}),c.setQueriesData({queryKey:["lookup","bulk"]},h=>h&&{...h,connectors:h.connectors.map(g=>p[g.connectorId]!==void 0?{...g,hiverParam:p[g.connectorId]}:g)}),s(P3,{page:"agent_connector_panel"}),_e({message:"Identity mapping saved successfully",type:"success"}),o==null||o(),n()},onError:()=>{_e({message:"Failed to save identity mapping",type:"error"})}}),m=w.useCallback(()=>{const y=Object.entries(a).map(([p,h])=>({connector_id:p,hiver_param:h}));l(y)},[a,l]),b=w.useCallback((y,p)=>{i(h=>({...h,[y]:p}))},[]),v=w.useCallback(y=>{y||n()},[n]);return u.jsx(fr,{shown:t,setShown:v,showCloseButton:!1,children:u.jsxs(d.Stack,{padding:"24px 20px",gap:"16px",sx:{minWidth:"800px"},children:[u.jsx(d.Typography,{variant:"h2",children:"Customer identity mapping"}),u.jsx(d.Typography,{variant:"body2",children:"Choose how Hiver should identify customers when fetching data from connected apps."}),r.some(y=>{var p;return((p=y.presets)==null?void 0:p.length)>1})&&u.jsx(d.Stack,{gap:"8px",sx:yI,children:r.filter(y=>{var p;return((p=y.presets)==null?void 0:p.length)>1}).map(y=>u.jsx(vI,{connector:y,selectedHiverParam:a[y.connectorId]??y.hiverParam,onChange:b,sendTrackingEvent:s},y.connectorId))}),u.jsxs(d.Stack,{direction:"row",justifyContent:"flex-end",gap:"8px",children:[u.jsx(d.Button,{variant:"text",onClick:n,children:"Cancel"}),u.jsx(d.Button,{variant:"contained",onClick:m,disabled:f,children:"Save"})]})]})})}),II=({enabled:e,...t})=>{const{actionQueue:n}=w.useContext(Be);n&&e&&n.register(t),w.useEffect(()=>{if(n)return()=>{n.destroy()}},[n,e])},wI=({isAdmin:e=!1})=>{var Q,fe;const{email:t,currentSmIds:n,sendTrackingEvent:r,availableFeatures:o,conversationId:s}=w.useContext(Be),a=zt(),{userGroupId:i,userId:c}=Xt()||{},l=w.useRef(!1),f=w.useRef(null),m=w.useRef(null),b=w.useRef(null),[v,y]=w.useState({}),[p,h]=w.useState(!1),[g,C]=w.useState(!1),[x,I]=w.useState(!1),[E,_]=w.useState(!1),[A,S]=w.useState(),[L,k]=w.useState(!1),[D,N]=w.useState(null),[M,V]=w.useState(),[J,$]=w.useState(null),[H,X]=w.useState(!1),[q,se]=w.useState(!1),[de,B]=w.useState(!1),P=Ce(kx),W=Ce(Dx),G=Ce(Rx),Y=Ce(Mx),oe=Ce(jx),re=Ce(Nx),j=Ce(Z1),te=Ce(Qx),Ee=Ce(X1),z=Ce(z1),Ve=Ce(Y1),Ne=Ce(eE),Ue=et(o,B3),kt=et(o,hd),gn=et(o,X3),vt=et(o,Y3),Ze=et(o,J3),Xe=et(o,q3),Xn=(Q=Xt())==null?void 0:Q.tenantPlatform,at=et(o,Xn==="HIVERWEB"?`hot-${gd}`:gd),{data:Ut}=Tn({queryKey:["connectors","enabledAuthenticated"],queryFn:My,enabled:at&&e}),zn=w.useMemo(()=>(Ut??[]).map(ee=>ee.id),[Ut]),{data:Kt,isSuccess:Er}=Tn({queryKey:["lookup","bulk",zn.join(",")],queryFn:()=>gI(zn),enabled:zn.length>0&&at&&e,refetchOnMount:!1}),mn=Er&&((Kt==null?void 0:Kt.connectors)??[]).some(ee=>{var ie;return(((ie=ee.presets)==null?void 0:ie.length)??0)>1});II({conversationId:s,openCreateForm:()=>I(!0),enabled:W});const Ir=w.useMemo(()=>!P||!P.length?null:Hx(P,G,Y),[P,G,Y]),wr=f5(G),{data:ho,isLoading:_n}=Cp({senderEmail:t,conversationId:String(s),enabled:vt&&!!t}),{emailHeaders:go,selectedEmail:_r}=ho??{},{scrollOnceAfterLoad:pe,resetScrollState:Ie}=dI(m),Ke=re!==K.LOADING&&(!Y||!Object.values(Y).some(ee=>ee===K.LOADING))&&P&&P.length>0;w.useLayoutEffect(()=>{var ee;H&&!p&&q&&((ee=b==null?void 0:b.current)!=null&&ee.scrollHeight)&&pe(!!Ke,"smooth")},[H,p,q,Ke,pe,(fe=b==null?void 0:b.current)==null?void 0:fe.scrollHeight,c]);const dt=(ee,ie)=>{r(_3,{search_keyword:ee,sm_ids:n,connector_name:ie,suggestion_type:Ne})},Et=(ee,ie,he)=>{!Array.isArray(ie)||!ie.length?r(S3,{search_keyword:ee,sm_ids:n,connector_name:he,suggestion_type:Ne}):ie.length&&r(A3,{num_of_results:ie.length,search_keyword:ee,sm_ids:n,connector_name:he,suggestion_type:Ne})},{mutate:en,reset:Pt,data:Dt,isPending:jt,isIdle:Sr}=uI(dt,Et),Ar=w.useCallback(()=>{Pt(),N(null)},[Pt,N]),Tr=Io(),ft=w.useCallback(()=>{t&&n.length&&s&&a(La({inboxIds:n,conversationId:s}))},[a,t,n,s]),dl=w.useCallback(()=>{Tr.invalidateQueries({queryKey:["lookup","bulk"]}),ft()},[Tr,ft]),es=w.useCallback((ee,ie)=>{ee&&s&&ie&&a(Ta({id:ee,channelType:"email",conversationId:s,externalResourceId:ie,contactEmail:t})).unwrap().catch(()=>{a(Qr(null))})},[a,s,t]);if(w.useEffect(()=>{(async()=>{c&&(X(await fi(c)),se(await lu(c)))})()},[c]),w.useEffect(()=>{_n||V(_r||t)},[t,_r,_n]),w.useEffect(()=>{M&&s&&aI(String(s),M)},[M,s]),w.useEffect(()=>{q&&c&&uu(c)},[q,c]),w.useEffect(()=>{var ee;if(z){C(!0);const{externalResourceId:ie}=z,he=(ee=z.forms.find(me=>me.type==="edit"))==null?void 0:ee.id;es(he,ie)}else C(!1),a(Ax())},[z,es,a]),w.useEffect(()=>(ft(),Ie(),()=>{a(H1.clearConnectorList())}),[a,ft,Ie]),w.useEffect(()=>{if(oe&&P&&P.length&&Ir&&!l.current){const{cards_per_app:ee,total_empty_cards:ie,total_cards_with_errors:he}=Ir;r(Km,{numOfCards:P.length,total_cards_loaded:P.length,total_empty_cards:ie,total_cards_with_errors:he,cards_per_app:ee,sm_ids:n}),l.current=!0}return()=>{l.current=!1}},[oe,P,Ir,r,n]),w.useEffect(()=>{s&&n&&n.length&&a(Ia({inboxIds:n,conversationId:s,channelType:"email",isExpandedFormEnabled:Xe}))},[a,n,s,Xe]),w.useEffect(()=>{const ee=ie=>{var me;if(!(ie instanceof CustomEvent))return;const he=(me=ie.detail)==null?void 0:me.connectorKey;y({connectorKey:he})};return window.addEventListener(Uc.OPEN_FORM_VIEW,ee),()=>{window.removeEventListener(Uc.OPEN_FORM_VIEW,ee)}},[]),w.useEffect(()=>{if(!(j!=null&&j.length)||!v.connectorKey)return;const ee=v.connectorKey;y({});const ie=j.find(he=>{var me;return((me=he.connectorKey)==null?void 0:me.toLowerCase())===(ee==null?void 0:ee.toLowerCase())});ie&&($(ie),I(!0))},[j,v]),!t.length||re===K.LOADING)return u.jsx(Bv,{});const Ra=ee=>{r(o3,{connector_name:te,source:ee,sm_ids:n})},Ma=ee=>{I(!0),Ra(ee)},fl=()=>{_(!0),r(s3)},ts=ee=>{r(ee,A),Ve?k(!0):(I(!1),$(null))},ns=ee=>{if(z){const{connectorName:ie,title:he}=z;r(ee,{connector_name:ie,card_title:he,sm_ids:n,ug_id:i})}Ve?k(!0):a(Qr(null))},pl=()=>{I(!1),a(Qr(null)),S(void 0),k(!1)},Pa=()=>{ft(),a(H1.clearConnectorList())},hl=[{label:"Go back",variant:"text",action:pl},{label:"Stay",variant:"contained",action:()=>k(!1)}],rs=j.length>0,O=Ee.length>0,Z=()=>rs||O?u.jsx(mE,{haveCreateObjects:rs,haveLinkObjects:O,onCreateClick:()=>Ma(Ad.MAIN_BUTTON),onLinkClick:()=>_(!0)}):u.jsx($1,{isAdmin:e,hideHeading:!0});return u.jsxs(Pd,{ref:f,"data-testid":Array.isArray(P)?"connector-agent":"loading",id:"connector-agent-container",stopOverflow:x||E,children:[u.jsx(ip,{shown:L,setShown:k,title:Cx,description:xx,buttons:hl}),u.jsx(X5,{onWheel:()=>h(!0),ref:b,children:W?u.jsxs(u.Fragment,{children:[u.jsx(I4,{connectors:wr,isWriteFlowEnabled:kt,haveCreateObjects:rs,haveLinkObjects:O,cards:P,handleCreateNewObject:()=>Ma(Ad.ICON),handleLinkNewObject:fl}),gn?u.jsx(qE,{selectedObject:D,setSelectedObject:N,fetchSearchResults:en,onReset:Ar,root:f.current}):null,u.jsxs(Ur,{children:[u.jsx(Kr,{condition:gn&&jt,children:u.jsx(sI,{})},"search"),u.jsx(Kr,{condition:gn&&!!D&&!Sr,children:u.jsx(oI,{searchResults:Dt??[],selectedObject:D,onReset:Ar,fetchCards:ft})},"results"),u.jsxs(Kr,{fallback:!0,children:[vt&&(P!=null&&P.length)?u.jsxs(d.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[u.jsx(d.Stack,{sx:{flex:1,minWidth:0},children:u.jsx(qv,{emailHeaders:go,selectedEmail:M,root:f.current,isLoading:_n,setSelectedEmail:V})}),at&&mn&&e&&u.jsx(d.Tooltip,{title:"Update customer identity mapping",placement:"top",children:u.jsx(d.IconButton,{"aria-label":"Open customer identity mapping settings",sx:{height:"32px",width:"32px",marginTop:"12px",flexShrink:0},onClick:()=>{r(pd,{page:"agent_connector_panel"}),B(!0)},children:u.jsx(d.icons.SettingsOutlined,{sx:{height:"20px",width:"20px"}})})})]}):null,!vt&&at&&mn&&e&&(P!=null&&P.length)?u.jsx(d.Button,{fullWidth:!0,variant:"contained",startIcon:u.jsx(d.icons.SettingsOutlined,{sx:{height:"14px",width:"14px"}}),sx:{backgroundColor:"#edf1f6",color:"#4d596c",borderRadius:"6px",padding:"9px 12px",marginTop:"12px",textTransform:"none",fontWeight:500,fontSize:"14px",lineHeight:"20px",boxShadow:"none","&:hover":{backgroundColor:"#e2e8f0",boxShadow:"none"}},onClick:()=>{r(pd,{page:"agent_connector_panel"}),B(!0)},children:"Customer identity mapping"}):null,Ue?u.jsx(Vv,{}):null,u.jsxs(Ur,{children:[u.jsxs(Kr,{condition:!!P&&P.length>0,children:[u.jsx(hv,{cards:P,specificCardData:G,email:M??"",specificConnectorApiStatus:Y,onCardUnlinking:ft}),u.jsx("div",{ref:m,children:Ze?u.jsx(w5,{connectors:wr,expanded:H}):null})]},"cards-list"),u.jsx(Kr,{condition:!(P!=null&&P.length)&&kt,children:Z()},"create-banner")]})]},"cards")]})]}):u.jsx($1,{isAdmin:e})}),u.jsx(zc,{onClose:()=>ns(y3),isOpen:g,setIsOpen:C,title:o5,portalId:"connector-layover-portal",backButtonTooltip:"Back",children:u.jsx(lp,{isEdit:!0,onClose:()=>ns(b3),onCreateSuccess:Pa,metaData:A,setMetaData:S})}),u.jsx(zc,{onClose:()=>ts(d3),portalId:"connector-layover-portal",isOpen:x,setIsOpen:I,children:u.jsx(lp,{onClose:()=>ts(u3),onCreateSuccess:Pa,metaData:A,setMetaData:S,defaultOption:J})}),u.jsx(zc,{onClose:()=>_(!1),portalId:"connector-layover-portal",isOpen:E,setIsOpen:_,children:u.jsx(dE,{setOpenTaskLinking:_,onLinkingSuccess:ft})}),!W&&u.jsx(M5,{}),at&&u.jsx(EI,{open:de,onClose:()=>B(!1),connectors:(Kt==null?void 0:Kt.connectors)??[],onSaveSuccess:dl})]})},_I=({children:e,sendTrackingEvent:t,contactEmail:n,baseUrls:r={},currentSmIds:o=[],userEmail:s,metaData:a,availableFeatures:i,conversationId:c,connectorFunctions:l,stackingContext:f,isAdmin:m=!1,actionQueue:b})=>{const v=w.useMemo(()=>({userEmail:s,email:n,baseUrls:r,currentSmIds:o,metaData:a,conversationId:c,sendTrackingEvent:t||(()=>{}),availableFeatures:i,isAdmin:m,connectorFunctions:l,stackingContext:f,actionQueue:b}),[s,n,r,t,o,a,i,c,m,l,f,b]);return u.jsx(Be.Provider,{value:v,children:e})},Kc=({children:e})=>{const[t]=w.useState(()=>new L2);return u.jsx(N2,{client:t,children:e})},SI=Kd({cardList:Jx,write:Tx,common:K8}),el=Wb({reducer:SI,devTools:!0}),AI=({children:e,userEmail:t,extraParams:n,contactEmail:r,baseUrls:o,availableFeatures:s,connectorFunctions:a,stackingContext:i,actionQueue:c})=>u.jsx(Qi,{store:el,children:u.jsx(d.HiverProvider,{custom:!0,children:u.jsx(Kc,{children:u.jsx(_I,{userEmail:t,availableFeatures:s,sendTrackingEvent:n==null?void 0:n.sendTrackingEvent,contactEmail:r,currentSmIds:n==null?void 0:n.currentSmIds,metaData:n==null?void 0:n.metaData,conversationId:n==null?void 0:n.conversationId,baseUrls:o,connectorFunctions:a,stackingContext:i,actionQueue:c,isAdmin:n==null?void 0:n.isAdmin,children:u.jsx(w.Suspense,{fallback:u.jsx(u.Fragment,{}),children:e})})})})}),tl=d.styled(d.Box)`
1296
+ `,sI=()=>u.jsxs(d.Stack,{marginTop:"12px",children:[u.jsx($c,{variant:"rounded",width:"50%",height:"16px",animation:"wave",margin:"0 0 18px 0"}),u.jsx(d.Stack,{gap:"17px",children:u.jsxs(vp,{gap:"8px",disableHover:!0,children:[u.jsx($c,{variant:"rounded",width:"30%",height:"16px",animation:"wave"}),u.jsx($c,{variant:"rounded",width:"70%",height:"16px",animation:"wave"})]})})]});let Qc={};const Uc=new Set,aI=(e,t)=>{Qc={...Qc,[e]:t},Uc.forEach(n=>n())},iI=e=>(Uc.add(e),()=>Uc.delete(e)),cI=e=>w.useSyncExternalStore(iI,()=>Qc)[e],lI=async({id:e,searchString:t,args:n})=>{try{if(e===void 0||t===void 0)return[];const r=await we({url:ZE.replace(":formId",e.toString()),method:Me.POST,data:{search_string:t,args:n}});let o=null;return r!=null&&r.data&&"data"in r.data&&(o=r.data.data),o}catch(r){_e({message:xn,type:Je}),console.error(r)}},uI=(e,t)=>tn({mutationFn:lI,onMutate:({searchString:n,connectorName:r})=>{e(n,r)},onSuccess:(n,{searchString:r,connectorName:o})=>{t(r,n,o)}}),Kc={OPEN_FORM_VIEW:"connector-agent-open-form-view"},dI=(e,t={})=>{const{delayAfterLoad:n=1e3}=t,r=w.useRef(!1),o=w.useRef(void 0),s=w.useCallback((c="auto")=>{const l=e.current;l&&l.scrollIntoView({behavior:c})},[e]),a=w.useCallback((c,l="smooth")=>{r.current||(o.current!==void 0&&clearTimeout(o.current),c&&(o.current=setTimeout(()=>{s(l),r.current=!0},n)))},[s,n]),i=w.useCallback(()=>{r.current=!1,o.current!==void 0&&clearTimeout(o.current)},[]);return w.useEffect(()=>()=>{o.current!==void 0&&clearTimeout(o.current)},[]),{scrollOnceAfterLoad:a,resetScrollState:i,hasScrolledOnce:r.current}},fI=e=>T.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.86993 0.652446C7.56922 0.248711 8.43078 0.248711 9.13007 0.652446L13.7981 3.34755C14.4974 3.75129 14.9282 4.49742 14.9282 5.30489V10.6951C14.9282 11.5026 14.4974 12.2487 13.7981 12.6524L9.13007 15.3476C8.43078 15.7513 7.56922 15.7513 6.86993 15.3476L2.20187 12.6524C1.50258 12.2487 1.0718 11.5026 1.0718 10.6951V5.30489C1.0718 4.49742 1.50258 3.75129 2.20187 3.34755L6.86993 0.652446Z",fill:"#FFD122"}),T.createElement("g",{filter:"url(#filter0_d_360_39563)"},T.createElement("path",{d:"M5.83154 4.43359V4.43359C6.84296 4.43359 7.66287 5.25351 7.66287 6.26492V11.5179V11.5179C6.65146 11.5179 5.83154 10.698 5.83154 9.68661V4.43359Z",fill:"white"})),T.createElement("g",{filter:"url(#filter1_d_360_39563)"},T.createElement("path",{d:"M8.57812 7.66211V7.66211C9.58954 7.66211 10.4095 8.48202 10.4095 9.49343V11.7103V11.7103C9.39804 11.7103 8.57812 10.8904 8.57812 9.87898V7.66211Z",fill:"white"})),T.createElement("defs",null,T.createElement("filter",{id:"filter0_d_360_39563",x:4.76488,y:3.36693,width:3.96488,height:9.21732,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},T.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),T.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),T.createElement("feOffset",null),T.createElement("feGaussianBlur",{stdDeviation:.533333}),T.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.114019 0"}),T.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_360_39563"}),T.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_360_39563",result:"shape"})),T.createElement("filter",{id:"filter1_d_360_39563",x:7.51146,y:6.59544,width:3.96488,height:6.18216,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},T.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),T.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),T.createElement("feOffset",null),T.createElement("feGaussianBlur",{stdDeviation:.533333}),T.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.114019 0"}),T.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_360_39563"}),T.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_360_39563",result:"shape"})))),pI="/v1/api/connectors/lookup/bulk",hI="/v1/api/connectors/lookup/bulk",gI=async e=>{const t=new URLSearchParams;e.forEach(o=>t.append("connector_ids",o));const n=`${pI}?${t.toString()}`,r=await we({url:n,method:Me.GET});return r==null?void 0:r.data},mI=async e=>{const t=await we({url:hI,method:Me.PUT,data:{entries:e}});return t==null?void 0:t.data},bI={fontSize:"14px",width:"209px",height:"40px",background:"#F6F8FC",borderRadius:"8px",fontWeight:400,"& .MuiOutlinedInput-notchedOutline":{borderColor:"#ECEFF6"}},yI={border:`1px solid ${d.theme.palette.gray.gray5}`,borderRadius:"8px",padding:"12px"},Ep={flex:1,height:"1px",backgroundColor:d.theme.palette.gray.gray6},CI={flexShrink:0,border:`1px solid ${d.theme.palette.gray.gray6}`,borderRadius:"15px"},xI={border:`1px solid ${d.theme.palette.gray.gray6}`,backgroundColor:d.theme.palette.gray.gray6a,borderRadius:"8px",padding:"8px 10px"},vI=w.memo(function({connector:t,selectedHiverParam:n,onChange:r,sendTrackingEvent:o}){var i;const s=((i=(t.presets??[]).find(c=>c.hiverParam===n))==null?void 0:i.objectParamLabel)??"",a=w.useCallback(c=>{o(M3,{hiver_param:c.target.value,connector_name:t.connectorName,page:"agent_connector_panel"}),r(t.connectorId,c.target.value)},[t.connectorId,t.connectorName,r,o]);return u.jsxs(d.Stack,{direction:"row",alignItems:"center",gap:"0px",justifyContent:"space-between",children:[u.jsx(d.Select,{value:n,onChange:a,size:"small",variant:"outlined",sx:bI,MenuProps:{sx:{zIndex:1500}},renderValue:c=>{var f;const l=((f=(t.presets??[]).find(m=>m.hiverParam===c))==null?void 0:f.label)??"";return u.jsxs(d.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[u.jsx(fI,{width:18,height:18}),u.jsx("span",{children:l})]})},children:(t.presets??[]).map(c=>u.jsx(d.MenuItem,{value:c.hiverParam,sx:{fontSize:"14px"},children:c.label},c.hiverParam))}),u.jsx(d.Box,{sx:Ep}),u.jsxs(d.Stack,{direction:"row",alignItems:"center",gap:"4px",padding:"4px 12px",sx:CI,children:[t.logo&&u.jsx("img",{src:t.logo,width:16,height:16,alt:t.connectorName}),u.jsxs(d.Typography,{variant:"body2",color:d.theme.palette.gray.gray3,children:["Matches with ",t.connectorName,"'s"]})]}),u.jsx(d.Box,{sx:Ep}),u.jsx(d.Box,{sx:xI,children:u.jsx(d.Typography,{variant:"body2",fontSize:14,children:s})})]})}),EI=w.memo(function({open:t,onClose:n,connectors:r,onSaveSuccess:o}){const{sendTrackingEvent:s}=w.useContext(Be),[a,i]=w.useState({});w.useEffect(()=>{if(t&&r.length>0){const y={};r.filter(p=>{var h;return((h=p.presets)==null?void 0:h.length)>1}).forEach(p=>{y[p.connectorId]=p.hiverParam}),i(y)}},[t,r]);const c=Io(),{mutate:l,isPending:f}=tn({mutationFn:mI,onSuccess:y=>{const p={};y.results.forEach(({connectorId:h,hiverParam:g})=>{p[h]=g}),c.setQueriesData({queryKey:["lookup","bulk"]},h=>h&&{...h,connectors:h.connectors.map(g=>p[g.connectorId]!==void 0?{...g,hiverParam:p[g.connectorId]}:g)}),s(P3,{page:"agent_connector_panel"}),_e({message:"Identity mapping saved successfully",type:"success"}),o==null||o(),n()},onError:()=>{_e({message:"Failed to save identity mapping",type:"error"})}}),m=w.useCallback(()=>{const y=Object.entries(a).map(([p,h])=>({connector_id:p,hiver_param:h}));l(y)},[a,l]),b=w.useCallback((y,p)=>{i(h=>({...h,[y]:p}))},[]),v=w.useCallback(y=>{y||n()},[n]);return u.jsx(fr,{shown:t,setShown:v,showCloseButton:!1,children:u.jsxs(d.Stack,{padding:"24px 20px",gap:"16px",sx:{minWidth:"800px"},children:[u.jsx(d.Typography,{variant:"h2",children:"Customer identity mapping"}),u.jsx(d.Typography,{variant:"body2",children:"Choose how Hiver should identify customers when fetching data from connected apps."}),r.some(y=>{var p;return((p=y.presets)==null?void 0:p.length)>1})&&u.jsx(d.Stack,{gap:"8px",sx:yI,children:r.filter(y=>{var p;return((p=y.presets)==null?void 0:p.length)>1}).map(y=>u.jsx(vI,{connector:y,selectedHiverParam:a[y.connectorId]??y.hiverParam,onChange:b,sendTrackingEvent:s},y.connectorId))}),u.jsxs(d.Stack,{direction:"row",justifyContent:"flex-end",gap:"8px",children:[u.jsx(d.Button,{variant:"text",onClick:n,children:"Cancel"}),u.jsx(d.Button,{variant:"contained",onClick:m,disabled:f,children:"Save"})]})]})})}),II=({enabled:e,...t})=>{const{actionQueue:n}=w.useContext(Be);n&&e&&n.register(t),w.useEffect(()=>{if(n)return()=>{n.destroy()}},[n,e])},wI=({isAdmin:e=!1})=>{var Q,fe;const{email:t,currentSmIds:n,sendTrackingEvent:r,availableFeatures:o,conversationId:s}=w.useContext(Be),a=zt(),{userGroupId:i,userId:c}=Xt()||{},l=w.useRef(!1),f=w.useRef(null),m=w.useRef(null),b=w.useRef(null),[v,y]=w.useState({}),[p,h]=w.useState(!1),[g,C]=w.useState(!1),[x,I]=w.useState(!1),[E,_]=w.useState(!1),[A,S]=w.useState(),[L,k]=w.useState(!1),[D,N]=w.useState(null),[M,V]=w.useState(),[J,$]=w.useState(null),[H,X]=w.useState(!1),[q,se]=w.useState(!1),[de,B]=w.useState(!1),P=Ce(kx),W=Ce(Dx),G=Ce(Rx),Y=Ce(Mx),oe=Ce(jx),re=Ce(Nx),j=Ce(Z1),te=Ce(Qx),Ee=Ce(X1),z=Ce(z1),Ve=Ce(Y1),Ne=Ce(eE),Ue=et(o,B3),kt=et(o,gd),gn=et(o,X3),vt=et(o,Y3),Ze=et(o,J3),Xe=et(o,q3),Xn=(Q=Xt())==null?void 0:Q.tenantPlatform,at=et(o,Xn==="HIVERWEB"?`hot-${md}`:md),{data:Ut}=Tn({queryKey:["connectors","enabledAuthenticated"],queryFn:My,enabled:at&&e}),zn=w.useMemo(()=>(Ut??[]).map(ee=>ee.id),[Ut]),{data:Kt,isSuccess:Er}=Tn({queryKey:["lookup","bulk",zn.join(",")],queryFn:()=>gI(zn),enabled:zn.length>0&&at&&e,refetchOnMount:!1}),mn=Er&&((Kt==null?void 0:Kt.connectors)??[]).some(ee=>{var ie;return(((ie=ee.presets)==null?void 0:ie.length)??0)>1});II({conversationId:s,openCreateForm:()=>I(!0),enabled:W});const Ir=w.useMemo(()=>!P||!P.length?null:Hx(P,G,Y),[P,G,Y]),wr=f5(G),{data:ho,isLoading:_n}=Cp({senderEmail:t,conversationId:String(s),enabled:vt&&!!t}),{emailHeaders:go,selectedEmail:_r}=ho??{},{scrollOnceAfterLoad:pe,resetScrollState:Ie}=dI(m),Ke=re!==K.LOADING&&(!Y||!Object.values(Y).some(ee=>ee===K.LOADING))&&P&&P.length>0;w.useLayoutEffect(()=>{var ee;H&&!p&&q&&((ee=b==null?void 0:b.current)!=null&&ee.scrollHeight)&&pe(!!Ke,"smooth")},[H,p,q,Ke,pe,(fe=b==null?void 0:b.current)==null?void 0:fe.scrollHeight,c]);const dt=(ee,ie)=>{r(_3,{search_keyword:ee,sm_ids:n,connector_name:ie,suggestion_type:Ne})},Et=(ee,ie,he)=>{!Array.isArray(ie)||!ie.length?r(S3,{search_keyword:ee,sm_ids:n,connector_name:he,suggestion_type:Ne}):ie.length&&r(A3,{num_of_results:ie.length,search_keyword:ee,sm_ids:n,connector_name:he,suggestion_type:Ne})},{mutate:en,reset:Pt,data:Dt,isPending:jt,isIdle:Sr}=uI(dt,Et),Ar=w.useCallback(()=>{Pt(),N(null)},[Pt,N]),Tr=Io(),ft=w.useCallback(()=>{t&&n.length&&s&&a(La({inboxIds:n,conversationId:s}))},[a,t,n,s]),fl=w.useCallback(()=>{Tr.invalidateQueries({queryKey:["lookup","bulk"]}),ft()},[Tr,ft]),es=w.useCallback((ee,ie)=>{ee&&s&&ie&&a(Ta({id:ee,channelType:"email",conversationId:s,externalResourceId:ie,contactEmail:t})).unwrap().catch(()=>{a(Qr(null))})},[a,s,t]);if(w.useEffect(()=>{(async()=>{c&&(X(await fi(c)),se(await uu(c)))})()},[c]),w.useEffect(()=>{_n||V(_r||t)},[t,_r,_n]),w.useEffect(()=>{M&&s&&aI(String(s),M)},[M,s]),w.useEffect(()=>{q&&c&&du(c)},[q,c]),w.useEffect(()=>{var ee;if(z){C(!0);const{externalResourceId:ie}=z,he=(ee=z.forms.find(me=>me.type==="edit"))==null?void 0:ee.id;es(he,ie)}else C(!1),a(Ax())},[z,es,a]),w.useEffect(()=>(ft(),Ie(),()=>{a(H1.clearConnectorList())}),[a,ft,Ie]),w.useEffect(()=>{if(oe&&P&&P.length&&Ir&&!l.current){const{cards_per_app:ee,total_empty_cards:ie,total_cards_with_errors:he}=Ir;r(Km,{numOfCards:P.length,total_cards_loaded:P.length,total_empty_cards:ie,total_cards_with_errors:he,cards_per_app:ee,sm_ids:n}),l.current=!0}return()=>{l.current=!1}},[oe,P,Ir,r,n]),w.useEffect(()=>{s&&n&&n.length&&a(Ia({inboxIds:n,conversationId:s,channelType:"email",isExpandedFormEnabled:Xe}))},[a,n,s,Xe]),w.useEffect(()=>{const ee=ie=>{var me;if(!(ie instanceof CustomEvent))return;const he=(me=ie.detail)==null?void 0:me.connectorKey;y({connectorKey:he})};return window.addEventListener(Kc.OPEN_FORM_VIEW,ee),()=>{window.removeEventListener(Kc.OPEN_FORM_VIEW,ee)}},[]),w.useEffect(()=>{if(!(j!=null&&j.length)||!v.connectorKey)return;const ee=v.connectorKey;y({});const ie=j.find(he=>{var me;return((me=he.connectorKey)==null?void 0:me.toLowerCase())===(ee==null?void 0:ee.toLowerCase())});ie&&($(ie),I(!0))},[j,v]),!t.length||re===K.LOADING)return u.jsx(Bv,{});const Ra=ee=>{r(o3,{connector_name:te,source:ee,sm_ids:n})},Ma=ee=>{I(!0),Ra(ee)},pl=()=>{_(!0),r(s3)},ts=ee=>{r(ee,A),Ve?k(!0):(I(!1),$(null))},ns=ee=>{if(z){const{connectorName:ie,title:he}=z;r(ee,{connector_name:ie,card_title:he,sm_ids:n,ug_id:i})}Ve?k(!0):a(Qr(null))},hl=()=>{I(!1),a(Qr(null)),S(void 0),k(!1)},Pa=()=>{ft(),a(H1.clearConnectorList())},gl=[{label:"Go back",variant:"text",action:hl},{label:"Stay",variant:"contained",action:()=>k(!1)}],rs=j.length>0,O=Ee.length>0,Z=()=>rs||O?u.jsx(mE,{haveCreateObjects:rs,haveLinkObjects:O,onCreateClick:()=>Ma(Ad.MAIN_BUTTON),onLinkClick:()=>_(!0)}):u.jsx($1,{isAdmin:e,hideHeading:!0});return u.jsxs(Pd,{ref:f,"data-testid":Array.isArray(P)?"connector-agent":"loading",id:"connector-agent-container",stopOverflow:x||E,children:[u.jsx(ip,{shown:L,setShown:k,title:Cx,description:xx,buttons:gl}),u.jsx(X5,{onWheel:()=>h(!0),ref:b,children:W?u.jsxs(u.Fragment,{children:[u.jsx(I4,{connectors:wr,isWriteFlowEnabled:kt,haveCreateObjects:rs,haveLinkObjects:O,cards:P,handleCreateNewObject:()=>Ma(Ad.ICON),handleLinkNewObject:pl}),gn?u.jsx(qE,{selectedObject:D,setSelectedObject:N,fetchSearchResults:en,onReset:Ar,root:f.current}):null,u.jsxs(Ur,{children:[u.jsx(Kr,{condition:gn&&jt,children:u.jsx(sI,{})},"search"),u.jsx(Kr,{condition:gn&&!!D&&!Sr,children:u.jsx(oI,{searchResults:Dt??[],selectedObject:D,onReset:Ar,fetchCards:ft})},"results"),u.jsxs(Kr,{fallback:!0,children:[vt&&(P!=null&&P.length)?u.jsxs(d.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[u.jsx(d.Stack,{sx:{flex:1,minWidth:0},children:u.jsx(qv,{emailHeaders:go,selectedEmail:M,root:f.current,isLoading:_n,setSelectedEmail:V})}),at&&mn&&e&&u.jsx(d.Tooltip,{title:"Update customer identity mapping",placement:"top",children:u.jsx(d.IconButton,{"aria-label":"Open customer identity mapping settings",sx:{height:"32px",width:"32px",marginTop:"12px",flexShrink:0},onClick:()=>{r(hd,{page:"agent_connector_panel"}),B(!0)},children:u.jsx(d.icons.SettingsOutlined,{sx:{height:"20px",width:"20px"}})})})]}):null,!vt&&at&&mn&&e&&(P!=null&&P.length)?u.jsx(d.Button,{fullWidth:!0,variant:"contained",startIcon:u.jsx(d.icons.SettingsOutlined,{sx:{height:"14px",width:"14px"}}),sx:{backgroundColor:"#edf1f6",color:"#4d596c",borderRadius:"6px",padding:"9px 12px",marginTop:"12px",textTransform:"none",fontWeight:500,fontSize:"14px",lineHeight:"20px",boxShadow:"none","&:hover":{backgroundColor:"#e2e8f0",boxShadow:"none"}},onClick:()=>{r(hd,{page:"agent_connector_panel"}),B(!0)},children:"Customer identity mapping"}):null,Ue?u.jsx(Vv,{}):null,u.jsxs(Ur,{children:[u.jsxs(Kr,{condition:!!P&&P.length>0,children:[u.jsx(hv,{cards:P,specificCardData:G,email:M??"",specificConnectorApiStatus:Y,onCardUnlinking:ft}),u.jsx("div",{ref:m,children:Ze?u.jsx(w5,{connectors:wr,expanded:H}):null})]},"cards-list"),u.jsx(Kr,{condition:!(P!=null&&P.length)&&kt,children:Z()},"create-banner")]})]},"cards")]})]}):u.jsx($1,{isAdmin:e})}),u.jsx(Yc,{onClose:()=>ns(y3),isOpen:g,setIsOpen:C,title:o5,portalId:"connector-layover-portal",backButtonTooltip:"Back",children:u.jsx(lp,{isEdit:!0,onClose:()=>ns(b3),onCreateSuccess:Pa,metaData:A,setMetaData:S})}),u.jsx(Yc,{onClose:()=>ts(d3),portalId:"connector-layover-portal",isOpen:x,setIsOpen:I,title:Hi,children:u.jsx(lp,{onClose:()=>ts(u3),onCreateSuccess:Pa,metaData:A,setMetaData:S,defaultOption:J})}),u.jsx(Yc,{onClose:()=>_(!1),portalId:"connector-layover-portal",isOpen:E,setIsOpen:_,children:u.jsx(dE,{setOpenTaskLinking:_,onLinkingSuccess:ft})}),!W&&u.jsx(M5,{}),at&&u.jsx(EI,{open:de,onClose:()=>B(!1),connectors:(Kt==null?void 0:Kt.connectors)??[],onSaveSuccess:fl})]})},_I=({children:e,sendTrackingEvent:t,contactEmail:n,baseUrls:r={},currentSmIds:o=[],userEmail:s,metaData:a,availableFeatures:i,conversationId:c,connectorFunctions:l,stackingContext:f,isAdmin:m=!1,actionQueue:b})=>{const v=w.useMemo(()=>({userEmail:s,email:n,baseUrls:r,currentSmIds:o,metaData:a,conversationId:c,sendTrackingEvent:t||(()=>{}),availableFeatures:i,isAdmin:m,connectorFunctions:l,stackingContext:f,actionQueue:b}),[s,n,r,t,o,a,i,c,m,l,f,b]);return u.jsx(Be.Provider,{value:v,children:e})},el=({children:e})=>{const[t]=w.useState(()=>new L2);return u.jsx(N2,{client:t,children:e})},SI=Kd({cardList:Jx,write:Tx,common:K8}),tl=Wb({reducer:SI,devTools:!0}),AI=({children:e,userEmail:t,extraParams:n,contactEmail:r,baseUrls:o,availableFeatures:s,connectorFunctions:a,stackingContext:i,actionQueue:c})=>u.jsx(Ui,{store:tl,children:u.jsx(d.HiverProvider,{inter:!0,children:u.jsx(el,{children:u.jsx(_I,{userEmail:t,availableFeatures:s,sendTrackingEvent:n==null?void 0:n.sendTrackingEvent,contactEmail:r,currentSmIds:n==null?void 0:n.currentSmIds,metaData:n==null?void 0:n.metaData,conversationId:n==null?void 0:n.conversationId,baseUrls:o,connectorFunctions:a,stackingContext:i,actionQueue:c,isAdmin:n==null?void 0:n.isAdmin,children:u.jsx(w.Suspense,{fallback:u.jsx(u.Fragment,{}),children:e})})})})}),nl=d.styled(d.Box)`
1298
1297
  height: inherit;
1299
1298
  .MuiScopedCssBaseline-root {
1300
1299
  height: inherit;
@@ -2133,7 +2132,7 @@ Do you want to continue?`,vx="Select an object to create",Ex="Select an object t
2133
2132
  transform: rotate(360deg);
2134
2133
  }
2135
2134
  }
2136
- `,nl=d.styled(TI)`
2135
+ `,rl=d.styled(TI)`
2137
2136
  .Toastify__toast-container {
2138
2137
  min-width: 320px !important;
2139
2138
  font-size: 16px;
@@ -2182,7 +2181,7 @@ Do you want to continue?`,vx="Select an object to create",Ex="Select an object t
2182
2181
  align-self: auto !important;
2183
2182
  margin-left: 12px;
2184
2183
  }
2185
- `,LI=({userEmail:e="",contactEmail:t="",baseUrls:n={},extraParams:r={},availableFeatures:o={},connectorFunctions:s,stackingContext:a={},actionQueue:i})=>u.jsx(tl,{children:u.jsxs(AI,{userEmail:e,availableFeatures:o,extraParams:r,contactEmail:t,connectorFunctions:s,stackingContext:a,actionQueue:i,baseUrls:n,children:[u.jsx(wI,{isAdmin:r==null?void 0:r.isAdmin}),Re.createPortal(u.jsx(nl,{id:"toast-message",children:u.jsx(Xa,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0,...!!a.toastMessage&&{style:{zIndex:a.toastMessage}}})}),document.body),u.jsx("div",{"data-connectorid":"connector-layover-portal"})]})}),Ip="/v1/api",OI=`${Ip}/connector/conversation/:conversationId/data`,FI=`${Ip}/connector/feedback/conversation/:conversationId`,kI=async(e,t)=>{try{let n=OI.replace(":conversationId",e)+"?channel_type=email";if(t!=null&&t.length){const o=t.map(s=>`inbox_ids=${encodeURIComponent(s)}`).join("&");n+=`&${o}`}const r=await we({url:n,method:Me.GET});return r!=null&&r.data&&Array.isArray(r.data)?r.data.reduce((s,a)=>{var i,c;return s[(i=a==null?void 0:a.cardData)==null?void 0:i.textToHighlight]||(s[(c=a==null?void 0:a.cardData)==null?void 0:c.textToHighlight]={...a}),s},{}):null}catch(n){return Promise.reject(n)}};function DI(e,t,n){return Tn({queryKey:["connector-analytics",e,t,n],queryFn:async()=>!t||!e?null:await kI(e,n),enabled:!!t&&!!e})}class NI{constructor(t=[],n=null){De(this,"highlightTerms");De(this,"observer");De(this,"isHighlighting");De(this,"debounceTimer");De(this,"debounceDelay");De(this,"onHighlightsUpdated");this.highlightTerms=t,this.observer=null,this.isHighlighting=!1,this.debounceTimer=null,this.debounceDelay=500,this.onHighlightsUpdated=n,this.init()}init(){this.highlightAllEmails(),this.startObserver()}startObserver(){const t=this.findGmailContainer();if(!t){console.warn("Gmail container not found");return}this.observer=new MutationObserver(n=>{if(this.isHighlighting)return;let r=!1;n.forEach(o=>{o.type==="childList"&&Array.from(o.addedNodes).some(i=>{var c,l,f,m;return i.nodeType===1&&i instanceof Element&&(((c=i.classList)==null?void 0:c.contains("a3s"))||((l=i.classList)==null?void 0:l.contains("ii"))||((f=i.querySelector)==null?void 0:f.call(i,".a3s"))||((m=i.querySelector)==null?void 0:m.call(i,"h2.hP")))})&&(r=!0)}),r&&this.debounceHighlight()}),this.observer.observe(t,{childList:!0,subtree:!0})}findGmailContainer(){return document.querySelector('[role="main"]')||document.querySelector(".nH.if")||document.querySelector(".AO")||document.body}debounceHighlight(){this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{this.highlightAllEmails()},this.debounceDelay)}highlightAllEmails(){var t;if(this.highlightTerms.length!==0){this.isHighlighting=!0;try{if(this.clearHighlights(),["h2.hP",".ii.gt .a3s.aiL",".ii.gt .a3s",'[data-expanded="true"]'].forEach(r=>{document.querySelectorAll(r).forEach(s=>{this.isElementVisible(s)&&this.highlightInElement(s)})}),this.onHighlightsUpdated){const r=Array.from(document.querySelectorAll(".gmail-highlight"));(t=this.onHighlightsUpdated)==null||t.call(this,r)}}finally{setTimeout(()=>{this.isHighlighting=!1},250)}}}isElementVisible(t){const n=t;return n.offsetParent!==null&&n.offsetWidth>0&&n.offsetHeight>0}highlightInElement(t){if(!t||this.highlightTerms.length===0||t.dataset.highlightProcessed==="true")return;const r=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode:a=>a.parentElement&&a.parentElement.classList.contains("gmail-highlight")||a.parentElement&&["SCRIPT","STYLE"].includes(a.parentElement.tagName)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),o=[];let s;for(;s=r.nextNode();)o.push(s);o.forEach(a=>{this.highlightInTextNode(a)}),t.dataset.highlightProcessed="true"}highlightInTextNode(t){let n=t.textContent,r=!1;if(!n)return;if([...this.highlightTerms].sort((s,a)=>a.length-s.length).forEach(s=>{if(!s||s.trim().length===0)return;const a=this.escapeRegex(s.trim()),i=new RegExp(`\\b${a}\\b`,"gi");i.test(n)&&(n=n.replace(i,`<span class="gmail-highlight" data-highlight-term="${s.trim()}"><span class="gmail-highlight-inner">${s}</span></span>`),r=!0)}),r&&t.parentNode){const s=document.createElement("span");s.innerHTML=n,t.parentNode.replaceChild(s,t)}}clearHighlights(){document.querySelectorAll(".gmail-highlight").forEach(r=>{const o=r.parentNode;o&&r.textContent&&(o.replaceChild(document.createTextNode(r.textContent),r),o.normalize())}),document.querySelectorAll('[data-highlight-processed="true"]').forEach(r=>{delete r.dataset.highlightProcessed})}escapeRegex(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}refreshHighlights(){this.highlightAllEmails()}updateHighlightTerms(t){this.highlightTerms=t||[],this.highlightAllEmails()}destroy(){this.observer&&(this.observer.disconnect(),this.observer=null),this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),this.clearHighlights(),this.highlightTerms=[]}}if(!document.getElementById("gmail-highlighter-styles")){const e=document.createElement("style");e.id="gmail-highlighter-styles",e.textContent=`
2184
+ `,LI=({userEmail:e="",contactEmail:t="",baseUrls:n={},extraParams:r={},availableFeatures:o={},connectorFunctions:s,stackingContext:a={},actionQueue:i})=>u.jsx(nl,{children:u.jsxs(AI,{userEmail:e,availableFeatures:o,extraParams:r,contactEmail:t,connectorFunctions:s,stackingContext:a,actionQueue:i,baseUrls:n,children:[u.jsx(wI,{isAdmin:r==null?void 0:r.isAdmin}),Re.createPortal(u.jsx(rl,{id:"toast-message",children:u.jsx(Xa,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0,...!!a.toastMessage&&{style:{zIndex:a.toastMessage}}})}),document.body),u.jsx("div",{"data-connectorid":"connector-layover-portal"})]})}),Ip="/v1/api",OI=`${Ip}/connector/conversation/:conversationId/data`,FI=`${Ip}/connector/feedback/conversation/:conversationId`,kI=async(e,t)=>{try{let n=OI.replace(":conversationId",e)+"?channel_type=email";if(t!=null&&t.length){const o=t.map(s=>`inbox_ids=${encodeURIComponent(s)}`).join("&");n+=`&${o}`}const r=await we({url:n,method:Me.GET});return r!=null&&r.data&&Array.isArray(r.data)?r.data.reduce((s,a)=>{var i,c;return s[(i=a==null?void 0:a.cardData)==null?void 0:i.textToHighlight]||(s[(c=a==null?void 0:a.cardData)==null?void 0:c.textToHighlight]={...a}),s},{}):null}catch(n){return Promise.reject(n)}};function DI(e,t,n){return Tn({queryKey:["connector-analytics",e,t,n],queryFn:async()=>!t||!e?null:await kI(e,n),enabled:!!t&&!!e})}class NI{constructor(t=[],n=null){De(this,"highlightTerms");De(this,"observer");De(this,"isHighlighting");De(this,"debounceTimer");De(this,"debounceDelay");De(this,"onHighlightsUpdated");this.highlightTerms=t,this.observer=null,this.isHighlighting=!1,this.debounceTimer=null,this.debounceDelay=500,this.onHighlightsUpdated=n,this.init()}init(){this.highlightAllEmails(),this.startObserver()}startObserver(){const t=this.findGmailContainer();if(!t){console.warn("Gmail container not found");return}this.observer=new MutationObserver(n=>{if(this.isHighlighting)return;let r=!1;n.forEach(o=>{o.type==="childList"&&Array.from(o.addedNodes).some(i=>{var c,l,f,m;return i.nodeType===1&&i instanceof Element&&(((c=i.classList)==null?void 0:c.contains("a3s"))||((l=i.classList)==null?void 0:l.contains("ii"))||((f=i.querySelector)==null?void 0:f.call(i,".a3s"))||((m=i.querySelector)==null?void 0:m.call(i,"h2.hP")))})&&(r=!0)}),r&&this.debounceHighlight()}),this.observer.observe(t,{childList:!0,subtree:!0})}findGmailContainer(){return document.querySelector('[role="main"]')||document.querySelector(".nH.if")||document.querySelector(".AO")||document.body}debounceHighlight(){this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{this.highlightAllEmails()},this.debounceDelay)}highlightAllEmails(){var t;if(this.highlightTerms.length!==0){this.isHighlighting=!0;try{if(this.clearHighlights(),["h2.hP",".ii.gt .a3s.aiL",".ii.gt .a3s",'[data-expanded="true"]'].forEach(r=>{document.querySelectorAll(r).forEach(s=>{this.isElementVisible(s)&&this.highlightInElement(s)})}),this.onHighlightsUpdated){const r=Array.from(document.querySelectorAll(".gmail-highlight"));(t=this.onHighlightsUpdated)==null||t.call(this,r)}}finally{setTimeout(()=>{this.isHighlighting=!1},250)}}}isElementVisible(t){const n=t;return n.offsetParent!==null&&n.offsetWidth>0&&n.offsetHeight>0}highlightInElement(t){if(!t||this.highlightTerms.length===0||t.dataset.highlightProcessed==="true")return;const r=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode:a=>a.parentElement&&a.parentElement.classList.contains("gmail-highlight")||a.parentElement&&["SCRIPT","STYLE"].includes(a.parentElement.tagName)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),o=[];let s;for(;s=r.nextNode();)o.push(s);o.forEach(a=>{this.highlightInTextNode(a)}),t.dataset.highlightProcessed="true"}highlightInTextNode(t){let n=t.textContent,r=!1;if(!n)return;if([...this.highlightTerms].sort((s,a)=>a.length-s.length).forEach(s=>{if(!s||s.trim().length===0)return;const a=this.escapeRegex(s.trim()),i=new RegExp(`\\b${a}\\b`,"gi");i.test(n)&&(n=n.replace(i,`<span class="gmail-highlight" data-highlight-term="${s.trim()}"><span class="gmail-highlight-inner">${s}</span></span>`),r=!0)}),r&&t.parentNode){const s=document.createElement("span");s.innerHTML=n,t.parentNode.replaceChild(s,t)}}clearHighlights(){document.querySelectorAll(".gmail-highlight").forEach(r=>{const o=r.parentNode;o&&r.textContent&&(o.replaceChild(document.createTextNode(r.textContent),r),o.normalize())}),document.querySelectorAll('[data-highlight-processed="true"]').forEach(r=>{delete r.dataset.highlightProcessed})}escapeRegex(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}refreshHighlights(){this.highlightAllEmails()}updateHighlightTerms(t){this.highlightTerms=t||[],this.highlightAllEmails()}destroy(){this.observer&&(this.observer.disconnect(),this.observer=null),this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),this.clearHighlights(),this.highlightTerms=[]}}if(!document.getElementById("gmail-highlighter-styles")){const e=document.createElement("style");e.id="gmail-highlighter-styles",e.textContent=`
2186
2185
  .gmail-highlight {
2187
2186
  background-color: #ECEFF6 !important;
2188
2187
  color: #2c3e50 !important;
@@ -2212,7 +2211,7 @@ Do you want to continue?`,vx="Select an object to create",Ex="Select an object t
2212
2211
  transform: translateY(0) !important;
2213
2212
  box-shadow: none !important;
2214
2213
  }
2215
- `,document.head.appendChild(e)}function RI(){return tn({mutationKey:["submit-connector-feedback"],mutationFn:async({conversationId:e,feedbackData:t})=>{if(!e)throw new Error("Conversation ID is required");const n=await we({url:FI.replace(":conversationId",e)+"?channel_type=email",method:"POST",data:t});return n==null?void 0:n.data}})}const MI="Everything looks good",PI="Something is not working",jI="Share feedback",BI="Manage Smart Previews",VI="Reach out to your admin to disable this feature",GI="Go to Apps",HI="Disable Feature",WI="Tell us what went wrong",ZI="Please provide feedback",XI=[{label:"Data is not accurate",value:"Data is not accurate"},{label:"Data is from the wrong App",value:"Data is from the wrong App"},{label:"Other",value:"other"}],zI="Tell us more (optional)",YI="Enter your feedback",rl=40,JI="Feedback submitted",qI="Failed to submit feedback",un={OBJECT_HIGHLIGHTED:"app_object_detection_highlighted",OBJECT_HOVERED:"app_object_detection_hovered",PERMALINK_CLICKED:"app_object_detection_permalink_clicked",POSITIVE_FEEDBACK_CLICKED:"app_object_detection_positive_feedback_detected",NEGATIVE_FEEDBACK_CLICKED:"app_object_detection_negative_feedback_clicked",NEGATIVE_FEEDBACK_SUBMITTED:"app_object_detection_negative_feedback_submitted",FEEDBACK_OPTION_CLICKED:"app_object_detection_general_feedback_clicked",FEEDBACK_OPTION_SUBMITTED:"app_object_detection_general_feedback_submitted",DATA_CARD_DURATION:"app_object_detection_data_card_duration",DATA_CARD_SCROLLED:"app_object_detection_data_card_scrolled"},wp=e=>u.jsx(d.Button,{...e,disabled:e.isLoading||e.disabled,children:e.isLoading?u.jsx(d.CircularProgress,{sx:{color:"#97A3B7"},size:20}):e.label}),$I=d.styled(d.Box)`
2214
+ `,document.head.appendChild(e)}function RI(){return tn({mutationKey:["submit-connector-feedback"],mutationFn:async({conversationId:e,feedbackData:t})=>{if(!e)throw new Error("Conversation ID is required");const n=await we({url:FI.replace(":conversationId",e)+"?channel_type=email",method:"POST",data:t});return n==null?void 0:n.data}})}const MI="Everything looks good",PI="Something is not working",jI="Share feedback",BI="Manage Smart Previews",VI="Reach out to your admin to disable this feature",GI="Go to Apps",HI="Disable Feature",WI="Tell us what went wrong",ZI="Please provide feedback",XI=[{label:"Data is not accurate",value:"Data is not accurate"},{label:"Data is from the wrong App",value:"Data is from the wrong App"},{label:"Other",value:"other"}],zI="Tell us more (optional)",YI="Enter your feedback",ol=40,JI="Feedback submitted",qI="Failed to submit feedback",un={OBJECT_HIGHLIGHTED:"app_object_detection_highlighted",OBJECT_HOVERED:"app_object_detection_hovered",PERMALINK_CLICKED:"app_object_detection_permalink_clicked",POSITIVE_FEEDBACK_CLICKED:"app_object_detection_positive_feedback_detected",NEGATIVE_FEEDBACK_CLICKED:"app_object_detection_negative_feedback_clicked",NEGATIVE_FEEDBACK_SUBMITTED:"app_object_detection_negative_feedback_submitted",FEEDBACK_OPTION_CLICKED:"app_object_detection_general_feedback_clicked",FEEDBACK_OPTION_SUBMITTED:"app_object_detection_general_feedback_submitted",DATA_CARD_DURATION:"app_object_detection_data_card_duration",DATA_CARD_SCROLLED:"app_object_detection_data_card_scrolled"},wp=e=>u.jsx(d.Button,{...e,disabled:e.isLoading||e.disabled,children:e.isLoading?u.jsx(d.CircularProgress,{sx:{color:"#97A3B7"},size:20}):e.label}),$I=d.styled(d.Box)`
2216
2215
  max-height: 340px;
2217
2216
  width: 440px;
2218
2217
  border-radius: 12px;
@@ -2234,7 +2233,7 @@ Do you want to continue?`,vx="Select an object to create",Ex="Select an object t
2234
2233
  justify-content: flex-end;
2235
2234
  margin-top: 30px;
2236
2235
  gap: 8px;
2237
- `,_p=({onCancel:e,onSubmit:t,isLoading:n,showOptions:r=!0,title:o})=>{const[s,a]=w.useState(""),[i,c]=w.useState(""),l=y=>{a(y.target.value)},f=y=>{y.stopPropagation();const{value:p}=(y==null?void 0:y.target)||{};c(p)},m=()=>{t({feedbackOption:s,feedbackComment:i})},b=()=>{e==null||e()},v=r?!s:!i;return u.jsxs($I,{children:[u.jsx(d.Typography,{variant:"h3",children:o}),u.jsx(QI,{}),r?u.jsx(d.FormControl,{children:u.jsx(d.RadioGroup,{"aria-labelledby":"demo-controlled-radio-buttons-group",name:"controlled-radio-buttons-group",value:s,onChange:l,children:XI.map(y=>u.jsx(d.FormControlLabel,{value:y.value,control:u.jsx(d.Radio,{}),label:y.label},y.value))})}):null,u.jsx(lr,{type:"text",placeholder:r?zI:YI,value:i,name:"feedbackComment",inputChangeHandler:f,multiline:!0,rows:5,limit:250,validation:{validate:pc()}}),u.jsxs(UI,{children:[u.jsx(d.Button,{variant:"text",color:"primary",style:{color:d.theme.palette.gray.gray3},disabled:n,onClick:b,children:"Cancel"}),u.jsx(wp,{variant:"contained",color:"primary",isLoading:n,disabled:v,label:"Submit",onClick:m})]})]})},KI=d.styled(d.Box)`
2236
+ `,_p=({onCancel:e,onSubmit:t,isLoading:n,showOptions:r=!0,title:o})=>{const[s,a]=w.useState(""),[i,c]=w.useState(""),l=y=>{a(y.target.value)},f=y=>{y.stopPropagation();const{value:p}=(y==null?void 0:y.target)||{};c(p)},m=()=>{t({feedbackOption:s,feedbackComment:i})},b=()=>{e==null||e()},v=r?!s:!i;return u.jsxs($I,{children:[u.jsx(d.Typography,{variant:"h3",children:o}),u.jsx(QI,{}),r?u.jsx(d.FormControl,{children:u.jsx(d.RadioGroup,{"aria-labelledby":"demo-controlled-radio-buttons-group",name:"controlled-radio-buttons-group",value:s,onChange:l,children:XI.map(y=>u.jsx(d.FormControlLabel,{value:y.value,control:u.jsx(d.Radio,{}),label:y.label},y.value))})}):null,u.jsx(lr,{type:"text",placeholder:r?zI:YI,value:i,name:"feedbackComment",inputChangeHandler:f,multiline:!0,rows:5,limit:250,validation:{validate:hc()}}),u.jsxs(UI,{children:[u.jsx(d.Button,{variant:"text",color:"primary",style:{color:d.theme.palette.gray.gray3},disabled:n,onClick:b,children:"Cancel"}),u.jsx(wp,{variant:"contained",color:"primary",isLoading:n,disabled:v,label:"Submit",onClick:m})]})]})},KI=d.styled(d.Box)`
2238
2237
  border-radius: 12px;
2239
2238
  max-height: 298px;
2240
2239
  width: 288px;
@@ -2304,35 +2303,35 @@ Do you want to continue?`,vx="Select an object to create",Ex="Select an object t
2304
2303
  color: #196fe0;
2305
2304
  padding: 5px 12px;
2306
2305
  min-width: 100px;
2307
- `,Sp=e=>T.createElement("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M7.87354 2.73877C7.87354 2.30139 7.53821 1.94227 7.11084 1.90381L5.09229 6.44775C5.06387 6.51167 5.02799 6.57074 4.98975 6.62744V12.3667H10.4722C11.0395 12.3665 11.5225 11.9529 11.6089 11.3921L12.2368 7.30811C12.3437 6.61168 11.8047 5.98395 11.1001 5.98389H9.05615C8.40276 5.98371 7.87354 5.45372 7.87354 4.80029V2.73877ZM2.07275 11.8003C2.07275 12.1133 2.32718 12.3667 2.64014 12.3667H3.78955V7.1499H2.64014C2.32718 7.1499 2.07275 7.40432 2.07275 7.71729V11.8003ZM9.07275 4.78369H11.1001C12.5403 4.78375 13.6412 6.0673 13.4224 7.49072L12.7944 11.5747C12.6179 12.7208 11.6318 13.5667 10.4722 13.5669H2.64014C1.66443 13.5669 0.873535 12.776 0.873535 11.8003V7.71729C0.873535 6.74158 1.66443 5.95068 2.64014 5.95068H3.99951L6.04834 1.34131L6.12256 1.20166C6.31844 0.892431 6.66142 0.700708 7.03467 0.700684C8.16045 0.700684 9.07275 1.61299 9.07275 2.73877V4.78369Z",fill:"#97A3B7"})),Ap=e=>T.createElement("svg",{width:13,height:14,viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M11.8008 3.16651C11.8008 2.83026 11.7996 2.61407 11.7861 2.44972C11.7733 2.29228 11.7516 2.23558 11.7383 2.20948C11.684 2.10311 11.5976 2.0167 11.4912 1.96241C11.4651 1.94911 11.4084 1.92742 11.251 1.91456C11.0866 1.90113 10.8698 1.89991 10.5332 1.89991H10.084V7.11671H10.5332C10.8697 7.11671 11.0866 7.11647 11.251 7.10304C11.4084 7.09017 11.4651 7.06848 11.4912 7.05519C11.5977 7.00085 11.684 6.91369 11.7383 6.80714C11.7516 6.78095 11.7733 6.72473 11.7861 6.56788C11.7996 6.40344 11.8008 6.18671 11.8008 5.85011V3.16651ZM6.00001 11.5288C6.00014 11.9658 6.33491 12.3239 6.76173 12.3628L8.68946 8.02784C8.73905 7.91626 8.79776 7.77463 8.8838 7.6421V1.89991H4.30275C3.86739 1.89991 3.57385 1.9011 3.34571 1.91847C3.12524 1.93527 3.00982 1.96482 2.92677 2.00245C2.72742 2.09281 2.55809 2.23906 2.43849 2.42237C2.38875 2.49873 2.34108 2.60774 2.29103 2.82276C2.23917 3.04561 2.19414 3.33583 2.12794 3.76612L1.82325 5.74952C1.73618 6.31551 1.67724 6.70248 1.65724 7.00245C1.63765 7.29653 1.66125 7.4439 1.69923 7.54347C1.79436 7.79282 1.97309 8.00139 2.20509 8.13331C2.29773 8.18598 2.43978 8.23198 2.73341 8.25733C3.03294 8.28318 3.42441 8.2837 3.99708 8.2837H4.46681C4.62026 8.2837 4.77205 8.28306 4.89943 8.29347C5.00019 8.30172 5.11526 8.31839 5.23439 8.36085L5.3545 8.41261L5.51271 8.51026C5.61292 8.58313 5.70157 8.67078 5.77443 8.77101L5.8711 8.93019L5.92286 9.0503C5.96524 9.1694 5.98202 9.28456 5.99025 9.38526C6.00063 9.51256 6.00001 9.66359 6.00001 9.8169V11.5288ZM13 5.85011C13 6.1669 13.0008 6.44089 12.9824 6.66554C12.9635 6.89709 12.9214 7.12868 12.8076 7.35206C12.6383 7.68439 12.3684 7.95514 12.0361 8.12452C11.8127 8.23838 11.5803 8.2804 11.3486 8.29933C11.124 8.31767 10.8499 8.3169 10.5332 8.3169H10.0899C9.97739 8.31691 9.91771 8.31637 9.87501 8.31886C9.85536 8.35692 9.83103 8.41194 9.78517 8.51515L7.82521 12.9263C7.6519 13.3159 7.26532 13.5669 6.83888 13.5669C5.71318 13.5669 4.80093 12.6545 4.80079 11.5288V9.8169C4.80079 9.64881 4.799 9.55553 4.79396 9.48878C4.72728 9.48383 4.63383 9.4839 4.46681 9.4839H3.99708C3.44579 9.4839 2.99395 9.48395 2.63087 9.45265C2.26202 9.42082 1.92186 9.35223 1.61232 9.17628C1.13824 8.90671 0.772529 8.48073 0.578136 7.9712C0.451217 7.63844 0.43534 7.29185 0.459972 6.92237C0.484222 6.55869 0.552876 6.11195 0.63673 5.5669L0.942394 3.58351C1.00581 3.17132 1.05751 2.82883 1.12208 2.55128C1.18838 2.26634 1.27691 2.00629 1.4336 1.76612C1.67803 1.39152 2.02424 1.0943 2.43165 0.909678C2.69285 0.791323 2.96319 0.743407 3.25489 0.721201C3.53908 0.699573 3.8856 0.700693 4.30275 0.700693H10.5332C10.8499 0.700693 11.124 0.69993 11.3486 0.718272C11.5803 0.737198 11.8127 0.779216 12.0361 0.893076C12.3683 1.06241 12.6383 1.33244 12.8076 1.66456C12.9215 1.88802 12.9635 2.12041 12.9824 2.35206C13.0008 2.57656 13 2.85001 13 3.16651V5.85011Z",fill:"#97A3B7"})),lw=e=>T.createElement("svg",{width:15,height:15,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M6.02637 0.261719C6.91006 0.100716 7.81654 0.108586 8.69727 0.285156C8.77943 0.301685 8.85737 0.335356 8.92578 0.383789C8.99413 0.432207 9.05187 0.494446 9.09473 0.566406L10.1699 2.37109L12.2686 2.40137C12.3521 2.40267 12.4348 2.42105 12.5107 2.45605C12.5866 2.49114 12.6547 2.5417 12.71 2.60449L12.9268 2.8623C13.4177 3.47393 13.8044 4.1638 14.0703 4.90332H14.0713C14.1006 4.98499 14.1111 5.07276 14.1035 5.15918C14.0958 5.24545 14.0694 5.32914 14.0264 5.4043L13.0107 7.17676L14.0654 8.97949C14.1089 9.05374 14.1349 9.13706 14.1436 9.22266C14.1522 9.30829 14.143 9.39509 14.1152 9.47656C13.8308 10.316 13.3846 11.0919 12.8008 11.7588C12.7442 11.8235 12.6731 11.8748 12.5947 11.9102C12.5163 11.9454 12.4307 11.9644 12.3447 11.9639L10.2559 11.9512L9.22656 13.7188C9.18293 13.7935 9.12263 13.8576 9.05176 13.9072C8.98094 13.9567 8.90045 13.9914 8.81543 14.0068C7.9318 14.1675 7.02506 14.1583 6.14453 13.9814L6.14355 13.9824C6.0797 13.9694 6.01838 13.9446 5.96191 13.9121C5.87332 13.8615 5.7985 13.7897 5.74609 13.7021L4.67188 11.8955L2.56934 11.8682C2.48571 11.8669 2.4031 11.8485 2.32715 11.8135C2.25108 11.7784 2.18323 11.727 2.12793 11.6641C1.60736 11.0751 1.18875 10.4045 0.888672 9.67969L0.767578 9.36621C0.738264 9.28452 0.726773 9.19681 0.734375 9.11035C0.742031 9.02393 0.768379 8.93953 0.811523 8.86426L1.82617 7.0918L0.772461 5.28906C0.729026 5.2148 0.702006 5.1315 0.693359 5.0459C0.684801 4.96052 0.695058 4.87421 0.722656 4.79297C1.00784 3.95289 1.45608 3.17678 2.04102 2.50977C2.09771 2.44503 2.16762 2.39274 2.24609 2.35742C2.32438 2.32222 2.40928 2.30426 2.49512 2.30469L4.58398 2.31543L5.61426 0.549805C5.65789 0.474997 5.71718 0.410066 5.78809 0.360352C5.8591 0.31064 5.94107 0.277156 6.02637 0.261719ZM7.53809 14.0195C7.59898 14.0196 7.65982 14.0181 7.7207 14.0166C7.65982 14.0181 7.59898 14.0196 7.53809 14.0195ZM7.2334 14.0117C7.28581 14.014 7.33818 14.0164 7.39062 14.0176C7.33818 14.0164 7.28581 14.014 7.2334 14.0117ZM7.85742 14.0127C7.89653 14.0109 7.93552 14.0073 7.97461 14.0049C7.93552 14.0073 7.89654 14.0109 7.85742 14.0127ZM6.91113 13.9902C6.97295 13.9958 7.03476 14.0009 7.09668 14.0049C7.03476 14.0009 6.97295 13.9958 6.91113 13.9902ZM6.6543 13.9619C6.6898 13.9665 6.72519 13.9716 6.76074 13.9756C6.72519 13.9716 6.6898 13.9665 6.6543 13.9619ZM5.91016 13.75C5.94027 13.7795 5.97474 13.8051 6.01172 13.8262L5.95898 13.791C5.94197 13.7782 5.92535 13.7649 5.91016 13.75ZM6.58008 12.9414H6.58105H6.58008ZM8.2002 1.41895C7.63858 1.33129 7.06722 1.32543 6.50391 1.40137L5.5127 3.10059C5.45667 3.19686 5.37383 3.27503 5.27539 3.32715C5.21254 3.36088 5.14878 3.39942 5.08594 3.43555L5.08496 3.43457C4.99197 3.48895 4.88605 3.51825 4.77832 3.51758L2.77637 3.50586C2.43354 3.9367 2.15694 4.41647 1.95508 4.92871L2.96875 6.66211H2.96973C3.01013 6.73278 3.03531 6.81132 3.04492 6.8916L3.04883 6.97461C3.04667 7.04613 3.0485 7.11658 3.05078 7.18945C3.0548 7.30124 3.02821 7.41268 2.97266 7.50977L1.99609 9.21289C2.21404 9.7388 2.50744 10.2299 2.86621 10.6719L4.88281 10.7012H4.88379C4.99002 10.7034 5.09368 10.7341 5.18457 10.7891L5.39258 10.9082C5.45916 10.9464 5.51715 10.9978 5.56445 11.0576L5.6084 11.1201L6.6416 12.8486C7.20362 12.9365 7.77513 12.9432 8.33887 12.8672L9.3291 11.1689C9.38528 11.0722 9.46843 10.9926 9.56738 10.9404C9.63017 10.9067 9.69505 10.8701 9.75781 10.834L9.8291 10.7988C9.90336 10.7678 9.98341 10.7514 10.0645 10.752L12.0664 10.7646C12.4092 10.3324 12.6847 9.85062 12.8857 9.33691L11.8711 7.60645L11.8721 7.60547C11.8181 7.51108 11.7903 7.40365 11.792 7.29492L11.791 7.29395C11.7932 7.22206 11.7923 7.15042 11.79 7.07715C11.7862 6.96565 11.8128 6.85466 11.8682 6.75781L12.8438 5.05371C12.6258 4.52811 12.3333 4.03648 11.9746 3.59473L9.95801 3.56641H9.95703C9.85067 3.56414 9.74722 3.53265 9.65625 3.47754V3.47852L9.45898 3.36426L9.39258 3.32129C9.32844 3.27486 9.27351 3.21669 9.23242 3.14844V3.14746L8.2002 1.41895ZM2.4668 11.7559L2.57031 11.7686H2.57129C2.50157 11.7675 2.43246 11.7518 2.36914 11.7227L2.4668 11.7559ZM1.78809 11.082V11.0811V11.082ZM13.0244 11.3203C13.0502 11.2862 13.0774 11.2533 13.1025 11.2188C13.0774 11.2533 13.0502 11.2862 13.0244 11.3203ZM13.2051 11.0713C13.2348 11.0279 13.2643 10.9845 13.293 10.9404C13.2643 10.9845 13.2348 11.0279 13.2051 11.0713ZM9.90918 10.876C9.90231 10.8782 9.89544 10.8803 9.88867 10.8828C9.89545 10.8803 9.90231 10.8782 9.90918 10.876ZM13.3535 10.8447C13.3903 10.7861 13.426 10.7268 13.4609 10.667C13.426 10.7268 13.3903 10.7861 13.3535 10.8447ZM13.5049 10.5928C13.5426 10.5264 13.5789 10.4593 13.6143 10.3916C13.5789 10.4593 13.5426 10.5264 13.5049 10.5928ZM13.6582 10.3066C13.695 10.2337 13.7305 10.1602 13.7646 10.0859C13.7305 10.1602 13.695 10.2337 13.6582 10.3066ZM7.2168 4.04004C7.82858 3.99994 8.43974 4.14269 8.9707 4.44922C9.68176 4.86085 10.2003 5.53844 10.4131 6.33203C10.6256 7.12573 10.5145 7.97155 10.1045 8.68359C9.79803 9.21429 9.34157 9.64291 8.79199 9.91406C8.24214 10.1852 7.62346 10.287 7.01562 10.207C6.40793 10.127 5.83684 9.86895 5.37598 9.46484C4.91529 9.06072 4.58448 8.52844 4.42578 7.93652C4.26721 7.34451 4.28843 6.71808 4.48535 6.1377C4.68236 5.55755 5.04627 5.04792 5.53223 4.6748C6.01845 4.30171 6.60526 4.08027 7.2168 4.04004ZM13.7852 10.041C13.8281 9.94559 13.8697 9.84945 13.9082 9.75195V9.75098C13.8696 9.84876 13.8283 9.94531 13.7852 10.041ZM6.40918 9.95703C6.46044 9.97542 6.51219 9.99222 6.56445 10.0078C6.51219 9.99225 6.46044 9.97539 6.40918 9.95703ZM6.20996 9.87695C6.25096 9.89508 6.2922 9.91244 6.33398 9.92871C6.2922 9.91247 6.25097 9.89505 6.20996 9.87695ZM6.02832 9.79004C6.0678 9.81077 6.10809 9.82969 6.14844 9.84863C6.10808 9.82972 6.06781 9.81074 6.02832 9.79004ZM5.84082 9.68262C5.87596 9.70443 5.9113 9.72578 5.94727 9.74609C5.91128 9.7258 5.87597 9.7044 5.84082 9.68262ZM12.9131 9.53613C12.9421 9.46825 12.9707 9.40012 12.9971 9.33105L12.9961 9.33008C12.9697 9.3993 12.9422 9.46808 12.9131 9.53613ZM5.66602 9.56543C5.7015 9.59105 5.73694 9.61662 5.77344 9.64062C5.73693 9.61664 5.70151 9.59104 5.66602 9.56543ZM1.97461 9.41699C1.99284 9.4575 2.01311 9.49704 2.03223 9.53711C1.98023 9.42813 1.93016 9.31814 1.88477 9.20605L1.97461 9.41699ZM5.59277 9.5127C5.59556 9.51484 5.59877 9.51642 5.60156 9.51855C5.54737 9.47722 5.49386 9.43478 5.44238 9.38965L5.59277 9.5127ZM8.03125 5.33496C7.67547 5.21424 7.29063 5.20159 6.92773 5.29883C6.56509 5.39617 6.23977 5.59952 5.99219 5.88184C5.74452 6.16433 5.58615 6.51424 5.53711 6.88672C5.48824 7.25901 5.54977 7.63783 5.71582 7.97461C5.88202 8.31152 6.14537 8.59145 6.4707 8.7793C6.90703 9.0311 7.42549 9.09913 7.91211 8.96875C8.39876 8.83831 8.81448 8.52031 9.06641 8.08398C9.25414 7.7587 9.3409 7.38453 9.31641 7.00977C9.2918 6.635 9.15631 6.27555 8.92773 5.97754C8.69908 5.67961 8.38685 5.45577 8.03125 5.33496ZM6.17676 8.69922C6.25355 8.76023 6.3343 8.81676 6.41992 8.86621L6.4209 8.86523C6.33525 8.81578 6.2536 8.76024 6.17676 8.69922ZM8.47754 8.83203V8.83105V8.83203ZM5.77637 8.27246C5.83227 8.35318 5.89399 8.4295 5.96094 8.50098L5.86426 8.38965C5.83359 8.35168 5.80422 8.31265 5.77637 8.27246ZM4.52246 7.91113C4.5608 8.0541 4.60948 8.19346 4.66797 8.32812C4.60945 8.19325 4.56083 8.05334 4.52246 7.91016V7.91113ZM9.40039 6.85645C9.40722 6.90519 9.41278 6.95457 9.41602 7.00391C9.41922 7.05311 9.42035 7.1023 9.41992 7.15137C9.42035 7.10204 9.41926 7.05239 9.41602 7.00293C9.41279 6.95379 9.40719 6.90498 9.40039 6.85645ZM11.9004 6.95215C11.8982 6.96247 11.897 6.97295 11.8955 6.9834C11.8971 6.97295 11.8982 6.96247 11.9004 6.95215ZM4.65137 5.97754C4.62849 6.03229 4.60852 6.08831 4.58887 6.14453C4.60851 6.0883 4.6285 6.03229 4.65137 5.97754ZM4.73633 5.79492C4.7241 5.81941 4.71274 5.8443 4.70117 5.86914C4.71273 5.8443 4.72411 5.81941 4.73633 5.79492ZM4.84473 5.59863C4.82627 5.62957 4.80836 5.66078 4.79102 5.69238C4.80835 5.66077 4.82628 5.62957 4.84473 5.59863ZM4.95605 5.42383C4.93113 5.45972 4.90714 5.49624 4.88379 5.5332C4.90712 5.49623 4.93114 5.45973 4.95605 5.42383ZM8.31445 4.27051C8.52443 4.33607 8.72746 4.42504 8.91992 4.53613L8.9209 4.53516C8.72801 4.42379 8.52395 4.33516 8.31348 4.26953L8.31445 4.27051ZM5.09082 5.24609C5.06172 5.28198 5.03326 5.3183 5.00586 5.35547C5.03325 5.31828 5.06173 5.28199 5.09082 5.24609ZM6.63965 5.29199C6.64276 5.29067 6.6463 5.29037 6.64941 5.28906C6.6463 5.29037 6.64276 5.29067 6.63965 5.29199ZM7.9209 5.19824H7.92188H7.9209ZM6.90234 5.20215H6.90332H6.90234ZM5.23145 5.08496C5.19896 5.11965 5.16651 5.15429 5.13574 5.19043C5.1665 5.15428 5.19897 5.11966 5.23145 5.08496ZM13.9766 4.93652V4.9375V4.93652ZM0.922852 4.53613C0.885573 4.63126 0.850299 4.72727 0.817383 4.82422V4.8252C0.850362 4.72803 0.885496 4.63148 0.922852 4.53613ZM2.01855 4.5293H2.01953H2.01855ZM1.04688 4.24316C1.02195 4.29878 0.998013 4.35481 0.974609 4.41113C0.998008 4.35481 1.02196 4.29878 1.04688 4.24316ZM7.22363 4.13965L7.22461 4.14062L7.22363 4.13965ZM7.66699 4.14453L7.66602 4.14355L7.66699 4.14453ZM1.17188 3.97852C1.1445 4.03303 1.11865 4.08828 1.09277 4.14355C1.11864 4.08828 1.14451 4.03304 1.17188 3.97852ZM12.4287 4.0498V4.04883V4.0498ZM12.6348 2.66992V2.6709C12.8546 2.91962 13.0566 3.1828 13.2383 3.45898C13.1171 3.27471 12.987 3.09618 12.8486 2.92383C12.7796 2.83782 12.708 2.75273 12.6348 2.66992ZM1.30859 3.72168C1.28765 3.75921 1.26729 3.79703 1.24707 3.83496C1.26728 3.79703 1.28765 3.75921 1.30859 3.72168ZM2.72656 3.40723V3.4082L4.7793 3.41797V3.41699L2.72656 3.40723ZM12.0234 3.49707C12.0719 3.55591 12.1198 3.61522 12.166 3.67578L12.0234 3.49609L9.95898 3.4668L12.0234 3.49707ZM1.47852 3.43457C1.45114 3.47831 1.42381 3.52205 1.39746 3.56641C1.4238 3.52204 1.45115 3.47831 1.47852 3.43457ZM9.78809 3.43164C9.79329 3.43365 9.79845 3.43566 9.80371 3.4375C9.79845 3.43567 9.79329 3.43365 9.78809 3.43164ZM5.22852 3.23926V3.24023V3.23926ZM1.64746 3.17676C1.61837 3.21879 1.58963 3.26104 1.56152 3.30371C1.58963 3.26104 1.61837 3.21879 1.64746 3.17676ZM2.11523 2.5752H2.11621H2.11523ZM8.94629 0.53418C8.96978 0.559626 8.99096 0.587273 9.00879 0.617188C8.97313 0.557368 8.92497 0.505135 8.86816 0.464844L8.94629 0.53418ZM6.37305 0.307617C6.26302 0.322319 6.15337 0.34041 6.04395 0.360352C6.15337 0.340409 6.26301 0.322304 6.37305 0.307617ZM8.35059 0.325195C8.25055 0.310024 8.15027 0.296933 8.0498 0.286133C8.15027 0.296945 8.25055 0.310026 8.35059 0.325195ZM7.92578 0.275391C7.85971 0.269476 7.79372 0.26282 7.72754 0.258789C7.79372 0.262834 7.85971 0.269466 7.92578 0.275391ZM6.9502 0.255859C6.89287 0.258741 6.83558 0.262311 6.77832 0.266602C6.83559 0.262325 6.89287 0.258726 6.9502 0.255859ZM7.58008 0.25293C7.53418 0.251105 7.4883 0.248968 7.44238 0.248047C7.4883 0.24898 7.53418 0.251094 7.58008 0.25293ZM7.12988 0.249023C7.17448 0.24794 7.21907 0.247302 7.26367 0.24707C7.21907 0.247314 7.17448 0.247928 7.12988 0.249023ZM6.67871 0.274414C6.57668 0.283521 6.47471 0.294033 6.37305 0.307617C6.47471 0.294047 6.57668 0.283499 6.67871 0.274414Z",fill:"#97A3B7"})),uw=e=>T.createElement("svg",{width:14,height:15,viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_189_1728)"},T.createElement("path",{d:"M2.33317 2.4672H11.6665V9.4672H3.01567L2.33317 10.1497V2.4672ZM2.33317 1.30054C1.6915 1.30054 1.17234 1.82554 1.17234 2.4672L1.1665 12.9672L3.49984 10.6339H11.6665C12.3082 10.6339 12.8332 10.1089 12.8332 9.4672V2.4672C12.8332 1.82554 12.3082 1.30054 11.6665 1.30054H2.33317ZM3.49984 7.13387H8.1665V8.30054H3.49984V7.13387ZM3.49984 5.38387H10.4998V6.55054H3.49984V5.38387ZM3.49984 3.63387H10.4998V4.80054H3.49984V3.63387Z",fill:"#97A3B7"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_189_1728"},T.createElement("rect",{width:14,height:14,fill:"white",transform:"translate(0 0.133789)"})))),dw=e=>T.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_3803_129233)"},T.createElement("path",{d:"M7.3335 4.66683H8.66683V6.00016H7.3335V4.66683ZM7.3335 7.3335H8.66683V11.3335H7.3335V7.3335ZM8.00016 1.3335C4.32016 1.3335 1.3335 4.32016 1.3335 8.00016C1.3335 11.6802 4.32016 14.6668 8.00016 14.6668C11.6802 14.6668 14.6668 11.6802 14.6668 8.00016C14.6668 4.32016 11.6802 1.3335 8.00016 1.3335ZM8.00016 13.3335C5.06016 13.3335 2.66683 10.9402 2.66683 8.00016C2.66683 5.06016 5.06016 2.66683 8.00016 2.66683C10.9402 2.66683 13.3335 5.06016 13.3335 8.00016C13.3335 10.9402 10.9402 13.3335 8.00016 13.3335Z",fill:"#6F7C90"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_3803_129233"},T.createElement("rect",{width:16,height:16,fill:"white"})))),fw=({analysisData:e,isAdmin:t=!1,smIds:n,conversationId:r,showGoToApp:o=!1,redirectToAdmin:s,goToApps:a,hideTooltip:i,sendTrackingEvent:c})=>{const[l,f]=w.useState(!1),m=w.useRef(!1),[b,v]=w.useState(!1),[y,p]=w.useState([]),{mutate:h,isPending:g}=RI(),{logoUrl:C,cardTitle:x,id:I,externalResourceId:E,connectorId:_,textToHighlight:A}=e.cardData||{},S=w.useMemo(()=>({key:A,card_id:I,card_title:x,connector_id:_,external_resource_id:E,conversation_id:r,sm_id:n[0],all_sm_ids:n}),[A,I,x,_,E,r,n]);if(w.useEffect(()=>{const X=Date.now();return()=>{c(un.DATA_CARD_DURATION,{...S,duration:Date.now()-X})}},[c]),w.useEffect(()=>{var q,se,de;const X=(de=(se=(q=e==null?void 0:e.cardData)==null?void 0:q.data)==null?void 0:se.flatDetails)==null?void 0:de.data;if(X){const B=X.sort((P,W)=>P.priority-W.priority);p(B),c(un.OBJECT_HOVERED,S)}},[e,c,S]),!y||y.length===0)return null;const L=()=>{f(!0),c(un.FEEDBACK_OPTION_CLICKED,S)},k=()=>{v(!0),c(un.NEGATIVE_FEEDBACK_CLICKED,S)},D=X=>{const q={card_id:I,entity_id:E,comment:X.feedbackComment,option:X.feedbackOption,feedback_type:"entity_extraction"};typeof X.isThumbsUp<"u"&&(q.positive_feedback=X.isThumbsUp),h({conversationId:r,feedbackData:q},{onSuccess:()=>{l?c(un.FEEDBACK_OPTION_SUBMITTED,S):b&&c(un.NEGATIVE_FEEDBACK_SUBMITTED,S),f(!1),v(!1),_e({message:JI,type:on})},onError:()=>{_e({message:qI,type:Je})}})},N=()=>{D({isThumbsUp:!0}),c(un.POSITIVE_FEEDBACK_CLICKED,S)},M=X=>{D({...X,isThumbsUp:!1})},V=()=>{s==null||s(_),i()},J=()=>{a==null||a()},$=X=>{c(un.PERMALINK_CLICKED,{...S,clicked_value:X})},H=()=>{m.current||(c(un.DATA_CARD_SCROLLED,S),m.current=!0)};return u.jsxs(u.Fragment,{children:[u.jsxs(KI,{children:[u.jsxs(rw,{onScroll:H,children:[u.jsxs(ew,{children:[u.jsxs(d.Stack,{flexDirection:"row",alignItems:"center",style:{height:"100%"},children:[C&&u.jsx("img",{src:C,alt:"Logo",style:{marginRight:8},height:18,width:18}),u.jsx(d.Tooltip,{title:x,arrow:!0,placement:"top",children:u.jsx(tw,{variant:"h3",color:d.theme.palette.gray.black,width:o?"100px":"200px",children:x})})]}),o?u.jsx(cw,{variant:"text",size:"small",endIcon:u.jsx(d.icons.ArrowForward,{}),onClick:J,children:GI}):null]}),u.jsx(nw,{}),u.jsx(d.Box,{paddingY:"16px",children:y.map(({key:X,value:q,label:se,deepLink:de})=>u.jsxs(aw,{children:[u.jsxs(ow,{children:[se,":"]}),u.jsx(d.Tooltip,{title:(q==null?void 0:q.length)>rl?q:"",arrow:!0,placement:"top",children:de?u.jsx(d.Link,{href:de,target:"_blank",rel:"noopener noreferrer",style:{textDecoration:"none",color:d.theme.palette.primary.main},onClick:()=>$(q),children:Fd(q||"N/A",rl)}):u.jsx(sw,{children:Fd(q||"N/A",rl)})})]},X))})]}),u.jsxs(iw,{children:[u.jsx(d.Stack,{flexDirection:"row",alignItems:"center",children:t?u.jsx(qo,{arrow:!0,title:BI,placement:"top",children:u.jsx(d.IconButton,{onClick:V,children:u.jsx(lw,{})})}):u.jsxs(u.Fragment,{children:[u.jsx(d.Typography,{color:d.theme.palette.gray.gray3,fontSize:12,children:HI}),u.jsx(qo,{arrow:!0,title:VI,placement:"top",children:u.jsx(d.IconButton,{size:"small",children:u.jsx(dw,{})})})]})}),u.jsxs(d.Stack,{flexDirection:"row",alignItems:"center",children:[u.jsx(qo,{arrow:!0,title:MI,placement:"top",children:u.jsx(d.IconButton,{size:"small",disabled:g,onClick:N,children:u.jsx(Sp,{})})}),u.jsx(qo,{arrow:!0,title:PI,placement:"top",children:u.jsx(d.IconButton,{size:"small",disabled:g,onClick:k,children:u.jsx(Ap,{})})}),u.jsx(qo,{arrow:!0,title:jI,placement:"top",children:u.jsx(d.IconButton,{onClick:L,size:"small",disabled:g,children:u.jsx(uw,{})})})]})]})]}),u.jsx(fr,{shown:l,setShown:f,borderRadius:12,sx:{zIndex:15002},children:u.jsx(_p,{onCancel:()=>f(!1),onSubmit:D,isLoading:g,showOptions:!1,title:ZI})}),u.jsx(fr,{shown:b,setShown:v,borderRadius:12,sx:{zIndex:15002},children:u.jsx(_p,{onCancel:()=>v(!1),onSubmit:M,isLoading:g,title:WI})})]})},Tp=(e,t,n,r=10)=>e>=n.left-r&&e<=n.right+r&&t>=n.top-r&&t<=n.bottom+r,Lp=(e,t=350,n=400)=>{const r=e.getBoundingClientRect(),o=window.innerHeight,s=window.innerWidth,a=r.top,i=o-r.bottom;return i>=t||i>a?r.left<n/2?"bottom-start":s-r.right<n/2?"bottom-end":"bottom":r.left<n/2?"top-start":s-r.right<n/2?"top-end":"top"},pw=d.styled(({className:e,...t})=>u.jsx(d.Tooltip,{...t,classes:{popper:e}}))(()=>({[`& .${d.tooltipClasses.tooltip}`]:{backgroundColor:"#fff",padding:0,maxWidth:"288px",width:"288px",maxHeight:"300px",overflowY:"auto",borderRadius:"12px",boxShadow:"0px 0px 8px 0px #04060F14",border:`1px solid ${d.theme.palette.gray.gray6}`,position:"relative"}}));function hw({elements:e,title:t,onKeyChange:n}){const[r,o]=w.useState(!1),[s,a]=w.useState(null),[i,c]=w.useState(""),[l,f]=w.useState("bottom"),[m,b]=w.useState(!1),v=w.useRef(null),y=w.useRef({x:0,y:0}),p=w.useCallback(()=>{v.current&&(clearTimeout(v.current),v.current=null)},[]);w.useEffect(()=>{if(e&&e.length>0){const E=S=>{const L=S.currentTarget,k=L.textContent||"",D=Lp(L);f(D),c(k),n&&n(k),a(L),o(!0)},_=()=>{if(r&&s){const S=Lp(s);f(S)}},A=S=>{if(y.current={x:S.clientX,y:S.clientY},!r||m)return;const L=S.clientX,k=S.clientY;let D=!1;for(const N of e)if(Tp(L,k,N.getBoundingClientRect())){D=!0;break}if(!D){const N=document.querySelector(`.${d.tooltipClasses.tooltip}`);N&&Tp(L,k,N.getBoundingClientRect())&&(D=!0)}D||(o(!1),a(null))};return e.forEach(S=>{S.addEventListener("mouseenter",E)}),window.addEventListener("resize",_),window.addEventListener("scroll",_),document.addEventListener("mousemove",A),()=>{e.forEach(S=>{S.removeEventListener("mouseenter",E)}),window.removeEventListener("resize",_),window.removeEventListener("scroll",_),document.removeEventListener("mousemove",A),p()}}},[e,n,r,s,m,p]);const h=()=>{b(!0),p()},g=()=>{b(!1),v.current=setTimeout(()=>{o(!1),a(null)},150)},x=typeof t=="function"?t(i,()=>{o(!1),a(null)}):t,I=u.jsx("div",{onMouseEnter:h,onMouseLeave:g,children:x});return u.jsx(pw,{title:I,open:r,placement:l,disableInteractive:!1,PopperProps:{anchorEl:s,modifiers:[{name:"preventOverflow",options:{boundary:window}}]},children:u.jsx("span",{})})}const gw=({conversationId:e,hasSmList:t,smIds:n,isAdmin:r,goToApps:o,redirectToAdmin:s,sendTrackingEvent:a})=>{const[i,c]=w.useState(null),[l,f]=w.useState([]),{data:m,isError:b}=DI(e,t,n);return w.useEffect(()=>{m?c(m):b&&c(null)},[m,b]),w.useEffect(()=>{let v=null;if(i&&Object.keys(i).length&&e){v=new NI(Object.keys(i)||[],f);const y=Object.keys(i).map(p=>{var g;const h=((g=i[p])==null?void 0:g.cardData)||{};return{key:p,card_title:h.cardTitle,connector_id:h.connectorId}});a(un.OBJECT_HIGHLIGHTED,{conversation_id:e,sm_id:n[0],all_sm_ids:n,cards:y})}return()=>{v&&v.destroy(),window.tooltipCleanup&&delete window.tooltipCleanup}},[i,e,a,n]),u.jsx("div",{children:u.jsx(hw,{elements:l,title:(v,y)=>{var p;return!i||!v||!((p=i[v])!=null&&p.cardData)?u.jsx(d.Typography,{variant:"body2",color:d.theme.palette.gray.gray6,children:"Loading data..."}):u.jsx(fw,{smIds:n,conversationId:e||"",analysisData:i[v],isAdmin:r,redirectToAdmin:s,goToApps:o,hideTooltip:y,sendTrackingEvent:a})}})})},mw=({children:e})=>u.jsx(Qi,{store:el,children:u.jsx(d.HiverProvider,{custom:!0,children:u.jsx(Kc,{children:u.jsx(w.Suspense,{fallback:u.jsx(u.Fragment,{}),children:e})})})}),bw=({conversationId:e,hasSmList:t,smIds:n,isAdmin:r,connectorFunctions:o})=>u.jsx(tl,{children:u.jsxs(mw,{children:[u.jsx(gw,{hasSmList:t,smIds:n,conversationId:e,isAdmin:r,goToApps:o.goToApps,redirectToAdmin:o.redirectToAdmin,sendTrackingEvent:o.sendTrackingEvent}),Re.createPortal(u.jsx(nl,{id:"toast-message",children:u.jsx(Xa,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0})}),document.body)]})}),Op={OPEN_CREATE_FORM:"OPEN_CREATE_FORM"},yw=({conversationId:e,openCreateForm:t})=>n=>{n.conversationId===e&&t()};class Cw{constructor({processDelay:t=1e3}){De(this,"_processDelay");De(this,"initialized",!1);De(this,"_queue",[]);De(this,"_queueProps",{conversationId:NaN,openCreateForm:()=>{}});De(this,"ACTIONS",Op);this._processDelay=t}register(t){this._queueProps=t,!this.initialized&&(this.initialized=!0,this._delay(this._processDelay).then(()=>this._process()))}add(t){this._queue.push(t),this._process()}_delay(t){return new Promise(n=>setTimeout(n,t))}_process(){if(this.initialized)for(;this._queue.length>0;){const t=this._queue.shift();if(t)switch(t.type){case Op.OPEN_CREATE_FORM:yw(this._queueProps)(t.payload);break}}}destroy(){this._queueProps={conversationId:NaN,openCreateForm:()=>{}},this.initialized=!1}}var ve=(e=>(e.NOT_LOGGED="NOT_LOGGED",e.PENDING="PENDING",e.LOGGED="LOGGED",e.ERROR="ERROR",e.UNAUTHENTICATED="UNAUTHENTICATED",e.PAUSED="PAUSED",e))(ve||{}),Oa=(e=>(e.ENABLED="enabled",e.UNAUTHENTICATED="unauthenticated",e.DISABLED="disabled",e))(Oa||{});const xw=e=>{const t=[],n={};for(const r of e){const o=n[r.entityType];if(o===void 0){const s={type:r.entityType,entities:[r]};n[r.entityType]=t.length,t.push(s)}else t[o].entities.push(r)}return t},vw=e=>{const{emailLogSettings:t,messageLogStatus:n,selectedEntities:r,autoLogEnabled:o}=e;return t.connectorStatus===Oa.UNAUTHENTICATED?ve.UNAUTHENTICATED:n.pending>0?ve.PENDING:n.failed?ve.ERROR:r.length===0?ve.NOT_LOGGED:o?ve.LOGGED:ve.PAUSED},ol=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:14,height:14,viewBox:"0 0 14 14",fill:"#D24B58",...e},T.createElement("path",{d:"M6.3335 8.99967H7.66683V10.333H6.3335V8.99967ZM6.3335 3.66634H7.66683V7.66634H6.3335V3.66634ZM6.9935 0.333008C3.3135 0.333008 0.333496 3.31967 0.333496 6.99967C0.333496 10.6797 3.3135 13.6663 6.9935 13.6663C10.6802 13.6663 13.6668 10.6797 13.6668 6.99967C13.6668 3.31967 10.6802 0.333008 6.9935 0.333008ZM7.00016 12.333C4.0535 12.333 1.66683 9.94634 1.66683 6.99967C1.66683 4.05301 4.0535 1.66634 7.00016 1.66634C9.94683 1.66634 12.3335 4.05301 12.3335 6.99967C12.3335 9.94634 9.94683 12.333 7.00016 12.333Z"})),Ew=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:10,viewBox:"0 0 12 10",fill:"none",...e},T.createElement("path",{d:"M4.0001 8.0299L1.2201 5.2499L0.273438 6.1899L4.0001 9.91656L12.0001 1.91656L11.0601 0.976562L4.0001 8.0299Z",fill:"white"})),Iw=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:18,viewBox:"0 0 19 18",fill:"#6F7C90",...e},T.createElement("g",{clipPath:"url(#clip0_532_206243)"},T.createElement("path",{d:"M9.94092 3V0.75L6.94092 3.75L9.94092 6.75V4.5C12.4234 4.5 14.4409 6.5175 14.4409 9C14.4409 9.7575 14.2534 10.4775 13.9159 11.1L15.0109 12.195C15.5959 11.2725 15.9409 10.1775 15.9409 9C15.9409 5.685 13.2559 3 9.94092 3ZM9.94092 13.5C7.45842 13.5 5.44092 11.4825 5.44092 9C5.44092 8.2425 5.62842 7.5225 5.96592 6.9L4.87092 5.805C4.28592 6.7275 3.94092 7.8225 3.94092 9C3.94092 12.315 6.62592 15 9.94092 15V17.25L12.9409 14.25L9.94092 11.25V13.5Z"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_532_206243"},T.createElement("rect",{width:18,height:18,fill:"white",transform:"translate(0.940918)"})))),ww=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,viewBox:"0 0 18 18",fill:"none",...e},T.createElement("g",{clipPath:"url(#clip0_1_11813)"},T.createElement("path",{d:"M9.05859 0C4.09059 0 0.0585938 4.032 0.0585938 9C0.0585938 13.968 4.09059 18 9.05859 18C14.0266 18 18.0586 13.968 18.0586 9C18.0586 4.032 14.0266 0 9.05859 0ZM8.15859 12.6H6.35859V5.4H8.15859V12.6ZM11.7586 12.6H9.95859V5.4H11.7586V12.6Z",fill:"#F2A579"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_1_11813"},T.createElement("rect",{width:18,height:18,fill:"white"})))),Fa=d.keyframes`
2306
+ `,Sp=e=>T.createElement("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M7.87354 2.73877C7.87354 2.30139 7.53821 1.94227 7.11084 1.90381L5.09229 6.44775C5.06387 6.51167 5.02799 6.57074 4.98975 6.62744V12.3667H10.4722C11.0395 12.3665 11.5225 11.9529 11.6089 11.3921L12.2368 7.30811C12.3437 6.61168 11.8047 5.98395 11.1001 5.98389H9.05615C8.40276 5.98371 7.87354 5.45372 7.87354 4.80029V2.73877ZM2.07275 11.8003C2.07275 12.1133 2.32718 12.3667 2.64014 12.3667H3.78955V7.1499H2.64014C2.32718 7.1499 2.07275 7.40432 2.07275 7.71729V11.8003ZM9.07275 4.78369H11.1001C12.5403 4.78375 13.6412 6.0673 13.4224 7.49072L12.7944 11.5747C12.6179 12.7208 11.6318 13.5667 10.4722 13.5669H2.64014C1.66443 13.5669 0.873535 12.776 0.873535 11.8003V7.71729C0.873535 6.74158 1.66443 5.95068 2.64014 5.95068H3.99951L6.04834 1.34131L6.12256 1.20166C6.31844 0.892431 6.66142 0.700708 7.03467 0.700684C8.16045 0.700684 9.07275 1.61299 9.07275 2.73877V4.78369Z",fill:"#97A3B7"})),Ap=e=>T.createElement("svg",{width:13,height:14,viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M11.8008 3.16651C11.8008 2.83026 11.7996 2.61407 11.7861 2.44972C11.7733 2.29228 11.7516 2.23558 11.7383 2.20948C11.684 2.10311 11.5976 2.0167 11.4912 1.96241C11.4651 1.94911 11.4084 1.92742 11.251 1.91456C11.0866 1.90113 10.8698 1.89991 10.5332 1.89991H10.084V7.11671H10.5332C10.8697 7.11671 11.0866 7.11647 11.251 7.10304C11.4084 7.09017 11.4651 7.06848 11.4912 7.05519C11.5977 7.00085 11.684 6.91369 11.7383 6.80714C11.7516 6.78095 11.7733 6.72473 11.7861 6.56788C11.7996 6.40344 11.8008 6.18671 11.8008 5.85011V3.16651ZM6.00001 11.5288C6.00014 11.9658 6.33491 12.3239 6.76173 12.3628L8.68946 8.02784C8.73905 7.91626 8.79776 7.77463 8.8838 7.6421V1.89991H4.30275C3.86739 1.89991 3.57385 1.9011 3.34571 1.91847C3.12524 1.93527 3.00982 1.96482 2.92677 2.00245C2.72742 2.09281 2.55809 2.23906 2.43849 2.42237C2.38875 2.49873 2.34108 2.60774 2.29103 2.82276C2.23917 3.04561 2.19414 3.33583 2.12794 3.76612L1.82325 5.74952C1.73618 6.31551 1.67724 6.70248 1.65724 7.00245C1.63765 7.29653 1.66125 7.4439 1.69923 7.54347C1.79436 7.79282 1.97309 8.00139 2.20509 8.13331C2.29773 8.18598 2.43978 8.23198 2.73341 8.25733C3.03294 8.28318 3.42441 8.2837 3.99708 8.2837H4.46681C4.62026 8.2837 4.77205 8.28306 4.89943 8.29347C5.00019 8.30172 5.11526 8.31839 5.23439 8.36085L5.3545 8.41261L5.51271 8.51026C5.61292 8.58313 5.70157 8.67078 5.77443 8.77101L5.8711 8.93019L5.92286 9.0503C5.96524 9.1694 5.98202 9.28456 5.99025 9.38526C6.00063 9.51256 6.00001 9.66359 6.00001 9.8169V11.5288ZM13 5.85011C13 6.1669 13.0008 6.44089 12.9824 6.66554C12.9635 6.89709 12.9214 7.12868 12.8076 7.35206C12.6383 7.68439 12.3684 7.95514 12.0361 8.12452C11.8127 8.23838 11.5803 8.2804 11.3486 8.29933C11.124 8.31767 10.8499 8.3169 10.5332 8.3169H10.0899C9.97739 8.31691 9.91771 8.31637 9.87501 8.31886C9.85536 8.35692 9.83103 8.41194 9.78517 8.51515L7.82521 12.9263C7.6519 13.3159 7.26532 13.5669 6.83888 13.5669C5.71318 13.5669 4.80093 12.6545 4.80079 11.5288V9.8169C4.80079 9.64881 4.799 9.55553 4.79396 9.48878C4.72728 9.48383 4.63383 9.4839 4.46681 9.4839H3.99708C3.44579 9.4839 2.99395 9.48395 2.63087 9.45265C2.26202 9.42082 1.92186 9.35223 1.61232 9.17628C1.13824 8.90671 0.772529 8.48073 0.578136 7.9712C0.451217 7.63844 0.43534 7.29185 0.459972 6.92237C0.484222 6.55869 0.552876 6.11195 0.63673 5.5669L0.942394 3.58351C1.00581 3.17132 1.05751 2.82883 1.12208 2.55128C1.18838 2.26634 1.27691 2.00629 1.4336 1.76612C1.67803 1.39152 2.02424 1.0943 2.43165 0.909678C2.69285 0.791323 2.96319 0.743407 3.25489 0.721201C3.53908 0.699573 3.8856 0.700693 4.30275 0.700693H10.5332C10.8499 0.700693 11.124 0.69993 11.3486 0.718272C11.5803 0.737198 11.8127 0.779216 12.0361 0.893076C12.3683 1.06241 12.6383 1.33244 12.8076 1.66456C12.9215 1.88802 12.9635 2.12041 12.9824 2.35206C13.0008 2.57656 13 2.85001 13 3.16651V5.85011Z",fill:"#97A3B7"})),lw=e=>T.createElement("svg",{width:15,height:15,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M6.02637 0.261719C6.91006 0.100716 7.81654 0.108586 8.69727 0.285156C8.77943 0.301685 8.85737 0.335356 8.92578 0.383789C8.99413 0.432207 9.05187 0.494446 9.09473 0.566406L10.1699 2.37109L12.2686 2.40137C12.3521 2.40267 12.4348 2.42105 12.5107 2.45605C12.5866 2.49114 12.6547 2.5417 12.71 2.60449L12.9268 2.8623C13.4177 3.47393 13.8044 4.1638 14.0703 4.90332H14.0713C14.1006 4.98499 14.1111 5.07276 14.1035 5.15918C14.0958 5.24545 14.0694 5.32914 14.0264 5.4043L13.0107 7.17676L14.0654 8.97949C14.1089 9.05374 14.1349 9.13706 14.1436 9.22266C14.1522 9.30829 14.143 9.39509 14.1152 9.47656C13.8308 10.316 13.3846 11.0919 12.8008 11.7588C12.7442 11.8235 12.6731 11.8748 12.5947 11.9102C12.5163 11.9454 12.4307 11.9644 12.3447 11.9639L10.2559 11.9512L9.22656 13.7188C9.18293 13.7935 9.12263 13.8576 9.05176 13.9072C8.98094 13.9567 8.90045 13.9914 8.81543 14.0068C7.9318 14.1675 7.02506 14.1583 6.14453 13.9814L6.14355 13.9824C6.0797 13.9694 6.01838 13.9446 5.96191 13.9121C5.87332 13.8615 5.7985 13.7897 5.74609 13.7021L4.67188 11.8955L2.56934 11.8682C2.48571 11.8669 2.4031 11.8485 2.32715 11.8135C2.25108 11.7784 2.18323 11.727 2.12793 11.6641C1.60736 11.0751 1.18875 10.4045 0.888672 9.67969L0.767578 9.36621C0.738264 9.28452 0.726773 9.19681 0.734375 9.11035C0.742031 9.02393 0.768379 8.93953 0.811523 8.86426L1.82617 7.0918L0.772461 5.28906C0.729026 5.2148 0.702006 5.1315 0.693359 5.0459C0.684801 4.96052 0.695058 4.87421 0.722656 4.79297C1.00784 3.95289 1.45608 3.17678 2.04102 2.50977C2.09771 2.44503 2.16762 2.39274 2.24609 2.35742C2.32438 2.32222 2.40928 2.30426 2.49512 2.30469L4.58398 2.31543L5.61426 0.549805C5.65789 0.474997 5.71718 0.410066 5.78809 0.360352C5.8591 0.31064 5.94107 0.277156 6.02637 0.261719ZM7.53809 14.0195C7.59898 14.0196 7.65982 14.0181 7.7207 14.0166C7.65982 14.0181 7.59898 14.0196 7.53809 14.0195ZM7.2334 14.0117C7.28581 14.014 7.33818 14.0164 7.39062 14.0176C7.33818 14.0164 7.28581 14.014 7.2334 14.0117ZM7.85742 14.0127C7.89653 14.0109 7.93552 14.0073 7.97461 14.0049C7.93552 14.0073 7.89654 14.0109 7.85742 14.0127ZM6.91113 13.9902C6.97295 13.9958 7.03476 14.0009 7.09668 14.0049C7.03476 14.0009 6.97295 13.9958 6.91113 13.9902ZM6.6543 13.9619C6.6898 13.9665 6.72519 13.9716 6.76074 13.9756C6.72519 13.9716 6.6898 13.9665 6.6543 13.9619ZM5.91016 13.75C5.94027 13.7795 5.97474 13.8051 6.01172 13.8262L5.95898 13.791C5.94197 13.7782 5.92535 13.7649 5.91016 13.75ZM6.58008 12.9414H6.58105H6.58008ZM8.2002 1.41895C7.63858 1.33129 7.06722 1.32543 6.50391 1.40137L5.5127 3.10059C5.45667 3.19686 5.37383 3.27503 5.27539 3.32715C5.21254 3.36088 5.14878 3.39942 5.08594 3.43555L5.08496 3.43457C4.99197 3.48895 4.88605 3.51825 4.77832 3.51758L2.77637 3.50586C2.43354 3.9367 2.15694 4.41647 1.95508 4.92871L2.96875 6.66211H2.96973C3.01013 6.73278 3.03531 6.81132 3.04492 6.8916L3.04883 6.97461C3.04667 7.04613 3.0485 7.11658 3.05078 7.18945C3.0548 7.30124 3.02821 7.41268 2.97266 7.50977L1.99609 9.21289C2.21404 9.7388 2.50744 10.2299 2.86621 10.6719L4.88281 10.7012H4.88379C4.99002 10.7034 5.09368 10.7341 5.18457 10.7891L5.39258 10.9082C5.45916 10.9464 5.51715 10.9978 5.56445 11.0576L5.6084 11.1201L6.6416 12.8486C7.20362 12.9365 7.77513 12.9432 8.33887 12.8672L9.3291 11.1689C9.38528 11.0722 9.46843 10.9926 9.56738 10.9404C9.63017 10.9067 9.69505 10.8701 9.75781 10.834L9.8291 10.7988C9.90336 10.7678 9.98341 10.7514 10.0645 10.752L12.0664 10.7646C12.4092 10.3324 12.6847 9.85062 12.8857 9.33691L11.8711 7.60645L11.8721 7.60547C11.8181 7.51108 11.7903 7.40365 11.792 7.29492L11.791 7.29395C11.7932 7.22206 11.7923 7.15042 11.79 7.07715C11.7862 6.96565 11.8128 6.85466 11.8682 6.75781L12.8438 5.05371C12.6258 4.52811 12.3333 4.03648 11.9746 3.59473L9.95801 3.56641H9.95703C9.85067 3.56414 9.74722 3.53265 9.65625 3.47754V3.47852L9.45898 3.36426L9.39258 3.32129C9.32844 3.27486 9.27351 3.21669 9.23242 3.14844V3.14746L8.2002 1.41895ZM2.4668 11.7559L2.57031 11.7686H2.57129C2.50157 11.7675 2.43246 11.7518 2.36914 11.7227L2.4668 11.7559ZM1.78809 11.082V11.0811V11.082ZM13.0244 11.3203C13.0502 11.2862 13.0774 11.2533 13.1025 11.2188C13.0774 11.2533 13.0502 11.2862 13.0244 11.3203ZM13.2051 11.0713C13.2348 11.0279 13.2643 10.9845 13.293 10.9404C13.2643 10.9845 13.2348 11.0279 13.2051 11.0713ZM9.90918 10.876C9.90231 10.8782 9.89544 10.8803 9.88867 10.8828C9.89545 10.8803 9.90231 10.8782 9.90918 10.876ZM13.3535 10.8447C13.3903 10.7861 13.426 10.7268 13.4609 10.667C13.426 10.7268 13.3903 10.7861 13.3535 10.8447ZM13.5049 10.5928C13.5426 10.5264 13.5789 10.4593 13.6143 10.3916C13.5789 10.4593 13.5426 10.5264 13.5049 10.5928ZM13.6582 10.3066C13.695 10.2337 13.7305 10.1602 13.7646 10.0859C13.7305 10.1602 13.695 10.2337 13.6582 10.3066ZM7.2168 4.04004C7.82858 3.99994 8.43974 4.14269 8.9707 4.44922C9.68176 4.86085 10.2003 5.53844 10.4131 6.33203C10.6256 7.12573 10.5145 7.97155 10.1045 8.68359C9.79803 9.21429 9.34157 9.64291 8.79199 9.91406C8.24214 10.1852 7.62346 10.287 7.01562 10.207C6.40793 10.127 5.83684 9.86895 5.37598 9.46484C4.91529 9.06072 4.58448 8.52844 4.42578 7.93652C4.26721 7.34451 4.28843 6.71808 4.48535 6.1377C4.68236 5.55755 5.04627 5.04792 5.53223 4.6748C6.01845 4.30171 6.60526 4.08027 7.2168 4.04004ZM13.7852 10.041C13.8281 9.94559 13.8697 9.84945 13.9082 9.75195V9.75098C13.8696 9.84876 13.8283 9.94531 13.7852 10.041ZM6.40918 9.95703C6.46044 9.97542 6.51219 9.99222 6.56445 10.0078C6.51219 9.99225 6.46044 9.97539 6.40918 9.95703ZM6.20996 9.87695C6.25096 9.89508 6.2922 9.91244 6.33398 9.92871C6.2922 9.91247 6.25097 9.89505 6.20996 9.87695ZM6.02832 9.79004C6.0678 9.81077 6.10809 9.82969 6.14844 9.84863C6.10808 9.82972 6.06781 9.81074 6.02832 9.79004ZM5.84082 9.68262C5.87596 9.70443 5.9113 9.72578 5.94727 9.74609C5.91128 9.7258 5.87597 9.7044 5.84082 9.68262ZM12.9131 9.53613C12.9421 9.46825 12.9707 9.40012 12.9971 9.33105L12.9961 9.33008C12.9697 9.3993 12.9422 9.46808 12.9131 9.53613ZM5.66602 9.56543C5.7015 9.59105 5.73694 9.61662 5.77344 9.64062C5.73693 9.61664 5.70151 9.59104 5.66602 9.56543ZM1.97461 9.41699C1.99284 9.4575 2.01311 9.49704 2.03223 9.53711C1.98023 9.42813 1.93016 9.31814 1.88477 9.20605L1.97461 9.41699ZM5.59277 9.5127C5.59556 9.51484 5.59877 9.51642 5.60156 9.51855C5.54737 9.47722 5.49386 9.43478 5.44238 9.38965L5.59277 9.5127ZM8.03125 5.33496C7.67547 5.21424 7.29063 5.20159 6.92773 5.29883C6.56509 5.39617 6.23977 5.59952 5.99219 5.88184C5.74452 6.16433 5.58615 6.51424 5.53711 6.88672C5.48824 7.25901 5.54977 7.63783 5.71582 7.97461C5.88202 8.31152 6.14537 8.59145 6.4707 8.7793C6.90703 9.0311 7.42549 9.09913 7.91211 8.96875C8.39876 8.83831 8.81448 8.52031 9.06641 8.08398C9.25414 7.7587 9.3409 7.38453 9.31641 7.00977C9.2918 6.635 9.15631 6.27555 8.92773 5.97754C8.69908 5.67961 8.38685 5.45577 8.03125 5.33496ZM6.17676 8.69922C6.25355 8.76023 6.3343 8.81676 6.41992 8.86621L6.4209 8.86523C6.33525 8.81578 6.2536 8.76024 6.17676 8.69922ZM8.47754 8.83203V8.83105V8.83203ZM5.77637 8.27246C5.83227 8.35318 5.89399 8.4295 5.96094 8.50098L5.86426 8.38965C5.83359 8.35168 5.80422 8.31265 5.77637 8.27246ZM4.52246 7.91113C4.5608 8.0541 4.60948 8.19346 4.66797 8.32812C4.60945 8.19325 4.56083 8.05334 4.52246 7.91016V7.91113ZM9.40039 6.85645C9.40722 6.90519 9.41278 6.95457 9.41602 7.00391C9.41922 7.05311 9.42035 7.1023 9.41992 7.15137C9.42035 7.10204 9.41926 7.05239 9.41602 7.00293C9.41279 6.95379 9.40719 6.90498 9.40039 6.85645ZM11.9004 6.95215C11.8982 6.96247 11.897 6.97295 11.8955 6.9834C11.8971 6.97295 11.8982 6.96247 11.9004 6.95215ZM4.65137 5.97754C4.62849 6.03229 4.60852 6.08831 4.58887 6.14453C4.60851 6.0883 4.6285 6.03229 4.65137 5.97754ZM4.73633 5.79492C4.7241 5.81941 4.71274 5.8443 4.70117 5.86914C4.71273 5.8443 4.72411 5.81941 4.73633 5.79492ZM4.84473 5.59863C4.82627 5.62957 4.80836 5.66078 4.79102 5.69238C4.80835 5.66077 4.82628 5.62957 4.84473 5.59863ZM4.95605 5.42383C4.93113 5.45972 4.90714 5.49624 4.88379 5.5332C4.90712 5.49623 4.93114 5.45973 4.95605 5.42383ZM8.31445 4.27051C8.52443 4.33607 8.72746 4.42504 8.91992 4.53613L8.9209 4.53516C8.72801 4.42379 8.52395 4.33516 8.31348 4.26953L8.31445 4.27051ZM5.09082 5.24609C5.06172 5.28198 5.03326 5.3183 5.00586 5.35547C5.03325 5.31828 5.06173 5.28199 5.09082 5.24609ZM6.63965 5.29199C6.64276 5.29067 6.6463 5.29037 6.64941 5.28906C6.6463 5.29037 6.64276 5.29067 6.63965 5.29199ZM7.9209 5.19824H7.92188H7.9209ZM6.90234 5.20215H6.90332H6.90234ZM5.23145 5.08496C5.19896 5.11965 5.16651 5.15429 5.13574 5.19043C5.1665 5.15428 5.19897 5.11966 5.23145 5.08496ZM13.9766 4.93652V4.9375V4.93652ZM0.922852 4.53613C0.885573 4.63126 0.850299 4.72727 0.817383 4.82422V4.8252C0.850362 4.72803 0.885496 4.63148 0.922852 4.53613ZM2.01855 4.5293H2.01953H2.01855ZM1.04688 4.24316C1.02195 4.29878 0.998013 4.35481 0.974609 4.41113C0.998008 4.35481 1.02196 4.29878 1.04688 4.24316ZM7.22363 4.13965L7.22461 4.14062L7.22363 4.13965ZM7.66699 4.14453L7.66602 4.14355L7.66699 4.14453ZM1.17188 3.97852C1.1445 4.03303 1.11865 4.08828 1.09277 4.14355C1.11864 4.08828 1.14451 4.03304 1.17188 3.97852ZM12.4287 4.0498V4.04883V4.0498ZM12.6348 2.66992V2.6709C12.8546 2.91962 13.0566 3.1828 13.2383 3.45898C13.1171 3.27471 12.987 3.09618 12.8486 2.92383C12.7796 2.83782 12.708 2.75273 12.6348 2.66992ZM1.30859 3.72168C1.28765 3.75921 1.26729 3.79703 1.24707 3.83496C1.26728 3.79703 1.28765 3.75921 1.30859 3.72168ZM2.72656 3.40723V3.4082L4.7793 3.41797V3.41699L2.72656 3.40723ZM12.0234 3.49707C12.0719 3.55591 12.1198 3.61522 12.166 3.67578L12.0234 3.49609L9.95898 3.4668L12.0234 3.49707ZM1.47852 3.43457C1.45114 3.47831 1.42381 3.52205 1.39746 3.56641C1.4238 3.52204 1.45115 3.47831 1.47852 3.43457ZM9.78809 3.43164C9.79329 3.43365 9.79845 3.43566 9.80371 3.4375C9.79845 3.43567 9.79329 3.43365 9.78809 3.43164ZM5.22852 3.23926V3.24023V3.23926ZM1.64746 3.17676C1.61837 3.21879 1.58963 3.26104 1.56152 3.30371C1.58963 3.26104 1.61837 3.21879 1.64746 3.17676ZM2.11523 2.5752H2.11621H2.11523ZM8.94629 0.53418C8.96978 0.559626 8.99096 0.587273 9.00879 0.617188C8.97313 0.557368 8.92497 0.505135 8.86816 0.464844L8.94629 0.53418ZM6.37305 0.307617C6.26302 0.322319 6.15337 0.34041 6.04395 0.360352C6.15337 0.340409 6.26301 0.322304 6.37305 0.307617ZM8.35059 0.325195C8.25055 0.310024 8.15027 0.296933 8.0498 0.286133C8.15027 0.296945 8.25055 0.310026 8.35059 0.325195ZM7.92578 0.275391C7.85971 0.269476 7.79372 0.26282 7.72754 0.258789C7.79372 0.262834 7.85971 0.269466 7.92578 0.275391ZM6.9502 0.255859C6.89287 0.258741 6.83558 0.262311 6.77832 0.266602C6.83559 0.262325 6.89287 0.258726 6.9502 0.255859ZM7.58008 0.25293C7.53418 0.251105 7.4883 0.248968 7.44238 0.248047C7.4883 0.24898 7.53418 0.251094 7.58008 0.25293ZM7.12988 0.249023C7.17448 0.24794 7.21907 0.247302 7.26367 0.24707C7.21907 0.247314 7.17448 0.247928 7.12988 0.249023ZM6.67871 0.274414C6.57668 0.283521 6.47471 0.294033 6.37305 0.307617C6.47471 0.294047 6.57668 0.283499 6.67871 0.274414Z",fill:"#97A3B7"})),uw=e=>T.createElement("svg",{width:14,height:15,viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_189_1728)"},T.createElement("path",{d:"M2.33317 2.4672H11.6665V9.4672H3.01567L2.33317 10.1497V2.4672ZM2.33317 1.30054C1.6915 1.30054 1.17234 1.82554 1.17234 2.4672L1.1665 12.9672L3.49984 10.6339H11.6665C12.3082 10.6339 12.8332 10.1089 12.8332 9.4672V2.4672C12.8332 1.82554 12.3082 1.30054 11.6665 1.30054H2.33317ZM3.49984 7.13387H8.1665V8.30054H3.49984V7.13387ZM3.49984 5.38387H10.4998V6.55054H3.49984V5.38387ZM3.49984 3.63387H10.4998V4.80054H3.49984V3.63387Z",fill:"#97A3B7"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_189_1728"},T.createElement("rect",{width:14,height:14,fill:"white",transform:"translate(0 0.133789)"})))),dw=e=>T.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_3803_129233)"},T.createElement("path",{d:"M7.3335 4.66683H8.66683V6.00016H7.3335V4.66683ZM7.3335 7.3335H8.66683V11.3335H7.3335V7.3335ZM8.00016 1.3335C4.32016 1.3335 1.3335 4.32016 1.3335 8.00016C1.3335 11.6802 4.32016 14.6668 8.00016 14.6668C11.6802 14.6668 14.6668 11.6802 14.6668 8.00016C14.6668 4.32016 11.6802 1.3335 8.00016 1.3335ZM8.00016 13.3335C5.06016 13.3335 2.66683 10.9402 2.66683 8.00016C2.66683 5.06016 5.06016 2.66683 8.00016 2.66683C10.9402 2.66683 13.3335 5.06016 13.3335 8.00016C13.3335 10.9402 10.9402 13.3335 8.00016 13.3335Z",fill:"#6F7C90"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_3803_129233"},T.createElement("rect",{width:16,height:16,fill:"white"})))),fw=({analysisData:e,isAdmin:t=!1,smIds:n,conversationId:r,showGoToApp:o=!1,redirectToAdmin:s,goToApps:a,hideTooltip:i,sendTrackingEvent:c})=>{const[l,f]=w.useState(!1),m=w.useRef(!1),[b,v]=w.useState(!1),[y,p]=w.useState([]),{mutate:h,isPending:g}=RI(),{logoUrl:C,cardTitle:x,id:I,externalResourceId:E,connectorId:_,textToHighlight:A}=e.cardData||{},S=w.useMemo(()=>({key:A,card_id:I,card_title:x,connector_id:_,external_resource_id:E,conversation_id:r,sm_id:n[0],all_sm_ids:n}),[A,I,x,_,E,r,n]);if(w.useEffect(()=>{const X=Date.now();return()=>{c(un.DATA_CARD_DURATION,{...S,duration:Date.now()-X})}},[c]),w.useEffect(()=>{var q,se,de;const X=(de=(se=(q=e==null?void 0:e.cardData)==null?void 0:q.data)==null?void 0:se.flatDetails)==null?void 0:de.data;if(X){const B=X.sort((P,W)=>P.priority-W.priority);p(B),c(un.OBJECT_HOVERED,S)}},[e,c,S]),!y||y.length===0)return null;const L=()=>{f(!0),c(un.FEEDBACK_OPTION_CLICKED,S)},k=()=>{v(!0),c(un.NEGATIVE_FEEDBACK_CLICKED,S)},D=X=>{const q={card_id:I,entity_id:E,comment:X.feedbackComment,option:X.feedbackOption,feedback_type:"entity_extraction"};typeof X.isThumbsUp<"u"&&(q.positive_feedback=X.isThumbsUp),h({conversationId:r,feedbackData:q},{onSuccess:()=>{l?c(un.FEEDBACK_OPTION_SUBMITTED,S):b&&c(un.NEGATIVE_FEEDBACK_SUBMITTED,S),f(!1),v(!1),_e({message:JI,type:on})},onError:()=>{_e({message:qI,type:Je})}})},N=()=>{D({isThumbsUp:!0}),c(un.POSITIVE_FEEDBACK_CLICKED,S)},M=X=>{D({...X,isThumbsUp:!1})},V=()=>{s==null||s(_),i()},J=()=>{a==null||a()},$=X=>{c(un.PERMALINK_CLICKED,{...S,clicked_value:X})},H=()=>{m.current||(c(un.DATA_CARD_SCROLLED,S),m.current=!0)};return u.jsxs(u.Fragment,{children:[u.jsxs(KI,{children:[u.jsxs(rw,{onScroll:H,children:[u.jsxs(ew,{children:[u.jsxs(d.Stack,{flexDirection:"row",alignItems:"center",style:{height:"100%"},children:[C&&u.jsx("img",{src:C,alt:"Logo",style:{marginRight:8},height:18,width:18}),u.jsx(d.Tooltip,{title:x,arrow:!0,placement:"top",children:u.jsx(tw,{variant:"h3",color:d.theme.palette.gray.black,width:o?"100px":"200px",children:x})})]}),o?u.jsx(cw,{variant:"text",size:"small",endIcon:u.jsx(d.icons.ArrowForward,{}),onClick:J,children:GI}):null]}),u.jsx(nw,{}),u.jsx(d.Box,{paddingY:"16px",children:y.map(({key:X,value:q,label:se,deepLink:de})=>u.jsxs(aw,{children:[u.jsxs(ow,{children:[se,":"]}),u.jsx(d.Tooltip,{title:(q==null?void 0:q.length)>ol?q:"",arrow:!0,placement:"top",children:de?u.jsx(d.Link,{href:de,target:"_blank",rel:"noopener noreferrer",style:{textDecoration:"none",color:d.theme.palette.primary.main},onClick:()=>$(q),children:Fd(q||"N/A",ol)}):u.jsx(sw,{children:Fd(q||"N/A",ol)})})]},X))})]}),u.jsxs(iw,{children:[u.jsx(d.Stack,{flexDirection:"row",alignItems:"center",children:t?u.jsx(qo,{arrow:!0,title:BI,placement:"top",children:u.jsx(d.IconButton,{onClick:V,children:u.jsx(lw,{})})}):u.jsxs(u.Fragment,{children:[u.jsx(d.Typography,{color:d.theme.palette.gray.gray3,fontSize:12,children:HI}),u.jsx(qo,{arrow:!0,title:VI,placement:"top",children:u.jsx(d.IconButton,{size:"small",children:u.jsx(dw,{})})})]})}),u.jsxs(d.Stack,{flexDirection:"row",alignItems:"center",children:[u.jsx(qo,{arrow:!0,title:MI,placement:"top",children:u.jsx(d.IconButton,{size:"small",disabled:g,onClick:N,children:u.jsx(Sp,{})})}),u.jsx(qo,{arrow:!0,title:PI,placement:"top",children:u.jsx(d.IconButton,{size:"small",disabled:g,onClick:k,children:u.jsx(Ap,{})})}),u.jsx(qo,{arrow:!0,title:jI,placement:"top",children:u.jsx(d.IconButton,{onClick:L,size:"small",disabled:g,children:u.jsx(uw,{})})})]})]})]}),u.jsx(fr,{shown:l,setShown:f,borderRadius:12,sx:{zIndex:15002},children:u.jsx(_p,{onCancel:()=>f(!1),onSubmit:D,isLoading:g,showOptions:!1,title:ZI})}),u.jsx(fr,{shown:b,setShown:v,borderRadius:12,sx:{zIndex:15002},children:u.jsx(_p,{onCancel:()=>v(!1),onSubmit:M,isLoading:g,title:WI})})]})},Tp=(e,t,n,r=10)=>e>=n.left-r&&e<=n.right+r&&t>=n.top-r&&t<=n.bottom+r,Lp=(e,t=350,n=400)=>{const r=e.getBoundingClientRect(),o=window.innerHeight,s=window.innerWidth,a=r.top,i=o-r.bottom;return i>=t||i>a?r.left<n/2?"bottom-start":s-r.right<n/2?"bottom-end":"bottom":r.left<n/2?"top-start":s-r.right<n/2?"top-end":"top"},pw=d.styled(({className:e,...t})=>u.jsx(d.Tooltip,{...t,classes:{popper:e}}))(()=>({[`& .${d.tooltipClasses.tooltip}`]:{backgroundColor:"#fff",padding:0,maxWidth:"288px",width:"288px",maxHeight:"300px",overflowY:"auto",borderRadius:"12px",boxShadow:"0px 0px 8px 0px #04060F14",border:`1px solid ${d.theme.palette.gray.gray6}`,position:"relative"}}));function hw({elements:e,title:t,onKeyChange:n}){const[r,o]=w.useState(!1),[s,a]=w.useState(null),[i,c]=w.useState(""),[l,f]=w.useState("bottom"),[m,b]=w.useState(!1),v=w.useRef(null),y=w.useRef({x:0,y:0}),p=w.useCallback(()=>{v.current&&(clearTimeout(v.current),v.current=null)},[]);w.useEffect(()=>{if(e&&e.length>0){const E=S=>{const L=S.currentTarget,k=L.textContent||"",D=Lp(L);f(D),c(k),n&&n(k),a(L),o(!0)},_=()=>{if(r&&s){const S=Lp(s);f(S)}},A=S=>{if(y.current={x:S.clientX,y:S.clientY},!r||m)return;const L=S.clientX,k=S.clientY;let D=!1;for(const N of e)if(Tp(L,k,N.getBoundingClientRect())){D=!0;break}if(!D){const N=document.querySelector(`.${d.tooltipClasses.tooltip}`);N&&Tp(L,k,N.getBoundingClientRect())&&(D=!0)}D||(o(!1),a(null))};return e.forEach(S=>{S.addEventListener("mouseenter",E)}),window.addEventListener("resize",_),window.addEventListener("scroll",_),document.addEventListener("mousemove",A),()=>{e.forEach(S=>{S.removeEventListener("mouseenter",E)}),window.removeEventListener("resize",_),window.removeEventListener("scroll",_),document.removeEventListener("mousemove",A),p()}}},[e,n,r,s,m,p]);const h=()=>{b(!0),p()},g=()=>{b(!1),v.current=setTimeout(()=>{o(!1),a(null)},150)},x=typeof t=="function"?t(i,()=>{o(!1),a(null)}):t,I=u.jsx("div",{onMouseEnter:h,onMouseLeave:g,children:x});return u.jsx(pw,{title:I,open:r,placement:l,disableInteractive:!1,PopperProps:{anchorEl:s,modifiers:[{name:"preventOverflow",options:{boundary:window}}]},children:u.jsx("span",{})})}const gw=({conversationId:e,hasSmList:t,smIds:n,isAdmin:r,goToApps:o,redirectToAdmin:s,sendTrackingEvent:a})=>{const[i,c]=w.useState(null),[l,f]=w.useState([]),{data:m,isError:b}=DI(e,t,n);return w.useEffect(()=>{m?c(m):b&&c(null)},[m,b]),w.useEffect(()=>{let v=null;if(i&&Object.keys(i).length&&e){v=new NI(Object.keys(i)||[],f);const y=Object.keys(i).map(p=>{var g;const h=((g=i[p])==null?void 0:g.cardData)||{};return{key:p,card_title:h.cardTitle,connector_id:h.connectorId}});a(un.OBJECT_HIGHLIGHTED,{conversation_id:e,sm_id:n[0],all_sm_ids:n,cards:y})}return()=>{v&&v.destroy(),window.tooltipCleanup&&delete window.tooltipCleanup}},[i,e,a,n]),u.jsx("div",{children:u.jsx(hw,{elements:l,title:(v,y)=>{var p;return!i||!v||!((p=i[v])!=null&&p.cardData)?u.jsx(d.Typography,{variant:"body2",color:d.theme.palette.gray.gray6,children:"Loading data..."}):u.jsx(fw,{smIds:n,conversationId:e||"",analysisData:i[v],isAdmin:r,redirectToAdmin:s,goToApps:o,hideTooltip:y,sendTrackingEvent:a})}})})},mw=({children:e})=>u.jsx(Ui,{store:tl,children:u.jsx(d.HiverProvider,{inter:!0,children:u.jsx(el,{children:u.jsx(w.Suspense,{fallback:u.jsx(u.Fragment,{}),children:e})})})}),bw=({conversationId:e,hasSmList:t,smIds:n,isAdmin:r,connectorFunctions:o})=>u.jsx(nl,{children:u.jsxs(mw,{children:[u.jsx(gw,{hasSmList:t,smIds:n,conversationId:e,isAdmin:r,goToApps:o.goToApps,redirectToAdmin:o.redirectToAdmin,sendTrackingEvent:o.sendTrackingEvent}),Re.createPortal(u.jsx(rl,{id:"toast-message",children:u.jsx(Xa,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0})}),document.body)]})}),Op={OPEN_CREATE_FORM:"OPEN_CREATE_FORM"},yw=({conversationId:e,openCreateForm:t})=>n=>{n.conversationId===e&&t()};class Cw{constructor({processDelay:t=1e3}){De(this,"_processDelay");De(this,"initialized",!1);De(this,"_queue",[]);De(this,"_queueProps",{conversationId:NaN,openCreateForm:()=>{}});De(this,"ACTIONS",Op);this._processDelay=t}register(t){this._queueProps=t,!this.initialized&&(this.initialized=!0,this._delay(this._processDelay).then(()=>this._process()))}add(t){this._queue.push(t),this._process()}_delay(t){return new Promise(n=>setTimeout(n,t))}_process(){if(this.initialized)for(;this._queue.length>0;){const t=this._queue.shift();if(t)switch(t.type){case Op.OPEN_CREATE_FORM:yw(this._queueProps)(t.payload);break}}}destroy(){this._queueProps={conversationId:NaN,openCreateForm:()=>{}},this.initialized=!1}}var ve=(e=>(e.NOT_LOGGED="NOT_LOGGED",e.PENDING="PENDING",e.LOGGED="LOGGED",e.ERROR="ERROR",e.UNAUTHENTICATED="UNAUTHENTICATED",e.PAUSED="PAUSED",e))(ve||{}),Oa=(e=>(e.ENABLED="enabled",e.UNAUTHENTICATED="unauthenticated",e.DISABLED="disabled",e))(Oa||{});const xw=e=>{const t=[],n={};for(const r of e){const o=n[r.entityType];if(o===void 0){const s={type:r.entityType,entities:[r]};n[r.entityType]=t.length,t.push(s)}else t[o].entities.push(r)}return t},vw=e=>{const{emailLogSettings:t,messageLogStatus:n,selectedEntities:r,autoLogEnabled:o}=e;return t.connectorStatus===Oa.UNAUTHENTICATED?ve.UNAUTHENTICATED:n.pending>0?ve.PENDING:n.failed?ve.ERROR:r.length===0?ve.NOT_LOGGED:o?ve.LOGGED:ve.PAUSED},sl=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:14,height:14,viewBox:"0 0 14 14",fill:"#D24B58",...e},T.createElement("path",{d:"M6.3335 8.99967H7.66683V10.333H6.3335V8.99967ZM6.3335 3.66634H7.66683V7.66634H6.3335V3.66634ZM6.9935 0.333008C3.3135 0.333008 0.333496 3.31967 0.333496 6.99967C0.333496 10.6797 3.3135 13.6663 6.9935 13.6663C10.6802 13.6663 13.6668 10.6797 13.6668 6.99967C13.6668 3.31967 10.6802 0.333008 6.9935 0.333008ZM7.00016 12.333C4.0535 12.333 1.66683 9.94634 1.66683 6.99967C1.66683 4.05301 4.0535 1.66634 7.00016 1.66634C9.94683 1.66634 12.3335 4.05301 12.3335 6.99967C12.3335 9.94634 9.94683 12.333 7.00016 12.333Z"})),Ew=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:10,viewBox:"0 0 12 10",fill:"none",...e},T.createElement("path",{d:"M4.0001 8.0299L1.2201 5.2499L0.273438 6.1899L4.0001 9.91656L12.0001 1.91656L11.0601 0.976562L4.0001 8.0299Z",fill:"white"})),Iw=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:18,viewBox:"0 0 19 18",fill:"#6F7C90",...e},T.createElement("g",{clipPath:"url(#clip0_532_206243)"},T.createElement("path",{d:"M9.94092 3V0.75L6.94092 3.75L9.94092 6.75V4.5C12.4234 4.5 14.4409 6.5175 14.4409 9C14.4409 9.7575 14.2534 10.4775 13.9159 11.1L15.0109 12.195C15.5959 11.2725 15.9409 10.1775 15.9409 9C15.9409 5.685 13.2559 3 9.94092 3ZM9.94092 13.5C7.45842 13.5 5.44092 11.4825 5.44092 9C5.44092 8.2425 5.62842 7.5225 5.96592 6.9L4.87092 5.805C4.28592 6.7275 3.94092 7.8225 3.94092 9C3.94092 12.315 6.62592 15 9.94092 15V17.25L12.9409 14.25L9.94092 11.25V13.5Z"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_532_206243"},T.createElement("rect",{width:18,height:18,fill:"white",transform:"translate(0.940918)"})))),ww=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,viewBox:"0 0 18 18",fill:"none",...e},T.createElement("g",{clipPath:"url(#clip0_1_11813)"},T.createElement("path",{d:"M9.05859 0C4.09059 0 0.0585938 4.032 0.0585938 9C0.0585938 13.968 4.09059 18 9.05859 18C14.0266 18 18.0586 13.968 18.0586 9C18.0586 4.032 14.0266 0 9.05859 0ZM8.15859 12.6H6.35859V5.4H8.15859V12.6ZM11.7586 12.6H9.95859V5.4H11.7586V12.6Z",fill:"#F2A579"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_1_11813"},T.createElement("rect",{width:18,height:18,fill:"white"})))),Fa=d.keyframes`
2308
2307
  from {
2309
2308
  transform: rotate(0deg);
2310
2309
  }
2311
2310
  to {
2312
2311
  transform: rotate(360deg);
2313
2312
  }
2314
- `,sl=d.styled(d.Stack)`
2313
+ `,al=d.styled(d.Stack)`
2315
2314
  width: 16px;
2316
2315
  height: 16px;
2317
2316
  border-radius: 50%;
2318
2317
  justify-content: center;
2319
2318
  align-items: center;
2320
- `,_w=d.styled(sl)`
2319
+ `,_w=d.styled(al)`
2321
2320
  background-color: #ffe250;
2322
- `,Sw=d.styled(sl)`
2321
+ `,Sw=d.styled(al)`
2323
2322
  background-color: #00bc7e;
2324
- `,Aw=d.styled(sl)`
2323
+ `,Aw=d.styled(al)`
2325
2324
  animation: ${Fa} 1s linear infinite;
2326
2325
  animation-fill-mode: backwards;
2327
2326
  animation-direction: reverse;
2328
- `,Tw={[ve.NOT_LOGGED]:u.jsx(_w,{children:u.jsx(up,{})}),[ve.PENDING]:u.jsx(Aw,{children:u.jsx(Iw,{})}),[ve.LOGGED]:u.jsx(Sw,{children:u.jsx(Ew,{})}),[ve.ERROR]:u.jsx(ol,{}),[ve.UNAUTHENTICATED]:u.jsx(ol,{}),[ve.PAUSED]:u.jsx(ww,{})},Fp=d.styled(d.Typography)`
2327
+ `,Tw={[ve.NOT_LOGGED]:u.jsx(_w,{children:u.jsx(up,{})}),[ve.PENDING]:u.jsx(Aw,{children:u.jsx(Iw,{})}),[ve.LOGGED]:u.jsx(Sw,{children:u.jsx(Ew,{})}),[ve.ERROR]:u.jsx(sl,{}),[ve.UNAUTHENTICATED]:u.jsx(sl,{}),[ve.PAUSED]:u.jsx(ww,{})},Fp=d.styled(d.Typography)`
2329
2328
  font-size: 12px;
2330
2329
  line-height: 14px;
2331
2330
  font-weight: 500;
2332
2331
  color: #4d596c;
2333
2332
  `,Lw=d.styled(Fp)`
2334
2333
  color: #6f7c90;
2335
- `,al=e=>u.jsx(Fp,{children:e}),il=e=>u.jsx(Lw,{children:e}),Ow={[ve.NOT_LOGGED]:al,[ve.PENDING]:il,[ve.LOGGED]:al,[ve.PAUSED]:al,[ve.ERROR]:il,[ve.UNAUTHENTICATED]:il},Fw={[ve.NOT_LOGGED]:"Sync conversation",[ve.PENDING]:"Syncing in progress",[ve.LOGGED]:"Synced",[ve.PAUSED]:"Synced",[ve.ERROR]:"Syncing failed",[ve.UNAUTHENTICATED]:"Sync conversation"},qt=w.createContext({}),kw=d.styled(({className:e,...t})=>u.jsx(d.Tooltip,{...t,classes:{popper:e}}))(()=>({[`& .${d.tooltipClasses.tooltip}`]:{backgroundColor:"#fff",padding:0,maxWidth:"288px",width:"288px",height:"405px",overflowY:"auto",borderRadius:"12px",boxShadow:"0px 0px 8px 0px #04060F14",border:`1px solid ${d.theme.palette.gray.gray6}`,position:"relative"}})),Dw=d.styled(d.Box)`
2334
+ `,il=e=>u.jsx(Fp,{children:e}),cl=e=>u.jsx(Lw,{children:e}),Ow={[ve.NOT_LOGGED]:il,[ve.PENDING]:cl,[ve.LOGGED]:il,[ve.PAUSED]:il,[ve.ERROR]:cl,[ve.UNAUTHENTICATED]:cl},Fw={[ve.NOT_LOGGED]:"Sync conversation",[ve.PENDING]:"Syncing in progress",[ve.LOGGED]:"Synced",[ve.PAUSED]:"Synced",[ve.ERROR]:"Syncing failed",[ve.UNAUTHENTICATED]:"Sync conversation"},qt=w.createContext({}),kw=d.styled(({className:e,...t})=>u.jsx(d.Tooltip,{...t,classes:{popper:e}}))(()=>({[`& .${d.tooltipClasses.tooltip}`]:{backgroundColor:"#fff",padding:0,maxWidth:"288px",width:"288px",height:"405px",overflowY:"auto",borderRadius:"12px",boxShadow:"0px 0px 8px 0px #04060F14",border:`1px solid ${d.theme.palette.gray.gray6}`,position:"relative"}})),Dw=d.styled(d.Box)`
2336
2335
  width: fit-content;
2337
2336
  height: fit-content;
2338
2337
  `,Nw=({children:e,renderTooltip:t,defaultOpen:n})=>{const[r,o]=w.useState(n),s=()=>o(!1),a=()=>o(!0),i=c=>{c.stopPropagation()};return u.jsx(d.ClickAwayListener,{onClickAway:s,children:u.jsx(Dw,{onClick:a,children:u.jsx(kw,{open:r,disableHoverListener:!0,disableFocusListener:!0,disableTouchListener:!0,title:u.jsx(d.Box,{onClick:i,height:"100%",children:t({close:s})}),placement:"bottom-start",PopperProps:{modifiers:[{name:"preventOverflow",options:{boundary:window}}]},children:e})})})},Rw="Turn off to stop syncing this conversation.",Mw="Turn on to continue syncing this conversation.",Pw="Authentication failed",jw="Retry authentication to use this functionality and save in ':connectorName'",Bw="Reach out to your admin to reauthenticate :connectorName",Vw="Syncing this conversation to :connectorName. Refresh the page to see updates.",Gw="Something went wrong while syncing this conversation. Please try again.",Hw="No recommendations found",Ww="Already synced email cannot be removed",Zw="https://cdn.hiverhq.com/connectors-module/assets/sync_conversation_preview.png",Xw="Log this email thread to your CRM",zw="Automatically sync Hiver conversations with your CRM to unify and audit customer records easily.",kp="connector-agent_email-logger_welcomed",Dp="connector-agent_email-logger_welcome_shown",Yw="Tell us how we can improve",Jw="Everything looks good",qw="Something is not working",$w="Please provide your feedback",Qw="Feedback submitted",Uw="Failed to submit feedback",Np="email-logging",Kw=[{label:"Records are not accurate",value:"not_accurate"},{label:"Search is not working",value:"search_not_working"},{label:"Other",value:"other"}],Ft={email_logging_intro_popup_shown:"email_logging_intro_popup_shown",email_logging_intro_popup_continue_clicked:"email_logging_intro_popup_continue_clicked",email_logging_intro_popup_learn_more_clicked:"email_logging_intro_popup_learn_more_clicked",email_logging_log_config_saved:"email_logging_log_config_saved",email_logging_log_config_canceled:"email_logging_log_config_canceled",email_logging_auto_log_enabled:"email_logging_auto_log_enabled",email_logging_auto_log_disabled:"email_logging_auto_log_disabled",email_logging_search_initiated:"email_logging_search_initiated",email_logging_search_results_found:"email_logging_search_results_found",email_logging_search_result_selected:"email_logging_search_result_selected",email_logging_smart_suggestion_initiated:"email_logging_smart_suggestion_initiated",email_logging_smart_suggestion_selected:"email_logging_smart_suggestion_selected",email_logging_smart_suggestion_not_found:"email_logging_smart_suggestion_not_found",email_logging_failed_clicked:"email_logging_failed_clicked"},e_={backgroundColor:"#fff",minWidth:"340px",width:"340px",borderRadius:"8px",boxShadow:"0px 2px 10px 0px #00000026",color:d.theme.palette.gray.gray3,padding:"0px"},t_={color:"#fff !important"},n_=d.styled(d.Stack)`
@@ -2383,7 +2382,7 @@ Do you want to continue?`,vx="Select an object to create",Ex="Select an object t
2383
2382
  align-items: center;
2384
2383
  margin-top: 20px;
2385
2384
  width: 100%;
2386
- `,g_=e=>T.createElement("svg",{width:58,height:26,viewBox:"0 0 58 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M8.9082 1.37598C10.221 0.614497 11.8414 0.614651 13.1543 1.37598L19.9619 5.32422C21.2668 6.08111 22.0702 7.47589 22.0703 8.98438V16.916C22.0703 18.4247 21.2669 19.8192 19.9619 20.5762L13.1543 24.5244C11.8414 25.2858 10.2211 25.2859 8.9082 24.5244L2.10156 20.5762C0.796567 19.8192 -0.00683594 18.4247 -0.00683594 16.916V8.98438C-0.00668786 7.47589 0.796688 6.08111 2.10156 5.32422L8.9082 1.37598ZM11.9531 15.9727C11.9531 17.5841 13.2597 18.8906 14.8711 18.8906V15.3281C14.871 13.7167 13.5645 12.4102 11.9531 12.4102V15.9727ZM7.57617 15.6641C7.57619 17.2755 8.88271 18.582 10.4941 18.582V10.1592C10.4939 8.54793 9.18748 7.24219 7.57617 7.24219V15.6641Z",fill:"#D0D8E3"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M27.4643 7.74676V11.8643C27.8476 11.0201 28.9238 10.6646 29.6462 10.6646C31.4006 10.6646 32.4325 11.8199 32.4325 13.7898V17.0335C32.4325 17.4482 32.0935 17.8037 31.6512 17.8037C31.2384 17.8037 30.914 17.4482 30.914 17.0335V13.8787C30.914 12.7975 30.2359 12.1606 29.3808 12.1606C28.511 12.1606 27.4643 12.6493 27.4643 14.012V17.0335C27.4643 17.4482 27.1252 17.8037 26.6829 17.8037C26.2701 17.8037 25.9458 17.4482 25.9458 17.0335V7.74676C25.9458 7.33204 26.2849 6.97656 26.7272 6.97656C27.1399 6.97656 27.4643 7.33204 27.4643 7.74676ZM33.6052 8.01336C33.6052 7.46534 34.0769 7.05062 34.6224 7.05062C35.1826 7.05062 35.6249 7.46534 35.6249 8.01336C35.6249 8.56139 35.1826 8.97611 34.6224 8.97611C34.0769 8.97611 33.6052 8.56139 33.6052 8.01336ZM35.389 17.0335C35.389 17.4482 35.0499 17.8037 34.6077 17.8037C34.1949 17.8037 33.8705 17.4482 33.8705 17.0335V11.5089C33.8705 11.0941 34.1949 10.7387 34.6077 10.7387C35.0499 10.7387 35.389 11.0941 35.389 11.5089V17.0335ZM42.7241 11.7014L40.4685 17.1076C40.2915 17.5371 39.9967 17.8037 39.5544 17.8037H39.466C39.0237 17.8037 38.7141 17.5371 38.5372 17.1076L36.2963 11.7014C36.1341 11.3163 36.3848 10.8275 36.7976 10.7535C37.1956 10.6794 37.5642 10.872 37.7116 11.2571L39.5102 15.7894L41.3088 11.2571C41.4562 10.872 41.8248 10.6794 42.2228 10.7535C42.6356 10.8275 42.8862 11.3163 42.7241 11.7014ZM44.6044 13.701H48.5996C48.4522 12.6197 47.6708 11.9976 46.6388 11.9976C45.5774 11.9976 44.7518 12.6345 44.6044 13.701ZM50.0886 14.1157C50.0886 14.5156 49.7643 14.8118 49.3957 14.8118H44.6044C44.7518 15.8782 45.6069 16.5447 46.7125 16.5447C47.4349 16.5447 47.8477 16.293 48.349 15.8782C48.5996 15.6709 49.0124 15.5672 49.322 15.819C49.6021 16.0412 49.6168 16.5003 49.3515 16.7817C48.6586 17.5075 47.6561 17.8778 46.6388 17.8778C44.6781 17.8778 43.1006 16.4411 43.1006 14.249C43.1006 12.0569 44.6781 10.6646 46.6388 10.6646C48.5554 10.6646 50.0296 11.9976 50.0886 14.1157ZM54.4162 12.1013C53.1188 12.1013 52.5733 13.4047 52.5733 15.2413V17.0335C52.5733 17.4482 52.2343 17.8037 51.792 17.8037C51.3792 17.8037 51.0548 17.4482 51.0548 17.0335V11.5089C51.0548 11.0941 51.3792 10.7387 51.792 10.7387C52.2343 10.7387 52.5733 11.0941 52.5733 11.5089V12.3975C52.9272 11.1682 53.6053 10.6646 54.4604 10.6646C54.6815 10.6646 54.9027 10.6794 55.1091 10.7239C55.4924 10.8127 55.743 11.1978 55.6545 11.5977C55.5218 12.2642 54.8584 12.1013 54.4162 12.1013Z",fill:"#D0D8E3"})),m_=({isAdmin:e,connectorId:t,connectorName:n,close:r})=>{const o=e?jw:Bw,{connectorFunctions:s}=w.useContext(qt),a=s==null?void 0:s.redirectToAdmin,i=()=>{r(),a==null||a(t)};return u.jsxs(d_,{children:[u.jsx(f_,{children:Pw}),u.jsx(p_,{children:ct(o,{connectorName:n})}),u.jsxs(h_,{children:[u.jsx("div",{children:u.jsx(g_,{})}),e?u.jsx(d.Button,{variant:"contained",size:"small",color:"primary",onClick:i,children:"Authenticate"}):null]})]})},b_=({isAdmin:e,isAuthenticated:t,connectorId:n,connectorName:r,children:o})=>{const[s,a]=w.useState(!0),i=()=>a(!0),c=()=>a(!1);return u.jsx(w1,{onTouchMove:i,onMouseMove:i,onPointerMove:i,title:s&&!t?u.jsx(m_,{isAdmin:e,connectorId:n,connectorName:r,close:c}):"",enterDelay:500,placement:"top",arrow:!0,tooltipStyle:l_,arrowStyle:u_,children:o})},y_=({children:e,isAdmin:t,logSettings:n,status:r,retry:o,renderEntities:s})=>{const{connectorFunctions:a}=w.useContext(qt),i=a==null?void 0:a.sendTrackingEvent,[c,l]=w.useState(()=>localStorage.getItem(kp)==="true"),[f,m]=w.useState(!1),{connectorId:b,connectorName:v,connectorStatus:y}=n??{},p=t||y!==Oa.DISABLED,h=y===Oa.UNAUTHENTICATED,g=r===ve.PENDING,C=()=>{localStorage.setItem(kp,"true"),l(!0),m(!0),i==null||i(Ft.email_logging_intro_popup_continue_clicked,{app_name:v})};return c?h?u.jsx(b_,{connectorId:b,connectorName:v,isAdmin:t,isAuthenticated:!1,children:e}):o?u.jsx(d.Tooltip,{title:Gw,children:e}):g?u.jsx(d.Tooltip,{title:Vw.replace(":connectorName",v),children:e}):s?u.jsx(Nw,{defaultOpen:f,renderTooltip:s,children:e}):u.jsx(u.Fragment,{children:e}):u.jsx(c_,{onContinue:p?C:void 0,connectorName:v,children:e})},C_=e=>T.createElement("svg",{width:124,height:107,viewBox:"0 0 124 107",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M28.6168 54.7446C28.6931 52.5589 31.0146 51.1102 33.0842 51.8174C35.9985 52.8133 40.0375 53.9024 44.0621 54.043C48.0034 54.1806 51.968 53.4097 54.8762 52.6339C57.0264 52.0602 59.2927 53.6932 59.215 55.9172C59.1742 57.0856 58.4742 58.1269 57.3723 58.5178C54.8051 59.4284 49.7633 60.8927 44.3075 60.7022C38.7694 60.5088 33.1999 58.6241 30.4004 57.5311C29.2637 57.0873 28.5742 55.9641 28.6168 54.7446Z",fill:"url(#paint0_linear_8481_102191)"}),T.createElement("path",{d:"M47.223 43.6373C44.4928 30.7926 52.6922 18.1666 65.5368 15.4364C78.3815 12.7062 91.0075 20.9055 93.7377 33.7502L105.079 87.1053L84.1844 91.5466C70.0346 94.5542 56.1258 85.5217 53.1182 71.3719L47.223 43.6373Z",fill:"url(#paint1_linear_8481_102191)"}),T.createElement("mask",{id:"mask0_8481_102191",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:46,y:14,width:60,height:79},T.createElement("path",{d:"M47.223 43.6373C44.4928 30.7926 52.6922 18.1666 65.5368 15.4364C78.3815 12.7062 91.0075 20.9055 93.7377 33.7502L105.079 87.1053L84.1844 91.5466C70.0346 94.5542 56.1258 85.5217 53.1182 71.3719L47.223 43.6373Z",fill:"white"})),T.createElement("g",{mask:"url(#mask0_8481_102191)"},T.createElement("ellipse",{cx:63.7775,cy:46.8684,rx:1.48152,ry:1.39438,transform:"rotate(-12 63.7775 46.8684)",fill:"#435C71"}),T.createElement("rect",{x:47.4368,y:59.3203,width:53.657,height:13.2235,transform:"rotate(-12 47.4368 59.3203)",fill:"url(#paint2_linear_8481_102191)"}),T.createElement("rect",{x:51.1907,y:76.9824,width:53.657,height:10.4263,transform:"rotate(-12 51.1907 76.9824)",fill:"url(#paint3_linear_8481_102191)"})),T.createElement("path",{opacity:.883952,d:"M113.939 51.0679C114.775 55 112.265 58.865 108.333 59.7008L107.842 59.8052C103.639 60.6986 99.5073 58.0155 98.6139 53.8123L97.205 47.1837L105.307 45.4616C109.239 44.6259 113.104 47.1359 113.939 51.0679Z",fill:"url(#paint4_linear_8481_102191)"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M68.7215 66.4138C67.1801 64.8725 67.6745 62.2062 69.587 61.1603C72.4457 59.5969 76.2861 57.1773 79.3785 54.0849C82.4099 51.0535 84.752 47.3461 86.2775 44.5465C87.3388 42.5989 90.0598 42.0819 91.6282 43.6503C92.4782 44.5003 92.758 45.7623 92.2604 46.8566C91.0829 49.4466 88.5191 54.344 84.4346 58.4285C80.2853 62.5778 74.8639 65.591 72.0553 66.9952C70.9363 67.5548 69.6062 67.2985 68.7215 66.4138Z",fill:"url(#paint5_linear_8481_102191)"}),T.createElement("rect",{x:48.7264,y:33.7744,width:11.2108,height:11.2108,rx:5.59457,transform:"rotate(-12 48.7264 33.7744)",fill:"url(#paint6_linear_8481_102191)"}),T.createElement("rect",{x:50.0175,y:35.8193,width:4.0158,height:3.84848,rx:1.92424,transform:"rotate(-12 50.0175 35.8193)",fill:"#435C71"}),T.createElement("rect",{x:59.2875,y:31.5723,width:11.2108,height:11.2108,rx:5.59457,transform:"rotate(-12 59.2875 31.5723)",fill:"#FFFEFE"}),T.createElement("path",{opacity:.883952,d:"M111.25 38.5376C110.415 34.6055 106.55 32.0955 102.618 32.9313L102.127 33.0356C97.9234 33.9291 95.2403 38.0607 96.1337 42.2639L97.5426 48.8925L105.644 47.1705C109.576 46.3347 112.086 42.4696 111.25 38.5376Z",fill:"url(#paint7_linear_8481_102191)"}),T.createElement("rect",{x:60.0181,y:33.8037,width:3.84848,height:3.84848,rx:1.90724,transform:"rotate(-12 60.0181 33.8037)",fill:"#435C71"}),T.createElement("path",{d:"M36.9246 59.1604C36.4487 60.717 34.7371 61.6271 33.1805 61.1512C32.3613 60.9007 31.7241 60.3475 31.3259 59.5987L25.2059 46.7983C24.9784 46.3703 25.1286 45.8788 25.5566 45.6513L28.338 44.1724C28.7659 43.9449 29.2574 44.0951 29.4849 44.5231L36.6496 56.8367C37.0728 57.5036 37.15 58.423 36.9246 59.1604Z",fill:"#FFDF9F"}),T.createElement("rect",{x:27.9973,y:44.333,width:2.39869,height:3.59807,transform:"rotate(152 27.9973 44.333)",fill:"#FF9090"}),T.createElement("path",{d:"M26.6628 44.3769L26.9472 44.9118L28.0169 44.343L26.3106 41.1338L24.171 42.2714L25.0243 43.876C25.6661 43.5347 26.3215 43.7351 26.6628 44.3769Z",fill:"#FFB19F"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.26386 27.248C9.3428 20.4481 16.5101 16.6372 23.31 18.7161C30.11 20.7951 33.9209 27.9624 31.8419 34.7623C29.763 41.5622 22.5956 45.3731 15.7958 43.2942C8.99587 41.2152 5.18493 34.0479 7.26386 27.248ZM9.72157 27.9983C8.06843 33.4055 11.1399 39.1821 16.5471 40.8352C21.9543 42.4884 27.7309 39.4168 29.384 34.0096C31.0372 28.6024 27.9657 22.8258 22.5585 21.1727C17.1513 19.5196 11.3747 22.5911 9.72157 27.9983Z",fill:"#FFE69F"}),T.createElement("circle",{opacity:.414016,cx:19.5529,cy:31.0039,r:10.2804,transform:"rotate(17 19.5529 31.0039)",fill:"#BBDEFC"}),T.createElement("path",{d:"M14.3685 30.6746C15.7299 27.6867 18.9391 25.9803 22.1776 26.5225L22.2595 26.5475C23.7024 26.8095 24.3854 24.8682 23.1497 24.2218C22.3806 23.8074 21.5613 23.557 20.717 23.3884C17.3715 22.9031 14.0553 24.6664 12.6939 27.6543C12.2796 28.4235 12.0859 29.3497 12.0244 30.1372C11.8444 31.6051 13.8607 32.0424 14.4503 30.6997C14.3434 30.7566 14.3685 30.6746 14.3685 30.6746Z",fill:"#F6FBFF"}),T.createElement("path",{d:"M10.2904 29.0679C11.9436 23.6607 17.7202 20.5893 23.1274 22.2424C25.6671 23.0189 27.5785 24.6783 28.9301 26.704C27.7539 24.1048 25.508 22.0744 22.5586 21.1727C17.1514 19.5196 11.3748 22.591 9.72165 27.9982C8.81993 30.9476 9.32924 33.97 10.7444 36.3735C9.82081 34.1203 9.51395 31.6077 10.2904 29.0679Z",fill:"#ADCBE7"}),T.createElement("path",{opacity:.406087,d:"M36.4864 56.8021L36.1373 56.2691C36.3845 56.8563 36.428 57.5516 36.2372 58.1754C35.9273 59.189 34.5593 59.1971 34.0713 58.2806L28.3787 47.5877C28.0534 46.9767 27.3508 46.7619 26.7395 47.0866L25.7206 47.6277L31.4395 59.3516C31.7648 59.9627 32.27 60.5434 32.8706 60.8123C33.7054 61.1528 34.6593 61.1034 35.3726 60.7247C36.0858 60.3459 36.6602 59.5837 36.8444 58.7021C37.0351 58.0783 36.8117 57.4132 36.4864 56.8021Z",fill:"white"}),T.createElement("path",{d:"M29.8826 48.4977C29.8006 48.4726 29.6368 48.4225 29.5799 48.3155L28.1579 45.6411C28.0442 45.4272 28.1193 45.1814 28.3332 45.0677C28.5472 44.9539 28.7929 45.0291 28.9067 45.243L30.3287 47.9174C30.4424 48.1313 30.3673 48.3771 30.1534 48.4908C30.1284 48.5728 29.9645 48.5227 29.8826 48.4977Z",fill:"#FFF5EB"}),T.createElement("ellipse",{cx:29.2637,cy:54.631,rx:1.50593,ry:3.17918,transform:"rotate(-23 29.2637 54.631)",fill:"#FFC478"}),T.createElement("ellipse",{cx:34.0592,cy:52.4078,rx:.920288,ry:1.67325,transform:"rotate(106 34.0592 52.4078)",fill:"#FFC478"}),T.createElement("path",{d:"M89.1282 19.2055L68.2257 26.8725L45.9197 28.3898L44.4929 16.4082C44.3371 13.798 47.5283 11.4502 50.9859 11.6309L65.1429 12.369L67.3969 12.4869C68.5309 12.5463 69.7066 12.3289 70.7522 11.8627L78.6899 8.34726C81.725 6.99992 85.3012 7.87475 86.2125 10.1876L89.1282 19.2055Z",fill:"url(#paint8_linear_8481_102191)"}),T.createElement("path",{opacity:.479771,d:"M88.6262 19.0953L68.3101 26.5288L65.3314 12.5149L67.5211 12.6263C68.6228 12.6824 69.7652 12.471 70.7816 12.0192L78.4972 8.61266C81.4474 7.30707 84.9208 8.14856 85.8036 10.3829L88.6262 19.0953Z",fill:"#ADCBE7"}),T.createElement("path",{d:"M91.6332 26.6212L46.9517 36.1186L46.0387 28.4438L89.2535 19.2582L91.6332 26.6212Z",fill:"#717DAD"}),T.createElement("path",{d:"M102.961 24.2033C103.125 24.9722 102.371 25.7829 101.278 26.015L37.9675 39.4722C36.8754 39.7043 35.8568 39.2704 35.6933 38.5015C35.5301 37.7336 36.284 36.922 37.3761 36.6898L100.687 23.2327C101.779 23.0005 102.798 23.4354 102.961 24.2033Z",fill:"#9ED1FF"}),T.createElement("path",{d:"M102.703 24.1718C102.838 24.805 102.067 25.5045 100.983 25.7349L69.5583 32.4144L69.0712 30.123L100.496 23.4436C101.58 23.2131 102.569 23.5394 102.703 24.1718Z",fill:"#78AFE1"}),T.createElement("defs",null,T.createElement("linearGradient",{id:"paint0_linear_8481_102191",x1:32.2665,y1:59.6553,x2:59.0518,y2:60.5906,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#FFFDE0"}),T.createElement("stop",{offset:1,stopColor:"#FFB362"})),T.createElement("linearGradient",{id:"paint1_linear_8481_102191",x1:67.3434,y1:85.966,x2:103.216,y2:78.3411,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#FFFABC"}),T.createElement("stop",{offset:1,stopColor:"#FFA650"})),T.createElement("linearGradient",{id:"paint2_linear_8481_102191",x1:51.4347,y1:74.8197,x2:91.1539,y2:74.8197,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#A3C1FF"}),T.createElement("stop",{offset:1,stopColor:"#4243FF"})),T.createElement("linearGradient",{id:"paint3_linear_8481_102191",x1:55.1887,y1:89.2031,x2:94.9078,y2:89.2031,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#A3C1FF"}),T.createElement("stop",{offset:1,stopColor:"#4243FF"})),T.createElement("linearGradient",{id:"paint4_linear_8481_102191",x1:94.5023,y1:53.1799,x2:106.762,y2:58.7056,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#FF9498"}),T.createElement("stop",{offset:1,stopColor:"#FFD671"})),T.createElement("linearGradient",{id:"paint5_linear_8481_102191",x1:74.9906,y1:66.9871,x2:94.9778,y2:46.9999,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#FFFDE0"}),T.createElement("stop",{offset:1,stopColor:"#FFB362"})),T.createElement("linearGradient",{id:"paint6_linear_8481_102191",x1:50.5805,y1:44.0581,x2:59.9372,y2:44.0581,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"white"}),T.createElement("stop",{offset:1,stopColor:"#E3EEF3"})),T.createElement("linearGradient",{id:"paint7_linear_8481_102191",x1:88.4187,y1:43.3906,x2:99.3981,y2:25.1833,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#FF9498"}),T.createElement("stop",{offset:1,stopColor:"#FFD671"})),T.createElement("linearGradient",{id:"paint8_linear_8481_102191",x1:56.4985,y1:29.5482,x2:100.532,y2:20.1885,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#ECF7FF"}),T.createElement("stop",{offset:1,stopColor:"#C2E0FF"})))),cl=({message:e})=>u.jsxs(d.Stack,{justifyContent:"center",alignItems:"center",height:"100%",children:[u.jsx(C_,{width:124,height:107}),u.jsx(d.Typography,{variant:"body2",color:d.theme.palette.gray.gray3,children:e})]}),Rn="/v1/api",x_=`${Rn}/connector/conversation/:conversationId/email_log_status`,v_=`${Rn}/connector/conversation/:conversationId/entity_recommendations`,E_=`${Rn}/connector/conversation/:conversationId/retry_emails_log`,I_=`${Rn}/connector/conversation/:conversationId/validate_entity`,w_=`${Rn}/connectors/forms/:formId/search`,__=`${Rn}/connector/conversation/:conversationId/log_emails`,S_=`${Rn}/connector/feedback/conversation/:conversationId`,A_=`${Rn}/connector/conversation/:conversationId/log_emails`,T_=async({payload:e,entity:t,conversationId:n})=>{if("externalResourceId"in t)return t;try{if(!n)throw new Error("Conversation ID is required to validate entity");const r=await we({url:ct(I_,{conversationId:n}),data:e,method:Me.POST}),o=r==null?void 0:r.data;if(!o.valid)throw new Error("Entity validation failed");return{...o,...t}}catch(r){throw console.error(r),r}},L_=({onSuccess:e,onError:t})=>tn({mutationFn:T_,onSuccess:e,onError:t}),ll=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:14,height:14,viewBox:"0 0 14 14",fill:"#6F7C90",...e},T.createElement("path",{d:"M6.99967 13.6654C6.08856 13.6654 5.22745 13.4903 4.41634 13.14C3.60523 12.7898 2.89701 12.312 2.29167 11.7067C1.68634 11.1014 1.20856 10.3931 0.858341 9.58203C0.508119 8.77092 0.333008 7.90981 0.333008 6.9987C0.333008 6.07648 0.508119 5.2127 0.858341 4.40736C1.20856 3.60203 1.68634 2.89648 2.29167 2.2907C2.89701 1.68492 3.60523 1.20714 4.41634 0.857365C5.22745 0.507587 6.08856 0.332476 6.99967 0.332031C7.18856 0.332031 7.34701 0.396031 7.47501 0.524031C7.60301 0.652031 7.66679 0.810253 7.66634 0.998698C7.6659 1.18714 7.6019 1.34559 7.47434 1.47403C7.34679 1.60248 7.18856 1.66625 6.99967 1.66536C5.5219 1.66536 4.26345 2.18492 3.22434 3.22403C2.18523 4.26314 1.6659 5.52136 1.66634 6.9987C1.66679 8.47603 2.18634 9.73448 3.22501 10.774C4.26367 11.8136 5.5219 12.3329 6.99967 12.332C8.47745 12.3311 9.7359 11.8118 10.775 10.774C11.8141 9.73625 12.3335 8.47781 12.333 6.9987C12.333 6.80981 12.397 6.65159 12.525 6.52403C12.653 6.39648 12.8112 6.33248 12.9997 6.33203C13.1881 6.33159 13.3466 6.39559 13.475 6.52403C13.6035 6.65248 13.6672 6.8107 13.6663 6.9987C13.6663 7.90981 13.4912 8.77092 13.141 9.58203C12.7908 10.3931 12.313 11.1016 11.7077 11.7074C11.1023 12.3131 10.3968 12.7909 9.59101 13.1407C8.78523 13.4905 7.92145 13.6654 6.99967 13.6654Z"})),O_=d.styled(d.Stack)`
2385
+ `,g_=e=>T.createElement("svg",{width:58,height:26,viewBox:"0 0 58 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M8.9082 1.37598C10.221 0.614497 11.8414 0.614651 13.1543 1.37598L19.9619 5.32422C21.2668 6.08111 22.0702 7.47589 22.0703 8.98438V16.916C22.0703 18.4247 21.2669 19.8192 19.9619 20.5762L13.1543 24.5244C11.8414 25.2858 10.2211 25.2859 8.9082 24.5244L2.10156 20.5762C0.796567 19.8192 -0.00683594 18.4247 -0.00683594 16.916V8.98438C-0.00668786 7.47589 0.796688 6.08111 2.10156 5.32422L8.9082 1.37598ZM11.9531 15.9727C11.9531 17.5841 13.2597 18.8906 14.8711 18.8906V15.3281C14.871 13.7167 13.5645 12.4102 11.9531 12.4102V15.9727ZM7.57617 15.6641C7.57619 17.2755 8.88271 18.582 10.4941 18.582V10.1592C10.4939 8.54793 9.18748 7.24219 7.57617 7.24219V15.6641Z",fill:"#D0D8E3"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M27.4643 7.74676V11.8643C27.8476 11.0201 28.9238 10.6646 29.6462 10.6646C31.4006 10.6646 32.4325 11.8199 32.4325 13.7898V17.0335C32.4325 17.4482 32.0935 17.8037 31.6512 17.8037C31.2384 17.8037 30.914 17.4482 30.914 17.0335V13.8787C30.914 12.7975 30.2359 12.1606 29.3808 12.1606C28.511 12.1606 27.4643 12.6493 27.4643 14.012V17.0335C27.4643 17.4482 27.1252 17.8037 26.6829 17.8037C26.2701 17.8037 25.9458 17.4482 25.9458 17.0335V7.74676C25.9458 7.33204 26.2849 6.97656 26.7272 6.97656C27.1399 6.97656 27.4643 7.33204 27.4643 7.74676ZM33.6052 8.01336C33.6052 7.46534 34.0769 7.05062 34.6224 7.05062C35.1826 7.05062 35.6249 7.46534 35.6249 8.01336C35.6249 8.56139 35.1826 8.97611 34.6224 8.97611C34.0769 8.97611 33.6052 8.56139 33.6052 8.01336ZM35.389 17.0335C35.389 17.4482 35.0499 17.8037 34.6077 17.8037C34.1949 17.8037 33.8705 17.4482 33.8705 17.0335V11.5089C33.8705 11.0941 34.1949 10.7387 34.6077 10.7387C35.0499 10.7387 35.389 11.0941 35.389 11.5089V17.0335ZM42.7241 11.7014L40.4685 17.1076C40.2915 17.5371 39.9967 17.8037 39.5544 17.8037H39.466C39.0237 17.8037 38.7141 17.5371 38.5372 17.1076L36.2963 11.7014C36.1341 11.3163 36.3848 10.8275 36.7976 10.7535C37.1956 10.6794 37.5642 10.872 37.7116 11.2571L39.5102 15.7894L41.3088 11.2571C41.4562 10.872 41.8248 10.6794 42.2228 10.7535C42.6356 10.8275 42.8862 11.3163 42.7241 11.7014ZM44.6044 13.701H48.5996C48.4522 12.6197 47.6708 11.9976 46.6388 11.9976C45.5774 11.9976 44.7518 12.6345 44.6044 13.701ZM50.0886 14.1157C50.0886 14.5156 49.7643 14.8118 49.3957 14.8118H44.6044C44.7518 15.8782 45.6069 16.5447 46.7125 16.5447C47.4349 16.5447 47.8477 16.293 48.349 15.8782C48.5996 15.6709 49.0124 15.5672 49.322 15.819C49.6021 16.0412 49.6168 16.5003 49.3515 16.7817C48.6586 17.5075 47.6561 17.8778 46.6388 17.8778C44.6781 17.8778 43.1006 16.4411 43.1006 14.249C43.1006 12.0569 44.6781 10.6646 46.6388 10.6646C48.5554 10.6646 50.0296 11.9976 50.0886 14.1157ZM54.4162 12.1013C53.1188 12.1013 52.5733 13.4047 52.5733 15.2413V17.0335C52.5733 17.4482 52.2343 17.8037 51.792 17.8037C51.3792 17.8037 51.0548 17.4482 51.0548 17.0335V11.5089C51.0548 11.0941 51.3792 10.7387 51.792 10.7387C52.2343 10.7387 52.5733 11.0941 52.5733 11.5089V12.3975C52.9272 11.1682 53.6053 10.6646 54.4604 10.6646C54.6815 10.6646 54.9027 10.6794 55.1091 10.7239C55.4924 10.8127 55.743 11.1978 55.6545 11.5977C55.5218 12.2642 54.8584 12.1013 54.4162 12.1013Z",fill:"#D0D8E3"})),m_=({isAdmin:e,connectorId:t,connectorName:n,close:r})=>{const o=e?jw:Bw,{connectorFunctions:s}=w.useContext(qt),a=s==null?void 0:s.redirectToAdmin,i=()=>{r(),a==null||a(t)};return u.jsxs(d_,{children:[u.jsx(f_,{children:Pw}),u.jsx(p_,{children:ct(o,{connectorName:n})}),u.jsxs(h_,{children:[u.jsx("div",{children:u.jsx(g_,{})}),e?u.jsx(d.Button,{variant:"contained",size:"small",color:"primary",onClick:i,children:"Authenticate"}):null]})]})},b_=({isAdmin:e,isAuthenticated:t,connectorId:n,connectorName:r,children:o})=>{const[s,a]=w.useState(!0),i=()=>a(!0),c=()=>a(!1);return u.jsx(w1,{onTouchMove:i,onMouseMove:i,onPointerMove:i,title:s&&!t?u.jsx(m_,{isAdmin:e,connectorId:n,connectorName:r,close:c}):"",enterDelay:500,placement:"top",arrow:!0,tooltipStyle:l_,arrowStyle:u_,children:o})},y_=({children:e,isAdmin:t,logSettings:n,status:r,retry:o,renderEntities:s})=>{const{connectorFunctions:a}=w.useContext(qt),i=a==null?void 0:a.sendTrackingEvent,[c,l]=w.useState(()=>localStorage.getItem(kp)==="true"),[f,m]=w.useState(!1),{connectorId:b,connectorName:v,connectorStatus:y}=n??{},p=t||y!==Oa.DISABLED,h=y===Oa.UNAUTHENTICATED,g=r===ve.PENDING,C=()=>{localStorage.setItem(kp,"true"),l(!0),m(!0),i==null||i(Ft.email_logging_intro_popup_continue_clicked,{app_name:v})};return c?h?u.jsx(b_,{connectorId:b,connectorName:v,isAdmin:t,isAuthenticated:!1,children:e}):o?u.jsx(d.Tooltip,{title:Gw,children:e}):g?u.jsx(d.Tooltip,{title:Vw.replace(":connectorName",v),children:e}):s?u.jsx(Nw,{defaultOpen:f,renderTooltip:s,children:e}):u.jsx(u.Fragment,{children:e}):u.jsx(c_,{onContinue:p?C:void 0,connectorName:v,children:e})},C_=e=>T.createElement("svg",{width:124,height:107,viewBox:"0 0 124 107",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M28.6168 54.7446C28.6931 52.5589 31.0146 51.1102 33.0842 51.8174C35.9985 52.8133 40.0375 53.9024 44.0621 54.043C48.0034 54.1806 51.968 53.4097 54.8762 52.6339C57.0264 52.0602 59.2927 53.6932 59.215 55.9172C59.1742 57.0856 58.4742 58.1269 57.3723 58.5178C54.8051 59.4284 49.7633 60.8927 44.3075 60.7022C38.7694 60.5088 33.1999 58.6241 30.4004 57.5311C29.2637 57.0873 28.5742 55.9641 28.6168 54.7446Z",fill:"url(#paint0_linear_8481_102191)"}),T.createElement("path",{d:"M47.223 43.6373C44.4928 30.7926 52.6922 18.1666 65.5368 15.4364C78.3815 12.7062 91.0075 20.9055 93.7377 33.7502L105.079 87.1053L84.1844 91.5466C70.0346 94.5542 56.1258 85.5217 53.1182 71.3719L47.223 43.6373Z",fill:"url(#paint1_linear_8481_102191)"}),T.createElement("mask",{id:"mask0_8481_102191",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:46,y:14,width:60,height:79},T.createElement("path",{d:"M47.223 43.6373C44.4928 30.7926 52.6922 18.1666 65.5368 15.4364C78.3815 12.7062 91.0075 20.9055 93.7377 33.7502L105.079 87.1053L84.1844 91.5466C70.0346 94.5542 56.1258 85.5217 53.1182 71.3719L47.223 43.6373Z",fill:"white"})),T.createElement("g",{mask:"url(#mask0_8481_102191)"},T.createElement("ellipse",{cx:63.7775,cy:46.8684,rx:1.48152,ry:1.39438,transform:"rotate(-12 63.7775 46.8684)",fill:"#435C71"}),T.createElement("rect",{x:47.4368,y:59.3203,width:53.657,height:13.2235,transform:"rotate(-12 47.4368 59.3203)",fill:"url(#paint2_linear_8481_102191)"}),T.createElement("rect",{x:51.1907,y:76.9824,width:53.657,height:10.4263,transform:"rotate(-12 51.1907 76.9824)",fill:"url(#paint3_linear_8481_102191)"})),T.createElement("path",{opacity:.883952,d:"M113.939 51.0679C114.775 55 112.265 58.865 108.333 59.7008L107.842 59.8052C103.639 60.6986 99.5073 58.0155 98.6139 53.8123L97.205 47.1837L105.307 45.4616C109.239 44.6259 113.104 47.1359 113.939 51.0679Z",fill:"url(#paint4_linear_8481_102191)"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M68.7215 66.4138C67.1801 64.8725 67.6745 62.2062 69.587 61.1603C72.4457 59.5969 76.2861 57.1773 79.3785 54.0849C82.4099 51.0535 84.752 47.3461 86.2775 44.5465C87.3388 42.5989 90.0598 42.0819 91.6282 43.6503C92.4782 44.5003 92.758 45.7623 92.2604 46.8566C91.0829 49.4466 88.5191 54.344 84.4346 58.4285C80.2853 62.5778 74.8639 65.591 72.0553 66.9952C70.9363 67.5548 69.6062 67.2985 68.7215 66.4138Z",fill:"url(#paint5_linear_8481_102191)"}),T.createElement("rect",{x:48.7264,y:33.7744,width:11.2108,height:11.2108,rx:5.59457,transform:"rotate(-12 48.7264 33.7744)",fill:"url(#paint6_linear_8481_102191)"}),T.createElement("rect",{x:50.0175,y:35.8193,width:4.0158,height:3.84848,rx:1.92424,transform:"rotate(-12 50.0175 35.8193)",fill:"#435C71"}),T.createElement("rect",{x:59.2875,y:31.5723,width:11.2108,height:11.2108,rx:5.59457,transform:"rotate(-12 59.2875 31.5723)",fill:"#FFFEFE"}),T.createElement("path",{opacity:.883952,d:"M111.25 38.5376C110.415 34.6055 106.55 32.0955 102.618 32.9313L102.127 33.0356C97.9234 33.9291 95.2403 38.0607 96.1337 42.2639L97.5426 48.8925L105.644 47.1705C109.576 46.3347 112.086 42.4696 111.25 38.5376Z",fill:"url(#paint7_linear_8481_102191)"}),T.createElement("rect",{x:60.0181,y:33.8037,width:3.84848,height:3.84848,rx:1.90724,transform:"rotate(-12 60.0181 33.8037)",fill:"#435C71"}),T.createElement("path",{d:"M36.9246 59.1604C36.4487 60.717 34.7371 61.6271 33.1805 61.1512C32.3613 60.9007 31.7241 60.3475 31.3259 59.5987L25.2059 46.7983C24.9784 46.3703 25.1286 45.8788 25.5566 45.6513L28.338 44.1724C28.7659 43.9449 29.2574 44.0951 29.4849 44.5231L36.6496 56.8367C37.0728 57.5036 37.15 58.423 36.9246 59.1604Z",fill:"#FFDF9F"}),T.createElement("rect",{x:27.9973,y:44.333,width:2.39869,height:3.59807,transform:"rotate(152 27.9973 44.333)",fill:"#FF9090"}),T.createElement("path",{d:"M26.6628 44.3769L26.9472 44.9118L28.0169 44.343L26.3106 41.1338L24.171 42.2714L25.0243 43.876C25.6661 43.5347 26.3215 43.7351 26.6628 44.3769Z",fill:"#FFB19F"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.26386 27.248C9.3428 20.4481 16.5101 16.6372 23.31 18.7161C30.11 20.7951 33.9209 27.9624 31.8419 34.7623C29.763 41.5622 22.5956 45.3731 15.7958 43.2942C8.99587 41.2152 5.18493 34.0479 7.26386 27.248ZM9.72157 27.9983C8.06843 33.4055 11.1399 39.1821 16.5471 40.8352C21.9543 42.4884 27.7309 39.4168 29.384 34.0096C31.0372 28.6024 27.9657 22.8258 22.5585 21.1727C17.1513 19.5196 11.3747 22.5911 9.72157 27.9983Z",fill:"#FFE69F"}),T.createElement("circle",{opacity:.414016,cx:19.5529,cy:31.0039,r:10.2804,transform:"rotate(17 19.5529 31.0039)",fill:"#BBDEFC"}),T.createElement("path",{d:"M14.3685 30.6746C15.7299 27.6867 18.9391 25.9803 22.1776 26.5225L22.2595 26.5475C23.7024 26.8095 24.3854 24.8682 23.1497 24.2218C22.3806 23.8074 21.5613 23.557 20.717 23.3884C17.3715 22.9031 14.0553 24.6664 12.6939 27.6543C12.2796 28.4235 12.0859 29.3497 12.0244 30.1372C11.8444 31.6051 13.8607 32.0424 14.4503 30.6997C14.3434 30.7566 14.3685 30.6746 14.3685 30.6746Z",fill:"#F6FBFF"}),T.createElement("path",{d:"M10.2904 29.0679C11.9436 23.6607 17.7202 20.5893 23.1274 22.2424C25.6671 23.0189 27.5785 24.6783 28.9301 26.704C27.7539 24.1048 25.508 22.0744 22.5586 21.1727C17.1514 19.5196 11.3748 22.591 9.72165 27.9982C8.81993 30.9476 9.32924 33.97 10.7444 36.3735C9.82081 34.1203 9.51395 31.6077 10.2904 29.0679Z",fill:"#ADCBE7"}),T.createElement("path",{opacity:.406087,d:"M36.4864 56.8021L36.1373 56.2691C36.3845 56.8563 36.428 57.5516 36.2372 58.1754C35.9273 59.189 34.5593 59.1971 34.0713 58.2806L28.3787 47.5877C28.0534 46.9767 27.3508 46.7619 26.7395 47.0866L25.7206 47.6277L31.4395 59.3516C31.7648 59.9627 32.27 60.5434 32.8706 60.8123C33.7054 61.1528 34.6593 61.1034 35.3726 60.7247C36.0858 60.3459 36.6602 59.5837 36.8444 58.7021C37.0351 58.0783 36.8117 57.4132 36.4864 56.8021Z",fill:"white"}),T.createElement("path",{d:"M29.8826 48.4977C29.8006 48.4726 29.6368 48.4225 29.5799 48.3155L28.1579 45.6411C28.0442 45.4272 28.1193 45.1814 28.3332 45.0677C28.5472 44.9539 28.7929 45.0291 28.9067 45.243L30.3287 47.9174C30.4424 48.1313 30.3673 48.3771 30.1534 48.4908C30.1284 48.5728 29.9645 48.5227 29.8826 48.4977Z",fill:"#FFF5EB"}),T.createElement("ellipse",{cx:29.2637,cy:54.631,rx:1.50593,ry:3.17918,transform:"rotate(-23 29.2637 54.631)",fill:"#FFC478"}),T.createElement("ellipse",{cx:34.0592,cy:52.4078,rx:.920288,ry:1.67325,transform:"rotate(106 34.0592 52.4078)",fill:"#FFC478"}),T.createElement("path",{d:"M89.1282 19.2055L68.2257 26.8725L45.9197 28.3898L44.4929 16.4082C44.3371 13.798 47.5283 11.4502 50.9859 11.6309L65.1429 12.369L67.3969 12.4869C68.5309 12.5463 69.7066 12.3289 70.7522 11.8627L78.6899 8.34726C81.725 6.99992 85.3012 7.87475 86.2125 10.1876L89.1282 19.2055Z",fill:"url(#paint8_linear_8481_102191)"}),T.createElement("path",{opacity:.479771,d:"M88.6262 19.0953L68.3101 26.5288L65.3314 12.5149L67.5211 12.6263C68.6228 12.6824 69.7652 12.471 70.7816 12.0192L78.4972 8.61266C81.4474 7.30707 84.9208 8.14856 85.8036 10.3829L88.6262 19.0953Z",fill:"#ADCBE7"}),T.createElement("path",{d:"M91.6332 26.6212L46.9517 36.1186L46.0387 28.4438L89.2535 19.2582L91.6332 26.6212Z",fill:"#717DAD"}),T.createElement("path",{d:"M102.961 24.2033C103.125 24.9722 102.371 25.7829 101.278 26.015L37.9675 39.4722C36.8754 39.7043 35.8568 39.2704 35.6933 38.5015C35.5301 37.7336 36.284 36.922 37.3761 36.6898L100.687 23.2327C101.779 23.0005 102.798 23.4354 102.961 24.2033Z",fill:"#9ED1FF"}),T.createElement("path",{d:"M102.703 24.1718C102.838 24.805 102.067 25.5045 100.983 25.7349L69.5583 32.4144L69.0712 30.123L100.496 23.4436C101.58 23.2131 102.569 23.5394 102.703 24.1718Z",fill:"#78AFE1"}),T.createElement("defs",null,T.createElement("linearGradient",{id:"paint0_linear_8481_102191",x1:32.2665,y1:59.6553,x2:59.0518,y2:60.5906,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#FFFDE0"}),T.createElement("stop",{offset:1,stopColor:"#FFB362"})),T.createElement("linearGradient",{id:"paint1_linear_8481_102191",x1:67.3434,y1:85.966,x2:103.216,y2:78.3411,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#FFFABC"}),T.createElement("stop",{offset:1,stopColor:"#FFA650"})),T.createElement("linearGradient",{id:"paint2_linear_8481_102191",x1:51.4347,y1:74.8197,x2:91.1539,y2:74.8197,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#A3C1FF"}),T.createElement("stop",{offset:1,stopColor:"#4243FF"})),T.createElement("linearGradient",{id:"paint3_linear_8481_102191",x1:55.1887,y1:89.2031,x2:94.9078,y2:89.2031,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#A3C1FF"}),T.createElement("stop",{offset:1,stopColor:"#4243FF"})),T.createElement("linearGradient",{id:"paint4_linear_8481_102191",x1:94.5023,y1:53.1799,x2:106.762,y2:58.7056,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#FF9498"}),T.createElement("stop",{offset:1,stopColor:"#FFD671"})),T.createElement("linearGradient",{id:"paint5_linear_8481_102191",x1:74.9906,y1:66.9871,x2:94.9778,y2:46.9999,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#FFFDE0"}),T.createElement("stop",{offset:1,stopColor:"#FFB362"})),T.createElement("linearGradient",{id:"paint6_linear_8481_102191",x1:50.5805,y1:44.0581,x2:59.9372,y2:44.0581,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"white"}),T.createElement("stop",{offset:1,stopColor:"#E3EEF3"})),T.createElement("linearGradient",{id:"paint7_linear_8481_102191",x1:88.4187,y1:43.3906,x2:99.3981,y2:25.1833,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#FF9498"}),T.createElement("stop",{offset:1,stopColor:"#FFD671"})),T.createElement("linearGradient",{id:"paint8_linear_8481_102191",x1:56.4985,y1:29.5482,x2:100.532,y2:20.1885,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#ECF7FF"}),T.createElement("stop",{offset:1,stopColor:"#C2E0FF"})))),ll=({message:e})=>u.jsxs(d.Stack,{justifyContent:"center",alignItems:"center",height:"100%",children:[u.jsx(C_,{width:124,height:107}),u.jsx(d.Typography,{variant:"body2",color:d.theme.palette.gray.gray3,children:e})]}),Rn="/v1/api",x_=`${Rn}/connector/conversation/:conversationId/email_log_status`,v_=`${Rn}/connector/conversation/:conversationId/entity_recommendations`,E_=`${Rn}/connector/conversation/:conversationId/retry_emails_log`,I_=`${Rn}/connector/conversation/:conversationId/validate_entity`,w_=`${Rn}/connectors/forms/:formId/search`,__=`${Rn}/connector/conversation/:conversationId/log_emails`,S_=`${Rn}/connector/feedback/conversation/:conversationId`,A_=`${Rn}/connector/conversation/:conversationId/log_emails`,T_=async({payload:e,entity:t,conversationId:n})=>{if("externalResourceId"in t)return t;try{if(!n)throw new Error("Conversation ID is required to validate entity");const r=await we({url:ct(I_,{conversationId:n}),data:e,method:Me.POST}),o=r==null?void 0:r.data;if(!o.valid)throw new Error("Entity validation failed");return{...o,...t}}catch(r){throw console.error(r),r}},L_=({onSuccess:e,onError:t})=>tn({mutationFn:T_,onSuccess:e,onError:t}),ul=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:14,height:14,viewBox:"0 0 14 14",fill:"#6F7C90",...e},T.createElement("path",{d:"M6.99967 13.6654C6.08856 13.6654 5.22745 13.4903 4.41634 13.14C3.60523 12.7898 2.89701 12.312 2.29167 11.7067C1.68634 11.1014 1.20856 10.3931 0.858341 9.58203C0.508119 8.77092 0.333008 7.90981 0.333008 6.9987C0.333008 6.07648 0.508119 5.2127 0.858341 4.40736C1.20856 3.60203 1.68634 2.89648 2.29167 2.2907C2.89701 1.68492 3.60523 1.20714 4.41634 0.857365C5.22745 0.507587 6.08856 0.332476 6.99967 0.332031C7.18856 0.332031 7.34701 0.396031 7.47501 0.524031C7.60301 0.652031 7.66679 0.810253 7.66634 0.998698C7.6659 1.18714 7.6019 1.34559 7.47434 1.47403C7.34679 1.60248 7.18856 1.66625 6.99967 1.66536C5.5219 1.66536 4.26345 2.18492 3.22434 3.22403C2.18523 4.26314 1.6659 5.52136 1.66634 6.9987C1.66679 8.47603 2.18634 9.73448 3.22501 10.774C4.26367 11.8136 5.5219 12.3329 6.99967 12.332C8.47745 12.3311 9.7359 11.8118 10.775 10.774C11.8141 9.73625 12.3335 8.47781 12.333 6.9987C12.333 6.80981 12.397 6.65159 12.525 6.52403C12.653 6.39648 12.8112 6.33248 12.9997 6.33203C13.1881 6.33159 13.3466 6.39559 13.475 6.52403C13.6035 6.65248 13.6672 6.8107 13.6663 6.9987C13.6663 7.90981 13.4912 8.77092 13.141 9.58203C12.7908 10.3931 12.313 11.1016 11.7077 11.7074C11.1023 12.3131 10.3968 12.7909 9.59101 13.1407C8.78523 13.4905 7.92145 13.6654 6.99967 13.6654Z"})),O_=d.styled(d.Stack)`
2387
2386
  display: flex;
2388
2387
  flex-flow: row nowrap;
2389
2388
  justify-content: flex-start;
@@ -2415,7 +2414,7 @@ Do you want to continue?`,vx="Select an object to create",Ex="Select an object t
2415
2414
  input:checked:disabled ~ svg {
2416
2415
  fill: #d6dde8;
2417
2416
  }
2418
- `,k_=d.styled(ll)`
2417
+ `,k_=d.styled(ul)`
2419
2418
  width: 16px;
2420
2419
  height: 16px;
2421
2420
  fill: #506dff;
@@ -2428,7 +2427,7 @@ Do you want to continue?`,vx="Select an object to create",Ex="Select an object t
2428
2427
  `,Mp=d.styled(d.Stack)`
2429
2428
  margin-left: auto;
2430
2429
  flex-shrink: 0;
2431
- `,N_=({connectorName:e,entity:t,checked:n,disabled:r,setCheckedEntities:o})=>{const{conversationId:s,connectorFunctions:a}=w.useContext(qt),i=a==null?void 0:a.sendTrackingEvent,{displayValue:c,entityType:l,cardId:f}=t,m=g=>{o==null||o(C=>({...C,[l+c]:g})),i==null||i(Ft.email_logging_smart_suggestion_selected,{app_name:e,object_key_selected:c})},b=()=>{i==null||i(Ft.email_logging_smart_suggestion_not_found,{app_name:e,object_key_selected:c})},{mutate:v,isPending:y,isError:p}=L_({onSuccess:m,onError:b}),h=()=>{!o||y||r||p||(n?o(g=>{const C={...g};return delete C[l+c],C}):(i==null||i(Ft.email_logging_smart_suggestion_initiated,{app_name:e,object_key_selected:c}),v({entity:t,payload:{entityType:l,searchString:c,cardId:f},conversationId:s})))};return u.jsx(d.Tooltip,{title:r?Ww:"",placement:"top",children:u.jsxs(O_,{disabled:y||p,onClick:h,children:[u.jsx(F_,{value:n,checked:n,disabled:r}),u.jsx(d.Tooltip,{title:(c==null?void 0:c.length)>30?c:null,placement:"right",children:u.jsx(D_,{variant:"body2",children:c})}),y?u.jsx(Mp,{children:u.jsx(k_,{})}):null,p?u.jsx(d.Tooltip,{title:"Record not found in "+e,children:u.jsx(Mp,{children:u.jsx(ol,{})})}):null]})})},R_=d.styled(d.Stack)`
2430
+ `,N_=({connectorName:e,entity:t,checked:n,disabled:r,setCheckedEntities:o})=>{const{conversationId:s,connectorFunctions:a}=w.useContext(qt),i=a==null?void 0:a.sendTrackingEvent,{displayValue:c,entityType:l,cardId:f}=t,m=g=>{o==null||o(C=>({...C,[l+c]:g})),i==null||i(Ft.email_logging_smart_suggestion_selected,{app_name:e,object_key_selected:c})},b=()=>{i==null||i(Ft.email_logging_smart_suggestion_not_found,{app_name:e,object_key_selected:c})},{mutate:v,isPending:y,isError:p}=L_({onSuccess:m,onError:b}),h=()=>{!o||y||r||p||(n?o(g=>{const C={...g};return delete C[l+c],C}):(i==null||i(Ft.email_logging_smart_suggestion_initiated,{app_name:e,object_key_selected:c}),v({entity:t,payload:{entityType:l,searchString:c,cardId:f},conversationId:s})))};return u.jsx(d.Tooltip,{title:r?Ww:"",placement:"top",children:u.jsxs(O_,{disabled:y||p,onClick:h,children:[u.jsx(F_,{value:n,checked:n,disabled:r}),u.jsx(d.Tooltip,{title:(c==null?void 0:c.length)>30?c:null,placement:"right",children:u.jsx(D_,{variant:"body2",children:c})}),y?u.jsx(Mp,{children:u.jsx(k_,{})}):null,p?u.jsx(d.Tooltip,{title:"Record not found in "+e,children:u.jsx(Mp,{children:u.jsx(sl,{})})}):null]})})},R_=d.styled(d.Stack)`
2432
2431
  color: #343c45;
2433
2432
  padding: 18px 0;
2434
2433
  box-sizing: border-box;
@@ -2473,7 +2472,7 @@ Do you want to continue?`,vx="Select an object to create",Ex="Select an object t
2473
2472
  text-transform: capitalize;
2474
2473
  `,B_=d.styled(d.Stack)`
2475
2474
  overflow: hidden;
2476
- `,Pp=e=>T.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"#6C7B94",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.00483 12.5052C7.73146 12.7786 7.73146 13.2218 8.00483 13.4952C8.2782 13.7685 8.72141 13.7685 8.99478 13.4952L11.9948 10.4952C12.2681 10.2218 12.2681 9.77859 11.9948 9.50522L8.99478 6.50522C8.72141 6.23185 8.2782 6.23185 8.00483 6.50522C7.73146 6.77859 7.73146 7.2218 8.00483 7.49517L10.5099 10.0002L8.00483 12.5052Z"})),jp=({connectorName:e,entities:t,checkedEntities:n={},disabled:r=!1,setCheckedEntities:o})=>{const s=w.useMemo(()=>xw(t),[t]),a=i=>{const c=i.currentTarget;if(!c)return;const l=c.parentElement;l&&l.classList.toggle("expanded")};return t!=null&&t.length?u.jsx(R_,{children:s.map(i=>u.jsxs(M_,{className:"expanded",children:[u.jsxs(P_,{onClick:a,children:[u.jsx(j_,{variant:"body2",children:i.type}),u.jsx(Pp,{className:"toggle-arrow-icon"})]}),u.jsx(B_,{children:i.entities.map(c=>u.jsx(N_,{connectorName:e,entity:c,checked:r||!!n[c.entityType+c.displayValue],setCheckedEntities:o,disabled:r},c.formId))})]},i.type))}):u.jsx(cl,{message:Hw})},V_=d.styled(d.Stack)`
2475
+ `,Pp=e=>T.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"#6C7B94",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.00483 12.5052C7.73146 12.7786 7.73146 13.2218 8.00483 13.4952C8.2782 13.7685 8.72141 13.7685 8.99478 13.4952L11.9948 10.4952C12.2681 10.2218 12.2681 9.77859 11.9948 9.50522L8.99478 6.50522C8.72141 6.23185 8.2782 6.23185 8.00483 6.50522C7.73146 6.77859 7.73146 7.2218 8.00483 7.49517L10.5099 10.0002L8.00483 12.5052Z"})),jp=({connectorName:e,entities:t,checkedEntities:n={},disabled:r=!1,setCheckedEntities:o})=>{const s=w.useMemo(()=>xw(t),[t]),a=i=>{const c=i.currentTarget;if(!c)return;const l=c.parentElement;l&&l.classList.toggle("expanded")};return t!=null&&t.length?u.jsx(R_,{children:s.map(i=>u.jsxs(M_,{className:"expanded",children:[u.jsxs(P_,{onClick:a,children:[u.jsx(j_,{variant:"body2",children:i.type}),u.jsx(Pp,{className:"toggle-arrow-icon"})]}),u.jsx(B_,{children:i.entities.map(c=>u.jsx(N_,{connectorName:e,entity:c,checked:r||!!n[c.entityType+c.displayValue],setCheckedEntities:o,disabled:r},c.formId))})]},i.type))}):u.jsx(ll,{message:Hw})},V_=d.styled(d.Stack)`
2477
2476
  padding: 18px 0;
2478
2477
  row-gap: 12px;
2479
2478
  box-sizing: border-box;
@@ -2511,12 +2510,12 @@ Do you want to continue?`,vx="Select an object to create",Ex="Select an object t
2511
2510
  padding: 8px 0;
2512
2511
  row-gap: 12px;
2513
2512
  box-sizing: border-box;
2514
- `,Y_=({entity:e,onLog:t})=>{const{externalResourceId:n,name:r}=e;return u.jsxs(Z_,{onClick:t,direction:"row",children:[u.jsx(d.Stack,{flexGrow:1,children:u.jsx(d.Typography,{variant:"body2",fontSize:"13px",color:"#343C45",children:r})}),u.jsx(Pp,{})]},n)},J_=({connectorName:e,results:t,formId:n,searchObject:r,addEntity:o})=>{const s=t.length,{connectorFunctions:a}=w.useContext(qt),i=a==null?void 0:a.sendTrackingEvent;if(!(t!=null&&t.length))return u.jsx(cl,{message:"No results found"});const c=l=>{o(l),i==null||i(Ft.email_logging_search_result_selected,{app_name:e,object_name:l.displayValue,object_key:l.entityType})};return u.jsxs(X_,{children:[u.jsxs(d.Typography,{variant:"body2",color:"#3E4C5A",children:[s," Results found in ",e]}),u.jsx(z_,{children:t.map(l=>u.jsx(Y_,{entity:{...l,id:n,searchObject:r},onLog:()=>c({...l,entityType:r,app:e,displayValue:l.name})},l.externalResourceId))})]})},q_=d.styled(d.Stack)`
2513
+ `,Y_=({entity:e,onLog:t})=>{const{externalResourceId:n,name:r}=e;return u.jsxs(Z_,{onClick:t,direction:"row",children:[u.jsx(d.Stack,{flexGrow:1,children:u.jsx(d.Typography,{variant:"body2",fontSize:"13px",color:"#343C45",children:r})}),u.jsx(Pp,{})]},n)},J_=({connectorName:e,results:t,formId:n,searchObject:r,addEntity:o})=>{const s=t.length,{connectorFunctions:a}=w.useContext(qt),i=a==null?void 0:a.sendTrackingEvent;if(!(t!=null&&t.length))return u.jsx(ll,{message:"No results found"});const c=l=>{o(l),i==null||i(Ft.email_logging_search_result_selected,{app_name:e,object_name:l.displayValue,object_key:l.entityType})};return u.jsxs(X_,{children:[u.jsxs(d.Typography,{variant:"body2",color:"#3E4C5A",children:[s," Results found in ",e]}),u.jsx(z_,{children:t.map(l=>u.jsx(Y_,{entity:{...l,id:n,searchObject:r},onLog:()=>c({...l,entityType:r,app:e,displayValue:l.name})},l.externalResourceId))})]})},q_=d.styled(d.Stack)`
2515
2514
  height: 100%;
2516
2515
  row-gap: 8px;
2517
2516
  align-items: center;
2518
2517
  justify-content: center;
2519
- `,$_=d.styled(ll)`
2518
+ `,$_=d.styled(ul)`
2520
2519
  width: 32px;
2521
2520
  height: 32px;
2522
2521
  fill: #506dff;
@@ -2559,7 +2558,7 @@ Do you want to continue?`,vx="Select an object to create",Ex="Select an object t
2559
2558
  justify-content: flex-end;
2560
2559
  margin-top: 30px;
2561
2560
  gap: 8px;
2562
- `,cS=({onCancel:e,onSubmit:t,isLoading:n,showOptions:r=!0,title:o,width:s,feedbackOptions:a,feedbackPlaceholder:i=oS})=>{const[c,l]=w.useState(""),[f,m]=w.useState(""),b=g=>{l(g.target.value)},v=g=>{g.stopPropagation();const{value:C}=(g==null?void 0:g.target)||{};m(C)},y=()=>{t({feedbackOption:c,feedbackComment:f})},p=()=>{e==null||e()},h=r?!c:!f;return u.jsxs(sS,{width:s,children:[u.jsx(d.Typography,{variant:"h3",children:o}),u.jsx(aS,{}),r?u.jsx(d.FormControl,{children:u.jsx(d.RadioGroup,{"aria-labelledby":"demo-controlled-radio-buttons-group",name:"controlled-radio-buttons-group",value:c,onChange:b,children:a.map(g=>u.jsx(d.FormControlLabel,{value:g.value,control:u.jsx(d.Radio,{}),label:g.label},g.value))})}):null,u.jsx(lr,{type:"text",placeholder:i,value:f,name:"feedbackComment",inputChangeHandler:v,multiline:!0,rows:5,limit:250,validation:{validate:pc()}}),u.jsxs(iS,{children:[u.jsx(d.Button,{variant:"text",color:"primary",style:{color:d.theme.palette.gray.gray3},disabled:n,onClick:p,children:"Cancel"}),u.jsx(wp,{variant:"contained",color:"primary",isLoading:n,disabled:h,label:"Submit",onClick:y})]})]})},lS=async({conversationId:e,feedbackData:t})=>{try{if(!e)throw new Error("Conversation ID is required");const n=await we({url:S_.replace(":conversationId",e)+"?channel_type=email",method:"POST",data:t});return _e({message:Qw,type:on}),n==null?void 0:n.data}catch(n){throw console.error("Error submitting feedback:",n),_e({message:Uw,type:Je}),n}};function uS({onSuccess:e}){return tn({mutationFn:lS,onSuccess:e})}const dS=d.styled(d.Stack)`
2561
+ `,cS=({onCancel:e,onSubmit:t,isLoading:n,showOptions:r=!0,title:o,width:s,feedbackOptions:a,feedbackPlaceholder:i=oS})=>{const[c,l]=w.useState(""),[f,m]=w.useState(""),b=g=>{l(g.target.value)},v=g=>{g.stopPropagation();const{value:C}=(g==null?void 0:g.target)||{};m(C)},y=()=>{t({feedbackOption:c,feedbackComment:f})},p=()=>{e==null||e()},h=r?!c:!f;return u.jsxs(sS,{width:s,children:[u.jsx(d.Typography,{variant:"h3",children:o}),u.jsx(aS,{}),r?u.jsx(d.FormControl,{children:u.jsx(d.RadioGroup,{"aria-labelledby":"demo-controlled-radio-buttons-group",name:"controlled-radio-buttons-group",value:c,onChange:b,children:a.map(g=>u.jsx(d.FormControlLabel,{value:g.value,control:u.jsx(d.Radio,{}),label:g.label},g.value))})}):null,u.jsx(lr,{type:"text",placeholder:i,value:f,name:"feedbackComment",inputChangeHandler:v,multiline:!0,rows:5,limit:250,validation:{validate:hc()}}),u.jsxs(iS,{children:[u.jsx(d.Button,{variant:"text",color:"primary",style:{color:d.theme.palette.gray.gray3},disabled:n,onClick:p,children:"Cancel"}),u.jsx(wp,{variant:"contained",color:"primary",isLoading:n,disabled:h,label:"Submit",onClick:y})]})]})},lS=async({conversationId:e,feedbackData:t})=>{try{if(!e)throw new Error("Conversation ID is required");const n=await we({url:S_.replace(":conversationId",e)+"?channel_type=email",method:"POST",data:t});return _e({message:Qw,type:on}),n==null?void 0:n.data}catch(n){throw console.error("Error submitting feedback:",n),_e({message:Uw,type:Je}),n}};function uS({onSuccess:e}){return tn({mutationFn:lS,onSuccess:e})}const dS=d.styled(d.Stack)`
2563
2562
  flex-flow: row nowrap;
2564
2563
  justify-content: space-between;
2565
2564
  align-items: center;
@@ -2652,12 +2651,12 @@ Do you want to continue?`,vx="Select an object to create",Ex="Select an object t
2652
2651
  height: 15px;
2653
2652
  fill: #4d596c;
2654
2653
  }
2655
- `,OS=e=>u.jsx(d.Switch,{disableRipple:!0,...e}),FS=d.styled(OS)(({disabled:e})=>({padding:0,width:"32px",height:"16px","& .MuiSwitch-switchBase":{padding:2,margin:0,transitionDuration:"300ms","&.Mui-checked":{transform:"translateX(16px)",color:e?"#d6dde8":"#fff","& + .MuiSwitch-track":{opacity:1,backgroundColor:e?"#4d596c":"#506DFF"}}},"& .MuiSwitch-thumb":{boxSizing:"border-box",width:12,height:12},"& .MuiSwitch-track":{borderRadius:8}})),kS=d.styled(ll)`
2654
+ `,OS=e=>u.jsx(d.Switch,{disableRipple:!0,...e}),FS=d.styled(OS)(({disabled:e})=>({padding:0,width:"32px",height:"16px","& .MuiSwitch-switchBase":{padding:2,margin:0,transitionDuration:"300ms","&.Mui-checked":{transform:"translateX(16px)",color:e?"#d6dde8":"#fff","& + .MuiSwitch-track":{opacity:1,backgroundColor:e?"#4d596c":"#506DFF"}}},"& .MuiSwitch-thumb":{boxSizing:"border-box",width:12,height:12},"& .MuiSwitch-track":{borderRadius:8}})),kS=d.styled(ul)`
2656
2655
  width: 14px;
2657
2656
  height: 14px;
2658
2657
  fill: #4d596c;
2659
2658
  animation: ${Fa} 1s linear infinite;
2660
- `,pr=Ur.CaseView,DS=({emailLogStatus:e,close:t})=>{const{emailLogSettings:n,autoLogEnabled:r,selectedEntities:o,formList:s}=e,{connectorName:a,connectorId:i,logoUrl:c}=n??{},l=(o==null?void 0:o.length)>0,[f,m]=w.useState(""),[b,v]=w.useState([]),[y,p]=w.useState({}),{conversationId:h,connectorFunctions:g}=w.useContext(qt),C=g==null?void 0:g.sendTrackingEvent,{data:x,isError:I,isLoading:E}=gS({conversationId:h,enabled:!l}),{refetch:_}=ka({conversationId:h}),A=()=>{C==null||C(Ft.email_logging_search_results_found,{app_name:a,search_keyword:f})},{mutate:S,data:L,isPending:k,isIdle:D,reset:N}=bS({onSuccess:A}),{mutate:M,isPending:V}=CS({onSuccess:_}),{results:J=[],...$}=L??{},H=w.useMemo(()=>{const P={},W=[];for(const G of b){const Y=G.entityType+G.displayValue;P[Y]||W.push(G),P[Y]=G}for(const G of x??[]){const Y=G.entityType+G.displayValue;P[Y]||W.push(G),P[Y]=G}return W},[x,b]),X=P=>{m(P.target.value),D||N()},q=P=>{const{entityType:W,displayValue:G}=P;p(Y=>({...Y,[W+G]:P})),v(Y=>[P,...Y]),m(""),N()},se=()=>{C==null||C(Ft.email_logging_search_initiated,{app_name:a})},de=()=>{M({payload:{autoLogEnabled:!r},conversationId:h});const P=r?Ft.email_logging_auto_log_disabled:Ft.email_logging_auto_log_enabled;C==null||C(P,{app_name:a})},B=E||k;return u.jsxs(xS,{children:[u.jsxs(vS,{children:[u.jsxs(ES,{children:[u.jsx(wS,{children:u.jsx(_S,{src:c,alt:"connector"})}),u.jsx(d.Typography,{children:"Sync conversation"})]}),u.jsxs(IS,{children:[V?u.jsx(kS,{}):null,l?u.jsx(d.Tooltip,{arrow:!0,title:r?Rw:Mw,children:u.jsx(d.Stack,{children:u.jsx(FS,{checked:r,value:r,onClick:de,disabled:V})})}):null]})]}),u.jsx(SS,{children:u.jsxs(Ur,{children:[u.jsxs(pr,{condition:l,children:[u.jsx(Gp,{children:u.jsx(Hp,{children:u.jsx(jp,{connectorName:a,entities:o,disabled:!0})})}),u.jsx(pS,{})]},"disabled-view"),u.jsxs(pr,{fallback:!0,children:[u.jsx(AS,{children:u.jsx(TS,{type:"text",name:"search",value:f,onChange:X,onFocus:se,startAdornment:u.jsx(LS,{children:u.jsx(mp,{})}),size:"small"})}),u.jsx(Gp,{children:u.jsx(Hp,{children:u.jsxs(Ur,{children:[u.jsx(pr,{condition:B,children:u.jsx(Q_,{message:k?"Searching...":"Loading..."})},"loading"),u.jsx(pr,{condition:f===""&&H.length>0,children:u.jsx(jp,{connectorName:a,checkedEntities:y,setCheckedEntities:p,entities:H??[]})},"entity-suggestions"),u.jsx(pr,{condition:!!f&&D,children:u.jsx(W_,{searchText:f,connectorName:a,options:s,onSearch:S})},"search-options"),u.jsx(pr,{condition:!!f&&!D,children:u.jsx(J_,{connectorName:a,results:J,...$,addEntity:q})},"search-results"),u.jsx(pr,{condition:!H.length&&I,children:u.jsx(cl,{message:xn})},"error")]})})}),f?null:u.jsx(rS,{connectorName:a,connectorId:i,checkedEntities:y,close:t})]},"select-logs")]})})]})},NS=async({conversationId:e})=>{try{if(!e)throw new Error("Conversation ID is required to retry logs");const t=await we({url:ct(E_,{conversationId:e}),method:Me.POST});return t==null?void 0:t.data}catch(t){throw _e({message:xn,type:Je}),console.error(t),t}},RS=({onSuccess:e})=>tn({mutationFn:NS,onSuccess:e}),MS=d.styled(d.Stack)`
2659
+ `,pr=Ur.CaseView,DS=({emailLogStatus:e,close:t})=>{const{emailLogSettings:n,autoLogEnabled:r,selectedEntities:o,formList:s}=e,{connectorName:a,connectorId:i,logoUrl:c}=n??{},l=(o==null?void 0:o.length)>0,[f,m]=w.useState(""),[b,v]=w.useState([]),[y,p]=w.useState({}),{conversationId:h,connectorFunctions:g}=w.useContext(qt),C=g==null?void 0:g.sendTrackingEvent,{data:x,isError:I,isLoading:E}=gS({conversationId:h,enabled:!l}),{refetch:_}=ka({conversationId:h}),A=()=>{C==null||C(Ft.email_logging_search_results_found,{app_name:a,search_keyword:f})},{mutate:S,data:L,isPending:k,isIdle:D,reset:N}=bS({onSuccess:A}),{mutate:M,isPending:V}=CS({onSuccess:_}),{results:J=[],...$}=L??{},H=w.useMemo(()=>{const P={},W=[];for(const G of b){const Y=G.entityType+G.displayValue;P[Y]||W.push(G),P[Y]=G}for(const G of x??[]){const Y=G.entityType+G.displayValue;P[Y]||W.push(G),P[Y]=G}return W},[x,b]),X=P=>{m(P.target.value),D||N()},q=P=>{const{entityType:W,displayValue:G}=P;p(Y=>({...Y,[W+G]:P})),v(Y=>[P,...Y]),m(""),N()},se=()=>{C==null||C(Ft.email_logging_search_initiated,{app_name:a})},de=()=>{M({payload:{autoLogEnabled:!r},conversationId:h});const P=r?Ft.email_logging_auto_log_disabled:Ft.email_logging_auto_log_enabled;C==null||C(P,{app_name:a})},B=E||k;return u.jsxs(xS,{children:[u.jsxs(vS,{children:[u.jsxs(ES,{children:[u.jsx(wS,{children:u.jsx(_S,{src:c,alt:"connector"})}),u.jsx(d.Typography,{children:"Sync conversation"})]}),u.jsxs(IS,{children:[V?u.jsx(kS,{}):null,l?u.jsx(d.Tooltip,{arrow:!0,title:r?Rw:Mw,children:u.jsx(d.Stack,{children:u.jsx(FS,{checked:r,value:r,onClick:de,disabled:V})})}):null]})]}),u.jsx(SS,{children:u.jsxs(Ur,{children:[u.jsxs(pr,{condition:l,children:[u.jsx(Gp,{children:u.jsx(Hp,{children:u.jsx(jp,{connectorName:a,entities:o,disabled:!0})})}),u.jsx(pS,{})]},"disabled-view"),u.jsxs(pr,{fallback:!0,children:[u.jsx(AS,{children:u.jsx(TS,{type:"text",name:"search",value:f,onChange:X,onFocus:se,startAdornment:u.jsx(LS,{children:u.jsx(mp,{})}),size:"small"})}),u.jsx(Gp,{children:u.jsx(Hp,{children:u.jsxs(Ur,{children:[u.jsx(pr,{condition:B,children:u.jsx(Q_,{message:k?"Searching...":"Loading..."})},"loading"),u.jsx(pr,{condition:f===""&&H.length>0,children:u.jsx(jp,{connectorName:a,checkedEntities:y,setCheckedEntities:p,entities:H??[]})},"entity-suggestions"),u.jsx(pr,{condition:!!f&&D,children:u.jsx(W_,{searchText:f,connectorName:a,options:s,onSearch:S})},"search-options"),u.jsx(pr,{condition:!!f&&!D,children:u.jsx(J_,{connectorName:a,results:J,...$,addEntity:q})},"search-results"),u.jsx(pr,{condition:!H.length&&I,children:u.jsx(ll,{message:xn})},"error")]})})}),f?null:u.jsx(rS,{connectorName:a,connectorId:i,checkedEntities:y,close:t})]},"select-logs")]})})]})},NS=async({conversationId:e})=>{try{if(!e)throw new Error("Conversation ID is required to retry logs");const t=await we({url:ct(E_,{conversationId:e}),method:Me.POST});return t==null?void 0:t.data}catch(t){throw _e({message:xn,type:Je}),console.error(t),t}},RS=({onSuccess:e})=>tn({mutationFn:NS,onSuccess:e}),MS=d.styled(d.Stack)`
2661
2660
  border-radius: 100px;
2662
2661
  background: #f6f8fc;
2663
2662
  flex-flow: row nowrap;
@@ -2675,4 +2674,4 @@ Do you want to continue?`,vx="Select an object to create",Ex="Select an object t
2675
2674
  line-height: 14px;
2676
2675
  color: #506dff;
2677
2676
  margin-left: 6px;
2678
- `,jS=[ve.PENDING,ve.LOGGED,ve.NOT_LOGGED,ve.PAUSED],BS=[ve.LOGGED,ve.PAUSED],VS=({status:e,emailLogStatus:t})=>{const{isAdmin:n,conversationId:r,connectorFunctions:o}=w.useContext(qt),s=o==null?void 0:o.sendTrackingEvent,{refetch:a}=ka({conversationId:r}),{mutate:i,isPending:c}=RS({onSuccess:a}),l=Tw[e],f=Fw[e],m=Ow[e],{emailLogSettings:b,messageLogStatus:v}=t,{connectorName:y}=b??{},{logged:p,total:h}=v??{},g=BS.includes(e)&&h?` (${p}/${h})`:"",C=e===ve.ERROR,x=jS.includes(e),I=({close:_})=>u.jsx(DS,{close:_,emailLogStatus:t}),E=()=>{i({conversationId:r}),s==null||s(Ft.email_logging_failed_clicked,{app_name:y})};return u.jsx(y_,{logSettings:b,status:e,isAdmin:n,retry:C,renderEntities:x?I:void 0,children:u.jsxs(MS,{style:{cursor:x?"pointer":"not-allowed"},children:[l,m?m(`${f} ${g}`):null,C?u.jsx(PS,{variant:"text",disabled:c,onClick:E,children:"Retry"}):null]})})},ul=({emailLogStatus:e,containerElement:t,messageId:n,legacyMessageId:r})=>{if(!t)return null;const o=vw(e);return Re.createPortal(u.jsx(VS,{status:o,emailLogStatus:e,messageId:n,legacyMessageId:r}),t)},GS=({observer:e})=>{var v;const[t,n]=w.useState({}),[r,o]=w.useState({}),[s,a]=w.useState({}),{conversationId:i}=w.useContext(qt),{data:c}=ka({conversationId:i}),l=(v=c==null?void 0:c.emailLogSettings)==null?void 0:v.enabled,f=y=>{n(p=>({...p,...y}))},m=y=>{o(p=>({...p,...y}))},b=y=>{a(y)};return w.useEffect(()=>{if(!(!e||!l))return e.observe({setEmailButtonContainers:f,setComposeButtonContainers:m,setSubjectButtonContainers:b}),()=>{e.destroy(),n({}),o({})}},[e,l]),c?u.jsxs(u.Fragment,{children:[Object.entries(t).map(([y,p])=>u.jsx(ul,{emailLogStatus:c,containerElement:p.element,messageId:p.messageId,legacyMessageId:p.legacyMessageId},y)),Object.entries(r).map(([y,p])=>u.jsx(ul,{emailLogStatus:c,containerElement:p.element},y)),Object.entries(s).map(([y,p])=>u.jsx(ul,{emailLogStatus:c,containerElement:p.element},y))]}):null},HS=({isAdmin:e,conversationId:t,connectorFunctions:n,children:r})=>{const o=w.useMemo(()=>({isAdmin:e,conversationId:t,connectorFunctions:n}),[e,t,n]);return u.jsx(qt.Provider,{value:o,children:r})},WS=({children:e,...t})=>u.jsx(Qi,{store:el,children:u.jsx(d.HiverProvider,{custom:!0,children:u.jsx(Kc,{children:u.jsx(w.Suspense,{fallback:u.jsx(u.Fragment,{}),children:u.jsx(HS,{...t,children:e})})})})}),Da=".hiver-log-crm-button",Na=".hiver-log-crm-compose-button",Wp=".hiver-log-crm-subject-button";class ZS{constructor({emailNodeFilter:t,composeNodeFilter:n,emailHeaderTargetSelector:r=".gE.iv.gt .c2",composeHeaderTargetSelector:o=".aoD.hl .bgW",emailMessageContainerSelector:s=".adn.ads",subjectContainer:a=null,disableAutoLogInEmail:i=!1,disableAutoLogInCompose:c=!1,disableAutoLogInSubject:l=!1}={}){De(this,"observer",null);De(this,"setComposeButtonContainers",null);De(this,"setEmailButtonContainers",null);De(this,"setSubjectButtonContainers",null);De(this,"emailNodeFilter");De(this,"composeNodeFilter");De(this,"emailHeaderTargetSelector");De(this,"composeHeaderTargetSelector");De(this,"emailMessageContainerSelector");De(this,"disableAutoLogInEmail");De(this,"disableAutoLogInCompose");De(this,"disableAutoLogInSubject");De(this,"subjectContainer",null);De(this,"_addLogButtonsOnEmail",()=>{if(this.disableAutoLogInEmail)return;document.querySelectorAll(Da).forEach(r=>r.remove());const n=document.querySelectorAll(this.emailMessageContainerSelector);n.length&&n.forEach(r=>{var c;const o=r.querySelector(this.emailHeaderTargetSelector),s=r.getAttribute("data-message-id")||null,a=r.getAttribute("data-legacy-message-id")||null;if(o!=null&&o.querySelector(Da))return;const i=document.createElement("div");i.classList.add(Da.slice(1)),i.style.display="inline-block",i.style.marginLeft="8px",o==null||o.appendChild(i),(c=this.setEmailButtonContainers)==null||c.call(this,{[s??""]:{element:i,messageId:s,legacyMessageId:a}})})});De(this,"_addLogButtonsOnCompose",()=>{if(this.disableAutoLogInCompose)return;document.querySelectorAll(Na).forEach(r=>r.remove());const n=document.querySelectorAll(this.composeHeaderTargetSelector);n.length&&n.forEach((r,o)=>{var a;if(r.querySelector(Na))return;const s=document.createElement("div");s.classList.add(Na.slice(1)),s.style.display="inline-block",r.appendChild(s),(a=this.setComposeButtonContainers)==null||a.call(this,{["_compose_"+o]:{element:s}})})});De(this,"_addLogButtonOnSubject",()=>{var r,o,s;if(this.disableAutoLogInSubject||!this.subjectContainer)return;const t=(r=this.subjectContainer)==null?void 0:r.querySelectorAll(Wp);t==null||t.forEach(a=>a.remove());const n=document.createElement("div");n.classList.add(Wp.slice(1)),n.style.display="inline-block",(o=this.subjectContainer)==null||o.appendChild(n),(s=this.setSubjectButtonContainers)==null||s.call(this,{crm_subject:{element:n}})});this.emailNodeFilter=t||this._defaultEmailNodeFilter,this.composeNodeFilter=n||this._defaultComposeNodeFilter,this.emailHeaderTargetSelector=r,this.composeHeaderTargetSelector=o,this.emailMessageContainerSelector=s,this.subjectContainer=a,this.disableAutoLogInEmail=i,this.disableAutoLogInCompose=c,this.disableAutoLogInSubject=l}_defaultEmailNodeFilter(t){var n,r;return!!(t.nodeType===1&&t instanceof Element&&((n=t.classList)!=null&&n.contains("a3s")||(r=t.classList)!=null&&r.contains("ii")||typeof t.querySelector=="function"&&t.querySelector(".a3s")))}_defaultComposeNodeFilter(t){var n,r;return!!(t.nodeType===1&&t instanceof Element&&((n=t.classList)!=null&&n.contains("hiver-new-email-top-div")||(r=t.classList)!=null&&r.contains("hiver-compose-bar")))}_initMutationObserver(){this.observer&&this.observer.disconnect(),this.observer=new MutationObserver(t=>{let n=!1,r=!1;t.forEach(o=>{if(o.type==="childList"){const s=Array.from(o.addedNodes);this.disableAutoLogInEmail||s.some(this.emailNodeFilter)&&(n=!0),this.disableAutoLogInCompose||s.some(this.composeNodeFilter)&&(r=!0)}}),n&&setTimeout(()=>this._addLogButtonsOnEmail(),100),r&&setTimeout(()=>this._addLogButtonsOnCompose(),100)}),this.observer.observe(document.body,{childList:!0,subtree:!0})}_init(){this._addLogButtonsOnEmail(),this._addLogButtonsOnCompose(),this._addLogButtonOnSubject()}observe({setComposeButtonContainers:t,setEmailButtonContainers:n,setSubjectButtonContainers:r}){this.setComposeButtonContainers=t,this.setEmailButtonContainers=n,this.setSubjectButtonContainers=r,this._init(),(!this.disableAutoLogInEmail||!this.disableAutoLogInCompose)&&this._initMutationObserver()}destroy(){document.querySelectorAll(Da).forEach(r=>r.remove()),document.querySelectorAll(Na).forEach(r=>r.remove()),this.observer&&(this.observer.disconnect(),this.observer=null)}}const XS=({observer:e,...t})=>u.jsx(tl,{children:u.jsxs(WS,{...t,children:[u.jsx(GS,{observer:e}),Re.createPortal(u.jsx(nl,{id:"toast-message",children:u.jsx(Xa,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0})}),document.body)]})}),zS=e=>we({url:z8,method:Me.POST,data:e});le.ActionQueue=Cw,le.CONNECTORS_AGENT_EVENTS=Uc,le.ConnectorCardList=LI,le.EmailLogger=XS,le.GmailLogObserver=ZS,le.HiverConnectorBifrostAuth=we,le.IntegrationSense=bw,le.addNewConnectors=ph,le.dismissNotification=uu,le.fetchAppCfValues=zS,le.getConnectorsBifrostConfigs=Xt,le.getMetaData=Ny,le.initConnectorsBifrost=Bm,le.setCaptureFeedbackOnDemand=hh,le.shouldCaptureFeedback=fi,le.shouldShowNotification=lu,le.useConnectorSelectedEmail=cI,Object.defineProperty(le,Symbol.toStringTag,{value:"Module"})});
2677
+ `,jS=[ve.PENDING,ve.LOGGED,ve.NOT_LOGGED,ve.PAUSED],BS=[ve.LOGGED,ve.PAUSED],VS=({status:e,emailLogStatus:t})=>{const{isAdmin:n,conversationId:r,connectorFunctions:o}=w.useContext(qt),s=o==null?void 0:o.sendTrackingEvent,{refetch:a}=ka({conversationId:r}),{mutate:i,isPending:c}=RS({onSuccess:a}),l=Tw[e],f=Fw[e],m=Ow[e],{emailLogSettings:b,messageLogStatus:v}=t,{connectorName:y}=b??{},{logged:p,total:h}=v??{},g=BS.includes(e)&&h?` (${p}/${h})`:"",C=e===ve.ERROR,x=jS.includes(e),I=({close:_})=>u.jsx(DS,{close:_,emailLogStatus:t}),E=()=>{i({conversationId:r}),s==null||s(Ft.email_logging_failed_clicked,{app_name:y})};return u.jsx(y_,{logSettings:b,status:e,isAdmin:n,retry:C,renderEntities:x?I:void 0,children:u.jsxs(MS,{style:{cursor:x?"pointer":"not-allowed"},children:[l,m?m(`${f} ${g}`):null,C?u.jsx(PS,{variant:"text",disabled:c,onClick:E,children:"Retry"}):null]})})},dl=({emailLogStatus:e,containerElement:t,messageId:n,legacyMessageId:r})=>{if(!t)return null;const o=vw(e);return Re.createPortal(u.jsx(VS,{status:o,emailLogStatus:e,messageId:n,legacyMessageId:r}),t)},GS=({observer:e})=>{var v;const[t,n]=w.useState({}),[r,o]=w.useState({}),[s,a]=w.useState({}),{conversationId:i}=w.useContext(qt),{data:c}=ka({conversationId:i}),l=(v=c==null?void 0:c.emailLogSettings)==null?void 0:v.enabled,f=y=>{n(p=>({...p,...y}))},m=y=>{o(p=>({...p,...y}))},b=y=>{a(y)};return w.useEffect(()=>{if(!(!e||!l))return e.observe({setEmailButtonContainers:f,setComposeButtonContainers:m,setSubjectButtonContainers:b}),()=>{e.destroy(),n({}),o({})}},[e,l]),c?u.jsxs(u.Fragment,{children:[Object.entries(t).map(([y,p])=>u.jsx(dl,{emailLogStatus:c,containerElement:p.element,messageId:p.messageId,legacyMessageId:p.legacyMessageId},y)),Object.entries(r).map(([y,p])=>u.jsx(dl,{emailLogStatus:c,containerElement:p.element},y)),Object.entries(s).map(([y,p])=>u.jsx(dl,{emailLogStatus:c,containerElement:p.element},y))]}):null},HS=({isAdmin:e,conversationId:t,connectorFunctions:n,children:r})=>{const o=w.useMemo(()=>({isAdmin:e,conversationId:t,connectorFunctions:n}),[e,t,n]);return u.jsx(qt.Provider,{value:o,children:r})},WS=({children:e,...t})=>u.jsx(Ui,{store:tl,children:u.jsx(d.HiverProvider,{inter:!0,children:u.jsx(el,{children:u.jsx(w.Suspense,{fallback:u.jsx(u.Fragment,{}),children:u.jsx(HS,{...t,children:e})})})})}),Da=".hiver-log-crm-button",Na=".hiver-log-crm-compose-button",Wp=".hiver-log-crm-subject-button";class ZS{constructor({emailNodeFilter:t,composeNodeFilter:n,emailHeaderTargetSelector:r=".gE.iv.gt .c2",composeHeaderTargetSelector:o=".aoD.hl .bgW",emailMessageContainerSelector:s=".adn.ads",subjectContainer:a=null,disableAutoLogInEmail:i=!1,disableAutoLogInCompose:c=!1,disableAutoLogInSubject:l=!1}={}){De(this,"observer",null);De(this,"setComposeButtonContainers",null);De(this,"setEmailButtonContainers",null);De(this,"setSubjectButtonContainers",null);De(this,"emailNodeFilter");De(this,"composeNodeFilter");De(this,"emailHeaderTargetSelector");De(this,"composeHeaderTargetSelector");De(this,"emailMessageContainerSelector");De(this,"disableAutoLogInEmail");De(this,"disableAutoLogInCompose");De(this,"disableAutoLogInSubject");De(this,"subjectContainer",null);De(this,"_addLogButtonsOnEmail",()=>{if(this.disableAutoLogInEmail)return;document.querySelectorAll(Da).forEach(r=>r.remove());const n=document.querySelectorAll(this.emailMessageContainerSelector);n.length&&n.forEach(r=>{var c;const o=r.querySelector(this.emailHeaderTargetSelector),s=r.getAttribute("data-message-id")||null,a=r.getAttribute("data-legacy-message-id")||null;if(o!=null&&o.querySelector(Da))return;const i=document.createElement("div");i.classList.add(Da.slice(1)),i.style.display="inline-block",i.style.marginLeft="8px",o==null||o.appendChild(i),(c=this.setEmailButtonContainers)==null||c.call(this,{[s??""]:{element:i,messageId:s,legacyMessageId:a}})})});De(this,"_addLogButtonsOnCompose",()=>{if(this.disableAutoLogInCompose)return;document.querySelectorAll(Na).forEach(r=>r.remove());const n=document.querySelectorAll(this.composeHeaderTargetSelector);n.length&&n.forEach((r,o)=>{var a;if(r.querySelector(Na))return;const s=document.createElement("div");s.classList.add(Na.slice(1)),s.style.display="inline-block",r.appendChild(s),(a=this.setComposeButtonContainers)==null||a.call(this,{["_compose_"+o]:{element:s}})})});De(this,"_addLogButtonOnSubject",()=>{var r,o,s;if(this.disableAutoLogInSubject||!this.subjectContainer)return;const t=(r=this.subjectContainer)==null?void 0:r.querySelectorAll(Wp);t==null||t.forEach(a=>a.remove());const n=document.createElement("div");n.classList.add(Wp.slice(1)),n.style.display="inline-block",(o=this.subjectContainer)==null||o.appendChild(n),(s=this.setSubjectButtonContainers)==null||s.call(this,{crm_subject:{element:n}})});this.emailNodeFilter=t||this._defaultEmailNodeFilter,this.composeNodeFilter=n||this._defaultComposeNodeFilter,this.emailHeaderTargetSelector=r,this.composeHeaderTargetSelector=o,this.emailMessageContainerSelector=s,this.subjectContainer=a,this.disableAutoLogInEmail=i,this.disableAutoLogInCompose=c,this.disableAutoLogInSubject=l}_defaultEmailNodeFilter(t){var n,r;return!!(t.nodeType===1&&t instanceof Element&&((n=t.classList)!=null&&n.contains("a3s")||(r=t.classList)!=null&&r.contains("ii")||typeof t.querySelector=="function"&&t.querySelector(".a3s")))}_defaultComposeNodeFilter(t){var n,r;return!!(t.nodeType===1&&t instanceof Element&&((n=t.classList)!=null&&n.contains("hiver-new-email-top-div")||(r=t.classList)!=null&&r.contains("hiver-compose-bar")))}_initMutationObserver(){this.observer&&this.observer.disconnect(),this.observer=new MutationObserver(t=>{let n=!1,r=!1;t.forEach(o=>{if(o.type==="childList"){const s=Array.from(o.addedNodes);this.disableAutoLogInEmail||s.some(this.emailNodeFilter)&&(n=!0),this.disableAutoLogInCompose||s.some(this.composeNodeFilter)&&(r=!0)}}),n&&setTimeout(()=>this._addLogButtonsOnEmail(),100),r&&setTimeout(()=>this._addLogButtonsOnCompose(),100)}),this.observer.observe(document.body,{childList:!0,subtree:!0})}_init(){this._addLogButtonsOnEmail(),this._addLogButtonsOnCompose(),this._addLogButtonOnSubject()}observe({setComposeButtonContainers:t,setEmailButtonContainers:n,setSubjectButtonContainers:r}){this.setComposeButtonContainers=t,this.setEmailButtonContainers=n,this.setSubjectButtonContainers=r,this._init(),(!this.disableAutoLogInEmail||!this.disableAutoLogInCompose)&&this._initMutationObserver()}destroy(){document.querySelectorAll(Da).forEach(r=>r.remove()),document.querySelectorAll(Na).forEach(r=>r.remove()),this.observer&&(this.observer.disconnect(),this.observer=null)}}const XS=({observer:e,...t})=>u.jsx(nl,{children:u.jsxs(WS,{...t,children:[u.jsx(GS,{observer:e}),Re.createPortal(u.jsx(rl,{id:"toast-message",children:u.jsx(Xa,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0})}),document.body)]})}),zS=e=>we({url:z8,method:Me.POST,data:e});le.ActionQueue=Cw,le.CONNECTORS_AGENT_EVENTS=Kc,le.ConnectorCardList=LI,le.EmailLogger=XS,le.GmailLogObserver=ZS,le.HiverConnectorBifrostAuth=we,le.IntegrationSense=bw,le.addNewConnectors=ph,le.dismissNotification=du,le.fetchAppCfValues=zS,le.getConnectorsBifrostConfigs=Xt,le.getMetaData=Ny,le.initConnectorsBifrost=Bm,le.setCaptureFeedbackOnDemand=hh,le.shouldCaptureFeedback=fi,le.shouldShowNotification=uu,le.useConnectorSelectedEmail=cI,Object.defineProperty(le,Symbol.toStringTag,{value:"Module"})});