@arkyn/components 1.3.122 → 1.3.123

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- (function(he,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("react"),require("lucide-react"),require("react-dom"),require("@remix-run/react"),require("@react-input/mask"),require("framer-motion")):typeof define=="function"&&define.amd?define(["exports","react","lucide-react","react-dom","@remix-run/react","@react-input/mask","framer-motion"],c):(he=typeof globalThis<"u"?globalThis:he||self,c(he["@arkyn/components"]={},he.e$2,he.lucideReact,he.ReactDOM,he.react,he.mask,he.framerMotion))})(this,function(he,c,Ae,Yt,Ln,$f,cn){"use strict";function ed(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const So=ed(Yt);var qe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Er(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Fi={exports:{}},Un={};/**
1
+ (function(he,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("react"),require("lucide-react"),require("react-dom"),require("@remix-run/react"),require("@react-input/mask"),require("framer-motion")):typeof define=="function"&&define.amd?define(["exports","react","lucide-react","react-dom","@remix-run/react","@react-input/mask","framer-motion"],c):(he=typeof globalThis<"u"?globalThis:he||self,c(he["@arkyn/components"]={},he.e$2,he.lucideReact,he.ReactDOM,he.react,he.mask,he.framerMotion))})(this,function(he,c,Ae,Yt,Ln,ed,cn){"use strict";function td(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const So=td(Yt);var qe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Er(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Fi={exports:{}},Un={};/**
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 Ao;function td(){if(Ao)return Un;Ao=1;var t=c,e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(s,u,l){var f,h={},p=null,g=null;l!==void 0&&(p=""+l),u.key!==void 0&&(p=""+u.key),u.ref!==void 0&&(g=u.ref);for(f in u)r.call(u,f)&&!a.hasOwnProperty(f)&&(h[f]=u[f]);if(s&&s.defaultProps)for(f in u=s.defaultProps,u)h[f]===void 0&&(h[f]=u[f]);return{$$typeof:e,type:s,key:p,ref:g,props:h,_owner:i.current}}return Un.Fragment=n,Un.jsx=o,Un.jsxs=o,Un}var Hn={};/**
9
+ */var Ao;function nd(){if(Ao)return Un;Ao=1;var t=c,e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(s,u,l){var f,h={},p=null,g=null;l!==void 0&&(p=""+l),u.key!==void 0&&(p=""+u.key),u.ref!==void 0&&(g=u.ref);for(f in u)r.call(u,f)&&!a.hasOwnProperty(f)&&(h[f]=u[f]);if(s&&s.defaultProps)for(f in u=s.defaultProps,u)h[f]===void 0&&(h[f]=u[f]);return{$$typeof:e,type:s,key:p,ref:g,props:h,_owner:i.current}}return Un.Fragment=n,Un.jsx=o,Un.jsxs=o,Un}var Hn={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,7 +14,7 @@
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 Lo;function nd(){return Lo||(Lo=1,process.env.NODE_ENV!=="production"&&function(){var t=c,e=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),y=Symbol.iterator,v="@@iterator";function d(S){if(S===null||typeof S!="object")return null;var te=y&&S[y]||S[v];return typeof te=="function"?te:null}var D=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function x(S){{for(var te=arguments.length,oe=new Array(te>1?te-1:0),De=1;De<te;De++)oe[De-1]=arguments[De];E("error",S,oe)}}function E(S,te,oe){{var De=D.ReactDebugCurrentFrame,je=De.getStackAddendum();je!==""&&(te+="%s",oe=oe.concat([je]));var We=oe.map(function(Te){return String(Te)});We.unshift("Warning: "+te),Function.prototype.apply.call(console[S],console,We)}}var O=!1,b=!1,w=!1,A=!1,M=!1,V;V=Symbol.for("react.module.reference");function P(S){return!!(typeof S=="string"||typeof S=="function"||S===r||S===a||M||S===i||S===l||S===f||A||S===g||O||b||w||typeof S=="object"&&S!==null&&(S.$$typeof===p||S.$$typeof===h||S.$$typeof===o||S.$$typeof===s||S.$$typeof===u||S.$$typeof===V||S.getModuleId!==void 0))}function _(S,te,oe){var De=S.displayName;if(De)return De;var je=te.displayName||te.name||"";return je!==""?oe+"("+je+")":oe}function R(S){return S.displayName||"Context"}function N(S){if(S==null)return null;if(typeof S.tag=="number"&&x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof S=="function")return S.displayName||S.name||null;if(typeof S=="string")return S;switch(S){case r:return"Fragment";case n:return"Portal";case a:return"Profiler";case i:return"StrictMode";case l:return"Suspense";case f:return"SuspenseList"}if(typeof S=="object")switch(S.$$typeof){case s:var te=S;return R(te)+".Consumer";case o:var oe=S;return R(oe._context)+".Provider";case u:return _(S,S.render,"ForwardRef");case h:var De=S.displayName||null;return De!==null?De:N(S.type)||"Memo";case p:{var je=S,We=je._payload,Te=je._init;try{return N(Te(We))}catch{return null}}}return null}var T=Object.assign,j=0,X,z,$,re,k,I,G;function H(){}H.__reactDisabledLog=!0;function Q(){{if(j===0){X=console.log,z=console.info,$=console.warn,re=console.error,k=console.group,I=console.groupCollapsed,G=console.groupEnd;var S={configurable:!0,enumerable:!0,value:H,writable:!0};Object.defineProperties(console,{info:S,log:S,warn:S,error:S,group:S,groupCollapsed:S,groupEnd:S})}j++}}function K(){{if(j--,j===0){var S={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:T({},S,{value:X}),info:T({},S,{value:z}),warn:T({},S,{value:$}),error:T({},S,{value:re}),group:T({},S,{value:k}),groupCollapsed:T({},S,{value:I}),groupEnd:T({},S,{value:G})})}j<0&&x("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var C=D.ReactCurrentDispatcher,U;function W(S,te,oe){{if(U===void 0)try{throw Error()}catch(je){var De=je.stack.trim().match(/\n( *(at )?)/);U=De&&De[1]||""}return`
17
+ */var Lo;function rd(){return Lo||(Lo=1,process.env.NODE_ENV!=="production"&&function(){var t=c,e=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),y=Symbol.iterator,v="@@iterator";function d(S){if(S===null||typeof S!="object")return null;var te=y&&S[y]||S[v];return typeof te=="function"?te:null}var D=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function x(S){{for(var te=arguments.length,oe=new Array(te>1?te-1:0),De=1;De<te;De++)oe[De-1]=arguments[De];E("error",S,oe)}}function E(S,te,oe){{var De=D.ReactDebugCurrentFrame,je=De.getStackAddendum();je!==""&&(te+="%s",oe=oe.concat([je]));var We=oe.map(function(Te){return String(Te)});We.unshift("Warning: "+te),Function.prototype.apply.call(console[S],console,We)}}var O=!1,b=!1,w=!1,A=!1,M=!1,V;V=Symbol.for("react.module.reference");function P(S){return!!(typeof S=="string"||typeof S=="function"||S===r||S===a||M||S===i||S===l||S===f||A||S===g||O||b||w||typeof S=="object"&&S!==null&&(S.$$typeof===p||S.$$typeof===h||S.$$typeof===o||S.$$typeof===s||S.$$typeof===u||S.$$typeof===V||S.getModuleId!==void 0))}function _(S,te,oe){var De=S.displayName;if(De)return De;var je=te.displayName||te.name||"";return je!==""?oe+"("+je+")":oe}function R(S){return S.displayName||"Context"}function N(S){if(S==null)return null;if(typeof S.tag=="number"&&x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof S=="function")return S.displayName||S.name||null;if(typeof S=="string")return S;switch(S){case r:return"Fragment";case n:return"Portal";case a:return"Profiler";case i:return"StrictMode";case l:return"Suspense";case f:return"SuspenseList"}if(typeof S=="object")switch(S.$$typeof){case s:var te=S;return R(te)+".Consumer";case o:var oe=S;return R(oe._context)+".Provider";case u:return _(S,S.render,"ForwardRef");case h:var De=S.displayName||null;return De!==null?De:N(S.type)||"Memo";case p:{var je=S,We=je._payload,Te=je._init;try{return N(Te(We))}catch{return null}}}return null}var T=Object.assign,j=0,X,z,$,re,k,I,G;function H(){}H.__reactDisabledLog=!0;function Q(){{if(j===0){X=console.log,z=console.info,$=console.warn,re=console.error,k=console.group,I=console.groupCollapsed,G=console.groupEnd;var S={configurable:!0,enumerable:!0,value:H,writable:!0};Object.defineProperties(console,{info:S,log:S,warn:S,error:S,group:S,groupCollapsed:S,groupEnd:S})}j++}}function K(){{if(j--,j===0){var S={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:T({},S,{value:X}),info:T({},S,{value:z}),warn:T({},S,{value:$}),error:T({},S,{value:re}),group:T({},S,{value:k}),groupCollapsed:T({},S,{value:I}),groupEnd:T({},S,{value:G})})}j<0&&x("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var C=D.ReactCurrentDispatcher,U;function W(S,te,oe){{if(U===void 0)try{throw Error()}catch(je){var De=je.stack.trim().match(/\n( *(at )?)/);U=De&&De[1]||""}return`
18
18
  `+U+S}}var F=!1,J;{var ne=typeof WeakMap=="function"?WeakMap:Map;J=new ne}function Y(S,te){if(!S||F)return"";{var oe=J.get(S);if(oe!==void 0)return oe}var De;F=!0;var je=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var We;We=C.current,C.current=null,Q();try{if(te){var Te=function(){throw Error()};if(Object.defineProperty(Te.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Te,[])}catch(ot){De=ot}Reflect.construct(S,[],Te)}else{try{Te.call()}catch(ot){De=ot}S.call(Te.prototype)}}else{try{throw Error()}catch(ot){De=ot}S()}}catch(ot){if(ot&&De&&typeof ot.stack=="string"){for(var Oe=ot.stack.split(`
19
19
  `),at=De.stack.split(`
20
20
  `),Je=Oe.length-1,tt=at.length-1;Je>=1&&tt>=0&&Oe[Je]!==at[tt];)tt--;for(;Je>=1&&tt>=0;Je--,tt--)if(Oe[Je]!==at[tt]){if(Je!==1||tt!==1)do if(Je--,tt--,tt<0||Oe[Je]!==at[tt]){var dt=`
@@ -24,12 +24,12 @@ Check the render method of \``+S+"`."}return""}}function Nn(S){{if(S!==void 0){v
24
24
 
25
25
  Check your code at `+te+":"+oe+"."}return""}}var yr={};function Li(S){{var te=Sn();if(!te){var oe=typeof S=="string"?S:S.displayName||S.name;oe&&(te=`
26
26
 
27
- Check the top-level render call using <`+oe+">.")}return te}}function An(S,te){{if(!S._store||S._store.validated||S.key!=null)return;S._store.validated=!0;var oe=Li(te);if(yr[oe])return;yr[oe]=!0;var De="";S&&S._owner&&S._owner!==Re.current&&(De=" It was passed a child from "+N(S._owner.type)+"."),it(S),x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',oe,De),it(null)}}function Cr(S,te){{if(typeof S!="object")return;if(se(S))for(var oe=0;oe<S.length;oe++){var De=S[oe];Rt(De)&&An(De,te)}else if(Rt(S))S._store&&(S._store.validated=!0);else if(S){var je=d(S);if(typeof je=="function"&&je!==S.entries)for(var We=je.call(S),Te;!(Te=We.next()).done;)Rt(Te.value)&&An(Te.value,te)}}}function Oi(S){{var te=S.type;if(te==null||typeof te=="string")return;var oe;if(typeof te=="function")oe=te.propTypes;else if(typeof te=="object"&&(te.$$typeof===u||te.$$typeof===h))oe=te.propTypes;else return;if(oe){var De=N(te);ve(oe,S.props,"prop",De,S)}else if(te.PropTypes!==void 0&&!ut){ut=!0;var je=N(te);x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",je||"Unknown")}typeof te.getDefaultProps=="function"&&!te.getDefaultProps.isReactClassApproved&&x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function _n(S){{for(var te=Object.keys(S.props),oe=0;oe<te.length;oe++){var De=te[oe];if(De!=="children"&&De!=="key"){it(S),x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",De),it(null);break}}S.ref!==null&&(it(S),x("Invalid attribute `ref` supplied to `React.Fragment`."),it(null))}}var Dr={};function br(S,te,oe,De,je,We){{var Te=P(S);if(!Te){var Oe="";(S===void 0||typeof S=="object"&&S!==null&&Object.keys(S).length===0)&&(Oe+=" 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 at=Nn(je);at?Oe+=at:Oe+=Sn();var Je;S===null?Je="null":se(S)?Je="array":S!==void 0&&S.$$typeof===e?(Je="<"+(N(S.type)||"Unknown")+" />",Oe=" Did you accidentally export a JSX literal instead of a component?"):Je=typeof S,x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Je,Oe)}var tt=be(S,te,oe,je,We);if(tt==null)return tt;if(Te){var dt=te.children;if(dt!==void 0)if(De)if(se(dt)){for(var qt=0;qt<dt.length;qt++)Cr(dt[qt],S);Object.freeze&&Object.freeze(dt)}else x("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 Cr(dt,S)}if(pe.call(te,"key")){var Gt=N(S),ot=Object.keys(te).filter(function(h1){return h1!=="key"}),xe=ot.length>0?"{key: someKey, "+ot.join(": ..., ")+": ...}":"{key: someKey}";if(!Dr[Gt+xe]){var p1=ot.length>0?"{"+ot.join(": ..., ")+": ...}":"{}";x(`A props object containing a "key" prop is being spread into JSX:
27
+ Check the top-level render call using <`+oe+">.")}return te}}function An(S,te){{if(!S._store||S._store.validated||S.key!=null)return;S._store.validated=!0;var oe=Li(te);if(yr[oe])return;yr[oe]=!0;var De="";S&&S._owner&&S._owner!==Re.current&&(De=" It was passed a child from "+N(S._owner.type)+"."),it(S),x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',oe,De),it(null)}}function Cr(S,te){{if(typeof S!="object")return;if(se(S))for(var oe=0;oe<S.length;oe++){var De=S[oe];Rt(De)&&An(De,te)}else if(Rt(S))S._store&&(S._store.validated=!0);else if(S){var je=d(S);if(typeof je=="function"&&je!==S.entries)for(var We=je.call(S),Te;!(Te=We.next()).done;)Rt(Te.value)&&An(Te.value,te)}}}function Oi(S){{var te=S.type;if(te==null||typeof te=="string")return;var oe;if(typeof te=="function")oe=te.propTypes;else if(typeof te=="object"&&(te.$$typeof===u||te.$$typeof===h))oe=te.propTypes;else return;if(oe){var De=N(te);ve(oe,S.props,"prop",De,S)}else if(te.PropTypes!==void 0&&!ut){ut=!0;var je=N(te);x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",je||"Unknown")}typeof te.getDefaultProps=="function"&&!te.getDefaultProps.isReactClassApproved&&x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function _n(S){{for(var te=Object.keys(S.props),oe=0;oe<te.length;oe++){var De=te[oe];if(De!=="children"&&De!=="key"){it(S),x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",De),it(null);break}}S.ref!==null&&(it(S),x("Invalid attribute `ref` supplied to `React.Fragment`."),it(null))}}var Dr={};function br(S,te,oe,De,je,We){{var Te=P(S);if(!Te){var Oe="";(S===void 0||typeof S=="object"&&S!==null&&Object.keys(S).length===0)&&(Oe+=" 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 at=Nn(je);at?Oe+=at:Oe+=Sn();var Je;S===null?Je="null":se(S)?Je="array":S!==void 0&&S.$$typeof===e?(Je="<"+(N(S.type)||"Unknown")+" />",Oe=" Did you accidentally export a JSX literal instead of a component?"):Je=typeof S,x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Je,Oe)}var tt=be(S,te,oe,je,We);if(tt==null)return tt;if(Te){var dt=te.children;if(dt!==void 0)if(De)if(se(dt)){for(var qt=0;qt<dt.length;qt++)Cr(dt[qt],S);Object.freeze&&Object.freeze(dt)}else x("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 Cr(dt,S)}if(pe.call(te,"key")){var Gt=N(S),ot=Object.keys(te).filter(function(v1){return v1!=="key"}),xe=ot.length>0?"{key: someKey, "+ot.join(": ..., ")+": ...}":"{key: someKey}";if(!Dr[Gt+xe]){var h1=ot.length>0?"{"+ot.join(": ..., ")+": ...}":"{}";x(`A props object containing a "key" prop is being spread into JSX:
28
28
  let props = %s;
29
29
  <%s {...props} />
30
30
  React keys must be passed directly to JSX without using spread:
31
31
  let props = %s;
32
- <%s key={someKey} {...props} />`,xe,Gt,p1,Gt),Dr[Gt+xe]=!0}}return S===r?_n(tt):Oi(tt),tt}}function zn(S,te,oe){return br(S,te,oe,!0)}function Pi(S,te,oe){return br(S,te,oe,!1)}var Mi=Pi,Wn=zn;Hn.Fragment=r,Hn.jsx=Mi,Hn.jsxs=Wn}()),Hn}process.env.NODE_ENV==="production"?Fi.exports=td():Fi.exports=nd();var B=Fi.exports;function Oo(t){const{className:e,...n}=t,r=`arkynAlertTitle ${e}`;return B.jsx("div",{className:r.trim(),...n})}const Po=c.createContext({});function rd(){return c.useContext(Po)}function id(t){const{schema:e,children:n,className:r,...i}=t,s=!(l=>{let f=!1;const h=p=>{Array.isArray(p)?p.forEach(h):p&&typeof p=="object"&&"type"in p&&(p.type===Oo?f=!0:p.props&&p.props.children&&h(p.props.children))};return h(l),f})(n)?"nonExistsAlertTitle":"existsAlertTitle",u=`arkynAlertContainer ${e} ${s} ${r}`;return B.jsx(Po.Provider,{value:t,children:B.jsx("div",{className:u.trim(),...i,children:n})})}function ad(t){const{className:e,...n}=t,r=`arkynAlertContent ${e}`;return B.jsx("div",{className:r.trim(),...n})}function od(t){const{className:e,...n}=t,r=`arkynAlertDescription ${e}`;return B.jsx("div",{className:r.trim(),...n})}function sd(t){const{className:e,...n}=t,{schema:r}=rd(),i=`arkynAlertIcon ${r} ${e}`;switch(r){case"success":return B.jsx(Ae.CheckCircle2,{className:i,...n});case"danger":return B.jsx(Ae.XCircle,{className:i,...n});case"warning":return B.jsx(Ae.AlertTriangle,{className:i,...n});case"info":return B.jsx(Ae.Info,{className:i,...n})}}function wr(t,e){return e?B.jsx(e,{size:t,strokeWidth:2.5}):B.jsx(B.Fragment,{})}function Mo(t,e){return[...new Array(e-t)].map((n,r)=>t+r+1).filter(n=>n>0)}function ud(t,e,n){return t>=n?[]:Mo(t,t+e)}function ld(t,e){return t<=1?[]:Mo(t-1-e,t-1)}function cd(t,e,n){if(!t)return B.jsx(B.Fragment,{});if(typeof t=="string")return B.jsx("p",{className:n,children:t});const r=t;return B.jsx("p",{className:n,children:B.jsx(r,{color:"var(--secondary-600)",size:e,strokeWidth:2.5})})}function fd(t){const{variant:e="ghost",scheme:n="primary",size:r="md",leftIcon:i,rightIcon:a,className:o="",children:s,...u}=t,f={md:12,lg:14}[r],h=`arkynBadge ${e} ${n} ${r} ${o}`;return B.jsxs("div",{className:h.trim(),...u,children:[wr(f,i),s,wr(f,i)]})}function dd(t){const{className:e,...n}=t,r=`arkynCard ${e}`;return B.jsx("div",{className:r.trim(),...n})}function pd(t){const{className:e,orientation:n="horizontal",...r}=t,i=`arkynDivider ${n} ${e}`;return B.jsx("div",{className:i.trim(),...r})}/*! *****************************************************************************
32
+ <%s key={someKey} {...props} />`,xe,Gt,h1,Gt),Dr[Gt+xe]=!0}}return S===r?_n(tt):Oi(tt),tt}}function zn(S,te,oe){return br(S,te,oe,!0)}function Pi(S,te,oe){return br(S,te,oe,!1)}var Mi=Pi,Wn=zn;Hn.Fragment=r,Hn.jsx=Mi,Hn.jsxs=Wn}()),Hn}process.env.NODE_ENV==="production"?Fi.exports=nd():Fi.exports=rd();var B=Fi.exports;function Oo(t){const{className:e,...n}=t,r=`arkynAlertTitle ${e}`;return B.jsx("div",{className:r.trim(),...n})}const Po=c.createContext({});function id(){return c.useContext(Po)}function ad(t){const{schema:e,children:n,className:r,...i}=t,s=!(l=>{let f=!1;const h=p=>{Array.isArray(p)?p.forEach(h):p&&typeof p=="object"&&"type"in p&&(p.type===Oo?f=!0:p.props&&p.props.children&&h(p.props.children))};return h(l),f})(n)?"nonExistsAlertTitle":"existsAlertTitle",u=`arkynAlertContainer ${e} ${s} ${r}`;return B.jsx(Po.Provider,{value:t,children:B.jsx("div",{className:u.trim(),...i,children:n})})}function od(t){const{className:e,...n}=t,r=`arkynAlertContent ${e}`;return B.jsx("div",{className:r.trim(),...n})}function sd(t){const{className:e,...n}=t,r=`arkynAlertDescription ${e}`;return B.jsx("div",{className:r.trim(),...n})}function ud(t){const{className:e,...n}=t,{schema:r}=id(),i=`arkynAlertIcon ${r} ${e}`;switch(r){case"success":return B.jsx(Ae.CheckCircle2,{className:i,...n});case"danger":return B.jsx(Ae.XCircle,{className:i,...n});case"warning":return B.jsx(Ae.AlertTriangle,{className:i,...n});case"info":return B.jsx(Ae.Info,{className:i,...n})}}function wr(t,e){return e?B.jsx(e,{size:t,strokeWidth:2.5}):B.jsx(B.Fragment,{})}function Mo(t,e){return[...new Array(e-t)].map((n,r)=>t+r+1).filter(n=>n>0)}function ld(t,e,n){return t>=n?[]:Mo(t,t+e)}function cd(t,e){return t<=1?[]:Mo(t-1-e,t-1)}function fd(t,e,n){if(!t)return B.jsx(B.Fragment,{});if(typeof t=="string")return B.jsx("p",{className:n,children:t});const r=t;return B.jsx("p",{className:n,children:B.jsx(r,{color:"var(--secondary-600)",size:e,strokeWidth:2.5})})}function dd(t){const{variant:e="ghost",scheme:n="primary",size:r="md",leftIcon:i,rightIcon:a,className:o="",children:s,...u}=t,f={md:12,lg:14}[r],h=`arkynBadge ${e} ${n} ${r} ${o}`;return B.jsxs("div",{className:h.trim(),...u,children:[wr(f,i),s,wr(f,i)]})}function pd(t){const{className:e,...n}=t,r=`arkynCard ${e}`;return B.jsx("div",{className:r.trim(),...n})}function hd(t){const{className:e,orientation:n="horizontal",...r}=t,i=`arkynDivider ${n} ${e}`;return B.jsx("div",{className:i.trim(),...r})}/*! *****************************************************************************
33
33
  Copyright (c) Microsoft Corporation.
34
34
 
35
35
  Permission to use, copy, modify, and/or distribute this software for any
@@ -42,15 +42,15 @@ React keys must be passed directly to JSX without using spread:
42
42
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
43
43
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
44
44
  PERFORMANCE OF THIS SOFTWARE.
45
- ***************************************************************************** */var ki=function(t,e){return ki=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},ki(t,e)};function Ge(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");ki(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var me=function(){return me=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},me.apply(this,arguments)};function Ti(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function hd(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(f){try{l(r.next(f))}catch(h){o(h)}}function u(f){try{l(r.throw(f))}catch(h){o(h)}}function l(f){f.done?a(f.value):i(f.value).then(s,u)}l((r=r.apply(t,e||[])).next())})}function vd(t,e){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(f){return u([l,f])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(f){l=[6,f],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Fo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var gd=process.env.NODE_ENV,md=function(t,e,n,r,i,a,o,s){if(gd!=="production"&&e===void 0)throw new Error("invariant requires an error message argument");if(!t){var u;if(e===void 0)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,a,o,s],f=0;u=new Error(e.replace(/%s/g,function(){return l[f++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}},yd=md,rt=Fo(yd),Se=c.createContext(null);function Cd(){rt(!!c.useContext,"useGoogleMap is React hook and requires React version 16.8+");var t=c.useContext(Se);return rt(!!t,"useGoogleMap needs a GoogleMap available up in the tree"),t}function Dd(t,e,n){return Object.keys(t).reduce(function(i,a){return e(i,t[a],a)},n)}function bd(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}function Ed(t,e,n,r){var i={},a=function(o,s){var u=n[s];u!==e[s]&&(i[s]=u,o(r,u))};return bd(t,a),i}function wd(t,e,n){var r=Dd(n,function(a,o,s){return typeof t[s]=="function"&&a.push(google.maps.event.addListener(e,o,t[s])),a},[]);return r}function xd(t){google.maps.event.removeListener(t)}function Me(t){t===void 0&&(t=[]),t.forEach(xd)}function Pe(t){var e=t.updaterMap,n=t.eventMap,r=t.prevProps,i=t.nextProps,a=t.instance,o=wd(i,a,n);return Ed(e,r,i,a),o}var ko={onDblClick:"dblclick",onDragEnd:"dragend",onDragStart:"dragstart",onMapTypeIdChanged:"maptypeid_changed",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseDown:"mousedown",onMouseUp:"mouseup",onRightClick:"rightclick",onTilesLoaded:"tilesloaded",onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onDrag:"drag",onHeadingChanged:"heading_changed",onIdle:"idle",onProjectionChanged:"projection_changed",onResize:"resize",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed"},To={extraMapTypes:function(t,e){e.forEach(function(r,i){t.mapTypes.set(String(i),r)})},center:function(t,e){t.setCenter(e)},clickableIcons:function(t,e){t.setClickableIcons(e)},heading:function(t,e){t.setHeading(e)},mapTypeId:function(t,e){t.setMapTypeId(e)},options:function(t,e){t.setOptions(e)},streetView:function(t,e){t.setStreetView(e)},tilt:function(t,e){t.setTilt(e)},zoom:function(t,e){t.setZoom(e)}};function Bd(t){var e=t.children,n=t.options,r=t.id,i=t.mapContainerStyle,a=t.mapContainerClassName,o=t.center,s=t.onClick,u=t.onDblClick,l=t.onDrag,f=t.onDragEnd,h=t.onDragStart,p=t.onMouseMove,g=t.onMouseOut,y=t.onMouseOver,v=t.onMouseDown,d=t.onMouseUp,D=t.onRightClick,x=t.onCenterChanged,E=t.onLoad,O=t.onUnmount,b=c.useState(null),w=b[0],A=b[1],M=c.useRef(null),V=c.useState(null),P=V[0],_=V[1],R=c.useState(null),N=R[0],T=R[1],j=c.useState(null),X=j[0],z=j[1],$=c.useState(null),re=$[0],k=$[1],I=c.useState(null),G=I[0],H=I[1],Q=c.useState(null),K=Q[0],C=Q[1],U=c.useState(null),W=U[0],F=U[1],J=c.useState(null),ne=J[0],Y=J[1],ue=c.useState(null),ae=ue[0],de=ue[1],pe=c.useState(null),Ce=pe[0],ye=pe[1],ge=c.useState(null),ve=ge[0],Ne=ge[1],se=c.useState(null),_e=se[0],fe=se[1];return c.useEffect(function(){n&&w!==null&&w.setOptions(n)},[w,n]),c.useEffect(function(){w!==null&&typeof o<"u"&&w.setCenter(o)},[w,o]),c.useEffect(function(){w&&u&&(N!==null&&google.maps.event.removeListener(N),T(google.maps.event.addListener(w,"dblclick",u)))},[u]),c.useEffect(function(){w&&f&&(X!==null&&google.maps.event.removeListener(X),z(google.maps.event.addListener(w,"dragend",f)))},[f]),c.useEffect(function(){w&&h&&(re!==null&&google.maps.event.removeListener(re),k(google.maps.event.addListener(w,"dragstart",h)))},[h]),c.useEffect(function(){w&&v&&(G!==null&&google.maps.event.removeListener(G),H(google.maps.event.addListener(w,"mousedown",v)))},[v]),c.useEffect(function(){w&&p&&(K!==null&&google.maps.event.removeListener(K),C(google.maps.event.addListener(w,"mousemove",p)))},[p]),c.useEffect(function(){w&&g&&(W!==null&&google.maps.event.removeListener(W),F(google.maps.event.addListener(w,"mouseout",g)))},[g]),c.useEffect(function(){w&&y&&(ne!==null&&google.maps.event.removeListener(ne),Y(google.maps.event.addListener(w,"mouseover",y)))},[y]),c.useEffect(function(){w&&d&&(ae!==null&&google.maps.event.removeListener(ae),de(google.maps.event.addListener(w,"mouseup",d)))},[d]),c.useEffect(function(){w&&D&&(Ce!==null&&google.maps.event.removeListener(Ce),ye(google.maps.event.addListener(w,"rightclick",D)))},[D]),c.useEffect(function(){w&&s&&(ve!==null&&google.maps.event.removeListener(ve),Ne(google.maps.event.addListener(w,"click",s)))},[s]),c.useEffect(function(){w&&l&&(_e!==null&&google.maps.event.removeListener(_e),fe(google.maps.event.addListener(w,"drag",l)))},[l]),c.useEffect(function(){w&&x&&(P!==null&&google.maps.event.removeListener(P),_(google.maps.event.addListener(w,"center_changed",x)))},[s]),c.useEffect(function(){var we=M.current===null?null:new google.maps.Map(M.current,n);return A(we),we!==null&&E&&E(we),function(){we!==null&&O&&O(we)}},[]),B.jsx("div",{id:r,ref:M,style:i,className:a,children:B.jsx(Se.Provider,{value:w,children:w!==null?e:null})})}c.memo(Bd);var Sd=function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={map:null},n.registeredEvents=[],n.mapRef=null,n.getInstance=function(){return n.mapRef===null?null:new google.maps.Map(n.mapRef,n.props.options)},n.panTo=function(r){var i=n.getInstance();i&&i.panTo(r)},n.setMapCallback=function(){n.state.map!==null&&n.props.onLoad&&n.props.onLoad(n.state.map)},n.getRef=function(r){n.mapRef=r},n}return e.prototype.componentDidMount=function(){var n=this.getInstance();this.registeredEvents=Pe({updaterMap:To,eventMap:ko,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{map:n}},this.setMapCallback)},e.prototype.componentDidUpdate=function(n){this.state.map!==null&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:To,eventMap:ko,prevProps:n,nextProps:this.props,instance:this.state.map}))},e.prototype.componentWillUnmount=function(){this.state.map!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.map),Me(this.registeredEvents))},e.prototype.render=function(){return B.jsx("div",{id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName,children:B.jsx(Se.Provider,{value:this.state.map,children:this.state.map!==null?this.props.children:null})})},e}(c.PureComponent),fn=typeof document<"u";function Ro(t){var e=t.url,n=t.id,r=t.nonce;return fn?new Promise(function(a,o){var s=document.getElementById(n),u=window;if(s){var l=s.getAttribute("data-state");if(s.src===e&&l!=="error"){if(l==="ready")return a(n);var f=u.initMap,h=s.onerror;u.initMap=function(){f&&f(),a(n)},s.onerror=function(g){h&&h(g),o(g)};return}else s.remove()}var p=document.createElement("script");p.type="text/javascript",p.src=e,p.id=n,p.async=!0,p.nonce=r||"",p.onerror=function(y){p.setAttribute("data-state","error"),o(y)},u.initMap=function(){p.setAttribute("data-state","ready"),a(n)},document.head.appendChild(p)}).catch(function(i){throw console.error("injectScript error: ",i),i}):Promise.reject(new Error("document is undefined"))}function Io(t){var e=t.href;return e&&(e.indexOf("https://fonts.googleapis.com/css?family=Roboto")===0||e.indexOf("https://fonts.googleapis.com/css?family=Google+Sans+Text")===0)?!0:t.tagName.toLowerCase()==="style"&&t.styleSheet&&t.styleSheet.cssText&&t.styleSheet.cssText.replace(`\r
45
+ ***************************************************************************** */var ki=function(t,e){return ki=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},ki(t,e)};function Ge(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");ki(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var me=function(){return me=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},me.apply(this,arguments)};function Ti(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function vd(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(f){try{l(r.next(f))}catch(h){o(h)}}function u(f){try{l(r.throw(f))}catch(h){o(h)}}function l(f){f.done?a(f.value):i(f.value).then(s,u)}l((r=r.apply(t,e||[])).next())})}function gd(t,e){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(f){return u([l,f])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(f){l=[6,f],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Fo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var md=process.env.NODE_ENV,yd=function(t,e,n,r,i,a,o,s){if(md!=="production"&&e===void 0)throw new Error("invariant requires an error message argument");if(!t){var u;if(e===void 0)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,a,o,s],f=0;u=new Error(e.replace(/%s/g,function(){return l[f++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}},Cd=yd,rt=Fo(Cd),Se=c.createContext(null);function Dd(){rt(!!c.useContext,"useGoogleMap is React hook and requires React version 16.8+");var t=c.useContext(Se);return rt(!!t,"useGoogleMap needs a GoogleMap available up in the tree"),t}function bd(t,e,n){return Object.keys(t).reduce(function(i,a){return e(i,t[a],a)},n)}function Ed(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}function wd(t,e,n,r){var i={},a=function(o,s){var u=n[s];u!==e[s]&&(i[s]=u,o(r,u))};return Ed(t,a),i}function xd(t,e,n){var r=bd(n,function(a,o,s){return typeof t[s]=="function"&&a.push(google.maps.event.addListener(e,o,t[s])),a},[]);return r}function Bd(t){google.maps.event.removeListener(t)}function Me(t){t===void 0&&(t=[]),t.forEach(Bd)}function Pe(t){var e=t.updaterMap,n=t.eventMap,r=t.prevProps,i=t.nextProps,a=t.instance,o=xd(i,a,n);return wd(e,r,i,a),o}var ko={onDblClick:"dblclick",onDragEnd:"dragend",onDragStart:"dragstart",onMapTypeIdChanged:"maptypeid_changed",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseDown:"mousedown",onMouseUp:"mouseup",onRightClick:"rightclick",onTilesLoaded:"tilesloaded",onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onDrag:"drag",onHeadingChanged:"heading_changed",onIdle:"idle",onProjectionChanged:"projection_changed",onResize:"resize",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed"},To={extraMapTypes:function(t,e){e.forEach(function(r,i){t.mapTypes.set(String(i),r)})},center:function(t,e){t.setCenter(e)},clickableIcons:function(t,e){t.setClickableIcons(e)},heading:function(t,e){t.setHeading(e)},mapTypeId:function(t,e){t.setMapTypeId(e)},options:function(t,e){t.setOptions(e)},streetView:function(t,e){t.setStreetView(e)},tilt:function(t,e){t.setTilt(e)},zoom:function(t,e){t.setZoom(e)}};function Sd(t){var e=t.children,n=t.options,r=t.id,i=t.mapContainerStyle,a=t.mapContainerClassName,o=t.center,s=t.onClick,u=t.onDblClick,l=t.onDrag,f=t.onDragEnd,h=t.onDragStart,p=t.onMouseMove,g=t.onMouseOut,y=t.onMouseOver,v=t.onMouseDown,d=t.onMouseUp,D=t.onRightClick,x=t.onCenterChanged,E=t.onLoad,O=t.onUnmount,b=c.useState(null),w=b[0],A=b[1],M=c.useRef(null),V=c.useState(null),P=V[0],_=V[1],R=c.useState(null),N=R[0],T=R[1],j=c.useState(null),X=j[0],z=j[1],$=c.useState(null),re=$[0],k=$[1],I=c.useState(null),G=I[0],H=I[1],Q=c.useState(null),K=Q[0],C=Q[1],U=c.useState(null),W=U[0],F=U[1],J=c.useState(null),ne=J[0],Y=J[1],ue=c.useState(null),ae=ue[0],de=ue[1],pe=c.useState(null),Ce=pe[0],ye=pe[1],ge=c.useState(null),ve=ge[0],Ne=ge[1],se=c.useState(null),_e=se[0],fe=se[1];return c.useEffect(function(){n&&w!==null&&w.setOptions(n)},[w,n]),c.useEffect(function(){w!==null&&typeof o<"u"&&w.setCenter(o)},[w,o]),c.useEffect(function(){w&&u&&(N!==null&&google.maps.event.removeListener(N),T(google.maps.event.addListener(w,"dblclick",u)))},[u]),c.useEffect(function(){w&&f&&(X!==null&&google.maps.event.removeListener(X),z(google.maps.event.addListener(w,"dragend",f)))},[f]),c.useEffect(function(){w&&h&&(re!==null&&google.maps.event.removeListener(re),k(google.maps.event.addListener(w,"dragstart",h)))},[h]),c.useEffect(function(){w&&v&&(G!==null&&google.maps.event.removeListener(G),H(google.maps.event.addListener(w,"mousedown",v)))},[v]),c.useEffect(function(){w&&p&&(K!==null&&google.maps.event.removeListener(K),C(google.maps.event.addListener(w,"mousemove",p)))},[p]),c.useEffect(function(){w&&g&&(W!==null&&google.maps.event.removeListener(W),F(google.maps.event.addListener(w,"mouseout",g)))},[g]),c.useEffect(function(){w&&y&&(ne!==null&&google.maps.event.removeListener(ne),Y(google.maps.event.addListener(w,"mouseover",y)))},[y]),c.useEffect(function(){w&&d&&(ae!==null&&google.maps.event.removeListener(ae),de(google.maps.event.addListener(w,"mouseup",d)))},[d]),c.useEffect(function(){w&&D&&(Ce!==null&&google.maps.event.removeListener(Ce),ye(google.maps.event.addListener(w,"rightclick",D)))},[D]),c.useEffect(function(){w&&s&&(ve!==null&&google.maps.event.removeListener(ve),Ne(google.maps.event.addListener(w,"click",s)))},[s]),c.useEffect(function(){w&&l&&(_e!==null&&google.maps.event.removeListener(_e),fe(google.maps.event.addListener(w,"drag",l)))},[l]),c.useEffect(function(){w&&x&&(P!==null&&google.maps.event.removeListener(P),_(google.maps.event.addListener(w,"center_changed",x)))},[s]),c.useEffect(function(){var we=M.current===null?null:new google.maps.Map(M.current,n);return A(we),we!==null&&E&&E(we),function(){we!==null&&O&&O(we)}},[]),B.jsx("div",{id:r,ref:M,style:i,className:a,children:B.jsx(Se.Provider,{value:w,children:w!==null?e:null})})}c.memo(Sd);var Ad=function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={map:null},n.registeredEvents=[],n.mapRef=null,n.getInstance=function(){return n.mapRef===null?null:new google.maps.Map(n.mapRef,n.props.options)},n.panTo=function(r){var i=n.getInstance();i&&i.panTo(r)},n.setMapCallback=function(){n.state.map!==null&&n.props.onLoad&&n.props.onLoad(n.state.map)},n.getRef=function(r){n.mapRef=r},n}return e.prototype.componentDidMount=function(){var n=this.getInstance();this.registeredEvents=Pe({updaterMap:To,eventMap:ko,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{map:n}},this.setMapCallback)},e.prototype.componentDidUpdate=function(n){this.state.map!==null&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:To,eventMap:ko,prevProps:n,nextProps:this.props,instance:this.state.map}))},e.prototype.componentWillUnmount=function(){this.state.map!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.map),Me(this.registeredEvents))},e.prototype.render=function(){return B.jsx("div",{id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName,children:B.jsx(Se.Provider,{value:this.state.map,children:this.state.map!==null?this.props.children:null})})},e}(c.PureComponent),fn=typeof document<"u";function Ro(t){var e=t.url,n=t.id,r=t.nonce;return fn?new Promise(function(a,o){var s=document.getElementById(n),u=window;if(s){var l=s.getAttribute("data-state");if(s.src===e&&l!=="error"){if(l==="ready")return a(n);var f=u.initMap,h=s.onerror;u.initMap=function(){f&&f(),a(n)},s.onerror=function(g){h&&h(g),o(g)};return}else s.remove()}var p=document.createElement("script");p.type="text/javascript",p.src=e,p.id=n,p.async=!0,p.nonce=r||"",p.onerror=function(y){p.setAttribute("data-state","error"),o(y)},u.initMap=function(){p.setAttribute("data-state","ready"),a(n)},document.head.appendChild(p)}).catch(function(i){throw console.error("injectScript error: ",i),i}):Promise.reject(new Error("document is undefined"))}function Io(t){var e=t.href;return e&&(e.indexOf("https://fonts.googleapis.com/css?family=Roboto")===0||e.indexOf("https://fonts.googleapis.com/css?family=Google+Sans+Text")===0)?!0:t.tagName.toLowerCase()==="style"&&t.styleSheet&&t.styleSheet.cssText&&t.styleSheet.cssText.replace(`\r
46
46
  `,"").indexOf(".gm-style")===0?(t.styleSheet.cssText="",!0):t.tagName.toLowerCase()==="style"&&t.innerHTML&&t.innerHTML.replace(`\r
47
- `,"").indexOf(".gm-style")===0?(t.innerHTML="",!0):t.tagName.toLowerCase()==="style"&&!t.styleSheet&&!t.innerHTML}function jo(){var t=document.getElementsByTagName("head")[0];if(t){var e=t.insertBefore.bind(t);t.insertBefore=function(i,a){return Io(i)||Reflect.apply(e,t,[i,a]),i};var n=t.appendChild.bind(t);t.appendChild=function(i){return Io(i)||Reflect.apply(n,t,[i]),i}}}function No(t){var e=t.googleMapsApiKey,n=t.googleMapsClientId,r=t.version,i=r===void 0?"weekly":r,a=t.language,o=t.region,s=t.libraries,u=t.channel,l=t.mapIds,f=t.authReferrerPolicy,h=[];return rt(e&&n||!(e&&n),"You need to specify either googleMapsApiKey or googleMapsClientId for @react-google-maps/api load script to work. You cannot use both at the same time."),e?h.push("key=".concat(e)):n&&h.push("client=".concat(n)),i&&h.push("v=".concat(i)),a&&h.push("language=".concat(a)),o&&h.push("region=".concat(o)),s&&s.length&&h.push("libraries=".concat(s.sort().join(","))),u&&h.push("channel=".concat(u)),l&&l.length&&h.push("map_ids=".concat(l.join(","))),f&&h.push("auth_referrer_policy=".concat(f)),h.push("callback=initMap"),"https://maps.googleapis.com/maps/api/js?".concat(h.join("&"))}var Vn=!1;function _o(){return B.jsx("div",{children:"Loading..."})}var Ri={id:"script-loader",version:"weekly"},Ad=function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.check=c.createRef(),n.state={loaded:!1},n.cleanupCallback=function(){delete window.google.maps,n.injectScript()},n.isCleaningUp=function(){return hd(n,void 0,void 0,function(){function r(i){if(!Vn)i();else if(fn)var a=window.setInterval(function(){Vn||(window.clearInterval(a),i())},1)}return vd(this,function(i){return[2,new Promise(r)]})})},n.cleanup=function(){Vn=!0;var r=document.getElementById(n.props.id);r&&r.parentNode&&r.parentNode.removeChild(r),Array.prototype.slice.call(document.getElementsByTagName("script")).filter(function(a){return typeof a.src=="string"&&a.src.includes("maps.googleapis")}).forEach(function(a){a.parentNode&&a.parentNode.removeChild(a)}),Array.prototype.slice.call(document.getElementsByTagName("link")).filter(function(a){return a.href==="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans"}).forEach(function(a){a.parentNode&&a.parentNode.removeChild(a)}),Array.prototype.slice.call(document.getElementsByTagName("style")).filter(function(a){return a.innerText!==void 0&&a.innerText.length>0&&a.innerText.includes(".gm-")}).forEach(function(a){a.parentNode&&a.parentNode.removeChild(a)})},n.injectScript=function(){n.props.preventGoogleFontsLoading&&jo(),rt(!!n.props.id,'LoadScript requires "id" prop to be a string: %s',n.props.id);var r={id:n.props.id,nonce:n.props.nonce,url:No(n.props)};Ro(r).then(function(){n.props.onLoad&&n.props.onLoad(),n.setState(function(){return{loaded:!0}})}).catch(function(i){n.props.onError&&n.props.onError(i),console.error(`
47
+ `,"").indexOf(".gm-style")===0?(t.innerHTML="",!0):t.tagName.toLowerCase()==="style"&&!t.styleSheet&&!t.innerHTML}function jo(){var t=document.getElementsByTagName("head")[0];if(t){var e=t.insertBefore.bind(t);t.insertBefore=function(i,a){return Io(i)||Reflect.apply(e,t,[i,a]),i};var n=t.appendChild.bind(t);t.appendChild=function(i){return Io(i)||Reflect.apply(n,t,[i]),i}}}function No(t){var e=t.googleMapsApiKey,n=t.googleMapsClientId,r=t.version,i=r===void 0?"weekly":r,a=t.language,o=t.region,s=t.libraries,u=t.channel,l=t.mapIds,f=t.authReferrerPolicy,h=[];return rt(e&&n||!(e&&n),"You need to specify either googleMapsApiKey or googleMapsClientId for @react-google-maps/api load script to work. You cannot use both at the same time."),e?h.push("key=".concat(e)):n&&h.push("client=".concat(n)),i&&h.push("v=".concat(i)),a&&h.push("language=".concat(a)),o&&h.push("region=".concat(o)),s&&s.length&&h.push("libraries=".concat(s.sort().join(","))),u&&h.push("channel=".concat(u)),l&&l.length&&h.push("map_ids=".concat(l.join(","))),f&&h.push("auth_referrer_policy=".concat(f)),h.push("callback=initMap"),"https://maps.googleapis.com/maps/api/js?".concat(h.join("&"))}var Vn=!1;function _o(){return B.jsx("div",{children:"Loading..."})}var Ri={id:"script-loader",version:"weekly"},Ld=function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.check=c.createRef(),n.state={loaded:!1},n.cleanupCallback=function(){delete window.google.maps,n.injectScript()},n.isCleaningUp=function(){return vd(n,void 0,void 0,function(){function r(i){if(!Vn)i();else if(fn)var a=window.setInterval(function(){Vn||(window.clearInterval(a),i())},1)}return gd(this,function(i){return[2,new Promise(r)]})})},n.cleanup=function(){Vn=!0;var r=document.getElementById(n.props.id);r&&r.parentNode&&r.parentNode.removeChild(r),Array.prototype.slice.call(document.getElementsByTagName("script")).filter(function(a){return typeof a.src=="string"&&a.src.includes("maps.googleapis")}).forEach(function(a){a.parentNode&&a.parentNode.removeChild(a)}),Array.prototype.slice.call(document.getElementsByTagName("link")).filter(function(a){return a.href==="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans"}).forEach(function(a){a.parentNode&&a.parentNode.removeChild(a)}),Array.prototype.slice.call(document.getElementsByTagName("style")).filter(function(a){return a.innerText!==void 0&&a.innerText.length>0&&a.innerText.includes(".gm-")}).forEach(function(a){a.parentNode&&a.parentNode.removeChild(a)})},n.injectScript=function(){n.props.preventGoogleFontsLoading&&jo(),rt(!!n.props.id,'LoadScript requires "id" prop to be a string: %s',n.props.id);var r={id:n.props.id,nonce:n.props.nonce,url:No(n.props)};Ro(r).then(function(){n.props.onLoad&&n.props.onLoad(),n.setState(function(){return{loaded:!0}})}).catch(function(i){n.props.onError&&n.props.onError(i),console.error(`
48
48
  There has been an Error with loading Google Maps API script, please check that you provided correct google API key (`.concat(n.props.googleMapsApiKey||"-",") or Client ID (").concat(n.props.googleMapsClientId||"-",`) to <LoadScript />
49
49
  Otherwise it is a Network issue.
50
- `))})},n}return e.prototype.componentDidMount=function(){if(fn){if(window.google&&window.google.maps&&!Vn){console.error("google api is already presented");return}this.isCleaningUp().then(this.injectScript).catch(function(r){console.error("Error at injecting script after cleaning up: ",r)})}},e.prototype.componentDidUpdate=function(n){this.props.libraries!==n.libraries&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),fn&&n.language!==this.props.language&&(this.cleanup(),this.setState(function(){return{loaded:!1}},this.cleanupCallback))},e.prototype.componentWillUnmount=function(){var n=this;if(fn){this.cleanup();var r=function(){n.check.current||(delete window.google,Vn=!1)};window.setTimeout(r,1),this.props.onUnmount&&this.props.onUnmount()}},e.prototype.render=function(){return B.jsxs(B.Fragment,{children:[B.jsx("div",{ref:this.check}),this.state.loaded?this.props.children:this.props.loadingElement||B.jsx(_o,{})]})},e.defaultProps=Ri,e}(c.PureComponent),zo;function Ld(t){var e=t.id,n=e===void 0?Ri.id:e,r=t.version,i=r===void 0?Ri.version:r,a=t.nonce,o=t.googleMapsApiKey,s=t.googleMapsClientId,u=t.language,l=t.region,f=t.libraries,h=t.preventGoogleFontsLoading,p=t.channel,g=t.mapIds,y=t.authReferrerPolicy,v=c.useRef(!1),d=c.useState(!1),D=d[0],x=d[1],E=c.useState(void 0),O=E[0],b=E[1];c.useEffect(function(){return v.current=!0,function(){v.current=!1}},[]),c.useEffect(function(){fn&&h&&jo()},[h]),c.useEffect(function(){D&&rt(!!window.google,"useLoadScript was marked as loaded, but window.google is not present. Something went wrong.")},[D]);var w=No({version:i,googleMapsApiKey:o,googleMapsClientId:s,language:u,region:l,libraries:f,channel:p,mapIds:g,authReferrerPolicy:y});c.useEffect(function(){if(!fn)return;function V(){v.current&&(x(!0),zo=w)}if(window.google&&window.google.maps&&zo===w){V();return}Ro({id:n,url:w,nonce:a}).then(V).catch(function(_){v.current&&b(_),console.warn(`
50
+ `))})},n}return e.prototype.componentDidMount=function(){if(fn){if(window.google&&window.google.maps&&!Vn){console.error("google api is already presented");return}this.isCleaningUp().then(this.injectScript).catch(function(r){console.error("Error at injecting script after cleaning up: ",r)})}},e.prototype.componentDidUpdate=function(n){this.props.libraries!==n.libraries&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),fn&&n.language!==this.props.language&&(this.cleanup(),this.setState(function(){return{loaded:!1}},this.cleanupCallback))},e.prototype.componentWillUnmount=function(){var n=this;if(fn){this.cleanup();var r=function(){n.check.current||(delete window.google,Vn=!1)};window.setTimeout(r,1),this.props.onUnmount&&this.props.onUnmount()}},e.prototype.render=function(){return B.jsxs(B.Fragment,{children:[B.jsx("div",{ref:this.check}),this.state.loaded?this.props.children:this.props.loadingElement||B.jsx(_o,{})]})},e.defaultProps=Ri,e}(c.PureComponent),zo;function Od(t){var e=t.id,n=e===void 0?Ri.id:e,r=t.version,i=r===void 0?Ri.version:r,a=t.nonce,o=t.googleMapsApiKey,s=t.googleMapsClientId,u=t.language,l=t.region,f=t.libraries,h=t.preventGoogleFontsLoading,p=t.channel,g=t.mapIds,y=t.authReferrerPolicy,v=c.useRef(!1),d=c.useState(!1),D=d[0],x=d[1],E=c.useState(void 0),O=E[0],b=E[1];c.useEffect(function(){return v.current=!0,function(){v.current=!1}},[]),c.useEffect(function(){fn&&h&&jo()},[h]),c.useEffect(function(){D&&rt(!!window.google,"useLoadScript was marked as loaded, but window.google is not present. Something went wrong.")},[D]);var w=No({version:i,googleMapsApiKey:o,googleMapsClientId:s,language:u,region:l,libraries:f,channel:p,mapIds:g,authReferrerPolicy:y});c.useEffect(function(){if(!fn)return;function V(){v.current&&(x(!0),zo=w)}if(window.google&&window.google.maps&&zo===w){V();return}Ro({id:n,url:w,nonce:a}).then(V).catch(function(_){v.current&&b(_),console.warn(`
51
51
  There has been an Error with loading Google Maps API script, please check that you provided correct google API key (`.concat(o||"-",") or Client ID (").concat(s||"-",`)
52
52
  Otherwise it is a Network issue.
53
- `)),console.error(_)})},[n,w,a]);var A=c.useRef();return c.useEffect(function(){A.current&&f!==A.current&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),A.current=f},[f]),{isLoaded:D,loadError:O,url:w}}var Od=B.jsx(_o,{});function Pd(t){var e=t.loadingElement,n=t.onLoad,r=t.onError,i=t.onUnmount,a=t.children,o=Ti(t,["loadingElement","onLoad","onError","onUnmount","children"]),s=Ld(o),u=s.isLoaded,l=s.loadError;return c.useEffect(function(){u&&typeof n=="function"&&n()},[u,n]),c.useEffect(function(){l&&typeof r=="function"&&r(l)},[l,r]),c.useEffect(function(){return function(){i&&i()}},[i]),u?a:e||Od}c.memo(Pd);var Wo;(function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"})(Wo||(Wo={}));var Uo={},Ho={options:function(t,e){t.setOptions(e)}};function Md(t){var e=t.options,n=t.onLoad,r=t.onUnmount,i=c.useContext(Se),a=c.useState(null),o=a[0],s=a[1];return c.useEffect(function(){o!==null&&o.setMap(i)},[i]),c.useEffect(function(){e&&o!==null&&o.setOptions(e)},[o,e]),c.useEffect(function(){var u=new google.maps.TrafficLayer(me(me({},e||{}),{map:i}));return s(u),n&&n(u),function(){o!==null&&(r&&r(o),o.setMap(null))}},[]),null}c.memo(Md),function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={trafficLayer:null},n.setTrafficLayerCallback=function(){n.state.trafficLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.trafficLayer)},n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=new google.maps.TrafficLayer(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Pe({updaterMap:Ho,eventMap:Uo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{trafficLayer:n}},this.setTrafficLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.trafficLayer!==null&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:Ho,eventMap:Uo,prevProps:n,nextProps:this.props,instance:this.state.trafficLayer}))},e.prototype.componentWillUnmount=function(){this.state.trafficLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),Me(this.registeredEvents),this.state.trafficLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Se,e}(c.PureComponent);function Fd(t){var e=t.onLoad,n=t.onUnmount,r=c.useContext(Se),i=c.useState(null),a=i[0],o=i[1];return c.useEffect(function(){a!==null&&a.setMap(r)},[r]),c.useEffect(function(){var s=new google.maps.BicyclingLayer;return o(s),s.setMap(r),e&&e(s),function(){s!==null&&(n&&n(s),s.setMap(null))}},[]),null}c.memo(Fd),function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={bicyclingLayer:null},n.setBicyclingLayerCallback=function(){n.state.bicyclingLayer!==null&&(n.state.bicyclingLayer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.bicyclingLayer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.BicyclingLayer;this.setState(function(){return{bicyclingLayer:n}},this.setBicyclingLayerCallback)},e.prototype.componentWillUnmount=function(){this.state.bicyclingLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Se,e}(c.PureComponent);function kd(t){var e=t.onLoad,n=t.onUnmount,r=c.useContext(Se),i=c.useState(null),a=i[0],o=i[1];return c.useEffect(function(){a!==null&&a.setMap(r)},[r]),c.useEffect(function(){var s=new google.maps.TransitLayer;return o(s),s.setMap(r),e&&e(s),function(){a!==null&&(n&&n(a),a.setMap(null))}},[]),null}c.memo(kd),function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={transitLayer:null},n.setTransitLayerCallback=function(){n.state.transitLayer!==null&&(n.state.transitLayer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.transitLayer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.TransitLayer;this.setState(function(){return{transitLayer:n}},this.setTransitLayerCallback)},e.prototype.componentWillUnmount=function(){this.state.transitLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Se,e}(c.PureComponent);var Vo={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},qo={drawingMode:function(t,e){t.setDrawingMode(e)},options:function(t,e){t.setOptions(e)}};function Td(t){var e=t.options,n=t.drawingMode,r=t.onCircleComplete,i=t.onMarkerComplete,a=t.onOverlayComplete,o=t.onPolygonComplete,s=t.onPolylineComplete,u=t.onRectangleComplete,l=t.onLoad,f=t.onUnmount,h=c.useContext(Se),p=c.useState(null),g=p[0],y=p[1],v=c.useState(null),d=v[0],D=v[1],x=c.useState(null),E=x[0],O=x[1],b=c.useState(null),w=b[0],A=b[1],M=c.useState(null),V=M[0],P=M[1],_=c.useState(null),R=_[0],N=_[1],T=c.useState(null),j=T[0],X=T[1];return c.useEffect(function(){g!==null&&g.setMap(h)},[h]),c.useEffect(function(){e&&g!==null&&g.setOptions(e)},[g,e]),c.useEffect(function(){g!==null&&g.setDrawingMode(n??null)},[g,n]),c.useEffect(function(){g&&r&&(d!==null&&google.maps.event.removeListener(d),D(google.maps.event.addListener(g,"circlecomplete",r)))},[g,r]),c.useEffect(function(){g&&i&&(E!==null&&google.maps.event.removeListener(E),O(google.maps.event.addListener(g,"markercomplete",i)))},[g,i]),c.useEffect(function(){g&&a&&(w!==null&&google.maps.event.removeListener(w),A(google.maps.event.addListener(g,"overlaycomplete",a)))},[g,a]),c.useEffect(function(){g&&o&&(V!==null&&google.maps.event.removeListener(V),P(google.maps.event.addListener(g,"polygoncomplete",o)))},[g,o]),c.useEffect(function(){g&&s&&(R!==null&&google.maps.event.removeListener(R),N(google.maps.event.addListener(g,"polylinecomplete",s)))},[g,s]),c.useEffect(function(){g&&u&&(j!==null&&google.maps.event.removeListener(j),X(google.maps.event.addListener(g,"rectanglecomplete",u)))},[g,u]),c.useEffect(function(){rt(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);var z=new google.maps.drawing.DrawingManager(me(me({},e||{}),{map:h}));return n&&z.setDrawingMode(n),r&&D(google.maps.event.addListener(z,"circlecomplete",r)),i&&O(google.maps.event.addListener(z,"markercomplete",i)),a&&A(google.maps.event.addListener(z,"overlaycomplete",a)),o&&P(google.maps.event.addListener(z,"polygoncomplete",o)),s&&N(google.maps.event.addListener(z,"polylinecomplete",s)),u&&X(google.maps.event.addListener(z,"rectanglecomplete",u)),y(z),l&&l(z),function(){g!==null&&(d&&google.maps.event.removeListener(d),E&&google.maps.event.removeListener(E),w&&google.maps.event.removeListener(w),V&&google.maps.event.removeListener(V),R&&google.maps.event.removeListener(R),j&&google.maps.event.removeListener(j),f&&f(g),g.setMap(null))}},[]),null}c.memo(Td),function(t){Ge(e,t);function e(n){var r=t.call(this,n)||this;return r.registeredEvents=[],r.state={drawingManager:null},r.setDrawingManagerCallback=function(){r.state.drawingManager!==null&&r.props.onLoad&&r.props.onLoad(r.state.drawingManager)},rt(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing),r}return e.prototype.componentDidMount=function(){var n=new google.maps.drawing.DrawingManager(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Pe({updaterMap:qo,eventMap:Vo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{drawingManager:n}},this.setDrawingManagerCallback)},e.prototype.componentDidUpdate=function(n){this.state.drawingManager!==null&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:qo,eventMap:Vo,prevProps:n,nextProps:this.props,instance:this.state.drawingManager}))},e.prototype.componentWillUnmount=function(){this.state.drawingManager!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),Me(this.registeredEvents),this.state.drawingManager.setMap(null))},e.prototype.render=function(){return null},e.contextType=Se,e}(c.PureComponent);var Go={onAnimationChanged:"animation_changed",onClick:"click",onClickableChanged:"clickable_changed",onCursorChanged:"cursor_changed",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDraggableChanged:"draggable_changed",onDragStart:"dragstart",onFlatChanged:"flat_changed",onIconChanged:"icon_changed",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onPositionChanged:"position_changed",onRightClick:"rightclick",onShapeChanged:"shape_changed",onTitleChanged:"title_changed",onVisibleChanged:"visible_changed",onZindexChanged:"zindex_changed"},Yo={animation:function(t,e){t.setAnimation(e)},clickable:function(t,e){t.setClickable(e)},cursor:function(t,e){t.setCursor(e)},draggable:function(t,e){t.setDraggable(e)},icon:function(t,e){t.setIcon(e)},label:function(t,e){t.setLabel(e)},map:function(t,e){t.setMap(e)},opacity:function(t,e){t.setOpacity(e)},options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},shape:function(t,e){t.setShape(e)},title:function(t,e){t.setTitle(e)},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},xr={};function Rd(t){var e=t.position,n=t.options,r=t.clusterer,i=t.noClustererRedraw,a=t.children,o=t.draggable,s=t.visible,u=t.animation,l=t.clickable,f=t.cursor,h=t.icon,p=t.label,g=t.opacity,y=t.shape,v=t.title,d=t.zIndex,D=t.onClick,x=t.onDblClick,E=t.onDrag,O=t.onDragEnd,b=t.onDragStart,w=t.onMouseOut,A=t.onMouseOver,M=t.onMouseUp,V=t.onMouseDown,P=t.onRightClick,_=t.onClickableChanged,R=t.onCursorChanged,N=t.onAnimationChanged,T=t.onDraggableChanged,j=t.onFlatChanged,X=t.onIconChanged,z=t.onPositionChanged,$=t.onShapeChanged,re=t.onTitleChanged,k=t.onVisibleChanged,I=t.onZindexChanged,G=t.onLoad,H=t.onUnmount,Q=c.useContext(Se),K=c.useState(null),C=K[0],U=K[1],W=c.useState(null),F=W[0],J=W[1],ne=c.useState(null),Y=ne[0],ue=ne[1],ae=c.useState(null),de=ae[0],pe=ae[1],Ce=c.useState(null),ye=Ce[0],ge=Ce[1],ve=c.useState(null),Ne=ve[0],se=ve[1],_e=c.useState(null),fe=_e[0],we=_e[1],ke=c.useState(null),Ve=ke[0],Ye=ke[1],Ee=c.useState(null),ct=Ee[0],st=Ee[1],Tt=c.useState(null),yt=Tt[0],Lt=Tt[1],zt=c.useState(null),Ct=zt[0],ln=zt[1],be=c.useState(null),Re=be[0],Ie=be[1],it=c.useState(null),ut=it[0],Rt=it[1],Sn=c.useState(null),Nn=Sn[0],yr=Sn[1],Li=c.useState(null),An=Li[0],Cr=Li[1],Oi=c.useState(null),_n=Oi[0],Dr=Oi[1],br=c.useState(null),zn=br[0],Pi=br[1],Mi=c.useState(null),Wn=Mi[0],S=Mi[1],te=c.useState(null),oe=te[0],De=te[1],je=c.useState(null),We=je[0],Te=je[1],Oe=c.useState(null),at=Oe[0],Je=Oe[1],tt=c.useState(null),dt=tt[0],qt=tt[1];c.useEffect(function(){C!==null&&C.setMap(Q)},[Q]),c.useEffect(function(){typeof n<"u"&&C!==null&&C.setOptions(n)},[C,n]),c.useEffect(function(){typeof o<"u"&&C!==null&&C.setDraggable(o)},[C,o]),c.useEffect(function(){e&&C!==null&&C.setPosition(e)},[C,e]),c.useEffect(function(){typeof s<"u"&&C!==null&&C.setVisible(s)},[C,s]),c.useEffect(function(){C==null||C.setAnimation(u)},[C,u]),c.useEffect(function(){C&&l!==void 0&&C.setClickable(l)},[C,l]),c.useEffect(function(){C&&f!==void 0&&C.setCursor(f)},[C,f]),c.useEffect(function(){C&&h!==void 0&&C.setIcon(h)},[C,h]),c.useEffect(function(){C&&p!==void 0&&C.setLabel(p)},[C,p]),c.useEffect(function(){C&&g!==void 0&&C.setOpacity(g)},[C,g]),c.useEffect(function(){C&&y!==void 0&&C.setShape(y)},[C,y]),c.useEffect(function(){C&&v!==void 0&&C.setTitle(v)},[C,v]),c.useEffect(function(){C&&d!==void 0&&C.setZIndex(d)},[C,d]),c.useEffect(function(){C&&x&&(F!==null&&google.maps.event.removeListener(F),J(google.maps.event.addListener(C,"dblclick",x)))},[x]),c.useEffect(function(){C&&O&&(Y!==null&&google.maps.event.removeListener(Y),ue(google.maps.event.addListener(C,"dragend",O)))},[O]),c.useEffect(function(){C&&b&&(de!==null&&google.maps.event.removeListener(de),pe(google.maps.event.addListener(C,"dragstart",b)))},[b]),c.useEffect(function(){C&&V&&(ye!==null&&google.maps.event.removeListener(ye),ge(google.maps.event.addListener(C,"mousedown",V)))},[V]),c.useEffect(function(){C&&w&&(Ne!==null&&google.maps.event.removeListener(Ne),se(google.maps.event.addListener(C,"mouseout",w)))},[w]),c.useEffect(function(){C&&A&&(fe!==null&&google.maps.event.removeListener(fe),we(google.maps.event.addListener(C,"mouseover",A)))},[A]),c.useEffect(function(){C&&M&&(Ve!==null&&google.maps.event.removeListener(Ve),Ye(google.maps.event.addListener(C,"mouseup",M)))},[M]),c.useEffect(function(){C&&P&&(ct!==null&&google.maps.event.removeListener(ct),st(google.maps.event.addListener(C,"rightclick",P)))},[P]),c.useEffect(function(){C&&D&&(yt!==null&&google.maps.event.removeListener(yt),Lt(google.maps.event.addListener(C,"click",D)))},[D]),c.useEffect(function(){C&&E&&(Ct!==null&&google.maps.event.removeListener(Ct),ln(google.maps.event.addListener(C,"drag",E)))},[E]),c.useEffect(function(){C&&_&&(Re!==null&&google.maps.event.removeListener(Re),Ie(google.maps.event.addListener(C,"clickable_changed",_)))},[_]),c.useEffect(function(){C&&R&&(ut!==null&&google.maps.event.removeListener(ut),Rt(google.maps.event.addListener(C,"cursor_changed",R)))},[R]),c.useEffect(function(){C&&N&&(Nn!==null&&google.maps.event.removeListener(Nn),yr(google.maps.event.addListener(C,"animation_changed",N)))},[N]),c.useEffect(function(){C&&T&&(An!==null&&google.maps.event.removeListener(An),Cr(google.maps.event.addListener(C,"draggable_changed",T)))},[T]),c.useEffect(function(){C&&j&&(_n!==null&&google.maps.event.removeListener(_n),Dr(google.maps.event.addListener(C,"flat_changed",j)))},[j]),c.useEffect(function(){C&&X&&(zn!==null&&google.maps.event.removeListener(zn),Pi(google.maps.event.addListener(C,"icon_changed",X)))},[X]),c.useEffect(function(){C&&z&&(Wn!==null&&google.maps.event.removeListener(Wn),S(google.maps.event.addListener(C,"position_changed",z)))},[z]),c.useEffect(function(){C&&$&&(oe!==null&&google.maps.event.removeListener(oe),De(google.maps.event.addListener(C,"shape_changed",$)))},[$]),c.useEffect(function(){C&&re&&(We!==null&&google.maps.event.removeListener(We),Te(google.maps.event.addListener(C,"title_changed",re)))},[re]),c.useEffect(function(){C&&k&&(at!==null&&google.maps.event.removeListener(at),Je(google.maps.event.addListener(C,"visible_changed",k)))},[k]),c.useEffect(function(){C&&I&&(dt!==null&&google.maps.event.removeListener(dt),qt(google.maps.event.addListener(C,"zindex_changed",I)))},[I]),c.useEffect(function(){var ot=me(me(me({},n||xr),r?xr:{map:Q}),{position:e}),xe=new google.maps.Marker(ot);return r?r.addMarker(xe,!!i):xe.setMap(Q),e&&xe.setPosition(e),typeof s<"u"&&xe.setVisible(s),typeof o<"u"&&xe.setDraggable(o),typeof l<"u"&&xe.setClickable(l),typeof f=="string"&&xe.setCursor(f),h&&xe.setIcon(h),typeof p<"u"&&xe.setLabel(p),typeof g<"u"&&xe.setOpacity(g),y&&xe.setShape(y),typeof v=="string"&&xe.setTitle(v),typeof d=="number"&&xe.setZIndex(d),x&&J(google.maps.event.addListener(xe,"dblclick",x)),O&&ue(google.maps.event.addListener(xe,"dragend",O)),b&&pe(google.maps.event.addListener(xe,"dragstart",b)),V&&ge(google.maps.event.addListener(xe,"mousedown",V)),w&&se(google.maps.event.addListener(xe,"mouseout",w)),A&&we(google.maps.event.addListener(xe,"mouseover",A)),M&&Ye(google.maps.event.addListener(xe,"mouseup",M)),P&&st(google.maps.event.addListener(xe,"rightclick",P)),D&&Lt(google.maps.event.addListener(xe,"click",D)),E&&ln(google.maps.event.addListener(xe,"drag",E)),_&&Ie(google.maps.event.addListener(xe,"clickable_changed",_)),R&&Rt(google.maps.event.addListener(xe,"cursor_changed",R)),N&&yr(google.maps.event.addListener(xe,"animation_changed",N)),T&&Cr(google.maps.event.addListener(xe,"draggable_changed",T)),j&&Dr(google.maps.event.addListener(xe,"flat_changed",j)),X&&Pi(google.maps.event.addListener(xe,"icon_changed",X)),z&&S(google.maps.event.addListener(xe,"position_changed",z)),$&&De(google.maps.event.addListener(xe,"shape_changed",$)),re&&Te(google.maps.event.addListener(xe,"title_changed",re)),k&&Je(google.maps.event.addListener(xe,"visible_changed",k)),I&&qt(google.maps.event.addListener(xe,"zindex_changed",I)),U(xe),G&&G(xe),function(){F!==null&&google.maps.event.removeListener(F),Y!==null&&google.maps.event.removeListener(Y),de!==null&&google.maps.event.removeListener(de),ye!==null&&google.maps.event.removeListener(ye),Ne!==null&&google.maps.event.removeListener(Ne),fe!==null&&google.maps.event.removeListener(fe),Ve!==null&&google.maps.event.removeListener(Ve),ct!==null&&google.maps.event.removeListener(ct),yt!==null&&google.maps.event.removeListener(yt),Re!==null&&google.maps.event.removeListener(Re),ut!==null&&google.maps.event.removeListener(ut),Nn!==null&&google.maps.event.removeListener(Nn),An!==null&&google.maps.event.removeListener(An),_n!==null&&google.maps.event.removeListener(_n),zn!==null&&google.maps.event.removeListener(zn),Wn!==null&&google.maps.event.removeListener(Wn),We!==null&&google.maps.event.removeListener(We),at!==null&&google.maps.event.removeListener(at),dt!==null&&google.maps.event.removeListener(dt),H&&H(xe),r?r.removeMarker(xe,!!i):xe&&xe.setMap(null)}},[]);var Gt=c.useMemo(function(){return a?c.Children.map(a,function(ot){if(!c.isValidElement(ot))return ot;var xe=ot;return c.cloneElement(xe,{anchor:C})}):null},[a,C]);return B.jsx(B.Fragment,{children:Gt})||null}c.memo(Rd);var Id=function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=me(me(me({},this.props.options||xr),this.props.clusterer?xr:{map:this.context}),{position:this.props.position});this.marker=new google.maps.Marker(n),this.props.clusterer?this.props.clusterer.addMarker(this.marker,!!this.props.noClustererRedraw):this.marker.setMap(this.context),this.registeredEvents=Pe({updaterMap:Yo,eventMap:Go,prevProps:{},nextProps:this.props,instance:this.marker}),this.props.onLoad&&this.props.onLoad(this.marker)},e.prototype.componentDidUpdate=function(n){this.marker&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:Yo,eventMap:Go,prevProps:n,nextProps:this.props,instance:this.marker}))},e.prototype.componentWillUnmount=function(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),Me(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.marker,!!this.props.noClustererRedraw):this.marker&&this.marker.setMap(null))},e.prototype.render=function(){var n=this,r=null;return this.props.children&&(r=c.Children.map(this.props.children,function(i){if(!c.isValidElement(i))return i;var a=i;return c.cloneElement(a,{anchor:n.marker})})),r||null},e.contextType=Se,e}(c.PureComponent),jd=function(){function t(e,n){e.getClusterer().extend(t,google.maps.OverlayView),this.cluster=e,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=n,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.cMouseDownInCluster=null,this.cDraggingMapByCluster=null,this.timeOut=null,this.setMap(e.getMap()),this.onBoundsChanged=this.onBoundsChanged.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onClick=this.onClick.bind(this),this.onMouseOver=this.onMouseOver.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.onAdd=this.onAdd.bind(this),this.onRemove=this.onRemove.bind(this),this.draw=this.draw.bind(this),this.hide=this.hide.bind(this),this.show=this.show.bind(this),this.useStyle=this.useStyle.bind(this),this.setCenter=this.setCenter.bind(this),this.getPosFromLatLng=this.getPosFromLatLng.bind(this)}return t.prototype.onBoundsChanged=function(){this.cDraggingMapByCluster=this.cMouseDownInCluster},t.prototype.onMouseDown=function(){this.cMouseDownInCluster=!0,this.cDraggingMapByCluster=!1},t.prototype.onClick=function(e){if(this.cMouseDownInCluster=!1,!this.cDraggingMapByCluster){var n=this.cluster.getClusterer();if(google.maps.event.trigger(n,"click",this.cluster),google.maps.event.trigger(n,"clusterclick",this.cluster),n.getZoomOnClick()){var r=n.getMaxZoom(),i=this.cluster.getBounds(),a=n.getMap();a!==null&&"fitBounds"in a&&a.fitBounds(i),this.timeOut=window.setTimeout(function(){var o=n.getMap();if(o!==null){"fitBounds"in o&&o.fitBounds(i);var s=o.getZoom()||0;r!==null&&s>r&&o.setZoom(r+1)}},100)}e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}},t.prototype.onMouseOver=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseover",this.cluster)},t.prototype.onMouseOut=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseout",this.cluster)},t.prototype.onAdd=function(){var e;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),(e=this.getPanes())===null||e===void 0||e.overlayMouseTarget.appendChild(this.div);var n=this.getMap();n!==null&&(this.boundsChangedListener=google.maps.event.addListener(n,"bounds_changed",this.onBoundsChanged),this.div.addEventListener("mousedown",this.onMouseDown),this.div.addEventListener("click",this.onClick),this.div.addEventListener("mouseover",this.onMouseOver),this.div.addEventListener("mouseout",this.onMouseOut))},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),this.boundsChangedListener!==null&&google.maps.event.removeListener(this.boundsChangedListener),this.div.removeEventListener("mousedown",this.onMouseDown),this.div.removeEventListener("click",this.onClick),this.div.removeEventListener("mouseover",this.onMouseOver),this.div.removeEventListener("mouseout",this.onMouseOut),this.div.parentNode.removeChild(this.div),this.timeOut!==null&&(window.clearTimeout(this.timeOut),this.timeOut=null),this.div=null)},t.prototype.draw=function(){if(this.visible&&this.div!==null&&this.center){var e=this.getPosFromLatLng(this.center);this.div.style.top=e!==null?"".concat(e.y,"px"):"0",this.div.style.left=e!==null?"".concat(e.x,"px"):"0"}},t.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},t.prototype.show=function(){var e,n,r,i,a,o;if(this.div&&this.center){var s=this.sums===null||typeof this.sums.title>"u"||this.sums.title===""?this.cluster.getClusterer().getTitle():this.sums.title,u=this.backgroundPosition.split(" "),l=parseInt(((e=u[0])===null||e===void 0?void 0:e.replace(/^\s+|\s+$/g,""))||"0",10),f=parseInt(((n=u[1])===null||n===void 0?void 0:n.replace(/^\s+|\s+$/g,""))||"0",10),h=this.getPosFromLatLng(this.center);this.div.className=this.className,this.div.setAttribute("style","cursor: pointer; position: absolute; top: ".concat(h!==null?"".concat(h.y,"px"):"0","; left: ").concat(h!==null?"".concat(h.x,"px"):"0","; width: ").concat(this.width,"px; height: ").concat(this.height,"px; "));var p=document.createElement("img");p.alt=s,p.src=this.url,p.width=this.width,p.height=this.height,p.setAttribute("style","position: absolute; top: ".concat(f,"px; left: ").concat(l,"px")),this.cluster.getClusterer().enableRetinaIcons||(p.style.clip="rect(-".concat(f,"px, -").concat(l+this.width,"px, -").concat(f+this.height,", -").concat(l,")"));var g=document.createElement("div");g.setAttribute("style","position: absolute; top: ".concat(this.anchorText[0],"px; left: ").concat(this.anchorText[1],"px; color: ").concat(this.textColor,"; font-size: ").concat(this.textSize,"px; font-family: ").concat(this.fontFamily,"; font-weight: ").concat(this.fontWeight,"; fontStyle: ").concat(this.fontStyle,"; text-decoration: ").concat(this.textDecoration,"; text-align: center; width: ").concat(this.width,"px; line-height: ").concat(this.height,"px")),!((r=this.sums)===null||r===void 0)&&r.text&&(g.innerText="".concat((i=this.sums)===null||i===void 0?void 0:i.text)),!((a=this.sums)===null||a===void 0)&&a.html&&(g.innerHTML="".concat((o=this.sums)===null||o===void 0?void 0:o.html)),this.div.innerHTML="",this.div.appendChild(p),this.div.appendChild(g),this.div.title=s,this.div.style.display=""}this.visible=!0},t.prototype.useStyle=function(e){this.sums=e;var n=this.cluster.getClusterer().getStyles(),r=n[Math.min(n.length-1,Math.max(0,e.index-1))];r&&(this.url=r.url,this.height=r.height,this.width=r.width,r.className&&(this.className="".concat(this.clusterClassName," ").concat(r.className)),this.anchorText=r.anchorText||[0,0],this.anchorIcon=r.anchorIcon||[this.height/2,this.width/2],this.textColor=r.textColor||"black",this.textSize=r.textSize||11,this.textDecoration=r.textDecoration||"none",this.fontWeight=r.fontWeight||"bold",this.fontStyle=r.fontStyle||"normal",this.fontFamily=r.fontFamily||"Arial,sans-serif",this.backgroundPosition=r.backgroundPosition||"0 0")},t.prototype.setCenter=function(e){this.center=e},t.prototype.getPosFromLatLng=function(e){var n=this.getProjection().fromLatLngToDivPixel(e);return n!==null&&(n.x-=this.anchorIcon[1],n.y-=this.anchorIcon[0]),n},t}(),Nd=function(){function t(e){this.markerClusterer=e,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new jd(this,this.markerClusterer.getStyles()),this.getSize=this.getSize.bind(this),this.getMarkers=this.getMarkers.bind(this),this.getCenter=this.getCenter.bind(this),this.getMap=this.getMap.bind(this),this.getClusterer=this.getClusterer.bind(this),this.getBounds=this.getBounds.bind(this),this.remove=this.remove.bind(this),this.addMarker=this.addMarker.bind(this),this.isMarkerInClusterBounds=this.isMarkerInClusterBounds.bind(this),this.calculateBounds=this.calculateBounds.bind(this),this.updateIcon=this.updateIcon.bind(this),this.isMarkerAlreadyAdded=this.isMarkerAlreadyAdded.bind(this)}return t.prototype.getSize=function(){return this.markers.length},t.prototype.getMarkers=function(){return this.markers},t.prototype.getCenter=function(){return this.center},t.prototype.getMap=function(){return this.map},t.prototype.getClusterer=function(){return this.markerClusterer},t.prototype.getBounds=function(){for(var e=new google.maps.LatLngBounds(this.center,this.center),n=this.getMarkers(),r=0,i=n;r<i.length;r++){var a=i[r],o=a.getPosition();o&&e.extend(o)}return e},t.prototype.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},t.prototype.addMarker=function(e){var n;if(this.isMarkerAlreadyAdded(e))return!1;if(this.center){if(this.averageCenter){var r=e.getPosition();if(r){var i=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(i-1)+r.lat())/i,(this.center.lng()*(i-1)+r.lng())/i),this.calculateBounds()}}}else{var r=e.getPosition();r&&(this.center=r,this.calculateBounds())}e.isAdded=!0,this.markers.push(e);var a=this.markers.length,o=this.markerClusterer.getMaxZoom(),s=(n=this.map)===null||n===void 0?void 0:n.getZoom();if(o!==null&&typeof s<"u"&&s>o)e.getMap()!==this.map&&e.setMap(this.map);else if(a<this.minClusterSize)e.getMap()!==this.map&&e.setMap(this.map);else if(a===this.minClusterSize)for(var u=0,l=this.markers;u<l.length;u++){var f=l[u];f.setMap(null)}else e.setMap(null);return!0},t.prototype.isMarkerInClusterBounds=function(e){if(this.bounds!==null){var n=e.getPosition();if(n)return this.bounds.contains(n)}return!1},t.prototype.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},t.prototype.updateIcon=function(){var e,n=this.markers.length,r=this.markerClusterer.getMaxZoom(),i=(e=this.map)===null||e===void 0?void 0:e.getZoom();if(r!==null&&typeof i<"u"&&i>r){this.clusterIcon.hide();return}if(n<this.minClusterSize){this.clusterIcon.hide();return}this.center&&this.clusterIcon.setCenter(this.center),this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers,this.markerClusterer.getStyles().length)),this.clusterIcon.show()},t.prototype.isMarkerAlreadyAdded=function(e){if(this.markers.includes)return this.markers.includes(e);for(var n=0;n<this.markers.length;n++)if(e===this.markers[n])return!0;return!1},t}();function _d(t,e){var n=t.length,r=n.toString().length,i=Math.min(r,e);return{text:n.toString(),index:i,title:""}}var zd=2e3,Wd=500,Ud="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",Hd="png",Vd=[53,56,66,78,90],qd="cluster",Zo=function(){function t(e,n,r){n===void 0&&(n=[]),r===void 0&&(r={}),this.getMinimumClusterSize=this.getMinimumClusterSize.bind(this),this.setMinimumClusterSize=this.setMinimumClusterSize.bind(this),this.getEnableRetinaIcons=this.getEnableRetinaIcons.bind(this),this.setEnableRetinaIcons=this.setEnableRetinaIcons.bind(this),this.addToClosestCluster=this.addToClosestCluster.bind(this),this.getImageExtension=this.getImageExtension.bind(this),this.setImageExtension=this.setImageExtension.bind(this),this.getExtendedBounds=this.getExtendedBounds.bind(this),this.getAverageCenter=this.getAverageCenter.bind(this),this.setAverageCenter=this.setAverageCenter.bind(this),this.getTotalClusters=this.getTotalClusters.bind(this),this.fitMapToMarkers=this.fitMapToMarkers.bind(this),this.getIgnoreHidden=this.getIgnoreHidden.bind(this),this.setIgnoreHidden=this.setIgnoreHidden.bind(this),this.getClusterClass=this.getClusterClass.bind(this),this.setClusterClass=this.setClusterClass.bind(this),this.getTotalMarkers=this.getTotalMarkers.bind(this),this.getZoomOnClick=this.getZoomOnClick.bind(this),this.setZoomOnClick=this.setZoomOnClick.bind(this),this.getBatchSizeIE=this.getBatchSizeIE.bind(this),this.setBatchSizeIE=this.setBatchSizeIE.bind(this),this.createClusters=this.createClusters.bind(this),this.onZoomChanged=this.onZoomChanged.bind(this),this.getImageSizes=this.getImageSizes.bind(this),this.setImageSizes=this.setImageSizes.bind(this),this.getCalculator=this.getCalculator.bind(this),this.setCalculator=this.setCalculator.bind(this),this.removeMarkers=this.removeMarkers.bind(this),this.resetViewport=this.resetViewport.bind(this),this.getImagePath=this.getImagePath.bind(this),this.setImagePath=this.setImagePath.bind(this),this.pushMarkerTo=this.pushMarkerTo.bind(this),this.removeMarker=this.removeMarker.bind(this),this.clearMarkers=this.clearMarkers.bind(this),this.setupStyles=this.setupStyles.bind(this),this.getGridSize=this.getGridSize.bind(this),this.setGridSize=this.setGridSize.bind(this),this.getClusters=this.getClusters.bind(this),this.getMaxZoom=this.getMaxZoom.bind(this),this.setMaxZoom=this.setMaxZoom.bind(this),this.getMarkers=this.getMarkers.bind(this),this.addMarkers=this.addMarkers.bind(this),this.getStyles=this.getStyles.bind(this),this.setStyles=this.setStyles.bind(this),this.addMarker=this.addMarker.bind(this),this.onRemove=this.onRemove.bind(this),this.getTitle=this.getTitle.bind(this),this.setTitle=this.setTitle.bind(this),this.repaint=this.repaint.bind(this),this.onIdle=this.onIdle.bind(this),this.redraw=this.redraw.bind(this),this.onAdd=this.onAdd.bind(this),this.draw=this.draw.bind(this),this.extend=this.extend.bind(this),this.extend(t,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=r.gridSize||60,this.minClusterSize=r.minimumClusterSize||2,this.maxZoom=r.maxZoom||null,this.styles=r.styles||[],this.title=r.title||"",this.zoomOnClick=!0,r.zoomOnClick!==void 0&&(this.zoomOnClick=r.zoomOnClick),this.averageCenter=!1,r.averageCenter!==void 0&&(this.averageCenter=r.averageCenter),this.ignoreHidden=!1,r.ignoreHidden!==void 0&&(this.ignoreHidden=r.ignoreHidden),this.enableRetinaIcons=!1,r.enableRetinaIcons!==void 0&&(this.enableRetinaIcons=r.enableRetinaIcons),this.imagePath=r.imagePath||Ud,this.imageExtension=r.imageExtension||Hd,this.imageSizes=r.imageSizes||Vd,this.calculator=r.calculator||_d,this.batchSize=r.batchSize||zd,this.batchSizeIE=r.batchSizeIE||Wd,this.clusterClass=r.clusterClass||qd,navigator.userAgent.toLowerCase().indexOf("msie")!==-1&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(n,!0),this.setMap(e)}return t.prototype.onZoomChanged=function(){var e,n;this.resetViewport(!1),(((e=this.getMap())===null||e===void 0?void 0:e.getZoom())===(this.get("minZoom")||0)||((n=this.getMap())===null||n===void 0?void 0:n.getZoom())===this.get("maxZoom"))&&google.maps.event.trigger(this,"idle")},t.prototype.onIdle=function(){this.redraw()},t.prototype.onAdd=function(){var e=this.getMap();this.activeMap=e,this.ready=!0,this.repaint(),e!==null&&(this.listeners=[google.maps.event.addListener(e,"zoom_changed",this.onZoomChanged),google.maps.event.addListener(e,"idle",this.onIdle)])},t.prototype.onRemove=function(){for(var e=0,n=this.markers;e<n.length;e++){var r=n[e];r.getMap()!==this.activeMap&&r.setMap(this.activeMap)}for(var i=0,a=this.clusters;i<a.length;i++){var o=a[i];o.remove()}this.clusters=[];for(var s=0,u=this.listeners;s<u.length;s++){var l=u[s];google.maps.event.removeListener(l)}this.listeners=[],this.activeMap=null,this.ready=!1},t.prototype.draw=function(){},t.prototype.getMap=function(){return null},t.prototype.getPanes=function(){return null},t.prototype.getProjection=function(){return{fromContainerPixelToLatLng:function(){return null},fromDivPixelToLatLng:function(){return null},fromLatLngToContainerPixel:function(){return null},fromLatLngToDivPixel:function(){return null},getVisibleRegion:function(){return null},getWorldWidth:function(){return 0}}},t.prototype.setMap=function(){},t.prototype.addListener=function(){return{remove:function(){}}},t.prototype.bindTo=function(){},t.prototype.get=function(){},t.prototype.notify=function(){},t.prototype.set=function(){},t.prototype.setValues=function(){},t.prototype.unbind=function(){},t.prototype.unbindAll=function(){},t.prototype.setupStyles=function(){if(!(this.styles.length>0))for(var e=0;e<this.imageSizes.length;e++)this.styles.push({url:"".concat(this.imagePath+(e+1),".").concat(this.imageExtension),height:this.imageSizes[e]||0,width:this.imageSizes[e]||0})},t.prototype.fitMapToMarkers=function(){for(var e=this.getMarkers(),n=new google.maps.LatLngBounds,r=0,i=e;r<i.length;r++){var a=i[r],o=a.getPosition();o&&n.extend(o)}var s=this.getMap();s!==null&&"fitBounds"in s&&s.fitBounds(n)},t.prototype.getGridSize=function(){return this.gridSize},t.prototype.setGridSize=function(e){this.gridSize=e},t.prototype.getMinimumClusterSize=function(){return this.minClusterSize},t.prototype.setMinimumClusterSize=function(e){this.minClusterSize=e},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.setMaxZoom=function(e){this.maxZoom=e},t.prototype.getStyles=function(){return this.styles},t.prototype.setStyles=function(e){this.styles=e},t.prototype.getTitle=function(){return this.title},t.prototype.setTitle=function(e){this.title=e},t.prototype.getZoomOnClick=function(){return this.zoomOnClick},t.prototype.setZoomOnClick=function(e){this.zoomOnClick=e},t.prototype.getAverageCenter=function(){return this.averageCenter},t.prototype.setAverageCenter=function(e){this.averageCenter=e},t.prototype.getIgnoreHidden=function(){return this.ignoreHidden},t.prototype.setIgnoreHidden=function(e){this.ignoreHidden=e},t.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons},t.prototype.setEnableRetinaIcons=function(e){this.enableRetinaIcons=e},t.prototype.getImageExtension=function(){return this.imageExtension},t.prototype.setImageExtension=function(e){this.imageExtension=e},t.prototype.getImagePath=function(){return this.imagePath},t.prototype.setImagePath=function(e){this.imagePath=e},t.prototype.getImageSizes=function(){return this.imageSizes},t.prototype.setImageSizes=function(e){this.imageSizes=e},t.prototype.getCalculator=function(){return this.calculator},t.prototype.setCalculator=function(e){this.calculator=e},t.prototype.getBatchSizeIE=function(){return this.batchSizeIE},t.prototype.setBatchSizeIE=function(e){this.batchSizeIE=e},t.prototype.getClusterClass=function(){return this.clusterClass},t.prototype.setClusterClass=function(e){this.clusterClass=e},t.prototype.getMarkers=function(){return this.markers},t.prototype.getTotalMarkers=function(){return this.markers.length},t.prototype.getClusters=function(){return this.clusters},t.prototype.getTotalClusters=function(){return this.clusters.length},t.prototype.addMarker=function(e,n){this.pushMarkerTo(e),n||this.redraw()},t.prototype.addMarkers=function(e,n){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=e[r];i&&this.pushMarkerTo(i)}n||this.redraw()},t.prototype.pushMarkerTo=function(e){var n=this;e.getDraggable()&&google.maps.event.addListener(e,"dragend",function(){n.ready&&(e.isAdded=!1,n.repaint())}),e.isAdded=!1,this.markers.push(e)},t.prototype.removeMarker_=function(e){var n=-1;if(this.markers.indexOf)n=this.markers.indexOf(e);else for(var r=0;r<this.markers.length;r++)if(e===this.markers[r]){n=r;break}return n===-1?!1:(e.setMap(null),this.markers.splice(n,1),!0)},t.prototype.removeMarker=function(e,n){var r=this.removeMarker_(e);return!n&&r&&this.repaint(),r},t.prototype.removeMarkers=function(e,n){for(var r=!1,i=0,a=e;i<a.length;i++){var o=a[i];r=r||this.removeMarker_(o)}return!n&&r&&this.repaint(),r},t.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},t.prototype.repaint=function(){var e=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout(function(){for(var r=0,i=e;r<i.length;r++){var a=i[r];a.remove()}},0)},t.prototype.getExtendedBounds=function(e){var n=this.getProjection(),r=n.fromLatLngToDivPixel(new google.maps.LatLng(e.getNorthEast().lat(),e.getNorthEast().lng()));r!==null&&(r.x+=this.gridSize,r.y-=this.gridSize);var i=n.fromLatLngToDivPixel(new google.maps.LatLng(e.getSouthWest().lat(),e.getSouthWest().lng()));if(i!==null&&(i.x-=this.gridSize,i.y+=this.gridSize),r!==null){var a=n.fromDivPixelToLatLng(r);a!==null&&e.extend(a)}if(i!==null){var o=n.fromDivPixelToLatLng(i);o!==null&&e.extend(o)}return e},t.prototype.redraw=function(){this.createClusters(0)},t.prototype.resetViewport=function(e){for(var n=0,r=this.clusters;n<r.length;n++){var i=r[n];i.remove()}this.clusters=[];for(var a=0,o=this.markers;a<o.length;a++){var s=o[a];s.isAdded=!1,e&&s.setMap(null)}},t.prototype.distanceBetweenPoints=function(e,n){var r=6371,i=(n.lat()-e.lat())*Math.PI/180,a=(n.lng()-e.lng())*Math.PI/180,o=Math.sin(i/2)*Math.sin(i/2)+Math.cos(e.lat()*Math.PI/180)*Math.cos(n.lat()*Math.PI/180)*Math.sin(a/2)*Math.sin(a/2);return r*(2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o)))},t.prototype.isMarkerInBounds=function(e,n){var r=e.getPosition();return r?n.contains(r):!1},t.prototype.addToClosestCluster=function(e){for(var n,r=4e4,i=null,a=0,o=this.clusters;a<o.length;a++){var s=o[a];n=s;var u=n.getCenter(),l=e.getPosition();if(u&&l){var f=this.distanceBetweenPoints(u,l);f<r&&(r=f,i=n)}}i&&i.isMarkerInClusterBounds(e)?i.addMarker(e):(n=new Nd(this),n.addMarker(e),this.clusters.push(n))},t.prototype.createClusters=function(e){var n=this;if(this.ready){e===0&&(google.maps.event.trigger(this,"clusteringbegin",this),this.timerRefStatic!==null&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var r=this.getMap(),i=r!==null&&("getBounds"in r)?r.getBounds():null,a=(r==null?void 0:r.getZoom())||0,o=a>3?new google.maps.LatLngBounds(i==null?void 0:i.getSouthWest(),i==null?void 0:i.getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),s=this.getExtendedBounds(o),u=Math.min(e+this.batchSize,this.markers.length),l=e;l<u;l++){var f=this.markers[l];f&&!f.isAdded&&this.isMarkerInBounds(f,s)&&(!this.ignoreHidden||this.ignoreHidden&&f.getVisible())&&this.addToClosestCluster(f)}if(u<this.markers.length)this.timerRefStatic=window.setTimeout(function(){n.createClusters(u)},0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(var h=0,p=this.clusters;h<p.length;h++){var g=p[h];g.updateIcon()}}}},t.prototype.extend=function(e,n){return(function(i){for(var a in i.prototype){var o=a;this.prototype[o]=i.prototype[o]}return this}).apply(e,[n])},t}(),Ot={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},ze={averageCenter:function(t,e){t.setAverageCenter(e)},batchSizeIE:function(t,e){t.setBatchSizeIE(e)},calculator:function(t,e){t.setCalculator(e)},clusterClass:function(t,e){t.setClusterClass(e)},enableRetinaIcons:function(t,e){t.setEnableRetinaIcons(e)},gridSize:function(t,e){t.setGridSize(e)},ignoreHidden:function(t,e){t.setIgnoreHidden(e)},imageExtension:function(t,e){t.setImageExtension(e)},imagePath:function(t,e){t.setImagePath(e)},imageSizes:function(t,e){t.setImageSizes(e)},maxZoom:function(t,e){t.setMaxZoom(e)},minimumClusterSize:function(t,e){t.setMinimumClusterSize(e)},styles:function(t,e){t.setStyles(e)},title:function(t,e){t.setTitle(e)},zoomOnClick:function(t,e){t.setZoomOnClick(e)}},Gd={};function Yd(t){var e=t.children,n=t.options,r=t.averageCenter,i=t.batchSizeIE,a=t.calculator,o=t.clusterClass,s=t.enableRetinaIcons,u=t.gridSize,l=t.ignoreHidden,f=t.imageExtension,h=t.imagePath,p=t.imageSizes,g=t.maxZoom,y=t.minimumClusterSize,v=t.styles,d=t.title,D=t.zoomOnClick,x=t.onClick,E=t.onClusteringBegin,O=t.onClusteringEnd,b=t.onMouseOver,w=t.onMouseOut,A=t.onLoad,M=t.onUnmount,V=c.useState(null),P=V[0],_=V[1],R=c.useContext(Se),N=c.useState(null),T=N[0],j=N[1],X=c.useState(null),z=X[0],$=X[1],re=c.useState(null),k=re[0],I=re[1],G=c.useState(null),H=G[0],Q=G[1],K=c.useState(null),C=K[0],U=K[1];return c.useEffect(function(){P&&w&&(H!==null&&google.maps.event.removeListener(H),Q(google.maps.event.addListener(P,Ot.onMouseOut,w)))},[w]),c.useEffect(function(){P&&b&&(C!==null&&google.maps.event.removeListener(C),U(google.maps.event.addListener(P,Ot.onMouseOver,b)))},[b]),c.useEffect(function(){P&&x&&(T!==null&&google.maps.event.removeListener(T),j(google.maps.event.addListener(P,Ot.onClick,x)))},[x]),c.useEffect(function(){P&&E&&(z!==null&&google.maps.event.removeListener(z),$(google.maps.event.addListener(P,Ot.onClusteringBegin,E)))},[E]),c.useEffect(function(){P&&O&&(k!==null&&google.maps.event.removeListener(k),$(google.maps.event.addListener(P,Ot.onClusteringEnd,O)))},[O]),c.useEffect(function(){typeof r<"u"&&P!==null&&ze.averageCenter(P,r)},[P,r]),c.useEffect(function(){typeof i<"u"&&P!==null&&ze.batchSizeIE(P,i)},[P,i]),c.useEffect(function(){typeof a<"u"&&P!==null&&ze.calculator(P,a)},[P,a]),c.useEffect(function(){typeof o<"u"&&P!==null&&ze.clusterClass(P,o)},[P,o]),c.useEffect(function(){typeof s<"u"&&P!==null&&ze.enableRetinaIcons(P,s)},[P,s]),c.useEffect(function(){typeof u<"u"&&P!==null&&ze.gridSize(P,u)},[P,u]),c.useEffect(function(){typeof l<"u"&&P!==null&&ze.ignoreHidden(P,l)},[P,l]),c.useEffect(function(){typeof f<"u"&&P!==null&&ze.imageExtension(P,f)},[P,f]),c.useEffect(function(){typeof h<"u"&&P!==null&&ze.imagePath(P,h)},[P,h]),c.useEffect(function(){typeof p<"u"&&P!==null&&ze.imageSizes(P,p)},[P,p]),c.useEffect(function(){typeof g<"u"&&P!==null&&ze.maxZoom(P,g)},[P,g]),c.useEffect(function(){typeof y<"u"&&P!==null&&ze.minimumClusterSize(P,y)},[P,y]),c.useEffect(function(){typeof v<"u"&&P!==null&&ze.styles(P,v)},[P,v]),c.useEffect(function(){typeof d<"u"&&P!==null&&ze.title(P,d)},[P,d]),c.useEffect(function(){typeof D<"u"&&P!==null&&ze.zoomOnClick(P,D)},[P,D]),c.useEffect(function(){if(R){var W=me({},n||Gd),F=new Zo(R,[],W);return r&&ze.averageCenter(F,r),i&&ze.batchSizeIE(F,i),a&&ze.calculator(F,a),o&&ze.clusterClass(F,o),s&&ze.enableRetinaIcons(F,s),u&&ze.gridSize(F,u),l&&ze.ignoreHidden(F,l),f&&ze.imageExtension(F,f),h&&ze.imagePath(F,h),p&&ze.imageSizes(F,p),g&&ze.maxZoom(F,g),y&&ze.minimumClusterSize(F,y),v&&ze.styles(F,v),d&&ze.title(F,d),D&&ze.zoomOnClick(F,D),w&&Q(google.maps.event.addListener(F,Ot.onMouseOut,w)),b&&U(google.maps.event.addListener(F,Ot.onMouseOver,b)),x&&j(google.maps.event.addListener(F,Ot.onClick,x)),E&&$(google.maps.event.addListener(F,Ot.onClusteringBegin,E)),O&&I(google.maps.event.addListener(F,Ot.onClusteringEnd,O)),_(F),A&&A(F),function(){H!==null&&google.maps.event.removeListener(H),C!==null&&google.maps.event.removeListener(C),T!==null&&google.maps.event.removeListener(T),z!==null&&google.maps.event.removeListener(z),k!==null&&google.maps.event.removeListener(k),M&&M(F)}}},[]),P!==null&&e(P)||null}c.memo(Yd),function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={markerClusterer:null},n.setClustererCallback=function(){n.state.markerClusterer!==null&&n.props.onLoad&&n.props.onLoad(n.state.markerClusterer)},n}return e.prototype.componentDidMount=function(){if(this.context){var n=new Zo(this.context,[],this.props.options);this.registeredEvents=Pe({updaterMap:ze,eventMap:Ot,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{markerClusterer:n}},this.setClustererCallback)}},e.prototype.componentDidUpdate=function(n){this.state.markerClusterer&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:ze,eventMap:Ot,prevProps:n,nextProps:this.props,instance:this.state.markerClusterer}))},e.prototype.componentWillUnmount=function(){this.state.markerClusterer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),Me(this.registeredEvents),this.state.markerClusterer.setMap(null))},e.prototype.render=function(){return this.state.markerClusterer!==null?this.props.children(this.state.markerClusterer):null},e.contextType=Se,e}(c.PureComponent);function Ko(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}var Xo=function(){function t(e){e===void 0&&(e={}),this.getCloseClickHandler=this.getCloseClickHandler.bind(this),this.closeClickHandler=this.closeClickHandler.bind(this),this.createInfoBoxDiv=this.createInfoBoxDiv.bind(this),this.addClickHandler=this.addClickHandler.bind(this),this.getCloseBoxImg=this.getCloseBoxImg.bind(this),this.getBoxWidths=this.getBoxWidths.bind(this),this.setBoxStyle=this.setBoxStyle.bind(this),this.setPosition=this.setPosition.bind(this),this.getPosition=this.getPosition.bind(this),this.setOptions=this.setOptions.bind(this),this.setContent=this.setContent.bind(this),this.setVisible=this.setVisible.bind(this),this.getContent=this.getContent.bind(this),this.getVisible=this.getVisible.bind(this),this.setZIndex=this.setZIndex.bind(this),this.getZIndex=this.getZIndex.bind(this),this.onRemove=this.onRemove.bind(this),this.panBox=this.panBox.bind(this),this.extend=this.extend.bind(this),this.close=this.close.bind(this),this.draw=this.draw.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.open=this.open.bind(this),this.extend(t,google.maps.OverlayView),this.content=e.content||"",this.disableAutoPan=e.disableAutoPan||!1,this.maxWidth=e.maxWidth||0,this.pixelOffset=e.pixelOffset||new google.maps.Size(0,0),this.position=e.position||new google.maps.LatLng(0,0),this.zIndex=e.zIndex||null,this.boxClass=e.boxClass||"infoBox",this.boxStyle=e.boxStyle||{},this.closeBoxMargin=e.closeBoxMargin||"2px",this.closeBoxURL=e.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",e.closeBoxURL===""&&(this.closeBoxURL=""),this.infoBoxClearance=e.infoBoxClearance||new google.maps.Size(1,1),typeof e.visible>"u"&&(typeof e.isHidden>"u"?e.visible=!0:e.visible=!e.isHidden),this.isHidden=!e.visible,this.alignBottom=e.alignBottom||!1,this.pane=e.pane||"floatPane",this.enableEventPropagation=e.enableEventPropagation||!1,this.div=null,this.closeListener=null,this.moveListener=null,this.mapListener=null,this.contextListener=null,this.eventListeners=null,this.fixedWidthSet=null}return t.prototype.createInfoBoxDiv=function(){var e=this,n=function(l){l.returnValue=!1,l.preventDefault&&l.preventDefault(),e.enableEventPropagation||Ko(l)};if(!this.div){this.div=document.createElement("div"),this.setBoxStyle(),typeof this.content=="string"?this.div.innerHTML=this.getCloseBoxImg()+this.content:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(this.content));var r=this.getPanes();if(r!==null&&r[this.pane].appendChild(this.div),this.addClickHandler(),this.div.style.width)this.fixedWidthSet=!0;else if(this.maxWidth!==0&&this.div.offsetWidth>this.maxWidth)this.div.style.width=this.maxWidth+"px",this.fixedWidthSet=!0;else{var i=this.getBoxWidths();this.div.style.width=this.div.offsetWidth-i.left-i.right+"px",this.fixedWidthSet=!1}if(this.panBox(this.disableAutoPan),!this.enableEventPropagation){this.eventListeners=[];for(var a=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],o=0,s=a;o<s.length;o++){var u=s[o];this.eventListeners.push(google.maps.event.addListener(this.div,u,Ko))}this.eventListeners.push(google.maps.event.addListener(this.div,"mouseover",function(){e.div&&(e.div.style.cursor="default")}))}this.contextListener=google.maps.event.addListener(this.div,"contextmenu",n),google.maps.event.trigger(this,"domready")}},t.prototype.getCloseBoxImg=function(){var e="";return this.closeBoxURL!==""&&(e='<img alt=""',e+=' aria-hidden="true"',e+=" src='"+this.closeBoxURL+"'",e+=" align=right",e+=" style='",e+=" position: relative;",e+=" cursor: pointer;",e+=" margin: "+this.closeBoxMargin+";",e+="'>"),e},t.prototype.addClickHandler=function(){this.closeListener=this.div&&this.div.firstChild&&this.closeBoxURL!==""?google.maps.event.addListener(this.div.firstChild,"click",this.getCloseClickHandler()):null},t.prototype.closeClickHandler=function(e){e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation(),google.maps.event.trigger(this,"closeclick"),this.close()},t.prototype.getCloseClickHandler=function(){return this.closeClickHandler},t.prototype.panBox=function(e){if(this.div&&!e){var n=this.getMap();if(n instanceof google.maps.Map){var r=0,i=0,a=n.getBounds();a&&!a.contains(this.position)&&n.setCenter(this.position);var o=n.getDiv(),s=o.offsetWidth,u=o.offsetHeight,l=this.pixelOffset.width,f=this.pixelOffset.height,h=this.div.offsetWidth,p=this.div.offsetHeight,g=this.infoBoxClearance.width,y=this.infoBoxClearance.height,v=this.getProjection(),d=v.fromLatLngToContainerPixel(this.position);d!==null&&(d.x<-l+g?r=d.x+l-g:d.x+h+l+g>s&&(r=d.x+h+l+g-s),this.alignBottom?d.y<-f+y+p?i=d.y+f-y-p:d.y+f+y>u&&(i=d.y+f+y-u):d.y<-f+y?i=d.y+f-y:d.y+p+f+y>u&&(i=d.y+p+f+y-u)),r===0&&i===0||n.panBy(r,i)}}},t.prototype.setBoxStyle=function(){if(this.div){this.div.className=this.boxClass,this.div.style.cssText="";var e=this.boxStyle;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(this.div.style[n]=e[n]);if(this.div.style.webkitTransform="translateZ(0)",typeof this.div.style.opacity<"u"&&this.div.style.opacity!==""){var r=parseFloat(this.div.style.opacity||"");this.div.style.msFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+r*100+')"',this.div.style.filter="alpha(opacity="+r*100+")"}this.div.style.position="absolute",this.div.style.visibility="hidden",this.zIndex!==null&&(this.div.style.zIndex=this.zIndex+""),this.div.style.overflow||(this.div.style.overflow="auto")}},t.prototype.getBoxWidths=function(){var e={top:0,bottom:0,left:0,right:0};if(!this.div)return e;if(document.defaultView){var n=this.div.ownerDocument,r=n&&n.defaultView?n.defaultView.getComputedStyle(this.div,""):null;r&&(e.top=parseInt(r.borderTopWidth||"",10)||0,e.bottom=parseInt(r.borderBottomWidth||"",10)||0,e.left=parseInt(r.borderLeftWidth||"",10)||0,e.right=parseInt(r.borderRightWidth||"",10)||0)}else if(document.documentElement.currentStyle){var i=this.div.currentStyle;i&&(e.top=parseInt(i.borderTopWidth||"",10)||0,e.bottom=parseInt(i.borderBottomWidth||"",10)||0,e.left=parseInt(i.borderLeftWidth||"",10)||0,e.right=parseInt(i.borderRightWidth||"",10)||0)}return e},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.div.parentNode.removeChild(this.div),this.div=null)},t.prototype.draw=function(){if(this.createInfoBoxDiv(),this.div){var e=this.getProjection(),n=e.fromLatLngToDivPixel(this.position);n!==null&&(this.div.style.left=n.x+this.pixelOffset.width+"px",this.alignBottom?this.div.style.bottom=-(n.y+this.pixelOffset.height)+"px":this.div.style.top=n.y+this.pixelOffset.height+"px"),this.isHidden?this.div.style.visibility="hidden":this.div.style.visibility="visible"}},t.prototype.setOptions=function(e){e===void 0&&(e={}),typeof e.boxClass<"u"&&(this.boxClass=e.boxClass,this.setBoxStyle()),typeof e.boxStyle<"u"&&(this.boxStyle=e.boxStyle,this.setBoxStyle()),typeof e.content<"u"&&this.setContent(e.content),typeof e.disableAutoPan<"u"&&(this.disableAutoPan=e.disableAutoPan),typeof e.maxWidth<"u"&&(this.maxWidth=e.maxWidth),typeof e.pixelOffset<"u"&&(this.pixelOffset=e.pixelOffset),typeof e.alignBottom<"u"&&(this.alignBottom=e.alignBottom),typeof e.position<"u"&&this.setPosition(e.position),typeof e.zIndex<"u"&&this.setZIndex(e.zIndex),typeof e.closeBoxMargin<"u"&&(this.closeBoxMargin=e.closeBoxMargin),typeof e.closeBoxURL<"u"&&(this.closeBoxURL=e.closeBoxURL),typeof e.infoBoxClearance<"u"&&(this.infoBoxClearance=e.infoBoxClearance),typeof e.isHidden<"u"&&(this.isHidden=e.isHidden),typeof e.visible<"u"&&(this.isHidden=!e.visible),typeof e.enableEventPropagation<"u"&&(this.enableEventPropagation=e.enableEventPropagation),this.div&&this.draw()},t.prototype.setContent=function(e){this.content=e,this.div&&(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.fixedWidthSet||(this.div.style.width=""),typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e)),this.fixedWidthSet||(this.div.style.width=this.div.offsetWidth+"px",typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e))),this.addClickHandler()),google.maps.event.trigger(this,"content_changed")},t.prototype.setPosition=function(e){this.position=e,this.div&&this.draw(),google.maps.event.trigger(this,"position_changed")},t.prototype.setVisible=function(e){this.isHidden=!e,this.div&&(this.div.style.visibility=this.isHidden?"hidden":"visible")},t.prototype.setZIndex=function(e){this.zIndex=e,this.div&&(this.div.style.zIndex=e+""),google.maps.event.trigger(this,"zindex_changed")},t.prototype.getContent=function(){return this.content},t.prototype.getPosition=function(){return this.position},t.prototype.getZIndex=function(){return this.zIndex},t.prototype.getVisible=function(){var e=this.getMap();return typeof e>"u"||e===null?!1:!this.isHidden},t.prototype.show=function(){this.isHidden=!1,this.div&&(this.div.style.visibility="visible")},t.prototype.hide=function(){this.isHidden=!0,this.div&&(this.div.style.visibility="hidden")},t.prototype.open=function(e,n){var r=this;n&&(this.position=n.getPosition(),this.moveListener=google.maps.event.addListener(n,"position_changed",function(){var i=n.getPosition();r.setPosition(i)}),this.mapListener=google.maps.event.addListener(n,"map_changed",function(){r.setMap(n.map)})),this.setMap(e),this.div&&this.panBox()},t.prototype.close=function(){if(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.eventListeners){for(var e=0,n=this.eventListeners;e<n.length;e++){var r=n[e];google.maps.event.removeListener(r)}this.eventListeners=null}this.moveListener&&(google.maps.event.removeListener(this.moveListener),this.moveListener=null),this.mapListener&&(google.maps.event.removeListener(this.mapListener),this.mapListener=null),this.contextListener&&(google.maps.event.removeListener(this.contextListener),this.contextListener=null),this.setMap(null)},t.prototype.extend=function(e,n){return(function(i){for(var a in i.prototype)Object.prototype.hasOwnProperty.call(this,a)||(this.prototype[a]=i.prototype[a]);return this}).apply(e,[n])},t}(),Jo={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Qo={options:function(t,e){t.setOptions(e)},position:function(t,e){e instanceof google.maps.LatLng?t.setPosition(e):t.setPosition(new google.maps.LatLng(e.lat,e.lng))},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},Zd={};function Kd(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,a=t.zIndex,o=t.onCloseClick,s=t.onDomReady,u=t.onContentChanged,l=t.onPositionChanged,f=t.onZindexChanged,h=t.onLoad,p=t.onUnmount,g=c.useContext(Se),y=c.useState(null),v=y[0],d=y[1],D=c.useState(null),x=D[0],E=D[1],O=c.useState(null),b=O[0],w=O[1],A=c.useState(null),M=A[0],V=A[1],P=c.useState(null),_=P[0],R=P[1],N=c.useState(null),T=N[0],j=N[1],X=c.useRef(null);return c.useEffect(function(){g&&v!==null&&(v.close(),n?v.open(g,n):v.getPosition()&&v.open(g))},[g,v,n]),c.useEffect(function(){r&&v!==null&&v.setOptions(r)},[v,r]),c.useEffect(function(){if(i&&v!==null){var z=i instanceof google.maps.LatLng?i:new google.maps.LatLng(i.lat,i.lng);v.setPosition(z)}},[i]),c.useEffect(function(){typeof a=="number"&&v!==null&&v.setZIndex(a)},[a]),c.useEffect(function(){v&&o&&(x!==null&&google.maps.event.removeListener(x),E(google.maps.event.addListener(v,"closeclick",o)))},[o]),c.useEffect(function(){v&&s&&(b!==null&&google.maps.event.removeListener(b),w(google.maps.event.addListener(v,"domready",s)))},[s]),c.useEffect(function(){v&&u&&(M!==null&&google.maps.event.removeListener(M),V(google.maps.event.addListener(v,"content_changed",u)))},[u]),c.useEffect(function(){v&&l&&(_!==null&&google.maps.event.removeListener(_),R(google.maps.event.addListener(v,"position_changed",l)))},[l]),c.useEffect(function(){v&&f&&(T!==null&&google.maps.event.removeListener(T),j(google.maps.event.addListener(v,"zindex_changed",f)))},[f]),c.useEffect(function(){if(g){var z=r||Zd,$=z.position,re=Ti(z,["position"]),k=void 0;$&&!($ instanceof google.maps.LatLng)&&(k=new google.maps.LatLng($.lat,$.lng));var I=new Xo(me(me({},re),k?{position:k}:{}));X.current=document.createElement("div"),d(I),o&&E(google.maps.event.addListener(I,"closeclick",o)),s&&w(google.maps.event.addListener(I,"domready",s)),u&&V(google.maps.event.addListener(I,"content_changed",u)),l&&R(google.maps.event.addListener(I,"position_changed",l)),f&&j(google.maps.event.addListener(I,"zindex_changed",f)),I.setContent(X.current),n?I.open(g,n):I.getPosition()?I.open(g):rt(!1,"You must provide either an anchor or a position prop for <InfoBox>."),h&&h(I)}return function(){v!==null&&(x&&google.maps.event.removeListener(x),M&&google.maps.event.removeListener(M),b&&google.maps.event.removeListener(b),_&&google.maps.event.removeListener(_),T&&google.maps.event.removeListener(T),p&&p(v),v.close())}},[]),X.current?Yt.createPortal(c.Children.only(e),X.current):null}c.memo(Kd),function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoBox:null},n.open=function(r,i){i?n.context!==null&&r.open(n.context,i):r.getPosition()?n.context!==null&&r.open(n.context):rt(!1,"You must provide either an anchor or a position prop for <InfoBox>.")},n.setInfoBoxCallback=function(){n.state.infoBox!==null&&n.containerElement!==null&&(n.state.infoBox.setContent(n.containerElement),n.open(n.state.infoBox,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoBox))},n}return e.prototype.componentDidMount=function(){var n=this.props.options||{},r=n.position,i=Ti(n,["position"]),a;r&&!(r instanceof google.maps.LatLng)&&(a=new google.maps.LatLng(r.lat,r.lng));var o=new Xo(me(me({},i),a?{position:a}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=Pe({updaterMap:Qo,eventMap:Jo,prevProps:{},nextProps:this.props,instance:o}),this.setState({infoBox:o},this.setInfoBoxCallback)},e.prototype.componentDidUpdate=function(n){var r=this.state.infoBox;r!==null&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:Qo,eventMap:Jo,prevProps:n,nextProps:this.props,instance:r}))},e.prototype.componentWillUnmount=function(){var n=this.props.onUnmount,r=this.state.infoBox;r!==null&&(n&&n(r),Me(this.registeredEvents),r.close())},e.prototype.render=function(){return this.containerElement?Yt.createPortal(c.Children.only(this.props.children),this.containerElement):null},e.contextType=Se,e}(c.PureComponent);var Xd=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(a=Object.keys(e),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!t(e[o],n[o]))return!1}return!0}return e!==e&&n!==n},$o=Fo(Xd);const es=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Ii=1,qn=8;class ji{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[n,r]=new Uint8Array(e,0,2);if(n!==219)throw new Error("Data does not appear to be in a KDBush format.");const i=r>>4;if(i!==Ii)throw new Error(`Got v${i} data when expected v${Ii}.`);const a=es[r&15];if(!a)throw new Error("Unrecognized array type.");const[o]=new Uint16Array(e,2,1),[s]=new Uint32Array(e,4,1);return new ji(s,o,a,e)}constructor(e,n=64,r=Float64Array,i){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+n,2),65535),this.ArrayType=r,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const a=es.indexOf(this.ArrayType),o=e*2*this.ArrayType.BYTES_PER_ELEMENT,s=e*this.IndexArrayType.BYTES_PER_ELEMENT,u=(8-s%8)%8;if(a<0)throw new Error(`Unexpected typed array class: ${r}.`);i&&i instanceof ArrayBuffer?(this.data=i,this.ids=new this.IndexArrayType(this.data,qn,e),this.coords=new this.ArrayType(this.data,qn+s+u,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(qn+o+s+u),this.ids=new this.IndexArrayType(this.data,qn,e),this.coords=new this.ArrayType(this.data,qn+s+u,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(Ii<<4)+a]),new Uint16Array(this.data,2,1)[0]=n,new Uint32Array(this.data,4,1)[0]=e)}add(e,n){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=e,this.coords[this._pos++]=n,r}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return Ni(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,n,r,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:a,coords:o,nodeSize:s}=this,u=[0,a.length-1,0],l=[];for(;u.length;){const f=u.pop()||0,h=u.pop()||0,p=u.pop()||0;if(h-p<=s){for(let d=p;d<=h;d++){const D=o[2*d],x=o[2*d+1];D>=e&&D<=r&&x>=n&&x<=i&&l.push(a[d])}continue}const g=p+h>>1,y=o[2*g],v=o[2*g+1];y>=e&&y<=r&&v>=n&&v<=i&&l.push(a[g]),(f===0?e<=y:n<=v)&&(u.push(p),u.push(g-1),u.push(1-f)),(f===0?r>=y:i>=v)&&(u.push(g+1),u.push(h),u.push(1-f))}return l}within(e,n,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:a,nodeSize:o}=this,s=[0,i.length-1,0],u=[],l=r*r;for(;s.length;){const f=s.pop()||0,h=s.pop()||0,p=s.pop()||0;if(h-p<=o){for(let d=p;d<=h;d++)ns(a[2*d],a[2*d+1],e,n)<=l&&u.push(i[d]);continue}const g=p+h>>1,y=a[2*g],v=a[2*g+1];ns(y,v,e,n)<=l&&u.push(i[g]),(f===0?e-r<=y:n-r<=v)&&(s.push(p),s.push(g-1),s.push(1-f)),(f===0?e+r>=y:n+r>=v)&&(s.push(g+1),s.push(h),s.push(1-f))}return u}}function Ni(t,e,n,r,i,a){if(i-r<=n)return;const o=r+i>>1;ts(t,e,o,r,i,a),Ni(t,e,n,r,o-1,1-a),Ni(t,e,n,o+1,i,1-a)}function ts(t,e,n,r,i,a){for(;i>r;){if(i-r>600){const l=i-r+1,f=n-r+1,h=Math.log(l),p=.5*Math.exp(2*h/3),g=.5*Math.sqrt(h*p*(l-p)/l)*(f-l/2<0?-1:1),y=Math.max(r,Math.floor(n-f*p/l+g)),v=Math.min(i,Math.floor(n+(l-f)*p/l+g));ts(t,e,n,y,v,a)}const o=e[2*n+a];let s=r,u=i;for(Gn(t,e,r,n),e[2*i+a]>o&&Gn(t,e,r,i);s<u;){for(Gn(t,e,s,u),s++,u--;e[2*s+a]<o;)s++;for(;e[2*u+a]>o;)u--}e[2*r+a]===o?Gn(t,e,r,u):(u++,Gn(t,e,u,i)),u<=n&&(r=u+1),n<=u&&(i=u-1)}}function Gn(t,e,n,r){_i(t,n,r),_i(e,2*n,2*r),_i(e,2*n+1,2*r+1)}function _i(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function ns(t,e,n,r){const i=t-n,a=e-r;return i*i+a*a}const Jd={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},rs=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),dn=2,Zt=3,zi=4,Kt=5,is=6;class Qd{constructor(e){this.options=Object.assign(Object.create(Jd),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:n,minZoom:r,maxZoom:i}=this.options;n&&console.time("total time");const a=`prepare ${e.length} points`;n&&console.time(a),this.points=e;const o=[];for(let u=0;u<e.length;u++){const l=e[u];if(!l.geometry)continue;const[f,h]=l.geometry.coordinates,p=rs(Br(f)),g=rs(Sr(h));o.push(p,g,1/0,u,-1,1),this.options.reduce&&o.push(0)}let s=this.trees[i+1]=this._createTree(o);n&&console.timeEnd(a);for(let u=i;u>=r;u--){const l=+Date.now();s=this.trees[u]=this._createTree(this._cluster(s,u)),n&&console.log("z%d: %d clusters in %dms",u,s.numItems,+Date.now()-l)}return n&&console.timeEnd("total time"),this}getClusters(e,n){let r=((e[0]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,e[1]));let a=e[2]===180?180:((e[2]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,a=180;else if(r>a){const h=this.getClusters([r,i,180,o],n),p=this.getClusters([-180,i,a,o],n);return h.concat(p)}const s=this.trees[this._limitZoom(n)],u=s.range(Br(r),Sr(o),Br(a),Sr(i)),l=s.data,f=[];for(const h of u){const p=this.stride*h;f.push(l[p+Kt]>1?as(l,p,this.clusterProps):this.points[l[p+Zt]])}return f}getChildren(e){const n=this._getOriginId(e),r=this._getOriginZoom(e),i="No cluster with the specified id.",a=this.trees[r];if(!a)throw new Error(i);const o=a.data;if(n*this.stride>=o.length)throw new Error(i);const s=this.options.radius/(this.options.extent*Math.pow(2,r-1)),u=o[n*this.stride],l=o[n*this.stride+1],f=a.within(u,l,s),h=[];for(const p of f){const g=p*this.stride;o[g+zi]===e&&h.push(o[g+Kt]>1?as(o,g,this.clusterProps):this.points[o[g+Zt]])}if(h.length===0)throw new Error(i);return h}getLeaves(e,n,r){n=n||10,r=r||0;const i=[];return this._appendLeaves(i,e,n,r,0),i}getTile(e,n,r){const i=this.trees[this._limitZoom(e)],a=Math.pow(2,e),{extent:o,radius:s}=this.options,u=s/o,l=(r-u)/a,f=(r+1+u)/a,h={features:[]};return this._addTileFeatures(i.range((n-u)/a,l,(n+1+u)/a,f),i.data,n,r,a,h),n===0&&this._addTileFeatures(i.range(1-u/a,l,1,f),i.data,a,r,a,h),n===a-1&&this._addTileFeatures(i.range(0,l,u/a,f),i.data,-1,r,a,h),h.features.length?h:null}getClusterExpansionZoom(e){let n=this._getOriginZoom(e)-1;for(;n<=this.options.maxZoom;){const r=this.getChildren(e);if(n++,r.length!==1)break;e=r[0].properties.cluster_id}return n}_appendLeaves(e,n,r,i,a){const o=this.getChildren(n);for(const s of o){const u=s.properties;if(u&&u.cluster?a+u.point_count<=i?a+=u.point_count:a=this._appendLeaves(e,u.cluster_id,r,i,a):a<i?a++:e.push(s),e.length===r)break}return a}_createTree(e){const n=new ji(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<e.length;r+=this.stride)n.add(e[r],e[r+1]);return n.finish(),n.data=e,n}_addTileFeatures(e,n,r,i,a,o){for(const s of e){const u=s*this.stride,l=n[u+Kt]>1;let f,h,p;if(l)f=os(n,u,this.clusterProps),h=n[u],p=n[u+1];else{const v=this.points[n[u+Zt]];f=v.properties;const[d,D]=v.geometry.coordinates;h=Br(d),p=Sr(D)}const g={type:1,geometry:[[Math.round(this.options.extent*(h*a-r)),Math.round(this.options.extent*(p*a-i))]],tags:f};let y;l||this.options.generateId?y=n[u+Zt]:y=this.points[n[u+Zt]].id,y!==void 0&&(g.id=y),o.features.push(g)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,n){const{radius:r,extent:i,reduce:a,minPoints:o}=this.options,s=r/(i*Math.pow(2,n)),u=e.data,l=[],f=this.stride;for(let h=0;h<u.length;h+=f){if(u[h+dn]<=n)continue;u[h+dn]=n;const p=u[h],g=u[h+1],y=e.within(u[h],u[h+1],s),v=u[h+Kt];let d=v;for(const D of y){const x=D*f;u[x+dn]>n&&(d+=u[x+Kt])}if(d>v&&d>=o){let D=p*v,x=g*v,E,O=-1;const b=((h/f|0)<<5)+(n+1)+this.points.length;for(const w of y){const A=w*f;if(u[A+dn]<=n)continue;u[A+dn]=n;const M=u[A+Kt];D+=u[A]*M,x+=u[A+1]*M,u[A+zi]=b,a&&(E||(E=this._map(u,h,!0),O=this.clusterProps.length,this.clusterProps.push(E)),a(E,this._map(u,A)))}u[h+zi]=b,l.push(D/d,x/d,1/0,b,-1,d),a&&l.push(O)}else{for(let D=0;D<f;D++)l.push(u[h+D]);if(d>1)for(const D of y){const x=D*f;if(!(u[x+dn]<=n)){u[x+dn]=n;for(let E=0;E<f;E++)l.push(u[x+E])}}}}return l}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,n,r){if(e[n+Kt]>1){const o=this.clusterProps[e[n+is]];return r?Object.assign({},o):o}const i=this.points[e[n+Zt]].properties,a=this.options.map(i);return r&&a===i?Object.assign({},a):a}}function as(t,e,n){return{type:"Feature",id:t[e+Zt],properties:os(t,e,n),geometry:{type:"Point",coordinates:[$d(t[e]),ep(t[e+1])]}}}function os(t,e,n){const r=t[e+Kt],i=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,a=t[e+is],o=a===-1?{}:Object.assign({},n[a]);return Object.assign(o,{cluster:!0,cluster_id:t[e+Zt],point_count:r,point_count_abbreviated:i})}function Br(t){return t/360+.5}function Sr(t){const e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function $d(t){return(t-.5)*360}function ep(t){const e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}/*! *****************************************************************************
53
+ `)),console.error(_)})},[n,w,a]);var A=c.useRef();return c.useEffect(function(){A.current&&f!==A.current&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),A.current=f},[f]),{isLoaded:D,loadError:O,url:w}}var Pd=B.jsx(_o,{});function Md(t){var e=t.loadingElement,n=t.onLoad,r=t.onError,i=t.onUnmount,a=t.children,o=Ti(t,["loadingElement","onLoad","onError","onUnmount","children"]),s=Od(o),u=s.isLoaded,l=s.loadError;return c.useEffect(function(){u&&typeof n=="function"&&n()},[u,n]),c.useEffect(function(){l&&typeof r=="function"&&r(l)},[l,r]),c.useEffect(function(){return function(){i&&i()}},[i]),u?a:e||Pd}c.memo(Md);var Wo;(function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"})(Wo||(Wo={}));var Uo={},Ho={options:function(t,e){t.setOptions(e)}};function Fd(t){var e=t.options,n=t.onLoad,r=t.onUnmount,i=c.useContext(Se),a=c.useState(null),o=a[0],s=a[1];return c.useEffect(function(){o!==null&&o.setMap(i)},[i]),c.useEffect(function(){e&&o!==null&&o.setOptions(e)},[o,e]),c.useEffect(function(){var u=new google.maps.TrafficLayer(me(me({},e||{}),{map:i}));return s(u),n&&n(u),function(){o!==null&&(r&&r(o),o.setMap(null))}},[]),null}c.memo(Fd),function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={trafficLayer:null},n.setTrafficLayerCallback=function(){n.state.trafficLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.trafficLayer)},n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=new google.maps.TrafficLayer(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Pe({updaterMap:Ho,eventMap:Uo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{trafficLayer:n}},this.setTrafficLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.trafficLayer!==null&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:Ho,eventMap:Uo,prevProps:n,nextProps:this.props,instance:this.state.trafficLayer}))},e.prototype.componentWillUnmount=function(){this.state.trafficLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),Me(this.registeredEvents),this.state.trafficLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Se,e}(c.PureComponent);function kd(t){var e=t.onLoad,n=t.onUnmount,r=c.useContext(Se),i=c.useState(null),a=i[0],o=i[1];return c.useEffect(function(){a!==null&&a.setMap(r)},[r]),c.useEffect(function(){var s=new google.maps.BicyclingLayer;return o(s),s.setMap(r),e&&e(s),function(){s!==null&&(n&&n(s),s.setMap(null))}},[]),null}c.memo(kd),function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={bicyclingLayer:null},n.setBicyclingLayerCallback=function(){n.state.bicyclingLayer!==null&&(n.state.bicyclingLayer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.bicyclingLayer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.BicyclingLayer;this.setState(function(){return{bicyclingLayer:n}},this.setBicyclingLayerCallback)},e.prototype.componentWillUnmount=function(){this.state.bicyclingLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Se,e}(c.PureComponent);function Td(t){var e=t.onLoad,n=t.onUnmount,r=c.useContext(Se),i=c.useState(null),a=i[0],o=i[1];return c.useEffect(function(){a!==null&&a.setMap(r)},[r]),c.useEffect(function(){var s=new google.maps.TransitLayer;return o(s),s.setMap(r),e&&e(s),function(){a!==null&&(n&&n(a),a.setMap(null))}},[]),null}c.memo(Td),function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={transitLayer:null},n.setTransitLayerCallback=function(){n.state.transitLayer!==null&&(n.state.transitLayer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.transitLayer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.TransitLayer;this.setState(function(){return{transitLayer:n}},this.setTransitLayerCallback)},e.prototype.componentWillUnmount=function(){this.state.transitLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Se,e}(c.PureComponent);var Vo={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},qo={drawingMode:function(t,e){t.setDrawingMode(e)},options:function(t,e){t.setOptions(e)}};function Rd(t){var e=t.options,n=t.drawingMode,r=t.onCircleComplete,i=t.onMarkerComplete,a=t.onOverlayComplete,o=t.onPolygonComplete,s=t.onPolylineComplete,u=t.onRectangleComplete,l=t.onLoad,f=t.onUnmount,h=c.useContext(Se),p=c.useState(null),g=p[0],y=p[1],v=c.useState(null),d=v[0],D=v[1],x=c.useState(null),E=x[0],O=x[1],b=c.useState(null),w=b[0],A=b[1],M=c.useState(null),V=M[0],P=M[1],_=c.useState(null),R=_[0],N=_[1],T=c.useState(null),j=T[0],X=T[1];return c.useEffect(function(){g!==null&&g.setMap(h)},[h]),c.useEffect(function(){e&&g!==null&&g.setOptions(e)},[g,e]),c.useEffect(function(){g!==null&&g.setDrawingMode(n??null)},[g,n]),c.useEffect(function(){g&&r&&(d!==null&&google.maps.event.removeListener(d),D(google.maps.event.addListener(g,"circlecomplete",r)))},[g,r]),c.useEffect(function(){g&&i&&(E!==null&&google.maps.event.removeListener(E),O(google.maps.event.addListener(g,"markercomplete",i)))},[g,i]),c.useEffect(function(){g&&a&&(w!==null&&google.maps.event.removeListener(w),A(google.maps.event.addListener(g,"overlaycomplete",a)))},[g,a]),c.useEffect(function(){g&&o&&(V!==null&&google.maps.event.removeListener(V),P(google.maps.event.addListener(g,"polygoncomplete",o)))},[g,o]),c.useEffect(function(){g&&s&&(R!==null&&google.maps.event.removeListener(R),N(google.maps.event.addListener(g,"polylinecomplete",s)))},[g,s]),c.useEffect(function(){g&&u&&(j!==null&&google.maps.event.removeListener(j),X(google.maps.event.addListener(g,"rectanglecomplete",u)))},[g,u]),c.useEffect(function(){rt(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);var z=new google.maps.drawing.DrawingManager(me(me({},e||{}),{map:h}));return n&&z.setDrawingMode(n),r&&D(google.maps.event.addListener(z,"circlecomplete",r)),i&&O(google.maps.event.addListener(z,"markercomplete",i)),a&&A(google.maps.event.addListener(z,"overlaycomplete",a)),o&&P(google.maps.event.addListener(z,"polygoncomplete",o)),s&&N(google.maps.event.addListener(z,"polylinecomplete",s)),u&&X(google.maps.event.addListener(z,"rectanglecomplete",u)),y(z),l&&l(z),function(){g!==null&&(d&&google.maps.event.removeListener(d),E&&google.maps.event.removeListener(E),w&&google.maps.event.removeListener(w),V&&google.maps.event.removeListener(V),R&&google.maps.event.removeListener(R),j&&google.maps.event.removeListener(j),f&&f(g),g.setMap(null))}},[]),null}c.memo(Rd),function(t){Ge(e,t);function e(n){var r=t.call(this,n)||this;return r.registeredEvents=[],r.state={drawingManager:null},r.setDrawingManagerCallback=function(){r.state.drawingManager!==null&&r.props.onLoad&&r.props.onLoad(r.state.drawingManager)},rt(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing),r}return e.prototype.componentDidMount=function(){var n=new google.maps.drawing.DrawingManager(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Pe({updaterMap:qo,eventMap:Vo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{drawingManager:n}},this.setDrawingManagerCallback)},e.prototype.componentDidUpdate=function(n){this.state.drawingManager!==null&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:qo,eventMap:Vo,prevProps:n,nextProps:this.props,instance:this.state.drawingManager}))},e.prototype.componentWillUnmount=function(){this.state.drawingManager!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),Me(this.registeredEvents),this.state.drawingManager.setMap(null))},e.prototype.render=function(){return null},e.contextType=Se,e}(c.PureComponent);var Go={onAnimationChanged:"animation_changed",onClick:"click",onClickableChanged:"clickable_changed",onCursorChanged:"cursor_changed",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDraggableChanged:"draggable_changed",onDragStart:"dragstart",onFlatChanged:"flat_changed",onIconChanged:"icon_changed",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onPositionChanged:"position_changed",onRightClick:"rightclick",onShapeChanged:"shape_changed",onTitleChanged:"title_changed",onVisibleChanged:"visible_changed",onZindexChanged:"zindex_changed"},Yo={animation:function(t,e){t.setAnimation(e)},clickable:function(t,e){t.setClickable(e)},cursor:function(t,e){t.setCursor(e)},draggable:function(t,e){t.setDraggable(e)},icon:function(t,e){t.setIcon(e)},label:function(t,e){t.setLabel(e)},map:function(t,e){t.setMap(e)},opacity:function(t,e){t.setOpacity(e)},options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},shape:function(t,e){t.setShape(e)},title:function(t,e){t.setTitle(e)},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},xr={};function Id(t){var e=t.position,n=t.options,r=t.clusterer,i=t.noClustererRedraw,a=t.children,o=t.draggable,s=t.visible,u=t.animation,l=t.clickable,f=t.cursor,h=t.icon,p=t.label,g=t.opacity,y=t.shape,v=t.title,d=t.zIndex,D=t.onClick,x=t.onDblClick,E=t.onDrag,O=t.onDragEnd,b=t.onDragStart,w=t.onMouseOut,A=t.onMouseOver,M=t.onMouseUp,V=t.onMouseDown,P=t.onRightClick,_=t.onClickableChanged,R=t.onCursorChanged,N=t.onAnimationChanged,T=t.onDraggableChanged,j=t.onFlatChanged,X=t.onIconChanged,z=t.onPositionChanged,$=t.onShapeChanged,re=t.onTitleChanged,k=t.onVisibleChanged,I=t.onZindexChanged,G=t.onLoad,H=t.onUnmount,Q=c.useContext(Se),K=c.useState(null),C=K[0],U=K[1],W=c.useState(null),F=W[0],J=W[1],ne=c.useState(null),Y=ne[0],ue=ne[1],ae=c.useState(null),de=ae[0],pe=ae[1],Ce=c.useState(null),ye=Ce[0],ge=Ce[1],ve=c.useState(null),Ne=ve[0],se=ve[1],_e=c.useState(null),fe=_e[0],we=_e[1],ke=c.useState(null),Ve=ke[0],Ye=ke[1],Ee=c.useState(null),ct=Ee[0],st=Ee[1],Tt=c.useState(null),yt=Tt[0],Lt=Tt[1],zt=c.useState(null),Ct=zt[0],ln=zt[1],be=c.useState(null),Re=be[0],Ie=be[1],it=c.useState(null),ut=it[0],Rt=it[1],Sn=c.useState(null),Nn=Sn[0],yr=Sn[1],Li=c.useState(null),An=Li[0],Cr=Li[1],Oi=c.useState(null),_n=Oi[0],Dr=Oi[1],br=c.useState(null),zn=br[0],Pi=br[1],Mi=c.useState(null),Wn=Mi[0],S=Mi[1],te=c.useState(null),oe=te[0],De=te[1],je=c.useState(null),We=je[0],Te=je[1],Oe=c.useState(null),at=Oe[0],Je=Oe[1],tt=c.useState(null),dt=tt[0],qt=tt[1];c.useEffect(function(){C!==null&&C.setMap(Q)},[Q]),c.useEffect(function(){typeof n<"u"&&C!==null&&C.setOptions(n)},[C,n]),c.useEffect(function(){typeof o<"u"&&C!==null&&C.setDraggable(o)},[C,o]),c.useEffect(function(){e&&C!==null&&C.setPosition(e)},[C,e]),c.useEffect(function(){typeof s<"u"&&C!==null&&C.setVisible(s)},[C,s]),c.useEffect(function(){C==null||C.setAnimation(u)},[C,u]),c.useEffect(function(){C&&l!==void 0&&C.setClickable(l)},[C,l]),c.useEffect(function(){C&&f!==void 0&&C.setCursor(f)},[C,f]),c.useEffect(function(){C&&h!==void 0&&C.setIcon(h)},[C,h]),c.useEffect(function(){C&&p!==void 0&&C.setLabel(p)},[C,p]),c.useEffect(function(){C&&g!==void 0&&C.setOpacity(g)},[C,g]),c.useEffect(function(){C&&y!==void 0&&C.setShape(y)},[C,y]),c.useEffect(function(){C&&v!==void 0&&C.setTitle(v)},[C,v]),c.useEffect(function(){C&&d!==void 0&&C.setZIndex(d)},[C,d]),c.useEffect(function(){C&&x&&(F!==null&&google.maps.event.removeListener(F),J(google.maps.event.addListener(C,"dblclick",x)))},[x]),c.useEffect(function(){C&&O&&(Y!==null&&google.maps.event.removeListener(Y),ue(google.maps.event.addListener(C,"dragend",O)))},[O]),c.useEffect(function(){C&&b&&(de!==null&&google.maps.event.removeListener(de),pe(google.maps.event.addListener(C,"dragstart",b)))},[b]),c.useEffect(function(){C&&V&&(ye!==null&&google.maps.event.removeListener(ye),ge(google.maps.event.addListener(C,"mousedown",V)))},[V]),c.useEffect(function(){C&&w&&(Ne!==null&&google.maps.event.removeListener(Ne),se(google.maps.event.addListener(C,"mouseout",w)))},[w]),c.useEffect(function(){C&&A&&(fe!==null&&google.maps.event.removeListener(fe),we(google.maps.event.addListener(C,"mouseover",A)))},[A]),c.useEffect(function(){C&&M&&(Ve!==null&&google.maps.event.removeListener(Ve),Ye(google.maps.event.addListener(C,"mouseup",M)))},[M]),c.useEffect(function(){C&&P&&(ct!==null&&google.maps.event.removeListener(ct),st(google.maps.event.addListener(C,"rightclick",P)))},[P]),c.useEffect(function(){C&&D&&(yt!==null&&google.maps.event.removeListener(yt),Lt(google.maps.event.addListener(C,"click",D)))},[D]),c.useEffect(function(){C&&E&&(Ct!==null&&google.maps.event.removeListener(Ct),ln(google.maps.event.addListener(C,"drag",E)))},[E]),c.useEffect(function(){C&&_&&(Re!==null&&google.maps.event.removeListener(Re),Ie(google.maps.event.addListener(C,"clickable_changed",_)))},[_]),c.useEffect(function(){C&&R&&(ut!==null&&google.maps.event.removeListener(ut),Rt(google.maps.event.addListener(C,"cursor_changed",R)))},[R]),c.useEffect(function(){C&&N&&(Nn!==null&&google.maps.event.removeListener(Nn),yr(google.maps.event.addListener(C,"animation_changed",N)))},[N]),c.useEffect(function(){C&&T&&(An!==null&&google.maps.event.removeListener(An),Cr(google.maps.event.addListener(C,"draggable_changed",T)))},[T]),c.useEffect(function(){C&&j&&(_n!==null&&google.maps.event.removeListener(_n),Dr(google.maps.event.addListener(C,"flat_changed",j)))},[j]),c.useEffect(function(){C&&X&&(zn!==null&&google.maps.event.removeListener(zn),Pi(google.maps.event.addListener(C,"icon_changed",X)))},[X]),c.useEffect(function(){C&&z&&(Wn!==null&&google.maps.event.removeListener(Wn),S(google.maps.event.addListener(C,"position_changed",z)))},[z]),c.useEffect(function(){C&&$&&(oe!==null&&google.maps.event.removeListener(oe),De(google.maps.event.addListener(C,"shape_changed",$)))},[$]),c.useEffect(function(){C&&re&&(We!==null&&google.maps.event.removeListener(We),Te(google.maps.event.addListener(C,"title_changed",re)))},[re]),c.useEffect(function(){C&&k&&(at!==null&&google.maps.event.removeListener(at),Je(google.maps.event.addListener(C,"visible_changed",k)))},[k]),c.useEffect(function(){C&&I&&(dt!==null&&google.maps.event.removeListener(dt),qt(google.maps.event.addListener(C,"zindex_changed",I)))},[I]),c.useEffect(function(){var ot=me(me(me({},n||xr),r?xr:{map:Q}),{position:e}),xe=new google.maps.Marker(ot);return r?r.addMarker(xe,!!i):xe.setMap(Q),e&&xe.setPosition(e),typeof s<"u"&&xe.setVisible(s),typeof o<"u"&&xe.setDraggable(o),typeof l<"u"&&xe.setClickable(l),typeof f=="string"&&xe.setCursor(f),h&&xe.setIcon(h),typeof p<"u"&&xe.setLabel(p),typeof g<"u"&&xe.setOpacity(g),y&&xe.setShape(y),typeof v=="string"&&xe.setTitle(v),typeof d=="number"&&xe.setZIndex(d),x&&J(google.maps.event.addListener(xe,"dblclick",x)),O&&ue(google.maps.event.addListener(xe,"dragend",O)),b&&pe(google.maps.event.addListener(xe,"dragstart",b)),V&&ge(google.maps.event.addListener(xe,"mousedown",V)),w&&se(google.maps.event.addListener(xe,"mouseout",w)),A&&we(google.maps.event.addListener(xe,"mouseover",A)),M&&Ye(google.maps.event.addListener(xe,"mouseup",M)),P&&st(google.maps.event.addListener(xe,"rightclick",P)),D&&Lt(google.maps.event.addListener(xe,"click",D)),E&&ln(google.maps.event.addListener(xe,"drag",E)),_&&Ie(google.maps.event.addListener(xe,"clickable_changed",_)),R&&Rt(google.maps.event.addListener(xe,"cursor_changed",R)),N&&yr(google.maps.event.addListener(xe,"animation_changed",N)),T&&Cr(google.maps.event.addListener(xe,"draggable_changed",T)),j&&Dr(google.maps.event.addListener(xe,"flat_changed",j)),X&&Pi(google.maps.event.addListener(xe,"icon_changed",X)),z&&S(google.maps.event.addListener(xe,"position_changed",z)),$&&De(google.maps.event.addListener(xe,"shape_changed",$)),re&&Te(google.maps.event.addListener(xe,"title_changed",re)),k&&Je(google.maps.event.addListener(xe,"visible_changed",k)),I&&qt(google.maps.event.addListener(xe,"zindex_changed",I)),U(xe),G&&G(xe),function(){F!==null&&google.maps.event.removeListener(F),Y!==null&&google.maps.event.removeListener(Y),de!==null&&google.maps.event.removeListener(de),ye!==null&&google.maps.event.removeListener(ye),Ne!==null&&google.maps.event.removeListener(Ne),fe!==null&&google.maps.event.removeListener(fe),Ve!==null&&google.maps.event.removeListener(Ve),ct!==null&&google.maps.event.removeListener(ct),yt!==null&&google.maps.event.removeListener(yt),Re!==null&&google.maps.event.removeListener(Re),ut!==null&&google.maps.event.removeListener(ut),Nn!==null&&google.maps.event.removeListener(Nn),An!==null&&google.maps.event.removeListener(An),_n!==null&&google.maps.event.removeListener(_n),zn!==null&&google.maps.event.removeListener(zn),Wn!==null&&google.maps.event.removeListener(Wn),We!==null&&google.maps.event.removeListener(We),at!==null&&google.maps.event.removeListener(at),dt!==null&&google.maps.event.removeListener(dt),H&&H(xe),r?r.removeMarker(xe,!!i):xe&&xe.setMap(null)}},[]);var Gt=c.useMemo(function(){return a?c.Children.map(a,function(ot){if(!c.isValidElement(ot))return ot;var xe=ot;return c.cloneElement(xe,{anchor:C})}):null},[a,C]);return B.jsx(B.Fragment,{children:Gt})||null}c.memo(Id);var jd=function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=me(me(me({},this.props.options||xr),this.props.clusterer?xr:{map:this.context}),{position:this.props.position});this.marker=new google.maps.Marker(n),this.props.clusterer?this.props.clusterer.addMarker(this.marker,!!this.props.noClustererRedraw):this.marker.setMap(this.context),this.registeredEvents=Pe({updaterMap:Yo,eventMap:Go,prevProps:{},nextProps:this.props,instance:this.marker}),this.props.onLoad&&this.props.onLoad(this.marker)},e.prototype.componentDidUpdate=function(n){this.marker&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:Yo,eventMap:Go,prevProps:n,nextProps:this.props,instance:this.marker}))},e.prototype.componentWillUnmount=function(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),Me(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.marker,!!this.props.noClustererRedraw):this.marker&&this.marker.setMap(null))},e.prototype.render=function(){var n=this,r=null;return this.props.children&&(r=c.Children.map(this.props.children,function(i){if(!c.isValidElement(i))return i;var a=i;return c.cloneElement(a,{anchor:n.marker})})),r||null},e.contextType=Se,e}(c.PureComponent),Nd=function(){function t(e,n){e.getClusterer().extend(t,google.maps.OverlayView),this.cluster=e,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=n,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.cMouseDownInCluster=null,this.cDraggingMapByCluster=null,this.timeOut=null,this.setMap(e.getMap()),this.onBoundsChanged=this.onBoundsChanged.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onClick=this.onClick.bind(this),this.onMouseOver=this.onMouseOver.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.onAdd=this.onAdd.bind(this),this.onRemove=this.onRemove.bind(this),this.draw=this.draw.bind(this),this.hide=this.hide.bind(this),this.show=this.show.bind(this),this.useStyle=this.useStyle.bind(this),this.setCenter=this.setCenter.bind(this),this.getPosFromLatLng=this.getPosFromLatLng.bind(this)}return t.prototype.onBoundsChanged=function(){this.cDraggingMapByCluster=this.cMouseDownInCluster},t.prototype.onMouseDown=function(){this.cMouseDownInCluster=!0,this.cDraggingMapByCluster=!1},t.prototype.onClick=function(e){if(this.cMouseDownInCluster=!1,!this.cDraggingMapByCluster){var n=this.cluster.getClusterer();if(google.maps.event.trigger(n,"click",this.cluster),google.maps.event.trigger(n,"clusterclick",this.cluster),n.getZoomOnClick()){var r=n.getMaxZoom(),i=this.cluster.getBounds(),a=n.getMap();a!==null&&"fitBounds"in a&&a.fitBounds(i),this.timeOut=window.setTimeout(function(){var o=n.getMap();if(o!==null){"fitBounds"in o&&o.fitBounds(i);var s=o.getZoom()||0;r!==null&&s>r&&o.setZoom(r+1)}},100)}e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}},t.prototype.onMouseOver=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseover",this.cluster)},t.prototype.onMouseOut=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseout",this.cluster)},t.prototype.onAdd=function(){var e;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),(e=this.getPanes())===null||e===void 0||e.overlayMouseTarget.appendChild(this.div);var n=this.getMap();n!==null&&(this.boundsChangedListener=google.maps.event.addListener(n,"bounds_changed",this.onBoundsChanged),this.div.addEventListener("mousedown",this.onMouseDown),this.div.addEventListener("click",this.onClick),this.div.addEventListener("mouseover",this.onMouseOver),this.div.addEventListener("mouseout",this.onMouseOut))},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),this.boundsChangedListener!==null&&google.maps.event.removeListener(this.boundsChangedListener),this.div.removeEventListener("mousedown",this.onMouseDown),this.div.removeEventListener("click",this.onClick),this.div.removeEventListener("mouseover",this.onMouseOver),this.div.removeEventListener("mouseout",this.onMouseOut),this.div.parentNode.removeChild(this.div),this.timeOut!==null&&(window.clearTimeout(this.timeOut),this.timeOut=null),this.div=null)},t.prototype.draw=function(){if(this.visible&&this.div!==null&&this.center){var e=this.getPosFromLatLng(this.center);this.div.style.top=e!==null?"".concat(e.y,"px"):"0",this.div.style.left=e!==null?"".concat(e.x,"px"):"0"}},t.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},t.prototype.show=function(){var e,n,r,i,a,o;if(this.div&&this.center){var s=this.sums===null||typeof this.sums.title>"u"||this.sums.title===""?this.cluster.getClusterer().getTitle():this.sums.title,u=this.backgroundPosition.split(" "),l=parseInt(((e=u[0])===null||e===void 0?void 0:e.replace(/^\s+|\s+$/g,""))||"0",10),f=parseInt(((n=u[1])===null||n===void 0?void 0:n.replace(/^\s+|\s+$/g,""))||"0",10),h=this.getPosFromLatLng(this.center);this.div.className=this.className,this.div.setAttribute("style","cursor: pointer; position: absolute; top: ".concat(h!==null?"".concat(h.y,"px"):"0","; left: ").concat(h!==null?"".concat(h.x,"px"):"0","; width: ").concat(this.width,"px; height: ").concat(this.height,"px; "));var p=document.createElement("img");p.alt=s,p.src=this.url,p.width=this.width,p.height=this.height,p.setAttribute("style","position: absolute; top: ".concat(f,"px; left: ").concat(l,"px")),this.cluster.getClusterer().enableRetinaIcons||(p.style.clip="rect(-".concat(f,"px, -").concat(l+this.width,"px, -").concat(f+this.height,", -").concat(l,")"));var g=document.createElement("div");g.setAttribute("style","position: absolute; top: ".concat(this.anchorText[0],"px; left: ").concat(this.anchorText[1],"px; color: ").concat(this.textColor,"; font-size: ").concat(this.textSize,"px; font-family: ").concat(this.fontFamily,"; font-weight: ").concat(this.fontWeight,"; fontStyle: ").concat(this.fontStyle,"; text-decoration: ").concat(this.textDecoration,"; text-align: center; width: ").concat(this.width,"px; line-height: ").concat(this.height,"px")),!((r=this.sums)===null||r===void 0)&&r.text&&(g.innerText="".concat((i=this.sums)===null||i===void 0?void 0:i.text)),!((a=this.sums)===null||a===void 0)&&a.html&&(g.innerHTML="".concat((o=this.sums)===null||o===void 0?void 0:o.html)),this.div.innerHTML="",this.div.appendChild(p),this.div.appendChild(g),this.div.title=s,this.div.style.display=""}this.visible=!0},t.prototype.useStyle=function(e){this.sums=e;var n=this.cluster.getClusterer().getStyles(),r=n[Math.min(n.length-1,Math.max(0,e.index-1))];r&&(this.url=r.url,this.height=r.height,this.width=r.width,r.className&&(this.className="".concat(this.clusterClassName," ").concat(r.className)),this.anchorText=r.anchorText||[0,0],this.anchorIcon=r.anchorIcon||[this.height/2,this.width/2],this.textColor=r.textColor||"black",this.textSize=r.textSize||11,this.textDecoration=r.textDecoration||"none",this.fontWeight=r.fontWeight||"bold",this.fontStyle=r.fontStyle||"normal",this.fontFamily=r.fontFamily||"Arial,sans-serif",this.backgroundPosition=r.backgroundPosition||"0 0")},t.prototype.setCenter=function(e){this.center=e},t.prototype.getPosFromLatLng=function(e){var n=this.getProjection().fromLatLngToDivPixel(e);return n!==null&&(n.x-=this.anchorIcon[1],n.y-=this.anchorIcon[0]),n},t}(),_d=function(){function t(e){this.markerClusterer=e,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new Nd(this,this.markerClusterer.getStyles()),this.getSize=this.getSize.bind(this),this.getMarkers=this.getMarkers.bind(this),this.getCenter=this.getCenter.bind(this),this.getMap=this.getMap.bind(this),this.getClusterer=this.getClusterer.bind(this),this.getBounds=this.getBounds.bind(this),this.remove=this.remove.bind(this),this.addMarker=this.addMarker.bind(this),this.isMarkerInClusterBounds=this.isMarkerInClusterBounds.bind(this),this.calculateBounds=this.calculateBounds.bind(this),this.updateIcon=this.updateIcon.bind(this),this.isMarkerAlreadyAdded=this.isMarkerAlreadyAdded.bind(this)}return t.prototype.getSize=function(){return this.markers.length},t.prototype.getMarkers=function(){return this.markers},t.prototype.getCenter=function(){return this.center},t.prototype.getMap=function(){return this.map},t.prototype.getClusterer=function(){return this.markerClusterer},t.prototype.getBounds=function(){for(var e=new google.maps.LatLngBounds(this.center,this.center),n=this.getMarkers(),r=0,i=n;r<i.length;r++){var a=i[r],o=a.getPosition();o&&e.extend(o)}return e},t.prototype.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},t.prototype.addMarker=function(e){var n;if(this.isMarkerAlreadyAdded(e))return!1;if(this.center){if(this.averageCenter){var r=e.getPosition();if(r){var i=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(i-1)+r.lat())/i,(this.center.lng()*(i-1)+r.lng())/i),this.calculateBounds()}}}else{var r=e.getPosition();r&&(this.center=r,this.calculateBounds())}e.isAdded=!0,this.markers.push(e);var a=this.markers.length,o=this.markerClusterer.getMaxZoom(),s=(n=this.map)===null||n===void 0?void 0:n.getZoom();if(o!==null&&typeof s<"u"&&s>o)e.getMap()!==this.map&&e.setMap(this.map);else if(a<this.minClusterSize)e.getMap()!==this.map&&e.setMap(this.map);else if(a===this.minClusterSize)for(var u=0,l=this.markers;u<l.length;u++){var f=l[u];f.setMap(null)}else e.setMap(null);return!0},t.prototype.isMarkerInClusterBounds=function(e){if(this.bounds!==null){var n=e.getPosition();if(n)return this.bounds.contains(n)}return!1},t.prototype.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},t.prototype.updateIcon=function(){var e,n=this.markers.length,r=this.markerClusterer.getMaxZoom(),i=(e=this.map)===null||e===void 0?void 0:e.getZoom();if(r!==null&&typeof i<"u"&&i>r){this.clusterIcon.hide();return}if(n<this.minClusterSize){this.clusterIcon.hide();return}this.center&&this.clusterIcon.setCenter(this.center),this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers,this.markerClusterer.getStyles().length)),this.clusterIcon.show()},t.prototype.isMarkerAlreadyAdded=function(e){if(this.markers.includes)return this.markers.includes(e);for(var n=0;n<this.markers.length;n++)if(e===this.markers[n])return!0;return!1},t}();function zd(t,e){var n=t.length,r=n.toString().length,i=Math.min(r,e);return{text:n.toString(),index:i,title:""}}var Wd=2e3,Ud=500,Hd="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",Vd="png",qd=[53,56,66,78,90],Gd="cluster",Zo=function(){function t(e,n,r){n===void 0&&(n=[]),r===void 0&&(r={}),this.getMinimumClusterSize=this.getMinimumClusterSize.bind(this),this.setMinimumClusterSize=this.setMinimumClusterSize.bind(this),this.getEnableRetinaIcons=this.getEnableRetinaIcons.bind(this),this.setEnableRetinaIcons=this.setEnableRetinaIcons.bind(this),this.addToClosestCluster=this.addToClosestCluster.bind(this),this.getImageExtension=this.getImageExtension.bind(this),this.setImageExtension=this.setImageExtension.bind(this),this.getExtendedBounds=this.getExtendedBounds.bind(this),this.getAverageCenter=this.getAverageCenter.bind(this),this.setAverageCenter=this.setAverageCenter.bind(this),this.getTotalClusters=this.getTotalClusters.bind(this),this.fitMapToMarkers=this.fitMapToMarkers.bind(this),this.getIgnoreHidden=this.getIgnoreHidden.bind(this),this.setIgnoreHidden=this.setIgnoreHidden.bind(this),this.getClusterClass=this.getClusterClass.bind(this),this.setClusterClass=this.setClusterClass.bind(this),this.getTotalMarkers=this.getTotalMarkers.bind(this),this.getZoomOnClick=this.getZoomOnClick.bind(this),this.setZoomOnClick=this.setZoomOnClick.bind(this),this.getBatchSizeIE=this.getBatchSizeIE.bind(this),this.setBatchSizeIE=this.setBatchSizeIE.bind(this),this.createClusters=this.createClusters.bind(this),this.onZoomChanged=this.onZoomChanged.bind(this),this.getImageSizes=this.getImageSizes.bind(this),this.setImageSizes=this.setImageSizes.bind(this),this.getCalculator=this.getCalculator.bind(this),this.setCalculator=this.setCalculator.bind(this),this.removeMarkers=this.removeMarkers.bind(this),this.resetViewport=this.resetViewport.bind(this),this.getImagePath=this.getImagePath.bind(this),this.setImagePath=this.setImagePath.bind(this),this.pushMarkerTo=this.pushMarkerTo.bind(this),this.removeMarker=this.removeMarker.bind(this),this.clearMarkers=this.clearMarkers.bind(this),this.setupStyles=this.setupStyles.bind(this),this.getGridSize=this.getGridSize.bind(this),this.setGridSize=this.setGridSize.bind(this),this.getClusters=this.getClusters.bind(this),this.getMaxZoom=this.getMaxZoom.bind(this),this.setMaxZoom=this.setMaxZoom.bind(this),this.getMarkers=this.getMarkers.bind(this),this.addMarkers=this.addMarkers.bind(this),this.getStyles=this.getStyles.bind(this),this.setStyles=this.setStyles.bind(this),this.addMarker=this.addMarker.bind(this),this.onRemove=this.onRemove.bind(this),this.getTitle=this.getTitle.bind(this),this.setTitle=this.setTitle.bind(this),this.repaint=this.repaint.bind(this),this.onIdle=this.onIdle.bind(this),this.redraw=this.redraw.bind(this),this.onAdd=this.onAdd.bind(this),this.draw=this.draw.bind(this),this.extend=this.extend.bind(this),this.extend(t,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=r.gridSize||60,this.minClusterSize=r.minimumClusterSize||2,this.maxZoom=r.maxZoom||null,this.styles=r.styles||[],this.title=r.title||"",this.zoomOnClick=!0,r.zoomOnClick!==void 0&&(this.zoomOnClick=r.zoomOnClick),this.averageCenter=!1,r.averageCenter!==void 0&&(this.averageCenter=r.averageCenter),this.ignoreHidden=!1,r.ignoreHidden!==void 0&&(this.ignoreHidden=r.ignoreHidden),this.enableRetinaIcons=!1,r.enableRetinaIcons!==void 0&&(this.enableRetinaIcons=r.enableRetinaIcons),this.imagePath=r.imagePath||Hd,this.imageExtension=r.imageExtension||Vd,this.imageSizes=r.imageSizes||qd,this.calculator=r.calculator||zd,this.batchSize=r.batchSize||Wd,this.batchSizeIE=r.batchSizeIE||Ud,this.clusterClass=r.clusterClass||Gd,navigator.userAgent.toLowerCase().indexOf("msie")!==-1&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(n,!0),this.setMap(e)}return t.prototype.onZoomChanged=function(){var e,n;this.resetViewport(!1),(((e=this.getMap())===null||e===void 0?void 0:e.getZoom())===(this.get("minZoom")||0)||((n=this.getMap())===null||n===void 0?void 0:n.getZoom())===this.get("maxZoom"))&&google.maps.event.trigger(this,"idle")},t.prototype.onIdle=function(){this.redraw()},t.prototype.onAdd=function(){var e=this.getMap();this.activeMap=e,this.ready=!0,this.repaint(),e!==null&&(this.listeners=[google.maps.event.addListener(e,"zoom_changed",this.onZoomChanged),google.maps.event.addListener(e,"idle",this.onIdle)])},t.prototype.onRemove=function(){for(var e=0,n=this.markers;e<n.length;e++){var r=n[e];r.getMap()!==this.activeMap&&r.setMap(this.activeMap)}for(var i=0,a=this.clusters;i<a.length;i++){var o=a[i];o.remove()}this.clusters=[];for(var s=0,u=this.listeners;s<u.length;s++){var l=u[s];google.maps.event.removeListener(l)}this.listeners=[],this.activeMap=null,this.ready=!1},t.prototype.draw=function(){},t.prototype.getMap=function(){return null},t.prototype.getPanes=function(){return null},t.prototype.getProjection=function(){return{fromContainerPixelToLatLng:function(){return null},fromDivPixelToLatLng:function(){return null},fromLatLngToContainerPixel:function(){return null},fromLatLngToDivPixel:function(){return null},getVisibleRegion:function(){return null},getWorldWidth:function(){return 0}}},t.prototype.setMap=function(){},t.prototype.addListener=function(){return{remove:function(){}}},t.prototype.bindTo=function(){},t.prototype.get=function(){},t.prototype.notify=function(){},t.prototype.set=function(){},t.prototype.setValues=function(){},t.prototype.unbind=function(){},t.prototype.unbindAll=function(){},t.prototype.setupStyles=function(){if(!(this.styles.length>0))for(var e=0;e<this.imageSizes.length;e++)this.styles.push({url:"".concat(this.imagePath+(e+1),".").concat(this.imageExtension),height:this.imageSizes[e]||0,width:this.imageSizes[e]||0})},t.prototype.fitMapToMarkers=function(){for(var e=this.getMarkers(),n=new google.maps.LatLngBounds,r=0,i=e;r<i.length;r++){var a=i[r],o=a.getPosition();o&&n.extend(o)}var s=this.getMap();s!==null&&"fitBounds"in s&&s.fitBounds(n)},t.prototype.getGridSize=function(){return this.gridSize},t.prototype.setGridSize=function(e){this.gridSize=e},t.prototype.getMinimumClusterSize=function(){return this.minClusterSize},t.prototype.setMinimumClusterSize=function(e){this.minClusterSize=e},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.setMaxZoom=function(e){this.maxZoom=e},t.prototype.getStyles=function(){return this.styles},t.prototype.setStyles=function(e){this.styles=e},t.prototype.getTitle=function(){return this.title},t.prototype.setTitle=function(e){this.title=e},t.prototype.getZoomOnClick=function(){return this.zoomOnClick},t.prototype.setZoomOnClick=function(e){this.zoomOnClick=e},t.prototype.getAverageCenter=function(){return this.averageCenter},t.prototype.setAverageCenter=function(e){this.averageCenter=e},t.prototype.getIgnoreHidden=function(){return this.ignoreHidden},t.prototype.setIgnoreHidden=function(e){this.ignoreHidden=e},t.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons},t.prototype.setEnableRetinaIcons=function(e){this.enableRetinaIcons=e},t.prototype.getImageExtension=function(){return this.imageExtension},t.prototype.setImageExtension=function(e){this.imageExtension=e},t.prototype.getImagePath=function(){return this.imagePath},t.prototype.setImagePath=function(e){this.imagePath=e},t.prototype.getImageSizes=function(){return this.imageSizes},t.prototype.setImageSizes=function(e){this.imageSizes=e},t.prototype.getCalculator=function(){return this.calculator},t.prototype.setCalculator=function(e){this.calculator=e},t.prototype.getBatchSizeIE=function(){return this.batchSizeIE},t.prototype.setBatchSizeIE=function(e){this.batchSizeIE=e},t.prototype.getClusterClass=function(){return this.clusterClass},t.prototype.setClusterClass=function(e){this.clusterClass=e},t.prototype.getMarkers=function(){return this.markers},t.prototype.getTotalMarkers=function(){return this.markers.length},t.prototype.getClusters=function(){return this.clusters},t.prototype.getTotalClusters=function(){return this.clusters.length},t.prototype.addMarker=function(e,n){this.pushMarkerTo(e),n||this.redraw()},t.prototype.addMarkers=function(e,n){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=e[r];i&&this.pushMarkerTo(i)}n||this.redraw()},t.prototype.pushMarkerTo=function(e){var n=this;e.getDraggable()&&google.maps.event.addListener(e,"dragend",function(){n.ready&&(e.isAdded=!1,n.repaint())}),e.isAdded=!1,this.markers.push(e)},t.prototype.removeMarker_=function(e){var n=-1;if(this.markers.indexOf)n=this.markers.indexOf(e);else for(var r=0;r<this.markers.length;r++)if(e===this.markers[r]){n=r;break}return n===-1?!1:(e.setMap(null),this.markers.splice(n,1),!0)},t.prototype.removeMarker=function(e,n){var r=this.removeMarker_(e);return!n&&r&&this.repaint(),r},t.prototype.removeMarkers=function(e,n){for(var r=!1,i=0,a=e;i<a.length;i++){var o=a[i];r=r||this.removeMarker_(o)}return!n&&r&&this.repaint(),r},t.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},t.prototype.repaint=function(){var e=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout(function(){for(var r=0,i=e;r<i.length;r++){var a=i[r];a.remove()}},0)},t.prototype.getExtendedBounds=function(e){var n=this.getProjection(),r=n.fromLatLngToDivPixel(new google.maps.LatLng(e.getNorthEast().lat(),e.getNorthEast().lng()));r!==null&&(r.x+=this.gridSize,r.y-=this.gridSize);var i=n.fromLatLngToDivPixel(new google.maps.LatLng(e.getSouthWest().lat(),e.getSouthWest().lng()));if(i!==null&&(i.x-=this.gridSize,i.y+=this.gridSize),r!==null){var a=n.fromDivPixelToLatLng(r);a!==null&&e.extend(a)}if(i!==null){var o=n.fromDivPixelToLatLng(i);o!==null&&e.extend(o)}return e},t.prototype.redraw=function(){this.createClusters(0)},t.prototype.resetViewport=function(e){for(var n=0,r=this.clusters;n<r.length;n++){var i=r[n];i.remove()}this.clusters=[];for(var a=0,o=this.markers;a<o.length;a++){var s=o[a];s.isAdded=!1,e&&s.setMap(null)}},t.prototype.distanceBetweenPoints=function(e,n){var r=6371,i=(n.lat()-e.lat())*Math.PI/180,a=(n.lng()-e.lng())*Math.PI/180,o=Math.sin(i/2)*Math.sin(i/2)+Math.cos(e.lat()*Math.PI/180)*Math.cos(n.lat()*Math.PI/180)*Math.sin(a/2)*Math.sin(a/2);return r*(2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o)))},t.prototype.isMarkerInBounds=function(e,n){var r=e.getPosition();return r?n.contains(r):!1},t.prototype.addToClosestCluster=function(e){for(var n,r=4e4,i=null,a=0,o=this.clusters;a<o.length;a++){var s=o[a];n=s;var u=n.getCenter(),l=e.getPosition();if(u&&l){var f=this.distanceBetweenPoints(u,l);f<r&&(r=f,i=n)}}i&&i.isMarkerInClusterBounds(e)?i.addMarker(e):(n=new _d(this),n.addMarker(e),this.clusters.push(n))},t.prototype.createClusters=function(e){var n=this;if(this.ready){e===0&&(google.maps.event.trigger(this,"clusteringbegin",this),this.timerRefStatic!==null&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var r=this.getMap(),i=r!==null&&("getBounds"in r)?r.getBounds():null,a=(r==null?void 0:r.getZoom())||0,o=a>3?new google.maps.LatLngBounds(i==null?void 0:i.getSouthWest(),i==null?void 0:i.getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),s=this.getExtendedBounds(o),u=Math.min(e+this.batchSize,this.markers.length),l=e;l<u;l++){var f=this.markers[l];f&&!f.isAdded&&this.isMarkerInBounds(f,s)&&(!this.ignoreHidden||this.ignoreHidden&&f.getVisible())&&this.addToClosestCluster(f)}if(u<this.markers.length)this.timerRefStatic=window.setTimeout(function(){n.createClusters(u)},0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(var h=0,p=this.clusters;h<p.length;h++){var g=p[h];g.updateIcon()}}}},t.prototype.extend=function(e,n){return(function(i){for(var a in i.prototype){var o=a;this.prototype[o]=i.prototype[o]}return this}).apply(e,[n])},t}(),Ot={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},ze={averageCenter:function(t,e){t.setAverageCenter(e)},batchSizeIE:function(t,e){t.setBatchSizeIE(e)},calculator:function(t,e){t.setCalculator(e)},clusterClass:function(t,e){t.setClusterClass(e)},enableRetinaIcons:function(t,e){t.setEnableRetinaIcons(e)},gridSize:function(t,e){t.setGridSize(e)},ignoreHidden:function(t,e){t.setIgnoreHidden(e)},imageExtension:function(t,e){t.setImageExtension(e)},imagePath:function(t,e){t.setImagePath(e)},imageSizes:function(t,e){t.setImageSizes(e)},maxZoom:function(t,e){t.setMaxZoom(e)},minimumClusterSize:function(t,e){t.setMinimumClusterSize(e)},styles:function(t,e){t.setStyles(e)},title:function(t,e){t.setTitle(e)},zoomOnClick:function(t,e){t.setZoomOnClick(e)}},Yd={};function Zd(t){var e=t.children,n=t.options,r=t.averageCenter,i=t.batchSizeIE,a=t.calculator,o=t.clusterClass,s=t.enableRetinaIcons,u=t.gridSize,l=t.ignoreHidden,f=t.imageExtension,h=t.imagePath,p=t.imageSizes,g=t.maxZoom,y=t.minimumClusterSize,v=t.styles,d=t.title,D=t.zoomOnClick,x=t.onClick,E=t.onClusteringBegin,O=t.onClusteringEnd,b=t.onMouseOver,w=t.onMouseOut,A=t.onLoad,M=t.onUnmount,V=c.useState(null),P=V[0],_=V[1],R=c.useContext(Se),N=c.useState(null),T=N[0],j=N[1],X=c.useState(null),z=X[0],$=X[1],re=c.useState(null),k=re[0],I=re[1],G=c.useState(null),H=G[0],Q=G[1],K=c.useState(null),C=K[0],U=K[1];return c.useEffect(function(){P&&w&&(H!==null&&google.maps.event.removeListener(H),Q(google.maps.event.addListener(P,Ot.onMouseOut,w)))},[w]),c.useEffect(function(){P&&b&&(C!==null&&google.maps.event.removeListener(C),U(google.maps.event.addListener(P,Ot.onMouseOver,b)))},[b]),c.useEffect(function(){P&&x&&(T!==null&&google.maps.event.removeListener(T),j(google.maps.event.addListener(P,Ot.onClick,x)))},[x]),c.useEffect(function(){P&&E&&(z!==null&&google.maps.event.removeListener(z),$(google.maps.event.addListener(P,Ot.onClusteringBegin,E)))},[E]),c.useEffect(function(){P&&O&&(k!==null&&google.maps.event.removeListener(k),$(google.maps.event.addListener(P,Ot.onClusteringEnd,O)))},[O]),c.useEffect(function(){typeof r<"u"&&P!==null&&ze.averageCenter(P,r)},[P,r]),c.useEffect(function(){typeof i<"u"&&P!==null&&ze.batchSizeIE(P,i)},[P,i]),c.useEffect(function(){typeof a<"u"&&P!==null&&ze.calculator(P,a)},[P,a]),c.useEffect(function(){typeof o<"u"&&P!==null&&ze.clusterClass(P,o)},[P,o]),c.useEffect(function(){typeof s<"u"&&P!==null&&ze.enableRetinaIcons(P,s)},[P,s]),c.useEffect(function(){typeof u<"u"&&P!==null&&ze.gridSize(P,u)},[P,u]),c.useEffect(function(){typeof l<"u"&&P!==null&&ze.ignoreHidden(P,l)},[P,l]),c.useEffect(function(){typeof f<"u"&&P!==null&&ze.imageExtension(P,f)},[P,f]),c.useEffect(function(){typeof h<"u"&&P!==null&&ze.imagePath(P,h)},[P,h]),c.useEffect(function(){typeof p<"u"&&P!==null&&ze.imageSizes(P,p)},[P,p]),c.useEffect(function(){typeof g<"u"&&P!==null&&ze.maxZoom(P,g)},[P,g]),c.useEffect(function(){typeof y<"u"&&P!==null&&ze.minimumClusterSize(P,y)},[P,y]),c.useEffect(function(){typeof v<"u"&&P!==null&&ze.styles(P,v)},[P,v]),c.useEffect(function(){typeof d<"u"&&P!==null&&ze.title(P,d)},[P,d]),c.useEffect(function(){typeof D<"u"&&P!==null&&ze.zoomOnClick(P,D)},[P,D]),c.useEffect(function(){if(R){var W=me({},n||Yd),F=new Zo(R,[],W);return r&&ze.averageCenter(F,r),i&&ze.batchSizeIE(F,i),a&&ze.calculator(F,a),o&&ze.clusterClass(F,o),s&&ze.enableRetinaIcons(F,s),u&&ze.gridSize(F,u),l&&ze.ignoreHidden(F,l),f&&ze.imageExtension(F,f),h&&ze.imagePath(F,h),p&&ze.imageSizes(F,p),g&&ze.maxZoom(F,g),y&&ze.minimumClusterSize(F,y),v&&ze.styles(F,v),d&&ze.title(F,d),D&&ze.zoomOnClick(F,D),w&&Q(google.maps.event.addListener(F,Ot.onMouseOut,w)),b&&U(google.maps.event.addListener(F,Ot.onMouseOver,b)),x&&j(google.maps.event.addListener(F,Ot.onClick,x)),E&&$(google.maps.event.addListener(F,Ot.onClusteringBegin,E)),O&&I(google.maps.event.addListener(F,Ot.onClusteringEnd,O)),_(F),A&&A(F),function(){H!==null&&google.maps.event.removeListener(H),C!==null&&google.maps.event.removeListener(C),T!==null&&google.maps.event.removeListener(T),z!==null&&google.maps.event.removeListener(z),k!==null&&google.maps.event.removeListener(k),M&&M(F)}}},[]),P!==null&&e(P)||null}c.memo(Zd),function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={markerClusterer:null},n.setClustererCallback=function(){n.state.markerClusterer!==null&&n.props.onLoad&&n.props.onLoad(n.state.markerClusterer)},n}return e.prototype.componentDidMount=function(){if(this.context){var n=new Zo(this.context,[],this.props.options);this.registeredEvents=Pe({updaterMap:ze,eventMap:Ot,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{markerClusterer:n}},this.setClustererCallback)}},e.prototype.componentDidUpdate=function(n){this.state.markerClusterer&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:ze,eventMap:Ot,prevProps:n,nextProps:this.props,instance:this.state.markerClusterer}))},e.prototype.componentWillUnmount=function(){this.state.markerClusterer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),Me(this.registeredEvents),this.state.markerClusterer.setMap(null))},e.prototype.render=function(){return this.state.markerClusterer!==null?this.props.children(this.state.markerClusterer):null},e.contextType=Se,e}(c.PureComponent);function Ko(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}var Xo=function(){function t(e){e===void 0&&(e={}),this.getCloseClickHandler=this.getCloseClickHandler.bind(this),this.closeClickHandler=this.closeClickHandler.bind(this),this.createInfoBoxDiv=this.createInfoBoxDiv.bind(this),this.addClickHandler=this.addClickHandler.bind(this),this.getCloseBoxImg=this.getCloseBoxImg.bind(this),this.getBoxWidths=this.getBoxWidths.bind(this),this.setBoxStyle=this.setBoxStyle.bind(this),this.setPosition=this.setPosition.bind(this),this.getPosition=this.getPosition.bind(this),this.setOptions=this.setOptions.bind(this),this.setContent=this.setContent.bind(this),this.setVisible=this.setVisible.bind(this),this.getContent=this.getContent.bind(this),this.getVisible=this.getVisible.bind(this),this.setZIndex=this.setZIndex.bind(this),this.getZIndex=this.getZIndex.bind(this),this.onRemove=this.onRemove.bind(this),this.panBox=this.panBox.bind(this),this.extend=this.extend.bind(this),this.close=this.close.bind(this),this.draw=this.draw.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.open=this.open.bind(this),this.extend(t,google.maps.OverlayView),this.content=e.content||"",this.disableAutoPan=e.disableAutoPan||!1,this.maxWidth=e.maxWidth||0,this.pixelOffset=e.pixelOffset||new google.maps.Size(0,0),this.position=e.position||new google.maps.LatLng(0,0),this.zIndex=e.zIndex||null,this.boxClass=e.boxClass||"infoBox",this.boxStyle=e.boxStyle||{},this.closeBoxMargin=e.closeBoxMargin||"2px",this.closeBoxURL=e.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",e.closeBoxURL===""&&(this.closeBoxURL=""),this.infoBoxClearance=e.infoBoxClearance||new google.maps.Size(1,1),typeof e.visible>"u"&&(typeof e.isHidden>"u"?e.visible=!0:e.visible=!e.isHidden),this.isHidden=!e.visible,this.alignBottom=e.alignBottom||!1,this.pane=e.pane||"floatPane",this.enableEventPropagation=e.enableEventPropagation||!1,this.div=null,this.closeListener=null,this.moveListener=null,this.mapListener=null,this.contextListener=null,this.eventListeners=null,this.fixedWidthSet=null}return t.prototype.createInfoBoxDiv=function(){var e=this,n=function(l){l.returnValue=!1,l.preventDefault&&l.preventDefault(),e.enableEventPropagation||Ko(l)};if(!this.div){this.div=document.createElement("div"),this.setBoxStyle(),typeof this.content=="string"?this.div.innerHTML=this.getCloseBoxImg()+this.content:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(this.content));var r=this.getPanes();if(r!==null&&r[this.pane].appendChild(this.div),this.addClickHandler(),this.div.style.width)this.fixedWidthSet=!0;else if(this.maxWidth!==0&&this.div.offsetWidth>this.maxWidth)this.div.style.width=this.maxWidth+"px",this.fixedWidthSet=!0;else{var i=this.getBoxWidths();this.div.style.width=this.div.offsetWidth-i.left-i.right+"px",this.fixedWidthSet=!1}if(this.panBox(this.disableAutoPan),!this.enableEventPropagation){this.eventListeners=[];for(var a=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],o=0,s=a;o<s.length;o++){var u=s[o];this.eventListeners.push(google.maps.event.addListener(this.div,u,Ko))}this.eventListeners.push(google.maps.event.addListener(this.div,"mouseover",function(){e.div&&(e.div.style.cursor="default")}))}this.contextListener=google.maps.event.addListener(this.div,"contextmenu",n),google.maps.event.trigger(this,"domready")}},t.prototype.getCloseBoxImg=function(){var e="";return this.closeBoxURL!==""&&(e='<img alt=""',e+=' aria-hidden="true"',e+=" src='"+this.closeBoxURL+"'",e+=" align=right",e+=" style='",e+=" position: relative;",e+=" cursor: pointer;",e+=" margin: "+this.closeBoxMargin+";",e+="'>"),e},t.prototype.addClickHandler=function(){this.closeListener=this.div&&this.div.firstChild&&this.closeBoxURL!==""?google.maps.event.addListener(this.div.firstChild,"click",this.getCloseClickHandler()):null},t.prototype.closeClickHandler=function(e){e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation(),google.maps.event.trigger(this,"closeclick"),this.close()},t.prototype.getCloseClickHandler=function(){return this.closeClickHandler},t.prototype.panBox=function(e){if(this.div&&!e){var n=this.getMap();if(n instanceof google.maps.Map){var r=0,i=0,a=n.getBounds();a&&!a.contains(this.position)&&n.setCenter(this.position);var o=n.getDiv(),s=o.offsetWidth,u=o.offsetHeight,l=this.pixelOffset.width,f=this.pixelOffset.height,h=this.div.offsetWidth,p=this.div.offsetHeight,g=this.infoBoxClearance.width,y=this.infoBoxClearance.height,v=this.getProjection(),d=v.fromLatLngToContainerPixel(this.position);d!==null&&(d.x<-l+g?r=d.x+l-g:d.x+h+l+g>s&&(r=d.x+h+l+g-s),this.alignBottom?d.y<-f+y+p?i=d.y+f-y-p:d.y+f+y>u&&(i=d.y+f+y-u):d.y<-f+y?i=d.y+f-y:d.y+p+f+y>u&&(i=d.y+p+f+y-u)),r===0&&i===0||n.panBy(r,i)}}},t.prototype.setBoxStyle=function(){if(this.div){this.div.className=this.boxClass,this.div.style.cssText="";var e=this.boxStyle;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(this.div.style[n]=e[n]);if(this.div.style.webkitTransform="translateZ(0)",typeof this.div.style.opacity<"u"&&this.div.style.opacity!==""){var r=parseFloat(this.div.style.opacity||"");this.div.style.msFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+r*100+')"',this.div.style.filter="alpha(opacity="+r*100+")"}this.div.style.position="absolute",this.div.style.visibility="hidden",this.zIndex!==null&&(this.div.style.zIndex=this.zIndex+""),this.div.style.overflow||(this.div.style.overflow="auto")}},t.prototype.getBoxWidths=function(){var e={top:0,bottom:0,left:0,right:0};if(!this.div)return e;if(document.defaultView){var n=this.div.ownerDocument,r=n&&n.defaultView?n.defaultView.getComputedStyle(this.div,""):null;r&&(e.top=parseInt(r.borderTopWidth||"",10)||0,e.bottom=parseInt(r.borderBottomWidth||"",10)||0,e.left=parseInt(r.borderLeftWidth||"",10)||0,e.right=parseInt(r.borderRightWidth||"",10)||0)}else if(document.documentElement.currentStyle){var i=this.div.currentStyle;i&&(e.top=parseInt(i.borderTopWidth||"",10)||0,e.bottom=parseInt(i.borderBottomWidth||"",10)||0,e.left=parseInt(i.borderLeftWidth||"",10)||0,e.right=parseInt(i.borderRightWidth||"",10)||0)}return e},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.div.parentNode.removeChild(this.div),this.div=null)},t.prototype.draw=function(){if(this.createInfoBoxDiv(),this.div){var e=this.getProjection(),n=e.fromLatLngToDivPixel(this.position);n!==null&&(this.div.style.left=n.x+this.pixelOffset.width+"px",this.alignBottom?this.div.style.bottom=-(n.y+this.pixelOffset.height)+"px":this.div.style.top=n.y+this.pixelOffset.height+"px"),this.isHidden?this.div.style.visibility="hidden":this.div.style.visibility="visible"}},t.prototype.setOptions=function(e){e===void 0&&(e={}),typeof e.boxClass<"u"&&(this.boxClass=e.boxClass,this.setBoxStyle()),typeof e.boxStyle<"u"&&(this.boxStyle=e.boxStyle,this.setBoxStyle()),typeof e.content<"u"&&this.setContent(e.content),typeof e.disableAutoPan<"u"&&(this.disableAutoPan=e.disableAutoPan),typeof e.maxWidth<"u"&&(this.maxWidth=e.maxWidth),typeof e.pixelOffset<"u"&&(this.pixelOffset=e.pixelOffset),typeof e.alignBottom<"u"&&(this.alignBottom=e.alignBottom),typeof e.position<"u"&&this.setPosition(e.position),typeof e.zIndex<"u"&&this.setZIndex(e.zIndex),typeof e.closeBoxMargin<"u"&&(this.closeBoxMargin=e.closeBoxMargin),typeof e.closeBoxURL<"u"&&(this.closeBoxURL=e.closeBoxURL),typeof e.infoBoxClearance<"u"&&(this.infoBoxClearance=e.infoBoxClearance),typeof e.isHidden<"u"&&(this.isHidden=e.isHidden),typeof e.visible<"u"&&(this.isHidden=!e.visible),typeof e.enableEventPropagation<"u"&&(this.enableEventPropagation=e.enableEventPropagation),this.div&&this.draw()},t.prototype.setContent=function(e){this.content=e,this.div&&(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.fixedWidthSet||(this.div.style.width=""),typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e)),this.fixedWidthSet||(this.div.style.width=this.div.offsetWidth+"px",typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e))),this.addClickHandler()),google.maps.event.trigger(this,"content_changed")},t.prototype.setPosition=function(e){this.position=e,this.div&&this.draw(),google.maps.event.trigger(this,"position_changed")},t.prototype.setVisible=function(e){this.isHidden=!e,this.div&&(this.div.style.visibility=this.isHidden?"hidden":"visible")},t.prototype.setZIndex=function(e){this.zIndex=e,this.div&&(this.div.style.zIndex=e+""),google.maps.event.trigger(this,"zindex_changed")},t.prototype.getContent=function(){return this.content},t.prototype.getPosition=function(){return this.position},t.prototype.getZIndex=function(){return this.zIndex},t.prototype.getVisible=function(){var e=this.getMap();return typeof e>"u"||e===null?!1:!this.isHidden},t.prototype.show=function(){this.isHidden=!1,this.div&&(this.div.style.visibility="visible")},t.prototype.hide=function(){this.isHidden=!0,this.div&&(this.div.style.visibility="hidden")},t.prototype.open=function(e,n){var r=this;n&&(this.position=n.getPosition(),this.moveListener=google.maps.event.addListener(n,"position_changed",function(){var i=n.getPosition();r.setPosition(i)}),this.mapListener=google.maps.event.addListener(n,"map_changed",function(){r.setMap(n.map)})),this.setMap(e),this.div&&this.panBox()},t.prototype.close=function(){if(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.eventListeners){for(var e=0,n=this.eventListeners;e<n.length;e++){var r=n[e];google.maps.event.removeListener(r)}this.eventListeners=null}this.moveListener&&(google.maps.event.removeListener(this.moveListener),this.moveListener=null),this.mapListener&&(google.maps.event.removeListener(this.mapListener),this.mapListener=null),this.contextListener&&(google.maps.event.removeListener(this.contextListener),this.contextListener=null),this.setMap(null)},t.prototype.extend=function(e,n){return(function(i){for(var a in i.prototype)Object.prototype.hasOwnProperty.call(this,a)||(this.prototype[a]=i.prototype[a]);return this}).apply(e,[n])},t}(),Jo={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Qo={options:function(t,e){t.setOptions(e)},position:function(t,e){e instanceof google.maps.LatLng?t.setPosition(e):t.setPosition(new google.maps.LatLng(e.lat,e.lng))},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},Kd={};function Xd(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,a=t.zIndex,o=t.onCloseClick,s=t.onDomReady,u=t.onContentChanged,l=t.onPositionChanged,f=t.onZindexChanged,h=t.onLoad,p=t.onUnmount,g=c.useContext(Se),y=c.useState(null),v=y[0],d=y[1],D=c.useState(null),x=D[0],E=D[1],O=c.useState(null),b=O[0],w=O[1],A=c.useState(null),M=A[0],V=A[1],P=c.useState(null),_=P[0],R=P[1],N=c.useState(null),T=N[0],j=N[1],X=c.useRef(null);return c.useEffect(function(){g&&v!==null&&(v.close(),n?v.open(g,n):v.getPosition()&&v.open(g))},[g,v,n]),c.useEffect(function(){r&&v!==null&&v.setOptions(r)},[v,r]),c.useEffect(function(){if(i&&v!==null){var z=i instanceof google.maps.LatLng?i:new google.maps.LatLng(i.lat,i.lng);v.setPosition(z)}},[i]),c.useEffect(function(){typeof a=="number"&&v!==null&&v.setZIndex(a)},[a]),c.useEffect(function(){v&&o&&(x!==null&&google.maps.event.removeListener(x),E(google.maps.event.addListener(v,"closeclick",o)))},[o]),c.useEffect(function(){v&&s&&(b!==null&&google.maps.event.removeListener(b),w(google.maps.event.addListener(v,"domready",s)))},[s]),c.useEffect(function(){v&&u&&(M!==null&&google.maps.event.removeListener(M),V(google.maps.event.addListener(v,"content_changed",u)))},[u]),c.useEffect(function(){v&&l&&(_!==null&&google.maps.event.removeListener(_),R(google.maps.event.addListener(v,"position_changed",l)))},[l]),c.useEffect(function(){v&&f&&(T!==null&&google.maps.event.removeListener(T),j(google.maps.event.addListener(v,"zindex_changed",f)))},[f]),c.useEffect(function(){if(g){var z=r||Kd,$=z.position,re=Ti(z,["position"]),k=void 0;$&&!($ instanceof google.maps.LatLng)&&(k=new google.maps.LatLng($.lat,$.lng));var I=new Xo(me(me({},re),k?{position:k}:{}));X.current=document.createElement("div"),d(I),o&&E(google.maps.event.addListener(I,"closeclick",o)),s&&w(google.maps.event.addListener(I,"domready",s)),u&&V(google.maps.event.addListener(I,"content_changed",u)),l&&R(google.maps.event.addListener(I,"position_changed",l)),f&&j(google.maps.event.addListener(I,"zindex_changed",f)),I.setContent(X.current),n?I.open(g,n):I.getPosition()?I.open(g):rt(!1,"You must provide either an anchor or a position prop for <InfoBox>."),h&&h(I)}return function(){v!==null&&(x&&google.maps.event.removeListener(x),M&&google.maps.event.removeListener(M),b&&google.maps.event.removeListener(b),_&&google.maps.event.removeListener(_),T&&google.maps.event.removeListener(T),p&&p(v),v.close())}},[]),X.current?Yt.createPortal(c.Children.only(e),X.current):null}c.memo(Xd),function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoBox:null},n.open=function(r,i){i?n.context!==null&&r.open(n.context,i):r.getPosition()?n.context!==null&&r.open(n.context):rt(!1,"You must provide either an anchor or a position prop for <InfoBox>.")},n.setInfoBoxCallback=function(){n.state.infoBox!==null&&n.containerElement!==null&&(n.state.infoBox.setContent(n.containerElement),n.open(n.state.infoBox,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoBox))},n}return e.prototype.componentDidMount=function(){var n=this.props.options||{},r=n.position,i=Ti(n,["position"]),a;r&&!(r instanceof google.maps.LatLng)&&(a=new google.maps.LatLng(r.lat,r.lng));var o=new Xo(me(me({},i),a?{position:a}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=Pe({updaterMap:Qo,eventMap:Jo,prevProps:{},nextProps:this.props,instance:o}),this.setState({infoBox:o},this.setInfoBoxCallback)},e.prototype.componentDidUpdate=function(n){var r=this.state.infoBox;r!==null&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:Qo,eventMap:Jo,prevProps:n,nextProps:this.props,instance:r}))},e.prototype.componentWillUnmount=function(){var n=this.props.onUnmount,r=this.state.infoBox;r!==null&&(n&&n(r),Me(this.registeredEvents),r.close())},e.prototype.render=function(){return this.containerElement?Yt.createPortal(c.Children.only(this.props.children),this.containerElement):null},e.contextType=Se,e}(c.PureComponent);var Jd=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(a=Object.keys(e),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!t(e[o],n[o]))return!1}return!0}return e!==e&&n!==n},$o=Fo(Jd);const es=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Ii=1,qn=8;class ji{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[n,r]=new Uint8Array(e,0,2);if(n!==219)throw new Error("Data does not appear to be in a KDBush format.");const i=r>>4;if(i!==Ii)throw new Error(`Got v${i} data when expected v${Ii}.`);const a=es[r&15];if(!a)throw new Error("Unrecognized array type.");const[o]=new Uint16Array(e,2,1),[s]=new Uint32Array(e,4,1);return new ji(s,o,a,e)}constructor(e,n=64,r=Float64Array,i){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+n,2),65535),this.ArrayType=r,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const a=es.indexOf(this.ArrayType),o=e*2*this.ArrayType.BYTES_PER_ELEMENT,s=e*this.IndexArrayType.BYTES_PER_ELEMENT,u=(8-s%8)%8;if(a<0)throw new Error(`Unexpected typed array class: ${r}.`);i&&i instanceof ArrayBuffer?(this.data=i,this.ids=new this.IndexArrayType(this.data,qn,e),this.coords=new this.ArrayType(this.data,qn+s+u,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(qn+o+s+u),this.ids=new this.IndexArrayType(this.data,qn,e),this.coords=new this.ArrayType(this.data,qn+s+u,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(Ii<<4)+a]),new Uint16Array(this.data,2,1)[0]=n,new Uint32Array(this.data,4,1)[0]=e)}add(e,n){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=e,this.coords[this._pos++]=n,r}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return Ni(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,n,r,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:a,coords:o,nodeSize:s}=this,u=[0,a.length-1,0],l=[];for(;u.length;){const f=u.pop()||0,h=u.pop()||0,p=u.pop()||0;if(h-p<=s){for(let d=p;d<=h;d++){const D=o[2*d],x=o[2*d+1];D>=e&&D<=r&&x>=n&&x<=i&&l.push(a[d])}continue}const g=p+h>>1,y=o[2*g],v=o[2*g+1];y>=e&&y<=r&&v>=n&&v<=i&&l.push(a[g]),(f===0?e<=y:n<=v)&&(u.push(p),u.push(g-1),u.push(1-f)),(f===0?r>=y:i>=v)&&(u.push(g+1),u.push(h),u.push(1-f))}return l}within(e,n,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:a,nodeSize:o}=this,s=[0,i.length-1,0],u=[],l=r*r;for(;s.length;){const f=s.pop()||0,h=s.pop()||0,p=s.pop()||0;if(h-p<=o){for(let d=p;d<=h;d++)ns(a[2*d],a[2*d+1],e,n)<=l&&u.push(i[d]);continue}const g=p+h>>1,y=a[2*g],v=a[2*g+1];ns(y,v,e,n)<=l&&u.push(i[g]),(f===0?e-r<=y:n-r<=v)&&(s.push(p),s.push(g-1),s.push(1-f)),(f===0?e+r>=y:n+r>=v)&&(s.push(g+1),s.push(h),s.push(1-f))}return u}}function Ni(t,e,n,r,i,a){if(i-r<=n)return;const o=r+i>>1;ts(t,e,o,r,i,a),Ni(t,e,n,r,o-1,1-a),Ni(t,e,n,o+1,i,1-a)}function ts(t,e,n,r,i,a){for(;i>r;){if(i-r>600){const l=i-r+1,f=n-r+1,h=Math.log(l),p=.5*Math.exp(2*h/3),g=.5*Math.sqrt(h*p*(l-p)/l)*(f-l/2<0?-1:1),y=Math.max(r,Math.floor(n-f*p/l+g)),v=Math.min(i,Math.floor(n+(l-f)*p/l+g));ts(t,e,n,y,v,a)}const o=e[2*n+a];let s=r,u=i;for(Gn(t,e,r,n),e[2*i+a]>o&&Gn(t,e,r,i);s<u;){for(Gn(t,e,s,u),s++,u--;e[2*s+a]<o;)s++;for(;e[2*u+a]>o;)u--}e[2*r+a]===o?Gn(t,e,r,u):(u++,Gn(t,e,u,i)),u<=n&&(r=u+1),n<=u&&(i=u-1)}}function Gn(t,e,n,r){_i(t,n,r),_i(e,2*n,2*r),_i(e,2*n+1,2*r+1)}function _i(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function ns(t,e,n,r){const i=t-n,a=e-r;return i*i+a*a}const Qd={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},rs=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),dn=2,Zt=3,zi=4,Kt=5,is=6;class $d{constructor(e){this.options=Object.assign(Object.create(Qd),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:n,minZoom:r,maxZoom:i}=this.options;n&&console.time("total time");const a=`prepare ${e.length} points`;n&&console.time(a),this.points=e;const o=[];for(let u=0;u<e.length;u++){const l=e[u];if(!l.geometry)continue;const[f,h]=l.geometry.coordinates,p=rs(Br(f)),g=rs(Sr(h));o.push(p,g,1/0,u,-1,1),this.options.reduce&&o.push(0)}let s=this.trees[i+1]=this._createTree(o);n&&console.timeEnd(a);for(let u=i;u>=r;u--){const l=+Date.now();s=this.trees[u]=this._createTree(this._cluster(s,u)),n&&console.log("z%d: %d clusters in %dms",u,s.numItems,+Date.now()-l)}return n&&console.timeEnd("total time"),this}getClusters(e,n){let r=((e[0]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,e[1]));let a=e[2]===180?180:((e[2]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,a=180;else if(r>a){const h=this.getClusters([r,i,180,o],n),p=this.getClusters([-180,i,a,o],n);return h.concat(p)}const s=this.trees[this._limitZoom(n)],u=s.range(Br(r),Sr(o),Br(a),Sr(i)),l=s.data,f=[];for(const h of u){const p=this.stride*h;f.push(l[p+Kt]>1?as(l,p,this.clusterProps):this.points[l[p+Zt]])}return f}getChildren(e){const n=this._getOriginId(e),r=this._getOriginZoom(e),i="No cluster with the specified id.",a=this.trees[r];if(!a)throw new Error(i);const o=a.data;if(n*this.stride>=o.length)throw new Error(i);const s=this.options.radius/(this.options.extent*Math.pow(2,r-1)),u=o[n*this.stride],l=o[n*this.stride+1],f=a.within(u,l,s),h=[];for(const p of f){const g=p*this.stride;o[g+zi]===e&&h.push(o[g+Kt]>1?as(o,g,this.clusterProps):this.points[o[g+Zt]])}if(h.length===0)throw new Error(i);return h}getLeaves(e,n,r){n=n||10,r=r||0;const i=[];return this._appendLeaves(i,e,n,r,0),i}getTile(e,n,r){const i=this.trees[this._limitZoom(e)],a=Math.pow(2,e),{extent:o,radius:s}=this.options,u=s/o,l=(r-u)/a,f=(r+1+u)/a,h={features:[]};return this._addTileFeatures(i.range((n-u)/a,l,(n+1+u)/a,f),i.data,n,r,a,h),n===0&&this._addTileFeatures(i.range(1-u/a,l,1,f),i.data,a,r,a,h),n===a-1&&this._addTileFeatures(i.range(0,l,u/a,f),i.data,-1,r,a,h),h.features.length?h:null}getClusterExpansionZoom(e){let n=this._getOriginZoom(e)-1;for(;n<=this.options.maxZoom;){const r=this.getChildren(e);if(n++,r.length!==1)break;e=r[0].properties.cluster_id}return n}_appendLeaves(e,n,r,i,a){const o=this.getChildren(n);for(const s of o){const u=s.properties;if(u&&u.cluster?a+u.point_count<=i?a+=u.point_count:a=this._appendLeaves(e,u.cluster_id,r,i,a):a<i?a++:e.push(s),e.length===r)break}return a}_createTree(e){const n=new ji(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<e.length;r+=this.stride)n.add(e[r],e[r+1]);return n.finish(),n.data=e,n}_addTileFeatures(e,n,r,i,a,o){for(const s of e){const u=s*this.stride,l=n[u+Kt]>1;let f,h,p;if(l)f=os(n,u,this.clusterProps),h=n[u],p=n[u+1];else{const v=this.points[n[u+Zt]];f=v.properties;const[d,D]=v.geometry.coordinates;h=Br(d),p=Sr(D)}const g={type:1,geometry:[[Math.round(this.options.extent*(h*a-r)),Math.round(this.options.extent*(p*a-i))]],tags:f};let y;l||this.options.generateId?y=n[u+Zt]:y=this.points[n[u+Zt]].id,y!==void 0&&(g.id=y),o.features.push(g)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,n){const{radius:r,extent:i,reduce:a,minPoints:o}=this.options,s=r/(i*Math.pow(2,n)),u=e.data,l=[],f=this.stride;for(let h=0;h<u.length;h+=f){if(u[h+dn]<=n)continue;u[h+dn]=n;const p=u[h],g=u[h+1],y=e.within(u[h],u[h+1],s),v=u[h+Kt];let d=v;for(const D of y){const x=D*f;u[x+dn]>n&&(d+=u[x+Kt])}if(d>v&&d>=o){let D=p*v,x=g*v,E,O=-1;const b=((h/f|0)<<5)+(n+1)+this.points.length;for(const w of y){const A=w*f;if(u[A+dn]<=n)continue;u[A+dn]=n;const M=u[A+Kt];D+=u[A]*M,x+=u[A+1]*M,u[A+zi]=b,a&&(E||(E=this._map(u,h,!0),O=this.clusterProps.length,this.clusterProps.push(E)),a(E,this._map(u,A)))}u[h+zi]=b,l.push(D/d,x/d,1/0,b,-1,d),a&&l.push(O)}else{for(let D=0;D<f;D++)l.push(u[h+D]);if(d>1)for(const D of y){const x=D*f;if(!(u[x+dn]<=n)){u[x+dn]=n;for(let E=0;E<f;E++)l.push(u[x+E])}}}}return l}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,n,r){if(e[n+Kt]>1){const o=this.clusterProps[e[n+is]];return r?Object.assign({},o):o}const i=this.points[e[n+Zt]].properties,a=this.options.map(i);return r&&a===i?Object.assign({},a):a}}function as(t,e,n){return{type:"Feature",id:t[e+Zt],properties:os(t,e,n),geometry:{type:"Point",coordinates:[ep(t[e]),tp(t[e+1])]}}}function os(t,e,n){const r=t[e+Kt],i=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,a=t[e+is],o=a===-1?{}:Object.assign({},n[a]);return Object.assign(o,{cluster:!0,cluster_id:t[e+Zt],point_count:r,point_count_abbreviated:i})}function Br(t){return t/360+.5}function Sr(t){const e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function ep(t){return(t-.5)*360}function tp(t){const e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}/*! *****************************************************************************
54
54
  Copyright (c) Microsoft Corporation.
55
55
 
56
56
  Permission to use, copy, modify, and/or distribute this software for any
@@ -63,50 +63,50 @@ React keys must be passed directly to JSX without using spread:
63
63
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
64
64
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
65
65
  PERFORMANCE OF THIS SOFTWARE.
66
- ***************************************************************************** */function tp(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}class wt{static isAdvancedMarkerAvailable(e){return google.maps.marker&&e.getMapCapabilities().isAdvancedMarkersAvailable===!0}static isAdvancedMarker(e){return google.maps.marker&&e instanceof google.maps.marker.AdvancedMarkerElement}static setMap(e,n){this.isAdvancedMarker(e)?e.map=n:e.setMap(n)}static getPosition(e){if(this.isAdvancedMarker(e)){if(e.position){if(e.position instanceof google.maps.LatLng)return e.position;if(e.position.lat&&e.position.lng)return new google.maps.LatLng(e.position.lat,e.position.lng)}return new google.maps.LatLng(null)}return e.getPosition()}static getVisible(e){return this.isAdvancedMarker(e)?!0:e.getVisible()}}class Wi{constructor({markers:e,position:n}){this.markers=e,n&&(n instanceof google.maps.LatLng?this._position=n:this._position=new google.maps.LatLng(n))}get bounds(){if(this.markers.length===0&&!this._position)return;const e=new google.maps.LatLngBounds(this._position,this._position);for(const n of this.markers)e.extend(wt.getPosition(n));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>wt.getVisible(e)).length}push(e){this.markers.push(e)}delete(){this.marker&&(wt.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}class np{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return rp(e)}}const rp=t=>t.map(n=>new Wi({position:wt.getPosition(n),markers:[n]}));class ip extends np{constructor(e){var{maxZoom:n,radius:r=60}=e,i=tp(e,["maxZoom","radius"]);super({maxZoom:n}),this.state={zoom:-1},this.superCluster=new Qd(Object.assign({maxZoom:this.maxZoom,radius:r},i))}calculate(e){let n=!1;const r={zoom:e.map.getZoom()};if(!$o(e.markers,this.markers)){n=!0,this.markers=[...e.markers];const i=this.markers.map(a=>{const o=wt.getPosition(a);return{type:"Feature",geometry:{type:"Point",coordinates:[o.lng(),o.lat()]},properties:{marker:a}}});this.superCluster.load(i)}return n||(this.state.zoom<=this.maxZoom||r.zoom<=this.maxZoom)&&(n=!$o(this.state,r)),this.state=r,n&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:n}}cluster({map:e}){return this.superCluster.getClusters([-180,-90,180,90],Math.round(e.getZoom())).map(n=>this.transformCluster(n))}transformCluster({geometry:{coordinates:[e,n]},properties:r}){if(r.cluster)return new Wi({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(a=>a.properties.marker),position:{lat:n,lng:e}});const i=r.marker;return new Wi({markers:[i],position:wt.getPosition(i)})}}class ap{constructor(e,n){this.markers={sum:e.length};const r=n.map(a=>a.count),i=r.reduce((a,o)=>a+o,0);this.clusters={count:n.length,markers:{mean:i/n.length,sum:i,min:Math.min(...r),max:Math.max(...r)}}}}class op{render({count:e,position:n},r,i){const o=`<svg fill="${e>Math.max(10,r.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
66
+ ***************************************************************************** */function np(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}class wt{static isAdvancedMarkerAvailable(e){return google.maps.marker&&e.getMapCapabilities().isAdvancedMarkersAvailable===!0}static isAdvancedMarker(e){return google.maps.marker&&e instanceof google.maps.marker.AdvancedMarkerElement}static setMap(e,n){this.isAdvancedMarker(e)?e.map=n:e.setMap(n)}static getPosition(e){if(this.isAdvancedMarker(e)){if(e.position){if(e.position instanceof google.maps.LatLng)return e.position;if(e.position.lat&&e.position.lng)return new google.maps.LatLng(e.position.lat,e.position.lng)}return new google.maps.LatLng(null)}return e.getPosition()}static getVisible(e){return this.isAdvancedMarker(e)?!0:e.getVisible()}}class Wi{constructor({markers:e,position:n}){this.markers=e,n&&(n instanceof google.maps.LatLng?this._position=n:this._position=new google.maps.LatLng(n))}get bounds(){if(this.markers.length===0&&!this._position)return;const e=new google.maps.LatLngBounds(this._position,this._position);for(const n of this.markers)e.extend(wt.getPosition(n));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>wt.getVisible(e)).length}push(e){this.markers.push(e)}delete(){this.marker&&(wt.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}class rp{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return ip(e)}}const ip=t=>t.map(n=>new Wi({position:wt.getPosition(n),markers:[n]}));class ap extends rp{constructor(e){var{maxZoom:n,radius:r=60}=e,i=np(e,["maxZoom","radius"]);super({maxZoom:n}),this.state={zoom:-1},this.superCluster=new $d(Object.assign({maxZoom:this.maxZoom,radius:r},i))}calculate(e){let n=!1;const r={zoom:e.map.getZoom()};if(!$o(e.markers,this.markers)){n=!0,this.markers=[...e.markers];const i=this.markers.map(a=>{const o=wt.getPosition(a);return{type:"Feature",geometry:{type:"Point",coordinates:[o.lng(),o.lat()]},properties:{marker:a}}});this.superCluster.load(i)}return n||(this.state.zoom<=this.maxZoom||r.zoom<=this.maxZoom)&&(n=!$o(this.state,r)),this.state=r,n&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:n}}cluster({map:e}){return this.superCluster.getClusters([-180,-90,180,90],Math.round(e.getZoom())).map(n=>this.transformCluster(n))}transformCluster({geometry:{coordinates:[e,n]},properties:r}){if(r.cluster)return new Wi({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(a=>a.properties.marker),position:{lat:n,lng:e}});const i=r.marker;return new Wi({markers:[i],position:wt.getPosition(i)})}}class op{constructor(e,n){this.markers={sum:e.length};const r=n.map(a=>a.count),i=r.reduce((a,o)=>a+o,0);this.clusters={count:n.length,markers:{mean:i/n.length,sum:i,min:Math.min(...r),max:Math.max(...r)}}}}class sp{render({count:e,position:n},r,i){const o=`<svg fill="${e>Math.max(10,r.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
67
67
  <circle cx="120" cy="120" opacity=".6" r="70" />
68
68
  <circle cx="120" cy="120" opacity=".3" r="90" />
69
69
  <circle cx="120" cy="120" opacity=".2" r="110" />
70
70
  <text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${e}</text>
71
- </svg>`,s=`Cluster of ${e} markers`,u=Number(google.maps.Marker.MAX_ZINDEX)+e;if(wt.isAdvancedMarkerAvailable(i)){const h=new DOMParser().parseFromString(o,"image/svg+xml").documentElement;h.setAttribute("transform","translate(0 25)");const p={map:i,position:n,zIndex:u,title:s,content:h};return new google.maps.marker.AdvancedMarkerElement(p)}const l={position:n,zIndex:u,title:s,icon:{url:`data:image/svg+xml;base64,${btoa(o)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(l)}}function sp(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class Ui{constructor(){sp(Ui,google.maps.OverlayView)}}var Yn;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(Yn||(Yn={}));const up=(t,e,n)=>{n.fitBounds(e.bounds)};class lp extends Ui{constructor({map:e,markers:n=[],algorithmOptions:r={},algorithm:i=new ip(r),renderer:a=new op,onClusterClick:o=up}){super(),this.markers=[...n],this.clusters=[],this.algorithm=i,this.renderer=a,this.onClusterClick=o,e&&this.setMap(e)}addMarker(e,n){this.markers.includes(e)||(this.markers.push(e),n||this.render())}addMarkers(e,n){e.forEach(r=>{this.addMarker(r,!0)}),n||this.render()}removeMarker(e,n){const r=this.markers.indexOf(e);return r===-1?!1:(wt.setMap(e,null),this.markers.splice(r,1),n||this.render(),!0)}removeMarkers(e,n){let r=!1;return e.forEach(i=>{r=this.removeMarker(i,!0)||r}),r&&!n&&this.render(),r}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,Yn.CLUSTERING_BEGIN,this);const{clusters:n,changed:r}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(r||r==null){const i=new Set;for(const o of n)o.markers.length==1&&i.add(o.markers[0]);const a=[];for(const o of this.clusters)o.marker!=null&&(o.markers.length==1?i.has(o.marker)||wt.setMap(o.marker,null):a.push(o.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>a.forEach(o=>wt.setMap(o,null)))}google.maps.event.trigger(this,Yn.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>wt.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new ap(this.markers,this.clusters),n=this.getMap();this.clusters.forEach(r=>{r.markers.length===1?r.marker=r.markers[0]:(r.marker=this.renderer.render(r,e,n),r.markers.forEach(i=>wt.setMap(i,null)),this.onClusterClick&&r.marker.addListener("click",i=>{google.maps.event.trigger(this,Yn.CLUSTER_CLICK,r),this.onClusterClick(i,r,n)})),wt.setMap(r.marker,n)})}}function cp(t){var e=Cd(),n=c.useState(null),r=n[0],i=n[1];return c.useEffect(function(){if(e&&r===null){var a=new lp(me(me({},t),{map:e}));i(a)}},[e]),r}function fp(t){var e=t.children,n=t.options,r=cp(n);return r!==null?e(r):null}c.memo(fp);var ss={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},us={options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},zIndex:function(t,e){t.setZIndex(e)}};function dp(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,a=t.zIndex,o=t.onCloseClick,s=t.onDomReady,u=t.onContentChanged,l=t.onPositionChanged,f=t.onZindexChanged,h=t.onLoad,p=t.onUnmount,g=c.useContext(Se),y=c.useState(null),v=y[0],d=y[1],D=c.useState(null),x=D[0],E=D[1],O=c.useState(null),b=O[0],w=O[1],A=c.useState(null),M=A[0],V=A[1],P=c.useState(null),_=P[0],R=P[1],N=c.useState(null),T=N[0],j=N[1],X=c.useRef(null);return c.useEffect(function(){v!==null&&(v.close(),n?v.open(g,n):v.getPosition()&&v.open(g))},[g,v,n]),c.useEffect(function(){r&&v!==null&&v.setOptions(r)},[v,r]),c.useEffect(function(){i&&v!==null&&v.setPosition(i)},[i]),c.useEffect(function(){typeof a=="number"&&v!==null&&v.setZIndex(a)},[a]),c.useEffect(function(){v&&o&&(x!==null&&google.maps.event.removeListener(x),E(google.maps.event.addListener(v,"closeclick",o)))},[o]),c.useEffect(function(){v&&s&&(b!==null&&google.maps.event.removeListener(b),w(google.maps.event.addListener(v,"domready",s)))},[s]),c.useEffect(function(){v&&u&&(M!==null&&google.maps.event.removeListener(M),V(google.maps.event.addListener(v,"content_changed",u)))},[u]),c.useEffect(function(){v&&l&&(_!==null&&google.maps.event.removeListener(_),R(google.maps.event.addListener(v,"position_changed",l)))},[l]),c.useEffect(function(){v&&f&&(T!==null&&google.maps.event.removeListener(T),j(google.maps.event.addListener(v,"zindex_changed",f)))},[f]),c.useEffect(function(){var z=new google.maps.InfoWindow(me({},r||{}));return d(z),X.current=document.createElement("div"),o&&E(google.maps.event.addListener(z,"closeclick",o)),s&&w(google.maps.event.addListener(z,"domready",s)),u&&V(google.maps.event.addListener(z,"content_changed",u)),l&&R(google.maps.event.addListener(z,"position_changed",l)),f&&j(google.maps.event.addListener(z,"zindex_changed",f)),z.setContent(X.current),i&&z.setPosition(i),a&&z.setZIndex(a),n?z.open(g,n):z.getPosition()?z.open(g):rt(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),h&&h(z),function(){x&&google.maps.event.removeListener(x),M&&google.maps.event.removeListener(M),b&&google.maps.event.removeListener(b),_&&google.maps.event.removeListener(_),T&&google.maps.event.removeListener(T),p&&p(z),z.close()}},[]),X.current?Yt.createPortal(c.Children.only(e),X.current):null}c.memo(dp),function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoWindow:null},n.open=function(r,i){i?r.open(n.context,i):r.getPosition()?r.open(n.context):rt(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>.")},n.setInfoWindowCallback=function(){n.state.infoWindow!==null&&n.containerElement!==null&&(n.state.infoWindow.setContent(n.containerElement),n.open(n.state.infoWindow,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoWindow))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.InfoWindow(me({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=Pe({updaterMap:us,eventMap:ss,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{infoWindow:n}},this.setInfoWindowCallback)},e.prototype.componentDidUpdate=function(n){this.state.infoWindow!==null&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:us,eventMap:ss,prevProps:n,nextProps:this.props,instance:this.state.infoWindow}))},e.prototype.componentWillUnmount=function(){this.state.infoWindow!==null&&(Me(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())},e.prototype.render=function(){return this.containerElement?Yt.createPortal(c.Children.only(this.props.children),this.containerElement):null},e.contextType=Se,e}(c.PureComponent);var ls={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},cs={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},visible:function(t,e){t.setVisible(e)}},pp={};function hp(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,a=t.path,o=t.onDblClick,s=t.onDragEnd,u=t.onDragStart,l=t.onMouseDown,f=t.onMouseMove,h=t.onMouseOut,p=t.onMouseOver,g=t.onMouseUp,y=t.onRightClick,v=t.onClick,d=t.onDrag,D=t.onLoad,x=t.onUnmount,E=c.useContext(Se),O=c.useState(null),b=O[0],w=O[1],A=c.useState(null),M=A[0],V=A[1],P=c.useState(null),_=P[0],R=P[1],N=c.useState(null),T=N[0],j=N[1],X=c.useState(null),z=X[0],$=X[1],re=c.useState(null),k=re[0],I=re[1],G=c.useState(null),H=G[0],Q=G[1],K=c.useState(null),C=K[0],U=K[1],W=c.useState(null),F=W[0],J=W[1],ne=c.useState(null),Y=ne[0],ue=ne[1],ae=c.useState(null),de=ae[0],pe=ae[1],Ce=c.useState(null),ye=Ce[0],ge=Ce[1];return c.useEffect(function(){b!==null&&b.setMap(E)},[E]),c.useEffect(function(){typeof e<"u"&&b!==null&&b.setOptions(e)},[b,e]),c.useEffect(function(){typeof n<"u"&&b!==null&&b.setDraggable(n)},[b,n]),c.useEffect(function(){typeof r<"u"&&b!==null&&b.setEditable(r)},[b,r]),c.useEffect(function(){typeof i<"u"&&b!==null&&b.setVisible(i)},[b,i]),c.useEffect(function(){typeof a<"u"&&b!==null&&b.setPath(a)},[b,a]),c.useEffect(function(){b&&o&&(M!==null&&google.maps.event.removeListener(M),V(google.maps.event.addListener(b,"dblclick",o)))},[o]),c.useEffect(function(){b&&s&&(_!==null&&google.maps.event.removeListener(_),R(google.maps.event.addListener(b,"dragend",s)))},[s]),c.useEffect(function(){b&&u&&(T!==null&&google.maps.event.removeListener(T),j(google.maps.event.addListener(b,"dragstart",u)))},[u]),c.useEffect(function(){b&&l&&(z!==null&&google.maps.event.removeListener(z),$(google.maps.event.addListener(b,"mousedown",l)))},[l]),c.useEffect(function(){b&&f&&(k!==null&&google.maps.event.removeListener(k),I(google.maps.event.addListener(b,"mousemove",f)))},[f]),c.useEffect(function(){b&&h&&(H!==null&&google.maps.event.removeListener(H),Q(google.maps.event.addListener(b,"mouseout",h)))},[h]),c.useEffect(function(){b&&p&&(C!==null&&google.maps.event.removeListener(C),U(google.maps.event.addListener(b,"mouseover",p)))},[p]),c.useEffect(function(){b&&g&&(F!==null&&google.maps.event.removeListener(F),J(google.maps.event.addListener(b,"mouseup",g)))},[g]),c.useEffect(function(){b&&y&&(Y!==null&&google.maps.event.removeListener(Y),ue(google.maps.event.addListener(b,"rightclick",y)))},[y]),c.useEffect(function(){b&&v&&(de!==null&&google.maps.event.removeListener(de),pe(google.maps.event.addListener(b,"click",v)))},[v]),c.useEffect(function(){b&&d&&(ye!==null&&google.maps.event.removeListener(ye),ge(google.maps.event.addListener(b,"drag",d)))},[d]),c.useEffect(function(){var ve=new google.maps.Polyline(me(me({},e||pp),{map:E}));return a&&ve.setPath(a),typeof i<"u"&&ve.setVisible(i),typeof r<"u"&&ve.setEditable(r),typeof n<"u"&&ve.setDraggable(n),o&&V(google.maps.event.addListener(ve,"dblclick",o)),s&&R(google.maps.event.addListener(ve,"dragend",s)),u&&j(google.maps.event.addListener(ve,"dragstart",u)),l&&$(google.maps.event.addListener(ve,"mousedown",l)),f&&I(google.maps.event.addListener(ve,"mousemove",f)),h&&Q(google.maps.event.addListener(ve,"mouseout",h)),p&&U(google.maps.event.addListener(ve,"mouseover",p)),g&&J(google.maps.event.addListener(ve,"mouseup",g)),y&&ue(google.maps.event.addListener(ve,"rightclick",y)),v&&pe(google.maps.event.addListener(ve,"click",v)),d&&ge(google.maps.event.addListener(ve,"drag",d)),w(ve),D&&D(ve),function(){M!==null&&google.maps.event.removeListener(M),_!==null&&google.maps.event.removeListener(_),T!==null&&google.maps.event.removeListener(T),z!==null&&google.maps.event.removeListener(z),k!==null&&google.maps.event.removeListener(k),H!==null&&google.maps.event.removeListener(H),C!==null&&google.maps.event.removeListener(C),F!==null&&google.maps.event.removeListener(F),Y!==null&&google.maps.event.removeListener(Y),de!==null&&google.maps.event.removeListener(de),x&&x(ve),ve.setMap(null)}},[]),null}c.memo(hp),function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polyline:null},n.setPolylineCallback=function(){n.state.polyline!==null&&n.props.onLoad&&n.props.onLoad(n.state.polyline)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polyline(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Pe({updaterMap:cs,eventMap:ls,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polyline:n}},this.setPolylineCallback)},e.prototype.componentDidUpdate=function(n){this.state.polyline!==null&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:cs,eventMap:ls,prevProps:n,nextProps:this.props,instance:this.state.polyline}))},e.prototype.componentWillUnmount=function(){this.state.polyline!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),Me(this.registeredEvents),this.state.polyline.setMap(null))},e.prototype.render=function(){return null},e.contextType=Se,e}(c.PureComponent);var fs={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},ds={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},paths:function(t,e){t.setPaths(e)},visible:function(t,e){t.setVisible(e)}};function vp(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,a=t.path,o=t.paths,s=t.onDblClick,u=t.onDragEnd,l=t.onDragStart,f=t.onMouseDown,h=t.onMouseMove,p=t.onMouseOut,g=t.onMouseOver,y=t.onMouseUp,v=t.onRightClick,d=t.onClick,D=t.onDrag,x=t.onLoad,E=t.onUnmount,O=t.onEdit,b=c.useContext(Se),w=c.useState(null),A=w[0],M=w[1],V=c.useState(null),P=V[0],_=V[1],R=c.useState(null),N=R[0],T=R[1],j=c.useState(null),X=j[0],z=j[1],$=c.useState(null),re=$[0],k=$[1],I=c.useState(null),G=I[0],H=I[1],Q=c.useState(null),K=Q[0],C=Q[1],U=c.useState(null),W=U[0],F=U[1],J=c.useState(null),ne=J[0],Y=J[1],ue=c.useState(null),ae=ue[0],de=ue[1],pe=c.useState(null),Ce=pe[0],ye=pe[1],ge=c.useState(null),ve=ge[0],Ne=ge[1];return c.useEffect(function(){A!==null&&A.setMap(b)},[b]),c.useEffect(function(){typeof e<"u"&&A!==null&&A.setOptions(e)},[A,e]),c.useEffect(function(){typeof n<"u"&&A!==null&&A.setDraggable(n)},[A,n]),c.useEffect(function(){typeof r<"u"&&A!==null&&A.setEditable(r)},[A,r]),c.useEffect(function(){typeof i<"u"&&A!==null&&A.setVisible(i)},[A,i]),c.useEffect(function(){typeof a<"u"&&A!==null&&A.setPath(a)},[A,a]),c.useEffect(function(){typeof o<"u"&&A!==null&&A.setPaths(o)},[A,o]),c.useEffect(function(){A&&s&&(P!==null&&google.maps.event.removeListener(P),_(google.maps.event.addListener(A,"dblclick",s)))},[s]),c.useEffect(function(){A&&(google.maps.event.addListener(A.getPath(),"insert_at",function(){O==null||O(A)}),google.maps.event.addListener(A.getPath(),"set_at",function(){O==null||O(A)}))},[A,O]),c.useEffect(function(){A&&u&&(N!==null&&google.maps.event.removeListener(N),T(google.maps.event.addListener(A,"dragend",u)))},[u]),c.useEffect(function(){A&&l&&(X!==null&&google.maps.event.removeListener(X),z(google.maps.event.addListener(A,"dragstart",l)))},[l]),c.useEffect(function(){A&&f&&(re!==null&&google.maps.event.removeListener(re),k(google.maps.event.addListener(A,"mousedown",f)))},[f]),c.useEffect(function(){A&&h&&(G!==null&&google.maps.event.removeListener(G),H(google.maps.event.addListener(A,"mousemove",h)))},[h]),c.useEffect(function(){A&&p&&(K!==null&&google.maps.event.removeListener(K),C(google.maps.event.addListener(A,"mouseout",p)))},[p]),c.useEffect(function(){A&&g&&(W!==null&&google.maps.event.removeListener(W),F(google.maps.event.addListener(A,"mouseover",g)))},[g]),c.useEffect(function(){A&&y&&(ne!==null&&google.maps.event.removeListener(ne),Y(google.maps.event.addListener(A,"mouseup",y)))},[y]),c.useEffect(function(){A&&v&&(ae!==null&&google.maps.event.removeListener(ae),de(google.maps.event.addListener(A,"rightclick",v)))},[v]),c.useEffect(function(){A&&d&&(Ce!==null&&google.maps.event.removeListener(Ce),ye(google.maps.event.addListener(A,"click",d)))},[d]),c.useEffect(function(){A&&D&&(ve!==null&&google.maps.event.removeListener(ve),Ne(google.maps.event.addListener(A,"drag",D)))},[D]),c.useEffect(function(){var se=new google.maps.Polygon(me(me({},e||{}),{map:b}));return a&&se.setPath(a),o&&se.setPaths(o),typeof i<"u"&&se.setVisible(i),typeof r<"u"&&se.setEditable(r),typeof n<"u"&&se.setDraggable(n),s&&_(google.maps.event.addListener(se,"dblclick",s)),u&&T(google.maps.event.addListener(se,"dragend",u)),l&&z(google.maps.event.addListener(se,"dragstart",l)),f&&k(google.maps.event.addListener(se,"mousedown",f)),h&&H(google.maps.event.addListener(se,"mousemove",h)),p&&C(google.maps.event.addListener(se,"mouseout",p)),g&&F(google.maps.event.addListener(se,"mouseover",g)),y&&Y(google.maps.event.addListener(se,"mouseup",y)),v&&de(google.maps.event.addListener(se,"rightclick",v)),d&&ye(google.maps.event.addListener(se,"click",d)),D&&Ne(google.maps.event.addListener(se,"drag",D)),M(se),x&&x(se),function(){P!==null&&google.maps.event.removeListener(P),N!==null&&google.maps.event.removeListener(N),X!==null&&google.maps.event.removeListener(X),re!==null&&google.maps.event.removeListener(re),G!==null&&google.maps.event.removeListener(G),K!==null&&google.maps.event.removeListener(K),W!==null&&google.maps.event.removeListener(W),ne!==null&&google.maps.event.removeListener(ne),ae!==null&&google.maps.event.removeListener(ae),Ce!==null&&google.maps.event.removeListener(Ce),E&&E(se),se.setMap(null)}},[]),null}c.memo(vp),function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polygon:null},n.setPolygonCallback=function(){n.state.polygon!==null&&n.props.onLoad&&n.props.onLoad(n.state.polygon)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polygon(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Pe({updaterMap:ds,eventMap:fs,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polygon:n}},this.setPolygonCallback)},e.prototype.componentDidUpdate=function(n){this.state.polygon!==null&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:ds,eventMap:fs,prevProps:n,nextProps:this.props,instance:this.state.polygon}))},e.prototype.componentWillUnmount=function(){this.state.polygon!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),Me(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},e.prototype.render=function(){return null},e.contextType=Se,e}(c.PureComponent);var ps={onBoundsChanged:"bounds_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},hs={bounds:function(t,e){t.setBounds(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},visible:function(t,e){t.setVisible(e)}};function gp(t){var e=t.options,n=t.bounds,r=t.draggable,i=t.editable,a=t.visible,o=t.onDblClick,s=t.onDragEnd,u=t.onDragStart,l=t.onMouseDown,f=t.onMouseMove,h=t.onMouseOut,p=t.onMouseOver,g=t.onMouseUp,y=t.onRightClick,v=t.onClick,d=t.onDrag,D=t.onBoundsChanged,x=t.onLoad,E=t.onUnmount,O=c.useContext(Se),b=c.useState(null),w=b[0],A=b[1],M=c.useState(null),V=M[0],P=M[1],_=c.useState(null),R=_[0],N=_[1],T=c.useState(null),j=T[0],X=T[1],z=c.useState(null),$=z[0],re=z[1],k=c.useState(null),I=k[0],G=k[1],H=c.useState(null),Q=H[0],K=H[1],C=c.useState(null),U=C[0],W=C[1],F=c.useState(null),J=F[0],ne=F[1],Y=c.useState(null),ue=Y[0],ae=Y[1],de=c.useState(null),pe=de[0],Ce=de[1],ye=c.useState(null),ge=ye[0],ve=ye[1],Ne=c.useState(null),se=Ne[0],_e=Ne[1];return c.useEffect(function(){w!==null&&w.setMap(O)},[O]),c.useEffect(function(){typeof e<"u"&&w!==null&&w.setOptions(e)},[w,e]),c.useEffect(function(){typeof r<"u"&&w!==null&&w.setDraggable(r)},[w,r]),c.useEffect(function(){typeof i<"u"&&w!==null&&w.setEditable(i)},[w,i]),c.useEffect(function(){typeof a<"u"&&w!==null&&w.setVisible(a)},[w,a]),c.useEffect(function(){typeof n<"u"&&w!==null&&w.setBounds(n)},[w,n]),c.useEffect(function(){w&&o&&(V!==null&&google.maps.event.removeListener(V),P(google.maps.event.addListener(w,"dblclick",o)))},[o]),c.useEffect(function(){w&&s&&(R!==null&&google.maps.event.removeListener(R),N(google.maps.event.addListener(w,"dragend",s)))},[s]),c.useEffect(function(){w&&u&&(j!==null&&google.maps.event.removeListener(j),X(google.maps.event.addListener(w,"dragstart",u)))},[u]),c.useEffect(function(){w&&l&&($!==null&&google.maps.event.removeListener($),re(google.maps.event.addListener(w,"mousedown",l)))},[l]),c.useEffect(function(){w&&f&&(I!==null&&google.maps.event.removeListener(I),G(google.maps.event.addListener(w,"mousemove",f)))},[f]),c.useEffect(function(){w&&h&&(Q!==null&&google.maps.event.removeListener(Q),K(google.maps.event.addListener(w,"mouseout",h)))},[h]),c.useEffect(function(){w&&p&&(U!==null&&google.maps.event.removeListener(U),W(google.maps.event.addListener(w,"mouseover",p)))},[p]),c.useEffect(function(){w&&g&&(J!==null&&google.maps.event.removeListener(J),ne(google.maps.event.addListener(w,"mouseup",g)))},[g]),c.useEffect(function(){w&&y&&(ue!==null&&google.maps.event.removeListener(ue),ae(google.maps.event.addListener(w,"rightclick",y)))},[y]),c.useEffect(function(){w&&v&&(pe!==null&&google.maps.event.removeListener(pe),Ce(google.maps.event.addListener(w,"click",v)))},[v]),c.useEffect(function(){w&&d&&(ge!==null&&google.maps.event.removeListener(ge),ve(google.maps.event.addListener(w,"drag",d)))},[d]),c.useEffect(function(){w&&D&&(se!==null&&google.maps.event.removeListener(se),_e(google.maps.event.addListener(w,"bounds_changed",D)))},[D]),c.useEffect(function(){var fe=new google.maps.Rectangle(me(me({},e||{}),{map:O}));return typeof a<"u"&&fe.setVisible(a),typeof i<"u"&&fe.setEditable(i),typeof r<"u"&&fe.setDraggable(r),typeof n<"u"&&fe.setBounds(n),o&&P(google.maps.event.addListener(fe,"dblclick",o)),s&&N(google.maps.event.addListener(fe,"dragend",s)),u&&X(google.maps.event.addListener(fe,"dragstart",u)),l&&re(google.maps.event.addListener(fe,"mousedown",l)),f&&G(google.maps.event.addListener(fe,"mousemove",f)),h&&K(google.maps.event.addListener(fe,"mouseout",h)),p&&W(google.maps.event.addListener(fe,"mouseover",p)),g&&ne(google.maps.event.addListener(fe,"mouseup",g)),y&&ae(google.maps.event.addListener(fe,"rightclick",y)),v&&Ce(google.maps.event.addListener(fe,"click",v)),d&&ve(google.maps.event.addListener(fe,"drag",d)),D&&_e(google.maps.event.addListener(fe,"bounds_changed",D)),A(fe),x&&x(fe),function(){V!==null&&google.maps.event.removeListener(V),R!==null&&google.maps.event.removeListener(R),j!==null&&google.maps.event.removeListener(j),$!==null&&google.maps.event.removeListener($),I!==null&&google.maps.event.removeListener(I),Q!==null&&google.maps.event.removeListener(Q),U!==null&&google.maps.event.removeListener(U),J!==null&&google.maps.event.removeListener(J),ue!==null&&google.maps.event.removeListener(ue),pe!==null&&google.maps.event.removeListener(pe),ge!==null&&google.maps.event.removeListener(ge),se!==null&&google.maps.event.removeListener(se),E&&E(fe),fe.setMap(null)}},[]),null}c.memo(gp),function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={rectangle:null},n.setRectangleCallback=function(){n.state.rectangle!==null&&n.props.onLoad&&n.props.onLoad(n.state.rectangle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Rectangle(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Pe({updaterMap:hs,eventMap:ps,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{rectangle:n}},this.setRectangleCallback)},e.prototype.componentDidUpdate=function(n){this.state.rectangle!==null&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:hs,eventMap:ps,prevProps:n,nextProps:this.props,instance:this.state.rectangle}))},e.prototype.componentWillUnmount=function(){this.state.rectangle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),Me(this.registeredEvents),this.state.rectangle.setMap(null))},e.prototype.render=function(){return null},e.contextType=Se,e}(c.PureComponent);var vs={onCenterChanged:"center_changed",onRadiusChanged:"radius_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},gs={center:function(t,e){t.setCenter(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},radius:function(t,e){t.setRadius(e)},visible:function(t,e){t.setVisible(e)}},mp={};function yp(t){var e=t.options,n=t.center,r=t.radius,i=t.draggable,a=t.editable,o=t.visible,s=t.onDblClick,u=t.onDragEnd,l=t.onDragStart,f=t.onMouseDown,h=t.onMouseMove,p=t.onMouseOut,g=t.onMouseOver,y=t.onMouseUp,v=t.onRightClick,d=t.onClick,D=t.onDrag,x=t.onCenterChanged,E=t.onRadiusChanged,O=t.onLoad,b=t.onUnmount,w=c.useContext(Se),A=c.useState(null),M=A[0],V=A[1],P=c.useState(null),_=P[0],R=P[1],N=c.useState(null),T=N[0],j=N[1],X=c.useState(null),z=X[0],$=X[1],re=c.useState(null),k=re[0],I=re[1],G=c.useState(null),H=G[0],Q=G[1],K=c.useState(null),C=K[0],U=K[1],W=c.useState(null),F=W[0],J=W[1],ne=c.useState(null),Y=ne[0],ue=ne[1],ae=c.useState(null),de=ae[0],pe=ae[1],Ce=c.useState(null),ye=Ce[0],ge=Ce[1],ve=c.useState(null),Ne=ve[0],se=ve[1],_e=c.useState(null),fe=_e[0],we=_e[1],ke=c.useState(null),Ve=ke[0],Ye=ke[1];return c.useEffect(function(){M!==null&&M.setMap(w)},[w]),c.useEffect(function(){typeof e<"u"&&M!==null&&M.setOptions(e)},[M,e]),c.useEffect(function(){typeof i<"u"&&M!==null&&M.setDraggable(i)},[M,i]),c.useEffect(function(){typeof a<"u"&&M!==null&&M.setEditable(a)},[M,a]),c.useEffect(function(){typeof o<"u"&&M!==null&&M.setVisible(o)},[M,o]),c.useEffect(function(){typeof r=="number"&&M!==null&&M.setRadius(r)},[M,r]),c.useEffect(function(){typeof n<"u"&&M!==null&&M.setCenter(n)},[M,n]),c.useEffect(function(){M&&s&&(_!==null&&google.maps.event.removeListener(_),R(google.maps.event.addListener(M,"dblclick",s)))},[s]),c.useEffect(function(){M&&u&&(T!==null&&google.maps.event.removeListener(T),j(google.maps.event.addListener(M,"dragend",u)))},[u]),c.useEffect(function(){M&&l&&(z!==null&&google.maps.event.removeListener(z),$(google.maps.event.addListener(M,"dragstart",l)))},[l]),c.useEffect(function(){M&&f&&(k!==null&&google.maps.event.removeListener(k),I(google.maps.event.addListener(M,"mousedown",f)))},[f]),c.useEffect(function(){M&&h&&(H!==null&&google.maps.event.removeListener(H),Q(google.maps.event.addListener(M,"mousemove",h)))},[h]),c.useEffect(function(){M&&p&&(C!==null&&google.maps.event.removeListener(C),U(google.maps.event.addListener(M,"mouseout",p)))},[p]),c.useEffect(function(){M&&g&&(F!==null&&google.maps.event.removeListener(F),J(google.maps.event.addListener(M,"mouseover",g)))},[g]),c.useEffect(function(){M&&y&&(Y!==null&&google.maps.event.removeListener(Y),ue(google.maps.event.addListener(M,"mouseup",y)))},[y]),c.useEffect(function(){M&&v&&(de!==null&&google.maps.event.removeListener(de),pe(google.maps.event.addListener(M,"rightclick",v)))},[v]),c.useEffect(function(){M&&d&&(ye!==null&&google.maps.event.removeListener(ye),ge(google.maps.event.addListener(M,"click",d)))},[d]),c.useEffect(function(){M&&D&&(Ne!==null&&google.maps.event.removeListener(Ne),se(google.maps.event.addListener(M,"drag",D)))},[D]),c.useEffect(function(){M&&x&&(fe!==null&&google.maps.event.removeListener(fe),we(google.maps.event.addListener(M,"center_changed",x)))},[d]),c.useEffect(function(){M&&E&&(Ve!==null&&google.maps.event.removeListener(Ve),Ye(google.maps.event.addListener(M,"radius_changed",E)))},[E]),c.useEffect(function(){var Ee=new google.maps.Circle(me(me({},e||mp),{map:w}));return typeof r=="number"&&Ee.setRadius(r),typeof n<"u"&&Ee.setCenter(n),typeof r=="number"&&Ee.setRadius(r),typeof o<"u"&&Ee.setVisible(o),typeof a<"u"&&Ee.setEditable(a),typeof i<"u"&&Ee.setDraggable(i),s&&R(google.maps.event.addListener(Ee,"dblclick",s)),u&&j(google.maps.event.addListener(Ee,"dragend",u)),l&&$(google.maps.event.addListener(Ee,"dragstart",l)),f&&I(google.maps.event.addListener(Ee,"mousedown",f)),h&&Q(google.maps.event.addListener(Ee,"mousemove",h)),p&&U(google.maps.event.addListener(Ee,"mouseout",p)),g&&J(google.maps.event.addListener(Ee,"mouseover",g)),y&&ue(google.maps.event.addListener(Ee,"mouseup",y)),v&&pe(google.maps.event.addListener(Ee,"rightclick",v)),d&&ge(google.maps.event.addListener(Ee,"click",d)),D&&se(google.maps.event.addListener(Ee,"drag",D)),x&&we(google.maps.event.addListener(Ee,"center_changed",x)),E&&Ye(google.maps.event.addListener(Ee,"radius_changed",E)),V(Ee),O&&O(Ee),function(){_!==null&&google.maps.event.removeListener(_),T!==null&&google.maps.event.removeListener(T),z!==null&&google.maps.event.removeListener(z),k!==null&&google.maps.event.removeListener(k),H!==null&&google.maps.event.removeListener(H),C!==null&&google.maps.event.removeListener(C),F!==null&&google.maps.event.removeListener(F),Y!==null&&google.maps.event.removeListener(Y),de!==null&&google.maps.event.removeListener(de),ye!==null&&google.maps.event.removeListener(ye),fe!==null&&google.maps.event.removeListener(fe),Ve!==null&&google.maps.event.removeListener(Ve),b&&b(Ee),Ee.setMap(null)}},[]),null}c.memo(yp),function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={circle:null},n.setCircleCallback=function(){n.state.circle!==null&&n.props.onLoad&&n.props.onLoad(n.state.circle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Circle(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Pe({updaterMap:gs,eventMap:vs,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{circle:n}},this.setCircleCallback)},e.prototype.componentDidUpdate=function(n){this.state.circle!==null&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:gs,eventMap:vs,prevProps:n,nextProps:this.props,instance:this.state.circle}))},e.prototype.componentWillUnmount=function(){var n;this.state.circle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),Me(this.registeredEvents),(n=this.state.circle)===null||n===void 0||n.setMap(null))},e.prototype.render=function(){return null},e.contextType=Se,e}(c.PureComponent);var ms={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},ys={add:function(t,e){t.add(e)},addgeojson:function(t,e,n){t.addGeoJson(e,n)},contains:function(t,e){t.contains(e)},foreach:function(t,e){t.forEach(e)},loadgeojson:function(t,e,n,r){t.loadGeoJson(e,n,r)},overridestyle:function(t,e,n){t.overrideStyle(e,n)},remove:function(t,e){t.remove(e)},revertstyle:function(t,e){t.revertStyle(e)},controlposition:function(t,e){t.setControlPosition(e)},controls:function(t,e){t.setControls(e)},drawingmode:function(t,e){t.setDrawingMode(e)},map:function(t,e){t.setMap(e)},style:function(t,e){t.setStyle(e)},togeojson:function(t,e){t.toGeoJson(e)}};function Cp(t){var e=t.options,n=t.onClick,r=t.onDblClick,i=t.onMouseDown,a=t.onMouseMove,o=t.onMouseOut,s=t.onMouseOver,u=t.onMouseUp,l=t.onRightClick,f=t.onAddFeature,h=t.onRemoveFeature,p=t.onRemoveProperty,g=t.onSetGeometry,y=t.onSetProperty,v=t.onLoad,d=t.onUnmount,D=c.useContext(Se),x=c.useState(null),E=x[0],O=x[1],b=c.useState(null),w=b[0],A=b[1],M=c.useState(null),V=M[0],P=M[1],_=c.useState(null),R=_[0],N=_[1],T=c.useState(null),j=T[0],X=T[1],z=c.useState(null),$=z[0],re=z[1],k=c.useState(null),I=k[0],G=k[1],H=c.useState(null),Q=H[0],K=H[1],C=c.useState(null),U=C[0],W=C[1],F=c.useState(null),J=F[0],ne=F[1],Y=c.useState(null),ue=Y[0],ae=Y[1],de=c.useState(null),pe=de[0],Ce=de[1],ye=c.useState(null),ge=ye[0],ve=ye[1],Ne=c.useState(null),se=Ne[0],_e=Ne[1];return c.useEffect(function(){E!==null&&E.setMap(D)},[D]),c.useEffect(function(){E&&r&&(w!==null&&google.maps.event.removeListener(w),A(google.maps.event.addListener(E,"dblclick",r)))},[r]),c.useEffect(function(){E&&i&&(V!==null&&google.maps.event.removeListener(V),P(google.maps.event.addListener(E,"mousedown",i)))},[i]),c.useEffect(function(){E&&a&&(R!==null&&google.maps.event.removeListener(R),N(google.maps.event.addListener(E,"mousemove",a)))},[a]),c.useEffect(function(){E&&o&&(j!==null&&google.maps.event.removeListener(j),X(google.maps.event.addListener(E,"mouseout",o)))},[o]),c.useEffect(function(){E&&s&&($!==null&&google.maps.event.removeListener($),re(google.maps.event.addListener(E,"mouseover",s)))},[s]),c.useEffect(function(){E&&u&&(I!==null&&google.maps.event.removeListener(I),G(google.maps.event.addListener(E,"mouseup",u)))},[u]),c.useEffect(function(){E&&l&&(Q!==null&&google.maps.event.removeListener(Q),K(google.maps.event.addListener(E,"rightclick",l)))},[l]),c.useEffect(function(){E&&n&&(U!==null&&google.maps.event.removeListener(U),W(google.maps.event.addListener(E,"click",n)))},[n]),c.useEffect(function(){E&&f&&(J!==null&&google.maps.event.removeListener(J),ne(google.maps.event.addListener(E,"addfeature",f)))},[f]),c.useEffect(function(){E&&h&&(ue!==null&&google.maps.event.removeListener(ue),ae(google.maps.event.addListener(E,"removefeature",h)))},[h]),c.useEffect(function(){E&&p&&(pe!==null&&google.maps.event.removeListener(pe),Ce(google.maps.event.addListener(E,"removeproperty",p)))},[p]),c.useEffect(function(){E&&g&&(ge!==null&&google.maps.event.removeListener(ge),ve(google.maps.event.addListener(E,"setgeometry",g)))},[g]),c.useEffect(function(){E&&y&&(se!==null&&google.maps.event.removeListener(se),_e(google.maps.event.addListener(E,"setproperty",y)))},[y]),c.useEffect(function(){if(D!==null){var fe=new google.maps.Data(me(me({},e||{}),{map:D}));r&&A(google.maps.event.addListener(fe,"dblclick",r)),i&&P(google.maps.event.addListener(fe,"mousedown",i)),a&&N(google.maps.event.addListener(fe,"mousemove",a)),o&&X(google.maps.event.addListener(fe,"mouseout",o)),s&&re(google.maps.event.addListener(fe,"mouseover",s)),u&&G(google.maps.event.addListener(fe,"mouseup",u)),l&&K(google.maps.event.addListener(fe,"rightclick",l)),n&&W(google.maps.event.addListener(fe,"click",n)),f&&ne(google.maps.event.addListener(fe,"addfeature",f)),h&&ae(google.maps.event.addListener(fe,"removefeature",h)),p&&Ce(google.maps.event.addListener(fe,"removeproperty",p)),g&&ve(google.maps.event.addListener(fe,"setgeometry",g)),y&&_e(google.maps.event.addListener(fe,"setproperty",y)),O(fe),v&&v(fe)}return function(){E&&(w!==null&&google.maps.event.removeListener(w),V!==null&&google.maps.event.removeListener(V),R!==null&&google.maps.event.removeListener(R),j!==null&&google.maps.event.removeListener(j),$!==null&&google.maps.event.removeListener($),I!==null&&google.maps.event.removeListener(I),Q!==null&&google.maps.event.removeListener(Q),U!==null&&google.maps.event.removeListener(U),J!==null&&google.maps.event.removeListener(J),ue!==null&&google.maps.event.removeListener(ue),pe!==null&&google.maps.event.removeListener(pe),ge!==null&&google.maps.event.removeListener(ge),se!==null&&google.maps.event.removeListener(se),d&&d(E),E.setMap(null))}},[]),null}c.memo(Cp),function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={data:null},n.setDataCallback=function(){n.state.data!==null&&n.props.onLoad&&n.props.onLoad(n.state.data)},n}return e.prototype.componentDidMount=function(){if(this.context!==null){var n=new google.maps.Data(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Pe({updaterMap:ys,eventMap:ms,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{data:n}},this.setDataCallback)}},e.prototype.componentDidUpdate=function(n){this.state.data!==null&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:ys,eventMap:ms,prevProps:n,nextProps:this.props,instance:this.state.data}))},e.prototype.componentWillUnmount=function(){this.state.data!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),Me(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},e.prototype.render=function(){return null},e.contextType=Se,e}(c.PureComponent);var Cs={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},Ds={options:function(t,e){t.setOptions(e)},url:function(t,e){t.setUrl(e)},zIndex:function(t,e){t.setZIndex(e)}};(function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={kmlLayer:null},n.setKmlLayerCallback=function(){n.state.kmlLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.kmlLayer)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.KmlLayer(me(me({},this.props.options),{map:this.context}));this.registeredEvents=Pe({updaterMap:Ds,eventMap:Cs,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{kmlLayer:n}},this.setKmlLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.kmlLayer!==null&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:Ds,eventMap:Cs,prevProps:n,nextProps:this.props,instance:this.state.kmlLayer}))},e.prototype.componentWillUnmount=function(){this.state.kmlLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),Me(this.registeredEvents),this.state.kmlLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Se,e})(c.PureComponent);function bs(t,e){return typeof e=="function"?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function Dp(t,e){return new e(t.lat,t.lng)}function bp(t,e){return new e(new google.maps.LatLng(t.ne.lat,t.ne.lng),new google.maps.LatLng(t.sw.lat,t.sw.lng))}function Ep(t,e,n){return t instanceof e?t:n(t,e)}function wp(t,e,n){return t instanceof e?t:n(t,e)}function xp(t,e,n){var r=t&&t.fromLatLngToDivPixel(n.getNorthEast()),i=t&&t.fromLatLngToDivPixel(n.getSouthWest());return r&&i?{left:"".concat(i.x+e.x,"px"),top:"".concat(r.y+e.y,"px"),width:"".concat(r.x-i.x-e.x,"px"),height:"".concat(i.y-r.y-e.y,"px")}:{left:"-9999px",top:"-9999px"}}function Bp(t,e,n){var r=t&&t.fromLatLngToDivPixel(n);if(r){var i=r.x,a=r.y;return{left:"".concat(i+e.x,"px"),top:"".concat(a+e.y,"px")}}return{left:"-9999px",top:"-9999px"}}function Es(t,e,n,r){return n!==void 0?xp(t,e,wp(n,google.maps.LatLngBounds,bp)):Bp(t,e,Ep(r,google.maps.LatLng,Dp))}function Sp(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.height&&t.height===e.height}function Ap(t,e,n,r,i){var a=function(o){Ge(s,o);function s(u,l,f,h){var p=o.call(this)||this;return p.container=u,p.pane=l,p.position=f,p.bounds=h,p}return s.prototype.onAdd=function(){var u,l=(u=this.getPanes())===null||u===void 0?void 0:u[this.pane];l==null||l.appendChild(this.container)},s.prototype.draw=function(){for(var u=this.getProjection(),l=me({},this.container?bs(this.container,i):{x:0,y:0}),f=Es(u,l,this.bounds,this.position),h=0,p=Object.entries(f);h<p.length;h++){var g=p[h],y=g[0],v=g[1];this.container.style[y]=v}},s.prototype.onRemove=function(){this.container.parentNode!==null&&this.container.parentNode.removeChild(this.container)},s}(google.maps.OverlayView);return new a(t,e,n,r)}function ws(t){if(!t)return"";var e=t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng);return e+""}function xs(t){if(!t)return"";var e=t instanceof google.maps.LatLngBounds?t:new google.maps.LatLngBounds(new google.maps.LatLng(t.south,t.east),new google.maps.LatLng(t.north,t.west));return e+""}function Lp(t){var e=t.position,n=t.bounds,r=t.mapPaneName,i=t.zIndex,a=t.onLoad,o=t.onUnmount,s=t.getPixelPositionOffset,u=t.children,l=c.useContext(Se),f=c.useMemo(function(){var p=document.createElement("div");return p.style.position="absolute",p},[]),h=c.useMemo(function(){return Ap(f,r,e,n,s)},[f,r,e,n]);return c.useEffect(function(){return a==null||a(h),h==null||h.setMap(l),function(){o==null||o(h),h==null||h.setMap(null)}},[l,h]),c.useEffect(function(){f.style.zIndex="".concat(i)},[i,f]),So.createPortal(u,f)}c.memo(Lp),function(t){Ge(e,t);function e(n){var r=t.call(this,n)||this;r.state={paneEl:null,containerStyle:{position:"absolute"}},r.updatePane=function(){var a=r.props.mapPaneName,o=r.overlayView.getPanes();rt(!!a,"OverlayView requires props.mapPaneName but got %s",a),o?r.setState({paneEl:o[a]}):r.setState({paneEl:null})},r.onAdd=function(){var a,o;r.updatePane(),(o=(a=r.props).onLoad)===null||o===void 0||o.call(a,r.overlayView)},r.onPositionElement=function(){var a=r.overlayView.getProjection(),o=me({x:0,y:0},r.containerRef.current?bs(r.containerRef.current,r.props.getPixelPositionOffset):{}),s=Es(a,o,r.props.bounds,r.props.position),u=r.state.containerStyle,l=u.left,f=u.top,h=u.width,p=u.height;Sp(s,{left:l,top:f,width:h,height:p})||r.setState({containerStyle:{top:s.top||0,left:s.left||0,width:s.width||0,height:s.height||0,position:"absolute"}})},r.draw=function(){r.onPositionElement()},r.onRemove=function(){var a,o;r.setState(function(){return{paneEl:null}}),(o=(a=r.props).onUnmount)===null||o===void 0||o.call(a,r.overlayView)},r.containerRef=c.createRef();var i=new google.maps.OverlayView;return i.onAdd=r.onAdd,i.draw=r.draw,i.onRemove=r.onRemove,r.overlayView=i,r}return e.prototype.componentDidMount=function(){this.overlayView.setMap(this.context)},e.prototype.componentDidUpdate=function(n){var r=ws(n.position),i=ws(this.props.position),a=xs(n.bounds),o=xs(this.props.bounds);(r!==i||a!==o)&&this.overlayView.draw(),n.mapPaneName!==this.props.mapPaneName&&this.updatePane()},e.prototype.componentWillUnmount=function(){this.overlayView.setMap(null)},e.prototype.render=function(){var n=this.state.paneEl;return n?So.createPortal(B.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:c.Children.only(this.props.children)}),n):null},e.FLOAT_PANE="floatPane",e.MAP_PANE="mapPane",e.MARKER_LAYER="markerLayer",e.OVERLAY_LAYER="overlayLayer",e.OVERLAY_MOUSE_TARGET="overlayMouseTarget",e.contextType=Se,e}(c.PureComponent);function Op(){}var Bs={onDblClick:"dblclick",onClick:"click"},Ss={opacity:function(t,e){t.setOpacity(e)}};function Pp(t){var e=t.url,n=t.bounds,r=t.options,i=t.visible,a=c.useContext(Se),o=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east)),s=c.useMemo(function(){var u=new google.maps.GroundOverlay(e,o,me({},r));return u},[]);return c.useEffect(function(){s!==null&&s.setMap(a)},[a]),c.useEffect(function(){typeof e<"u"&&s!==null&&(s.set("url",e),s.setMap(a))},[s,e]),c.useEffect(function(){typeof i<"u"&&s!==null&&s.setOpacity(i?1:0)},[s,i]),c.useEffect(function(){var u=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east));typeof n<"u"&&s!==null&&(s.set("bounds",u),s.setMap(a))},[s,n]),null}c.memo(Pp),function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={groundOverlay:null},n.setGroundOverlayCallback=function(){n.state.groundOverlay!==null&&n.props.onLoad&&n.props.onLoad(n.state.groundOverlay)},n}return e.prototype.componentDidMount=function(){rt(!!this.props.url||!!this.props.bounds,"For GroundOverlay, url and bounds are passed in to constructor and are immutable after instantiated. This is the behavior of Google Maps JavaScript API v3 ( See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay) Hence, use the corresponding two props provided by `react-google-maps-api`, url and bounds. In some cases, you'll need the GroundOverlay component to reflect the changes of url and bounds. You can leverage the React's key property to remount the component. Typically, just `key={url}` would serve your need. See https://github.com/tomchentw/react-google-maps/issues/655");var n=new google.maps.GroundOverlay(this.props.url,this.props.bounds,me(me({},this.props.options),{map:this.context}));this.registeredEvents=Pe({updaterMap:Ss,eventMap:Bs,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{groundOverlay:n}},this.setGroundOverlayCallback)},e.prototype.componentDidUpdate=function(n){this.state.groundOverlay!==null&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:Ss,eventMap:Bs,prevProps:n,nextProps:this.props,instance:this.state.groundOverlay}))},e.prototype.componentWillUnmount=function(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))},e.prototype.render=function(){return null},e.defaultProps={onLoad:Op},e.contextType=Se,e}(c.PureComponent);var As={},Ls={data:function(t,e){t.setData(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)}};function Mp(t){var e=t.data,n=t.onLoad,r=t.onUnmount,i=t.options,a=c.useContext(Se),o=c.useState(null),s=o[0],u=o[1];return c.useEffect(function(){google.maps.visualization||rt(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),c.useEffect(function(){rt(!!e,"data property is required in HeatmapLayer %s",e)},[e]),c.useEffect(function(){s!==null&&s.setMap(a)},[a]),c.useEffect(function(){i&&s!==null&&s.setOptions(i)},[s,i]),c.useEffect(function(){var l=new google.maps.visualization.HeatmapLayer(me(me({},i||{}),{data:e,map:a}));return u(l),n&&n(l),function(){s!==null&&(r&&r(s),s.setMap(null))}},[]),null}c.memo(Mp),function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={heatmapLayer:null},n.setHeatmapLayerCallback=function(){n.state.heatmapLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.heatmapLayer)},n}return e.prototype.componentDidMount=function(){rt(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),rt(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var n=new google.maps.visualization.HeatmapLayer(me(me({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=Pe({updaterMap:Ls,eventMap:As,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{heatmapLayer:n}},this.setHeatmapLayerCallback)},e.prototype.componentDidUpdate=function(n){Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:Ls,eventMap:As,prevProps:n,nextProps:this.props,instance:this.state.heatmapLayer})},e.prototype.componentWillUnmount=function(){this.state.heatmapLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),Me(this.registeredEvents),this.state.heatmapLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Se,e}(c.PureComponent);var Os={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},Ps={register:function(t,e,n){t.registerPanoProvider(e,n)},links:function(t,e){t.setLinks(e)},motionTracking:function(t,e){t.setMotionTracking(e)},options:function(t,e){t.setOptions(e)},pano:function(t,e){t.setPano(e)},position:function(t,e){t.setPosition(e)},pov:function(t,e){t.setPov(e)},visible:function(t,e){t.setVisible(e)},zoom:function(t,e){t.setZoom(e)}};(function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={streetViewPanorama:null},n.setStreetViewPanoramaCallback=function(){n.state.streetViewPanorama!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewPanorama)},n}return e.prototype.componentDidMount=function(){var n,r,i=(r=(n=this.context)===null||n===void 0?void 0:n.getStreetView())!==null&&r!==void 0?r:null;this.registeredEvents=Pe({updaterMap:Ps,eventMap:Os,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{streetViewPanorama:i}},this.setStreetViewPanoramaCallback)},e.prototype.componentDidUpdate=function(n){this.state.streetViewPanorama!==null&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:Ps,eventMap:Os,prevProps:n,nextProps:this.props,instance:this.state.streetViewPanorama}))},e.prototype.componentWillUnmount=function(){this.state.streetViewPanorama!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),Me(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},e.prototype.render=function(){return null},e.contextType=Se,e})(c.PureComponent),function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={streetViewService:null},n.setStreetViewServiceCallback=function(){n.state.streetViewService!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewService)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:n}},this.setStreetViewServiceCallback)},e.prototype.componentWillUnmount=function(){this.state.streetViewService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)},e.prototype.render=function(){return null},e.contextType=Se,e}(c.PureComponent),function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={directionsService:null},n.setDirectionsServiceCallback=function(){n.state.directionsService!==null&&n.props.onLoad&&n.props.onLoad(n.state.directionsService)},n}return e.prototype.componentDidMount=function(){rt(!!this.props.options,"DirectionsService expected options object as parameter, but got %s",this.props.options);var n=new google.maps.DirectionsService;this.setState(function(){return{directionsService:n}},this.setDirectionsServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.directionsService!==null&&this.state.directionsService.route(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.directionsService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.directionsService)},e.prototype.render=function(){return null},e}(c.PureComponent);var Ms={onDirectionsChanged:"directions_changed"},Fs={directions:function(t,e){t.setDirections(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},panel:function(t,e){t.setPanel(e)},routeIndex:function(t,e){t.setRouteIndex(e)}};(function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={directionsRenderer:null},n.setDirectionsRendererCallback=function(){n.state.directionsRenderer!==null&&(n.state.directionsRenderer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.directionsRenderer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=Pe({updaterMap:Fs,eventMap:Ms,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{directionsRenderer:n}},this.setDirectionsRendererCallback)},e.prototype.componentDidUpdate=function(n){this.state.directionsRenderer!==null&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:Fs,eventMap:Ms,prevProps:n,nextProps:this.props,instance:this.state.directionsRenderer}))},e.prototype.componentWillUnmount=function(){this.state.directionsRenderer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),Me(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},e.prototype.render=function(){return B.jsx(B.Fragment,{})},e.contextType=Se,e})(c.PureComponent),function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={distanceMatrixService:null},n.setDistanceMatrixServiceCallback=function(){n.state.distanceMatrixService!==null&&n.props.onLoad&&n.props.onLoad(n.state.distanceMatrixService)},n}return e.prototype.componentDidMount=function(){rt(!!this.props.options,"DistanceMatrixService expected options object as parameter, but go %s",this.props.options);var n=new google.maps.DistanceMatrixService;this.setState(function(){return{distanceMatrixService:n}},this.setDistanceMatrixServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.distanceMatrixService!==null&&this.state.distanceMatrixService.getDistanceMatrix(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.distanceMatrixService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.distanceMatrixService)},e.prototype.render=function(){return null},e}(c.PureComponent);var ks={onPlacesChanged:"places_changed"},Ts={bounds:function(t,e){t.setBounds(e)}},Fp=function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=c.createRef(),n.state={searchBox:null},n.setSearchBoxCallback=function(){n.state.searchBox!==null&&n.props.onLoad&&n.props.onLoad(n.state.searchBox)},n}return e.prototype.componentDidMount=function(){if(rt(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places),this.containerElement!==null&&this.containerElement.current!==null){var n=this.containerElement.current.querySelector("input");if(n!==null){var r=new google.maps.places.SearchBox(n,this.props.options);this.registeredEvents=Pe({updaterMap:Ts,eventMap:ks,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{searchBox:r}},this.setSearchBoxCallback)}}},e.prototype.componentDidUpdate=function(n){this.state.searchBox!==null&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:Ts,eventMap:ks,prevProps:n,nextProps:this.props,instance:this.state.searchBox}))},e.prototype.componentWillUnmount=function(){this.state.searchBox!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),Me(this.registeredEvents))},e.prototype.render=function(){return B.jsx("div",{ref:this.containerElement,children:c.Children.only(this.props.children)})},e.contextType=Se,e}(c.PureComponent),Rs={onPlaceChanged:"place_changed"},Is={bounds:function(t,e){t.setBounds(e)},restrictions:function(t,e){t.setComponentRestrictions(e)},fields:function(t,e){t.setFields(e)},options:function(t,e){t.setOptions(e)},types:function(t,e){t.setTypes(e)}};(function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=c.createRef(),n.state={autocomplete:null},n.setAutocompleteCallback=function(){n.state.autocomplete!==null&&n.props.onLoad&&n.props.onLoad(n.state.autocomplete)},n}return e.prototype.componentDidMount=function(){var n;rt(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places);var r=(n=this.containerElement.current)===null||n===void 0?void 0:n.querySelector("input");if(r){var i=new google.maps.places.Autocomplete(r,this.props.options);this.registeredEvents=Pe({updaterMap:Is,eventMap:Rs,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{autocomplete:i}},this.setAutocompleteCallback)}},e.prototype.componentDidUpdate=function(n){Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:Is,eventMap:Rs,prevProps:n,nextProps:this.props,instance:this.state.autocomplete})},e.prototype.componentWillUnmount=function(){this.state.autocomplete!==null&&Me(this.registeredEvents)},e.prototype.render=function(){return B.jsx("div",{ref:this.containerElement,className:this.props.className,children:c.Children.only(this.props.children)})},e.defaultProps={className:""},e.contextType=Se,e})(c.PureComponent);function kp({coordinates:t,zoom:e=18,draggable:n=!1,className:r,...i}){return t?B.jsx("div",{className:"arkynGoogleMapPinned "+r,...i,children:B.jsx(Sd,{zoom:e,center:t,mapContainerStyle:{borderRadius:"var(--rounded-cards)",width:"100%",height:"100%"},children:B.jsx(Id,{draggable:n,position:t})})}):B.jsx("div",{className:"arkynGoogleMapPinnedEmpty "+r,...i,children:B.jsx(Ae.MapPinned,{})})}function Tp(t){const{className:e,...n}=t,r=`arkynSkeleton ${e}`;return B.jsx("aside",{className:r.trim(),...n})}function Rp(t){const{emptyMessage:e="Nenhum dado adicionado.",className:n,children:r,...i}=t,a=`arkynTableBody ${n}`,o=c.Children.count(r)===0;return B.jsx("tbody",{className:a.trim(),...i,children:o?B.jsx("tr",{className:"arkynTableBodyEmptyLine",children:B.jsx("td",{colSpan:100,children:B.jsx("div",{children:e})})}):r})}function Ip(t){const{className:e,children:n,...r}=t,i=`arkynTableCaption ${e}`;return B.jsx("caption",{className:i.trim(),...r,children:B.jsx("div",{className:"arkynTableCaptionContent",children:n})})}function jp(t){const{children:e,className:n,...r}=t,i=`arkynTableContainer ${n}`;return B.jsx("div",{className:i.trim(),...r,children:B.jsx("table",{children:e})})}function Np(t){const{className:e,children:n,...r}=t,i=`arkynTableFooter ${e}`;return B.jsxs("tfoot",{className:i.trim(),...r,children:[B.jsx("tr",{className:"spacingRow"}),B.jsx("tr",{children:B.jsx("th",{colSpan:100,children:B.jsx("div",{className:"arkynTableFooterContent",children:n})})})]})}function _p(t){const{className:e,children:n,...r}=t,i=`arkynTableHeader ${e}`;return B.jsxs("thead",{className:i.trim(),...r,children:[B.jsx("tr",{children:n}),B.jsx("tr",{className:"spacingRow"})]})}function zp(t){const{isLoading:e=!1,scheme:n="primary",variant:r="solid",loadingText:i,size:a="md",leftIcon:o,rightIcon:s,disabled:u,className:l="",children:f,...h}=t,g={xs:12,sm:16,md:20,lg:24}[a],d=`arkynButton ${e?"loadingTrue":"loadingFalse"} ${r} ${n} ${a} ${i?"loadingTextTrue":"loadingTextFalse"} ${l}`;return B.jsxs("button",{className:d,disabled:u||e,...h,children:[B.jsxs("div",{className:"arkynButtonSpinner",children:[B.jsx(Ae.Loader2,{size:g,strokeWidth:2.5}),i&&i]}),B.jsxs("div",{className:"arkynButtonContent",children:[wr(g,o),f,wr(g,s)]})]})}const js=c.createContext({});function Wp(t){var h,p;const e=Ln.useActionData(),{children:n,className:r,id:i,...a}=t,o=c.useRef(null),s=((h=o.current)==null?void 0:h.name)||"",u=((p=e==null?void 0:e.fieldErrors)==null?void 0:p[s])||null,l=c.useId(),f=`arkynFormController ${r}`;return B.jsx(js.Provider,{value:{error:u,id:l,inputRef:o},children:B.jsx("section",{id:i||s||void 0,className:f.trim(),...a,children:n})})}function xt(){return c.useContext(js)}function Up(t){const{name:e,className:n="",size:r="md",isError:i,defaultChecked:a=!1,checked:o=null,onCheck:s,value:u,...l}=t,{id:f,inputRef:h,error:p}=xt(),g=i||!!p,[y,v]=c.useState(a||!1),d=typeof o=="boolean"?o:y,E=`arkynCheckbox ${r} ${g?"errorTrue":"errorFalse"} ${d?"checkedTrue":"checkedFalse"} ${n}`;function O(){const b=y;v(!b),s&&s(b?"":u||"checked")}return B.jsxs("button",{id:f,type:"button",className:E,onClick:O,...l,children:[B.jsx("input",{type:"hidden",name:e,ref:h,value:d?u||"checked":""}),B.jsx(Ae.Check,{})]})}function Hp(t){const{children:e,className:n,...r}=t,i=`arkynFormError ${n}`,{error:a}=xt();return e?B.jsx("strong",{className:i.trim(),...r,children:e}):a?B.jsx("strong",{className:i.trim(),...r,children:a}):B.jsx(B.Fragment,{})}function Vp(t){const{showAsterisk:e=!1,className:n="",...r}=t,{id:i}=xt(),o=`arkynFormLabel ${e?"asteriskTrue":"asteriskFalse"} ${n}`;return B.jsx("label",{className:o.trim(),htmlFor:i,...r})}function Xt(t,e,n){if(!t)return B.jsx(B.Fragment,{});if(typeof t=="string")return B.jsx("p",{className:n,children:t});const r=t;return B.jsx("p",{className:n,children:B.jsx(r,{color:"var(--secondary-600)",size:e,strokeWidth:2.5})})}function Hi(t){return t&&t.replace(/[^0-9]/g,"")}function Ns(t,e){let n="",r=0;return Array.from(t).forEach((i,a)=>{e[a+r].match(/[0-9]/)||(n+=e[a+r],r++),n+=i}),n}function _s(t){return t.length>11?"CNPJ":"CPF"}const Vi={CPF:"999.999.999-999",CNPJ:"99.999.999/9999-99"},zs=Hi(Vi.CNPJ).length;function qp(t,e){const{isLoading:n,isError:r,size:i="md",className:a="",variant:o="solid",prefix:s,sufix:u,leftIcon:l,rightIcon:f,disabled:h,defaultValue:p,readOnly:g,onFocus:y,onBlur:v,title:d,style:D,onChange:x,...E}=t;function O(T){let j=Hi(T);const X=_s(j);if(!(j.length>zs))return j=Ns(j,Vi[X]),j}const b=f?"right":"left",_=`arkyn_input ${s?"hasPrefix":""} ${u?"hasSufix":""} ${o} ${i} ${h||g||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${a}`,N={md:20,lg:20}[i];return{isLoading:n,className:_,prefix:Xt(s,N,"prefix"),sufix:Xt(u,N,"sufix"),LeftIcon:l,RightIcon:f,defaultValue:O(p||""),disabled:h,readOnly:g,onFocus:y,onBlur:v,title:d,style:D,onChange:x,loadingPosition:b,iconSize:N,Spinner:B.jsx(Ae.Loader2,{className:"spinner",size:N,strokeWidth:2.5}),...E}}function Gp(t){const[e,n]=c.useState(!1),r=c.useRef(null),{inputRef:i,id:a,error:o}=xt(),s=i||r,u=t.isError||!!o,{disabled:l,title:f,style:h,className:p,prefix:g,sufix:y,iconSize:v,loadingPosition:d,isLoading:D,LeftIcon:x,readOnly:E,onFocus:O,onBlur:b,RightIcon:w,Spinner:A,onChange:M,value:V,defaultValue:P,..._}=qp({...t,id:a,isError:u},e),[R,N]=c.useState(P),T=x&&!D,j=w&&!D,X=d==="left"&&D,z=d==="right"&&D;function $(){l||!(s!=null&&s.current)||(n(!0),s.current.focus())}function re(G){let H=Hi(G.target.value);const Q=_s(H);H.length>zs||(H=Ns(H,Vi[Q]),G.target.value=H,N(H),M&&M(G))}function k(G){n(!0),O&&O(G)}function I(G){n(!1),b&&b(G)}return B.jsxs("section",{title:f,style:h,onClick:$,className:p,children:[g,X&&A,T&&B.jsx(x,{size:v,strokeWidth:2.5}),B.jsx("input",{disabled:l||D,readOnly:E,ref:s,value:V||R,onFocus:k,onChange:re,onBlur:I,..._}),j&&B.jsx(w,{size:v,strokeWidth:2.5}),z&&A,y]})}const Yp=3,Zp=(t="pt-BR",e,n="BRL",r=!0)=>new Intl.NumberFormat(t,{style:"currency",currency:n,currencyDisplay:"symbol",minimumFractionDigits:2,maximumFractionDigits:2}).format(e).slice(r?Yp:0),Ar=2,Ws=t=>typeof t=="number"?t:Number(t.toString().replace(/[^0-9-]/g,"")),qi=t=>{let e=t;return typeof t=="string"?(e=Ws(t),e%1!==0&&(e=e.toFixed(Ar))):e=Number.isInteger(t)?Number(t)*10**Ar:t.toFixed(Ar),Ws(e)/10**Ar},Us=(t,e,n)=>{if(!e)return[0,""];const r=qi(e),i=Zp(t,r,n);return[r,i]};function Kp(t,e){const{isLoading:n,isError:r,size:i="md",className:a="",variant:o="solid",prefix:s,sufix:u,leftIcon:l,rightIcon:f,disabled:h,readOnly:p,onFocus:g,onBlur:y,title:v,style:d,max:D=1e9,locale:x="pt-BR",currency:E="BRL",...O}=t,b=f?"right":"left",_=`arkyn_input ${s?"hasPrefix":""} ${u?"hasSufix":""} ${o} ${i} ${h||p||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${a}`,N={md:20,lg:20}[i];return{isLoading:n,className:_,prefix:Xt(s,N,"prefix"),sufix:Xt(u,N,"sufix"),LeftIcon:l,RightIcon:f,disabled:h,locale:x,currency:E,readOnly:p,onFocus:g,onBlur:y,title:v,style:d,max:D,loadingPosition:b,iconSize:N,Spinner:B.jsx(Ae.Loader2,{className:"spinner",size:N,strokeWidth:2.5}),...O}}function Xp(t){const[e,n]=c.useState(!1),[r,i]=c.useState("0"),a=c.useRef(null),{inputRef:o,id:s,error:u}=xt(),l=o||a,f=t.isError||!!u,{disabled:h,title:p,style:g,className:y,prefix:v,sufix:d,iconSize:D,loadingPosition:x,isLoading:E,LeftIcon:O,readOnly:b,onFocus:w,onBlur:A,RightIcon:M,Spinner:V,value:P,max:_,onChangeValue:R,onKeyPress:N,currency:T,locale:j,name:X,defaultValue:z,...$}=Kp({...t,id:s,isError:f},e),re=O&&!E,k=M&&!E,I=x==="left"&&E,G=x==="right"&&E;function H(){h||!(l!=null&&l.current)||(n(!0),l.current.focus())}function Q(F){n(!0),w&&w(F)}function K(F){n(!1),A&&A(F)}const C=F=>{const[J,ne]=Us(j,F,T);return!_||J<=_?(i(ne),[J,ne]):[qi(r),r]},U=F=>{F.preventDefault();const[J,ne]=C(F.target.value);R(F,String(J),String(ne))},W=F=>N&&N(F,F.key,F.key);return c.useEffect(()=>{const F=P||+z||void 0,[,J]=Us(j,F,T);i(J)},[T,z,P]),B.jsxs("section",{title:p,style:g,onClick:H,className:y,children:[v,I&&V,re&&B.jsx(O,{size:D,strokeWidth:2.5}),B.jsx("input",{value:r,onChange:U,onBlur:K,onFocus:Q,onKeyUp:W,disabled:h||E,readOnly:b,...$}),B.jsx("input",{type:"hidden",ref:l,name:X,value:qi(r)}),G&&V,k&&B.jsx(M,{size:D,strokeWidth:2.5}),d]})}function Jp(t,e){const{isLoading:n,isError:r,size:i="md",className:a="",variant:o="solid",prefix:s,sufix:u,leftIcon:l,rightIcon:f,disabled:h,readOnly:p,onFocus:g,onBlur:y,title:v,style:d,onChange:D,showMask:x=!1,type:E,...O}=t,b=f?"right":"left",_=`arkyn_input ${s?"hasPrefix":""} ${u?"hasSufix":""} ${o} ${i} ${h||p||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${a}`,N={md:20,lg:20}[i];return{isLoading:n,className:_,prefix:Xt(s,N,"prefix"),sufix:Xt(u,N,"sufix"),LeftIcon:l,RightIcon:f,disabled:h,readOnly:p,onFocus:g,onBlur:y,title:v,style:d,onChange:D,loadingPosition:b,iconSize:N,showMask:x,Spinner:B.jsx(Ae.Loader2,{className:"spinner",size:N,strokeWidth:2.5}),...O}}const Qp=c.forwardRef((t,e)=>B.jsx("input",{ref:e,...t}));function $p(t){const[e,n]=c.useState(!1),r=c.useRef(null),{inputRef:i,id:a,error:o}=xt(),s=i||r,u=t.isError||!!o,{disabled:l,title:f,style:h,className:p,prefix:g,sufix:y,iconSize:v,loadingPosition:d,isLoading:D,LeftIcon:x,readOnly:E,onFocus:O,onBlur:b,RightIcon:w,Spinner:A,...M}=Jp({...t,id:a,isError:u},e),V=x&&!D,P=w&&!D,_=d==="left"&&D,R=d==="right"&&D;function N(){l||!(s!=null&&s.current)||(n(!0),s.current.focus())}function T(X){n(!0),O&&O(X)}function j(X){n(!1),b&&b(X)}return B.jsxs("section",{title:f,style:h,onClick:N,className:p,children:[g,_&&A,V&&B.jsx(x,{size:v,strokeWidth:2.5}),B.jsx($f.InputMask,{component:Qp,ref:s,onFocus:T,onBlur:j,disabled:l,...M}),P&&B.jsx(w,{size:v,strokeWidth:2.5}),R&&A,y]})}function eh(t,e){const{isLoading:n,isError:r,size:i="md",className:a="",variant:o="solid",prefix:s,sufix:u,leftIcon:l,rightIcon:f,disabled:h,readOnly:p,onFocus:g,onBlur:y,title:v,style:d,onChange:D,...x}=t,E=f?"right":"left",V=`arkyn_input ${s?"hasPrefix":""} ${u?"hasSufix":""} ${o} ${i} ${h||p||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${a}`,_={md:20,lg:20}[i];return{isLoading:n,className:V,prefix:Xt(s,_,"prefix"),sufix:Xt(u,_,"sufix"),LeftIcon:l,RightIcon:f,disabled:h,readOnly:p,onFocus:g,onBlur:y,title:v,style:d,onChange:D,loadingPosition:E,iconSize:_,Spinner:B.jsx(Ae.Loader2,{className:"spinner",size:_,strokeWidth:2.5}),...x}}function th(t){const[e,n]=c.useState(!1),r=c.useRef(null),{inputRef:i,id:a,error:o}=xt(),s=i||r,u=t.isError||!!o,{disabled:l,title:f,style:h,className:p,prefix:g,sufix:y,iconSize:v,loadingPosition:d,isLoading:D,LeftIcon:x,readOnly:E,onFocus:O,onBlur:b,RightIcon:w,type:A,Spinner:M,...V}=eh({...t,id:a,isError:u},e),P=x&&!D,_=w&&!D,R=d==="left"&&D,N=d==="right"&&D;function T(){l||!(s!=null&&s.current)||(n(!0),s.current.focus())}function j(z){n(!0),O&&O(z)}function X(z){n(!1),b&&b(z)}return A==="hidden"?B.jsx("input",{style:{display:"none"},readOnly:!0,type:"text",ref:s,...V}):B.jsxs("section",{title:f,style:h,onClick:T,className:p,children:[g,R&&M,P&&B.jsx(x,{size:v,strokeWidth:2.5}),B.jsx("input",{disabled:l||D,readOnly:E,ref:s,onFocus:j,onBlur:X,type:A,...V}),_&&B.jsx(w,{size:v,strokeWidth:2.5}),N&&M,y]})}function Hs(t){return t.type==="currency"?B.jsx(Xp,{...t}):t.type==="masked"?B.jsx($p,{...t}):t.type==="cpf-cnpj"?B.jsx(Gp,{...t}):B.jsx(th,{...t})}function nh({onChange:t,onPlaceChanged:e,options:n,...r}){const[i,a]=c.useState(null),o=u=>a(u),s=()=>{var g,y,v,d;const l=i.getPlaces()[0],f=l==null?void 0:l.address_components;function h(D){const x=f.find(E=>E.types[0]===D);return x?x.long_name:""}function p(D){const x=f.find(E=>E.types[0]===D);return x?x.short_name:""}if(l){const D=h("route"),x=h("street_number"),E=h("sublocality_level_1"),O=h("administrative_area_level_2"),b=h("administrative_area_level_1"),w=p("administrative_area_level_1"),A=h("postal_code"),M=(y=(g=l.geometry)==null?void 0:g.location)==null?void 0:y.lat(),V=(d=(v=l.geometry)==null?void 0:v.location)==null?void 0:d.lng();e&&e({street:D,city:O,state:b,district:E,cep:A,streetNumber:x,stateShortName:w,coordinates:{lat:M,lng:V}})}};return B.jsx(Fp,{onLoad:o,onPlacesChanged:s,options:n,children:B.jsx(Hs,{type:"text",onChange:u=>t(u.target.value),...r})})}function rh(t){const{isLoading:e=!1,scheme:n="primary",variant:r="solid",size:i="md",icon:a,disabled:o,className:s="",...u}=t,l={xs:12,sm:16,md:20,lg:24},h=`arkynIconButton ${r} ${n} ${i} ${e?"loadingTrue":"loadingFalse"} ${s}`;return B.jsxs("button",{disabled:o||e,className:h.trim(),...u,children:[B.jsx("div",{className:"arkynIconButtonSpinner",children:B.jsx(Ae.Loader2,{size:l[i],strokeWidth:2.5})}),B.jsx("div",{className:"arkynIconButtonContent",children:B.jsx(a,{size:l[i],strokeWidth:2.5})})]})}const Vs=c.createContext({});function ih(){return c.useContext(Vs)}function ah(t){const{defaultValue:e,name:n,value:r,onChange:i,size:a="md",className:o="",...s}=t,[u,l]=c.useState(e||""),{inputRef:f,id:h}=xt();function p(y){l(y),i&&i(y)}const g=`arkynRadioGroup ${a} ${o}`;return B.jsxs(Vs.Provider,{value:{onChange:p,value:r||u,size:a},children:[B.jsx("input",{style:{display:"none"},type:"text",id:h,readOnly:!0,name:n,ref:f,value:r||u}),B.jsx("div",{className:g.trim(),...s})]})}function oh(t){const{value:e,size:n,disabled:r,children:i,className:a="",...o}=t,{onChange:s,size:u,value:l}=ih(),{error:f}=xt(),v=`arkynRadioBox ${n||u} ${l===e?"checkedTrue":"checkedFalse"} ${f?"errorTrue":"errorFalse"} ${r?"disabledTrue":"disabledFalse"} ${a}`;return B.jsxs("label",{className:v.trim(),children:[B.jsx("button",{type:"button",disabled:r,onClick:()=>s(e),onFocus:()=>s(e),...o}),i]})}var Wt={};Object.defineProperty(Wt,"__esModule",{value:!0});for(var sh=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),Gi={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},qs={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:sh?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},Yi={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},Lr=1;Lr<20;Lr++)Yi["f"+Lr]=111+Lr;function Or(t,e,n){e&&!("byKey"in e)&&(n=e,e=null),Array.isArray(t)||(t=[t]);var r=t.map(function(o){return Gs(o,e)}),i=function(s){return r.some(function(u){return Ys(u,s)})},a=n==null?i:i(n);return a}function uh(t,e){return Or(t,e)}function lh(t,e){return Or(t,{byKey:!0},e)}function Gs(t,e){var n=e&&e.byKey,r={};t=t.replace("++","+add");var i=t.split("+"),a=i.length;for(var o in Gi)r[Gi[o]]=!1;var s=!0,u=!1,l=void 0;try{for(var f=i[Symbol.iterator](),h;!(s=(h=f.next()).done);s=!0){var p=h.value,g=p.endsWith("?")&&p.length>1;g&&(p=p.slice(0,-1));var y=Zi(p),v=Gi[y];if(p.length>1&&!v&&!qs[p]&&!Yi[y])throw new TypeError('Unknown modifier: "'+p+'"');(a===1||!v)&&(n?r.key=y:r.which=Zs(p)),v&&(r[v]=g?null:!0)}}catch(d){u=!0,l=d}finally{try{!s&&f.return&&f.return()}finally{if(u)throw l}}return r}function Ys(t,e){for(var n in t){var r=t[n],i=void 0;if(r!=null&&(n==="key"&&e.key!=null?i=e.key.toLowerCase():n==="which"?i=r===91&&e.which===93?91:e.which:i=e[n],!(i==null&&r===!1)&&i!==r))return!1}return!0}function Zs(t){t=Zi(t);var e=Yi[t]||t.toUpperCase().charCodeAt(0);return e}function Zi(t){return t=t.toLowerCase(),t=qs[t]||t,t}var ch=Wt.default=Or,Ki=Wt.isHotkey=Or;Wt.isCodeHotkey=uh,Wt.isKeyHotkey=lh,Wt.parseHotkey=Gs,Wt.compareHotkey=Ys,Wt.toKeyCode=Zs,Wt.toKeyName=Zi;/*!
71
+ </svg>`,s=`Cluster of ${e} markers`,u=Number(google.maps.Marker.MAX_ZINDEX)+e;if(wt.isAdvancedMarkerAvailable(i)){const h=new DOMParser().parseFromString(o,"image/svg+xml").documentElement;h.setAttribute("transform","translate(0 25)");const p={map:i,position:n,zIndex:u,title:s,content:h};return new google.maps.marker.AdvancedMarkerElement(p)}const l={position:n,zIndex:u,title:s,icon:{url:`data:image/svg+xml;base64,${btoa(o)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(l)}}function up(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class Ui{constructor(){up(Ui,google.maps.OverlayView)}}var Yn;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(Yn||(Yn={}));const lp=(t,e,n)=>{n.fitBounds(e.bounds)};class cp extends Ui{constructor({map:e,markers:n=[],algorithmOptions:r={},algorithm:i=new ap(r),renderer:a=new sp,onClusterClick:o=lp}){super(),this.markers=[...n],this.clusters=[],this.algorithm=i,this.renderer=a,this.onClusterClick=o,e&&this.setMap(e)}addMarker(e,n){this.markers.includes(e)||(this.markers.push(e),n||this.render())}addMarkers(e,n){e.forEach(r=>{this.addMarker(r,!0)}),n||this.render()}removeMarker(e,n){const r=this.markers.indexOf(e);return r===-1?!1:(wt.setMap(e,null),this.markers.splice(r,1),n||this.render(),!0)}removeMarkers(e,n){let r=!1;return e.forEach(i=>{r=this.removeMarker(i,!0)||r}),r&&!n&&this.render(),r}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,Yn.CLUSTERING_BEGIN,this);const{clusters:n,changed:r}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(r||r==null){const i=new Set;for(const o of n)o.markers.length==1&&i.add(o.markers[0]);const a=[];for(const o of this.clusters)o.marker!=null&&(o.markers.length==1?i.has(o.marker)||wt.setMap(o.marker,null):a.push(o.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>a.forEach(o=>wt.setMap(o,null)))}google.maps.event.trigger(this,Yn.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>wt.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new op(this.markers,this.clusters),n=this.getMap();this.clusters.forEach(r=>{r.markers.length===1?r.marker=r.markers[0]:(r.marker=this.renderer.render(r,e,n),r.markers.forEach(i=>wt.setMap(i,null)),this.onClusterClick&&r.marker.addListener("click",i=>{google.maps.event.trigger(this,Yn.CLUSTER_CLICK,r),this.onClusterClick(i,r,n)})),wt.setMap(r.marker,n)})}}function fp(t){var e=Dd(),n=c.useState(null),r=n[0],i=n[1];return c.useEffect(function(){if(e&&r===null){var a=new cp(me(me({},t),{map:e}));i(a)}},[e]),r}function dp(t){var e=t.children,n=t.options,r=fp(n);return r!==null?e(r):null}c.memo(dp);var ss={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},us={options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},zIndex:function(t,e){t.setZIndex(e)}};function pp(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,a=t.zIndex,o=t.onCloseClick,s=t.onDomReady,u=t.onContentChanged,l=t.onPositionChanged,f=t.onZindexChanged,h=t.onLoad,p=t.onUnmount,g=c.useContext(Se),y=c.useState(null),v=y[0],d=y[1],D=c.useState(null),x=D[0],E=D[1],O=c.useState(null),b=O[0],w=O[1],A=c.useState(null),M=A[0],V=A[1],P=c.useState(null),_=P[0],R=P[1],N=c.useState(null),T=N[0],j=N[1],X=c.useRef(null);return c.useEffect(function(){v!==null&&(v.close(),n?v.open(g,n):v.getPosition()&&v.open(g))},[g,v,n]),c.useEffect(function(){r&&v!==null&&v.setOptions(r)},[v,r]),c.useEffect(function(){i&&v!==null&&v.setPosition(i)},[i]),c.useEffect(function(){typeof a=="number"&&v!==null&&v.setZIndex(a)},[a]),c.useEffect(function(){v&&o&&(x!==null&&google.maps.event.removeListener(x),E(google.maps.event.addListener(v,"closeclick",o)))},[o]),c.useEffect(function(){v&&s&&(b!==null&&google.maps.event.removeListener(b),w(google.maps.event.addListener(v,"domready",s)))},[s]),c.useEffect(function(){v&&u&&(M!==null&&google.maps.event.removeListener(M),V(google.maps.event.addListener(v,"content_changed",u)))},[u]),c.useEffect(function(){v&&l&&(_!==null&&google.maps.event.removeListener(_),R(google.maps.event.addListener(v,"position_changed",l)))},[l]),c.useEffect(function(){v&&f&&(T!==null&&google.maps.event.removeListener(T),j(google.maps.event.addListener(v,"zindex_changed",f)))},[f]),c.useEffect(function(){var z=new google.maps.InfoWindow(me({},r||{}));return d(z),X.current=document.createElement("div"),o&&E(google.maps.event.addListener(z,"closeclick",o)),s&&w(google.maps.event.addListener(z,"domready",s)),u&&V(google.maps.event.addListener(z,"content_changed",u)),l&&R(google.maps.event.addListener(z,"position_changed",l)),f&&j(google.maps.event.addListener(z,"zindex_changed",f)),z.setContent(X.current),i&&z.setPosition(i),a&&z.setZIndex(a),n?z.open(g,n):z.getPosition()?z.open(g):rt(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),h&&h(z),function(){x&&google.maps.event.removeListener(x),M&&google.maps.event.removeListener(M),b&&google.maps.event.removeListener(b),_&&google.maps.event.removeListener(_),T&&google.maps.event.removeListener(T),p&&p(z),z.close()}},[]),X.current?Yt.createPortal(c.Children.only(e),X.current):null}c.memo(pp),function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoWindow:null},n.open=function(r,i){i?r.open(n.context,i):r.getPosition()?r.open(n.context):rt(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>.")},n.setInfoWindowCallback=function(){n.state.infoWindow!==null&&n.containerElement!==null&&(n.state.infoWindow.setContent(n.containerElement),n.open(n.state.infoWindow,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoWindow))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.InfoWindow(me({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=Pe({updaterMap:us,eventMap:ss,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{infoWindow:n}},this.setInfoWindowCallback)},e.prototype.componentDidUpdate=function(n){this.state.infoWindow!==null&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:us,eventMap:ss,prevProps:n,nextProps:this.props,instance:this.state.infoWindow}))},e.prototype.componentWillUnmount=function(){this.state.infoWindow!==null&&(Me(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())},e.prototype.render=function(){return this.containerElement?Yt.createPortal(c.Children.only(this.props.children),this.containerElement):null},e.contextType=Se,e}(c.PureComponent);var ls={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},cs={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},visible:function(t,e){t.setVisible(e)}},hp={};function vp(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,a=t.path,o=t.onDblClick,s=t.onDragEnd,u=t.onDragStart,l=t.onMouseDown,f=t.onMouseMove,h=t.onMouseOut,p=t.onMouseOver,g=t.onMouseUp,y=t.onRightClick,v=t.onClick,d=t.onDrag,D=t.onLoad,x=t.onUnmount,E=c.useContext(Se),O=c.useState(null),b=O[0],w=O[1],A=c.useState(null),M=A[0],V=A[1],P=c.useState(null),_=P[0],R=P[1],N=c.useState(null),T=N[0],j=N[1],X=c.useState(null),z=X[0],$=X[1],re=c.useState(null),k=re[0],I=re[1],G=c.useState(null),H=G[0],Q=G[1],K=c.useState(null),C=K[0],U=K[1],W=c.useState(null),F=W[0],J=W[1],ne=c.useState(null),Y=ne[0],ue=ne[1],ae=c.useState(null),de=ae[0],pe=ae[1],Ce=c.useState(null),ye=Ce[0],ge=Ce[1];return c.useEffect(function(){b!==null&&b.setMap(E)},[E]),c.useEffect(function(){typeof e<"u"&&b!==null&&b.setOptions(e)},[b,e]),c.useEffect(function(){typeof n<"u"&&b!==null&&b.setDraggable(n)},[b,n]),c.useEffect(function(){typeof r<"u"&&b!==null&&b.setEditable(r)},[b,r]),c.useEffect(function(){typeof i<"u"&&b!==null&&b.setVisible(i)},[b,i]),c.useEffect(function(){typeof a<"u"&&b!==null&&b.setPath(a)},[b,a]),c.useEffect(function(){b&&o&&(M!==null&&google.maps.event.removeListener(M),V(google.maps.event.addListener(b,"dblclick",o)))},[o]),c.useEffect(function(){b&&s&&(_!==null&&google.maps.event.removeListener(_),R(google.maps.event.addListener(b,"dragend",s)))},[s]),c.useEffect(function(){b&&u&&(T!==null&&google.maps.event.removeListener(T),j(google.maps.event.addListener(b,"dragstart",u)))},[u]),c.useEffect(function(){b&&l&&(z!==null&&google.maps.event.removeListener(z),$(google.maps.event.addListener(b,"mousedown",l)))},[l]),c.useEffect(function(){b&&f&&(k!==null&&google.maps.event.removeListener(k),I(google.maps.event.addListener(b,"mousemove",f)))},[f]),c.useEffect(function(){b&&h&&(H!==null&&google.maps.event.removeListener(H),Q(google.maps.event.addListener(b,"mouseout",h)))},[h]),c.useEffect(function(){b&&p&&(C!==null&&google.maps.event.removeListener(C),U(google.maps.event.addListener(b,"mouseover",p)))},[p]),c.useEffect(function(){b&&g&&(F!==null&&google.maps.event.removeListener(F),J(google.maps.event.addListener(b,"mouseup",g)))},[g]),c.useEffect(function(){b&&y&&(Y!==null&&google.maps.event.removeListener(Y),ue(google.maps.event.addListener(b,"rightclick",y)))},[y]),c.useEffect(function(){b&&v&&(de!==null&&google.maps.event.removeListener(de),pe(google.maps.event.addListener(b,"click",v)))},[v]),c.useEffect(function(){b&&d&&(ye!==null&&google.maps.event.removeListener(ye),ge(google.maps.event.addListener(b,"drag",d)))},[d]),c.useEffect(function(){var ve=new google.maps.Polyline(me(me({},e||hp),{map:E}));return a&&ve.setPath(a),typeof i<"u"&&ve.setVisible(i),typeof r<"u"&&ve.setEditable(r),typeof n<"u"&&ve.setDraggable(n),o&&V(google.maps.event.addListener(ve,"dblclick",o)),s&&R(google.maps.event.addListener(ve,"dragend",s)),u&&j(google.maps.event.addListener(ve,"dragstart",u)),l&&$(google.maps.event.addListener(ve,"mousedown",l)),f&&I(google.maps.event.addListener(ve,"mousemove",f)),h&&Q(google.maps.event.addListener(ve,"mouseout",h)),p&&U(google.maps.event.addListener(ve,"mouseover",p)),g&&J(google.maps.event.addListener(ve,"mouseup",g)),y&&ue(google.maps.event.addListener(ve,"rightclick",y)),v&&pe(google.maps.event.addListener(ve,"click",v)),d&&ge(google.maps.event.addListener(ve,"drag",d)),w(ve),D&&D(ve),function(){M!==null&&google.maps.event.removeListener(M),_!==null&&google.maps.event.removeListener(_),T!==null&&google.maps.event.removeListener(T),z!==null&&google.maps.event.removeListener(z),k!==null&&google.maps.event.removeListener(k),H!==null&&google.maps.event.removeListener(H),C!==null&&google.maps.event.removeListener(C),F!==null&&google.maps.event.removeListener(F),Y!==null&&google.maps.event.removeListener(Y),de!==null&&google.maps.event.removeListener(de),x&&x(ve),ve.setMap(null)}},[]),null}c.memo(vp),function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polyline:null},n.setPolylineCallback=function(){n.state.polyline!==null&&n.props.onLoad&&n.props.onLoad(n.state.polyline)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polyline(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Pe({updaterMap:cs,eventMap:ls,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polyline:n}},this.setPolylineCallback)},e.prototype.componentDidUpdate=function(n){this.state.polyline!==null&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:cs,eventMap:ls,prevProps:n,nextProps:this.props,instance:this.state.polyline}))},e.prototype.componentWillUnmount=function(){this.state.polyline!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),Me(this.registeredEvents),this.state.polyline.setMap(null))},e.prototype.render=function(){return null},e.contextType=Se,e}(c.PureComponent);var fs={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},ds={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},paths:function(t,e){t.setPaths(e)},visible:function(t,e){t.setVisible(e)}};function gp(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,a=t.path,o=t.paths,s=t.onDblClick,u=t.onDragEnd,l=t.onDragStart,f=t.onMouseDown,h=t.onMouseMove,p=t.onMouseOut,g=t.onMouseOver,y=t.onMouseUp,v=t.onRightClick,d=t.onClick,D=t.onDrag,x=t.onLoad,E=t.onUnmount,O=t.onEdit,b=c.useContext(Se),w=c.useState(null),A=w[0],M=w[1],V=c.useState(null),P=V[0],_=V[1],R=c.useState(null),N=R[0],T=R[1],j=c.useState(null),X=j[0],z=j[1],$=c.useState(null),re=$[0],k=$[1],I=c.useState(null),G=I[0],H=I[1],Q=c.useState(null),K=Q[0],C=Q[1],U=c.useState(null),W=U[0],F=U[1],J=c.useState(null),ne=J[0],Y=J[1],ue=c.useState(null),ae=ue[0],de=ue[1],pe=c.useState(null),Ce=pe[0],ye=pe[1],ge=c.useState(null),ve=ge[0],Ne=ge[1];return c.useEffect(function(){A!==null&&A.setMap(b)},[b]),c.useEffect(function(){typeof e<"u"&&A!==null&&A.setOptions(e)},[A,e]),c.useEffect(function(){typeof n<"u"&&A!==null&&A.setDraggable(n)},[A,n]),c.useEffect(function(){typeof r<"u"&&A!==null&&A.setEditable(r)},[A,r]),c.useEffect(function(){typeof i<"u"&&A!==null&&A.setVisible(i)},[A,i]),c.useEffect(function(){typeof a<"u"&&A!==null&&A.setPath(a)},[A,a]),c.useEffect(function(){typeof o<"u"&&A!==null&&A.setPaths(o)},[A,o]),c.useEffect(function(){A&&s&&(P!==null&&google.maps.event.removeListener(P),_(google.maps.event.addListener(A,"dblclick",s)))},[s]),c.useEffect(function(){A&&(google.maps.event.addListener(A.getPath(),"insert_at",function(){O==null||O(A)}),google.maps.event.addListener(A.getPath(),"set_at",function(){O==null||O(A)}))},[A,O]),c.useEffect(function(){A&&u&&(N!==null&&google.maps.event.removeListener(N),T(google.maps.event.addListener(A,"dragend",u)))},[u]),c.useEffect(function(){A&&l&&(X!==null&&google.maps.event.removeListener(X),z(google.maps.event.addListener(A,"dragstart",l)))},[l]),c.useEffect(function(){A&&f&&(re!==null&&google.maps.event.removeListener(re),k(google.maps.event.addListener(A,"mousedown",f)))},[f]),c.useEffect(function(){A&&h&&(G!==null&&google.maps.event.removeListener(G),H(google.maps.event.addListener(A,"mousemove",h)))},[h]),c.useEffect(function(){A&&p&&(K!==null&&google.maps.event.removeListener(K),C(google.maps.event.addListener(A,"mouseout",p)))},[p]),c.useEffect(function(){A&&g&&(W!==null&&google.maps.event.removeListener(W),F(google.maps.event.addListener(A,"mouseover",g)))},[g]),c.useEffect(function(){A&&y&&(ne!==null&&google.maps.event.removeListener(ne),Y(google.maps.event.addListener(A,"mouseup",y)))},[y]),c.useEffect(function(){A&&v&&(ae!==null&&google.maps.event.removeListener(ae),de(google.maps.event.addListener(A,"rightclick",v)))},[v]),c.useEffect(function(){A&&d&&(Ce!==null&&google.maps.event.removeListener(Ce),ye(google.maps.event.addListener(A,"click",d)))},[d]),c.useEffect(function(){A&&D&&(ve!==null&&google.maps.event.removeListener(ve),Ne(google.maps.event.addListener(A,"drag",D)))},[D]),c.useEffect(function(){var se=new google.maps.Polygon(me(me({},e||{}),{map:b}));return a&&se.setPath(a),o&&se.setPaths(o),typeof i<"u"&&se.setVisible(i),typeof r<"u"&&se.setEditable(r),typeof n<"u"&&se.setDraggable(n),s&&_(google.maps.event.addListener(se,"dblclick",s)),u&&T(google.maps.event.addListener(se,"dragend",u)),l&&z(google.maps.event.addListener(se,"dragstart",l)),f&&k(google.maps.event.addListener(se,"mousedown",f)),h&&H(google.maps.event.addListener(se,"mousemove",h)),p&&C(google.maps.event.addListener(se,"mouseout",p)),g&&F(google.maps.event.addListener(se,"mouseover",g)),y&&Y(google.maps.event.addListener(se,"mouseup",y)),v&&de(google.maps.event.addListener(se,"rightclick",v)),d&&ye(google.maps.event.addListener(se,"click",d)),D&&Ne(google.maps.event.addListener(se,"drag",D)),M(se),x&&x(se),function(){P!==null&&google.maps.event.removeListener(P),N!==null&&google.maps.event.removeListener(N),X!==null&&google.maps.event.removeListener(X),re!==null&&google.maps.event.removeListener(re),G!==null&&google.maps.event.removeListener(G),K!==null&&google.maps.event.removeListener(K),W!==null&&google.maps.event.removeListener(W),ne!==null&&google.maps.event.removeListener(ne),ae!==null&&google.maps.event.removeListener(ae),Ce!==null&&google.maps.event.removeListener(Ce),E&&E(se),se.setMap(null)}},[]),null}c.memo(gp),function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polygon:null},n.setPolygonCallback=function(){n.state.polygon!==null&&n.props.onLoad&&n.props.onLoad(n.state.polygon)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polygon(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Pe({updaterMap:ds,eventMap:fs,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polygon:n}},this.setPolygonCallback)},e.prototype.componentDidUpdate=function(n){this.state.polygon!==null&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:ds,eventMap:fs,prevProps:n,nextProps:this.props,instance:this.state.polygon}))},e.prototype.componentWillUnmount=function(){this.state.polygon!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),Me(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},e.prototype.render=function(){return null},e.contextType=Se,e}(c.PureComponent);var ps={onBoundsChanged:"bounds_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},hs={bounds:function(t,e){t.setBounds(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},visible:function(t,e){t.setVisible(e)}};function mp(t){var e=t.options,n=t.bounds,r=t.draggable,i=t.editable,a=t.visible,o=t.onDblClick,s=t.onDragEnd,u=t.onDragStart,l=t.onMouseDown,f=t.onMouseMove,h=t.onMouseOut,p=t.onMouseOver,g=t.onMouseUp,y=t.onRightClick,v=t.onClick,d=t.onDrag,D=t.onBoundsChanged,x=t.onLoad,E=t.onUnmount,O=c.useContext(Se),b=c.useState(null),w=b[0],A=b[1],M=c.useState(null),V=M[0],P=M[1],_=c.useState(null),R=_[0],N=_[1],T=c.useState(null),j=T[0],X=T[1],z=c.useState(null),$=z[0],re=z[1],k=c.useState(null),I=k[0],G=k[1],H=c.useState(null),Q=H[0],K=H[1],C=c.useState(null),U=C[0],W=C[1],F=c.useState(null),J=F[0],ne=F[1],Y=c.useState(null),ue=Y[0],ae=Y[1],de=c.useState(null),pe=de[0],Ce=de[1],ye=c.useState(null),ge=ye[0],ve=ye[1],Ne=c.useState(null),se=Ne[0],_e=Ne[1];return c.useEffect(function(){w!==null&&w.setMap(O)},[O]),c.useEffect(function(){typeof e<"u"&&w!==null&&w.setOptions(e)},[w,e]),c.useEffect(function(){typeof r<"u"&&w!==null&&w.setDraggable(r)},[w,r]),c.useEffect(function(){typeof i<"u"&&w!==null&&w.setEditable(i)},[w,i]),c.useEffect(function(){typeof a<"u"&&w!==null&&w.setVisible(a)},[w,a]),c.useEffect(function(){typeof n<"u"&&w!==null&&w.setBounds(n)},[w,n]),c.useEffect(function(){w&&o&&(V!==null&&google.maps.event.removeListener(V),P(google.maps.event.addListener(w,"dblclick",o)))},[o]),c.useEffect(function(){w&&s&&(R!==null&&google.maps.event.removeListener(R),N(google.maps.event.addListener(w,"dragend",s)))},[s]),c.useEffect(function(){w&&u&&(j!==null&&google.maps.event.removeListener(j),X(google.maps.event.addListener(w,"dragstart",u)))},[u]),c.useEffect(function(){w&&l&&($!==null&&google.maps.event.removeListener($),re(google.maps.event.addListener(w,"mousedown",l)))},[l]),c.useEffect(function(){w&&f&&(I!==null&&google.maps.event.removeListener(I),G(google.maps.event.addListener(w,"mousemove",f)))},[f]),c.useEffect(function(){w&&h&&(Q!==null&&google.maps.event.removeListener(Q),K(google.maps.event.addListener(w,"mouseout",h)))},[h]),c.useEffect(function(){w&&p&&(U!==null&&google.maps.event.removeListener(U),W(google.maps.event.addListener(w,"mouseover",p)))},[p]),c.useEffect(function(){w&&g&&(J!==null&&google.maps.event.removeListener(J),ne(google.maps.event.addListener(w,"mouseup",g)))},[g]),c.useEffect(function(){w&&y&&(ue!==null&&google.maps.event.removeListener(ue),ae(google.maps.event.addListener(w,"rightclick",y)))},[y]),c.useEffect(function(){w&&v&&(pe!==null&&google.maps.event.removeListener(pe),Ce(google.maps.event.addListener(w,"click",v)))},[v]),c.useEffect(function(){w&&d&&(ge!==null&&google.maps.event.removeListener(ge),ve(google.maps.event.addListener(w,"drag",d)))},[d]),c.useEffect(function(){w&&D&&(se!==null&&google.maps.event.removeListener(se),_e(google.maps.event.addListener(w,"bounds_changed",D)))},[D]),c.useEffect(function(){var fe=new google.maps.Rectangle(me(me({},e||{}),{map:O}));return typeof a<"u"&&fe.setVisible(a),typeof i<"u"&&fe.setEditable(i),typeof r<"u"&&fe.setDraggable(r),typeof n<"u"&&fe.setBounds(n),o&&P(google.maps.event.addListener(fe,"dblclick",o)),s&&N(google.maps.event.addListener(fe,"dragend",s)),u&&X(google.maps.event.addListener(fe,"dragstart",u)),l&&re(google.maps.event.addListener(fe,"mousedown",l)),f&&G(google.maps.event.addListener(fe,"mousemove",f)),h&&K(google.maps.event.addListener(fe,"mouseout",h)),p&&W(google.maps.event.addListener(fe,"mouseover",p)),g&&ne(google.maps.event.addListener(fe,"mouseup",g)),y&&ae(google.maps.event.addListener(fe,"rightclick",y)),v&&Ce(google.maps.event.addListener(fe,"click",v)),d&&ve(google.maps.event.addListener(fe,"drag",d)),D&&_e(google.maps.event.addListener(fe,"bounds_changed",D)),A(fe),x&&x(fe),function(){V!==null&&google.maps.event.removeListener(V),R!==null&&google.maps.event.removeListener(R),j!==null&&google.maps.event.removeListener(j),$!==null&&google.maps.event.removeListener($),I!==null&&google.maps.event.removeListener(I),Q!==null&&google.maps.event.removeListener(Q),U!==null&&google.maps.event.removeListener(U),J!==null&&google.maps.event.removeListener(J),ue!==null&&google.maps.event.removeListener(ue),pe!==null&&google.maps.event.removeListener(pe),ge!==null&&google.maps.event.removeListener(ge),se!==null&&google.maps.event.removeListener(se),E&&E(fe),fe.setMap(null)}},[]),null}c.memo(mp),function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={rectangle:null},n.setRectangleCallback=function(){n.state.rectangle!==null&&n.props.onLoad&&n.props.onLoad(n.state.rectangle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Rectangle(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Pe({updaterMap:hs,eventMap:ps,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{rectangle:n}},this.setRectangleCallback)},e.prototype.componentDidUpdate=function(n){this.state.rectangle!==null&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:hs,eventMap:ps,prevProps:n,nextProps:this.props,instance:this.state.rectangle}))},e.prototype.componentWillUnmount=function(){this.state.rectangle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),Me(this.registeredEvents),this.state.rectangle.setMap(null))},e.prototype.render=function(){return null},e.contextType=Se,e}(c.PureComponent);var vs={onCenterChanged:"center_changed",onRadiusChanged:"radius_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},gs={center:function(t,e){t.setCenter(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},radius:function(t,e){t.setRadius(e)},visible:function(t,e){t.setVisible(e)}},yp={};function Cp(t){var e=t.options,n=t.center,r=t.radius,i=t.draggable,a=t.editable,o=t.visible,s=t.onDblClick,u=t.onDragEnd,l=t.onDragStart,f=t.onMouseDown,h=t.onMouseMove,p=t.onMouseOut,g=t.onMouseOver,y=t.onMouseUp,v=t.onRightClick,d=t.onClick,D=t.onDrag,x=t.onCenterChanged,E=t.onRadiusChanged,O=t.onLoad,b=t.onUnmount,w=c.useContext(Se),A=c.useState(null),M=A[0],V=A[1],P=c.useState(null),_=P[0],R=P[1],N=c.useState(null),T=N[0],j=N[1],X=c.useState(null),z=X[0],$=X[1],re=c.useState(null),k=re[0],I=re[1],G=c.useState(null),H=G[0],Q=G[1],K=c.useState(null),C=K[0],U=K[1],W=c.useState(null),F=W[0],J=W[1],ne=c.useState(null),Y=ne[0],ue=ne[1],ae=c.useState(null),de=ae[0],pe=ae[1],Ce=c.useState(null),ye=Ce[0],ge=Ce[1],ve=c.useState(null),Ne=ve[0],se=ve[1],_e=c.useState(null),fe=_e[0],we=_e[1],ke=c.useState(null),Ve=ke[0],Ye=ke[1];return c.useEffect(function(){M!==null&&M.setMap(w)},[w]),c.useEffect(function(){typeof e<"u"&&M!==null&&M.setOptions(e)},[M,e]),c.useEffect(function(){typeof i<"u"&&M!==null&&M.setDraggable(i)},[M,i]),c.useEffect(function(){typeof a<"u"&&M!==null&&M.setEditable(a)},[M,a]),c.useEffect(function(){typeof o<"u"&&M!==null&&M.setVisible(o)},[M,o]),c.useEffect(function(){typeof r=="number"&&M!==null&&M.setRadius(r)},[M,r]),c.useEffect(function(){typeof n<"u"&&M!==null&&M.setCenter(n)},[M,n]),c.useEffect(function(){M&&s&&(_!==null&&google.maps.event.removeListener(_),R(google.maps.event.addListener(M,"dblclick",s)))},[s]),c.useEffect(function(){M&&u&&(T!==null&&google.maps.event.removeListener(T),j(google.maps.event.addListener(M,"dragend",u)))},[u]),c.useEffect(function(){M&&l&&(z!==null&&google.maps.event.removeListener(z),$(google.maps.event.addListener(M,"dragstart",l)))},[l]),c.useEffect(function(){M&&f&&(k!==null&&google.maps.event.removeListener(k),I(google.maps.event.addListener(M,"mousedown",f)))},[f]),c.useEffect(function(){M&&h&&(H!==null&&google.maps.event.removeListener(H),Q(google.maps.event.addListener(M,"mousemove",h)))},[h]),c.useEffect(function(){M&&p&&(C!==null&&google.maps.event.removeListener(C),U(google.maps.event.addListener(M,"mouseout",p)))},[p]),c.useEffect(function(){M&&g&&(F!==null&&google.maps.event.removeListener(F),J(google.maps.event.addListener(M,"mouseover",g)))},[g]),c.useEffect(function(){M&&y&&(Y!==null&&google.maps.event.removeListener(Y),ue(google.maps.event.addListener(M,"mouseup",y)))},[y]),c.useEffect(function(){M&&v&&(de!==null&&google.maps.event.removeListener(de),pe(google.maps.event.addListener(M,"rightclick",v)))},[v]),c.useEffect(function(){M&&d&&(ye!==null&&google.maps.event.removeListener(ye),ge(google.maps.event.addListener(M,"click",d)))},[d]),c.useEffect(function(){M&&D&&(Ne!==null&&google.maps.event.removeListener(Ne),se(google.maps.event.addListener(M,"drag",D)))},[D]),c.useEffect(function(){M&&x&&(fe!==null&&google.maps.event.removeListener(fe),we(google.maps.event.addListener(M,"center_changed",x)))},[d]),c.useEffect(function(){M&&E&&(Ve!==null&&google.maps.event.removeListener(Ve),Ye(google.maps.event.addListener(M,"radius_changed",E)))},[E]),c.useEffect(function(){var Ee=new google.maps.Circle(me(me({},e||yp),{map:w}));return typeof r=="number"&&Ee.setRadius(r),typeof n<"u"&&Ee.setCenter(n),typeof r=="number"&&Ee.setRadius(r),typeof o<"u"&&Ee.setVisible(o),typeof a<"u"&&Ee.setEditable(a),typeof i<"u"&&Ee.setDraggable(i),s&&R(google.maps.event.addListener(Ee,"dblclick",s)),u&&j(google.maps.event.addListener(Ee,"dragend",u)),l&&$(google.maps.event.addListener(Ee,"dragstart",l)),f&&I(google.maps.event.addListener(Ee,"mousedown",f)),h&&Q(google.maps.event.addListener(Ee,"mousemove",h)),p&&U(google.maps.event.addListener(Ee,"mouseout",p)),g&&J(google.maps.event.addListener(Ee,"mouseover",g)),y&&ue(google.maps.event.addListener(Ee,"mouseup",y)),v&&pe(google.maps.event.addListener(Ee,"rightclick",v)),d&&ge(google.maps.event.addListener(Ee,"click",d)),D&&se(google.maps.event.addListener(Ee,"drag",D)),x&&we(google.maps.event.addListener(Ee,"center_changed",x)),E&&Ye(google.maps.event.addListener(Ee,"radius_changed",E)),V(Ee),O&&O(Ee),function(){_!==null&&google.maps.event.removeListener(_),T!==null&&google.maps.event.removeListener(T),z!==null&&google.maps.event.removeListener(z),k!==null&&google.maps.event.removeListener(k),H!==null&&google.maps.event.removeListener(H),C!==null&&google.maps.event.removeListener(C),F!==null&&google.maps.event.removeListener(F),Y!==null&&google.maps.event.removeListener(Y),de!==null&&google.maps.event.removeListener(de),ye!==null&&google.maps.event.removeListener(ye),fe!==null&&google.maps.event.removeListener(fe),Ve!==null&&google.maps.event.removeListener(Ve),b&&b(Ee),Ee.setMap(null)}},[]),null}c.memo(Cp),function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={circle:null},n.setCircleCallback=function(){n.state.circle!==null&&n.props.onLoad&&n.props.onLoad(n.state.circle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Circle(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Pe({updaterMap:gs,eventMap:vs,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{circle:n}},this.setCircleCallback)},e.prototype.componentDidUpdate=function(n){this.state.circle!==null&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:gs,eventMap:vs,prevProps:n,nextProps:this.props,instance:this.state.circle}))},e.prototype.componentWillUnmount=function(){var n;this.state.circle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),Me(this.registeredEvents),(n=this.state.circle)===null||n===void 0||n.setMap(null))},e.prototype.render=function(){return null},e.contextType=Se,e}(c.PureComponent);var ms={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},ys={add:function(t,e){t.add(e)},addgeojson:function(t,e,n){t.addGeoJson(e,n)},contains:function(t,e){t.contains(e)},foreach:function(t,e){t.forEach(e)},loadgeojson:function(t,e,n,r){t.loadGeoJson(e,n,r)},overridestyle:function(t,e,n){t.overrideStyle(e,n)},remove:function(t,e){t.remove(e)},revertstyle:function(t,e){t.revertStyle(e)},controlposition:function(t,e){t.setControlPosition(e)},controls:function(t,e){t.setControls(e)},drawingmode:function(t,e){t.setDrawingMode(e)},map:function(t,e){t.setMap(e)},style:function(t,e){t.setStyle(e)},togeojson:function(t,e){t.toGeoJson(e)}};function Dp(t){var e=t.options,n=t.onClick,r=t.onDblClick,i=t.onMouseDown,a=t.onMouseMove,o=t.onMouseOut,s=t.onMouseOver,u=t.onMouseUp,l=t.onRightClick,f=t.onAddFeature,h=t.onRemoveFeature,p=t.onRemoveProperty,g=t.onSetGeometry,y=t.onSetProperty,v=t.onLoad,d=t.onUnmount,D=c.useContext(Se),x=c.useState(null),E=x[0],O=x[1],b=c.useState(null),w=b[0],A=b[1],M=c.useState(null),V=M[0],P=M[1],_=c.useState(null),R=_[0],N=_[1],T=c.useState(null),j=T[0],X=T[1],z=c.useState(null),$=z[0],re=z[1],k=c.useState(null),I=k[0],G=k[1],H=c.useState(null),Q=H[0],K=H[1],C=c.useState(null),U=C[0],W=C[1],F=c.useState(null),J=F[0],ne=F[1],Y=c.useState(null),ue=Y[0],ae=Y[1],de=c.useState(null),pe=de[0],Ce=de[1],ye=c.useState(null),ge=ye[0],ve=ye[1],Ne=c.useState(null),se=Ne[0],_e=Ne[1];return c.useEffect(function(){E!==null&&E.setMap(D)},[D]),c.useEffect(function(){E&&r&&(w!==null&&google.maps.event.removeListener(w),A(google.maps.event.addListener(E,"dblclick",r)))},[r]),c.useEffect(function(){E&&i&&(V!==null&&google.maps.event.removeListener(V),P(google.maps.event.addListener(E,"mousedown",i)))},[i]),c.useEffect(function(){E&&a&&(R!==null&&google.maps.event.removeListener(R),N(google.maps.event.addListener(E,"mousemove",a)))},[a]),c.useEffect(function(){E&&o&&(j!==null&&google.maps.event.removeListener(j),X(google.maps.event.addListener(E,"mouseout",o)))},[o]),c.useEffect(function(){E&&s&&($!==null&&google.maps.event.removeListener($),re(google.maps.event.addListener(E,"mouseover",s)))},[s]),c.useEffect(function(){E&&u&&(I!==null&&google.maps.event.removeListener(I),G(google.maps.event.addListener(E,"mouseup",u)))},[u]),c.useEffect(function(){E&&l&&(Q!==null&&google.maps.event.removeListener(Q),K(google.maps.event.addListener(E,"rightclick",l)))},[l]),c.useEffect(function(){E&&n&&(U!==null&&google.maps.event.removeListener(U),W(google.maps.event.addListener(E,"click",n)))},[n]),c.useEffect(function(){E&&f&&(J!==null&&google.maps.event.removeListener(J),ne(google.maps.event.addListener(E,"addfeature",f)))},[f]),c.useEffect(function(){E&&h&&(ue!==null&&google.maps.event.removeListener(ue),ae(google.maps.event.addListener(E,"removefeature",h)))},[h]),c.useEffect(function(){E&&p&&(pe!==null&&google.maps.event.removeListener(pe),Ce(google.maps.event.addListener(E,"removeproperty",p)))},[p]),c.useEffect(function(){E&&g&&(ge!==null&&google.maps.event.removeListener(ge),ve(google.maps.event.addListener(E,"setgeometry",g)))},[g]),c.useEffect(function(){E&&y&&(se!==null&&google.maps.event.removeListener(se),_e(google.maps.event.addListener(E,"setproperty",y)))},[y]),c.useEffect(function(){if(D!==null){var fe=new google.maps.Data(me(me({},e||{}),{map:D}));r&&A(google.maps.event.addListener(fe,"dblclick",r)),i&&P(google.maps.event.addListener(fe,"mousedown",i)),a&&N(google.maps.event.addListener(fe,"mousemove",a)),o&&X(google.maps.event.addListener(fe,"mouseout",o)),s&&re(google.maps.event.addListener(fe,"mouseover",s)),u&&G(google.maps.event.addListener(fe,"mouseup",u)),l&&K(google.maps.event.addListener(fe,"rightclick",l)),n&&W(google.maps.event.addListener(fe,"click",n)),f&&ne(google.maps.event.addListener(fe,"addfeature",f)),h&&ae(google.maps.event.addListener(fe,"removefeature",h)),p&&Ce(google.maps.event.addListener(fe,"removeproperty",p)),g&&ve(google.maps.event.addListener(fe,"setgeometry",g)),y&&_e(google.maps.event.addListener(fe,"setproperty",y)),O(fe),v&&v(fe)}return function(){E&&(w!==null&&google.maps.event.removeListener(w),V!==null&&google.maps.event.removeListener(V),R!==null&&google.maps.event.removeListener(R),j!==null&&google.maps.event.removeListener(j),$!==null&&google.maps.event.removeListener($),I!==null&&google.maps.event.removeListener(I),Q!==null&&google.maps.event.removeListener(Q),U!==null&&google.maps.event.removeListener(U),J!==null&&google.maps.event.removeListener(J),ue!==null&&google.maps.event.removeListener(ue),pe!==null&&google.maps.event.removeListener(pe),ge!==null&&google.maps.event.removeListener(ge),se!==null&&google.maps.event.removeListener(se),d&&d(E),E.setMap(null))}},[]),null}c.memo(Dp),function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={data:null},n.setDataCallback=function(){n.state.data!==null&&n.props.onLoad&&n.props.onLoad(n.state.data)},n}return e.prototype.componentDidMount=function(){if(this.context!==null){var n=new google.maps.Data(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Pe({updaterMap:ys,eventMap:ms,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{data:n}},this.setDataCallback)}},e.prototype.componentDidUpdate=function(n){this.state.data!==null&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:ys,eventMap:ms,prevProps:n,nextProps:this.props,instance:this.state.data}))},e.prototype.componentWillUnmount=function(){this.state.data!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),Me(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},e.prototype.render=function(){return null},e.contextType=Se,e}(c.PureComponent);var Cs={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},Ds={options:function(t,e){t.setOptions(e)},url:function(t,e){t.setUrl(e)},zIndex:function(t,e){t.setZIndex(e)}};(function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={kmlLayer:null},n.setKmlLayerCallback=function(){n.state.kmlLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.kmlLayer)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.KmlLayer(me(me({},this.props.options),{map:this.context}));this.registeredEvents=Pe({updaterMap:Ds,eventMap:Cs,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{kmlLayer:n}},this.setKmlLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.kmlLayer!==null&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:Ds,eventMap:Cs,prevProps:n,nextProps:this.props,instance:this.state.kmlLayer}))},e.prototype.componentWillUnmount=function(){this.state.kmlLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),Me(this.registeredEvents),this.state.kmlLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Se,e})(c.PureComponent);function bs(t,e){return typeof e=="function"?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function bp(t,e){return new e(t.lat,t.lng)}function Ep(t,e){return new e(new google.maps.LatLng(t.ne.lat,t.ne.lng),new google.maps.LatLng(t.sw.lat,t.sw.lng))}function wp(t,e,n){return t instanceof e?t:n(t,e)}function xp(t,e,n){return t instanceof e?t:n(t,e)}function Bp(t,e,n){var r=t&&t.fromLatLngToDivPixel(n.getNorthEast()),i=t&&t.fromLatLngToDivPixel(n.getSouthWest());return r&&i?{left:"".concat(i.x+e.x,"px"),top:"".concat(r.y+e.y,"px"),width:"".concat(r.x-i.x-e.x,"px"),height:"".concat(i.y-r.y-e.y,"px")}:{left:"-9999px",top:"-9999px"}}function Sp(t,e,n){var r=t&&t.fromLatLngToDivPixel(n);if(r){var i=r.x,a=r.y;return{left:"".concat(i+e.x,"px"),top:"".concat(a+e.y,"px")}}return{left:"-9999px",top:"-9999px"}}function Es(t,e,n,r){return n!==void 0?Bp(t,e,xp(n,google.maps.LatLngBounds,Ep)):Sp(t,e,wp(r,google.maps.LatLng,bp))}function Ap(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.height&&t.height===e.height}function Lp(t,e,n,r,i){var a=function(o){Ge(s,o);function s(u,l,f,h){var p=o.call(this)||this;return p.container=u,p.pane=l,p.position=f,p.bounds=h,p}return s.prototype.onAdd=function(){var u,l=(u=this.getPanes())===null||u===void 0?void 0:u[this.pane];l==null||l.appendChild(this.container)},s.prototype.draw=function(){for(var u=this.getProjection(),l=me({},this.container?bs(this.container,i):{x:0,y:0}),f=Es(u,l,this.bounds,this.position),h=0,p=Object.entries(f);h<p.length;h++){var g=p[h],y=g[0],v=g[1];this.container.style[y]=v}},s.prototype.onRemove=function(){this.container.parentNode!==null&&this.container.parentNode.removeChild(this.container)},s}(google.maps.OverlayView);return new a(t,e,n,r)}function ws(t){if(!t)return"";var e=t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng);return e+""}function xs(t){if(!t)return"";var e=t instanceof google.maps.LatLngBounds?t:new google.maps.LatLngBounds(new google.maps.LatLng(t.south,t.east),new google.maps.LatLng(t.north,t.west));return e+""}function Op(t){var e=t.position,n=t.bounds,r=t.mapPaneName,i=t.zIndex,a=t.onLoad,o=t.onUnmount,s=t.getPixelPositionOffset,u=t.children,l=c.useContext(Se),f=c.useMemo(function(){var p=document.createElement("div");return p.style.position="absolute",p},[]),h=c.useMemo(function(){return Lp(f,r,e,n,s)},[f,r,e,n]);return c.useEffect(function(){return a==null||a(h),h==null||h.setMap(l),function(){o==null||o(h),h==null||h.setMap(null)}},[l,h]),c.useEffect(function(){f.style.zIndex="".concat(i)},[i,f]),So.createPortal(u,f)}c.memo(Op),function(t){Ge(e,t);function e(n){var r=t.call(this,n)||this;r.state={paneEl:null,containerStyle:{position:"absolute"}},r.updatePane=function(){var a=r.props.mapPaneName,o=r.overlayView.getPanes();rt(!!a,"OverlayView requires props.mapPaneName but got %s",a),o?r.setState({paneEl:o[a]}):r.setState({paneEl:null})},r.onAdd=function(){var a,o;r.updatePane(),(o=(a=r.props).onLoad)===null||o===void 0||o.call(a,r.overlayView)},r.onPositionElement=function(){var a=r.overlayView.getProjection(),o=me({x:0,y:0},r.containerRef.current?bs(r.containerRef.current,r.props.getPixelPositionOffset):{}),s=Es(a,o,r.props.bounds,r.props.position),u=r.state.containerStyle,l=u.left,f=u.top,h=u.width,p=u.height;Ap(s,{left:l,top:f,width:h,height:p})||r.setState({containerStyle:{top:s.top||0,left:s.left||0,width:s.width||0,height:s.height||0,position:"absolute"}})},r.draw=function(){r.onPositionElement()},r.onRemove=function(){var a,o;r.setState(function(){return{paneEl:null}}),(o=(a=r.props).onUnmount)===null||o===void 0||o.call(a,r.overlayView)},r.containerRef=c.createRef();var i=new google.maps.OverlayView;return i.onAdd=r.onAdd,i.draw=r.draw,i.onRemove=r.onRemove,r.overlayView=i,r}return e.prototype.componentDidMount=function(){this.overlayView.setMap(this.context)},e.prototype.componentDidUpdate=function(n){var r=ws(n.position),i=ws(this.props.position),a=xs(n.bounds),o=xs(this.props.bounds);(r!==i||a!==o)&&this.overlayView.draw(),n.mapPaneName!==this.props.mapPaneName&&this.updatePane()},e.prototype.componentWillUnmount=function(){this.overlayView.setMap(null)},e.prototype.render=function(){var n=this.state.paneEl;return n?So.createPortal(B.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:c.Children.only(this.props.children)}),n):null},e.FLOAT_PANE="floatPane",e.MAP_PANE="mapPane",e.MARKER_LAYER="markerLayer",e.OVERLAY_LAYER="overlayLayer",e.OVERLAY_MOUSE_TARGET="overlayMouseTarget",e.contextType=Se,e}(c.PureComponent);function Pp(){}var Bs={onDblClick:"dblclick",onClick:"click"},Ss={opacity:function(t,e){t.setOpacity(e)}};function Mp(t){var e=t.url,n=t.bounds,r=t.options,i=t.visible,a=c.useContext(Se),o=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east)),s=c.useMemo(function(){var u=new google.maps.GroundOverlay(e,o,me({},r));return u},[]);return c.useEffect(function(){s!==null&&s.setMap(a)},[a]),c.useEffect(function(){typeof e<"u"&&s!==null&&(s.set("url",e),s.setMap(a))},[s,e]),c.useEffect(function(){typeof i<"u"&&s!==null&&s.setOpacity(i?1:0)},[s,i]),c.useEffect(function(){var u=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east));typeof n<"u"&&s!==null&&(s.set("bounds",u),s.setMap(a))},[s,n]),null}c.memo(Mp),function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={groundOverlay:null},n.setGroundOverlayCallback=function(){n.state.groundOverlay!==null&&n.props.onLoad&&n.props.onLoad(n.state.groundOverlay)},n}return e.prototype.componentDidMount=function(){rt(!!this.props.url||!!this.props.bounds,"For GroundOverlay, url and bounds are passed in to constructor and are immutable after instantiated. This is the behavior of Google Maps JavaScript API v3 ( See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay) Hence, use the corresponding two props provided by `react-google-maps-api`, url and bounds. In some cases, you'll need the GroundOverlay component to reflect the changes of url and bounds. You can leverage the React's key property to remount the component. Typically, just `key={url}` would serve your need. See https://github.com/tomchentw/react-google-maps/issues/655");var n=new google.maps.GroundOverlay(this.props.url,this.props.bounds,me(me({},this.props.options),{map:this.context}));this.registeredEvents=Pe({updaterMap:Ss,eventMap:Bs,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{groundOverlay:n}},this.setGroundOverlayCallback)},e.prototype.componentDidUpdate=function(n){this.state.groundOverlay!==null&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:Ss,eventMap:Bs,prevProps:n,nextProps:this.props,instance:this.state.groundOverlay}))},e.prototype.componentWillUnmount=function(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))},e.prototype.render=function(){return null},e.defaultProps={onLoad:Pp},e.contextType=Se,e}(c.PureComponent);var As={},Ls={data:function(t,e){t.setData(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)}};function Fp(t){var e=t.data,n=t.onLoad,r=t.onUnmount,i=t.options,a=c.useContext(Se),o=c.useState(null),s=o[0],u=o[1];return c.useEffect(function(){google.maps.visualization||rt(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),c.useEffect(function(){rt(!!e,"data property is required in HeatmapLayer %s",e)},[e]),c.useEffect(function(){s!==null&&s.setMap(a)},[a]),c.useEffect(function(){i&&s!==null&&s.setOptions(i)},[s,i]),c.useEffect(function(){var l=new google.maps.visualization.HeatmapLayer(me(me({},i||{}),{data:e,map:a}));return u(l),n&&n(l),function(){s!==null&&(r&&r(s),s.setMap(null))}},[]),null}c.memo(Fp),function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={heatmapLayer:null},n.setHeatmapLayerCallback=function(){n.state.heatmapLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.heatmapLayer)},n}return e.prototype.componentDidMount=function(){rt(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),rt(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var n=new google.maps.visualization.HeatmapLayer(me(me({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=Pe({updaterMap:Ls,eventMap:As,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{heatmapLayer:n}},this.setHeatmapLayerCallback)},e.prototype.componentDidUpdate=function(n){Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:Ls,eventMap:As,prevProps:n,nextProps:this.props,instance:this.state.heatmapLayer})},e.prototype.componentWillUnmount=function(){this.state.heatmapLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),Me(this.registeredEvents),this.state.heatmapLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Se,e}(c.PureComponent);var Os={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},Ps={register:function(t,e,n){t.registerPanoProvider(e,n)},links:function(t,e){t.setLinks(e)},motionTracking:function(t,e){t.setMotionTracking(e)},options:function(t,e){t.setOptions(e)},pano:function(t,e){t.setPano(e)},position:function(t,e){t.setPosition(e)},pov:function(t,e){t.setPov(e)},visible:function(t,e){t.setVisible(e)},zoom:function(t,e){t.setZoom(e)}};(function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={streetViewPanorama:null},n.setStreetViewPanoramaCallback=function(){n.state.streetViewPanorama!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewPanorama)},n}return e.prototype.componentDidMount=function(){var n,r,i=(r=(n=this.context)===null||n===void 0?void 0:n.getStreetView())!==null&&r!==void 0?r:null;this.registeredEvents=Pe({updaterMap:Ps,eventMap:Os,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{streetViewPanorama:i}},this.setStreetViewPanoramaCallback)},e.prototype.componentDidUpdate=function(n){this.state.streetViewPanorama!==null&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:Ps,eventMap:Os,prevProps:n,nextProps:this.props,instance:this.state.streetViewPanorama}))},e.prototype.componentWillUnmount=function(){this.state.streetViewPanorama!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),Me(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},e.prototype.render=function(){return null},e.contextType=Se,e})(c.PureComponent),function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={streetViewService:null},n.setStreetViewServiceCallback=function(){n.state.streetViewService!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewService)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:n}},this.setStreetViewServiceCallback)},e.prototype.componentWillUnmount=function(){this.state.streetViewService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)},e.prototype.render=function(){return null},e.contextType=Se,e}(c.PureComponent),function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={directionsService:null},n.setDirectionsServiceCallback=function(){n.state.directionsService!==null&&n.props.onLoad&&n.props.onLoad(n.state.directionsService)},n}return e.prototype.componentDidMount=function(){rt(!!this.props.options,"DirectionsService expected options object as parameter, but got %s",this.props.options);var n=new google.maps.DirectionsService;this.setState(function(){return{directionsService:n}},this.setDirectionsServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.directionsService!==null&&this.state.directionsService.route(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.directionsService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.directionsService)},e.prototype.render=function(){return null},e}(c.PureComponent);var Ms={onDirectionsChanged:"directions_changed"},Fs={directions:function(t,e){t.setDirections(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},panel:function(t,e){t.setPanel(e)},routeIndex:function(t,e){t.setRouteIndex(e)}};(function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={directionsRenderer:null},n.setDirectionsRendererCallback=function(){n.state.directionsRenderer!==null&&(n.state.directionsRenderer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.directionsRenderer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=Pe({updaterMap:Fs,eventMap:Ms,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{directionsRenderer:n}},this.setDirectionsRendererCallback)},e.prototype.componentDidUpdate=function(n){this.state.directionsRenderer!==null&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:Fs,eventMap:Ms,prevProps:n,nextProps:this.props,instance:this.state.directionsRenderer}))},e.prototype.componentWillUnmount=function(){this.state.directionsRenderer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),Me(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},e.prototype.render=function(){return B.jsx(B.Fragment,{})},e.contextType=Se,e})(c.PureComponent),function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={distanceMatrixService:null},n.setDistanceMatrixServiceCallback=function(){n.state.distanceMatrixService!==null&&n.props.onLoad&&n.props.onLoad(n.state.distanceMatrixService)},n}return e.prototype.componentDidMount=function(){rt(!!this.props.options,"DistanceMatrixService expected options object as parameter, but go %s",this.props.options);var n=new google.maps.DistanceMatrixService;this.setState(function(){return{distanceMatrixService:n}},this.setDistanceMatrixServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.distanceMatrixService!==null&&this.state.distanceMatrixService.getDistanceMatrix(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.distanceMatrixService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.distanceMatrixService)},e.prototype.render=function(){return null},e}(c.PureComponent);var ks={onPlacesChanged:"places_changed"},Ts={bounds:function(t,e){t.setBounds(e)}},kp=function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=c.createRef(),n.state={searchBox:null},n.setSearchBoxCallback=function(){n.state.searchBox!==null&&n.props.onLoad&&n.props.onLoad(n.state.searchBox)},n}return e.prototype.componentDidMount=function(){if(rt(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places),this.containerElement!==null&&this.containerElement.current!==null){var n=this.containerElement.current.querySelector("input");if(n!==null){var r=new google.maps.places.SearchBox(n,this.props.options);this.registeredEvents=Pe({updaterMap:Ts,eventMap:ks,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{searchBox:r}},this.setSearchBoxCallback)}}},e.prototype.componentDidUpdate=function(n){this.state.searchBox!==null&&(Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:Ts,eventMap:ks,prevProps:n,nextProps:this.props,instance:this.state.searchBox}))},e.prototype.componentWillUnmount=function(){this.state.searchBox!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),Me(this.registeredEvents))},e.prototype.render=function(){return B.jsx("div",{ref:this.containerElement,children:c.Children.only(this.props.children)})},e.contextType=Se,e}(c.PureComponent),Rs={onPlaceChanged:"place_changed"},Is={bounds:function(t,e){t.setBounds(e)},restrictions:function(t,e){t.setComponentRestrictions(e)},fields:function(t,e){t.setFields(e)},options:function(t,e){t.setOptions(e)},types:function(t,e){t.setTypes(e)}};(function(t){Ge(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=c.createRef(),n.state={autocomplete:null},n.setAutocompleteCallback=function(){n.state.autocomplete!==null&&n.props.onLoad&&n.props.onLoad(n.state.autocomplete)},n}return e.prototype.componentDidMount=function(){var n;rt(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places);var r=(n=this.containerElement.current)===null||n===void 0?void 0:n.querySelector("input");if(r){var i=new google.maps.places.Autocomplete(r,this.props.options);this.registeredEvents=Pe({updaterMap:Is,eventMap:Rs,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{autocomplete:i}},this.setAutocompleteCallback)}},e.prototype.componentDidUpdate=function(n){Me(this.registeredEvents),this.registeredEvents=Pe({updaterMap:Is,eventMap:Rs,prevProps:n,nextProps:this.props,instance:this.state.autocomplete})},e.prototype.componentWillUnmount=function(){this.state.autocomplete!==null&&Me(this.registeredEvents)},e.prototype.render=function(){return B.jsx("div",{ref:this.containerElement,className:this.props.className,children:c.Children.only(this.props.children)})},e.defaultProps={className:""},e.contextType=Se,e})(c.PureComponent);function Tp({coordinates:t,zoom:e=18,draggable:n=!1,className:r,...i}){return t?B.jsx("div",{className:"arkynGoogleMapPinned "+r,...i,children:B.jsx(Ad,{zoom:e,center:t,mapContainerStyle:{borderRadius:"var(--rounded-cards)",width:"100%",height:"100%"},children:B.jsx(jd,{draggable:n,position:t})})}):B.jsx("div",{className:"arkynGoogleMapPinnedEmpty "+r,...i,children:B.jsx(Ae.MapPinned,{})})}function Rp(t){const{className:e,...n}=t,r=`arkynSkeleton ${e}`;return B.jsx("aside",{className:r.trim(),...n})}function Ip(t){const{emptyMessage:e="Nenhum dado adicionado.",className:n,children:r,...i}=t,a=`arkynTableBody ${n}`,o=c.Children.count(r)===0;return B.jsx("tbody",{className:a.trim(),...i,children:o?B.jsx("tr",{className:"arkynTableBodyEmptyLine",children:B.jsx("td",{colSpan:100,children:B.jsx("div",{children:e})})}):r})}function jp(t){const{className:e,children:n,...r}=t,i=`arkynTableCaption ${e}`;return B.jsx("caption",{className:i.trim(),...r,children:B.jsx("div",{className:"arkynTableCaptionContent",children:n})})}function Np(t){const{children:e,className:n,...r}=t,i=`arkynTableContainer ${n}`;return B.jsx("div",{className:i.trim(),...r,children:B.jsx("table",{children:e})})}function _p(t){const{className:e,children:n,...r}=t,i=`arkynTableFooter ${e}`;return B.jsxs("tfoot",{className:i.trim(),...r,children:[B.jsx("tr",{className:"spacingRow"}),B.jsx("tr",{children:B.jsx("th",{colSpan:100,children:B.jsx("div",{className:"arkynTableFooterContent",children:n})})})]})}function zp(t){const{className:e,children:n,...r}=t,i=`arkynTableHeader ${e}`;return B.jsxs("thead",{className:i.trim(),...r,children:[B.jsx("tr",{children:n}),B.jsx("tr",{className:"spacingRow"})]})}function Wp(t){const{isLoading:e=!1,scheme:n="primary",variant:r="solid",loadingText:i,size:a="md",leftIcon:o,rightIcon:s,disabled:u,className:l="",children:f,...h}=t,g={xs:12,sm:16,md:20,lg:24}[a],d=`arkynButton ${e?"loadingTrue":"loadingFalse"} ${r} ${n} ${a} ${i?"loadingTextTrue":"loadingTextFalse"} ${l}`;return B.jsxs("button",{className:d,disabled:u||e,...h,children:[B.jsxs("div",{className:"arkynButtonSpinner",children:[B.jsx(Ae.Loader2,{size:g,strokeWidth:2.5}),i&&i]}),B.jsxs("div",{className:"arkynButtonContent",children:[wr(g,o),f,wr(g,s)]})]})}const js=c.createContext({});function Up(t){var h,p;const e=Ln.useActionData(),{children:n,className:r,id:i,...a}=t,o=c.useRef(null),s=((h=o.current)==null?void 0:h.name)||"",u=((p=e==null?void 0:e.fieldErrors)==null?void 0:p[s])||null,l=c.useId(),f=`arkynFormController ${r}`;return B.jsx(js.Provider,{value:{error:u,id:l,inputRef:o},children:B.jsx("section",{id:i||s||void 0,className:f.trim(),...a,children:n})})}function xt(){return c.useContext(js)}function Hp(t){const{name:e,className:n="",size:r="md",isError:i,defaultChecked:a=!1,checked:o=null,onCheck:s,value:u,...l}=t,{id:f,inputRef:h,error:p}=xt(),g=i||!!p,[y,v]=c.useState(a||!1),d=typeof o=="boolean"?o:y,E=`arkynCheckbox ${r} ${g?"errorTrue":"errorFalse"} ${d?"checkedTrue":"checkedFalse"} ${n}`;function O(){const b=y;v(!b),s&&s(b?"":u||"checked")}return B.jsxs("button",{id:f,type:"button",className:E,onClick:O,...l,children:[B.jsx("input",{type:"hidden",name:e,ref:h,value:d?u||"checked":""}),B.jsx(Ae.Check,{})]})}function Vp(t){const{children:e,className:n,...r}=t,i=`arkynFormError ${n}`,{error:a}=xt();return e?B.jsx("strong",{className:i.trim(),...r,children:e}):a?B.jsx("strong",{className:i.trim(),...r,children:a}):B.jsx(B.Fragment,{})}function qp(t){const{showAsterisk:e=!1,className:n="",...r}=t,{id:i}=xt(),o=`arkynFormLabel ${e?"asteriskTrue":"asteriskFalse"} ${n}`;return B.jsx("label",{className:o.trim(),htmlFor:i,...r})}function Xt(t,e,n){if(!t)return B.jsx(B.Fragment,{});if(typeof t=="string")return B.jsx("p",{className:n,children:t});const r=t;return B.jsx("p",{className:n,children:B.jsx(r,{color:"var(--secondary-600)",size:e,strokeWidth:2.5})})}function Hi(t){return t&&t.replace(/[^0-9]/g,"")}function Ns(t,e){let n="",r=0;return Array.from(t).forEach((i,a)=>{e[a+r].match(/[0-9]/)||(n+=e[a+r],r++),n+=i}),n}function _s(t){return t.length>11?"CNPJ":"CPF"}const Vi={CPF:"999.999.999-999",CNPJ:"99.999.999/9999-99"},zs=Hi(Vi.CNPJ).length;function Gp(t,e){const{isLoading:n,isError:r,size:i="md",className:a="",variant:o="solid",prefix:s,sufix:u,leftIcon:l,rightIcon:f,disabled:h,defaultValue:p,readOnly:g,onFocus:y,onBlur:v,title:d,style:D,onChange:x,...E}=t;function O(T){let j=Hi(T);const X=_s(j);if(!(j.length>zs))return j=Ns(j,Vi[X]),j}const b=f?"right":"left",_=`arkyn_input ${s?"hasPrefix":""} ${u?"hasSufix":""} ${o} ${i} ${h||g||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${a}`,N={md:20,lg:20}[i];return{isLoading:n,className:_,prefix:Xt(s,N,"prefix"),sufix:Xt(u,N,"sufix"),LeftIcon:l,RightIcon:f,defaultValue:O(p||""),disabled:h,readOnly:g,onFocus:y,onBlur:v,title:d,style:D,onChange:x,loadingPosition:b,iconSize:N,Spinner:B.jsx(Ae.Loader2,{className:"spinner",size:N,strokeWidth:2.5}),...E}}function Yp(t){const[e,n]=c.useState(!1),r=c.useRef(null),{inputRef:i,id:a,error:o}=xt(),s=i||r,u=t.isError||!!o,{disabled:l,title:f,style:h,className:p,prefix:g,sufix:y,iconSize:v,loadingPosition:d,isLoading:D,LeftIcon:x,readOnly:E,onFocus:O,onBlur:b,RightIcon:w,Spinner:A,onChange:M,value:V,defaultValue:P,..._}=Gp({...t,id:a,isError:u},e),[R,N]=c.useState(P),T=x&&!D,j=w&&!D,X=d==="left"&&D,z=d==="right"&&D;function $(){l||!(s!=null&&s.current)||(n(!0),s.current.focus())}function re(G){let H=Hi(G.target.value);const Q=_s(H);H.length>zs||(H=Ns(H,Vi[Q]),G.target.value=H,N(H),M&&M(G))}function k(G){n(!0),O&&O(G)}function I(G){n(!1),b&&b(G)}return B.jsxs("section",{title:f,style:h,onClick:$,className:p,children:[g,X&&A,T&&B.jsx(x,{size:v,strokeWidth:2.5}),B.jsx("input",{disabled:l||D,readOnly:E,ref:s,value:V||R,onFocus:k,onChange:re,onBlur:I,..._}),j&&B.jsx(w,{size:v,strokeWidth:2.5}),z&&A,y]})}const Zp=3,Kp=(t="pt-BR",e,n="BRL",r=!0)=>new Intl.NumberFormat(t,{style:"currency",currency:n,currencyDisplay:"symbol",minimumFractionDigits:2,maximumFractionDigits:2}).format(e).slice(r?Zp:0),Ar=2,Ws=t=>typeof t=="number"?t:Number(t.toString().replace(/[^0-9-]/g,"")),qi=t=>{let e=t;return typeof t=="string"?(e=Ws(t),e%1!==0&&(e=e.toFixed(Ar))):e=Number.isInteger(t)?Number(t)*10**Ar:t.toFixed(Ar),Ws(e)/10**Ar},Us=(t,e,n)=>{if(!e)return[0,""];const r=qi(e),i=Kp(t,r,n);return[r,i]};function Xp(t,e){const{isLoading:n,isError:r,size:i="md",className:a="",variant:o="solid",prefix:s,sufix:u,leftIcon:l,rightIcon:f,disabled:h,readOnly:p,onFocus:g,onBlur:y,title:v,style:d,max:D=1e9,locale:x="pt-BR",currency:E="BRL",...O}=t,b=f?"right":"left",_=`arkyn_input ${s?"hasPrefix":""} ${u?"hasSufix":""} ${o} ${i} ${h||p||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${a}`,N={md:20,lg:20}[i];return{isLoading:n,className:_,prefix:Xt(s,N,"prefix"),sufix:Xt(u,N,"sufix"),LeftIcon:l,RightIcon:f,disabled:h,locale:x,currency:E,readOnly:p,onFocus:g,onBlur:y,title:v,style:d,max:D,loadingPosition:b,iconSize:N,Spinner:B.jsx(Ae.Loader2,{className:"spinner",size:N,strokeWidth:2.5}),...O}}function Jp(t){const[e,n]=c.useState(!1),[r,i]=c.useState("0"),a=c.useRef(null),{inputRef:o,id:s,error:u}=xt(),l=o||a,f=t.isError||!!u,{disabled:h,title:p,style:g,className:y,prefix:v,sufix:d,iconSize:D,loadingPosition:x,isLoading:E,LeftIcon:O,readOnly:b,onFocus:w,onBlur:A,RightIcon:M,Spinner:V,value:P,max:_,onChangeValue:R,onKeyPress:N,currency:T,locale:j,name:X,defaultValue:z,...$}=Xp({...t,id:s,isError:f},e),re=O&&!E,k=M&&!E,I=x==="left"&&E,G=x==="right"&&E;function H(){h||!(l!=null&&l.current)||(n(!0),l.current.focus())}function Q(F){n(!0),w&&w(F)}function K(F){n(!1),A&&A(F)}const C=F=>{const[J,ne]=Us(j,F,T);return!_||J<=_?(i(ne),[J,ne]):[qi(r),r]},U=F=>{F.preventDefault();const[J,ne]=C(F.target.value);R(F,String(J),String(ne))},W=F=>N&&N(F,F.key,F.key);return c.useEffect(()=>{const F=P||+z||void 0,[,J]=Us(j,F,T);i(J)},[T,z,P]),B.jsxs("section",{title:p,style:g,onClick:H,className:y,children:[v,I&&V,re&&B.jsx(O,{size:D,strokeWidth:2.5}),B.jsx("input",{value:r,onChange:U,onBlur:K,onFocus:Q,onKeyUp:W,disabled:h||E,readOnly:b,...$}),B.jsx("input",{type:"hidden",ref:l,name:X,value:qi(r)}),G&&V,k&&B.jsx(M,{size:D,strokeWidth:2.5}),d]})}function Qp(t,e){const{isLoading:n,isError:r,size:i="md",className:a="",variant:o="solid",prefix:s,sufix:u,leftIcon:l,rightIcon:f,disabled:h,readOnly:p,onFocus:g,onBlur:y,title:v,style:d,onChange:D,showMask:x=!1,type:E,...O}=t,b=f?"right":"left",_=`arkyn_input ${s?"hasPrefix":""} ${u?"hasSufix":""} ${o} ${i} ${h||p||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${a}`,N={md:20,lg:20}[i];return{isLoading:n,className:_,prefix:Xt(s,N,"prefix"),sufix:Xt(u,N,"sufix"),LeftIcon:l,RightIcon:f,disabled:h,readOnly:p,onFocus:g,onBlur:y,title:v,style:d,onChange:D,loadingPosition:b,iconSize:N,showMask:x,Spinner:B.jsx(Ae.Loader2,{className:"spinner",size:N,strokeWidth:2.5}),...O}}const $p=c.forwardRef((t,e)=>B.jsx("input",{ref:e,...t}));function eh(t){const[e,n]=c.useState(!1),r=c.useRef(null),{inputRef:i,id:a,error:o}=xt(),s=i||r,u=t.isError||!!o,{disabled:l,title:f,style:h,className:p,prefix:g,sufix:y,iconSize:v,loadingPosition:d,isLoading:D,LeftIcon:x,readOnly:E,onFocus:O,onBlur:b,RightIcon:w,Spinner:A,...M}=Qp({...t,id:a,isError:u},e),V=x&&!D,P=w&&!D,_=d==="left"&&D,R=d==="right"&&D;function N(){l||!(s!=null&&s.current)||(n(!0),s.current.focus())}function T(X){n(!0),O&&O(X)}function j(X){n(!1),b&&b(X)}return B.jsxs("section",{title:f,style:h,onClick:N,className:p,children:[g,_&&A,V&&B.jsx(x,{size:v,strokeWidth:2.5}),B.jsx(ed.InputMask,{component:$p,ref:s,onFocus:T,onBlur:j,disabled:l,...M}),P&&B.jsx(w,{size:v,strokeWidth:2.5}),R&&A,y]})}function th(t,e){const{isLoading:n,isError:r,size:i="md",className:a="",variant:o="solid",prefix:s,sufix:u,leftIcon:l,rightIcon:f,disabled:h,readOnly:p,onFocus:g,onBlur:y,title:v,style:d,onChange:D,...x}=t,E=f?"right":"left",V=`arkyn_input ${s?"hasPrefix":""} ${u?"hasSufix":""} ${o} ${i} ${h||p||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${a}`,_={md:20,lg:20}[i];return{isLoading:n,className:V,prefix:Xt(s,_,"prefix"),sufix:Xt(u,_,"sufix"),LeftIcon:l,RightIcon:f,disabled:h,readOnly:p,onFocus:g,onBlur:y,title:v,style:d,onChange:D,loadingPosition:E,iconSize:_,Spinner:B.jsx(Ae.Loader2,{className:"spinner",size:_,strokeWidth:2.5}),...x}}function nh(t){const[e,n]=c.useState(!1),r=c.useRef(null),{inputRef:i,id:a,error:o}=xt(),s=i||r,u=t.isError||!!o,{disabled:l,title:f,style:h,className:p,prefix:g,sufix:y,iconSize:v,loadingPosition:d,isLoading:D,LeftIcon:x,readOnly:E,onFocus:O,onBlur:b,RightIcon:w,type:A,Spinner:M,...V}=th({...t,id:a,isError:u},e),P=x&&!D,_=w&&!D,R=d==="left"&&D,N=d==="right"&&D;function T(){l||!(s!=null&&s.current)||(n(!0),s.current.focus())}function j(z){n(!0),O&&O(z)}function X(z){n(!1),b&&b(z)}return A==="hidden"?B.jsx("input",{style:{display:"none"},readOnly:!0,type:"text",ref:s,...V}):B.jsxs("section",{title:f,style:h,onClick:T,className:p,children:[g,R&&M,P&&B.jsx(x,{size:v,strokeWidth:2.5}),B.jsx("input",{disabled:l||D,readOnly:E,ref:s,onFocus:j,onBlur:X,type:A,...V}),_&&B.jsx(w,{size:v,strokeWidth:2.5}),N&&M,y]})}function Hs(t){return t.type==="currency"?B.jsx(Jp,{...t}):t.type==="masked"?B.jsx(eh,{...t}):t.type==="cpf-cnpj"?B.jsx(Yp,{...t}):B.jsx(nh,{...t})}function rh({onChange:t,onPlaceChanged:e,options:n,...r}){const[i,a]=c.useState(null),o=u=>a(u),s=()=>{var g,y,v,d;const l=i.getPlaces()[0],f=l==null?void 0:l.address_components;function h(D){const x=f.find(E=>E.types[0]===D);return x?x.long_name:""}function p(D){const x=f.find(E=>E.types[0]===D);return x?x.short_name:""}if(l){const D=h("route"),x=h("street_number"),E=h("sublocality_level_1"),O=h("administrative_area_level_2"),b=h("administrative_area_level_1"),w=p("administrative_area_level_1"),A=h("postal_code"),M=(y=(g=l.geometry)==null?void 0:g.location)==null?void 0:y.lat(),V=(d=(v=l.geometry)==null?void 0:v.location)==null?void 0:d.lng();e&&e({street:D,city:O,state:b,district:E,cep:A,streetNumber:x,stateShortName:w,coordinates:{lat:M,lng:V}})}};return B.jsx(kp,{onLoad:o,onPlacesChanged:s,options:n,children:B.jsx(Hs,{type:"text",onChange:u=>t(u.target.value),...r})})}function ih(t){const{isLoading:e=!1,scheme:n="primary",variant:r="solid",size:i="md",icon:a,disabled:o,className:s="",...u}=t,l={xs:12,sm:16,md:20,lg:24},h=`arkynIconButton ${r} ${n} ${i} ${e?"loadingTrue":"loadingFalse"} ${s}`;return B.jsxs("button",{disabled:o||e,className:h.trim(),...u,children:[B.jsx("div",{className:"arkynIconButtonSpinner",children:B.jsx(Ae.Loader2,{size:l[i],strokeWidth:2.5})}),B.jsx("div",{className:"arkynIconButtonContent",children:B.jsx(a,{size:l[i],strokeWidth:2.5})})]})}const Vs=c.createContext({});function ah(){return c.useContext(Vs)}function oh(t){const{defaultValue:e,name:n,value:r,onChange:i,size:a="md",className:o="",...s}=t,[u,l]=c.useState(e||""),{inputRef:f,id:h}=xt();function p(y){l(y),i&&i(y)}const g=`arkynRadioGroup ${a} ${o}`;return B.jsxs(Vs.Provider,{value:{onChange:p,value:r||u,size:a},children:[B.jsx("input",{style:{display:"none"},type:"text",id:h,readOnly:!0,name:n,ref:f,value:r||u}),B.jsx("div",{className:g.trim(),...s})]})}function sh(t){const{value:e,size:n,disabled:r,children:i,className:a="",...o}=t,{onChange:s,size:u,value:l}=ah(),{error:f}=xt(),v=`arkynRadioBox ${n||u} ${l===e?"checkedTrue":"checkedFalse"} ${f?"errorTrue":"errorFalse"} ${r?"disabledTrue":"disabledFalse"} ${a}`;return B.jsxs("label",{className:v.trim(),children:[B.jsx("button",{type:"button",disabled:r,onClick:()=>s(e),onFocus:()=>s(e),...o}),i]})}var Wt={};Object.defineProperty(Wt,"__esModule",{value:!0});for(var uh=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),Gi={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},qs={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:uh?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},Yi={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},Lr=1;Lr<20;Lr++)Yi["f"+Lr]=111+Lr;function Or(t,e,n){e&&!("byKey"in e)&&(n=e,e=null),Array.isArray(t)||(t=[t]);var r=t.map(function(o){return Gs(o,e)}),i=function(s){return r.some(function(u){return Ys(u,s)})},a=n==null?i:i(n);return a}function lh(t,e){return Or(t,e)}function ch(t,e){return Or(t,{byKey:!0},e)}function Gs(t,e){var n=e&&e.byKey,r={};t=t.replace("++","+add");var i=t.split("+"),a=i.length;for(var o in Gi)r[Gi[o]]=!1;var s=!0,u=!1,l=void 0;try{for(var f=i[Symbol.iterator](),h;!(s=(h=f.next()).done);s=!0){var p=h.value,g=p.endsWith("?")&&p.length>1;g&&(p=p.slice(0,-1));var y=Zi(p),v=Gi[y];if(p.length>1&&!v&&!qs[p]&&!Yi[y])throw new TypeError('Unknown modifier: "'+p+'"');(a===1||!v)&&(n?r.key=y:r.which=Zs(p)),v&&(r[v]=g?null:!0)}}catch(d){u=!0,l=d}finally{try{!s&&f.return&&f.return()}finally{if(u)throw l}}return r}function Ys(t,e){for(var n in t){var r=t[n],i=void 0;if(r!=null&&(n==="key"&&e.key!=null?i=e.key.toLowerCase():n==="which"?i=r===91&&e.which===93?91:e.which:i=e[n],!(i==null&&r===!1)&&i!==r))return!1}return!0}function Zs(t){t=Zi(t);var e=Yi[t]||t.toUpperCase().charCodeAt(0);return e}function Zi(t){return t=t.toLowerCase(),t=qs[t]||t,t}var fh=Wt.default=Or,Ki=Wt.isHotkey=Or;Wt.isCodeHotkey=lh,Wt.isKeyHotkey=ch,Wt.parseHotkey=Gs,Wt.compareHotkey=Ys,Wt.toKeyCode=Zs,Wt.toKeyName=Zi;/*!
72
72
  * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
73
73
  *
74
74
  * Copyright (c) 2014-2017, Jon Schlinkert.
75
75
  * Released under the MIT License.
76
- */function Ks(t){return Object.prototype.toString.call(t)==="[object Object]"}function pt(t){var e,n;return Ks(t)===!1?!1:(e=t.constructor,e===void 0?!0:(n=e.prototype,!(Ks(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}var Xs=Symbol.for("immer-nothing"),Js=Symbol.for("immer-draftable"),Bt=Symbol.for("immer-state"),fh=process.env.NODE_ENV!=="production"?[function(t){return`The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`},function(t){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 '${t}'`},"This object has been frozen and should not be mutated",function(t){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+t},"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(t){return`'current' expects a draft, got: ${t}`},"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(t){return`'original' expects a draft, got: ${t}`}]:[];function Dt(t,...e){if(process.env.NODE_ENV!=="production"){const n=fh[t],r=typeof n=="function"?n.apply(null,e):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var On=Object.getPrototypeOf;function pn(t){return!!t&&!!t[Bt]}function hn(t){var e;return t?Qs(t)||Array.isArray(t)||!!t[Js]||!!((e=t.constructor)!=null&&e[Js])||Fr(t)||kr(t):!1}var dh=Object.prototype.constructor.toString();function Qs(t){if(!t||typeof t!="object")return!1;const e=On(t);if(e===null)return!0;const n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===dh}function Pr(t,e){Mr(t)===0?Reflect.ownKeys(t).forEach(n=>{e(n,t[n],t)}):t.forEach((n,r)=>e(r,n,t))}function Mr(t){const e=t[Bt];return e?e.type_:Array.isArray(t)?1:Fr(t)?2:kr(t)?3:0}function Xi(t,e){return Mr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function $s(t,e,n){const r=Mr(t);r===2?t.set(e,n):r===3?t.add(n):t[e]=n}function ph(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function Fr(t){return t instanceof Map}function kr(t){return t instanceof Set}function vn(t){return t.copy_||t.base_}function Ji(t,e){if(Fr(t))return new Map(t);if(kr(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const n=Qs(t);if(e===!0||e==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(t);delete r[Bt];let i=Reflect.ownKeys(r);for(let a=0;a<i.length;a++){const o=i[a],s=r[o];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(r[o]={configurable:!0,writable:!0,enumerable:s.enumerable,value:t[o]})}return Object.create(On(t),r)}else{const r=On(t);if(r!==null&&n)return{...t};const i=Object.create(r);return Object.assign(i,t)}}function Qi(t,e=!1){return Tr(t)||pn(t)||!hn(t)||(Mr(t)>1&&(t.set=t.add=t.clear=t.delete=hh),Object.freeze(t),e&&Object.entries(t).forEach(([n,r])=>Qi(r,!0))),t}function hh(){Dt(2)}function Tr(t){return Object.isFrozen(t)}var vh={};function gn(t){const e=vh[t];return e||Dt(0,t),e}var Zn;function eu(){return Zn}function gh(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function tu(t,e){e&&(gn("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function $i(t){ea(t),t.drafts_.forEach(mh),t.drafts_=null}function ea(t){t===Zn&&(Zn=t.parent_)}function nu(t){return Zn=gh(Zn,t)}function mh(t){const e=t[Bt];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function ru(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];return t!==void 0&&t!==n?(n[Bt].modified_&&($i(e),Dt(4)),hn(t)&&(t=Rr(e,t),e.parent_||Ir(e,t)),e.patches_&&gn("Patches").generateReplacementPatches_(n[Bt].base_,t,e.patches_,e.inversePatches_)):t=Rr(e,n,[]),$i(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==Xs?t:void 0}function Rr(t,e,n){if(Tr(e))return e;const r=e[Bt];if(!r)return Pr(e,(i,a)=>iu(t,r,e,i,a,n)),e;if(r.scope_!==t)return e;if(!r.modified_)return Ir(t,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let a=i,o=!1;r.type_===3&&(a=new Set(i),i.clear(),o=!0),Pr(a,(s,u)=>iu(t,r,i,s,u,n,o)),Ir(t,i,!1),n&&t.patches_&&gn("Patches").generatePatches_(r,n,t.patches_,t.inversePatches_)}return r.copy_}function iu(t,e,n,r,i,a,o){if(process.env.NODE_ENV!=="production"&&i===n&&Dt(5),pn(i)){const s=a&&e&&e.type_!==3&&!Xi(e.assigned_,r)?a.concat(r):void 0,u=Rr(t,i,s);if($s(n,r,u),pn(u))t.canAutoFreeze_=!1;else return}else o&&n.add(i);if(hn(i)&&!Tr(i)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;Rr(t,i),(!e||!e.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Ir(t,i)}}function Ir(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&Qi(e,n)}function yh(t,e){const n=Array.isArray(t),r={type_:n?1:0,scope_:e?e.scope_:eu(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,a=ta;n&&(i=[r],a=Kn);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,s}var ta={get(t,e){if(e===Bt)return t;const n=vn(t);if(!Xi(n,e))return Ch(t,n,e);const r=n[e];return t.finalized_||!hn(r)?r:r===na(t.base_,e)?(ia(t),t.copy_[e]=aa(r,t)):r},has(t,e){return e in vn(t)},ownKeys(t){return Reflect.ownKeys(vn(t))},set(t,e,n){const r=au(vn(t),e);if(r!=null&&r.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const i=na(vn(t),e),a=i==null?void 0:i[Bt];if(a&&a.base_===n)return t.copy_[e]=n,t.assigned_[e]=!1,!0;if(ph(n,i)&&(n!==void 0||Xi(t.base_,e)))return!0;ia(t),ra(t)}return t.copy_[e]===n&&(n!==void 0||e in t.copy_)||Number.isNaN(n)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=n,t.assigned_[e]=!0),!0},deleteProperty(t,e){return na(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,ia(t),ra(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const n=vn(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:r.enumerable,value:n[e]}},defineProperty(){Dt(11)},getPrototypeOf(t){return On(t.base_)},setPrototypeOf(){Dt(12)}},Kn={};Pr(ta,(t,e)=>{Kn[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Kn.deleteProperty=function(t,e){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(e))&&Dt(13),Kn.set.call(this,t,e,void 0)},Kn.set=function(t,e,n){return process.env.NODE_ENV!=="production"&&e!=="length"&&isNaN(parseInt(e))&&Dt(14),ta.set.call(this,t[0],e,n,t[0])};function na(t,e){const n=t[Bt];return(n?vn(n):t)[e]}function Ch(t,e,n){var i;const r=au(e,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(t.draft_):void 0}function au(t,e){if(!(e in t))return;let n=On(t);for(;n;){const r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=On(n)}}function ra(t){t.modified_||(t.modified_=!0,t.parent_&&ra(t.parent_))}function ia(t){t.copy_||(t.copy_=Ji(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Dh=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,n,r)=>{if(typeof e=="function"&&typeof n!="function"){const a=n;n=e;const o=this;return function(u=a,...l){return o.produce(u,f=>n.call(this,f,...l))}}typeof n!="function"&&Dt(6),r!==void 0&&typeof r!="function"&&Dt(7);let i;if(hn(e)){const a=nu(this),o=aa(e,void 0);let s=!0;try{i=n(o),s=!1}finally{s?$i(a):ea(a)}return tu(a,r),ru(i,a)}else if(!e||typeof e!="object"){if(i=n(e),i===void 0&&(i=e),i===Xs&&(i=void 0),this.autoFreeze_&&Qi(i,!0),r){const a=[],o=[];gn("Patches").generateReplacementPatches_(e,i,a,o),r(a,o)}return i}else Dt(1,e)},this.produceWithPatches=(e,n)=>{if(typeof e=="function")return(o,...s)=>this.produceWithPatches(o,u=>e(u,...s));let r,i;return[this.produce(e,n,(o,s)=>{r=o,i=s}),r,i]},typeof(t==null?void 0:t.autoFreeze)=="boolean"&&this.setAutoFreeze(t.autoFreeze),typeof(t==null?void 0:t.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){hn(t)||Dt(8),pn(t)&&(t=bh(t));const e=nu(this),n=aa(t,void 0);return n[Bt].isManual_=!0,ea(e),n}finishDraft(t,e){const n=t&&t[Bt];(!n||!n.isManual_)&&Dt(9);const{scope_:r}=n;return tu(r,e),ru(void 0,r)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,e){let n;for(n=e.length-1;n>=0;n--){const i=e[n];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}n>-1&&(e=e.slice(n+1));const r=gn("Patches").applyPatches_;return pn(t)?r(t,e):this.produce(t,i=>r(i,e))}};function aa(t,e){const n=Fr(t)?gn("MapSet").proxyMap_(t,e):kr(t)?gn("MapSet").proxySet_(t,e):yh(t,e);return(e?e.scope_:eu()).drafts_.push(n),n}function bh(t){return pn(t)||Dt(10,t),ou(t)}function ou(t){if(!hn(t)||Tr(t))return t;const e=t[Bt];let n;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=Ji(t,e.scope_.immer_.useStrictShallowCopy_)}else n=Ji(t,!0);return Pr(n,(r,i)=>{$s(n,r,ou(i))}),e&&(e.finalized_=!1),n}var St=new Dh,oa=St.produce;St.produceWithPatches.bind(St),St.setAutoFreeze.bind(St),St.setUseStrictShallowCopy.bind(St),St.applyPatches.bind(St);var su=St.createDraft.bind(St),uu=St.finishDraft.bind(St),Eh={transform(t,e){var{current:n,affinity:r}=t;if(n!=null){var i=L.transform(n,e,{affinity:r});t.current=i,i==null&&t.unref()}}},wh={transform(t,e){var{current:n,affinity:r}=t;if(n!=null){var i=Le.transform(n,e,{affinity:r});t.current=i,i==null&&t.unref()}}},xh={transform(t,e){var{current:n,affinity:r}=t;if(n!=null){var i=q.transform(n,e,{affinity:r});t.current=i,i==null&&t.unref()}}},jr=new WeakMap,Nr=new WeakMap,Xn=new WeakMap,lu=new WeakMap,cu=new WeakMap,fu=new WeakMap,du=new WeakMap,L={ancestors(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=e,r=L.levels(t,e);return n?r=r.slice(1):r=r.slice(0,-1),r},common(t,e){for(var n=[],r=0;r<t.length&&r<e.length;r++){var i=t[r],a=e[r];if(i!==a)break;n.push(i)}return n},compare(t,e){for(var n=Math.min(t.length,e.length),r=0;r<n;r++){if(t[r]<e[r])return-1;if(t[r]>e[r])return 1}return 0},endsAfter(t,e){var n=t.length-1,r=t.slice(0,n),i=e.slice(0,n),a=t[n],o=e[n];return L.equals(r,i)&&a>o},endsAt(t,e){var n=t.length,r=t.slice(0,n),i=e.slice(0,n);return L.equals(r,i)},endsBefore(t,e){var n=t.length-1,r=t.slice(0,n),i=e.slice(0,n),a=t[n],o=e[n];return L.equals(r,i)&&a<o},equals(t,e){return t.length===e.length&&t.every((n,r)=>n===e[r])},hasPrevious(t){return t[t.length-1]>0},isAfter(t,e){return L.compare(t,e)===1},isAncestor(t,e){return t.length<e.length&&L.compare(t,e)===0},isBefore(t,e){return L.compare(t,e)===-1},isChild(t,e){return t.length===e.length+1&&L.compare(t,e)===0},isCommon(t,e){return t.length<=e.length&&L.compare(t,e)===0},isDescendant(t,e){return t.length>e.length&&L.compare(t,e)===0},isParent(t,e){return t.length+1===e.length&&L.compare(t,e)===0},isPath(t){return Array.isArray(t)&&(t.length===0||typeof t[0]=="number")},isSibling(t,e){if(t.length!==e.length)return!1;var n=t.slice(0,-1),r=e.slice(0,-1),i=t[t.length-1],a=e[e.length-1];return i!==a&&L.equals(n,r)},levels(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=e,r=[],i=0;i<=t.length;i++)r.push(t.slice(0,i));return n&&r.reverse(),r},next(t){if(t.length===0)throw new Error("Cannot get the next path of a root path [".concat(t,"], because it has no next index."));var e=t[t.length-1];return t.slice(0,-1).concat(e+1)},operationCanTransformPath(t){switch(t.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(t){if(t.length===0)throw new Error("Cannot get the parent path of the root path [".concat(t,"]."));return t.slice(0,-1)},previous(t){if(t.length===0)throw new Error("Cannot get the previous path of a root path [".concat(t,"], because it has no previous index."));var e=t[t.length-1];if(e<=0)throw new Error("Cannot get the previous path of a first child path [".concat(t,"] because it would result in a negative index."));return t.slice(0,-1).concat(e-1)},relative(t,e){if(!L.isAncestor(e,t)&&!L.equals(t,e))throw new Error("Cannot get the relative path of [".concat(t,"] inside ancestor [").concat(e,"], because it is not above or equal to the path."));return t.slice(e.length)},transform(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t)return null;var r=[...t],{affinity:i="forward"}=n;if(t.length===0)return r;switch(e.type){case"insert_node":{var{path:a}=e;(L.equals(a,r)||L.endsBefore(a,r)||L.isAncestor(a,r))&&(r[a.length-1]+=1);break}case"remove_node":{var{path:o}=e;if(L.equals(o,r)||L.isAncestor(o,r))return null;L.endsBefore(o,r)&&(r[o.length-1]-=1);break}case"merge_node":{var{path:s,position:u}=e;L.equals(s,r)||L.endsBefore(s,r)?r[s.length-1]-=1:L.isAncestor(s,r)&&(r[s.length-1]-=1,r[s.length]+=u);break}case"split_node":{var{path:l,position:f}=e;if(L.equals(l,r)){if(i==="forward")r[r.length-1]+=1;else if(i!=="backward")return null}else L.endsBefore(l,r)?r[l.length-1]+=1:L.isAncestor(l,r)&&t[l.length]>=f&&(r[l.length-1]+=1,r[l.length]-=f);break}case"move_node":{var{path:h,newPath:p}=e;if(L.equals(h,p))return r;if(L.isAncestor(h,r)||L.equals(h,r)){var g=p.slice();return L.endsBefore(h,p)&&h.length<p.length&&(g[h.length-1]-=1),g.concat(r.slice(h.length))}else L.isSibling(h,p)&&(L.isAncestor(p,r)||L.equals(p,r))?L.endsBefore(h,r)?r[h.length-1]-=1:r[h.length-1]+=1:L.endsBefore(p,r)||L.equals(p,r)||L.isAncestor(p,r)?(L.endsBefore(h,r)&&(r[h.length-1]-=1),r[p.length-1]+=1):L.endsBefore(h,r)&&(L.equals(p,r)&&(r[p.length-1]+=1),r[h.length-1]-=1);break}}return r}};function Jn(t){"@babel/helpers - typeof";return Jn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jn(t)}function Bh(t,e){if(Jn(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Jn(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Sh(t){var e=Bh(t,"string");return Jn(e)==="symbol"?e:String(e)}function ht(t,e,n){return e=Sh(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function pu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Qn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?pu(Object(n),!0).forEach(function(r){ht(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Ah=(t,e,n)=>{switch(n.type){case"insert_node":{var{path:r,node:i}=n,a=ie.parent(t,r),o=r[r.length-1];if(o>a.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(r,"] because the destination is past the end of the node."));if(a.children.splice(o,0,i),e)for(var[s,u]of q.points(e))e[u]=Le.transform(s,n);break}case"insert_text":{var{path:l,offset:f,text:h}=n;if(h.length===0)break;var p=ie.leaf(t,l),g=p.text.slice(0,f),y=p.text.slice(f);if(p.text=g+h+y,e)for(var[v,d]of q.points(e))e[d]=Le.transform(v,n);break}case"merge_node":{var{path:D}=n,x=ie.get(t,D),E=L.previous(D),O=ie.get(t,E),b=ie.parent(t,D),w=D[D.length-1];if(ce.isText(x)&&ce.isText(O))O.text+=x.text;else if(!ce.isText(x)&&!ce.isText(O))O.children.push(...x.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(D,"] to nodes of different interfaces: ").concat(lt.stringify(x)," ").concat(lt.stringify(O)));if(b.children.splice(w,1),e)for(var[A,M]of q.points(e))e[M]=Le.transform(A,n);break}case"move_node":{var{path:V,newPath:P}=n;if(L.isAncestor(V,P))throw new Error("Cannot move a path [".concat(V,"] to new path [").concat(P,"] because the destination is inside itself."));var _=ie.get(t,V),R=ie.parent(t,V),N=V[V.length-1];R.children.splice(N,1);var T=L.transform(V,n),j=ie.get(t,L.parent(T)),X=T[T.length-1];if(j.children.splice(X,0,_),e)for(var[z,$]of q.points(e))e[$]=Le.transform(z,n);break}case"remove_node":{var{path:re}=n,k=re[re.length-1],I=ie.parent(t,re);if(I.children.splice(k,1),e)for(var[G,H]of q.points(e)){var Q=Le.transform(G,n);if(e!=null&&Q!=null)e[H]=Q;else{var K=void 0,C=void 0;for(var[U,W]of ie.texts(t))if(L.compare(W,re)===-1)K=[U,W];else{C=[U,W];break}var F=!1;K&&C&&(L.equals(C[1],re)?F=!L.hasPrevious(C[1]):F=L.common(K[1],re).length<L.common(C[1],re).length),K&&!F?(G.path=K[1],G.offset=K[0].text.length):C?(G.path=C[1],G.offset=0):e=null}}break}case"remove_text":{var{path:J,offset:ne,text:Y}=n;if(Y.length===0)break;var ue=ie.leaf(t,J),ae=ue.text.slice(0,ne),de=ue.text.slice(ne+Y.length);if(ue.text=ae+de,e)for(var[pe,Ce]of q.points(e))e[Ce]=Le.transform(pe,n);break}case"set_node":{var{path:ye,properties:ge,newProperties:ve}=n;if(ye.length===0)throw new Error("Cannot set properties on the root node!");var Ne=ie.get(t,ye);for(var se in ve){if(se==="children"||se==="text")throw new Error('Cannot set the "'.concat(se,'" property of nodes!'));var _e=ve[se];_e==null?delete Ne[se]:Ne[se]=_e}for(var fe in ge)ve.hasOwnProperty(fe)||delete Ne[fe];break}case"set_selection":{var{newProperties:we}=n;if(we==null)e=we;else{if(e==null){if(!q.isRange(we))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(lt.stringify(we)," when there is no current selection."));e=Qn({},we)}for(var ke in we){var Ve=we[ke];if(Ve==null){if(ke==="anchor"||ke==="focus")throw new Error('Cannot remove the "'.concat(ke,'" selection property'));delete e[ke]}else e[ke]=Ve}}break}case"split_node":{var{path:Ye,position:Ee,properties:ct}=n;if(Ye.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(Ye,"] because the root node cannot be split."));var st=ie.get(t,Ye),Tt=ie.parent(t,Ye),yt=Ye[Ye.length-1],Lt;if(ce.isText(st)){var zt=st.text.slice(0,Ee),Ct=st.text.slice(Ee);st.text=zt,Lt=Qn(Qn({},ct),{},{text:Ct})}else{var ln=st.children.slice(0,Ee),be=st.children.slice(Ee);st.children=ln,Lt=Qn(Qn({},ct),{},{children:be})}if(Tt.children.splice(yt+1,0,Lt),e)for(var[Re,Ie]of q.points(e))e[Ie]=Le.transform(Re,n);break}}return e},Lh={transform(t,e){t.children=su(t.children);var n=t.selection&&su(t.selection);try{n=Ah(t,n,e)}finally{t.children=uu(t.children),n?t.selection=pn(n)?uu(n):n:t.selection=null}}},Oh={insertNodes(t,e,n){t.insertNodes(e,n)},liftNodes(t,e){t.liftNodes(e)},mergeNodes(t,e){t.mergeNodes(e)},moveNodes(t,e){t.moveNodes(e)},removeNodes(t,e){t.removeNodes(e)},setNodes(t,e,n){t.setNodes(e,n)},splitNodes(t,e){t.splitNodes(e)},unsetNodes(t,e,n){t.unsetNodes(e,n)},unwrapNodes(t,e){t.unwrapNodes(e)},wrapNodes(t,e,n){t.wrapNodes(e,n)}},Ph={collapse(t,e){t.collapse(e)},deselect(t){t.deselect()},move(t,e){t.move(e)},select(t,e){t.select(e)},setPoint(t,e,n){t.setPoint(e,n)},setSelection(t,e){t.setSelection(e)}},hu=(t,e)=>{for(var n in t){var r=t[n],i=e[n];if(pt(r)&&pt(i)){if(!hu(r,i))return!1}else if(Array.isArray(r)&&Array.isArray(i)){if(r.length!==i.length)return!1;for(var a=0;a<r.length;a++)if(r[a]!==i[a])return!1}else if(r!==i)return!1}for(var o in e)if(t[o]===void 0&&e[o]!==void 0)return!1;return!0};function Mh(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Ut(t,e){if(t==null)return{};var n=Mh(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}var Fh=["anchor","focus"];function vu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function kh(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?vu(Object(n),!0).forEach(function(r){ht(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var q={edges(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=e,{anchor:r,focus:i}=t;return q.isBackward(t)===n?[r,i]:[i,r]},end(t){var[,e]=q.edges(t);return e},equals(t,e){return Le.equals(t.anchor,e.anchor)&&Le.equals(t.focus,e.focus)},includes(t,e){if(q.isRange(e)){if(q.includes(t,e.anchor)||q.includes(t,e.focus))return!0;var[n,r]=q.edges(t),[i,a]=q.edges(e);return Le.isBefore(n,i)&&Le.isAfter(r,a)}var[o,s]=q.edges(t),u=!1,l=!1;return Le.isPoint(e)?(u=Le.compare(e,o)>=0,l=Le.compare(e,s)<=0):(u=L.compare(e,o.path)>=0,l=L.compare(e,s.path)<=0),u&&l},intersection(t,e){var n=Ut(t,Fh),[r,i]=q.edges(t),[a,o]=q.edges(e),s=Le.isBefore(r,a)?a:r,u=Le.isBefore(i,o)?i:o;return Le.isBefore(u,s)?null:kh({anchor:s,focus:u},n)},isBackward(t){var{anchor:e,focus:n}=t;return Le.isAfter(e,n)},isCollapsed(t){var{anchor:e,focus:n}=t;return Le.equals(e,n)},isExpanded(t){return!q.isCollapsed(t)},isForward(t){return!q.isBackward(t)},isRange(t){return pt(t)&&Le.isPoint(t.anchor)&&Le.isPoint(t.focus)},*points(t){yield[t.anchor,"anchor"],yield[t.focus,"focus"]},start(t){var[e]=q.edges(t);return e},transform(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return oa(t,r=>{if(r===null)return null;var{affinity:i="inward"}=n,a,o;if(i==="inward"){var s=q.isCollapsed(r);q.isForward(r)?(a="forward",o=s?a:"backward"):(a="backward",o=s?a:"forward")}else i==="outward"?q.isForward(r)?(a="backward",o="forward"):(a="forward",o="backward"):(a=i,o=i);var u=Le.transform(r.anchor,e,{affinity:a}),l=Le.transform(r.focus,e,{affinity:o});if(!u||!l)return null;r.anchor=u,r.focus=l})}},gu=t=>pt(t)&&ie.isNodeList(t.children)&&!m.isEditor(t),le={isAncestor(t){return pt(t)&&ie.isNodeList(t.children)},isElement:gu,isElementList(t){return Array.isArray(t)&&t.every(e=>le.isElement(e))},isElementProps(t){return t.children!==void 0},isElementType:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return gu(e)&&e[r]===n},matches(t,e){for(var n in e)if(n!=="children"&&t[n]!==e[n])return!1;return!0}},Th=["children"],Rh=["text"],mu=new WeakMap,ie={ancestor(t,e){var n=ie.get(t,e);if(ce.isText(n))throw new Error("Cannot get the ancestor node at path [".concat(e,"] because it refers to a text node instead: ").concat(lt.stringify(n)));return n},ancestors(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var r of L.ancestors(e,n)){var i=ie.ancestor(t,r),a=[i,r];yield a}}()},child(t,e){if(ce.isText(t))throw new Error("Cannot get the child of a text node: ".concat(lt.stringify(t)));var n=t.children[e];if(n==null)throw new Error("Cannot get child at index `".concat(e,"` in node: ").concat(lt.stringify(t)));return n},children(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var{reverse:r=!1}=n,i=ie.ancestor(t,e),{children:a}=i,o=r?a.length-1:0;r?o>=0:o<a.length;){var s=ie.child(i,o),u=e.concat(o);yield[s,u],o=r?o-1:o+1}}()},common(t,e,n){var r=L.common(e,n),i=ie.get(t,r);return[i,r]},descendant(t,e){var n=ie.get(t,e);if(m.isEditor(n))throw new Error("Cannot get the descendant node at path [".concat(e,"] because it refers to the root editor node instead: ").concat(lt.stringify(n)));return n},descendants(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of ie.nodes(t,e))r.length!==0&&(yield[n,r])}()},elements(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of ie.nodes(t,e))le.isElement(n)&&(yield[n,r])}()},extractProps(t){if(le.isAncestor(t)){var e=Ut(t,Th);return e}else{var e=Ut(t,Rh);return e}},first(t,e){for(var n=e.slice(),r=ie.get(t,n);r&&!(ce.isText(r)||r.children.length===0);)r=r.children[0],n.push(0);return[r,n]},fragment(t,e){if(ce.isText(t))throw new Error("Cannot get a fragment starting from a root text node: ".concat(lt.stringify(t)));var n=oa({children:t.children},r=>{var[i,a]=q.edges(e),o=ie.nodes(r,{reverse:!0,pass:p=>{var[,g]=p;return!q.includes(e,g)}});for(var[,s]of o){if(!q.includes(e,s)){var u=ie.parent(r,s),l=s[s.length-1];u.children.splice(l,1)}if(L.equals(s,a.path)){var f=ie.leaf(r,s);f.text=f.text.slice(0,a.offset)}if(L.equals(s,i.path)){var h=ie.leaf(r,s);h.text=h.text.slice(i.offset)}}m.isEditor(r)&&(r.selection=null)});return n.children},get(t,e){for(var n=t,r=0;r<e.length;r++){var i=e[r];if(ce.isText(n)||!n.children[i])throw new Error("Cannot find a descendant at path [".concat(e,"] in node: ").concat(lt.stringify(t)));n=n.children[i]}return n},has(t,e){for(var n=t,r=0;r<e.length;r++){var i=e[r];if(ce.isText(n)||!n.children[i])return!1;n=n.children[i]}return!0},isNode(t){return ce.isText(t)||le.isElement(t)||m.isEditor(t)},isNodeList(t){if(!Array.isArray(t))return!1;var e=mu.get(t);if(e!==void 0)return e;var n=t.every(r=>ie.isNode(r));return mu.set(t,n),n},last(t,e){for(var n=e.slice(),r=ie.get(t,n);r&&!(ce.isText(r)||r.children.length===0);){var i=r.children.length-1;r=r.children[i],n.push(i)}return[r,n]},leaf(t,e){var n=ie.get(t,e);if(!ce.isText(n))throw new Error("Cannot get the leaf node at path [".concat(e,"] because it refers to a non-leaf node: ").concat(lt.stringify(n)));return n},levels(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var r of L.levels(e,n)){var i=ie.get(t,r);yield[i,r]}}()},matches(t,e){return le.isElement(t)&&le.isElementProps(e)&&le.matches(t,e)||ce.isText(t)&&ce.isTextProps(e)&&ce.matches(t,e)},nodes(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var{pass:n,reverse:r=!1}=e,{from:i=[],to:a}=e,o=new Set,s=[],u=t;!(a&&(r?L.isBefore(s,a):L.isAfter(s,a)));){if(o.has(u)||(yield[u,s]),!o.has(u)&&!ce.isText(u)&&u.children.length!==0&&(n==null||n([u,s])===!1)){o.add(u);var l=r?u.children.length-1:0;L.isAncestor(s,i)&&(l=i[s.length]),s=s.concat(l),u=ie.get(t,s);continue}if(s.length===0)break;if(!r){var f=L.next(s);if(ie.has(t,f)){s=f,u=ie.get(t,s);continue}}if(r&&s[s.length-1]!==0){var h=L.previous(s);s=h,u=ie.get(t,s);continue}s=L.parent(s),u=ie.get(t,s),o.add(u)}}()},parent(t,e){var n=L.parent(e),r=ie.get(t,n);if(ce.isText(r))throw new Error("Cannot get the parent of path [".concat(e,"] because it does not exist in the root."));return r},string(t){return ce.isText(t)?t.text:t.children.map(ie.string).join("")},texts(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of ie.nodes(t,e))ce.isText(n)&&(yield[n,r])}()}};function yu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ze(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?yu(Object(n),!0).forEach(function(r){ht(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Jt={isNodeOperation(t){return Jt.isOperation(t)&&t.type.endsWith("_node")},isOperation(t){if(!pt(t))return!1;switch(t.type){case"insert_node":return L.isPath(t.path)&&ie.isNode(t.node);case"insert_text":return typeof t.offset=="number"&&typeof t.text=="string"&&L.isPath(t.path);case"merge_node":return typeof t.position=="number"&&L.isPath(t.path)&&pt(t.properties);case"move_node":return L.isPath(t.path)&&L.isPath(t.newPath);case"remove_node":return L.isPath(t.path)&&ie.isNode(t.node);case"remove_text":return typeof t.offset=="number"&&typeof t.text=="string"&&L.isPath(t.path);case"set_node":return L.isPath(t.path)&&pt(t.properties)&&pt(t.newProperties);case"set_selection":return t.properties===null&&q.isRange(t.newProperties)||t.newProperties===null&&q.isRange(t.properties)||pt(t.properties)&&pt(t.newProperties);case"split_node":return L.isPath(t.path)&&typeof t.position=="number"&&pt(t.properties);default:return!1}},isOperationList(t){return Array.isArray(t)&&t.every(e=>Jt.isOperation(e))},isSelectionOperation(t){return Jt.isOperation(t)&&t.type.endsWith("_selection")},isTextOperation(t){return Jt.isOperation(t)&&t.type.endsWith("_text")},inverse(t){switch(t.type){case"insert_node":return Ze(Ze({},t),{},{type:"remove_node"});case"insert_text":return Ze(Ze({},t),{},{type:"remove_text"});case"merge_node":return Ze(Ze({},t),{},{type:"split_node",path:L.previous(t.path)});case"move_node":{var{newPath:e,path:n}=t;if(L.equals(e,n))return t;if(L.isSibling(n,e))return Ze(Ze({},t),{},{path:e,newPath:n});var r=L.transform(n,t),i=L.transform(L.next(n),t);return Ze(Ze({},t),{},{path:r,newPath:i})}case"remove_node":return Ze(Ze({},t),{},{type:"insert_node"});case"remove_text":return Ze(Ze({},t),{},{type:"insert_text"});case"set_node":{var{properties:a,newProperties:o}=t;return Ze(Ze({},t),{},{properties:o,newProperties:a})}case"set_selection":{var{properties:s,newProperties:u}=t;return s==null?Ze(Ze({},t),{},{properties:u,newProperties:null}):u==null?Ze(Ze({},t),{},{properties:null,newProperties:s}):Ze(Ze({},t),{},{properties:u,newProperties:s})}case"split_node":return Ze(Ze({},t),{},{type:"merge_node",path:L.next(t.path)})}}},Cu=new WeakMap,Ih=t=>{var e=Cu.get(t);if(e!==void 0)return e;if(!pt(t))return!1;var n=typeof t.addMark=="function"&&typeof t.apply=="function"&&typeof t.deleteFragment=="function"&&typeof t.insertBreak=="function"&&typeof t.insertSoftBreak=="function"&&typeof t.insertFragment=="function"&&typeof t.insertNode=="function"&&typeof t.insertText=="function"&&typeof t.isElementReadOnly=="function"&&typeof t.isInline=="function"&&typeof t.isSelectable=="function"&&typeof t.isVoid=="function"&&typeof t.normalizeNode=="function"&&typeof t.onChange=="function"&&typeof t.removeMark=="function"&&typeof t.getDirtyPaths=="function"&&(t.marks===null||pt(t.marks))&&(t.selection===null||q.isRange(t.selection))&&ie.isNodeList(t.children)&&Jt.isOperationList(t.operations);return Cu.set(t,n),n},m={above(t,e){return t.above(e)},addMark(t,e,n){t.addMark(e,n)},after(t,e,n){return t.after(e,n)},before(t,e,n){return t.before(e,n)},deleteBackward(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=e;t.deleteBackward(n)},deleteForward(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=e;t.deleteForward(n)},deleteFragment(t,e){t.deleteFragment(e)},edges(t,e){return t.edges(e)},elementReadOnly(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.elementReadOnly(e)},end(t,e){return t.end(e)},first(t,e){return t.first(e)},fragment(t,e){return t.fragment(e)},hasBlocks(t,e){return t.hasBlocks(e)},hasInlines(t,e){return t.hasInlines(e)},hasPath(t,e){return t.hasPath(e)},hasTexts(t,e){return t.hasTexts(e)},insertBreak(t){t.insertBreak()},insertFragment(t,e,n){t.insertFragment(e,n)},insertNode(t,e){t.insertNode(e)},insertSoftBreak(t){t.insertSoftBreak()},insertText(t,e){t.insertText(e)},isBlock(t,e){return t.isBlock(e)},isEdge(t,e,n){return t.isEdge(e,n)},isEditor(t){return Ih(t)},isElementReadOnly(t,e){return t.isElementReadOnly(e)},isEmpty(t,e){return t.isEmpty(e)},isEnd(t,e,n){return t.isEnd(e,n)},isInline(t,e){return t.isInline(e)},isNormalizing(t){return t.isNormalizing()},isSelectable(t,e){return t.isSelectable(e)},isStart(t,e,n){return t.isStart(e,n)},isVoid(t,e){return t.isVoid(e)},last(t,e){return t.last(e)},leaf(t,e,n){return t.leaf(e,n)},levels(t,e){return t.levels(e)},marks(t){return t.getMarks()},next(t,e){return t.next(e)},node(t,e,n){return t.node(e,n)},nodes(t,e){return t.nodes(e)},normalize(t,e){t.normalize(e)},parent(t,e,n){return t.parent(e,n)},path(t,e,n){return t.path(e,n)},pathRef(t,e,n){return t.pathRef(e,n)},pathRefs(t){return t.pathRefs()},point(t,e,n){return t.point(e,n)},pointRef(t,e,n){return t.pointRef(e,n)},pointRefs(t){return t.pointRefs()},positions(t,e){return t.positions(e)},previous(t,e){return t.previous(e)},range(t,e,n){return t.range(e,n)},rangeRef(t,e,n){return t.rangeRef(e,n)},rangeRefs(t){return t.rangeRefs()},removeMark(t,e){t.removeMark(e)},setNormalizing(t,e){t.setNormalizing(e)},start(t,e){return t.start(e)},string(t,e,n){return t.string(e,n)},unhangRange(t,e,n){return t.unhangRange(e,n)},void(t,e){return t.void(e)},withoutNormalizing(t,e){t.withoutNormalizing(e)},shouldMergeNodesRemovePrevNode:(t,e,n)=>t.shouldMergeNodesRemovePrevNode(e,n)},jh={isSpan(t){return Array.isArray(t)&&t.length===2&&t.every(L.isPath)}};function Du(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function bu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Du(Object(n),!0).forEach(function(r){ht(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Du(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Le={compare(t,e){var n=L.compare(t.path,e.path);return n===0?t.offset<e.offset?-1:t.offset>e.offset?1:0:n},isAfter(t,e){return Le.compare(t,e)===1},isBefore(t,e){return Le.compare(t,e)===-1},equals(t,e){return t.offset===e.offset&&L.equals(t.path,e.path)},isPoint(t){return pt(t)&&typeof t.offset=="number"&&L.isPath(t.path)},transform(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return oa(t,r=>{if(r===null)return null;var{affinity:i="forward"}=n,{path:a,offset:o}=r;switch(e.type){case"insert_node":case"move_node":{r.path=L.transform(a,e,n);break}case"insert_text":{L.equals(e.path,a)&&(e.offset<o||e.offset===o&&i==="forward")&&(r.offset+=e.text.length);break}case"merge_node":{L.equals(e.path,a)&&(r.offset+=e.position),r.path=L.transform(a,e,n);break}case"remove_text":{L.equals(e.path,a)&&e.offset<=o&&(r.offset-=Math.min(o-e.offset,e.text.length));break}case"remove_node":{if(L.equals(e.path,a)||L.isAncestor(e.path,a))return null;r.path=L.transform(a,e,n);break}case"split_node":{if(L.equals(e.path,a)){if(e.position===o&&i==null)return null;(e.position<o||e.position===o&&i==="forward")&&(r.offset-=e.position,r.path=L.transform(a,e,bu(bu({},n),{},{affinity:"forward"})))}else r.path=L.transform(a,e,n);break}}})}},Eu=void 0,lt={setScrubber(t){Eu=t},stringify(t){return JSON.stringify(t,Eu)}},Nh=["text"],_h=["anchor","focus"];function wu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ht(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?wu(Object(n),!0).forEach(function(r){ht(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var ce={equals(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:r=!1}=n;function i(a){var o=Ut(a,Nh);return o}return hu(r?i(t):t,r?i(e):e)},isText(t){return pt(t)&&typeof t.text=="string"},isTextList(t){return Array.isArray(t)&&t.every(e=>ce.isText(e))},isTextProps(t){return t.text!==void 0},matches(t,e){for(var n in e)if(n!=="text"&&(!t.hasOwnProperty(n)||t[n]!==e[n]))return!1;return!0},decorations(t,e){var n=[Ht({},t)];for(var r of e){var i=Ut(r,_h),[a,o]=q.edges(r),s=[],u=0,l=a.offset,f=o.offset;for(var h of n){var{length:p}=h.text,g=u;if(u+=p,l<=g&&u<=f){Object.assign(h,i),s.push(h);continue}if(l!==f&&(l===u||f===g)||l>u||f<g||f===g&&g!==0){s.push(h);continue}var y=h,v=void 0,d=void 0;if(f<u){var D=f-g;d=Ht(Ht({},y),{},{text:y.text.slice(D)}),y=Ht(Ht({},y),{},{text:y.text.slice(0,D)})}if(l>g){var x=l-g;v=Ht(Ht({},y),{},{text:y.text.slice(0,x)}),y=Ht(Ht({},y),{},{text:y.text.slice(x)})}Object.assign(y,i),v&&s.push(v),s.push(y),d&&s.push(d)}n=s}return n}},sa=t=>t.selection?t.selection:t.children.length>0?m.end(t,[]):[0],Pn=(t,e)=>{var[n]=m.node(t,e);return r=>r===n},ua=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=!n,i=n?qh(e):e,a=Be.None,o=Be.None,s=0,u=null,l=null;for(var f of i){var h=f.codePointAt(0);if(!h)break;var p=rv(f,h);if([a,o]=r?[o,p]:[p,a],Mn(a,Be.ZWJ)&&Mn(o,Be.ExtPict)&&(r?u=xu(e.substring(0,s)):u=xu(e.substring(0,e.length-s)),!u)||Mn(a,Be.RI)&&Mn(o,Be.RI)&&(l!==null?l=!l:r?l=!0:l=uv(e.substring(0,e.length-s)),!l)||a!==Be.None&&o!==Be.None&&av(a,o))break;s+=f.length}return s||1},zh=/\s/,Wh=/[\u002B\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,Uh=/['\u2018\u2019]/,Hh=function(e){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=0,i=!1;e.length>0;){var a=ua(e,n),[o,s]=la(e,a,n);if(Vh(o,s,n))i=!0,r+=a;else if(!i)r+=a;else break;e=s}return r},la=(t,e,n)=>{if(n){var r=t.length-e;return[t.slice(r,t.length),t.slice(0,r)]}return[t.slice(0,e),t.slice(e)]},Vh=function t(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(zh.test(e))return!1;if(Uh.test(e)){var i=ua(n,r),[a,o]=la(n,i,r);if(t(a,o,r))return!0}return!Wh.test(e)},qh=function*(e){for(var n=e.length-1,r=0;r<e.length;r++){var i=e.charAt(n-r);if(Yh(i.charCodeAt(0))){var a=e.charAt(n-r-1);if(Gh(a.charCodeAt(0))){yield a+i,r++;continue}}yield i}},Gh=t=>t>=55296&&t<=56319,Yh=t=>t>=56320&&t<=57343,Be;(function(t){t[t.None=0]="None",t[t.Extend=1]="Extend",t[t.ZWJ=2]="ZWJ",t[t.RI=4]="RI",t[t.Prepend=8]="Prepend",t[t.SpacingMark=16]="SpacingMark",t[t.L=32]="L",t[t.V=64]="V",t[t.T=128]="T",t[t.LV=256]="LV",t[t.LVT=512]="LVT",t[t.ExtPict=1024]="ExtPict",t[t.Any=2048]="Any"})(Be||(Be={}));var Zh=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,Kh=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,Xh=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,Jh=/^[\u1100-\u115F\uA960-\uA97C]$/,Qh=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,$h=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,ev=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,tv=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,nv=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,rv=(t,e)=>{var n=Be.Any;return t.search(Zh)!==-1&&(n|=Be.Extend),e===8205&&(n|=Be.ZWJ),e>=127462&&e<=127487&&(n|=Be.RI),t.search(Kh)!==-1&&(n|=Be.Prepend),t.search(Xh)!==-1&&(n|=Be.SpacingMark),t.search(Jh)!==-1&&(n|=Be.L),t.search(Qh)!==-1&&(n|=Be.V),t.search($h)!==-1&&(n|=Be.T),t.search(ev)!==-1&&(n|=Be.LV),t.search(tv)!==-1&&(n|=Be.LVT),t.search(nv)!==-1&&(n|=Be.ExtPict),n};function Mn(t,e){return(t&e)!==0}var iv=[[Be.L,Be.L|Be.V|Be.LV|Be.LVT],[Be.LV|Be.V,Be.V|Be.T],[Be.LVT|Be.T,Be.T],[Be.Any,Be.Extend|Be.ZWJ],[Be.Any,Be.SpacingMark],[Be.Prepend,Be.Any],[Be.ZWJ,Be.ExtPict],[Be.RI,Be.RI]];function av(t,e){return iv.findIndex(n=>Mn(t,n[0])&&Mn(e,n[1]))===-1}var ov=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,xu=t=>t.search(ov)!==-1,sv=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,uv=t=>{var e=t.match(sv);if(e===null)return!1;var n=e[0].length/2;return n%2===1},lv={delete(t,e){t.delete(e)},insertFragment(t,e,n){t.insertFragment(e,n)},insertText(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(t,()=>{var{voids:r=!1}=n,{at:i=sa(t)}=n;if(L.isPath(i)&&(i=m.range(t,i)),q.isRange(i))if(q.isCollapsed(i))i=i.anchor;else{var a=q.end(i);if(!r&&m.void(t,{at:a}))return;var o=q.start(i),s=m.pointRef(t,o),u=m.pointRef(t,a);ee.delete(t,{at:i,voids:r});var l=s.unref(),f=u.unref();i=l||f,ee.setSelection(t,{anchor:i,focus:i})}if(!(!r&&m.void(t,{at:i})||m.elementReadOnly(t,{at:i}))){var{path:h,offset:p}=i;e.length>0&&t.apply({type:"insert_text",path:h,offset:p,text:e})}})}};function Bu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function _r(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Bu(Object(n),!0).forEach(function(r){ht(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Bu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var ee=_r(_r(_r(_r({},Lh),Oh),Ph),lv),zr=new WeakMap,cv=t=>zr.get(t)||!1,fv=(t,e,n)=>{var r=zr.get(t)||!1;zr.set(t,!0);try{e(),n()}finally{zr.set(t,r)}};function Su(t,e,n){var r=jr.get(t)||[],i=Nr.get(t)||new Set,a,o,s=h=>{if(h){var p=h.join(",");o.has(p)||(o.add(p),a.push(h))}};if(n){a=[],o=new Set;for(var u of r){var l=n(u);s(l)}}else a=r,o=i;for(var f of e)s(f);jr.set(t,a),Nr.set(t,o)}var dv=(t,e)=>{for(var n of m.pathRefs(t))Eh.transform(n,e);for(var r of m.pointRefs(t))wh.transform(r,e);for(var i of m.rangeRefs(t))xh.transform(i,e);if(!cv(t)){var a=L.operationCanTransformPath(e)?o=>L.transform(o,e):void 0;Su(t,t.getDirtyPaths(e),a)}ee.transform(t,e),t.operations.push(e),m.normalize(t,{operation:e}),e.type==="set_selection"&&(t.marks=null),Xn.get(t)||(Xn.set(t,!0),Promise.resolve().then(()=>{Xn.set(t,!1),t.onChange({operation:e}),t.operations=[]}))},pv=(t,e)=>{switch(e.type){case"insert_text":case"remove_text":case"set_node":{var{path:n}=e;return L.levels(n)}case"insert_node":{var{node:r,path:i}=e,a=L.levels(i),o=ce.isText(r)?[]:Array.from(ie.nodes(r),P=>{var[,_]=P;return i.concat(_)});return[...a,...o]}case"merge_node":{var{path:s}=e,u=L.ancestors(s),l=L.previous(s);return[...u,l]}case"move_node":{var{path:f,newPath:h}=e;if(L.equals(f,h))return[];var p=[],g=[];for(var y of L.ancestors(f)){var v=L.transform(y,e);p.push(v)}for(var d of L.ancestors(h)){var D=L.transform(d,e);g.push(D)}var x=g[g.length-1],E=h[h.length-1],O=x.concat(E);return[...p,...g,O]}case"remove_node":{var{path:b}=e,w=L.ancestors(b);return[...w]}case"split_node":{var{path:A}=e,M=L.levels(A),V=L.next(A);return[...M,V]}default:return[]}},hv=t=>{var{selection:e}=t;return e?ie.fragment(t,e):[]},vv=(t,e)=>{var[n,r]=e;if(!ce.isText(n)){if(le.isElement(n)&&n.children.length===0){var i={text:""};ee.insertNodes(t,i,{at:r.concat(0),voids:!0});return}for(var a=m.isEditor(n)?!1:le.isElement(n)&&(t.isInline(n)||n.children.length===0||ce.isText(n.children[0])||t.isInline(n.children[0])),o=0,s=0;s<n.children.length;s++,o++){var u=ie.get(t,r);if(!ce.isText(u)){var l=u.children[o],f=u.children[o-1],h=s===n.children.length-1,p=ce.isText(l)||le.isElement(l)&&t.isInline(l);if(p!==a)ee.removeNodes(t,{at:r.concat(o),voids:!0}),o--;else if(le.isElement(l)){if(t.isInline(l)){if(f==null||!ce.isText(f)){var g={text:""};ee.insertNodes(t,g,{at:r.concat(o),voids:!0}),o++}else if(h){var y={text:""};ee.insertNodes(t,y,{at:r.concat(o+1),voids:!0}),o++}}}else{if(!ce.isText(l)&&!("children"in l)){var v=l;v.children=[]}f!=null&&ce.isText(f)&&(ce.equals(l,f,{loose:!0})?(ee.mergeNodes(t,{at:r.concat(o),voids:!0}),o--):f.text===""?(ee.removeNodes(t,{at:r.concat(o-1),voids:!0}),o--):l.text===""&&(ee.removeNodes(t,{at:r.concat(o),voids:!0}),o--))}}}}},gv=(t,e)=>{var{iteration:n,initialDirtyPathsLength:r}=e,i=r*42;if(n>i)throw new Error("Could not completely normalize the editor after ".concat(i," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state."));return!0},mv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{voids:r=!1,mode:i="lowest",at:a=e.selection,match:o}=n;if(a){var s=m.path(e,a),u=i==="lowest";for(var[l,f]of m.levels(e,{at:s,voids:r,match:o,reverse:u}))if(!ce.isText(l)){if(q.isRange(a)){if(L.isAncestor(f,a.anchor.path)&&L.isAncestor(f,a.focus.path))return[l,f]}else if(!L.equals(s,f))return[l,f]}}};function Au(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Lu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Au(Object(n),!0).forEach(function(r){ht(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Au(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var yv=(t,e,n)=>{var{selection:r}=t;if(r){var i=(h,p)=>{if(!ce.isText(h))return!1;var[g,y]=m.parent(t,p);return!t.isVoid(g)||t.markableVoid(g)},a=q.isExpanded(r),o=!1;if(!a){var[s,u]=m.node(t,r);if(s&&i(s,u)){var[l]=m.parent(t,u);o=l&&t.markableVoid(l)}}if(a||o)ee.setNodes(t,{[e]:n},{match:i,split:!0,voids:!0});else{var f=Lu(Lu({},m.marks(t)||{}),{},{[e]:n});t.marks=f,Xn.get(t)||t.onChange()}}};function Ou(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Pu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ou(Object(n),!0).forEach(function(r){ht(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ou(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Cv=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.point(e,n,{edge:"end"}),a=m.end(e,[]),o={anchor:i,focus:a},{distance:s=1}=r,u=0,l;for(var f of m.positions(e,Pu(Pu({},r),{},{at:o}))){if(u>s)break;u!==0&&(l=f),u++}return l};function Mu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Fu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Mu(Object(n),!0).forEach(function(r){ht(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Mu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Dv=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.start(e,[]),a=m.point(e,n,{edge:"start"}),o={anchor:i,focus:a},{distance:s=1}=r,u=0,l;for(var f of m.positions(e,Fu(Fu({},r),{},{at:o,reverse:!0}))){if(u>s)break;u!==0&&(l=f),u++}return l},bv=(t,e)=>{var{selection:n}=t;n&&q.isCollapsed(n)&&ee.delete(t,{unit:e,reverse:!0})},Ev=(t,e)=>{var{selection:n}=t;n&&q.isCollapsed(n)&&ee.delete(t,{unit:e})},wv=function(e){var{direction:n="forward"}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e;r&&q.isExpanded(r)&&ee.delete(e,{reverse:n==="backward"})},xv=(t,e)=>[m.start(t,e),m.end(t,e)];function ku(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Tu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ku(Object(n),!0).forEach(function(r){ht(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ku(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Bv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return m.above(e,Tu(Tu({},n),{},{match:r=>le.isElement(r)&&m.isElementReadOnly(e,r)}))},Sv=(t,e)=>m.point(t,e,{edge:"end"}),Av=(t,e)=>{var n=m.path(t,e,{edge:"start"});return m.node(t,n)},Lv=(t,e)=>{var n=m.range(t,e);return ie.fragment(t,n)};function Ru(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Iu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ru(Object(n),!0).forEach(function(r){ht(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ru(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Ov=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return m.above(e,Iu(Iu({},n),{},{match:r=>le.isElement(r)&&m.isVoid(e,r)}))},Pv=(t,e)=>e.children.some(n=>le.isElement(n)&&m.isBlock(t,n)),Mv=(t,e)=>e.children.some(n=>ce.isText(n)||m.isInline(t,n)),Fv=(t,e)=>ie.has(t,e),kv=(t,e)=>e.children.every(n=>ce.isText(n)),Tv=t=>{ee.splitNodes(t,{always:!0})},Rv=(t,e,n)=>{ee.insertNodes(t,e,n)},Iv=t=>{ee.splitNodes(t,{always:!0})};function ju(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function jv(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ju(Object(n),!0).forEach(function(r){ht(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ju(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Nv=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:i,marks:a}=e;if(i){if(a){var o=jv({text:n},a);ee.insertNodes(e,o,{at:r.at,voids:r.voids})}else ee.insertText(e,n,r);e.marks=null}},_v=(t,e)=>!t.isInline(e),zv=(t,e,n)=>m.isStart(t,e,n)||m.isEnd(t,e,n),Wv=(t,e)=>{var{children:n}=e,[r]=n;return n.length===0||n.length===1&&ce.isText(r)&&r.text===""&&!t.isVoid(e)},Uv=(t,e,n)=>{var r=m.end(t,n);return Le.equals(e,r)},Hv=t=>{var e=lu.get(t);return e===void 0?!0:e},Vv=(t,e,n)=>{if(e.offset!==0)return!1;var r=m.start(t,n);return Le.equals(e,r)},qv=(t,e)=>{var n=m.path(t,e,{edge:"end"});return m.node(t,n)},Gv=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.path(e,n,r),a=ie.leaf(e,i);return[a,i]};function Yv(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:n=t.selection,reverse:r=!1,voids:i=!1}=e,{match:a}=e;if(a==null&&(a=()=>!0),!!n){var o=[],s=m.path(t,n);for(var[u,l]of ie.levels(t,s))if(a(u,l)&&(o.push([u,l]),!i&&le.isElement(u)&&m.isVoid(t,u)))break;r&&o.reverse(),yield*o}}()}var Zv=["text"],Kv=["text"],Xv=function(e){var{marks:n,selection:r}=e;if(!r)return null;var{anchor:i,focus:a}=r;if(n)return n;if(q.isExpanded(r)){var o=m.isEnd(e,i,i.path);if(o){var s=m.after(e,i);s&&(i=s)}var[u]=m.nodes(e,{match:ce.isText,at:{anchor:i,focus:a}});if(u){var[l]=u,f=Ut(l,Zv);return f}else return{}}var{path:h}=i,[p]=m.leaf(e,h);if(i.offset===0){var g=m.previous(e,{at:h,match:ce.isText}),y=m.above(e,{match:O=>le.isElement(O)&&m.isVoid(e,O)&&e.markableVoid(O)});if(!y){var v=m.above(e,{match:O=>le.isElement(O)&&m.isBlock(e,O)});if(g&&v){var[d,D]=g,[,x]=v;L.isAncestor(x,D)&&(p=d)}}}var E=Ut(p,Kv);return E},Jv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:i=!1}=n,{match:a,at:o=e.selection}=n;if(o){var s=m.after(e,o,{voids:i});if(s){var[,u]=m.last(e,[]),l=[s.path,u];if(L.isPath(o)&&o.length===0)throw new Error("Cannot get the next node from the root node!");if(a==null)if(L.isPath(o)){var[f]=m.parent(e,o);a=p=>f.children.includes(p)}else a=()=>!0;var[h]=m.nodes(e,{at:l,match:a,mode:r,voids:i});return h}}},Qv=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.path(e,n,r),a=ie.get(e,i);return[a,i]};function $v(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:n=t.selection,mode:r="all",universal:i=!1,reverse:a=!1,voids:o=!1,ignoreNonSelectable:s=!1}=e,{match:u}=e;if(u||(u=()=>!0),!!n){var l,f;if(jh.isSpan(n))l=n[0],f=n[1];else{var h=m.path(t,n,{edge:"start"}),p=m.path(t,n,{edge:"end"});l=a?p:h,f=a?h:p}var g=ie.nodes(t,{reverse:a,from:l,to:f,pass:O=>{var[b]=O;return le.isElement(b)?!!(!o&&(m.isVoid(t,b)||m.isElementReadOnly(t,b))||s&&!m.isSelectable(t,b)):!1}}),y=[],v;for(var[d,D]of g)if(!(s&&le.isElement(d)&&!m.isSelectable(t,d))){var x=v&&L.compare(D,v[1])===0;if(!(r==="highest"&&x)){if(!u(d,D)){if(i&&!x&&ce.isText(d))return;continue}if(r==="lowest"&&x){v=[d,D];continue}var E=r==="lowest"?v:[d,D];E&&(i?y.push(E):yield E),v=[d,D]}}r==="lowest"&&v&&(i?y.push(v):yield v),i&&(yield*y)}}()}var eg=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:r=!1,operation:i}=n,a=f=>jr.get(f)||[],o=f=>Nr.get(f)||new Set,s=f=>{var h=a(f).pop(),p=h.join(",");return o(f).delete(p),h};if(m.isNormalizing(e)){if(r){var u=Array.from(ie.nodes(e),f=>{var[,h]=f;return h}),l=new Set(u.map(f=>f.join(",")));jr.set(e,u),Nr.set(e,l)}a(e).length!==0&&m.withoutNormalizing(e,()=>{for(var f of a(e))if(ie.has(e,f)){var h=m.node(e,f),[p,g]=h;le.isElement(p)&&p.children.length===0&&e.normalizeNode(h,{operation:i})}for(var y=a(e),v=y.length,d=0;y.length!==0;){if(!e.shouldNormalize({dirtyPaths:y,iteration:d,initialDirtyPathsLength:v,operation:i}))return;var D=s(e);if(ie.has(e,D)){var x=m.node(e,D);e.normalizeNode(x,{operation:i})}d++,y=a(e)}})}},tg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.path(e,n,r),a=L.parent(i),o=m.node(e,a);return o},ng=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=r,a={current:n,affinity:i,unref(){var{current:s}=a,u=m.pathRefs(e);return u.delete(a),a.current=null,s}},o=m.pathRefs(e);return o.add(a),a},rg=t=>{var e=cu.get(t);return e||(e=new Set,cu.set(t,e)),e},ig=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:i,edge:a}=r;if(L.isPath(n)){if(a==="start"){var[,o]=ie.first(e,n);n=o}else if(a==="end"){var[,s]=ie.last(e,n);n=s}}return q.isRange(n)&&(a==="start"?n=q.start(n):a==="end"?n=q.end(n):n=L.common(n.anchor.path,n.focus.path)),Le.isPoint(n)&&(n=n.path),i!=null&&(n=n.slice(0,i)),n},ag=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=r,a={current:n,affinity:i,unref(){var{current:s}=a,u=m.pointRefs(e);return u.delete(a),a.current=null,s}},o=m.pointRefs(e);return o.add(a),a},og=t=>{var e=fu.get(t);return e||(e=new Set,fu.set(t,e)),e},sg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:i="start"}=r;if(L.isPath(n)){var a;if(i==="end"){var[,o]=ie.last(e,n);a=o}else{var[,s]=ie.first(e,n);a=s}var u=ie.get(e,a);if(!ce.isText(u))throw new Error("Cannot get the ".concat(i," point in the node at path [").concat(n,"] because it has no ").concat(i," text node."));return{path:a,offset:i==="end"?u.text.length:0}}if(q.isRange(n)){var[l,f]=q.edges(n);return i==="start"?l:f}return n};function ug(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:n=t.selection,unit:r="offset",reverse:i=!1,voids:a=!1,ignoreNonSelectable:o=!1}=e;if(!n)return;var s=m.range(t,n),[u,l]=q.edges(s),f=i?l:u,h=!1,p="",g=0,y=0,v=0;for(var[d,D]of m.nodes(t,{at:n,reverse:i,voids:a,ignoreNonSelectable:o})){if(le.isElement(d)){if(!a&&(t.isVoid(d)||t.isElementReadOnly(d))){yield m.start(t,D);continue}if(t.isInline(d))continue;if(m.hasInlines(t,d)){var x=L.isAncestor(D,l.path)?l:m.end(t,D),E=L.isAncestor(D,u.path)?u:m.start(t,D);p=m.string(t,{anchor:E,focus:x},{voids:a}),h=!0}}if(ce.isText(d)){var O=L.equals(D,f.path);for(O?(y=i?f.offset:d.text.length-f.offset,v=f.offset):(y=d.text.length,v=i?y:0),(O||h||r==="offset")&&(yield{path:D,offset:v},h=!1);;){if(g===0){if(p==="")break;g=b(p,r,i),p=la(p,g,i)[1]}if(v=i?v-g:v+g,y=y-g,y<0){g=-y;break}g=0,yield{path:D,offset:v}}}}function b(w,A,M){return A==="character"?ua(w,M):A==="word"?Hh(w,M):A==="line"||A==="block"?w.length:1}}()}var lg=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:i=!1}=n,{match:a,at:o=e.selection}=n;if(o){var s=m.before(e,o,{voids:i});if(s){var[,u]=m.first(e,[]),l=[s.path,u];if(L.isPath(o)&&o.length===0)throw new Error("Cannot get the previous node from the root node!");if(a==null)if(L.isPath(o)){var[f]=m.parent(e,o);a=p=>f.children.includes(p)}else a=()=>!0;var[h]=m.nodes(e,{reverse:!0,at:l,match:a,mode:r,voids:i});return h}}},cg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=r,a={current:n,affinity:i,unref(){var{current:s}=a,u=m.rangeRefs(e);return u.delete(a),a.current=null,s}},o=m.rangeRefs(e);return o.add(a),a},fg=t=>{var e=du.get(t);return e||(e=new Set,du.set(t,e)),e},dg=(t,e,n)=>{if(q.isRange(e)&&!n)return e;var r=m.start(t,e),i=m.end(t,n||e);return{anchor:r,focus:i}};function Nu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function pg(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Nu(Object(n),!0).forEach(function(r){ht(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Nu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var hg=(t,e)=>{var{selection:n}=t;if(n){var r=(f,h)=>{if(!ce.isText(f))return!1;var[p,g]=m.parent(t,h);return!t.isVoid(p)||t.markableVoid(p)},i=q.isExpanded(n),a=!1;if(!i){var[o,s]=m.node(t,n);if(o&&r(o,s)){var[u]=m.parent(t,s);a=u&&t.markableVoid(u)}}if(i||a)ee.unsetNodes(t,e,{match:r,split:!0,voids:!0});else{var l=pg({},m.marks(t)||{});delete l[e],t.marks=l,Xn.get(t)||t.onChange()}}},vg=(t,e)=>{lu.set(t,e)},gg=(t,e)=>m.point(t,e,{edge:"start"}),mg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:i=!1}=r,a=m.range(e,n),[o,s]=q.edges(a),u="";for(var[l,f]of m.nodes(e,{at:a,match:ce.isText,voids:i})){var h=l.text;L.equals(f,s.path)&&(h=h.slice(0,s.offset)),L.equals(f,o.path)&&(h=h.slice(o.offset)),u+=h}return u},yg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:i=!1}=r,[a,o]=q.edges(n);if(a.offset!==0||o.offset!==0||q.isCollapsed(n)||L.hasPrevious(o.path))return n;var s=m.above(e,{at:o,match:y=>le.isElement(y)&&m.isBlock(e,y),voids:i}),u=s?s[1]:[],l=m.start(e,a),f={anchor:l,focus:o},h=!0;for(var[p,g]of m.nodes(e,{at:f,match:ce.isText,reverse:!0,voids:i})){if(h){h=!1;continue}if(p.text!==""||L.isBefore(g,u)){o={path:g,offset:p.text.length};break}}return{anchor:a,focus:o}},Cg=(t,e)=>{var n=m.isNormalizing(t);m.setNormalizing(t,!1);try{e()}finally{m.setNormalizing(t,n)}m.normalize(t)},Dg=(t,e,n)=>{var[r,i]=e;return le.isElement(r)&&m.isEmpty(t,r)||ce.isText(r)&&r.text===""&&i[i.length-1]!==0},bg=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var r,i,{reverse:a=!1,unit:o="character",distance:s=1,voids:u=!1}=n,{at:l=e.selection,hanging:f=!1}=n;if(l){var h=!1;if(q.isRange(l)&&q.isCollapsed(l)&&(h=!0,l=l.anchor),Le.isPoint(l)){var p=m.void(e,{at:l,mode:"highest"});if(!u&&p){var[,g]=p;l=g}else{var y={unit:o,distance:s},v=a?m.before(e,l,y)||m.start(e,[]):m.after(e,l,y)||m.end(e,[]);l={anchor:l,focus:v},f=!0}}if(L.isPath(l)){ee.removeNodes(e,{at:l,voids:u});return}if(!q.isCollapsed(l)){if(!f){var[,d]=q.edges(l),D=m.end(e,[]);Le.equals(d,D)||(l=m.unhangRange(e,l,{voids:u}))}var[x,E]=q.edges(l),O=m.above(e,{match:ae=>le.isElement(ae)&&m.isBlock(e,ae),at:x,voids:u}),b=m.above(e,{match:ae=>le.isElement(ae)&&m.isBlock(e,ae),at:E,voids:u}),w=O&&b&&!L.equals(O[1],b[1]),A=L.equals(x.path,E.path),M=u?null:(r=m.void(e,{at:x,mode:"highest"}))!==null&&r!==void 0?r:m.elementReadOnly(e,{at:x,mode:"highest"}),V=u?null:(i=m.void(e,{at:E,mode:"highest"}))!==null&&i!==void 0?i:m.elementReadOnly(e,{at:E,mode:"highest"});if(M){var P=m.before(e,x);P&&O&&L.isAncestor(O[1],P.path)&&(x=P)}if(V){var _=m.after(e,E);_&&b&&L.isAncestor(b[1],_.path)&&(E=_)}var R=[],N;for(var T of m.nodes(e,{at:l,voids:u})){var[j,X]=T;N&&L.compare(X,N)===0||(!u&&le.isElement(j)&&(m.isVoid(e,j)||m.isElementReadOnly(e,j))||!L.isCommon(X,x.path)&&!L.isCommon(X,E.path))&&(R.push(T),N=X)}var z=Array.from(R,ae=>{var[,de]=ae;return m.pathRef(e,de)}),$=m.pointRef(e,x),re=m.pointRef(e,E),k="";if(!A&&!M){var I=$.current,[G]=m.leaf(e,I),{path:H}=I,{offset:Q}=x,K=G.text.slice(Q);K.length>0&&(e.apply({type:"remove_text",path:H,offset:Q,text:K}),k=K)}if(z.reverse().map(ae=>ae.unref()).filter(ae=>ae!==null).forEach(ae=>ee.removeNodes(e,{at:ae,voids:u})),!V){var C=re.current,[U]=m.leaf(e,C),{path:W}=C,F=A?x.offset:0,J=U.text.slice(F,E.offset);J.length>0&&(e.apply({type:"remove_text",path:W,offset:F,text:J}),k=J)}!A&&w&&re.current&&$.current&&ee.mergeNodes(e,{at:re.current,hanging:!0,voids:u}),h&&a&&o==="character"&&k.length>1&&k.match(/[\u0E00-\u0E7F]+/)&&ee.insertText(e,k.slice(0,k.length-s));var ne=$.unref(),Y=re.unref(),ue=a?ne||Y:Y||ne;n.at==null&&ue&&ee.select(e,ue)}}})},Eg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{hanging:i=!1,voids:a=!1}=r,{at:o=sa(e),batchDirty:s=!0}=r;if(n.length){if(q.isRange(o))if(i||(o=m.unhangRange(e,o,{voids:a})),q.isCollapsed(o))o=o.anchor;else{var[,u]=q.edges(o);if(!a&&m.void(e,{at:u}))return;var l=m.pointRef(e,u);ee.delete(e,{at:o}),o=l.unref()}else L.isPath(o)&&(o=m.start(e,o));if(!(!a&&m.void(e,{at:o}))){var f=m.above(e,{at:o,match:K=>le.isElement(K)&&m.isInline(e,K),mode:"highest",voids:a});if(f){var[,h]=f;if(m.isEnd(e,o,h)){var p=m.after(e,h);o=p}else if(m.isStart(e,o,h)){var g=m.before(e,h);o=g}}var y=m.above(e,{match:K=>le.isElement(K)&&m.isBlock(e,K),at:o,voids:a}),[,v]=y,d=m.isStart(e,o,v),D=m.isEnd(e,o,v),x=d&&D,E=!d||d&&D,O=!D,[,b]=ie.first({children:n},[]),[,w]=ie.last({children:n},[]),A=[],M=K=>{var[C,U]=K,W=U.length===0;return W?!1:x?!0:!(E&&L.isAncestor(U,b)&&le.isElement(C)&&!e.isVoid(C)&&!e.isInline(C)||O&&L.isAncestor(U,w)&&le.isElement(C)&&!e.isVoid(C)&&!e.isInline(C))};for(var V of ie.nodes({children:n},{pass:M}))M(V)&&A.push(V);var P=[],_=[],R=[],N=!0,T=!1;for(var[j]of A)le.isElement(j)&&!e.isInline(j)?(N=!1,T=!0,_.push(j)):N?P.push(j):R.push(j);var[X]=m.nodes(e,{at:o,match:K=>ce.isText(K)||m.isInline(e,K),mode:"highest",voids:a}),[,z]=X,$=m.isStart(e,o,z),re=m.isEnd(e,o,z),k=m.pathRef(e,D&&!R.length?L.next(v):v),I=m.pathRef(e,re?L.next(z):z);ee.splitNodes(e,{at:o,match:K=>T?le.isElement(K)&&m.isBlock(e,K):ce.isText(K)||m.isInline(e,K),mode:T?"lowest":"highest",always:T&&(!d||P.length>0)&&(!D||R.length>0),voids:a});var G=m.pathRef(e,!$||$&&re?L.next(z):z);if(ee.insertNodes(e,P,{at:G.current,match:K=>ce.isText(K)||m.isInline(e,K),mode:"highest",voids:a,batchDirty:s}),x&&!P.length&&_.length&&!R.length&&ee.delete(e,{at:v,voids:a}),ee.insertNodes(e,_,{at:k.current,match:K=>le.isElement(K)&&m.isBlock(e,K),mode:"lowest",voids:a,batchDirty:s}),ee.insertNodes(e,R,{at:I.current,match:K=>ce.isText(K)||m.isInline(e,K),mode:"highest",voids:a,batchDirty:s}),!r.at){var H;if(R.length>0&&I.current?H=L.previous(I.current):_.length>0&&k.current?H=L.previous(k.current):G.current&&(H=L.previous(G.current)),H){var Q=m.end(e,H);ee.select(e,Q)}}G.unref(),k.unref(),I.unref()}}})},wg=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{edge:r="anchor"}=n,{selection:i}=e;if(i){if(r==="anchor")ee.select(e,i.anchor);else if(r==="focus")ee.select(e,i.focus);else if(r==="start"){var[a]=q.edges(i);ee.select(e,a)}else if(r==="end"){var[,o]=q.edges(i);ee.select(e,o)}}else return},xg=t=>{var{selection:e}=t;e&&t.apply({type:"set_selection",properties:e,newProperties:null})},Bg=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e,{distance:i=1,unit:a="character",reverse:o=!1}=n,{edge:s=null}=n;if(r){s==="start"&&(s=q.isBackward(r)?"focus":"anchor"),s==="end"&&(s=q.isBackward(r)?"anchor":"focus");var{anchor:u,focus:l}=r,f={distance:i,unit:a,ignoreNonSelectable:!0},h={};if(s==null||s==="anchor"){var p=o?m.before(e,u,f):m.after(e,u,f);p&&(h.anchor=p)}if(s==null||s==="focus"){var g=o?m.before(e,l,f):m.after(e,l,f);g&&(h.focus=g)}ee.setSelection(e,h)}},Sg=(t,e)=>{var{selection:n}=t;if(e=m.range(t,e),n){ee.setSelection(t,e);return}if(!q.isRange(e))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(lt.stringify(e)));t.apply({type:"set_selection",properties:n,newProperties:e})};function _u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function zu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?_u(Object(n),!0).forEach(function(r){ht(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_u(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Ag=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:i}=e,{edge:a="both"}=r;if(i){a==="start"&&(a=q.isBackward(i)?"focus":"anchor"),a==="end"&&(a=q.isBackward(i)?"anchor":"focus");var{anchor:o,focus:s}=i,u=a==="anchor"?o:s;ee.setSelection(e,{[a==="anchor"?"anchor":"focus"]:zu(zu({},u),n)})}},Lg=(t,e)=>{var{selection:n}=t,r={},i={};if(n){for(var a in e)(a==="anchor"&&e.anchor!=null&&!Le.equals(e.anchor,n.anchor)||a==="focus"&&e.focus!=null&&!Le.equals(e.focus,n.focus)||a!=="anchor"&&a!=="focus"&&e[a]!==n[a])&&(r[a]=n[a],i[a]=e[a]);Object.keys(r).length>0&&t.apply({type:"set_selection",properties:r,newProperties:i})}},Og=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{hanging:i=!1,voids:a=!1,mode:o="lowest",batchDirty:s=!0}=r,{at:u,match:l,select:f}=r;if(ie.isNode(n)&&(n=[n]),n.length!==0){var[h]=n;if(u||(u=sa(e),f!==!1&&(f=!0)),f==null&&(f=!1),q.isRange(u))if(i||(u=m.unhangRange(e,u,{voids:a})),q.isCollapsed(u))u=u.anchor;else{var[,p]=q.edges(u),g=m.pointRef(e,p);ee.delete(e,{at:u}),u=g.unref()}if(Le.isPoint(u)){l==null&&(ce.isText(h)?l=P=>ce.isText(P):e.isInline(h)?l=P=>ce.isText(P)||m.isInline(e,P):l=P=>le.isElement(P)&&m.isBlock(e,P));var[y]=m.nodes(e,{at:u.path,match:l,mode:o,voids:a});if(y){var[,v]=y,d=m.pathRef(e,v),D=m.isEnd(e,u,v);ee.splitNodes(e,{at:u,match:l,mode:o,voids:a});var x=d.unref();u=D?L.next(x):x}else return}var E=L.parent(u),O=u[u.length-1];if(!(!a&&m.void(e,{at:E}))){if(s){var b=[],w=L.levels(E);fv(e,()=>{var P=function(){var N=E.concat(O);O++;var T={type:"insert_node",path:N,node:_};e.apply(T),u=L.next(u),b.push(T),ce.isText?w.push(...Array.from(ie.nodes(_),j=>{var[,X]=j;return N.concat(X)})):w.push(N)};for(var _ of n)P()},()=>{Su(e,w,P=>{var _=P;for(var R of b)if(L.operationCanTransformPath(R)&&(_=L.transform(_,R),!_))return null;return _})})}else for(var A of n){var M=E.concat(O);O++,e.apply({type:"insert_node",path:M,node:A}),u=L.next(u)}if(u=L.previous(u),f){var V=m.end(e,u);V&&ee.select(e,V)}}}})},Pg=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{at:r=e.selection,mode:i="lowest",voids:a=!1}=n,{match:o}=n;if(o==null&&(o=L.isPath(r)?Pn(e,r):O=>le.isElement(O)&&m.isBlock(e,O)),!!r){var s=m.nodes(e,{at:r,match:o,mode:i,voids:a}),u=Array.from(s,O=>{var[,b]=O;return m.pathRef(e,b)});for(var l of u){var f=l.unref();if(f.length<2)throw new Error("Cannot lift node at a path [".concat(f,"] because it has a depth of less than `2`."));var h=m.node(e,L.parent(f)),[p,g]=h,y=f[f.length-1],{length:v}=p.children;if(v===1){var d=L.next(g);ee.moveNodes(e,{at:f,to:d,voids:a}),ee.removeNodes(e,{at:g,voids:a})}else if(y===0)ee.moveNodes(e,{at:f,to:g,voids:a});else if(y===v-1){var D=L.next(g);ee.moveNodes(e,{at:f,to:D,voids:a})}else{var x=L.next(f),E=L.next(g);ee.splitNodes(e,{at:x,voids:a}),ee.moveNodes(e,{at:f,to:E,voids:a})}}}})},Mg=["text"],Fg=["children"],Wu=(t,e)=>{if(le.isElement(e)){var n=e;return m.isVoid(t,e)?!0:n.children.length===1?Wu(t,n.children[0]):!1}else return!m.isEditor(e)},kg=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{match:r,at:i=e.selection}=n,{hanging:a=!1,voids:o=!1,mode:s="lowest"}=n;if(i){if(r==null)if(L.isPath(i)){var[u]=m.parent(e,i);r=P=>u.children.includes(P)}else r=P=>le.isElement(P)&&m.isBlock(e,P);if(!a&&q.isRange(i)&&(i=m.unhangRange(e,i,{voids:o})),q.isRange(i))if(q.isCollapsed(i))i=i.anchor;else{var[,l]=q.edges(i),f=m.pointRef(e,l);ee.delete(e,{at:i}),i=f.unref(),n.at==null&&ee.select(e,i)}var[h]=m.nodes(e,{at:i,match:r,voids:o,mode:s}),p=m.previous(e,{at:i,match:r,voids:o,mode:s});if(!(!h||!p)){var[g,y]=h,[v,d]=p;if(!(y.length===0||d.length===0)){var D=L.next(d),x=L.common(y,d),E=L.isSibling(y,d),O=Array.from(m.levels(e,{at:y}),P=>{var[_]=P;return _}).slice(x.length).slice(0,-1),b=m.above(e,{at:y,mode:"highest",match:P=>O.includes(P)&&Wu(e,P)}),w=b&&m.pathRef(e,b[1]),A,M;if(ce.isText(g)&&ce.isText(v)){var V=Ut(g,Mg);M=v.text.length,A=V}else if(le.isElement(g)&&le.isElement(v)){var V=Ut(g,Fg);M=v.children.length,A=V}else throw new Error("Cannot merge the node at path [".concat(y,"] with the previous sibling because it is not the same kind: ").concat(lt.stringify(g)," ").concat(lt.stringify(v)));E||ee.moveNodes(e,{at:y,to:D,voids:o}),w&&ee.removeNodes(e,{at:w.current,voids:o}),m.shouldMergeNodesRemovePrevNode(e,p,h)?ee.removeNodes(e,{at:d,voids:o}):e.apply({type:"merge_node",path:D,position:M,properties:A}),w&&w.unref()}}}})},Tg=(t,e)=>{m.withoutNormalizing(t,()=>{var{to:n,at:r=t.selection,mode:i="lowest",voids:a=!1}=e,{match:o}=e;if(r){o==null&&(o=L.isPath(r)?Pn(t,r):g=>le.isElement(g)&&m.isBlock(t,g));var s=m.pathRef(t,n),u=m.nodes(t,{at:r,match:o,mode:i,voids:a}),l=Array.from(u,g=>{var[,y]=g;return m.pathRef(t,y)});for(var f of l){var h=f.unref(),p=s.current;h.length!==0&&t.apply({type:"move_node",path:h,newPath:p}),s.current&&L.isSibling(p,h)&&L.isAfter(p,h)&&(s.current=L.next(s.current))}s.unref()}})},Rg=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:i=!1,mode:a="lowest"}=n,{at:o=e.selection,match:s}=n;if(o){s==null&&(s=L.isPath(o)?Pn(e,o):g=>le.isElement(g)&&m.isBlock(e,g)),!r&&q.isRange(o)&&(o=m.unhangRange(e,o,{voids:i}));var u=m.nodes(e,{at:o,match:s,mode:a,voids:i}),l=Array.from(u,g=>{var[,y]=g;return m.pathRef(e,y)});for(var f of l){var h=f.unref();if(h){var[p]=m.node(e,h);e.apply({type:"remove_node",path:h,node:p})}}}})},Ig=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{match:i,at:a=e.selection,compare:o,merge:s}=r,{hanging:u=!1,mode:l="lowest",split:f=!1,voids:h=!1}=r;if(a){if(i==null&&(i=L.isPath(a)?Pn(e,a):M=>le.isElement(M)&&m.isBlock(e,M)),!u&&q.isRange(a)&&(a=m.unhangRange(e,a,{voids:h})),f&&q.isRange(a)){if(q.isCollapsed(a)&&m.leaf(e,a.anchor)[0].text.length>0)return;var p=m.rangeRef(e,a,{affinity:"inward"}),[g,y]=q.edges(a),v=l==="lowest"?"lowest":"highest",d=m.isEnd(e,y,y.path);ee.splitNodes(e,{at:y,match:i,mode:v,voids:h,always:!d});var D=m.isStart(e,g,g.path);ee.splitNodes(e,{at:g,match:i,mode:v,voids:h,always:!D}),a=p.unref(),r.at==null&&ee.select(e,a)}o||(o=(M,V)=>M!==V);for(var[x,E]of m.nodes(e,{at:a,match:i,mode:l,voids:h})){var O={},b={};if(E.length!==0){var w=!1;for(var A in n)A==="children"||A==="text"||o(n[A],x[A])&&(w=!0,x.hasOwnProperty(A)&&(O[A]=x[A]),s?n[A]!=null&&(b[A]=s(x[A],n[A])):n[A]!=null&&(b[A]=n[A]));w&&e.apply({type:"set_node",path:E,properties:O,newProperties:b})}}}})},jg=(t,e)=>{if(q.isCollapsed(e))return e.anchor;var[,n]=q.edges(e),r=m.pointRef(t,n);return ee.delete(t,{at:e}),r.unref()},Ng=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{mode:r="lowest",voids:i=!1}=n,{match:a,at:o=e.selection,height:s=0,always:u=!1}=n;if(a==null&&(a=re=>le.isElement(re)&&m.isBlock(e,re)),q.isRange(o)&&(o=jg(e,o)),L.isPath(o)){var l=o,f=m.point(e,l),[h]=m.parent(e,l);a=re=>re===h,s=f.path.length-l.length+1,o=f,u=!0}if(o){var p=m.pointRef(e,o,{affinity:"backward"}),g;try{var[y]=m.nodes(e,{at:o,match:a,mode:r,voids:i});if(!y)return;var v=m.void(e,{at:o,mode:"highest"}),d=0;if(!i&&v){var[D,x]=v;if(le.isElement(D)&&e.isInline(D)){var E=m.after(e,x);if(!E){var O={text:""},b=L.next(x);ee.insertNodes(e,O,{at:b,voids:i}),E=m.point(e,b)}o=E,u=!0}var w=o.path.length-x.length;s=w+1,u=!0}g=m.pointRef(e,o);var A=o.path.length-s,[,M]=y,V=o.path.slice(0,A),P=s===0?o.offset:o.path[A]+d;for(var[_,R]of m.levels(e,{at:V,reverse:!0,voids:i})){var N=!1;if(R.length<M.length||R.length===0||!i&&le.isElement(_)&&m.isVoid(e,_))break;var T=p.current,j=m.isEnd(e,T,R);if(u||!p||!m.isEdge(e,T,R)){N=!0;var X=ie.extractProps(_);e.apply({type:"split_node",path:R,position:P,properties:X})}P=R[R.length-1]+(N||j?1:0)}if(n.at==null){var z=g.current||m.end(e,[]);ee.select(e,z)}}finally{var $;p.unref(),($=g)===null||$===void 0||$.unref()}}})},_g=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(n)||(n=[n]);var i={};for(var a of n)i[a]=null;ee.setNodes(e,i,r)},zg=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{mode:r="lowest",split:i=!1,voids:a=!1}=n,{at:o=e.selection,match:s}=n;if(o){s==null&&(s=L.isPath(o)?Pn(e,o):g=>le.isElement(g)&&m.isBlock(e,g)),L.isPath(o)&&(o=m.range(e,o));var u=q.isRange(o)?m.rangeRef(e,o):null,l=m.nodes(e,{at:o,match:s,mode:r,voids:a}),f=Array.from(l,g=>{var[,y]=g;return m.pathRef(e,y)}).reverse(),h=function(){var y=p.unref(),[v]=m.node(e,y),d=m.range(e,y);i&&u&&(d=q.intersection(u.current,d)),ee.liftNodes(e,{at:d,match:D=>le.isAncestor(v)&&v.children.includes(D),voids:a})};for(var p of f)h();u&&u.unref()}})};function Uu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Hu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Uu(Object(n),!0).forEach(function(r){ht(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Uu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Wg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{mode:i="lowest",split:a=!1,voids:o=!1}=r,{match:s,at:u=e.selection}=r;if(u){if(s==null&&(L.isPath(u)?s=Pn(e,u):e.isInline(n)?s=d=>le.isElement(d)&&m.isInline(e,d)||ce.isText(d):s=d=>le.isElement(d)&&m.isBlock(e,d)),a&&q.isRange(u)){var[l,f]=q.edges(u),h=m.rangeRef(e,u,{affinity:"inward"});ee.splitNodes(e,{at:f,match:s,voids:o}),ee.splitNodes(e,{at:l,match:s,voids:o}),u=h.unref(),r.at==null&&ee.select(e,u)}var p=Array.from(m.nodes(e,{at:u,match:e.isInline(n)?d=>le.isElement(d)&&m.isBlock(e,d):d=>m.isEditor(d),mode:"lowest",voids:o})),g=function(){var D=q.isRange(u)?q.intersection(u,m.range(e,v)):u;if(!D)return 0;var x=Array.from(m.nodes(e,{at:D,match:s,mode:i,voids:o}));if(x.length>0){var[E]=x,O=x[x.length-1],[,b]=E,[,w]=O;if(b.length===0&&w.length===0)return 0;var A=L.equals(b,w)?L.parent(b):L.common(b,w),M=m.range(e,b,w),V=m.node(e,A),[P]=V,_=A.length+1,R=L.next(w.slice(0,_)),N=Hu(Hu({},n),{},{children:[]});ee.insertNodes(e,N,{at:R,voids:o}),ee.moveNodes(e,{at:M,match:T=>le.isAncestor(P)&&P.children.includes(T),to:R.concat(0),voids:o})}},y;for(var[,v]of p)y=g()}})},Ug=()=>{var t={children:[],operations:[],selection:null,marks:null,isElementReadOnly:()=>!1,isInline:()=>!1,isSelectable:()=>!0,isVoid:()=>!1,markableVoid:()=>!1,onChange:()=>{},apply:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return dv(t,...r)},addMark:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return yv(t,...r)},deleteBackward:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return bv(t,...r)},deleteForward:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ev(t,...r)},deleteFragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return wv(t,...r)},getFragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return hv(t,...r)},insertBreak:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Tv(t,...r)},insertSoftBreak:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Iv(t,...r)},insertFragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Eg(t,...r)},insertNode:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Rv(t,...r)},insertText:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Nv(t,...r)},normalizeNode:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return vv(t,...r)},removeMark:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return hg(t,...r)},getDirtyPaths:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return pv(t,...r)},shouldNormalize:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return gv(t,...r)},above:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return mv(t,...r)},after:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Cv(t,...r)},before:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Dv(t,...r)},collapse:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return wg(t,...r)},delete:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return bg(t,...r)},deselect:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return xg(t,...r)},edges:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return xv(t,...r)},elementReadOnly:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Bv(t,...r)},end:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Sv(t,...r)},first:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Av(t,...r)},fragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Lv(t,...r)},getMarks:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Xv(t,...r)},hasBlocks:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Pv(t,...r)},hasInlines:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Mv(t,...r)},hasPath:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Fv(t,...r)},hasTexts:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return kv(t,...r)},insertNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Og(t,...r)},isBlock:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return _v(t,...r)},isEdge:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return zv(t,...r)},isEmpty:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Wv(t,...r)},isEnd:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Uv(t,...r)},isNormalizing:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Hv(t,...r)},isStart:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Vv(t,...r)},last:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return qv(t,...r)},leaf:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Gv(t,...r)},levels:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Yv(t,...r)},liftNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Pg(t,...r)},mergeNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return kg(t,...r)},move:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Bg(t,...r)},moveNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Tg(t,...r)},next:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Jv(t,...r)},node:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Qv(t,...r)},nodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return $v(t,...r)},normalize:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return eg(t,...r)},parent:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return tg(t,...r)},path:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ig(t,...r)},pathRef:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ng(t,...r)},pathRefs:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return rg(t,...r)},point:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return sg(t,...r)},pointRef:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ag(t,...r)},pointRefs:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return og(t,...r)},positions:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ug(t,...r)},previous:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return lg(t,...r)},range:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return dg(t,...r)},rangeRef:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return cg(t,...r)},rangeRefs:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return fg(t,...r)},removeNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Rg(t,...r)},select:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Sg(t,...r)},setNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ig(t,...r)},setNormalizing:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return vg(t,...r)},setPoint:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ag(t,...r)},setSelection:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Lg(t,...r)},splitNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ng(t,...r)},start:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return gg(t,...r)},string:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return mg(t,...r)},unhangRange:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return yg(t,...r)},unsetNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return _g(t,...r)},unwrapNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return zg(t,...r)},void:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ov(t,...r)},withoutNormalizing:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Cg(t,...r)},wrapNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Wg(t,...r)},shouldMergeNodesRemovePrevNode:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Dg(t,...r)}};return t};/*!
76
+ */function Ks(t){return Object.prototype.toString.call(t)==="[object Object]"}function pt(t){var e,n;return Ks(t)===!1?!1:(e=t.constructor,e===void 0?!0:(n=e.prototype,!(Ks(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}var Xs=Symbol.for("immer-nothing"),Js=Symbol.for("immer-draftable"),Bt=Symbol.for("immer-state"),dh=process.env.NODE_ENV!=="production"?[function(t){return`The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`},function(t){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 '${t}'`},"This object has been frozen and should not be mutated",function(t){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+t},"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(t){return`'current' expects a draft, got: ${t}`},"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(t){return`'original' expects a draft, got: ${t}`}]:[];function Dt(t,...e){if(process.env.NODE_ENV!=="production"){const n=dh[t],r=typeof n=="function"?n.apply(null,e):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var On=Object.getPrototypeOf;function pn(t){return!!t&&!!t[Bt]}function hn(t){var e;return t?Qs(t)||Array.isArray(t)||!!t[Js]||!!((e=t.constructor)!=null&&e[Js])||Fr(t)||kr(t):!1}var ph=Object.prototype.constructor.toString();function Qs(t){if(!t||typeof t!="object")return!1;const e=On(t);if(e===null)return!0;const n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===ph}function Pr(t,e){Mr(t)===0?Reflect.ownKeys(t).forEach(n=>{e(n,t[n],t)}):t.forEach((n,r)=>e(r,n,t))}function Mr(t){const e=t[Bt];return e?e.type_:Array.isArray(t)?1:Fr(t)?2:kr(t)?3:0}function Xi(t,e){return Mr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function $s(t,e,n){const r=Mr(t);r===2?t.set(e,n):r===3?t.add(n):t[e]=n}function hh(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function Fr(t){return t instanceof Map}function kr(t){return t instanceof Set}function vn(t){return t.copy_||t.base_}function Ji(t,e){if(Fr(t))return new Map(t);if(kr(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const n=Qs(t);if(e===!0||e==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(t);delete r[Bt];let i=Reflect.ownKeys(r);for(let a=0;a<i.length;a++){const o=i[a],s=r[o];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(r[o]={configurable:!0,writable:!0,enumerable:s.enumerable,value:t[o]})}return Object.create(On(t),r)}else{const r=On(t);if(r!==null&&n)return{...t};const i=Object.create(r);return Object.assign(i,t)}}function Qi(t,e=!1){return Tr(t)||pn(t)||!hn(t)||(Mr(t)>1&&(t.set=t.add=t.clear=t.delete=vh),Object.freeze(t),e&&Object.entries(t).forEach(([n,r])=>Qi(r,!0))),t}function vh(){Dt(2)}function Tr(t){return Object.isFrozen(t)}var gh={};function gn(t){const e=gh[t];return e||Dt(0,t),e}var Zn;function eu(){return Zn}function mh(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function tu(t,e){e&&(gn("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function $i(t){ea(t),t.drafts_.forEach(yh),t.drafts_=null}function ea(t){t===Zn&&(Zn=t.parent_)}function nu(t){return Zn=mh(Zn,t)}function yh(t){const e=t[Bt];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function ru(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];return t!==void 0&&t!==n?(n[Bt].modified_&&($i(e),Dt(4)),hn(t)&&(t=Rr(e,t),e.parent_||Ir(e,t)),e.patches_&&gn("Patches").generateReplacementPatches_(n[Bt].base_,t,e.patches_,e.inversePatches_)):t=Rr(e,n,[]),$i(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==Xs?t:void 0}function Rr(t,e,n){if(Tr(e))return e;const r=e[Bt];if(!r)return Pr(e,(i,a)=>iu(t,r,e,i,a,n)),e;if(r.scope_!==t)return e;if(!r.modified_)return Ir(t,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let a=i,o=!1;r.type_===3&&(a=new Set(i),i.clear(),o=!0),Pr(a,(s,u)=>iu(t,r,i,s,u,n,o)),Ir(t,i,!1),n&&t.patches_&&gn("Patches").generatePatches_(r,n,t.patches_,t.inversePatches_)}return r.copy_}function iu(t,e,n,r,i,a,o){if(process.env.NODE_ENV!=="production"&&i===n&&Dt(5),pn(i)){const s=a&&e&&e.type_!==3&&!Xi(e.assigned_,r)?a.concat(r):void 0,u=Rr(t,i,s);if($s(n,r,u),pn(u))t.canAutoFreeze_=!1;else return}else o&&n.add(i);if(hn(i)&&!Tr(i)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;Rr(t,i),(!e||!e.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Ir(t,i)}}function Ir(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&Qi(e,n)}function Ch(t,e){const n=Array.isArray(t),r={type_:n?1:0,scope_:e?e.scope_:eu(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,a=ta;n&&(i=[r],a=Kn);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,s}var ta={get(t,e){if(e===Bt)return t;const n=vn(t);if(!Xi(n,e))return Dh(t,n,e);const r=n[e];return t.finalized_||!hn(r)?r:r===na(t.base_,e)?(ia(t),t.copy_[e]=aa(r,t)):r},has(t,e){return e in vn(t)},ownKeys(t){return Reflect.ownKeys(vn(t))},set(t,e,n){const r=au(vn(t),e);if(r!=null&&r.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const i=na(vn(t),e),a=i==null?void 0:i[Bt];if(a&&a.base_===n)return t.copy_[e]=n,t.assigned_[e]=!1,!0;if(hh(n,i)&&(n!==void 0||Xi(t.base_,e)))return!0;ia(t),ra(t)}return t.copy_[e]===n&&(n!==void 0||e in t.copy_)||Number.isNaN(n)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=n,t.assigned_[e]=!0),!0},deleteProperty(t,e){return na(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,ia(t),ra(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const n=vn(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:r.enumerable,value:n[e]}},defineProperty(){Dt(11)},getPrototypeOf(t){return On(t.base_)},setPrototypeOf(){Dt(12)}},Kn={};Pr(ta,(t,e)=>{Kn[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Kn.deleteProperty=function(t,e){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(e))&&Dt(13),Kn.set.call(this,t,e,void 0)},Kn.set=function(t,e,n){return process.env.NODE_ENV!=="production"&&e!=="length"&&isNaN(parseInt(e))&&Dt(14),ta.set.call(this,t[0],e,n,t[0])};function na(t,e){const n=t[Bt];return(n?vn(n):t)[e]}function Dh(t,e,n){var i;const r=au(e,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(t.draft_):void 0}function au(t,e){if(!(e in t))return;let n=On(t);for(;n;){const r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=On(n)}}function ra(t){t.modified_||(t.modified_=!0,t.parent_&&ra(t.parent_))}function ia(t){t.copy_||(t.copy_=Ji(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var bh=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,n,r)=>{if(typeof e=="function"&&typeof n!="function"){const a=n;n=e;const o=this;return function(u=a,...l){return o.produce(u,f=>n.call(this,f,...l))}}typeof n!="function"&&Dt(6),r!==void 0&&typeof r!="function"&&Dt(7);let i;if(hn(e)){const a=nu(this),o=aa(e,void 0);let s=!0;try{i=n(o),s=!1}finally{s?$i(a):ea(a)}return tu(a,r),ru(i,a)}else if(!e||typeof e!="object"){if(i=n(e),i===void 0&&(i=e),i===Xs&&(i=void 0),this.autoFreeze_&&Qi(i,!0),r){const a=[],o=[];gn("Patches").generateReplacementPatches_(e,i,a,o),r(a,o)}return i}else Dt(1,e)},this.produceWithPatches=(e,n)=>{if(typeof e=="function")return(o,...s)=>this.produceWithPatches(o,u=>e(u,...s));let r,i;return[this.produce(e,n,(o,s)=>{r=o,i=s}),r,i]},typeof(t==null?void 0:t.autoFreeze)=="boolean"&&this.setAutoFreeze(t.autoFreeze),typeof(t==null?void 0:t.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){hn(t)||Dt(8),pn(t)&&(t=Eh(t));const e=nu(this),n=aa(t,void 0);return n[Bt].isManual_=!0,ea(e),n}finishDraft(t,e){const n=t&&t[Bt];(!n||!n.isManual_)&&Dt(9);const{scope_:r}=n;return tu(r,e),ru(void 0,r)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,e){let n;for(n=e.length-1;n>=0;n--){const i=e[n];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}n>-1&&(e=e.slice(n+1));const r=gn("Patches").applyPatches_;return pn(t)?r(t,e):this.produce(t,i=>r(i,e))}};function aa(t,e){const n=Fr(t)?gn("MapSet").proxyMap_(t,e):kr(t)?gn("MapSet").proxySet_(t,e):Ch(t,e);return(e?e.scope_:eu()).drafts_.push(n),n}function Eh(t){return pn(t)||Dt(10,t),ou(t)}function ou(t){if(!hn(t)||Tr(t))return t;const e=t[Bt];let n;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=Ji(t,e.scope_.immer_.useStrictShallowCopy_)}else n=Ji(t,!0);return Pr(n,(r,i)=>{$s(n,r,ou(i))}),e&&(e.finalized_=!1),n}var St=new bh,oa=St.produce;St.produceWithPatches.bind(St),St.setAutoFreeze.bind(St),St.setUseStrictShallowCopy.bind(St),St.applyPatches.bind(St);var su=St.createDraft.bind(St),uu=St.finishDraft.bind(St),wh={transform(t,e){var{current:n,affinity:r}=t;if(n!=null){var i=L.transform(n,e,{affinity:r});t.current=i,i==null&&t.unref()}}},xh={transform(t,e){var{current:n,affinity:r}=t;if(n!=null){var i=Le.transform(n,e,{affinity:r});t.current=i,i==null&&t.unref()}}},Bh={transform(t,e){var{current:n,affinity:r}=t;if(n!=null){var i=q.transform(n,e,{affinity:r});t.current=i,i==null&&t.unref()}}},jr=new WeakMap,Nr=new WeakMap,Xn=new WeakMap,lu=new WeakMap,cu=new WeakMap,fu=new WeakMap,du=new WeakMap,L={ancestors(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=e,r=L.levels(t,e);return n?r=r.slice(1):r=r.slice(0,-1),r},common(t,e){for(var n=[],r=0;r<t.length&&r<e.length;r++){var i=t[r],a=e[r];if(i!==a)break;n.push(i)}return n},compare(t,e){for(var n=Math.min(t.length,e.length),r=0;r<n;r++){if(t[r]<e[r])return-1;if(t[r]>e[r])return 1}return 0},endsAfter(t,e){var n=t.length-1,r=t.slice(0,n),i=e.slice(0,n),a=t[n],o=e[n];return L.equals(r,i)&&a>o},endsAt(t,e){var n=t.length,r=t.slice(0,n),i=e.slice(0,n);return L.equals(r,i)},endsBefore(t,e){var n=t.length-1,r=t.slice(0,n),i=e.slice(0,n),a=t[n],o=e[n];return L.equals(r,i)&&a<o},equals(t,e){return t.length===e.length&&t.every((n,r)=>n===e[r])},hasPrevious(t){return t[t.length-1]>0},isAfter(t,e){return L.compare(t,e)===1},isAncestor(t,e){return t.length<e.length&&L.compare(t,e)===0},isBefore(t,e){return L.compare(t,e)===-1},isChild(t,e){return t.length===e.length+1&&L.compare(t,e)===0},isCommon(t,e){return t.length<=e.length&&L.compare(t,e)===0},isDescendant(t,e){return t.length>e.length&&L.compare(t,e)===0},isParent(t,e){return t.length+1===e.length&&L.compare(t,e)===0},isPath(t){return Array.isArray(t)&&(t.length===0||typeof t[0]=="number")},isSibling(t,e){if(t.length!==e.length)return!1;var n=t.slice(0,-1),r=e.slice(0,-1),i=t[t.length-1],a=e[e.length-1];return i!==a&&L.equals(n,r)},levels(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=e,r=[],i=0;i<=t.length;i++)r.push(t.slice(0,i));return n&&r.reverse(),r},next(t){if(t.length===0)throw new Error("Cannot get the next path of a root path [".concat(t,"], because it has no next index."));var e=t[t.length-1];return t.slice(0,-1).concat(e+1)},operationCanTransformPath(t){switch(t.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(t){if(t.length===0)throw new Error("Cannot get the parent path of the root path [".concat(t,"]."));return t.slice(0,-1)},previous(t){if(t.length===0)throw new Error("Cannot get the previous path of a root path [".concat(t,"], because it has no previous index."));var e=t[t.length-1];if(e<=0)throw new Error("Cannot get the previous path of a first child path [".concat(t,"] because it would result in a negative index."));return t.slice(0,-1).concat(e-1)},relative(t,e){if(!L.isAncestor(e,t)&&!L.equals(t,e))throw new Error("Cannot get the relative path of [".concat(t,"] inside ancestor [").concat(e,"], because it is not above or equal to the path."));return t.slice(e.length)},transform(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t)return null;var r=[...t],{affinity:i="forward"}=n;if(t.length===0)return r;switch(e.type){case"insert_node":{var{path:a}=e;(L.equals(a,r)||L.endsBefore(a,r)||L.isAncestor(a,r))&&(r[a.length-1]+=1);break}case"remove_node":{var{path:o}=e;if(L.equals(o,r)||L.isAncestor(o,r))return null;L.endsBefore(o,r)&&(r[o.length-1]-=1);break}case"merge_node":{var{path:s,position:u}=e;L.equals(s,r)||L.endsBefore(s,r)?r[s.length-1]-=1:L.isAncestor(s,r)&&(r[s.length-1]-=1,r[s.length]+=u);break}case"split_node":{var{path:l,position:f}=e;if(L.equals(l,r)){if(i==="forward")r[r.length-1]+=1;else if(i!=="backward")return null}else L.endsBefore(l,r)?r[l.length-1]+=1:L.isAncestor(l,r)&&t[l.length]>=f&&(r[l.length-1]+=1,r[l.length]-=f);break}case"move_node":{var{path:h,newPath:p}=e;if(L.equals(h,p))return r;if(L.isAncestor(h,r)||L.equals(h,r)){var g=p.slice();return L.endsBefore(h,p)&&h.length<p.length&&(g[h.length-1]-=1),g.concat(r.slice(h.length))}else L.isSibling(h,p)&&(L.isAncestor(p,r)||L.equals(p,r))?L.endsBefore(h,r)?r[h.length-1]-=1:r[h.length-1]+=1:L.endsBefore(p,r)||L.equals(p,r)||L.isAncestor(p,r)?(L.endsBefore(h,r)&&(r[h.length-1]-=1),r[p.length-1]+=1):L.endsBefore(h,r)&&(L.equals(p,r)&&(r[p.length-1]+=1),r[h.length-1]-=1);break}}return r}};function Jn(t){"@babel/helpers - typeof";return Jn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jn(t)}function Sh(t,e){if(Jn(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Jn(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ah(t){var e=Sh(t,"string");return Jn(e)==="symbol"?e:String(e)}function ht(t,e,n){return e=Ah(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function pu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Qn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?pu(Object(n),!0).forEach(function(r){ht(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Lh=(t,e,n)=>{switch(n.type){case"insert_node":{var{path:r,node:i}=n,a=ie.parent(t,r),o=r[r.length-1];if(o>a.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(r,"] because the destination is past the end of the node."));if(a.children.splice(o,0,i),e)for(var[s,u]of q.points(e))e[u]=Le.transform(s,n);break}case"insert_text":{var{path:l,offset:f,text:h}=n;if(h.length===0)break;var p=ie.leaf(t,l),g=p.text.slice(0,f),y=p.text.slice(f);if(p.text=g+h+y,e)for(var[v,d]of q.points(e))e[d]=Le.transform(v,n);break}case"merge_node":{var{path:D}=n,x=ie.get(t,D),E=L.previous(D),O=ie.get(t,E),b=ie.parent(t,D),w=D[D.length-1];if(ce.isText(x)&&ce.isText(O))O.text+=x.text;else if(!ce.isText(x)&&!ce.isText(O))O.children.push(...x.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(D,"] to nodes of different interfaces: ").concat(lt.stringify(x)," ").concat(lt.stringify(O)));if(b.children.splice(w,1),e)for(var[A,M]of q.points(e))e[M]=Le.transform(A,n);break}case"move_node":{var{path:V,newPath:P}=n;if(L.isAncestor(V,P))throw new Error("Cannot move a path [".concat(V,"] to new path [").concat(P,"] because the destination is inside itself."));var _=ie.get(t,V),R=ie.parent(t,V),N=V[V.length-1];R.children.splice(N,1);var T=L.transform(V,n),j=ie.get(t,L.parent(T)),X=T[T.length-1];if(j.children.splice(X,0,_),e)for(var[z,$]of q.points(e))e[$]=Le.transform(z,n);break}case"remove_node":{var{path:re}=n,k=re[re.length-1],I=ie.parent(t,re);if(I.children.splice(k,1),e)for(var[G,H]of q.points(e)){var Q=Le.transform(G,n);if(e!=null&&Q!=null)e[H]=Q;else{var K=void 0,C=void 0;for(var[U,W]of ie.texts(t))if(L.compare(W,re)===-1)K=[U,W];else{C=[U,W];break}var F=!1;K&&C&&(L.equals(C[1],re)?F=!L.hasPrevious(C[1]):F=L.common(K[1],re).length<L.common(C[1],re).length),K&&!F?(G.path=K[1],G.offset=K[0].text.length):C?(G.path=C[1],G.offset=0):e=null}}break}case"remove_text":{var{path:J,offset:ne,text:Y}=n;if(Y.length===0)break;var ue=ie.leaf(t,J),ae=ue.text.slice(0,ne),de=ue.text.slice(ne+Y.length);if(ue.text=ae+de,e)for(var[pe,Ce]of q.points(e))e[Ce]=Le.transform(pe,n);break}case"set_node":{var{path:ye,properties:ge,newProperties:ve}=n;if(ye.length===0)throw new Error("Cannot set properties on the root node!");var Ne=ie.get(t,ye);for(var se in ve){if(se==="children"||se==="text")throw new Error('Cannot set the "'.concat(se,'" property of nodes!'));var _e=ve[se];_e==null?delete Ne[se]:Ne[se]=_e}for(var fe in ge)ve.hasOwnProperty(fe)||delete Ne[fe];break}case"set_selection":{var{newProperties:we}=n;if(we==null)e=we;else{if(e==null){if(!q.isRange(we))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(lt.stringify(we)," when there is no current selection."));e=Qn({},we)}for(var ke in we){var Ve=we[ke];if(Ve==null){if(ke==="anchor"||ke==="focus")throw new Error('Cannot remove the "'.concat(ke,'" selection property'));delete e[ke]}else e[ke]=Ve}}break}case"split_node":{var{path:Ye,position:Ee,properties:ct}=n;if(Ye.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(Ye,"] because the root node cannot be split."));var st=ie.get(t,Ye),Tt=ie.parent(t,Ye),yt=Ye[Ye.length-1],Lt;if(ce.isText(st)){var zt=st.text.slice(0,Ee),Ct=st.text.slice(Ee);st.text=zt,Lt=Qn(Qn({},ct),{},{text:Ct})}else{var ln=st.children.slice(0,Ee),be=st.children.slice(Ee);st.children=ln,Lt=Qn(Qn({},ct),{},{children:be})}if(Tt.children.splice(yt+1,0,Lt),e)for(var[Re,Ie]of q.points(e))e[Ie]=Le.transform(Re,n);break}}return e},Oh={transform(t,e){t.children=su(t.children);var n=t.selection&&su(t.selection);try{n=Lh(t,n,e)}finally{t.children=uu(t.children),n?t.selection=pn(n)?uu(n):n:t.selection=null}}},Ph={insertNodes(t,e,n){t.insertNodes(e,n)},liftNodes(t,e){t.liftNodes(e)},mergeNodes(t,e){t.mergeNodes(e)},moveNodes(t,e){t.moveNodes(e)},removeNodes(t,e){t.removeNodes(e)},setNodes(t,e,n){t.setNodes(e,n)},splitNodes(t,e){t.splitNodes(e)},unsetNodes(t,e,n){t.unsetNodes(e,n)},unwrapNodes(t,e){t.unwrapNodes(e)},wrapNodes(t,e,n){t.wrapNodes(e,n)}},Mh={collapse(t,e){t.collapse(e)},deselect(t){t.deselect()},move(t,e){t.move(e)},select(t,e){t.select(e)},setPoint(t,e,n){t.setPoint(e,n)},setSelection(t,e){t.setSelection(e)}},hu=(t,e)=>{for(var n in t){var r=t[n],i=e[n];if(pt(r)&&pt(i)){if(!hu(r,i))return!1}else if(Array.isArray(r)&&Array.isArray(i)){if(r.length!==i.length)return!1;for(var a=0;a<r.length;a++)if(r[a]!==i[a])return!1}else if(r!==i)return!1}for(var o in e)if(t[o]===void 0&&e[o]!==void 0)return!1;return!0};function Fh(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Ut(t,e){if(t==null)return{};var n=Fh(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}var kh=["anchor","focus"];function vu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Th(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?vu(Object(n),!0).forEach(function(r){ht(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var q={edges(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=e,{anchor:r,focus:i}=t;return q.isBackward(t)===n?[r,i]:[i,r]},end(t){var[,e]=q.edges(t);return e},equals(t,e){return Le.equals(t.anchor,e.anchor)&&Le.equals(t.focus,e.focus)},includes(t,e){if(q.isRange(e)){if(q.includes(t,e.anchor)||q.includes(t,e.focus))return!0;var[n,r]=q.edges(t),[i,a]=q.edges(e);return Le.isBefore(n,i)&&Le.isAfter(r,a)}var[o,s]=q.edges(t),u=!1,l=!1;return Le.isPoint(e)?(u=Le.compare(e,o)>=0,l=Le.compare(e,s)<=0):(u=L.compare(e,o.path)>=0,l=L.compare(e,s.path)<=0),u&&l},intersection(t,e){var n=Ut(t,kh),[r,i]=q.edges(t),[a,o]=q.edges(e),s=Le.isBefore(r,a)?a:r,u=Le.isBefore(i,o)?i:o;return Le.isBefore(u,s)?null:Th({anchor:s,focus:u},n)},isBackward(t){var{anchor:e,focus:n}=t;return Le.isAfter(e,n)},isCollapsed(t){var{anchor:e,focus:n}=t;return Le.equals(e,n)},isExpanded(t){return!q.isCollapsed(t)},isForward(t){return!q.isBackward(t)},isRange(t){return pt(t)&&Le.isPoint(t.anchor)&&Le.isPoint(t.focus)},*points(t){yield[t.anchor,"anchor"],yield[t.focus,"focus"]},start(t){var[e]=q.edges(t);return e},transform(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return oa(t,r=>{if(r===null)return null;var{affinity:i="inward"}=n,a,o;if(i==="inward"){var s=q.isCollapsed(r);q.isForward(r)?(a="forward",o=s?a:"backward"):(a="backward",o=s?a:"forward")}else i==="outward"?q.isForward(r)?(a="backward",o="forward"):(a="forward",o="backward"):(a=i,o=i);var u=Le.transform(r.anchor,e,{affinity:a}),l=Le.transform(r.focus,e,{affinity:o});if(!u||!l)return null;r.anchor=u,r.focus=l})}},gu=t=>pt(t)&&ie.isNodeList(t.children)&&!m.isEditor(t),le={isAncestor(t){return pt(t)&&ie.isNodeList(t.children)},isElement:gu,isElementList(t){return Array.isArray(t)&&t.every(e=>le.isElement(e))},isElementProps(t){return t.children!==void 0},isElementType:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return gu(e)&&e[r]===n},matches(t,e){for(var n in e)if(n!=="children"&&t[n]!==e[n])return!1;return!0}},Rh=["children"],Ih=["text"],mu=new WeakMap,ie={ancestor(t,e){var n=ie.get(t,e);if(ce.isText(n))throw new Error("Cannot get the ancestor node at path [".concat(e,"] because it refers to a text node instead: ").concat(lt.stringify(n)));return n},ancestors(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var r of L.ancestors(e,n)){var i=ie.ancestor(t,r),a=[i,r];yield a}}()},child(t,e){if(ce.isText(t))throw new Error("Cannot get the child of a text node: ".concat(lt.stringify(t)));var n=t.children[e];if(n==null)throw new Error("Cannot get child at index `".concat(e,"` in node: ").concat(lt.stringify(t)));return n},children(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var{reverse:r=!1}=n,i=ie.ancestor(t,e),{children:a}=i,o=r?a.length-1:0;r?o>=0:o<a.length;){var s=ie.child(i,o),u=e.concat(o);yield[s,u],o=r?o-1:o+1}}()},common(t,e,n){var r=L.common(e,n),i=ie.get(t,r);return[i,r]},descendant(t,e){var n=ie.get(t,e);if(m.isEditor(n))throw new Error("Cannot get the descendant node at path [".concat(e,"] because it refers to the root editor node instead: ").concat(lt.stringify(n)));return n},descendants(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of ie.nodes(t,e))r.length!==0&&(yield[n,r])}()},elements(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of ie.nodes(t,e))le.isElement(n)&&(yield[n,r])}()},extractProps(t){if(le.isAncestor(t)){var e=Ut(t,Rh);return e}else{var e=Ut(t,Ih);return e}},first(t,e){for(var n=e.slice(),r=ie.get(t,n);r&&!(ce.isText(r)||r.children.length===0);)r=r.children[0],n.push(0);return[r,n]},fragment(t,e){if(ce.isText(t))throw new Error("Cannot get a fragment starting from a root text node: ".concat(lt.stringify(t)));var n=oa({children:t.children},r=>{var[i,a]=q.edges(e),o=ie.nodes(r,{reverse:!0,pass:p=>{var[,g]=p;return!q.includes(e,g)}});for(var[,s]of o){if(!q.includes(e,s)){var u=ie.parent(r,s),l=s[s.length-1];u.children.splice(l,1)}if(L.equals(s,a.path)){var f=ie.leaf(r,s);f.text=f.text.slice(0,a.offset)}if(L.equals(s,i.path)){var h=ie.leaf(r,s);h.text=h.text.slice(i.offset)}}m.isEditor(r)&&(r.selection=null)});return n.children},get(t,e){for(var n=t,r=0;r<e.length;r++){var i=e[r];if(ce.isText(n)||!n.children[i])throw new Error("Cannot find a descendant at path [".concat(e,"] in node: ").concat(lt.stringify(t)));n=n.children[i]}return n},has(t,e){for(var n=t,r=0;r<e.length;r++){var i=e[r];if(ce.isText(n)||!n.children[i])return!1;n=n.children[i]}return!0},isNode(t){return ce.isText(t)||le.isElement(t)||m.isEditor(t)},isNodeList(t){if(!Array.isArray(t))return!1;var e=mu.get(t);if(e!==void 0)return e;var n=t.every(r=>ie.isNode(r));return mu.set(t,n),n},last(t,e){for(var n=e.slice(),r=ie.get(t,n);r&&!(ce.isText(r)||r.children.length===0);){var i=r.children.length-1;r=r.children[i],n.push(i)}return[r,n]},leaf(t,e){var n=ie.get(t,e);if(!ce.isText(n))throw new Error("Cannot get the leaf node at path [".concat(e,"] because it refers to a non-leaf node: ").concat(lt.stringify(n)));return n},levels(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var r of L.levels(e,n)){var i=ie.get(t,r);yield[i,r]}}()},matches(t,e){return le.isElement(t)&&le.isElementProps(e)&&le.matches(t,e)||ce.isText(t)&&ce.isTextProps(e)&&ce.matches(t,e)},nodes(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var{pass:n,reverse:r=!1}=e,{from:i=[],to:a}=e,o=new Set,s=[],u=t;!(a&&(r?L.isBefore(s,a):L.isAfter(s,a)));){if(o.has(u)||(yield[u,s]),!o.has(u)&&!ce.isText(u)&&u.children.length!==0&&(n==null||n([u,s])===!1)){o.add(u);var l=r?u.children.length-1:0;L.isAncestor(s,i)&&(l=i[s.length]),s=s.concat(l),u=ie.get(t,s);continue}if(s.length===0)break;if(!r){var f=L.next(s);if(ie.has(t,f)){s=f,u=ie.get(t,s);continue}}if(r&&s[s.length-1]!==0){var h=L.previous(s);s=h,u=ie.get(t,s);continue}s=L.parent(s),u=ie.get(t,s),o.add(u)}}()},parent(t,e){var n=L.parent(e),r=ie.get(t,n);if(ce.isText(r))throw new Error("Cannot get the parent of path [".concat(e,"] because it does not exist in the root."));return r},string(t){return ce.isText(t)?t.text:t.children.map(ie.string).join("")},texts(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of ie.nodes(t,e))ce.isText(n)&&(yield[n,r])}()}};function yu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ze(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?yu(Object(n),!0).forEach(function(r){ht(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Jt={isNodeOperation(t){return Jt.isOperation(t)&&t.type.endsWith("_node")},isOperation(t){if(!pt(t))return!1;switch(t.type){case"insert_node":return L.isPath(t.path)&&ie.isNode(t.node);case"insert_text":return typeof t.offset=="number"&&typeof t.text=="string"&&L.isPath(t.path);case"merge_node":return typeof t.position=="number"&&L.isPath(t.path)&&pt(t.properties);case"move_node":return L.isPath(t.path)&&L.isPath(t.newPath);case"remove_node":return L.isPath(t.path)&&ie.isNode(t.node);case"remove_text":return typeof t.offset=="number"&&typeof t.text=="string"&&L.isPath(t.path);case"set_node":return L.isPath(t.path)&&pt(t.properties)&&pt(t.newProperties);case"set_selection":return t.properties===null&&q.isRange(t.newProperties)||t.newProperties===null&&q.isRange(t.properties)||pt(t.properties)&&pt(t.newProperties);case"split_node":return L.isPath(t.path)&&typeof t.position=="number"&&pt(t.properties);default:return!1}},isOperationList(t){return Array.isArray(t)&&t.every(e=>Jt.isOperation(e))},isSelectionOperation(t){return Jt.isOperation(t)&&t.type.endsWith("_selection")},isTextOperation(t){return Jt.isOperation(t)&&t.type.endsWith("_text")},inverse(t){switch(t.type){case"insert_node":return Ze(Ze({},t),{},{type:"remove_node"});case"insert_text":return Ze(Ze({},t),{},{type:"remove_text"});case"merge_node":return Ze(Ze({},t),{},{type:"split_node",path:L.previous(t.path)});case"move_node":{var{newPath:e,path:n}=t;if(L.equals(e,n))return t;if(L.isSibling(n,e))return Ze(Ze({},t),{},{path:e,newPath:n});var r=L.transform(n,t),i=L.transform(L.next(n),t);return Ze(Ze({},t),{},{path:r,newPath:i})}case"remove_node":return Ze(Ze({},t),{},{type:"insert_node"});case"remove_text":return Ze(Ze({},t),{},{type:"insert_text"});case"set_node":{var{properties:a,newProperties:o}=t;return Ze(Ze({},t),{},{properties:o,newProperties:a})}case"set_selection":{var{properties:s,newProperties:u}=t;return s==null?Ze(Ze({},t),{},{properties:u,newProperties:null}):u==null?Ze(Ze({},t),{},{properties:null,newProperties:s}):Ze(Ze({},t),{},{properties:u,newProperties:s})}case"split_node":return Ze(Ze({},t),{},{type:"merge_node",path:L.next(t.path)})}}},Cu=new WeakMap,jh=t=>{var e=Cu.get(t);if(e!==void 0)return e;if(!pt(t))return!1;var n=typeof t.addMark=="function"&&typeof t.apply=="function"&&typeof t.deleteFragment=="function"&&typeof t.insertBreak=="function"&&typeof t.insertSoftBreak=="function"&&typeof t.insertFragment=="function"&&typeof t.insertNode=="function"&&typeof t.insertText=="function"&&typeof t.isElementReadOnly=="function"&&typeof t.isInline=="function"&&typeof t.isSelectable=="function"&&typeof t.isVoid=="function"&&typeof t.normalizeNode=="function"&&typeof t.onChange=="function"&&typeof t.removeMark=="function"&&typeof t.getDirtyPaths=="function"&&(t.marks===null||pt(t.marks))&&(t.selection===null||q.isRange(t.selection))&&ie.isNodeList(t.children)&&Jt.isOperationList(t.operations);return Cu.set(t,n),n},m={above(t,e){return t.above(e)},addMark(t,e,n){t.addMark(e,n)},after(t,e,n){return t.after(e,n)},before(t,e,n){return t.before(e,n)},deleteBackward(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=e;t.deleteBackward(n)},deleteForward(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=e;t.deleteForward(n)},deleteFragment(t,e){t.deleteFragment(e)},edges(t,e){return t.edges(e)},elementReadOnly(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.elementReadOnly(e)},end(t,e){return t.end(e)},first(t,e){return t.first(e)},fragment(t,e){return t.fragment(e)},hasBlocks(t,e){return t.hasBlocks(e)},hasInlines(t,e){return t.hasInlines(e)},hasPath(t,e){return t.hasPath(e)},hasTexts(t,e){return t.hasTexts(e)},insertBreak(t){t.insertBreak()},insertFragment(t,e,n){t.insertFragment(e,n)},insertNode(t,e){t.insertNode(e)},insertSoftBreak(t){t.insertSoftBreak()},insertText(t,e){t.insertText(e)},isBlock(t,e){return t.isBlock(e)},isEdge(t,e,n){return t.isEdge(e,n)},isEditor(t){return jh(t)},isElementReadOnly(t,e){return t.isElementReadOnly(e)},isEmpty(t,e){return t.isEmpty(e)},isEnd(t,e,n){return t.isEnd(e,n)},isInline(t,e){return t.isInline(e)},isNormalizing(t){return t.isNormalizing()},isSelectable(t,e){return t.isSelectable(e)},isStart(t,e,n){return t.isStart(e,n)},isVoid(t,e){return t.isVoid(e)},last(t,e){return t.last(e)},leaf(t,e,n){return t.leaf(e,n)},levels(t,e){return t.levels(e)},marks(t){return t.getMarks()},next(t,e){return t.next(e)},node(t,e,n){return t.node(e,n)},nodes(t,e){return t.nodes(e)},normalize(t,e){t.normalize(e)},parent(t,e,n){return t.parent(e,n)},path(t,e,n){return t.path(e,n)},pathRef(t,e,n){return t.pathRef(e,n)},pathRefs(t){return t.pathRefs()},point(t,e,n){return t.point(e,n)},pointRef(t,e,n){return t.pointRef(e,n)},pointRefs(t){return t.pointRefs()},positions(t,e){return t.positions(e)},previous(t,e){return t.previous(e)},range(t,e,n){return t.range(e,n)},rangeRef(t,e,n){return t.rangeRef(e,n)},rangeRefs(t){return t.rangeRefs()},removeMark(t,e){t.removeMark(e)},setNormalizing(t,e){t.setNormalizing(e)},start(t,e){return t.start(e)},string(t,e,n){return t.string(e,n)},unhangRange(t,e,n){return t.unhangRange(e,n)},void(t,e){return t.void(e)},withoutNormalizing(t,e){t.withoutNormalizing(e)},shouldMergeNodesRemovePrevNode:(t,e,n)=>t.shouldMergeNodesRemovePrevNode(e,n)},Nh={isSpan(t){return Array.isArray(t)&&t.length===2&&t.every(L.isPath)}};function Du(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function bu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Du(Object(n),!0).forEach(function(r){ht(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Du(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Le={compare(t,e){var n=L.compare(t.path,e.path);return n===0?t.offset<e.offset?-1:t.offset>e.offset?1:0:n},isAfter(t,e){return Le.compare(t,e)===1},isBefore(t,e){return Le.compare(t,e)===-1},equals(t,e){return t.offset===e.offset&&L.equals(t.path,e.path)},isPoint(t){return pt(t)&&typeof t.offset=="number"&&L.isPath(t.path)},transform(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return oa(t,r=>{if(r===null)return null;var{affinity:i="forward"}=n,{path:a,offset:o}=r;switch(e.type){case"insert_node":case"move_node":{r.path=L.transform(a,e,n);break}case"insert_text":{L.equals(e.path,a)&&(e.offset<o||e.offset===o&&i==="forward")&&(r.offset+=e.text.length);break}case"merge_node":{L.equals(e.path,a)&&(r.offset+=e.position),r.path=L.transform(a,e,n);break}case"remove_text":{L.equals(e.path,a)&&e.offset<=o&&(r.offset-=Math.min(o-e.offset,e.text.length));break}case"remove_node":{if(L.equals(e.path,a)||L.isAncestor(e.path,a))return null;r.path=L.transform(a,e,n);break}case"split_node":{if(L.equals(e.path,a)){if(e.position===o&&i==null)return null;(e.position<o||e.position===o&&i==="forward")&&(r.offset-=e.position,r.path=L.transform(a,e,bu(bu({},n),{},{affinity:"forward"})))}else r.path=L.transform(a,e,n);break}}})}},Eu=void 0,lt={setScrubber(t){Eu=t},stringify(t){return JSON.stringify(t,Eu)}},_h=["text"],zh=["anchor","focus"];function wu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ht(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?wu(Object(n),!0).forEach(function(r){ht(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var ce={equals(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:r=!1}=n;function i(a){var o=Ut(a,_h);return o}return hu(r?i(t):t,r?i(e):e)},isText(t){return pt(t)&&typeof t.text=="string"},isTextList(t){return Array.isArray(t)&&t.every(e=>ce.isText(e))},isTextProps(t){return t.text!==void 0},matches(t,e){for(var n in e)if(n!=="text"&&(!t.hasOwnProperty(n)||t[n]!==e[n]))return!1;return!0},decorations(t,e){var n=[Ht({},t)];for(var r of e){var i=Ut(r,zh),[a,o]=q.edges(r),s=[],u=0,l=a.offset,f=o.offset;for(var h of n){var{length:p}=h.text,g=u;if(u+=p,l<=g&&u<=f){Object.assign(h,i),s.push(h);continue}if(l!==f&&(l===u||f===g)||l>u||f<g||f===g&&g!==0){s.push(h);continue}var y=h,v=void 0,d=void 0;if(f<u){var D=f-g;d=Ht(Ht({},y),{},{text:y.text.slice(D)}),y=Ht(Ht({},y),{},{text:y.text.slice(0,D)})}if(l>g){var x=l-g;v=Ht(Ht({},y),{},{text:y.text.slice(0,x)}),y=Ht(Ht({},y),{},{text:y.text.slice(x)})}Object.assign(y,i),v&&s.push(v),s.push(y),d&&s.push(d)}n=s}return n}},sa=t=>t.selection?t.selection:t.children.length>0?m.end(t,[]):[0],Pn=(t,e)=>{var[n]=m.node(t,e);return r=>r===n},ua=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=!n,i=n?Gh(e):e,a=Be.None,o=Be.None,s=0,u=null,l=null;for(var f of i){var h=f.codePointAt(0);if(!h)break;var p=iv(f,h);if([a,o]=r?[o,p]:[p,a],Mn(a,Be.ZWJ)&&Mn(o,Be.ExtPict)&&(r?u=xu(e.substring(0,s)):u=xu(e.substring(0,e.length-s)),!u)||Mn(a,Be.RI)&&Mn(o,Be.RI)&&(l!==null?l=!l:r?l=!0:l=lv(e.substring(0,e.length-s)),!l)||a!==Be.None&&o!==Be.None&&ov(a,o))break;s+=f.length}return s||1},Wh=/\s/,Uh=/[\u002B\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,Hh=/['\u2018\u2019]/,Vh=function(e){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=0,i=!1;e.length>0;){var a=ua(e,n),[o,s]=la(e,a,n);if(qh(o,s,n))i=!0,r+=a;else if(!i)r+=a;else break;e=s}return r},la=(t,e,n)=>{if(n){var r=t.length-e;return[t.slice(r,t.length),t.slice(0,r)]}return[t.slice(0,e),t.slice(e)]},qh=function t(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(Wh.test(e))return!1;if(Hh.test(e)){var i=ua(n,r),[a,o]=la(n,i,r);if(t(a,o,r))return!0}return!Uh.test(e)},Gh=function*(e){for(var n=e.length-1,r=0;r<e.length;r++){var i=e.charAt(n-r);if(Zh(i.charCodeAt(0))){var a=e.charAt(n-r-1);if(Yh(a.charCodeAt(0))){yield a+i,r++;continue}}yield i}},Yh=t=>t>=55296&&t<=56319,Zh=t=>t>=56320&&t<=57343,Be;(function(t){t[t.None=0]="None",t[t.Extend=1]="Extend",t[t.ZWJ=2]="ZWJ",t[t.RI=4]="RI",t[t.Prepend=8]="Prepend",t[t.SpacingMark=16]="SpacingMark",t[t.L=32]="L",t[t.V=64]="V",t[t.T=128]="T",t[t.LV=256]="LV",t[t.LVT=512]="LVT",t[t.ExtPict=1024]="ExtPict",t[t.Any=2048]="Any"})(Be||(Be={}));var Kh=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,Xh=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,Jh=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,Qh=/^[\u1100-\u115F\uA960-\uA97C]$/,$h=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,ev=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,tv=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,nv=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,rv=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,iv=(t,e)=>{var n=Be.Any;return t.search(Kh)!==-1&&(n|=Be.Extend),e===8205&&(n|=Be.ZWJ),e>=127462&&e<=127487&&(n|=Be.RI),t.search(Xh)!==-1&&(n|=Be.Prepend),t.search(Jh)!==-1&&(n|=Be.SpacingMark),t.search(Qh)!==-1&&(n|=Be.L),t.search($h)!==-1&&(n|=Be.V),t.search(ev)!==-1&&(n|=Be.T),t.search(tv)!==-1&&(n|=Be.LV),t.search(nv)!==-1&&(n|=Be.LVT),t.search(rv)!==-1&&(n|=Be.ExtPict),n};function Mn(t,e){return(t&e)!==0}var av=[[Be.L,Be.L|Be.V|Be.LV|Be.LVT],[Be.LV|Be.V,Be.V|Be.T],[Be.LVT|Be.T,Be.T],[Be.Any,Be.Extend|Be.ZWJ],[Be.Any,Be.SpacingMark],[Be.Prepend,Be.Any],[Be.ZWJ,Be.ExtPict],[Be.RI,Be.RI]];function ov(t,e){return av.findIndex(n=>Mn(t,n[0])&&Mn(e,n[1]))===-1}var sv=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,xu=t=>t.search(sv)!==-1,uv=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,lv=t=>{var e=t.match(uv);if(e===null)return!1;var n=e[0].length/2;return n%2===1},cv={delete(t,e){t.delete(e)},insertFragment(t,e,n){t.insertFragment(e,n)},insertText(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(t,()=>{var{voids:r=!1}=n,{at:i=sa(t)}=n;if(L.isPath(i)&&(i=m.range(t,i)),q.isRange(i))if(q.isCollapsed(i))i=i.anchor;else{var a=q.end(i);if(!r&&m.void(t,{at:a}))return;var o=q.start(i),s=m.pointRef(t,o),u=m.pointRef(t,a);ee.delete(t,{at:i,voids:r});var l=s.unref(),f=u.unref();i=l||f,ee.setSelection(t,{anchor:i,focus:i})}if(!(!r&&m.void(t,{at:i})||m.elementReadOnly(t,{at:i}))){var{path:h,offset:p}=i;e.length>0&&t.apply({type:"insert_text",path:h,offset:p,text:e})}})}};function Bu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function _r(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Bu(Object(n),!0).forEach(function(r){ht(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Bu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var ee=_r(_r(_r(_r({},Oh),Ph),Mh),cv),zr=new WeakMap,fv=t=>zr.get(t)||!1,dv=(t,e,n)=>{var r=zr.get(t)||!1;zr.set(t,!0);try{e(),n()}finally{zr.set(t,r)}};function Su(t,e,n){var r=jr.get(t)||[],i=Nr.get(t)||new Set,a,o,s=h=>{if(h){var p=h.join(",");o.has(p)||(o.add(p),a.push(h))}};if(n){a=[],o=new Set;for(var u of r){var l=n(u);s(l)}}else a=r,o=i;for(var f of e)s(f);jr.set(t,a),Nr.set(t,o)}var pv=(t,e)=>{for(var n of m.pathRefs(t))wh.transform(n,e);for(var r of m.pointRefs(t))xh.transform(r,e);for(var i of m.rangeRefs(t))Bh.transform(i,e);if(!fv(t)){var a=L.operationCanTransformPath(e)?o=>L.transform(o,e):void 0;Su(t,t.getDirtyPaths(e),a)}ee.transform(t,e),t.operations.push(e),m.normalize(t,{operation:e}),e.type==="set_selection"&&(t.marks=null),Xn.get(t)||(Xn.set(t,!0),Promise.resolve().then(()=>{Xn.set(t,!1),t.onChange({operation:e}),t.operations=[]}))},hv=(t,e)=>{switch(e.type){case"insert_text":case"remove_text":case"set_node":{var{path:n}=e;return L.levels(n)}case"insert_node":{var{node:r,path:i}=e,a=L.levels(i),o=ce.isText(r)?[]:Array.from(ie.nodes(r),P=>{var[,_]=P;return i.concat(_)});return[...a,...o]}case"merge_node":{var{path:s}=e,u=L.ancestors(s),l=L.previous(s);return[...u,l]}case"move_node":{var{path:f,newPath:h}=e;if(L.equals(f,h))return[];var p=[],g=[];for(var y of L.ancestors(f)){var v=L.transform(y,e);p.push(v)}for(var d of L.ancestors(h)){var D=L.transform(d,e);g.push(D)}var x=g[g.length-1],E=h[h.length-1],O=x.concat(E);return[...p,...g,O]}case"remove_node":{var{path:b}=e,w=L.ancestors(b);return[...w]}case"split_node":{var{path:A}=e,M=L.levels(A),V=L.next(A);return[...M,V]}default:return[]}},vv=t=>{var{selection:e}=t;return e?ie.fragment(t,e):[]},gv=(t,e)=>{var[n,r]=e;if(!ce.isText(n)){if(le.isElement(n)&&n.children.length===0){var i={text:""};ee.insertNodes(t,i,{at:r.concat(0),voids:!0});return}for(var a=m.isEditor(n)?!1:le.isElement(n)&&(t.isInline(n)||n.children.length===0||ce.isText(n.children[0])||t.isInline(n.children[0])),o=0,s=0;s<n.children.length;s++,o++){var u=ie.get(t,r);if(!ce.isText(u)){var l=u.children[o],f=u.children[o-1],h=s===n.children.length-1,p=ce.isText(l)||le.isElement(l)&&t.isInline(l);if(p!==a)ee.removeNodes(t,{at:r.concat(o),voids:!0}),o--;else if(le.isElement(l)){if(t.isInline(l)){if(f==null||!ce.isText(f)){var g={text:""};ee.insertNodes(t,g,{at:r.concat(o),voids:!0}),o++}else if(h){var y={text:""};ee.insertNodes(t,y,{at:r.concat(o+1),voids:!0}),o++}}}else{if(!ce.isText(l)&&!("children"in l)){var v=l;v.children=[]}f!=null&&ce.isText(f)&&(ce.equals(l,f,{loose:!0})?(ee.mergeNodes(t,{at:r.concat(o),voids:!0}),o--):f.text===""?(ee.removeNodes(t,{at:r.concat(o-1),voids:!0}),o--):l.text===""&&(ee.removeNodes(t,{at:r.concat(o),voids:!0}),o--))}}}}},mv=(t,e)=>{var{iteration:n,initialDirtyPathsLength:r}=e,i=r*42;if(n>i)throw new Error("Could not completely normalize the editor after ".concat(i," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state."));return!0},yv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{voids:r=!1,mode:i="lowest",at:a=e.selection,match:o}=n;if(a){var s=m.path(e,a),u=i==="lowest";for(var[l,f]of m.levels(e,{at:s,voids:r,match:o,reverse:u}))if(!ce.isText(l)){if(q.isRange(a)){if(L.isAncestor(f,a.anchor.path)&&L.isAncestor(f,a.focus.path))return[l,f]}else if(!L.equals(s,f))return[l,f]}}};function Au(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Lu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Au(Object(n),!0).forEach(function(r){ht(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Au(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Cv=(t,e,n)=>{var{selection:r}=t;if(r){var i=(h,p)=>{if(!ce.isText(h))return!1;var[g,y]=m.parent(t,p);return!t.isVoid(g)||t.markableVoid(g)},a=q.isExpanded(r),o=!1;if(!a){var[s,u]=m.node(t,r);if(s&&i(s,u)){var[l]=m.parent(t,u);o=l&&t.markableVoid(l)}}if(a||o)ee.setNodes(t,{[e]:n},{match:i,split:!0,voids:!0});else{var f=Lu(Lu({},m.marks(t)||{}),{},{[e]:n});t.marks=f,Xn.get(t)||t.onChange()}}};function Ou(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Pu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ou(Object(n),!0).forEach(function(r){ht(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ou(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Dv=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.point(e,n,{edge:"end"}),a=m.end(e,[]),o={anchor:i,focus:a},{distance:s=1}=r,u=0,l;for(var f of m.positions(e,Pu(Pu({},r),{},{at:o}))){if(u>s)break;u!==0&&(l=f),u++}return l};function Mu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Fu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Mu(Object(n),!0).forEach(function(r){ht(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Mu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var bv=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.start(e,[]),a=m.point(e,n,{edge:"start"}),o={anchor:i,focus:a},{distance:s=1}=r,u=0,l;for(var f of m.positions(e,Fu(Fu({},r),{},{at:o,reverse:!0}))){if(u>s)break;u!==0&&(l=f),u++}return l},Ev=(t,e)=>{var{selection:n}=t;n&&q.isCollapsed(n)&&ee.delete(t,{unit:e,reverse:!0})},wv=(t,e)=>{var{selection:n}=t;n&&q.isCollapsed(n)&&ee.delete(t,{unit:e})},xv=function(e){var{direction:n="forward"}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e;r&&q.isExpanded(r)&&ee.delete(e,{reverse:n==="backward"})},Bv=(t,e)=>[m.start(t,e),m.end(t,e)];function ku(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Tu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ku(Object(n),!0).forEach(function(r){ht(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ku(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Sv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return m.above(e,Tu(Tu({},n),{},{match:r=>le.isElement(r)&&m.isElementReadOnly(e,r)}))},Av=(t,e)=>m.point(t,e,{edge:"end"}),Lv=(t,e)=>{var n=m.path(t,e,{edge:"start"});return m.node(t,n)},Ov=(t,e)=>{var n=m.range(t,e);return ie.fragment(t,n)};function Ru(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Iu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ru(Object(n),!0).forEach(function(r){ht(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ru(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Pv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return m.above(e,Iu(Iu({},n),{},{match:r=>le.isElement(r)&&m.isVoid(e,r)}))},Mv=(t,e)=>e.children.some(n=>le.isElement(n)&&m.isBlock(t,n)),Fv=(t,e)=>e.children.some(n=>ce.isText(n)||m.isInline(t,n)),kv=(t,e)=>ie.has(t,e),Tv=(t,e)=>e.children.every(n=>ce.isText(n)),Rv=t=>{ee.splitNodes(t,{always:!0})},Iv=(t,e,n)=>{ee.insertNodes(t,e,n)},jv=t=>{ee.splitNodes(t,{always:!0})};function ju(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Nv(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ju(Object(n),!0).forEach(function(r){ht(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ju(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var _v=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:i,marks:a}=e;if(i){if(a){var o=Nv({text:n},a);ee.insertNodes(e,o,{at:r.at,voids:r.voids})}else ee.insertText(e,n,r);e.marks=null}},zv=(t,e)=>!t.isInline(e),Wv=(t,e,n)=>m.isStart(t,e,n)||m.isEnd(t,e,n),Uv=(t,e)=>{var{children:n}=e,[r]=n;return n.length===0||n.length===1&&ce.isText(r)&&r.text===""&&!t.isVoid(e)},Hv=(t,e,n)=>{var r=m.end(t,n);return Le.equals(e,r)},Vv=t=>{var e=lu.get(t);return e===void 0?!0:e},qv=(t,e,n)=>{if(e.offset!==0)return!1;var r=m.start(t,n);return Le.equals(e,r)},Gv=(t,e)=>{var n=m.path(t,e,{edge:"end"});return m.node(t,n)},Yv=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.path(e,n,r),a=ie.leaf(e,i);return[a,i]};function Zv(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:n=t.selection,reverse:r=!1,voids:i=!1}=e,{match:a}=e;if(a==null&&(a=()=>!0),!!n){var o=[],s=m.path(t,n);for(var[u,l]of ie.levels(t,s))if(a(u,l)&&(o.push([u,l]),!i&&le.isElement(u)&&m.isVoid(t,u)))break;r&&o.reverse(),yield*o}}()}var Kv=["text"],Xv=["text"],Jv=function(e){var{marks:n,selection:r}=e;if(!r)return null;var{anchor:i,focus:a}=r;if(n)return n;if(q.isExpanded(r)){var o=m.isEnd(e,i,i.path);if(o){var s=m.after(e,i);s&&(i=s)}var[u]=m.nodes(e,{match:ce.isText,at:{anchor:i,focus:a}});if(u){var[l]=u,f=Ut(l,Kv);return f}else return{}}var{path:h}=i,[p]=m.leaf(e,h);if(i.offset===0){var g=m.previous(e,{at:h,match:ce.isText}),y=m.above(e,{match:O=>le.isElement(O)&&m.isVoid(e,O)&&e.markableVoid(O)});if(!y){var v=m.above(e,{match:O=>le.isElement(O)&&m.isBlock(e,O)});if(g&&v){var[d,D]=g,[,x]=v;L.isAncestor(x,D)&&(p=d)}}}var E=Ut(p,Xv);return E},Qv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:i=!1}=n,{match:a,at:o=e.selection}=n;if(o){var s=m.after(e,o,{voids:i});if(s){var[,u]=m.last(e,[]),l=[s.path,u];if(L.isPath(o)&&o.length===0)throw new Error("Cannot get the next node from the root node!");if(a==null)if(L.isPath(o)){var[f]=m.parent(e,o);a=p=>f.children.includes(p)}else a=()=>!0;var[h]=m.nodes(e,{at:l,match:a,mode:r,voids:i});return h}}},$v=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.path(e,n,r),a=ie.get(e,i);return[a,i]};function eg(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:n=t.selection,mode:r="all",universal:i=!1,reverse:a=!1,voids:o=!1,ignoreNonSelectable:s=!1}=e,{match:u}=e;if(u||(u=()=>!0),!!n){var l,f;if(Nh.isSpan(n))l=n[0],f=n[1];else{var h=m.path(t,n,{edge:"start"}),p=m.path(t,n,{edge:"end"});l=a?p:h,f=a?h:p}var g=ie.nodes(t,{reverse:a,from:l,to:f,pass:O=>{var[b]=O;return le.isElement(b)?!!(!o&&(m.isVoid(t,b)||m.isElementReadOnly(t,b))||s&&!m.isSelectable(t,b)):!1}}),y=[],v;for(var[d,D]of g)if(!(s&&le.isElement(d)&&!m.isSelectable(t,d))){var x=v&&L.compare(D,v[1])===0;if(!(r==="highest"&&x)){if(!u(d,D)){if(i&&!x&&ce.isText(d))return;continue}if(r==="lowest"&&x){v=[d,D];continue}var E=r==="lowest"?v:[d,D];E&&(i?y.push(E):yield E),v=[d,D]}}r==="lowest"&&v&&(i?y.push(v):yield v),i&&(yield*y)}}()}var tg=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:r=!1,operation:i}=n,a=f=>jr.get(f)||[],o=f=>Nr.get(f)||new Set,s=f=>{var h=a(f).pop(),p=h.join(",");return o(f).delete(p),h};if(m.isNormalizing(e)){if(r){var u=Array.from(ie.nodes(e),f=>{var[,h]=f;return h}),l=new Set(u.map(f=>f.join(",")));jr.set(e,u),Nr.set(e,l)}a(e).length!==0&&m.withoutNormalizing(e,()=>{for(var f of a(e))if(ie.has(e,f)){var h=m.node(e,f),[p,g]=h;le.isElement(p)&&p.children.length===0&&e.normalizeNode(h,{operation:i})}for(var y=a(e),v=y.length,d=0;y.length!==0;){if(!e.shouldNormalize({dirtyPaths:y,iteration:d,initialDirtyPathsLength:v,operation:i}))return;var D=s(e);if(ie.has(e,D)){var x=m.node(e,D);e.normalizeNode(x,{operation:i})}d++,y=a(e)}})}},ng=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.path(e,n,r),a=L.parent(i),o=m.node(e,a);return o},rg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=r,a={current:n,affinity:i,unref(){var{current:s}=a,u=m.pathRefs(e);return u.delete(a),a.current=null,s}},o=m.pathRefs(e);return o.add(a),a},ig=t=>{var e=cu.get(t);return e||(e=new Set,cu.set(t,e)),e},ag=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:i,edge:a}=r;if(L.isPath(n)){if(a==="start"){var[,o]=ie.first(e,n);n=o}else if(a==="end"){var[,s]=ie.last(e,n);n=s}}return q.isRange(n)&&(a==="start"?n=q.start(n):a==="end"?n=q.end(n):n=L.common(n.anchor.path,n.focus.path)),Le.isPoint(n)&&(n=n.path),i!=null&&(n=n.slice(0,i)),n},og=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=r,a={current:n,affinity:i,unref(){var{current:s}=a,u=m.pointRefs(e);return u.delete(a),a.current=null,s}},o=m.pointRefs(e);return o.add(a),a},sg=t=>{var e=fu.get(t);return e||(e=new Set,fu.set(t,e)),e},ug=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:i="start"}=r;if(L.isPath(n)){var a;if(i==="end"){var[,o]=ie.last(e,n);a=o}else{var[,s]=ie.first(e,n);a=s}var u=ie.get(e,a);if(!ce.isText(u))throw new Error("Cannot get the ".concat(i," point in the node at path [").concat(n,"] because it has no ").concat(i," text node."));return{path:a,offset:i==="end"?u.text.length:0}}if(q.isRange(n)){var[l,f]=q.edges(n);return i==="start"?l:f}return n};function lg(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:n=t.selection,unit:r="offset",reverse:i=!1,voids:a=!1,ignoreNonSelectable:o=!1}=e;if(!n)return;var s=m.range(t,n),[u,l]=q.edges(s),f=i?l:u,h=!1,p="",g=0,y=0,v=0;for(var[d,D]of m.nodes(t,{at:n,reverse:i,voids:a,ignoreNonSelectable:o})){if(le.isElement(d)){if(!a&&(t.isVoid(d)||t.isElementReadOnly(d))){yield m.start(t,D);continue}if(t.isInline(d))continue;if(m.hasInlines(t,d)){var x=L.isAncestor(D,l.path)?l:m.end(t,D),E=L.isAncestor(D,u.path)?u:m.start(t,D);p=m.string(t,{anchor:E,focus:x},{voids:a}),h=!0}}if(ce.isText(d)){var O=L.equals(D,f.path);for(O?(y=i?f.offset:d.text.length-f.offset,v=f.offset):(y=d.text.length,v=i?y:0),(O||h||r==="offset")&&(yield{path:D,offset:v},h=!1);;){if(g===0){if(p==="")break;g=b(p,r,i),p=la(p,g,i)[1]}if(v=i?v-g:v+g,y=y-g,y<0){g=-y;break}g=0,yield{path:D,offset:v}}}}function b(w,A,M){return A==="character"?ua(w,M):A==="word"?Vh(w,M):A==="line"||A==="block"?w.length:1}}()}var cg=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:i=!1}=n,{match:a,at:o=e.selection}=n;if(o){var s=m.before(e,o,{voids:i});if(s){var[,u]=m.first(e,[]),l=[s.path,u];if(L.isPath(o)&&o.length===0)throw new Error("Cannot get the previous node from the root node!");if(a==null)if(L.isPath(o)){var[f]=m.parent(e,o);a=p=>f.children.includes(p)}else a=()=>!0;var[h]=m.nodes(e,{reverse:!0,at:l,match:a,mode:r,voids:i});return h}}},fg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=r,a={current:n,affinity:i,unref(){var{current:s}=a,u=m.rangeRefs(e);return u.delete(a),a.current=null,s}},o=m.rangeRefs(e);return o.add(a),a},dg=t=>{var e=du.get(t);return e||(e=new Set,du.set(t,e)),e},pg=(t,e,n)=>{if(q.isRange(e)&&!n)return e;var r=m.start(t,e),i=m.end(t,n||e);return{anchor:r,focus:i}};function Nu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function hg(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Nu(Object(n),!0).forEach(function(r){ht(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Nu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var vg=(t,e)=>{var{selection:n}=t;if(n){var r=(f,h)=>{if(!ce.isText(f))return!1;var[p,g]=m.parent(t,h);return!t.isVoid(p)||t.markableVoid(p)},i=q.isExpanded(n),a=!1;if(!i){var[o,s]=m.node(t,n);if(o&&r(o,s)){var[u]=m.parent(t,s);a=u&&t.markableVoid(u)}}if(i||a)ee.unsetNodes(t,e,{match:r,split:!0,voids:!0});else{var l=hg({},m.marks(t)||{});delete l[e],t.marks=l,Xn.get(t)||t.onChange()}}},gg=(t,e)=>{lu.set(t,e)},mg=(t,e)=>m.point(t,e,{edge:"start"}),yg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:i=!1}=r,a=m.range(e,n),[o,s]=q.edges(a),u="";for(var[l,f]of m.nodes(e,{at:a,match:ce.isText,voids:i})){var h=l.text;L.equals(f,s.path)&&(h=h.slice(0,s.offset)),L.equals(f,o.path)&&(h=h.slice(o.offset)),u+=h}return u},Cg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:i=!1}=r,[a,o]=q.edges(n);if(a.offset!==0||o.offset!==0||q.isCollapsed(n)||L.hasPrevious(o.path))return n;var s=m.above(e,{at:o,match:y=>le.isElement(y)&&m.isBlock(e,y),voids:i}),u=s?s[1]:[],l=m.start(e,a),f={anchor:l,focus:o},h=!0;for(var[p,g]of m.nodes(e,{at:f,match:ce.isText,reverse:!0,voids:i})){if(h){h=!1;continue}if(p.text!==""||L.isBefore(g,u)){o={path:g,offset:p.text.length};break}}return{anchor:a,focus:o}},Dg=(t,e)=>{var n=m.isNormalizing(t);m.setNormalizing(t,!1);try{e()}finally{m.setNormalizing(t,n)}m.normalize(t)},bg=(t,e,n)=>{var[r,i]=e;return le.isElement(r)&&m.isEmpty(t,r)||ce.isText(r)&&r.text===""&&i[i.length-1]!==0},Eg=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var r,i,{reverse:a=!1,unit:o="character",distance:s=1,voids:u=!1}=n,{at:l=e.selection,hanging:f=!1}=n;if(l){var h=!1;if(q.isRange(l)&&q.isCollapsed(l)&&(h=!0,l=l.anchor),Le.isPoint(l)){var p=m.void(e,{at:l,mode:"highest"});if(!u&&p){var[,g]=p;l=g}else{var y={unit:o,distance:s},v=a?m.before(e,l,y)||m.start(e,[]):m.after(e,l,y)||m.end(e,[]);l={anchor:l,focus:v},f=!0}}if(L.isPath(l)){ee.removeNodes(e,{at:l,voids:u});return}if(!q.isCollapsed(l)){if(!f){var[,d]=q.edges(l),D=m.end(e,[]);Le.equals(d,D)||(l=m.unhangRange(e,l,{voids:u}))}var[x,E]=q.edges(l),O=m.above(e,{match:ae=>le.isElement(ae)&&m.isBlock(e,ae),at:x,voids:u}),b=m.above(e,{match:ae=>le.isElement(ae)&&m.isBlock(e,ae),at:E,voids:u}),w=O&&b&&!L.equals(O[1],b[1]),A=L.equals(x.path,E.path),M=u?null:(r=m.void(e,{at:x,mode:"highest"}))!==null&&r!==void 0?r:m.elementReadOnly(e,{at:x,mode:"highest"}),V=u?null:(i=m.void(e,{at:E,mode:"highest"}))!==null&&i!==void 0?i:m.elementReadOnly(e,{at:E,mode:"highest"});if(M){var P=m.before(e,x);P&&O&&L.isAncestor(O[1],P.path)&&(x=P)}if(V){var _=m.after(e,E);_&&b&&L.isAncestor(b[1],_.path)&&(E=_)}var R=[],N;for(var T of m.nodes(e,{at:l,voids:u})){var[j,X]=T;N&&L.compare(X,N)===0||(!u&&le.isElement(j)&&(m.isVoid(e,j)||m.isElementReadOnly(e,j))||!L.isCommon(X,x.path)&&!L.isCommon(X,E.path))&&(R.push(T),N=X)}var z=Array.from(R,ae=>{var[,de]=ae;return m.pathRef(e,de)}),$=m.pointRef(e,x),re=m.pointRef(e,E),k="";if(!A&&!M){var I=$.current,[G]=m.leaf(e,I),{path:H}=I,{offset:Q}=x,K=G.text.slice(Q);K.length>0&&(e.apply({type:"remove_text",path:H,offset:Q,text:K}),k=K)}if(z.reverse().map(ae=>ae.unref()).filter(ae=>ae!==null).forEach(ae=>ee.removeNodes(e,{at:ae,voids:u})),!V){var C=re.current,[U]=m.leaf(e,C),{path:W}=C,F=A?x.offset:0,J=U.text.slice(F,E.offset);J.length>0&&(e.apply({type:"remove_text",path:W,offset:F,text:J}),k=J)}!A&&w&&re.current&&$.current&&ee.mergeNodes(e,{at:re.current,hanging:!0,voids:u}),h&&a&&o==="character"&&k.length>1&&k.match(/[\u0E00-\u0E7F]+/)&&ee.insertText(e,k.slice(0,k.length-s));var ne=$.unref(),Y=re.unref(),ue=a?ne||Y:Y||ne;n.at==null&&ue&&ee.select(e,ue)}}})},wg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{hanging:i=!1,voids:a=!1}=r,{at:o=sa(e),batchDirty:s=!0}=r;if(n.length){if(q.isRange(o))if(i||(o=m.unhangRange(e,o,{voids:a})),q.isCollapsed(o))o=o.anchor;else{var[,u]=q.edges(o);if(!a&&m.void(e,{at:u}))return;var l=m.pointRef(e,u);ee.delete(e,{at:o}),o=l.unref()}else L.isPath(o)&&(o=m.start(e,o));if(!(!a&&m.void(e,{at:o}))){var f=m.above(e,{at:o,match:K=>le.isElement(K)&&m.isInline(e,K),mode:"highest",voids:a});if(f){var[,h]=f;if(m.isEnd(e,o,h)){var p=m.after(e,h);o=p}else if(m.isStart(e,o,h)){var g=m.before(e,h);o=g}}var y=m.above(e,{match:K=>le.isElement(K)&&m.isBlock(e,K),at:o,voids:a}),[,v]=y,d=m.isStart(e,o,v),D=m.isEnd(e,o,v),x=d&&D,E=!d||d&&D,O=!D,[,b]=ie.first({children:n},[]),[,w]=ie.last({children:n},[]),A=[],M=K=>{var[C,U]=K,W=U.length===0;return W?!1:x?!0:!(E&&L.isAncestor(U,b)&&le.isElement(C)&&!e.isVoid(C)&&!e.isInline(C)||O&&L.isAncestor(U,w)&&le.isElement(C)&&!e.isVoid(C)&&!e.isInline(C))};for(var V of ie.nodes({children:n},{pass:M}))M(V)&&A.push(V);var P=[],_=[],R=[],N=!0,T=!1;for(var[j]of A)le.isElement(j)&&!e.isInline(j)?(N=!1,T=!0,_.push(j)):N?P.push(j):R.push(j);var[X]=m.nodes(e,{at:o,match:K=>ce.isText(K)||m.isInline(e,K),mode:"highest",voids:a}),[,z]=X,$=m.isStart(e,o,z),re=m.isEnd(e,o,z),k=m.pathRef(e,D&&!R.length?L.next(v):v),I=m.pathRef(e,re?L.next(z):z);ee.splitNodes(e,{at:o,match:K=>T?le.isElement(K)&&m.isBlock(e,K):ce.isText(K)||m.isInline(e,K),mode:T?"lowest":"highest",always:T&&(!d||P.length>0)&&(!D||R.length>0),voids:a});var G=m.pathRef(e,!$||$&&re?L.next(z):z);if(ee.insertNodes(e,P,{at:G.current,match:K=>ce.isText(K)||m.isInline(e,K),mode:"highest",voids:a,batchDirty:s}),x&&!P.length&&_.length&&!R.length&&ee.delete(e,{at:v,voids:a}),ee.insertNodes(e,_,{at:k.current,match:K=>le.isElement(K)&&m.isBlock(e,K),mode:"lowest",voids:a,batchDirty:s}),ee.insertNodes(e,R,{at:I.current,match:K=>ce.isText(K)||m.isInline(e,K),mode:"highest",voids:a,batchDirty:s}),!r.at){var H;if(R.length>0&&I.current?H=L.previous(I.current):_.length>0&&k.current?H=L.previous(k.current):G.current&&(H=L.previous(G.current)),H){var Q=m.end(e,H);ee.select(e,Q)}}G.unref(),k.unref(),I.unref()}}})},xg=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{edge:r="anchor"}=n,{selection:i}=e;if(i){if(r==="anchor")ee.select(e,i.anchor);else if(r==="focus")ee.select(e,i.focus);else if(r==="start"){var[a]=q.edges(i);ee.select(e,a)}else if(r==="end"){var[,o]=q.edges(i);ee.select(e,o)}}else return},Bg=t=>{var{selection:e}=t;e&&t.apply({type:"set_selection",properties:e,newProperties:null})},Sg=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e,{distance:i=1,unit:a="character",reverse:o=!1}=n,{edge:s=null}=n;if(r){s==="start"&&(s=q.isBackward(r)?"focus":"anchor"),s==="end"&&(s=q.isBackward(r)?"anchor":"focus");var{anchor:u,focus:l}=r,f={distance:i,unit:a,ignoreNonSelectable:!0},h={};if(s==null||s==="anchor"){var p=o?m.before(e,u,f):m.after(e,u,f);p&&(h.anchor=p)}if(s==null||s==="focus"){var g=o?m.before(e,l,f):m.after(e,l,f);g&&(h.focus=g)}ee.setSelection(e,h)}},Ag=(t,e)=>{var{selection:n}=t;if(e=m.range(t,e),n){ee.setSelection(t,e);return}if(!q.isRange(e))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(lt.stringify(e)));t.apply({type:"set_selection",properties:n,newProperties:e})};function _u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function zu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?_u(Object(n),!0).forEach(function(r){ht(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_u(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Lg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:i}=e,{edge:a="both"}=r;if(i){a==="start"&&(a=q.isBackward(i)?"focus":"anchor"),a==="end"&&(a=q.isBackward(i)?"anchor":"focus");var{anchor:o,focus:s}=i,u=a==="anchor"?o:s;ee.setSelection(e,{[a==="anchor"?"anchor":"focus"]:zu(zu({},u),n)})}},Og=(t,e)=>{var{selection:n}=t,r={},i={};if(n){for(var a in e)(a==="anchor"&&e.anchor!=null&&!Le.equals(e.anchor,n.anchor)||a==="focus"&&e.focus!=null&&!Le.equals(e.focus,n.focus)||a!=="anchor"&&a!=="focus"&&e[a]!==n[a])&&(r[a]=n[a],i[a]=e[a]);Object.keys(r).length>0&&t.apply({type:"set_selection",properties:r,newProperties:i})}},Pg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{hanging:i=!1,voids:a=!1,mode:o="lowest",batchDirty:s=!0}=r,{at:u,match:l,select:f}=r;if(ie.isNode(n)&&(n=[n]),n.length!==0){var[h]=n;if(u||(u=sa(e),f!==!1&&(f=!0)),f==null&&(f=!1),q.isRange(u))if(i||(u=m.unhangRange(e,u,{voids:a})),q.isCollapsed(u))u=u.anchor;else{var[,p]=q.edges(u),g=m.pointRef(e,p);ee.delete(e,{at:u}),u=g.unref()}if(Le.isPoint(u)){l==null&&(ce.isText(h)?l=P=>ce.isText(P):e.isInline(h)?l=P=>ce.isText(P)||m.isInline(e,P):l=P=>le.isElement(P)&&m.isBlock(e,P));var[y]=m.nodes(e,{at:u.path,match:l,mode:o,voids:a});if(y){var[,v]=y,d=m.pathRef(e,v),D=m.isEnd(e,u,v);ee.splitNodes(e,{at:u,match:l,mode:o,voids:a});var x=d.unref();u=D?L.next(x):x}else return}var E=L.parent(u),O=u[u.length-1];if(!(!a&&m.void(e,{at:E}))){if(s){var b=[],w=L.levels(E);dv(e,()=>{var P=function(){var N=E.concat(O);O++;var T={type:"insert_node",path:N,node:_};e.apply(T),u=L.next(u),b.push(T),ce.isText?w.push(...Array.from(ie.nodes(_),j=>{var[,X]=j;return N.concat(X)})):w.push(N)};for(var _ of n)P()},()=>{Su(e,w,P=>{var _=P;for(var R of b)if(L.operationCanTransformPath(R)&&(_=L.transform(_,R),!_))return null;return _})})}else for(var A of n){var M=E.concat(O);O++,e.apply({type:"insert_node",path:M,node:A}),u=L.next(u)}if(u=L.previous(u),f){var V=m.end(e,u);V&&ee.select(e,V)}}}})},Mg=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{at:r=e.selection,mode:i="lowest",voids:a=!1}=n,{match:o}=n;if(o==null&&(o=L.isPath(r)?Pn(e,r):O=>le.isElement(O)&&m.isBlock(e,O)),!!r){var s=m.nodes(e,{at:r,match:o,mode:i,voids:a}),u=Array.from(s,O=>{var[,b]=O;return m.pathRef(e,b)});for(var l of u){var f=l.unref();if(f.length<2)throw new Error("Cannot lift node at a path [".concat(f,"] because it has a depth of less than `2`."));var h=m.node(e,L.parent(f)),[p,g]=h,y=f[f.length-1],{length:v}=p.children;if(v===1){var d=L.next(g);ee.moveNodes(e,{at:f,to:d,voids:a}),ee.removeNodes(e,{at:g,voids:a})}else if(y===0)ee.moveNodes(e,{at:f,to:g,voids:a});else if(y===v-1){var D=L.next(g);ee.moveNodes(e,{at:f,to:D,voids:a})}else{var x=L.next(f),E=L.next(g);ee.splitNodes(e,{at:x,voids:a}),ee.moveNodes(e,{at:f,to:E,voids:a})}}}})},Fg=["text"],kg=["children"],Wu=(t,e)=>{if(le.isElement(e)){var n=e;return m.isVoid(t,e)?!0:n.children.length===1?Wu(t,n.children[0]):!1}else return!m.isEditor(e)},Tg=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{match:r,at:i=e.selection}=n,{hanging:a=!1,voids:o=!1,mode:s="lowest"}=n;if(i){if(r==null)if(L.isPath(i)){var[u]=m.parent(e,i);r=P=>u.children.includes(P)}else r=P=>le.isElement(P)&&m.isBlock(e,P);if(!a&&q.isRange(i)&&(i=m.unhangRange(e,i,{voids:o})),q.isRange(i))if(q.isCollapsed(i))i=i.anchor;else{var[,l]=q.edges(i),f=m.pointRef(e,l);ee.delete(e,{at:i}),i=f.unref(),n.at==null&&ee.select(e,i)}var[h]=m.nodes(e,{at:i,match:r,voids:o,mode:s}),p=m.previous(e,{at:i,match:r,voids:o,mode:s});if(!(!h||!p)){var[g,y]=h,[v,d]=p;if(!(y.length===0||d.length===0)){var D=L.next(d),x=L.common(y,d),E=L.isSibling(y,d),O=Array.from(m.levels(e,{at:y}),P=>{var[_]=P;return _}).slice(x.length).slice(0,-1),b=m.above(e,{at:y,mode:"highest",match:P=>O.includes(P)&&Wu(e,P)}),w=b&&m.pathRef(e,b[1]),A,M;if(ce.isText(g)&&ce.isText(v)){var V=Ut(g,Fg);M=v.text.length,A=V}else if(le.isElement(g)&&le.isElement(v)){var V=Ut(g,kg);M=v.children.length,A=V}else throw new Error("Cannot merge the node at path [".concat(y,"] with the previous sibling because it is not the same kind: ").concat(lt.stringify(g)," ").concat(lt.stringify(v)));E||ee.moveNodes(e,{at:y,to:D,voids:o}),w&&ee.removeNodes(e,{at:w.current,voids:o}),m.shouldMergeNodesRemovePrevNode(e,p,h)?ee.removeNodes(e,{at:d,voids:o}):e.apply({type:"merge_node",path:D,position:M,properties:A}),w&&w.unref()}}}})},Rg=(t,e)=>{m.withoutNormalizing(t,()=>{var{to:n,at:r=t.selection,mode:i="lowest",voids:a=!1}=e,{match:o}=e;if(r){o==null&&(o=L.isPath(r)?Pn(t,r):g=>le.isElement(g)&&m.isBlock(t,g));var s=m.pathRef(t,n),u=m.nodes(t,{at:r,match:o,mode:i,voids:a}),l=Array.from(u,g=>{var[,y]=g;return m.pathRef(t,y)});for(var f of l){var h=f.unref(),p=s.current;h.length!==0&&t.apply({type:"move_node",path:h,newPath:p}),s.current&&L.isSibling(p,h)&&L.isAfter(p,h)&&(s.current=L.next(s.current))}s.unref()}})},Ig=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:i=!1,mode:a="lowest"}=n,{at:o=e.selection,match:s}=n;if(o){s==null&&(s=L.isPath(o)?Pn(e,o):g=>le.isElement(g)&&m.isBlock(e,g)),!r&&q.isRange(o)&&(o=m.unhangRange(e,o,{voids:i}));var u=m.nodes(e,{at:o,match:s,mode:a,voids:i}),l=Array.from(u,g=>{var[,y]=g;return m.pathRef(e,y)});for(var f of l){var h=f.unref();if(h){var[p]=m.node(e,h);e.apply({type:"remove_node",path:h,node:p})}}}})},jg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{match:i,at:a=e.selection,compare:o,merge:s}=r,{hanging:u=!1,mode:l="lowest",split:f=!1,voids:h=!1}=r;if(a){if(i==null&&(i=L.isPath(a)?Pn(e,a):M=>le.isElement(M)&&m.isBlock(e,M)),!u&&q.isRange(a)&&(a=m.unhangRange(e,a,{voids:h})),f&&q.isRange(a)){if(q.isCollapsed(a)&&m.leaf(e,a.anchor)[0].text.length>0)return;var p=m.rangeRef(e,a,{affinity:"inward"}),[g,y]=q.edges(a),v=l==="lowest"?"lowest":"highest",d=m.isEnd(e,y,y.path);ee.splitNodes(e,{at:y,match:i,mode:v,voids:h,always:!d});var D=m.isStart(e,g,g.path);ee.splitNodes(e,{at:g,match:i,mode:v,voids:h,always:!D}),a=p.unref(),r.at==null&&ee.select(e,a)}o||(o=(M,V)=>M!==V);for(var[x,E]of m.nodes(e,{at:a,match:i,mode:l,voids:h})){var O={},b={};if(E.length!==0){var w=!1;for(var A in n)A==="children"||A==="text"||o(n[A],x[A])&&(w=!0,x.hasOwnProperty(A)&&(O[A]=x[A]),s?n[A]!=null&&(b[A]=s(x[A],n[A])):n[A]!=null&&(b[A]=n[A]));w&&e.apply({type:"set_node",path:E,properties:O,newProperties:b})}}}})},Ng=(t,e)=>{if(q.isCollapsed(e))return e.anchor;var[,n]=q.edges(e),r=m.pointRef(t,n);return ee.delete(t,{at:e}),r.unref()},_g=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{mode:r="lowest",voids:i=!1}=n,{match:a,at:o=e.selection,height:s=0,always:u=!1}=n;if(a==null&&(a=re=>le.isElement(re)&&m.isBlock(e,re)),q.isRange(o)&&(o=Ng(e,o)),L.isPath(o)){var l=o,f=m.point(e,l),[h]=m.parent(e,l);a=re=>re===h,s=f.path.length-l.length+1,o=f,u=!0}if(o){var p=m.pointRef(e,o,{affinity:"backward"}),g;try{var[y]=m.nodes(e,{at:o,match:a,mode:r,voids:i});if(!y)return;var v=m.void(e,{at:o,mode:"highest"}),d=0;if(!i&&v){var[D,x]=v;if(le.isElement(D)&&e.isInline(D)){var E=m.after(e,x);if(!E){var O={text:""},b=L.next(x);ee.insertNodes(e,O,{at:b,voids:i}),E=m.point(e,b)}o=E,u=!0}var w=o.path.length-x.length;s=w+1,u=!0}g=m.pointRef(e,o);var A=o.path.length-s,[,M]=y,V=o.path.slice(0,A),P=s===0?o.offset:o.path[A]+d;for(var[_,R]of m.levels(e,{at:V,reverse:!0,voids:i})){var N=!1;if(R.length<M.length||R.length===0||!i&&le.isElement(_)&&m.isVoid(e,_))break;var T=p.current,j=m.isEnd(e,T,R);if(u||!p||!m.isEdge(e,T,R)){N=!0;var X=ie.extractProps(_);e.apply({type:"split_node",path:R,position:P,properties:X})}P=R[R.length-1]+(N||j?1:0)}if(n.at==null){var z=g.current||m.end(e,[]);ee.select(e,z)}}finally{var $;p.unref(),($=g)===null||$===void 0||$.unref()}}})},zg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(n)||(n=[n]);var i={};for(var a of n)i[a]=null;ee.setNodes(e,i,r)},Wg=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{mode:r="lowest",split:i=!1,voids:a=!1}=n,{at:o=e.selection,match:s}=n;if(o){s==null&&(s=L.isPath(o)?Pn(e,o):g=>le.isElement(g)&&m.isBlock(e,g)),L.isPath(o)&&(o=m.range(e,o));var u=q.isRange(o)?m.rangeRef(e,o):null,l=m.nodes(e,{at:o,match:s,mode:r,voids:a}),f=Array.from(l,g=>{var[,y]=g;return m.pathRef(e,y)}).reverse(),h=function(){var y=p.unref(),[v]=m.node(e,y),d=m.range(e,y);i&&u&&(d=q.intersection(u.current,d)),ee.liftNodes(e,{at:d,match:D=>le.isAncestor(v)&&v.children.includes(D),voids:a})};for(var p of f)h();u&&u.unref()}})};function Uu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Hu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Uu(Object(n),!0).forEach(function(r){ht(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Uu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Ug=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{mode:i="lowest",split:a=!1,voids:o=!1}=r,{match:s,at:u=e.selection}=r;if(u){if(s==null&&(L.isPath(u)?s=Pn(e,u):e.isInline(n)?s=d=>le.isElement(d)&&m.isInline(e,d)||ce.isText(d):s=d=>le.isElement(d)&&m.isBlock(e,d)),a&&q.isRange(u)){var[l,f]=q.edges(u),h=m.rangeRef(e,u,{affinity:"inward"});ee.splitNodes(e,{at:f,match:s,voids:o}),ee.splitNodes(e,{at:l,match:s,voids:o}),u=h.unref(),r.at==null&&ee.select(e,u)}var p=Array.from(m.nodes(e,{at:u,match:e.isInline(n)?d=>le.isElement(d)&&m.isBlock(e,d):d=>m.isEditor(d),mode:"lowest",voids:o})),g=function(){var D=q.isRange(u)?q.intersection(u,m.range(e,v)):u;if(!D)return 0;var x=Array.from(m.nodes(e,{at:D,match:s,mode:i,voids:o}));if(x.length>0){var[E]=x,O=x[x.length-1],[,b]=E,[,w]=O;if(b.length===0&&w.length===0)return 0;var A=L.equals(b,w)?L.parent(b):L.common(b,w),M=m.range(e,b,w),V=m.node(e,A),[P]=V,_=A.length+1,R=L.next(w.slice(0,_)),N=Hu(Hu({},n),{},{children:[]});ee.insertNodes(e,N,{at:R,voids:o}),ee.moveNodes(e,{at:M,match:T=>le.isAncestor(P)&&P.children.includes(T),to:R.concat(0),voids:o})}},y;for(var[,v]of p)y=g()}})},Hg=()=>{var t={children:[],operations:[],selection:null,marks:null,isElementReadOnly:()=>!1,isInline:()=>!1,isSelectable:()=>!0,isVoid:()=>!1,markableVoid:()=>!1,onChange:()=>{},apply:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return pv(t,...r)},addMark:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Cv(t,...r)},deleteBackward:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ev(t,...r)},deleteForward:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return wv(t,...r)},deleteFragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return xv(t,...r)},getFragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return vv(t,...r)},insertBreak:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Rv(t,...r)},insertSoftBreak:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return jv(t,...r)},insertFragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return wg(t,...r)},insertNode:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Iv(t,...r)},insertText:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return _v(t,...r)},normalizeNode:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return gv(t,...r)},removeMark:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return vg(t,...r)},getDirtyPaths:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return hv(t,...r)},shouldNormalize:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return mv(t,...r)},above:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return yv(t,...r)},after:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Dv(t,...r)},before:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return bv(t,...r)},collapse:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return xg(t,...r)},delete:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Eg(t,...r)},deselect:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Bg(t,...r)},edges:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Bv(t,...r)},elementReadOnly:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Sv(t,...r)},end:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Av(t,...r)},first:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Lv(t,...r)},fragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ov(t,...r)},getMarks:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Jv(t,...r)},hasBlocks:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Mv(t,...r)},hasInlines:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Fv(t,...r)},hasPath:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return kv(t,...r)},hasTexts:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Tv(t,...r)},insertNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Pg(t,...r)},isBlock:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return zv(t,...r)},isEdge:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Wv(t,...r)},isEmpty:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Uv(t,...r)},isEnd:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Hv(t,...r)},isNormalizing:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Vv(t,...r)},isStart:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return qv(t,...r)},last:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Gv(t,...r)},leaf:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Yv(t,...r)},levels:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Zv(t,...r)},liftNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Mg(t,...r)},mergeNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Tg(t,...r)},move:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Sg(t,...r)},moveNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Rg(t,...r)},next:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Qv(t,...r)},node:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return $v(t,...r)},nodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return eg(t,...r)},normalize:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return tg(t,...r)},parent:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ng(t,...r)},path:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ag(t,...r)},pathRef:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return rg(t,...r)},pathRefs:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ig(t,...r)},point:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ug(t,...r)},pointRef:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return og(t,...r)},pointRefs:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return sg(t,...r)},positions:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return lg(t,...r)},previous:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return cg(t,...r)},range:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return pg(t,...r)},rangeRef:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return fg(t,...r)},rangeRefs:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return dg(t,...r)},removeNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ig(t,...r)},select:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ag(t,...r)},setNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return jg(t,...r)},setNormalizing:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return gg(t,...r)},setPoint:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Lg(t,...r)},setSelection:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Og(t,...r)},splitNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return _g(t,...r)},start:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return mg(t,...r)},string:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return yg(t,...r)},unhangRange:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Cg(t,...r)},unsetNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return zg(t,...r)},unwrapNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Wg(t,...r)},void:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Pv(t,...r)},withoutNormalizing:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Dg(t,...r)},wrapNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ug(t,...r)},shouldMergeNodesRemovePrevNode:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return bg(t,...r)}};return t};/*!
77
77
  * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
78
78
  *
79
79
  * Copyright (c) 2014-2017, Jon Schlinkert.
80
80
  * Released under the MIT License.
81
- */function Vu(t){return Object.prototype.toString.call(t)==="[object Object]"}function Hg(t){var e,n;return Vu(t)===!1?!1:(e=t.constructor,e===void 0?!0:(n=e.prototype,!(Vu(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}var Vg={isHistory(t){return Hg(t)&&Array.isArray(t.redos)&&Array.isArray(t.undos)&&(t.redos.length===0||Jt.isOperationList(t.redos[0].operations))&&(t.undos.length===0||Jt.isOperationList(t.undos[0].operations))}},ca=new WeakMap,$n=new WeakMap,mn={isHistoryEditor(t){return Vg.isHistory(t.history)&&m.isEditor(t)},isMerging(t){return $n.get(t)},isSaving(t){return ca.get(t)},redo(t){t.redo()},undo(t){t.undo()},withMerging(t,e){var n=mn.isMerging(t);$n.set(t,!0),e(),$n.set(t,n)},withoutMerging(t,e){var n=mn.isMerging(t);$n.set(t,!1),e(),$n.set(t,n)},withoutSaving(t,e){var n=mn.isSaving(t);ca.set(t,!1),e(),ca.set(t,n)}},qg=t=>{var e=t,{apply:n}=e;return e.history={undos:[],redos:[]},e.redo=()=>{var{history:r}=e,{redos:i}=r;if(i.length>0){var a=i[i.length-1];a.selectionBefore&&ee.setSelection(e,a.selectionBefore),mn.withoutSaving(e,()=>{m.withoutNormalizing(e,()=>{for(var o of a.operations)e.apply(o)})}),r.redos.pop(),e.writeHistory("undos",a)}},e.undo=()=>{var{history:r}=e,{undos:i}=r;if(i.length>0){var a=i[i.length-1];mn.withoutSaving(e,()=>{m.withoutNormalizing(e,()=>{var o=a.operations.map(Jt.inverse).reverse();for(var s of o)e.apply(s);a.selectionBefore&&ee.setSelection(e,a.selectionBefore)})}),e.writeHistory("redos",a),r.undos.pop()}},e.apply=r=>{var{operations:i,history:a}=e,{undos:o}=a,s=o[o.length-1],u=s&&s.operations[s.operations.length-1],l=mn.isSaving(e),f=mn.isMerging(e);if(l==null&&(l=Yg(r)),l){if(f==null&&(s==null?f=!1:i.length!==0?f=!0:f=Gg(r,u)),s&&f)s.operations.push(r);else{var h={operations:[r],selectionBefore:e.selection};e.writeHistory("undos",h)}for(;o.length>100;)o.shift();a.redos=[]}n(r)},e.writeHistory=(r,i)=>{e.history[r].push(i)},e},Gg=(t,e)=>!!(e&&t.type==="insert_text"&&e.type==="insert_text"&&t.offset===e.offset+e.text.length&&L.equals(t.path,e.path)||e&&t.type==="remove_text"&&e.type==="remove_text"&&t.offset+t.text.length===e.offset&&L.equals(t.path,e.path)),Yg=(t,e)=>t.type!=="set_selection",Zg=Jg,qu="֑-߿יִ-﷽ﹰ-ﻼ",Gu="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",Kg=new RegExp("^[^"+Gu+"]*["+qu+"]"),Xg=new RegExp("^[^"+qu+"]*["+Gu+"]");function Jg(t){return t=String(t||""),Kg.test(t)?"rtl":Xg.test(t)?"ltr":"neutral"}const Yu=Er(Zg);function Qg(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var fa=Qg,$g=typeof qe=="object"&&qe&&qe.Object===Object&&qe,em=$g,tm=em,nm=typeof self=="object"&&self&&self.Object===Object&&self,rm=tm||nm||Function("return this")(),Zu=rm,im=Zu,am=function(){return im.Date.now()},om=am,sm=/\s/;function um(t){for(var e=t.length;e--&&sm.test(t.charAt(e)););return e}var lm=um,cm=lm,fm=/^\s+/;function dm(t){return t&&t.slice(0,cm(t)+1).replace(fm,"")}var pm=dm,hm=Zu,vm=hm.Symbol,Ku=vm,Xu=Ku,Ju=Object.prototype,gm=Ju.hasOwnProperty,mm=Ju.toString,er=Xu?Xu.toStringTag:void 0;function ym(t){var e=gm.call(t,er),n=t[er];try{t[er]=void 0;var r=!0}catch{}var i=mm.call(t);return r&&(e?t[er]=n:delete t[er]),i}var Cm=ym,Dm=Object.prototype,bm=Dm.toString;function Em(t){return bm.call(t)}var wm=Em,Qu=Ku,xm=Cm,Bm=wm,Sm="[object Null]",Am="[object Undefined]",$u=Qu?Qu.toStringTag:void 0;function Lm(t){return t==null?t===void 0?Am:Sm:$u&&$u in Object(t)?xm(t):Bm(t)}var Om=Lm;function Pm(t){return t!=null&&typeof t=="object"}var Mm=Pm,Fm=Om,km=Mm,Tm="[object Symbol]";function Rm(t){return typeof t=="symbol"||km(t)&&Fm(t)==Tm}var Im=Rm,jm=pm,el=fa,Nm=Im,tl=NaN,_m=/^[-+]0x[0-9a-f]+$/i,zm=/^0b[01]+$/i,Wm=/^0o[0-7]+$/i,Um=parseInt;function Hm(t){if(typeof t=="number")return t;if(Nm(t))return tl;if(el(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=el(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=jm(t);var n=zm.test(t);return n||Wm.test(t)?Um(t.slice(2),n?2:8):_m.test(t)?tl:+t}var Vm=Hm,qm=fa,da=om,nl=Vm,Gm="Expected a function",Ym=Math.max,Zm=Math.min;function Km(t,e,n){var r,i,a,o,s,u,l=0,f=!1,h=!1,p=!0;if(typeof t!="function")throw new TypeError(Gm);e=nl(e)||0,qm(n)&&(f=!!n.leading,h="maxWait"in n,a=h?Ym(nl(n.maxWait)||0,e):a,p="trailing"in n?!!n.trailing:p);function g(w){var A=r,M=i;return r=i=void 0,l=w,o=t.apply(M,A),o}function y(w){return l=w,s=setTimeout(D,e),f?g(w):o}function v(w){var A=w-u,M=w-l,V=e-A;return h?Zm(V,a-M):V}function d(w){var A=w-u,M=w-l;return u===void 0||A>=e||A<0||h&&M>=a}function D(){var w=da();if(d(w))return x(w);s=setTimeout(D,v(w))}function x(w){return s=void 0,p&&r?g(w):(r=i=void 0,o)}function E(){s!==void 0&&clearTimeout(s),l=0,r=u=i=s=void 0}function O(){return s===void 0?o:x(da())}function b(){var w=da(),A=d(w);if(r=arguments,i=this,u=w,A){if(s===void 0)return y(u);if(h)return clearTimeout(s),s=setTimeout(D,e),g(u)}return s===void 0&&(s=setTimeout(D,e)),o}return b.cancel=E,b.flush=O,b}var rl=Km;const Xm=Er(rl);var Jm=rl,Qm=fa,$m="Expected a function";function e0(t,e,n){var r=!0,i=!0;if(typeof t!="function")throw new TypeError($m);return Qm(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Jm(t,e,{leading:r,maxWait:e,trailing:i})}var t0=e0;const n0=Er(t0),il=t=>typeof t=="object"&&t!=null&&t.nodeType===1,al=(t,e)=>(!e||t!=="hidden")&&t!=="visible"&&t!=="clip",pa=(t,e)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const n=getComputedStyle(t,null);return al(n.overflowY,e)||al(n.overflowX,e)||(r=>{const i=(a=>{if(!a.ownerDocument||!a.ownerDocument.defaultView)return null;try{return a.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!i&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)})(t)}return!1},Wr=(t,e,n,r,i,a,o,s)=>a<t&&o>e||a>t&&o<e?0:a<=t&&s<=n||o>=e&&s>=n?a-t-r:o>e&&s<n||a<t&&s>n?o-e+i:0,r0=t=>{const e=t.parentElement;return e??(t.getRootNode().host||null)},ol=(t,e)=>{var n,r,i,a;if(typeof document>"u")return[];const{scrollMode:o,block:s,inline:u,boundary:l,skipOverflowHiddenElements:f}=e,h=typeof l=="function"?l:X=>X!==l;if(!il(t))throw new TypeError("Invalid target");const p=document.scrollingElement||document.documentElement,g=[];let y=t;for(;il(y)&&h(y);){if(y=r0(y),y===p){g.push(y);break}y!=null&&y===document.body&&pa(y)&&!pa(document.documentElement)||y!=null&&pa(y,f)&&g.push(y)}const v=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,d=(a=(i=window.visualViewport)==null?void 0:i.height)!=null?a:innerHeight,{scrollX:D,scrollY:x}=window,{height:E,width:O,top:b,right:w,bottom:A,left:M}=t.getBoundingClientRect(),{top:V,right:P,bottom:_,left:R}=(X=>{const z=window.getComputedStyle(X);return{top:parseFloat(z.scrollMarginTop)||0,right:parseFloat(z.scrollMarginRight)||0,bottom:parseFloat(z.scrollMarginBottom)||0,left:parseFloat(z.scrollMarginLeft)||0}})(t);let N=s==="start"||s==="nearest"?b-V:s==="end"?A+_:b+E/2-V+_,T=u==="center"?M+O/2-R+P:u==="end"?w+P:M-R;const j=[];for(let X=0;X<g.length;X++){const z=g[X],{height:$,width:re,top:k,right:I,bottom:G,left:H}=z.getBoundingClientRect();if(o==="if-needed"&&b>=0&&M>=0&&A<=d&&w<=v&&b>=k&&A<=G&&M>=H&&w<=I)return j;const Q=getComputedStyle(z),K=parseInt(Q.borderLeftWidth,10),C=parseInt(Q.borderTopWidth,10),U=parseInt(Q.borderRightWidth,10),W=parseInt(Q.borderBottomWidth,10);let F=0,J=0;const ne="offsetWidth"in z?z.offsetWidth-z.clientWidth-K-U:0,Y="offsetHeight"in z?z.offsetHeight-z.clientHeight-C-W:0,ue="offsetWidth"in z?z.offsetWidth===0?0:re/z.offsetWidth:0,ae="offsetHeight"in z?z.offsetHeight===0?0:$/z.offsetHeight:0;if(p===z)F=s==="start"?N:s==="end"?N-d:s==="nearest"?Wr(x,x+d,d,C,W,x+N,x+N+E,E):N-d/2,J=u==="start"?T:u==="center"?T-v/2:u==="end"?T-v:Wr(D,D+v,v,K,U,D+T,D+T+O,O),F=Math.max(0,F+x),J=Math.max(0,J+D);else{F=s==="start"?N-k-C:s==="end"?N-G+W+Y:s==="nearest"?Wr(k,G,$,C,W+Y,N,N+E,E):N-(k+$/2)+Y/2,J=u==="start"?T-H-K:u==="center"?T-(H+re/2)+ne/2:u==="end"?T-I+U+ne:Wr(H,I,re,K,U+ne,T,T+O,O);const{scrollLeft:de,scrollTop:pe}=z;F=ae===0?0:Math.max(0,Math.min(pe+F/ae,z.scrollHeight-$/ae+Y)),J=ue===0?0:Math.max(0,Math.min(de+J/ue,z.scrollWidth-re/ue+ne)),N+=pe-F,T+=de-J}j.push({el:z,top:F,left:J})}return j},i0=t=>t===!1?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&Object.keys(e).length!==0)(t)?t:{block:"start",inline:"nearest"};function a0(t,e){if(!t.isConnected||!(i=>{let a=i;for(;a&&a.parentNode;){if(a.parentNode===document)return!0;a=a.parentNode instanceof ShadowRoot?a.parentNode.host:a.parentNode}return!1})(t))return;const n=(i=>{const a=window.getComputedStyle(i);return{top:parseFloat(a.scrollMarginTop)||0,right:parseFloat(a.scrollMarginRight)||0,bottom:parseFloat(a.scrollMarginBottom)||0,left:parseFloat(a.scrollMarginLeft)||0}})(t);if((i=>typeof i=="object"&&typeof i.behavior=="function")(e))return e.behavior(ol(t,e));const r=typeof e=="boolean"||e==null?void 0:e.behavior;for(const{el:i,top:a,left:o}of ol(t,i0(e))){const s=a-n.top+n.bottom,u=o-n.left+n.right;i.scroll({top:s,left:u,behavior:r})}}var yn=[],o0=function(){return yn.some(function(t){return t.activeTargets.length>0})},s0=function(){return yn.some(function(t){return t.skippedTargets.length>0})},sl="ResizeObserver loop completed with undelivered notifications.",u0=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:sl}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=sl),window.dispatchEvent(t)},tr;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(tr||(tr={}));var Cn=function(t){return Object.freeze(t)},l0=function(){function t(e,n){this.inlineSize=e,this.blockSize=n,Cn(this)}return t}(),ul=function(){function t(e,n,r,i){return this.x=e,this.y=n,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Cn(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,r=e.y,i=e.top,a=e.right,o=e.bottom,s=e.left,u=e.width,l=e.height;return{x:n,y:r,top:i,right:a,bottom:o,left:s,width:u,height:l}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),ha=function(t){return t instanceof SVGElement&&"getBBox"in t},ll=function(t){if(ha(t)){var e=t.getBBox(),n=e.width,r=e.height;return!n&&!r}var i=t,a=i.offsetWidth,o=i.offsetHeight;return!(a||o||t.getClientRects().length)},cl=function(t){var e;if(t instanceof Element)return!0;var n=(e=t==null?void 0:t.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(n&&t instanceof n.Element)},c0=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},nr=typeof window<"u"?window:{},Ur=new WeakMap,fl=/auto|scroll/,f0=/^tb|vertical/,d0=/msie|trident/i.test(nr.navigator&&nr.navigator.userAgent),It=function(t){return parseFloat(t||"0")},Fn=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new l0((n?e:t)||0,(n?t:e)||0)},dl=Cn({devicePixelContentBoxSize:Fn(),borderBoxSize:Fn(),contentBoxSize:Fn(),contentRect:new ul(0,0,0,0)}),pl=function(t,e){if(e===void 0&&(e=!1),Ur.has(t)&&!e)return Ur.get(t);if(ll(t))return Ur.set(t,dl),dl;var n=getComputedStyle(t),r=ha(t)&&t.ownerSVGElement&&t.getBBox(),i=!d0&&n.boxSizing==="border-box",a=f0.test(n.writingMode||""),o=!r&&fl.test(n.overflowY||""),s=!r&&fl.test(n.overflowX||""),u=r?0:It(n.paddingTop),l=r?0:It(n.paddingRight),f=r?0:It(n.paddingBottom),h=r?0:It(n.paddingLeft),p=r?0:It(n.borderTopWidth),g=r?0:It(n.borderRightWidth),y=r?0:It(n.borderBottomWidth),v=r?0:It(n.borderLeftWidth),d=h+l,D=u+f,x=v+g,E=p+y,O=s?t.offsetHeight-E-t.clientHeight:0,b=o?t.offsetWidth-x-t.clientWidth:0,w=i?d+x:0,A=i?D+E:0,M=r?r.width:It(n.width)-w-b,V=r?r.height:It(n.height)-A-O,P=M+d+b+x,_=V+D+O+E,R=Cn({devicePixelContentBoxSize:Fn(Math.round(M*devicePixelRatio),Math.round(V*devicePixelRatio),a),borderBoxSize:Fn(P,_,a),contentBoxSize:Fn(M,V,a),contentRect:new ul(h,u,M,V)});return Ur.set(t,R),R},hl=function(t,e,n){var r=pl(t,n),i=r.borderBoxSize,a=r.contentBoxSize,o=r.devicePixelContentBoxSize;switch(e){case tr.DEVICE_PIXEL_CONTENT_BOX:return o;case tr.BORDER_BOX:return i;default:return a}},p0=function(){function t(e){var n=pl(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=Cn([n.borderBoxSize]),this.contentBoxSize=Cn([n.contentBoxSize]),this.devicePixelContentBoxSize=Cn([n.devicePixelContentBoxSize])}return t}(),vl=function(t){if(ll(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},h0=function(){var t=1/0,e=[];yn.forEach(function(o){if(o.activeTargets.length!==0){var s=[];o.activeTargets.forEach(function(l){var f=new p0(l.target),h=vl(l.target);s.push(f),l.lastReportedSize=hl(l.target,l.observedBox),h<t&&(t=h)}),e.push(function(){o.callback.call(o.observer,s,o.observer)}),o.activeTargets.splice(0,o.activeTargets.length)}});for(var n=0,r=e;n<r.length;n++){var i=r[n];i()}return t},gl=function(t){yn.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(vl(i.target)>t?n.activeTargets.push(i):n.skippedTargets.push(i))})})},v0=function(){var t=0;for(gl(t);o0();)t=h0(),gl(t);return s0()&&u0(),t>0},va,ml=[],g0=function(){return ml.splice(0).forEach(function(t){return t()})},m0=function(t){if(!va){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return g0()}).observe(n,r),va=function(){n.textContent="".concat(e?e--:e++)}}ml.push(t),va()},y0=function(t){m0(function(){requestAnimationFrame(t)})},Hr=0,C0=function(){return!!Hr},D0=250,b0={attributes:!0,characterData:!0,childList:!0,subtree:!0},yl=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Cl=function(t){return t===void 0&&(t=0),Date.now()+t},ga=!1,E0=function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var n=this;if(e===void 0&&(e=D0),!ga){ga=!0;var r=Cl(e);y0(function(){var i=!1;try{i=v0()}finally{if(ga=!1,e=r-Cl(),!C0())return;i?n.run(1e3):e>0?n.run(e):n.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,n=function(){return e.observer&&e.observer.observe(document.body,b0)};document.body?n():nr.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),yl.forEach(function(n){return nr.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),yl.forEach(function(n){return nr.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t}(),ma=new E0,Dl=function(t){!Hr&&t>0&&ma.start(),Hr+=t,!Hr&&ma.stop()},w0=function(t){return!ha(t)&&!c0(t)&&getComputedStyle(t).display==="inline"},x0=function(){function t(e,n){this.target=e,this.observedBox=n||tr.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=hl(this.target,this.observedBox,!0);return w0(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),B0=function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t}(),Vr=new WeakMap,bl=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},qr=function(){function t(){}return t.connect=function(e,n){var r=new B0(e,n);Vr.set(e,r)},t.observe=function(e,n,r){var i=Vr.get(e),a=i.observationTargets.length===0;bl(i.observationTargets,n)<0&&(a&&yn.push(i),i.observationTargets.push(new x0(n,r&&r.box)),Dl(1),ma.schedule())},t.unobserve=function(e,n){var r=Vr.get(e),i=bl(r.observationTargets,n),a=r.observationTargets.length===1;i>=0&&(a&&yn.splice(yn.indexOf(r),1),r.observationTargets.splice(i,1),Dl(-1))},t.disconnect=function(e){var n=this,r=Vr.get(e);r.observationTargets.slice().forEach(function(i){return n.unobserve(e,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},t}(),S0=function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");qr.connect(this,e)}return t.prototype.observe=function(e,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!cl(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");qr.observe(this,e,n)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!cl(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");qr.unobserve(this,e)},t.prototype.disconnect=function(){qr.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();function A0(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function kn(t,e){if(t==null)return{};var n=A0(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function rr(t){"@babel/helpers - typeof";return rr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rr(t)}function L0(t,e){if(rr(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(rr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function O0(t){var e=L0(t,"string");return rr(e)==="symbol"?e:String(e)}function Pt(t,e,n){return e=O0(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ya=c.createContext(null),Qt=()=>{var t=c.useContext(ya);if(!t)throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return t},Ca,Da,El=parseInt(c.version.split(".")[0],10),wl=typeof navigator<"u"&&typeof window<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,xl=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),vt=typeof navigator<"u"&&/Android/.test(navigator.userAgent),Tn=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Dn=typeof navigator<"u"&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),P0=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),Bl=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),M0=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),F0=vt&&typeof navigator<"u"&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),k0=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),T0=typeof navigator<"u"&&/.*UCBrowser/.test(navigator.userAgent),R0=typeof navigator<"u"&&/.*Wechat/.test(navigator.userAgent)&&!/.*MacWechat/.test(navigator.userAgent),Gr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&((Ca=navigator.userAgent.match(/Version\/(\d+)/))!==null&&Ca!==void 0&&Ca[1]&&parseInt((Da=navigator.userAgent.match(/Version\/(\d+)/))===null||Da===void 0?void 0:Da[1],10)<17);var $t=(!M0||!F0)&&!P0&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",ba=new WeakMap,Ea=new WeakMap,Sl=new WeakMap,Yr=new WeakMap,wa=new WeakMap,ir=new WeakMap,bn=new WeakMap,Zr=new WeakMap,Kr=new WeakMap,xa=new WeakMap,en=new WeakMap,En=new WeakMap,ar=new WeakMap,Ba=new WeakMap,Sa=new WeakMap,Ft=new WeakMap,Vt=new WeakMap,bt=new WeakMap,tn=new WeakMap,nn=new WeakMap,Al=new WeakMap,Rn=Symbol("placeholder"),Ll=Symbol("mark-placeholder"),Ol=globalThis.Node,I0=globalThis.Text,Aa=t=>t&&t.ownerDocument&&t.ownerDocument.defaultView||null,j0=t=>rn(t)&&t.nodeType===8,Mt=t=>rn(t)&&t.nodeType===1,rn=t=>{var e=Aa(t);return!!e&&t instanceof e.Node},La=t=>{var e=t&&t.anchorNode&&Aa(t.anchorNode);return!!e&&t instanceof e.Selection},Pl=t=>rn(t)&&t.nodeType===3,N0=t=>t.clipboardData&&t.clipboardData.getData("text/plain")!==""&&t.clipboardData.types.length===1,_0=t=>{var[e,n]=t;if(Mt(e)&&e.childNodes.length){var r=n===e.childNodes.length,i=r?n-1:n;for([e,i]=Ml(e,i,r?"backward":"forward"),r=i<n;Mt(e)&&e.childNodes.length;){var a=r?e.childNodes.length-1:0;e=W0(e,a,r?"backward":"forward")}n=r&&e.textContent!=null?e.textContent.length:0}return[e,n]},z0=t=>{for(var e=t&&t.parentNode;e;){if(e.toString()==="[object ShadowRoot]")return!0;e=e.parentNode}return!1},Ml=(t,e,n)=>{for(var{childNodes:r}=t,i=r[e],a=e,o=!1,s=!1;(j0(i)||Mt(i)&&i.childNodes.length===0||Mt(i)&&i.getAttribute("contenteditable")==="false")&&!(o&&s);){if(a>=r.length){o=!0,a=e-1,n="backward";continue}if(a<0){s=!0,a=e+1,n="forward";continue}i=r[a],e=a,a+=n==="forward"?1:-1}return[i,e]},W0=(t,e,n)=>{var[r]=Ml(t,e,n);return r},Fl=t=>{var e="";if(Pl(t)&&t.nodeValue)return t.nodeValue;if(Mt(t)){for(var n of Array.from(t.childNodes))e+=Fl(n);var r=getComputedStyle(t).getPropertyValue("display");(r==="block"||r==="list"||t.tagName==="BR")&&(e+=`
82
- `)}return e},U0=/data-slate-fragment="(.+?)"/m,H0=t=>{var e=t.getData("text/html"),[,n]=e.match(U0)||[];return n},or=t=>t.getSelection!=null?t.getSelection():document.getSelection(),Oa=(t,e,n)=>{var{target:r}=e;if(Mt(r)&&r.matches('[contentEditable="false"]'))return!1;var{document:i}=Z.getWindow(t);if(i.contains(r))return Z.hasDOMNode(t,r,{editable:!0});var a=n.find(o=>{var{addedNodes:s,removedNodes:u}=o;for(var l of s)if(l===r||l.contains(r))return!0;for(var f of u)if(f===r||f.contains(r))return!0});return!a||a===e?!1:Oa(t,a,n)},V0=()=>{for(var t=document.activeElement;(e=t)!==null&&e!==void 0&&e.shadowRoot&&(n=t.shadowRoot)!==null&&n!==void 0&&n.activeElement;){var e,n,r;t=(r=t)===null||r===void 0||(r=r.shadowRoot)===null||r===void 0?void 0:r.activeElement}return t},kl=(t,e)=>!!(t.compareDocumentPosition(e)&Ol.DOCUMENT_POSITION_PRECEDING),q0=(t,e)=>!!(t.compareDocumentPosition(e)&Ol.DOCUMENT_POSITION_FOLLOWING),G0=0;class Y0{constructor(){Pt(this,"id",void 0),this.id="".concat(G0++)}}var Z={androidPendingDiffs:t=>bt.get(t),androidScheduleFlush:t=>{var e;(e=Sa.get(t))===null||e===void 0||e()},blur:t=>{var e=Z.toDOMNode(t,t),n=Z.findDocumentOrShadowRoot(t);en.set(t,!1),n.activeElement===e&&e.blur()},deselect:t=>{var{selection:e}=t,n=Z.findDocumentOrShadowRoot(t),r=or(n);r&&r.rangeCount>0&&r.removeAllRanges(),e&&ee.deselect(t)},findDocumentOrShadowRoot:t=>{var e=Z.toDOMNode(t,t),n=e.getRootNode();return n instanceof Document||n instanceof ShadowRoot?n:e.ownerDocument},findEventRange:(t,e)=>{"nativeEvent"in e&&(e=e.nativeEvent);var{clientX:n,clientY:r,target:i}=e;if(n==null||r==null)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(e));var a=Z.toSlateNode(t,e.target),o=Z.findPath(t,a);if(le.isElement(a)&&m.isVoid(t,a)){var s=i.getBoundingClientRect(),u=t.isInline(a)?n-s.left<s.left+s.width-n:r-s.top<s.top+s.height-r,l=m.point(t,o,{edge:u?"start":"end"}),f=u?m.before(t,l):m.after(t,l);if(f){var h=m.range(t,f);return h}}var p,{document:g}=Z.getWindow(t);if(g.caretRangeFromPoint)p=g.caretRangeFromPoint(n,r);else{var y=g.caretPositionFromPoint(n,r);y&&(p=g.createRange(),p.setStart(y.offsetNode,y.offset),p.setEnd(y.offsetNode,y.offset))}if(!p)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(e));var v=Z.toSlateRange(t,p,{exactMatch:!1,suppressThrow:!1});return v},findKey:(t,e)=>{var n=Zr.get(e);return n||(n=new Y0,Zr.set(e,n)),n},findPath:(t,e)=>{for(var n=[],r=e;;){var i=Ea.get(r);if(i==null){if(m.isEditor(r))return n;break}var a=ba.get(r);if(a==null)break;n.unshift(a),r=i}throw new Error("Unable to find the path for Slate node: ".concat(lt.stringify(e)))},focus:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{retries:5};if(!en.get(e)){if(n.retries<=0)throw new Error("Could not set focus, editor seems stuck with pending operations");if(e.operations.length>0){setTimeout(()=>{Z.focus(e,{retries:n.retries-1})},10);return}var r=Z.toDOMNode(e,e),i=Z.findDocumentOrShadowRoot(e);if(i.activeElement!==r){if(e.selection&&i instanceof Document){var a=or(i),o=Z.toDOMRange(e,e.selection);a==null||a.removeAllRanges(),a==null||a.addRange(o)}e.selection||ee.select(e,m.start(e,[])),en.set(e,!0),r.focus({preventScroll:!0})}}},getWindow:t=>{var e=Sl.get(t);if(!e)throw new Error("Unable to find a host window element for this editor");return e},hasDOMNode:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{editable:i=!1}=r,a=Z.toDOMNode(e,e),o;try{o=Mt(n)?n:n.parentElement}catch(s){if(s instanceof Error&&!s.message.includes('Permission denied to access property "nodeType"'))throw s}return o?o.closest("[data-slate-editor]")===a&&(!i||o.isContentEditable?!0:typeof o.isContentEditable=="boolean"&&o.closest('[contenteditable="false"]')===a||!!o.getAttribute("data-slate-zero-width")):!1},hasEditableTarget:(t,e)=>rn(e)&&Z.hasDOMNode(t,e,{editable:!0}),hasRange:(t,e)=>{var{anchor:n,focus:r}=e;return m.hasPath(t,n.path)&&m.hasPath(t,r.path)},hasSelectableTarget:(t,e)=>Z.hasEditableTarget(t,e)||Z.isTargetInsideNonReadonlyVoid(t,e),hasTarget:(t,e)=>rn(e)&&Z.hasDOMNode(t,e),insertData:(t,e)=>{t.insertData(e)},insertFragmentData:(t,e)=>t.insertFragmentData(e),insertTextData:(t,e)=>t.insertTextData(e),isComposing:t=>!!En.get(t),isFocused:t=>!!en.get(t),isReadOnly:t=>!!xa.get(t),isTargetInsideNonReadonlyVoid:(t,e)=>{if(xa.get(t))return!1;var n=Z.hasTarget(t,e)&&Z.toSlateNode(t,e);return le.isElement(n)&&m.isVoid(t,n)},setFragmentData:(t,e,n)=>t.setFragmentData(e,n),toDOMNode:(t,e)=>{var n=Kr.get(t),r=m.isEditor(e)?Yr.get(t):n==null?void 0:n.get(Z.findKey(t,e));if(!r)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(lt.stringify(e)));return r},toDOMPoint:(t,e)=>{var[n]=m.node(t,e.path),r=Z.toDOMNode(t,n),i;m.void(t,{at:e})&&(e={path:e.path,offset:0});for(var a="[data-slate-string], [data-slate-zero-width]",o=Array.from(r.querySelectorAll(a)),s=0,u=0;u<o.length;u++){var l=o[u],f=l.childNodes[0];if(!(f==null||f.textContent==null)){var{length:h}=f.textContent,p=l.getAttribute("data-slate-length"),g=p==null?h:parseInt(p,10),y=s+g,v=o[u+1];if(e.offset===y&&v!==null&&v!==void 0&&v.hasAttribute("data-slate-mark-placeholder")){var d,D=v.childNodes[0];i=[D instanceof I0?D:v,(d=v.textContent)!==null&&d!==void 0&&d.startsWith("\uFEFF")?1:0];break}if(e.offset<=y){var x=Math.min(h,Math.max(0,e.offset-s));i=[f,x];break}s=y}}if(!i)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(lt.stringify(e)));return i},toDOMRange:(t,e)=>{var{anchor:n,focus:r}=e,i=q.isBackward(e),a=Z.toDOMPoint(t,n),o=q.isCollapsed(e)?a:Z.toDOMPoint(t,r),s=Z.getWindow(t),u=s.document.createRange(),[l,f]=i?o:a,[h,p]=i?a:o,g=Mt(l)?l:l.parentElement,y=!!g.getAttribute("data-slate-zero-width"),v=Mt(h)?h:h.parentElement,d=!!v.getAttribute("data-slate-zero-width");return u.setStart(l,y?1:f),u.setEnd(h,d?1:p),u},toSlateNode:(t,e)=>{var n=Mt(e)?e:e.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?ir.get(n):null;if(!r)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(n));return r},toSlatePoint:(t,e,n)=>{var{exactMatch:r,suppressThrow:i,searchDirection:a="backward"}=n,[o,s]=r?e:_0(e),u=o.parentNode,l=null,f=0;if(u){var h,p,g=Z.toDOMNode(t,t),y=u.closest('[data-slate-void="true"]'),v=y&&g.contains(y)?y:null,d=u.closest('[contenteditable="false"]'),D=d&&g.contains(d)?d:null,x=u.closest("[data-slate-leaf]"),E=null;if(x){if(l=x.closest('[data-slate-node="text"]'),l){var O=Z.getWindow(t),b=O.document.createRange();b.setStart(l,0),b.setEnd(o,s);var w=b.cloneContents(),A=[...Array.prototype.slice.call(w.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(w.querySelectorAll("[contenteditable=false]"))];A.forEach(H=>{if(vt&&!r&&H.hasAttribute("data-slate-zero-width")&&H.textContent.length>0&&H.textContext!=="\uFEFF"){H.textContent.startsWith("\uFEFF")&&(H.textContent=H.textContent.slice(1));return}H.parentNode.removeChild(H)}),f=w.textContent.length,E=l}}else if(v){for(var M=v.querySelectorAll("[data-slate-leaf]"),V=0;V<M.length;V++){var P=M[V];if(Z.hasDOMNode(t,P)){x=P;break}}x?(l=x.closest('[data-slate-node="text"]'),E=x,f=E.textContent.length,E.querySelectorAll("[data-slate-zero-width]").forEach(H=>{f-=H.textContent.length})):f=1}else if(D){var _=H=>H?H.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],R=D.closest('[data-slate-node="element"]');if(a==="forward"){var N,T=[..._(R),..._(R==null?void 0:R.nextElementSibling)];x=(N=T.find(H=>q0(D,H)))!==null&&N!==void 0?N:null}else{var j,X=[..._(R==null?void 0:R.previousElementSibling),..._(R)];x=(j=X.findLast(H=>kl(D,H)))!==null&&j!==void 0?j:null}x&&(l=x.closest('[data-slate-node="text"]'),E=x,a==="forward"?f=0:(f=E.textContent.length,E.querySelectorAll("[data-slate-zero-width]").forEach(H=>{f-=H.textContent.length})))}E&&f===E.textContent.length&&vt&&E.getAttribute("data-slate-zero-width")==="z"&&(h=E.textContent)!==null&&h!==void 0&&h.startsWith("\uFEFF")&&(u.hasAttribute("data-slate-zero-width")||Tn&&(p=E.textContent)!==null&&p!==void 0&&p.endsWith(`
81
+ */function Vu(t){return Object.prototype.toString.call(t)==="[object Object]"}function Vg(t){var e,n;return Vu(t)===!1?!1:(e=t.constructor,e===void 0?!0:(n=e.prototype,!(Vu(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}var qg={isHistory(t){return Vg(t)&&Array.isArray(t.redos)&&Array.isArray(t.undos)&&(t.redos.length===0||Jt.isOperationList(t.redos[0].operations))&&(t.undos.length===0||Jt.isOperationList(t.undos[0].operations))}},ca=new WeakMap,$n=new WeakMap,mn={isHistoryEditor(t){return qg.isHistory(t.history)&&m.isEditor(t)},isMerging(t){return $n.get(t)},isSaving(t){return ca.get(t)},redo(t){t.redo()},undo(t){t.undo()},withMerging(t,e){var n=mn.isMerging(t);$n.set(t,!0),e(),$n.set(t,n)},withoutMerging(t,e){var n=mn.isMerging(t);$n.set(t,!1),e(),$n.set(t,n)},withoutSaving(t,e){var n=mn.isSaving(t);ca.set(t,!1),e(),ca.set(t,n)}},Gg=t=>{var e=t,{apply:n}=e;return e.history={undos:[],redos:[]},e.redo=()=>{var{history:r}=e,{redos:i}=r;if(i.length>0){var a=i[i.length-1];a.selectionBefore&&ee.setSelection(e,a.selectionBefore),mn.withoutSaving(e,()=>{m.withoutNormalizing(e,()=>{for(var o of a.operations)e.apply(o)})}),r.redos.pop(),e.writeHistory("undos",a)}},e.undo=()=>{var{history:r}=e,{undos:i}=r;if(i.length>0){var a=i[i.length-1];mn.withoutSaving(e,()=>{m.withoutNormalizing(e,()=>{var o=a.operations.map(Jt.inverse).reverse();for(var s of o)e.apply(s);a.selectionBefore&&ee.setSelection(e,a.selectionBefore)})}),e.writeHistory("redos",a),r.undos.pop()}},e.apply=r=>{var{operations:i,history:a}=e,{undos:o}=a,s=o[o.length-1],u=s&&s.operations[s.operations.length-1],l=mn.isSaving(e),f=mn.isMerging(e);if(l==null&&(l=Zg(r)),l){if(f==null&&(s==null?f=!1:i.length!==0?f=!0:f=Yg(r,u)),s&&f)s.operations.push(r);else{var h={operations:[r],selectionBefore:e.selection};e.writeHistory("undos",h)}for(;o.length>100;)o.shift();a.redos=[]}n(r)},e.writeHistory=(r,i)=>{e.history[r].push(i)},e},Yg=(t,e)=>!!(e&&t.type==="insert_text"&&e.type==="insert_text"&&t.offset===e.offset+e.text.length&&L.equals(t.path,e.path)||e&&t.type==="remove_text"&&e.type==="remove_text"&&t.offset+t.text.length===e.offset&&L.equals(t.path,e.path)),Zg=(t,e)=>t.type!=="set_selection",Kg=Qg,qu="֑-߿יִ-﷽ﹰ-ﻼ",Gu="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",Xg=new RegExp("^[^"+Gu+"]*["+qu+"]"),Jg=new RegExp("^[^"+qu+"]*["+Gu+"]");function Qg(t){return t=String(t||""),Xg.test(t)?"rtl":Jg.test(t)?"ltr":"neutral"}const Yu=Er(Kg);function $g(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var fa=$g,em=typeof qe=="object"&&qe&&qe.Object===Object&&qe,tm=em,nm=tm,rm=typeof self=="object"&&self&&self.Object===Object&&self,im=nm||rm||Function("return this")(),Zu=im,am=Zu,om=function(){return am.Date.now()},sm=om,um=/\s/;function lm(t){for(var e=t.length;e--&&um.test(t.charAt(e)););return e}var cm=lm,fm=cm,dm=/^\s+/;function pm(t){return t&&t.slice(0,fm(t)+1).replace(dm,"")}var hm=pm,vm=Zu,gm=vm.Symbol,Ku=gm,Xu=Ku,Ju=Object.prototype,mm=Ju.hasOwnProperty,ym=Ju.toString,er=Xu?Xu.toStringTag:void 0;function Cm(t){var e=mm.call(t,er),n=t[er];try{t[er]=void 0;var r=!0}catch{}var i=ym.call(t);return r&&(e?t[er]=n:delete t[er]),i}var Dm=Cm,bm=Object.prototype,Em=bm.toString;function wm(t){return Em.call(t)}var xm=wm,Qu=Ku,Bm=Dm,Sm=xm,Am="[object Null]",Lm="[object Undefined]",$u=Qu?Qu.toStringTag:void 0;function Om(t){return t==null?t===void 0?Lm:Am:$u&&$u in Object(t)?Bm(t):Sm(t)}var Pm=Om;function Mm(t){return t!=null&&typeof t=="object"}var Fm=Mm,km=Pm,Tm=Fm,Rm="[object Symbol]";function Im(t){return typeof t=="symbol"||Tm(t)&&km(t)==Rm}var jm=Im,Nm=hm,el=fa,_m=jm,tl=NaN,zm=/^[-+]0x[0-9a-f]+$/i,Wm=/^0b[01]+$/i,Um=/^0o[0-7]+$/i,Hm=parseInt;function Vm(t){if(typeof t=="number")return t;if(_m(t))return tl;if(el(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=el(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Nm(t);var n=Wm.test(t);return n||Um.test(t)?Hm(t.slice(2),n?2:8):zm.test(t)?tl:+t}var qm=Vm,Gm=fa,da=sm,nl=qm,Ym="Expected a function",Zm=Math.max,Km=Math.min;function Xm(t,e,n){var r,i,a,o,s,u,l=0,f=!1,h=!1,p=!0;if(typeof t!="function")throw new TypeError(Ym);e=nl(e)||0,Gm(n)&&(f=!!n.leading,h="maxWait"in n,a=h?Zm(nl(n.maxWait)||0,e):a,p="trailing"in n?!!n.trailing:p);function g(w){var A=r,M=i;return r=i=void 0,l=w,o=t.apply(M,A),o}function y(w){return l=w,s=setTimeout(D,e),f?g(w):o}function v(w){var A=w-u,M=w-l,V=e-A;return h?Km(V,a-M):V}function d(w){var A=w-u,M=w-l;return u===void 0||A>=e||A<0||h&&M>=a}function D(){var w=da();if(d(w))return x(w);s=setTimeout(D,v(w))}function x(w){return s=void 0,p&&r?g(w):(r=i=void 0,o)}function E(){s!==void 0&&clearTimeout(s),l=0,r=u=i=s=void 0}function O(){return s===void 0?o:x(da())}function b(){var w=da(),A=d(w);if(r=arguments,i=this,u=w,A){if(s===void 0)return y(u);if(h)return clearTimeout(s),s=setTimeout(D,e),g(u)}return s===void 0&&(s=setTimeout(D,e)),o}return b.cancel=E,b.flush=O,b}var rl=Xm;const Jm=Er(rl);var Qm=rl,$m=fa,e0="Expected a function";function t0(t,e,n){var r=!0,i=!0;if(typeof t!="function")throw new TypeError(e0);return $m(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Qm(t,e,{leading:r,maxWait:e,trailing:i})}var n0=t0;const r0=Er(n0),il=t=>typeof t=="object"&&t!=null&&t.nodeType===1,al=(t,e)=>(!e||t!=="hidden")&&t!=="visible"&&t!=="clip",pa=(t,e)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const n=getComputedStyle(t,null);return al(n.overflowY,e)||al(n.overflowX,e)||(r=>{const i=(a=>{if(!a.ownerDocument||!a.ownerDocument.defaultView)return null;try{return a.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!i&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)})(t)}return!1},Wr=(t,e,n,r,i,a,o,s)=>a<t&&o>e||a>t&&o<e?0:a<=t&&s<=n||o>=e&&s>=n?a-t-r:o>e&&s<n||a<t&&s>n?o-e+i:0,i0=t=>{const e=t.parentElement;return e??(t.getRootNode().host||null)},ol=(t,e)=>{var n,r,i,a;if(typeof document>"u")return[];const{scrollMode:o,block:s,inline:u,boundary:l,skipOverflowHiddenElements:f}=e,h=typeof l=="function"?l:X=>X!==l;if(!il(t))throw new TypeError("Invalid target");const p=document.scrollingElement||document.documentElement,g=[];let y=t;for(;il(y)&&h(y);){if(y=i0(y),y===p){g.push(y);break}y!=null&&y===document.body&&pa(y)&&!pa(document.documentElement)||y!=null&&pa(y,f)&&g.push(y)}const v=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,d=(a=(i=window.visualViewport)==null?void 0:i.height)!=null?a:innerHeight,{scrollX:D,scrollY:x}=window,{height:E,width:O,top:b,right:w,bottom:A,left:M}=t.getBoundingClientRect(),{top:V,right:P,bottom:_,left:R}=(X=>{const z=window.getComputedStyle(X);return{top:parseFloat(z.scrollMarginTop)||0,right:parseFloat(z.scrollMarginRight)||0,bottom:parseFloat(z.scrollMarginBottom)||0,left:parseFloat(z.scrollMarginLeft)||0}})(t);let N=s==="start"||s==="nearest"?b-V:s==="end"?A+_:b+E/2-V+_,T=u==="center"?M+O/2-R+P:u==="end"?w+P:M-R;const j=[];for(let X=0;X<g.length;X++){const z=g[X],{height:$,width:re,top:k,right:I,bottom:G,left:H}=z.getBoundingClientRect();if(o==="if-needed"&&b>=0&&M>=0&&A<=d&&w<=v&&b>=k&&A<=G&&M>=H&&w<=I)return j;const Q=getComputedStyle(z),K=parseInt(Q.borderLeftWidth,10),C=parseInt(Q.borderTopWidth,10),U=parseInt(Q.borderRightWidth,10),W=parseInt(Q.borderBottomWidth,10);let F=0,J=0;const ne="offsetWidth"in z?z.offsetWidth-z.clientWidth-K-U:0,Y="offsetHeight"in z?z.offsetHeight-z.clientHeight-C-W:0,ue="offsetWidth"in z?z.offsetWidth===0?0:re/z.offsetWidth:0,ae="offsetHeight"in z?z.offsetHeight===0?0:$/z.offsetHeight:0;if(p===z)F=s==="start"?N:s==="end"?N-d:s==="nearest"?Wr(x,x+d,d,C,W,x+N,x+N+E,E):N-d/2,J=u==="start"?T:u==="center"?T-v/2:u==="end"?T-v:Wr(D,D+v,v,K,U,D+T,D+T+O,O),F=Math.max(0,F+x),J=Math.max(0,J+D);else{F=s==="start"?N-k-C:s==="end"?N-G+W+Y:s==="nearest"?Wr(k,G,$,C,W+Y,N,N+E,E):N-(k+$/2)+Y/2,J=u==="start"?T-H-K:u==="center"?T-(H+re/2)+ne/2:u==="end"?T-I+U+ne:Wr(H,I,re,K,U+ne,T,T+O,O);const{scrollLeft:de,scrollTop:pe}=z;F=ae===0?0:Math.max(0,Math.min(pe+F/ae,z.scrollHeight-$/ae+Y)),J=ue===0?0:Math.max(0,Math.min(de+J/ue,z.scrollWidth-re/ue+ne)),N+=pe-F,T+=de-J}j.push({el:z,top:F,left:J})}return j},a0=t=>t===!1?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&Object.keys(e).length!==0)(t)?t:{block:"start",inline:"nearest"};function o0(t,e){if(!t.isConnected||!(i=>{let a=i;for(;a&&a.parentNode;){if(a.parentNode===document)return!0;a=a.parentNode instanceof ShadowRoot?a.parentNode.host:a.parentNode}return!1})(t))return;const n=(i=>{const a=window.getComputedStyle(i);return{top:parseFloat(a.scrollMarginTop)||0,right:parseFloat(a.scrollMarginRight)||0,bottom:parseFloat(a.scrollMarginBottom)||0,left:parseFloat(a.scrollMarginLeft)||0}})(t);if((i=>typeof i=="object"&&typeof i.behavior=="function")(e))return e.behavior(ol(t,e));const r=typeof e=="boolean"||e==null?void 0:e.behavior;for(const{el:i,top:a,left:o}of ol(t,a0(e))){const s=a-n.top+n.bottom,u=o-n.left+n.right;i.scroll({top:s,left:u,behavior:r})}}var yn=[],s0=function(){return yn.some(function(t){return t.activeTargets.length>0})},u0=function(){return yn.some(function(t){return t.skippedTargets.length>0})},sl="ResizeObserver loop completed with undelivered notifications.",l0=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:sl}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=sl),window.dispatchEvent(t)},tr;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(tr||(tr={}));var Cn=function(t){return Object.freeze(t)},c0=function(){function t(e,n){this.inlineSize=e,this.blockSize=n,Cn(this)}return t}(),ul=function(){function t(e,n,r,i){return this.x=e,this.y=n,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Cn(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,r=e.y,i=e.top,a=e.right,o=e.bottom,s=e.left,u=e.width,l=e.height;return{x:n,y:r,top:i,right:a,bottom:o,left:s,width:u,height:l}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),ha=function(t){return t instanceof SVGElement&&"getBBox"in t},ll=function(t){if(ha(t)){var e=t.getBBox(),n=e.width,r=e.height;return!n&&!r}var i=t,a=i.offsetWidth,o=i.offsetHeight;return!(a||o||t.getClientRects().length)},cl=function(t){var e;if(t instanceof Element)return!0;var n=(e=t==null?void 0:t.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(n&&t instanceof n.Element)},f0=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},nr=typeof window<"u"?window:{},Ur=new WeakMap,fl=/auto|scroll/,d0=/^tb|vertical/,p0=/msie|trident/i.test(nr.navigator&&nr.navigator.userAgent),It=function(t){return parseFloat(t||"0")},Fn=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new c0((n?e:t)||0,(n?t:e)||0)},dl=Cn({devicePixelContentBoxSize:Fn(),borderBoxSize:Fn(),contentBoxSize:Fn(),contentRect:new ul(0,0,0,0)}),pl=function(t,e){if(e===void 0&&(e=!1),Ur.has(t)&&!e)return Ur.get(t);if(ll(t))return Ur.set(t,dl),dl;var n=getComputedStyle(t),r=ha(t)&&t.ownerSVGElement&&t.getBBox(),i=!p0&&n.boxSizing==="border-box",a=d0.test(n.writingMode||""),o=!r&&fl.test(n.overflowY||""),s=!r&&fl.test(n.overflowX||""),u=r?0:It(n.paddingTop),l=r?0:It(n.paddingRight),f=r?0:It(n.paddingBottom),h=r?0:It(n.paddingLeft),p=r?0:It(n.borderTopWidth),g=r?0:It(n.borderRightWidth),y=r?0:It(n.borderBottomWidth),v=r?0:It(n.borderLeftWidth),d=h+l,D=u+f,x=v+g,E=p+y,O=s?t.offsetHeight-E-t.clientHeight:0,b=o?t.offsetWidth-x-t.clientWidth:0,w=i?d+x:0,A=i?D+E:0,M=r?r.width:It(n.width)-w-b,V=r?r.height:It(n.height)-A-O,P=M+d+b+x,_=V+D+O+E,R=Cn({devicePixelContentBoxSize:Fn(Math.round(M*devicePixelRatio),Math.round(V*devicePixelRatio),a),borderBoxSize:Fn(P,_,a),contentBoxSize:Fn(M,V,a),contentRect:new ul(h,u,M,V)});return Ur.set(t,R),R},hl=function(t,e,n){var r=pl(t,n),i=r.borderBoxSize,a=r.contentBoxSize,o=r.devicePixelContentBoxSize;switch(e){case tr.DEVICE_PIXEL_CONTENT_BOX:return o;case tr.BORDER_BOX:return i;default:return a}},h0=function(){function t(e){var n=pl(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=Cn([n.borderBoxSize]),this.contentBoxSize=Cn([n.contentBoxSize]),this.devicePixelContentBoxSize=Cn([n.devicePixelContentBoxSize])}return t}(),vl=function(t){if(ll(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},v0=function(){var t=1/0,e=[];yn.forEach(function(o){if(o.activeTargets.length!==0){var s=[];o.activeTargets.forEach(function(l){var f=new h0(l.target),h=vl(l.target);s.push(f),l.lastReportedSize=hl(l.target,l.observedBox),h<t&&(t=h)}),e.push(function(){o.callback.call(o.observer,s,o.observer)}),o.activeTargets.splice(0,o.activeTargets.length)}});for(var n=0,r=e;n<r.length;n++){var i=r[n];i()}return t},gl=function(t){yn.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(vl(i.target)>t?n.activeTargets.push(i):n.skippedTargets.push(i))})})},g0=function(){var t=0;for(gl(t);s0();)t=v0(),gl(t);return u0()&&l0(),t>0},va,ml=[],m0=function(){return ml.splice(0).forEach(function(t){return t()})},y0=function(t){if(!va){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return m0()}).observe(n,r),va=function(){n.textContent="".concat(e?e--:e++)}}ml.push(t),va()},C0=function(t){y0(function(){requestAnimationFrame(t)})},Hr=0,D0=function(){return!!Hr},b0=250,E0={attributes:!0,characterData:!0,childList:!0,subtree:!0},yl=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Cl=function(t){return t===void 0&&(t=0),Date.now()+t},ga=!1,w0=function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var n=this;if(e===void 0&&(e=b0),!ga){ga=!0;var r=Cl(e);C0(function(){var i=!1;try{i=g0()}finally{if(ga=!1,e=r-Cl(),!D0())return;i?n.run(1e3):e>0?n.run(e):n.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,n=function(){return e.observer&&e.observer.observe(document.body,E0)};document.body?n():nr.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),yl.forEach(function(n){return nr.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),yl.forEach(function(n){return nr.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t}(),ma=new w0,Dl=function(t){!Hr&&t>0&&ma.start(),Hr+=t,!Hr&&ma.stop()},x0=function(t){return!ha(t)&&!f0(t)&&getComputedStyle(t).display==="inline"},B0=function(){function t(e,n){this.target=e,this.observedBox=n||tr.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=hl(this.target,this.observedBox,!0);return x0(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),S0=function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t}(),Vr=new WeakMap,bl=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},qr=function(){function t(){}return t.connect=function(e,n){var r=new S0(e,n);Vr.set(e,r)},t.observe=function(e,n,r){var i=Vr.get(e),a=i.observationTargets.length===0;bl(i.observationTargets,n)<0&&(a&&yn.push(i),i.observationTargets.push(new B0(n,r&&r.box)),Dl(1),ma.schedule())},t.unobserve=function(e,n){var r=Vr.get(e),i=bl(r.observationTargets,n),a=r.observationTargets.length===1;i>=0&&(a&&yn.splice(yn.indexOf(r),1),r.observationTargets.splice(i,1),Dl(-1))},t.disconnect=function(e){var n=this,r=Vr.get(e);r.observationTargets.slice().forEach(function(i){return n.unobserve(e,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},t}(),A0=function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");qr.connect(this,e)}return t.prototype.observe=function(e,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!cl(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");qr.observe(this,e,n)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!cl(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");qr.unobserve(this,e)},t.prototype.disconnect=function(){qr.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();function L0(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function kn(t,e){if(t==null)return{};var n=L0(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function rr(t){"@babel/helpers - typeof";return rr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rr(t)}function O0(t,e){if(rr(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(rr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function P0(t){var e=O0(t,"string");return rr(e)==="symbol"?e:String(e)}function Pt(t,e,n){return e=P0(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ya=c.createContext(null),Qt=()=>{var t=c.useContext(ya);if(!t)throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return t},Ca,Da,El=parseInt(c.version.split(".")[0],10),wl=typeof navigator<"u"&&typeof window<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,xl=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),vt=typeof navigator<"u"&&/Android/.test(navigator.userAgent),Tn=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Dn=typeof navigator<"u"&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),M0=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),Bl=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),F0=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),k0=vt&&typeof navigator<"u"&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),T0=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),R0=typeof navigator<"u"&&/.*UCBrowser/.test(navigator.userAgent),I0=typeof navigator<"u"&&/.*Wechat/.test(navigator.userAgent)&&!/.*MacWechat/.test(navigator.userAgent),Gr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&((Ca=navigator.userAgent.match(/Version\/(\d+)/))!==null&&Ca!==void 0&&Ca[1]&&parseInt((Da=navigator.userAgent.match(/Version\/(\d+)/))===null||Da===void 0?void 0:Da[1],10)<17);var $t=(!F0||!k0)&&!M0&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",ba=new WeakMap,Ea=new WeakMap,Sl=new WeakMap,Yr=new WeakMap,wa=new WeakMap,ir=new WeakMap,bn=new WeakMap,Zr=new WeakMap,Kr=new WeakMap,xa=new WeakMap,en=new WeakMap,En=new WeakMap,ar=new WeakMap,Ba=new WeakMap,Sa=new WeakMap,Ft=new WeakMap,Vt=new WeakMap,bt=new WeakMap,tn=new WeakMap,nn=new WeakMap,Al=new WeakMap,Rn=Symbol("placeholder"),Ll=Symbol("mark-placeholder"),Ol=globalThis.Node,j0=globalThis.Text,Aa=t=>t&&t.ownerDocument&&t.ownerDocument.defaultView||null,N0=t=>rn(t)&&t.nodeType===8,Mt=t=>rn(t)&&t.nodeType===1,rn=t=>{var e=Aa(t);return!!e&&t instanceof e.Node},La=t=>{var e=t&&t.anchorNode&&Aa(t.anchorNode);return!!e&&t instanceof e.Selection},Pl=t=>rn(t)&&t.nodeType===3,_0=t=>t.clipboardData&&t.clipboardData.getData("text/plain")!==""&&t.clipboardData.types.length===1,z0=t=>{var[e,n]=t;if(Mt(e)&&e.childNodes.length){var r=n===e.childNodes.length,i=r?n-1:n;for([e,i]=Ml(e,i,r?"backward":"forward"),r=i<n;Mt(e)&&e.childNodes.length;){var a=r?e.childNodes.length-1:0;e=U0(e,a,r?"backward":"forward")}n=r&&e.textContent!=null?e.textContent.length:0}return[e,n]},W0=t=>{for(var e=t&&t.parentNode;e;){if(e.toString()==="[object ShadowRoot]")return!0;e=e.parentNode}return!1},Ml=(t,e,n)=>{for(var{childNodes:r}=t,i=r[e],a=e,o=!1,s=!1;(N0(i)||Mt(i)&&i.childNodes.length===0||Mt(i)&&i.getAttribute("contenteditable")==="false")&&!(o&&s);){if(a>=r.length){o=!0,a=e-1,n="backward";continue}if(a<0){s=!0,a=e+1,n="forward";continue}i=r[a],e=a,a+=n==="forward"?1:-1}return[i,e]},U0=(t,e,n)=>{var[r]=Ml(t,e,n);return r},Fl=t=>{var e="";if(Pl(t)&&t.nodeValue)return t.nodeValue;if(Mt(t)){for(var n of Array.from(t.childNodes))e+=Fl(n);var r=getComputedStyle(t).getPropertyValue("display");(r==="block"||r==="list"||t.tagName==="BR")&&(e+=`
82
+ `)}return e},H0=/data-slate-fragment="(.+?)"/m,V0=t=>{var e=t.getData("text/html"),[,n]=e.match(H0)||[];return n},or=t=>t.getSelection!=null?t.getSelection():document.getSelection(),Oa=(t,e,n)=>{var{target:r}=e;if(Mt(r)&&r.matches('[contentEditable="false"]'))return!1;var{document:i}=Z.getWindow(t);if(i.contains(r))return Z.hasDOMNode(t,r,{editable:!0});var a=n.find(o=>{var{addedNodes:s,removedNodes:u}=o;for(var l of s)if(l===r||l.contains(r))return!0;for(var f of u)if(f===r||f.contains(r))return!0});return!a||a===e?!1:Oa(t,a,n)},q0=()=>{for(var t=document.activeElement;(e=t)!==null&&e!==void 0&&e.shadowRoot&&(n=t.shadowRoot)!==null&&n!==void 0&&n.activeElement;){var e,n,r;t=(r=t)===null||r===void 0||(r=r.shadowRoot)===null||r===void 0?void 0:r.activeElement}return t},kl=(t,e)=>!!(t.compareDocumentPosition(e)&Ol.DOCUMENT_POSITION_PRECEDING),G0=(t,e)=>!!(t.compareDocumentPosition(e)&Ol.DOCUMENT_POSITION_FOLLOWING),Y0=0;class Z0{constructor(){Pt(this,"id",void 0),this.id="".concat(Y0++)}}var Z={androidPendingDiffs:t=>bt.get(t),androidScheduleFlush:t=>{var e;(e=Sa.get(t))===null||e===void 0||e()},blur:t=>{var e=Z.toDOMNode(t,t),n=Z.findDocumentOrShadowRoot(t);en.set(t,!1),n.activeElement===e&&e.blur()},deselect:t=>{var{selection:e}=t,n=Z.findDocumentOrShadowRoot(t),r=or(n);r&&r.rangeCount>0&&r.removeAllRanges(),e&&ee.deselect(t)},findDocumentOrShadowRoot:t=>{var e=Z.toDOMNode(t,t),n=e.getRootNode();return n instanceof Document||n instanceof ShadowRoot?n:e.ownerDocument},findEventRange:(t,e)=>{"nativeEvent"in e&&(e=e.nativeEvent);var{clientX:n,clientY:r,target:i}=e;if(n==null||r==null)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(e));var a=Z.toSlateNode(t,e.target),o=Z.findPath(t,a);if(le.isElement(a)&&m.isVoid(t,a)){var s=i.getBoundingClientRect(),u=t.isInline(a)?n-s.left<s.left+s.width-n:r-s.top<s.top+s.height-r,l=m.point(t,o,{edge:u?"start":"end"}),f=u?m.before(t,l):m.after(t,l);if(f){var h=m.range(t,f);return h}}var p,{document:g}=Z.getWindow(t);if(g.caretRangeFromPoint)p=g.caretRangeFromPoint(n,r);else{var y=g.caretPositionFromPoint(n,r);y&&(p=g.createRange(),p.setStart(y.offsetNode,y.offset),p.setEnd(y.offsetNode,y.offset))}if(!p)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(e));var v=Z.toSlateRange(t,p,{exactMatch:!1,suppressThrow:!1});return v},findKey:(t,e)=>{var n=Zr.get(e);return n||(n=new Z0,Zr.set(e,n)),n},findPath:(t,e)=>{for(var n=[],r=e;;){var i=Ea.get(r);if(i==null){if(m.isEditor(r))return n;break}var a=ba.get(r);if(a==null)break;n.unshift(a),r=i}throw new Error("Unable to find the path for Slate node: ".concat(lt.stringify(e)))},focus:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{retries:5};if(!en.get(e)){if(n.retries<=0)throw new Error("Could not set focus, editor seems stuck with pending operations");if(e.operations.length>0){setTimeout(()=>{Z.focus(e,{retries:n.retries-1})},10);return}var r=Z.toDOMNode(e,e),i=Z.findDocumentOrShadowRoot(e);if(i.activeElement!==r){if(e.selection&&i instanceof Document){var a=or(i),o=Z.toDOMRange(e,e.selection);a==null||a.removeAllRanges(),a==null||a.addRange(o)}e.selection||ee.select(e,m.start(e,[])),en.set(e,!0),r.focus({preventScroll:!0})}}},getWindow:t=>{var e=Sl.get(t);if(!e)throw new Error("Unable to find a host window element for this editor");return e},hasDOMNode:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{editable:i=!1}=r,a=Z.toDOMNode(e,e),o;try{o=Mt(n)?n:n.parentElement}catch(s){if(s instanceof Error&&!s.message.includes('Permission denied to access property "nodeType"'))throw s}return o?o.closest("[data-slate-editor]")===a&&(!i||o.isContentEditable?!0:typeof o.isContentEditable=="boolean"&&o.closest('[contenteditable="false"]')===a||!!o.getAttribute("data-slate-zero-width")):!1},hasEditableTarget:(t,e)=>rn(e)&&Z.hasDOMNode(t,e,{editable:!0}),hasRange:(t,e)=>{var{anchor:n,focus:r}=e;return m.hasPath(t,n.path)&&m.hasPath(t,r.path)},hasSelectableTarget:(t,e)=>Z.hasEditableTarget(t,e)||Z.isTargetInsideNonReadonlyVoid(t,e),hasTarget:(t,e)=>rn(e)&&Z.hasDOMNode(t,e),insertData:(t,e)=>{t.insertData(e)},insertFragmentData:(t,e)=>t.insertFragmentData(e),insertTextData:(t,e)=>t.insertTextData(e),isComposing:t=>!!En.get(t),isFocused:t=>!!en.get(t),isReadOnly:t=>!!xa.get(t),isTargetInsideNonReadonlyVoid:(t,e)=>{if(xa.get(t))return!1;var n=Z.hasTarget(t,e)&&Z.toSlateNode(t,e);return le.isElement(n)&&m.isVoid(t,n)},setFragmentData:(t,e,n)=>t.setFragmentData(e,n),toDOMNode:(t,e)=>{var n=Kr.get(t),r=m.isEditor(e)?Yr.get(t):n==null?void 0:n.get(Z.findKey(t,e));if(!r)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(lt.stringify(e)));return r},toDOMPoint:(t,e)=>{var[n]=m.node(t,e.path),r=Z.toDOMNode(t,n),i;m.void(t,{at:e})&&(e={path:e.path,offset:0});for(var a="[data-slate-string], [data-slate-zero-width]",o=Array.from(r.querySelectorAll(a)),s=0,u=0;u<o.length;u++){var l=o[u],f=l.childNodes[0];if(!(f==null||f.textContent==null)){var{length:h}=f.textContent,p=l.getAttribute("data-slate-length"),g=p==null?h:parseInt(p,10),y=s+g,v=o[u+1];if(e.offset===y&&v!==null&&v!==void 0&&v.hasAttribute("data-slate-mark-placeholder")){var d,D=v.childNodes[0];i=[D instanceof j0?D:v,(d=v.textContent)!==null&&d!==void 0&&d.startsWith("\uFEFF")?1:0];break}if(e.offset<=y){var x=Math.min(h,Math.max(0,e.offset-s));i=[f,x];break}s=y}}if(!i)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(lt.stringify(e)));return i},toDOMRange:(t,e)=>{var{anchor:n,focus:r}=e,i=q.isBackward(e),a=Z.toDOMPoint(t,n),o=q.isCollapsed(e)?a:Z.toDOMPoint(t,r),s=Z.getWindow(t),u=s.document.createRange(),[l,f]=i?o:a,[h,p]=i?a:o,g=Mt(l)?l:l.parentElement,y=!!g.getAttribute("data-slate-zero-width"),v=Mt(h)?h:h.parentElement,d=!!v.getAttribute("data-slate-zero-width");return u.setStart(l,y?1:f),u.setEnd(h,d?1:p),u},toSlateNode:(t,e)=>{var n=Mt(e)?e:e.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?ir.get(n):null;if(!r)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(n));return r},toSlatePoint:(t,e,n)=>{var{exactMatch:r,suppressThrow:i,searchDirection:a="backward"}=n,[o,s]=r?e:z0(e),u=o.parentNode,l=null,f=0;if(u){var h,p,g=Z.toDOMNode(t,t),y=u.closest('[data-slate-void="true"]'),v=y&&g.contains(y)?y:null,d=u.closest('[contenteditable="false"]'),D=d&&g.contains(d)?d:null,x=u.closest("[data-slate-leaf]"),E=null;if(x){if(l=x.closest('[data-slate-node="text"]'),l){var O=Z.getWindow(t),b=O.document.createRange();b.setStart(l,0),b.setEnd(o,s);var w=b.cloneContents(),A=[...Array.prototype.slice.call(w.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(w.querySelectorAll("[contenteditable=false]"))];A.forEach(H=>{if(vt&&!r&&H.hasAttribute("data-slate-zero-width")&&H.textContent.length>0&&H.textContext!=="\uFEFF"){H.textContent.startsWith("\uFEFF")&&(H.textContent=H.textContent.slice(1));return}H.parentNode.removeChild(H)}),f=w.textContent.length,E=l}}else if(v){for(var M=v.querySelectorAll("[data-slate-leaf]"),V=0;V<M.length;V++){var P=M[V];if(Z.hasDOMNode(t,P)){x=P;break}}x?(l=x.closest('[data-slate-node="text"]'),E=x,f=E.textContent.length,E.querySelectorAll("[data-slate-zero-width]").forEach(H=>{f-=H.textContent.length})):f=1}else if(D){var _=H=>H?H.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],R=D.closest('[data-slate-node="element"]');if(a==="forward"){var N,T=[..._(R),..._(R==null?void 0:R.nextElementSibling)];x=(N=T.find(H=>G0(D,H)))!==null&&N!==void 0?N:null}else{var j,X=[..._(R==null?void 0:R.previousElementSibling),..._(R)];x=(j=X.findLast(H=>kl(D,H)))!==null&&j!==void 0?j:null}x&&(l=x.closest('[data-slate-node="text"]'),E=x,a==="forward"?f=0:(f=E.textContent.length,E.querySelectorAll("[data-slate-zero-width]").forEach(H=>{f-=H.textContent.length})))}E&&f===E.textContent.length&&vt&&E.getAttribute("data-slate-zero-width")==="z"&&(h=E.textContent)!==null&&h!==void 0&&h.startsWith("\uFEFF")&&(u.hasAttribute("data-slate-zero-width")||Tn&&(p=E.textContent)!==null&&p!==void 0&&p.endsWith(`
83
83
 
84
- `))&&f--}if(vt&&!l&&!r){var z=u.hasAttribute("data-slate-node")?u:u.closest("[data-slate-node]");if(z&&Z.hasDOMNode(t,z,{editable:!0})){var $=Z.toSlateNode(t,z),{path:re,offset:k}=m.start(t,Z.findPath(t,$));return z.querySelector("[data-slate-leaf]")||(k=s),{path:re,offset:k}}}if(!l){if(i)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(e))}var I=Z.toSlateNode(t,l),G=Z.findPath(t,I);return{path:G,offset:f}},toSlateRange:(t,e,n)=>{var r,{exactMatch:i,suppressThrow:a}=n,o=La(e)?e.anchorNode:e.startContainer,s,u,l,f,h;if(o)if(La(e)){if(Tn&&e.rangeCount>1){l=e.focusNode;var p=e.getRangeAt(0),g=e.getRangeAt(e.rangeCount-1);if(l instanceof HTMLTableRowElement&&p.startContainer instanceof HTMLTableRowElement&&g.startContainer instanceof HTMLTableRowElement){let w=function(A){return A.childElementCount>0?w(A.children[0]):A};var y=p.startContainer,v=g.startContainer,d=w(y.children[p.startOffset]),D=w(v.children[g.startOffset]);f=0,D.childNodes.length>0?s=D.childNodes[0]:s=D,d.childNodes.length>0?l=d.childNodes[0]:l=d,D instanceof HTMLElement?u=D.innerHTML.length:u=0}else p.startContainer===l?(s=g.endContainer,u=g.endOffset,f=p.startOffset):(s=p.startContainer,u=p.endOffset,f=g.startOffset)}else s=e.anchorNode,u=e.anchorOffset,l=e.focusNode,f=e.focusOffset;Bl&&z0(s)||Tn?h=e.anchorNode===e.focusNode&&e.anchorOffset===e.focusOffset:h=e.isCollapsed}else s=e.startContainer,u=e.startOffset,l=e.endContainer,f=e.endOffset,h=e.collapsed;if(s==null||l==null||u==null||f==null)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(e));Tn&&(r=l.textContent)!==null&&r!==void 0&&r.endsWith(`
84
+ `))&&f--}if(vt&&!l&&!r){var z=u.hasAttribute("data-slate-node")?u:u.closest("[data-slate-node]");if(z&&Z.hasDOMNode(t,z,{editable:!0})){var $=Z.toSlateNode(t,z),{path:re,offset:k}=m.start(t,Z.findPath(t,$));return z.querySelector("[data-slate-leaf]")||(k=s),{path:re,offset:k}}}if(!l){if(i)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(e))}var I=Z.toSlateNode(t,l),G=Z.findPath(t,I);return{path:G,offset:f}},toSlateRange:(t,e,n)=>{var r,{exactMatch:i,suppressThrow:a}=n,o=La(e)?e.anchorNode:e.startContainer,s,u,l,f,h;if(o)if(La(e)){if(Tn&&e.rangeCount>1){l=e.focusNode;var p=e.getRangeAt(0),g=e.getRangeAt(e.rangeCount-1);if(l instanceof HTMLTableRowElement&&p.startContainer instanceof HTMLTableRowElement&&g.startContainer instanceof HTMLTableRowElement){let w=function(A){return A.childElementCount>0?w(A.children[0]):A};var y=p.startContainer,v=g.startContainer,d=w(y.children[p.startOffset]),D=w(v.children[g.startOffset]);f=0,D.childNodes.length>0?s=D.childNodes[0]:s=D,d.childNodes.length>0?l=d.childNodes[0]:l=d,D instanceof HTMLElement?u=D.innerHTML.length:u=0}else p.startContainer===l?(s=g.endContainer,u=g.endOffset,f=p.startOffset):(s=p.startContainer,u=p.endOffset,f=g.startOffset)}else s=e.anchorNode,u=e.anchorOffset,l=e.focusNode,f=e.focusOffset;Bl&&W0(s)||Tn?h=e.anchorNode===e.focusNode&&e.anchorOffset===e.focusOffset:h=e.isCollapsed}else s=e.startContainer,u=e.startOffset,l=e.endContainer,f=e.endOffset,h=e.collapsed;if(s==null||l==null||u==null||f==null)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(e));Tn&&(r=l.textContent)!==null&&r!==void 0&&r.endsWith(`
85
85
 
86
- `)&&f===l.textContent.length&&f--;var x=Z.toSlatePoint(t,[s,u],{exactMatch:i,suppressThrow:a});if(!x)return null;var E=kl(s,l)||s===l&&f<u,O=h?x:Z.toSlatePoint(t,[l,f],{exactMatch:i,suppressThrow:a,searchDirection:E?"forward":"backward"});if(!O)return null;var b={anchor:x,focus:O};return q.isExpanded(b)&&q.isForward(b)&&Mt(l)&&m.void(t,{at:b.focus,mode:"highest"})&&(b=m.unhangRange(t,b,{voids:!0})),b}};function Z0(t,e){var{path:n,diff:r}=e;if(!m.hasPath(t,n))return!1;var i=ie.get(t,n);if(!ce.isText(i))return!1;if(r.start!==i.text.length||r.text.length===0)return i.text.slice(r.start,r.start+r.text.length)===r.text;var a=L.next(n);if(!m.hasPath(t,a))return!1;var o=ie.get(t,a);return ce.isText(o)&&o.text.startsWith(r.text)}function Tl(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return n.reduce((i,a)=>i.slice(0,a.start)+a.text+i.slice(a.end),t)}function K0(t,e){for(var n=Math.min(t.length,e.length),r=0;r<n;r++)if(t.charAt(r)!==e.charAt(r))return r;return n}function X0(t,e,n){for(var r=Math.min(t.length,e.length,n),i=0;i<r;i++)if(t.charAt(t.length-i-1)!==e.charAt(e.length-i-1))return i;return r}function Rl(t,e){var{start:n,end:r,text:i}=e,a=t.slice(n,r),o=K0(a,i),s=Math.min(a.length-o,i.length-o),u=X0(a,i,s),l={start:n+o,end:r-u,text:i.slice(o,i.length-u)};return l.start===l.end&&l.text.length===0?null:l}function J0(t,e,n){var r=Math.min(e.start,n.start),i=Math.max(0,Math.min(e.start+e.text.length,n.end)-n.start),a=Tl(t,e,n),o=Math.max(n.start+n.text.length,e.start+e.text.length+(e.start+e.text.length>n.start?n.text.length:0)-i),s=a.slice(r,o),u=Math.max(e.end,n.end-e.text.length+(e.end-e.start));return Rl(t,{start:r,end:u,text:s})}function Q0(t){var{path:e,diff:n}=t;return{anchor:{path:e,offset:n.start},focus:{path:e,offset:n.end}}}function Pa(t,e){var{path:n,offset:r}=e;if(!m.hasPath(t,n))return null;var i=ie.get(t,n);if(!ce.isText(i))return null;var a=m.above(t,{match:s=>le.isElement(s)&&m.isBlock(t,s),at:n});if(!a)return null;for(;r>i.text.length;){var o=m.next(t,{at:n,match:ce.isText});if(!o||!L.isDescendant(o[1],a[1]))return null;r-=i.text.length,i=o[0],n=o[1]}return{path:n,offset:r}}function Il(t,e){var n=Pa(t,e.anchor);if(!n)return null;if(q.isCollapsed(e))return{anchor:n,focus:n};var r=Pa(t,e.focus);return r?{anchor:n,focus:r}:null}function Ma(t,e,n){var r=bt.get(t),i=r==null?void 0:r.find(f=>{var{path:h}=f;return L.equals(h,e.path)});if(!i||e.offset<=i.diff.start)return Le.transform(e,n,{affinity:"backward"});var{diff:a}=i;if(e.offset<=a.start+a.text.length){var o={path:e.path,offset:a.start},s=Le.transform(o,n,{affinity:"backward"});return s?{path:s.path,offset:s.offset+e.offset-a.start}:null}var u={path:e.path,offset:e.offset-a.text.length+a.end-a.start},l=Le.transform(u,n,{affinity:"backward"});return l?n.type==="split_node"&&L.equals(n.path,e.path)&&u.offset<n.position&&a.start<n.position?l:{path:l.path,offset:l.offset+a.text.length-a.end+a.start}:null}function jl(t,e,n){var r=Ma(t,e.anchor,n);if(!r)return null;if(q.isCollapsed(e))return{anchor:r,focus:r};var i=Ma(t,e.focus,n);return i?{anchor:r,focus:i}:null}function $0(t,e){var{path:n,diff:r,id:i}=t;switch(e.type){case"insert_text":return!L.equals(e.path,n)||e.offset>=r.end?t:e.offset<=r.start?{diff:{start:e.text.length+r.start,end:e.text.length+r.end,text:r.text},id:i,path:n}:{diff:{start:r.start,end:r.end+e.text.length,text:r.text},id:i,path:n};case"remove_text":return!L.equals(e.path,n)||e.offset>=r.end?t:e.offset+e.text.length<=r.start?{diff:{start:r.start-e.text.length,end:r.end-e.text.length,text:r.text},id:i,path:n}:{diff:{start:r.start,end:r.end-e.text.length,text:r.text},id:i,path:n};case"split_node":return!L.equals(e.path,n)||e.position>=r.end?{diff:r,id:i,path:L.transform(n,e,{affinity:"backward"})}:e.position>r.start?{diff:{start:r.start,end:Math.min(e.position,r.end),text:r.text},id:i,path:n}:{diff:{start:r.start-e.position,end:r.end-e.position,text:r.text},id:i,path:L.transform(n,e,{affinity:"forward"})};case"merge_node":return L.equals(e.path,n)?{diff:{start:r.start+e.position,end:r.end+e.position,text:r.text},id:i,path:L.transform(n,e)}:{diff:r,id:i,path:L.transform(n,e)}}var a=L.transform(n,e);return a?{diff:r,path:a,id:i}:null}function Nl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Xr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Nl(Object(n),!0).forEach(function(r){Pt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Nl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var ey=25,ty=200,ny=function(){},ry=t=>(t==null?void 0:t.constructor.name)==="DataTransfer";function iy(t){var{editor:e,scheduleOnDOMSelectionChange:n,onDOMSelectionChange:r}=t,i=!1,a=null,o=null,s=null,u=0,l=!1,f=()=>{var R=nn.get(e);if(nn.delete(e),R){var{selection:N}=e,T=Il(e,R);T&&(!N||!q.equals(T,N))&&ee.select(e,T)}},h=()=>{var R=tn.get(e);if(tn.delete(e),!!R){if(R.at){var N=Le.isPoint(R.at)?Pa(e,R.at):Il(e,R.at);if(!N)return;var T=m.range(e,N);(!e.selection||!q.equals(e.selection,T))&&ee.select(e,N)}R.run()}},p=()=>{if(o&&(clearTimeout(o),o=null),s&&(clearTimeout(s),s=null),!O()&&!E()){f();return}i||(i=!0,setTimeout(()=>i=!1)),E()&&(i="action");var R=e.selection&&m.rangeRef(e,e.selection,{affinity:"forward"});Vt.set(e,e.marks),ny("flush",tn.get(e),bt.get(e));for(var N=O(),T;T=(j=bt.get(e))===null||j===void 0?void 0:j[0];){var j,X,z=Ft.get(e);z!==void 0&&(Ft.delete(e),e.marks=z),z&&l===!1&&(l=null);var $=Q0(T);(!e.selection||!q.equals(e.selection,$))&&ee.select(e,$),T.diff.text?m.insertText(e,T.diff.text):m.deleteFragment(e),bt.set(e,(X=bt.get(e))===null||X===void 0?void 0:X.filter(I=>{var{id:G}=I;return G!==T.id})),Z0(e,T)||(N=!1,tn.delete(e),Vt.delete(e),i="action",nn.delete(e),n.cancel(),r.cancel(),R==null||R.unref())}var re=R==null?void 0:R.unref();if(re&&!nn.get(e)&&(!e.selection||!q.equals(re,e.selection))&&ee.select(e,re),E()){h();return}N&&n(),n.flush(),r.flush(),f();var k=Vt.get(e);Vt.delete(e),k!==void 0&&(e.marks=k,e.onChange())},g=R=>{a&&clearTimeout(a),a=setTimeout(()=>{En.set(e,!1),p()},ey)},y=R=>{En.set(e,!0),a&&(clearTimeout(a),a=null)},v=function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,T=wa.get(e);if(T){if(O()||N){T.style.display="none";return}T.style.removeProperty("display")}},d=(R,N)=>{var T,j=(T=bt.get(e))!==null&&T!==void 0?T:[];bt.set(e,j);var X=ie.leaf(e,R),z=j.findIndex(k=>L.equals(k.path,R));if(z<0){var $=Rl(X.text,N);$&&j.push({path:R,diff:N,id:u++}),v();return}var re=J0(X.text,j[z].diff,N);if(!re){j.splice(z,1),v();return}j[z]=Xr(Xr({},j[z]),{},{diff:re})},D=function(N){var{at:T}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};l=!1,nn.delete(e),n.cancel(),r.cancel(),E()&&p(),tn.set(e,{at:T,run:N}),s=setTimeout(p)},x=R=>{var N;o&&(clearTimeout(o),o=null);var{inputType:T}=R,j=null,X=R.dataTransfer||R.data||void 0;l!==!1&&T!=="insertText"&&T!=="insertCompositionText"&&(l=!1);var[z]=R.getTargetRanges();z&&(j=Z.toSlateRange(e,z,{exactMatch:!1,suppressThrow:!0}));var $=Z.getWindow(e),re=$.getSelection();if(!j&&re&&(z=re,j=Z.toSlateRange(e,re,{exactMatch:!1,suppressThrow:!0})),j=(N=j)!==null&&N!==void 0?N:e.selection,!!j){var k=!0;if(T.startsWith("delete")){if(q.isExpanded(j)){var[I,G]=q.edges(j),H=ie.leaf(e,I.path);if(H.text.length===I.offset&&G.offset===0){var Q=m.next(e,{at:I.path,match:ce.isText});Q&&L.equals(Q[1],G.path)&&(j={anchor:G,focus:G})}}var K=T.endsWith("Backward")?"backward":"forward",[C,U]=q.edges(j),[W,F]=m.leaf(e,C.path),J={text:"",start:C.offset,end:U.offset},ne=bt.get(e),Y=ne==null?void 0:ne.find(Ye=>L.equals(Ye.path,F)),ue=Y?[Y.diff,J]:[J],ae=Tl(W.text,...ue);if(ae.length===0&&(k=!1),q.isExpanded(j)){if(k&&L.equals(j.anchor.path,j.focus.path)){var de={path:j.anchor.path,offset:C.offset},pe=m.range(e,de,de);return A(pe),d(j.anchor.path,{text:"",end:U.offset,start:C.offset})}return D(()=>m.deleteFragment(e,{direction:K}),{at:j})}}switch(T){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return D(()=>m.deleteFragment(e),{at:j});case"deleteContent":case"deleteContentForward":{var{anchor:Ce}=j;if(k&&q.isCollapsed(j)){var ye=ie.leaf(e,Ce.path);if(Ce.offset<ye.text.length)return d(Ce.path,{text:"",start:Ce.offset,end:Ce.offset+1})}return D(()=>m.deleteForward(e),{at:j})}case"deleteContentBackward":{var ge,{anchor:ve}=j,Ne=La(z)?z.isCollapsed:!!((ge=z)!==null&&ge!==void 0&&ge.collapsed);return k&&Ne&&q.isCollapsed(j)&&ve.offset>0?d(ve.path,{text:"",start:ve.offset-1,end:ve.offset}):D(()=>m.deleteBackward(e),{at:j})}case"deleteEntireSoftLine":return D(()=>{m.deleteBackward(e,{unit:"line"}),m.deleteForward(e,{unit:"line"})},{at:j});case"deleteHardLineBackward":return D(()=>m.deleteBackward(e,{unit:"block"}),{at:j});case"deleteSoftLineBackward":return D(()=>m.deleteBackward(e,{unit:"line"}),{at:j});case"deleteHardLineForward":return D(()=>m.deleteForward(e,{unit:"block"}),{at:j});case"deleteSoftLineForward":return D(()=>m.deleteForward(e,{unit:"line"}),{at:j});case"deleteWordBackward":return D(()=>m.deleteBackward(e,{unit:"word"}),{at:j});case"deleteWordForward":return D(()=>m.deleteForward(e,{unit:"word"}),{at:j});case"insertLineBreak":return D(()=>m.insertSoftBreak(e),{at:j});case"insertParagraph":return D(()=>m.insertBreak(e),{at:j});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{if(ry(X))return D(()=>Z.insertData(e,X),{at:j});var se=X??"";if(Ft.get(e)&&(se=se.replace("\uFEFF","")),T==="insertText"&&/.*\n.*\n$/.test(se)&&(se=se.slice(0,-1)),se.includes(`
86
+ `)&&f===l.textContent.length&&f--;var x=Z.toSlatePoint(t,[s,u],{exactMatch:i,suppressThrow:a});if(!x)return null;var E=kl(s,l)||s===l&&f<u,O=h?x:Z.toSlatePoint(t,[l,f],{exactMatch:i,suppressThrow:a,searchDirection:E?"forward":"backward"});if(!O)return null;var b={anchor:x,focus:O};return q.isExpanded(b)&&q.isForward(b)&&Mt(l)&&m.void(t,{at:b.focus,mode:"highest"})&&(b=m.unhangRange(t,b,{voids:!0})),b}};function K0(t,e){var{path:n,diff:r}=e;if(!m.hasPath(t,n))return!1;var i=ie.get(t,n);if(!ce.isText(i))return!1;if(r.start!==i.text.length||r.text.length===0)return i.text.slice(r.start,r.start+r.text.length)===r.text;var a=L.next(n);if(!m.hasPath(t,a))return!1;var o=ie.get(t,a);return ce.isText(o)&&o.text.startsWith(r.text)}function Tl(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return n.reduce((i,a)=>i.slice(0,a.start)+a.text+i.slice(a.end),t)}function X0(t,e){for(var n=Math.min(t.length,e.length),r=0;r<n;r++)if(t.charAt(r)!==e.charAt(r))return r;return n}function J0(t,e,n){for(var r=Math.min(t.length,e.length,n),i=0;i<r;i++)if(t.charAt(t.length-i-1)!==e.charAt(e.length-i-1))return i;return r}function Rl(t,e){var{start:n,end:r,text:i}=e,a=t.slice(n,r),o=X0(a,i),s=Math.min(a.length-o,i.length-o),u=J0(a,i,s),l={start:n+o,end:r-u,text:i.slice(o,i.length-u)};return l.start===l.end&&l.text.length===0?null:l}function Q0(t,e,n){var r=Math.min(e.start,n.start),i=Math.max(0,Math.min(e.start+e.text.length,n.end)-n.start),a=Tl(t,e,n),o=Math.max(n.start+n.text.length,e.start+e.text.length+(e.start+e.text.length>n.start?n.text.length:0)-i),s=a.slice(r,o),u=Math.max(e.end,n.end-e.text.length+(e.end-e.start));return Rl(t,{start:r,end:u,text:s})}function $0(t){var{path:e,diff:n}=t;return{anchor:{path:e,offset:n.start},focus:{path:e,offset:n.end}}}function Pa(t,e){var{path:n,offset:r}=e;if(!m.hasPath(t,n))return null;var i=ie.get(t,n);if(!ce.isText(i))return null;var a=m.above(t,{match:s=>le.isElement(s)&&m.isBlock(t,s),at:n});if(!a)return null;for(;r>i.text.length;){var o=m.next(t,{at:n,match:ce.isText});if(!o||!L.isDescendant(o[1],a[1]))return null;r-=i.text.length,i=o[0],n=o[1]}return{path:n,offset:r}}function Il(t,e){var n=Pa(t,e.anchor);if(!n)return null;if(q.isCollapsed(e))return{anchor:n,focus:n};var r=Pa(t,e.focus);return r?{anchor:n,focus:r}:null}function Ma(t,e,n){var r=bt.get(t),i=r==null?void 0:r.find(f=>{var{path:h}=f;return L.equals(h,e.path)});if(!i||e.offset<=i.diff.start)return Le.transform(e,n,{affinity:"backward"});var{diff:a}=i;if(e.offset<=a.start+a.text.length){var o={path:e.path,offset:a.start},s=Le.transform(o,n,{affinity:"backward"});return s?{path:s.path,offset:s.offset+e.offset-a.start}:null}var u={path:e.path,offset:e.offset-a.text.length+a.end-a.start},l=Le.transform(u,n,{affinity:"backward"});return l?n.type==="split_node"&&L.equals(n.path,e.path)&&u.offset<n.position&&a.start<n.position?l:{path:l.path,offset:l.offset+a.text.length-a.end+a.start}:null}function jl(t,e,n){var r=Ma(t,e.anchor,n);if(!r)return null;if(q.isCollapsed(e))return{anchor:r,focus:r};var i=Ma(t,e.focus,n);return i?{anchor:r,focus:i}:null}function ey(t,e){var{path:n,diff:r,id:i}=t;switch(e.type){case"insert_text":return!L.equals(e.path,n)||e.offset>=r.end?t:e.offset<=r.start?{diff:{start:e.text.length+r.start,end:e.text.length+r.end,text:r.text},id:i,path:n}:{diff:{start:r.start,end:r.end+e.text.length,text:r.text},id:i,path:n};case"remove_text":return!L.equals(e.path,n)||e.offset>=r.end?t:e.offset+e.text.length<=r.start?{diff:{start:r.start-e.text.length,end:r.end-e.text.length,text:r.text},id:i,path:n}:{diff:{start:r.start,end:r.end-e.text.length,text:r.text},id:i,path:n};case"split_node":return!L.equals(e.path,n)||e.position>=r.end?{diff:r,id:i,path:L.transform(n,e,{affinity:"backward"})}:e.position>r.start?{diff:{start:r.start,end:Math.min(e.position,r.end),text:r.text},id:i,path:n}:{diff:{start:r.start-e.position,end:r.end-e.position,text:r.text},id:i,path:L.transform(n,e,{affinity:"forward"})};case"merge_node":return L.equals(e.path,n)?{diff:{start:r.start+e.position,end:r.end+e.position,text:r.text},id:i,path:L.transform(n,e)}:{diff:r,id:i,path:L.transform(n,e)}}var a=L.transform(n,e);return a?{diff:r,path:a,id:i}:null}function Nl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Xr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Nl(Object(n),!0).forEach(function(r){Pt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Nl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var ty=25,ny=200,ry=function(){},iy=t=>(t==null?void 0:t.constructor.name)==="DataTransfer";function ay(t){var{editor:e,scheduleOnDOMSelectionChange:n,onDOMSelectionChange:r}=t,i=!1,a=null,o=null,s=null,u=0,l=!1,f=()=>{var R=nn.get(e);if(nn.delete(e),R){var{selection:N}=e,T=Il(e,R);T&&(!N||!q.equals(T,N))&&ee.select(e,T)}},h=()=>{var R=tn.get(e);if(tn.delete(e),!!R){if(R.at){var N=Le.isPoint(R.at)?Pa(e,R.at):Il(e,R.at);if(!N)return;var T=m.range(e,N);(!e.selection||!q.equals(e.selection,T))&&ee.select(e,N)}R.run()}},p=()=>{if(o&&(clearTimeout(o),o=null),s&&(clearTimeout(s),s=null),!O()&&!E()){f();return}i||(i=!0,setTimeout(()=>i=!1)),E()&&(i="action");var R=e.selection&&m.rangeRef(e,e.selection,{affinity:"forward"});Vt.set(e,e.marks),ry("flush",tn.get(e),bt.get(e));for(var N=O(),T;T=(j=bt.get(e))===null||j===void 0?void 0:j[0];){var j,X,z=Ft.get(e);z!==void 0&&(Ft.delete(e),e.marks=z),z&&l===!1&&(l=null);var $=$0(T);(!e.selection||!q.equals(e.selection,$))&&ee.select(e,$),T.diff.text?m.insertText(e,T.diff.text):m.deleteFragment(e),bt.set(e,(X=bt.get(e))===null||X===void 0?void 0:X.filter(I=>{var{id:G}=I;return G!==T.id})),K0(e,T)||(N=!1,tn.delete(e),Vt.delete(e),i="action",nn.delete(e),n.cancel(),r.cancel(),R==null||R.unref())}var re=R==null?void 0:R.unref();if(re&&!nn.get(e)&&(!e.selection||!q.equals(re,e.selection))&&ee.select(e,re),E()){h();return}N&&n(),n.flush(),r.flush(),f();var k=Vt.get(e);Vt.delete(e),k!==void 0&&(e.marks=k,e.onChange())},g=R=>{a&&clearTimeout(a),a=setTimeout(()=>{En.set(e,!1),p()},ty)},y=R=>{En.set(e,!0),a&&(clearTimeout(a),a=null)},v=function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,T=wa.get(e);if(T){if(O()||N){T.style.display="none";return}T.style.removeProperty("display")}},d=(R,N)=>{var T,j=(T=bt.get(e))!==null&&T!==void 0?T:[];bt.set(e,j);var X=ie.leaf(e,R),z=j.findIndex(k=>L.equals(k.path,R));if(z<0){var $=Rl(X.text,N);$&&j.push({path:R,diff:N,id:u++}),v();return}var re=Q0(X.text,j[z].diff,N);if(!re){j.splice(z,1),v();return}j[z]=Xr(Xr({},j[z]),{},{diff:re})},D=function(N){var{at:T}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};l=!1,nn.delete(e),n.cancel(),r.cancel(),E()&&p(),tn.set(e,{at:T,run:N}),s=setTimeout(p)},x=R=>{var N;o&&(clearTimeout(o),o=null);var{inputType:T}=R,j=null,X=R.dataTransfer||R.data||void 0;l!==!1&&T!=="insertText"&&T!=="insertCompositionText"&&(l=!1);var[z]=R.getTargetRanges();z&&(j=Z.toSlateRange(e,z,{exactMatch:!1,suppressThrow:!0}));var $=Z.getWindow(e),re=$.getSelection();if(!j&&re&&(z=re,j=Z.toSlateRange(e,re,{exactMatch:!1,suppressThrow:!0})),j=(N=j)!==null&&N!==void 0?N:e.selection,!!j){var k=!0;if(T.startsWith("delete")){if(q.isExpanded(j)){var[I,G]=q.edges(j),H=ie.leaf(e,I.path);if(H.text.length===I.offset&&G.offset===0){var Q=m.next(e,{at:I.path,match:ce.isText});Q&&L.equals(Q[1],G.path)&&(j={anchor:G,focus:G})}}var K=T.endsWith("Backward")?"backward":"forward",[C,U]=q.edges(j),[W,F]=m.leaf(e,C.path),J={text:"",start:C.offset,end:U.offset},ne=bt.get(e),Y=ne==null?void 0:ne.find(Ye=>L.equals(Ye.path,F)),ue=Y?[Y.diff,J]:[J],ae=Tl(W.text,...ue);if(ae.length===0&&(k=!1),q.isExpanded(j)){if(k&&L.equals(j.anchor.path,j.focus.path)){var de={path:j.anchor.path,offset:C.offset},pe=m.range(e,de,de);return A(pe),d(j.anchor.path,{text:"",end:U.offset,start:C.offset})}return D(()=>m.deleteFragment(e,{direction:K}),{at:j})}}switch(T){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return D(()=>m.deleteFragment(e),{at:j});case"deleteContent":case"deleteContentForward":{var{anchor:Ce}=j;if(k&&q.isCollapsed(j)){var ye=ie.leaf(e,Ce.path);if(Ce.offset<ye.text.length)return d(Ce.path,{text:"",start:Ce.offset,end:Ce.offset+1})}return D(()=>m.deleteForward(e),{at:j})}case"deleteContentBackward":{var ge,{anchor:ve}=j,Ne=La(z)?z.isCollapsed:!!((ge=z)!==null&&ge!==void 0&&ge.collapsed);return k&&Ne&&q.isCollapsed(j)&&ve.offset>0?d(ve.path,{text:"",start:ve.offset-1,end:ve.offset}):D(()=>m.deleteBackward(e),{at:j})}case"deleteEntireSoftLine":return D(()=>{m.deleteBackward(e,{unit:"line"}),m.deleteForward(e,{unit:"line"})},{at:j});case"deleteHardLineBackward":return D(()=>m.deleteBackward(e,{unit:"block"}),{at:j});case"deleteSoftLineBackward":return D(()=>m.deleteBackward(e,{unit:"line"}),{at:j});case"deleteHardLineForward":return D(()=>m.deleteForward(e,{unit:"block"}),{at:j});case"deleteSoftLineForward":return D(()=>m.deleteForward(e,{unit:"line"}),{at:j});case"deleteWordBackward":return D(()=>m.deleteBackward(e,{unit:"word"}),{at:j});case"deleteWordForward":return D(()=>m.deleteForward(e,{unit:"word"}),{at:j});case"insertLineBreak":return D(()=>m.insertSoftBreak(e),{at:j});case"insertParagraph":return D(()=>m.insertBreak(e),{at:j});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{if(iy(X))return D(()=>Z.insertData(e,X),{at:j});var se=X??"";if(Ft.get(e)&&(se=se.replace("\uFEFF","")),T==="insertText"&&/.*\n.*\n$/.test(se)&&(se=se.slice(0,-1)),se.includes(`
87
87
  `))return D(()=>{var Ye=se.split(`
88
- `);Ye.forEach((Ee,ct)=>{Ee&&m.insertText(e,Ee),ct!==Ye.length-1&&m.insertSoftBreak(e)})},{at:j});if(L.equals(j.anchor.path,j.focus.path)){var[_e,fe]=q.edges(j),we={start:_e.offset,end:fe.offset,text:se};if(se&&l&&T==="insertCompositionText"){var ke=l.start+l.text.search(/\S|$/),Ve=we.start+we.text.search(/\S|$/);Ve===ke+1&&we.end===l.start+l.text.length?(we.start-=1,l=null,P()):l=!1}else T==="insertText"?l===null?l=we:l&&q.isCollapsed(j)&&l.end+l.text.length===_e.offset?l=Xr(Xr({},l),{},{text:l.text+se}):l=!1:l=!1;if(k){d(_e.path,we);return}}return D(()=>m.insertText(e,se),{at:j})}}}},E=()=>!!tn.get(e),O=()=>{var R;return!!((R=bt.get(e))!==null&&R!==void 0&&R.length)},b=()=>E()||O(),w=()=>i,A=R=>{nn.set(e,R),o&&(clearTimeout(o),o=null);var{selection:N}=e;if(R){var T=!N||!L.equals(N.anchor.path,R.anchor.path),j=!N||!L.equals(N.anchor.path.slice(0,-1),R.anchor.path.slice(0,-1));(T&&l||j)&&(l=!1),(T||O())&&(o=setTimeout(p,ty))}},M=()=>{(E()||!O())&&p()},V=R=>{O()||(v(!0),setTimeout(v))},P=()=>{E()||(s=setTimeout(p))},_=R=>{if(!(O()||E())&&R.some(T=>Oa(e,T,R))){var N;(N=Al.get(e))===null||N===void 0||N()}};return{flush:p,scheduleFlush:P,hasPendingDiffs:O,hasPendingAction:E,hasPendingChanges:b,isFlushing:w,handleUserSelect:A,handleCompositionEnd:g,handleCompositionStart:y,handleDOMBeforeInput:x,handleKeyDown:V,handleDomMutations:_,handleInput:M}}function ay(){var t=c.useRef(!1);return c.useEffect(()=>(t.current=!0,()=>{t.current=!1}),[]),t.current}var sr=Gr?c.useLayoutEffect:c.useEffect;function oy(t,e,n){var[r]=c.useState(()=>new MutationObserver(e));sr(()=>{r.takeRecords()}),c.useEffect(()=>{if(!t.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");return r.observe(t.current,n),()=>r.disconnect()},[r,t,n])}var sy=["node"];function _l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function uy(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?_l(Object(n),!0).forEach(function(r){Pt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_l(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var ly={subtree:!0,childList:!0,characterData:!0},cy=vt?t=>{var{node:e}=t,n=kn(t,sy);if(!vt)return null;var r=Qt(),i=ay(),[a]=c.useState(()=>iy(uy({editor:r},n)));return oy(e,a.handleDomMutations,ly),Sa.set(r,a.scheduleFlush),i&&a.flush(),a}:()=>null,fy=["anchor","focus"],dy=["anchor","focus"],py=(t,e)=>Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(n=>e.hasOwnProperty(n)&&t[n]===e[n]),zl=(t,e)=>{var n=kn(t,fy),r=kn(e,dy);return t[Rn]===e[Rn]&&py(n,r)},hy=(t,e)=>{if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++){var r=t[n],i=e[n];if(!q.equals(r,i)||!zl(r,i))return!1}return!0},vy=(t,e)=>{if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++){var r=t[n],i=e[n];if(r.anchor.offset!==i.anchor.offset||r.focus.offset!==i.focus.offset||!zl(r,i))return!1}return!0};function Wl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function gy(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Wl(Object(n),!0).forEach(function(r){Pt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var my=t=>{var{isLast:e,leaf:n,parent:r,text:i}=t,a=Qt(),o=Z.findPath(a,i),s=L.parent(o),u=!!n[Ll];return a.isVoid(r)?c.createElement(Fa,{length:ie.string(r).length}):n.text===""&&r.children[r.children.length-1]===i&&!a.isInline(r)&&m.string(a,s)===""?c.createElement(Fa,{isLineBreak:!0,isMarkPlaceholder:u}):n.text===""?c.createElement(Fa,{isMarkPlaceholder:u}):e&&n.text.slice(-1)===`
88
+ `);Ye.forEach((Ee,ct)=>{Ee&&m.insertText(e,Ee),ct!==Ye.length-1&&m.insertSoftBreak(e)})},{at:j});if(L.equals(j.anchor.path,j.focus.path)){var[_e,fe]=q.edges(j),we={start:_e.offset,end:fe.offset,text:se};if(se&&l&&T==="insertCompositionText"){var ke=l.start+l.text.search(/\S|$/),Ve=we.start+we.text.search(/\S|$/);Ve===ke+1&&we.end===l.start+l.text.length?(we.start-=1,l=null,P()):l=!1}else T==="insertText"?l===null?l=we:l&&q.isCollapsed(j)&&l.end+l.text.length===_e.offset?l=Xr(Xr({},l),{},{text:l.text+se}):l=!1:l=!1;if(k){d(_e.path,we);return}}return D(()=>m.insertText(e,se),{at:j})}}}},E=()=>!!tn.get(e),O=()=>{var R;return!!((R=bt.get(e))!==null&&R!==void 0&&R.length)},b=()=>E()||O(),w=()=>i,A=R=>{nn.set(e,R),o&&(clearTimeout(o),o=null);var{selection:N}=e;if(R){var T=!N||!L.equals(N.anchor.path,R.anchor.path),j=!N||!L.equals(N.anchor.path.slice(0,-1),R.anchor.path.slice(0,-1));(T&&l||j)&&(l=!1),(T||O())&&(o=setTimeout(p,ny))}},M=()=>{(E()||!O())&&p()},V=R=>{O()||(v(!0),setTimeout(v))},P=()=>{E()||(s=setTimeout(p))},_=R=>{if(!(O()||E())&&R.some(T=>Oa(e,T,R))){var N;(N=Al.get(e))===null||N===void 0||N()}};return{flush:p,scheduleFlush:P,hasPendingDiffs:O,hasPendingAction:E,hasPendingChanges:b,isFlushing:w,handleUserSelect:A,handleCompositionEnd:g,handleCompositionStart:y,handleDOMBeforeInput:x,handleKeyDown:V,handleDomMutations:_,handleInput:M}}function oy(){var t=c.useRef(!1);return c.useEffect(()=>(t.current=!0,()=>{t.current=!1}),[]),t.current}var sr=Gr?c.useLayoutEffect:c.useEffect;function sy(t,e,n){var[r]=c.useState(()=>new MutationObserver(e));sr(()=>{r.takeRecords()}),c.useEffect(()=>{if(!t.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");return r.observe(t.current,n),()=>r.disconnect()},[r,t,n])}var uy=["node"];function _l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ly(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?_l(Object(n),!0).forEach(function(r){Pt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_l(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var cy={subtree:!0,childList:!0,characterData:!0},fy=vt?t=>{var{node:e}=t,n=kn(t,uy);if(!vt)return null;var r=Qt(),i=oy(),[a]=c.useState(()=>ay(ly({editor:r},n)));return sy(e,a.handleDomMutations,cy),Sa.set(r,a.scheduleFlush),i&&a.flush(),a}:()=>null,dy=["anchor","focus"],py=["anchor","focus"],hy=(t,e)=>Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(n=>e.hasOwnProperty(n)&&t[n]===e[n]),zl=(t,e)=>{var n=kn(t,dy),r=kn(e,py);return t[Rn]===e[Rn]&&hy(n,r)},vy=(t,e)=>{if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++){var r=t[n],i=e[n];if(!q.equals(r,i)||!zl(r,i))return!1}return!0},gy=(t,e)=>{if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++){var r=t[n],i=e[n];if(r.anchor.offset!==i.anchor.offset||r.focus.offset!==i.focus.offset||!zl(r,i))return!1}return!0};function Wl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function my(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Wl(Object(n),!0).forEach(function(r){Pt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var yy=t=>{var{isLast:e,leaf:n,parent:r,text:i}=t,a=Qt(),o=Z.findPath(a,i),s=L.parent(o),u=!!n[Ll];return a.isVoid(r)?c.createElement(Fa,{length:ie.string(r).length}):n.text===""&&r.children[r.children.length-1]===i&&!a.isInline(r)&&m.string(a,s)===""?c.createElement(Fa,{isLineBreak:!0,isMarkPlaceholder:u}):n.text===""?c.createElement(Fa,{isMarkPlaceholder:u}):e&&n.text.slice(-1)===`
89
89
  `?c.createElement(Ul,{isTrailing:!0,text:n.text}):c.createElement(Ul,{text:n.text})},Ul=t=>{var{text:e,isTrailing:n=!1}=t,r=c.useRef(null),i=()=>"".concat(e??"").concat(n?`
90
- `:""),[a]=c.useState(i);return sr(()=>{var o=i();r.current&&r.current.textContent!==o&&(r.current.textContent=o)}),c.createElement(yy,{ref:r},a)},yy=c.memo(c.forwardRef((t,e)=>c.createElement("span",{"data-slate-string":!0,ref:e},t.children))),Fa=t=>{var{length:e=0,isLineBreak:n=!1,isMarkPlaceholder:r=!1}=t,i={"data-slate-zero-width":n?"n":"z","data-slate-length":e};return r&&(i["data-slate-mark-placeholder"]=!0),c.createElement("span",gy({},i),!(vt||wl)||!n?"\uFEFF":null,n?c.createElement("br",null):null)};function Hl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Vl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Hl(Object(n),!0).forEach(function(r){Pt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Hl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Cy=vt?300:0;function Dy(t,e){t.current&&(t.current.disconnect(),e&&(t.current=null))}function ql(t){t.current&&(clearTimeout(t.current),t.current=null)}var by=t=>{var{leaf:e,isLast:n,text:r,parent:i,renderPlaceholder:a,renderLeaf:o=x=>c.createElement(wy,Vl({},x))}=t,s=Qt(),u=c.useRef(null),l=c.useRef(null),[f,h]=c.useState(!1),p=c.useRef(null),g=c.useCallback(x=>{if(Dy(u,x==null),x==null){var E;wa.delete(s),(E=e.onPlaceholderResize)===null||E===void 0||E.call(e,null)}else{if(wa.set(s,x),!u.current){var O=window.ResizeObserver||S0;u.current=new O(()=>{var b;(b=e.onPlaceholderResize)===null||b===void 0||b.call(e,x)})}u.current.observe(x),l.current=x}},[l,e,s]),y=c.createElement(my,{isLast:n,leaf:e,parent:i,text:r}),v=!!e[Rn];if(c.useEffect(()=>(v?p.current||(p.current=setTimeout(()=>{h(!0),p.current=null},Cy)):(ql(p),h(!1)),()=>ql(p)),[v,h]),v&&f){var d={children:e.placeholder,attributes:{"data-slate-placeholder":!0,style:{position:"absolute",top:0,pointerEvents:"none",width:"100%",maxWidth:"100%",display:"block",opacity:"0.333",userSelect:"none",textDecoration:"none",WebkitUserModify:Dn?"inherit":void 0},contentEditable:!1,ref:g}};y=c.createElement(c.Fragment,null,a(d),y)}var D={"data-slate-leaf":!0};return o({attributes:D,children:y,leaf:e,text:r})},Ey=c.memo(by,(t,e)=>e.parent===t.parent&&e.isLast===t.isLast&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&e.text===t.text&&ce.equals(e.leaf,t.leaf)&&e.leaf[Rn]===t.leaf[Rn]),wy=t=>{var{attributes:e,children:n}=t;return c.createElement("span",Vl({},e),n)},xy=t=>{for(var{decorations:e,isLast:n,parent:r,renderPlaceholder:i,renderLeaf:a,text:o}=t,s=Qt(),u=c.useRef(null),l=ce.decorations(o,e),f=Z.findKey(s,o),h=[],p=0;p<l.length;p++){var g=l[p];h.push(c.createElement(Ey,{isLast:n&&p===l.length-1,key:"".concat(f.id,"-").concat(p),renderPlaceholder:i,leaf:g,text:o,parent:r,renderLeaf:a}))}var y=c.useCallback(v=>{var d=Kr.get(s);v?(d==null||d.set(f,v),bn.set(o,v),ir.set(v,o)):(d==null||d.delete(f),bn.delete(o),u.current&&ir.delete(u.current)),u.current=v},[u,s,f,o]);return c.createElement("span",{"data-slate-node":"text",ref:y},h)},Gl=c.memo(xy,(t,e)=>e.parent===t.parent&&e.isLast===t.isLast&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&e.text===t.text&&vy(e.decorations,t.decorations));function Yl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ka(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Yl(Object(n),!0).forEach(function(r){Pt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var By=t=>{var{decorations:e,element:n,renderElement:r=x=>c.createElement(Ay,ka({},x)),renderPlaceholder:i,renderLeaf:a,selection:o}=t,s=Qt(),u=Py(),l=s.isInline(n),f=Z.findKey(s,n),h=c.useCallback(x=>{var E=Kr.get(s);x?(E==null||E.set(f,x),bn.set(n,x),ir.set(x,n)):(E==null||E.delete(f),bn.delete(n))},[s,f,n]),p=Kl({decorations:e,node:n,renderElement:r,renderPlaceholder:i,renderLeaf:a,selection:o}),g={"data-slate-node":"element",ref:h};if(l&&(g["data-slate-inline"]=!0),!l&&m.hasInlines(s,n)){var y=ie.string(n),v=Yu(y);v==="rtl"&&(g.dir=v)}if(m.isVoid(s,n)){g["data-slate-void"]=!0,!u&&l&&(g.contentEditable=!1);var d=l?"span":"div",[[D]]=ie.texts(n);p=c.createElement(d,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},c.createElement(Gl,{renderPlaceholder:i,decorations:[],isLast:!1,parent:n,text:D})),ba.set(D,0),Ea.set(D,n)}return r({attributes:g,children:p,element:n})},Sy=c.memo(By,(t,e)=>t.element===e.element&&t.renderElement===e.renderElement&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&hy(t.decorations,e.decorations)&&(t.selection===e.selection||!!t.selection&&!!e.selection&&q.equals(t.selection,e.selection))),Ay=t=>{var{attributes:e,children:n,element:r}=t,i=Qt(),a=i.isInline(r)?"span":"div";return c.createElement(a,ka(ka({},e),{},{style:{position:"relative"}}),n)},Zl=c.createContext(()=>[]),Ly=()=>c.useContext(Zl),Oy=c.createContext(!1),Kl=t=>{for(var{decorations:e,node:n,renderElement:r,renderPlaceholder:i,renderLeaf:a,selection:o}=t,s=Ly(),u=Qt(),l=Z.findPath(u,n),f=[],h=le.isElement(n)&&!u.isInline(n)&&m.hasInlines(u,n),p=0;p<n.children.length;p++){var g=l.concat(p),y=n.children[p],v=Z.findKey(u,y),d=m.range(u,g),D=o&&q.intersection(d,o),x=s([y,g]);for(var E of e){var O=q.intersection(E,d);O&&x.push(O)}le.isElement(y)?f.push(c.createElement(Oy.Provider,{key:"provider-".concat(v.id),value:!!D},c.createElement(Sy,{decorations:x,element:y,key:v.id,renderElement:r,renderPlaceholder:i,renderLeaf:a,selection:D}))):f.push(c.createElement(Gl,{decorations:x,key:v.id,isLast:h&&p===n.children.length-1,parent:n,renderPlaceholder:i,renderLeaf:a,text:y})),ba.set(y,p),Ea.set(y,n)}return f},Xl=c.createContext(!1),Py=()=>c.useContext(Xl),Jl=c.createContext(null),Ta=()=>{var t=c.useContext(Jl);if(!t)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:e}=t;return e};function My(){var t=Qt(),e=c.useRef(!1),n=c.useRef(0),r=c.useCallback(()=>{if(!e.current){e.current=!0;var i=Z.getWindow(t);i.cancelAnimationFrame(n.current),n.current=i.requestAnimationFrame(()=>{e.current=!1})}},[t]);return c.useEffect(()=>()=>cancelAnimationFrame(n.current),[]),{receivedUserInput:e,onUserInput:r}}var Fy=3,ky={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",insertSoftBreak:"shift+enter",splitBlock:"enter",undo:"mod+z"},Ty={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},Ry={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Ke=t=>{var e=ky[t],n=Ty[t],r=Ry[t],i=e&&Ki(e),a=n&&Ki(n),o=r&&Ki(r);return s=>!!(i&&i(s)||xl&&a&&a(s)||!xl&&o&&o(s))},Qe={isBold:Ke("bold"),isCompose:Ke("compose"),isMoveBackward:Ke("moveBackward"),isMoveForward:Ke("moveForward"),isDeleteBackward:Ke("deleteBackward"),isDeleteForward:Ke("deleteForward"),isDeleteLineBackward:Ke("deleteLineBackward"),isDeleteLineForward:Ke("deleteLineForward"),isDeleteWordBackward:Ke("deleteWordBackward"),isDeleteWordForward:Ke("deleteWordForward"),isExtendBackward:Ke("extendBackward"),isExtendForward:Ke("extendForward"),isExtendLineBackward:Ke("extendLineBackward"),isExtendLineForward:Ke("extendLineForward"),isItalic:Ke("italic"),isMoveLineBackward:Ke("moveLineBackward"),isMoveLineForward:Ke("moveLineForward"),isMoveWordBackward:Ke("moveWordBackward"),isMoveWordForward:Ke("moveWordForward"),isRedo:Ke("redo"),isSoftBreak:Ke("insertSoftBreak"),isSplitBlock:Ke("splitBlock"),isTransposeCharacter:Ke("transposeCharacter"),isUndo:Ke("undo")},Iy=(t,e)=>{var n=[],r=()=>{n=[]},i=o=>{if(e.current){var s=o.filter(u=>Oa(t,u,o));n.push(...s)}};function a(){n.length>0&&(n.reverse().forEach(o=>{o.type!=="characterData"&&(o.removedNodes.forEach(s=>{o.target.insertBefore(s,o.nextSibling)}),o.addedNodes.forEach(s=>{o.target.removeChild(s)}))}),r())}return{registerMutations:i,restoreDOM:a,clear:r}},jy={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class Ql extends c.Component{constructor(){super(...arguments),Pt(this,"context",null),Pt(this,"manager",null),Pt(this,"mutationObserver",null)}observe(){var e,{node:n}=this.props;if(!n.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");(e=this.mutationObserver)===null||e===void 0||e.observe(n.current,jy)}componentDidMount(){var{receivedUserInput:e}=this.props,n=this.context;this.manager=Iy(n,e),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var e,n,r,i=(e=this.mutationObserver)===null||e===void 0?void 0:e.takeRecords();if(i!=null&&i.length){var a;(a=this.manager)===null||a===void 0||a.registerMutations(i)}return(n=this.mutationObserver)===null||n===void 0||n.disconnect(),(r=this.manager)===null||r===void 0||r.restoreDOM(),null}componentDidUpdate(){var e;(e=this.manager)===null||e===void 0||e.clear(),this.observe()}componentWillUnmount(){var e;(e=this.mutationObserver)===null||e===void 0||e.disconnect()}render(){return this.props.children}}Pt(Ql,"contextType",ya);var Ny=vt?Ql:t=>{var{children:e}=t;return c.createElement(c.Fragment,null,e)},_y=c.createContext(!1),zy=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],Wy=["text"];function $l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function jt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?$l(Object(n),!0).forEach(function(r){Pt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$l(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Uy=t=>c.createElement(c.Fragment,null,Kl(t)),Hy=c.forwardRef((t,e)=>{var n=c.useCallback(C=>c.createElement(Vy,jt({},C)),[]),{autoFocus:r,decorate:i=qy,onDOMBeforeInput:a,placeholder:o,readOnly:s=!1,renderElement:u,renderLeaf:l,renderPlaceholder:f=n,scrollSelectionIntoView:h=Gy,style:p={},as:g="div",disableDefaultStyles:y=!1}=t,v=kn(t,zy),d=Ta(),[D,x]=c.useState(!1),E=c.useRef(null),O=c.useRef([]),[b,w]=c.useState(),A=c.useRef(!1),{onUserInput:M,receivedUserInput:V}=My(),[,P]=c.useReducer(C=>C+1,0);Al.set(d,P),xa.set(d,s);var _=c.useMemo(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);c.useEffect(()=>{E.current&&r&&E.current.focus()},[r]);var R=c.useRef(),N=c.useMemo(()=>n0(()=>{var C=Z.toDOMNode(d,d),U=C.getRootNode();if(!A.current&&Dn&&U instanceof ShadowRoot){A.current=!0;var W=V0();W?document.execCommand("indent"):ee.deselect(d),A.current=!1;return}var F=R.current;if((vt||!Z.isComposing(d))&&(!_.isUpdatingSelection||F!=null&&F.isFlushing())&&!_.isDraggingInternally){var J=Z.findDocumentOrShadowRoot(d),{activeElement:ne}=J,Y=Z.toDOMNode(d,d),ue=or(J);if(ne===Y?(_.latestElement=ne,en.set(d,!0)):en.delete(d),!ue)return ee.deselect(d);var{anchorNode:ae,focusNode:de}=ue,pe=Z.hasEditableTarget(d,ae)||Z.isTargetInsideNonReadonlyVoid(d,ae),Ce=Z.hasTarget(d,de);if(pe&&Ce){var ye=Z.toSlateRange(d,ue,{exactMatch:!1,suppressThrow:!0});ye&&(!Z.isComposing(d)&&!(F!=null&&F.hasPendingChanges())&&!(F!=null&&F.isFlushing())?ee.select(d,ye):F==null||F.handleUserSelect(ye))}s&&(!pe||!Ce)&&ee.deselect(d)}},100),[d,s,_]),T=c.useMemo(()=>Xm(N,0),[N]);R.current=cy({node:E,onDOMSelectionChange:N,scheduleOnDOMSelectionChange:T}),sr(()=>{var C,U,W;E.current&&(W=Aa(E.current))?(Sl.set(d,W),Yr.set(d,E.current),bn.set(d,E.current),ir.set(E.current,d)):bn.delete(d);var{selection:F}=d,J=Z.findDocumentOrShadowRoot(d),ne=or(J);if(!(!ne||!Z.isFocused(d)||(C=R.current)!==null&&C!==void 0&&C.hasPendingAction())){var Y=pe=>{var Ce=ne.type!=="None";if(!(!F&&!Ce)){var ye=ne.focusNode,ge;if(Tn&&ne.rangeCount>1){var ve=ne.getRangeAt(0),Ne=ne.getRangeAt(ne.rangeCount-1);ve.startContainer===ye?ge=Ne.endContainer:ge=ve.startContainer}else ge=ne.anchorNode;var se=Yr.get(d),_e=!1;if(se.contains(ge)&&se.contains(ye)&&(_e=!0),Ce&&_e&&F&&!pe){var fe=Z.toSlateRange(d,ne,{exactMatch:!0,suppressThrow:!0});if(fe&&q.equals(fe,F)){var we;if(!_.hasMarkPlaceholder||(we=ge)!==null&&we!==void 0&&(we=we.parentElement)!==null&&we!==void 0&&we.hasAttribute("data-slate-mark-placeholder"))return}}if(F&&!Z.hasRange(d,F)){d.selection=Z.toSlateRange(d,ne,{exactMatch:!1,suppressThrow:!0});return}_.isUpdatingSelection=!0;var ke=F&&Z.toDOMRange(d,F);return ke?(Z.isComposing(d)&&!vt?ne.collapseToEnd():q.isBackward(F)?ne.setBaseAndExtent(ke.endContainer,ke.endOffset,ke.startContainer,ke.startOffset):ne.setBaseAndExtent(ke.startContainer,ke.startOffset,ke.endContainer,ke.endOffset),h(d,ke)):ne.removeAllRanges(),ke}};ne.rangeCount<=1&&Y();var ue=((U=R.current)===null||U===void 0?void 0:U.isFlushing())==="action";if(!vt||!ue){setTimeout(()=>{_.isUpdatingSelection=!1});return}var ae=null,de=requestAnimationFrame(()=>{if(ue){var pe=Ce=>{try{var ye=Z.toDOMNode(d,d);ye.focus(),Y(Ce)}catch{}};pe(),ae=setTimeout(()=>{pe(!0),_.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(de),ae&&clearTimeout(ae)}}});var j=c.useCallback(C=>{var U=Z.toDOMNode(d,d),W=U.getRootNode();if(A!=null&&A.current&&Dn&&W instanceof ShadowRoot){var F=C.getTargetRanges(),J=F[0],ne=new window.Range;ne.setStart(J.startContainer,J.startOffset),ne.setEnd(J.endContainer,J.endOffset);var Y=Z.toSlateRange(d,ne,{exactMatch:!1,suppressThrow:!1});ee.select(d,Y),C.preventDefault(),C.stopImmediatePropagation();return}if(M(),!s&&Z.hasEditableTarget(d,C.target)&&!Yy(C,a)){var ue;if(R.current)return R.current.handleDOMBeforeInput(C);T.flush(),N.flush();var{selection:ae}=d,{inputType:de}=C,pe=C.dataTransfer||C.data||void 0,Ce=de==="insertCompositionText"||de==="deleteCompositionText";if(Ce&&Z.isComposing(d))return;var ye=!1;if(de==="insertText"&&ae&&q.isCollapsed(ae)&&C.data&&C.data.length===1&&/[a-z ]/i.test(C.data)&&ae.anchor.offset!==0){var ge,ve;ye=!0,d.marks&&(ye=!1);var{anchor:Ne}=ae,[se,_e]=Z.toDOMPoint(d,Ne),fe=(ge=se.parentElement)===null||ge===void 0?void 0:ge.closest("a"),we=Z.getWindow(d);if(ye&&fe&&Z.hasDOMNode(d,fe)){var ke,Ve=we==null?void 0:we.document.createTreeWalker(fe,NodeFilter.SHOW_TEXT).lastChild();Ve===se&&((ke=Ve.textContent)===null||ke===void 0?void 0:ke.length)===_e&&(ye=!1)}if(ye&&se.parentElement&&(we==null||(ve=we.getComputedStyle(se.parentElement))===null||ve===void 0?void 0:ve.whiteSpace)==="pre"){var Ye=m.above(d,{at:Ne.path,match:Lt=>le.isElement(Lt)&&m.isBlock(d,Lt)});Ye&&ie.string(Ye[0]).includes(" ")&&(ye=!1)}}if(!de.startsWith("delete")||de.startsWith("deleteBy")){var[Ee]=C.getTargetRanges();if(Ee){var ct=Z.toSlateRange(d,Ee,{exactMatch:!1,suppressThrow:!1});if(!ae||!q.equals(ae,ct)){ye=!1;var st=!Ce&&d.selection&&m.rangeRef(d,d.selection);ee.select(d,ct),st&&ar.set(d,st)}}}if(Ce)return;if(ye||C.preventDefault(),ae&&q.isExpanded(ae)&&de.startsWith("delete")){var Tt=de.endsWith("Backward")?"backward":"forward";m.deleteFragment(d,{direction:Tt});return}switch(de){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":{m.deleteFragment(d);break}case"deleteContent":case"deleteContentForward":{m.deleteForward(d);break}case"deleteContentBackward":{m.deleteBackward(d);break}case"deleteEntireSoftLine":{m.deleteBackward(d,{unit:"line"}),m.deleteForward(d,{unit:"line"});break}case"deleteHardLineBackward":{m.deleteBackward(d,{unit:"block"});break}case"deleteSoftLineBackward":{m.deleteBackward(d,{unit:"line"});break}case"deleteHardLineForward":{m.deleteForward(d,{unit:"block"});break}case"deleteSoftLineForward":{m.deleteForward(d,{unit:"line"});break}case"deleteWordBackward":{m.deleteBackward(d,{unit:"word"});break}case"deleteWordForward":{m.deleteForward(d,{unit:"word"});break}case"insertLineBreak":m.insertSoftBreak(d);break;case"insertParagraph":{m.insertBreak(d);break}case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{de==="insertFromComposition"&&Z.isComposing(d)&&(x(!1),En.set(d,!1)),(pe==null?void 0:pe.constructor.name)==="DataTransfer"?Z.insertData(d,pe):typeof pe=="string"&&(ye?O.current.push(()=>m.insertText(d,pe)):m.insertText(d,pe));break}}var yt=(ue=ar.get(d))===null||ue===void 0?void 0:ue.unref();ar.delete(d),yt&&(!d.selection||!q.equals(d.selection,yt))&&ee.select(d,yt)}},[d,N,M,a,s,T]),X=c.useCallback(C=>{C==null?(N.cancel(),T.cancel(),Yr.delete(d),bn.delete(d),E.current&&$t&&E.current.removeEventListener("beforeinput",j)):$t&&C.addEventListener("beforeinput",j),E.current=C,typeof e=="function"?e(C):e&&(e.current=C)},[N,T,d,j,e]);sr(()=>{var C=Z.getWindow(d);C.document.addEventListener("selectionchange",T);var U=()=>{_.isDraggingInternally=!1};return C.document.addEventListener("dragend",U),C.document.addEventListener("drop",U),()=>{C.document.removeEventListener("selectionchange",T),C.document.removeEventListener("dragend",U),C.document.removeEventListener("drop",U)}},[T,_]);var z=i([d,[]]),$=o&&d.children.length===1&&Array.from(ie.texts(d)).length===1&&ie.string(d)===""&&!D,re=c.useCallback(C=>{if(C&&$){var U;w((U=C.getBoundingClientRect())===null||U===void 0?void 0:U.height)}else w(void 0)},[$]);if($){var k=m.start(d,[]);z.push({[Rn]:!0,placeholder:o,onPlaceholderResize:re,anchor:k,focus:k})}var{marks:I}=d;if(_.hasMarkPlaceholder=!1,d.selection&&q.isCollapsed(d.selection)&&I){var{anchor:G}=d.selection,H=ie.leaf(d,G.path),Q=kn(H,Wy);if(!ce.equals(H,I,{loose:!0})){_.hasMarkPlaceholder=!0;var K=Object.fromEntries(Object.keys(Q).map(C=>[C,null]));z.push(jt(jt(jt({[Ll]:!0},K),I),{},{anchor:G,focus:G}))}}return c.useEffect(()=>{setTimeout(()=>{var{selection:C}=d;if(C){var{anchor:U}=C,W=ie.leaf(d,U.path);if(I&&!ce.equals(W,I,{loose:!0})){Ft.set(d,I);return}}Ft.delete(d)})}),c.createElement(Xl.Provider,{value:s},c.createElement(_y.Provider,{value:D},c.createElement(Zl.Provider,{value:i},c.createElement(Ny,{node:E,receivedUserInput:V},c.createElement(g,jt(jt({role:s?void 0:"textbox","aria-multiline":s?void 0:!0},v),{},{spellCheck:$t||!Gr?v.spellCheck:!1,autoCorrect:$t||!Gr?v.autoCorrect:"false",autoCapitalize:$t||!Gr?v.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!s,zindex:-1,suppressContentEditableWarning:!0,ref:X,style:jt(jt({},y?{}:jt({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},b?{minHeight:b}:{})),p),onBeforeInput:c.useCallback(C=>{if(!$t&&!s&&!gt(C,v.onBeforeInput)&&Z.hasSelectableTarget(d,C.target)&&(C.preventDefault(),!Z.isComposing(d))){var U=C.data;m.insertText(d,U)}},[v.onBeforeInput,d,s]),onInput:c.useCallback(C=>{if(!gt(C,v.onInput)){if(R.current){R.current.handleInput();return}for(var U of O.current)U();O.current=[]}},[v.onInput]),onBlur:c.useCallback(C=>{if(!(s||_.isUpdatingSelection||!Z.hasSelectableTarget(d,C.target)||gt(C,v.onBlur))){var U=Z.findDocumentOrShadowRoot(d);if(_.latestElement!==U.activeElement){var{relatedTarget:W}=C,F=Z.toDOMNode(d,d);if(W!==F&&!(Mt(W)&&W.hasAttribute("data-slate-spacer"))){if(W!=null&&rn(W)&&Z.hasDOMNode(d,W)){var J=Z.toSlateNode(d,W);if(le.isElement(J)&&!d.isVoid(J))return}if(Dn){var ne=or(U);ne==null||ne.removeAllRanges()}en.delete(d)}}}},[s,_.isUpdatingSelection,_.latestElement,d,v.onBlur]),onClick:c.useCallback(C=>{if(Z.hasTarget(d,C.target)&&!gt(C,v.onClick)&&rn(C.target)){var U=Z.toSlateNode(d,C.target),W=Z.findPath(d,U);if(!m.hasPath(d,W)||ie.get(d,W)!==U)return;if(C.detail===Fy&&W.length>=1){var F=W;if(!(le.isElement(U)&&m.isBlock(d,U))){var J,ne=m.above(d,{match:ye=>le.isElement(ye)&&m.isBlock(d,ye),at:W});F=(J=ne==null?void 0:ne[1])!==null&&J!==void 0?J:W.slice(0,1)}var Y=m.range(d,F);ee.select(d,Y);return}if(s)return;var ue=m.start(d,W),ae=m.end(d,W),de=m.void(d,{at:ue}),pe=m.void(d,{at:ae});if(de&&pe&&L.equals(de[1],pe[1])){var Ce=m.range(d,ue);ee.select(d,Ce)}}},[d,v.onClick,s]),onCompositionEnd:c.useCallback(C=>{if(Z.hasSelectableTarget(d,C.target)){var U;if(Z.isComposing(d)&&Promise.resolve().then(()=>{x(!1),En.set(d,!1)}),(U=R.current)===null||U===void 0||U.handleCompositionEnd(C),gt(C,v.onCompositionEnd)||vt)return;if(!Dn&&!k0&&!wl&&!R0&&!T0&&C.data){var W=Ft.get(d);Ft.delete(d),W!==void 0&&(Vt.set(d,d.marks),d.marks=W),m.insertText(d,C.data);var F=Vt.get(d);Vt.delete(d),F!==void 0&&(d.marks=F)}}},[v.onCompositionEnd,d]),onCompositionUpdate:c.useCallback(C=>{Z.hasSelectableTarget(d,C.target)&&!gt(C,v.onCompositionUpdate)&&(Z.isComposing(d)||(x(!0),En.set(d,!0)))},[v.onCompositionUpdate,d]),onCompositionStart:c.useCallback(C=>{if(Z.hasSelectableTarget(d,C.target)){var U;if((U=R.current)===null||U===void 0||U.handleCompositionStart(C),gt(C,v.onCompositionStart)||vt)return;x(!0);var{selection:W}=d;if(W&&q.isExpanded(W)){m.deleteFragment(d);return}}},[v.onCompositionStart,d]),onCopy:c.useCallback(C=>{Z.hasSelectableTarget(d,C.target)&&!gt(C,v.onCopy)&&!ec(C)&&(C.preventDefault(),Z.setFragmentData(d,C.clipboardData,"copy"))},[v.onCopy,d]),onCut:c.useCallback(C=>{if(!s&&Z.hasSelectableTarget(d,C.target)&&!gt(C,v.onCut)&&!ec(C)){C.preventDefault(),Z.setFragmentData(d,C.clipboardData,"cut");var{selection:U}=d;if(U)if(q.isExpanded(U))m.deleteFragment(d);else{var W=ie.parent(d,U.anchor.path);m.isVoid(d,W)&&ee.delete(d)}}},[s,d,v.onCut]),onDragOver:c.useCallback(C=>{if(Z.hasTarget(d,C.target)&&!gt(C,v.onDragOver)){var U=Z.toSlateNode(d,C.target);le.isElement(U)&&m.isVoid(d,U)&&C.preventDefault()}},[v.onDragOver,d]),onDragStart:c.useCallback(C=>{if(!s&&Z.hasTarget(d,C.target)&&!gt(C,v.onDragStart)){var U=Z.toSlateNode(d,C.target),W=Z.findPath(d,U),F=le.isElement(U)&&m.isVoid(d,U)||m.void(d,{at:W,voids:!0});if(F){var J=m.range(d,W);ee.select(d,J)}_.isDraggingInternally=!0,Z.setFragmentData(d,C.dataTransfer,"drag")}},[s,d,v.onDragStart,_]),onDrop:c.useCallback(C=>{if(!s&&Z.hasTarget(d,C.target)&&!gt(C,v.onDrop)){C.preventDefault();var U=d.selection,W=Z.findEventRange(d,C),F=C.dataTransfer;ee.select(d,W),_.isDraggingInternally&&U&&!q.equals(U,W)&&!m.void(d,{at:W,voids:!0})&&ee.delete(d,{at:U}),Z.insertData(d,F),Z.isFocused(d)||Z.focus(d)}},[s,d,v.onDrop,_]),onDragEnd:c.useCallback(C=>{!s&&_.isDraggingInternally&&v.onDragEnd&&Z.hasTarget(d,C.target)&&v.onDragEnd(C)},[s,_,v,d]),onFocus:c.useCallback(C=>{if(!s&&!_.isUpdatingSelection&&Z.hasEditableTarget(d,C.target)&&!gt(C,v.onFocus)){var U=Z.toDOMNode(d,d),W=Z.findDocumentOrShadowRoot(d);if(_.latestElement=W.activeElement,Tn&&C.target!==U){U.focus();return}en.set(d,!0)}},[s,_,d,v.onFocus]),onKeyDown:c.useCallback(C=>{if(!s&&Z.hasEditableTarget(d,C.target)){var U;(U=R.current)===null||U===void 0||U.handleKeyDown(C);var{nativeEvent:W}=C;if(Z.isComposing(d)&&W.isComposing===!1&&(En.set(d,!1),x(!1)),gt(C,v.onKeyDown)||Z.isComposing(d))return;var{selection:F}=d,J=d.children[F!==null?F.focus.path[0]:0],ne=Yu(ie.string(J))==="rtl";if(Qe.isRedo(W)){C.preventDefault();var Y=d;typeof Y.redo=="function"&&Y.redo();return}if(Qe.isUndo(W)){C.preventDefault();var ue=d;typeof ue.undo=="function"&&ue.undo();return}if(Qe.isMoveLineBackward(W)){C.preventDefault(),ee.move(d,{unit:"line",reverse:!0});return}if(Qe.isMoveLineForward(W)){C.preventDefault(),ee.move(d,{unit:"line"});return}if(Qe.isExtendLineBackward(W)){C.preventDefault(),ee.move(d,{unit:"line",edge:"focus",reverse:!0});return}if(Qe.isExtendLineForward(W)){C.preventDefault(),ee.move(d,{unit:"line",edge:"focus"});return}if(Qe.isMoveBackward(W)){C.preventDefault(),F&&q.isCollapsed(F)?ee.move(d,{reverse:!ne}):ee.collapse(d,{edge:ne?"end":"start"});return}if(Qe.isMoveForward(W)){C.preventDefault(),F&&q.isCollapsed(F)?ee.move(d,{reverse:ne}):ee.collapse(d,{edge:ne?"start":"end"});return}if(Qe.isMoveWordBackward(W)){C.preventDefault(),F&&q.isExpanded(F)&&ee.collapse(d,{edge:"focus"}),ee.move(d,{unit:"word",reverse:!ne});return}if(Qe.isMoveWordForward(W)){C.preventDefault(),F&&q.isExpanded(F)&&ee.collapse(d,{edge:"focus"}),ee.move(d,{unit:"word",reverse:ne});return}if($t){if((Bl||Dn)&&F&&(Qe.isDeleteBackward(W)||Qe.isDeleteForward(W))&&q.isCollapsed(F)){var ae=ie.parent(d,F.anchor.path);if(le.isElement(ae)&&m.isVoid(d,ae)&&(m.isInline(d,ae)||m.isBlock(d,ae))){C.preventDefault(),m.deleteBackward(d,{unit:"block"});return}}}else{if(Qe.isBold(W)||Qe.isItalic(W)||Qe.isTransposeCharacter(W)){C.preventDefault();return}if(Qe.isSoftBreak(W)){C.preventDefault(),m.insertSoftBreak(d);return}if(Qe.isSplitBlock(W)){C.preventDefault(),m.insertBreak(d);return}if(Qe.isDeleteBackward(W)){C.preventDefault(),F&&q.isExpanded(F)?m.deleteFragment(d,{direction:"backward"}):m.deleteBackward(d);return}if(Qe.isDeleteForward(W)){C.preventDefault(),F&&q.isExpanded(F)?m.deleteFragment(d,{direction:"forward"}):m.deleteForward(d);return}if(Qe.isDeleteLineBackward(W)){C.preventDefault(),F&&q.isExpanded(F)?m.deleteFragment(d,{direction:"backward"}):m.deleteBackward(d,{unit:"line"});return}if(Qe.isDeleteLineForward(W)){C.preventDefault(),F&&q.isExpanded(F)?m.deleteFragment(d,{direction:"forward"}):m.deleteForward(d,{unit:"line"});return}if(Qe.isDeleteWordBackward(W)){C.preventDefault(),F&&q.isExpanded(F)?m.deleteFragment(d,{direction:"backward"}):m.deleteBackward(d,{unit:"word"});return}if(Qe.isDeleteWordForward(W)){C.preventDefault(),F&&q.isExpanded(F)?m.deleteFragment(d,{direction:"forward"}):m.deleteForward(d,{unit:"word"});return}}}},[s,d,v.onKeyDown]),onPaste:c.useCallback(C=>{!s&&Z.hasEditableTarget(d,C.target)&&!gt(C,v.onPaste)&&(!$t||N0(C.nativeEvent)||Dn)&&(C.preventDefault(),Z.insertData(d,C.clipboardData))},[s,d,v.onPaste])}),c.createElement(Uy,{decorations:z,node:d,renderElement:u,renderPlaceholder:f,renderLeaf:l,selection:d.selection}))))))}),Vy=t=>{var{attributes:e,children:n}=t;return c.createElement("span",jt({},e),n,vt&&c.createElement("br",null))},qy=()=>[],Gy=(t,e)=>{if(e.getBoundingClientRect&&(!t.selection||t.selection&&q.isCollapsed(t.selection))){var n=e.startContainer.parentElement;n.getBoundingClientRect=e.getBoundingClientRect.bind(e),a0(n,{scrollMode:"if-needed"}),delete n.getBoundingClientRect}},gt=(t,e)=>{if(!e)return!1;var n=e(t);return n??(t.isDefaultPrevented()||t.isPropagationStopped())},ec=t=>rn(t.target)&&(t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement),Yy=(t,e)=>{if(!e)return!1;var n=e(t);return n??t.defaultPrevented},Zy=c.createContext(!1),Ky=c.createContext({});function Xy(t){var e=c.useRef([]).current,n=c.useRef({editor:t}).current,r=c.useCallback(a=>{n.editor=a,e.forEach(o=>o(a))},[e,n]),i=c.useMemo(()=>({getSlate:()=>n.editor,addEventListener:a=>(e.push(a),()=>{e.splice(e.indexOf(a),1)})}),[e,n]);return{selectorContext:i,onChange:r}}var Jy=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],Qy=t=>{var{editor:e,children:n,onChange:r,onSelectionChange:i,onValueChange:a,initialValue:o}=t,s=kn(t,Jy),[u,l]=c.useState(()=>{if(!ie.isNodeList(o))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(lt.stringify(o)));if(!m.isEditor(e))throw new Error("[Slate] editor is invalid! You passed: ".concat(lt.stringify(e)));return e.children=o,Object.assign(e,s),{v:0,editor:e}}),{selectorContext:f,onChange:h}=Xy(e),p=c.useCallback(v=>{var d;switch(r&&r(e.children),v==null||(d=v.operation)===null||d===void 0?void 0:d.type){case"set_selection":i==null||i(e.selection);break;default:a==null||a(e.children)}l(D=>({v:D.v+1,editor:e})),h(e)},[e,h,r,i,a]);c.useEffect(()=>(Ba.set(e,p),()=>{Ba.set(e,()=>{})}),[e,p]);var[g,y]=c.useState(Z.isFocused(e));return c.useEffect(()=>{y(Z.isFocused(e))},[e]),sr(()=>{var v=()=>y(Z.isFocused(e));return El>=17?(document.addEventListener("focusin",v),document.addEventListener("focusout",v),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",v)}):(document.addEventListener("focus",v,!0),document.addEventListener("blur",v,!0),()=>{document.removeEventListener("focus",v,!0),document.removeEventListener("blur",v,!0)})},[]),c.createElement(Ky.Provider,{value:f},c.createElement(Jl.Provider,{value:u},c.createElement(ya.Provider,{value:u.editor},c.createElement(Zy.Provider,{value:g},n))))},tc=(t,e)=>{var n=(e.top+e.bottom)/2;return t.top<=n&&t.bottom>=n},nc=(t,e,n)=>{var r=Z.toDOMRange(t,e).getBoundingClientRect(),i=Z.toDOMRange(t,n).getBoundingClientRect();return tc(r,i)&&tc(i,r)},$y=(t,e)=>{var n=m.range(t,q.end(e)),r=Array.from(m.positions(t,{at:e})),i=0,a=r.length,o=Math.floor(a/2);if(nc(t,m.range(t,r[i]),n))return m.range(t,r[i],n);if(r.length<2)return m.range(t,r[r.length-1],n);for(;o!==r.length&&o!==i;)nc(t,m.range(t,r[o]),n)?a=o:i=o,o=Math.floor((i+a)/2);return m.range(t,r[a],n)};function rc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ic(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?rc(Object(n),!0).forEach(function(r){Pt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):rc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var eC=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x-slate-fragment",r=e,{apply:i,onChange:a,deleteBackward:o,addMark:s,removeMark:u}=r;return Kr.set(r,new WeakMap),r.addMark=(l,f)=>{var h,p;(h=Sa.get(r))===null||h===void 0||h(),!Ft.get(r)&&(p=bt.get(r))!==null&&p!==void 0&&p.length&&Ft.set(r,null),Vt.delete(r),s(l,f)},r.removeMark=l=>{var f;!Ft.get(r)&&(f=bt.get(r))!==null&&f!==void 0&&f.length&&Ft.set(r,null),Vt.delete(r),u(l)},r.deleteBackward=l=>{if(l!=="line")return o(l);if(r.selection&&q.isCollapsed(r.selection)){var f=m.above(r,{match:y=>le.isElement(y)&&m.isBlock(r,y),at:r.selection});if(f){var[,h]=f,p=m.range(r,h,r.selection.anchor),g=$y(r,p);q.isCollapsed(g)||ee.delete(r,{at:g})}}},r.apply=l=>{var f=[],h=[],p=bt.get(r);if(p!=null&&p.length){var g=p.map(T=>$0(T,l)).filter(Boolean);bt.set(r,g)}var y=nn.get(r);y&&nn.set(r,jl(r,y,l));var v=tn.get(r);if(v!=null&&v.at){var d=Le.isPoint(v==null?void 0:v.at)?Ma(r,v.at,l):jl(r,v.at,l);tn.set(r,d?ic(ic({},v),{},{at:d}):null)}switch(l.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{f.push(...In(r,l.path));break}case"set_selection":{var D;(D=ar.get(r))===null||D===void 0||D.unref(),ar.delete(r);break}case"insert_node":case"remove_node":{f.push(...In(r,L.parent(l.path)));break}case"merge_node":{var x=L.previous(l.path);f.push(...In(r,x));break}case"move_node":{var E=L.common(L.parent(l.path),L.parent(l.newPath));f.push(...In(r,E));var O;L.isBefore(l.path,l.newPath)?(f.push(...In(r,L.parent(l.path))),O=l.newPath):(f.push(...In(r,L.parent(l.newPath))),O=l.path);var b=ie.get(e,L.parent(O)),w=Z.findKey(r,b),A=m.pathRef(r,L.parent(O));h.push([A,w]);break}}i(l);for(var[M,V]of f){var[P]=m.node(r,M);Zr.set(P,V)}for(var[_,R]of h)if(_.current){var[N]=m.node(r,_.current);Zr.set(N,R)}},r.setFragmentData=l=>{var{selection:f}=r;if(f){var[h,p]=q.edges(f),g=m.void(r,{at:h.path}),y=m.void(r,{at:p.path});if(!(q.isCollapsed(f)&&!g)){var v=Z.toDOMRange(r,f),d=v.cloneContents(),D=d.childNodes[0];if(d.childNodes.forEach(P=>{P.textContent&&P.textContent.trim()!==""&&(D=P)}),y){var[x]=y,E=v.cloneRange(),O=Z.toDOMNode(r,x);E.setEndAfter(O),d=E.cloneContents()}if(g&&(D=d.querySelector("[data-slate-spacer]")),Array.from(d.querySelectorAll("[data-slate-zero-width]")).forEach(P=>{var _=P.getAttribute("data-slate-zero-width")==="n";P.textContent=_?`
91
- `:""}),Pl(D)){var b=D.ownerDocument.createElement("span");b.style.whiteSpace="pre",b.appendChild(D),d.appendChild(b),D=b}var w=r.getFragment(),A=JSON.stringify(w),M=window.btoa(encodeURIComponent(A));D.setAttribute("data-slate-fragment",M),l.setData("application/".concat(n),M);var V=d.ownerDocument.createElement("div");return V.appendChild(d),V.setAttribute("hidden","true"),d.ownerDocument.body.appendChild(V),l.setData("text/html",V.innerHTML),l.setData("text/plain",Fl(V)),d.ownerDocument.body.removeChild(V),l}}},r.insertData=l=>{r.insertFragmentData(l)||r.insertTextData(l)},r.insertFragmentData=l=>{var f=l.getData("application/".concat(n))||H0(l);if(f){var h=decodeURIComponent(window.atob(f)),p=JSON.parse(h);return r.insertFragment(p),!0}return!1},r.insertTextData=l=>{var f=l.getData("text/plain");if(f){var h=f.split(/\r\n|\r|\n/),p=!1;for(var g of h)p&&ee.splitNodes(r,{always:!0}),r.insertText(g),p=!0;return!0}return!1},r.onChange=l=>{var f=El<18?Yt.unstable_batchedUpdates:h=>h();f(()=>{var h=Ba.get(r);h&&h(l),a(l)})},r},In=(t,e)=>{var n=[];for(var[r,i]of m.levels(t,{at:e})){var a=Z.findKey(t,r);n.push([i,a])}return n};function ac(t,e,n="type"){const{selection:r}=t;if(!r)return!1;const[i]=Array.from(m.nodes(t,{at:m.unhangRange(t,r),match:a=>!m.isEditor(a)&&le.isElement(a)&&a[n]===e}));return!!i}const oc=["listItem","numberedList"],Jr=["left","center","right","justify"];function tC(t,e){const n=Jr.includes(e)?"align":"type",r=ac(t,e,n),i=oc.includes(e);ee.unwrapNodes(t,{match:o=>!m.isEditor(o)&&le.isElement(o)&&oc.includes(o.type)&&!Jr.includes(e),split:!0});let a;if(Jr.includes(e)?a={align:r?void 0:e}:a={type:r?"paragraph":i?"listItem":e},ee.setNodes(t,a),!r&&i){const o={type:e,children:[]};ee.wrapNodes(t,o)}}function wn({format:t,icon:e}){const n=Ta(),r=Jr.includes(t)?"align":"type",a=ac(n,t,r)?"activeTrue":"activeFalse";function o(s){s.preventDefault(),tC(n,t)}return B.jsx("button",{type:"button",className:"arkynRichTextBlockButton "+a,onMouseDown:o,children:B.jsx(e,{})})}function nC({attributes:t,children:e,element:n}){const r={textAlign:n.align};switch(n.type){case"blockQuote":return B.jsx("blockquote",{className:"arkynElementBlockquote",style:r,...t,children:e});case"bulletedList":return B.jsx("ul",{className:"arkynElementBulletList",style:r,...t,children:e});case"headingOne":return B.jsx("h1",{className:"arkynElementHeadingOne",style:r,...t,children:e});case"headingTwo":return B.jsx("h2",{className:"arkynElementHeadingTwo",style:r,...t,children:e});case"listItem":return B.jsx("li",{className:"arkynElementListItem",style:r,...t,children:e});case"numberedList":return B.jsx("ol",{className:"arkynElementNumberedList",style:r,...t,children:e});default:return B.jsx("p",{className:"arkynElementParagraph",style:r,...t,children:e})}}function rC({attributes:t,children:e,leaf:n}){return n.bold&&(e=B.jsx("strong",{children:e})),n.code&&(e=B.jsx("code",{children:e})),n.italic&&(e=B.jsx("em",{children:e})),n.underline&&(e=B.jsx("u",{children:e})),B.jsx("span",{...t,children:e})}function sc(t,e){const n=m.marks(t);return n?n[e]===!0:!1}function uc(t,e){sc(t,e)?m.removeMark(t,e):m.addMark(t,e,!0)}function Qr({format:t,icon:e}){const n=Ta(),i=sc(n,t)?"activeTrue":"activeFalse";function a(o){o.preventDefault(),uc(n,t)}return B.jsx("button",{type:"button",className:"arkynRichTextMarkButton "+i,onMouseDown:a,children:B.jsx(e,{})})}function iC({children:t}){return B.jsx("div",{className:"arkynRichTextToolbar",children:t})}const lc={"mod+b":"bold","mod+i":"italic","mod+u":"underline","mod+`":"code"},aC=[{type:"paragraph",children:[{text:""}]}];var cc={},Ra={},Ia={};Object.defineProperty(Ia,"__esModule",{value:!0}),Ia.default=lC;var fc="html",dc="head",$r="body",oC=/<([a-zA-Z]+[0-9]?)/,pc=/<head[^]*>/i,hc=/<body[^]*>/i,ei=function(t,e){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},ja=function(t,e){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},vc=typeof window=="object"&&window.DOMParser;if(typeof vc=="function"){var sC=new vc,uC="text/html";ja=function(t,e){return e&&(t="<".concat(e,">").concat(t,"</").concat(e,">")),sC.parseFromString(t,uC)},ei=ja}if(typeof document=="object"&&document.implementation){var ti=document.implementation.createHTMLDocument();ei=function(t,e){if(e){var n=ti.documentElement.querySelector(e);return n&&(n.innerHTML=t),ti}return ti.documentElement.innerHTML=t,ti}}var ni=typeof document=="object"&&document.createElement("template"),Na;ni&&ni.content&&(Na=function(t){return ni.innerHTML=t,ni.content.childNodes});function lC(t){var e,n,r=t.match(oC),i=r&&r[1]?r[1].toLowerCase():"";switch(i){case fc:{var a=ja(t);if(!pc.test(t)){var o=a.querySelector(dc);(e=o==null?void 0:o.parentNode)===null||e===void 0||e.removeChild(o)}if(!hc.test(t)){var o=a.querySelector($r);(n=o==null?void 0:o.parentNode)===null||n===void 0||n.removeChild(o)}return a.querySelectorAll(fc)}case dc:case $r:{var s=ei(t).querySelectorAll(i);return hc.test(t)&&pc.test(t)?s[0].parentNode.childNodes:s}default:{if(Na)return Na(t);var o=ei(t,$r).querySelector($r);return o.childNodes}}}var ri={},_a={},za={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0;var e;(function(r){r.Root="root",r.Text="text",r.Directive="directive",r.Comment="comment",r.Script="script",r.Style="style",r.Tag="tag",r.CDATA="cdata",r.Doctype="doctype"})(e=t.ElementType||(t.ElementType={}));function n(r){return r.type===e.Tag||r.type===e.Script||r.type===e.Style}t.isTag=n,t.Root=e.Root,t.Text=e.Text,t.Directive=e.Directive,t.Comment=e.Comment,t.Script=e.Script,t.Style=e.Style,t.Tag=e.Tag,t.CDATA=e.CDATA,t.Doctype=e.Doctype})(za);var Fe={},an=qe&&qe.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ur=qe&&qe.__assign||function(){return ur=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},ur.apply(this,arguments)};Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.cloneNode=Fe.hasChildren=Fe.isDocument=Fe.isDirective=Fe.isComment=Fe.isText=Fe.isCDATA=Fe.isTag=Fe.Element=Fe.Document=Fe.CDATA=Fe.NodeWithChildren=Fe.ProcessingInstruction=Fe.Comment=Fe.Text=Fe.DataNode=Fe.Node=void 0;var Et=za,Wa=function(){function t(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),t.prototype.cloneNode=function(e){return e===void 0&&(e=!1),Ua(this,e)},t}();Fe.Node=Wa;var ii=function(t){an(e,t);function e(n){var r=t.call(this)||this;return r.data=n,r}return Object.defineProperty(e.prototype,"nodeValue",{get:function(){return this.data},set:function(n){this.data=n},enumerable:!1,configurable:!0}),e}(Wa);Fe.DataNode=ii;var gc=function(t){an(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type=Et.ElementType.Text,n}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),e}(ii);Fe.Text=gc;var mc=function(t){an(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type=Et.ElementType.Comment,n}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),e}(ii);Fe.Comment=mc;var yc=function(t){an(e,t);function e(n,r){var i=t.call(this,r)||this;return i.name=n,i.type=Et.ElementType.Directive,i}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),e}(ii);Fe.ProcessingInstruction=yc;var ai=function(t){an(e,t);function e(n){var r=t.call(this)||this;return r.children=n,r}return Object.defineProperty(e.prototype,"firstChild",{get:function(){var n;return(n=this.children[0])!==null&&n!==void 0?n:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childNodes",{get:function(){return this.children},set:function(n){this.children=n},enumerable:!1,configurable:!0}),e}(Wa);Fe.NodeWithChildren=ai;var Cc=function(t){an(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type=Et.ElementType.CDATA,n}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),e}(ai);Fe.CDATA=Cc;var Dc=function(t){an(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type=Et.ElementType.Root,n}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),e}(ai);Fe.Document=Dc;var bc=function(t){an(e,t);function e(n,r,i,a){i===void 0&&(i=[]),a===void 0&&(a=n==="script"?Et.ElementType.Script:n==="style"?Et.ElementType.Style:Et.ElementType.Tag);var o=t.call(this,i)||this;return o.name=n,o.attribs=r,o.type=a,o}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tagName",{get:function(){return this.name},set:function(n){this.name=n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attributes",{get:function(){var n=this;return Object.keys(this.attribs).map(function(r){var i,a;return{name:r,value:n.attribs[r],namespace:(i=n["x-attribsNamespace"])===null||i===void 0?void 0:i[r],prefix:(a=n["x-attribsPrefix"])===null||a===void 0?void 0:a[r]}})},enumerable:!1,configurable:!0}),e}(ai);Fe.Element=bc;function Ec(t){return(0,Et.isTag)(t)}Fe.isTag=Ec;function wc(t){return t.type===Et.ElementType.CDATA}Fe.isCDATA=wc;function xc(t){return t.type===Et.ElementType.Text}Fe.isText=xc;function Bc(t){return t.type===Et.ElementType.Comment}Fe.isComment=Bc;function Sc(t){return t.type===Et.ElementType.Directive}Fe.isDirective=Sc;function Ac(t){return t.type===Et.ElementType.Root}Fe.isDocument=Ac;function cC(t){return Object.prototype.hasOwnProperty.call(t,"children")}Fe.hasChildren=cC;function Ua(t,e){e===void 0&&(e=!1);var n;if(xc(t))n=new gc(t.data);else if(Bc(t))n=new mc(t.data);else if(Ec(t)){var r=e?Ha(t.children):[],i=new bc(t.name,ur({},t.attribs),r);r.forEach(function(u){return u.parent=i}),t.namespace!=null&&(i.namespace=t.namespace),t["x-attribsNamespace"]&&(i["x-attribsNamespace"]=ur({},t["x-attribsNamespace"])),t["x-attribsPrefix"]&&(i["x-attribsPrefix"]=ur({},t["x-attribsPrefix"])),n=i}else if(wc(t)){var r=e?Ha(t.children):[],a=new Cc(r);r.forEach(function(l){return l.parent=a}),n=a}else if(Ac(t)){var r=e?Ha(t.children):[],o=new Dc(r);r.forEach(function(l){return l.parent=o}),t["x-mode"]&&(o["x-mode"]=t["x-mode"]),n=o}else if(Sc(t)){var s=new yc(t.name,t.data);t["x-name"]!=null&&(s["x-name"]=t["x-name"],s["x-publicId"]=t["x-publicId"],s["x-systemId"]=t["x-systemId"]),n=s}else throw new Error("Not implemented yet: ".concat(t.type));return n.startIndex=t.startIndex,n.endIndex=t.endIndex,t.sourceCodeLocation!=null&&(n.sourceCodeLocation=t.sourceCodeLocation),n}Fe.cloneNode=Ua;function Ha(t){for(var e=t.map(function(r){return Ua(r,!0)}),n=1;n<e.length;n++)e[n].prev=e[n-1],e[n-1].next=e[n];return e}(function(t){var e=qe&&qe.__createBinding||(Object.create?function(s,u,l,f){f===void 0&&(f=l);var h=Object.getOwnPropertyDescriptor(u,l);(!h||("get"in h?!u.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return u[l]}}),Object.defineProperty(s,f,h)}:function(s,u,l,f){f===void 0&&(f=l),s[f]=u[l]}),n=qe&&qe.__exportStar||function(s,u){for(var l in s)l!=="default"&&!Object.prototype.hasOwnProperty.call(u,l)&&e(u,s,l)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var r=za,i=Fe;n(Fe,t);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},o=function(){function s(u,l,f){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof l=="function"&&(f=l,l=a),typeof u=="object"&&(l=u,u=void 0),this.callback=u??null,this.options=l??a,this.elementCB=f??null}return s.prototype.onparserinit=function(u){this.parser=u},s.prototype.onreset=function(){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},s.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},s.prototype.onerror=function(u){this.handleCallback(u)},s.prototype.onclosetag=function(){this.lastNode=null;var u=this.tagStack.pop();this.options.withEndIndices&&(u.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(u)},s.prototype.onopentag=function(u,l){var f=this.options.xmlMode?r.ElementType.Tag:void 0,h=new i.Element(u,l,void 0,f);this.addNode(h),this.tagStack.push(h)},s.prototype.ontext=function(u){var l=this.lastNode;if(l&&l.type===r.ElementType.Text)l.data+=u,this.options.withEndIndices&&(l.endIndex=this.parser.endIndex);else{var f=new i.Text(u);this.addNode(f),this.lastNode=f}},s.prototype.oncomment=function(u){if(this.lastNode&&this.lastNode.type===r.ElementType.Comment){this.lastNode.data+=u;return}var l=new i.Comment(u);this.addNode(l),this.lastNode=l},s.prototype.oncommentend=function(){this.lastNode=null},s.prototype.oncdatastart=function(){var u=new i.Text(""),l=new i.CDATA([u]);this.addNode(l),u.parent=l,this.lastNode=u},s.prototype.oncdataend=function(){this.lastNode=null},s.prototype.onprocessinginstruction=function(u,l){var f=new i.ProcessingInstruction(u,l);this.addNode(f)},s.prototype.handleCallback=function(u){if(typeof this.callback=="function")this.callback(u,this.dom);else if(u)throw u},s.prototype.addNode=function(u){var l=this.tagStack[this.tagStack.length-1],f=l.children[l.children.length-1];this.options.withStartIndices&&(u.startIndex=this.parser.startIndex),this.options.withEndIndices&&(u.endIndex=this.parser.endIndex),l.children.push(u),f&&(u.prev=f,f.next=u),u.parent=l,this.lastNode=null},s}();t.DomHandler=o,t.default=o})(_a);var Lc={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce(function(e,n){return e[n.toLowerCase()]=n,e},{})})(Lc),Object.defineProperty(ri,"__esModule",{value:!0}),ri.formatAttributes=Oc,ri.formatDOM=Pc;var oi=_a,fC=Lc;function dC(t){return fC.CASE_SENSITIVE_TAG_NAMES_MAP[t]}function Oc(t){for(var e={},n=0,r=t.length;n<r;n++){var i=t[n];e[i.name]=i.value}return e}function pC(t){t=t.toLowerCase();var e=dC(t);return e||t}function Pc(t,e,n){e===void 0&&(e=null);for(var r=[],i,a=0,o=t.length;a<o;a++){var s=t[a];switch(s.nodeType){case 1:{var u=pC(s.nodeName);i=new oi.Element(u,Oc(s.attributes)),i.children=Pc(u==="template"?s.content.childNodes:s.childNodes,i);break}case 3:i=new oi.Text(s.nodeValue);break;case 8:i=new oi.Comment(s.nodeValue);break;default:continue}var l=r[a-1]||null;l&&(l.next=i),i.parent=e,i.prev=l,i.next=null,r.push(i)}return n&&(i=new oi.ProcessingInstruction(n.substring(0,n.indexOf(" ")).toLowerCase(),n),i.next=r[0]||null,i.parent=e,r.unshift(i),r[1]&&(r[1].prev=r[0])),r}var hC=qe&&qe.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.default=yC;var vC=hC(Ia),gC=ri,mC=/<(![a-zA-Z\s]+)>/;function yC(t){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];var e=t.match(mC),n=e?e[1]:void 0;return(0,gC.formatDOM)((0,vC.default)(t),null,n)}var si={},kt={},ui={},CC=0;ui.SAME=CC;var DC=1;ui.CAMELCASE=DC,ui.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1};const Mc=0,on=1,li=2,ci=3,Va=4,Fc=5,kc=6;function bC(t){return ft.hasOwnProperty(t)?ft[t]:null}function mt(t,e,n,r,i,a,o){this.acceptsBooleans=e===li||e===ci||e===Va,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=a,this.removeEmptyString=o}const ft={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(t=>{ft[t]=new mt(t,Mc,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([t,e])=>{ft[t]=new mt(t,on,!1,e,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(t=>{ft[t]=new mt(t,li,!1,t.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(t=>{ft[t]=new mt(t,li,!1,t,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(t=>{ft[t]=new mt(t,ci,!1,t.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(t=>{ft[t]=new mt(t,ci,!0,t,null,!1,!1)}),["capture","download"].forEach(t=>{ft[t]=new mt(t,Va,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(t=>{ft[t]=new mt(t,kc,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(t=>{ft[t]=new mt(t,Fc,!1,t.toLowerCase(),null,!1,!1)});const qa=/[\-\:]([a-z])/g,Ga=t=>t[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(t=>{const e=t.replace(qa,Ga);ft[e]=new mt(e,on,!1,t,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(t=>{const e=t.replace(qa,Ga);ft[e]=new mt(e,on,!1,t,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(t=>{const e=t.replace(qa,Ga);ft[e]=new mt(e,on,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(t=>{ft[t]=new mt(t,on,!1,t.toLowerCase(),null,!1,!1)});const EC="xlinkHref";ft[EC]=new mt("xlinkHref",on,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(t=>{ft[t]=new mt(t,on,!1,t.toLowerCase(),null,!0,!0)});const{CAMELCASE:wC,SAME:xC,possibleStandardNames:Tc}=ui,BC=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",SC=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+BC+"]*$")),AC=Object.keys(Tc).reduce((t,e)=>{const n=Tc[e];return n===xC?t[e]=e:n===wC?t[e.toLowerCase()]=e:t[e]=n,t},{});kt.BOOLEAN=ci,kt.BOOLEANISH_STRING=li,kt.NUMERIC=Fc,kt.OVERLOADED_BOOLEAN=Va,kt.POSITIVE_NUMERIC=kc,kt.RESERVED=Mc,kt.STRING=on,kt.getPropertyInfo=bC,kt.isCustomAttribute=SC,kt.possibleStandardNames=AC;var Ya={},Za={},Rc=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,LC=/\n/g,OC=/^\s*/,PC=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,MC=/^:\s*/,FC=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,kC=/^[;\s]*/,TC=/^\s+|\s+$/g,RC=`
92
- `,Ic="/",jc="*",xn="",IC="comment",jC="declaration",NC=function(t,e){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var n=1,r=1;function i(y){var v=y.match(LC);v&&(n+=v.length);var d=y.lastIndexOf(RC);r=~d?y.length-d:r+y.length}function a(){var y={line:n,column:r};return function(v){return v.position=new o(y),l(),v}}function o(y){this.start=y,this.end={line:n,column:r},this.source=e.source}o.prototype.content=t;function s(y){var v=new Error(e.source+":"+n+":"+r+": "+y);if(v.reason=y,v.filename=e.source,v.line=n,v.column=r,v.source=t,!e.silent)throw v}function u(y){var v=y.exec(t);if(v){var d=v[0];return i(d),t=t.slice(d.length),v}}function l(){u(OC)}function f(y){var v;for(y=y||[];v=h();)v!==!1&&y.push(v);return y}function h(){var y=a();if(!(Ic!=t.charAt(0)||jc!=t.charAt(1))){for(var v=2;xn!=t.charAt(v)&&(jc!=t.charAt(v)||Ic!=t.charAt(v+1));)++v;if(v+=2,xn===t.charAt(v-1))return s("End of comment missing");var d=t.slice(2,v-2);return r+=2,i(d),t=t.slice(v),r+=2,y({type:IC,comment:d})}}function p(){var y=a(),v=u(PC);if(v){if(h(),!u(MC))return s("property missing ':'");var d=u(FC),D=y({type:jC,property:Nc(v[0].replace(Rc,xn)),value:d?Nc(d[0].replace(Rc,xn)):xn});return u(kC),D}}function g(){var y=[];f(y);for(var v;v=p();)v!==!1&&(y.push(v),f(y));return y}return l(),g()};function Nc(t){return t?t.replace(TC,xn):xn}var _C=qe&&qe.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Za,"__esModule",{value:!0}),Za.default=WC;var zC=_C(NC);function WC(t,e){var n=null;if(!t||typeof t!="string")return n;var r=(0,zC.default)(t),i=typeof e=="function";return r.forEach(function(a){if(a.type==="declaration"){var o=a.property,s=a.value;i?e(o,s,a):s&&(n=n||{},n[o]=s)}}),n}var fi={};Object.defineProperty(fi,"__esModule",{value:!0}),fi.camelCase=void 0;var UC=/^--[a-zA-Z0-9-]+$/,HC=/-([a-z])/g,VC=/^[^-]+$/,qC=/^-(webkit|moz|ms|o|khtml)-/,GC=/^-(ms)-/,YC=function(t){return!t||VC.test(t)||UC.test(t)},ZC=function(t,e){return e.toUpperCase()},_c=function(t,e){return"".concat(e,"-")},KC=function(t,e){return e===void 0&&(e={}),YC(t)?t:(t=t.toLowerCase(),e.reactCompat?t=t.replace(GC,_c):t=t.replace(qC,_c),t.replace(HC,ZC))};fi.camelCase=KC;var XC=qe&&qe.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},JC=XC(Za),QC=fi;function Ka(t,e){var n={};return!t||typeof t!="string"||(0,JC.default)(t,function(r,i){r&&i&&(n[(0,QC.camelCase)(r,e)]=i)}),n}Ka.default=Ka;var $C=Ka;(function(t){var e=qe&&qe.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=a,t.setStyleProp=s;var n=c,r=e($C),i=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function a(f,h){return f.includes("-")?!i.has(f):!!(h&&typeof h.is=="string")}var o={reactCompat:!0};function s(f,h){if(typeof f=="string"){if(!f.trim()){h.style={};return}try{h.style=(0,r.default)(f,o)}catch{h.style={}}}}t.PRESERVE_CUSTOM_ATTRIBUTES=Number(n.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var u=function(f){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(f.name)};t.canTextBeChildOfNode=u;var l=function(f){return f};t.returnFirstArg=l})(Ya),Object.defineProperty(si,"__esModule",{value:!0}),si.default=rD;var lr=kt,zc=Ya,eD=["checked","value"],tD=["input","select","textarea"],nD={reset:!0,submit:!0};function rD(t,e){t===void 0&&(t={});var n={},r=!!(t.type&&nD[t.type]);for(var i in t){var a=t[i];if((0,lr.isCustomAttribute)(i)){n[i]=a;continue}var o=i.toLowerCase(),s=Wc(o);if(s){var u=(0,lr.getPropertyInfo)(s);switch(eD.includes(s)&&tD.includes(e)&&!r&&(s=Wc("default"+o)),n[s]=a,u&&u.type){case lr.BOOLEAN:n[s]=!0;break;case lr.OVERLOADED_BOOLEAN:a===""&&(n[s]=!0);break}continue}zc.PRESERVE_CUSTOM_ATTRIBUTES&&(n[i]=a)}return(0,zc.setStyleProp)(t.style,n),n}function Wc(t){return lr.possibleStandardNames[t]}var Xa={},iD=qe&&qe.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Xa,"__esModule",{value:!0}),Xa.default=Uc;var Ja=c,aD=iD(si),cr=Ya,oD={cloneElement:Ja.cloneElement,createElement:Ja.createElement,isValidElement:Ja.isValidElement};function Uc(t,e){e===void 0&&(e={});for(var n=[],r=typeof e.replace=="function",i=e.transform||cr.returnFirstArg,a=e.library||oD,o=a.cloneElement,s=a.createElement,u=a.isValidElement,l=t.length,f=0;f<l;f++){var h=t[f];if(r){var p=e.replace(h,f);if(u(p)){l>1&&(p=o(p,{key:p.key||f})),n.push(i(p,h,f));continue}}if(h.type==="text"){var g=!h.data.trim().length;if(g&&h.parent&&!(0,cr.canTextBeChildOfNode)(h.parent)||e.trim&&g)continue;n.push(i(h.data,h,f));continue}var y=h,v={};sD(y)?((0,cr.setStyleProp)(y.attribs.style,y.attribs),v=y.attribs):y.attribs&&(v=(0,aD.default)(y.attribs,y.name));var d=void 0;switch(h.type){case"script":case"style":h.children[0]&&(v.dangerouslySetInnerHTML={__html:h.children[0].data});break;case"tag":h.name==="textarea"&&h.children[0]?v.defaultValue=h.children[0].data:h.children&&h.children.length&&(d=Uc(h.children,e));break;default:continue}l>1&&(v.key=f),n.push(i(s(h.name,v,d),h,f))}return n.length===1?n[0]:n}function sD(t){return cr.PRESERVE_CUSTOM_ATTRIBUTES&&t.type==="tag"&&(0,cr.isCustomComponent)(t.name,t.attribs)}(function(t){var e=qe&&qe.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0,t.default=s;var n=e(Ra);t.htmlToDOM=n.default;var r=e(si);t.attributesToProps=r.default;var i=e(Xa);t.domToReact=i.default;var a=_a;Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return a.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return a.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return a.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return a.Text}});var o={lowerCaseAttributeNames:!1};function s(u,l){if(typeof u!="string")throw new TypeError("First argument must be a string");return u?(0,i.default)((0,n.default)(u,(l==null?void 0:l.htmlparser2)||o),l):[]}})(cc);const Hc=Er(cc),uD=Hc.default||Hc,Qa=t=>{if(typeof t=="string")return{text:t||""};function e(i){return i.map(a=>Qa(a))}const n=Array.isArray(t.props.children)?e(t.props.children):[{text:t.props.children}],r=typeof t.props.children=="string"?t.props.children:"";switch(t.type){case"p":return{type:"paragraph",children:n};case"blockquote":return{type:"blockQuote",children:n};case"ul":return{type:"bulletedList",children:n};case"h1":return{type:"headingOne",children:n};case"h2":return{type:"headingTwo",children:n};case"li":return{type:"listItem",children:n};case"ol":return{type:"numberedList",children:n};case"strong":return{text:r,bold:!0};case"code":return{text:r,code:!0};case"em":return{text:r,italic:!0};case"u":return{text:r,underline:!0};default:return{text:r}}},lD=t=>{const e=uD(t);return Array.isArray(e)?e.flatMap(n=>typeof n=="string"?{text:n}:Qa(n)):typeof e=="string"?[{text:e}]:[Qa(e)]};function Vc(t){return t.map(e=>ie.string(e)).join("")}const qc=t=>{if(ce.isText(t)){let e=t.text;return t.bold&&(e=`<strong>${e}</strong>`),t.code&&(e=`<code>${e}</code>`),t.italic&&(e=`<em>${e}</em>`),t.underline&&(e=`<u>${e}</u>`),e}if(le.isElement(t)){const e=t.children.map(n=>qc(n)).join("");switch(t.type){case"paragraph":return`<p>${e}</p>`;case"blockQuote":return`<blockquote>${e}</blockquote>`;case"bulletedList":return`<ul>${e}</ul>`;case"headingOne":return`<h1>${e}</h1>`;case"headingTwo":return`<h2>${e}</h2>`;case"listItem":return`<li>${e}</li>`;case"numberedList":return`<ol>${e}</ol>`;default:return e}}return""},Gc=t=>t.children.map(e=>qc(e)).join("");function cD({name:t,defaultValue:e,enforceCharacterLimit:n=!1,onChangeCharactersCount:r,maxLimit:i=2e3,onValueChange:a,onChange:o,isError:s}){const u=c.useMemo(()=>qg(eC(Ug())),[]),{id:l,inputRef:f,error:h}=xt(),p=c.useRef(null),g=e?lD(e):aC,y=Vc(g),[v,d]=c.useState(y.length),[D,x]=c.useState(e),[E,O]=c.useState(!1),b=f||p,w=s||!!h,A=c.useCallback(rC,[]),M=c.useCallback(nC,[]);function V(T){const j=Vc(T);d(j.length),r&&r(j.length),!(n&&j.length>=i)&&(x(Gc(u)),o&&o(T),a&&a(Gc(u)),u.children=T,ee.setNodes(u,{children:T}))}const P=E?"focusTrue":"focusFalse",R=`arkynRichText ${w||i<v?"errorTrue":"errorFalse"} ${P}`,N=i-v;return B.jsxs(Qy,{editor:u,initialValue:g,onChange:V,onValueChange:V,children:[B.jsxs("div",{className:R,children:[B.jsxs(iC,{children:[B.jsx(wn,{format:"headingOne",icon:Ae.Heading1}),B.jsx(wn,{format:"headingTwo",icon:Ae.Heading2}),B.jsx(wn,{format:"blockQuote",icon:Ae.Quote}),B.jsx(Qr,{format:"bold",icon:Ae.Bold}),B.jsx(Qr,{format:"italic",icon:Ae.Italic}),B.jsx(Qr,{format:"underline",icon:Ae.Underline}),B.jsx(Qr,{format:"code",icon:Ae.Code}),B.jsx(wn,{format:"left",icon:Ae.AlignLeft}),B.jsx(wn,{format:"right",icon:Ae.AlignRight}),B.jsx(wn,{format:"center",icon:Ae.AlignCenter}),B.jsx(wn,{format:"justify",icon:Ae.AlignJustify})]}),B.jsx(Hy,{className:"editorContainer",renderElement:M,renderLeaf:A,spellCheck:!0,id:l,onFocus:()=>O(!0),onBlur:()=>O(!1),onKeyDown:T=>{for(const j in lc)if(ch(j,T)){T.preventDefault();const X=lc[j];uc(u,X)}}}),N<0&&B.jsx("div",{className:"restatesCharacters",children:N})]}),B.jsx("input",{ref:b,type:"hidden",name:t,value:D}),B.jsx("input",{type:"hidden",name:`${t}Count`,value:v})]})}function fD(t,e){const{isLoading:n,isError:r,size:i="md",className:a="",variant:o="solid",prefix:s,leftIcon:u,disabled:l,readOnly:f,onFocus:h,onBlur:p,title:g,style:y,closeOnSelect:v=!0,...d}=t,b=`arkyn_select ${s?"hasPrefix":""} ${o} ${i} ${l||f||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${a}`,A={md:20,lg:20}[i];return{isLoading:n,className:b,prefix:cd(s,A,"prefix"),LeftIcon:u,disabled:l||n||f,onFocus:h,onBlur:p,title:g,closeOnSelect:v,style:y,iconSize:A,Spinner:B.jsx(Ae.Loader2,{className:"spinner",size:A,strokeWidth:2.5}),...d}}function dD(t){var G;const[e,n]=c.useState(!1),{inputRef:r,id:i,error:a}=xt(),o=c.useRef(null),s=r||o,u=t.isError||!!a,{disabled:l,title:f,style:h,className:p,prefix:g,iconSize:y,isLoading:v,LeftIcon:d,value:D=null,defaultValue:x="",onFocus:E,onBlur:O,Spinner:b,name:w,placeholder:A,onSelect:M,options:V,optionMaxHeight:P,closeOnSelect:_,...R}=fD({...t,id:i,isError:u},e),[N,T]=c.useState(x);function j(){l||!(s!=null&&s.current)||e||(n(!0),s.current.focus())}function X(H){e||(n(!0),E&&E(H))}function z(){n(!1),O&&s.current&&s.current.blur()}function $(H){const{label:Q,value:K}=H;T(N!==K?K:""),M&&M({label:Q,value:K}),_&&z()}const re=typeof D=="string"?D:N,k=((G=V.find(H=>H.value===re))==null?void 0:G.label)||"",I=()=>{if(!e&&k)return!0;if(!e&&!k)return!1;if(e&&k)return!0;if(e&&!k)return!1};return B.jsxs(B.Fragment,{children:[B.jsxs("section",{title:f,style:h,onClick:j,className:`${p} placeholder_dark_${I()}`,children:[g,d&&B.jsx(d,{size:y,strokeWidth:2.5}),B.jsx("input",{disabled:l,readOnly:!0,placeholder:k||A,onFocus:X,...R}),B.jsx("input",{type:"hidden",ref:s,name:w,value:re||"",readOnly:!0}),e&&B.jsxs("div",{className:"arkyn_select_content",style:{overflow:"auto",maxHeight:P},children:[V.map(({label:H,value:Q})=>B.jsxs("div",{onClick:()=>$({label:H,value:Q}),className:re===Q?"arkyn_select_option active":"arkyn_select_option",children:[H," ",B.jsx(Ae.Check,{})]},Q)),V.length<=0&&B.jsx("p",{children:"Sem opções disponíveis"})]}),!v&&B.jsx(Ae.ChevronDown,{className:"arkyn_select_arrow",size:y,strokeWidth:2.5}),v&&b]}),e&&B.jsx("aside",{className:"arkyn_select_overlay",onClick:z})]})}function pD(t){const{size:e="lg",defaultChecked:n=!1,checked:r=null,value:i,unCheckedValue:a="",name:o,className:s="",onCheck:u,...l}=t,[f,h]=c.useState(n),{id:p,inputRef:g}=xt(),y=typeof r=="boolean"?r:f;function v(){h(!f),u&&u(y?a:i||"checked")}const D=`arkynSwitch ${y?"checkedTrue":"checkedFalse"} ${e} ${s}`;return B.jsx("button",{type:"button",onClick:v,className:D,...l,children:B.jsx("input",{id:p,type:"hidden",name:o,ref:g,onClick:v,value:y?i||"checked":a})})}function hD(t){const{variant:e="solid",size:n="md",className:r,disabled:i=!1,readOnly:a=!1,onFocus:o,onBlur:s,title:u,style:l,...f}=t,[h,p]=c.useState(!1),{inputRef:g,id:y,error:v}=xt(),d=c.useRef(null),D=g||d,E=t.isError||!!v?"errorTrue":"errorFalse",w=`arkynTextarea ${e} ${n} ${i||a?"opacityTrue":"opacityFalse"} ${E} ${h?"focusedTrue":"focusedFalse"} ${r}`;function A(){i||!(D!=null&&D.current)||(p(!0),D.current.focus())}function M(P){p(!0),o&&o(P)}function V(P){p(!1),s&&s(P)}return B.jsx("section",{title:u,style:l,onClick:A,className:w,children:B.jsx("textarea",{id:y,disabled:i,readOnly:a,ref:D,onFocus:M,onBlur:V,...f})})}function vD(t){const{className:e="",...n}=t,r=`arkynBreadcrumbContainer ${e}`;return B.jsx("nav",{className:r,...n})}function gD(t){const{pathname:e}=Ln.useLocation(),{className:n="",disabled:r=!1,children:i,to:a,...o}=t,u=`arkynBreadcrumbLink ${e===a?"active":"inactive"} ${n}`;return r?B.jsxs("p",{className:u,children:[B.jsx(Ae.ChevronRight,{size:14,strokeWidth:2.5}),i]}):B.jsxs(Ln.Link,{to:a,className:u,...o,children:[B.jsx(Ae.ChevronRight,{size:14,strokeWidth:2.5}),i]})}function Yc(t=""){const e=Ln.useLocation(),n=new URLSearchParams(e.search),r=t?`${t}:`:"",i=a=>{Object.entries(a).forEach(([o,s])=>{s===void 0?n.delete(`${r}${o}`):n.set(`${r}${o}`,String(s))})};return{getParam:a=>n.get(`${r}${a}`),getScopedSearch:a=>{i(a);let o=n.toString();return o&&(o="?"+o),o}}}function mD(t){const{scope:e,totalCountRegisters:n,perPageKey:r="per_page",pageKey:i="page",siblingsCount:a=2,...o}=t,s=Ln.useNavigate(),{getParam:u,getScopedSearch:l}=Yc(e),f=Number(u(i))||1,h=Number(u(r))||20,p=Math.ceil(n/h),g=ld(f,a),y=ud(f,a,p);function v(d){s(l({page:d}))}return B.jsxs("div",{className:"arkynPagination",...o,children:[B.jsx("button",{className:"arkynPaginationIconButton",disabled:f<=1,onClick:()=>v(f-1),children:B.jsx(Ae.ChevronLeft,{})}),f>1+a&&B.jsxs(B.Fragment,{children:[B.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>v(1),children:"1"}),f>2+a&&B.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:B.jsx(Ae.Ellipsis,{})})]}),g.map((d,D)=>B.jsx("button",{onClick:()=>v(d),className:"arkynPaginationPageButton",children:d},D)),B.jsx("button",{className:"arkynPaginationCurrent",disabled:!0,children:f}),y.map((d,D)=>B.jsx("button",{onClick:()=>v(d),className:"arkynPaginationPageButton",children:d},D)),f+a<p&&B.jsxs(B.Fragment,{children:[f+1+a<p&&B.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:B.jsx(Ae.Ellipsis,{})}),B.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>v(p),children:p})]}),B.jsx("button",{className:"arkynPaginationIconButton",disabled:f>=p,onClick:()=>v(f+1),children:B.jsx(Ae.ChevronRight,{})})]})}const $a=c.createContext({});function yD(){if(!$a)throw new Error("useTabContext must be used within a TabProvider");return c.useContext($a)}function CD(t){const{children:e,onClick:n,defaultActive:r,className:i,...a}=t,[o,s]=c.useState(r||""),[u,l]=c.useState(!0),f=c.useRef(null),h=`arkynTabContainer ${i||""}`,[p,g]=c.useState({width:"0px",left:"0px",transition:"none"}),y=(d,D)=>{const x=d.getBoundingClientRect(),E=f.current.getBoundingClientRect(),O=D?void 0:"none";l(!1),g({transition:O,width:`${x.width}px`,left:`${x.left-E.left}px`})};c.useEffect(()=>{const d=f.current;if(!d)return;let D=null;D=d.querySelector("button.activeTrue"),D&&y(D)},[]);const v=d=>{const D=d.target;D&&(s(D.value),D.classList.add("activeTrue"),y(D,!0),n&&n(D.value))};return B.jsxs("nav",{ref:f,className:h.trim(),...a,children:[B.jsx($a.Provider,{value:{handleTabClick:v,showInitialTab:u,value:o},children:e}),B.jsx("div",{className:"activeLine",style:p})]})}function DD(t){const{children:e,className:n="",onClick:r,...i}=t,{value:a,showInitialTab:o,handleTabClick:s}=yD(),u=a===i.value&&a?"activeTrue":"activeFalse",f=`arkynTabButton ${a===i.value&&o?"showBorderBottom":""} ${u} ${n}`;function h(p){s(p),r&&r(p)}return B.jsx("button",{onClick:h,className:f.trim(),...i,children:e})}const Zc=c.createContext({});function bD(t){const{isVisibled:e,makeInvisible:n,orientation:r="left",children:i,className:a,...o}=t,s=r==="left"?"-100%":"100%",l=`arkynDrawerContainer ${r} ${e?"visibleTrue":"visibleFalse"} ${a}`;return B.jsx(Zc.Provider,{value:{makeInvisible:n},children:B.jsx(cn.AnimatePresence,{children:e&&B.jsxs("aside",{className:l.trim(),...o,children:[B.jsx(cn.motion.div,{className:"arkynDrawerContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),B.jsx(cn.motion.div,{className:"arkynDrawerContainerContent",transition:{ease:"easeOut",duration:.15},initial:{transform:`translateX(${s})`},animate:{transform:"translateX(0px)"},exit:{transform:`translateX(${s})`},children:i})]})})})}function ED(t){const{showCloseButton:e=!0,className:n,children:r,...i}=t,{makeInvisible:a}=c.useContext(Zc),o=`arkynDrawerHeader ${n}`;return B.jsxs("header",{className:o.trim(),...i,children:[r,e&&B.jsx("button",{className:"arkynDrawerHeaderCloseButton",type:"button",onClick:a,"aria-label":"Close drawer",children:B.jsx(Ae.X,{size:24})})]})}const Kc=c.createContext({});function wD(t){const{isVisibled:e,makeInvisible:n,children:r,className:i="",...a}=t,s=`arkynModalContainer ${e?"visibleTrue":"visibleFalse"} ${i}`;return B.jsx(Kc.Provider,{value:{makeInvisible:n},children:B.jsx(cn.AnimatePresence,{children:e&&B.jsxs("aside",{className:s.trim(),...a,children:[B.jsx(cn.motion.div,{className:"arkynModalContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),B.jsx(cn.motion.div,{className:"arkynModalContainerContent",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0,scale:.75},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},children:r})]})})})}function xD(t){const{alignment:e="right",className:n,...r}=t,i=`arkynModalFooter ${e} ${n}`;return B.jsx("footer",{className:i.trim(),...r})}function BD(t){const{showCloseButton:e=!0,className:n,children:r,...i}=t,{makeInvisible:a}=c.useContext(Kc),o=`arkynModalHeader ${n}`;return B.jsxs("header",{className:o.trim(),...i,children:[r,e&&B.jsx("button",{type:"button",onClick:a,"aria-label":"Close modal button",className:"arkynModalHeaderCloseButton",children:B.jsx(Ae.X,{size:24})})]})}function SD(t){const{children:e,button:n,closeOnClick:r,orientation:i="bottomLeft"}=t,[a,o]=c.useState(!1),u=`arkynPopover ${i} ${a?"visibleTrue":"visibleFalse"}`;function l(){a||o(!0)}return B.jsxs("div",{className:u,onClick:l,children:[n,B.jsx(cn.motion.div,{style:{visibility:a?"visible":"hidden"},transition:{ease:"easeOut",duration:0},initial:{opacity:0},animate:{opacity:a?1:0},exit:{opacity:0},onClick:()=>r&&o(!1),className:"arkynPopoverContent",children:e}),a&&B.jsx("div",{onClick:()=>o(!1),className:"arkynPopoverOverlay"})]})}function Xc(t){const{message:e,title:n,type:r,size:i="lg"}=t,a=`arkynToast ${r} ${i}`;function o(){switch(r){case"info":return B.jsx(Ae.Info,{});case"success":return B.jsx(Ae.CheckCircle2,{});case"danger":return B.jsx(Ae.XCircle,{});case"warning":return B.jsx(Ae.AlertCircle,{});default:return B.jsx(Ae.Info,{})}}return B.jsxs("aside",{className:a,children:[B.jsxs("div",{children:[B.jsx("div",{className:"bg"}),B.jsx(o,{})]}),B.jsxs("p",{children:[B.jsx("strong",{title:n,children:n}),B.jsx("span",{children:e})]})]})}function AD(t){const{text:e,size:n="lg",children:r,orientation:i="top",className:a="",...o}=t,s=`arkynTooltip ${n} ${i} ${a}`;return B.jsxs("div",{className:s.trim(),...o,children:[r,B.jsx("div",{className:"arkynTooltipText",children:e})]})}var nt={},eo={},fr={},dr={},Jc="Expected a function",Qc=NaN,LD="[object Symbol]",OD=/^\s+|\s+$/g,PD=/^[-+]0x[0-9a-f]+$/i,MD=/^0b[01]+$/i,FD=/^0o[0-7]+$/i,kD=parseInt,TD=typeof qe=="object"&&qe&&qe.Object===Object&&qe,RD=typeof self=="object"&&self&&self.Object===Object&&self,ID=TD||RD||Function("return this")(),jD=Object.prototype,ND=jD.toString,_D=Math.max,zD=Math.min,to=function(){return ID.Date.now()};function WD(t,e,n){var r,i,a,o,s,u,l=0,f=!1,h=!1,p=!0;if(typeof t!="function")throw new TypeError(Jc);e=$c(e)||0,di(n)&&(f=!!n.leading,h="maxWait"in n,a=h?_D($c(n.maxWait)||0,e):a,p="trailing"in n?!!n.trailing:p);function g(w){var A=r,M=i;return r=i=void 0,l=w,o=t.apply(M,A),o}function y(w){return l=w,s=setTimeout(D,e),f?g(w):o}function v(w){var A=w-u,M=w-l,V=e-A;return h?zD(V,a-M):V}function d(w){var A=w-u,M=w-l;return u===void 0||A>=e||A<0||h&&M>=a}function D(){var w=to();if(d(w))return x(w);s=setTimeout(D,v(w))}function x(w){return s=void 0,p&&r?g(w):(r=i=void 0,o)}function E(){s!==void 0&&clearTimeout(s),l=0,r=u=i=s=void 0}function O(){return s===void 0?o:x(to())}function b(){var w=to(),A=d(w);if(r=arguments,i=this,u=w,A){if(s===void 0)return y(u);if(h)return s=setTimeout(D,e),g(u)}return s===void 0&&(s=setTimeout(D,e)),o}return b.cancel=E,b.flush=O,b}function UD(t,e,n){var r=!0,i=!0;if(typeof t!="function")throw new TypeError(Jc);return di(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),WD(t,e,{leading:r,maxWait:e,trailing:i})}function di(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function HD(t){return!!t&&typeof t=="object"}function VD(t){return typeof t=="symbol"||HD(t)&&ND.call(t)==LD}function $c(t){if(typeof t=="number")return t;if(VD(t))return Qc;if(di(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=di(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(OD,"");var n=MD.test(t);return n||FD.test(t)?kD(t.slice(2),n?2:8):PD.test(t)?Qc:+t}var qD=UD,pr={};Object.defineProperty(pr,"__esModule",{value:!0}),pr.addPassiveEventListener=function(e,n,r){var i=r.name;i||(i=n,console.warn("Listener must be a named function.")),pi.has(n)||pi.set(n,new Set);var a=pi.get(n);if(!a.has(i)){var o=function(){var s=!1;try{var u=Object.defineProperty({},"passive",{get:function(){s=!0}});window.addEventListener("test",null,u)}catch{}return s}();e.addEventListener(n,r,o?{passive:!0}:!1),a.add(i)}},pr.removePassiveEventListener=function(e,n,r){e.removeEventListener(n,r),pi.get(n).delete(r.name||n)};var pi=new Map;Object.defineProperty(dr,"__esModule",{value:!0});var GD=qD,YD=KD(GD),ZD=pr;function KD(t){return t&&t.__esModule?t:{default:t}}var XD=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:66;return(0,YD.default)(e,n)},$e={spyCallbacks:[],spySetState:[],scrollSpyContainers:[],mount:function(e,n){if(e){var r=XD(function(i){$e.scrollHandler(e)},n);$e.scrollSpyContainers.push(e),(0,ZD.addPassiveEventListener)(e,"scroll",r)}},isMounted:function(e){return $e.scrollSpyContainers.indexOf(e)!==-1},currentPositionX:function(e){if(e===document){var n=window.pageYOffset!==void 0,r=(document.compatMode||"")==="CSS1Compat";return n?window.pageXOffset:r?document.documentElement.scrollLeft:document.body.scrollLeft}else return e.scrollLeft},currentPositionY:function(e){if(e===document){var n=window.pageXOffset!==void 0,r=(document.compatMode||"")==="CSS1Compat";return n?window.pageYOffset:r?document.documentElement.scrollTop:document.body.scrollTop}else return e.scrollTop},scrollHandler:function(e){var n=$e.scrollSpyContainers[$e.scrollSpyContainers.indexOf(e)].spyCallbacks||[];n.forEach(function(r){return r($e.currentPositionX(e),$e.currentPositionY(e))})},addStateHandler:function(e){$e.spySetState.push(e)},addSpyHandler:function(e,n){var r=$e.scrollSpyContainers[$e.scrollSpyContainers.indexOf(n)];r.spyCallbacks||(r.spyCallbacks=[]),r.spyCallbacks.push(e),e($e.currentPositionX(n),$e.currentPositionY(n))},updateStates:function(){$e.spySetState.forEach(function(e){return e()})},unmount:function(e,n){$e.scrollSpyContainers.forEach(function(r){return r.spyCallbacks&&r.spyCallbacks.length&&r.spyCallbacks.indexOf(n)>-1&&r.spyCallbacks.splice(r.spyCallbacks.indexOf(n),1)}),$e.spySetState&&$e.spySetState.length&&$e.spySetState.indexOf(e)>-1&&$e.spySetState.splice($e.spySetState.indexOf(e),1),document.removeEventListener("scroll",$e.scrollHandler)},update:function(){return $e.scrollSpyContainers.forEach(function(e){return $e.scrollHandler(e)})}};dr.default=$e;var jn={},hr={};Object.defineProperty(hr,"__esModule",{value:!0});var JD=function(e,n){var r=e.indexOf("#")===0?e.substring(1):e,i=r?"#"+r:"",a=window&&window.location,o=i?a.pathname+a.search+i:a.pathname+a.search;n?history.pushState(history.state,"",o):history.replaceState(history.state,"",o)},QD=function(){return window.location.hash.replace(/^#/,"")},$D=function(e){return function(n){return e.contains?e!=n&&e.contains(n):!!(e.compareDocumentPosition(n)&16)}},eb=function(e){return getComputedStyle(e).position!=="static"},no=function(e,n){for(var r=e.offsetTop,i=e.offsetParent;i&&!n(i);)r+=i.offsetTop,i=i.offsetParent;return{offsetTop:r,offsetParent:i}},tb=function(e,n,r){if(r)return e===document?n.getBoundingClientRect().left+(window.scrollX||window.pageXOffset):getComputedStyle(e).position!=="static"?n.offsetLeft:n.offsetLeft-e.offsetLeft;if(e===document)return n.getBoundingClientRect().top+(window.scrollY||window.pageYOffset);if(eb(e)){if(n.offsetParent!==e){var i=function(f){return f===e||f===document},a=no(n,i),o=a.offsetTop,s=a.offsetParent;if(s!==e)throw new Error("Seems containerElement is not an ancestor of the Element");return o}return n.offsetTop}if(n.offsetParent===e.offsetParent)return n.offsetTop-e.offsetTop;var u=function(f){return f===document};return no(n,u).offsetTop-no(e,u).offsetTop};hr.default={updateHash:JD,getHash:QD,filterElementInContainer:$D,scrollOffset:tb};var hi={},ro={};Object.defineProperty(ro,"__esModule",{value:!0}),ro.default={defaultEasing:function(e){return e<.5?Math.pow(e*2,2)/2:1-Math.pow((1-e)*2,2)/2},linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return e<.5?2*e*e:-1+(4-2*e)*e},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return--e*e*e+1},easeInOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1- --e*e*e*e},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1+--e*e*e*e*e},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}};var io={};Object.defineProperty(io,"__esModule",{value:!0});var nb=pr,rb=["mousedown","mousewheel","touchmove","keydown"];io.default={subscribe:function(e){return typeof document<"u"&&rb.forEach(function(n){return(0,nb.addPassiveEventListener)(document,n,e)})}};var vr={};Object.defineProperty(vr,"__esModule",{value:!0});var ao={registered:{},scrollEvent:{register:function(e,n){ao.registered[e]=n},remove:function(e){ao.registered[e]=null}}};vr.default=ao,Object.defineProperty(hi,"__esModule",{value:!0});var ib=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ab=hr;vi(ab);var ob=ro,ef=vi(ob),sb=io,ub=vi(sb),lb=vr,Nt=vi(lb);function vi(t){return t&&t.__esModule?t:{default:t}}var tf=function(e){return ef.default[e.smooth]||ef.default.defaultEasing},cb=function(e){return typeof e=="function"?e:function(){return e}},fb=function(){if(typeof window<"u")return window.requestAnimationFrame||window.webkitRequestAnimationFrame},oo=function(){return fb()||function(t,e,n){window.setTimeout(t,n||1e3/60,new Date().getTime())}}(),nf=function(){return{currentPosition:0,startPosition:0,targetPosition:0,progress:0,duration:0,cancel:!1,target:null,containerElement:null,to:null,start:null,delta:null,percent:null,delayTimeout:null}},rf=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollLeft;var r=window.pageXOffset!==void 0,i=(document.compatMode||"")==="CSS1Compat";return r?window.pageXOffset:i?document.documentElement.scrollLeft:document.body.scrollLeft},af=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollTop;var r=window.pageXOffset!==void 0,i=(document.compatMode||"")==="CSS1Compat";return r?window.pageYOffset:i?document.documentElement.scrollTop:document.body.scrollTop},db=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollWidth-n.offsetWidth;var r=document.body,i=document.documentElement;return Math.max(r.scrollWidth,r.offsetWidth,i.clientWidth,i.scrollWidth,i.offsetWidth)},pb=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollHeight-n.offsetHeight;var r=document.body,i=document.documentElement;return Math.max(r.scrollHeight,r.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight)},hb=function t(e,n,r){var i=n.data;if(!n.ignoreCancelEvents&&i.cancel){Nt.default.registered.end&&Nt.default.registered.end(i.to,i.target,i.currentPositionY);return}if(i.delta=Math.round(i.targetPosition-i.startPosition),i.start===null&&(i.start=r),i.progress=r-i.start,i.percent=i.progress>=i.duration?1:e(i.progress/i.duration),i.currentPosition=i.startPosition+Math.ceil(i.delta*i.percent),i.containerElement&&i.containerElement!==document&&i.containerElement!==document.body?n.horizontal?i.containerElement.scrollLeft=i.currentPosition:i.containerElement.scrollTop=i.currentPosition:n.horizontal?window.scrollTo(i.currentPosition,0):window.scrollTo(0,i.currentPosition),i.percent<1){var a=t.bind(null,e,n);oo.call(window,a);return}Nt.default.registered.end&&Nt.default.registered.end(i.to,i.target,i.currentPosition)},so=function(e){e.data.containerElement=e?e.containerId?document.getElementById(e.containerId):e.container&&e.container.nodeType?e.container:document:null},gr=function(e,n,r,i){n.data=n.data||nf(),window.clearTimeout(n.data.delayTimeout);var a=function(){n.data.cancel=!0};if(ub.default.subscribe(a),so(n),n.data.start=null,n.data.cancel=!1,n.data.startPosition=n.horizontal?rf(n):af(n),n.data.targetPosition=n.absolute?e:e+n.data.startPosition,n.data.startPosition===n.data.targetPosition){Nt.default.registered.end&&Nt.default.registered.end(n.data.to,n.data.target,n.data.currentPosition);return}n.data.delta=Math.round(n.data.targetPosition-n.data.startPosition),n.data.duration=cb(n.duration)(n.data.delta),n.data.duration=isNaN(parseFloat(n.data.duration))?1e3:parseFloat(n.data.duration),n.data.to=r,n.data.target=i;var o=tf(n),s=hb.bind(null,o,n);if(n&&n.delay>0){n.data.delayTimeout=window.setTimeout(function(){Nt.default.registered.begin&&Nt.default.registered.begin(n.data.to,n.data.target),oo.call(window,s)},n.delay);return}Nt.default.registered.begin&&Nt.default.registered.begin(n.data.to,n.data.target),oo.call(window,s)},gi=function(e){return e=ib({},e),e.data=e.data||nf(),e.absolute=!0,e},vb=function(e){gr(0,gi(e))},gb=function(e,n){gr(e,gi(n))},mb=function(e){e=gi(e),so(e),gr(e.horizontal?db(e):pb(e),e)},yb=function(e,n){n=gi(n),so(n);var r=n.horizontal?rf(n):af(n);gr(e+r,n)};hi.default={animateTopScroll:gr,getAnimationType:tf,scrollToTop:vb,scrollToBottom:mb,scrollTo:gb,scrollMore:yb},Object.defineProperty(jn,"__esModule",{value:!0});var Cb=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Db=hr,bb=uo(Db),Eb=hi,wb=uo(Eb),xb=vr,mi=uo(xb);function uo(t){return t&&t.__esModule?t:{default:t}}var yi={},of=void 0;jn.default={unmount:function(){yi={}},register:function(e,n){yi[e]=n},unregister:function(e){delete yi[e]},get:function(e){return yi[e]||document.getElementById(e)||document.getElementsByName(e)[0]||document.getElementsByClassName(e)[0]},setActiveLink:function(e){return of=e},getActiveLink:function(){return of},scrollTo:function(e,n){var r=this.get(e);if(!r){console.warn("target Element not found");return}n=Cb({},n,{absolute:!1});var i=n.containerId,a=n.container,o=void 0;i?o=document.getElementById(i):a&&a.nodeType?o=a:o=document,n.absolute=!0;var s=n.horizontal,u=bb.default.scrollOffset(o,r,s)+(n.offset||0);if(!n.smooth){mi.default.registered.begin&&mi.default.registered.begin(e,r),o===document?n.horizontal?window.scrollTo(u,0):window.scrollTo(0,u):o.scrollTop=u,mi.default.registered.end&&mi.default.registered.end(e,r);return}wb.default.animateTopScroll(u,n,e,r)}};var lo={exports:{}},Ci={exports:{}},Ue={};/** @license React v16.13.1
90
+ `:""),[a]=c.useState(i);return sr(()=>{var o=i();r.current&&r.current.textContent!==o&&(r.current.textContent=o)}),c.createElement(Cy,{ref:r},a)},Cy=c.memo(c.forwardRef((t,e)=>c.createElement("span",{"data-slate-string":!0,ref:e},t.children))),Fa=t=>{var{length:e=0,isLineBreak:n=!1,isMarkPlaceholder:r=!1}=t,i={"data-slate-zero-width":n?"n":"z","data-slate-length":e};return r&&(i["data-slate-mark-placeholder"]=!0),c.createElement("span",my({},i),!(vt||wl)||!n?"\uFEFF":null,n?c.createElement("br",null):null)};function Hl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Vl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Hl(Object(n),!0).forEach(function(r){Pt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Hl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Dy=vt?300:0;function by(t,e){t.current&&(t.current.disconnect(),e&&(t.current=null))}function ql(t){t.current&&(clearTimeout(t.current),t.current=null)}var Ey=t=>{var{leaf:e,isLast:n,text:r,parent:i,renderPlaceholder:a,renderLeaf:o=x=>c.createElement(xy,Vl({},x))}=t,s=Qt(),u=c.useRef(null),l=c.useRef(null),[f,h]=c.useState(!1),p=c.useRef(null),g=c.useCallback(x=>{if(by(u,x==null),x==null){var E;wa.delete(s),(E=e.onPlaceholderResize)===null||E===void 0||E.call(e,null)}else{if(wa.set(s,x),!u.current){var O=window.ResizeObserver||A0;u.current=new O(()=>{var b;(b=e.onPlaceholderResize)===null||b===void 0||b.call(e,x)})}u.current.observe(x),l.current=x}},[l,e,s]),y=c.createElement(yy,{isLast:n,leaf:e,parent:i,text:r}),v=!!e[Rn];if(c.useEffect(()=>(v?p.current||(p.current=setTimeout(()=>{h(!0),p.current=null},Dy)):(ql(p),h(!1)),()=>ql(p)),[v,h]),v&&f){var d={children:e.placeholder,attributes:{"data-slate-placeholder":!0,style:{position:"absolute",top:0,pointerEvents:"none",width:"100%",maxWidth:"100%",display:"block",opacity:"0.333",userSelect:"none",textDecoration:"none",WebkitUserModify:Dn?"inherit":void 0},contentEditable:!1,ref:g}};y=c.createElement(c.Fragment,null,a(d),y)}var D={"data-slate-leaf":!0};return o({attributes:D,children:y,leaf:e,text:r})},wy=c.memo(Ey,(t,e)=>e.parent===t.parent&&e.isLast===t.isLast&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&e.text===t.text&&ce.equals(e.leaf,t.leaf)&&e.leaf[Rn]===t.leaf[Rn]),xy=t=>{var{attributes:e,children:n}=t;return c.createElement("span",Vl({},e),n)},By=t=>{for(var{decorations:e,isLast:n,parent:r,renderPlaceholder:i,renderLeaf:a,text:o}=t,s=Qt(),u=c.useRef(null),l=ce.decorations(o,e),f=Z.findKey(s,o),h=[],p=0;p<l.length;p++){var g=l[p];h.push(c.createElement(wy,{isLast:n&&p===l.length-1,key:"".concat(f.id,"-").concat(p),renderPlaceholder:i,leaf:g,text:o,parent:r,renderLeaf:a}))}var y=c.useCallback(v=>{var d=Kr.get(s);v?(d==null||d.set(f,v),bn.set(o,v),ir.set(v,o)):(d==null||d.delete(f),bn.delete(o),u.current&&ir.delete(u.current)),u.current=v},[u,s,f,o]);return c.createElement("span",{"data-slate-node":"text",ref:y},h)},Gl=c.memo(By,(t,e)=>e.parent===t.parent&&e.isLast===t.isLast&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&e.text===t.text&&gy(e.decorations,t.decorations));function Yl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ka(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Yl(Object(n),!0).forEach(function(r){Pt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Sy=t=>{var{decorations:e,element:n,renderElement:r=x=>c.createElement(Ly,ka({},x)),renderPlaceholder:i,renderLeaf:a,selection:o}=t,s=Qt(),u=My(),l=s.isInline(n),f=Z.findKey(s,n),h=c.useCallback(x=>{var E=Kr.get(s);x?(E==null||E.set(f,x),bn.set(n,x),ir.set(x,n)):(E==null||E.delete(f),bn.delete(n))},[s,f,n]),p=Kl({decorations:e,node:n,renderElement:r,renderPlaceholder:i,renderLeaf:a,selection:o}),g={"data-slate-node":"element",ref:h};if(l&&(g["data-slate-inline"]=!0),!l&&m.hasInlines(s,n)){var y=ie.string(n),v=Yu(y);v==="rtl"&&(g.dir=v)}if(m.isVoid(s,n)){g["data-slate-void"]=!0,!u&&l&&(g.contentEditable=!1);var d=l?"span":"div",[[D]]=ie.texts(n);p=c.createElement(d,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},c.createElement(Gl,{renderPlaceholder:i,decorations:[],isLast:!1,parent:n,text:D})),ba.set(D,0),Ea.set(D,n)}return r({attributes:g,children:p,element:n})},Ay=c.memo(Sy,(t,e)=>t.element===e.element&&t.renderElement===e.renderElement&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&vy(t.decorations,e.decorations)&&(t.selection===e.selection||!!t.selection&&!!e.selection&&q.equals(t.selection,e.selection))),Ly=t=>{var{attributes:e,children:n,element:r}=t,i=Qt(),a=i.isInline(r)?"span":"div";return c.createElement(a,ka(ka({},e),{},{style:{position:"relative"}}),n)},Zl=c.createContext(()=>[]),Oy=()=>c.useContext(Zl),Py=c.createContext(!1),Kl=t=>{for(var{decorations:e,node:n,renderElement:r,renderPlaceholder:i,renderLeaf:a,selection:o}=t,s=Oy(),u=Qt(),l=Z.findPath(u,n),f=[],h=le.isElement(n)&&!u.isInline(n)&&m.hasInlines(u,n),p=0;p<n.children.length;p++){var g=l.concat(p),y=n.children[p],v=Z.findKey(u,y),d=m.range(u,g),D=o&&q.intersection(d,o),x=s([y,g]);for(var E of e){var O=q.intersection(E,d);O&&x.push(O)}le.isElement(y)?f.push(c.createElement(Py.Provider,{key:"provider-".concat(v.id),value:!!D},c.createElement(Ay,{decorations:x,element:y,key:v.id,renderElement:r,renderPlaceholder:i,renderLeaf:a,selection:D}))):f.push(c.createElement(Gl,{decorations:x,key:v.id,isLast:h&&p===n.children.length-1,parent:n,renderPlaceholder:i,renderLeaf:a,text:y})),ba.set(y,p),Ea.set(y,n)}return f},Xl=c.createContext(!1),My=()=>c.useContext(Xl),Jl=c.createContext(null),Ta=()=>{var t=c.useContext(Jl);if(!t)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:e}=t;return e};function Fy(){var t=Qt(),e=c.useRef(!1),n=c.useRef(0),r=c.useCallback(()=>{if(!e.current){e.current=!0;var i=Z.getWindow(t);i.cancelAnimationFrame(n.current),n.current=i.requestAnimationFrame(()=>{e.current=!1})}},[t]);return c.useEffect(()=>()=>cancelAnimationFrame(n.current),[]),{receivedUserInput:e,onUserInput:r}}var ky=3,Ty={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",insertSoftBreak:"shift+enter",splitBlock:"enter",undo:"mod+z"},Ry={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},Iy={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Ke=t=>{var e=Ty[t],n=Ry[t],r=Iy[t],i=e&&Ki(e),a=n&&Ki(n),o=r&&Ki(r);return s=>!!(i&&i(s)||xl&&a&&a(s)||!xl&&o&&o(s))},Qe={isBold:Ke("bold"),isCompose:Ke("compose"),isMoveBackward:Ke("moveBackward"),isMoveForward:Ke("moveForward"),isDeleteBackward:Ke("deleteBackward"),isDeleteForward:Ke("deleteForward"),isDeleteLineBackward:Ke("deleteLineBackward"),isDeleteLineForward:Ke("deleteLineForward"),isDeleteWordBackward:Ke("deleteWordBackward"),isDeleteWordForward:Ke("deleteWordForward"),isExtendBackward:Ke("extendBackward"),isExtendForward:Ke("extendForward"),isExtendLineBackward:Ke("extendLineBackward"),isExtendLineForward:Ke("extendLineForward"),isItalic:Ke("italic"),isMoveLineBackward:Ke("moveLineBackward"),isMoveLineForward:Ke("moveLineForward"),isMoveWordBackward:Ke("moveWordBackward"),isMoveWordForward:Ke("moveWordForward"),isRedo:Ke("redo"),isSoftBreak:Ke("insertSoftBreak"),isSplitBlock:Ke("splitBlock"),isTransposeCharacter:Ke("transposeCharacter"),isUndo:Ke("undo")},jy=(t,e)=>{var n=[],r=()=>{n=[]},i=o=>{if(e.current){var s=o.filter(u=>Oa(t,u,o));n.push(...s)}};function a(){n.length>0&&(n.reverse().forEach(o=>{o.type!=="characterData"&&(o.removedNodes.forEach(s=>{o.target.insertBefore(s,o.nextSibling)}),o.addedNodes.forEach(s=>{o.target.removeChild(s)}))}),r())}return{registerMutations:i,restoreDOM:a,clear:r}},Ny={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class Ql extends c.Component{constructor(){super(...arguments),Pt(this,"context",null),Pt(this,"manager",null),Pt(this,"mutationObserver",null)}observe(){var e,{node:n}=this.props;if(!n.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");(e=this.mutationObserver)===null||e===void 0||e.observe(n.current,Ny)}componentDidMount(){var{receivedUserInput:e}=this.props,n=this.context;this.manager=jy(n,e),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var e,n,r,i=(e=this.mutationObserver)===null||e===void 0?void 0:e.takeRecords();if(i!=null&&i.length){var a;(a=this.manager)===null||a===void 0||a.registerMutations(i)}return(n=this.mutationObserver)===null||n===void 0||n.disconnect(),(r=this.manager)===null||r===void 0||r.restoreDOM(),null}componentDidUpdate(){var e;(e=this.manager)===null||e===void 0||e.clear(),this.observe()}componentWillUnmount(){var e;(e=this.mutationObserver)===null||e===void 0||e.disconnect()}render(){return this.props.children}}Pt(Ql,"contextType",ya);var _y=vt?Ql:t=>{var{children:e}=t;return c.createElement(c.Fragment,null,e)},zy=c.createContext(!1),Wy=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],Uy=["text"];function $l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function jt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?$l(Object(n),!0).forEach(function(r){Pt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$l(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Hy=t=>c.createElement(c.Fragment,null,Kl(t)),Vy=c.forwardRef((t,e)=>{var n=c.useCallback(C=>c.createElement(qy,jt({},C)),[]),{autoFocus:r,decorate:i=Gy,onDOMBeforeInput:a,placeholder:o,readOnly:s=!1,renderElement:u,renderLeaf:l,renderPlaceholder:f=n,scrollSelectionIntoView:h=Yy,style:p={},as:g="div",disableDefaultStyles:y=!1}=t,v=kn(t,Wy),d=Ta(),[D,x]=c.useState(!1),E=c.useRef(null),O=c.useRef([]),[b,w]=c.useState(),A=c.useRef(!1),{onUserInput:M,receivedUserInput:V}=Fy(),[,P]=c.useReducer(C=>C+1,0);Al.set(d,P),xa.set(d,s);var _=c.useMemo(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);c.useEffect(()=>{E.current&&r&&E.current.focus()},[r]);var R=c.useRef(),N=c.useMemo(()=>r0(()=>{var C=Z.toDOMNode(d,d),U=C.getRootNode();if(!A.current&&Dn&&U instanceof ShadowRoot){A.current=!0;var W=q0();W?document.execCommand("indent"):ee.deselect(d),A.current=!1;return}var F=R.current;if((vt||!Z.isComposing(d))&&(!_.isUpdatingSelection||F!=null&&F.isFlushing())&&!_.isDraggingInternally){var J=Z.findDocumentOrShadowRoot(d),{activeElement:ne}=J,Y=Z.toDOMNode(d,d),ue=or(J);if(ne===Y?(_.latestElement=ne,en.set(d,!0)):en.delete(d),!ue)return ee.deselect(d);var{anchorNode:ae,focusNode:de}=ue,pe=Z.hasEditableTarget(d,ae)||Z.isTargetInsideNonReadonlyVoid(d,ae),Ce=Z.hasTarget(d,de);if(pe&&Ce){var ye=Z.toSlateRange(d,ue,{exactMatch:!1,suppressThrow:!0});ye&&(!Z.isComposing(d)&&!(F!=null&&F.hasPendingChanges())&&!(F!=null&&F.isFlushing())?ee.select(d,ye):F==null||F.handleUserSelect(ye))}s&&(!pe||!Ce)&&ee.deselect(d)}},100),[d,s,_]),T=c.useMemo(()=>Jm(N,0),[N]);R.current=fy({node:E,onDOMSelectionChange:N,scheduleOnDOMSelectionChange:T}),sr(()=>{var C,U,W;E.current&&(W=Aa(E.current))?(Sl.set(d,W),Yr.set(d,E.current),bn.set(d,E.current),ir.set(E.current,d)):bn.delete(d);var{selection:F}=d,J=Z.findDocumentOrShadowRoot(d),ne=or(J);if(!(!ne||!Z.isFocused(d)||(C=R.current)!==null&&C!==void 0&&C.hasPendingAction())){var Y=pe=>{var Ce=ne.type!=="None";if(!(!F&&!Ce)){var ye=ne.focusNode,ge;if(Tn&&ne.rangeCount>1){var ve=ne.getRangeAt(0),Ne=ne.getRangeAt(ne.rangeCount-1);ve.startContainer===ye?ge=Ne.endContainer:ge=ve.startContainer}else ge=ne.anchorNode;var se=Yr.get(d),_e=!1;if(se.contains(ge)&&se.contains(ye)&&(_e=!0),Ce&&_e&&F&&!pe){var fe=Z.toSlateRange(d,ne,{exactMatch:!0,suppressThrow:!0});if(fe&&q.equals(fe,F)){var we;if(!_.hasMarkPlaceholder||(we=ge)!==null&&we!==void 0&&(we=we.parentElement)!==null&&we!==void 0&&we.hasAttribute("data-slate-mark-placeholder"))return}}if(F&&!Z.hasRange(d,F)){d.selection=Z.toSlateRange(d,ne,{exactMatch:!1,suppressThrow:!0});return}_.isUpdatingSelection=!0;var ke=F&&Z.toDOMRange(d,F);return ke?(Z.isComposing(d)&&!vt?ne.collapseToEnd():q.isBackward(F)?ne.setBaseAndExtent(ke.endContainer,ke.endOffset,ke.startContainer,ke.startOffset):ne.setBaseAndExtent(ke.startContainer,ke.startOffset,ke.endContainer,ke.endOffset),h(d,ke)):ne.removeAllRanges(),ke}};ne.rangeCount<=1&&Y();var ue=((U=R.current)===null||U===void 0?void 0:U.isFlushing())==="action";if(!vt||!ue){setTimeout(()=>{_.isUpdatingSelection=!1});return}var ae=null,de=requestAnimationFrame(()=>{if(ue){var pe=Ce=>{try{var ye=Z.toDOMNode(d,d);ye.focus(),Y(Ce)}catch{}};pe(),ae=setTimeout(()=>{pe(!0),_.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(de),ae&&clearTimeout(ae)}}});var j=c.useCallback(C=>{var U=Z.toDOMNode(d,d),W=U.getRootNode();if(A!=null&&A.current&&Dn&&W instanceof ShadowRoot){var F=C.getTargetRanges(),J=F[0],ne=new window.Range;ne.setStart(J.startContainer,J.startOffset),ne.setEnd(J.endContainer,J.endOffset);var Y=Z.toSlateRange(d,ne,{exactMatch:!1,suppressThrow:!1});ee.select(d,Y),C.preventDefault(),C.stopImmediatePropagation();return}if(M(),!s&&Z.hasEditableTarget(d,C.target)&&!Zy(C,a)){var ue;if(R.current)return R.current.handleDOMBeforeInput(C);T.flush(),N.flush();var{selection:ae}=d,{inputType:de}=C,pe=C.dataTransfer||C.data||void 0,Ce=de==="insertCompositionText"||de==="deleteCompositionText";if(Ce&&Z.isComposing(d))return;var ye=!1;if(de==="insertText"&&ae&&q.isCollapsed(ae)&&C.data&&C.data.length===1&&/[a-z ]/i.test(C.data)&&ae.anchor.offset!==0){var ge,ve;ye=!0,d.marks&&(ye=!1);var{anchor:Ne}=ae,[se,_e]=Z.toDOMPoint(d,Ne),fe=(ge=se.parentElement)===null||ge===void 0?void 0:ge.closest("a"),we=Z.getWindow(d);if(ye&&fe&&Z.hasDOMNode(d,fe)){var ke,Ve=we==null?void 0:we.document.createTreeWalker(fe,NodeFilter.SHOW_TEXT).lastChild();Ve===se&&((ke=Ve.textContent)===null||ke===void 0?void 0:ke.length)===_e&&(ye=!1)}if(ye&&se.parentElement&&(we==null||(ve=we.getComputedStyle(se.parentElement))===null||ve===void 0?void 0:ve.whiteSpace)==="pre"){var Ye=m.above(d,{at:Ne.path,match:Lt=>le.isElement(Lt)&&m.isBlock(d,Lt)});Ye&&ie.string(Ye[0]).includes(" ")&&(ye=!1)}}if(!de.startsWith("delete")||de.startsWith("deleteBy")){var[Ee]=C.getTargetRanges();if(Ee){var ct=Z.toSlateRange(d,Ee,{exactMatch:!1,suppressThrow:!1});if(!ae||!q.equals(ae,ct)){ye=!1;var st=!Ce&&d.selection&&m.rangeRef(d,d.selection);ee.select(d,ct),st&&ar.set(d,st)}}}if(Ce)return;if(ye||C.preventDefault(),ae&&q.isExpanded(ae)&&de.startsWith("delete")){var Tt=de.endsWith("Backward")?"backward":"forward";m.deleteFragment(d,{direction:Tt});return}switch(de){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":{m.deleteFragment(d);break}case"deleteContent":case"deleteContentForward":{m.deleteForward(d);break}case"deleteContentBackward":{m.deleteBackward(d);break}case"deleteEntireSoftLine":{m.deleteBackward(d,{unit:"line"}),m.deleteForward(d,{unit:"line"});break}case"deleteHardLineBackward":{m.deleteBackward(d,{unit:"block"});break}case"deleteSoftLineBackward":{m.deleteBackward(d,{unit:"line"});break}case"deleteHardLineForward":{m.deleteForward(d,{unit:"block"});break}case"deleteSoftLineForward":{m.deleteForward(d,{unit:"line"});break}case"deleteWordBackward":{m.deleteBackward(d,{unit:"word"});break}case"deleteWordForward":{m.deleteForward(d,{unit:"word"});break}case"insertLineBreak":m.insertSoftBreak(d);break;case"insertParagraph":{m.insertBreak(d);break}case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{de==="insertFromComposition"&&Z.isComposing(d)&&(x(!1),En.set(d,!1)),(pe==null?void 0:pe.constructor.name)==="DataTransfer"?Z.insertData(d,pe):typeof pe=="string"&&(ye?O.current.push(()=>m.insertText(d,pe)):m.insertText(d,pe));break}}var yt=(ue=ar.get(d))===null||ue===void 0?void 0:ue.unref();ar.delete(d),yt&&(!d.selection||!q.equals(d.selection,yt))&&ee.select(d,yt)}},[d,N,M,a,s,T]),X=c.useCallback(C=>{C==null?(N.cancel(),T.cancel(),Yr.delete(d),bn.delete(d),E.current&&$t&&E.current.removeEventListener("beforeinput",j)):$t&&C.addEventListener("beforeinput",j),E.current=C,typeof e=="function"?e(C):e&&(e.current=C)},[N,T,d,j,e]);sr(()=>{var C=Z.getWindow(d);C.document.addEventListener("selectionchange",T);var U=()=>{_.isDraggingInternally=!1};return C.document.addEventListener("dragend",U),C.document.addEventListener("drop",U),()=>{C.document.removeEventListener("selectionchange",T),C.document.removeEventListener("dragend",U),C.document.removeEventListener("drop",U)}},[T,_]);var z=i([d,[]]),$=o&&d.children.length===1&&Array.from(ie.texts(d)).length===1&&ie.string(d)===""&&!D,re=c.useCallback(C=>{if(C&&$){var U;w((U=C.getBoundingClientRect())===null||U===void 0?void 0:U.height)}else w(void 0)},[$]);if($){var k=m.start(d,[]);z.push({[Rn]:!0,placeholder:o,onPlaceholderResize:re,anchor:k,focus:k})}var{marks:I}=d;if(_.hasMarkPlaceholder=!1,d.selection&&q.isCollapsed(d.selection)&&I){var{anchor:G}=d.selection,H=ie.leaf(d,G.path),Q=kn(H,Uy);if(!ce.equals(H,I,{loose:!0})){_.hasMarkPlaceholder=!0;var K=Object.fromEntries(Object.keys(Q).map(C=>[C,null]));z.push(jt(jt(jt({[Ll]:!0},K),I),{},{anchor:G,focus:G}))}}return c.useEffect(()=>{setTimeout(()=>{var{selection:C}=d;if(C){var{anchor:U}=C,W=ie.leaf(d,U.path);if(I&&!ce.equals(W,I,{loose:!0})){Ft.set(d,I);return}}Ft.delete(d)})}),c.createElement(Xl.Provider,{value:s},c.createElement(zy.Provider,{value:D},c.createElement(Zl.Provider,{value:i},c.createElement(_y,{node:E,receivedUserInput:V},c.createElement(g,jt(jt({role:s?void 0:"textbox","aria-multiline":s?void 0:!0},v),{},{spellCheck:$t||!Gr?v.spellCheck:!1,autoCorrect:$t||!Gr?v.autoCorrect:"false",autoCapitalize:$t||!Gr?v.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!s,zindex:-1,suppressContentEditableWarning:!0,ref:X,style:jt(jt({},y?{}:jt({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},b?{minHeight:b}:{})),p),onBeforeInput:c.useCallback(C=>{if(!$t&&!s&&!gt(C,v.onBeforeInput)&&Z.hasSelectableTarget(d,C.target)&&(C.preventDefault(),!Z.isComposing(d))){var U=C.data;m.insertText(d,U)}},[v.onBeforeInput,d,s]),onInput:c.useCallback(C=>{if(!gt(C,v.onInput)){if(R.current){R.current.handleInput();return}for(var U of O.current)U();O.current=[]}},[v.onInput]),onBlur:c.useCallback(C=>{if(!(s||_.isUpdatingSelection||!Z.hasSelectableTarget(d,C.target)||gt(C,v.onBlur))){var U=Z.findDocumentOrShadowRoot(d);if(_.latestElement!==U.activeElement){var{relatedTarget:W}=C,F=Z.toDOMNode(d,d);if(W!==F&&!(Mt(W)&&W.hasAttribute("data-slate-spacer"))){if(W!=null&&rn(W)&&Z.hasDOMNode(d,W)){var J=Z.toSlateNode(d,W);if(le.isElement(J)&&!d.isVoid(J))return}if(Dn){var ne=or(U);ne==null||ne.removeAllRanges()}en.delete(d)}}}},[s,_.isUpdatingSelection,_.latestElement,d,v.onBlur]),onClick:c.useCallback(C=>{if(Z.hasTarget(d,C.target)&&!gt(C,v.onClick)&&rn(C.target)){var U=Z.toSlateNode(d,C.target),W=Z.findPath(d,U);if(!m.hasPath(d,W)||ie.get(d,W)!==U)return;if(C.detail===ky&&W.length>=1){var F=W;if(!(le.isElement(U)&&m.isBlock(d,U))){var J,ne=m.above(d,{match:ye=>le.isElement(ye)&&m.isBlock(d,ye),at:W});F=(J=ne==null?void 0:ne[1])!==null&&J!==void 0?J:W.slice(0,1)}var Y=m.range(d,F);ee.select(d,Y);return}if(s)return;var ue=m.start(d,W),ae=m.end(d,W),de=m.void(d,{at:ue}),pe=m.void(d,{at:ae});if(de&&pe&&L.equals(de[1],pe[1])){var Ce=m.range(d,ue);ee.select(d,Ce)}}},[d,v.onClick,s]),onCompositionEnd:c.useCallback(C=>{if(Z.hasSelectableTarget(d,C.target)){var U;if(Z.isComposing(d)&&Promise.resolve().then(()=>{x(!1),En.set(d,!1)}),(U=R.current)===null||U===void 0||U.handleCompositionEnd(C),gt(C,v.onCompositionEnd)||vt)return;if(!Dn&&!T0&&!wl&&!I0&&!R0&&C.data){var W=Ft.get(d);Ft.delete(d),W!==void 0&&(Vt.set(d,d.marks),d.marks=W),m.insertText(d,C.data);var F=Vt.get(d);Vt.delete(d),F!==void 0&&(d.marks=F)}}},[v.onCompositionEnd,d]),onCompositionUpdate:c.useCallback(C=>{Z.hasSelectableTarget(d,C.target)&&!gt(C,v.onCompositionUpdate)&&(Z.isComposing(d)||(x(!0),En.set(d,!0)))},[v.onCompositionUpdate,d]),onCompositionStart:c.useCallback(C=>{if(Z.hasSelectableTarget(d,C.target)){var U;if((U=R.current)===null||U===void 0||U.handleCompositionStart(C),gt(C,v.onCompositionStart)||vt)return;x(!0);var{selection:W}=d;if(W&&q.isExpanded(W)){m.deleteFragment(d);return}}},[v.onCompositionStart,d]),onCopy:c.useCallback(C=>{Z.hasSelectableTarget(d,C.target)&&!gt(C,v.onCopy)&&!ec(C)&&(C.preventDefault(),Z.setFragmentData(d,C.clipboardData,"copy"))},[v.onCopy,d]),onCut:c.useCallback(C=>{if(!s&&Z.hasSelectableTarget(d,C.target)&&!gt(C,v.onCut)&&!ec(C)){C.preventDefault(),Z.setFragmentData(d,C.clipboardData,"cut");var{selection:U}=d;if(U)if(q.isExpanded(U))m.deleteFragment(d);else{var W=ie.parent(d,U.anchor.path);m.isVoid(d,W)&&ee.delete(d)}}},[s,d,v.onCut]),onDragOver:c.useCallback(C=>{if(Z.hasTarget(d,C.target)&&!gt(C,v.onDragOver)){var U=Z.toSlateNode(d,C.target);le.isElement(U)&&m.isVoid(d,U)&&C.preventDefault()}},[v.onDragOver,d]),onDragStart:c.useCallback(C=>{if(!s&&Z.hasTarget(d,C.target)&&!gt(C,v.onDragStart)){var U=Z.toSlateNode(d,C.target),W=Z.findPath(d,U),F=le.isElement(U)&&m.isVoid(d,U)||m.void(d,{at:W,voids:!0});if(F){var J=m.range(d,W);ee.select(d,J)}_.isDraggingInternally=!0,Z.setFragmentData(d,C.dataTransfer,"drag")}},[s,d,v.onDragStart,_]),onDrop:c.useCallback(C=>{if(!s&&Z.hasTarget(d,C.target)&&!gt(C,v.onDrop)){C.preventDefault();var U=d.selection,W=Z.findEventRange(d,C),F=C.dataTransfer;ee.select(d,W),_.isDraggingInternally&&U&&!q.equals(U,W)&&!m.void(d,{at:W,voids:!0})&&ee.delete(d,{at:U}),Z.insertData(d,F),Z.isFocused(d)||Z.focus(d)}},[s,d,v.onDrop,_]),onDragEnd:c.useCallback(C=>{!s&&_.isDraggingInternally&&v.onDragEnd&&Z.hasTarget(d,C.target)&&v.onDragEnd(C)},[s,_,v,d]),onFocus:c.useCallback(C=>{if(!s&&!_.isUpdatingSelection&&Z.hasEditableTarget(d,C.target)&&!gt(C,v.onFocus)){var U=Z.toDOMNode(d,d),W=Z.findDocumentOrShadowRoot(d);if(_.latestElement=W.activeElement,Tn&&C.target!==U){U.focus();return}en.set(d,!0)}},[s,_,d,v.onFocus]),onKeyDown:c.useCallback(C=>{if(!s&&Z.hasEditableTarget(d,C.target)){var U;(U=R.current)===null||U===void 0||U.handleKeyDown(C);var{nativeEvent:W}=C;if(Z.isComposing(d)&&W.isComposing===!1&&(En.set(d,!1),x(!1)),gt(C,v.onKeyDown)||Z.isComposing(d))return;var{selection:F}=d,J=d.children[F!==null?F.focus.path[0]:0],ne=Yu(ie.string(J))==="rtl";if(Qe.isRedo(W)){C.preventDefault();var Y=d;typeof Y.redo=="function"&&Y.redo();return}if(Qe.isUndo(W)){C.preventDefault();var ue=d;typeof ue.undo=="function"&&ue.undo();return}if(Qe.isMoveLineBackward(W)){C.preventDefault(),ee.move(d,{unit:"line",reverse:!0});return}if(Qe.isMoveLineForward(W)){C.preventDefault(),ee.move(d,{unit:"line"});return}if(Qe.isExtendLineBackward(W)){C.preventDefault(),ee.move(d,{unit:"line",edge:"focus",reverse:!0});return}if(Qe.isExtendLineForward(W)){C.preventDefault(),ee.move(d,{unit:"line",edge:"focus"});return}if(Qe.isMoveBackward(W)){C.preventDefault(),F&&q.isCollapsed(F)?ee.move(d,{reverse:!ne}):ee.collapse(d,{edge:ne?"end":"start"});return}if(Qe.isMoveForward(W)){C.preventDefault(),F&&q.isCollapsed(F)?ee.move(d,{reverse:ne}):ee.collapse(d,{edge:ne?"start":"end"});return}if(Qe.isMoveWordBackward(W)){C.preventDefault(),F&&q.isExpanded(F)&&ee.collapse(d,{edge:"focus"}),ee.move(d,{unit:"word",reverse:!ne});return}if(Qe.isMoveWordForward(W)){C.preventDefault(),F&&q.isExpanded(F)&&ee.collapse(d,{edge:"focus"}),ee.move(d,{unit:"word",reverse:ne});return}if($t){if((Bl||Dn)&&F&&(Qe.isDeleteBackward(W)||Qe.isDeleteForward(W))&&q.isCollapsed(F)){var ae=ie.parent(d,F.anchor.path);if(le.isElement(ae)&&m.isVoid(d,ae)&&(m.isInline(d,ae)||m.isBlock(d,ae))){C.preventDefault(),m.deleteBackward(d,{unit:"block"});return}}}else{if(Qe.isBold(W)||Qe.isItalic(W)||Qe.isTransposeCharacter(W)){C.preventDefault();return}if(Qe.isSoftBreak(W)){C.preventDefault(),m.insertSoftBreak(d);return}if(Qe.isSplitBlock(W)){C.preventDefault(),m.insertBreak(d);return}if(Qe.isDeleteBackward(W)){C.preventDefault(),F&&q.isExpanded(F)?m.deleteFragment(d,{direction:"backward"}):m.deleteBackward(d);return}if(Qe.isDeleteForward(W)){C.preventDefault(),F&&q.isExpanded(F)?m.deleteFragment(d,{direction:"forward"}):m.deleteForward(d);return}if(Qe.isDeleteLineBackward(W)){C.preventDefault(),F&&q.isExpanded(F)?m.deleteFragment(d,{direction:"backward"}):m.deleteBackward(d,{unit:"line"});return}if(Qe.isDeleteLineForward(W)){C.preventDefault(),F&&q.isExpanded(F)?m.deleteFragment(d,{direction:"forward"}):m.deleteForward(d,{unit:"line"});return}if(Qe.isDeleteWordBackward(W)){C.preventDefault(),F&&q.isExpanded(F)?m.deleteFragment(d,{direction:"backward"}):m.deleteBackward(d,{unit:"word"});return}if(Qe.isDeleteWordForward(W)){C.preventDefault(),F&&q.isExpanded(F)?m.deleteFragment(d,{direction:"forward"}):m.deleteForward(d,{unit:"word"});return}}}},[s,d,v.onKeyDown]),onPaste:c.useCallback(C=>{!s&&Z.hasEditableTarget(d,C.target)&&!gt(C,v.onPaste)&&(!$t||_0(C.nativeEvent)||Dn)&&(C.preventDefault(),Z.insertData(d,C.clipboardData))},[s,d,v.onPaste])}),c.createElement(Hy,{decorations:z,node:d,renderElement:u,renderPlaceholder:f,renderLeaf:l,selection:d.selection}))))))}),qy=t=>{var{attributes:e,children:n}=t;return c.createElement("span",jt({},e),n,vt&&c.createElement("br",null))},Gy=()=>[],Yy=(t,e)=>{if(e.getBoundingClientRect&&(!t.selection||t.selection&&q.isCollapsed(t.selection))){var n=e.startContainer.parentElement;n.getBoundingClientRect=e.getBoundingClientRect.bind(e),o0(n,{scrollMode:"if-needed"}),delete n.getBoundingClientRect}},gt=(t,e)=>{if(!e)return!1;var n=e(t);return n??(t.isDefaultPrevented()||t.isPropagationStopped())},ec=t=>rn(t.target)&&(t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement),Zy=(t,e)=>{if(!e)return!1;var n=e(t);return n??t.defaultPrevented},Ky=c.createContext(!1),Xy=c.createContext({});function Jy(t){var e=c.useRef([]).current,n=c.useRef({editor:t}).current,r=c.useCallback(a=>{n.editor=a,e.forEach(o=>o(a))},[e,n]),i=c.useMemo(()=>({getSlate:()=>n.editor,addEventListener:a=>(e.push(a),()=>{e.splice(e.indexOf(a),1)})}),[e,n]);return{selectorContext:i,onChange:r}}var Qy=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],$y=t=>{var{editor:e,children:n,onChange:r,onSelectionChange:i,onValueChange:a,initialValue:o}=t,s=kn(t,Qy),[u,l]=c.useState(()=>{if(!ie.isNodeList(o))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(lt.stringify(o)));if(!m.isEditor(e))throw new Error("[Slate] editor is invalid! You passed: ".concat(lt.stringify(e)));return e.children=o,Object.assign(e,s),{v:0,editor:e}}),{selectorContext:f,onChange:h}=Jy(e),p=c.useCallback(v=>{var d;switch(r&&r(e.children),v==null||(d=v.operation)===null||d===void 0?void 0:d.type){case"set_selection":i==null||i(e.selection);break;default:a==null||a(e.children)}l(D=>({v:D.v+1,editor:e})),h(e)},[e,h,r,i,a]);c.useEffect(()=>(Ba.set(e,p),()=>{Ba.set(e,()=>{})}),[e,p]);var[g,y]=c.useState(Z.isFocused(e));return c.useEffect(()=>{y(Z.isFocused(e))},[e]),sr(()=>{var v=()=>y(Z.isFocused(e));return El>=17?(document.addEventListener("focusin",v),document.addEventListener("focusout",v),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",v)}):(document.addEventListener("focus",v,!0),document.addEventListener("blur",v,!0),()=>{document.removeEventListener("focus",v,!0),document.removeEventListener("blur",v,!0)})},[]),c.createElement(Xy.Provider,{value:f},c.createElement(Jl.Provider,{value:u},c.createElement(ya.Provider,{value:u.editor},c.createElement(Ky.Provider,{value:g},n))))},tc=(t,e)=>{var n=(e.top+e.bottom)/2;return t.top<=n&&t.bottom>=n},nc=(t,e,n)=>{var r=Z.toDOMRange(t,e).getBoundingClientRect(),i=Z.toDOMRange(t,n).getBoundingClientRect();return tc(r,i)&&tc(i,r)},eC=(t,e)=>{var n=m.range(t,q.end(e)),r=Array.from(m.positions(t,{at:e})),i=0,a=r.length,o=Math.floor(a/2);if(nc(t,m.range(t,r[i]),n))return m.range(t,r[i],n);if(r.length<2)return m.range(t,r[r.length-1],n);for(;o!==r.length&&o!==i;)nc(t,m.range(t,r[o]),n)?a=o:i=o,o=Math.floor((i+a)/2);return m.range(t,r[a],n)};function rc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ic(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?rc(Object(n),!0).forEach(function(r){Pt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):rc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var tC=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x-slate-fragment",r=e,{apply:i,onChange:a,deleteBackward:o,addMark:s,removeMark:u}=r;return Kr.set(r,new WeakMap),r.addMark=(l,f)=>{var h,p;(h=Sa.get(r))===null||h===void 0||h(),!Ft.get(r)&&(p=bt.get(r))!==null&&p!==void 0&&p.length&&Ft.set(r,null),Vt.delete(r),s(l,f)},r.removeMark=l=>{var f;!Ft.get(r)&&(f=bt.get(r))!==null&&f!==void 0&&f.length&&Ft.set(r,null),Vt.delete(r),u(l)},r.deleteBackward=l=>{if(l!=="line")return o(l);if(r.selection&&q.isCollapsed(r.selection)){var f=m.above(r,{match:y=>le.isElement(y)&&m.isBlock(r,y),at:r.selection});if(f){var[,h]=f,p=m.range(r,h,r.selection.anchor),g=eC(r,p);q.isCollapsed(g)||ee.delete(r,{at:g})}}},r.apply=l=>{var f=[],h=[],p=bt.get(r);if(p!=null&&p.length){var g=p.map(T=>ey(T,l)).filter(Boolean);bt.set(r,g)}var y=nn.get(r);y&&nn.set(r,jl(r,y,l));var v=tn.get(r);if(v!=null&&v.at){var d=Le.isPoint(v==null?void 0:v.at)?Ma(r,v.at,l):jl(r,v.at,l);tn.set(r,d?ic(ic({},v),{},{at:d}):null)}switch(l.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{f.push(...In(r,l.path));break}case"set_selection":{var D;(D=ar.get(r))===null||D===void 0||D.unref(),ar.delete(r);break}case"insert_node":case"remove_node":{f.push(...In(r,L.parent(l.path)));break}case"merge_node":{var x=L.previous(l.path);f.push(...In(r,x));break}case"move_node":{var E=L.common(L.parent(l.path),L.parent(l.newPath));f.push(...In(r,E));var O;L.isBefore(l.path,l.newPath)?(f.push(...In(r,L.parent(l.path))),O=l.newPath):(f.push(...In(r,L.parent(l.newPath))),O=l.path);var b=ie.get(e,L.parent(O)),w=Z.findKey(r,b),A=m.pathRef(r,L.parent(O));h.push([A,w]);break}}i(l);for(var[M,V]of f){var[P]=m.node(r,M);Zr.set(P,V)}for(var[_,R]of h)if(_.current){var[N]=m.node(r,_.current);Zr.set(N,R)}},r.setFragmentData=l=>{var{selection:f}=r;if(f){var[h,p]=q.edges(f),g=m.void(r,{at:h.path}),y=m.void(r,{at:p.path});if(!(q.isCollapsed(f)&&!g)){var v=Z.toDOMRange(r,f),d=v.cloneContents(),D=d.childNodes[0];if(d.childNodes.forEach(P=>{P.textContent&&P.textContent.trim()!==""&&(D=P)}),y){var[x]=y,E=v.cloneRange(),O=Z.toDOMNode(r,x);E.setEndAfter(O),d=E.cloneContents()}if(g&&(D=d.querySelector("[data-slate-spacer]")),Array.from(d.querySelectorAll("[data-slate-zero-width]")).forEach(P=>{var _=P.getAttribute("data-slate-zero-width")==="n";P.textContent=_?`
91
+ `:""}),Pl(D)){var b=D.ownerDocument.createElement("span");b.style.whiteSpace="pre",b.appendChild(D),d.appendChild(b),D=b}var w=r.getFragment(),A=JSON.stringify(w),M=window.btoa(encodeURIComponent(A));D.setAttribute("data-slate-fragment",M),l.setData("application/".concat(n),M);var V=d.ownerDocument.createElement("div");return V.appendChild(d),V.setAttribute("hidden","true"),d.ownerDocument.body.appendChild(V),l.setData("text/html",V.innerHTML),l.setData("text/plain",Fl(V)),d.ownerDocument.body.removeChild(V),l}}},r.insertData=l=>{r.insertFragmentData(l)||r.insertTextData(l)},r.insertFragmentData=l=>{var f=l.getData("application/".concat(n))||V0(l);if(f){var h=decodeURIComponent(window.atob(f)),p=JSON.parse(h);return r.insertFragment(p),!0}return!1},r.insertTextData=l=>{var f=l.getData("text/plain");if(f){var h=f.split(/\r\n|\r|\n/),p=!1;for(var g of h)p&&ee.splitNodes(r,{always:!0}),r.insertText(g),p=!0;return!0}return!1},r.onChange=l=>{var f=El<18?Yt.unstable_batchedUpdates:h=>h();f(()=>{var h=Ba.get(r);h&&h(l),a(l)})},r},In=(t,e)=>{var n=[];for(var[r,i]of m.levels(t,{at:e})){var a=Z.findKey(t,r);n.push([i,a])}return n};function ac(t,e,n="type"){const{selection:r}=t;if(!r)return!1;const[i]=Array.from(m.nodes(t,{at:m.unhangRange(t,r),match:a=>!m.isEditor(a)&&le.isElement(a)&&a[n]===e}));return!!i}const oc=["listItem","numberedList"],Jr=["left","center","right","justify"];function nC(t,e){const n=Jr.includes(e)?"align":"type",r=ac(t,e,n),i=oc.includes(e);ee.unwrapNodes(t,{match:o=>!m.isEditor(o)&&le.isElement(o)&&oc.includes(o.type)&&!Jr.includes(e),split:!0});let a;if(Jr.includes(e)?a={align:r?void 0:e}:a={type:r?"paragraph":i?"listItem":e},ee.setNodes(t,a),!r&&i){const o={type:e,children:[]};ee.wrapNodes(t,o)}}function wn({format:t,icon:e}){const n=Ta(),r=Jr.includes(t)?"align":"type",a=ac(n,t,r)?"activeTrue":"activeFalse";function o(s){s.preventDefault(),nC(n,t)}return B.jsx("button",{type:"button",className:"arkynRichTextBlockButton "+a,onMouseDown:o,children:B.jsx(e,{})})}function rC({attributes:t,children:e,element:n}){const r={textAlign:n.align};switch(n.type){case"blockQuote":return B.jsx("blockquote",{className:"arkynElementBlockquote",style:r,...t,children:e});case"bulletedList":return B.jsx("ul",{className:"arkynElementBulletList",style:r,...t,children:e});case"headingOne":return B.jsx("h1",{className:"arkynElementHeadingOne",style:r,...t,children:e});case"headingTwo":return B.jsx("h2",{className:"arkynElementHeadingTwo",style:r,...t,children:e});case"listItem":return B.jsx("li",{className:"arkynElementListItem",style:r,...t,children:e});case"numberedList":return B.jsx("ol",{className:"arkynElementNumberedList",style:r,...t,children:e});default:return B.jsx("p",{className:"arkynElementParagraph",style:r,...t,children:e})}}function iC({attributes:t,children:e,leaf:n}){return n.bold&&(e=B.jsx("strong",{children:e})),n.code&&(e=B.jsx("code",{children:e})),n.italic&&(e=B.jsx("em",{children:e})),n.underline&&(e=B.jsx("u",{children:e})),B.jsx("span",{...t,children:e})}function sc(t,e){const n=m.marks(t);return n?n[e]===!0:!1}function uc(t,e){sc(t,e)?m.removeMark(t,e):m.addMark(t,e,!0)}function Qr({format:t,icon:e}){const n=Ta(),i=sc(n,t)?"activeTrue":"activeFalse";function a(o){o.preventDefault(),uc(n,t)}return B.jsx("button",{type:"button",className:"arkynRichTextMarkButton "+i,onMouseDown:a,children:B.jsx(e,{})})}function aC({children:t}){return B.jsx("div",{className:"arkynRichTextToolbar",children:t})}const lc={"mod+b":"bold","mod+i":"italic","mod+u":"underline","mod+`":"code"},oC=[{type:"paragraph",children:[{text:""}]}];var cc={},Ra={},Ia={};Object.defineProperty(Ia,"__esModule",{value:!0}),Ia.default=cC;var fc="html",dc="head",$r="body",sC=/<([a-zA-Z]+[0-9]?)/,pc=/<head[^]*>/i,hc=/<body[^]*>/i,ei=function(t,e){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},ja=function(t,e){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},vc=typeof window=="object"&&window.DOMParser;if(typeof vc=="function"){var uC=new vc,lC="text/html";ja=function(t,e){return e&&(t="<".concat(e,">").concat(t,"</").concat(e,">")),uC.parseFromString(t,lC)},ei=ja}if(typeof document=="object"&&document.implementation){var ti=document.implementation.createHTMLDocument();ei=function(t,e){if(e){var n=ti.documentElement.querySelector(e);return n&&(n.innerHTML=t),ti}return ti.documentElement.innerHTML=t,ti}}var ni=typeof document=="object"&&document.createElement("template"),Na;ni&&ni.content&&(Na=function(t){return ni.innerHTML=t,ni.content.childNodes});function cC(t){var e,n,r=t.match(sC),i=r&&r[1]?r[1].toLowerCase():"";switch(i){case fc:{var a=ja(t);if(!pc.test(t)){var o=a.querySelector(dc);(e=o==null?void 0:o.parentNode)===null||e===void 0||e.removeChild(o)}if(!hc.test(t)){var o=a.querySelector($r);(n=o==null?void 0:o.parentNode)===null||n===void 0||n.removeChild(o)}return a.querySelectorAll(fc)}case dc:case $r:{var s=ei(t).querySelectorAll(i);return hc.test(t)&&pc.test(t)?s[0].parentNode.childNodes:s}default:{if(Na)return Na(t);var o=ei(t,$r).querySelector($r);return o.childNodes}}}var ri={},_a={},za={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0;var e;(function(r){r.Root="root",r.Text="text",r.Directive="directive",r.Comment="comment",r.Script="script",r.Style="style",r.Tag="tag",r.CDATA="cdata",r.Doctype="doctype"})(e=t.ElementType||(t.ElementType={}));function n(r){return r.type===e.Tag||r.type===e.Script||r.type===e.Style}t.isTag=n,t.Root=e.Root,t.Text=e.Text,t.Directive=e.Directive,t.Comment=e.Comment,t.Script=e.Script,t.Style=e.Style,t.Tag=e.Tag,t.CDATA=e.CDATA,t.Doctype=e.Doctype})(za);var Fe={},an=qe&&qe.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ur=qe&&qe.__assign||function(){return ur=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},ur.apply(this,arguments)};Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.cloneNode=Fe.hasChildren=Fe.isDocument=Fe.isDirective=Fe.isComment=Fe.isText=Fe.isCDATA=Fe.isTag=Fe.Element=Fe.Document=Fe.CDATA=Fe.NodeWithChildren=Fe.ProcessingInstruction=Fe.Comment=Fe.Text=Fe.DataNode=Fe.Node=void 0;var Et=za,Wa=function(){function t(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),t.prototype.cloneNode=function(e){return e===void 0&&(e=!1),Ua(this,e)},t}();Fe.Node=Wa;var ii=function(t){an(e,t);function e(n){var r=t.call(this)||this;return r.data=n,r}return Object.defineProperty(e.prototype,"nodeValue",{get:function(){return this.data},set:function(n){this.data=n},enumerable:!1,configurable:!0}),e}(Wa);Fe.DataNode=ii;var gc=function(t){an(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type=Et.ElementType.Text,n}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),e}(ii);Fe.Text=gc;var mc=function(t){an(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type=Et.ElementType.Comment,n}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),e}(ii);Fe.Comment=mc;var yc=function(t){an(e,t);function e(n,r){var i=t.call(this,r)||this;return i.name=n,i.type=Et.ElementType.Directive,i}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),e}(ii);Fe.ProcessingInstruction=yc;var ai=function(t){an(e,t);function e(n){var r=t.call(this)||this;return r.children=n,r}return Object.defineProperty(e.prototype,"firstChild",{get:function(){var n;return(n=this.children[0])!==null&&n!==void 0?n:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childNodes",{get:function(){return this.children},set:function(n){this.children=n},enumerable:!1,configurable:!0}),e}(Wa);Fe.NodeWithChildren=ai;var Cc=function(t){an(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type=Et.ElementType.CDATA,n}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),e}(ai);Fe.CDATA=Cc;var Dc=function(t){an(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type=Et.ElementType.Root,n}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),e}(ai);Fe.Document=Dc;var bc=function(t){an(e,t);function e(n,r,i,a){i===void 0&&(i=[]),a===void 0&&(a=n==="script"?Et.ElementType.Script:n==="style"?Et.ElementType.Style:Et.ElementType.Tag);var o=t.call(this,i)||this;return o.name=n,o.attribs=r,o.type=a,o}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tagName",{get:function(){return this.name},set:function(n){this.name=n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attributes",{get:function(){var n=this;return Object.keys(this.attribs).map(function(r){var i,a;return{name:r,value:n.attribs[r],namespace:(i=n["x-attribsNamespace"])===null||i===void 0?void 0:i[r],prefix:(a=n["x-attribsPrefix"])===null||a===void 0?void 0:a[r]}})},enumerable:!1,configurable:!0}),e}(ai);Fe.Element=bc;function Ec(t){return(0,Et.isTag)(t)}Fe.isTag=Ec;function wc(t){return t.type===Et.ElementType.CDATA}Fe.isCDATA=wc;function xc(t){return t.type===Et.ElementType.Text}Fe.isText=xc;function Bc(t){return t.type===Et.ElementType.Comment}Fe.isComment=Bc;function Sc(t){return t.type===Et.ElementType.Directive}Fe.isDirective=Sc;function Ac(t){return t.type===Et.ElementType.Root}Fe.isDocument=Ac;function fC(t){return Object.prototype.hasOwnProperty.call(t,"children")}Fe.hasChildren=fC;function Ua(t,e){e===void 0&&(e=!1);var n;if(xc(t))n=new gc(t.data);else if(Bc(t))n=new mc(t.data);else if(Ec(t)){var r=e?Ha(t.children):[],i=new bc(t.name,ur({},t.attribs),r);r.forEach(function(u){return u.parent=i}),t.namespace!=null&&(i.namespace=t.namespace),t["x-attribsNamespace"]&&(i["x-attribsNamespace"]=ur({},t["x-attribsNamespace"])),t["x-attribsPrefix"]&&(i["x-attribsPrefix"]=ur({},t["x-attribsPrefix"])),n=i}else if(wc(t)){var r=e?Ha(t.children):[],a=new Cc(r);r.forEach(function(l){return l.parent=a}),n=a}else if(Ac(t)){var r=e?Ha(t.children):[],o=new Dc(r);r.forEach(function(l){return l.parent=o}),t["x-mode"]&&(o["x-mode"]=t["x-mode"]),n=o}else if(Sc(t)){var s=new yc(t.name,t.data);t["x-name"]!=null&&(s["x-name"]=t["x-name"],s["x-publicId"]=t["x-publicId"],s["x-systemId"]=t["x-systemId"]),n=s}else throw new Error("Not implemented yet: ".concat(t.type));return n.startIndex=t.startIndex,n.endIndex=t.endIndex,t.sourceCodeLocation!=null&&(n.sourceCodeLocation=t.sourceCodeLocation),n}Fe.cloneNode=Ua;function Ha(t){for(var e=t.map(function(r){return Ua(r,!0)}),n=1;n<e.length;n++)e[n].prev=e[n-1],e[n-1].next=e[n];return e}(function(t){var e=qe&&qe.__createBinding||(Object.create?function(s,u,l,f){f===void 0&&(f=l);var h=Object.getOwnPropertyDescriptor(u,l);(!h||("get"in h?!u.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return u[l]}}),Object.defineProperty(s,f,h)}:function(s,u,l,f){f===void 0&&(f=l),s[f]=u[l]}),n=qe&&qe.__exportStar||function(s,u){for(var l in s)l!=="default"&&!Object.prototype.hasOwnProperty.call(u,l)&&e(u,s,l)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var r=za,i=Fe;n(Fe,t);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},o=function(){function s(u,l,f){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof l=="function"&&(f=l,l=a),typeof u=="object"&&(l=u,u=void 0),this.callback=u??null,this.options=l??a,this.elementCB=f??null}return s.prototype.onparserinit=function(u){this.parser=u},s.prototype.onreset=function(){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},s.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},s.prototype.onerror=function(u){this.handleCallback(u)},s.prototype.onclosetag=function(){this.lastNode=null;var u=this.tagStack.pop();this.options.withEndIndices&&(u.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(u)},s.prototype.onopentag=function(u,l){var f=this.options.xmlMode?r.ElementType.Tag:void 0,h=new i.Element(u,l,void 0,f);this.addNode(h),this.tagStack.push(h)},s.prototype.ontext=function(u){var l=this.lastNode;if(l&&l.type===r.ElementType.Text)l.data+=u,this.options.withEndIndices&&(l.endIndex=this.parser.endIndex);else{var f=new i.Text(u);this.addNode(f),this.lastNode=f}},s.prototype.oncomment=function(u){if(this.lastNode&&this.lastNode.type===r.ElementType.Comment){this.lastNode.data+=u;return}var l=new i.Comment(u);this.addNode(l),this.lastNode=l},s.prototype.oncommentend=function(){this.lastNode=null},s.prototype.oncdatastart=function(){var u=new i.Text(""),l=new i.CDATA([u]);this.addNode(l),u.parent=l,this.lastNode=u},s.prototype.oncdataend=function(){this.lastNode=null},s.prototype.onprocessinginstruction=function(u,l){var f=new i.ProcessingInstruction(u,l);this.addNode(f)},s.prototype.handleCallback=function(u){if(typeof this.callback=="function")this.callback(u,this.dom);else if(u)throw u},s.prototype.addNode=function(u){var l=this.tagStack[this.tagStack.length-1],f=l.children[l.children.length-1];this.options.withStartIndices&&(u.startIndex=this.parser.startIndex),this.options.withEndIndices&&(u.endIndex=this.parser.endIndex),l.children.push(u),f&&(u.prev=f,f.next=u),u.parent=l,this.lastNode=null},s}();t.DomHandler=o,t.default=o})(_a);var Lc={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce(function(e,n){return e[n.toLowerCase()]=n,e},{})})(Lc),Object.defineProperty(ri,"__esModule",{value:!0}),ri.formatAttributes=Oc,ri.formatDOM=Pc;var oi=_a,dC=Lc;function pC(t){return dC.CASE_SENSITIVE_TAG_NAMES_MAP[t]}function Oc(t){for(var e={},n=0,r=t.length;n<r;n++){var i=t[n];e[i.name]=i.value}return e}function hC(t){t=t.toLowerCase();var e=pC(t);return e||t}function Pc(t,e,n){e===void 0&&(e=null);for(var r=[],i,a=0,o=t.length;a<o;a++){var s=t[a];switch(s.nodeType){case 1:{var u=hC(s.nodeName);i=new oi.Element(u,Oc(s.attributes)),i.children=Pc(u==="template"?s.content.childNodes:s.childNodes,i);break}case 3:i=new oi.Text(s.nodeValue);break;case 8:i=new oi.Comment(s.nodeValue);break;default:continue}var l=r[a-1]||null;l&&(l.next=i),i.parent=e,i.prev=l,i.next=null,r.push(i)}return n&&(i=new oi.ProcessingInstruction(n.substring(0,n.indexOf(" ")).toLowerCase(),n),i.next=r[0]||null,i.parent=e,r.unshift(i),r[1]&&(r[1].prev=r[0])),r}var vC=qe&&qe.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.default=CC;var gC=vC(Ia),mC=ri,yC=/<(![a-zA-Z\s]+)>/;function CC(t){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];var e=t.match(yC),n=e?e[1]:void 0;return(0,mC.formatDOM)((0,gC.default)(t),null,n)}var si={},kt={},ui={},DC=0;ui.SAME=DC;var bC=1;ui.CAMELCASE=bC,ui.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1};const Mc=0,on=1,li=2,ci=3,Va=4,Fc=5,kc=6;function EC(t){return ft.hasOwnProperty(t)?ft[t]:null}function mt(t,e,n,r,i,a,o){this.acceptsBooleans=e===li||e===ci||e===Va,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=a,this.removeEmptyString=o}const ft={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(t=>{ft[t]=new mt(t,Mc,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([t,e])=>{ft[t]=new mt(t,on,!1,e,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(t=>{ft[t]=new mt(t,li,!1,t.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(t=>{ft[t]=new mt(t,li,!1,t,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(t=>{ft[t]=new mt(t,ci,!1,t.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(t=>{ft[t]=new mt(t,ci,!0,t,null,!1,!1)}),["capture","download"].forEach(t=>{ft[t]=new mt(t,Va,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(t=>{ft[t]=new mt(t,kc,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(t=>{ft[t]=new mt(t,Fc,!1,t.toLowerCase(),null,!1,!1)});const qa=/[\-\:]([a-z])/g,Ga=t=>t[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(t=>{const e=t.replace(qa,Ga);ft[e]=new mt(e,on,!1,t,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(t=>{const e=t.replace(qa,Ga);ft[e]=new mt(e,on,!1,t,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(t=>{const e=t.replace(qa,Ga);ft[e]=new mt(e,on,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(t=>{ft[t]=new mt(t,on,!1,t.toLowerCase(),null,!1,!1)});const wC="xlinkHref";ft[wC]=new mt("xlinkHref",on,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(t=>{ft[t]=new mt(t,on,!1,t.toLowerCase(),null,!0,!0)});const{CAMELCASE:xC,SAME:BC,possibleStandardNames:Tc}=ui,SC=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",AC=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+SC+"]*$")),LC=Object.keys(Tc).reduce((t,e)=>{const n=Tc[e];return n===BC?t[e]=e:n===xC?t[e.toLowerCase()]=e:t[e]=n,t},{});kt.BOOLEAN=ci,kt.BOOLEANISH_STRING=li,kt.NUMERIC=Fc,kt.OVERLOADED_BOOLEAN=Va,kt.POSITIVE_NUMERIC=kc,kt.RESERVED=Mc,kt.STRING=on,kt.getPropertyInfo=EC,kt.isCustomAttribute=AC,kt.possibleStandardNames=LC;var Ya={},Za={},Rc=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,OC=/\n/g,PC=/^\s*/,MC=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,FC=/^:\s*/,kC=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,TC=/^[;\s]*/,RC=/^\s+|\s+$/g,IC=`
92
+ `,Ic="/",jc="*",xn="",jC="comment",NC="declaration",_C=function(t,e){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var n=1,r=1;function i(y){var v=y.match(OC);v&&(n+=v.length);var d=y.lastIndexOf(IC);r=~d?y.length-d:r+y.length}function a(){var y={line:n,column:r};return function(v){return v.position=new o(y),l(),v}}function o(y){this.start=y,this.end={line:n,column:r},this.source=e.source}o.prototype.content=t;function s(y){var v=new Error(e.source+":"+n+":"+r+": "+y);if(v.reason=y,v.filename=e.source,v.line=n,v.column=r,v.source=t,!e.silent)throw v}function u(y){var v=y.exec(t);if(v){var d=v[0];return i(d),t=t.slice(d.length),v}}function l(){u(PC)}function f(y){var v;for(y=y||[];v=h();)v!==!1&&y.push(v);return y}function h(){var y=a();if(!(Ic!=t.charAt(0)||jc!=t.charAt(1))){for(var v=2;xn!=t.charAt(v)&&(jc!=t.charAt(v)||Ic!=t.charAt(v+1));)++v;if(v+=2,xn===t.charAt(v-1))return s("End of comment missing");var d=t.slice(2,v-2);return r+=2,i(d),t=t.slice(v),r+=2,y({type:jC,comment:d})}}function p(){var y=a(),v=u(MC);if(v){if(h(),!u(FC))return s("property missing ':'");var d=u(kC),D=y({type:NC,property:Nc(v[0].replace(Rc,xn)),value:d?Nc(d[0].replace(Rc,xn)):xn});return u(TC),D}}function g(){var y=[];f(y);for(var v;v=p();)v!==!1&&(y.push(v),f(y));return y}return l(),g()};function Nc(t){return t?t.replace(RC,xn):xn}var zC=qe&&qe.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Za,"__esModule",{value:!0}),Za.default=UC;var WC=zC(_C);function UC(t,e){var n=null;if(!t||typeof t!="string")return n;var r=(0,WC.default)(t),i=typeof e=="function";return r.forEach(function(a){if(a.type==="declaration"){var o=a.property,s=a.value;i?e(o,s,a):s&&(n=n||{},n[o]=s)}}),n}var fi={};Object.defineProperty(fi,"__esModule",{value:!0}),fi.camelCase=void 0;var HC=/^--[a-zA-Z0-9-]+$/,VC=/-([a-z])/g,qC=/^[^-]+$/,GC=/^-(webkit|moz|ms|o|khtml)-/,YC=/^-(ms)-/,ZC=function(t){return!t||qC.test(t)||HC.test(t)},KC=function(t,e){return e.toUpperCase()},_c=function(t,e){return"".concat(e,"-")},XC=function(t,e){return e===void 0&&(e={}),ZC(t)?t:(t=t.toLowerCase(),e.reactCompat?t=t.replace(YC,_c):t=t.replace(GC,_c),t.replace(VC,KC))};fi.camelCase=XC;var JC=qe&&qe.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},QC=JC(Za),$C=fi;function Ka(t,e){var n={};return!t||typeof t!="string"||(0,QC.default)(t,function(r,i){r&&i&&(n[(0,$C.camelCase)(r,e)]=i)}),n}Ka.default=Ka;var eD=Ka;(function(t){var e=qe&&qe.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=a,t.setStyleProp=s;var n=c,r=e(eD),i=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function a(f,h){return f.includes("-")?!i.has(f):!!(h&&typeof h.is=="string")}var o={reactCompat:!0};function s(f,h){if(typeof f=="string"){if(!f.trim()){h.style={};return}try{h.style=(0,r.default)(f,o)}catch{h.style={}}}}t.PRESERVE_CUSTOM_ATTRIBUTES=Number(n.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var u=function(f){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(f.name)};t.canTextBeChildOfNode=u;var l=function(f){return f};t.returnFirstArg=l})(Ya),Object.defineProperty(si,"__esModule",{value:!0}),si.default=iD;var lr=kt,zc=Ya,tD=["checked","value"],nD=["input","select","textarea"],rD={reset:!0,submit:!0};function iD(t,e){t===void 0&&(t={});var n={},r=!!(t.type&&rD[t.type]);for(var i in t){var a=t[i];if((0,lr.isCustomAttribute)(i)){n[i]=a;continue}var o=i.toLowerCase(),s=Wc(o);if(s){var u=(0,lr.getPropertyInfo)(s);switch(tD.includes(s)&&nD.includes(e)&&!r&&(s=Wc("default"+o)),n[s]=a,u&&u.type){case lr.BOOLEAN:n[s]=!0;break;case lr.OVERLOADED_BOOLEAN:a===""&&(n[s]=!0);break}continue}zc.PRESERVE_CUSTOM_ATTRIBUTES&&(n[i]=a)}return(0,zc.setStyleProp)(t.style,n),n}function Wc(t){return lr.possibleStandardNames[t]}var Xa={},aD=qe&&qe.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Xa,"__esModule",{value:!0}),Xa.default=Uc;var Ja=c,oD=aD(si),cr=Ya,sD={cloneElement:Ja.cloneElement,createElement:Ja.createElement,isValidElement:Ja.isValidElement};function Uc(t,e){e===void 0&&(e={});for(var n=[],r=typeof e.replace=="function",i=e.transform||cr.returnFirstArg,a=e.library||sD,o=a.cloneElement,s=a.createElement,u=a.isValidElement,l=t.length,f=0;f<l;f++){var h=t[f];if(r){var p=e.replace(h,f);if(u(p)){l>1&&(p=o(p,{key:p.key||f})),n.push(i(p,h,f));continue}}if(h.type==="text"){var g=!h.data.trim().length;if(g&&h.parent&&!(0,cr.canTextBeChildOfNode)(h.parent)||e.trim&&g)continue;n.push(i(h.data,h,f));continue}var y=h,v={};uD(y)?((0,cr.setStyleProp)(y.attribs.style,y.attribs),v=y.attribs):y.attribs&&(v=(0,oD.default)(y.attribs,y.name));var d=void 0;switch(h.type){case"script":case"style":h.children[0]&&(v.dangerouslySetInnerHTML={__html:h.children[0].data});break;case"tag":h.name==="textarea"&&h.children[0]?v.defaultValue=h.children[0].data:h.children&&h.children.length&&(d=Uc(h.children,e));break;default:continue}l>1&&(v.key=f),n.push(i(s(h.name,v,d),h,f))}return n.length===1?n[0]:n}function uD(t){return cr.PRESERVE_CUSTOM_ATTRIBUTES&&t.type==="tag"&&(0,cr.isCustomComponent)(t.name,t.attribs)}(function(t){var e=qe&&qe.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0,t.default=s;var n=e(Ra);t.htmlToDOM=n.default;var r=e(si);t.attributesToProps=r.default;var i=e(Xa);t.domToReact=i.default;var a=_a;Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return a.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return a.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return a.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return a.Text}});var o={lowerCaseAttributeNames:!1};function s(u,l){if(typeof u!="string")throw new TypeError("First argument must be a string");return u?(0,i.default)((0,n.default)(u,(l==null?void 0:l.htmlparser2)||o),l):[]}})(cc);const Hc=Er(cc),lD=Hc.default||Hc,Qa=t=>{if(typeof t=="string")return{text:t||""};function e(i){return i.map(a=>Qa(a))}const n=Array.isArray(t.props.children)?e(t.props.children):[{text:t.props.children}],r=typeof t.props.children=="string"?t.props.children:"";switch(t.type){case"p":return{type:"paragraph",children:n};case"blockquote":return{type:"blockQuote",children:n};case"ul":return{type:"bulletedList",children:n};case"h1":return{type:"headingOne",children:n};case"h2":return{type:"headingTwo",children:n};case"li":return{type:"listItem",children:n};case"ol":return{type:"numberedList",children:n};case"strong":return{text:r,bold:!0};case"code":return{text:r,code:!0};case"em":return{text:r,italic:!0};case"u":return{text:r,underline:!0};default:return{text:r}}},cD=t=>{const e=lD(t);return Array.isArray(e)?e.flatMap(n=>typeof n=="string"?{text:n}:Qa(n)):typeof e=="string"?[{text:e}]:[Qa(e)]};function Vc(t){return t.map(e=>ie.string(e)).join("")}const qc=t=>{if(ce.isText(t)){let e=t.text;return t.bold&&(e=`<strong>${e}</strong>`),t.code&&(e=`<code>${e}</code>`),t.italic&&(e=`<em>${e}</em>`),t.underline&&(e=`<u>${e}</u>`),e}if(le.isElement(t)){const e=t.children.map(n=>qc(n)).join("");switch(t.type){case"paragraph":return`<p>${e}</p>`;case"blockQuote":return`<blockquote>${e}</blockquote>`;case"bulletedList":return`<ul>${e}</ul>`;case"headingOne":return`<h1>${e}</h1>`;case"headingTwo":return`<h2>${e}</h2>`;case"listItem":return`<li>${e}</li>`;case"numberedList":return`<ol>${e}</ol>`;default:return e}}return""},Gc=t=>t.children.map(e=>qc(e)).join(""),Yc=t=>/<\/?[a-z][\s\S]*>/i.test(t);function fD({name:t,defaultValue:e,enforceCharacterLimit:n=!1,onChangeCharactersCount:r,maxLimit:i=2e3,onValueChange:a,onChange:o,isError:s}){const u=c.useMemo(()=>Gg(tC(Hg())),[]),{id:l,inputRef:f,error:h}=xt(),p=c.useRef(null),g=Yc(e)?cD(e):oC,y=Vc(g),[v,d]=c.useState(y.length),[D,x]=c.useState(Yc(e)?e:""),[E,O]=c.useState(!1),b=f||p,w=s||!!h,A=c.useCallback(iC,[]),M=c.useCallback(rC,[]);function V(T){const j=Vc(T);d(j.length),r&&r(j.length),!(n&&j.length>=i)&&(x(Gc(u)),o&&o(T),a&&a(Gc(u)),u.children=T,ee.setNodes(u,{children:T}))}const P=E?"focusTrue":"focusFalse",R=`arkynRichText ${w||i<v?"errorTrue":"errorFalse"} ${P}`,N=i-v;return B.jsxs($y,{editor:u,initialValue:g,onChange:V,onValueChange:V,children:[B.jsxs("div",{className:R,children:[B.jsxs(aC,{children:[B.jsx(wn,{format:"headingOne",icon:Ae.Heading1}),B.jsx(wn,{format:"headingTwo",icon:Ae.Heading2}),B.jsx(wn,{format:"blockQuote",icon:Ae.Quote}),B.jsx(Qr,{format:"bold",icon:Ae.Bold}),B.jsx(Qr,{format:"italic",icon:Ae.Italic}),B.jsx(Qr,{format:"underline",icon:Ae.Underline}),B.jsx(Qr,{format:"code",icon:Ae.Code}),B.jsx(wn,{format:"left",icon:Ae.AlignLeft}),B.jsx(wn,{format:"right",icon:Ae.AlignRight}),B.jsx(wn,{format:"center",icon:Ae.AlignCenter}),B.jsx(wn,{format:"justify",icon:Ae.AlignJustify})]}),B.jsx(Vy,{className:"editorContainer",renderElement:M,renderLeaf:A,spellCheck:!0,id:l,onFocus:()=>O(!0),onBlur:()=>O(!1),onKeyDown:T=>{for(const j in lc)if(fh(j,T)){T.preventDefault();const X=lc[j];uc(u,X)}}}),N<0&&B.jsx("div",{className:"restatesCharacters",children:N})]}),B.jsx("input",{ref:b,type:"hidden",name:t,value:D}),B.jsx("input",{type:"hidden",name:`${t}Count`,value:v})]})}function dD(t,e){const{isLoading:n,isError:r,size:i="md",className:a="",variant:o="solid",prefix:s,leftIcon:u,disabled:l,readOnly:f,onFocus:h,onBlur:p,title:g,style:y,closeOnSelect:v=!0,...d}=t,b=`arkyn_select ${s?"hasPrefix":""} ${o} ${i} ${l||f||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${a}`,A={md:20,lg:20}[i];return{isLoading:n,className:b,prefix:fd(s,A,"prefix"),LeftIcon:u,disabled:l||n||f,onFocus:h,onBlur:p,title:g,closeOnSelect:v,style:y,iconSize:A,Spinner:B.jsx(Ae.Loader2,{className:"spinner",size:A,strokeWidth:2.5}),...d}}function pD(t){var G;const[e,n]=c.useState(!1),{inputRef:r,id:i,error:a}=xt(),o=c.useRef(null),s=r||o,u=t.isError||!!a,{disabled:l,title:f,style:h,className:p,prefix:g,iconSize:y,isLoading:v,LeftIcon:d,value:D=null,defaultValue:x="",onFocus:E,onBlur:O,Spinner:b,name:w,placeholder:A,onSelect:M,options:V,optionMaxHeight:P,closeOnSelect:_,...R}=dD({...t,id:i,isError:u},e),[N,T]=c.useState(x);function j(){l||!(s!=null&&s.current)||e||(n(!0),s.current.focus())}function X(H){e||(n(!0),E&&E(H))}function z(){n(!1),O&&s.current&&s.current.blur()}function $(H){const{label:Q,value:K}=H;T(N!==K?K:""),M&&M({label:Q,value:K}),_&&z()}const re=typeof D=="string"?D:N,k=((G=V.find(H=>H.value===re))==null?void 0:G.label)||"",I=()=>{if(!e&&k)return!0;if(!e&&!k)return!1;if(e&&k)return!0;if(e&&!k)return!1};return B.jsxs(B.Fragment,{children:[B.jsxs("section",{title:f,style:h,onClick:j,className:`${p} placeholder_dark_${I()}`,children:[g,d&&B.jsx(d,{size:y,strokeWidth:2.5}),B.jsx("input",{disabled:l,readOnly:!0,placeholder:k||A,onFocus:X,...R}),B.jsx("input",{type:"hidden",ref:s,name:w,value:re||"",readOnly:!0}),e&&B.jsxs("div",{className:"arkyn_select_content",style:{overflow:"auto",maxHeight:P},children:[V.map(({label:H,value:Q})=>B.jsxs("div",{onClick:()=>$({label:H,value:Q}),className:re===Q?"arkyn_select_option active":"arkyn_select_option",children:[H," ",B.jsx(Ae.Check,{})]},Q)),V.length<=0&&B.jsx("p",{children:"Sem opções disponíveis"})]}),!v&&B.jsx(Ae.ChevronDown,{className:"arkyn_select_arrow",size:y,strokeWidth:2.5}),v&&b]}),e&&B.jsx("aside",{className:"arkyn_select_overlay",onClick:z})]})}function hD(t){const{size:e="lg",defaultChecked:n=!1,checked:r=null,value:i,unCheckedValue:a="",name:o,className:s="",onCheck:u,...l}=t,[f,h]=c.useState(n),{id:p,inputRef:g}=xt(),y=typeof r=="boolean"?r:f;function v(){h(!f),u&&u(y?a:i||"checked")}const D=`arkynSwitch ${y?"checkedTrue":"checkedFalse"} ${e} ${s}`;return B.jsx("button",{type:"button",onClick:v,className:D,...l,children:B.jsx("input",{id:p,type:"hidden",name:o,ref:g,onClick:v,value:y?i||"checked":a})})}function vD(t){const{variant:e="solid",size:n="md",className:r,disabled:i=!1,readOnly:a=!1,onFocus:o,onBlur:s,title:u,style:l,...f}=t,[h,p]=c.useState(!1),{inputRef:g,id:y,error:v}=xt(),d=c.useRef(null),D=g||d,E=t.isError||!!v?"errorTrue":"errorFalse",w=`arkynTextarea ${e} ${n} ${i||a?"opacityTrue":"opacityFalse"} ${E} ${h?"focusedTrue":"focusedFalse"} ${r}`;function A(){i||!(D!=null&&D.current)||(p(!0),D.current.focus())}function M(P){p(!0),o&&o(P)}function V(P){p(!1),s&&s(P)}return B.jsx("section",{title:u,style:l,onClick:A,className:w,children:B.jsx("textarea",{id:y,disabled:i,readOnly:a,ref:D,onFocus:M,onBlur:V,...f})})}function gD(t){const{className:e="",...n}=t,r=`arkynBreadcrumbContainer ${e}`;return B.jsx("nav",{className:r,...n})}function mD(t){const{pathname:e}=Ln.useLocation(),{className:n="",disabled:r=!1,children:i,to:a,...o}=t,u=`arkynBreadcrumbLink ${e===a?"active":"inactive"} ${n}`;return r?B.jsxs("p",{className:u,children:[B.jsx(Ae.ChevronRight,{size:14,strokeWidth:2.5}),i]}):B.jsxs(Ln.Link,{to:a,className:u,...o,children:[B.jsx(Ae.ChevronRight,{size:14,strokeWidth:2.5}),i]})}function Zc(t=""){const e=Ln.useLocation(),n=new URLSearchParams(e.search),r=t?`${t}:`:"",i=a=>{Object.entries(a).forEach(([o,s])=>{s===void 0?n.delete(`${r}${o}`):n.set(`${r}${o}`,String(s))})};return{getParam:a=>n.get(`${r}${a}`),getScopedSearch:a=>{i(a);let o=n.toString();return o&&(o="?"+o),o}}}function yD(t){const{scope:e,totalCountRegisters:n,perPageKey:r="per_page",pageKey:i="page",siblingsCount:a=2,...o}=t,s=Ln.useNavigate(),{getParam:u,getScopedSearch:l}=Zc(e),f=Number(u(i))||1,h=Number(u(r))||20,p=Math.ceil(n/h),g=cd(f,a),y=ld(f,a,p);function v(d){s(l({page:d}))}return B.jsxs("div",{className:"arkynPagination",...o,children:[B.jsx("button",{className:"arkynPaginationIconButton",disabled:f<=1,onClick:()=>v(f-1),children:B.jsx(Ae.ChevronLeft,{})}),f>1+a&&B.jsxs(B.Fragment,{children:[B.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>v(1),children:"1"}),f>2+a&&B.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:B.jsx(Ae.Ellipsis,{})})]}),g.map((d,D)=>B.jsx("button",{onClick:()=>v(d),className:"arkynPaginationPageButton",children:d},D)),B.jsx("button",{className:"arkynPaginationCurrent",disabled:!0,children:f}),y.map((d,D)=>B.jsx("button",{onClick:()=>v(d),className:"arkynPaginationPageButton",children:d},D)),f+a<p&&B.jsxs(B.Fragment,{children:[f+1+a<p&&B.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:B.jsx(Ae.Ellipsis,{})}),B.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>v(p),children:p})]}),B.jsx("button",{className:"arkynPaginationIconButton",disabled:f>=p,onClick:()=>v(f+1),children:B.jsx(Ae.ChevronRight,{})})]})}const $a=c.createContext({});function CD(){if(!$a)throw new Error("useTabContext must be used within a TabProvider");return c.useContext($a)}function DD(t){const{children:e,onClick:n,defaultActive:r,className:i,...a}=t,[o,s]=c.useState(r||""),[u,l]=c.useState(!0),f=c.useRef(null),h=`arkynTabContainer ${i||""}`,[p,g]=c.useState({width:"0px",left:"0px",transition:"none"}),y=(d,D)=>{const x=d.getBoundingClientRect(),E=f.current.getBoundingClientRect(),O=D?void 0:"none";l(!1),g({transition:O,width:`${x.width}px`,left:`${x.left-E.left}px`})};c.useEffect(()=>{const d=f.current;if(!d)return;let D=null;D=d.querySelector("button.activeTrue"),D&&y(D)},[]);const v=d=>{const D=d.target;D&&(s(D.value),D.classList.add("activeTrue"),y(D,!0),n&&n(D.value))};return B.jsxs("nav",{ref:f,className:h.trim(),...a,children:[B.jsx($a.Provider,{value:{handleTabClick:v,showInitialTab:u,value:o},children:e}),B.jsx("div",{className:"activeLine",style:p})]})}function bD(t){const{children:e,className:n="",onClick:r,...i}=t,{value:a,showInitialTab:o,handleTabClick:s}=CD(),u=a===i.value&&a?"activeTrue":"activeFalse",f=`arkynTabButton ${a===i.value&&o?"showBorderBottom":""} ${u} ${n}`;function h(p){s(p),r&&r(p)}return B.jsx("button",{onClick:h,className:f.trim(),...i,children:e})}const Kc=c.createContext({});function ED(t){const{isVisibled:e,makeInvisible:n,orientation:r="left",children:i,className:a,...o}=t,s=r==="left"?"-100%":"100%",l=`arkynDrawerContainer ${r} ${e?"visibleTrue":"visibleFalse"} ${a}`;return B.jsx(Kc.Provider,{value:{makeInvisible:n},children:B.jsx(cn.AnimatePresence,{children:e&&B.jsxs("aside",{className:l.trim(),...o,children:[B.jsx(cn.motion.div,{className:"arkynDrawerContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),B.jsx(cn.motion.div,{className:"arkynDrawerContainerContent",transition:{ease:"easeOut",duration:.15},initial:{transform:`translateX(${s})`},animate:{transform:"translateX(0px)"},exit:{transform:`translateX(${s})`},children:i})]})})})}function wD(t){const{showCloseButton:e=!0,className:n,children:r,...i}=t,{makeInvisible:a}=c.useContext(Kc),o=`arkynDrawerHeader ${n}`;return B.jsxs("header",{className:o.trim(),...i,children:[r,e&&B.jsx("button",{className:"arkynDrawerHeaderCloseButton",type:"button",onClick:a,"aria-label":"Close drawer",children:B.jsx(Ae.X,{size:24})})]})}const Xc=c.createContext({});function xD(t){const{isVisibled:e,makeInvisible:n,children:r,className:i="",...a}=t,s=`arkynModalContainer ${e?"visibleTrue":"visibleFalse"} ${i}`;return B.jsx(Xc.Provider,{value:{makeInvisible:n},children:B.jsx(cn.AnimatePresence,{children:e&&B.jsxs("aside",{className:s.trim(),...a,children:[B.jsx(cn.motion.div,{className:"arkynModalContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),B.jsx(cn.motion.div,{className:"arkynModalContainerContent",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0,scale:.75},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},children:r})]})})})}function BD(t){const{alignment:e="right",className:n,...r}=t,i=`arkynModalFooter ${e} ${n}`;return B.jsx("footer",{className:i.trim(),...r})}function SD(t){const{showCloseButton:e=!0,className:n,children:r,...i}=t,{makeInvisible:a}=c.useContext(Xc),o=`arkynModalHeader ${n}`;return B.jsxs("header",{className:o.trim(),...i,children:[r,e&&B.jsx("button",{type:"button",onClick:a,"aria-label":"Close modal button",className:"arkynModalHeaderCloseButton",children:B.jsx(Ae.X,{size:24})})]})}function AD(t){const{children:e,button:n,closeOnClick:r,orientation:i="bottomLeft"}=t,[a,o]=c.useState(!1),u=`arkynPopover ${i} ${a?"visibleTrue":"visibleFalse"}`;function l(){a||o(!0)}return B.jsxs("div",{className:u,onClick:l,children:[n,B.jsx(cn.motion.div,{style:{visibility:a?"visible":"hidden"},transition:{ease:"easeOut",duration:0},initial:{opacity:0},animate:{opacity:a?1:0},exit:{opacity:0},onClick:()=>r&&o(!1),className:"arkynPopoverContent",children:e}),a&&B.jsx("div",{onClick:()=>o(!1),className:"arkynPopoverOverlay"})]})}function Jc(t){const{message:e,title:n,type:r,size:i="lg"}=t,a=`arkynToast ${r} ${i}`;function o(){switch(r){case"info":return B.jsx(Ae.Info,{});case"success":return B.jsx(Ae.CheckCircle2,{});case"danger":return B.jsx(Ae.XCircle,{});case"warning":return B.jsx(Ae.AlertCircle,{});default:return B.jsx(Ae.Info,{})}}return B.jsxs("aside",{className:a,children:[B.jsxs("div",{children:[B.jsx("div",{className:"bg"}),B.jsx(o,{})]}),B.jsxs("p",{children:[B.jsx("strong",{title:n,children:n}),B.jsx("span",{children:e})]})]})}function LD(t){const{text:e,size:n="lg",children:r,orientation:i="top",className:a="",...o}=t,s=`arkynTooltip ${n} ${i} ${a}`;return B.jsxs("div",{className:s.trim(),...o,children:[r,B.jsx("div",{className:"arkynTooltipText",children:e})]})}var nt={},eo={},fr={},dr={},Qc="Expected a function",$c=NaN,OD="[object Symbol]",PD=/^\s+|\s+$/g,MD=/^[-+]0x[0-9a-f]+$/i,FD=/^0b[01]+$/i,kD=/^0o[0-7]+$/i,TD=parseInt,RD=typeof qe=="object"&&qe&&qe.Object===Object&&qe,ID=typeof self=="object"&&self&&self.Object===Object&&self,jD=RD||ID||Function("return this")(),ND=Object.prototype,_D=ND.toString,zD=Math.max,WD=Math.min,to=function(){return jD.Date.now()};function UD(t,e,n){var r,i,a,o,s,u,l=0,f=!1,h=!1,p=!0;if(typeof t!="function")throw new TypeError(Qc);e=ef(e)||0,di(n)&&(f=!!n.leading,h="maxWait"in n,a=h?zD(ef(n.maxWait)||0,e):a,p="trailing"in n?!!n.trailing:p);function g(w){var A=r,M=i;return r=i=void 0,l=w,o=t.apply(M,A),o}function y(w){return l=w,s=setTimeout(D,e),f?g(w):o}function v(w){var A=w-u,M=w-l,V=e-A;return h?WD(V,a-M):V}function d(w){var A=w-u,M=w-l;return u===void 0||A>=e||A<0||h&&M>=a}function D(){var w=to();if(d(w))return x(w);s=setTimeout(D,v(w))}function x(w){return s=void 0,p&&r?g(w):(r=i=void 0,o)}function E(){s!==void 0&&clearTimeout(s),l=0,r=u=i=s=void 0}function O(){return s===void 0?o:x(to())}function b(){var w=to(),A=d(w);if(r=arguments,i=this,u=w,A){if(s===void 0)return y(u);if(h)return s=setTimeout(D,e),g(u)}return s===void 0&&(s=setTimeout(D,e)),o}return b.cancel=E,b.flush=O,b}function HD(t,e,n){var r=!0,i=!0;if(typeof t!="function")throw new TypeError(Qc);return di(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),UD(t,e,{leading:r,maxWait:e,trailing:i})}function di(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function VD(t){return!!t&&typeof t=="object"}function qD(t){return typeof t=="symbol"||VD(t)&&_D.call(t)==OD}function ef(t){if(typeof t=="number")return t;if(qD(t))return $c;if(di(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=di(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(PD,"");var n=FD.test(t);return n||kD.test(t)?TD(t.slice(2),n?2:8):MD.test(t)?$c:+t}var GD=HD,pr={};Object.defineProperty(pr,"__esModule",{value:!0}),pr.addPassiveEventListener=function(e,n,r){var i=r.name;i||(i=n,console.warn("Listener must be a named function.")),pi.has(n)||pi.set(n,new Set);var a=pi.get(n);if(!a.has(i)){var o=function(){var s=!1;try{var u=Object.defineProperty({},"passive",{get:function(){s=!0}});window.addEventListener("test",null,u)}catch{}return s}();e.addEventListener(n,r,o?{passive:!0}:!1),a.add(i)}},pr.removePassiveEventListener=function(e,n,r){e.removeEventListener(n,r),pi.get(n).delete(r.name||n)};var pi=new Map;Object.defineProperty(dr,"__esModule",{value:!0});var YD=GD,ZD=XD(YD),KD=pr;function XD(t){return t&&t.__esModule?t:{default:t}}var JD=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:66;return(0,ZD.default)(e,n)},$e={spyCallbacks:[],spySetState:[],scrollSpyContainers:[],mount:function(e,n){if(e){var r=JD(function(i){$e.scrollHandler(e)},n);$e.scrollSpyContainers.push(e),(0,KD.addPassiveEventListener)(e,"scroll",r)}},isMounted:function(e){return $e.scrollSpyContainers.indexOf(e)!==-1},currentPositionX:function(e){if(e===document){var n=window.pageYOffset!==void 0,r=(document.compatMode||"")==="CSS1Compat";return n?window.pageXOffset:r?document.documentElement.scrollLeft:document.body.scrollLeft}else return e.scrollLeft},currentPositionY:function(e){if(e===document){var n=window.pageXOffset!==void 0,r=(document.compatMode||"")==="CSS1Compat";return n?window.pageYOffset:r?document.documentElement.scrollTop:document.body.scrollTop}else return e.scrollTop},scrollHandler:function(e){var n=$e.scrollSpyContainers[$e.scrollSpyContainers.indexOf(e)].spyCallbacks||[];n.forEach(function(r){return r($e.currentPositionX(e),$e.currentPositionY(e))})},addStateHandler:function(e){$e.spySetState.push(e)},addSpyHandler:function(e,n){var r=$e.scrollSpyContainers[$e.scrollSpyContainers.indexOf(n)];r.spyCallbacks||(r.spyCallbacks=[]),r.spyCallbacks.push(e),e($e.currentPositionX(n),$e.currentPositionY(n))},updateStates:function(){$e.spySetState.forEach(function(e){return e()})},unmount:function(e,n){$e.scrollSpyContainers.forEach(function(r){return r.spyCallbacks&&r.spyCallbacks.length&&r.spyCallbacks.indexOf(n)>-1&&r.spyCallbacks.splice(r.spyCallbacks.indexOf(n),1)}),$e.spySetState&&$e.spySetState.length&&$e.spySetState.indexOf(e)>-1&&$e.spySetState.splice($e.spySetState.indexOf(e),1),document.removeEventListener("scroll",$e.scrollHandler)},update:function(){return $e.scrollSpyContainers.forEach(function(e){return $e.scrollHandler(e)})}};dr.default=$e;var jn={},hr={};Object.defineProperty(hr,"__esModule",{value:!0});var QD=function(e,n){var r=e.indexOf("#")===0?e.substring(1):e,i=r?"#"+r:"",a=window&&window.location,o=i?a.pathname+a.search+i:a.pathname+a.search;n?history.pushState(history.state,"",o):history.replaceState(history.state,"",o)},$D=function(){return window.location.hash.replace(/^#/,"")},eb=function(e){return function(n){return e.contains?e!=n&&e.contains(n):!!(e.compareDocumentPosition(n)&16)}},tb=function(e){return getComputedStyle(e).position!=="static"},no=function(e,n){for(var r=e.offsetTop,i=e.offsetParent;i&&!n(i);)r+=i.offsetTop,i=i.offsetParent;return{offsetTop:r,offsetParent:i}},nb=function(e,n,r){if(r)return e===document?n.getBoundingClientRect().left+(window.scrollX||window.pageXOffset):getComputedStyle(e).position!=="static"?n.offsetLeft:n.offsetLeft-e.offsetLeft;if(e===document)return n.getBoundingClientRect().top+(window.scrollY||window.pageYOffset);if(tb(e)){if(n.offsetParent!==e){var i=function(f){return f===e||f===document},a=no(n,i),o=a.offsetTop,s=a.offsetParent;if(s!==e)throw new Error("Seems containerElement is not an ancestor of the Element");return o}return n.offsetTop}if(n.offsetParent===e.offsetParent)return n.offsetTop-e.offsetTop;var u=function(f){return f===document};return no(n,u).offsetTop-no(e,u).offsetTop};hr.default={updateHash:QD,getHash:$D,filterElementInContainer:eb,scrollOffset:nb};var hi={},ro={};Object.defineProperty(ro,"__esModule",{value:!0}),ro.default={defaultEasing:function(e){return e<.5?Math.pow(e*2,2)/2:1-Math.pow((1-e)*2,2)/2},linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return e<.5?2*e*e:-1+(4-2*e)*e},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return--e*e*e+1},easeInOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1- --e*e*e*e},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1+--e*e*e*e*e},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}};var io={};Object.defineProperty(io,"__esModule",{value:!0});var rb=pr,ib=["mousedown","mousewheel","touchmove","keydown"];io.default={subscribe:function(e){return typeof document<"u"&&ib.forEach(function(n){return(0,rb.addPassiveEventListener)(document,n,e)})}};var vr={};Object.defineProperty(vr,"__esModule",{value:!0});var ao={registered:{},scrollEvent:{register:function(e,n){ao.registered[e]=n},remove:function(e){ao.registered[e]=null}}};vr.default=ao,Object.defineProperty(hi,"__esModule",{value:!0});var ab=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ob=hr;vi(ob);var sb=ro,tf=vi(sb),ub=io,lb=vi(ub),cb=vr,Nt=vi(cb);function vi(t){return t&&t.__esModule?t:{default:t}}var nf=function(e){return tf.default[e.smooth]||tf.default.defaultEasing},fb=function(e){return typeof e=="function"?e:function(){return e}},db=function(){if(typeof window<"u")return window.requestAnimationFrame||window.webkitRequestAnimationFrame},oo=function(){return db()||function(t,e,n){window.setTimeout(t,n||1e3/60,new Date().getTime())}}(),rf=function(){return{currentPosition:0,startPosition:0,targetPosition:0,progress:0,duration:0,cancel:!1,target:null,containerElement:null,to:null,start:null,delta:null,percent:null,delayTimeout:null}},af=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollLeft;var r=window.pageXOffset!==void 0,i=(document.compatMode||"")==="CSS1Compat";return r?window.pageXOffset:i?document.documentElement.scrollLeft:document.body.scrollLeft},of=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollTop;var r=window.pageXOffset!==void 0,i=(document.compatMode||"")==="CSS1Compat";return r?window.pageYOffset:i?document.documentElement.scrollTop:document.body.scrollTop},pb=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollWidth-n.offsetWidth;var r=document.body,i=document.documentElement;return Math.max(r.scrollWidth,r.offsetWidth,i.clientWidth,i.scrollWidth,i.offsetWidth)},hb=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollHeight-n.offsetHeight;var r=document.body,i=document.documentElement;return Math.max(r.scrollHeight,r.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight)},vb=function t(e,n,r){var i=n.data;if(!n.ignoreCancelEvents&&i.cancel){Nt.default.registered.end&&Nt.default.registered.end(i.to,i.target,i.currentPositionY);return}if(i.delta=Math.round(i.targetPosition-i.startPosition),i.start===null&&(i.start=r),i.progress=r-i.start,i.percent=i.progress>=i.duration?1:e(i.progress/i.duration),i.currentPosition=i.startPosition+Math.ceil(i.delta*i.percent),i.containerElement&&i.containerElement!==document&&i.containerElement!==document.body?n.horizontal?i.containerElement.scrollLeft=i.currentPosition:i.containerElement.scrollTop=i.currentPosition:n.horizontal?window.scrollTo(i.currentPosition,0):window.scrollTo(0,i.currentPosition),i.percent<1){var a=t.bind(null,e,n);oo.call(window,a);return}Nt.default.registered.end&&Nt.default.registered.end(i.to,i.target,i.currentPosition)},so=function(e){e.data.containerElement=e?e.containerId?document.getElementById(e.containerId):e.container&&e.container.nodeType?e.container:document:null},gr=function(e,n,r,i){n.data=n.data||rf(),window.clearTimeout(n.data.delayTimeout);var a=function(){n.data.cancel=!0};if(lb.default.subscribe(a),so(n),n.data.start=null,n.data.cancel=!1,n.data.startPosition=n.horizontal?af(n):of(n),n.data.targetPosition=n.absolute?e:e+n.data.startPosition,n.data.startPosition===n.data.targetPosition){Nt.default.registered.end&&Nt.default.registered.end(n.data.to,n.data.target,n.data.currentPosition);return}n.data.delta=Math.round(n.data.targetPosition-n.data.startPosition),n.data.duration=fb(n.duration)(n.data.delta),n.data.duration=isNaN(parseFloat(n.data.duration))?1e3:parseFloat(n.data.duration),n.data.to=r,n.data.target=i;var o=nf(n),s=vb.bind(null,o,n);if(n&&n.delay>0){n.data.delayTimeout=window.setTimeout(function(){Nt.default.registered.begin&&Nt.default.registered.begin(n.data.to,n.data.target),oo.call(window,s)},n.delay);return}Nt.default.registered.begin&&Nt.default.registered.begin(n.data.to,n.data.target),oo.call(window,s)},gi=function(e){return e=ab({},e),e.data=e.data||rf(),e.absolute=!0,e},gb=function(e){gr(0,gi(e))},mb=function(e,n){gr(e,gi(n))},yb=function(e){e=gi(e),so(e),gr(e.horizontal?pb(e):hb(e),e)},Cb=function(e,n){n=gi(n),so(n);var r=n.horizontal?af(n):of(n);gr(e+r,n)};hi.default={animateTopScroll:gr,getAnimationType:nf,scrollToTop:gb,scrollToBottom:yb,scrollTo:mb,scrollMore:Cb},Object.defineProperty(jn,"__esModule",{value:!0});var Db=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},bb=hr,Eb=uo(bb),wb=hi,xb=uo(wb),Bb=vr,mi=uo(Bb);function uo(t){return t&&t.__esModule?t:{default:t}}var yi={},sf=void 0;jn.default={unmount:function(){yi={}},register:function(e,n){yi[e]=n},unregister:function(e){delete yi[e]},get:function(e){return yi[e]||document.getElementById(e)||document.getElementsByName(e)[0]||document.getElementsByClassName(e)[0]},setActiveLink:function(e){return sf=e},getActiveLink:function(){return sf},scrollTo:function(e,n){var r=this.get(e);if(!r){console.warn("target Element not found");return}n=Db({},n,{absolute:!1});var i=n.containerId,a=n.container,o=void 0;i?o=document.getElementById(i):a&&a.nodeType?o=a:o=document,n.absolute=!0;var s=n.horizontal,u=Eb.default.scrollOffset(o,r,s)+(n.offset||0);if(!n.smooth){mi.default.registered.begin&&mi.default.registered.begin(e,r),o===document?n.horizontal?window.scrollTo(u,0):window.scrollTo(0,u):o.scrollTop=u,mi.default.registered.end&&mi.default.registered.end(e,r);return}xb.default.animateTopScroll(u,n,e,r)}};var lo={exports:{}},Ci={exports:{}},Ue={};/** @license React v16.13.1
93
93
  * react-is.production.min.js
94
94
  *
95
95
  * Copyright (c) Facebook, Inc. and its affiliates.
96
96
  *
97
97
  * This source code is licensed under the MIT license found in the
98
98
  * LICENSE file in the root directory of this source tree.
99
- */var sf;function Bb(){if(sf)return Ue;sf=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,a=t?Symbol.for("react.profiler"):60114,o=t?Symbol.for("react.provider"):60109,s=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,l=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,g=t?Symbol.for("react.memo"):60115,y=t?Symbol.for("react.lazy"):60116,v=t?Symbol.for("react.block"):60121,d=t?Symbol.for("react.fundamental"):60117,D=t?Symbol.for("react.responder"):60118,x=t?Symbol.for("react.scope"):60119;function E(b){if(typeof b=="object"&&b!==null){var w=b.$$typeof;switch(w){case e:switch(b=b.type,b){case u:case l:case r:case a:case i:case h:return b;default:switch(b=b&&b.$$typeof,b){case s:case f:case y:case g:case o:return b;default:return w}}case n:return w}}}function O(b){return E(b)===l}return Ue.AsyncMode=u,Ue.ConcurrentMode=l,Ue.ContextConsumer=s,Ue.ContextProvider=o,Ue.Element=e,Ue.ForwardRef=f,Ue.Fragment=r,Ue.Lazy=y,Ue.Memo=g,Ue.Portal=n,Ue.Profiler=a,Ue.StrictMode=i,Ue.Suspense=h,Ue.isAsyncMode=function(b){return O(b)||E(b)===u},Ue.isConcurrentMode=O,Ue.isContextConsumer=function(b){return E(b)===s},Ue.isContextProvider=function(b){return E(b)===o},Ue.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},Ue.isForwardRef=function(b){return E(b)===f},Ue.isFragment=function(b){return E(b)===r},Ue.isLazy=function(b){return E(b)===y},Ue.isMemo=function(b){return E(b)===g},Ue.isPortal=function(b){return E(b)===n},Ue.isProfiler=function(b){return E(b)===a},Ue.isStrictMode=function(b){return E(b)===i},Ue.isSuspense=function(b){return E(b)===h},Ue.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===r||b===l||b===a||b===i||b===h||b===p||typeof b=="object"&&b!==null&&(b.$$typeof===y||b.$$typeof===g||b.$$typeof===o||b.$$typeof===s||b.$$typeof===f||b.$$typeof===d||b.$$typeof===D||b.$$typeof===x||b.$$typeof===v)},Ue.typeOf=E,Ue}var He={};/** @license React v16.13.1
99
+ */var uf;function Sb(){if(uf)return Ue;uf=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,a=t?Symbol.for("react.profiler"):60114,o=t?Symbol.for("react.provider"):60109,s=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,l=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,g=t?Symbol.for("react.memo"):60115,y=t?Symbol.for("react.lazy"):60116,v=t?Symbol.for("react.block"):60121,d=t?Symbol.for("react.fundamental"):60117,D=t?Symbol.for("react.responder"):60118,x=t?Symbol.for("react.scope"):60119;function E(b){if(typeof b=="object"&&b!==null){var w=b.$$typeof;switch(w){case e:switch(b=b.type,b){case u:case l:case r:case a:case i:case h:return b;default:switch(b=b&&b.$$typeof,b){case s:case f:case y:case g:case o:return b;default:return w}}case n:return w}}}function O(b){return E(b)===l}return Ue.AsyncMode=u,Ue.ConcurrentMode=l,Ue.ContextConsumer=s,Ue.ContextProvider=o,Ue.Element=e,Ue.ForwardRef=f,Ue.Fragment=r,Ue.Lazy=y,Ue.Memo=g,Ue.Portal=n,Ue.Profiler=a,Ue.StrictMode=i,Ue.Suspense=h,Ue.isAsyncMode=function(b){return O(b)||E(b)===u},Ue.isConcurrentMode=O,Ue.isContextConsumer=function(b){return E(b)===s},Ue.isContextProvider=function(b){return E(b)===o},Ue.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},Ue.isForwardRef=function(b){return E(b)===f},Ue.isFragment=function(b){return E(b)===r},Ue.isLazy=function(b){return E(b)===y},Ue.isMemo=function(b){return E(b)===g},Ue.isPortal=function(b){return E(b)===n},Ue.isProfiler=function(b){return E(b)===a},Ue.isStrictMode=function(b){return E(b)===i},Ue.isSuspense=function(b){return E(b)===h},Ue.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===r||b===l||b===a||b===i||b===h||b===p||typeof b=="object"&&b!==null&&(b.$$typeof===y||b.$$typeof===g||b.$$typeof===o||b.$$typeof===s||b.$$typeof===f||b.$$typeof===d||b.$$typeof===D||b.$$typeof===x||b.$$typeof===v)},Ue.typeOf=E,Ue}var He={};/** @license React v16.13.1
100
100
  * react-is.development.js
101
101
  *
102
102
  * Copyright (c) Facebook, Inc. and its affiliates.
103
103
  *
104
104
  * This source code is licensed under the MIT license found in the
105
105
  * LICENSE file in the root directory of this source tree.
106
- */var uf;function Sb(){return uf||(uf=1,process.env.NODE_ENV!=="production"&&function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,a=t?Symbol.for("react.profiler"):60114,o=t?Symbol.for("react.provider"):60109,s=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,l=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,g=t?Symbol.for("react.memo"):60115,y=t?Symbol.for("react.lazy"):60116,v=t?Symbol.for("react.block"):60121,d=t?Symbol.for("react.fundamental"):60117,D=t?Symbol.for("react.responder"):60118,x=t?Symbol.for("react.scope"):60119;function E(Y){return typeof Y=="string"||typeof Y=="function"||Y===r||Y===l||Y===a||Y===i||Y===h||Y===p||typeof Y=="object"&&Y!==null&&(Y.$$typeof===y||Y.$$typeof===g||Y.$$typeof===o||Y.$$typeof===s||Y.$$typeof===f||Y.$$typeof===d||Y.$$typeof===D||Y.$$typeof===x||Y.$$typeof===v)}function O(Y){if(typeof Y=="object"&&Y!==null){var ue=Y.$$typeof;switch(ue){case e:var ae=Y.type;switch(ae){case u:case l:case r:case a:case i:case h:return ae;default:var de=ae&&ae.$$typeof;switch(de){case s:case f:case y:case g:case o:return de;default:return ue}}case n:return ue}}}var b=u,w=l,A=s,M=o,V=e,P=f,_=r,R=y,N=g,T=n,j=a,X=i,z=h,$=!1;function re(Y){return $||($=!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.")),k(Y)||O(Y)===u}function k(Y){return O(Y)===l}function I(Y){return O(Y)===s}function G(Y){return O(Y)===o}function H(Y){return typeof Y=="object"&&Y!==null&&Y.$$typeof===e}function Q(Y){return O(Y)===f}function K(Y){return O(Y)===r}function C(Y){return O(Y)===y}function U(Y){return O(Y)===g}function W(Y){return O(Y)===n}function F(Y){return O(Y)===a}function J(Y){return O(Y)===i}function ne(Y){return O(Y)===h}He.AsyncMode=b,He.ConcurrentMode=w,He.ContextConsumer=A,He.ContextProvider=M,He.Element=V,He.ForwardRef=P,He.Fragment=_,He.Lazy=R,He.Memo=N,He.Portal=T,He.Profiler=j,He.StrictMode=X,He.Suspense=z,He.isAsyncMode=re,He.isConcurrentMode=k,He.isContextConsumer=I,He.isContextProvider=G,He.isElement=H,He.isForwardRef=Q,He.isFragment=K,He.isLazy=C,He.isMemo=U,He.isPortal=W,He.isProfiler=F,He.isStrictMode=J,He.isSuspense=ne,He.isValidElementType=E,He.typeOf=O}()),He}var lf;function cf(){return lf||(lf=1,process.env.NODE_ENV==="production"?Ci.exports=Bb():Ci.exports=Sb()),Ci.exports}/*
106
+ */var lf;function Ab(){return lf||(lf=1,process.env.NODE_ENV!=="production"&&function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,a=t?Symbol.for("react.profiler"):60114,o=t?Symbol.for("react.provider"):60109,s=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,l=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,g=t?Symbol.for("react.memo"):60115,y=t?Symbol.for("react.lazy"):60116,v=t?Symbol.for("react.block"):60121,d=t?Symbol.for("react.fundamental"):60117,D=t?Symbol.for("react.responder"):60118,x=t?Symbol.for("react.scope"):60119;function E(Y){return typeof Y=="string"||typeof Y=="function"||Y===r||Y===l||Y===a||Y===i||Y===h||Y===p||typeof Y=="object"&&Y!==null&&(Y.$$typeof===y||Y.$$typeof===g||Y.$$typeof===o||Y.$$typeof===s||Y.$$typeof===f||Y.$$typeof===d||Y.$$typeof===D||Y.$$typeof===x||Y.$$typeof===v)}function O(Y){if(typeof Y=="object"&&Y!==null){var ue=Y.$$typeof;switch(ue){case e:var ae=Y.type;switch(ae){case u:case l:case r:case a:case i:case h:return ae;default:var de=ae&&ae.$$typeof;switch(de){case s:case f:case y:case g:case o:return de;default:return ue}}case n:return ue}}}var b=u,w=l,A=s,M=o,V=e,P=f,_=r,R=y,N=g,T=n,j=a,X=i,z=h,$=!1;function re(Y){return $||($=!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.")),k(Y)||O(Y)===u}function k(Y){return O(Y)===l}function I(Y){return O(Y)===s}function G(Y){return O(Y)===o}function H(Y){return typeof Y=="object"&&Y!==null&&Y.$$typeof===e}function Q(Y){return O(Y)===f}function K(Y){return O(Y)===r}function C(Y){return O(Y)===y}function U(Y){return O(Y)===g}function W(Y){return O(Y)===n}function F(Y){return O(Y)===a}function J(Y){return O(Y)===i}function ne(Y){return O(Y)===h}He.AsyncMode=b,He.ConcurrentMode=w,He.ContextConsumer=A,He.ContextProvider=M,He.Element=V,He.ForwardRef=P,He.Fragment=_,He.Lazy=R,He.Memo=N,He.Portal=T,He.Profiler=j,He.StrictMode=X,He.Suspense=z,He.isAsyncMode=re,He.isConcurrentMode=k,He.isContextConsumer=I,He.isContextProvider=G,He.isElement=H,He.isForwardRef=Q,He.isFragment=K,He.isLazy=C,He.isMemo=U,He.isPortal=W,He.isProfiler=F,He.isStrictMode=J,He.isSuspense=ne,He.isValidElementType=E,He.typeOf=O}()),He}var cf;function ff(){return cf||(cf=1,process.env.NODE_ENV==="production"?Ci.exports=Sb():Ci.exports=Ab()),Ci.exports}/*
107
107
  object-assign
108
108
  (c) Sindre Sorhus
109
109
  @license MIT
110
- */var co,ff;function Ab(){if(ff)return co;ff=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var u=Object.getOwnPropertyNames(o).map(function(f){return o[f]});if(u.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(f){l[f]=f}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return co=i()?Object.assign:function(a,o){for(var s,u=r(a),l,f=1;f<arguments.length;f++){s=Object(arguments[f]);for(var h in s)e.call(s,h)&&(u[h]=s[h]);if(t){l=t(s);for(var p=0;p<l.length;p++)n.call(s,l[p])&&(u[l[p]]=s[l[p]])}}return u},co}var fo,df;function po(){if(df)return fo;df=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return fo=t,fo}var ho,pf;function hf(){return pf||(pf=1,ho=Function.call.bind(Object.prototype.hasOwnProperty)),ho}var vo,vf;function Lb(){if(vf)return vo;vf=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=po(),n={},r=hf();t=function(a){var o="Warning: "+a;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function i(a,o,s,u,l){if(process.env.NODE_ENV!=="production"){for(var f in a)if(r(a,f)){var h;try{if(typeof a[f]!="function"){var p=Error((u||"React class")+": "+s+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}h=a[f](o,f,u,s,null,e)}catch(y){h=y}if(h&&!(h instanceof Error)&&t((u||"React class")+": type specification of "+s+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof h+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),h instanceof Error&&!(h.message in n)){n[h.message]=!0;var g=l?l():"";t("Failed "+s+" type: "+h.message+(g??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},vo=i,vo}var go,gf;function Ob(){if(gf)return go;gf=1;var t=cf(),e=Ab(),n=po(),r=hf(),i=Lb(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var u="Warning: "+s;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function o(){return null}return go=function(s,u){var l=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function h(k){var I=k&&(l&&k[l]||k[f]);if(typeof I=="function")return I}var p="<<anonymous>>",g={array:D("array"),bigint:D("bigint"),bool:D("boolean"),func:D("function"),number:D("number"),object:D("object"),string:D("string"),symbol:D("symbol"),any:x(),arrayOf:E,element:O(),elementType:b(),instanceOf:w,node:P(),objectOf:M,oneOf:A,oneOfType:V,shape:R,exact:N};function y(k,I){return k===I?k!==0||1/k===1/I:k!==k&&I!==I}function v(k,I){this.message=k,this.data=I&&typeof I=="object"?I:{},this.stack=""}v.prototype=Error.prototype;function d(k){if(process.env.NODE_ENV!=="production")var I={},G=0;function H(K,C,U,W,F,J,ne){if(W=W||p,J=J||U,ne!==n){if(u){var Y=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw Y.name="Invariant Violation",Y}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ue=W+":"+U;!I[ue]&&G<3&&(a("You are manually calling a React.PropTypes validation function for the `"+J+"` prop on `"+W+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),I[ue]=!0,G++)}}return C[U]==null?K?C[U]===null?new v("The "+F+" `"+J+"` is marked as required "+("in `"+W+"`, but its value is `null`.")):new v("The "+F+" `"+J+"` is marked as required in "+("`"+W+"`, but its value is `undefined`.")):null:k(C,U,W,F,J)}var Q=H.bind(null,!1);return Q.isRequired=H.bind(null,!0),Q}function D(k){function I(G,H,Q,K,C,U){var W=G[H],F=X(W);if(F!==k){var J=z(W);return new v("Invalid "+K+" `"+C+"` of type "+("`"+J+"` supplied to `"+Q+"`, expected ")+("`"+k+"`."),{expectedType:k})}return null}return d(I)}function x(){return d(o)}function E(k){function I(G,H,Q,K,C){if(typeof k!="function")return new v("Property `"+C+"` of component `"+Q+"` has invalid PropType notation inside arrayOf.");var U=G[H];if(!Array.isArray(U)){var W=X(U);return new v("Invalid "+K+" `"+C+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected an array."))}for(var F=0;F<U.length;F++){var J=k(U,F,Q,K,C+"["+F+"]",n);if(J instanceof Error)return J}return null}return d(I)}function O(){function k(I,G,H,Q,K){var C=I[G];if(!s(C)){var U=X(C);return new v("Invalid "+Q+" `"+K+"` of type "+("`"+U+"` supplied to `"+H+"`, expected a single ReactElement."))}return null}return d(k)}function b(){function k(I,G,H,Q,K){var C=I[G];if(!t.isValidElementType(C)){var U=X(C);return new v("Invalid "+Q+" `"+K+"` of type "+("`"+U+"` supplied to `"+H+"`, expected a single ReactElement type."))}return null}return d(k)}function w(k){function I(G,H,Q,K,C){if(!(G[H]instanceof k)){var U=k.name||p,W=re(G[H]);return new v("Invalid "+K+" `"+C+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected ")+("instance of `"+U+"`."))}return null}return d(I)}function A(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),o;function I(G,H,Q,K,C){for(var U=G[H],W=0;W<k.length;W++)if(y(U,k[W]))return null;var F=JSON.stringify(k,function(ne,Y){var ue=z(Y);return ue==="symbol"?String(Y):Y});return new v("Invalid "+K+" `"+C+"` of value `"+String(U)+"` "+("supplied to `"+Q+"`, expected one of "+F+"."))}return d(I)}function M(k){function I(G,H,Q,K,C){if(typeof k!="function")return new v("Property `"+C+"` of component `"+Q+"` has invalid PropType notation inside objectOf.");var U=G[H],W=X(U);if(W!=="object")return new v("Invalid "+K+" `"+C+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected an object."));for(var F in U)if(r(U,F)){var J=k(U,F,Q,K,C+"."+F,n);if(J instanceof Error)return J}return null}return d(I)}function V(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var I=0;I<k.length;I++){var G=k[I];if(typeof G!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+$(G)+" at index "+I+"."),o}function H(Q,K,C,U,W){for(var F=[],J=0;J<k.length;J++){var ne=k[J],Y=ne(Q,K,C,U,W,n);if(Y==null)return null;Y.data&&r(Y.data,"expectedType")&&F.push(Y.data.expectedType)}var ue=F.length>0?", expected one of type ["+F.join(", ")+"]":"";return new v("Invalid "+U+" `"+W+"` supplied to "+("`"+C+"`"+ue+"."))}return d(H)}function P(){function k(I,G,H,Q,K){return T(I[G])?null:new v("Invalid "+Q+" `"+K+"` supplied to "+("`"+H+"`, expected a ReactNode."))}return d(k)}function _(k,I,G,H,Q){return new v((k||"React class")+": "+I+" type `"+G+"."+H+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Q+"`.")}function R(k){function I(G,H,Q,K,C){var U=G[H],W=X(U);if(W!=="object")return new v("Invalid "+K+" `"+C+"` of type `"+W+"` "+("supplied to `"+Q+"`, expected `object`."));for(var F in k){var J=k[F];if(typeof J!="function")return _(Q,K,C,F,z(J));var ne=J(U,F,Q,K,C+"."+F,n);if(ne)return ne}return null}return d(I)}function N(k){function I(G,H,Q,K,C){var U=G[H],W=X(U);if(W!=="object")return new v("Invalid "+K+" `"+C+"` of type `"+W+"` "+("supplied to `"+Q+"`, expected `object`."));var F=e({},G[H],k);for(var J in F){var ne=k[J];if(r(k,J)&&typeof ne!="function")return _(Q,K,C,J,z(ne));if(!ne)return new v("Invalid "+K+" `"+C+"` key `"+J+"` supplied to `"+Q+"`.\nBad object: "+JSON.stringify(G[H],null," ")+`
111
- Valid keys: `+JSON.stringify(Object.keys(k),null," "));var Y=ne(U,J,Q,K,C+"."+J,n);if(Y)return Y}return null}return d(I)}function T(k){switch(typeof k){case"number":case"string":case"undefined":return!0;case"boolean":return!k;case"object":if(Array.isArray(k))return k.every(T);if(k===null||s(k))return!0;var I=h(k);if(I){var G=I.call(k),H;if(I!==k.entries){for(;!(H=G.next()).done;)if(!T(H.value))return!1}else for(;!(H=G.next()).done;){var Q=H.value;if(Q&&!T(Q[1]))return!1}}else return!1;return!0;default:return!1}}function j(k,I){return k==="symbol"?!0:I?I["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&I instanceof Symbol:!1}function X(k){var I=typeof k;return Array.isArray(k)?"array":k instanceof RegExp?"object":j(I,k)?"symbol":I}function z(k){if(typeof k>"u"||k===null)return""+k;var I=X(k);if(I==="object"){if(k instanceof Date)return"date";if(k instanceof RegExp)return"regexp"}return I}function $(k){var I=z(k);switch(I){case"array":case"object":return"an "+I;case"boolean":case"date":case"regexp":return"a "+I;default:return I}}function re(k){return!k.constructor||!k.constructor.name?p:k.constructor.name}return g.checkPropTypes=i,g.resetWarningCache=i.resetWarningCache,g.PropTypes=g,g},go}var mo,mf;function Pb(){if(mf)return mo;mf=1;var t=po();function e(){}function n(){}return n.resetWarningCache=e,mo=function(){function r(o,s,u,l,f,h){if(h!==t){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:e};return a.PropTypes=a,a},mo}if(process.env.NODE_ENV!=="production"){var Mb=cf(),Fb=!0;lo.exports=Ob()(Mb.isElement,Fb)}else lo.exports=Pb()();var Di=lo.exports,bi={};Object.defineProperty(bi,"__esModule",{value:!0});var kb=hr,yo=Tb(kb);function Tb(t){return t&&t.__esModule?t:{default:t}}var Rb={mountFlag:!1,initialized:!1,scroller:null,containers:{},mount:function(e){this.scroller=e,this.handleHashChange=this.handleHashChange.bind(this),window.addEventListener("hashchange",this.handleHashChange),this.initStateFromHash(),this.mountFlag=!0},mapContainer:function(e,n){this.containers[e]=n},isMounted:function(){return this.mountFlag},isInitialized:function(){return this.initialized},initStateFromHash:function(){var e=this,n=this.getHash();n?window.setTimeout(function(){e.scrollTo(n,!0),e.initialized=!0},10):this.initialized=!0},scrollTo:function(e,n){var r=this.scroller,i=r.get(e);if(i&&(n||e!==r.getActiveLink())){var a=this.containers[e]||document;r.scrollTo(e,{container:a})}},getHash:function(){return yo.default.getHash()},changeHash:function(e,n){this.isInitialized()&&yo.default.getHash()!==e&&yo.default.updateHash(e,n)},handleHashChange:function(){this.scrollTo(this.getHash())},unmount:function(){this.scroller=null,this.containers=null,window.removeEventListener("hashchange",this.handleHashChange)}};bi.default=Rb,Object.defineProperty(fr,"__esModule",{value:!0});var Ei=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ib=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),jb=c,yf=mr(jb),Nb=dr,wi=mr(Nb),_b=jn,zb=mr(_b),Wb=Di,Xe=mr(Wb),Ub=bi,sn=mr(Ub);function mr(t){return t&&t.__esModule?t:{default:t}}function Hb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vb(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function qb(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Cf={to:Xe.default.string.isRequired,containerId:Xe.default.string,container:Xe.default.object,activeClass:Xe.default.string,activeStyle:Xe.default.object,spy:Xe.default.bool,horizontal:Xe.default.bool,smooth:Xe.default.oneOfType([Xe.default.bool,Xe.default.string]),offset:Xe.default.number,delay:Xe.default.number,isDynamic:Xe.default.bool,onClick:Xe.default.func,duration:Xe.default.oneOfType([Xe.default.number,Xe.default.func]),absolute:Xe.default.bool,onSetActive:Xe.default.func,onSetInactive:Xe.default.func,ignoreCancelEvents:Xe.default.bool,hashSpy:Xe.default.bool,saveHashHistory:Xe.default.bool,spyThrottle:Xe.default.number};fr.default=function(t,e){var n=e||zb.default,r=function(a){qb(o,a);function o(s){Hb(this,o);var u=Vb(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,s));return i.call(u),u.state={active:!1},u}return Ib(o,[{key:"getScrollSpyContainer",value:function(){var u=this.props.containerId,l=this.props.container;return u&&!l?document.getElementById(u):l&&l.nodeType?l:document}},{key:"componentDidMount",value:function(){if(this.props.spy||this.props.hashSpy){var u=this.getScrollSpyContainer();wi.default.isMounted(u)||wi.default.mount(u,this.props.spyThrottle),this.props.hashSpy&&(sn.default.isMounted()||sn.default.mount(n),sn.default.mapContainer(this.props.to,u)),wi.default.addSpyHandler(this.spyHandler,u),this.setState({container:u})}}},{key:"componentWillUnmount",value:function(){wi.default.unmount(this.stateHandler,this.spyHandler)}},{key:"render",value:function(){var u="";this.state&&this.state.active?u=((this.props.className||"")+" "+(this.props.activeClass||"active")).trim():u=this.props.className;var l={};this.state&&this.state.active?l=Ei({},this.props.style,this.props.activeStyle):l=Ei({},this.props.style);var f=Ei({},this.props);for(var h in Cf)f.hasOwnProperty(h)&&delete f[h];return f.className=u,f.style=l,f.onClick=this.handleClick,yf.default.createElement(t,f)}}]),o}(yf.default.PureComponent),i=function(){var o=this;this.scrollTo=function(s,u){n.scrollTo(s,Ei({},o.state,u))},this.handleClick=function(s){o.props.onClick&&o.props.onClick(s),s.stopPropagation&&s.stopPropagation(),s.preventDefault&&s.preventDefault(),o.scrollTo(o.props.to,o.props)},this.spyHandler=function(s,u){var l=o.getScrollSpyContainer();if(!(sn.default.isMounted()&&!sn.default.isInitialized())){var f=o.props.horizontal,h=o.props.to,p=null,g=void 0,y=void 0;if(f){var v=0,d=0,D=0;if(l.getBoundingClientRect){var x=l.getBoundingClientRect();D=x.left}if(!p||o.props.isDynamic){if(p=n.get(h),!p)return;var E=p.getBoundingClientRect();v=E.left-D+s,d=v+E.width}var O=s-o.props.offset;g=O>=Math.floor(v)&&O<Math.floor(d),y=O<Math.floor(v)||O>=Math.floor(d)}else{var b=0,w=0,A=0;if(l.getBoundingClientRect){var M=l.getBoundingClientRect();A=M.top}if(!p||o.props.isDynamic){if(p=n.get(h),!p)return;var V=p.getBoundingClientRect();b=V.top-A+u,w=b+V.height}var P=u-o.props.offset;g=P>=Math.floor(b)&&P<Math.floor(w),y=P<Math.floor(b)||P>=Math.floor(w)}var _=n.getActiveLink();if(y){if(h===_&&n.setActiveLink(void 0),o.props.hashSpy&&sn.default.getHash()===h){var R=o.props.saveHashHistory,N=R===void 0?!1:R;sn.default.changeHash("",N)}o.props.spy&&o.state.active&&(o.setState({active:!1}),o.props.onSetInactive&&o.props.onSetInactive(h,p))}if(g&&(_!==h||o.state.active===!1)){n.setActiveLink(h);var T=o.props.saveHashHistory,j=T===void 0?!1:T;o.props.hashSpy&&sn.default.changeHash(h,j),o.props.spy&&(o.setState({active:!0}),o.props.onSetActive&&o.props.onSetActive(h,p))}}}};return r.propTypes=Cf,r.defaultProps={offset:0},r},Object.defineProperty(eo,"__esModule",{value:!0});var Gb=c,Df=bf(Gb),Yb=fr,Zb=bf(Yb);function bf(t){return t&&t.__esModule?t:{default:t}}function Kb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ef(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Xb(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Jb=function(t){Xb(e,t);function e(){var n,r,i,a;Kb(this,e);for(var o=arguments.length,s=Array(o),u=0;u<o;u++)s[u]=arguments[u];return a=(r=(i=Ef(this,(n=e.__proto__||Object.getPrototypeOf(e)).call.apply(n,[this].concat(s))),i),i.render=function(){return Df.default.createElement("a",i.props,i.props.children)},r),Ef(i,a)}return e}(Df.default.Component);eo.default=(0,Zb.default)(Jb);var Co={};Object.defineProperty(Co,"__esModule",{value:!0});var Qb=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),$b=c,wf=xf($b),eE=fr,tE=xf(eE);function xf(t){return t&&t.__esModule?t:{default:t}}function nE(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rE(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function iE(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var aE=function(t){iE(e,t);function e(){return nE(this,e),rE(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return Qb(e,[{key:"render",value:function(){return wf.default.createElement("button",this.props,this.props.children)}}]),e}(wf.default.Component);Co.default=(0,tE.default)(aE);var Do={},xi={};Object.defineProperty(xi,"__esModule",{value:!0});var oE=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},sE=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),uE=c,Bf=Bi(uE),lE=Yt;Bi(lE);var cE=jn,Sf=Bi(cE),fE=Di,Af=Bi(fE);function Bi(t){return t&&t.__esModule?t:{default:t}}function dE(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pE(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function hE(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}xi.default=function(t){var e=function(n){hE(r,n);function r(i){dE(this,r);var a=pE(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,i));return a.childBindings={domNode:null},a}return sE(r,[{key:"componentDidMount",value:function(){if(typeof window>"u")return!1;this.registerElems(this.props.name)}},{key:"componentDidUpdate",value:function(a){this.props.name!==a.name&&this.registerElems(this.props.name)}},{key:"componentWillUnmount",value:function(){if(typeof window>"u")return!1;Sf.default.unregister(this.props.name)}},{key:"registerElems",value:function(a){Sf.default.register(a,this.childBindings.domNode)}},{key:"render",value:function(){return Bf.default.createElement(t,oE({},this.props,{parentBindings:this.childBindings}))}}]),r}(Bf.default.Component);return e.propTypes={name:Af.default.string,id:Af.default.string},e},Object.defineProperty(Do,"__esModule",{value:!0});var Lf=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},vE=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),gE=c,Of=bo(gE),mE=xi,yE=bo(mE),CE=Di,Pf=bo(CE);function bo(t){return t&&t.__esModule?t:{default:t}}function DE(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function bE(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function EE(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Mf=function(t){EE(e,t);function e(){return DE(this,e),bE(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return vE(e,[{key:"render",value:function(){var r=this,i=Lf({},this.props);return delete i.name,i.parentBindings&&delete i.parentBindings,Of.default.createElement("div",Lf({},i,{ref:function(o){r.props.parentBindings.domNode=o}}),this.props.children)}}]),e}(Of.default.Component);Mf.propTypes={name:Pf.default.string,id:Pf.default.string},Do.default=(0,yE.default)(Mf);var Eo=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ff=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function kf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Tf(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Rf(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Si=c,Bn=dr,wo=jn,et=Di,un=bi,If={to:et.string.isRequired,containerId:et.string,container:et.object,activeClass:et.string,spy:et.bool,smooth:et.oneOfType([et.bool,et.string]),offset:et.number,delay:et.number,isDynamic:et.bool,onClick:et.func,duration:et.oneOfType([et.number,et.func]),absolute:et.bool,onSetActive:et.func,onSetInactive:et.func,ignoreCancelEvents:et.bool,hashSpy:et.bool,spyThrottle:et.number},wE={Scroll:function(e,n){console.warn("Helpers.Scroll is deprecated since v1.7.0");var r=n||wo,i=function(o){Rf(s,o);function s(u){kf(this,s);var l=Tf(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,u));return a.call(l),l.state={active:!1},l}return Ff(s,[{key:"getScrollSpyContainer",value:function(){var l=this.props.containerId,f=this.props.container;return l?document.getElementById(l):f&&f.nodeType?f:document}},{key:"componentDidMount",value:function(){if(this.props.spy||this.props.hashSpy){var l=this.getScrollSpyContainer();Bn.isMounted(l)||Bn.mount(l,this.props.spyThrottle),this.props.hashSpy&&(un.isMounted()||un.mount(r),un.mapContainer(this.props.to,l)),this.props.spy&&Bn.addStateHandler(this.stateHandler),Bn.addSpyHandler(this.spyHandler,l),this.setState({container:l})}}},{key:"componentWillUnmount",value:function(){Bn.unmount(this.stateHandler,this.spyHandler)}},{key:"render",value:function(){var l="";this.state&&this.state.active?l=((this.props.className||"")+" "+(this.props.activeClass||"active")).trim():l=this.props.className;var f=Eo({},this.props);for(var h in If)f.hasOwnProperty(h)&&delete f[h];return f.className=l,f.onClick=this.handleClick,Si.createElement(e,f)}}]),s}(Si.Component),a=function(){var s=this;this.scrollTo=function(u,l){r.scrollTo(u,Eo({},s.state,l))},this.handleClick=function(u){s.props.onClick&&s.props.onClick(u),u.stopPropagation&&u.stopPropagation(),u.preventDefault&&u.preventDefault(),s.scrollTo(s.props.to,s.props)},this.stateHandler=function(){r.getActiveLink()!==s.props.to&&(s.state!==null&&s.state.active&&s.props.onSetInactive&&s.props.onSetInactive(),s.setState({active:!1}))},this.spyHandler=function(u){var l=s.getScrollSpyContainer();if(!(un.isMounted()&&!un.isInitialized())){var f=s.props.to,h=null,p=0,g=0,y=0;if(l.getBoundingClientRect){var v=l.getBoundingClientRect();y=v.top}if(!h||s.props.isDynamic){if(h=r.get(f),!h)return;var d=h.getBoundingClientRect();p=d.top-y+u,g=p+d.height}var D=u-s.props.offset,x=D>=Math.floor(p)&&D<Math.floor(g),E=D<Math.floor(p)||D>=Math.floor(g),O=r.getActiveLink();if(E)return f===O&&r.setActiveLink(void 0),s.props.hashSpy&&un.getHash()===f&&un.changeHash(),s.props.spy&&s.state.active&&(s.setState({active:!1}),s.props.onSetInactive&&s.props.onSetInactive()),Bn.updateStates();if(x&&O!==f)return r.setActiveLink(f),s.props.hashSpy&&un.changeHash(f),s.props.spy&&(s.setState({active:!0}),s.props.onSetActive&&s.props.onSetActive(f)),Bn.updateStates()}}};return i.propTypes=If,i.defaultProps={offset:0},i},Element:function(e){console.warn("Helpers.Element is deprecated since v1.7.0");var n=function(r){Rf(i,r);function i(a){kf(this,i);var o=Tf(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,a));return o.childBindings={domNode:null},o}return Ff(i,[{key:"componentDidMount",value:function(){if(typeof window>"u")return!1;this.registerElems(this.props.name)}},{key:"componentDidUpdate",value:function(o){this.props.name!==o.name&&this.registerElems(this.props.name)}},{key:"componentWillUnmount",value:function(){if(typeof window>"u")return!1;wo.unregister(this.props.name)}},{key:"registerElems",value:function(o){wo.register(o,this.childBindings.domNode)}},{key:"render",value:function(){return Si.createElement(e,Eo({},this.props,{parentBindings:this.childBindings}))}}]),i}(Si.Component);return n.propTypes={name:et.string,id:et.string},n}},xE=wE;Object.defineProperty(nt,"__esModule",{value:!0}),nt.Helpers=nt.ScrollElement=nt.ScrollLink=Yf=nt.animateScroll=nt.scrollSpy=nt.Events=nt.scroller=nt.Element=nt.Button=nt.Link=void 0;var BE=eo,jf=_t(BE),SE=Co,Nf=_t(SE),AE=Do,_f=_t(AE),LE=jn,zf=_t(LE),OE=vr,Wf=_t(OE),PE=dr,Uf=_t(PE),ME=hi,Hf=_t(ME),FE=fr,Vf=_t(FE),kE=xi,qf=_t(kE),TE=xE,Gf=_t(TE);function _t(t){return t&&t.__esModule?t:{default:t}}nt.Link=jf.default,nt.Button=Nf.default,nt.Element=_f.default,nt.scroller=zf.default,nt.Events=Wf.default,nt.scrollSpy=Uf.default;var Yf=nt.animateScroll=Hf.default;nt.ScrollLink=Vf.default,nt.ScrollElement=qf.default,nt.Helpers=Gf.default,nt.default={Link:jf.default,Button:Nf.default,Element:_f.default,scroller:zf.default,Events:Wf.default,scrollSpy:Uf.default,animateScroll:Hf.default,ScrollLink:Vf.default,ScrollElement:qf.default,Helpers:Gf.default};const xo=c.createContext({}),Zf=c.createContext({});function Kf(){const t=c.useContext(Zf);if(Object.entries(t).length===0)throw new Error("useToast must be used within a Provider");return t}function Xf(t){return t&&typeof t.title=="string"&&typeof t.message=="string"&&(t.size===void 0||t.size==="md"||t.size==="lg")&&(t.type==="info"||t.type==="success"||t.type==="danger"||t.type==="warning")}function RE(){const t=Ln.useActionData(),{closeModal:e}=c.useContext(xo),{showToast:n}=Kf();c.useEffect(()=>{const r=t==null?void 0:t.closeModalKey;r&&e(r)},[t]),c.useEffect(()=>{const r=t==null?void 0:t.toast,i=t==null?void 0:t.message;Xf(r)&&n(r),!Xf(r)&&i&&n({message:i,title:"Atenção!",type:"warning"})},[t]),c.useEffect(()=>{var r,i;if(typeof((r=t==null?void 0:t.data)==null?void 0:r.scrollTo)=="string"){const a=document.getElementById((i=t==null?void 0:t.data)==null?void 0:i.scrollTo);a&&Yf.scrollTo(a.offsetTop-200)}},[t])}const Jf=c.createContext({});function IE(t){const e=c.useContext(Jf);if(Object.entries(e).length===0)throw new Error("useDrawer must be used within a Provider");if(t){const{drawerData:n,drawerIsOpen:r,openDrawer:i,closeDrawer:a}=e,o=r(t),s=n(t);return{drawerIsOpen:o,drawerData:s,openDrawer:f=>i(t,f),closeDrawer:()=>a(t)}}else return e}function jE(t){const e=c.useContext(xo);if(Object.entries(e).length===0)throw new Error("useModal must be used within a Provider");if(t){const{modalData:n,modalIsOpen:r,openModal:i,closeModal:a}=e,o=r(t),s=n(t);return{modalIsOpen:o,modalData:s,openModal:f=>i(t,f),closeModal:()=>a(t)}}else return e}function NE(t){const{children:e=!1}=t,[n,r]=c.useState([]);function i(u){return!!n.some(l=>l.key===u)}function a(u){var l;return(l=n.find(f=>f.key===u))==null?void 0:l.data}function o(u,l){const f=i(u);r(f?h=>[...h.filter(g=>g.key!==u),{key:u,data:l}]:[...n,{key:u,data:l}])}function s(u){r(n.filter(l=>l.key!==u))}return B.jsx(Jf.Provider,{value:{drawerIsOpen:i,drawerData:a,openDrawer:o,closeDrawer:s},children:e})}function _E({googleMapsApiKey:t,children:e,...n}){return B.jsx(Ad,{libraries:["places","marker","maps"],googleMapsApiKey:t,...n,children:e})}function zE(t){const{children:e=!1}=t,[n,r]=c.useState([]);function i(u){return!!n.some(l=>l.key===u)}function a(u){var l;return(l=n.find(f=>f.key===u))==null?void 0:l.data}function o(u,l){const f=i(u);r(f?h=>[...h.filter(g=>g.key!==u),{key:u,data:l}]:[...n,{key:u,data:l}])}function s(u){r(n.filter(l=>l.key!==u))}return B.jsx(xo.Provider,{value:{modalIsOpen:i,modalData:a,openModal:o,closeModal:s},children:e})}var WE=t=>{switch(t){case"success":return VE;case"info":return GE;case"warning":return qE;case"error":return YE;default:return null}},UE=Array(12).fill(0),HE=({visible:t})=>c.createElement("div",{className:"sonner-loading-wrapper","data-visible":t},c.createElement("div",{className:"sonner-spinner"},UE.map((e,n)=>c.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),VE=c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},c.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),qE=c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},c.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),GE=c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},c.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),YE=c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},c.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),ZE=()=>{let[t,e]=c.useState(document.hidden);return c.useEffect(()=>{let n=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t},Bo=1,KE=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:n,...r}=t,i=typeof(t==null?void 0:t.id)=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:Bo++,a=this.toasts.find(s=>s.id===i),o=t.dismissible===void 0?!0:t.dismissible;return a?this.toasts=this.toasts.map(s=>s.id===i?(this.publish({...s,...t,id:i,title:n}),{...s,...t,id:i,dismissible:o,title:n}):s):this.addToast({title:n,...r,dismissible:o,id:i}),i},this.dismiss=t=>(t||this.toasts.forEach(e=>{this.subscribers.forEach(n=>n({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let n;e.loading!==void 0&&(n=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let r=t instanceof Promise?t:t(),i=n!==void 0;return r.then(async a=>{if(JE(a)&&!a.ok){i=!1;let o=typeof e.error=="function"?await e.error(`HTTP error! status: ${a.status}`):e.error,s=typeof e.description=="function"?await e.description(`HTTP error! status: ${a.status}`):e.description;this.create({id:n,type:"error",message:o,description:s})}else if(e.success!==void 0){i=!1;let o=typeof e.success=="function"?await e.success(a):e.success,s=typeof e.description=="function"?await e.description(a):e.description;this.create({id:n,type:"success",message:o,description:s})}}).catch(async a=>{if(e.error!==void 0){i=!1;let o=typeof e.error=="function"?await e.error(a):e.error,s=typeof e.description=="function"?await e.description(a):e.description;this.create({id:n,type:"error",message:o,description:s})}}).finally(()=>{var a;i&&(this.dismiss(n),n=void 0),(a=e.finally)==null||a.call(e)}),n},this.custom=(t,e)=>{let n=(e==null?void 0:e.id)||Bo++;return this.create({jsx:t(n),id:n,...e}),n},this.subscribers=[],this.toasts=[]}},At=new KE,XE=(t,e)=>{let n=(e==null?void 0:e.id)||Bo++;return At.addToast({title:t,...e,id:n}),n},JE=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",QE=XE,$E=()=>At.toasts,e1=Object.assign(QE,{success:At.success,info:At.info,warning:At.warning,error:At.error,custom:At.custom,message:At.message,promise:At.promise,dismiss:At.dismiss,loading:At.loading},{getHistory:$E});function t1(t,{insertAt:e}={}){if(!t||typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}t1(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
112
- `);function Ai(t){return t.label!==void 0}var n1=3,r1="32px",i1=4e3,a1=356,o1=14,s1=20,u1=200;function l1(...t){return t.filter(Boolean).join(" ")}var c1=t=>{var e,n,r,i,a,o,s,u,l,f;let{invert:h,toast:p,unstyled:g,interacting:y,setHeights:v,visibleToasts:d,heights:D,index:x,toasts:E,expanded:O,removeToast:b,defaultRichColors:w,closeButton:A,style:M,cancelButtonStyle:V,actionButtonStyle:P,className:_="",descriptionClassName:R="",duration:N,position:T,gap:j,loadingIcon:X,expandByDefault:z,classNames:$,icons:re,closeButtonAriaLabel:k="Close toast",pauseWhenPageIsHidden:I,cn:G}=t,[H,Q]=c.useState(!1),[K,C]=c.useState(!1),[U,W]=c.useState(!1),[F,J]=c.useState(!1),[ne,Y]=c.useState(0),[ue,ae]=c.useState(0),de=c.useRef(null),pe=c.useRef(null),Ce=x===0,ye=x+1<=d,ge=p.type,ve=p.dismissible!==!1,Ne=p.className||"",se=p.descriptionClassName||"",_e=c.useMemo(()=>D.findIndex(be=>be.toastId===p.id)||0,[D,p.id]),fe=c.useMemo(()=>{var be;return(be=p.closeButton)!=null?be:A},[p.closeButton,A]),we=c.useMemo(()=>p.duration||N||i1,[p.duration,N]),ke=c.useRef(0),Ve=c.useRef(0),Ye=c.useRef(0),Ee=c.useRef(null),[ct,st]=T.split("-"),Tt=c.useMemo(()=>D.reduce((be,Re,Ie)=>Ie>=_e?be:be+Re.height,0),[D,_e]),yt=ZE(),Lt=p.invert||h,zt=ge==="loading";Ve.current=c.useMemo(()=>_e*j+Tt,[_e,Tt]),c.useEffect(()=>{Q(!0)},[]),c.useLayoutEffect(()=>{if(!H)return;let be=pe.current,Re=be.style.height;be.style.height="auto";let Ie=be.getBoundingClientRect().height;be.style.height=Re,ae(Ie),v(it=>it.find(ut=>ut.toastId===p.id)?it.map(ut=>ut.toastId===p.id?{...ut,height:Ie}:ut):[{toastId:p.id,height:Ie,position:p.position},...it])},[H,p.title,p.description,v,p.id]);let Ct=c.useCallback(()=>{C(!0),Y(Ve.current),v(be=>be.filter(Re=>Re.toastId!==p.id)),setTimeout(()=>{b(p)},u1)},[p,b,v,Ve]);c.useEffect(()=>{if(p.promise&&ge==="loading"||p.duration===1/0||p.type==="loading")return;let be,Re=we;return O||y||I&&yt?(()=>{if(Ye.current<ke.current){let Ie=new Date().getTime()-ke.current;Re=Re-Ie}Ye.current=new Date().getTime()})():Re!==1/0&&(ke.current=new Date().getTime(),be=setTimeout(()=>{var Ie;(Ie=p.onAutoClose)==null||Ie.call(p,p),Ct()},Re)),()=>clearTimeout(be)},[O,y,z,p,we,Ct,p.promise,ge,I,yt]),c.useEffect(()=>{let be=pe.current;if(be){let Re=be.getBoundingClientRect().height;return ae(Re),v(Ie=>[{toastId:p.id,height:Re,position:p.position},...Ie]),()=>v(Ie=>Ie.filter(it=>it.toastId!==p.id))}},[v,p.id]),c.useEffect(()=>{p.delete&&Ct()},[Ct,p.delete]);function ln(){return re!=null&&re.loading?c.createElement("div",{className:"sonner-loader","data-visible":ge==="loading"},re.loading):X?c.createElement("div",{className:"sonner-loader","data-visible":ge==="loading"},X):c.createElement(HE,{visible:ge==="loading"})}return c.createElement("li",{"aria-live":p.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:pe,className:G(_,Ne,$==null?void 0:$.toast,(e=p==null?void 0:p.classNames)==null?void 0:e.toast,$==null?void 0:$.default,$==null?void 0:$[ge],(n=p==null?void 0:p.classNames)==null?void 0:n[ge]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:w,"data-styled":!(p.jsx||p.unstyled||g),"data-mounted":H,"data-promise":!!p.promise,"data-removed":K,"data-visible":ye,"data-y-position":ct,"data-x-position":st,"data-index":x,"data-front":Ce,"data-swiping":U,"data-dismissible":ve,"data-type":ge,"data-invert":Lt,"data-swipe-out":F,"data-expanded":!!(O||z&&H),style:{"--index":x,"--toasts-before":x,"--z-index":E.length-x,"--offset":`${K?ne:Ve.current}px`,"--initial-height":z?"auto":`${ue}px`,...M,...p.style},onPointerDown:be=>{zt||!ve||(de.current=new Date,Y(Ve.current),be.target.setPointerCapture(be.pointerId),be.target.tagName!=="BUTTON"&&(W(!0),Ee.current={x:be.clientX,y:be.clientY}))},onPointerUp:()=>{var be,Re,Ie,it;if(F||!ve)return;Ee.current=null;let ut=Number(((be=pe.current)==null?void 0:be.style.getPropertyValue("--swipe-amount").replace("px",""))||0),Rt=new Date().getTime()-((Re=de.current)==null?void 0:Re.getTime()),Sn=Math.abs(ut)/Rt;if(Math.abs(ut)>=s1||Sn>.11){Y(Ve.current),(Ie=p.onDismiss)==null||Ie.call(p,p),Ct(),J(!0);return}(it=pe.current)==null||it.style.setProperty("--swipe-amount","0px"),W(!1)},onPointerMove:be=>{var Re;if(!Ee.current||!ve)return;let Ie=be.clientY-Ee.current.y,it=be.clientX-Ee.current.x,ut=(ct==="top"?Math.min:Math.max)(0,Ie),Rt=be.pointerType==="touch"?10:2;Math.abs(ut)>Rt?(Re=pe.current)==null||Re.style.setProperty("--swipe-amount",`${Ie}px`):Math.abs(it)>Rt&&(Ee.current=null)}},fe&&!p.jsx?c.createElement("button",{"aria-label":k,"data-disabled":zt,"data-close-button":!0,onClick:zt||!ve?()=>{}:()=>{var be;Ct(),(be=p.onDismiss)==null||be.call(p,p)},className:G($==null?void 0:$.closeButton,(i=p==null?void 0:p.classNames)==null?void 0:i.closeButton)},c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},c.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),c.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,p.jsx||c.isValidElement(p.title)?p.jsx||p.title:c.createElement(c.Fragment,null,ge||p.icon||p.promise?c.createElement("div",{"data-icon":"",className:G($==null?void 0:$.icon,(a=p==null?void 0:p.classNames)==null?void 0:a.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||ln():null,p.type!=="loading"?p.icon||(re==null?void 0:re[ge])||WE(ge):null):null,c.createElement("div",{"data-content":"",className:G($==null?void 0:$.content,(o=p==null?void 0:p.classNames)==null?void 0:o.content)},c.createElement("div",{"data-title":"",className:G($==null?void 0:$.title,(s=p==null?void 0:p.classNames)==null?void 0:s.title)},p.title),p.description?c.createElement("div",{"data-description":"",className:G(R,se,$==null?void 0:$.description,(u=p==null?void 0:p.classNames)==null?void 0:u.description)},p.description):null),c.isValidElement(p.cancel)?p.cancel:p.cancel&&Ai(p.cancel)?c.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||V,onClick:be=>{var Re,Ie;Ai(p.cancel)&&ve&&((Ie=(Re=p.cancel).onClick)==null||Ie.call(Re,be),Ct())},className:G($==null?void 0:$.cancelButton,(l=p==null?void 0:p.classNames)==null?void 0:l.cancelButton)},p.cancel.label):null,c.isValidElement(p.action)?p.action:p.action&&Ai(p.action)?c.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||P,onClick:be=>{var Re,Ie;Ai(p.action)&&(be.defaultPrevented||((Ie=(Re=p.action).onClick)==null||Ie.call(Re,be),Ct()))},className:G($==null?void 0:$.actionButton,(f=p==null?void 0:p.classNames)==null?void 0:f.actionButton)},p.action.label):null))};function Qf(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}var f1=t=>{let{invert:e,position:n="bottom-right",hotkey:r=["altKey","KeyT"],expand:i,closeButton:a,className:o,offset:s,theme:u="light",richColors:l,duration:f,style:h,visibleToasts:p=n1,toastOptions:g,dir:y=Qf(),gap:v=o1,loadingIcon:d,icons:D,containerAriaLabel:x="Notifications",pauseWhenPageIsHidden:E,cn:O=l1}=t,[b,w]=c.useState([]),A=c.useMemo(()=>Array.from(new Set([n].concat(b.filter(I=>I.position).map(I=>I.position)))),[b,n]),[M,V]=c.useState([]),[P,_]=c.useState(!1),[R,N]=c.useState(!1),[T,j]=c.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),X=c.useRef(null),z=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),$=c.useRef(null),re=c.useRef(!1),k=c.useCallback(I=>{var G;(G=b.find(H=>H.id===I.id))!=null&&G.delete||At.dismiss(I.id),w(H=>H.filter(({id:Q})=>Q!==I.id))},[b]);return c.useEffect(()=>At.subscribe(I=>{if(I.dismiss){w(G=>G.map(H=>H.id===I.id?{...H,delete:!0}:H));return}setTimeout(()=>{Yt.flushSync(()=>{w(G=>{let H=G.findIndex(Q=>Q.id===I.id);return H!==-1?[...G.slice(0,H),{...G[H],...I},...G.slice(H+1)]:[I,...G]})})})}),[]),c.useEffect(()=>{if(u!=="system"){j(u);return}u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?j("dark"):j("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:I})=>{j(I?"dark":"light")})},[u]),c.useEffect(()=>{b.length<=1&&_(!1)},[b]),c.useEffect(()=>{let I=G=>{var H,Q;r.every(K=>G[K]||G.code===K)&&(_(!0),(H=X.current)==null||H.focus()),G.code==="Escape"&&(document.activeElement===X.current||(Q=X.current)!=null&&Q.contains(document.activeElement))&&_(!1)};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},[r]),c.useEffect(()=>{if(X.current)return()=>{$.current&&($.current.focus({preventScroll:!0}),$.current=null,re.current=!1)}},[X.current]),b.length?c.createElement("section",{"aria-label":`${x} ${z}`,tabIndex:-1},A.map((I,G)=>{var H;let[Q,K]=I.split("-");return c.createElement("ol",{key:I,dir:y==="auto"?Qf():y,tabIndex:-1,ref:X,className:o,"data-sonner-toaster":!0,"data-theme":T,"data-y-position":Q,"data-x-position":K,style:{"--front-toast-height":`${((H=M[0])==null?void 0:H.height)||0}px`,"--offset":typeof s=="number"?`${s}px`:s||r1,"--width":`${a1}px`,"--gap":`${v}px`,...h},onBlur:C=>{re.current&&!C.currentTarget.contains(C.relatedTarget)&&(re.current=!1,$.current&&($.current.focus({preventScroll:!0}),$.current=null))},onFocus:C=>{C.target instanceof HTMLElement&&C.target.dataset.dismissible==="false"||re.current||(re.current=!0,$.current=C.relatedTarget)},onMouseEnter:()=>_(!0),onMouseMove:()=>_(!0),onMouseLeave:()=>{R||_(!1)},onPointerDown:C=>{C.target instanceof HTMLElement&&C.target.dataset.dismissible==="false"||N(!0)},onPointerUp:()=>N(!1)},b.filter(C=>!C.position&&G===0||C.position===I).map((C,U)=>{var W,F;return c.createElement(c1,{key:C.id,icons:D,index:U,toast:C,defaultRichColors:l,duration:(W=g==null?void 0:g.duration)!=null?W:f,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:e,visibleToasts:p,closeButton:(F=g==null?void 0:g.closeButton)!=null?F:a,interacting:R,position:I,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:k,toasts:b.filter(J=>J.position==C.position),heights:M.filter(J=>J.position==C.position),setHeights:V,expandByDefault:i,gap:v,loadingIcon:d,expanded:P,pauseWhenPageIsHidden:E,cn:O})}))})):null};function d1({children:t}){function e(n){e1.custom(r=>B.jsx(Xc,{...n}))}return B.jsxs(Zf.Provider,{value:{showToast:e},children:[B.jsx(f1,{}),t]})}he.AlertContainer=id,he.AlertContent=ad,he.AlertDescription=od,he.AlertIcon=sd,he.AlertTitle=Oo,he.Badge=fd,he.BreadcrumbContainer=vD,he.BreadcrumbLink=gD,he.Button=zp,he.Card=dd,he.Checkbox=Up,he.Divider=pd,he.DrawerContainer=bD,he.DrawerHeader=ED,he.DrawerProvider=NE,he.FormController=Wp,he.FormError=Hp,he.FormLabel=Vp,he.GoogleMap=kp,he.GoogleProvider=_E,he.GoogleSearchPlaces=nh,he.IconButton=rh,he.Input=Hs,he.ModalContainer=wD,he.ModalFooter=xD,he.ModalHeader=BD,he.ModalProvider=zE,he.Pagination=mD,he.Popover=SD,he.RadioBox=oh,he.RadioGroup=ah,he.RichText=cD,he.Select=dD,he.Skeleton=Tp,he.Switch=pD,he.TabButton=DD,he.TabContainer=CD,he.TableBody=Rp,he.TableCaption=Ip,he.TableContainer=jp,he.TableFooter=Np,he.TableHeader=_p,he.Textarea=hD,he.Toast=Xc,he.ToastProvider=d1,he.Tooltip=AD,he.useAutomation=RE,he.useDrawer=IE,he.useModal=jE,he.useScopedParams=Yc,he.useToast=Kf,Object.defineProperty(he,Symbol.toStringTag,{value:"Module"})});
110
+ */var co,df;function Lb(){if(df)return co;df=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var u=Object.getOwnPropertyNames(o).map(function(f){return o[f]});if(u.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(f){l[f]=f}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return co=i()?Object.assign:function(a,o){for(var s,u=r(a),l,f=1;f<arguments.length;f++){s=Object(arguments[f]);for(var h in s)e.call(s,h)&&(u[h]=s[h]);if(t){l=t(s);for(var p=0;p<l.length;p++)n.call(s,l[p])&&(u[l[p]]=s[l[p]])}}return u},co}var fo,pf;function po(){if(pf)return fo;pf=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return fo=t,fo}var ho,hf;function vf(){return hf||(hf=1,ho=Function.call.bind(Object.prototype.hasOwnProperty)),ho}var vo,gf;function Ob(){if(gf)return vo;gf=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=po(),n={},r=vf();t=function(a){var o="Warning: "+a;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function i(a,o,s,u,l){if(process.env.NODE_ENV!=="production"){for(var f in a)if(r(a,f)){var h;try{if(typeof a[f]!="function"){var p=Error((u||"React class")+": "+s+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}h=a[f](o,f,u,s,null,e)}catch(y){h=y}if(h&&!(h instanceof Error)&&t((u||"React class")+": type specification of "+s+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof h+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),h instanceof Error&&!(h.message in n)){n[h.message]=!0;var g=l?l():"";t("Failed "+s+" type: "+h.message+(g??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},vo=i,vo}var go,mf;function Pb(){if(mf)return go;mf=1;var t=ff(),e=Lb(),n=po(),r=vf(),i=Ob(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var u="Warning: "+s;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function o(){return null}return go=function(s,u){var l=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function h(k){var I=k&&(l&&k[l]||k[f]);if(typeof I=="function")return I}var p="<<anonymous>>",g={array:D("array"),bigint:D("bigint"),bool:D("boolean"),func:D("function"),number:D("number"),object:D("object"),string:D("string"),symbol:D("symbol"),any:x(),arrayOf:E,element:O(),elementType:b(),instanceOf:w,node:P(),objectOf:M,oneOf:A,oneOfType:V,shape:R,exact:N};function y(k,I){return k===I?k!==0||1/k===1/I:k!==k&&I!==I}function v(k,I){this.message=k,this.data=I&&typeof I=="object"?I:{},this.stack=""}v.prototype=Error.prototype;function d(k){if(process.env.NODE_ENV!=="production")var I={},G=0;function H(K,C,U,W,F,J,ne){if(W=W||p,J=J||U,ne!==n){if(u){var Y=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw Y.name="Invariant Violation",Y}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ue=W+":"+U;!I[ue]&&G<3&&(a("You are manually calling a React.PropTypes validation function for the `"+J+"` prop on `"+W+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),I[ue]=!0,G++)}}return C[U]==null?K?C[U]===null?new v("The "+F+" `"+J+"` is marked as required "+("in `"+W+"`, but its value is `null`.")):new v("The "+F+" `"+J+"` is marked as required in "+("`"+W+"`, but its value is `undefined`.")):null:k(C,U,W,F,J)}var Q=H.bind(null,!1);return Q.isRequired=H.bind(null,!0),Q}function D(k){function I(G,H,Q,K,C,U){var W=G[H],F=X(W);if(F!==k){var J=z(W);return new v("Invalid "+K+" `"+C+"` of type "+("`"+J+"` supplied to `"+Q+"`, expected ")+("`"+k+"`."),{expectedType:k})}return null}return d(I)}function x(){return d(o)}function E(k){function I(G,H,Q,K,C){if(typeof k!="function")return new v("Property `"+C+"` of component `"+Q+"` has invalid PropType notation inside arrayOf.");var U=G[H];if(!Array.isArray(U)){var W=X(U);return new v("Invalid "+K+" `"+C+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected an array."))}for(var F=0;F<U.length;F++){var J=k(U,F,Q,K,C+"["+F+"]",n);if(J instanceof Error)return J}return null}return d(I)}function O(){function k(I,G,H,Q,K){var C=I[G];if(!s(C)){var U=X(C);return new v("Invalid "+Q+" `"+K+"` of type "+("`"+U+"` supplied to `"+H+"`, expected a single ReactElement."))}return null}return d(k)}function b(){function k(I,G,H,Q,K){var C=I[G];if(!t.isValidElementType(C)){var U=X(C);return new v("Invalid "+Q+" `"+K+"` of type "+("`"+U+"` supplied to `"+H+"`, expected a single ReactElement type."))}return null}return d(k)}function w(k){function I(G,H,Q,K,C){if(!(G[H]instanceof k)){var U=k.name||p,W=re(G[H]);return new v("Invalid "+K+" `"+C+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected ")+("instance of `"+U+"`."))}return null}return d(I)}function A(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),o;function I(G,H,Q,K,C){for(var U=G[H],W=0;W<k.length;W++)if(y(U,k[W]))return null;var F=JSON.stringify(k,function(ne,Y){var ue=z(Y);return ue==="symbol"?String(Y):Y});return new v("Invalid "+K+" `"+C+"` of value `"+String(U)+"` "+("supplied to `"+Q+"`, expected one of "+F+"."))}return d(I)}function M(k){function I(G,H,Q,K,C){if(typeof k!="function")return new v("Property `"+C+"` of component `"+Q+"` has invalid PropType notation inside objectOf.");var U=G[H],W=X(U);if(W!=="object")return new v("Invalid "+K+" `"+C+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected an object."));for(var F in U)if(r(U,F)){var J=k(U,F,Q,K,C+"."+F,n);if(J instanceof Error)return J}return null}return d(I)}function V(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var I=0;I<k.length;I++){var G=k[I];if(typeof G!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+$(G)+" at index "+I+"."),o}function H(Q,K,C,U,W){for(var F=[],J=0;J<k.length;J++){var ne=k[J],Y=ne(Q,K,C,U,W,n);if(Y==null)return null;Y.data&&r(Y.data,"expectedType")&&F.push(Y.data.expectedType)}var ue=F.length>0?", expected one of type ["+F.join(", ")+"]":"";return new v("Invalid "+U+" `"+W+"` supplied to "+("`"+C+"`"+ue+"."))}return d(H)}function P(){function k(I,G,H,Q,K){return T(I[G])?null:new v("Invalid "+Q+" `"+K+"` supplied to "+("`"+H+"`, expected a ReactNode."))}return d(k)}function _(k,I,G,H,Q){return new v((k||"React class")+": "+I+" type `"+G+"."+H+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Q+"`.")}function R(k){function I(G,H,Q,K,C){var U=G[H],W=X(U);if(W!=="object")return new v("Invalid "+K+" `"+C+"` of type `"+W+"` "+("supplied to `"+Q+"`, expected `object`."));for(var F in k){var J=k[F];if(typeof J!="function")return _(Q,K,C,F,z(J));var ne=J(U,F,Q,K,C+"."+F,n);if(ne)return ne}return null}return d(I)}function N(k){function I(G,H,Q,K,C){var U=G[H],W=X(U);if(W!=="object")return new v("Invalid "+K+" `"+C+"` of type `"+W+"` "+("supplied to `"+Q+"`, expected `object`."));var F=e({},G[H],k);for(var J in F){var ne=k[J];if(r(k,J)&&typeof ne!="function")return _(Q,K,C,J,z(ne));if(!ne)return new v("Invalid "+K+" `"+C+"` key `"+J+"` supplied to `"+Q+"`.\nBad object: "+JSON.stringify(G[H],null," ")+`
111
+ Valid keys: `+JSON.stringify(Object.keys(k),null," "));var Y=ne(U,J,Q,K,C+"."+J,n);if(Y)return Y}return null}return d(I)}function T(k){switch(typeof k){case"number":case"string":case"undefined":return!0;case"boolean":return!k;case"object":if(Array.isArray(k))return k.every(T);if(k===null||s(k))return!0;var I=h(k);if(I){var G=I.call(k),H;if(I!==k.entries){for(;!(H=G.next()).done;)if(!T(H.value))return!1}else for(;!(H=G.next()).done;){var Q=H.value;if(Q&&!T(Q[1]))return!1}}else return!1;return!0;default:return!1}}function j(k,I){return k==="symbol"?!0:I?I["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&I instanceof Symbol:!1}function X(k){var I=typeof k;return Array.isArray(k)?"array":k instanceof RegExp?"object":j(I,k)?"symbol":I}function z(k){if(typeof k>"u"||k===null)return""+k;var I=X(k);if(I==="object"){if(k instanceof Date)return"date";if(k instanceof RegExp)return"regexp"}return I}function $(k){var I=z(k);switch(I){case"array":case"object":return"an "+I;case"boolean":case"date":case"regexp":return"a "+I;default:return I}}function re(k){return!k.constructor||!k.constructor.name?p:k.constructor.name}return g.checkPropTypes=i,g.resetWarningCache=i.resetWarningCache,g.PropTypes=g,g},go}var mo,yf;function Mb(){if(yf)return mo;yf=1;var t=po();function e(){}function n(){}return n.resetWarningCache=e,mo=function(){function r(o,s,u,l,f,h){if(h!==t){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:e};return a.PropTypes=a,a},mo}if(process.env.NODE_ENV!=="production"){var Fb=ff(),kb=!0;lo.exports=Pb()(Fb.isElement,kb)}else lo.exports=Mb()();var Di=lo.exports,bi={};Object.defineProperty(bi,"__esModule",{value:!0});var Tb=hr,yo=Rb(Tb);function Rb(t){return t&&t.__esModule?t:{default:t}}var Ib={mountFlag:!1,initialized:!1,scroller:null,containers:{},mount:function(e){this.scroller=e,this.handleHashChange=this.handleHashChange.bind(this),window.addEventListener("hashchange",this.handleHashChange),this.initStateFromHash(),this.mountFlag=!0},mapContainer:function(e,n){this.containers[e]=n},isMounted:function(){return this.mountFlag},isInitialized:function(){return this.initialized},initStateFromHash:function(){var e=this,n=this.getHash();n?window.setTimeout(function(){e.scrollTo(n,!0),e.initialized=!0},10):this.initialized=!0},scrollTo:function(e,n){var r=this.scroller,i=r.get(e);if(i&&(n||e!==r.getActiveLink())){var a=this.containers[e]||document;r.scrollTo(e,{container:a})}},getHash:function(){return yo.default.getHash()},changeHash:function(e,n){this.isInitialized()&&yo.default.getHash()!==e&&yo.default.updateHash(e,n)},handleHashChange:function(){this.scrollTo(this.getHash())},unmount:function(){this.scroller=null,this.containers=null,window.removeEventListener("hashchange",this.handleHashChange)}};bi.default=Ib,Object.defineProperty(fr,"__esModule",{value:!0});var Ei=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},jb=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),Nb=c,Cf=mr(Nb),_b=dr,wi=mr(_b),zb=jn,Wb=mr(zb),Ub=Di,Xe=mr(Ub),Hb=bi,sn=mr(Hb);function mr(t){return t&&t.__esModule?t:{default:t}}function Vb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qb(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Gb(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Df={to:Xe.default.string.isRequired,containerId:Xe.default.string,container:Xe.default.object,activeClass:Xe.default.string,activeStyle:Xe.default.object,spy:Xe.default.bool,horizontal:Xe.default.bool,smooth:Xe.default.oneOfType([Xe.default.bool,Xe.default.string]),offset:Xe.default.number,delay:Xe.default.number,isDynamic:Xe.default.bool,onClick:Xe.default.func,duration:Xe.default.oneOfType([Xe.default.number,Xe.default.func]),absolute:Xe.default.bool,onSetActive:Xe.default.func,onSetInactive:Xe.default.func,ignoreCancelEvents:Xe.default.bool,hashSpy:Xe.default.bool,saveHashHistory:Xe.default.bool,spyThrottle:Xe.default.number};fr.default=function(t,e){var n=e||Wb.default,r=function(a){Gb(o,a);function o(s){Vb(this,o);var u=qb(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,s));return i.call(u),u.state={active:!1},u}return jb(o,[{key:"getScrollSpyContainer",value:function(){var u=this.props.containerId,l=this.props.container;return u&&!l?document.getElementById(u):l&&l.nodeType?l:document}},{key:"componentDidMount",value:function(){if(this.props.spy||this.props.hashSpy){var u=this.getScrollSpyContainer();wi.default.isMounted(u)||wi.default.mount(u,this.props.spyThrottle),this.props.hashSpy&&(sn.default.isMounted()||sn.default.mount(n),sn.default.mapContainer(this.props.to,u)),wi.default.addSpyHandler(this.spyHandler,u),this.setState({container:u})}}},{key:"componentWillUnmount",value:function(){wi.default.unmount(this.stateHandler,this.spyHandler)}},{key:"render",value:function(){var u="";this.state&&this.state.active?u=((this.props.className||"")+" "+(this.props.activeClass||"active")).trim():u=this.props.className;var l={};this.state&&this.state.active?l=Ei({},this.props.style,this.props.activeStyle):l=Ei({},this.props.style);var f=Ei({},this.props);for(var h in Df)f.hasOwnProperty(h)&&delete f[h];return f.className=u,f.style=l,f.onClick=this.handleClick,Cf.default.createElement(t,f)}}]),o}(Cf.default.PureComponent),i=function(){var o=this;this.scrollTo=function(s,u){n.scrollTo(s,Ei({},o.state,u))},this.handleClick=function(s){o.props.onClick&&o.props.onClick(s),s.stopPropagation&&s.stopPropagation(),s.preventDefault&&s.preventDefault(),o.scrollTo(o.props.to,o.props)},this.spyHandler=function(s,u){var l=o.getScrollSpyContainer();if(!(sn.default.isMounted()&&!sn.default.isInitialized())){var f=o.props.horizontal,h=o.props.to,p=null,g=void 0,y=void 0;if(f){var v=0,d=0,D=0;if(l.getBoundingClientRect){var x=l.getBoundingClientRect();D=x.left}if(!p||o.props.isDynamic){if(p=n.get(h),!p)return;var E=p.getBoundingClientRect();v=E.left-D+s,d=v+E.width}var O=s-o.props.offset;g=O>=Math.floor(v)&&O<Math.floor(d),y=O<Math.floor(v)||O>=Math.floor(d)}else{var b=0,w=0,A=0;if(l.getBoundingClientRect){var M=l.getBoundingClientRect();A=M.top}if(!p||o.props.isDynamic){if(p=n.get(h),!p)return;var V=p.getBoundingClientRect();b=V.top-A+u,w=b+V.height}var P=u-o.props.offset;g=P>=Math.floor(b)&&P<Math.floor(w),y=P<Math.floor(b)||P>=Math.floor(w)}var _=n.getActiveLink();if(y){if(h===_&&n.setActiveLink(void 0),o.props.hashSpy&&sn.default.getHash()===h){var R=o.props.saveHashHistory,N=R===void 0?!1:R;sn.default.changeHash("",N)}o.props.spy&&o.state.active&&(o.setState({active:!1}),o.props.onSetInactive&&o.props.onSetInactive(h,p))}if(g&&(_!==h||o.state.active===!1)){n.setActiveLink(h);var T=o.props.saveHashHistory,j=T===void 0?!1:T;o.props.hashSpy&&sn.default.changeHash(h,j),o.props.spy&&(o.setState({active:!0}),o.props.onSetActive&&o.props.onSetActive(h,p))}}}};return r.propTypes=Df,r.defaultProps={offset:0},r},Object.defineProperty(eo,"__esModule",{value:!0});var Yb=c,bf=Ef(Yb),Zb=fr,Kb=Ef(Zb);function Ef(t){return t&&t.__esModule?t:{default:t}}function Xb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wf(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Jb(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Qb=function(t){Jb(e,t);function e(){var n,r,i,a;Xb(this,e);for(var o=arguments.length,s=Array(o),u=0;u<o;u++)s[u]=arguments[u];return a=(r=(i=wf(this,(n=e.__proto__||Object.getPrototypeOf(e)).call.apply(n,[this].concat(s))),i),i.render=function(){return bf.default.createElement("a",i.props,i.props.children)},r),wf(i,a)}return e}(bf.default.Component);eo.default=(0,Kb.default)(Qb);var Co={};Object.defineProperty(Co,"__esModule",{value:!0});var $b=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),eE=c,xf=Bf(eE),tE=fr,nE=Bf(tE);function Bf(t){return t&&t.__esModule?t:{default:t}}function rE(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function iE(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function aE(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var oE=function(t){aE(e,t);function e(){return rE(this,e),iE(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return $b(e,[{key:"render",value:function(){return xf.default.createElement("button",this.props,this.props.children)}}]),e}(xf.default.Component);Co.default=(0,nE.default)(oE);var Do={},xi={};Object.defineProperty(xi,"__esModule",{value:!0});var sE=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},uE=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),lE=c,Sf=Bi(lE),cE=Yt;Bi(cE);var fE=jn,Af=Bi(fE),dE=Di,Lf=Bi(dE);function Bi(t){return t&&t.__esModule?t:{default:t}}function pE(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function hE(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function vE(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}xi.default=function(t){var e=function(n){vE(r,n);function r(i){pE(this,r);var a=hE(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,i));return a.childBindings={domNode:null},a}return uE(r,[{key:"componentDidMount",value:function(){if(typeof window>"u")return!1;this.registerElems(this.props.name)}},{key:"componentDidUpdate",value:function(a){this.props.name!==a.name&&this.registerElems(this.props.name)}},{key:"componentWillUnmount",value:function(){if(typeof window>"u")return!1;Af.default.unregister(this.props.name)}},{key:"registerElems",value:function(a){Af.default.register(a,this.childBindings.domNode)}},{key:"render",value:function(){return Sf.default.createElement(t,sE({},this.props,{parentBindings:this.childBindings}))}}]),r}(Sf.default.Component);return e.propTypes={name:Lf.default.string,id:Lf.default.string},e},Object.defineProperty(Do,"__esModule",{value:!0});var Of=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},gE=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),mE=c,Pf=bo(mE),yE=xi,CE=bo(yE),DE=Di,Mf=bo(DE);function bo(t){return t&&t.__esModule?t:{default:t}}function bE(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function EE(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function wE(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Ff=function(t){wE(e,t);function e(){return bE(this,e),EE(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return gE(e,[{key:"render",value:function(){var r=this,i=Of({},this.props);return delete i.name,i.parentBindings&&delete i.parentBindings,Pf.default.createElement("div",Of({},i,{ref:function(o){r.props.parentBindings.domNode=o}}),this.props.children)}}]),e}(Pf.default.Component);Ff.propTypes={name:Mf.default.string,id:Mf.default.string},Do.default=(0,CE.default)(Ff);var Eo=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},kf=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function Tf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rf(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function If(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Si=c,Bn=dr,wo=jn,et=Di,un=bi,jf={to:et.string.isRequired,containerId:et.string,container:et.object,activeClass:et.string,spy:et.bool,smooth:et.oneOfType([et.bool,et.string]),offset:et.number,delay:et.number,isDynamic:et.bool,onClick:et.func,duration:et.oneOfType([et.number,et.func]),absolute:et.bool,onSetActive:et.func,onSetInactive:et.func,ignoreCancelEvents:et.bool,hashSpy:et.bool,spyThrottle:et.number},xE={Scroll:function(e,n){console.warn("Helpers.Scroll is deprecated since v1.7.0");var r=n||wo,i=function(o){If(s,o);function s(u){Tf(this,s);var l=Rf(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,u));return a.call(l),l.state={active:!1},l}return kf(s,[{key:"getScrollSpyContainer",value:function(){var l=this.props.containerId,f=this.props.container;return l?document.getElementById(l):f&&f.nodeType?f:document}},{key:"componentDidMount",value:function(){if(this.props.spy||this.props.hashSpy){var l=this.getScrollSpyContainer();Bn.isMounted(l)||Bn.mount(l,this.props.spyThrottle),this.props.hashSpy&&(un.isMounted()||un.mount(r),un.mapContainer(this.props.to,l)),this.props.spy&&Bn.addStateHandler(this.stateHandler),Bn.addSpyHandler(this.spyHandler,l),this.setState({container:l})}}},{key:"componentWillUnmount",value:function(){Bn.unmount(this.stateHandler,this.spyHandler)}},{key:"render",value:function(){var l="";this.state&&this.state.active?l=((this.props.className||"")+" "+(this.props.activeClass||"active")).trim():l=this.props.className;var f=Eo({},this.props);for(var h in jf)f.hasOwnProperty(h)&&delete f[h];return f.className=l,f.onClick=this.handleClick,Si.createElement(e,f)}}]),s}(Si.Component),a=function(){var s=this;this.scrollTo=function(u,l){r.scrollTo(u,Eo({},s.state,l))},this.handleClick=function(u){s.props.onClick&&s.props.onClick(u),u.stopPropagation&&u.stopPropagation(),u.preventDefault&&u.preventDefault(),s.scrollTo(s.props.to,s.props)},this.stateHandler=function(){r.getActiveLink()!==s.props.to&&(s.state!==null&&s.state.active&&s.props.onSetInactive&&s.props.onSetInactive(),s.setState({active:!1}))},this.spyHandler=function(u){var l=s.getScrollSpyContainer();if(!(un.isMounted()&&!un.isInitialized())){var f=s.props.to,h=null,p=0,g=0,y=0;if(l.getBoundingClientRect){var v=l.getBoundingClientRect();y=v.top}if(!h||s.props.isDynamic){if(h=r.get(f),!h)return;var d=h.getBoundingClientRect();p=d.top-y+u,g=p+d.height}var D=u-s.props.offset,x=D>=Math.floor(p)&&D<Math.floor(g),E=D<Math.floor(p)||D>=Math.floor(g),O=r.getActiveLink();if(E)return f===O&&r.setActiveLink(void 0),s.props.hashSpy&&un.getHash()===f&&un.changeHash(),s.props.spy&&s.state.active&&(s.setState({active:!1}),s.props.onSetInactive&&s.props.onSetInactive()),Bn.updateStates();if(x&&O!==f)return r.setActiveLink(f),s.props.hashSpy&&un.changeHash(f),s.props.spy&&(s.setState({active:!0}),s.props.onSetActive&&s.props.onSetActive(f)),Bn.updateStates()}}};return i.propTypes=jf,i.defaultProps={offset:0},i},Element:function(e){console.warn("Helpers.Element is deprecated since v1.7.0");var n=function(r){If(i,r);function i(a){Tf(this,i);var o=Rf(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,a));return o.childBindings={domNode:null},o}return kf(i,[{key:"componentDidMount",value:function(){if(typeof window>"u")return!1;this.registerElems(this.props.name)}},{key:"componentDidUpdate",value:function(o){this.props.name!==o.name&&this.registerElems(this.props.name)}},{key:"componentWillUnmount",value:function(){if(typeof window>"u")return!1;wo.unregister(this.props.name)}},{key:"registerElems",value:function(o){wo.register(o,this.childBindings.domNode)}},{key:"render",value:function(){return Si.createElement(e,Eo({},this.props,{parentBindings:this.childBindings}))}}]),i}(Si.Component);return n.propTypes={name:et.string,id:et.string},n}},BE=xE;Object.defineProperty(nt,"__esModule",{value:!0}),nt.Helpers=nt.ScrollElement=nt.ScrollLink=Zf=nt.animateScroll=nt.scrollSpy=nt.Events=nt.scroller=nt.Element=nt.Button=nt.Link=void 0;var SE=eo,Nf=_t(SE),AE=Co,_f=_t(AE),LE=Do,zf=_t(LE),OE=jn,Wf=_t(OE),PE=vr,Uf=_t(PE),ME=dr,Hf=_t(ME),FE=hi,Vf=_t(FE),kE=fr,qf=_t(kE),TE=xi,Gf=_t(TE),RE=BE,Yf=_t(RE);function _t(t){return t&&t.__esModule?t:{default:t}}nt.Link=Nf.default,nt.Button=_f.default,nt.Element=zf.default,nt.scroller=Wf.default,nt.Events=Uf.default,nt.scrollSpy=Hf.default;var Zf=nt.animateScroll=Vf.default;nt.ScrollLink=qf.default,nt.ScrollElement=Gf.default,nt.Helpers=Yf.default,nt.default={Link:Nf.default,Button:_f.default,Element:zf.default,scroller:Wf.default,Events:Uf.default,scrollSpy:Hf.default,animateScroll:Vf.default,ScrollLink:qf.default,ScrollElement:Gf.default,Helpers:Yf.default};const xo=c.createContext({}),Kf=c.createContext({});function Xf(){const t=c.useContext(Kf);if(Object.entries(t).length===0)throw new Error("useToast must be used within a Provider");return t}function Jf(t){return t&&typeof t.title=="string"&&typeof t.message=="string"&&(t.size===void 0||t.size==="md"||t.size==="lg")&&(t.type==="info"||t.type==="success"||t.type==="danger"||t.type==="warning")}function IE(){const t=Ln.useActionData(),{closeModal:e}=c.useContext(xo),{showToast:n}=Xf();c.useEffect(()=>{const r=t==null?void 0:t.closeModalKey;r&&e(r)},[t]),c.useEffect(()=>{const r=t==null?void 0:t.toast,i=t==null?void 0:t.message;Jf(r)&&n(r),!Jf(r)&&i&&n({message:i,title:"Atenção!",type:"warning"})},[t]),c.useEffect(()=>{var r,i;if(typeof((r=t==null?void 0:t.data)==null?void 0:r.scrollTo)=="string"){const a=document.getElementById((i=t==null?void 0:t.data)==null?void 0:i.scrollTo);a&&Zf.scrollTo(a.offsetTop-200)}},[t])}const Qf=c.createContext({});function jE(t){const e=c.useContext(Qf);if(Object.entries(e).length===0)throw new Error("useDrawer must be used within a Provider");if(t){const{drawerData:n,drawerIsOpen:r,openDrawer:i,closeDrawer:a}=e,o=r(t),s=n(t);return{drawerIsOpen:o,drawerData:s,openDrawer:f=>i(t,f),closeDrawer:()=>a(t)}}else return e}function NE(t){const e=c.useContext(xo);if(Object.entries(e).length===0)throw new Error("useModal must be used within a Provider");if(t){const{modalData:n,modalIsOpen:r,openModal:i,closeModal:a}=e,o=r(t),s=n(t);return{modalIsOpen:o,modalData:s,openModal:f=>i(t,f),closeModal:()=>a(t)}}else return e}function _E(t){const{children:e=!1}=t,[n,r]=c.useState([]);function i(u){return!!n.some(l=>l.key===u)}function a(u){var l;return(l=n.find(f=>f.key===u))==null?void 0:l.data}function o(u,l){const f=i(u);r(f?h=>[...h.filter(g=>g.key!==u),{key:u,data:l}]:[...n,{key:u,data:l}])}function s(u){r(n.filter(l=>l.key!==u))}return B.jsx(Qf.Provider,{value:{drawerIsOpen:i,drawerData:a,openDrawer:o,closeDrawer:s},children:e})}function zE({googleMapsApiKey:t,children:e,...n}){return B.jsx(Ld,{libraries:["places","marker","maps"],googleMapsApiKey:t,...n,children:e})}function WE(t){const{children:e=!1}=t,[n,r]=c.useState([]);function i(u){return!!n.some(l=>l.key===u)}function a(u){var l;return(l=n.find(f=>f.key===u))==null?void 0:l.data}function o(u,l){const f=i(u);r(f?h=>[...h.filter(g=>g.key!==u),{key:u,data:l}]:[...n,{key:u,data:l}])}function s(u){r(n.filter(l=>l.key!==u))}return B.jsx(xo.Provider,{value:{modalIsOpen:i,modalData:a,openModal:o,closeModal:s},children:e})}var UE=t=>{switch(t){case"success":return qE;case"info":return YE;case"warning":return GE;case"error":return ZE;default:return null}},HE=Array(12).fill(0),VE=({visible:t})=>c.createElement("div",{className:"sonner-loading-wrapper","data-visible":t},c.createElement("div",{className:"sonner-spinner"},HE.map((e,n)=>c.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),qE=c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},c.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),GE=c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},c.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),YE=c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},c.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),ZE=c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},c.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),KE=()=>{let[t,e]=c.useState(document.hidden);return c.useEffect(()=>{let n=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t},Bo=1,XE=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:n,...r}=t,i=typeof(t==null?void 0:t.id)=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:Bo++,a=this.toasts.find(s=>s.id===i),o=t.dismissible===void 0?!0:t.dismissible;return a?this.toasts=this.toasts.map(s=>s.id===i?(this.publish({...s,...t,id:i,title:n}),{...s,...t,id:i,dismissible:o,title:n}):s):this.addToast({title:n,...r,dismissible:o,id:i}),i},this.dismiss=t=>(t||this.toasts.forEach(e=>{this.subscribers.forEach(n=>n({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let n;e.loading!==void 0&&(n=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let r=t instanceof Promise?t:t(),i=n!==void 0;return r.then(async a=>{if(QE(a)&&!a.ok){i=!1;let o=typeof e.error=="function"?await e.error(`HTTP error! status: ${a.status}`):e.error,s=typeof e.description=="function"?await e.description(`HTTP error! status: ${a.status}`):e.description;this.create({id:n,type:"error",message:o,description:s})}else if(e.success!==void 0){i=!1;let o=typeof e.success=="function"?await e.success(a):e.success,s=typeof e.description=="function"?await e.description(a):e.description;this.create({id:n,type:"success",message:o,description:s})}}).catch(async a=>{if(e.error!==void 0){i=!1;let o=typeof e.error=="function"?await e.error(a):e.error,s=typeof e.description=="function"?await e.description(a):e.description;this.create({id:n,type:"error",message:o,description:s})}}).finally(()=>{var a;i&&(this.dismiss(n),n=void 0),(a=e.finally)==null||a.call(e)}),n},this.custom=(t,e)=>{let n=(e==null?void 0:e.id)||Bo++;return this.create({jsx:t(n),id:n,...e}),n},this.subscribers=[],this.toasts=[]}},At=new XE,JE=(t,e)=>{let n=(e==null?void 0:e.id)||Bo++;return At.addToast({title:t,...e,id:n}),n},QE=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",$E=JE,e1=()=>At.toasts,t1=Object.assign($E,{success:At.success,info:At.info,warning:At.warning,error:At.error,custom:At.custom,message:At.message,promise:At.promise,dismiss:At.dismiss,loading:At.loading},{getHistory:e1});function n1(t,{insertAt:e}={}){if(!t||typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}n1(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
112
+ `);function Ai(t){return t.label!==void 0}var r1=3,i1="32px",a1=4e3,o1=356,s1=14,u1=20,l1=200;function c1(...t){return t.filter(Boolean).join(" ")}var f1=t=>{var e,n,r,i,a,o,s,u,l,f;let{invert:h,toast:p,unstyled:g,interacting:y,setHeights:v,visibleToasts:d,heights:D,index:x,toasts:E,expanded:O,removeToast:b,defaultRichColors:w,closeButton:A,style:M,cancelButtonStyle:V,actionButtonStyle:P,className:_="",descriptionClassName:R="",duration:N,position:T,gap:j,loadingIcon:X,expandByDefault:z,classNames:$,icons:re,closeButtonAriaLabel:k="Close toast",pauseWhenPageIsHidden:I,cn:G}=t,[H,Q]=c.useState(!1),[K,C]=c.useState(!1),[U,W]=c.useState(!1),[F,J]=c.useState(!1),[ne,Y]=c.useState(0),[ue,ae]=c.useState(0),de=c.useRef(null),pe=c.useRef(null),Ce=x===0,ye=x+1<=d,ge=p.type,ve=p.dismissible!==!1,Ne=p.className||"",se=p.descriptionClassName||"",_e=c.useMemo(()=>D.findIndex(be=>be.toastId===p.id)||0,[D,p.id]),fe=c.useMemo(()=>{var be;return(be=p.closeButton)!=null?be:A},[p.closeButton,A]),we=c.useMemo(()=>p.duration||N||a1,[p.duration,N]),ke=c.useRef(0),Ve=c.useRef(0),Ye=c.useRef(0),Ee=c.useRef(null),[ct,st]=T.split("-"),Tt=c.useMemo(()=>D.reduce((be,Re,Ie)=>Ie>=_e?be:be+Re.height,0),[D,_e]),yt=KE(),Lt=p.invert||h,zt=ge==="loading";Ve.current=c.useMemo(()=>_e*j+Tt,[_e,Tt]),c.useEffect(()=>{Q(!0)},[]),c.useLayoutEffect(()=>{if(!H)return;let be=pe.current,Re=be.style.height;be.style.height="auto";let Ie=be.getBoundingClientRect().height;be.style.height=Re,ae(Ie),v(it=>it.find(ut=>ut.toastId===p.id)?it.map(ut=>ut.toastId===p.id?{...ut,height:Ie}:ut):[{toastId:p.id,height:Ie,position:p.position},...it])},[H,p.title,p.description,v,p.id]);let Ct=c.useCallback(()=>{C(!0),Y(Ve.current),v(be=>be.filter(Re=>Re.toastId!==p.id)),setTimeout(()=>{b(p)},l1)},[p,b,v,Ve]);c.useEffect(()=>{if(p.promise&&ge==="loading"||p.duration===1/0||p.type==="loading")return;let be,Re=we;return O||y||I&&yt?(()=>{if(Ye.current<ke.current){let Ie=new Date().getTime()-ke.current;Re=Re-Ie}Ye.current=new Date().getTime()})():Re!==1/0&&(ke.current=new Date().getTime(),be=setTimeout(()=>{var Ie;(Ie=p.onAutoClose)==null||Ie.call(p,p),Ct()},Re)),()=>clearTimeout(be)},[O,y,z,p,we,Ct,p.promise,ge,I,yt]),c.useEffect(()=>{let be=pe.current;if(be){let Re=be.getBoundingClientRect().height;return ae(Re),v(Ie=>[{toastId:p.id,height:Re,position:p.position},...Ie]),()=>v(Ie=>Ie.filter(it=>it.toastId!==p.id))}},[v,p.id]),c.useEffect(()=>{p.delete&&Ct()},[Ct,p.delete]);function ln(){return re!=null&&re.loading?c.createElement("div",{className:"sonner-loader","data-visible":ge==="loading"},re.loading):X?c.createElement("div",{className:"sonner-loader","data-visible":ge==="loading"},X):c.createElement(VE,{visible:ge==="loading"})}return c.createElement("li",{"aria-live":p.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:pe,className:G(_,Ne,$==null?void 0:$.toast,(e=p==null?void 0:p.classNames)==null?void 0:e.toast,$==null?void 0:$.default,$==null?void 0:$[ge],(n=p==null?void 0:p.classNames)==null?void 0:n[ge]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:w,"data-styled":!(p.jsx||p.unstyled||g),"data-mounted":H,"data-promise":!!p.promise,"data-removed":K,"data-visible":ye,"data-y-position":ct,"data-x-position":st,"data-index":x,"data-front":Ce,"data-swiping":U,"data-dismissible":ve,"data-type":ge,"data-invert":Lt,"data-swipe-out":F,"data-expanded":!!(O||z&&H),style:{"--index":x,"--toasts-before":x,"--z-index":E.length-x,"--offset":`${K?ne:Ve.current}px`,"--initial-height":z?"auto":`${ue}px`,...M,...p.style},onPointerDown:be=>{zt||!ve||(de.current=new Date,Y(Ve.current),be.target.setPointerCapture(be.pointerId),be.target.tagName!=="BUTTON"&&(W(!0),Ee.current={x:be.clientX,y:be.clientY}))},onPointerUp:()=>{var be,Re,Ie,it;if(F||!ve)return;Ee.current=null;let ut=Number(((be=pe.current)==null?void 0:be.style.getPropertyValue("--swipe-amount").replace("px",""))||0),Rt=new Date().getTime()-((Re=de.current)==null?void 0:Re.getTime()),Sn=Math.abs(ut)/Rt;if(Math.abs(ut)>=u1||Sn>.11){Y(Ve.current),(Ie=p.onDismiss)==null||Ie.call(p,p),Ct(),J(!0);return}(it=pe.current)==null||it.style.setProperty("--swipe-amount","0px"),W(!1)},onPointerMove:be=>{var Re;if(!Ee.current||!ve)return;let Ie=be.clientY-Ee.current.y,it=be.clientX-Ee.current.x,ut=(ct==="top"?Math.min:Math.max)(0,Ie),Rt=be.pointerType==="touch"?10:2;Math.abs(ut)>Rt?(Re=pe.current)==null||Re.style.setProperty("--swipe-amount",`${Ie}px`):Math.abs(it)>Rt&&(Ee.current=null)}},fe&&!p.jsx?c.createElement("button",{"aria-label":k,"data-disabled":zt,"data-close-button":!0,onClick:zt||!ve?()=>{}:()=>{var be;Ct(),(be=p.onDismiss)==null||be.call(p,p)},className:G($==null?void 0:$.closeButton,(i=p==null?void 0:p.classNames)==null?void 0:i.closeButton)},c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},c.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),c.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,p.jsx||c.isValidElement(p.title)?p.jsx||p.title:c.createElement(c.Fragment,null,ge||p.icon||p.promise?c.createElement("div",{"data-icon":"",className:G($==null?void 0:$.icon,(a=p==null?void 0:p.classNames)==null?void 0:a.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||ln():null,p.type!=="loading"?p.icon||(re==null?void 0:re[ge])||UE(ge):null):null,c.createElement("div",{"data-content":"",className:G($==null?void 0:$.content,(o=p==null?void 0:p.classNames)==null?void 0:o.content)},c.createElement("div",{"data-title":"",className:G($==null?void 0:$.title,(s=p==null?void 0:p.classNames)==null?void 0:s.title)},p.title),p.description?c.createElement("div",{"data-description":"",className:G(R,se,$==null?void 0:$.description,(u=p==null?void 0:p.classNames)==null?void 0:u.description)},p.description):null),c.isValidElement(p.cancel)?p.cancel:p.cancel&&Ai(p.cancel)?c.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||V,onClick:be=>{var Re,Ie;Ai(p.cancel)&&ve&&((Ie=(Re=p.cancel).onClick)==null||Ie.call(Re,be),Ct())},className:G($==null?void 0:$.cancelButton,(l=p==null?void 0:p.classNames)==null?void 0:l.cancelButton)},p.cancel.label):null,c.isValidElement(p.action)?p.action:p.action&&Ai(p.action)?c.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||P,onClick:be=>{var Re,Ie;Ai(p.action)&&(be.defaultPrevented||((Ie=(Re=p.action).onClick)==null||Ie.call(Re,be),Ct()))},className:G($==null?void 0:$.actionButton,(f=p==null?void 0:p.classNames)==null?void 0:f.actionButton)},p.action.label):null))};function $f(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}var d1=t=>{let{invert:e,position:n="bottom-right",hotkey:r=["altKey","KeyT"],expand:i,closeButton:a,className:o,offset:s,theme:u="light",richColors:l,duration:f,style:h,visibleToasts:p=r1,toastOptions:g,dir:y=$f(),gap:v=s1,loadingIcon:d,icons:D,containerAriaLabel:x="Notifications",pauseWhenPageIsHidden:E,cn:O=c1}=t,[b,w]=c.useState([]),A=c.useMemo(()=>Array.from(new Set([n].concat(b.filter(I=>I.position).map(I=>I.position)))),[b,n]),[M,V]=c.useState([]),[P,_]=c.useState(!1),[R,N]=c.useState(!1),[T,j]=c.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),X=c.useRef(null),z=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),$=c.useRef(null),re=c.useRef(!1),k=c.useCallback(I=>{var G;(G=b.find(H=>H.id===I.id))!=null&&G.delete||At.dismiss(I.id),w(H=>H.filter(({id:Q})=>Q!==I.id))},[b]);return c.useEffect(()=>At.subscribe(I=>{if(I.dismiss){w(G=>G.map(H=>H.id===I.id?{...H,delete:!0}:H));return}setTimeout(()=>{Yt.flushSync(()=>{w(G=>{let H=G.findIndex(Q=>Q.id===I.id);return H!==-1?[...G.slice(0,H),{...G[H],...I},...G.slice(H+1)]:[I,...G]})})})}),[]),c.useEffect(()=>{if(u!=="system"){j(u);return}u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?j("dark"):j("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:I})=>{j(I?"dark":"light")})},[u]),c.useEffect(()=>{b.length<=1&&_(!1)},[b]),c.useEffect(()=>{let I=G=>{var H,Q;r.every(K=>G[K]||G.code===K)&&(_(!0),(H=X.current)==null||H.focus()),G.code==="Escape"&&(document.activeElement===X.current||(Q=X.current)!=null&&Q.contains(document.activeElement))&&_(!1)};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},[r]),c.useEffect(()=>{if(X.current)return()=>{$.current&&($.current.focus({preventScroll:!0}),$.current=null,re.current=!1)}},[X.current]),b.length?c.createElement("section",{"aria-label":`${x} ${z}`,tabIndex:-1},A.map((I,G)=>{var H;let[Q,K]=I.split("-");return c.createElement("ol",{key:I,dir:y==="auto"?$f():y,tabIndex:-1,ref:X,className:o,"data-sonner-toaster":!0,"data-theme":T,"data-y-position":Q,"data-x-position":K,style:{"--front-toast-height":`${((H=M[0])==null?void 0:H.height)||0}px`,"--offset":typeof s=="number"?`${s}px`:s||i1,"--width":`${o1}px`,"--gap":`${v}px`,...h},onBlur:C=>{re.current&&!C.currentTarget.contains(C.relatedTarget)&&(re.current=!1,$.current&&($.current.focus({preventScroll:!0}),$.current=null))},onFocus:C=>{C.target instanceof HTMLElement&&C.target.dataset.dismissible==="false"||re.current||(re.current=!0,$.current=C.relatedTarget)},onMouseEnter:()=>_(!0),onMouseMove:()=>_(!0),onMouseLeave:()=>{R||_(!1)},onPointerDown:C=>{C.target instanceof HTMLElement&&C.target.dataset.dismissible==="false"||N(!0)},onPointerUp:()=>N(!1)},b.filter(C=>!C.position&&G===0||C.position===I).map((C,U)=>{var W,F;return c.createElement(f1,{key:C.id,icons:D,index:U,toast:C,defaultRichColors:l,duration:(W=g==null?void 0:g.duration)!=null?W:f,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:e,visibleToasts:p,closeButton:(F=g==null?void 0:g.closeButton)!=null?F:a,interacting:R,position:I,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:k,toasts:b.filter(J=>J.position==C.position),heights:M.filter(J=>J.position==C.position),setHeights:V,expandByDefault:i,gap:v,loadingIcon:d,expanded:P,pauseWhenPageIsHidden:E,cn:O})}))})):null};function p1({children:t}){function e(n){t1.custom(r=>B.jsx(Jc,{...n}))}return B.jsxs(Kf.Provider,{value:{showToast:e},children:[B.jsx(d1,{}),t]})}he.AlertContainer=ad,he.AlertContent=od,he.AlertDescription=sd,he.AlertIcon=ud,he.AlertTitle=Oo,he.Badge=dd,he.BreadcrumbContainer=gD,he.BreadcrumbLink=mD,he.Button=Wp,he.Card=pd,he.Checkbox=Hp,he.Divider=hd,he.DrawerContainer=ED,he.DrawerHeader=wD,he.DrawerProvider=_E,he.FormController=Up,he.FormError=Vp,he.FormLabel=qp,he.GoogleMap=Tp,he.GoogleProvider=zE,he.GoogleSearchPlaces=rh,he.IconButton=ih,he.Input=Hs,he.ModalContainer=xD,he.ModalFooter=BD,he.ModalHeader=SD,he.ModalProvider=WE,he.Pagination=yD,he.Popover=AD,he.RadioBox=sh,he.RadioGroup=oh,he.RichText=fD,he.Select=pD,he.Skeleton=Rp,he.Switch=hD,he.TabButton=bD,he.TabContainer=DD,he.TableBody=Ip,he.TableCaption=jp,he.TableContainer=Np,he.TableFooter=_p,he.TableHeader=zp,he.Textarea=vD,he.Toast=Jc,he.ToastProvider=p1,he.Tooltip=LD,he.useAutomation=IE,he.useDrawer=jE,he.useModal=NE,he.useScopedParams=Zc,he.useToast=Xf,Object.defineProperty(he,Symbol.toStringTag,{value:"Module"})});