@arkyn/components 3.0.1-beta.42 → 3.0.1-beta.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bundle.js CHANGED
@@ -3723,38 +3723,48 @@ function Ds(e) {
3723
3723
  }
3724
3724
  const $s = gn((e, t) => /* @__PURE__ */ f("input", { ref: t, ...e })), Ls = gn(
3725
3725
  (e, t) => {
3726
- const { onFocus: n, onBlur: r, size: a, onChange: s, value: o, currentCountry: i, disabled: c } = e, [l, u] = F(!1);
3726
+ const {
3727
+ onFocus: n,
3728
+ readonly: r,
3729
+ onBlur: a,
3730
+ size: s,
3731
+ onChange: o,
3732
+ value: i,
3733
+ currentCountry: c,
3734
+ disabled: l
3735
+ } = e, [u, d] = F(!1);
3727
3736
  Ce(() => {
3728
- l ? s(i.mask) : u(!0);
3729
- }, [i]);
3730
- const d = `phoneInputMask ${a}`;
3731
- function _(h) {
3732
- let m = bn(h.target.value);
3733
- const g = jr(m);
3734
- m.length > Br || (m = Lr(m, xn[g]), h.target.value = m, s(m));
3737
+ u ? o(c.mask) : d(!0);
3738
+ }, [c]);
3739
+ const _ = `phoneInputMask ${s}`;
3740
+ function h(m) {
3741
+ let g = bn(m.target.value);
3742
+ const y = jr(g);
3743
+ g.length > Br || (g = Lr(g, xn[y]), m.target.value = g, o(g));
3735
3744
  }
3736
- return i.code === "+55" ? /* @__PURE__ */ f(
3745
+ return c.code === "+55" ? /* @__PURE__ */ f(
3737
3746
  "input",
3738
3747
  {
3739
- value: o,
3740
- onChange: _,
3741
- className: d,
3748
+ value: i,
3749
+ onChange: h,
3750
+ className: _,
3742
3751
  onFocus: n,
3743
- onBlur: r,
3744
- disabled: c,
3752
+ onBlur: a,
3753
+ disabled: l,
3745
3754
  ref: t
3746
3755
  }
3747
3756
  ) : /* @__PURE__ */ f(
3748
3757
  Ar,
3749
3758
  {
3750
- value: o,
3751
- onChange: (h) => s(h.target.value),
3752
- className: d,
3759
+ value: i,
3760
+ readOnly: r,
3761
+ onChange: (m) => o(m.target.value),
3762
+ className: _,
3753
3763
  component: $s,
3754
3764
  onFocus: n,
3755
- onBlur: r,
3756
- disabled: c,
3757
- mask: i.mask,
3765
+ onBlur: a,
3766
+ disabled: l,
3767
+ mask: c.mask,
3758
3768
  showMask: !0,
3759
3769
  replacement: { _: /\d/ },
3760
3770
  ref: t
@@ -3837,7 +3847,7 @@ function jc(e) {
3837
3847
  /* @__PURE__ */ k(
3838
3848
  Ms,
3839
3849
  {
3840
- isOpen: I ? !1 : L,
3850
+ isOpen: I || i ? !1 : L,
3841
3851
  search: w,
3842
3852
  placeholder: m,
3843
3853
  onSearch: G,
@@ -3861,7 +3871,7 @@ function jc(e) {
3861
3871
  /* @__PURE__ */ f(
3862
3872
  Is,
3863
3873
  {
3864
- isOpen: I ? !1 : L,
3874
+ isOpen: I || i ? !1 : L,
3865
3875
  onClick: te
3866
3876
  }
3867
3877
  ),
@@ -3869,15 +3879,16 @@ function jc(e) {
3869
3879
  Ls,
3870
3880
  {
3871
3881
  ref: Z,
3882
+ readonly: i,
3872
3883
  currentCountry: b,
3873
3884
  value: z,
3874
- onChange: ($) => {
3875
- A($), h && h(ae($));
3876
- },
3877
3885
  disabled: I,
3878
3886
  onBlur: ve,
3879
3887
  onFocus: J,
3880
- size: c
3888
+ size: c,
3889
+ onChange: ($) => {
3890
+ A($), h && h(ae($));
3891
+ }
3881
3892
  }
3882
3893
  ),
3883
3894
  /* @__PURE__ */ f(
@@ -1,4 +1,4 @@
1
- (function(C,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("react/jsx-runtime"),require("react"),require("lucide-react"),require("framer-motion"),require("@react-input/mask")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","lucide-react","framer-motion","@react-input/mask"],c):(C=typeof globalThis<"u"?globalThis:C||self,c(C["@arkyn/components"]={},C.jsxRuntime,C.b,C.lucideReact,C.framerMotion,C.mask))})(this,function(C,c,m,B,Le,Tn){"use strict";function va(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const te=va(m);function On(e){const{className:t,...n}=e,r=`arkynAlertTitle ${t}`;return c.jsx("div",{className:r.trim(),...n})}const Pn=m.createContext({});function ka(){return m.useContext(Pn)}function Ca(e){const{schema:t,children:n,className:r,...a}=e,i=!(u=>{let f=!1;const d=_=>{Array.isArray(_)?_.forEach(d):_&&typeof _=="object"&&"type"in _&&(_.type===On?f=!0:_.props&&typeof _.props=="object"&&_.props!==null&&"children"in _.props&&d(_.props.children))};return d(u),f})(n)?"nonExistsAlertTitle":"existsAlertTitle",l=`arkynAlertContainer ${t} ${i} ${r}`;return c.jsx(Pn.Provider,{value:e,children:c.jsx("div",{className:l.trim(),...a,children:n})})}function ba(e){const{className:t,...n}=e,r=`arkynAlertContent ${t}`;return c.jsx("div",{className:r.trim(),...n})}function xa(e){const{className:t,...n}=e,r=`arkynAlertDescription ${t}`;return c.jsx("div",{className:r.trim(),...n})}function Ea(e){const{className:t,...n}=e,{schema:r}=ka(),a=`arkynAlertIcon ${r} ${t}`;switch(r){case"success":return c.jsx(B.CheckCircle2,{className:a,...n});case"danger":return c.jsx(B.XCircle,{className:a,...n});case"warning":return c.jsx(B.AlertTriangle,{className:a,...n});case"info":return c.jsx(B.Info,{className:a,...n})}}function An(e){function t(){return!e||e<=0?0:e>=100?100:e}const[n,r]=m.useState(t());function a(s){return s<=0?r(0):s>=100?r(100):r(s)}return[n,a]}function In(e){const{onChange:t,value:n,disabled:r=!1,onDragging:a,className:s="",...o}=e,[i,l]=m.useState(!1),u=m.useRef(null),f=()=>l(!0),d=()=>l(!1),_=b=>{if(r||!i||!u.current)return;const w=u.current.getBoundingClientRect(),k=b.clientX-w.left,S=Math.min(Math.max(k/w.width*100,0),100);t(S)},p=b=>{if(r||!u.current)return;const w=u.current.getBoundingClientRect(),k=b.clientX-w.left,S=Math.min(Math.max(k/w.width*100,0),100);t(S)};m.useEffect(()=>(i?(a&&a(!0),document.addEventListener("mousemove",_),document.addEventListener("mouseup",d)):(a&&a(!1),document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",d)),()=>{document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",d)}),[i]);const v=`arkynSliderTrack ${i?"isDragging":"isNotDragging"} ${r?"isDisabled":"isEnabled"} ${s}`;return c.jsxs("div",{...o,className:v,onMouseDown:f,onClick:p,ref:u,children:[c.jsx("div",{className:"arkynSliderFill",style:{width:`${n}%`}}),c.jsx("div",{className:"arkynSliderThumb",style:{left:`${n}%`}})]})}function Mn(e){var j,O,G,A;const{onPlayAudio:t,onPauseAudio:n,disabled:r,...a}=e,[s,o]=An(0),[i,l]=m.useState(!1),[u,f]=m.useState(!1),d=m.useRef(null),_=(j=d.current)==null?void 0:j.currentTime,p=(O=d.current)==null?void 0:O.duration,g=b(_),h=b(p),v={totalTime:p,currentTime:_,formattedCurrentTime:g,formattedTotalTime:h};function b(x){if(!x)return"00:00";const P=Math.floor(x/60),D=Math.floor(x%60),F=String(P).padStart(2,"0"),H=String(D).padStart(2,"0");return`${F}:${H}`}function w(){const x=d.current;x&&(e.onPlayAudio&&e.onPlayAudio(v),x.play(),l(!0))}function k(){const x=d.current;x&&(e.onPauseAudio&&e.onPauseAudio(v),x.pause(),l(!1))}function S(){i?k():w()}function V(x){const P=d.current;if(!P)return;const D=P.duration,F=x/100*D;P.currentTime=F}return u||!i?(G=d.current)==null||G.pause():i&&((A=d.current)==null||A.play()),m.useEffect(()=>{const x=d.current;if(!x)return;const P=()=>{const D=x.duration,H=x.currentTime/D*100;o(H)};return x.addEventListener("timeupdate",P),()=>{x.removeEventListener("timeupdate",P)}},[]),c.jsxs("div",{className:"arkynAudioPlayer",children:[c.jsx("audio",{...a,ref:d,src:e.src,onEnded:k}),c.jsxs("button",{type:"button",disabled:r,onClick:S,children:[i&&c.jsx(B.Pause,{}),!i&&c.jsx(B.Play,{})]}),c.jsx("p",{children:g}),c.jsx(In,{value:s,onChange:V,onDragging:f,disabled:r}),c.jsx("p",{children:h})]})}const Dn=m.createContext({});function wa(e){const{children:t,fieldErrors:n,form:r}=e;return c.jsxs(Dn.Provider,{value:{fieldErrors:n},children:[!r&&t,r&&m.cloneElement(r,r.props,t)]})}function ye(){return m.useContext(Dn)}function ke(e){const{children:t,className:n,...r}=e,a=`arkynFieldError ${n}`;return t?c.jsx("strong",{className:a.trim(),...r,children:t}):c.jsx(c.Fragment,{})}function fe(e){const{showAsterisk:t=!1,className:n="",...r}=e,s=`arkynFieldLabel ${t?"asteriskTrue":"asteriskFalse"} ${n}`;return c.jsx("label",{className:s.trim(),...r})}function me(e){const{children:t,className:n,...r}=e,a=`arkynFieldWrapper ${n}`;return c.jsx("section",{className:a.trim(),...r,children:t})}function X(e){const{iconSize:t,icon:n,className:r,show:a=!0}=e;return a?n?typeof n=="string"?c.jsx("p",{className:r,children:n}):c.jsx("p",{className:r,children:c.jsx(n,{size:t,strokeWidth:2.5})}):c.jsx(c.Fragment,{}):c.jsx(c.Fragment,{})}function $e(e){const{isLoading:t=!1,scheme:n="primary",variant:r="solid",loadingText:a,size:s="md",leftIcon:o,rightIcon:i,disabled:l,className:u="",children:f,...d}=e,p={xs:12,sm:16,md:20,lg:24}[s],v=`arkynButton ${t?"loadingTrue":"loadingFalse"} ${r} ${n} ${s} ${a?"loadingTextTrue":"loadingTextFalse"} ${u}`;return c.jsxs("button",{className:v,disabled:l||t,...d,children:[c.jsxs("div",{className:"arkynButtonSpinner",children:[c.jsx(B.Loader2,{size:p,strokeWidth:2.5}),a&&a]}),c.jsxs("div",{className:"arkynButtonContent",children:[c.jsx(X,{iconSize:p,icon:o}),f,c.jsx(X,{iconSize:p,icon:i})]})]})}function dt(e){const{className:t,orientation:n="horizontal",...r}=e,a=`arkynDivider ${n} ${t}`;return c.jsx("div",{className:a.trim(),...r})}function _t(e){const{isLoading:t=!1,scheme:n="primary",variant:r="solid",size:a="md",icon:s,disabled:o,className:i="",...l}=e,u={xs:12,sm:16,md:20,lg:24},d=`arkynIconButton ${r} ${n} ${a} ${t?"loadingTrue":"loadingFalse"} ${i}`;return c.jsxs("button",{disabled:o||t,className:d.trim(),...l,children:[c.jsx("div",{className:"arkynIconButtonSpinner",children:c.jsx(B.Loader2,{size:u[a],strokeWidth:2.5})}),c.jsx("div",{className:"arkynIconButtonContent",children:c.jsx(s,{size:u[a],strokeWidth:2.5})})]})}function gt(e){const{text:t,size:n="lg",children:r,orientation:a="top",className:s="",...o}=e,i=m.useId(),l=m.useRef(null),[u,f]=m.useState(a);m.useEffect(()=>{const _=()=>{if(!l.current)return;const h=document.getElementById(i);h&&(f(a),requestAnimationFrame(()=>{const v=h.getBoundingClientRect(),b=window.innerWidth,w=window.innerHeight;let k=a;a==="left"&&v.left<0?k="right":a==="right"&&v.right>b?k="left":a==="top"&&v.top<0?k="bottom":a==="bottom"&&v.bottom>w&&(k="top"),k==="right"&&v.right>b?k="left":k==="left"&&v.left<0?k="right":k==="bottom"&&v.bottom>w?k="top":k==="top"&&v.top<0&&(k="bottom"),f(k)}))},p=l.current;if(!p)return;const g=()=>{setTimeout(_,1)};return p.addEventListener("mouseenter",g),window.addEventListener("resize",_),()=>{p.removeEventListener("mouseenter",g),window.removeEventListener("resize",_)}},[a,i]);const d=`arkynTooltip ${n} ${u} ${s}`;return c.jsxs("div",{className:d.trim(),...o,ref:l,children:[r,c.jsx("div",{className:"arkynTooltipText",id:i,dangerouslySetInnerHTML:{__html:t}})]})}function Sa(e){const{filePath:t,disabled:n,acceptAudio:r,handleSelectFile:a,isLoading:s,reSendAudio:o,changeAudioButtonText:i}=e;function l(){if(n)return;const u=document.createElement("input");u.type="file",u.accept=r,u.onchange=f=>{var _;const d=(_=f.target.files)==null?void 0:_[0];d&&a(d)},u.click()}return c.jsxs("div",{className:"arkynAudioUploadHasFileContentContainer",children:[c.jsx(Mn,{src:t}),c.jsx(dt,{}),c.jsxs("div",{className:"arkynAudioUploadButtonsContainer",children:[!!o&&c.jsx(gt,{orientation:"bottom",text:"Reenviar áudio",children:c.jsx(_t,{type:"button","aria-label":"resend image",variant:"outline",scheme:"danger",size:"sm",isLoading:s,onClick:o,icon:B.RefreshCw,disabled:n})}),c.jsx($e,{isLoading:s,onClick:l,variant:"outline",size:"sm",type:"button",disabled:n,children:i})]})]})}function Na(e){const{dropAudioText:t,isLoading:n,acceptAudio:r,handleSelectFile:a,selectAudioButtonText:s,disabled:o}=e;function i(u){if(o)return;u.preventDefault();const f=u.dataTransfer.files[0];f&&a(f)}function l(){if(o)return;const u=document.createElement("input");u.type="file",u.accept=r,u.onchange=f=>{var _;const d=(_=f.target.files)==null?void 0:_[0];d&&a(d)},u.click()}return c.jsxs("div",{onDrop:i,className:"arkynAudioUploadNoFileContent",children:[c.jsx($e,{isLoading:n,onClick:l,variant:"ghost",size:"sm",type:"button",disabled:o,children:s}),c.jsx("p",{children:t})]})}function Fa(e){const{name:t,label:n,fileName:r="file",method:a="POST",onChange:s,fileResponseName:o="url",selectAudioButtonText:i="Selecionar arquivo de áudio",dropAudioText:l="Ou arraste e solte um arquivo de áudio aqui",changeAudioButtonText:u="Trocar arquivo de áudio",acceptAudio:f="audio/*",action:d,defaultValue:_="",showAsterisk:p=!1,disabled:g=!1}=e,{fieldErrors:h}=ye(),v=h==null?void 0:h[t],[b,w]=m.useState(_),[k,S]=m.useState(""),[V,j]=m.useState(null),[O,G]=m.useState(_),[A,x]=m.useState(!1);async function P(M){if(g)return;x(!0),j(M),S("");const Q=new FormData;Q.append(r,M),await fetch(d,{method:a,body:Q}).then(async E=>await E.json()).then(E=>{E!=null&&E.error?S(E.error):w(E==null?void 0:E[o]),s&&s(E==null?void 0:E[o])}).catch(E=>{console.error(E),S("Erro ao enviar audio")}).finally(()=>x(!1))}function D(M){if(!g){if(M.type.indexOf("audio")===-1){S("O arquivo selecionado não é um arquivo de áudio");return}G(URL.createObjectURL(M)),P(M)}}const F=v||k,z=`arkynAudioUpload ${F?"hasError":"noHasError"} ${O?"hasAudio":"noHasAudio"}`;return c.jsxs(me,{children:[n&&c.jsx(fe,{showAsterisk:p,children:n}),c.jsxs("div",{className:z,children:[c.jsx("input",{type:"hidden",name:t,value:b||""}),!O&&c.jsx(Na,{disabled:g,isLoading:A,acceptAudio:f,dropAudioText:l,handleSelectFile:D,selectAudioButtonText:i}),O&&c.jsx(Sa,{filePath:O,acceptAudio:f,changeAudioButtonText:u,disabled:g,handleSelectFile:D,isLoading:A,reSendAudio:F&&V?()=>P(V):void 0})]}),F&&c.jsx(ke,{children:F})]})}function Ta(e){const{variant:t="ghost",scheme:n="primary",size:r="lg",leftIcon:a,rightIcon:s,className:o="",children:i,...l}=e,f={md:12,lg:14}[r],d=`arkynBadge ${t} ${n} ${r} ${o}`;return c.jsxs("div",{className:d.trim(),...l,children:[c.jsx(X,{iconSize:f,icon:a}),c.jsx("p",{children:i}),c.jsx(X,{iconSize:f,icon:s})]})}const Ln=m.createContext({});function Oa(){return m.useContext(Ln)}function Pa(e){return c.jsx(Ln.Provider,{value:e,children:e.children})}function Aa(e){const{children:t,disabled:n=!1,className:r="",onClick:a,value:s,...o}=e,{disabled:i,currentTab:l,changeCurrentTab:u}=Oa(),f=i||n,p=`arkynCardTabButton ${f?"isDisabled":""} ${l===s&&s?"isActive":""} ${r}`;function g(h){u(s),a&&a(h)}return c.jsx("button",{onClick:g,className:p.trim(),...o,disabled:f,type:"button",children:t})}function Ia(e){const{children:t,onChange:n,defaultValue:r,disabled:a=!1,className:s,...o}=e,[i,l]=m.useState(r||""),u=`arkynCardTabContainer ${s||""}`;function f(d){l(d),n&&n(d)}return c.jsx(Pa,{disabled:a,currentTab:i,changeCurrentTab:f,children:c.jsx("nav",{className:u.trim(),...o,children:t})})}function Ma(e){const{id:t,name:n,className:r="",size:a="md",errorMessage:s,defaultChecked:o=!1,label:i,checked:l=null,onCheck:u,value:f,...d}=e,{fieldErrors:_}=ye(),p=m.useRef(null),g=t||m.useId(),h=s||(_==null?void 0:_[n]),v=!!h,[b,w]=m.useState(o||!1),k=typeof l=="boolean"?l:b,j=`arkynCheckbox ${a} ${v?"errorTrue":"errorFalse"} ${k?"checkedTrue":"checkedFalse"} ${r}`;function O(){const G=b;w(!G),u&&u(G?"":f||"checked")}return c.jsxs(me,{children:[i&&c.jsx(fe,{children:i}),c.jsxs("button",{id:g,type:"button",className:j,onClick:O,...d,children:[c.jsx("input",{type:"hidden",name:n,ref:p,value:k?f||"checked":""}),c.jsx(B.Check,{})]}),h&&c.jsx(ke,{children:h})]})}function Da(){return()=>{}}function $n(){return m.useSyncExternalStore(Da,()=>!0,()=>!1)}function La(e){const{children:t,fallback:n=null}=e;return $n()?c.jsx(c.Fragment,{children:t()}):c.jsx(c.Fragment,{children:n})}const Gt=e=>e.replace(/[^0-9]/g,""),Re=[{name:"Afghanistan",code:"+93",prefix:null,iso:"AF",flag:"https://cdn.kcak11.com/CountryFlags/countries/af.svg",mask:"__-___-____"},{name:"Aland Islands",code:"+358",prefix:null,iso:"AX",flag:"https://cdn.kcak11.com/CountryFlags/countries/ax.svg",mask:"(___) ___-__-__"},{name:"Albania",code:"+355",prefix:null,iso:"AL",flag:"https://cdn.kcak11.com/CountryFlags/countries/al.svg",mask:"(___) ___-___"},{name:"Algeria",code:"+213",prefix:null,iso:"DZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/dz.svg",mask:"__-___-____"},{name:"American Samoa",code:"+1",prefix:"684",iso:"AS",flag:"https://cdn.kcak11.com/CountryFlags/countries/as.svg",mask:"(684) ___-____"},{name:"Andorra",code:"+376",prefix:null,iso:"AD",flag:"https://cdn.kcak11.com/CountryFlags/countries/ad.svg",mask:"___-___"},{name:"Angola",code:"+244",prefix:null,iso:"AO",flag:"https://cdn.kcak11.com/CountryFlags/countries/ao.svg",mask:"(___) ___-___"},{name:"Anguilla",code:"+1",prefix:"264",iso:"AI",flag:"https://cdn.kcak11.com/CountryFlags/countries/ai.svg",mask:"(264) ___-____"},{name:"Antarctica",code:"+672",prefix:"1",iso:"AQ",flag:"https://cdn.kcak11.com/CountryFlags/countries/aq.svg",mask:"1__-___"},{name:"Antigua and Barbuda",code:"+1",prefix:"268",iso:"AG",flag:"https://cdn.kcak11.com/CountryFlags/countries/ag.svg",mask:"(268) ___-____"},{name:"Argentina",code:"+54",prefix:null,iso:"AR",flag:"https://cdn.kcak11.com/CountryFlags/countries/ar.svg",mask:"(___) ___-____"},{name:"Armenia",code:"+374",prefix:null,iso:"AM",flag:"https://cdn.kcak11.com/CountryFlags/countries/am.svg",mask:"__-___-___"},{name:"Aruba",code:"+297",prefix:null,iso:"AW",flag:"https://cdn.kcak11.com/CountryFlags/countries/aw.svg",mask:"___-____"},{name:"Ascension Island",code:"+247",prefix:null,iso:"AC",flag:"https://cdn.kcak11.com/CountryFlags/countries/sh.svg",mask:"____"},{name:"Australia",code:"+61",prefix:null,iso:"AU",flag:"https://cdn.kcak11.com/CountryFlags/countries/au.svg",mask:"_-____-____"},{name:"Austria",code:"+43",prefix:null,iso:"AT",flag:"https://cdn.kcak11.com/CountryFlags/countries/at.svg",mask:"(___) ___-____"},{name:"Azerbaijan",code:"+994",prefix:null,iso:"AZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/az.svg",mask:"__-___-__-__"},{name:"Bahamas",code:"+1",prefix:"242",iso:"BS",flag:"https://cdn.kcak11.com/CountryFlags/countries/bs.svg",mask:"(242) ___-____"},{name:"Bahrain",code:"+973",prefix:null,iso:"BH",flag:"https://cdn.kcak11.com/CountryFlags/countries/bh.svg",mask:"____-____"},{name:"Bangladesh",code:"+880",prefix:"1",iso:"BD",flag:"https://cdn.kcak11.com/CountryFlags/countries/bd.svg",mask:"1___-______"},{name:"Barbados",code:"+1",prefix:"246",iso:"BB",flag:"https://cdn.kcak11.com/CountryFlags/countries/bb.svg",mask:"(246) ___-____"},{name:"Belarus",code:"+375",prefix:null,iso:"BY",flag:"https://cdn.kcak11.com/CountryFlags/countries/by.svg",mask:"(__) ___-__-__"},{name:"Belgium",code:"+32",prefix:null,iso:"BE",flag:"https://cdn.kcak11.com/CountryFlags/countries/be.svg",mask:"(___) ___-___"},{name:"Belize",code:"+501",prefix:null,iso:"BZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/bz.svg",mask:"___-____"},{name:"Benin",code:"+229",prefix:null,iso:"BJ",flag:"https://cdn.kcak11.com/CountryFlags/countries/bj.svg",mask:"__-__-____"},{name:"Bermuda",code:"+1",prefix:"441",iso:"BM",flag:"https://cdn.kcak11.com/CountryFlags/countries/bm.svg",mask:"(441) ___-____"},{name:"Bhutan",code:"+975",prefix:null,iso:"BT",flag:"https://cdn.kcak11.com/CountryFlags/countries/bt.svg",mask:"_-___-___"},{name:"Bolivia",code:"+591",prefix:null,iso:"BO",flag:"https://cdn.kcak11.com/CountryFlags/countries/bo.svg",mask:"_-___-____"},{name:"Bosnia and Herzegovina",code:"+387",prefix:null,iso:"BA",flag:"https://cdn.kcak11.com/CountryFlags/countries/ba.svg",mask:"__-_____"},{name:"Botswana",code:"+267",prefix:null,iso:"BW",flag:"https://cdn.kcak11.com/CountryFlags/countries/bw.svg",mask:"__-___-___"},{name:"Brasil",code:"+55",prefix:null,iso:"BR",flag:"https://cdn.kcak11.com/CountryFlags/countries/br.svg",mask:"(__) _____-____"},{name:"British Indian Ocean Territory",code:"+246",prefix:null,iso:"IO",flag:"https://cdn.kcak11.com/CountryFlags/countries/io.svg",mask:"___-____"},{name:"Brunei Darussalam",code:"+673",prefix:null,iso:"BN",flag:"https://cdn.kcak11.com/CountryFlags/countries/bn.svg",mask:"___-____"},{name:"Bulgaria",code:"+359",prefix:null,iso:"BG",flag:"https://cdn.kcak11.com/CountryFlags/countries/bg.svg",mask:"(___) ___-___"},{name:"Burkina Faso",code:"+226",prefix:null,iso:"BF",flag:"https://cdn.kcak11.com/CountryFlags/countries/bf.svg",mask:"__-__-____"},{name:"Burundi",code:"+257",prefix:null,iso:"BI",flag:"https://cdn.kcak11.com/CountryFlags/countries/bi.svg",mask:"__-__-____"},{name:"Cambodia",code:"+855",prefix:null,iso:"KH",flag:"https://cdn.kcak11.com/CountryFlags/countries/kh.svg",mask:"__-___-___"},{name:"Cameroon",code:"+237",prefix:null,iso:"CM",flag:"https://cdn.kcak11.com/CountryFlags/countries/cm.svg",mask:"____-____"},{name:"Canada",code:"+1",prefix:null,iso:"CA",flag:"https://cdn.kcak11.com/CountryFlags/countries/ca.svg",mask:"(___) ___-____"},{name:"Cape Verde",code:"+238",prefix:null,iso:"CV",flag:"https://cdn.kcak11.com/CountryFlags/countries/cv.svg",mask:"(___) __-__"},{name:"Cayman Islands",code:"+1",prefix:"345",iso:"KY",flag:"https://cdn.kcak11.com/CountryFlags/countries/ky.svg",mask:"(345) ___-____"},{name:"Central African Republic",code:"+236",prefix:null,iso:"CF",flag:"https://cdn.kcak11.com/CountryFlags/countries/cf.svg",mask:"__-__-____"},{name:"Chad",code:"+235",prefix:null,iso:"TD",flag:"https://cdn.kcak11.com/CountryFlags/countries/td.svg",mask:"__-__-__-__"},{name:"Chile",code:"+56",prefix:null,iso:"CL",flag:"https://cdn.kcak11.com/CountryFlags/countries/cl.svg",mask:"_-____-____"},{name:"China",code:"+86",prefix:null,iso:"CN",flag:"https://cdn.kcak11.com/CountryFlags/countries/cn.svg",mask:"__-_____-_____"},{name:"Christmas Island",code:"+61",prefix:null,iso:"CX",flag:"https://cdn.kcak11.com/CountryFlags/countries/cx.svg",mask:"_-____-____"},{name:"Cocos (Keeling) Islands",code:"+61",prefix:null,iso:"CC",flag:"https://cdn.kcak11.com/CountryFlags/countries/cc.svg",mask:"_-____-____"},{name:"Colombia",code:"+57",prefix:null,iso:"CO",flag:"https://cdn.kcak11.com/CountryFlags/countries/co.svg",mask:"(___) ___-____"},{name:"Comoros",code:"+269",prefix:null,iso:"KM",flag:"https://cdn.kcak11.com/CountryFlags/countries/km.svg",mask:"__-_____"},{name:"Congo",code:"+242",prefix:null,iso:"CG",flag:"https://cdn.kcak11.com/CountryFlags/countries/cg.svg",mask:"__-_____"},{name:"Cook Islands",code:"+682",prefix:null,iso:"CK",flag:"https://cdn.kcak11.com/CountryFlags/countries/ck.svg",mask:"__-___"},{name:"Costa Rica",code:"+506",prefix:null,iso:"CR",flag:"https://cdn.kcak11.com/CountryFlags/countries/cr.svg",mask:"____-____"},{name:"Croatia",code:"+385",prefix:null,iso:"HR",flag:"https://cdn.kcak11.com/CountryFlags/countries/hr.svg",mask:"__-___-___"},{name:"Cuba",code:"+53",prefix:null,iso:"CU",flag:"https://cdn.kcak11.com/CountryFlags/countries/cu.svg",mask:"_-___-____"},{name:"Cyprus",code:"+357",prefix:null,iso:"CY",flag:"https://cdn.kcak11.com/CountryFlags/countries/cy.svg",mask:"__-___-___"},{name:"Czech Republic",code:"+420",prefix:null,iso:"CZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/cz.svg",mask:"(___) ___-___"},{name:"Democratic Republic of the Congo",code:"+243",prefix:null,iso:"CD",flag:"https://cdn.kcak11.com/CountryFlags/countries/cd.svg",mask:"(___) ___-___"},{name:"Denmark",code:"+45",prefix:null,iso:"DK",flag:"https://cdn.kcak11.com/CountryFlags/countries/dk.svg",mask:"__-__-__-__"},{name:"Djibouti",code:"+253",prefix:null,iso:"DJ",flag:"https://cdn.kcak11.com/CountryFlags/countries/dj.svg",mask:"__-__-__-__"},{name:"Dominica",code:"+1",prefix:"767",iso:"DM",flag:"https://cdn.kcak11.com/CountryFlags/countries/dm.svg",mask:"(767) ___-____"},{name:"Dominican Republic",code:"+1",prefix:"849",iso:"DO",flag:"https://cdn.kcak11.com/CountryFlags/countries/do.svg",mask:"(894) ___-____"},{name:"Ecuador",code:"+593",prefix:null,iso:"EC",flag:"https://cdn.kcak11.com/CountryFlags/countries/ec.svg",mask:"__-___-____"},{name:"Egypt",code:"+20",prefix:null,iso:"EG",flag:"https://cdn.kcak11.com/CountryFlags/countries/eg.svg",mask:"(___) ___-____"},{name:"El Salvador",code:"+503",prefix:null,iso:"SV",flag:"https://cdn.kcak11.com/CountryFlags/countries/sv.svg",mask:"__-__-____"},{name:"Equatorial Guinea",code:"+240",prefix:null,iso:"GQ",flag:"https://cdn.kcak11.com/CountryFlags/countries/gq.svg",mask:"__-___-____"},{name:"Eritrea",code:"+291",prefix:null,iso:"ER",flag:"https://cdn.kcak11.com/CountryFlags/countries/er.svg",mask:"_-___-___"},{name:"Estonia",code:"+372",prefix:null,iso:"EE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ee.svg",mask:"____-____"},{name:"Eswatini",code:"+268",prefix:null,iso:"SZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/sz.svg",mask:"__-__-____"},{name:"Ethiopia",code:"+251",prefix:null,iso:"ET",flag:"https://cdn.kcak11.com/CountryFlags/countries/et.svg",mask:"__-___-____"},{name:"Falkland Islands (Malvinas)",code:"+500",prefix:null,iso:"FK",flag:"https://cdn.kcak11.com/CountryFlags/countries/fk.svg",mask:"_____"},{name:"Faroe Islands",code:"+298",prefix:null,iso:"FO",flag:"https://cdn.kcak11.com/CountryFlags/countries/fo.svg",mask:"__ __ __"},{name:"Fiji",code:"+679",prefix:null,iso:"FJ",flag:"https://cdn.kcak11.com/CountryFlags/countries/fj.svg",mask:"__-_____"},{name:"Finland",code:"+358",prefix:null,iso:"FI",flag:"https://cdn.kcak11.com/CountryFlags/countries/fi.svg",mask:"__ ___ ____"},{name:"France",code:"+33",prefix:null,iso:"FR",flag:"https://cdn.kcak11.com/CountryFlags/countries/fr.svg",mask:"_ __ __ __ __"},{name:"French Guiana",code:"+594",prefix:null,iso:"GF",flag:"https://cdn.kcak11.com/CountryFlags/countries/gf.svg",mask:"___ __ __ __"},{name:"French Polynesia",code:"+689",prefix:null,iso:"PF",flag:"https://cdn.kcak11.com/CountryFlags/countries/pf.svg",mask:"__ __ __ __"},{name:"Gabon",code:"+241",prefix:null,iso:"GA",flag:"https://cdn.kcak11.com/CountryFlags/countries/ga.svg",mask:"_ __ __ __"},{name:"Gambia",code:"+220",prefix:null,iso:"GM",flag:"https://cdn.kcak11.com/CountryFlags/countries/gm.svg",mask:"___ ____"},{name:"Georgia",code:"+995",prefix:null,iso:"GE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ge.svg",mask:"(___) ___-___"},{name:"Germany",code:"+49",prefix:"3",iso:"DE",flag:"https://cdn.kcak11.com/CountryFlags/countries/de.svg",mask:"(3____) __-____"},{name:"Ghana",code:"+233",prefix:"03",iso:"GH",flag:"https://cdn.kcak11.com/CountryFlags/countries/gh.svg",mask:"03_ ___ ____"},{name:"Gibraltar",code:"+350",prefix:null,iso:"GI",flag:"https://cdn.kcak11.com/CountryFlags/countries/gi.svg",mask:"___-_____"},{name:"Greece",code:"+30",prefix:null,iso:"GR",flag:"https://cdn.kcak11.com/CountryFlags/countries/gr.svg",mask:"(___) ___-____"},{name:"Greenland",code:"+299",prefix:null,iso:"GL",flag:"https://cdn.kcak11.com/CountryFlags/countries/gl.svg",mask:"__-__-__"},{name:"Grenada",code:"+1",prefix:"473",iso:"GD",flag:"https://cdn.kcak11.com/CountryFlags/countries/gd.svg",mask:"(473) ___-____"},{name:"Guadeloupe",code:"+590",prefix:null,iso:"GP",flag:"https://cdn.kcak11.com/CountryFlags/countries/gp.svg",mask:"___ __ __ __"},{name:"Guam",code:"+1",prefix:"671",iso:"GU",flag:"https://cdn.kcak11.com/CountryFlags/countries/gu.svg",mask:"671 ___ ____"},{name:"Guatemala",code:"+502",prefix:null,iso:"GT",flag:"https://cdn.kcak11.com/CountryFlags/countries/gt.svg",mask:"_-___-____"},{name:"Guernsey",code:"+44",prefix:null,iso:"GG",flag:"https://cdn.kcak11.com/CountryFlags/countries/gg.svg",mask:"(____) ______"},{name:"Guinea",code:"+224",prefix:null,iso:"GN",flag:"https://cdn.kcak11.com/CountryFlags/countries/gn.svg",mask:"__-___-___"},{name:"Guinea-Bissau",code:"+245",prefix:null,iso:"GW",flag:"https://cdn.kcak11.com/CountryFlags/countries/gw.svg",mask:"_-______"},{name:"Guyana",code:"+592",prefix:null,iso:"GY",flag:"https://cdn.kcak11.com/CountryFlags/countries/gy.svg",mask:"___-____"},{name:"Haiti",code:"+509",prefix:null,iso:"HT",flag:"https://cdn.kcak11.com/CountryFlags/countries/ht.svg",mask:"__-__-____"},{name:"Holy See (Vatican City State)",code:"+39",prefix:"06698",iso:"VA",flag:"https://cdn.kcak11.com/CountryFlags/countries/va.svg",mask:"06 698_____"},{name:"Honduras",code:"+504",prefix:null,iso:"HN",flag:"https://cdn.kcak11.com/CountryFlags/countries/hn.svg",mask:"____-____"},{name:"Hong Kong",code:"+852",prefix:null,iso:"HK",flag:"https://cdn.kcak11.com/CountryFlags/countries/hk.svg",mask:"____-____"},{name:"Hungary",code:"+36",prefix:null,iso:"HU",flag:"https://cdn.kcak11.com/CountryFlags/countries/hu.svg",mask:"__ ___ ____"},{name:"Iceland",code:"+354",prefix:null,iso:"IS",flag:"https://cdn.kcak11.com/CountryFlags/countries/is.svg",mask:"___-____"},{name:"India",code:"+91",prefix:null,iso:"IN",flag:"https://cdn.kcak11.com/CountryFlags/countries/in.svg",mask:"(____) ___-___"},{name:"Indonesia",code:"+62",prefix:"8",iso:"ID",flag:"https://cdn.kcak11.com/CountryFlags/countries/id.svg",mask:"(8__) ___-__-___"},{name:"Iran",code:"+98",prefix:null,iso:"IR",flag:"https://cdn.kcak11.com/CountryFlags/countries/ir.svg",mask:"(___) ___-____"},{name:"Iraq",code:"+964",prefix:null,iso:"IQ",flag:"https://cdn.kcak11.com/CountryFlags/countries/iq.svg",mask:"(___) ___-____"},{name:"Ireland",code:"+353",prefix:null,iso:"IE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ie.svg",mask:"(___) ___-___"},{name:"Isle of Man",code:"+44",prefix:null,iso:"IM",flag:"https://cdn.kcak11.com/CountryFlags/countries/im.svg",mask:"(____) ______"},{name:"Israel",code:"+972",prefix:"5",iso:"IL",flag:"https://cdn.kcak11.com/CountryFlags/countries/il.svg",mask:"__-___-____"},{name:"Italy",code:"+39",prefix:null,iso:"IT",flag:"https://cdn.kcak11.com/CountryFlags/countries/it.svg",mask:"(___) ____-___"},{name:"Ivory Coast / Cote d'Ivoire",code:"+225",prefix:null,iso:"CI",flag:"https://cdn.kcak11.com/CountryFlags/countries/ci.svg",mask:"__-___-___"},{name:"Jamaica",code:"+1",prefix:"876",iso:"JM",flag:"https://cdn.kcak11.com/CountryFlags/countries/jm.svg",mask:"(876) ___-____"},{name:"Japan",code:"+81",prefix:null,iso:"JP",flag:"https://cdn.kcak11.com/CountryFlags/countries/jp.svg",mask:"__-____-____"},{name:"Jersey",code:"+44",prefix:null,iso:"JE",flag:"https://cdn.kcak11.com/CountryFlags/countries/je.svg",mask:"(____) ____-______"},{name:"Jordan",code:"+962",prefix:null,iso:"JO",flag:"https://cdn.kcak11.com/CountryFlags/countries/jo.svg",mask:"_-____-____"},{name:"Kazakhstan",code:"+77",prefix:null,iso:"KZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/kz.svg",mask:"(_____) _ __ __"},{name:"Kenya",code:"+254",prefix:null,iso:"KE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ke.svg",mask:"___-______"},{name:"Kiribati",code:"+686",prefix:null,iso:"KI",flag:"https://cdn.kcak11.com/CountryFlags/countries/ki.svg",mask:"__-___"},{name:"Korea, Democratic People's Republic of Korea",code:"+850",prefix:null,iso:"KP",flag:"https://cdn.kcak11.com/CountryFlags/countries/kp.svg",mask:"____-_____________"},{name:"Korea, Republic of South Korea",code:"+82",prefix:null,iso:"KR",flag:"https://cdn.kcak11.com/CountryFlags/countries/kr.svg",mask:"__-___-____"},{name:"Kosovo",code:"+383",prefix:null,iso:"XK",flag:"https://cdn.kcak11.com/CountryFlags/countries/xk.svg",mask:"___-___-___"},{name:"Kuwait",code:"+965",prefix:null,iso:"KW",flag:"https://cdn.kcak11.com/CountryFlags/countries/kw.svg",mask:"____-____"},{name:"Kyrgyzstan",code:"+996",prefix:null,iso:"KG",flag:"https://cdn.kcak11.com/CountryFlags/countries/kg.svg",mask:"(___) ___-___"},{name:"Laos",code:"+856",prefix:"20",iso:"LA",flag:"https://cdn.kcak11.com/CountryFlags/countries/la.svg",mask:"(20__) ___-___"},{name:"Latvia",code:"+371",prefix:null,iso:"LV",flag:"https://cdn.kcak11.com/CountryFlags/countries/lv.svg",mask:"__-___-___"},{name:"Lebanon",code:"+961",prefix:null,iso:"LB",flag:"https://cdn.kcak11.com/CountryFlags/countries/lb.svg",mask:"__-___-___"},{name:"Lesotho",code:"+266",prefix:null,iso:"LS",flag:"https://cdn.kcak11.com/CountryFlags/countries/ls.svg",mask:"_-___-____"},{name:"Liberia",code:"+231",prefix:null,iso:"LR",flag:"https://cdn.kcak11.com/CountryFlags/countries/lr.svg",mask:"__-___-___"},{name:"Libya",code:"+218",prefix:"21",iso:"LY",flag:"https://cdn.kcak11.com/CountryFlags/countries/ly.svg",mask:"21-___-____"},{name:"Liechtenstein",code:"+423",prefix:null,iso:"LI",flag:"https://cdn.kcak11.com/CountryFlags/countries/li.svg",mask:"(___) ___-____"},{name:"Lithuania",code:"+370",prefix:null,iso:"LT",flag:"https://cdn.kcak11.com/CountryFlags/countries/lt.svg",mask:"(___) __-___"},{name:"Luxembourg",code:"+352",prefix:null,iso:"LU",flag:"https://cdn.kcak11.com/CountryFlags/countries/lu.svg",mask:"(___) ___-___"},{name:"Macau",code:"+853",prefix:null,iso:"MO",flag:"https://cdn.kcak11.com/CountryFlags/countries/mo.svg",mask:"____-____"},{name:"Madagascar",code:"+261",prefix:null,iso:"MG",flag:"https://cdn.kcak11.com/CountryFlags/countries/mg.svg",mask:"__-__-_____"},{name:"Malawi",code:"+265",prefix:null,iso:"MW",flag:"https://cdn.kcak11.com/CountryFlags/countries/mw.svg",mask:"_-____-____"},{name:"Malaysia",code:"+60",prefix:null,iso:"MY",flag:"https://cdn.kcak11.com/CountryFlags/countries/my.svg",mask:"__-___-____"},{name:"Maldives",code:"+960",prefix:null,iso:"MV",flag:"https://cdn.kcak11.com/CountryFlags/countries/mv.svg",mask:"___-____"},{name:"Mali",code:"+223",prefix:null,iso:"ML",flag:"https://cdn.kcak11.com/CountryFlags/countries/ml.svg",mask:"__-__-____"},{name:"Malta",code:"+356",prefix:null,iso:"MT",flag:"https://cdn.kcak11.com/CountryFlags/countries/mt.svg",mask:"____-____"},{name:"Marshall Islands",code:"+692",prefix:null,iso:"MH",flag:"https://cdn.kcak11.com/CountryFlags/countries/mh.svg",mask:"___-____"},{name:"Martinique",code:"+596",prefix:null,iso:"MQ",flag:"https://cdn.kcak11.com/CountryFlags/countries/mq.svg",mask:"(___) __-__-__"},{name:"Mauritania",code:"+222",prefix:null,iso:"MR",flag:"https://cdn.kcak11.com/CountryFlags/countries/mr.svg",mask:"__-__-____"},{name:"Mauritius",code:"+230",prefix:null,iso:"MU",flag:"https://cdn.kcak11.com/CountryFlags/countries/mu.svg",mask:"___-____"},{name:"Mayotte",code:"+262",prefix:null,iso:"YT",flag:"https://cdn.kcak11.com/CountryFlags/countries/yt.svg",mask:"_____-____"},{name:"Mexico",code:"+52",prefix:null,iso:"MX",flag:"https://cdn.kcak11.com/CountryFlags/countries/mx.svg",mask:"(___) ___-____"},{name:"Micronesia, Federated States of Micronesia",code:"+691",prefix:null,iso:"FM",flag:"https://cdn.kcak11.com/CountryFlags/countries/fm.svg",mask:"___-____"},{name:"Moldova",code:"+373",prefix:null,iso:"MD",flag:"https://cdn.kcak11.com/CountryFlags/countries/md.svg",mask:"____-____"},{name:"Monaco",code:"+377",prefix:null,iso:"MC",flag:"https://cdn.kcak11.com/CountryFlags/countries/mc.svg",mask:"(___) ___-___"},{name:"Mongolia",code:"+976",prefix:null,iso:"MN",flag:"https://cdn.kcak11.com/CountryFlags/countries/mn.svg",mask:"__-__-____"},{name:"Montenegro",code:"+382",prefix:null,iso:"ME",flag:"https://cdn.kcak11.com/CountryFlags/countries/me.svg",mask:"__-___-___"},{name:"Montserrat",code:"+1",prefix:"664",iso:"MS",flag:"https://cdn.kcak11.com/CountryFlags/countries/ms.svg",mask:"(664) ___-____"},{name:"Morocco",code:"+212",prefix:null,iso:"MA",flag:"https://cdn.kcak11.com/CountryFlags/countries/ma.svg",mask:"__-____-___"},{name:"Mozambique",code:"+258",prefix:null,iso:"MZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/mz.svg",mask:"__-___-___"},{name:"Myanmar",code:"+95",prefix:null,iso:"MM",flag:"https://cdn.kcak11.com/CountryFlags/countries/mm.svg",mask:"__-___-___"},{name:"Namibia",code:"+264",prefix:null,iso:"NA",flag:"https://cdn.kcak11.com/CountryFlags/countries/na.svg",mask:"__-___-____"},{name:"Nauru",code:"+674",prefix:null,iso:"NR",flag:"https://cdn.kcak11.com/CountryFlags/countries/nr.svg",mask:"___-____"},{name:"Nepal",code:"+977",prefix:null,iso:"NP",flag:"https://cdn.kcak11.com/CountryFlags/countries/np.svg",mask:"__-___-___"},{name:"Netherlands",code:"+31",prefix:null,iso:"NL",flag:"https://cdn.kcak11.com/CountryFlags/countries/nl.svg",mask:"__-___-____"},{name:"New Caledonia",code:"+687",prefix:null,iso:"NC",flag:"https://cdn.kcak11.com/CountryFlags/countries/nc.svg",mask:"__-____"},{name:"New Zealand",code:"+64",prefix:null,iso:"NZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/nz.svg",mask:"(___) ___-____"},{name:"Nicaragua",code:"+505",prefix:null,iso:"NI",flag:"https://cdn.kcak11.com/CountryFlags/countries/ni.svg",mask:"____-____"},{name:"Niger",code:"+227",prefix:null,iso:"NE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ne.svg",mask:"__-__-____"},{name:"Nigeria",code:"+234",prefix:null,iso:"NG",flag:"https://cdn.kcak11.com/CountryFlags/countries/ng.svg",mask:"(___) ___-____"},{name:"Niue",code:"+683",prefix:null,iso:"NU",flag:"https://cdn.kcak11.com/CountryFlags/countries/nu.svg",mask:"____"},{name:"Norfolk Island",code:"+672",prefix:"3",iso:"NF",flag:"https://cdn.kcak11.com/CountryFlags/countries/nf.svg",mask:"3__-___"},{name:"North Macedonia",code:"+389",prefix:null,iso:"MK",flag:"https://cdn.kcak11.com/CountryFlags/countries/mk.svg",mask:"__-___-___"},{name:"Northern Mariana Islands",code:"+1",prefix:"670",iso:"MP",flag:"https://cdn.kcak11.com/CountryFlags/countries/mp.svg",mask:"(670) ___-____"},{name:"Norway",code:"+47",prefix:null,iso:"NO",flag:"https://cdn.kcak11.com/CountryFlags/countries/no.svg",mask:"(___) __-___"},{name:"Oman",code:"+968",prefix:null,iso:"OM",flag:"https://cdn.kcak11.com/CountryFlags/countries/om.svg",mask:"__-___-___"},{name:"Pakistan",code:"+92",prefix:null,iso:"PK",flag:"https://cdn.kcak11.com/CountryFlags/countries/pk.svg",mask:"(___) ___-____"},{name:"Palau",code:"+680",prefix:null,iso:"PW",flag:"https://cdn.kcak11.com/CountryFlags/countries/pw.svg",mask:"___-____"},{name:"Palestine",code:"+970",prefix:null,iso:"PS",flag:"https://cdn.kcak11.com/CountryFlags/countries/ps.svg",mask:"__-___-____"},{name:"Panama",code:"+507",prefix:null,iso:"PA",flag:"https://cdn.kcak11.com/CountryFlags/countries/pa.svg",mask:"___-____"},{name:"Papua New Guinea",code:"+675",prefix:null,iso:"PG",flag:"https://cdn.kcak11.com/CountryFlags/countries/pg.svg",mask:"(___) __-___"},{name:"Paraguay",code:"+595",prefix:null,iso:"PY",flag:"https://cdn.kcak11.com/CountryFlags/countries/py.svg",mask:"(___) ___-___"},{name:"Peru",code:"+51",prefix:null,iso:"PE",flag:"https://cdn.kcak11.com/CountryFlags/countries/pe.svg",mask:"(___) ___-___"},{name:"Philippines",code:"+63",prefix:null,iso:"PH",flag:"https://cdn.kcak11.com/CountryFlags/countries/ph.svg",mask:"(___) ___-____"},{name:"Pitcairn",code:"+870",prefix:null,iso:"PN",flag:"https://cdn.kcak11.com/CountryFlags/countries/pn.svg",mask:"___-___-___"},{name:"Poland",code:"+48",prefix:null,iso:"PL",flag:"https://cdn.kcak11.com/CountryFlags/countries/pl.svg",mask:"(___) ___-___"},{name:"Portugal",code:"+351",prefix:null,iso:"PT",flag:"https://cdn.kcak11.com/CountryFlags/countries/pt.svg",mask:"__-___-____"},{name:"Puerto Rico",code:"+1",prefix:null,iso:"PR",flag:"https://cdn.kcak11.com/CountryFlags/countries/pr.svg",mask:"(___) ___ ____"},{name:"Qatar",code:"+974",prefix:null,iso:"QA",flag:"https://cdn.kcak11.com/CountryFlags/countries/qa.svg",mask:"____-____"},{name:"Reunion",code:"+262",prefix:null,iso:"RE",flag:"https://cdn.kcak11.com/CountryFlags/countries/re.svg",mask:"_____-____"},{name:"Romania",code:"+40",prefix:null,iso:"RO",flag:"https://cdn.kcak11.com/CountryFlags/countries/ro.svg",mask:"__-___-____"},{name:"Russia",code:"+7",prefix:null,iso:"RU",flag:"https://cdn.kcak11.com/CountryFlags/countries/ru.svg",mask:"(___) ___-__-__"},{name:"Rwanda",code:"+250",prefix:null,iso:"RW",flag:"https://cdn.kcak11.com/CountryFlags/countries/rw.svg",mask:"(___) ___-___"},{name:"Saint Barthelemy",code:"+590",prefix:null,iso:"BL",flag:"https://cdn.kcak11.com/CountryFlags/countries/bl.svg",mask:"___-__-__-__"},{name:"Saint Helena, Ascension and Tristan Da Cunha",code:"+290",prefix:null,iso:"SH",flag:"https://cdn.kcak11.com/CountryFlags/countries/sh.svg",mask:"____"},{name:"Saint Kitts and Nevis",code:"+1",prefix:null,iso:"KN",flag:"https://cdn.kcak11.com/CountryFlags/countries/kn.svg",mask:"(869) ___-____"},{name:"Saint Lucia",code:"+1",prefix:"758",iso:"LC",flag:"https://cdn.kcak11.com/CountryFlags/countries/lc.svg",mask:"(758) ___-____"},{name:"Saint Martin",code:"+590",prefix:null,iso:"MF",flag:"https://cdn.kcak11.com/CountryFlags/countries/mf.svg",mask:"(___) ___-___"},{name:"Saint Pierre and Miquelon",code:"+508",prefix:null,iso:"PM",flag:"https://cdn.kcak11.com/CountryFlags/countries/pm.svg",mask:"__-____"},{name:"Saint Vincent and the Grenadines",code:"+1",prefix:"784",iso:"VC",flag:"https://cdn.kcak11.com/CountryFlags/countries/vc.svg",mask:"(784) ___-____"},{name:"Samoa",code:"+685",prefix:null,iso:"WS",flag:"https://cdn.kcak11.com/CountryFlags/countries/ws.svg",mask:"__-____"},{name:"San Marino",code:"+378",prefix:null,iso:"SM",flag:"https://cdn.kcak11.com/CountryFlags/countries/sm.svg",mask:"____-______"},{name:"Sao Tome and Principe",code:"+239",prefix:null,iso:"ST",flag:"https://cdn.kcak11.com/CountryFlags/countries/st.svg",mask:"__-_____"},{name:"Saudi Arabia",code:"+966",prefix:null,iso:"SA",flag:"https://cdn.kcak11.com/CountryFlags/countries/sa.svg",mask:"_-____-____"},{name:"Senegal",code:"+221",prefix:null,iso:"SN",flag:"https://cdn.kcak11.com/CountryFlags/countries/sn.svg",mask:"__-___-____"},{name:"Serbia",code:"+381",prefix:null,iso:"RS",flag:"https://cdn.kcak11.com/CountryFlags/countries/rs.svg",mask:"__-___-____"},{name:"Seychelles",code:"+248",prefix:null,iso:"SC",flag:"https://cdn.kcak11.com/CountryFlags/countries/sc.svg",mask:"_-___-___"},{name:"Sierra Leone",code:"+232",prefix:null,iso:"SL",flag:"https://cdn.kcak11.com/CountryFlags/countries/sl.svg",mask:"__-______"},{name:"Singapore",code:"+65",prefix:null,iso:"SG",flag:"https://cdn.kcak11.com/CountryFlags/countries/sg.svg",mask:"____-____"},{name:"Sint Maarten",code:"+1",prefix:"721",iso:"SX",flag:"https://cdn.kcak11.com/CountryFlags/countries/sx.svg",mask:"(721) ___-____"},{name:"Slovakia",code:"+421",prefix:null,iso:"SK",flag:"https://cdn.kcak11.com/CountryFlags/countries/sk.svg",mask:"(___) ___-___"},{name:"Slovenia",code:"+386",prefix:null,iso:"SI",flag:"https://cdn.kcak11.com/CountryFlags/countries/si.svg",mask:"__-___-___"},{name:"Solomon Islands",code:"+677",prefix:null,iso:"SB",flag:"https://cdn.kcak11.com/CountryFlags/countries/sb.svg",mask:"___-____"},{name:"Somalia",code:"+252",prefix:null,iso:"SO",flag:"https://cdn.kcak11.com/CountryFlags/countries/so.svg",mask:"__-___-___"},{name:"South Africa",code:"+27",prefix:null,iso:"ZA",flag:"https://cdn.kcak11.com/CountryFlags/countries/za.svg",mask:"__-___-____"},{name:"South Georgia and the South Sandwich Islands",code:"+500",prefix:null,iso:"GS",flag:"https://cdn.kcak11.com/CountryFlags/countries/gs.svg",mask:"_____"},{name:"South Sudan",code:"+211",prefix:null,iso:"SS",flag:"https://cdn.kcak11.com/CountryFlags/countries/ss.svg",mask:"__-___-____"},{name:"Spain",code:"+34",prefix:null,iso:"ES",flag:"https://cdn.kcak11.com/CountryFlags/countries/es.svg",mask:"(___) ___-___"},{name:"Sri Lanka",code:"+94",prefix:null,iso:"LK",flag:"https://cdn.kcak11.com/CountryFlags/countries/lk.svg",mask:"__-___-____"},{name:"Sudan",code:"+249",prefix:null,iso:"SD",flag:"https://cdn.kcak11.com/CountryFlags/countries/sd.svg",mask:"__-___-____"},{name:"Suriname",code:"+597",prefix:null,iso:"SR",flag:"https://cdn.kcak11.com/CountryFlags/countries/sr.svg",mask:"___-____"},{name:"Svalbard and Jan Mayen",code:"+47",prefix:null,iso:"SJ",flag:"https://cdn.kcak11.com/CountryFlags/countries/sj.svg",mask:"(___) __-___"},{name:"Sweden",code:"+46",prefix:null,iso:"SE",flag:"https://cdn.kcak11.com/CountryFlags/countries/se.svg",mask:"__-___-____"},{name:"Switzerland",code:"+41",prefix:null,iso:"CH",flag:"https://cdn.kcak11.com/CountryFlags/countries/ch.svg",mask:"__-___-____"},{name:"Syrian Arab Republic",code:"+963",prefix:null,iso:"SY",flag:"https://cdn.kcak11.com/CountryFlags/countries/sy.svg",mask:"__-____-___"},{name:"Taiwan",code:"+886",prefix:null,iso:"TW",flag:"https://cdn.kcak11.com/CountryFlags/countries/tw.svg",mask:"_-____-____"},{name:"Tajikistan",code:"+992",prefix:null,iso:"TJ",flag:"https://cdn.kcak11.com/CountryFlags/countries/tj.svg",mask:"__-___-____"},{name:"United Republic of Tanzania",code:"+255",prefix:null,iso:"TZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/tz.svg",mask:"__-___-____"},{name:"Thailand",code:"+66",prefix:null,iso:"TH",flag:"https://cdn.kcak11.com/CountryFlags/countries/th.svg",mask:"__-___-____"},{name:"Timor-Leste",code:"+670",prefix:null,iso:"TL",flag:"https://cdn.kcak11.com/CountryFlags/countries/tl.svg",mask:"___-_____"},{name:"Togo",code:"+228",prefix:null,iso:"TG",flag:"https://cdn.kcak11.com/CountryFlags/countries/tg.svg",mask:"__-___-___"},{name:"Tokelau",code:"+690",prefix:null,iso:"TK",flag:"https://cdn.kcak11.com/CountryFlags/countries/tk.svg",mask:"____"},{name:"Tonga",code:"+676",prefix:null,iso:"TO",flag:"https://cdn.kcak11.com/CountryFlags/countries/to.svg",mask:"_____"},{name:"Trinidad and Tobago",code:"+1",prefix:"868",iso:"TT",flag:"https://cdn.kcak11.com/CountryFlags/countries/tt.svg",mask:"(868) ___-____"},{name:"Tunisia",code:"+216",prefix:null,iso:"TN",flag:"https://cdn.kcak11.com/CountryFlags/countries/tn.svg",mask:"__-___-___"},{name:"Turkey",code:"+90",prefix:null,iso:"TR",flag:"https://cdn.kcak11.com/CountryFlags/countries/tr.svg",mask:"(___) ___-____"},{name:"Turkmenistan",code:"+993",prefix:null,iso:"TM",flag:"https://cdn.kcak11.com/CountryFlags/countries/tm.svg",mask:"_-___-____"},{name:"Turks and Caicos Islands",code:"+1",prefix:"249",iso:"TC",flag:"https://cdn.kcak11.com/CountryFlags/countries/tc.svg",mask:"(249) ___-___"},{name:"Tuvalu",code:"+688",prefix:null,iso:"TV",flag:"https://cdn.kcak11.com/CountryFlags/countries/tv.svg",mask:"______"},{name:"Uganda",code:"+256",prefix:null,iso:"UG",flag:"https://cdn.kcak11.com/CountryFlags/countries/ug.svg",mask:"(___) ___-___"},{name:"Ukraine",code:"+380",prefix:null,iso:"UA",flag:"https://cdn.kcak11.com/CountryFlags/countries/ua.svg",mask:"(__) ___-__-__"},{name:"United Arab Emirates",code:"+971",prefix:null,iso:"AE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ae.svg",mask:"_-___-____"},{name:"United Kingdom",code:"+44",prefix:null,iso:"GB",flag:"https://cdn.kcak11.com/CountryFlags/countries/gb.svg",mask:"__-____-____"},{name:"United States",code:"+1",prefix:"408",iso:"US",flag:"https://cdn.kcak11.com/CountryFlags/countries/us.svg",mask:"(408) ___-____"},{name:"Uruguay",code:"+598",prefix:null,iso:"UY",flag:"https://cdn.kcak11.com/CountryFlags/countries/uy.svg",mask:"_-___-__-__"},{name:"Uzbekistan",code:"+998",prefix:null,iso:"UZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/uz.svg",mask:"__-___-____"},{name:"Vanuatu",code:"+678",prefix:null,iso:"VU",flag:"https://cdn.kcak11.com/CountryFlags/countries/vu.svg",mask:"__-_____"},{name:"Venezuela, Bolivarian Republic of Venezuela",code:"+58",prefix:null,iso:"VE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ve.svg",mask:"(___) ___-____"},{name:"Vietnam",code:"+84",prefix:null,iso:"VN",flag:"https://cdn.kcak11.com/CountryFlags/countries/vn.svg",mask:"(___) ____-___"},{name:"Virgin Islands, British",code:"+1",prefix:"284",iso:"VG",flag:"https://cdn.kcak11.com/CountryFlags/countries/vg.svg",mask:"(284) ___-____"},{name:"Virgin Islands, U.S.",code:"+1",prefix:"340",iso:"VI",flag:"https://cdn.kcak11.com/CountryFlags/countries/vi.svg",mask:"(340) ___-____"},{name:"Wallis and Futuna",code:"+681",prefix:null,iso:"WF",flag:"https://cdn.kcak11.com/CountryFlags/countries/wf.svg",mask:"__-____"},{name:"Yemen",code:"+967",prefix:null,iso:"YE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ye.svg",mask:"___-___-___"},{name:"Zambia",code:"+260",prefix:null,iso:"ZM",flag:"https://cdn.kcak11.com/CountryFlags/countries/zm.svg",mask:"__-___-____"},{name:"Zimbabwe",code:"+263",prefix:null,iso:"ZW",flag:"https://cdn.kcak11.com/CountryFlags/countries/zw.svg",mask:"_-______"}],Bn={USD:{countryLanguage:"en-US",countryCurrency:"USD"},EUR:{countryLanguage:"de-DE",countryCurrency:"EUR"},JPY:{countryLanguage:"ja-JP",countryCurrency:"JPY"},GBP:{countryLanguage:"en-GB",countryCurrency:"GBP"},AUD:{countryLanguage:"en-AU",countryCurrency:"AUD"},CAD:{countryLanguage:"en-CA",countryCurrency:"CAD"},CHF:{countryLanguage:"de-CH",countryCurrency:"CHF"},CNY:{countryLanguage:"zh-CN",countryCurrency:"CNY"},SEK:{countryLanguage:"sv-SE",countryCurrency:"SEK"},NZD:{countryLanguage:"en-NZ",countryCurrency:"NZD"},BRL:{countryLanguage:"pt-BR",countryCurrency:"BRL"},INR:{countryLanguage:"en-IN",countryCurrency:"INR"},RUB:{countryLanguage:"ru-RU",countryCurrency:"RUB"},ZAR:{countryLanguage:"en-ZA",countryCurrency:"ZAR"},MXN:{countryLanguage:"es-MX",countryCurrency:"MXN"},SGD:{countryLanguage:"en-SG",countryCurrency:"SGD"},HKD:{countryLanguage:"zh-HK",countryCurrency:"HKD"},NOK:{countryLanguage:"nb-NO",countryCurrency:"NOK"},KRW:{countryLanguage:"ko-KR",countryCurrency:"KRW"},TRY:{countryLanguage:"tr-TR",countryCurrency:"TRY"},IDR:{countryLanguage:"id-ID",countryCurrency:"IDR"},THB:{countryLanguage:"th-TH",countryCurrency:"THB"}},$a=e=>e.replace(new RegExp("(?:R\\$|\\p{Sc}|[$€¥£])","gu"),"").trim(),jn=(e,t,n={showPrefix:!0})=>{if(!Bn[t])throw new Error("Unsupported currency code");const{countryCurrency:r,countryLanguage:a}=Bn[t],s=new Intl.NumberFormat(a,{style:"currency",currency:r}).format(e);return n.showPrefix?s.replace(/\s/g," "):$a(s).replace(/\s/g," ")};Gt({NINE:"(99) 99999-9999"}.NINE).length;function Ba(e){let t=e;return typeof e=="string"?(t=+Gt(e),t%1!==0&&(t=t.toFixed(2))):t=Number.isInteger(e)?Number(e)*10**2:e.toFixed(2),+Gt(String(t))/10**2}function Ut(e,t){if(!e)return[0,jn(0,t)];const n=Ba(e),r=jn(n,t);return[n,r]}function ja(e){const{name:t,disabled:n,title:r,style:a,variant:s="solid",label:o,className:i="",value:l,defaultValue:u,max:f,locale:d,onChange:_,prefix:p,suffix:g,isLoading:h=!1,leftIcon:v,readOnly:b,onFocus:w,onBlur:k,errorMessage:S,showAsterisk:V,rightIcon:j,size:O="md",id:G,...A}=e,{fieldErrors:x}=ye(),[P,D]=m.useState(!1),[F,H]=m.useState("0"),L=m.useRef(null),z=G||m.useId(),M=S||(x==null?void 0:x[t]),Q=!!M,E=n||h,re={md:20,lg:20}[O],ee=j?"right":"left",be=ee==="left"&&h,le=ee==="right"&&h;function se(){E||!(L!=null&&L.current)||(D(!0),L.current.focus())}function oe(ge){D(!0),w&&w(ge)}function $(ge){D(!1),k&&k(ge)}const Z=ge=>{const[De,Ve]=Ut(ge,d);return!f||De<=f?(H(Ve),[De,Ve]):Ut(ge,d)},Ie=ge=>{ge.preventDefault();const[De,Ve]=Z(ge.target.value);_&&_(ge,String(De),String(Ve))};m.useEffect(()=>{const ge=l||+u||void 0,[,De]=Ut(ge,d);H(De)},[d,u,l]);const wn=`arkynCurrencyInput ${p?"hasPrefix":""} ${g?"hasSuffix":""} ${s} ${O} ${E||b||h?"opacity":""} ${Q?"errored":""} ${P?"focused":""} ${i}`;return c.jsxs(me,{children:[o&&c.jsx(fe,{showAsterisk:V,htmlFor:z,children:o}),c.jsxs("section",{title:r,style:a,onClick:se,className:wn,children:[c.jsx(X,{iconSize:re,icon:p,className:"prefix"}),c.jsx(X,{show:be,iconSize:re,className:"spinner",icon:B.Loader2}),c.jsx(X,{show:!h,icon:v,iconSize:re}),c.jsx("input",{value:F,disabled:E,readOnly:b,ref:L,onFocus:oe,onBlur:$,onChange:Ie,id:z,name:t,...A}),c.jsx(X,{show:!h,icon:j,iconSize:re}),c.jsx(X,{show:le,iconSize:re,className:"spinner",icon:B.Loader2}),c.jsx(X,{iconSize:re,icon:g,className:"suffix"})]}),M&&c.jsx(ke,{children:M})]})}function za(){return typeof window>"u"?0:window.innerWidth-document.documentElement.clientWidth}function Xe(e){m.useEffect(()=>{if(e){const t=document.body.style.overflow,n=document.body.style.paddingRight,r=za();if(r>0){const a=window.getComputedStyle(document.body),s=parseInt(a.paddingRight)||0;document.body.style.paddingRight=`${s+r}px`}return document.body.style.overflow="hidden",()=>{document.body.style.overflow=t,document.body.style.paddingRight=n}}},[e])}const zn=m.createContext({});function Ha(e){return c.jsx(zn.Provider,{value:{makeInvisible:e.makeInvisible},children:e.children})}function Ga(){return m.useContext(zn)}function Ua(e){const{isVisible:t,makeInvisible:n,orientation:r="left",children:a,className:s,...o}=e;Xe(t);const i=r==="left"?"-100%":"100%",u=`arkynDrawerContainer ${r} ${t?"visibleTrue":"visibleFalse"} ${s}`;return c.jsx(Ha,{makeInvisible:n,children:c.jsx(Le.AnimatePresence,{children:t&&c.jsxs("aside",{className:u.trim(),...o,children:[c.jsx(Le.motion.div,{className:"arkynDrawerContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),c.jsx(Le.motion.div,{className:"arkynDrawerContainerContent",transition:{ease:"easeOut",duration:.15},initial:{transform:`translateX(${i})`},animate:{transform:"translateX(0px)"},exit:{transform:`translateX(${i})`},children:a})]})})})}function Va(e){const{showCloseButton:t=!0,className:n,children:r,...a}=e,{makeInvisible:s}=Ga(),o=`arkynDrawerHeader ${n}`;return c.jsxs("header",{className:o.trim(),...a,children:[r,t&&c.jsx("button",{className:"arkynDrawerHeaderCloseButton",type:"button",onClick:s,"aria-label":"Close drawer",children:c.jsx(B.X,{size:24})})]})}function qa(e){const{disabled:t,file:n,isLoading:r,acceptFile:a,changeFileButtonText:s,handleSelectFile:o,reSendFile:i}=e;function l(){if(t)return;const f=document.createElement("input");f.type="file",f.accept=a,f.onchange=d=>{var p;const _=(p=d.target.files)==null?void 0:p[0];_&&o(_)},f.click()}function u(){return n.type.startsWith("image/")?c.jsx(B.FileImage,{}):n.type.startsWith("audio/")?c.jsx(B.FileAudio,{}):n.type.startsWith("application/zip")?c.jsx(B.FileArchive,{}):c.jsx(B.File,{})}return c.jsxs("div",{className:"arkynFileUploadHasFileContent",children:[c.jsxs("section",{className:"arkynFileUploadFileContainer",children:[c.jsx(u,{}),c.jsx("p",{children:n.name})]}),c.jsx(dt,{}),c.jsxs("div",{className:"arkynFileUploadButtonsContainer",children:[!!i&&c.jsx(gt,{orientation:"bottom",text:"Reenviar arquivo",children:c.jsx(_t,{type:"button","aria-label":"resend file",variant:"outline",scheme:"danger",size:"sm",isLoading:r,onClick:i,icon:B.RefreshCw,disabled:t})}),c.jsx($e,{isLoading:r,onClick:l,variant:"outline",size:"sm",type:"button",disabled:t,children:s})]})]})}function Wa(e){const{dropFileText:t,isLoading:n,acceptFile:r,handleSelectFile:a,selectFileButtonText:s,disabled:o}=e;function i(u){if(o)return;u.preventDefault();const f=u.dataTransfer.files[0];f&&a(f)}function l(){if(o)return;const u=document.createElement("input");u.type="file",u.accept=r,u.onchange=f=>{var _;const d=(_=f.target.files)==null?void 0:_[0];d&&a(d)},u.click()}return c.jsxs("div",{onDrop:i,className:"arkynFileUploadNoFileContent",children:[c.jsx($e,{isLoading:n,onClick:l,variant:"ghost",size:"sm",type:"button",disabled:o,children:s}),c.jsx("p",{children:t})]})}function Ra(e){const{name:t,label:n,showAsterisk:r=!1,action:a,fileName:s="file",method:o="POST",acceptFile:i="*",fileResponseName:l="url",changeFileButtonText:u="Alterar arquivo",selectFileButtonText:f="Selecionar arquivo",dropFileText:d="Ou arraste e solte o arquivo aqui",onChange:_,disabled:p=!1}=e,{fieldErrors:g}=ye(),h=g==null?void 0:g[t],[v,b]=m.useState(""),[w,k]=m.useState(""),[S,V]=m.useState(null),[j,O]=m.useState(!1);async function G(H){if(p)return;O(!0),V(H),k("");const L=new FormData;L.append(s,H),await fetch(a,{method:o,body:L}).then(async z=>await z.json()).then(z=>{z!=null&&z.error?k(z.error):b(z==null?void 0:z[l]),_&&_(z==null?void 0:z[l])}).catch(z=>{console.error(z),k("Erro ao enviar o arquivo")}).finally(()=>O(!1))}function A(H){p||G(H)}const x=h||w,F=`arkynFileUpload ${x?"hasError":"noHasError"} ${S?"hasFile":"noHasFile"}`;return c.jsxs(me,{children:[n&&c.jsx(fe,{showAsterisk:r,children:n}),c.jsxs("div",{className:F,children:[c.jsx("input",{type:"hidden",name:t,value:v||""}),!S&&c.jsx(Wa,{disabled:p,isLoading:j,acceptFile:i,dropFileText:d,handleSelectFile:A,selectFileButtonText:f}),S&&c.jsx(qa,{disabled:p,isLoading:j,acceptFile:i,file:S,handleSelectFile:A,changeFileButtonText:u,reSendFile:x&&S?()=>G(S):void 0})]}),x&&c.jsx(ke,{children:x})]})}function Xa(e){const{disabled:t,filePath:n,isLoading:r,acceptImage:a,changeImageButtonText:s,handleSelectFile:o,reSendImage:i}=e;function l(){if(t)return;const u=document.createElement("input");u.type="file",u.accept=a,u.onchange=f=>{var _;const d=(_=f.target.files)==null?void 0:_[0];d&&o(d)},u.click()}return c.jsxs("div",{className:"arkynImageUploadHasFileContent",style:{backgroundImage:`url("${n}")`},children:[i&&c.jsx(gt,{orientation:"bottom",text:"Reenviar imagem",children:c.jsx(_t,{type:"button","aria-label":"resend image",variant:"outline",scheme:"danger",size:"sm",isLoading:r,onClick:i,icon:B.RefreshCw,disabled:t})}),c.jsx($e,{isLoading:r,onClick:l,variant:"outline",size:"sm",type:"button",disabled:t,children:s})]})}function Ka(e){const{dropImageText:t,isLoading:n,acceptImage:r,handleSelectFile:a,selectImageButtonText:s,disabled:o}=e;function i(u){if(o)return;u.preventDefault();const f=u.dataTransfer.files[0];f&&a(f)}function l(){if(o)return;const u=document.createElement("input");u.type="file",u.accept=r,u.onchange=f=>{var _;const d=(_=f.target.files)==null?void 0:_[0];d&&a(d)},u.click()}return c.jsxs("div",{onDrop:i,className:"arkynImageUploadNoFileContent",children:[c.jsx($e,{isLoading:n,onClick:l,variant:"ghost",size:"sm",type:"button",disabled:o,children:s}),c.jsx("p",{children:t})]})}function Ya(e){const{name:t,defaultValue:n="",label:r,showAsterisk:a=!1,action:s,fileName:o="file",method:i="POST",acceptImage:l="image/*",fileResponseName:u="url",changeImageButtonText:f="Alterar imagem",selectImageButtonText:d="Selecionar imagem",dropImageText:_="Ou arraste e solte a imagem aqui",onChange:p,disabled:g=!1}=e,{fieldErrors:h}=ye(),v=h==null?void 0:h[t],[b,w]=m.useState(n),[k,S]=m.useState(""),[V,j]=m.useState(null),[O,G]=m.useState(n),[A,x]=m.useState(!1);async function P(M){if(g)return;x(!0),j(M),S("");const Q=new FormData;Q.append(o,M),await fetch(s,{method:i,body:Q}).then(async E=>await E.json()).then(E=>{E!=null&&E.error?S(E.error):w(E==null?void 0:E[u]),p&&p(E==null?void 0:E[u])}).catch(E=>{console.error(E),S("Erro ao enviar imagem")}).finally(()=>x(!1))}function D(M){g||(G(URL.createObjectURL(M)),P(M))}const F=v||k,z=`arkynImageUpload ${F?"hasError":"noHasError"} ${O?"hasImage":"noHasImage"}`;return c.jsxs(me,{children:[r&&c.jsx(fe,{showAsterisk:a,children:r}),c.jsxs("div",{className:z,children:[c.jsx("input",{type:"hidden",name:t,value:b||""}),!O&&c.jsx(Ka,{disabled:g,isLoading:A,acceptImage:l,dropImageText:_,handleSelectFile:D,selectImageButtonText:d}),O&&c.jsx(Xa,{disabled:g,isLoading:A,acceptImage:l,filePath:O,handleSelectFile:D,changeImageButtonText:f,reSendImage:F&&V?()=>P(V):void 0})]}),F&&c.jsx(ke,{children:F})]})}function Hn(e){const{name:t,disabled:n,title:r,style:a,variant:s="solid",label:o,className:i="",prefix:l,suffix:u,isLoading:f=!1,leftIcon:d,readOnly:_,onFocus:p,onBlur:g,errorMessage:h,showAsterisk:v,rightIcon:b,type:w="text",size:k="md",id:S,...V}=e,{fieldErrors:j}=ye(),[O,G]=m.useState(!1),A=m.useRef(null),x=S||m.useId(),P=h||(j==null?void 0:j[t]),D=!!P,F=n||f,L={md:20,lg:20}[k],z=b?"right":"left",M=z==="left"&&f,Q=z==="right"&&f;function E(){F||!(A!=null&&A.current)||(G(!0),A.current.focus())}function ce(Z){G(!0),p&&p(Z)}function re(Z){G(!1),g&&g(Z)}if(w==="hidden")return c.jsx("input",{style:{display:"none"},readOnly:!0,type:"text",ref:A,...V});const $=`arkynInput ${l?"hasPrefix":""} ${u?"hasSuffix":""} ${s} ${k} ${F||_||f?"opacity":""} ${D?"errored":""} ${O?"focused":""} ${i}`;return c.jsxs(me,{children:[o&&c.jsx(fe,{showAsterisk:v,htmlFor:x,children:o}),c.jsxs("section",{title:r,style:a,onClick:E,className:$,children:[c.jsx(X,{iconSize:L,icon:l,className:"prefix"}),c.jsx(X,{show:M,iconSize:L,className:"spinner",icon:B.Loader2}),c.jsx(X,{show:!f,icon:d,iconSize:L}),c.jsx("input",{disabled:F,readOnly:_,ref:A,onFocus:ce,onBlur:re,type:w,id:x,name:t,...V}),c.jsx(X,{show:!f,icon:b,iconSize:L}),c.jsx(X,{show:Q,iconSize:L,className:"spinner",icon:B.Loader2}),c.jsx(X,{iconSize:L,icon:u,className:"suffix"})]}),P&&c.jsx(ke,{children:P})]})}const Za=m.forwardRef((e,t)=>c.jsx("input",{ref:t,...e}));function Ja(e){const{name:t,disabled:n,title:r,style:a,variant:s="solid",separate:o,mask:i,showMask:l,replacement:u,label:f,className:d="",prefix:_,suffix:p,isLoading:g=!1,leftIcon:h,readOnly:v,onFocus:b,onBlur:w,errorMessage:k,defaultValue:S,showAsterisk:V,rightIcon:j,size:O="md",id:G,...A}=e,{fieldErrors:x}=ye(),[P,D]=m.useState(!1),F=m.useRef(null),H=G||m.useId(),L=k||(x==null?void 0:x[t]),z=!!L,M=n||g,E={md:20,lg:20}[O],ce=j?"right":"left",re=ce==="left"&&g,ee=ce==="right"&&g;function be(){M||!(F!=null&&F.current)||(D(!0),F.current.focus())}function le(U){D(!0),b&&b(U)}function se(U){D(!1),w&&w(U)}const Me=`arkynMaskedInput ${_?"hasPrefix":""} ${p?"hasSuffix":""} ${s} ${O} ${M||v||g?"opacity":""} ${z?"errored":""} ${P?"focused":""} ${d}`;return c.jsxs(me,{children:[f&&c.jsx(fe,{showAsterisk:V,htmlFor:H,children:f}),c.jsxs("section",{title:r,style:a,onClick:be,className:Me,children:[c.jsx(X,{iconSize:E,icon:_,className:"prefix"}),c.jsx(X,{show:re,iconSize:E,className:"spinner",icon:B.Loader2}),c.jsx(X,{show:!g,icon:h,iconSize:E}),c.jsx(Tn.InputMask,{component:Za,mask:i,replacement:u,separate:o,showMask:l,ref:F,onFocus:le,onBlur:se,disabled:M,readOnly:v,id:H,name:t,...A}),c.jsx(X,{show:!g,icon:j,iconSize:E}),c.jsx(X,{show:ee,iconSize:E,className:"spinner",icon:B.Loader2}),c.jsx(X,{iconSize:E,icon:p,className:"suffix"})]}),L&&c.jsx(ke,{children:L})]})}const Gn=m.createContext({});function Qa(e){return c.jsx(Gn.Provider,{value:{makeInvisible:e.makeInvisible},children:e.children})}function es(){return m.useContext(Gn)}function ts(e){const{isVisible:t,makeInvisible:n,children:r,className:a="",...s}=e;Xe(t);const i=`arkynModalContainer ${t?"visibleTrue":"visibleFalse"} ${a}`;return c.jsx(Qa,{makeInvisible:n,children:c.jsx(Le.AnimatePresence,{children:t&&c.jsxs("aside",{className:i.trim(),...s,children:[c.jsx(Le.motion.div,{className:"arkynModalContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),c.jsx(Le.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 ns(e){const{alignment:t="right",className:n,...r}=e,a=`arkynModalFooter ${t} ${n}`;return c.jsx("footer",{className:a.trim(),...r})}function rs(e){const{showCloseButton:t=!0,className:n,children:r,...a}=e,{makeInvisible:s}=es(),o=`arkynModalHeader ${n}`;return c.jsxs("header",{className:o.trim(),...a,children:[r,t&&c.jsx("button",{type:"button",onClick:s,"aria-label":"Close modal button",className:"arkynModalHeaderCloseButton",children:c.jsx(B.X,{size:24})})]})}function as(e){const{iconSize:t,isLoading:n,disabled:r,readOnly:a,isFocused:s}=e,l=`arkynMultiSelectChevron ${r||a?"notAnimate":""} ${s?"focused":""}`;return n?c.jsx(c.Fragment,{}):c.jsx(B.ChevronDown,{className:l,size:t,strokeWidth:2.5})}function ss(e){const{children:t,handleContainerFocus:n,disabled:r,isError:a,isLoading:s,isFocused:o,className:i,readOnly:l,variant:u,size:f,id:d,prefixExists:_}=e,p=_?"hasPrefix":"",g=a?"errored":"",h=r||l||s?"opacity":"",v=o?"focused":"";return c.jsx("section",{id:d,className:`arkynMultiSelectContainer ${p} ${u} ${f} ${h} ${g} ${v} ${i}`,onClick:n,children:t})}function os(e){const{children:t,size:n}=e,r=`arkynMultiSelectContent ${n}`;return c.jsx("div",{className:r,children:t})}function is(e){const{label:t,value:n,disabled:r,handleChangeValue:a}=e;return c.jsxs("div",{className:"arkynMultiSelectMark",children:[t,c.jsx("button",{disabled:r,type:"button",onClick:s=>{s.stopPropagation(),a(n)},children:c.jsx(B.X,{})})]})}function cs(e){const{label:t,optionHasSelected:n,handleChangeValue:r,value:a,size:s}=e,o=n(a)?"active":"",i=`arkynMultiSelectOption ${s} ${o}`;return c.jsxs("div",{onClick:()=>r(a),className:i,children:[t," ",c.jsx(B.Check,{})]})}function ls(e){const{children:t,isFocused:n,isSearchable:r,search:a,onSearch:s}=e,o=m.useRef(null),[i,l]=m.useState("bottom");Xe(n),m.useEffect(()=>{if(!n)return;(()=>{if(!o.current)return;const d=o.current.parentElement;if(!d)return;const _=d.getBoundingClientRect(),p=window.innerHeight,g=300;p-_.bottom<g&&_.top>g?l("top"):l("bottom")})()},[n]);function u(f){r&&s(f.target.value)}return n?c.jsxs("div",{ref:o,className:`arkynMultiSelectOptionsContainer ${i}`,children:[r&&c.jsx(Hn,{type:"search",name:"search-select",variant:"underline",leftIcon:B.Search,value:a,onChange:u}),t]}):c.jsx(c.Fragment,{})}function us(e){const{isFocused:t,handleBlur:n}=e;return t?c.jsx("aside",{className:"arkynMultiSelectOverlay",onClick:n}):c.jsx(c.Fragment,{})}function fs(e){const{iconSize:t,isLoading:n}=e;return n?c.jsx(B.Loader2,{className:"arkynMultiSelectSpinner",size:t,strokeWidth:2.5}):c.jsx(c.Fragment,{})}function ds(e){const{name:t,options:n,className:r="",placeholder:a="Selecione...",closeOnSelect:s=!1,defaultValue:o=[],errorMessage:i,isLoading:l=!1,readOnly:u=!1,isSearchable:f=!1,id:d,label:_,optionMaxHeight:p,showAsterisk:g,leftIcon:h,onSearch:v,onChange:b,onBlur:w,notFoundText:k="Sem opções disponíveis",onFocus:S,disabled:V=!1,prefix:j,size:O="md",value:G,variant:A="solid"}=e,{fieldErrors:x}=ye(),P=m.useRef(null),D=d||m.useId(),F=i||(x==null?void 0:x[t]),H=!!F,L=V||l||u,M={md:20,lg:20}[O],[Q,E]=m.useState(""),[ce,re]=m.useState(!1),[ee,be]=m.useState(o),le=G||ee;function se(U){return le.includes(U)}function oe(U){const ue=n.find(zt=>zt.value===U);return(ue==null?void 0:ue.label)||""}function $(){L||!(P!=null&&P.current)||ce||(re(!0),P.current.focus(),S&&S())}function Z(){re(!1),w&&P.current&&P.current.blur()}function Ie(U){E(U),v&&v(U)}function Ze(U){se(U)?(be(ee.filter(ue=>ue!==U)),b&&b(ee.filter(ue=>ue!==U))):(be([...ee,U]),b&&b([...ee,U])),s&&Z()}const Me=n.filter(U=>!!(e.onSearch||!e.isSearchable||U.label.toLowerCase().includes(Q.toLowerCase())));return c.jsxs(me,{children:[_&&c.jsx(fe,{showAsterisk:g,children:_}),c.jsxs(ss,{handleContainerFocus:$,disabled:L,isError:H,isFocused:ce,isLoading:l,readOnly:u,size:O,variant:A,className:r,prefixExists:!!j,id:D,children:[c.jsx("input",{ref:P,name:t,value:JSON.stringify(le),type:"hidden"}),c.jsx(X,{iconSize:M,icon:j,className:"prefix"}),h&&c.jsx(h,{size:M,strokeWidth:2.5}),c.jsxs(os,{size:O,children:[le.map(U=>c.jsx(is,{label:oe(U),value:U,handleChangeValue:Ze,disabled:L},U)),le.length<=0&&c.jsx("p",{children:a})]}),c.jsxs(ls,{isFocused:ce,isSearchable:f,search:Q,onSearch:Ie,children:[Me.map(({label:U,value:ue})=>c.jsx(cs,{label:U,value:ue,size:O,handleChangeValue:Ze,optionHasSelected:se},ue)),Me.length<=0&&c.jsx("p",{children:k})]}),c.jsx(as,{disabled:L,isFocused:ce,readOnly:u,iconSize:M,isLoading:l}),c.jsx(fs,{iconSize:M,isLoading:l}),c.jsx(us,{handleBlur:Z,isFocused:ce})]}),F&&c.jsx(ke,{children:F})]})}function Vt(e){return e&&e.replace(/[^0-9]/g,"")}const qt={EIGHT:"(99) 9999-9999",NINE:"(99) 99999-9999"};function Un(e,t){let n="",r=0;for(let a=0;a<t.length;a++)if(t[a]==="9")if(r<e.length)n+=e[r],r++;else break;else if(r<e.length)n+=t[a];else break;return n}function Vn(e){return e.length>10?"NINE":"EIGHT"}const qn=Vt(qt.NINE).length;function Wn(e,t){if(t.code==="+55"){let a=Vt(e);const s=Vn(a);return a.length>qn?void 0:(a=Un(a,qt[s]),a)}let r=t.mask;if(t.prefix){const a=/\$+/g;r=r.replace(a,t.prefix)}for(let a=0,s=0;a<r.length&&s<e.length;a++)r[a]==="_"&&(r=r.substring(0,a)+e[s]+r.substring(a+1),s++);return r}function _s(e,t){const n=Re.find(r=>r.code===e&&r.prefix===t);return n||null}function gs(e){const t=Re.find(n=>n.code===e);return t||null}function ms(e){const t=e.split(" ")[0].split("-")[0],n=e.split(" ")[0].split("-")[1],r=e.split(" ")[1];if(!t||!r)return{country:null,formattedNumber:""};if(n){const i=_s(t,n);if(!i)return{country:null,formattedNumber:""};const l=Wn(r,i);return{country:i,formattedNumber:l}}const a=gs(t);if(!a)return{country:null,formattedNumber:""};const s=Wn(r,a);return{country:a,formattedNumber:s}}function hs(e){const{children:t,onFocus:n,disabled:r,isError:a,isLoading:s,isFocused:o,className:i="",readOnly:l,variant:u,size:f,id:d}=e,h=`arkynPhoneInputContainer ${u} ${f} ${r||l||s?"opacity":""} ${a?"errored":""} ${o?"focused":""} ${i}`;return c.jsx("section",{id:d,className:h.trim(),onClick:n,children:t})}function ps(e){const{isOpen:t,onClick:n}=e;return t?c.jsx("aside",{className:"arkynPhoneInputCountriesOverlay",onClick:n}):c.jsx(c.Fragment,{})}function ys(e){const{country:t,isActive:n,handleChangeValue:r,size:a}=e,o=`arkynPhoneInputCountryOption ${a} ${n?"active":""}`;return c.jsxs("div",{onClick:()=>r(t),className:o,children:[c.jsx("img",{src:t.flag,alt:t.name,className:"flag"}),t.name," ",c.jsx("span",{children:t.code}),c.jsx(B.Check,{className:"check"})]})}function vs(e){const{children:t,isOpen:n,onSearch:r,search:a,placeholder:s}=e,o=m.useRef(null),[i,l]=m.useState("bottom");function u(f){r(f.target.value)}return Xe(n),m.useEffect(()=>{if(!n)return;(()=>{if(!o.current)return;const d=o.current.parentElement;if(!d)return;const _=d.getBoundingClientRect(),p=window.innerHeight,g=300;p-_.bottom<g&&_.top>g?l("top"):l("bottom")})()},[n]),n?c.jsxs("div",{className:`arkynPhoneInputCountryOptionsContainer ${i}`,ref:o,children:[c.jsx("input",{type:"search",name:"search-select",className:"arkynPhoneInputCountryOptionsContainerSearchSelect",value:a,id:"input-search",placeholder:s,onChange:u}),t]}):c.jsx(c.Fragment,{})}function ks(e){const{currentCountry:t,onClick:n}=e;return c.jsxs("div",{className:"phoneInputSelectCountry",onClick:n,children:[c.jsx("img",{className:"flag",src:t.flag,alt:t.name}),c.jsx(B.ChevronDown,{className:"chevronDown",strokeWidth:2.5}),c.jsx(dt,{orientation:"vertical"})]})}const Cs=m.forwardRef((e,t)=>c.jsx("input",{ref:t,...e})),bs=m.forwardRef((e,t)=>{const{onFocus:n,onBlur:r,size:a,onChange:s,value:o,currentCountry:i,disabled:l}=e,[u,f]=m.useState(!1);m.useEffect(()=>{u?s(i.mask):f(!0)},[i]);const d=`phoneInputMask ${a}`;function _(p){let g=Vt(p.target.value);const h=Vn(g);g.length>qn||(g=Un(g,qt[h]),p.target.value=g,s(g))}return i.code==="+55"?c.jsx("input",{value:o,onChange:_,className:d,onFocus:n,onBlur:r,disabled:l,ref:t}):c.jsx(Tn.InputMask,{value:o,onChange:p=>s(p.target.value),className:d,component:Cs,onFocus:n,onBlur:r,disabled:l,mask:i.mask,showMask:!0,replacement:{_:/\d/},ref:t})});function xs(e){const{defaultCountry:t,label:n,className:r="",disabled:a=!1,errorMessage:s,isLoading:o=!1,readOnly:i=!1,size:l="md",defaultValue:u="",variant:f="solid",showAsterisk:d,name:_,onChange:p,searchCountryPlaceholder:g="Pesquisar país",notFoundCountryText:h="Nenhum país encontrado",id:v}=e,b=ms(u),[w,k]=m.useState(!1),[S,V]=m.useState(""),[j,O]=m.useState(!1),[G,A]=m.useState(b.formattedNumber||""),[x,P]=m.useState(()=>{if(b.country)return b.country;const $=Re.find(Z=>Z.iso===t);return $||Re[30]}),{fieldErrors:D}=ye(),F=m.useRef(null),H=v||m.useId(),L=s||(D==null?void 0:D[_]),z=!!L,M=a||o,Q=m.useRef(null);function E(){M||w||j||(k(!0),Q.current&&Q.current.focus())}function ce(){O(!0),k(!0)}function re(){O(!1),k(!1)}function ee(){k(!0)}function be(){k(!1)}function le($){return $.name.toLowerCase().includes(S.toLowerCase())}function se($){return x.prefix?$.replace(x.prefix,"").replaceAll(" ","").replaceAll("-","").replaceAll("(","").replaceAll(")","").trim():$.replaceAll(" ","").replaceAll("-","").replaceAll("(","").replaceAll(")","").trim()}function oe($){let Z=x.code;return x.prefix&&(Z+=`-${x.prefix}`),Z+=" ",Z+=se($||G),Z}return c.jsxs(me,{children:[n&&c.jsx(fe,{showAsterisk:d,children:n}),c.jsxs(hs,{id:H,disabled:M,isError:z,isLoading:o,isFocused:w,readOnly:i,size:l,variant:f,className:r,onFocus:E,children:[c.jsx(ks,{currentCountry:x,onClick:ce,size:l}),c.jsxs(vs,{isOpen:M?!1:j,search:S,placeholder:g,onSearch:V,children:[Re.filter($=>le($)).map($=>c.jsx(ys,{country:$,handleChangeValue:()=>{P($),O(!1),A($.mask)},isActive:$.iso===x.iso,size:l},$.iso)),Re.filter($=>le($)).length===0&&c.jsx("p",{children:h})]}),c.jsx(ps,{isOpen:M?!1:j,onClick:re}),c.jsx(bs,{ref:Q,currentCountry:x,value:G,onChange:$=>{A($),p&&p(oe($))},disabled:M,onBlur:be,onFocus:ee,size:l}),c.jsx("input",{ref:F,type:"hidden",name:_,value:oe()})]}),L&&c.jsx(ke,{children:L})]})}function Es(e){const{children:t,button:n,closeOnClick:r,className:a="",orientation:s="bottomLeft"}=e,[o,i]=m.useState(!1),u=`arkynPopover ${s} ${o?"visibleTrue":"visibleFalse"} ${a}`;function f(){o||i(!0)}return Xe(o),c.jsxs("div",{className:u,onClick:f,children:[n,c.jsx(Le.motion.div,{style:{visibility:o?"visible":"hidden"},transition:{ease:"easeOut",duration:0},initial:{opacity:0},animate:{opacity:o?1:0},exit:{opacity:0},onClick:()=>r&&i(!1),className:"arkynPopoverContent",children:t}),o&&c.jsx("div",{onClick:()=>i(!1),className:"arkynPopoverOverlay"})]})}const Rn=m.createContext({});function ws(e){const{children:t,size:n,isError:r,handleChange:a,value:s}=e;return c.jsx(Rn.Provider,{value:{handleChange:a,value:s,size:n,isError:r},children:t})}function Ss(){return m.useContext(Rn)}function Ns(e){const{value:t,size:n,disabled:r,children:a,className:s="",...o}=e,{handleChange:i,size:l,value:u,isError:f}=Ss(),v=`arkynRadioBox ${n||l} ${u===t?"checkedTrue":"checkedFalse"} ${f?"errorTrue":"errorFalse"} ${r?"disabledTrue":"disabledFalse"} ${s}`;return c.jsxs("label",{className:v.trim(),children:[c.jsx("button",{type:"button",disabled:r,onClick:()=>i(t),onFocus:()=>i(t),...o}),a]})}function Fs(e){const{defaultValue:t="",name:n,label:r,showAsterisk:a,errorMessage:s,value:o,onChange:i,size:l="md",className:u="",...f}=e,[d,_]=m.useState(t),{fieldErrors:p}=ye();function g(w){_(w),i&&i(w)}const h=s||(p==null?void 0:p[n]),v=!!h,b=`arkynRadioGroup ${l} ${u}`;return c.jsxs(me,{children:[r&&c.jsx(fe,{showAsterisk:a,children:r}),c.jsxs(ws,{isError:v,size:l,value:o||d,handleChange:g,children:[c.jsx("input",{style:{display:"none"},type:"text",readOnly:!0,name:n,value:o||d}),c.jsx("div",{className:b.trim(),...f})]}),h&&c.jsx(ke,{children:h})]})}function Ts(e){const{label:t,size:n="lg",defaultChecked:r=!1,checked:a=null,value:s,unCheckedValue:o="",name:i,className:l="",onCheck:u,id:f,...d}=e,_=m.useRef(null),p=f||m.useId(),[g,h]=m.useState(r),v=typeof a=="boolean"?a:g;function b(){h(!g),u&&u(v?o:s||"checked")}const k=`arkynSwitch ${v?"checkedTrue":"checkedFalse"} ${n} ${l}`;return c.jsxs(me,{children:[t&&c.jsx(fe,{children:t}),c.jsx("button",{type:"button",onClick:b,className:k,...d,children:c.jsx("input",{id:p,type:"hidden",name:i,ref:_,onClick:b,value:v?s||"checked":o})})]})}const Xn=m.createContext({});function Os(){return m.useContext(Xn)}function Ps(e){return c.jsx(Xn.Provider,{value:e,children:e.children})}function As(e){const{children:t,disabled:n=!1,className:r="",onClick:a,value:s,...o}=e,{disabled:i,currentTab:l,changeCurrentTab:u}=Os(),f=i||n,p=`arkynTabButton ${f?"isDisabled":""} ${l===s&&s?"isActive":""} ${r}`;function g(h){u(s),a&&a(h)}return c.jsx("button",{onClick:g,className:p.trim(),...o,disabled:f,type:"button",children:t})}function Is(e){const{children:t,onChange:n,defaultValue:r,disabled:a=!1,className:s,...o}=e,[i,l]=m.useState(r||""),u=`arkynTabContainer ${s||""}`;function f(d){l(d),n&&n(d)}return c.jsx(Ps,{disabled:a,currentTab:i,changeCurrentTab:f,children:c.jsx("nav",{className:u.trim(),...o,children:t})})}function Ms(e){const{emptyMessage:t="Nenhum dado adicionado.",className:n,children:r,...a}=e,s=`arkynTableBody ${n}`,o=m.Children.count(r)===0;return c.jsx("tbody",{className:s.trim(),...a,children:o?c.jsx("tr",{className:"arkynTableBodyEmptyLine",children:c.jsx("td",{colSpan:100,children:c.jsx("div",{children:t})})}):r})}function Ds(e){const{className:t,children:n,...r}=e,a=`arkynTableCaption ${t}`;return c.jsx("caption",{className:a.trim(),...r,children:c.jsx("div",{className:"arkynTableCaptionContent",children:n})})}function Ls(e){const{children:t,className:n,...r}=e,a=`arkynTableContainer ${n}`;return c.jsx("div",{className:a.trim(),...r,children:c.jsx("table",{children:t})})}function $s(e){const{className:t,children:n,...r}=e,a=`arkynTableFooter ${t}`;return c.jsxs("tfoot",{className:a.trim(),...r,children:[c.jsx("tr",{className:"spacingRow"}),c.jsx("tr",{children:c.jsx("th",{colSpan:100,children:c.jsx("div",{className:"arkynTableFooterContent",children:n})})})]})}function Bs(e){const{className:t,children:n,...r}=e,a=`arkynTableHeader ${t}`;return c.jsxs("thead",{className:a.trim(),...r,children:[c.jsx("tr",{children:n}),c.jsx("tr",{className:"spacingRow"})]})}function js(e){const{variant:t="solid",size:n="md",className:r,errorMessage:a,disabled:s=!1,readOnly:o=!1,label:i,showAsterisk:l,name:u,onFocus:f,onBlur:d,title:_,style:p,id:g,...h}=e,{fieldErrors:v}=ye(),[b,w]=m.useState(!1),k=m.useRef(null),S=g||m.useId(),V=a||(v==null?void 0:v[u]),x=`arkynTextarea ${t} ${n} ${s||o?"opacityTrue":"opacityFalse"} ${!!V?"errorTrue":"errorFalse"} ${b?"focusedTrue":"focusedFalse"} ${r}`;function P(){s||!(k!=null&&k.current)||(w(!0),k.current.focus())}function D(H){w(!0),f&&f(H)}function F(H){w(!1),d&&d(H)}return c.jsxs(me,{children:[i&&c.jsx(fe,{showAsterisk:l,children:i}),c.jsx("section",{title:_,style:p,onClick:P,className:x,children:c.jsx("textarea",{id:S,disabled:s,readOnly:o,ref:k,onFocus:D,onBlur:F,...h})}),V&&c.jsx(fe,{children:V})]})}const Kn=m.createContext({});function zs(e){const{children:t=!1}=e,[n,r]=m.useState([]);function a(l){return!!n.some(u=>u.key===l)}function s(l){var u;return(u=n.find(f=>f.key===l))==null?void 0:u.data}function o(l,u){const f=a(l);r(f?d=>[...d.filter(p=>p.key!==l),{key:l,data:u}]:[...n,{key:l,data:u}])}function i(l){r(n.filter(u=>u.key!==l))}return c.jsx(Kn.Provider,{value:{drawerIsOpen:a,drawerData:s,openDrawer:o,closeDrawer:i},children:t})}function Hs(e){const t=m.useContext(Kn);if(Object.entries(t).length===0)throw new Error("useDrawer must be used within a Provider");if(e){const{drawerData:n,drawerIsOpen:r,openDrawer:a,closeDrawer:s}=t,o=r(e),i=n(e);return{drawerIsOpen:o,drawerData:i,openDrawer:f=>a(e,f),closeDrawer:()=>s(e)}}else return t}const Yn=m.createContext({});function Gs(e){const{children:t=!1}=e,[n,r]=m.useState([]);function a(u){return!!n.some(f=>f.key===u)}function s(u){var f;return(f=n.find(d=>d.key===u))==null?void 0:f.data}function o(u,f){const d=a(u);r(d?_=>[..._.filter(g=>g.key!==u),{key:u,data:f}]:[...n,{key:u,data:f}])}function i(u){r(n.filter(f=>f.key!==u))}function l(){r([])}return c.jsx(Yn.Provider,{value:{modalIsOpen:a,modalData:s,openModal:o,closeModal:i,closeAll:l},children:t})}function Us(e){const t=m.useContext(Yn);if(Object.entries(t).length===0)throw new Error("useModal must be used within a Provider");if(e){const{modalData:n,modalIsOpen:r,openModal:a,closeModal:s}=t,o=r(e),i=n(e);return{modalIsOpen:o,modalData:i,openModal:f=>a(e,f),closeModal:()=>s(e)}}else return t}function Vs(e,t=""){const n=new URLSearchParams(e),r=t?`${t}:`:"",a=s=>{Object.entries(s).forEach(([o,i])=>{i===void 0?n.delete(`${r}${o}`):n.set(`${r}${o}`,String(i))})};return{getParam:s=>n.get(`${r}${s}`),getScopedSearch:s=>{a(s);let o=n.toString();return o&&(o="?"+o),o}}}let qs={data:""},Ws=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||qs,Rs=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Xs=/\/\*[^]*?\*\/| +/g,Zn=/\n+/g,Fe=(e,t)=>{let n="",r="",a="";for(let s in e){let o=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+o+";":r+=s[1]=="f"?Fe(o,s):s+"{"+Fe(o,s[1]=="k"?"":t)+"}":typeof o=="object"?r+=Fe(o,t?t.replace(/([^,])+/g,i=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,i):i?i+" "+l:l)):s):o!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=Fe.p?Fe.p(s,o):s+":"+o+";")}return n+(t&&a?t+"{"+a+"}":a)+r},we={},Jn=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Jn(e[n]);return t}return e},Ks=(e,t,n,r,a)=>{let s=Jn(e),o=we[s]||(we[s]=(l=>{let u=0,f=11;for(;u<l.length;)f=101*f+l.charCodeAt(u++)>>>0;return"go"+f})(s));if(!we[o]){let l=s!==e?e:(u=>{let f,d,_=[{}];for(;f=Rs.exec(u.replace(Xs,""));)f[4]?_.shift():f[3]?(d=f[3].replace(Zn," ").trim(),_.unshift(_[0][d]=_[0][d]||{})):_[0][f[1]]=f[2].replace(Zn," ").trim();return _[0]})(e);we[o]=Fe(a?{["@keyframes "+o]:l}:l,n?"":"."+o)}let i=n&&we.g?we.g:null;return n&&(we.g=we[o]),((l,u,f,d)=>{d?u.data=u.data.replace(d,l):u.data.indexOf(l)===-1&&(u.data=f?l+u.data:u.data+l)})(we[o],t,r,i),o},Ys=(e,t,n)=>e.reduce((r,a,s)=>{let o=t[s];if(o&&o.call){let i=o(n),l=i&&i.props&&i.props.className||/^go/.test(i)&&i;o=l?"."+l:i&&typeof i=="object"?i.props?"":Fe(i,""):i===!1?"":i}return r+a+(o??"")},"");function mt(e){let t=this||{},n=e.call?e(t.p):e;return Ks(n.unshift?n.raw?Ys(n,[].slice.call(arguments,1),t.p):n.reduce((r,a)=>Object.assign(r,a&&a.call?a(t.p):a),{}):n,Ws(t.target),t.g,t.o,t.k)}let Qn,Wt,Rt;mt.bind({g:1});let Se=mt.bind({k:1});function Zs(e,t,n,r){Fe.p=t,Qn=e,Wt=n,Rt=r}function Te(e,t){let n=this||{};return function(){let r=arguments;function a(s,o){let i=Object.assign({},s),l=i.className||a.className;n.p=Object.assign({theme:Wt&&Wt()},i),n.o=/ *go\d+/.test(l),i.className=mt.apply(n,r)+(l?" "+l:"");let u=e;return e[0]&&(u=i.as||e,delete i.as),Rt&&u[0]&&Rt(i),Qn(u,i)}return a}}var Js=e=>typeof e=="function",ht=(e,t)=>Js(e)?e(t):e,Qs=(()=>{let e=0;return()=>(++e).toString()})(),er=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),eo=20,Xt="default",tr=(e,t)=>{let{toastLimit:n}=e.settings;switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,n)};case 1:return{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case 2:let{toast:r}=t;return tr(e,{type:e.toasts.find(o=>o.id===r.id)?1:0,toast:r});case 3:let{toastId:a}=t;return{...e,toasts:e.toasts.map(o=>o.id===a||a===void 0?{...o,dismissed:!0,visible:!1}:o)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let s=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+s}))}}},pt=[],nr={toasts:[],pausedAt:void 0,settings:{toastLimit:eo}},xe={},rr=(e,t=Xt)=>{xe[t]=tr(xe[t]||nr,e),pt.forEach(([n,r])=>{n===t&&r(xe[t])})},ar=e=>Object.keys(xe).forEach(t=>rr(e,t)),to=e=>Object.keys(xe).find(t=>xe[t].toasts.some(n=>n.id===e)),yt=(e=Xt)=>t=>{rr(t,e)},no={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},ro=(e={},t=Xt)=>{let[n,r]=m.useState(xe[t]||nr),a=m.useRef(xe[t]);m.useEffect(()=>(a.current!==xe[t]&&r(xe[t]),pt.push([t,r]),()=>{let o=pt.findIndex(([i])=>i===t);o>-1&&pt.splice(o,1)}),[t]);let s=n.toasts.map(o=>{var i,l,u;return{...e,...e[o.type],...o,removeDelay:o.removeDelay||((i=e[o.type])==null?void 0:i.removeDelay)||(e==null?void 0:e.removeDelay),duration:o.duration||((l=e[o.type])==null?void 0:l.duration)||(e==null?void 0:e.duration)||no[o.type],style:{...e.style,...(u=e[o.type])==null?void 0:u.style,...o.style}}});return{...n,toasts:s}},ao=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||Qs()}),tt=e=>(t,n)=>{let r=ao(t,e,n);return yt(r.toasterId||to(r.id))({type:2,toast:r}),r.id},J=(e,t)=>tt("blank")(e,t);J.error=tt("error"),J.success=tt("success"),J.loading=tt("loading"),J.custom=tt("custom"),J.dismiss=(e,t)=>{let n={type:3,toastId:e};t?yt(t)(n):ar(n)},J.dismissAll=e=>J.dismiss(void 0,e),J.remove=(e,t)=>{let n={type:4,toastId:e};t?yt(t)(n):ar(n)},J.removeAll=e=>J.remove(void 0,e),J.promise=(e,t,n)=>{let r=J.loading(t.loading,{...n,...n==null?void 0:n.loading});return typeof e=="function"&&(e=e()),e.then(a=>{let s=t.success?ht(t.success,a):void 0;return s?J.success(s,{id:r,...n,...n==null?void 0:n.success}):J.dismiss(r),a}).catch(a=>{let s=t.error?ht(t.error,a):void 0;s?J.error(s,{id:r,...n,...n==null?void 0:n.error}):J.dismiss(r)}),e};var so=1e3,oo=(e,t="default")=>{let{toasts:n,pausedAt:r}=ro(e,t),a=m.useRef(new Map).current,s=m.useCallback((d,_=so)=>{if(a.has(d))return;let p=setTimeout(()=>{a.delete(d),o({type:4,toastId:d})},_);a.set(d,p)},[]);m.useEffect(()=>{if(r)return;let d=Date.now(),_=n.map(p=>{if(p.duration===1/0)return;let g=(p.duration||0)+p.pauseDuration-(d-p.createdAt);if(g<0){p.visible&&J.dismiss(p.id);return}return setTimeout(()=>J.dismiss(p.id,t),g)});return()=>{_.forEach(p=>p&&clearTimeout(p))}},[n,r,t]);let o=m.useCallback(yt(t),[t]),i=m.useCallback(()=>{o({type:5,time:Date.now()})},[o]),l=m.useCallback((d,_)=>{o({type:1,toast:{id:d,height:_}})},[o]),u=m.useCallback(()=>{r&&o({type:6,time:Date.now()})},[r,o]),f=m.useCallback((d,_)=>{let{reverseOrder:p=!1,gutter:g=8,defaultPosition:h}=_||{},v=n.filter(k=>(k.position||h)===(d.position||h)&&k.height),b=v.findIndex(k=>k.id===d.id),w=v.filter((k,S)=>S<b&&k.visible).length;return v.filter(k=>k.visible).slice(...p?[w+1]:[0,w]).reduce((k,S)=>k+(S.height||0)+g,0)},[n]);return m.useEffect(()=>{n.forEach(d=>{if(d.dismissed)s(d.id,d.removeDelay);else{let _=a.get(d.id);_&&(clearTimeout(_),a.delete(d.id))}})},[n,s]),{toasts:n,handlers:{updateHeight:l,startPause:i,endPause:u,calculateOffset:f}}},io=Se`
1
+ (function(C,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("react/jsx-runtime"),require("react"),require("lucide-react"),require("framer-motion"),require("@react-input/mask")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","lucide-react","framer-motion","@react-input/mask"],c):(C=typeof globalThis<"u"?globalThis:C||self,c(C["@arkyn/components"]={},C.jsxRuntime,C.b,C.lucideReact,C.framerMotion,C.mask))})(this,function(C,c,h,B,Le,Tn){"use strict";function va(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const te=va(h);function On(e){const{className:t,...n}=e,r=`arkynAlertTitle ${t}`;return c.jsx("div",{className:r.trim(),...n})}const Pn=h.createContext({});function ka(){return h.useContext(Pn)}function Ca(e){const{schema:t,children:n,className:r,...a}=e,i=!(u=>{let f=!1;const d=_=>{Array.isArray(_)?_.forEach(d):_&&typeof _=="object"&&"type"in _&&(_.type===On?f=!0:_.props&&typeof _.props=="object"&&_.props!==null&&"children"in _.props&&d(_.props.children))};return d(u),f})(n)?"nonExistsAlertTitle":"existsAlertTitle",l=`arkynAlertContainer ${t} ${i} ${r}`;return c.jsx(Pn.Provider,{value:e,children:c.jsx("div",{className:l.trim(),...a,children:n})})}function ba(e){const{className:t,...n}=e,r=`arkynAlertContent ${t}`;return c.jsx("div",{className:r.trim(),...n})}function xa(e){const{className:t,...n}=e,r=`arkynAlertDescription ${t}`;return c.jsx("div",{className:r.trim(),...n})}function Ea(e){const{className:t,...n}=e,{schema:r}=ka(),a=`arkynAlertIcon ${r} ${t}`;switch(r){case"success":return c.jsx(B.CheckCircle2,{className:a,...n});case"danger":return c.jsx(B.XCircle,{className:a,...n});case"warning":return c.jsx(B.AlertTriangle,{className:a,...n});case"info":return c.jsx(B.Info,{className:a,...n})}}function An(e){function t(){return!e||e<=0?0:e>=100?100:e}const[n,r]=h.useState(t());function a(s){return s<=0?r(0):s>=100?r(100):r(s)}return[n,a]}function In(e){const{onChange:t,value:n,disabled:r=!1,onDragging:a,className:s="",...o}=e,[i,l]=h.useState(!1),u=h.useRef(null),f=()=>l(!0),d=()=>l(!1),_=b=>{if(r||!i||!u.current)return;const w=u.current.getBoundingClientRect(),k=b.clientX-w.left,S=Math.min(Math.max(k/w.width*100,0),100);t(S)},p=b=>{if(r||!u.current)return;const w=u.current.getBoundingClientRect(),k=b.clientX-w.left,S=Math.min(Math.max(k/w.width*100,0),100);t(S)};h.useEffect(()=>(i?(a&&a(!0),document.addEventListener("mousemove",_),document.addEventListener("mouseup",d)):(a&&a(!1),document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",d)),()=>{document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",d)}),[i]);const v=`arkynSliderTrack ${i?"isDragging":"isNotDragging"} ${r?"isDisabled":"isEnabled"} ${s}`;return c.jsxs("div",{...o,className:v,onMouseDown:f,onClick:p,ref:u,children:[c.jsx("div",{className:"arkynSliderFill",style:{width:`${n}%`}}),c.jsx("div",{className:"arkynSliderThumb",style:{left:`${n}%`}})]})}function Mn(e){var j,O,G,A;const{onPlayAudio:t,onPauseAudio:n,disabled:r,...a}=e,[s,o]=An(0),[i,l]=h.useState(!1),[u,f]=h.useState(!1),d=h.useRef(null),_=(j=d.current)==null?void 0:j.currentTime,p=(O=d.current)==null?void 0:O.duration,g=b(_),m=b(p),v={totalTime:p,currentTime:_,formattedCurrentTime:g,formattedTotalTime:m};function b(x){if(!x)return"00:00";const P=Math.floor(x/60),D=Math.floor(x%60),F=String(P).padStart(2,"0"),H=String(D).padStart(2,"0");return`${F}:${H}`}function w(){const x=d.current;x&&(e.onPlayAudio&&e.onPlayAudio(v),x.play(),l(!0))}function k(){const x=d.current;x&&(e.onPauseAudio&&e.onPauseAudio(v),x.pause(),l(!1))}function S(){i?k():w()}function V(x){const P=d.current;if(!P)return;const D=P.duration,F=x/100*D;P.currentTime=F}return u||!i?(G=d.current)==null||G.pause():i&&((A=d.current)==null||A.play()),h.useEffect(()=>{const x=d.current;if(!x)return;const P=()=>{const D=x.duration,H=x.currentTime/D*100;o(H)};return x.addEventListener("timeupdate",P),()=>{x.removeEventListener("timeupdate",P)}},[]),c.jsxs("div",{className:"arkynAudioPlayer",children:[c.jsx("audio",{...a,ref:d,src:e.src,onEnded:k}),c.jsxs("button",{type:"button",disabled:r,onClick:S,children:[i&&c.jsx(B.Pause,{}),!i&&c.jsx(B.Play,{})]}),c.jsx("p",{children:g}),c.jsx(In,{value:s,onChange:V,onDragging:f,disabled:r}),c.jsx("p",{children:m})]})}const Dn=h.createContext({});function wa(e){const{children:t,fieldErrors:n,form:r}=e;return c.jsxs(Dn.Provider,{value:{fieldErrors:n},children:[!r&&t,r&&h.cloneElement(r,r.props,t)]})}function ye(){return h.useContext(Dn)}function ke(e){const{children:t,className:n,...r}=e,a=`arkynFieldError ${n}`;return t?c.jsx("strong",{className:a.trim(),...r,children:t}):c.jsx(c.Fragment,{})}function fe(e){const{showAsterisk:t=!1,className:n="",...r}=e,s=`arkynFieldLabel ${t?"asteriskTrue":"asteriskFalse"} ${n}`;return c.jsx("label",{className:s.trim(),...r})}function me(e){const{children:t,className:n,...r}=e,a=`arkynFieldWrapper ${n}`;return c.jsx("section",{className:a.trim(),...r,children:t})}function X(e){const{iconSize:t,icon:n,className:r,show:a=!0}=e;return a?n?typeof n=="string"?c.jsx("p",{className:r,children:n}):c.jsx("p",{className:r,children:c.jsx(n,{size:t,strokeWidth:2.5})}):c.jsx(c.Fragment,{}):c.jsx(c.Fragment,{})}function $e(e){const{isLoading:t=!1,scheme:n="primary",variant:r="solid",loadingText:a,size:s="md",leftIcon:o,rightIcon:i,disabled:l,className:u="",children:f,...d}=e,p={xs:12,sm:16,md:20,lg:24}[s],v=`arkynButton ${t?"loadingTrue":"loadingFalse"} ${r} ${n} ${s} ${a?"loadingTextTrue":"loadingTextFalse"} ${u}`;return c.jsxs("button",{className:v,disabled:l||t,...d,children:[c.jsxs("div",{className:"arkynButtonSpinner",children:[c.jsx(B.Loader2,{size:p,strokeWidth:2.5}),a&&a]}),c.jsxs("div",{className:"arkynButtonContent",children:[c.jsx(X,{iconSize:p,icon:o}),f,c.jsx(X,{iconSize:p,icon:i})]})]})}function dt(e){const{className:t,orientation:n="horizontal",...r}=e,a=`arkynDivider ${n} ${t}`;return c.jsx("div",{className:a.trim(),...r})}function _t(e){const{isLoading:t=!1,scheme:n="primary",variant:r="solid",size:a="md",icon:s,disabled:o,className:i="",...l}=e,u={xs:12,sm:16,md:20,lg:24},d=`arkynIconButton ${r} ${n} ${a} ${t?"loadingTrue":"loadingFalse"} ${i}`;return c.jsxs("button",{disabled:o||t,className:d.trim(),...l,children:[c.jsx("div",{className:"arkynIconButtonSpinner",children:c.jsx(B.Loader2,{size:u[a],strokeWidth:2.5})}),c.jsx("div",{className:"arkynIconButtonContent",children:c.jsx(s,{size:u[a],strokeWidth:2.5})})]})}function gt(e){const{text:t,size:n="lg",children:r,orientation:a="top",className:s="",...o}=e,i=h.useId(),l=h.useRef(null),[u,f]=h.useState(a);h.useEffect(()=>{const _=()=>{if(!l.current)return;const m=document.getElementById(i);m&&(f(a),requestAnimationFrame(()=>{const v=m.getBoundingClientRect(),b=window.innerWidth,w=window.innerHeight;let k=a;a==="left"&&v.left<0?k="right":a==="right"&&v.right>b?k="left":a==="top"&&v.top<0?k="bottom":a==="bottom"&&v.bottom>w&&(k="top"),k==="right"&&v.right>b?k="left":k==="left"&&v.left<0?k="right":k==="bottom"&&v.bottom>w?k="top":k==="top"&&v.top<0&&(k="bottom"),f(k)}))},p=l.current;if(!p)return;const g=()=>{setTimeout(_,1)};return p.addEventListener("mouseenter",g),window.addEventListener("resize",_),()=>{p.removeEventListener("mouseenter",g),window.removeEventListener("resize",_)}},[a,i]);const d=`arkynTooltip ${n} ${u} ${s}`;return c.jsxs("div",{className:d.trim(),...o,ref:l,children:[r,c.jsx("div",{className:"arkynTooltipText",id:i,dangerouslySetInnerHTML:{__html:t}})]})}function Sa(e){const{filePath:t,disabled:n,acceptAudio:r,handleSelectFile:a,isLoading:s,reSendAudio:o,changeAudioButtonText:i}=e;function l(){if(n)return;const u=document.createElement("input");u.type="file",u.accept=r,u.onchange=f=>{var _;const d=(_=f.target.files)==null?void 0:_[0];d&&a(d)},u.click()}return c.jsxs("div",{className:"arkynAudioUploadHasFileContentContainer",children:[c.jsx(Mn,{src:t}),c.jsx(dt,{}),c.jsxs("div",{className:"arkynAudioUploadButtonsContainer",children:[!!o&&c.jsx(gt,{orientation:"bottom",text:"Reenviar áudio",children:c.jsx(_t,{type:"button","aria-label":"resend image",variant:"outline",scheme:"danger",size:"sm",isLoading:s,onClick:o,icon:B.RefreshCw,disabled:n})}),c.jsx($e,{isLoading:s,onClick:l,variant:"outline",size:"sm",type:"button",disabled:n,children:i})]})]})}function Na(e){const{dropAudioText:t,isLoading:n,acceptAudio:r,handleSelectFile:a,selectAudioButtonText:s,disabled:o}=e;function i(u){if(o)return;u.preventDefault();const f=u.dataTransfer.files[0];f&&a(f)}function l(){if(o)return;const u=document.createElement("input");u.type="file",u.accept=r,u.onchange=f=>{var _;const d=(_=f.target.files)==null?void 0:_[0];d&&a(d)},u.click()}return c.jsxs("div",{onDrop:i,className:"arkynAudioUploadNoFileContent",children:[c.jsx($e,{isLoading:n,onClick:l,variant:"ghost",size:"sm",type:"button",disabled:o,children:s}),c.jsx("p",{children:t})]})}function Fa(e){const{name:t,label:n,fileName:r="file",method:a="POST",onChange:s,fileResponseName:o="url",selectAudioButtonText:i="Selecionar arquivo de áudio",dropAudioText:l="Ou arraste e solte um arquivo de áudio aqui",changeAudioButtonText:u="Trocar arquivo de áudio",acceptAudio:f="audio/*",action:d,defaultValue:_="",showAsterisk:p=!1,disabled:g=!1}=e,{fieldErrors:m}=ye(),v=m==null?void 0:m[t],[b,w]=h.useState(_),[k,S]=h.useState(""),[V,j]=h.useState(null),[O,G]=h.useState(_),[A,x]=h.useState(!1);async function P(M){if(g)return;x(!0),j(M),S("");const Q=new FormData;Q.append(r,M),await fetch(d,{method:a,body:Q}).then(async E=>await E.json()).then(E=>{E!=null&&E.error?S(E.error):w(E==null?void 0:E[o]),s&&s(E==null?void 0:E[o])}).catch(E=>{console.error(E),S("Erro ao enviar audio")}).finally(()=>x(!1))}function D(M){if(!g){if(M.type.indexOf("audio")===-1){S("O arquivo selecionado não é um arquivo de áudio");return}G(URL.createObjectURL(M)),P(M)}}const F=v||k,z=`arkynAudioUpload ${F?"hasError":"noHasError"} ${O?"hasAudio":"noHasAudio"}`;return c.jsxs(me,{children:[n&&c.jsx(fe,{showAsterisk:p,children:n}),c.jsxs("div",{className:z,children:[c.jsx("input",{type:"hidden",name:t,value:b||""}),!O&&c.jsx(Na,{disabled:g,isLoading:A,acceptAudio:f,dropAudioText:l,handleSelectFile:D,selectAudioButtonText:i}),O&&c.jsx(Sa,{filePath:O,acceptAudio:f,changeAudioButtonText:u,disabled:g,handleSelectFile:D,isLoading:A,reSendAudio:F&&V?()=>P(V):void 0})]}),F&&c.jsx(ke,{children:F})]})}function Ta(e){const{variant:t="ghost",scheme:n="primary",size:r="lg",leftIcon:a,rightIcon:s,className:o="",children:i,...l}=e,f={md:12,lg:14}[r],d=`arkynBadge ${t} ${n} ${r} ${o}`;return c.jsxs("div",{className:d.trim(),...l,children:[c.jsx(X,{iconSize:f,icon:a}),c.jsx("p",{children:i}),c.jsx(X,{iconSize:f,icon:s})]})}const Ln=h.createContext({});function Oa(){return h.useContext(Ln)}function Pa(e){return c.jsx(Ln.Provider,{value:e,children:e.children})}function Aa(e){const{children:t,disabled:n=!1,className:r="",onClick:a,value:s,...o}=e,{disabled:i,currentTab:l,changeCurrentTab:u}=Oa(),f=i||n,p=`arkynCardTabButton ${f?"isDisabled":""} ${l===s&&s?"isActive":""} ${r}`;function g(m){u(s),a&&a(m)}return c.jsx("button",{onClick:g,className:p.trim(),...o,disabled:f,type:"button",children:t})}function Ia(e){const{children:t,onChange:n,defaultValue:r,disabled:a=!1,className:s,...o}=e,[i,l]=h.useState(r||""),u=`arkynCardTabContainer ${s||""}`;function f(d){l(d),n&&n(d)}return c.jsx(Pa,{disabled:a,currentTab:i,changeCurrentTab:f,children:c.jsx("nav",{className:u.trim(),...o,children:t})})}function Ma(e){const{id:t,name:n,className:r="",size:a="md",errorMessage:s,defaultChecked:o=!1,label:i,checked:l=null,onCheck:u,value:f,...d}=e,{fieldErrors:_}=ye(),p=h.useRef(null),g=t||h.useId(),m=s||(_==null?void 0:_[n]),v=!!m,[b,w]=h.useState(o||!1),k=typeof l=="boolean"?l:b,j=`arkynCheckbox ${a} ${v?"errorTrue":"errorFalse"} ${k?"checkedTrue":"checkedFalse"} ${r}`;function O(){const G=b;w(!G),u&&u(G?"":f||"checked")}return c.jsxs(me,{children:[i&&c.jsx(fe,{children:i}),c.jsxs("button",{id:g,type:"button",className:j,onClick:O,...d,children:[c.jsx("input",{type:"hidden",name:n,ref:p,value:k?f||"checked":""}),c.jsx(B.Check,{})]}),m&&c.jsx(ke,{children:m})]})}function Da(){return()=>{}}function $n(){return h.useSyncExternalStore(Da,()=>!0,()=>!1)}function La(e){const{children:t,fallback:n=null}=e;return $n()?c.jsx(c.Fragment,{children:t()}):c.jsx(c.Fragment,{children:n})}const Gt=e=>e.replace(/[^0-9]/g,""),Re=[{name:"Afghanistan",code:"+93",prefix:null,iso:"AF",flag:"https://cdn.kcak11.com/CountryFlags/countries/af.svg",mask:"__-___-____"},{name:"Aland Islands",code:"+358",prefix:null,iso:"AX",flag:"https://cdn.kcak11.com/CountryFlags/countries/ax.svg",mask:"(___) ___-__-__"},{name:"Albania",code:"+355",prefix:null,iso:"AL",flag:"https://cdn.kcak11.com/CountryFlags/countries/al.svg",mask:"(___) ___-___"},{name:"Algeria",code:"+213",prefix:null,iso:"DZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/dz.svg",mask:"__-___-____"},{name:"American Samoa",code:"+1",prefix:"684",iso:"AS",flag:"https://cdn.kcak11.com/CountryFlags/countries/as.svg",mask:"(684) ___-____"},{name:"Andorra",code:"+376",prefix:null,iso:"AD",flag:"https://cdn.kcak11.com/CountryFlags/countries/ad.svg",mask:"___-___"},{name:"Angola",code:"+244",prefix:null,iso:"AO",flag:"https://cdn.kcak11.com/CountryFlags/countries/ao.svg",mask:"(___) ___-___"},{name:"Anguilla",code:"+1",prefix:"264",iso:"AI",flag:"https://cdn.kcak11.com/CountryFlags/countries/ai.svg",mask:"(264) ___-____"},{name:"Antarctica",code:"+672",prefix:"1",iso:"AQ",flag:"https://cdn.kcak11.com/CountryFlags/countries/aq.svg",mask:"1__-___"},{name:"Antigua and Barbuda",code:"+1",prefix:"268",iso:"AG",flag:"https://cdn.kcak11.com/CountryFlags/countries/ag.svg",mask:"(268) ___-____"},{name:"Argentina",code:"+54",prefix:null,iso:"AR",flag:"https://cdn.kcak11.com/CountryFlags/countries/ar.svg",mask:"(___) ___-____"},{name:"Armenia",code:"+374",prefix:null,iso:"AM",flag:"https://cdn.kcak11.com/CountryFlags/countries/am.svg",mask:"__-___-___"},{name:"Aruba",code:"+297",prefix:null,iso:"AW",flag:"https://cdn.kcak11.com/CountryFlags/countries/aw.svg",mask:"___-____"},{name:"Ascension Island",code:"+247",prefix:null,iso:"AC",flag:"https://cdn.kcak11.com/CountryFlags/countries/sh.svg",mask:"____"},{name:"Australia",code:"+61",prefix:null,iso:"AU",flag:"https://cdn.kcak11.com/CountryFlags/countries/au.svg",mask:"_-____-____"},{name:"Austria",code:"+43",prefix:null,iso:"AT",flag:"https://cdn.kcak11.com/CountryFlags/countries/at.svg",mask:"(___) ___-____"},{name:"Azerbaijan",code:"+994",prefix:null,iso:"AZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/az.svg",mask:"__-___-__-__"},{name:"Bahamas",code:"+1",prefix:"242",iso:"BS",flag:"https://cdn.kcak11.com/CountryFlags/countries/bs.svg",mask:"(242) ___-____"},{name:"Bahrain",code:"+973",prefix:null,iso:"BH",flag:"https://cdn.kcak11.com/CountryFlags/countries/bh.svg",mask:"____-____"},{name:"Bangladesh",code:"+880",prefix:"1",iso:"BD",flag:"https://cdn.kcak11.com/CountryFlags/countries/bd.svg",mask:"1___-______"},{name:"Barbados",code:"+1",prefix:"246",iso:"BB",flag:"https://cdn.kcak11.com/CountryFlags/countries/bb.svg",mask:"(246) ___-____"},{name:"Belarus",code:"+375",prefix:null,iso:"BY",flag:"https://cdn.kcak11.com/CountryFlags/countries/by.svg",mask:"(__) ___-__-__"},{name:"Belgium",code:"+32",prefix:null,iso:"BE",flag:"https://cdn.kcak11.com/CountryFlags/countries/be.svg",mask:"(___) ___-___"},{name:"Belize",code:"+501",prefix:null,iso:"BZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/bz.svg",mask:"___-____"},{name:"Benin",code:"+229",prefix:null,iso:"BJ",flag:"https://cdn.kcak11.com/CountryFlags/countries/bj.svg",mask:"__-__-____"},{name:"Bermuda",code:"+1",prefix:"441",iso:"BM",flag:"https://cdn.kcak11.com/CountryFlags/countries/bm.svg",mask:"(441) ___-____"},{name:"Bhutan",code:"+975",prefix:null,iso:"BT",flag:"https://cdn.kcak11.com/CountryFlags/countries/bt.svg",mask:"_-___-___"},{name:"Bolivia",code:"+591",prefix:null,iso:"BO",flag:"https://cdn.kcak11.com/CountryFlags/countries/bo.svg",mask:"_-___-____"},{name:"Bosnia and Herzegovina",code:"+387",prefix:null,iso:"BA",flag:"https://cdn.kcak11.com/CountryFlags/countries/ba.svg",mask:"__-_____"},{name:"Botswana",code:"+267",prefix:null,iso:"BW",flag:"https://cdn.kcak11.com/CountryFlags/countries/bw.svg",mask:"__-___-___"},{name:"Brasil",code:"+55",prefix:null,iso:"BR",flag:"https://cdn.kcak11.com/CountryFlags/countries/br.svg",mask:"(__) _____-____"},{name:"British Indian Ocean Territory",code:"+246",prefix:null,iso:"IO",flag:"https://cdn.kcak11.com/CountryFlags/countries/io.svg",mask:"___-____"},{name:"Brunei Darussalam",code:"+673",prefix:null,iso:"BN",flag:"https://cdn.kcak11.com/CountryFlags/countries/bn.svg",mask:"___-____"},{name:"Bulgaria",code:"+359",prefix:null,iso:"BG",flag:"https://cdn.kcak11.com/CountryFlags/countries/bg.svg",mask:"(___) ___-___"},{name:"Burkina Faso",code:"+226",prefix:null,iso:"BF",flag:"https://cdn.kcak11.com/CountryFlags/countries/bf.svg",mask:"__-__-____"},{name:"Burundi",code:"+257",prefix:null,iso:"BI",flag:"https://cdn.kcak11.com/CountryFlags/countries/bi.svg",mask:"__-__-____"},{name:"Cambodia",code:"+855",prefix:null,iso:"KH",flag:"https://cdn.kcak11.com/CountryFlags/countries/kh.svg",mask:"__-___-___"},{name:"Cameroon",code:"+237",prefix:null,iso:"CM",flag:"https://cdn.kcak11.com/CountryFlags/countries/cm.svg",mask:"____-____"},{name:"Canada",code:"+1",prefix:null,iso:"CA",flag:"https://cdn.kcak11.com/CountryFlags/countries/ca.svg",mask:"(___) ___-____"},{name:"Cape Verde",code:"+238",prefix:null,iso:"CV",flag:"https://cdn.kcak11.com/CountryFlags/countries/cv.svg",mask:"(___) __-__"},{name:"Cayman Islands",code:"+1",prefix:"345",iso:"KY",flag:"https://cdn.kcak11.com/CountryFlags/countries/ky.svg",mask:"(345) ___-____"},{name:"Central African Republic",code:"+236",prefix:null,iso:"CF",flag:"https://cdn.kcak11.com/CountryFlags/countries/cf.svg",mask:"__-__-____"},{name:"Chad",code:"+235",prefix:null,iso:"TD",flag:"https://cdn.kcak11.com/CountryFlags/countries/td.svg",mask:"__-__-__-__"},{name:"Chile",code:"+56",prefix:null,iso:"CL",flag:"https://cdn.kcak11.com/CountryFlags/countries/cl.svg",mask:"_-____-____"},{name:"China",code:"+86",prefix:null,iso:"CN",flag:"https://cdn.kcak11.com/CountryFlags/countries/cn.svg",mask:"__-_____-_____"},{name:"Christmas Island",code:"+61",prefix:null,iso:"CX",flag:"https://cdn.kcak11.com/CountryFlags/countries/cx.svg",mask:"_-____-____"},{name:"Cocos (Keeling) Islands",code:"+61",prefix:null,iso:"CC",flag:"https://cdn.kcak11.com/CountryFlags/countries/cc.svg",mask:"_-____-____"},{name:"Colombia",code:"+57",prefix:null,iso:"CO",flag:"https://cdn.kcak11.com/CountryFlags/countries/co.svg",mask:"(___) ___-____"},{name:"Comoros",code:"+269",prefix:null,iso:"KM",flag:"https://cdn.kcak11.com/CountryFlags/countries/km.svg",mask:"__-_____"},{name:"Congo",code:"+242",prefix:null,iso:"CG",flag:"https://cdn.kcak11.com/CountryFlags/countries/cg.svg",mask:"__-_____"},{name:"Cook Islands",code:"+682",prefix:null,iso:"CK",flag:"https://cdn.kcak11.com/CountryFlags/countries/ck.svg",mask:"__-___"},{name:"Costa Rica",code:"+506",prefix:null,iso:"CR",flag:"https://cdn.kcak11.com/CountryFlags/countries/cr.svg",mask:"____-____"},{name:"Croatia",code:"+385",prefix:null,iso:"HR",flag:"https://cdn.kcak11.com/CountryFlags/countries/hr.svg",mask:"__-___-___"},{name:"Cuba",code:"+53",prefix:null,iso:"CU",flag:"https://cdn.kcak11.com/CountryFlags/countries/cu.svg",mask:"_-___-____"},{name:"Cyprus",code:"+357",prefix:null,iso:"CY",flag:"https://cdn.kcak11.com/CountryFlags/countries/cy.svg",mask:"__-___-___"},{name:"Czech Republic",code:"+420",prefix:null,iso:"CZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/cz.svg",mask:"(___) ___-___"},{name:"Democratic Republic of the Congo",code:"+243",prefix:null,iso:"CD",flag:"https://cdn.kcak11.com/CountryFlags/countries/cd.svg",mask:"(___) ___-___"},{name:"Denmark",code:"+45",prefix:null,iso:"DK",flag:"https://cdn.kcak11.com/CountryFlags/countries/dk.svg",mask:"__-__-__-__"},{name:"Djibouti",code:"+253",prefix:null,iso:"DJ",flag:"https://cdn.kcak11.com/CountryFlags/countries/dj.svg",mask:"__-__-__-__"},{name:"Dominica",code:"+1",prefix:"767",iso:"DM",flag:"https://cdn.kcak11.com/CountryFlags/countries/dm.svg",mask:"(767) ___-____"},{name:"Dominican Republic",code:"+1",prefix:"849",iso:"DO",flag:"https://cdn.kcak11.com/CountryFlags/countries/do.svg",mask:"(894) ___-____"},{name:"Ecuador",code:"+593",prefix:null,iso:"EC",flag:"https://cdn.kcak11.com/CountryFlags/countries/ec.svg",mask:"__-___-____"},{name:"Egypt",code:"+20",prefix:null,iso:"EG",flag:"https://cdn.kcak11.com/CountryFlags/countries/eg.svg",mask:"(___) ___-____"},{name:"El Salvador",code:"+503",prefix:null,iso:"SV",flag:"https://cdn.kcak11.com/CountryFlags/countries/sv.svg",mask:"__-__-____"},{name:"Equatorial Guinea",code:"+240",prefix:null,iso:"GQ",flag:"https://cdn.kcak11.com/CountryFlags/countries/gq.svg",mask:"__-___-____"},{name:"Eritrea",code:"+291",prefix:null,iso:"ER",flag:"https://cdn.kcak11.com/CountryFlags/countries/er.svg",mask:"_-___-___"},{name:"Estonia",code:"+372",prefix:null,iso:"EE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ee.svg",mask:"____-____"},{name:"Eswatini",code:"+268",prefix:null,iso:"SZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/sz.svg",mask:"__-__-____"},{name:"Ethiopia",code:"+251",prefix:null,iso:"ET",flag:"https://cdn.kcak11.com/CountryFlags/countries/et.svg",mask:"__-___-____"},{name:"Falkland Islands (Malvinas)",code:"+500",prefix:null,iso:"FK",flag:"https://cdn.kcak11.com/CountryFlags/countries/fk.svg",mask:"_____"},{name:"Faroe Islands",code:"+298",prefix:null,iso:"FO",flag:"https://cdn.kcak11.com/CountryFlags/countries/fo.svg",mask:"__ __ __"},{name:"Fiji",code:"+679",prefix:null,iso:"FJ",flag:"https://cdn.kcak11.com/CountryFlags/countries/fj.svg",mask:"__-_____"},{name:"Finland",code:"+358",prefix:null,iso:"FI",flag:"https://cdn.kcak11.com/CountryFlags/countries/fi.svg",mask:"__ ___ ____"},{name:"France",code:"+33",prefix:null,iso:"FR",flag:"https://cdn.kcak11.com/CountryFlags/countries/fr.svg",mask:"_ __ __ __ __"},{name:"French Guiana",code:"+594",prefix:null,iso:"GF",flag:"https://cdn.kcak11.com/CountryFlags/countries/gf.svg",mask:"___ __ __ __"},{name:"French Polynesia",code:"+689",prefix:null,iso:"PF",flag:"https://cdn.kcak11.com/CountryFlags/countries/pf.svg",mask:"__ __ __ __"},{name:"Gabon",code:"+241",prefix:null,iso:"GA",flag:"https://cdn.kcak11.com/CountryFlags/countries/ga.svg",mask:"_ __ __ __"},{name:"Gambia",code:"+220",prefix:null,iso:"GM",flag:"https://cdn.kcak11.com/CountryFlags/countries/gm.svg",mask:"___ ____"},{name:"Georgia",code:"+995",prefix:null,iso:"GE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ge.svg",mask:"(___) ___-___"},{name:"Germany",code:"+49",prefix:"3",iso:"DE",flag:"https://cdn.kcak11.com/CountryFlags/countries/de.svg",mask:"(3____) __-____"},{name:"Ghana",code:"+233",prefix:"03",iso:"GH",flag:"https://cdn.kcak11.com/CountryFlags/countries/gh.svg",mask:"03_ ___ ____"},{name:"Gibraltar",code:"+350",prefix:null,iso:"GI",flag:"https://cdn.kcak11.com/CountryFlags/countries/gi.svg",mask:"___-_____"},{name:"Greece",code:"+30",prefix:null,iso:"GR",flag:"https://cdn.kcak11.com/CountryFlags/countries/gr.svg",mask:"(___) ___-____"},{name:"Greenland",code:"+299",prefix:null,iso:"GL",flag:"https://cdn.kcak11.com/CountryFlags/countries/gl.svg",mask:"__-__-__"},{name:"Grenada",code:"+1",prefix:"473",iso:"GD",flag:"https://cdn.kcak11.com/CountryFlags/countries/gd.svg",mask:"(473) ___-____"},{name:"Guadeloupe",code:"+590",prefix:null,iso:"GP",flag:"https://cdn.kcak11.com/CountryFlags/countries/gp.svg",mask:"___ __ __ __"},{name:"Guam",code:"+1",prefix:"671",iso:"GU",flag:"https://cdn.kcak11.com/CountryFlags/countries/gu.svg",mask:"671 ___ ____"},{name:"Guatemala",code:"+502",prefix:null,iso:"GT",flag:"https://cdn.kcak11.com/CountryFlags/countries/gt.svg",mask:"_-___-____"},{name:"Guernsey",code:"+44",prefix:null,iso:"GG",flag:"https://cdn.kcak11.com/CountryFlags/countries/gg.svg",mask:"(____) ______"},{name:"Guinea",code:"+224",prefix:null,iso:"GN",flag:"https://cdn.kcak11.com/CountryFlags/countries/gn.svg",mask:"__-___-___"},{name:"Guinea-Bissau",code:"+245",prefix:null,iso:"GW",flag:"https://cdn.kcak11.com/CountryFlags/countries/gw.svg",mask:"_-______"},{name:"Guyana",code:"+592",prefix:null,iso:"GY",flag:"https://cdn.kcak11.com/CountryFlags/countries/gy.svg",mask:"___-____"},{name:"Haiti",code:"+509",prefix:null,iso:"HT",flag:"https://cdn.kcak11.com/CountryFlags/countries/ht.svg",mask:"__-__-____"},{name:"Holy See (Vatican City State)",code:"+39",prefix:"06698",iso:"VA",flag:"https://cdn.kcak11.com/CountryFlags/countries/va.svg",mask:"06 698_____"},{name:"Honduras",code:"+504",prefix:null,iso:"HN",flag:"https://cdn.kcak11.com/CountryFlags/countries/hn.svg",mask:"____-____"},{name:"Hong Kong",code:"+852",prefix:null,iso:"HK",flag:"https://cdn.kcak11.com/CountryFlags/countries/hk.svg",mask:"____-____"},{name:"Hungary",code:"+36",prefix:null,iso:"HU",flag:"https://cdn.kcak11.com/CountryFlags/countries/hu.svg",mask:"__ ___ ____"},{name:"Iceland",code:"+354",prefix:null,iso:"IS",flag:"https://cdn.kcak11.com/CountryFlags/countries/is.svg",mask:"___-____"},{name:"India",code:"+91",prefix:null,iso:"IN",flag:"https://cdn.kcak11.com/CountryFlags/countries/in.svg",mask:"(____) ___-___"},{name:"Indonesia",code:"+62",prefix:"8",iso:"ID",flag:"https://cdn.kcak11.com/CountryFlags/countries/id.svg",mask:"(8__) ___-__-___"},{name:"Iran",code:"+98",prefix:null,iso:"IR",flag:"https://cdn.kcak11.com/CountryFlags/countries/ir.svg",mask:"(___) ___-____"},{name:"Iraq",code:"+964",prefix:null,iso:"IQ",flag:"https://cdn.kcak11.com/CountryFlags/countries/iq.svg",mask:"(___) ___-____"},{name:"Ireland",code:"+353",prefix:null,iso:"IE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ie.svg",mask:"(___) ___-___"},{name:"Isle of Man",code:"+44",prefix:null,iso:"IM",flag:"https://cdn.kcak11.com/CountryFlags/countries/im.svg",mask:"(____) ______"},{name:"Israel",code:"+972",prefix:"5",iso:"IL",flag:"https://cdn.kcak11.com/CountryFlags/countries/il.svg",mask:"__-___-____"},{name:"Italy",code:"+39",prefix:null,iso:"IT",flag:"https://cdn.kcak11.com/CountryFlags/countries/it.svg",mask:"(___) ____-___"},{name:"Ivory Coast / Cote d'Ivoire",code:"+225",prefix:null,iso:"CI",flag:"https://cdn.kcak11.com/CountryFlags/countries/ci.svg",mask:"__-___-___"},{name:"Jamaica",code:"+1",prefix:"876",iso:"JM",flag:"https://cdn.kcak11.com/CountryFlags/countries/jm.svg",mask:"(876) ___-____"},{name:"Japan",code:"+81",prefix:null,iso:"JP",flag:"https://cdn.kcak11.com/CountryFlags/countries/jp.svg",mask:"__-____-____"},{name:"Jersey",code:"+44",prefix:null,iso:"JE",flag:"https://cdn.kcak11.com/CountryFlags/countries/je.svg",mask:"(____) ____-______"},{name:"Jordan",code:"+962",prefix:null,iso:"JO",flag:"https://cdn.kcak11.com/CountryFlags/countries/jo.svg",mask:"_-____-____"},{name:"Kazakhstan",code:"+77",prefix:null,iso:"KZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/kz.svg",mask:"(_____) _ __ __"},{name:"Kenya",code:"+254",prefix:null,iso:"KE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ke.svg",mask:"___-______"},{name:"Kiribati",code:"+686",prefix:null,iso:"KI",flag:"https://cdn.kcak11.com/CountryFlags/countries/ki.svg",mask:"__-___"},{name:"Korea, Democratic People's Republic of Korea",code:"+850",prefix:null,iso:"KP",flag:"https://cdn.kcak11.com/CountryFlags/countries/kp.svg",mask:"____-_____________"},{name:"Korea, Republic of South Korea",code:"+82",prefix:null,iso:"KR",flag:"https://cdn.kcak11.com/CountryFlags/countries/kr.svg",mask:"__-___-____"},{name:"Kosovo",code:"+383",prefix:null,iso:"XK",flag:"https://cdn.kcak11.com/CountryFlags/countries/xk.svg",mask:"___-___-___"},{name:"Kuwait",code:"+965",prefix:null,iso:"KW",flag:"https://cdn.kcak11.com/CountryFlags/countries/kw.svg",mask:"____-____"},{name:"Kyrgyzstan",code:"+996",prefix:null,iso:"KG",flag:"https://cdn.kcak11.com/CountryFlags/countries/kg.svg",mask:"(___) ___-___"},{name:"Laos",code:"+856",prefix:"20",iso:"LA",flag:"https://cdn.kcak11.com/CountryFlags/countries/la.svg",mask:"(20__) ___-___"},{name:"Latvia",code:"+371",prefix:null,iso:"LV",flag:"https://cdn.kcak11.com/CountryFlags/countries/lv.svg",mask:"__-___-___"},{name:"Lebanon",code:"+961",prefix:null,iso:"LB",flag:"https://cdn.kcak11.com/CountryFlags/countries/lb.svg",mask:"__-___-___"},{name:"Lesotho",code:"+266",prefix:null,iso:"LS",flag:"https://cdn.kcak11.com/CountryFlags/countries/ls.svg",mask:"_-___-____"},{name:"Liberia",code:"+231",prefix:null,iso:"LR",flag:"https://cdn.kcak11.com/CountryFlags/countries/lr.svg",mask:"__-___-___"},{name:"Libya",code:"+218",prefix:"21",iso:"LY",flag:"https://cdn.kcak11.com/CountryFlags/countries/ly.svg",mask:"21-___-____"},{name:"Liechtenstein",code:"+423",prefix:null,iso:"LI",flag:"https://cdn.kcak11.com/CountryFlags/countries/li.svg",mask:"(___) ___-____"},{name:"Lithuania",code:"+370",prefix:null,iso:"LT",flag:"https://cdn.kcak11.com/CountryFlags/countries/lt.svg",mask:"(___) __-___"},{name:"Luxembourg",code:"+352",prefix:null,iso:"LU",flag:"https://cdn.kcak11.com/CountryFlags/countries/lu.svg",mask:"(___) ___-___"},{name:"Macau",code:"+853",prefix:null,iso:"MO",flag:"https://cdn.kcak11.com/CountryFlags/countries/mo.svg",mask:"____-____"},{name:"Madagascar",code:"+261",prefix:null,iso:"MG",flag:"https://cdn.kcak11.com/CountryFlags/countries/mg.svg",mask:"__-__-_____"},{name:"Malawi",code:"+265",prefix:null,iso:"MW",flag:"https://cdn.kcak11.com/CountryFlags/countries/mw.svg",mask:"_-____-____"},{name:"Malaysia",code:"+60",prefix:null,iso:"MY",flag:"https://cdn.kcak11.com/CountryFlags/countries/my.svg",mask:"__-___-____"},{name:"Maldives",code:"+960",prefix:null,iso:"MV",flag:"https://cdn.kcak11.com/CountryFlags/countries/mv.svg",mask:"___-____"},{name:"Mali",code:"+223",prefix:null,iso:"ML",flag:"https://cdn.kcak11.com/CountryFlags/countries/ml.svg",mask:"__-__-____"},{name:"Malta",code:"+356",prefix:null,iso:"MT",flag:"https://cdn.kcak11.com/CountryFlags/countries/mt.svg",mask:"____-____"},{name:"Marshall Islands",code:"+692",prefix:null,iso:"MH",flag:"https://cdn.kcak11.com/CountryFlags/countries/mh.svg",mask:"___-____"},{name:"Martinique",code:"+596",prefix:null,iso:"MQ",flag:"https://cdn.kcak11.com/CountryFlags/countries/mq.svg",mask:"(___) __-__-__"},{name:"Mauritania",code:"+222",prefix:null,iso:"MR",flag:"https://cdn.kcak11.com/CountryFlags/countries/mr.svg",mask:"__-__-____"},{name:"Mauritius",code:"+230",prefix:null,iso:"MU",flag:"https://cdn.kcak11.com/CountryFlags/countries/mu.svg",mask:"___-____"},{name:"Mayotte",code:"+262",prefix:null,iso:"YT",flag:"https://cdn.kcak11.com/CountryFlags/countries/yt.svg",mask:"_____-____"},{name:"Mexico",code:"+52",prefix:null,iso:"MX",flag:"https://cdn.kcak11.com/CountryFlags/countries/mx.svg",mask:"(___) ___-____"},{name:"Micronesia, Federated States of Micronesia",code:"+691",prefix:null,iso:"FM",flag:"https://cdn.kcak11.com/CountryFlags/countries/fm.svg",mask:"___-____"},{name:"Moldova",code:"+373",prefix:null,iso:"MD",flag:"https://cdn.kcak11.com/CountryFlags/countries/md.svg",mask:"____-____"},{name:"Monaco",code:"+377",prefix:null,iso:"MC",flag:"https://cdn.kcak11.com/CountryFlags/countries/mc.svg",mask:"(___) ___-___"},{name:"Mongolia",code:"+976",prefix:null,iso:"MN",flag:"https://cdn.kcak11.com/CountryFlags/countries/mn.svg",mask:"__-__-____"},{name:"Montenegro",code:"+382",prefix:null,iso:"ME",flag:"https://cdn.kcak11.com/CountryFlags/countries/me.svg",mask:"__-___-___"},{name:"Montserrat",code:"+1",prefix:"664",iso:"MS",flag:"https://cdn.kcak11.com/CountryFlags/countries/ms.svg",mask:"(664) ___-____"},{name:"Morocco",code:"+212",prefix:null,iso:"MA",flag:"https://cdn.kcak11.com/CountryFlags/countries/ma.svg",mask:"__-____-___"},{name:"Mozambique",code:"+258",prefix:null,iso:"MZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/mz.svg",mask:"__-___-___"},{name:"Myanmar",code:"+95",prefix:null,iso:"MM",flag:"https://cdn.kcak11.com/CountryFlags/countries/mm.svg",mask:"__-___-___"},{name:"Namibia",code:"+264",prefix:null,iso:"NA",flag:"https://cdn.kcak11.com/CountryFlags/countries/na.svg",mask:"__-___-____"},{name:"Nauru",code:"+674",prefix:null,iso:"NR",flag:"https://cdn.kcak11.com/CountryFlags/countries/nr.svg",mask:"___-____"},{name:"Nepal",code:"+977",prefix:null,iso:"NP",flag:"https://cdn.kcak11.com/CountryFlags/countries/np.svg",mask:"__-___-___"},{name:"Netherlands",code:"+31",prefix:null,iso:"NL",flag:"https://cdn.kcak11.com/CountryFlags/countries/nl.svg",mask:"__-___-____"},{name:"New Caledonia",code:"+687",prefix:null,iso:"NC",flag:"https://cdn.kcak11.com/CountryFlags/countries/nc.svg",mask:"__-____"},{name:"New Zealand",code:"+64",prefix:null,iso:"NZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/nz.svg",mask:"(___) ___-____"},{name:"Nicaragua",code:"+505",prefix:null,iso:"NI",flag:"https://cdn.kcak11.com/CountryFlags/countries/ni.svg",mask:"____-____"},{name:"Niger",code:"+227",prefix:null,iso:"NE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ne.svg",mask:"__-__-____"},{name:"Nigeria",code:"+234",prefix:null,iso:"NG",flag:"https://cdn.kcak11.com/CountryFlags/countries/ng.svg",mask:"(___) ___-____"},{name:"Niue",code:"+683",prefix:null,iso:"NU",flag:"https://cdn.kcak11.com/CountryFlags/countries/nu.svg",mask:"____"},{name:"Norfolk Island",code:"+672",prefix:"3",iso:"NF",flag:"https://cdn.kcak11.com/CountryFlags/countries/nf.svg",mask:"3__-___"},{name:"North Macedonia",code:"+389",prefix:null,iso:"MK",flag:"https://cdn.kcak11.com/CountryFlags/countries/mk.svg",mask:"__-___-___"},{name:"Northern Mariana Islands",code:"+1",prefix:"670",iso:"MP",flag:"https://cdn.kcak11.com/CountryFlags/countries/mp.svg",mask:"(670) ___-____"},{name:"Norway",code:"+47",prefix:null,iso:"NO",flag:"https://cdn.kcak11.com/CountryFlags/countries/no.svg",mask:"(___) __-___"},{name:"Oman",code:"+968",prefix:null,iso:"OM",flag:"https://cdn.kcak11.com/CountryFlags/countries/om.svg",mask:"__-___-___"},{name:"Pakistan",code:"+92",prefix:null,iso:"PK",flag:"https://cdn.kcak11.com/CountryFlags/countries/pk.svg",mask:"(___) ___-____"},{name:"Palau",code:"+680",prefix:null,iso:"PW",flag:"https://cdn.kcak11.com/CountryFlags/countries/pw.svg",mask:"___-____"},{name:"Palestine",code:"+970",prefix:null,iso:"PS",flag:"https://cdn.kcak11.com/CountryFlags/countries/ps.svg",mask:"__-___-____"},{name:"Panama",code:"+507",prefix:null,iso:"PA",flag:"https://cdn.kcak11.com/CountryFlags/countries/pa.svg",mask:"___-____"},{name:"Papua New Guinea",code:"+675",prefix:null,iso:"PG",flag:"https://cdn.kcak11.com/CountryFlags/countries/pg.svg",mask:"(___) __-___"},{name:"Paraguay",code:"+595",prefix:null,iso:"PY",flag:"https://cdn.kcak11.com/CountryFlags/countries/py.svg",mask:"(___) ___-___"},{name:"Peru",code:"+51",prefix:null,iso:"PE",flag:"https://cdn.kcak11.com/CountryFlags/countries/pe.svg",mask:"(___) ___-___"},{name:"Philippines",code:"+63",prefix:null,iso:"PH",flag:"https://cdn.kcak11.com/CountryFlags/countries/ph.svg",mask:"(___) ___-____"},{name:"Pitcairn",code:"+870",prefix:null,iso:"PN",flag:"https://cdn.kcak11.com/CountryFlags/countries/pn.svg",mask:"___-___-___"},{name:"Poland",code:"+48",prefix:null,iso:"PL",flag:"https://cdn.kcak11.com/CountryFlags/countries/pl.svg",mask:"(___) ___-___"},{name:"Portugal",code:"+351",prefix:null,iso:"PT",flag:"https://cdn.kcak11.com/CountryFlags/countries/pt.svg",mask:"__-___-____"},{name:"Puerto Rico",code:"+1",prefix:null,iso:"PR",flag:"https://cdn.kcak11.com/CountryFlags/countries/pr.svg",mask:"(___) ___ ____"},{name:"Qatar",code:"+974",prefix:null,iso:"QA",flag:"https://cdn.kcak11.com/CountryFlags/countries/qa.svg",mask:"____-____"},{name:"Reunion",code:"+262",prefix:null,iso:"RE",flag:"https://cdn.kcak11.com/CountryFlags/countries/re.svg",mask:"_____-____"},{name:"Romania",code:"+40",prefix:null,iso:"RO",flag:"https://cdn.kcak11.com/CountryFlags/countries/ro.svg",mask:"__-___-____"},{name:"Russia",code:"+7",prefix:null,iso:"RU",flag:"https://cdn.kcak11.com/CountryFlags/countries/ru.svg",mask:"(___) ___-__-__"},{name:"Rwanda",code:"+250",prefix:null,iso:"RW",flag:"https://cdn.kcak11.com/CountryFlags/countries/rw.svg",mask:"(___) ___-___"},{name:"Saint Barthelemy",code:"+590",prefix:null,iso:"BL",flag:"https://cdn.kcak11.com/CountryFlags/countries/bl.svg",mask:"___-__-__-__"},{name:"Saint Helena, Ascension and Tristan Da Cunha",code:"+290",prefix:null,iso:"SH",flag:"https://cdn.kcak11.com/CountryFlags/countries/sh.svg",mask:"____"},{name:"Saint Kitts and Nevis",code:"+1",prefix:null,iso:"KN",flag:"https://cdn.kcak11.com/CountryFlags/countries/kn.svg",mask:"(869) ___-____"},{name:"Saint Lucia",code:"+1",prefix:"758",iso:"LC",flag:"https://cdn.kcak11.com/CountryFlags/countries/lc.svg",mask:"(758) ___-____"},{name:"Saint Martin",code:"+590",prefix:null,iso:"MF",flag:"https://cdn.kcak11.com/CountryFlags/countries/mf.svg",mask:"(___) ___-___"},{name:"Saint Pierre and Miquelon",code:"+508",prefix:null,iso:"PM",flag:"https://cdn.kcak11.com/CountryFlags/countries/pm.svg",mask:"__-____"},{name:"Saint Vincent and the Grenadines",code:"+1",prefix:"784",iso:"VC",flag:"https://cdn.kcak11.com/CountryFlags/countries/vc.svg",mask:"(784) ___-____"},{name:"Samoa",code:"+685",prefix:null,iso:"WS",flag:"https://cdn.kcak11.com/CountryFlags/countries/ws.svg",mask:"__-____"},{name:"San Marino",code:"+378",prefix:null,iso:"SM",flag:"https://cdn.kcak11.com/CountryFlags/countries/sm.svg",mask:"____-______"},{name:"Sao Tome and Principe",code:"+239",prefix:null,iso:"ST",flag:"https://cdn.kcak11.com/CountryFlags/countries/st.svg",mask:"__-_____"},{name:"Saudi Arabia",code:"+966",prefix:null,iso:"SA",flag:"https://cdn.kcak11.com/CountryFlags/countries/sa.svg",mask:"_-____-____"},{name:"Senegal",code:"+221",prefix:null,iso:"SN",flag:"https://cdn.kcak11.com/CountryFlags/countries/sn.svg",mask:"__-___-____"},{name:"Serbia",code:"+381",prefix:null,iso:"RS",flag:"https://cdn.kcak11.com/CountryFlags/countries/rs.svg",mask:"__-___-____"},{name:"Seychelles",code:"+248",prefix:null,iso:"SC",flag:"https://cdn.kcak11.com/CountryFlags/countries/sc.svg",mask:"_-___-___"},{name:"Sierra Leone",code:"+232",prefix:null,iso:"SL",flag:"https://cdn.kcak11.com/CountryFlags/countries/sl.svg",mask:"__-______"},{name:"Singapore",code:"+65",prefix:null,iso:"SG",flag:"https://cdn.kcak11.com/CountryFlags/countries/sg.svg",mask:"____-____"},{name:"Sint Maarten",code:"+1",prefix:"721",iso:"SX",flag:"https://cdn.kcak11.com/CountryFlags/countries/sx.svg",mask:"(721) ___-____"},{name:"Slovakia",code:"+421",prefix:null,iso:"SK",flag:"https://cdn.kcak11.com/CountryFlags/countries/sk.svg",mask:"(___) ___-___"},{name:"Slovenia",code:"+386",prefix:null,iso:"SI",flag:"https://cdn.kcak11.com/CountryFlags/countries/si.svg",mask:"__-___-___"},{name:"Solomon Islands",code:"+677",prefix:null,iso:"SB",flag:"https://cdn.kcak11.com/CountryFlags/countries/sb.svg",mask:"___-____"},{name:"Somalia",code:"+252",prefix:null,iso:"SO",flag:"https://cdn.kcak11.com/CountryFlags/countries/so.svg",mask:"__-___-___"},{name:"South Africa",code:"+27",prefix:null,iso:"ZA",flag:"https://cdn.kcak11.com/CountryFlags/countries/za.svg",mask:"__-___-____"},{name:"South Georgia and the South Sandwich Islands",code:"+500",prefix:null,iso:"GS",flag:"https://cdn.kcak11.com/CountryFlags/countries/gs.svg",mask:"_____"},{name:"South Sudan",code:"+211",prefix:null,iso:"SS",flag:"https://cdn.kcak11.com/CountryFlags/countries/ss.svg",mask:"__-___-____"},{name:"Spain",code:"+34",prefix:null,iso:"ES",flag:"https://cdn.kcak11.com/CountryFlags/countries/es.svg",mask:"(___) ___-___"},{name:"Sri Lanka",code:"+94",prefix:null,iso:"LK",flag:"https://cdn.kcak11.com/CountryFlags/countries/lk.svg",mask:"__-___-____"},{name:"Sudan",code:"+249",prefix:null,iso:"SD",flag:"https://cdn.kcak11.com/CountryFlags/countries/sd.svg",mask:"__-___-____"},{name:"Suriname",code:"+597",prefix:null,iso:"SR",flag:"https://cdn.kcak11.com/CountryFlags/countries/sr.svg",mask:"___-____"},{name:"Svalbard and Jan Mayen",code:"+47",prefix:null,iso:"SJ",flag:"https://cdn.kcak11.com/CountryFlags/countries/sj.svg",mask:"(___) __-___"},{name:"Sweden",code:"+46",prefix:null,iso:"SE",flag:"https://cdn.kcak11.com/CountryFlags/countries/se.svg",mask:"__-___-____"},{name:"Switzerland",code:"+41",prefix:null,iso:"CH",flag:"https://cdn.kcak11.com/CountryFlags/countries/ch.svg",mask:"__-___-____"},{name:"Syrian Arab Republic",code:"+963",prefix:null,iso:"SY",flag:"https://cdn.kcak11.com/CountryFlags/countries/sy.svg",mask:"__-____-___"},{name:"Taiwan",code:"+886",prefix:null,iso:"TW",flag:"https://cdn.kcak11.com/CountryFlags/countries/tw.svg",mask:"_-____-____"},{name:"Tajikistan",code:"+992",prefix:null,iso:"TJ",flag:"https://cdn.kcak11.com/CountryFlags/countries/tj.svg",mask:"__-___-____"},{name:"United Republic of Tanzania",code:"+255",prefix:null,iso:"TZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/tz.svg",mask:"__-___-____"},{name:"Thailand",code:"+66",prefix:null,iso:"TH",flag:"https://cdn.kcak11.com/CountryFlags/countries/th.svg",mask:"__-___-____"},{name:"Timor-Leste",code:"+670",prefix:null,iso:"TL",flag:"https://cdn.kcak11.com/CountryFlags/countries/tl.svg",mask:"___-_____"},{name:"Togo",code:"+228",prefix:null,iso:"TG",flag:"https://cdn.kcak11.com/CountryFlags/countries/tg.svg",mask:"__-___-___"},{name:"Tokelau",code:"+690",prefix:null,iso:"TK",flag:"https://cdn.kcak11.com/CountryFlags/countries/tk.svg",mask:"____"},{name:"Tonga",code:"+676",prefix:null,iso:"TO",flag:"https://cdn.kcak11.com/CountryFlags/countries/to.svg",mask:"_____"},{name:"Trinidad and Tobago",code:"+1",prefix:"868",iso:"TT",flag:"https://cdn.kcak11.com/CountryFlags/countries/tt.svg",mask:"(868) ___-____"},{name:"Tunisia",code:"+216",prefix:null,iso:"TN",flag:"https://cdn.kcak11.com/CountryFlags/countries/tn.svg",mask:"__-___-___"},{name:"Turkey",code:"+90",prefix:null,iso:"TR",flag:"https://cdn.kcak11.com/CountryFlags/countries/tr.svg",mask:"(___) ___-____"},{name:"Turkmenistan",code:"+993",prefix:null,iso:"TM",flag:"https://cdn.kcak11.com/CountryFlags/countries/tm.svg",mask:"_-___-____"},{name:"Turks and Caicos Islands",code:"+1",prefix:"249",iso:"TC",flag:"https://cdn.kcak11.com/CountryFlags/countries/tc.svg",mask:"(249) ___-___"},{name:"Tuvalu",code:"+688",prefix:null,iso:"TV",flag:"https://cdn.kcak11.com/CountryFlags/countries/tv.svg",mask:"______"},{name:"Uganda",code:"+256",prefix:null,iso:"UG",flag:"https://cdn.kcak11.com/CountryFlags/countries/ug.svg",mask:"(___) ___-___"},{name:"Ukraine",code:"+380",prefix:null,iso:"UA",flag:"https://cdn.kcak11.com/CountryFlags/countries/ua.svg",mask:"(__) ___-__-__"},{name:"United Arab Emirates",code:"+971",prefix:null,iso:"AE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ae.svg",mask:"_-___-____"},{name:"United Kingdom",code:"+44",prefix:null,iso:"GB",flag:"https://cdn.kcak11.com/CountryFlags/countries/gb.svg",mask:"__-____-____"},{name:"United States",code:"+1",prefix:"408",iso:"US",flag:"https://cdn.kcak11.com/CountryFlags/countries/us.svg",mask:"(408) ___-____"},{name:"Uruguay",code:"+598",prefix:null,iso:"UY",flag:"https://cdn.kcak11.com/CountryFlags/countries/uy.svg",mask:"_-___-__-__"},{name:"Uzbekistan",code:"+998",prefix:null,iso:"UZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/uz.svg",mask:"__-___-____"},{name:"Vanuatu",code:"+678",prefix:null,iso:"VU",flag:"https://cdn.kcak11.com/CountryFlags/countries/vu.svg",mask:"__-_____"},{name:"Venezuela, Bolivarian Republic of Venezuela",code:"+58",prefix:null,iso:"VE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ve.svg",mask:"(___) ___-____"},{name:"Vietnam",code:"+84",prefix:null,iso:"VN",flag:"https://cdn.kcak11.com/CountryFlags/countries/vn.svg",mask:"(___) ____-___"},{name:"Virgin Islands, British",code:"+1",prefix:"284",iso:"VG",flag:"https://cdn.kcak11.com/CountryFlags/countries/vg.svg",mask:"(284) ___-____"},{name:"Virgin Islands, U.S.",code:"+1",prefix:"340",iso:"VI",flag:"https://cdn.kcak11.com/CountryFlags/countries/vi.svg",mask:"(340) ___-____"},{name:"Wallis and Futuna",code:"+681",prefix:null,iso:"WF",flag:"https://cdn.kcak11.com/CountryFlags/countries/wf.svg",mask:"__-____"},{name:"Yemen",code:"+967",prefix:null,iso:"YE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ye.svg",mask:"___-___-___"},{name:"Zambia",code:"+260",prefix:null,iso:"ZM",flag:"https://cdn.kcak11.com/CountryFlags/countries/zm.svg",mask:"__-___-____"},{name:"Zimbabwe",code:"+263",prefix:null,iso:"ZW",flag:"https://cdn.kcak11.com/CountryFlags/countries/zw.svg",mask:"_-______"}],Bn={USD:{countryLanguage:"en-US",countryCurrency:"USD"},EUR:{countryLanguage:"de-DE",countryCurrency:"EUR"},JPY:{countryLanguage:"ja-JP",countryCurrency:"JPY"},GBP:{countryLanguage:"en-GB",countryCurrency:"GBP"},AUD:{countryLanguage:"en-AU",countryCurrency:"AUD"},CAD:{countryLanguage:"en-CA",countryCurrency:"CAD"},CHF:{countryLanguage:"de-CH",countryCurrency:"CHF"},CNY:{countryLanguage:"zh-CN",countryCurrency:"CNY"},SEK:{countryLanguage:"sv-SE",countryCurrency:"SEK"},NZD:{countryLanguage:"en-NZ",countryCurrency:"NZD"},BRL:{countryLanguage:"pt-BR",countryCurrency:"BRL"},INR:{countryLanguage:"en-IN",countryCurrency:"INR"},RUB:{countryLanguage:"ru-RU",countryCurrency:"RUB"},ZAR:{countryLanguage:"en-ZA",countryCurrency:"ZAR"},MXN:{countryLanguage:"es-MX",countryCurrency:"MXN"},SGD:{countryLanguage:"en-SG",countryCurrency:"SGD"},HKD:{countryLanguage:"zh-HK",countryCurrency:"HKD"},NOK:{countryLanguage:"nb-NO",countryCurrency:"NOK"},KRW:{countryLanguage:"ko-KR",countryCurrency:"KRW"},TRY:{countryLanguage:"tr-TR",countryCurrency:"TRY"},IDR:{countryLanguage:"id-ID",countryCurrency:"IDR"},THB:{countryLanguage:"th-TH",countryCurrency:"THB"}},$a=e=>e.replace(new RegExp("(?:R\\$|\\p{Sc}|[$€¥£])","gu"),"").trim(),jn=(e,t,n={showPrefix:!0})=>{if(!Bn[t])throw new Error("Unsupported currency code");const{countryCurrency:r,countryLanguage:a}=Bn[t],s=new Intl.NumberFormat(a,{style:"currency",currency:r}).format(e);return n.showPrefix?s.replace(/\s/g," "):$a(s).replace(/\s/g," ")};Gt({NINE:"(99) 99999-9999"}.NINE).length;function Ba(e){let t=e;return typeof e=="string"?(t=+Gt(e),t%1!==0&&(t=t.toFixed(2))):t=Number.isInteger(e)?Number(e)*10**2:e.toFixed(2),+Gt(String(t))/10**2}function Ut(e,t){if(!e)return[0,jn(0,t)];const n=Ba(e),r=jn(n,t);return[n,r]}function ja(e){const{name:t,disabled:n,title:r,style:a,variant:s="solid",label:o,className:i="",value:l,defaultValue:u,max:f,locale:d,onChange:_,prefix:p,suffix:g,isLoading:m=!1,leftIcon:v,readOnly:b,onFocus:w,onBlur:k,errorMessage:S,showAsterisk:V,rightIcon:j,size:O="md",id:G,...A}=e,{fieldErrors:x}=ye(),[P,D]=h.useState(!1),[F,H]=h.useState("0"),L=h.useRef(null),z=G||h.useId(),M=S||(x==null?void 0:x[t]),Q=!!M,E=n||m,re={md:20,lg:20}[O],ee=j?"right":"left",be=ee==="left"&&m,le=ee==="right"&&m;function se(){E||!(L!=null&&L.current)||(D(!0),L.current.focus())}function oe(ge){D(!0),w&&w(ge)}function $(ge){D(!1),k&&k(ge)}const Z=ge=>{const[De,Ve]=Ut(ge,d);return!f||De<=f?(H(Ve),[De,Ve]):Ut(ge,d)},Ie=ge=>{ge.preventDefault();const[De,Ve]=Z(ge.target.value);_&&_(ge,String(De),String(Ve))};h.useEffect(()=>{const ge=l||+u||void 0,[,De]=Ut(ge,d);H(De)},[d,u,l]);const wn=`arkynCurrencyInput ${p?"hasPrefix":""} ${g?"hasSuffix":""} ${s} ${O} ${E||b||m?"opacity":""} ${Q?"errored":""} ${P?"focused":""} ${i}`;return c.jsxs(me,{children:[o&&c.jsx(fe,{showAsterisk:V,htmlFor:z,children:o}),c.jsxs("section",{title:r,style:a,onClick:se,className:wn,children:[c.jsx(X,{iconSize:re,icon:p,className:"prefix"}),c.jsx(X,{show:be,iconSize:re,className:"spinner",icon:B.Loader2}),c.jsx(X,{show:!m,icon:v,iconSize:re}),c.jsx("input",{value:F,disabled:E,readOnly:b,ref:L,onFocus:oe,onBlur:$,onChange:Ie,id:z,name:t,...A}),c.jsx(X,{show:!m,icon:j,iconSize:re}),c.jsx(X,{show:le,iconSize:re,className:"spinner",icon:B.Loader2}),c.jsx(X,{iconSize:re,icon:g,className:"suffix"})]}),M&&c.jsx(ke,{children:M})]})}function za(){return typeof window>"u"?0:window.innerWidth-document.documentElement.clientWidth}function Xe(e){h.useEffect(()=>{if(e){const t=document.body.style.overflow,n=document.body.style.paddingRight,r=za();if(r>0){const a=window.getComputedStyle(document.body),s=parseInt(a.paddingRight)||0;document.body.style.paddingRight=`${s+r}px`}return document.body.style.overflow="hidden",()=>{document.body.style.overflow=t,document.body.style.paddingRight=n}}},[e])}const zn=h.createContext({});function Ha(e){return c.jsx(zn.Provider,{value:{makeInvisible:e.makeInvisible},children:e.children})}function Ga(){return h.useContext(zn)}function Ua(e){const{isVisible:t,makeInvisible:n,orientation:r="left",children:a,className:s,...o}=e;Xe(t);const i=r==="left"?"-100%":"100%",u=`arkynDrawerContainer ${r} ${t?"visibleTrue":"visibleFalse"} ${s}`;return c.jsx(Ha,{makeInvisible:n,children:c.jsx(Le.AnimatePresence,{children:t&&c.jsxs("aside",{className:u.trim(),...o,children:[c.jsx(Le.motion.div,{className:"arkynDrawerContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),c.jsx(Le.motion.div,{className:"arkynDrawerContainerContent",transition:{ease:"easeOut",duration:.15},initial:{transform:`translateX(${i})`},animate:{transform:"translateX(0px)"},exit:{transform:`translateX(${i})`},children:a})]})})})}function Va(e){const{showCloseButton:t=!0,className:n,children:r,...a}=e,{makeInvisible:s}=Ga(),o=`arkynDrawerHeader ${n}`;return c.jsxs("header",{className:o.trim(),...a,children:[r,t&&c.jsx("button",{className:"arkynDrawerHeaderCloseButton",type:"button",onClick:s,"aria-label":"Close drawer",children:c.jsx(B.X,{size:24})})]})}function qa(e){const{disabled:t,file:n,isLoading:r,acceptFile:a,changeFileButtonText:s,handleSelectFile:o,reSendFile:i}=e;function l(){if(t)return;const f=document.createElement("input");f.type="file",f.accept=a,f.onchange=d=>{var p;const _=(p=d.target.files)==null?void 0:p[0];_&&o(_)},f.click()}function u(){return n.type.startsWith("image/")?c.jsx(B.FileImage,{}):n.type.startsWith("audio/")?c.jsx(B.FileAudio,{}):n.type.startsWith("application/zip")?c.jsx(B.FileArchive,{}):c.jsx(B.File,{})}return c.jsxs("div",{className:"arkynFileUploadHasFileContent",children:[c.jsxs("section",{className:"arkynFileUploadFileContainer",children:[c.jsx(u,{}),c.jsx("p",{children:n.name})]}),c.jsx(dt,{}),c.jsxs("div",{className:"arkynFileUploadButtonsContainer",children:[!!i&&c.jsx(gt,{orientation:"bottom",text:"Reenviar arquivo",children:c.jsx(_t,{type:"button","aria-label":"resend file",variant:"outline",scheme:"danger",size:"sm",isLoading:r,onClick:i,icon:B.RefreshCw,disabled:t})}),c.jsx($e,{isLoading:r,onClick:l,variant:"outline",size:"sm",type:"button",disabled:t,children:s})]})]})}function Wa(e){const{dropFileText:t,isLoading:n,acceptFile:r,handleSelectFile:a,selectFileButtonText:s,disabled:o}=e;function i(u){if(o)return;u.preventDefault();const f=u.dataTransfer.files[0];f&&a(f)}function l(){if(o)return;const u=document.createElement("input");u.type="file",u.accept=r,u.onchange=f=>{var _;const d=(_=f.target.files)==null?void 0:_[0];d&&a(d)},u.click()}return c.jsxs("div",{onDrop:i,className:"arkynFileUploadNoFileContent",children:[c.jsx($e,{isLoading:n,onClick:l,variant:"ghost",size:"sm",type:"button",disabled:o,children:s}),c.jsx("p",{children:t})]})}function Ra(e){const{name:t,label:n,showAsterisk:r=!1,action:a,fileName:s="file",method:o="POST",acceptFile:i="*",fileResponseName:l="url",changeFileButtonText:u="Alterar arquivo",selectFileButtonText:f="Selecionar arquivo",dropFileText:d="Ou arraste e solte o arquivo aqui",onChange:_,disabled:p=!1}=e,{fieldErrors:g}=ye(),m=g==null?void 0:g[t],[v,b]=h.useState(""),[w,k]=h.useState(""),[S,V]=h.useState(null),[j,O]=h.useState(!1);async function G(H){if(p)return;O(!0),V(H),k("");const L=new FormData;L.append(s,H),await fetch(a,{method:o,body:L}).then(async z=>await z.json()).then(z=>{z!=null&&z.error?k(z.error):b(z==null?void 0:z[l]),_&&_(z==null?void 0:z[l])}).catch(z=>{console.error(z),k("Erro ao enviar o arquivo")}).finally(()=>O(!1))}function A(H){p||G(H)}const x=m||w,F=`arkynFileUpload ${x?"hasError":"noHasError"} ${S?"hasFile":"noHasFile"}`;return c.jsxs(me,{children:[n&&c.jsx(fe,{showAsterisk:r,children:n}),c.jsxs("div",{className:F,children:[c.jsx("input",{type:"hidden",name:t,value:v||""}),!S&&c.jsx(Wa,{disabled:p,isLoading:j,acceptFile:i,dropFileText:d,handleSelectFile:A,selectFileButtonText:f}),S&&c.jsx(qa,{disabled:p,isLoading:j,acceptFile:i,file:S,handleSelectFile:A,changeFileButtonText:u,reSendFile:x&&S?()=>G(S):void 0})]}),x&&c.jsx(ke,{children:x})]})}function Xa(e){const{disabled:t,filePath:n,isLoading:r,acceptImage:a,changeImageButtonText:s,handleSelectFile:o,reSendImage:i}=e;function l(){if(t)return;const u=document.createElement("input");u.type="file",u.accept=a,u.onchange=f=>{var _;const d=(_=f.target.files)==null?void 0:_[0];d&&o(d)},u.click()}return c.jsxs("div",{className:"arkynImageUploadHasFileContent",style:{backgroundImage:`url("${n}")`},children:[i&&c.jsx(gt,{orientation:"bottom",text:"Reenviar imagem",children:c.jsx(_t,{type:"button","aria-label":"resend image",variant:"outline",scheme:"danger",size:"sm",isLoading:r,onClick:i,icon:B.RefreshCw,disabled:t})}),c.jsx($e,{isLoading:r,onClick:l,variant:"outline",size:"sm",type:"button",disabled:t,children:s})]})}function Ka(e){const{dropImageText:t,isLoading:n,acceptImage:r,handleSelectFile:a,selectImageButtonText:s,disabled:o}=e;function i(u){if(o)return;u.preventDefault();const f=u.dataTransfer.files[0];f&&a(f)}function l(){if(o)return;const u=document.createElement("input");u.type="file",u.accept=r,u.onchange=f=>{var _;const d=(_=f.target.files)==null?void 0:_[0];d&&a(d)},u.click()}return c.jsxs("div",{onDrop:i,className:"arkynImageUploadNoFileContent",children:[c.jsx($e,{isLoading:n,onClick:l,variant:"ghost",size:"sm",type:"button",disabled:o,children:s}),c.jsx("p",{children:t})]})}function Ya(e){const{name:t,defaultValue:n="",label:r,showAsterisk:a=!1,action:s,fileName:o="file",method:i="POST",acceptImage:l="image/*",fileResponseName:u="url",changeImageButtonText:f="Alterar imagem",selectImageButtonText:d="Selecionar imagem",dropImageText:_="Ou arraste e solte a imagem aqui",onChange:p,disabled:g=!1}=e,{fieldErrors:m}=ye(),v=m==null?void 0:m[t],[b,w]=h.useState(n),[k,S]=h.useState(""),[V,j]=h.useState(null),[O,G]=h.useState(n),[A,x]=h.useState(!1);async function P(M){if(g)return;x(!0),j(M),S("");const Q=new FormData;Q.append(o,M),await fetch(s,{method:i,body:Q}).then(async E=>await E.json()).then(E=>{E!=null&&E.error?S(E.error):w(E==null?void 0:E[u]),p&&p(E==null?void 0:E[u])}).catch(E=>{console.error(E),S("Erro ao enviar imagem")}).finally(()=>x(!1))}function D(M){g||(G(URL.createObjectURL(M)),P(M))}const F=v||k,z=`arkynImageUpload ${F?"hasError":"noHasError"} ${O?"hasImage":"noHasImage"}`;return c.jsxs(me,{children:[r&&c.jsx(fe,{showAsterisk:a,children:r}),c.jsxs("div",{className:z,children:[c.jsx("input",{type:"hidden",name:t,value:b||""}),!O&&c.jsx(Ka,{disabled:g,isLoading:A,acceptImage:l,dropImageText:_,handleSelectFile:D,selectImageButtonText:d}),O&&c.jsx(Xa,{disabled:g,isLoading:A,acceptImage:l,filePath:O,handleSelectFile:D,changeImageButtonText:f,reSendImage:F&&V?()=>P(V):void 0})]}),F&&c.jsx(ke,{children:F})]})}function Hn(e){const{name:t,disabled:n,title:r,style:a,variant:s="solid",label:o,className:i="",prefix:l,suffix:u,isLoading:f=!1,leftIcon:d,readOnly:_,onFocus:p,onBlur:g,errorMessage:m,showAsterisk:v,rightIcon:b,type:w="text",size:k="md",id:S,...V}=e,{fieldErrors:j}=ye(),[O,G]=h.useState(!1),A=h.useRef(null),x=S||h.useId(),P=m||(j==null?void 0:j[t]),D=!!P,F=n||f,L={md:20,lg:20}[k],z=b?"right":"left",M=z==="left"&&f,Q=z==="right"&&f;function E(){F||!(A!=null&&A.current)||(G(!0),A.current.focus())}function ce(Z){G(!0),p&&p(Z)}function re(Z){G(!1),g&&g(Z)}if(w==="hidden")return c.jsx("input",{style:{display:"none"},readOnly:!0,type:"text",ref:A,...V});const $=`arkynInput ${l?"hasPrefix":""} ${u?"hasSuffix":""} ${s} ${k} ${F||_||f?"opacity":""} ${D?"errored":""} ${O?"focused":""} ${i}`;return c.jsxs(me,{children:[o&&c.jsx(fe,{showAsterisk:v,htmlFor:x,children:o}),c.jsxs("section",{title:r,style:a,onClick:E,className:$,children:[c.jsx(X,{iconSize:L,icon:l,className:"prefix"}),c.jsx(X,{show:M,iconSize:L,className:"spinner",icon:B.Loader2}),c.jsx(X,{show:!f,icon:d,iconSize:L}),c.jsx("input",{disabled:F,readOnly:_,ref:A,onFocus:ce,onBlur:re,type:w,id:x,name:t,...V}),c.jsx(X,{show:!f,icon:b,iconSize:L}),c.jsx(X,{show:Q,iconSize:L,className:"spinner",icon:B.Loader2}),c.jsx(X,{iconSize:L,icon:u,className:"suffix"})]}),P&&c.jsx(ke,{children:P})]})}const Za=h.forwardRef((e,t)=>c.jsx("input",{ref:t,...e}));function Ja(e){const{name:t,disabled:n,title:r,style:a,variant:s="solid",separate:o,mask:i,showMask:l,replacement:u,label:f,className:d="",prefix:_,suffix:p,isLoading:g=!1,leftIcon:m,readOnly:v,onFocus:b,onBlur:w,errorMessage:k,defaultValue:S,showAsterisk:V,rightIcon:j,size:O="md",id:G,...A}=e,{fieldErrors:x}=ye(),[P,D]=h.useState(!1),F=h.useRef(null),H=G||h.useId(),L=k||(x==null?void 0:x[t]),z=!!L,M=n||g,E={md:20,lg:20}[O],ce=j?"right":"left",re=ce==="left"&&g,ee=ce==="right"&&g;function be(){M||!(F!=null&&F.current)||(D(!0),F.current.focus())}function le(U){D(!0),b&&b(U)}function se(U){D(!1),w&&w(U)}const Me=`arkynMaskedInput ${_?"hasPrefix":""} ${p?"hasSuffix":""} ${s} ${O} ${M||v||g?"opacity":""} ${z?"errored":""} ${P?"focused":""} ${d}`;return c.jsxs(me,{children:[f&&c.jsx(fe,{showAsterisk:V,htmlFor:H,children:f}),c.jsxs("section",{title:r,style:a,onClick:be,className:Me,children:[c.jsx(X,{iconSize:E,icon:_,className:"prefix"}),c.jsx(X,{show:re,iconSize:E,className:"spinner",icon:B.Loader2}),c.jsx(X,{show:!g,icon:m,iconSize:E}),c.jsx(Tn.InputMask,{component:Za,mask:i,replacement:u,separate:o,showMask:l,ref:F,onFocus:le,onBlur:se,disabled:M,readOnly:v,id:H,name:t,...A}),c.jsx(X,{show:!g,icon:j,iconSize:E}),c.jsx(X,{show:ee,iconSize:E,className:"spinner",icon:B.Loader2}),c.jsx(X,{iconSize:E,icon:p,className:"suffix"})]}),L&&c.jsx(ke,{children:L})]})}const Gn=h.createContext({});function Qa(e){return c.jsx(Gn.Provider,{value:{makeInvisible:e.makeInvisible},children:e.children})}function es(){return h.useContext(Gn)}function ts(e){const{isVisible:t,makeInvisible:n,children:r,className:a="",...s}=e;Xe(t);const i=`arkynModalContainer ${t?"visibleTrue":"visibleFalse"} ${a}`;return c.jsx(Qa,{makeInvisible:n,children:c.jsx(Le.AnimatePresence,{children:t&&c.jsxs("aside",{className:i.trim(),...s,children:[c.jsx(Le.motion.div,{className:"arkynModalContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),c.jsx(Le.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 ns(e){const{alignment:t="right",className:n,...r}=e,a=`arkynModalFooter ${t} ${n}`;return c.jsx("footer",{className:a.trim(),...r})}function rs(e){const{showCloseButton:t=!0,className:n,children:r,...a}=e,{makeInvisible:s}=es(),o=`arkynModalHeader ${n}`;return c.jsxs("header",{className:o.trim(),...a,children:[r,t&&c.jsx("button",{type:"button",onClick:s,"aria-label":"Close modal button",className:"arkynModalHeaderCloseButton",children:c.jsx(B.X,{size:24})})]})}function as(e){const{iconSize:t,isLoading:n,disabled:r,readOnly:a,isFocused:s}=e,l=`arkynMultiSelectChevron ${r||a?"notAnimate":""} ${s?"focused":""}`;return n?c.jsx(c.Fragment,{}):c.jsx(B.ChevronDown,{className:l,size:t,strokeWidth:2.5})}function ss(e){const{children:t,handleContainerFocus:n,disabled:r,isError:a,isLoading:s,isFocused:o,className:i,readOnly:l,variant:u,size:f,id:d,prefixExists:_}=e,p=_?"hasPrefix":"",g=a?"errored":"",m=r||l||s?"opacity":"",v=o?"focused":"";return c.jsx("section",{id:d,className:`arkynMultiSelectContainer ${p} ${u} ${f} ${m} ${g} ${v} ${i}`,onClick:n,children:t})}function os(e){const{children:t,size:n}=e,r=`arkynMultiSelectContent ${n}`;return c.jsx("div",{className:r,children:t})}function is(e){const{label:t,value:n,disabled:r,handleChangeValue:a}=e;return c.jsxs("div",{className:"arkynMultiSelectMark",children:[t,c.jsx("button",{disabled:r,type:"button",onClick:s=>{s.stopPropagation(),a(n)},children:c.jsx(B.X,{})})]})}function cs(e){const{label:t,optionHasSelected:n,handleChangeValue:r,value:a,size:s}=e,o=n(a)?"active":"",i=`arkynMultiSelectOption ${s} ${o}`;return c.jsxs("div",{onClick:()=>r(a),className:i,children:[t," ",c.jsx(B.Check,{})]})}function ls(e){const{children:t,isFocused:n,isSearchable:r,search:a,onSearch:s}=e,o=h.useRef(null),[i,l]=h.useState("bottom");Xe(n),h.useEffect(()=>{if(!n)return;(()=>{if(!o.current)return;const d=o.current.parentElement;if(!d)return;const _=d.getBoundingClientRect(),p=window.innerHeight,g=300;p-_.bottom<g&&_.top>g?l("top"):l("bottom")})()},[n]);function u(f){r&&s(f.target.value)}return n?c.jsxs("div",{ref:o,className:`arkynMultiSelectOptionsContainer ${i}`,children:[r&&c.jsx(Hn,{type:"search",name:"search-select",variant:"underline",leftIcon:B.Search,value:a,onChange:u}),t]}):c.jsx(c.Fragment,{})}function us(e){const{isFocused:t,handleBlur:n}=e;return t?c.jsx("aside",{className:"arkynMultiSelectOverlay",onClick:n}):c.jsx(c.Fragment,{})}function fs(e){const{iconSize:t,isLoading:n}=e;return n?c.jsx(B.Loader2,{className:"arkynMultiSelectSpinner",size:t,strokeWidth:2.5}):c.jsx(c.Fragment,{})}function ds(e){const{name:t,options:n,className:r="",placeholder:a="Selecione...",closeOnSelect:s=!1,defaultValue:o=[],errorMessage:i,isLoading:l=!1,readOnly:u=!1,isSearchable:f=!1,id:d,label:_,optionMaxHeight:p,showAsterisk:g,leftIcon:m,onSearch:v,onChange:b,onBlur:w,notFoundText:k="Sem opções disponíveis",onFocus:S,disabled:V=!1,prefix:j,size:O="md",value:G,variant:A="solid"}=e,{fieldErrors:x}=ye(),P=h.useRef(null),D=d||h.useId(),F=i||(x==null?void 0:x[t]),H=!!F,L=V||l||u,M={md:20,lg:20}[O],[Q,E]=h.useState(""),[ce,re]=h.useState(!1),[ee,be]=h.useState(o),le=G||ee;function se(U){return le.includes(U)}function oe(U){const ue=n.find(zt=>zt.value===U);return(ue==null?void 0:ue.label)||""}function $(){L||!(P!=null&&P.current)||ce||(re(!0),P.current.focus(),S&&S())}function Z(){re(!1),w&&P.current&&P.current.blur()}function Ie(U){E(U),v&&v(U)}function Ze(U){se(U)?(be(ee.filter(ue=>ue!==U)),b&&b(ee.filter(ue=>ue!==U))):(be([...ee,U]),b&&b([...ee,U])),s&&Z()}const Me=n.filter(U=>!!(e.onSearch||!e.isSearchable||U.label.toLowerCase().includes(Q.toLowerCase())));return c.jsxs(me,{children:[_&&c.jsx(fe,{showAsterisk:g,children:_}),c.jsxs(ss,{handleContainerFocus:$,disabled:L,isError:H,isFocused:ce,isLoading:l,readOnly:u,size:O,variant:A,className:r,prefixExists:!!j,id:D,children:[c.jsx("input",{ref:P,name:t,value:JSON.stringify(le),type:"hidden"}),c.jsx(X,{iconSize:M,icon:j,className:"prefix"}),m&&c.jsx(m,{size:M,strokeWidth:2.5}),c.jsxs(os,{size:O,children:[le.map(U=>c.jsx(is,{label:oe(U),value:U,handleChangeValue:Ze,disabled:L},U)),le.length<=0&&c.jsx("p",{children:a})]}),c.jsxs(ls,{isFocused:ce,isSearchable:f,search:Q,onSearch:Ie,children:[Me.map(({label:U,value:ue})=>c.jsx(cs,{label:U,value:ue,size:O,handleChangeValue:Ze,optionHasSelected:se},ue)),Me.length<=0&&c.jsx("p",{children:k})]}),c.jsx(as,{disabled:L,isFocused:ce,readOnly:u,iconSize:M,isLoading:l}),c.jsx(fs,{iconSize:M,isLoading:l}),c.jsx(us,{handleBlur:Z,isFocused:ce})]}),F&&c.jsx(ke,{children:F})]})}function Vt(e){return e&&e.replace(/[^0-9]/g,"")}const qt={EIGHT:"(99) 9999-9999",NINE:"(99) 99999-9999"};function Un(e,t){let n="",r=0;for(let a=0;a<t.length;a++)if(t[a]==="9")if(r<e.length)n+=e[r],r++;else break;else if(r<e.length)n+=t[a];else break;return n}function Vn(e){return e.length>10?"NINE":"EIGHT"}const qn=Vt(qt.NINE).length;function Wn(e,t){if(t.code==="+55"){let a=Vt(e);const s=Vn(a);return a.length>qn?void 0:(a=Un(a,qt[s]),a)}let r=t.mask;if(t.prefix){const a=/\$+/g;r=r.replace(a,t.prefix)}for(let a=0,s=0;a<r.length&&s<e.length;a++)r[a]==="_"&&(r=r.substring(0,a)+e[s]+r.substring(a+1),s++);return r}function _s(e,t){const n=Re.find(r=>r.code===e&&r.prefix===t);return n||null}function gs(e){const t=Re.find(n=>n.code===e);return t||null}function ms(e){const t=e.split(" ")[0].split("-")[0],n=e.split(" ")[0].split("-")[1],r=e.split(" ")[1];if(!t||!r)return{country:null,formattedNumber:""};if(n){const i=_s(t,n);if(!i)return{country:null,formattedNumber:""};const l=Wn(r,i);return{country:i,formattedNumber:l}}const a=gs(t);if(!a)return{country:null,formattedNumber:""};const s=Wn(r,a);return{country:a,formattedNumber:s}}function hs(e){const{children:t,onFocus:n,disabled:r,isError:a,isLoading:s,isFocused:o,className:i="",readOnly:l,variant:u,size:f,id:d}=e,m=`arkynPhoneInputContainer ${u} ${f} ${r||l||s?"opacity":""} ${a?"errored":""} ${o?"focused":""} ${i}`;return c.jsx("section",{id:d,className:m.trim(),onClick:n,children:t})}function ps(e){const{isOpen:t,onClick:n}=e;return t?c.jsx("aside",{className:"arkynPhoneInputCountriesOverlay",onClick:n}):c.jsx(c.Fragment,{})}function ys(e){const{country:t,isActive:n,handleChangeValue:r,size:a}=e,o=`arkynPhoneInputCountryOption ${a} ${n?"active":""}`;return c.jsxs("div",{onClick:()=>r(t),className:o,children:[c.jsx("img",{src:t.flag,alt:t.name,className:"flag"}),t.name," ",c.jsx("span",{children:t.code}),c.jsx(B.Check,{className:"check"})]})}function vs(e){const{children:t,isOpen:n,onSearch:r,search:a,placeholder:s}=e,o=h.useRef(null),[i,l]=h.useState("bottom");function u(f){r(f.target.value)}return Xe(n),h.useEffect(()=>{if(!n)return;(()=>{if(!o.current)return;const d=o.current.parentElement;if(!d)return;const _=d.getBoundingClientRect(),p=window.innerHeight,g=300;p-_.bottom<g&&_.top>g?l("top"):l("bottom")})()},[n]),n?c.jsxs("div",{className:`arkynPhoneInputCountryOptionsContainer ${i}`,ref:o,children:[c.jsx("input",{type:"search",name:"search-select",className:"arkynPhoneInputCountryOptionsContainerSearchSelect",value:a,id:"input-search",placeholder:s,onChange:u}),t]}):c.jsx(c.Fragment,{})}function ks(e){const{currentCountry:t,onClick:n}=e;return c.jsxs("div",{className:"phoneInputSelectCountry",onClick:n,children:[c.jsx("img",{className:"flag",src:t.flag,alt:t.name}),c.jsx(B.ChevronDown,{className:"chevronDown",strokeWidth:2.5}),c.jsx(dt,{orientation:"vertical"})]})}const Cs=h.forwardRef((e,t)=>c.jsx("input",{ref:t,...e})),bs=h.forwardRef((e,t)=>{const{onFocus:n,readonly:r,onBlur:a,size:s,onChange:o,value:i,currentCountry:l,disabled:u}=e,[f,d]=h.useState(!1);h.useEffect(()=>{f?o(l.mask):d(!0)},[l]);const _=`phoneInputMask ${s}`;function p(g){let m=Vt(g.target.value);const v=Vn(m);m.length>qn||(m=Un(m,qt[v]),g.target.value=m,o(m))}return l.code==="+55"?c.jsx("input",{value:i,onChange:p,className:_,onFocus:n,onBlur:a,disabled:u,ref:t}):c.jsx(Tn.InputMask,{value:i,readOnly:r,onChange:g=>o(g.target.value),className:_,component:Cs,onFocus:n,onBlur:a,disabled:u,mask:l.mask,showMask:!0,replacement:{_:/\d/},ref:t})});function xs(e){const{defaultCountry:t,label:n,className:r="",disabled:a=!1,errorMessage:s,isLoading:o=!1,readOnly:i=!1,size:l="md",defaultValue:u="",variant:f="solid",showAsterisk:d,name:_,onChange:p,searchCountryPlaceholder:g="Pesquisar país",notFoundCountryText:m="Nenhum país encontrado",id:v}=e,b=ms(u),[w,k]=h.useState(!1),[S,V]=h.useState(""),[j,O]=h.useState(!1),[G,A]=h.useState(b.formattedNumber||""),[x,P]=h.useState(()=>{if(b.country)return b.country;const $=Re.find(Z=>Z.iso===t);return $||Re[30]}),{fieldErrors:D}=ye(),F=h.useRef(null),H=v||h.useId(),L=s||(D==null?void 0:D[_]),z=!!L,M=a||o,Q=h.useRef(null);function E(){M||w||j||(k(!0),Q.current&&Q.current.focus())}function ce(){O(!0),k(!0)}function re(){O(!1),k(!1)}function ee(){k(!0)}function be(){k(!1)}function le($){return $.name.toLowerCase().includes(S.toLowerCase())}function se($){return x.prefix?$.replace(x.prefix,"").replaceAll(" ","").replaceAll("-","").replaceAll("(","").replaceAll(")","").trim():$.replaceAll(" ","").replaceAll("-","").replaceAll("(","").replaceAll(")","").trim()}function oe($){let Z=x.code;return x.prefix&&(Z+=`-${x.prefix}`),Z+=" ",Z+=se($||G),Z}return c.jsxs(me,{children:[n&&c.jsx(fe,{showAsterisk:d,children:n}),c.jsxs(hs,{id:H,disabled:M,isError:z,isLoading:o,isFocused:w,readOnly:i,size:l,variant:f,className:r,onFocus:E,children:[c.jsx(ks,{currentCountry:x,onClick:ce,size:l}),c.jsxs(vs,{isOpen:M||i?!1:j,search:S,placeholder:g,onSearch:V,children:[Re.filter($=>le($)).map($=>c.jsx(ys,{country:$,handleChangeValue:()=>{P($),O(!1),A($.mask)},isActive:$.iso===x.iso,size:l},$.iso)),Re.filter($=>le($)).length===0&&c.jsx("p",{children:m})]}),c.jsx(ps,{isOpen:M||i?!1:j,onClick:re}),c.jsx(bs,{ref:Q,readonly:i,currentCountry:x,value:G,disabled:M,onBlur:be,onFocus:ee,size:l,onChange:$=>{A($),p&&p(oe($))}}),c.jsx("input",{ref:F,type:"hidden",name:_,value:oe()})]}),L&&c.jsx(ke,{children:L})]})}function Es(e){const{children:t,button:n,closeOnClick:r,className:a="",orientation:s="bottomLeft"}=e,[o,i]=h.useState(!1),u=`arkynPopover ${s} ${o?"visibleTrue":"visibleFalse"} ${a}`;function f(){o||i(!0)}return Xe(o),c.jsxs("div",{className:u,onClick:f,children:[n,c.jsx(Le.motion.div,{style:{visibility:o?"visible":"hidden"},transition:{ease:"easeOut",duration:0},initial:{opacity:0},animate:{opacity:o?1:0},exit:{opacity:0},onClick:()=>r&&i(!1),className:"arkynPopoverContent",children:t}),o&&c.jsx("div",{onClick:()=>i(!1),className:"arkynPopoverOverlay"})]})}const Rn=h.createContext({});function ws(e){const{children:t,size:n,isError:r,handleChange:a,value:s}=e;return c.jsx(Rn.Provider,{value:{handleChange:a,value:s,size:n,isError:r},children:t})}function Ss(){return h.useContext(Rn)}function Ns(e){const{value:t,size:n,disabled:r,children:a,className:s="",...o}=e,{handleChange:i,size:l,value:u,isError:f}=Ss(),v=`arkynRadioBox ${n||l} ${u===t?"checkedTrue":"checkedFalse"} ${f?"errorTrue":"errorFalse"} ${r?"disabledTrue":"disabledFalse"} ${s}`;return c.jsxs("label",{className:v.trim(),children:[c.jsx("button",{type:"button",disabled:r,onClick:()=>i(t),onFocus:()=>i(t),...o}),a]})}function Fs(e){const{defaultValue:t="",name:n,label:r,showAsterisk:a,errorMessage:s,value:o,onChange:i,size:l="md",className:u="",...f}=e,[d,_]=h.useState(t),{fieldErrors:p}=ye();function g(w){_(w),i&&i(w)}const m=s||(p==null?void 0:p[n]),v=!!m,b=`arkynRadioGroup ${l} ${u}`;return c.jsxs(me,{children:[r&&c.jsx(fe,{showAsterisk:a,children:r}),c.jsxs(ws,{isError:v,size:l,value:o||d,handleChange:g,children:[c.jsx("input",{style:{display:"none"},type:"text",readOnly:!0,name:n,value:o||d}),c.jsx("div",{className:b.trim(),...f})]}),m&&c.jsx(ke,{children:m})]})}function Ts(e){const{label:t,size:n="lg",defaultChecked:r=!1,checked:a=null,value:s,unCheckedValue:o="",name:i,className:l="",onCheck:u,id:f,...d}=e,_=h.useRef(null),p=f||h.useId(),[g,m]=h.useState(r),v=typeof a=="boolean"?a:g;function b(){m(!g),u&&u(v?o:s||"checked")}const k=`arkynSwitch ${v?"checkedTrue":"checkedFalse"} ${n} ${l}`;return c.jsxs(me,{children:[t&&c.jsx(fe,{children:t}),c.jsx("button",{type:"button",onClick:b,className:k,...d,children:c.jsx("input",{id:p,type:"hidden",name:i,ref:_,onClick:b,value:v?s||"checked":o})})]})}const Xn=h.createContext({});function Os(){return h.useContext(Xn)}function Ps(e){return c.jsx(Xn.Provider,{value:e,children:e.children})}function As(e){const{children:t,disabled:n=!1,className:r="",onClick:a,value:s,...o}=e,{disabled:i,currentTab:l,changeCurrentTab:u}=Os(),f=i||n,p=`arkynTabButton ${f?"isDisabled":""} ${l===s&&s?"isActive":""} ${r}`;function g(m){u(s),a&&a(m)}return c.jsx("button",{onClick:g,className:p.trim(),...o,disabled:f,type:"button",children:t})}function Is(e){const{children:t,onChange:n,defaultValue:r,disabled:a=!1,className:s,...o}=e,[i,l]=h.useState(r||""),u=`arkynTabContainer ${s||""}`;function f(d){l(d),n&&n(d)}return c.jsx(Ps,{disabled:a,currentTab:i,changeCurrentTab:f,children:c.jsx("nav",{className:u.trim(),...o,children:t})})}function Ms(e){const{emptyMessage:t="Nenhum dado adicionado.",className:n,children:r,...a}=e,s=`arkynTableBody ${n}`,o=h.Children.count(r)===0;return c.jsx("tbody",{className:s.trim(),...a,children:o?c.jsx("tr",{className:"arkynTableBodyEmptyLine",children:c.jsx("td",{colSpan:100,children:c.jsx("div",{children:t})})}):r})}function Ds(e){const{className:t,children:n,...r}=e,a=`arkynTableCaption ${t}`;return c.jsx("caption",{className:a.trim(),...r,children:c.jsx("div",{className:"arkynTableCaptionContent",children:n})})}function Ls(e){const{children:t,className:n,...r}=e,a=`arkynTableContainer ${n}`;return c.jsx("div",{className:a.trim(),...r,children:c.jsx("table",{children:t})})}function $s(e){const{className:t,children:n,...r}=e,a=`arkynTableFooter ${t}`;return c.jsxs("tfoot",{className:a.trim(),...r,children:[c.jsx("tr",{className:"spacingRow"}),c.jsx("tr",{children:c.jsx("th",{colSpan:100,children:c.jsx("div",{className:"arkynTableFooterContent",children:n})})})]})}function Bs(e){const{className:t,children:n,...r}=e,a=`arkynTableHeader ${t}`;return c.jsxs("thead",{className:a.trim(),...r,children:[c.jsx("tr",{children:n}),c.jsx("tr",{className:"spacingRow"})]})}function js(e){const{variant:t="solid",size:n="md",className:r,errorMessage:a,disabled:s=!1,readOnly:o=!1,label:i,showAsterisk:l,name:u,onFocus:f,onBlur:d,title:_,style:p,id:g,...m}=e,{fieldErrors:v}=ye(),[b,w]=h.useState(!1),k=h.useRef(null),S=g||h.useId(),V=a||(v==null?void 0:v[u]),x=`arkynTextarea ${t} ${n} ${s||o?"opacityTrue":"opacityFalse"} ${!!V?"errorTrue":"errorFalse"} ${b?"focusedTrue":"focusedFalse"} ${r}`;function P(){s||!(k!=null&&k.current)||(w(!0),k.current.focus())}function D(H){w(!0),f&&f(H)}function F(H){w(!1),d&&d(H)}return c.jsxs(me,{children:[i&&c.jsx(fe,{showAsterisk:l,children:i}),c.jsx("section",{title:_,style:p,onClick:P,className:x,children:c.jsx("textarea",{id:S,disabled:s,readOnly:o,ref:k,onFocus:D,onBlur:F,...m})}),V&&c.jsx(fe,{children:V})]})}const Kn=h.createContext({});function zs(e){const{children:t=!1}=e,[n,r]=h.useState([]);function a(l){return!!n.some(u=>u.key===l)}function s(l){var u;return(u=n.find(f=>f.key===l))==null?void 0:u.data}function o(l,u){const f=a(l);r(f?d=>[...d.filter(p=>p.key!==l),{key:l,data:u}]:[...n,{key:l,data:u}])}function i(l){r(n.filter(u=>u.key!==l))}return c.jsx(Kn.Provider,{value:{drawerIsOpen:a,drawerData:s,openDrawer:o,closeDrawer:i},children:t})}function Hs(e){const t=h.useContext(Kn);if(Object.entries(t).length===0)throw new Error("useDrawer must be used within a Provider");if(e){const{drawerData:n,drawerIsOpen:r,openDrawer:a,closeDrawer:s}=t,o=r(e),i=n(e);return{drawerIsOpen:o,drawerData:i,openDrawer:f=>a(e,f),closeDrawer:()=>s(e)}}else return t}const Yn=h.createContext({});function Gs(e){const{children:t=!1}=e,[n,r]=h.useState([]);function a(u){return!!n.some(f=>f.key===u)}function s(u){var f;return(f=n.find(d=>d.key===u))==null?void 0:f.data}function o(u,f){const d=a(u);r(d?_=>[..._.filter(g=>g.key!==u),{key:u,data:f}]:[...n,{key:u,data:f}])}function i(u){r(n.filter(f=>f.key!==u))}function l(){r([])}return c.jsx(Yn.Provider,{value:{modalIsOpen:a,modalData:s,openModal:o,closeModal:i,closeAll:l},children:t})}function Us(e){const t=h.useContext(Yn);if(Object.entries(t).length===0)throw new Error("useModal must be used within a Provider");if(e){const{modalData:n,modalIsOpen:r,openModal:a,closeModal:s}=t,o=r(e),i=n(e);return{modalIsOpen:o,modalData:i,openModal:f=>a(e,f),closeModal:()=>s(e)}}else return t}function Vs(e,t=""){const n=new URLSearchParams(e),r=t?`${t}:`:"",a=s=>{Object.entries(s).forEach(([o,i])=>{i===void 0?n.delete(`${r}${o}`):n.set(`${r}${o}`,String(i))})};return{getParam:s=>n.get(`${r}${s}`),getScopedSearch:s=>{a(s);let o=n.toString();return o&&(o="?"+o),o}}}let qs={data:""},Ws=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||qs,Rs=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Xs=/\/\*[^]*?\*\/| +/g,Zn=/\n+/g,Fe=(e,t)=>{let n="",r="",a="";for(let s in e){let o=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+o+";":r+=s[1]=="f"?Fe(o,s):s+"{"+Fe(o,s[1]=="k"?"":t)+"}":typeof o=="object"?r+=Fe(o,t?t.replace(/([^,])+/g,i=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,i):i?i+" "+l:l)):s):o!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=Fe.p?Fe.p(s,o):s+":"+o+";")}return n+(t&&a?t+"{"+a+"}":a)+r},we={},Jn=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Jn(e[n]);return t}return e},Ks=(e,t,n,r,a)=>{let s=Jn(e),o=we[s]||(we[s]=(l=>{let u=0,f=11;for(;u<l.length;)f=101*f+l.charCodeAt(u++)>>>0;return"go"+f})(s));if(!we[o]){let l=s!==e?e:(u=>{let f,d,_=[{}];for(;f=Rs.exec(u.replace(Xs,""));)f[4]?_.shift():f[3]?(d=f[3].replace(Zn," ").trim(),_.unshift(_[0][d]=_[0][d]||{})):_[0][f[1]]=f[2].replace(Zn," ").trim();return _[0]})(e);we[o]=Fe(a?{["@keyframes "+o]:l}:l,n?"":"."+o)}let i=n&&we.g?we.g:null;return n&&(we.g=we[o]),((l,u,f,d)=>{d?u.data=u.data.replace(d,l):u.data.indexOf(l)===-1&&(u.data=f?l+u.data:u.data+l)})(we[o],t,r,i),o},Ys=(e,t,n)=>e.reduce((r,a,s)=>{let o=t[s];if(o&&o.call){let i=o(n),l=i&&i.props&&i.props.className||/^go/.test(i)&&i;o=l?"."+l:i&&typeof i=="object"?i.props?"":Fe(i,""):i===!1?"":i}return r+a+(o??"")},"");function mt(e){let t=this||{},n=e.call?e(t.p):e;return Ks(n.unshift?n.raw?Ys(n,[].slice.call(arguments,1),t.p):n.reduce((r,a)=>Object.assign(r,a&&a.call?a(t.p):a),{}):n,Ws(t.target),t.g,t.o,t.k)}let Qn,Wt,Rt;mt.bind({g:1});let Se=mt.bind({k:1});function Zs(e,t,n,r){Fe.p=t,Qn=e,Wt=n,Rt=r}function Te(e,t){let n=this||{};return function(){let r=arguments;function a(s,o){let i=Object.assign({},s),l=i.className||a.className;n.p=Object.assign({theme:Wt&&Wt()},i),n.o=/ *go\d+/.test(l),i.className=mt.apply(n,r)+(l?" "+l:"");let u=e;return e[0]&&(u=i.as||e,delete i.as),Rt&&u[0]&&Rt(i),Qn(u,i)}return a}}var Js=e=>typeof e=="function",ht=(e,t)=>Js(e)?e(t):e,Qs=(()=>{let e=0;return()=>(++e).toString()})(),er=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),eo=20,Xt="default",tr=(e,t)=>{let{toastLimit:n}=e.settings;switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,n)};case 1:return{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case 2:let{toast:r}=t;return tr(e,{type:e.toasts.find(o=>o.id===r.id)?1:0,toast:r});case 3:let{toastId:a}=t;return{...e,toasts:e.toasts.map(o=>o.id===a||a===void 0?{...o,dismissed:!0,visible:!1}:o)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let s=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+s}))}}},pt=[],nr={toasts:[],pausedAt:void 0,settings:{toastLimit:eo}},xe={},rr=(e,t=Xt)=>{xe[t]=tr(xe[t]||nr,e),pt.forEach(([n,r])=>{n===t&&r(xe[t])})},ar=e=>Object.keys(xe).forEach(t=>rr(e,t)),to=e=>Object.keys(xe).find(t=>xe[t].toasts.some(n=>n.id===e)),yt=(e=Xt)=>t=>{rr(t,e)},no={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},ro=(e={},t=Xt)=>{let[n,r]=h.useState(xe[t]||nr),a=h.useRef(xe[t]);h.useEffect(()=>(a.current!==xe[t]&&r(xe[t]),pt.push([t,r]),()=>{let o=pt.findIndex(([i])=>i===t);o>-1&&pt.splice(o,1)}),[t]);let s=n.toasts.map(o=>{var i,l,u;return{...e,...e[o.type],...o,removeDelay:o.removeDelay||((i=e[o.type])==null?void 0:i.removeDelay)||(e==null?void 0:e.removeDelay),duration:o.duration||((l=e[o.type])==null?void 0:l.duration)||(e==null?void 0:e.duration)||no[o.type],style:{...e.style,...(u=e[o.type])==null?void 0:u.style,...o.style}}});return{...n,toasts:s}},ao=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||Qs()}),tt=e=>(t,n)=>{let r=ao(t,e,n);return yt(r.toasterId||to(r.id))({type:2,toast:r}),r.id},J=(e,t)=>tt("blank")(e,t);J.error=tt("error"),J.success=tt("success"),J.loading=tt("loading"),J.custom=tt("custom"),J.dismiss=(e,t)=>{let n={type:3,toastId:e};t?yt(t)(n):ar(n)},J.dismissAll=e=>J.dismiss(void 0,e),J.remove=(e,t)=>{let n={type:4,toastId:e};t?yt(t)(n):ar(n)},J.removeAll=e=>J.remove(void 0,e),J.promise=(e,t,n)=>{let r=J.loading(t.loading,{...n,...n==null?void 0:n.loading});return typeof e=="function"&&(e=e()),e.then(a=>{let s=t.success?ht(t.success,a):void 0;return s?J.success(s,{id:r,...n,...n==null?void 0:n.success}):J.dismiss(r),a}).catch(a=>{let s=t.error?ht(t.error,a):void 0;s?J.error(s,{id:r,...n,...n==null?void 0:n.error}):J.dismiss(r)}),e};var so=1e3,oo=(e,t="default")=>{let{toasts:n,pausedAt:r}=ro(e,t),a=h.useRef(new Map).current,s=h.useCallback((d,_=so)=>{if(a.has(d))return;let p=setTimeout(()=>{a.delete(d),o({type:4,toastId:d})},_);a.set(d,p)},[]);h.useEffect(()=>{if(r)return;let d=Date.now(),_=n.map(p=>{if(p.duration===1/0)return;let g=(p.duration||0)+p.pauseDuration-(d-p.createdAt);if(g<0){p.visible&&J.dismiss(p.id);return}return setTimeout(()=>J.dismiss(p.id,t),g)});return()=>{_.forEach(p=>p&&clearTimeout(p))}},[n,r,t]);let o=h.useCallback(yt(t),[t]),i=h.useCallback(()=>{o({type:5,time:Date.now()})},[o]),l=h.useCallback((d,_)=>{o({type:1,toast:{id:d,height:_}})},[o]),u=h.useCallback(()=>{r&&o({type:6,time:Date.now()})},[r,o]),f=h.useCallback((d,_)=>{let{reverseOrder:p=!1,gutter:g=8,defaultPosition:m}=_||{},v=n.filter(k=>(k.position||m)===(d.position||m)&&k.height),b=v.findIndex(k=>k.id===d.id),w=v.filter((k,S)=>S<b&&k.visible).length;return v.filter(k=>k.visible).slice(...p?[w+1]:[0,w]).reduce((k,S)=>k+(S.height||0)+g,0)},[n]);return h.useEffect(()=>{n.forEach(d=>{if(d.dismissed)s(d.id,d.removeDelay);else{let _=a.get(d.id);_&&(clearTimeout(_),a.delete(d.id))}})},[n,s]),{toasts:n,handlers:{updateHeight:l,startPause:i,endPause:u,calculateOffset:f}}},io=Se`
2
2
  from {
3
3
  transform: scale(0) rotate(45deg);
4
4
  opacity: 0;
@@ -174,10 +174,10 @@ to {
174
174
  > * {
175
175
  pointer-events: auto;
176
176
  }
177
- `,vt=16,Io=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:a,toasterId:s,containerStyle:o,containerClassName:i})=>{let{toasts:l,handlers:u}=oo(n,s);return te.createElement("div",{"data-rht-toaster":s||"",style:{position:"fixed",zIndex:9999,top:vt,left:vt,right:vt,bottom:vt,pointerEvents:"none",...o},className:i,onMouseEnter:u.startPause,onMouseLeave:u.endPause},l.map(f=>{let d=f.position||t,_=u.calculateOffset(f,{reverseOrder:e,gutter:r,defaultPosition:t}),p=Po(d,_);return te.createElement(Oo,{id:f.id,key:f.id,onHeightUpdate:u.updateHeight,className:f.visible?Ao:"",style:p},f.type==="custom"?ht(f.message,f):a?a(f):te.createElement(To,{toast:f,position:d}))}))},sr=J;const Mo=m.createContext({});function Do({children:e}){function t(n){switch(n.type){case"success":return sr.success(n.message,{style:{background:"#10B981",color:"#ffffff",padding:"12px 16px",fontSize:"14px",fontWeight:600},iconTheme:{primary:"#059669",secondary:"#ffffff"}});case"danger":return sr.error(n.message,{style:{background:"#E11D48",color:"#ffffff",padding:"12px 16px",fontSize:"14px",fontWeight:600},iconTheme:{primary:"#BE123C",secondary:"#ffffff"}})}}return c.jsxs(Mo.Provider,{value:{showToast:t},children:[c.jsx(Io,{position:"top-right",containerStyle:{zIndex:999999999999999}}),e]})}/*!
177
+ `,vt=16,Io=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:a,toasterId:s,containerStyle:o,containerClassName:i})=>{let{toasts:l,handlers:u}=oo(n,s);return te.createElement("div",{"data-rht-toaster":s||"",style:{position:"fixed",zIndex:9999,top:vt,left:vt,right:vt,bottom:vt,pointerEvents:"none",...o},className:i,onMouseEnter:u.startPause,onMouseLeave:u.endPause},l.map(f=>{let d=f.position||t,_=u.calculateOffset(f,{reverseOrder:e,gutter:r,defaultPosition:t}),p=Po(d,_);return te.createElement(Oo,{id:f.id,key:f.id,onHeightUpdate:u.updateHeight,className:f.visible?Ao:"",style:p},f.type==="custom"?ht(f.message,f):a?a(f):te.createElement(To,{toast:f,position:d}))}))},sr=J;const Mo=h.createContext({});function Do({children:e}){function t(n){switch(n.type){case"success":return sr.success(n.message,{style:{background:"#10B981",color:"#ffffff",padding:"12px 16px",fontSize:"14px",fontWeight:600},iconTheme:{primary:"#059669",secondary:"#ffffff"}});case"danger":return sr.error(n.message,{style:{background:"#E11D48",color:"#ffffff",padding:"12px 16px",fontSize:"14px",fontWeight:600},iconTheme:{primary:"#BE123C",secondary:"#ffffff"}})}}return c.jsxs(Mo.Provider,{value:{showToast:t},children:[c.jsx(Io,{position:"top-right",containerStyle:{zIndex:999999999999999}}),e]})}/*!
178
178
  * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
179
179
  *
180
180
  * Copyright (c) 2014-2017, Jon Schlinkert.
181
181
  * Released under the MIT License.
182
- */function or(e){return Object.prototype.toString.call(e)==="[object Object]"}function ae(e){var t,n;return or(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(or(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}var ir=Symbol.for("immer-nothing"),cr=Symbol.for("immer-draftable"),he=Symbol.for("immer-state"),Lo=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function de(e,...t){if(process.env.NODE_ENV!=="production"){const n=Lo[e],r=typeof n=="function"?n.apply(null,t):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ke=Object.getPrototypeOf;function Be(e){return!!e&&!!e[he]}function je(e){var t;return e?lr(e)||Array.isArray(e)||!!e[cr]||!!((t=e.constructor)!=null&&t[cr])||bt(e)||xt(e):!1}var $o=Object.prototype.constructor.toString();function lr(e){if(!e||typeof e!="object")return!1;const t=Ke(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===$o}function kt(e,t){Ct(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Ct(e){const t=e[he];return t?t.type_:Array.isArray(e)?1:bt(e)?2:xt(e)?3:0}function Kt(e,t){return Ct(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ur(e,t,n){const r=Ct(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Bo(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function bt(e){return e instanceof Map}function xt(e){return e instanceof Set}function ze(e){return e.copy_||e.base_}function Yt(e,t){if(bt(e))return new Map(e);if(xt(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=lr(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[he];let a=Reflect.ownKeys(r);for(let s=0;s<a.length;s++){const o=a[s],i=r[o];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(r[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Ke(e),r)}else{const r=Ke(e);if(r!==null&&n)return{...e};const a=Object.create(r);return Object.assign(a,e)}}function Zt(e,t=!1){return Et(e)||Be(e)||!je(e)||(Ct(e)>1&&(e.set=e.add=e.clear=e.delete=jo),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Zt(r,!0))),e}function jo(){de(2)}function Et(e){return Object.isFrozen(e)}var zo={};function He(e){const t=zo[e];return t||de(0,e),t}var nt;function fr(){return nt}function Ho(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function dr(e,t){t&&(He("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Jt(e){Qt(e),e.drafts_.forEach(Go),e.drafts_=null}function Qt(e){e===nt&&(nt=e.parent_)}function _r(e){return nt=Ho(nt,e)}function Go(e){const t=e[he];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function gr(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[he].modified_&&(Jt(t),de(4)),je(e)&&(e=wt(t,e),t.parent_||St(t,e)),t.patches_&&He("Patches").generateReplacementPatches_(n[he].base_,e,t.patches_,t.inversePatches_)):e=wt(t,n,[]),Jt(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ir?e:void 0}function wt(e,t,n){if(Et(t))return t;const r=t[he];if(!r)return kt(t,(a,s)=>mr(e,r,t,a,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return St(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const a=r.copy_;let s=a,o=!1;r.type_===3&&(s=new Set(a),a.clear(),o=!0),kt(s,(i,l)=>mr(e,r,a,i,l,n,o)),St(e,a,!1),n&&e.patches_&&He("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function mr(e,t,n,r,a,s,o){if(process.env.NODE_ENV!=="production"&&a===n&&de(5),Be(a)){const i=s&&t&&t.type_!==3&&!Kt(t.assigned_,r)?s.concat(r):void 0,l=wt(e,a,i);if(ur(n,r,l),Be(l))e.canAutoFreeze_=!1;else return}else o&&n.add(a);if(je(a)&&!Et(a)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;wt(e,a),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&St(e,a)}}function St(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Zt(t,n)}function Uo(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:fr(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=r,s=en;n&&(a=[r],s=rt);const{revoke:o,proxy:i}=Proxy.revocable(a,s);return r.draft_=i,r.revoke_=o,i}var en={get(e,t){if(t===he)return e;const n=ze(e);if(!Kt(n,t))return Vo(e,n,t);const r=n[t];return e.finalized_||!je(r)?r:r===tn(e.base_,t)?(rn(e),e.copy_[t]=an(r,e)):r},has(e,t){return t in ze(e)},ownKeys(e){return Reflect.ownKeys(ze(e))},set(e,t,n){const r=hr(ze(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const a=tn(ze(e),t),s=a==null?void 0:a[he];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Bo(n,a)&&(n!==void 0||Kt(e.base_,t)))return!0;rn(e),nn(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return tn(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,rn(e),nn(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=ze(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){de(11)},getPrototypeOf(e){return Ke(e.base_)},setPrototypeOf(){de(12)}},rt={};kt(en,(e,t)=>{rt[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),rt.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&de(13),rt.set.call(this,e,t,void 0)},rt.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&de(14),en.set.call(this,e[0],t,n,e[0])};function tn(e,t){const n=e[he];return(n?ze(n):e)[t]}function Vo(e,t,n){var a;const r=hr(t,n);return r?"value"in r?r.value:(a=r.get)==null?void 0:a.call(e.draft_):void 0}function hr(e,t){if(!(t in e))return;let n=Ke(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Ke(n)}}function nn(e){e.modified_||(e.modified_=!0,e.parent_&&nn(e.parent_))}function rn(e){e.copy_||(e.copy_=Yt(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var qo=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const s=n;n=t;const o=this;return function(l=s,...u){return o.produce(l,f=>n.call(this,f,...u))}}typeof n!="function"&&de(6),r!==void 0&&typeof r!="function"&&de(7);let a;if(je(t)){const s=_r(this),o=an(t,void 0);let i=!0;try{a=n(o),i=!1}finally{i?Jt(s):Qt(s)}return dr(s,r),gr(a,s)}else if(!t||typeof t!="object"){if(a=n(t),a===void 0&&(a=t),a===ir&&(a=void 0),this.autoFreeze_&&Zt(a,!0),r){const s=[],o=[];He("Patches").generateReplacementPatches_(t,a,s,o),r(s,o)}return a}else de(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(o,...i)=>this.produceWithPatches(o,l=>t(l,...i));let r,a;return[this.produce(t,n,(o,i)=>{r=o,a=i}),r,a]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){je(e)||de(8),Be(e)&&(e=Wo(e));const t=_r(this),n=an(e,void 0);return n[he].isManual_=!0,Qt(t),n}finishDraft(e,t){const n=e&&e[he];(!n||!n.isManual_)&&de(9);const{scope_:r}=n;return dr(r,t),gr(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const a=t[n];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}n>-1&&(t=t.slice(n+1));const r=He("Patches").applyPatches_;return Be(e)?r(e,t):this.produce(e,a=>r(a,t))}};function an(e,t){const n=bt(e)?He("MapSet").proxyMap_(e,t):xt(e)?He("MapSet").proxySet_(e,t):Uo(e,t);return(t?t.scope_:fr()).drafts_.push(n),n}function Wo(e){return Be(e)||de(10,e),pr(e)}function pr(e){if(!je(e)||Et(e))return e;const t=e[he];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Yt(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Yt(e,!0);return kt(n,(r,a)=>{ur(n,r,pr(a))}),t&&(t.finalized_=!1),n}var pe=new qo,sn=pe.produce;pe.produceWithPatches.bind(pe),pe.setAutoFreeze.bind(pe),pe.setUseStrictShallowCopy.bind(pe),pe.applyPatches.bind(pe);var yr=pe.createDraft.bind(pe),vr=pe.finishDraft.bind(pe),y={ancestors(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=t,r=y.levels(e,t);return n?r=r.slice(1):r=r.slice(0,-1),r},common(e,t){for(var n=[],r=0;r<e.length&&r<t.length;r++){var a=e[r],s=t[r];if(a!==s)break;n.push(a)}return n},compare(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){if(e[r]<t[r])return-1;if(e[r]>t[r])return 1}return 0},endsAfter(e,t){var n=e.length-1,r=e.slice(0,n),a=t.slice(0,n),s=e[n],o=t[n];return y.equals(r,a)&&s>o},endsAt(e,t){var n=e.length,r=e.slice(0,n),a=t.slice(0,n);return y.equals(r,a)},endsBefore(e,t){var n=e.length-1,r=e.slice(0,n),a=t.slice(0,n),s=e[n],o=t[n];return y.equals(r,a)&&s<o},equals(e,t){return e.length===t.length&&e.every((n,r)=>n===t[r])},hasPrevious(e){return e[e.length-1]>0},isAfter(e,t){return y.compare(e,t)===1},isAncestor(e,t){return e.length<t.length&&y.compare(e,t)===0},isBefore(e,t){return y.compare(e,t)===-1},isChild(e,t){return e.length===t.length+1&&y.compare(e,t)===0},isCommon(e,t){return e.length<=t.length&&y.compare(e,t)===0},isDescendant(e,t){return e.length>t.length&&y.compare(e,t)===0},isParent(e,t){return e.length+1===t.length&&y.compare(e,t)===0},isPath(e){return Array.isArray(e)&&(e.length===0||typeof e[0]=="number")},isSibling(e,t){if(e.length!==t.length)return!1;var n=e.slice(0,-1),r=t.slice(0,-1),a=e[e.length-1],s=t[t.length-1];return a!==s&&y.equals(n,r)},levels(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=t,r=[],a=0;a<=e.length;a++)r.push(e.slice(0,a));return n&&r.reverse(),r},next(e){if(e.length===0)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},operationCanTransformPath(e){switch(e.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(e){if(e.length===0)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous(e){if(e.length===0)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative(e,t){if(!y.isAncestor(t,e)&&!y.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!e)return null;var r=[...e],{affinity:a="forward"}=n;if(e.length===0)return r;switch(t.type){case"insert_node":{var{path:s}=t;(y.equals(s,r)||y.endsBefore(s,r)||y.isAncestor(s,r))&&(r[s.length-1]+=1);break}case"remove_node":{var{path:o}=t;if(y.equals(o,r)||y.isAncestor(o,r))return null;y.endsBefore(o,r)&&(r[o.length-1]-=1);break}case"merge_node":{var{path:i,position:l}=t;y.equals(i,r)||y.endsBefore(i,r)?r[i.length-1]-=1:y.isAncestor(i,r)&&(r[i.length-1]-=1,r[i.length]+=l);break}case"split_node":{var{path:u,position:f}=t;if(y.equals(u,r)){if(a==="forward")r[r.length-1]+=1;else if(a!=="backward")return null}else y.endsBefore(u,r)?r[u.length-1]+=1:y.isAncestor(u,r)&&e[u.length]>=f&&(r[u.length-1]+=1,r[u.length]-=f);break}case"move_node":{var{path:d,newPath:_}=t;if(y.equals(d,_))return r;if(y.isAncestor(d,r)||y.equals(d,r)){var p=_.slice();return y.endsBefore(d,_)&&d.length<_.length&&(p[d.length-1]-=1),p.concat(r.slice(d.length))}else y.isSibling(d,_)&&(y.isAncestor(_,r)||y.equals(_,r))?y.endsBefore(d,r)?r[d.length-1]-=1:r[d.length-1]+=1:y.endsBefore(_,r)||y.equals(_,r)||y.isAncestor(_,r)?(y.endsBefore(d,r)&&(r[d.length-1]-=1),r[_.length-1]+=1):y.endsBefore(d,r)&&(y.equals(_,r)&&(r[_.length-1]+=1),r[d.length-1]-=1);break}}return r}};function at(e){"@babel/helpers - typeof";return at=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},at(e)}function Ro(e,t){if(at(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(at(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xo(e){var t=Ro(e,"string");return at(t)==="symbol"?t:String(t)}function Ye(e,t,n){return t=Xo(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function st(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kr(Object(n),!0).forEach(function(r){Ye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Ko=(e,t,n)=>{switch(n.type){case"insert_node":{var{path:r,node:a}=n,s=N.parent(e,r),o=r[r.length-1];if(o>s.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(s.children.splice(o,0,a),t)for(var[i,l]of I.points(t))t[l]=q.transform(i,n);break}case"insert_text":{var{path:u,offset:f,text:d}=n;if(d.length===0)break;var _=N.leaf(e,u),p=_.text.slice(0,f),g=_.text.slice(f);if(_.text=p+d+g,t)for(var[h,v]of I.points(t))t[v]=q.transform(h,n);break}case"merge_node":{var{path:b}=n,w=N.get(e,b),k=y.previous(b),S=N.get(e,k),V=N.parent(e,b),j=b[b.length-1];if(K.isText(w)&&K.isText(S))S.text+=w.text;else if(!K.isText(w)&&!K.isText(S))S.children.push(...w.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(b,"] to nodes of different interfaces: ").concat(Ee.stringify(w)," ").concat(Ee.stringify(S)));if(V.children.splice(j,1),t)for(var[O,G]of I.points(t))t[G]=q.transform(O,n);break}case"move_node":{var{path:A,newPath:x}=n;if(y.isAncestor(A,x))throw new Error("Cannot move a path [".concat(A,"] to new path [").concat(x,"] because the destination is inside itself."));var P=N.get(e,A),D=N.parent(e,A),F=A[A.length-1];D.children.splice(F,1);var H=y.transform(A,n),L=N.get(e,y.parent(H)),z=H[H.length-1];if(L.children.splice(z,0,P),t)for(var[M,Q]of I.points(t))t[Q]=q.transform(M,n);break}case"remove_node":{var{path:E}=n,ce=E[E.length-1],re=N.parent(e,E);if(re.children.splice(ce,1),t)for(var[ee,be]of I.points(t)){var le=q.transform(ee,n);if(t!=null&&le!=null)t[be]=le;else{var se=void 0,oe=void 0;for(var[$,Z]of N.texts(e))if(y.compare(Z,E)===-1)se=[$,Z];else{oe=[$,Z];break}var Ie=!1;se&&oe&&(y.equals(oe[1],E)?Ie=!y.hasPrevious(oe[1]):Ie=y.common(se[1],E).length<y.common(oe[1],E).length),se&&!Ie?(ee.path=se[1],ee.offset=se[0].text.length):oe?(ee.path=oe[1],ee.offset=0):t=null}}break}case"remove_text":{var{path:Ze,offset:Me,text:U}=n;if(U.length===0)break;var ue=N.leaf(e,Ze),zt=ue.text.slice(0,Me),wn=ue.text.slice(Me+U.length);if(ue.text=zt+wn,t)for(var[ge,De]of I.points(t))t[De]=q.transform(ge,n);break}case"set_node":{var{path:Ve,properties:hc,newProperties:Sn}=n;if(Ve.length===0)throw new Error("Cannot set properties on the root node!");var Nn=N.get(e,Ve);for(var Je in Sn){if(Je==="children"||Je==="text")throw new Error('Cannot set the "'.concat(Je,'" property of nodes!'));var ma=Sn[Je];ma==null?delete Nn[Je]:Nn[Je]=ma}for(var ha in hc)Sn.hasOwnProperty(ha)||delete Nn[ha];break}case"set_selection":{var{newProperties:qe}=n;if(qe==null)t=qe;else{if(t==null){if(!I.isRange(qe))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Ee.stringify(qe)," when there is no current selection."));t=st({},qe)}for(var Qe in qe){var pa=qe[Qe];if(pa==null){if(Qe==="anchor"||Qe==="focus")throw new Error('Cannot remove the "'.concat(Qe,'" selection property'));delete t[Qe]}else t[Qe]=pa}}break}case"split_node":{var{path:et,position:Ht,properties:ya}=n;if(et.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(et,"] because the root node cannot be split."));var We=N.get(e,et),pc=N.parent(e,et),yc=et[et.length-1],Fn;if(K.isText(We)){var vc=We.text.slice(0,Ht),kc=We.text.slice(Ht);We.text=vc,Fn=st(st({},ya),{},{text:kc})}else{var Cc=We.children.slice(0,Ht),bc=We.children.slice(Ht);We.children=Cc,Fn=st(st({},ya),{},{children:bc})}if(pc.children.splice(yc+1,0,Fn),t)for(var[xc,Ec]of I.points(t))t[Ec]=q.transform(xc,n);break}}return t},Yo={transform(e,t){e.children=yr(e.children);var n=e.selection&&yr(e.selection);try{n=Ko(e,n,t)}finally{e.children=vr(e.children),n?e.selection=Be(n)?vr(n):n:e.selection=null}}},Zo={insertNodes(e,t,n){e.insertNodes(t,n)},liftNodes(e,t){e.liftNodes(t)},mergeNodes(e,t){e.mergeNodes(t)},moveNodes(e,t){e.moveNodes(t)},removeNodes(e,t){e.removeNodes(t)},setNodes(e,t,n){e.setNodes(t,n)},splitNodes(e,t){e.splitNodes(t)},unsetNodes(e,t,n){e.unsetNodes(t,n)},unwrapNodes(e,t){e.unwrapNodes(t)},wrapNodes(e,t,n){e.wrapNodes(t,n)}},Jo={collapse(e,t){e.collapse(t)},deselect(e){e.deselect()},move(e,t){e.move(t)},select(e,t){e.select(t)},setPoint(e,t,n){e.setPoint(t,n)},setSelection(e,t){e.setSelection(t)}},Cr=(e,t)=>{for(var n in e){var r=e[n],a=t[n];if(ae(r)&&ae(a)){if(!Cr(r,a))return!1}else if(Array.isArray(r)&&Array.isArray(a)){if(r.length!==a.length)return!1;for(var s=0;s<r.length;s++)if(r[s]!==a[s])return!1}else if(r!==a)return!1}for(var o in t)if(e[o]===void 0&&t[o]!==void 0)return!1;return!0};function Qo(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,s;for(s=0;s<r.length;s++)a=r[s],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function ot(e,t){if(e==null)return{};var n=Qo(e,t),r,a;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a<s.length;a++)r=s[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var ei=["anchor","focus"];function br(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ti(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?br(Object(n),!0).forEach(function(r){Ye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):br(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var I={edges(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=t,{anchor:r,focus:a}=e;return I.isBackward(e)===n?[r,a]:[a,r]},end(e){var[,t]=I.edges(e);return t},equals(e,t){return q.equals(e.anchor,t.anchor)&&q.equals(e.focus,t.focus)},includes(e,t){if(I.isRange(t)){if(I.includes(e,t.anchor)||I.includes(e,t.focus))return!0;var[n,r]=I.edges(e),[a,s]=I.edges(t);return q.isBefore(n,a)&&q.isAfter(r,s)}var[o,i]=I.edges(e),l=!1,u=!1;return q.isPoint(t)?(l=q.compare(t,o)>=0,u=q.compare(t,i)<=0):(l=y.compare(t,o.path)>=0,u=y.compare(t,i.path)<=0),l&&u},intersection(e,t){var n=ot(e,ei),[r,a]=I.edges(e),[s,o]=I.edges(t),i=q.isBefore(r,s)?s:r,l=q.isBefore(a,o)?a:o;return q.isBefore(l,i)?null:ti({anchor:i,focus:l},n)},isBackward(e){var{anchor:t,focus:n}=e;return q.isAfter(t,n)},isCollapsed(e){var{anchor:t,focus:n}=e;return q.equals(t,n)},isExpanded(e){return!I.isCollapsed(e)},isForward(e){return!I.isBackward(e)},isRange(e){return ae(e)&&q.isPoint(e.anchor)&&q.isPoint(e.focus)},*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=I.edges(e);return t},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return sn(e,r=>{if(r===null)return null;var{affinity:a="inward"}=n,s,o;if(a==="inward"){var i=I.isCollapsed(r);I.isForward(r)?(s="forward",o=i?s:"backward"):(s="backward",o=i?s:"forward")}else a==="outward"?I.isForward(r)?(s="backward",o="forward"):(s="forward",o="backward"):(s=a,o=a);var l=q.transform(r.anchor,t,{affinity:s}),u=q.transform(r.focus,t,{affinity:o});if(!l||!u)return null;r.anchor=l,r.focus=u})}},xr=e=>ae(e)&&N.isNodeList(e.children)&&!ve.isEditor(e),Oe={isAncestor(e){return ae(e)&&N.isNodeList(e.children)},isElement:xr,isElementList(e){return Array.isArray(e)&&e.every(t=>Oe.isElement(t))},isElementProps(e){return e.children!==void 0},isElementType:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return xr(t)&&t[r]===n},matches(e,t){for(var n in t)if(n!=="children"&&e[n]!==t[n])return!1;return!0}},ni=["children"],ri=["text"],Er=new WeakMap,N={ancestor(e,t){var n=N.get(e,t);if(K.isText(n))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(Ee.stringify(n)));return n},ancestors(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var r of y.ancestors(t,n)){var a=N.ancestor(e,r),s=[a,r];yield s}}()},child(e,t){if(K.isText(e))throw new Error("Cannot get the child of a text node: ".concat(Ee.stringify(e)));var n=e.children[t];if(n==null)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(Ee.stringify(e)));return n},children(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var{reverse:r=!1}=n,a=N.ancestor(e,t),{children:s}=a,o=r?s.length-1:0;r?o>=0:o<s.length;){var i=N.child(a,o),l=t.concat(o);yield[i,l],o=r?o-1:o+1}}()},common(e,t,n){var r=y.common(t,n),a=N.get(e,r);return[a,r]},descendant(e,t){var n=N.get(e,t);if(ve.isEditor(n))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(Ee.stringify(n)));return n},descendants(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of N.nodes(e,t))r.length!==0&&(yield[n,r])}()},elements(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of N.nodes(e,t))Oe.isElement(n)&&(yield[n,r])}()},extractProps(e){if(Oe.isAncestor(e)){var t=ot(e,ni);return t}else{var t=ot(e,ri);return t}},first(e,t){for(var n=t.slice(),r=N.get(e,n);r&&!(K.isText(r)||r.children.length===0);)r=r.children[0],n.push(0);return[r,n]},fragment(e,t){if(K.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(Ee.stringify(e)));var n=sn({children:e.children},r=>{var[a,s]=I.edges(t),o=N.nodes(r,{reverse:!0,pass:_=>{var[,p]=_;return!I.includes(t,p)}});for(var[,i]of o){if(!I.includes(t,i)){var l=N.parent(r,i),u=i[i.length-1];l.children.splice(u,1)}if(y.equals(i,s.path)){var f=N.leaf(r,i);f.text=f.text.slice(0,s.offset)}if(y.equals(i,a.path)){var d=N.leaf(r,i);d.text=d.text.slice(a.offset)}}ve.isEditor(r)&&(r.selection=null)});return n.children},get(e,t){for(var n=e,r=0;r<t.length;r++){var a=t[r];if(K.isText(n)||!n.children[a])throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(Ee.stringify(e)));n=n.children[a]}return n},has(e,t){for(var n=e,r=0;r<t.length;r++){var a=t[r];if(K.isText(n)||!n.children[a])return!1;n=n.children[a]}return!0},isNode(e){return K.isText(e)||Oe.isElement(e)||ve.isEditor(e)},isNodeList(e){if(!Array.isArray(e))return!1;var t=Er.get(e);if(t!==void 0)return t;var n=e.every(r=>N.isNode(r));return Er.set(e,n),n},last(e,t){for(var n=t.slice(),r=N.get(e,n);r&&!(K.isText(r)||r.children.length===0);){var a=r.children.length-1;r=r.children[a],n.push(a)}return[r,n]},leaf(e,t){var n=N.get(e,t);if(!K.isText(n))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Ee.stringify(n)));return n},levels(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var r of y.levels(t,n)){var a=N.get(e,r);yield[a,r]}}()},matches(e,t){return Oe.isElement(e)&&Oe.isElementProps(t)&&Oe.matches(e,t)||K.isText(e)&&K.isTextProps(t)&&K.matches(e,t)},nodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var{pass:n,reverse:r=!1}=t,{from:a=[],to:s}=t,o=new Set,i=[],l=e;!(s&&(r?y.isBefore(i,s):y.isAfter(i,s)));){if(o.has(l)||(yield[l,i]),!o.has(l)&&!K.isText(l)&&l.children.length!==0&&(n==null||n([l,i])===!1)){o.add(l);var u=r?l.children.length-1:0;y.isAncestor(i,a)&&(u=a[i.length]),i=i.concat(u),l=N.get(e,i);continue}if(i.length===0)break;if(!r){var f=y.next(i);if(N.has(e,f)){i=f,l=N.get(e,i);continue}}if(r&&i[i.length-1]!==0){var d=y.previous(i);i=d,l=N.get(e,i);continue}i=y.parent(i),l=N.get(e,i),o.add(l)}}()},parent(e,t){var n=y.parent(t),r=N.get(e,n);if(K.isText(r))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return r},string(e){return K.isText(e)?e.text:e.children.map(N.string).join("")},texts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of N.nodes(e,t))K.isText(n)&&(yield[n,r])}()}};function wr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function R(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wr(Object(n),!0).forEach(function(r){Ye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var it={isNodeOperation(e){return it.isOperation(e)&&e.type.endsWith("_node")},isOperation(e){if(!ae(e))return!1;switch(e.type){case"insert_node":return y.isPath(e.path)&&N.isNode(e.node);case"insert_text":return typeof e.offset=="number"&&typeof e.text=="string"&&y.isPath(e.path);case"merge_node":return typeof e.position=="number"&&y.isPath(e.path)&&ae(e.properties);case"move_node":return y.isPath(e.path)&&y.isPath(e.newPath);case"remove_node":return y.isPath(e.path)&&N.isNode(e.node);case"remove_text":return typeof e.offset=="number"&&typeof e.text=="string"&&y.isPath(e.path);case"set_node":return y.isPath(e.path)&&ae(e.properties)&&ae(e.newProperties);case"set_selection":return e.properties===null&&I.isRange(e.newProperties)||e.newProperties===null&&I.isRange(e.properties)||ae(e.properties)&&ae(e.newProperties);case"split_node":return y.isPath(e.path)&&typeof e.position=="number"&&ae(e.properties);default:return!1}},isOperationList(e){return Array.isArray(e)&&e.every(t=>it.isOperation(t))},isSelectionOperation(e){return it.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation(e){return it.isOperation(e)&&e.type.endsWith("_text")},inverse(e){switch(e.type){case"insert_node":return R(R({},e),{},{type:"remove_node"});case"insert_text":return R(R({},e),{},{type:"remove_text"});case"merge_node":return R(R({},e),{},{type:"split_node",path:y.previous(e.path)});case"move_node":{var{newPath:t,path:n}=e;if(y.equals(t,n))return e;if(y.isSibling(n,t))return R(R({},e),{},{path:t,newPath:n});var r=y.transform(n,e),a=y.transform(y.next(n),e);return R(R({},e),{},{path:r,newPath:a})}case"remove_node":return R(R({},e),{},{type:"insert_node"});case"remove_text":return R(R({},e),{},{type:"insert_text"});case"set_node":{var{properties:s,newProperties:o}=e;return R(R({},e),{},{properties:o,newProperties:s})}case"set_selection":{var{properties:i,newProperties:l}=e;return i==null?R(R({},e),{},{properties:l,newProperties:null}):l==null?R(R({},e),{},{properties:null,newProperties:i}):R(R({},e),{},{properties:l,newProperties:i})}case"split_node":return R(R({},e),{},{type:"merge_node",path:y.next(e.path)})}}},Sr=new WeakMap,ai=e=>{var t=Sr.get(e);if(t!==void 0)return t;if(!ae(e))return!1;var n=typeof e.addMark=="function"&&typeof e.apply=="function"&&typeof e.deleteFragment=="function"&&typeof e.insertBreak=="function"&&typeof e.insertSoftBreak=="function"&&typeof e.insertFragment=="function"&&typeof e.insertNode=="function"&&typeof e.insertText=="function"&&typeof e.isElementReadOnly=="function"&&typeof e.isInline=="function"&&typeof e.isSelectable=="function"&&typeof e.isVoid=="function"&&typeof e.normalizeNode=="function"&&typeof e.onChange=="function"&&typeof e.removeMark=="function"&&typeof e.getDirtyPaths=="function"&&(e.marks===null||ae(e.marks))&&(e.selection===null||I.isRange(e.selection))&&N.isNodeList(e.children)&&it.isOperationList(e.operations);return Sr.set(e,n),n},ve={above(e,t){return e.above(t)},addMark(e,t,n){e.addMark(t,n)},after(e,t,n){return e.after(t,n)},before(e,t,n){return e.before(t,n)},deleteBackward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=t;e.deleteBackward(n)},deleteForward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=t;e.deleteForward(n)},deleteFragment(e,t){e.deleteFragment(t)},edges(e,t){return e.edges(t)},elementReadOnly(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.elementReadOnly(t)},end(e,t){return e.end(t)},first(e,t){return e.first(t)},fragment(e,t){return e.fragment(t)},hasBlocks(e,t){return e.hasBlocks(t)},hasInlines(e,t){return e.hasInlines(t)},hasPath(e,t){return e.hasPath(t)},hasTexts(e,t){return e.hasTexts(t)},insertBreak(e){e.insertBreak()},insertFragment(e,t,n){e.insertFragment(t,n)},insertNode(e,t){e.insertNode(t)},insertSoftBreak(e){e.insertSoftBreak()},insertText(e,t){e.insertText(t)},isBlock(e,t){return e.isBlock(t)},isEdge(e,t,n){return e.isEdge(t,n)},isEditor(e){return ai(e)},isElementReadOnly(e,t){return e.isElementReadOnly(t)},isEmpty(e,t){return e.isEmpty(t)},isEnd(e,t,n){return e.isEnd(t,n)},isInline(e,t){return e.isInline(t)},isNormalizing(e){return e.isNormalizing()},isSelectable(e,t){return e.isSelectable(t)},isStart(e,t,n){return e.isStart(t,n)},isVoid(e,t){return e.isVoid(t)},last(e,t){return e.last(t)},leaf(e,t,n){return e.leaf(t,n)},levels(e,t){return e.levels(t)},marks(e){return e.getMarks()},next(e,t){return e.next(t)},node(e,t,n){return e.node(t,n)},nodes(e,t){return e.nodes(t)},normalize(e,t){e.normalize(t)},parent(e,t,n){return e.parent(t,n)},path(e,t,n){return e.path(t,n)},pathRef(e,t,n){return e.pathRef(t,n)},pathRefs(e){return e.pathRefs()},point(e,t,n){return e.point(t,n)},pointRef(e,t,n){return e.pointRef(t,n)},pointRefs(e){return e.pointRefs()},positions(e,t){return e.positions(t)},previous(e,t){return e.previous(t)},range(e,t,n){return e.range(t,n)},rangeRef(e,t,n){return e.rangeRef(t,n)},rangeRefs(e){return e.rangeRefs()},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){e.setNormalizing(t)},start(e,t){return e.start(t)},string(e,t,n){return e.string(t,n)},unhangRange(e,t,n){return e.unhangRange(t,n)},void(e,t){return e.void(t)},withoutNormalizing(e,t){e.withoutNormalizing(t)},shouldMergeNodesRemovePrevNode:(e,t,n)=>e.shouldMergeNodesRemovePrevNode(t,n)};function Nr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Fr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Nr(Object(n),!0).forEach(function(r){Ye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var q={compare(e,t){var n=y.compare(e.path,t.path);return n===0?e.offset<t.offset?-1:e.offset>t.offset?1:0:n},isAfter(e,t){return q.compare(e,t)===1},isBefore(e,t){return q.compare(e,t)===-1},equals(e,t){return e.offset===t.offset&&y.equals(e.path,t.path)},isPoint(e){return ae(e)&&typeof e.offset=="number"&&y.isPath(e.path)},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return sn(e,r=>{if(r===null)return null;var{affinity:a="forward"}=n,{path:s,offset:o}=r;switch(t.type){case"insert_node":case"move_node":{r.path=y.transform(s,t,n);break}case"insert_text":{y.equals(t.path,s)&&(t.offset<o||t.offset===o&&a==="forward")&&(r.offset+=t.text.length);break}case"merge_node":{y.equals(t.path,s)&&(r.offset+=t.position),r.path=y.transform(s,t,n);break}case"remove_text":{y.equals(t.path,s)&&t.offset<=o&&(r.offset-=Math.min(o-t.offset,t.text.length));break}case"remove_node":{if(y.equals(t.path,s)||y.isAncestor(t.path,s))return null;r.path=y.transform(s,t,n);break}case"split_node":{if(y.equals(t.path,s)){if(t.position===o&&a==null)return null;(t.position<o||t.position===o&&a==="forward")&&(r.offset-=t.position,r.path=y.transform(s,t,Fr(Fr({},n),{},{affinity:"forward"})))}else r.path=y.transform(s,t,n);break}}})}},Tr=void 0,Ee={setScrubber(e){Tr=e},stringify(e){return JSON.stringify(e,Tr)}},si=["text"],oi=["anchor","focus"];function Or(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ne(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Or(Object(n),!0).forEach(function(r){Ye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Or(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var K={equals(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:r=!1}=n;function a(s){var o=ot(s,si);return o}return Cr(r?a(e):e,r?a(t):t)},isText(e){return ae(e)&&typeof e.text=="string"},isTextList(e){return Array.isArray(e)&&e.every(t=>K.isText(t))},isTextProps(e){return e.text!==void 0},matches(e,t){for(var n in t)if(n!=="text"&&(!e.hasOwnProperty(n)||e[n]!==t[n]))return!1;return!0},decorations(e,t){var n=[Ne({},e)];for(var r of t){var a=ot(r,oi),[s,o]=I.edges(r),i=[],l=0,u=s.offset,f=o.offset;for(var d of n){var{length:_}=d.text,p=l;if(l+=_,u<=p&&l<=f){Object.assign(d,a),i.push(d);continue}if(u!==f&&(u===l||f===p)||u>l||f<p||f===p&&p!==0){i.push(d);continue}var g=d,h=void 0,v=void 0;if(f<l){var b=f-p;v=Ne(Ne({},g),{},{text:g.text.slice(b)}),g=Ne(Ne({},g),{},{text:g.text.slice(0,b)})}if(u>p){var w=u-p;h=Ne(Ne({},g),{},{text:g.text.slice(0,w)}),g=Ne(Ne({},g),{},{text:g.text.slice(w)})}Object.assign(g,a),h&&i.push(h),i.push(g),v&&i.push(v)}n=i}return n}},ii=e=>e.selection?e.selection:e.children.length>0?ve.end(e,[]):[0],W;(function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"})(W||(W={})),W.L,W.L|W.V|W.LV|W.LVT,W.LV|W.V,W.V|W.T,W.LVT|W.T,W.T,W.Any,W.Extend|W.ZWJ,W.Any,W.SpacingMark,W.Prepend,W.Any,W.ZWJ,W.ExtPict,W.RI,W.RI;var ci={delete(e,t){e.delete(t)},insertFragment(e,t,n){e.insertFragment(t,n)},insertText(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};ve.withoutNormalizing(e,()=>{var{voids:r=!1}=n,{at:a=ii(e)}=n;if(y.isPath(a)&&(a=ve.range(e,a)),I.isRange(a))if(I.isCollapsed(a))a=a.anchor;else{var s=I.end(a);if(!r&&ve.void(e,{at:s}))return;var o=I.start(a),i=ve.pointRef(e,o),l=ve.pointRef(e,s);Ar.delete(e,{at:a,voids:r});var u=i.unref(),f=l.unref();a=u||f,Ar.setSelection(e,{anchor:a,focus:a})}if(!(!r&&ve.void(e,{at:a})||ve.elementReadOnly(e,{at:a}))){var{path:d,offset:_}=a;t.length>0&&e.apply({type:"insert_text",path:d,offset:_,text:t})}})}};function Pr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Nt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Pr(Object(n),!0).forEach(function(r){Ye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Ar=Nt(Nt(Nt(Nt({},Yo),Zo),Jo),ci);function Ir(e){if(K.isText(e)){let t=e==null?void 0:e.text;return e!=null&&e.bold&&(t=`<strong>${t}</strong>`),e!=null&&e.code&&(t=`<code>${t}</code>`),e!=null&&e.italic&&(t=`<em>${t}</em>`),e!=null&&e.underline&&(t=`<u>${t}</u>`),t}if(Oe.isElement(e)){const t=e.children.map(r=>Ir(r)).join(""),n=e.align||"left";switch(e.type){case"image":return`<img src="${e.src}" class="align_${n}" />`;case"paragraph":return`<p class="align_${n}">${t}</p>`;case"blockQuote":return`<blockquote class="align_${n}">${t}</blockquote>`;case"bulletedList":return`<ul class="align_${n}">${t}</ul>`;case"headingOne":return`<h1 class="align_${n}">${t}</h1>`;case"headingTwo":return`<h2 class="align_${n}">${t}</h2>`;case"listItem":return`<li class="align_${n}">${t}</li>`;case"numberedList":return`<ol class="align_${n}">${t}</ol>`;default:return t}}return""}function on(e){var r;if(typeof e=="string")return{text:e};const t=Array.isArray(e.props.children)?e.props.children.map(a=>on(a)):[{text:e.props.children||""}],n=(r=e.props.className)==null?void 0:r.replace("align_","");switch(e.type){case"img":return{type:"image",align:n,src:e.props.src,children:[{text:""}]};case"p":return{type:"paragraph",align:n,children:t};case"blockquote":return{type:"blockQuote",align:n,children:t};case"ul":return{type:"bulletedList",align:n,children:t};case"ol":return{type:"numberedList",align:n,children:t};case"li":return{type:"listItem",align:n,children:t};case"h1":return{type:"headingOne",align:n,children:t};case"h2":return{type:"headingTwo",align:n,children:t};case"strong":return{text:e.props.children,bold:!0};case"code":return{text:e.props.children,code:!0};case"em":return{text:e.props.children,italic:!0};case"u":return{text:e.props.children,underline:!0};default:return{text:e.props.children||""}}}function li(e){return e.map(t=>Ir(t)).join("")}var Y=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ui(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mr={},cn={},ln={},Ge={},un={},fn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Doctype=e.CDATA=e.Tag=e.Style=e.Script=e.Comment=e.Directive=e.Text=e.Root=e.isTag=e.ElementType=void 0;var t;(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"})(t=e.ElementType||(e.ElementType={}));function n(r){return r.type===t.Tag||r.type===t.Script||r.type===t.Style}e.isTag=n,e.Root=t.Root,e.Text=t.Text,e.Directive=t.Directive,e.Comment=t.Comment,e.Script=t.Script,e.Style=t.Style,e.Tag=t.Tag,e.CDATA=t.CDATA,e.Doctype=t.Doctype})(fn);var T={},Pe=Y&&Y.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,a){r.__proto__=a}||function(r,a){for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(r[s]=a[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ct=Y&&Y.__assign||function(){return ct=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},ct.apply(this,arguments)};Object.defineProperty(T,"__esModule",{value:!0}),T.cloneNode=T.hasChildren=T.isDocument=T.isDirective=T.isComment=T.isText=T.isCDATA=T.isTag=T.Element=T.Document=T.CDATA=T.NodeWithChildren=T.ProcessingInstruction=T.Comment=T.Text=T.DataNode=T.Node=void 0;var _e=fn,dn=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(t){this.parent=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(t){this.prev=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(t){this.next=t},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(t){return t===void 0&&(t=!1),_n(this,t)},e}();T.Node=dn;var Ft=function(e){Pe(t,e);function t(n){var r=e.call(this)||this;return r.data=n,r}return Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(n){this.data=n},enumerable:!1,configurable:!0}),t}(dn);T.DataNode=Ft;var Dr=function(e){Pe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=_e.ElementType.Text,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(Ft);T.Text=Dr;var Lr=function(e){Pe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=_e.ElementType.Comment,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(Ft);T.Comment=Lr;var $r=function(e){Pe(t,e);function t(n,r){var a=e.call(this,r)||this;return a.name=n,a.type=_e.ElementType.Directive,a}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(Ft);T.ProcessingInstruction=$r;var Tt=function(e){Pe(t,e);function t(n){var r=e.call(this)||this;return r.children=n,r}return Object.defineProperty(t.prototype,"firstChild",{get:function(){var n;return(n=this.children[0])!==null&&n!==void 0?n:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(n){this.children=n},enumerable:!1,configurable:!0}),t}(dn);T.NodeWithChildren=Tt;var Br=function(e){Pe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=_e.ElementType.CDATA,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(Tt);T.CDATA=Br;var jr=function(e){Pe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=_e.ElementType.Root,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(Tt);T.Document=jr;var zr=function(e){Pe(t,e);function t(n,r,a,s){a===void 0&&(a=[]),s===void 0&&(s=n==="script"?_e.ElementType.Script:n==="style"?_e.ElementType.Style:_e.ElementType.Tag);var o=e.call(this,a)||this;return o.name=n,o.attribs=r,o.type=s,o}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(n){this.name=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var n=this;return Object.keys(this.attribs).map(function(r){var a,s;return{name:r,value:n.attribs[r],namespace:(a=n["x-attribsNamespace"])===null||a===void 0?void 0:a[r],prefix:(s=n["x-attribsPrefix"])===null||s===void 0?void 0:s[r]}})},enumerable:!1,configurable:!0}),t}(Tt);T.Element=zr;function Hr(e){return(0,_e.isTag)(e)}T.isTag=Hr;function Gr(e){return e.type===_e.ElementType.CDATA}T.isCDATA=Gr;function Ur(e){return e.type===_e.ElementType.Text}T.isText=Ur;function Vr(e){return e.type===_e.ElementType.Comment}T.isComment=Vr;function qr(e){return e.type===_e.ElementType.Directive}T.isDirective=qr;function Wr(e){return e.type===_e.ElementType.Root}T.isDocument=Wr;function fi(e){return Object.prototype.hasOwnProperty.call(e,"children")}T.hasChildren=fi;function _n(e,t){t===void 0&&(t=!1);var n;if(Ur(e))n=new Dr(e.data);else if(Vr(e))n=new Lr(e.data);else if(Hr(e)){var r=t?gn(e.children):[],a=new zr(e.name,ct({},e.attribs),r);r.forEach(function(l){return l.parent=a}),e.namespace!=null&&(a.namespace=e.namespace),e["x-attribsNamespace"]&&(a["x-attribsNamespace"]=ct({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(a["x-attribsPrefix"]=ct({},e["x-attribsPrefix"])),n=a}else if(Gr(e)){var r=t?gn(e.children):[],s=new Br(r);r.forEach(function(u){return u.parent=s}),n=s}else if(Wr(e)){var r=t?gn(e.children):[],o=new jr(r);r.forEach(function(u){return u.parent=o}),e["x-mode"]&&(o["x-mode"]=e["x-mode"]),n=o}else if(qr(e)){var i=new $r(e.name,e.data);e["x-name"]!=null&&(i["x-name"]=e["x-name"],i["x-publicId"]=e["x-publicId"],i["x-systemId"]=e["x-systemId"]),n=i}else throw new Error("Not implemented yet: ".concat(e.type));return n.startIndex=e.startIndex,n.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(n.sourceCodeLocation=e.sourceCodeLocation),n}T.cloneNode=_n;function gn(e){for(var t=e.map(function(r){return _n(r,!0)}),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}(function(e){var t=Y&&Y.__createBinding||(Object.create?function(i,l,u,f){f===void 0&&(f=u);var d=Object.getOwnPropertyDescriptor(l,u);(!d||("get"in d?!l.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return l[u]}}),Object.defineProperty(i,f,d)}:function(i,l,u,f){f===void 0&&(f=u),i[f]=l[u]}),n=Y&&Y.__exportStar||function(i,l){for(var u in i)u!=="default"&&!Object.prototype.hasOwnProperty.call(l,u)&&t(l,i,u)};Object.defineProperty(e,"__esModule",{value:!0}),e.DomHandler=void 0;var r=fn,a=T;n(T,e);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},o=function(){function i(l,u,f){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof u=="function"&&(f=u,u=s),typeof l=="object"&&(u=l,l=void 0),this.callback=l??null,this.options=u??s,this.elementCB=f??null}return i.prototype.onparserinit=function(l){this.parser=l},i.prototype.onreset=function(){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},i.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},i.prototype.onerror=function(l){this.handleCallback(l)},i.prototype.onclosetag=function(){this.lastNode=null;var l=this.tagStack.pop();this.options.withEndIndices&&(l.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(l)},i.prototype.onopentag=function(l,u){var f=this.options.xmlMode?r.ElementType.Tag:void 0,d=new a.Element(l,u,void 0,f);this.addNode(d),this.tagStack.push(d)},i.prototype.ontext=function(l){var u=this.lastNode;if(u&&u.type===r.ElementType.Text)u.data+=l,this.options.withEndIndices&&(u.endIndex=this.parser.endIndex);else{var f=new a.Text(l);this.addNode(f),this.lastNode=f}},i.prototype.oncomment=function(l){if(this.lastNode&&this.lastNode.type===r.ElementType.Comment){this.lastNode.data+=l;return}var u=new a.Comment(l);this.addNode(u),this.lastNode=u},i.prototype.oncommentend=function(){this.lastNode=null},i.prototype.oncdatastart=function(){var l=new a.Text(""),u=new a.CDATA([l]);this.addNode(u),l.parent=u,this.lastNode=l},i.prototype.oncdataend=function(){this.lastNode=null},i.prototype.onprocessinginstruction=function(l,u){var f=new a.ProcessingInstruction(l,u);this.addNode(f)},i.prototype.handleCallback=function(l){if(typeof this.callback=="function")this.callback(l,this.dom);else if(l)throw l},i.prototype.addNode=function(l){var u=this.tagStack[this.tagStack.length-1],f=u.children[u.children.length-1];this.options.withStartIndices&&(l.startIndex=this.parser.startIndex),this.options.withEndIndices&&(l.endIndex=this.parser.endIndex),u.children.push(l),f&&(l.prev=f,f.next=l),l.parent=u,this.lastNode=null},i}();e.DomHandler=o,e.default=o})(un);var Rr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CARRIAGE_RETURN_PLACEHOLDER_REGEX=e.CARRIAGE_RETURN_PLACEHOLDER=e.CARRIAGE_RETURN_REGEX=e.CARRIAGE_RETURN=e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES=void 0,e.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"],e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES.reduce(function(t,n){return t[n.toLowerCase()]=n,t},{}),e.CARRIAGE_RETURN="\r",e.CARRIAGE_RETURN_REGEX=new RegExp(e.CARRIAGE_RETURN,"g"),e.CARRIAGE_RETURN_PLACEHOLDER="__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now(),"__"),e.CARRIAGE_RETURN_PLACEHOLDER_REGEX=new RegExp(e.CARRIAGE_RETURN_PLACEHOLDER,"g")})(Rr),Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.formatAttributes=Xr,Ge.escapeSpecialCharacters=gi,Ge.revertEscapedCharacters=Kr,Ge.formatDOM=Yr;var Ot=un,lt=Rr;function di(e){return lt.CASE_SENSITIVE_TAG_NAMES_MAP[e]}function Xr(e){for(var t={},n=0,r=e.length;n<r;n++){var a=e[n];t[a.name]=a.value}return t}function _i(e){e=e.toLowerCase();var t=di(e);return t||e}function gi(e){return e.replace(lt.CARRIAGE_RETURN_REGEX,lt.CARRIAGE_RETURN_PLACEHOLDER)}function Kr(e){return e.replace(lt.CARRIAGE_RETURN_PLACEHOLDER_REGEX,lt.CARRIAGE_RETURN)}function Yr(e,t,n){t===void 0&&(t=null);for(var r=[],a,s=0,o=e.length;s<o;s++){var i=e[s];switch(i.nodeType){case 1:{var l=_i(i.nodeName);a=new Ot.Element(l,Xr(i.attributes)),a.children=Yr(l==="template"?i.content.childNodes:i.childNodes,a);break}case 3:a=new Ot.Text(Kr(i.nodeValue));break;case 8:a=new Ot.Comment(i.nodeValue);break;default:continue}var u=r[s-1]||null;u&&(u.next=a),a.parent=t,a.prev=u,a.next=null,r.push(a)}return n&&(a=new Ot.ProcessingInstruction(n.substring(0,n.indexOf(" ")).toLowerCase(),n),a.next=r[0]||null,a.parent=t,r.unshift(a),r[1]&&(r[1].prev=r[0])),r}Object.defineProperty(ln,"__esModule",{value:!0}),ln.default=vi;var mi=Ge,Zr="html",Jr="head",Pt="body",hi=/<([a-zA-Z]+[0-9]?)/,Qr=/<head[^]*>/i,ea=/<body[^]*>/i,At=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},mn=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},ta=typeof window=="object"&&window.DOMParser;if(typeof ta=="function"){var pi=new ta,yi="text/html";mn=function(e,t){return t&&(e="<".concat(t,">").concat(e,"</").concat(t,">")),pi.parseFromString(e,yi)},At=mn}if(typeof document=="object"&&document.implementation){var It=document.implementation.createHTMLDocument();At=function(e,t){if(t){var n=It.documentElement.querySelector(t);return n&&(n.innerHTML=e),It}return It.documentElement.innerHTML=e,It}}var Mt=typeof document=="object"&&document.createElement("template"),hn;Mt&&Mt.content&&(hn=function(e){return Mt.innerHTML=e,Mt.content.childNodes});function vi(e){var t,n;e=(0,mi.escapeSpecialCharacters)(e);var r=e.match(hi),a=r&&r[1]?r[1].toLowerCase():"";switch(a){case Zr:{var s=mn(e);if(!Qr.test(e)){var o=s.querySelector(Jr);(t=o==null?void 0:o.parentNode)===null||t===void 0||t.removeChild(o)}if(!ea.test(e)){var o=s.querySelector(Pt);(n=o==null?void 0:o.parentNode)===null||n===void 0||n.removeChild(o)}return s.querySelectorAll(Zr)}case Jr:case Pt:{var i=At(e).querySelectorAll(a);return ea.test(e)&&Qr.test(e)?i[0].parentNode.childNodes:i}default:{if(hn)return hn(e);var o=At(e,Pt).querySelector(Pt);return o.childNodes}}}var ki=Y&&Y.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(cn,"__esModule",{value:!0}),cn.default=Ei;var Ci=ki(ln),bi=Ge,xi=/<(![a-zA-Z\s]+)>/;function Ei(e){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(xi),n=t?t[1]:void 0;return(0,bi.formatDOM)((0,Ci.default)(e),null,n)}var Dt={},Ce={},Lt={},wi=0;Lt.SAME=wi;var Si=1;Lt.CAMELCASE=Si,Lt.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 na=0,Ae=1,$t=2,Bt=3,pn=4,ra=5,aa=6;function Ni(e){return ne.hasOwnProperty(e)?ne[e]:null}function ie(e,t,n,r,a,s,o){this.acceptsBooleans=t===$t||t===Bt||t===pn,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}const ne={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(e=>{ne[e]=new ie(e,na,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([e,t])=>{ne[e]=new ie(e,Ae,!1,t,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(e=>{ne[e]=new ie(e,$t,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(e=>{ne[e]=new ie(e,$t,!1,e,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(e=>{ne[e]=new ie(e,Bt,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(e=>{ne[e]=new ie(e,Bt,!0,e,null,!1,!1)}),["capture","download"].forEach(e=>{ne[e]=new ie(e,pn,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(e=>{ne[e]=new ie(e,aa,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(e=>{ne[e]=new ie(e,ra,!1,e.toLowerCase(),null,!1,!1)});const yn=/[\-\:]([a-z])/g,vn=e=>e[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(e=>{const t=e.replace(yn,vn);ne[t]=new ie(t,Ae,!1,e,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(e=>{const t=e.replace(yn,vn);ne[t]=new ie(t,Ae,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(e=>{const t=e.replace(yn,vn);ne[t]=new ie(t,Ae,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(e=>{ne[e]=new ie(e,Ae,!1,e.toLowerCase(),null,!1,!1)});const Fi="xlinkHref";ne[Fi]=new ie("xlinkHref",Ae,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(e=>{ne[e]=new ie(e,Ae,!1,e.toLowerCase(),null,!0,!0)});const{CAMELCASE:Ti,SAME:Oi,possibleStandardNames:sa}=Lt,Pi=":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",Ai=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+Pi+"]*$")),Ii=Object.keys(sa).reduce((e,t)=>{const n=sa[t];return n===Oi?e[t]=t:n===Ti?e[t.toLowerCase()]=t:e[t]=n,e},{});Ce.BOOLEAN=Bt,Ce.BOOLEANISH_STRING=$t,Ce.NUMERIC=ra,Ce.OVERLOADED_BOOLEAN=pn,Ce.POSITIVE_NUMERIC=aa,Ce.RESERVED=na,Ce.STRING=Ae,Ce.getPropertyInfo=Ni,Ce.isCustomAttribute=Ai,Ce.possibleStandardNames=Ii;var kn={},Cn={},oa=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Mi=/\n/g,Di=/^\s*/,Li=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,$i=/^:\s*/,Bi=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,ji=/^[;\s]*/,zi=/^\s+|\s+$/g,Hi=`
183
- `,ia="/",ca="*",Ue="",Gi="comment",Ui="declaration",Vi=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function a(g){var h=g.match(Mi);h&&(n+=h.length);var v=g.lastIndexOf(Hi);r=~v?g.length-v:r+g.length}function s(){var g={line:n,column:r};return function(h){return h.position=new o(g),u(),h}}function o(g){this.start=g,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function i(g){var h=new Error(t.source+":"+n+":"+r+": "+g);if(h.reason=g,h.filename=t.source,h.line=n,h.column=r,h.source=e,!t.silent)throw h}function l(g){var h=g.exec(e);if(h){var v=h[0];return a(v),e=e.slice(v.length),h}}function u(){l(Di)}function f(g){var h;for(g=g||[];h=d();)h!==!1&&g.push(h);return g}function d(){var g=s();if(!(ia!=e.charAt(0)||ca!=e.charAt(1))){for(var h=2;Ue!=e.charAt(h)&&(ca!=e.charAt(h)||ia!=e.charAt(h+1));)++h;if(h+=2,Ue===e.charAt(h-1))return i("End of comment missing");var v=e.slice(2,h-2);return r+=2,a(v),e=e.slice(h),r+=2,g({type:Gi,comment:v})}}function _(){var g=s(),h=l(Li);if(h){if(d(),!l($i))return i("property missing ':'");var v=l(Bi),b=g({type:Ui,property:la(h[0].replace(oa,Ue)),value:v?la(v[0].replace(oa,Ue)):Ue});return l(ji),b}}function p(){var g=[];f(g);for(var h;h=_();)h!==!1&&(g.push(h),f(g));return g}return u(),p()};function la(e){return e?e.replace(zi,Ue):Ue}var qi=Y&&Y.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.default=Ri;var Wi=qi(Vi);function Ri(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,Wi.default)(e),a=typeof t=="function";return r.forEach(function(s){if(s.type==="declaration"){var o=s.property,i=s.value;a?t(o,i,s):i&&(n=n||{},n[o]=i)}}),n}var jt={};Object.defineProperty(jt,"__esModule",{value:!0}),jt.camelCase=void 0;var Xi=/^--[a-zA-Z0-9_-]+$/,Ki=/-([a-z])/g,Yi=/^[^-]+$/,Zi=/^-(webkit|moz|ms|o|khtml)-/,Ji=/^-(ms)-/,Qi=function(e){return!e||Yi.test(e)||Xi.test(e)},ec=function(e,t){return t.toUpperCase()},ua=function(e,t){return"".concat(t,"-")},tc=function(e,t){return t===void 0&&(t={}),Qi(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Ji,ua):e=e.replace(Zi,ua),e.replace(Ki,ec))};jt.camelCase=tc;var nc=Y&&Y.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},rc=nc(Cn),ac=jt;function bn(e,t){var n={};return!e||typeof e!="string"||(0,rc.default)(e,function(r,a){r&&a&&(n[(0,ac.camelCase)(r,t)]=a)}),n}bn.default=bn;var sc=bn;(function(e){var t=Y&&Y.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(e,"__esModule",{value:!0}),e.returnFirstArg=e.canTextBeChildOfNode=e.ELEMENTS_WITH_NO_TEXT_CHILDREN=e.PRESERVE_CUSTOM_ATTRIBUTES=void 0,e.isCustomComponent=s,e.setStyleProp=i;var n=m,r=t(sc),a=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function s(f,d){return f.includes("-")?!a.has(f):!!(d&&typeof d.is=="string")}var o={reactCompat:!0};function i(f,d){if(typeof f=="string"){if(!f.trim()){d.style={};return}try{d.style=(0,r.default)(f,o)}catch{d.style={}}}}e.PRESERVE_CUSTOM_ATTRIBUTES=Number(n.version.split(".")[0])>=16,e.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var l=function(f){return!e.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(f.name)};e.canTextBeChildOfNode=l;var u=function(f){return f};e.returnFirstArg=u})(kn),Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.default=lc;var ut=Ce,fa=kn,oc=["checked","value"],ic=["input","select","textarea"],cc={reset:!0,submit:!0};function lc(e,t){e===void 0&&(e={});var n={},r=!!(e.type&&cc[e.type]);for(var a in e){var s=e[a];if((0,ut.isCustomAttribute)(a)){n[a]=s;continue}var o=a.toLowerCase(),i=da(o);if(i){var l=(0,ut.getPropertyInfo)(i);switch(oc.includes(i)&&ic.includes(t)&&!r&&(i=da("default"+o)),n[i]=s,l&&l.type){case ut.BOOLEAN:n[i]=!0;break;case ut.OVERLOADED_BOOLEAN:s===""&&(n[i]=!0);break}continue}fa.PRESERVE_CUSTOM_ATTRIBUTES&&(n[a]=s)}return(0,fa.setStyleProp)(e.style,n),n}function da(e){return ut.possibleStandardNames[e]}var xn={},uc=Y&&Y.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xn,"__esModule",{value:!0}),xn.default=_a;var En=m,fc=uc(Dt),ft=kn,dc={cloneElement:En.cloneElement,createElement:En.createElement,isValidElement:En.isValidElement};function _a(e,t){t===void 0&&(t={});for(var n=[],r=typeof t.replace=="function",a=t.transform||ft.returnFirstArg,s=t.library||dc,o=s.cloneElement,i=s.createElement,l=s.isValidElement,u=e.length,f=0;f<u;f++){var d=e[f];if(r){var _=t.replace(d,f);if(l(_)){u>1&&(_=o(_,{key:_.key||f})),n.push(a(_,d,f));continue}}if(d.type==="text"){var p=!d.data.trim().length;if(p&&d.parent&&!(0,ft.canTextBeChildOfNode)(d.parent)||t.trim&&p)continue;n.push(a(d.data,d,f));continue}var g=d,h={};_c(g)?((0,ft.setStyleProp)(g.attribs.style,g.attribs),h=g.attribs):g.attribs&&(h=(0,fc.default)(g.attribs,g.name));var v=void 0;switch(d.type){case"script":case"style":d.children[0]&&(h.dangerouslySetInnerHTML={__html:d.children[0].data});break;case"tag":d.name==="textarea"&&d.children[0]?h.defaultValue=d.children[0].data:d.children&&d.children.length&&(v=_a(d.children,t));break;default:continue}u>1&&(h.key=f),n.push(a(i(d.name,h,v),d,f))}return n.length===1?n[0]:n}function _c(e){return ft.PRESERVE_CUSTOM_ATTRIBUTES&&e.type==="tag"&&(0,ft.isCustomComponent)(e.name,e.attribs)}(function(e){var t=Y&&Y.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),e.htmlToDOM=e.domToReact=e.attributesToProps=e.Text=e.ProcessingInstruction=e.Element=e.Comment=void 0,e.default=i;var n=t(cn);e.htmlToDOM=n.default;var r=t(Dt);e.attributesToProps=r.default;var a=t(xn);e.domToReact=a.default;var s=un;Object.defineProperty(e,"Comment",{enumerable:!0,get:function(){return s.Comment}}),Object.defineProperty(e,"Element",{enumerable:!0,get:function(){return s.Element}}),Object.defineProperty(e,"ProcessingInstruction",{enumerable:!0,get:function(){return s.ProcessingInstruction}}),Object.defineProperty(e,"Text",{enumerable:!0,get:function(){return s.Text}});var o={lowerCaseAttributeNames:!1};function i(l,u){if(typeof l!="string")throw new TypeError("First argument must be a string");return l?(0,a.default)((0,n.default)(l,(u==null?void 0:u.htmlparser2)||o),u):[]}})(Mr);const ga=ui(Mr),gc=ga.default||ga;function mc(e){const t=gc(e);return Array.isArray(t)?t.map(n=>typeof n=="string"?{text:n}:on(n)):typeof t=="string"?[{text:t}]:[on(t)]}C.AlertContainer=Ca,C.AlertContent=ba,C.AlertDescription=xa,C.AlertIcon=Ea,C.AlertTitle=On,C.AudioPlayer=Mn,C.AudioUpload=Fa,C.Badge=Ta,C.Button=$e,C.CardTabButton=Aa,C.CardTabContainer=Ia,C.Checkbox=Ma,C.ClientOnly=La,C.CurrencyInput=ja,C.Divider=dt,C.DrawerContainer=Ua,C.DrawerHeader=Va,C.DrawerProvider=zs,C.FieldError=ke,C.FieldLabel=fe,C.FieldWrapper=me,C.FileUpload=Ra,C.FormProvider=wa,C.IconButton=_t,C.ImageUpload=Ya,C.Input=Hn,C.MaskedInput=Ja,C.ModalContainer=ts,C.ModalFooter=ns,C.ModalHeader=rs,C.ModalProvider=Gs,C.MultiSelect=ds,C.PhoneInput=xs,C.Popover=Es,C.RadioBox=Ns,C.RadioGroup=Fs,C.Slider=In,C.Switch=Ts,C.TabButton=As,C.TabContainer=Is,C.TableBody=Ms,C.TableCaption=Ds,C.TableContainer=Ls,C.TableFooter=$s,C.TableHeader=Bs,C.Textarea=js,C.ToastProvider=Do,C.Tooltip=gt,C.toHtml=li,C.toRichTextValue=mc,C.useDrawer=Hs,C.useForm=ye,C.useHydrated=$n,C.useModal=Us,C.useScopedParams=Vs,C.useScrollLock=Xe,C.useSlider=An,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})});
182
+ */function or(e){return Object.prototype.toString.call(e)==="[object Object]"}function ae(e){var t,n;return or(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(or(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}var ir=Symbol.for("immer-nothing"),cr=Symbol.for("immer-draftable"),he=Symbol.for("immer-state"),Lo=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function de(e,...t){if(process.env.NODE_ENV!=="production"){const n=Lo[e],r=typeof n=="function"?n.apply(null,t):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ke=Object.getPrototypeOf;function Be(e){return!!e&&!!e[he]}function je(e){var t;return e?lr(e)||Array.isArray(e)||!!e[cr]||!!((t=e.constructor)!=null&&t[cr])||bt(e)||xt(e):!1}var $o=Object.prototype.constructor.toString();function lr(e){if(!e||typeof e!="object")return!1;const t=Ke(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===$o}function kt(e,t){Ct(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Ct(e){const t=e[he];return t?t.type_:Array.isArray(e)?1:bt(e)?2:xt(e)?3:0}function Kt(e,t){return Ct(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ur(e,t,n){const r=Ct(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Bo(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function bt(e){return e instanceof Map}function xt(e){return e instanceof Set}function ze(e){return e.copy_||e.base_}function Yt(e,t){if(bt(e))return new Map(e);if(xt(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=lr(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[he];let a=Reflect.ownKeys(r);for(let s=0;s<a.length;s++){const o=a[s],i=r[o];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(r[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Ke(e),r)}else{const r=Ke(e);if(r!==null&&n)return{...e};const a=Object.create(r);return Object.assign(a,e)}}function Zt(e,t=!1){return Et(e)||Be(e)||!je(e)||(Ct(e)>1&&(e.set=e.add=e.clear=e.delete=jo),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Zt(r,!0))),e}function jo(){de(2)}function Et(e){return Object.isFrozen(e)}var zo={};function He(e){const t=zo[e];return t||de(0,e),t}var nt;function fr(){return nt}function Ho(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function dr(e,t){t&&(He("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Jt(e){Qt(e),e.drafts_.forEach(Go),e.drafts_=null}function Qt(e){e===nt&&(nt=e.parent_)}function _r(e){return nt=Ho(nt,e)}function Go(e){const t=e[he];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function gr(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[he].modified_&&(Jt(t),de(4)),je(e)&&(e=wt(t,e),t.parent_||St(t,e)),t.patches_&&He("Patches").generateReplacementPatches_(n[he].base_,e,t.patches_,t.inversePatches_)):e=wt(t,n,[]),Jt(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ir?e:void 0}function wt(e,t,n){if(Et(t))return t;const r=t[he];if(!r)return kt(t,(a,s)=>mr(e,r,t,a,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return St(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const a=r.copy_;let s=a,o=!1;r.type_===3&&(s=new Set(a),a.clear(),o=!0),kt(s,(i,l)=>mr(e,r,a,i,l,n,o)),St(e,a,!1),n&&e.patches_&&He("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function mr(e,t,n,r,a,s,o){if(process.env.NODE_ENV!=="production"&&a===n&&de(5),Be(a)){const i=s&&t&&t.type_!==3&&!Kt(t.assigned_,r)?s.concat(r):void 0,l=wt(e,a,i);if(ur(n,r,l),Be(l))e.canAutoFreeze_=!1;else return}else o&&n.add(a);if(je(a)&&!Et(a)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;wt(e,a),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&St(e,a)}}function St(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Zt(t,n)}function Uo(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:fr(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=r,s=en;n&&(a=[r],s=rt);const{revoke:o,proxy:i}=Proxy.revocable(a,s);return r.draft_=i,r.revoke_=o,i}var en={get(e,t){if(t===he)return e;const n=ze(e);if(!Kt(n,t))return Vo(e,n,t);const r=n[t];return e.finalized_||!je(r)?r:r===tn(e.base_,t)?(rn(e),e.copy_[t]=an(r,e)):r},has(e,t){return t in ze(e)},ownKeys(e){return Reflect.ownKeys(ze(e))},set(e,t,n){const r=hr(ze(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const a=tn(ze(e),t),s=a==null?void 0:a[he];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Bo(n,a)&&(n!==void 0||Kt(e.base_,t)))return!0;rn(e),nn(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return tn(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,rn(e),nn(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=ze(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){de(11)},getPrototypeOf(e){return Ke(e.base_)},setPrototypeOf(){de(12)}},rt={};kt(en,(e,t)=>{rt[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),rt.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&de(13),rt.set.call(this,e,t,void 0)},rt.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&de(14),en.set.call(this,e[0],t,n,e[0])};function tn(e,t){const n=e[he];return(n?ze(n):e)[t]}function Vo(e,t,n){var a;const r=hr(t,n);return r?"value"in r?r.value:(a=r.get)==null?void 0:a.call(e.draft_):void 0}function hr(e,t){if(!(t in e))return;let n=Ke(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Ke(n)}}function nn(e){e.modified_||(e.modified_=!0,e.parent_&&nn(e.parent_))}function rn(e){e.copy_||(e.copy_=Yt(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var qo=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const s=n;n=t;const o=this;return function(l=s,...u){return o.produce(l,f=>n.call(this,f,...u))}}typeof n!="function"&&de(6),r!==void 0&&typeof r!="function"&&de(7);let a;if(je(t)){const s=_r(this),o=an(t,void 0);let i=!0;try{a=n(o),i=!1}finally{i?Jt(s):Qt(s)}return dr(s,r),gr(a,s)}else if(!t||typeof t!="object"){if(a=n(t),a===void 0&&(a=t),a===ir&&(a=void 0),this.autoFreeze_&&Zt(a,!0),r){const s=[],o=[];He("Patches").generateReplacementPatches_(t,a,s,o),r(s,o)}return a}else de(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(o,...i)=>this.produceWithPatches(o,l=>t(l,...i));let r,a;return[this.produce(t,n,(o,i)=>{r=o,a=i}),r,a]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){je(e)||de(8),Be(e)&&(e=Wo(e));const t=_r(this),n=an(e,void 0);return n[he].isManual_=!0,Qt(t),n}finishDraft(e,t){const n=e&&e[he];(!n||!n.isManual_)&&de(9);const{scope_:r}=n;return dr(r,t),gr(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const a=t[n];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}n>-1&&(t=t.slice(n+1));const r=He("Patches").applyPatches_;return Be(e)?r(e,t):this.produce(e,a=>r(a,t))}};function an(e,t){const n=bt(e)?He("MapSet").proxyMap_(e,t):xt(e)?He("MapSet").proxySet_(e,t):Uo(e,t);return(t?t.scope_:fr()).drafts_.push(n),n}function Wo(e){return Be(e)||de(10,e),pr(e)}function pr(e){if(!je(e)||Et(e))return e;const t=e[he];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Yt(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Yt(e,!0);return kt(n,(r,a)=>{ur(n,r,pr(a))}),t&&(t.finalized_=!1),n}var pe=new qo,sn=pe.produce;pe.produceWithPatches.bind(pe),pe.setAutoFreeze.bind(pe),pe.setUseStrictShallowCopy.bind(pe),pe.applyPatches.bind(pe);var yr=pe.createDraft.bind(pe),vr=pe.finishDraft.bind(pe),y={ancestors(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=t,r=y.levels(e,t);return n?r=r.slice(1):r=r.slice(0,-1),r},common(e,t){for(var n=[],r=0;r<e.length&&r<t.length;r++){var a=e[r],s=t[r];if(a!==s)break;n.push(a)}return n},compare(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){if(e[r]<t[r])return-1;if(e[r]>t[r])return 1}return 0},endsAfter(e,t){var n=e.length-1,r=e.slice(0,n),a=t.slice(0,n),s=e[n],o=t[n];return y.equals(r,a)&&s>o},endsAt(e,t){var n=e.length,r=e.slice(0,n),a=t.slice(0,n);return y.equals(r,a)},endsBefore(e,t){var n=e.length-1,r=e.slice(0,n),a=t.slice(0,n),s=e[n],o=t[n];return y.equals(r,a)&&s<o},equals(e,t){return e.length===t.length&&e.every((n,r)=>n===t[r])},hasPrevious(e){return e[e.length-1]>0},isAfter(e,t){return y.compare(e,t)===1},isAncestor(e,t){return e.length<t.length&&y.compare(e,t)===0},isBefore(e,t){return y.compare(e,t)===-1},isChild(e,t){return e.length===t.length+1&&y.compare(e,t)===0},isCommon(e,t){return e.length<=t.length&&y.compare(e,t)===0},isDescendant(e,t){return e.length>t.length&&y.compare(e,t)===0},isParent(e,t){return e.length+1===t.length&&y.compare(e,t)===0},isPath(e){return Array.isArray(e)&&(e.length===0||typeof e[0]=="number")},isSibling(e,t){if(e.length!==t.length)return!1;var n=e.slice(0,-1),r=t.slice(0,-1),a=e[e.length-1],s=t[t.length-1];return a!==s&&y.equals(n,r)},levels(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=t,r=[],a=0;a<=e.length;a++)r.push(e.slice(0,a));return n&&r.reverse(),r},next(e){if(e.length===0)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},operationCanTransformPath(e){switch(e.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(e){if(e.length===0)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous(e){if(e.length===0)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative(e,t){if(!y.isAncestor(t,e)&&!y.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!e)return null;var r=[...e],{affinity:a="forward"}=n;if(e.length===0)return r;switch(t.type){case"insert_node":{var{path:s}=t;(y.equals(s,r)||y.endsBefore(s,r)||y.isAncestor(s,r))&&(r[s.length-1]+=1);break}case"remove_node":{var{path:o}=t;if(y.equals(o,r)||y.isAncestor(o,r))return null;y.endsBefore(o,r)&&(r[o.length-1]-=1);break}case"merge_node":{var{path:i,position:l}=t;y.equals(i,r)||y.endsBefore(i,r)?r[i.length-1]-=1:y.isAncestor(i,r)&&(r[i.length-1]-=1,r[i.length]+=l);break}case"split_node":{var{path:u,position:f}=t;if(y.equals(u,r)){if(a==="forward")r[r.length-1]+=1;else if(a!=="backward")return null}else y.endsBefore(u,r)?r[u.length-1]+=1:y.isAncestor(u,r)&&e[u.length]>=f&&(r[u.length-1]+=1,r[u.length]-=f);break}case"move_node":{var{path:d,newPath:_}=t;if(y.equals(d,_))return r;if(y.isAncestor(d,r)||y.equals(d,r)){var p=_.slice();return y.endsBefore(d,_)&&d.length<_.length&&(p[d.length-1]-=1),p.concat(r.slice(d.length))}else y.isSibling(d,_)&&(y.isAncestor(_,r)||y.equals(_,r))?y.endsBefore(d,r)?r[d.length-1]-=1:r[d.length-1]+=1:y.endsBefore(_,r)||y.equals(_,r)||y.isAncestor(_,r)?(y.endsBefore(d,r)&&(r[d.length-1]-=1),r[_.length-1]+=1):y.endsBefore(d,r)&&(y.equals(_,r)&&(r[_.length-1]+=1),r[d.length-1]-=1);break}}return r}};function at(e){"@babel/helpers - typeof";return at=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},at(e)}function Ro(e,t){if(at(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(at(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xo(e){var t=Ro(e,"string");return at(t)==="symbol"?t:String(t)}function Ye(e,t,n){return t=Xo(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function st(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kr(Object(n),!0).forEach(function(r){Ye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Ko=(e,t,n)=>{switch(n.type){case"insert_node":{var{path:r,node:a}=n,s=N.parent(e,r),o=r[r.length-1];if(o>s.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(s.children.splice(o,0,a),t)for(var[i,l]of I.points(t))t[l]=q.transform(i,n);break}case"insert_text":{var{path:u,offset:f,text:d}=n;if(d.length===0)break;var _=N.leaf(e,u),p=_.text.slice(0,f),g=_.text.slice(f);if(_.text=p+d+g,t)for(var[m,v]of I.points(t))t[v]=q.transform(m,n);break}case"merge_node":{var{path:b}=n,w=N.get(e,b),k=y.previous(b),S=N.get(e,k),V=N.parent(e,b),j=b[b.length-1];if(K.isText(w)&&K.isText(S))S.text+=w.text;else if(!K.isText(w)&&!K.isText(S))S.children.push(...w.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(b,"] to nodes of different interfaces: ").concat(Ee.stringify(w)," ").concat(Ee.stringify(S)));if(V.children.splice(j,1),t)for(var[O,G]of I.points(t))t[G]=q.transform(O,n);break}case"move_node":{var{path:A,newPath:x}=n;if(y.isAncestor(A,x))throw new Error("Cannot move a path [".concat(A,"] to new path [").concat(x,"] because the destination is inside itself."));var P=N.get(e,A),D=N.parent(e,A),F=A[A.length-1];D.children.splice(F,1);var H=y.transform(A,n),L=N.get(e,y.parent(H)),z=H[H.length-1];if(L.children.splice(z,0,P),t)for(var[M,Q]of I.points(t))t[Q]=q.transform(M,n);break}case"remove_node":{var{path:E}=n,ce=E[E.length-1],re=N.parent(e,E);if(re.children.splice(ce,1),t)for(var[ee,be]of I.points(t)){var le=q.transform(ee,n);if(t!=null&&le!=null)t[be]=le;else{var se=void 0,oe=void 0;for(var[$,Z]of N.texts(e))if(y.compare(Z,E)===-1)se=[$,Z];else{oe=[$,Z];break}var Ie=!1;se&&oe&&(y.equals(oe[1],E)?Ie=!y.hasPrevious(oe[1]):Ie=y.common(se[1],E).length<y.common(oe[1],E).length),se&&!Ie?(ee.path=se[1],ee.offset=se[0].text.length):oe?(ee.path=oe[1],ee.offset=0):t=null}}break}case"remove_text":{var{path:Ze,offset:Me,text:U}=n;if(U.length===0)break;var ue=N.leaf(e,Ze),zt=ue.text.slice(0,Me),wn=ue.text.slice(Me+U.length);if(ue.text=zt+wn,t)for(var[ge,De]of I.points(t))t[De]=q.transform(ge,n);break}case"set_node":{var{path:Ve,properties:hc,newProperties:Sn}=n;if(Ve.length===0)throw new Error("Cannot set properties on the root node!");var Nn=N.get(e,Ve);for(var Je in Sn){if(Je==="children"||Je==="text")throw new Error('Cannot set the "'.concat(Je,'" property of nodes!'));var ma=Sn[Je];ma==null?delete Nn[Je]:Nn[Je]=ma}for(var ha in hc)Sn.hasOwnProperty(ha)||delete Nn[ha];break}case"set_selection":{var{newProperties:qe}=n;if(qe==null)t=qe;else{if(t==null){if(!I.isRange(qe))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Ee.stringify(qe)," when there is no current selection."));t=st({},qe)}for(var Qe in qe){var pa=qe[Qe];if(pa==null){if(Qe==="anchor"||Qe==="focus")throw new Error('Cannot remove the "'.concat(Qe,'" selection property'));delete t[Qe]}else t[Qe]=pa}}break}case"split_node":{var{path:et,position:Ht,properties:ya}=n;if(et.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(et,"] because the root node cannot be split."));var We=N.get(e,et),pc=N.parent(e,et),yc=et[et.length-1],Fn;if(K.isText(We)){var vc=We.text.slice(0,Ht),kc=We.text.slice(Ht);We.text=vc,Fn=st(st({},ya),{},{text:kc})}else{var Cc=We.children.slice(0,Ht),bc=We.children.slice(Ht);We.children=Cc,Fn=st(st({},ya),{},{children:bc})}if(pc.children.splice(yc+1,0,Fn),t)for(var[xc,Ec]of I.points(t))t[Ec]=q.transform(xc,n);break}}return t},Yo={transform(e,t){e.children=yr(e.children);var n=e.selection&&yr(e.selection);try{n=Ko(e,n,t)}finally{e.children=vr(e.children),n?e.selection=Be(n)?vr(n):n:e.selection=null}}},Zo={insertNodes(e,t,n){e.insertNodes(t,n)},liftNodes(e,t){e.liftNodes(t)},mergeNodes(e,t){e.mergeNodes(t)},moveNodes(e,t){e.moveNodes(t)},removeNodes(e,t){e.removeNodes(t)},setNodes(e,t,n){e.setNodes(t,n)},splitNodes(e,t){e.splitNodes(t)},unsetNodes(e,t,n){e.unsetNodes(t,n)},unwrapNodes(e,t){e.unwrapNodes(t)},wrapNodes(e,t,n){e.wrapNodes(t,n)}},Jo={collapse(e,t){e.collapse(t)},deselect(e){e.deselect()},move(e,t){e.move(t)},select(e,t){e.select(t)},setPoint(e,t,n){e.setPoint(t,n)},setSelection(e,t){e.setSelection(t)}},Cr=(e,t)=>{for(var n in e){var r=e[n],a=t[n];if(ae(r)&&ae(a)){if(!Cr(r,a))return!1}else if(Array.isArray(r)&&Array.isArray(a)){if(r.length!==a.length)return!1;for(var s=0;s<r.length;s++)if(r[s]!==a[s])return!1}else if(r!==a)return!1}for(var o in t)if(e[o]===void 0&&t[o]!==void 0)return!1;return!0};function Qo(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,s;for(s=0;s<r.length;s++)a=r[s],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function ot(e,t){if(e==null)return{};var n=Qo(e,t),r,a;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a<s.length;a++)r=s[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var ei=["anchor","focus"];function br(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ti(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?br(Object(n),!0).forEach(function(r){Ye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):br(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var I={edges(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=t,{anchor:r,focus:a}=e;return I.isBackward(e)===n?[r,a]:[a,r]},end(e){var[,t]=I.edges(e);return t},equals(e,t){return q.equals(e.anchor,t.anchor)&&q.equals(e.focus,t.focus)},includes(e,t){if(I.isRange(t)){if(I.includes(e,t.anchor)||I.includes(e,t.focus))return!0;var[n,r]=I.edges(e),[a,s]=I.edges(t);return q.isBefore(n,a)&&q.isAfter(r,s)}var[o,i]=I.edges(e),l=!1,u=!1;return q.isPoint(t)?(l=q.compare(t,o)>=0,u=q.compare(t,i)<=0):(l=y.compare(t,o.path)>=0,u=y.compare(t,i.path)<=0),l&&u},intersection(e,t){var n=ot(e,ei),[r,a]=I.edges(e),[s,o]=I.edges(t),i=q.isBefore(r,s)?s:r,l=q.isBefore(a,o)?a:o;return q.isBefore(l,i)?null:ti({anchor:i,focus:l},n)},isBackward(e){var{anchor:t,focus:n}=e;return q.isAfter(t,n)},isCollapsed(e){var{anchor:t,focus:n}=e;return q.equals(t,n)},isExpanded(e){return!I.isCollapsed(e)},isForward(e){return!I.isBackward(e)},isRange(e){return ae(e)&&q.isPoint(e.anchor)&&q.isPoint(e.focus)},*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=I.edges(e);return t},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return sn(e,r=>{if(r===null)return null;var{affinity:a="inward"}=n,s,o;if(a==="inward"){var i=I.isCollapsed(r);I.isForward(r)?(s="forward",o=i?s:"backward"):(s="backward",o=i?s:"forward")}else a==="outward"?I.isForward(r)?(s="backward",o="forward"):(s="forward",o="backward"):(s=a,o=a);var l=q.transform(r.anchor,t,{affinity:s}),u=q.transform(r.focus,t,{affinity:o});if(!l||!u)return null;r.anchor=l,r.focus=u})}},xr=e=>ae(e)&&N.isNodeList(e.children)&&!ve.isEditor(e),Oe={isAncestor(e){return ae(e)&&N.isNodeList(e.children)},isElement:xr,isElementList(e){return Array.isArray(e)&&e.every(t=>Oe.isElement(t))},isElementProps(e){return e.children!==void 0},isElementType:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return xr(t)&&t[r]===n},matches(e,t){for(var n in t)if(n!=="children"&&e[n]!==t[n])return!1;return!0}},ni=["children"],ri=["text"],Er=new WeakMap,N={ancestor(e,t){var n=N.get(e,t);if(K.isText(n))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(Ee.stringify(n)));return n},ancestors(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var r of y.ancestors(t,n)){var a=N.ancestor(e,r),s=[a,r];yield s}}()},child(e,t){if(K.isText(e))throw new Error("Cannot get the child of a text node: ".concat(Ee.stringify(e)));var n=e.children[t];if(n==null)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(Ee.stringify(e)));return n},children(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var{reverse:r=!1}=n,a=N.ancestor(e,t),{children:s}=a,o=r?s.length-1:0;r?o>=0:o<s.length;){var i=N.child(a,o),l=t.concat(o);yield[i,l],o=r?o-1:o+1}}()},common(e,t,n){var r=y.common(t,n),a=N.get(e,r);return[a,r]},descendant(e,t){var n=N.get(e,t);if(ve.isEditor(n))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(Ee.stringify(n)));return n},descendants(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of N.nodes(e,t))r.length!==0&&(yield[n,r])}()},elements(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of N.nodes(e,t))Oe.isElement(n)&&(yield[n,r])}()},extractProps(e){if(Oe.isAncestor(e)){var t=ot(e,ni);return t}else{var t=ot(e,ri);return t}},first(e,t){for(var n=t.slice(),r=N.get(e,n);r&&!(K.isText(r)||r.children.length===0);)r=r.children[0],n.push(0);return[r,n]},fragment(e,t){if(K.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(Ee.stringify(e)));var n=sn({children:e.children},r=>{var[a,s]=I.edges(t),o=N.nodes(r,{reverse:!0,pass:_=>{var[,p]=_;return!I.includes(t,p)}});for(var[,i]of o){if(!I.includes(t,i)){var l=N.parent(r,i),u=i[i.length-1];l.children.splice(u,1)}if(y.equals(i,s.path)){var f=N.leaf(r,i);f.text=f.text.slice(0,s.offset)}if(y.equals(i,a.path)){var d=N.leaf(r,i);d.text=d.text.slice(a.offset)}}ve.isEditor(r)&&(r.selection=null)});return n.children},get(e,t){for(var n=e,r=0;r<t.length;r++){var a=t[r];if(K.isText(n)||!n.children[a])throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(Ee.stringify(e)));n=n.children[a]}return n},has(e,t){for(var n=e,r=0;r<t.length;r++){var a=t[r];if(K.isText(n)||!n.children[a])return!1;n=n.children[a]}return!0},isNode(e){return K.isText(e)||Oe.isElement(e)||ve.isEditor(e)},isNodeList(e){if(!Array.isArray(e))return!1;var t=Er.get(e);if(t!==void 0)return t;var n=e.every(r=>N.isNode(r));return Er.set(e,n),n},last(e,t){for(var n=t.slice(),r=N.get(e,n);r&&!(K.isText(r)||r.children.length===0);){var a=r.children.length-1;r=r.children[a],n.push(a)}return[r,n]},leaf(e,t){var n=N.get(e,t);if(!K.isText(n))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Ee.stringify(n)));return n},levels(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var r of y.levels(t,n)){var a=N.get(e,r);yield[a,r]}}()},matches(e,t){return Oe.isElement(e)&&Oe.isElementProps(t)&&Oe.matches(e,t)||K.isText(e)&&K.isTextProps(t)&&K.matches(e,t)},nodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var{pass:n,reverse:r=!1}=t,{from:a=[],to:s}=t,o=new Set,i=[],l=e;!(s&&(r?y.isBefore(i,s):y.isAfter(i,s)));){if(o.has(l)||(yield[l,i]),!o.has(l)&&!K.isText(l)&&l.children.length!==0&&(n==null||n([l,i])===!1)){o.add(l);var u=r?l.children.length-1:0;y.isAncestor(i,a)&&(u=a[i.length]),i=i.concat(u),l=N.get(e,i);continue}if(i.length===0)break;if(!r){var f=y.next(i);if(N.has(e,f)){i=f,l=N.get(e,i);continue}}if(r&&i[i.length-1]!==0){var d=y.previous(i);i=d,l=N.get(e,i);continue}i=y.parent(i),l=N.get(e,i),o.add(l)}}()},parent(e,t){var n=y.parent(t),r=N.get(e,n);if(K.isText(r))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return r},string(e){return K.isText(e)?e.text:e.children.map(N.string).join("")},texts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of N.nodes(e,t))K.isText(n)&&(yield[n,r])}()}};function wr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function R(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wr(Object(n),!0).forEach(function(r){Ye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var it={isNodeOperation(e){return it.isOperation(e)&&e.type.endsWith("_node")},isOperation(e){if(!ae(e))return!1;switch(e.type){case"insert_node":return y.isPath(e.path)&&N.isNode(e.node);case"insert_text":return typeof e.offset=="number"&&typeof e.text=="string"&&y.isPath(e.path);case"merge_node":return typeof e.position=="number"&&y.isPath(e.path)&&ae(e.properties);case"move_node":return y.isPath(e.path)&&y.isPath(e.newPath);case"remove_node":return y.isPath(e.path)&&N.isNode(e.node);case"remove_text":return typeof e.offset=="number"&&typeof e.text=="string"&&y.isPath(e.path);case"set_node":return y.isPath(e.path)&&ae(e.properties)&&ae(e.newProperties);case"set_selection":return e.properties===null&&I.isRange(e.newProperties)||e.newProperties===null&&I.isRange(e.properties)||ae(e.properties)&&ae(e.newProperties);case"split_node":return y.isPath(e.path)&&typeof e.position=="number"&&ae(e.properties);default:return!1}},isOperationList(e){return Array.isArray(e)&&e.every(t=>it.isOperation(t))},isSelectionOperation(e){return it.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation(e){return it.isOperation(e)&&e.type.endsWith("_text")},inverse(e){switch(e.type){case"insert_node":return R(R({},e),{},{type:"remove_node"});case"insert_text":return R(R({},e),{},{type:"remove_text"});case"merge_node":return R(R({},e),{},{type:"split_node",path:y.previous(e.path)});case"move_node":{var{newPath:t,path:n}=e;if(y.equals(t,n))return e;if(y.isSibling(n,t))return R(R({},e),{},{path:t,newPath:n});var r=y.transform(n,e),a=y.transform(y.next(n),e);return R(R({},e),{},{path:r,newPath:a})}case"remove_node":return R(R({},e),{},{type:"insert_node"});case"remove_text":return R(R({},e),{},{type:"insert_text"});case"set_node":{var{properties:s,newProperties:o}=e;return R(R({},e),{},{properties:o,newProperties:s})}case"set_selection":{var{properties:i,newProperties:l}=e;return i==null?R(R({},e),{},{properties:l,newProperties:null}):l==null?R(R({},e),{},{properties:null,newProperties:i}):R(R({},e),{},{properties:l,newProperties:i})}case"split_node":return R(R({},e),{},{type:"merge_node",path:y.next(e.path)})}}},Sr=new WeakMap,ai=e=>{var t=Sr.get(e);if(t!==void 0)return t;if(!ae(e))return!1;var n=typeof e.addMark=="function"&&typeof e.apply=="function"&&typeof e.deleteFragment=="function"&&typeof e.insertBreak=="function"&&typeof e.insertSoftBreak=="function"&&typeof e.insertFragment=="function"&&typeof e.insertNode=="function"&&typeof e.insertText=="function"&&typeof e.isElementReadOnly=="function"&&typeof e.isInline=="function"&&typeof e.isSelectable=="function"&&typeof e.isVoid=="function"&&typeof e.normalizeNode=="function"&&typeof e.onChange=="function"&&typeof e.removeMark=="function"&&typeof e.getDirtyPaths=="function"&&(e.marks===null||ae(e.marks))&&(e.selection===null||I.isRange(e.selection))&&N.isNodeList(e.children)&&it.isOperationList(e.operations);return Sr.set(e,n),n},ve={above(e,t){return e.above(t)},addMark(e,t,n){e.addMark(t,n)},after(e,t,n){return e.after(t,n)},before(e,t,n){return e.before(t,n)},deleteBackward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=t;e.deleteBackward(n)},deleteForward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=t;e.deleteForward(n)},deleteFragment(e,t){e.deleteFragment(t)},edges(e,t){return e.edges(t)},elementReadOnly(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.elementReadOnly(t)},end(e,t){return e.end(t)},first(e,t){return e.first(t)},fragment(e,t){return e.fragment(t)},hasBlocks(e,t){return e.hasBlocks(t)},hasInlines(e,t){return e.hasInlines(t)},hasPath(e,t){return e.hasPath(t)},hasTexts(e,t){return e.hasTexts(t)},insertBreak(e){e.insertBreak()},insertFragment(e,t,n){e.insertFragment(t,n)},insertNode(e,t){e.insertNode(t)},insertSoftBreak(e){e.insertSoftBreak()},insertText(e,t){e.insertText(t)},isBlock(e,t){return e.isBlock(t)},isEdge(e,t,n){return e.isEdge(t,n)},isEditor(e){return ai(e)},isElementReadOnly(e,t){return e.isElementReadOnly(t)},isEmpty(e,t){return e.isEmpty(t)},isEnd(e,t,n){return e.isEnd(t,n)},isInline(e,t){return e.isInline(t)},isNormalizing(e){return e.isNormalizing()},isSelectable(e,t){return e.isSelectable(t)},isStart(e,t,n){return e.isStart(t,n)},isVoid(e,t){return e.isVoid(t)},last(e,t){return e.last(t)},leaf(e,t,n){return e.leaf(t,n)},levels(e,t){return e.levels(t)},marks(e){return e.getMarks()},next(e,t){return e.next(t)},node(e,t,n){return e.node(t,n)},nodes(e,t){return e.nodes(t)},normalize(e,t){e.normalize(t)},parent(e,t,n){return e.parent(t,n)},path(e,t,n){return e.path(t,n)},pathRef(e,t,n){return e.pathRef(t,n)},pathRefs(e){return e.pathRefs()},point(e,t,n){return e.point(t,n)},pointRef(e,t,n){return e.pointRef(t,n)},pointRefs(e){return e.pointRefs()},positions(e,t){return e.positions(t)},previous(e,t){return e.previous(t)},range(e,t,n){return e.range(t,n)},rangeRef(e,t,n){return e.rangeRef(t,n)},rangeRefs(e){return e.rangeRefs()},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){e.setNormalizing(t)},start(e,t){return e.start(t)},string(e,t,n){return e.string(t,n)},unhangRange(e,t,n){return e.unhangRange(t,n)},void(e,t){return e.void(t)},withoutNormalizing(e,t){e.withoutNormalizing(t)},shouldMergeNodesRemovePrevNode:(e,t,n)=>e.shouldMergeNodesRemovePrevNode(t,n)};function Nr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Fr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Nr(Object(n),!0).forEach(function(r){Ye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var q={compare(e,t){var n=y.compare(e.path,t.path);return n===0?e.offset<t.offset?-1:e.offset>t.offset?1:0:n},isAfter(e,t){return q.compare(e,t)===1},isBefore(e,t){return q.compare(e,t)===-1},equals(e,t){return e.offset===t.offset&&y.equals(e.path,t.path)},isPoint(e){return ae(e)&&typeof e.offset=="number"&&y.isPath(e.path)},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return sn(e,r=>{if(r===null)return null;var{affinity:a="forward"}=n,{path:s,offset:o}=r;switch(t.type){case"insert_node":case"move_node":{r.path=y.transform(s,t,n);break}case"insert_text":{y.equals(t.path,s)&&(t.offset<o||t.offset===o&&a==="forward")&&(r.offset+=t.text.length);break}case"merge_node":{y.equals(t.path,s)&&(r.offset+=t.position),r.path=y.transform(s,t,n);break}case"remove_text":{y.equals(t.path,s)&&t.offset<=o&&(r.offset-=Math.min(o-t.offset,t.text.length));break}case"remove_node":{if(y.equals(t.path,s)||y.isAncestor(t.path,s))return null;r.path=y.transform(s,t,n);break}case"split_node":{if(y.equals(t.path,s)){if(t.position===o&&a==null)return null;(t.position<o||t.position===o&&a==="forward")&&(r.offset-=t.position,r.path=y.transform(s,t,Fr(Fr({},n),{},{affinity:"forward"})))}else r.path=y.transform(s,t,n);break}}})}},Tr=void 0,Ee={setScrubber(e){Tr=e},stringify(e){return JSON.stringify(e,Tr)}},si=["text"],oi=["anchor","focus"];function Or(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ne(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Or(Object(n),!0).forEach(function(r){Ye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Or(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var K={equals(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:r=!1}=n;function a(s){var o=ot(s,si);return o}return Cr(r?a(e):e,r?a(t):t)},isText(e){return ae(e)&&typeof e.text=="string"},isTextList(e){return Array.isArray(e)&&e.every(t=>K.isText(t))},isTextProps(e){return e.text!==void 0},matches(e,t){for(var n in t)if(n!=="text"&&(!e.hasOwnProperty(n)||e[n]!==t[n]))return!1;return!0},decorations(e,t){var n=[Ne({},e)];for(var r of t){var a=ot(r,oi),[s,o]=I.edges(r),i=[],l=0,u=s.offset,f=o.offset;for(var d of n){var{length:_}=d.text,p=l;if(l+=_,u<=p&&l<=f){Object.assign(d,a),i.push(d);continue}if(u!==f&&(u===l||f===p)||u>l||f<p||f===p&&p!==0){i.push(d);continue}var g=d,m=void 0,v=void 0;if(f<l){var b=f-p;v=Ne(Ne({},g),{},{text:g.text.slice(b)}),g=Ne(Ne({},g),{},{text:g.text.slice(0,b)})}if(u>p){var w=u-p;m=Ne(Ne({},g),{},{text:g.text.slice(0,w)}),g=Ne(Ne({},g),{},{text:g.text.slice(w)})}Object.assign(g,a),m&&i.push(m),i.push(g),v&&i.push(v)}n=i}return n}},ii=e=>e.selection?e.selection:e.children.length>0?ve.end(e,[]):[0],W;(function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"})(W||(W={})),W.L,W.L|W.V|W.LV|W.LVT,W.LV|W.V,W.V|W.T,W.LVT|W.T,W.T,W.Any,W.Extend|W.ZWJ,W.Any,W.SpacingMark,W.Prepend,W.Any,W.ZWJ,W.ExtPict,W.RI,W.RI;var ci={delete(e,t){e.delete(t)},insertFragment(e,t,n){e.insertFragment(t,n)},insertText(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};ve.withoutNormalizing(e,()=>{var{voids:r=!1}=n,{at:a=ii(e)}=n;if(y.isPath(a)&&(a=ve.range(e,a)),I.isRange(a))if(I.isCollapsed(a))a=a.anchor;else{var s=I.end(a);if(!r&&ve.void(e,{at:s}))return;var o=I.start(a),i=ve.pointRef(e,o),l=ve.pointRef(e,s);Ar.delete(e,{at:a,voids:r});var u=i.unref(),f=l.unref();a=u||f,Ar.setSelection(e,{anchor:a,focus:a})}if(!(!r&&ve.void(e,{at:a})||ve.elementReadOnly(e,{at:a}))){var{path:d,offset:_}=a;t.length>0&&e.apply({type:"insert_text",path:d,offset:_,text:t})}})}};function Pr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Nt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Pr(Object(n),!0).forEach(function(r){Ye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Ar=Nt(Nt(Nt(Nt({},Yo),Zo),Jo),ci);function Ir(e){if(K.isText(e)){let t=e==null?void 0:e.text;return e!=null&&e.bold&&(t=`<strong>${t}</strong>`),e!=null&&e.code&&(t=`<code>${t}</code>`),e!=null&&e.italic&&(t=`<em>${t}</em>`),e!=null&&e.underline&&(t=`<u>${t}</u>`),t}if(Oe.isElement(e)){const t=e.children.map(r=>Ir(r)).join(""),n=e.align||"left";switch(e.type){case"image":return`<img src="${e.src}" class="align_${n}" />`;case"paragraph":return`<p class="align_${n}">${t}</p>`;case"blockQuote":return`<blockquote class="align_${n}">${t}</blockquote>`;case"bulletedList":return`<ul class="align_${n}">${t}</ul>`;case"headingOne":return`<h1 class="align_${n}">${t}</h1>`;case"headingTwo":return`<h2 class="align_${n}">${t}</h2>`;case"listItem":return`<li class="align_${n}">${t}</li>`;case"numberedList":return`<ol class="align_${n}">${t}</ol>`;default:return t}}return""}function on(e){var r;if(typeof e=="string")return{text:e};const t=Array.isArray(e.props.children)?e.props.children.map(a=>on(a)):[{text:e.props.children||""}],n=(r=e.props.className)==null?void 0:r.replace("align_","");switch(e.type){case"img":return{type:"image",align:n,src:e.props.src,children:[{text:""}]};case"p":return{type:"paragraph",align:n,children:t};case"blockquote":return{type:"blockQuote",align:n,children:t};case"ul":return{type:"bulletedList",align:n,children:t};case"ol":return{type:"numberedList",align:n,children:t};case"li":return{type:"listItem",align:n,children:t};case"h1":return{type:"headingOne",align:n,children:t};case"h2":return{type:"headingTwo",align:n,children:t};case"strong":return{text:e.props.children,bold:!0};case"code":return{text:e.props.children,code:!0};case"em":return{text:e.props.children,italic:!0};case"u":return{text:e.props.children,underline:!0};default:return{text:e.props.children||""}}}function li(e){return e.map(t=>Ir(t)).join("")}var Y=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ui(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mr={},cn={},ln={},Ge={},un={},fn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Doctype=e.CDATA=e.Tag=e.Style=e.Script=e.Comment=e.Directive=e.Text=e.Root=e.isTag=e.ElementType=void 0;var t;(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"})(t=e.ElementType||(e.ElementType={}));function n(r){return r.type===t.Tag||r.type===t.Script||r.type===t.Style}e.isTag=n,e.Root=t.Root,e.Text=t.Text,e.Directive=t.Directive,e.Comment=t.Comment,e.Script=t.Script,e.Style=t.Style,e.Tag=t.Tag,e.CDATA=t.CDATA,e.Doctype=t.Doctype})(fn);var T={},Pe=Y&&Y.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,a){r.__proto__=a}||function(r,a){for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(r[s]=a[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ct=Y&&Y.__assign||function(){return ct=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},ct.apply(this,arguments)};Object.defineProperty(T,"__esModule",{value:!0}),T.cloneNode=T.hasChildren=T.isDocument=T.isDirective=T.isComment=T.isText=T.isCDATA=T.isTag=T.Element=T.Document=T.CDATA=T.NodeWithChildren=T.ProcessingInstruction=T.Comment=T.Text=T.DataNode=T.Node=void 0;var _e=fn,dn=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(t){this.parent=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(t){this.prev=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(t){this.next=t},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(t){return t===void 0&&(t=!1),_n(this,t)},e}();T.Node=dn;var Ft=function(e){Pe(t,e);function t(n){var r=e.call(this)||this;return r.data=n,r}return Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(n){this.data=n},enumerable:!1,configurable:!0}),t}(dn);T.DataNode=Ft;var Dr=function(e){Pe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=_e.ElementType.Text,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(Ft);T.Text=Dr;var Lr=function(e){Pe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=_e.ElementType.Comment,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(Ft);T.Comment=Lr;var $r=function(e){Pe(t,e);function t(n,r){var a=e.call(this,r)||this;return a.name=n,a.type=_e.ElementType.Directive,a}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(Ft);T.ProcessingInstruction=$r;var Tt=function(e){Pe(t,e);function t(n){var r=e.call(this)||this;return r.children=n,r}return Object.defineProperty(t.prototype,"firstChild",{get:function(){var n;return(n=this.children[0])!==null&&n!==void 0?n:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(n){this.children=n},enumerable:!1,configurable:!0}),t}(dn);T.NodeWithChildren=Tt;var Br=function(e){Pe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=_e.ElementType.CDATA,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(Tt);T.CDATA=Br;var jr=function(e){Pe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=_e.ElementType.Root,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(Tt);T.Document=jr;var zr=function(e){Pe(t,e);function t(n,r,a,s){a===void 0&&(a=[]),s===void 0&&(s=n==="script"?_e.ElementType.Script:n==="style"?_e.ElementType.Style:_e.ElementType.Tag);var o=e.call(this,a)||this;return o.name=n,o.attribs=r,o.type=s,o}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(n){this.name=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var n=this;return Object.keys(this.attribs).map(function(r){var a,s;return{name:r,value:n.attribs[r],namespace:(a=n["x-attribsNamespace"])===null||a===void 0?void 0:a[r],prefix:(s=n["x-attribsPrefix"])===null||s===void 0?void 0:s[r]}})},enumerable:!1,configurable:!0}),t}(Tt);T.Element=zr;function Hr(e){return(0,_e.isTag)(e)}T.isTag=Hr;function Gr(e){return e.type===_e.ElementType.CDATA}T.isCDATA=Gr;function Ur(e){return e.type===_e.ElementType.Text}T.isText=Ur;function Vr(e){return e.type===_e.ElementType.Comment}T.isComment=Vr;function qr(e){return e.type===_e.ElementType.Directive}T.isDirective=qr;function Wr(e){return e.type===_e.ElementType.Root}T.isDocument=Wr;function fi(e){return Object.prototype.hasOwnProperty.call(e,"children")}T.hasChildren=fi;function _n(e,t){t===void 0&&(t=!1);var n;if(Ur(e))n=new Dr(e.data);else if(Vr(e))n=new Lr(e.data);else if(Hr(e)){var r=t?gn(e.children):[],a=new zr(e.name,ct({},e.attribs),r);r.forEach(function(l){return l.parent=a}),e.namespace!=null&&(a.namespace=e.namespace),e["x-attribsNamespace"]&&(a["x-attribsNamespace"]=ct({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(a["x-attribsPrefix"]=ct({},e["x-attribsPrefix"])),n=a}else if(Gr(e)){var r=t?gn(e.children):[],s=new Br(r);r.forEach(function(u){return u.parent=s}),n=s}else if(Wr(e)){var r=t?gn(e.children):[],o=new jr(r);r.forEach(function(u){return u.parent=o}),e["x-mode"]&&(o["x-mode"]=e["x-mode"]),n=o}else if(qr(e)){var i=new $r(e.name,e.data);e["x-name"]!=null&&(i["x-name"]=e["x-name"],i["x-publicId"]=e["x-publicId"],i["x-systemId"]=e["x-systemId"]),n=i}else throw new Error("Not implemented yet: ".concat(e.type));return n.startIndex=e.startIndex,n.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(n.sourceCodeLocation=e.sourceCodeLocation),n}T.cloneNode=_n;function gn(e){for(var t=e.map(function(r){return _n(r,!0)}),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}(function(e){var t=Y&&Y.__createBinding||(Object.create?function(i,l,u,f){f===void 0&&(f=u);var d=Object.getOwnPropertyDescriptor(l,u);(!d||("get"in d?!l.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return l[u]}}),Object.defineProperty(i,f,d)}:function(i,l,u,f){f===void 0&&(f=u),i[f]=l[u]}),n=Y&&Y.__exportStar||function(i,l){for(var u in i)u!=="default"&&!Object.prototype.hasOwnProperty.call(l,u)&&t(l,i,u)};Object.defineProperty(e,"__esModule",{value:!0}),e.DomHandler=void 0;var r=fn,a=T;n(T,e);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},o=function(){function i(l,u,f){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof u=="function"&&(f=u,u=s),typeof l=="object"&&(u=l,l=void 0),this.callback=l??null,this.options=u??s,this.elementCB=f??null}return i.prototype.onparserinit=function(l){this.parser=l},i.prototype.onreset=function(){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},i.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},i.prototype.onerror=function(l){this.handleCallback(l)},i.prototype.onclosetag=function(){this.lastNode=null;var l=this.tagStack.pop();this.options.withEndIndices&&(l.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(l)},i.prototype.onopentag=function(l,u){var f=this.options.xmlMode?r.ElementType.Tag:void 0,d=new a.Element(l,u,void 0,f);this.addNode(d),this.tagStack.push(d)},i.prototype.ontext=function(l){var u=this.lastNode;if(u&&u.type===r.ElementType.Text)u.data+=l,this.options.withEndIndices&&(u.endIndex=this.parser.endIndex);else{var f=new a.Text(l);this.addNode(f),this.lastNode=f}},i.prototype.oncomment=function(l){if(this.lastNode&&this.lastNode.type===r.ElementType.Comment){this.lastNode.data+=l;return}var u=new a.Comment(l);this.addNode(u),this.lastNode=u},i.prototype.oncommentend=function(){this.lastNode=null},i.prototype.oncdatastart=function(){var l=new a.Text(""),u=new a.CDATA([l]);this.addNode(u),l.parent=u,this.lastNode=l},i.prototype.oncdataend=function(){this.lastNode=null},i.prototype.onprocessinginstruction=function(l,u){var f=new a.ProcessingInstruction(l,u);this.addNode(f)},i.prototype.handleCallback=function(l){if(typeof this.callback=="function")this.callback(l,this.dom);else if(l)throw l},i.prototype.addNode=function(l){var u=this.tagStack[this.tagStack.length-1],f=u.children[u.children.length-1];this.options.withStartIndices&&(l.startIndex=this.parser.startIndex),this.options.withEndIndices&&(l.endIndex=this.parser.endIndex),u.children.push(l),f&&(l.prev=f,f.next=l),l.parent=u,this.lastNode=null},i}();e.DomHandler=o,e.default=o})(un);var Rr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CARRIAGE_RETURN_PLACEHOLDER_REGEX=e.CARRIAGE_RETURN_PLACEHOLDER=e.CARRIAGE_RETURN_REGEX=e.CARRIAGE_RETURN=e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES=void 0,e.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"],e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES.reduce(function(t,n){return t[n.toLowerCase()]=n,t},{}),e.CARRIAGE_RETURN="\r",e.CARRIAGE_RETURN_REGEX=new RegExp(e.CARRIAGE_RETURN,"g"),e.CARRIAGE_RETURN_PLACEHOLDER="__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now(),"__"),e.CARRIAGE_RETURN_PLACEHOLDER_REGEX=new RegExp(e.CARRIAGE_RETURN_PLACEHOLDER,"g")})(Rr),Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.formatAttributes=Xr,Ge.escapeSpecialCharacters=gi,Ge.revertEscapedCharacters=Kr,Ge.formatDOM=Yr;var Ot=un,lt=Rr;function di(e){return lt.CASE_SENSITIVE_TAG_NAMES_MAP[e]}function Xr(e){for(var t={},n=0,r=e.length;n<r;n++){var a=e[n];t[a.name]=a.value}return t}function _i(e){e=e.toLowerCase();var t=di(e);return t||e}function gi(e){return e.replace(lt.CARRIAGE_RETURN_REGEX,lt.CARRIAGE_RETURN_PLACEHOLDER)}function Kr(e){return e.replace(lt.CARRIAGE_RETURN_PLACEHOLDER_REGEX,lt.CARRIAGE_RETURN)}function Yr(e,t,n){t===void 0&&(t=null);for(var r=[],a,s=0,o=e.length;s<o;s++){var i=e[s];switch(i.nodeType){case 1:{var l=_i(i.nodeName);a=new Ot.Element(l,Xr(i.attributes)),a.children=Yr(l==="template"?i.content.childNodes:i.childNodes,a);break}case 3:a=new Ot.Text(Kr(i.nodeValue));break;case 8:a=new Ot.Comment(i.nodeValue);break;default:continue}var u=r[s-1]||null;u&&(u.next=a),a.parent=t,a.prev=u,a.next=null,r.push(a)}return n&&(a=new Ot.ProcessingInstruction(n.substring(0,n.indexOf(" ")).toLowerCase(),n),a.next=r[0]||null,a.parent=t,r.unshift(a),r[1]&&(r[1].prev=r[0])),r}Object.defineProperty(ln,"__esModule",{value:!0}),ln.default=vi;var mi=Ge,Zr="html",Jr="head",Pt="body",hi=/<([a-zA-Z]+[0-9]?)/,Qr=/<head[^]*>/i,ea=/<body[^]*>/i,At=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},mn=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},ta=typeof window=="object"&&window.DOMParser;if(typeof ta=="function"){var pi=new ta,yi="text/html";mn=function(e,t){return t&&(e="<".concat(t,">").concat(e,"</").concat(t,">")),pi.parseFromString(e,yi)},At=mn}if(typeof document=="object"&&document.implementation){var It=document.implementation.createHTMLDocument();At=function(e,t){if(t){var n=It.documentElement.querySelector(t);return n&&(n.innerHTML=e),It}return It.documentElement.innerHTML=e,It}}var Mt=typeof document=="object"&&document.createElement("template"),hn;Mt&&Mt.content&&(hn=function(e){return Mt.innerHTML=e,Mt.content.childNodes});function vi(e){var t,n;e=(0,mi.escapeSpecialCharacters)(e);var r=e.match(hi),a=r&&r[1]?r[1].toLowerCase():"";switch(a){case Zr:{var s=mn(e);if(!Qr.test(e)){var o=s.querySelector(Jr);(t=o==null?void 0:o.parentNode)===null||t===void 0||t.removeChild(o)}if(!ea.test(e)){var o=s.querySelector(Pt);(n=o==null?void 0:o.parentNode)===null||n===void 0||n.removeChild(o)}return s.querySelectorAll(Zr)}case Jr:case Pt:{var i=At(e).querySelectorAll(a);return ea.test(e)&&Qr.test(e)?i[0].parentNode.childNodes:i}default:{if(hn)return hn(e);var o=At(e,Pt).querySelector(Pt);return o.childNodes}}}var ki=Y&&Y.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(cn,"__esModule",{value:!0}),cn.default=Ei;var Ci=ki(ln),bi=Ge,xi=/<(![a-zA-Z\s]+)>/;function Ei(e){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(xi),n=t?t[1]:void 0;return(0,bi.formatDOM)((0,Ci.default)(e),null,n)}var Dt={},Ce={},Lt={},wi=0;Lt.SAME=wi;var Si=1;Lt.CAMELCASE=Si,Lt.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 na=0,Ae=1,$t=2,Bt=3,pn=4,ra=5,aa=6;function Ni(e){return ne.hasOwnProperty(e)?ne[e]:null}function ie(e,t,n,r,a,s,o){this.acceptsBooleans=t===$t||t===Bt||t===pn,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}const ne={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(e=>{ne[e]=new ie(e,na,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([e,t])=>{ne[e]=new ie(e,Ae,!1,t,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(e=>{ne[e]=new ie(e,$t,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(e=>{ne[e]=new ie(e,$t,!1,e,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(e=>{ne[e]=new ie(e,Bt,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(e=>{ne[e]=new ie(e,Bt,!0,e,null,!1,!1)}),["capture","download"].forEach(e=>{ne[e]=new ie(e,pn,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(e=>{ne[e]=new ie(e,aa,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(e=>{ne[e]=new ie(e,ra,!1,e.toLowerCase(),null,!1,!1)});const yn=/[\-\:]([a-z])/g,vn=e=>e[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(e=>{const t=e.replace(yn,vn);ne[t]=new ie(t,Ae,!1,e,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(e=>{const t=e.replace(yn,vn);ne[t]=new ie(t,Ae,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(e=>{const t=e.replace(yn,vn);ne[t]=new ie(t,Ae,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(e=>{ne[e]=new ie(e,Ae,!1,e.toLowerCase(),null,!1,!1)});const Fi="xlinkHref";ne[Fi]=new ie("xlinkHref",Ae,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(e=>{ne[e]=new ie(e,Ae,!1,e.toLowerCase(),null,!0,!0)});const{CAMELCASE:Ti,SAME:Oi,possibleStandardNames:sa}=Lt,Pi=":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",Ai=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+Pi+"]*$")),Ii=Object.keys(sa).reduce((e,t)=>{const n=sa[t];return n===Oi?e[t]=t:n===Ti?e[t.toLowerCase()]=t:e[t]=n,e},{});Ce.BOOLEAN=Bt,Ce.BOOLEANISH_STRING=$t,Ce.NUMERIC=ra,Ce.OVERLOADED_BOOLEAN=pn,Ce.POSITIVE_NUMERIC=aa,Ce.RESERVED=na,Ce.STRING=Ae,Ce.getPropertyInfo=Ni,Ce.isCustomAttribute=Ai,Ce.possibleStandardNames=Ii;var kn={},Cn={},oa=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Mi=/\n/g,Di=/^\s*/,Li=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,$i=/^:\s*/,Bi=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,ji=/^[;\s]*/,zi=/^\s+|\s+$/g,Hi=`
183
+ `,ia="/",ca="*",Ue="",Gi="comment",Ui="declaration",Vi=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function a(g){var m=g.match(Mi);m&&(n+=m.length);var v=g.lastIndexOf(Hi);r=~v?g.length-v:r+g.length}function s(){var g={line:n,column:r};return function(m){return m.position=new o(g),u(),m}}function o(g){this.start=g,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function i(g){var m=new Error(t.source+":"+n+":"+r+": "+g);if(m.reason=g,m.filename=t.source,m.line=n,m.column=r,m.source=e,!t.silent)throw m}function l(g){var m=g.exec(e);if(m){var v=m[0];return a(v),e=e.slice(v.length),m}}function u(){l(Di)}function f(g){var m;for(g=g||[];m=d();)m!==!1&&g.push(m);return g}function d(){var g=s();if(!(ia!=e.charAt(0)||ca!=e.charAt(1))){for(var m=2;Ue!=e.charAt(m)&&(ca!=e.charAt(m)||ia!=e.charAt(m+1));)++m;if(m+=2,Ue===e.charAt(m-1))return i("End of comment missing");var v=e.slice(2,m-2);return r+=2,a(v),e=e.slice(m),r+=2,g({type:Gi,comment:v})}}function _(){var g=s(),m=l(Li);if(m){if(d(),!l($i))return i("property missing ':'");var v=l(Bi),b=g({type:Ui,property:la(m[0].replace(oa,Ue)),value:v?la(v[0].replace(oa,Ue)):Ue});return l(ji),b}}function p(){var g=[];f(g);for(var m;m=_();)m!==!1&&(g.push(m),f(g));return g}return u(),p()};function la(e){return e?e.replace(zi,Ue):Ue}var qi=Y&&Y.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.default=Ri;var Wi=qi(Vi);function Ri(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,Wi.default)(e),a=typeof t=="function";return r.forEach(function(s){if(s.type==="declaration"){var o=s.property,i=s.value;a?t(o,i,s):i&&(n=n||{},n[o]=i)}}),n}var jt={};Object.defineProperty(jt,"__esModule",{value:!0}),jt.camelCase=void 0;var Xi=/^--[a-zA-Z0-9_-]+$/,Ki=/-([a-z])/g,Yi=/^[^-]+$/,Zi=/^-(webkit|moz|ms|o|khtml)-/,Ji=/^-(ms)-/,Qi=function(e){return!e||Yi.test(e)||Xi.test(e)},ec=function(e,t){return t.toUpperCase()},ua=function(e,t){return"".concat(t,"-")},tc=function(e,t){return t===void 0&&(t={}),Qi(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Ji,ua):e=e.replace(Zi,ua),e.replace(Ki,ec))};jt.camelCase=tc;var nc=Y&&Y.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},rc=nc(Cn),ac=jt;function bn(e,t){var n={};return!e||typeof e!="string"||(0,rc.default)(e,function(r,a){r&&a&&(n[(0,ac.camelCase)(r,t)]=a)}),n}bn.default=bn;var sc=bn;(function(e){var t=Y&&Y.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(e,"__esModule",{value:!0}),e.returnFirstArg=e.canTextBeChildOfNode=e.ELEMENTS_WITH_NO_TEXT_CHILDREN=e.PRESERVE_CUSTOM_ATTRIBUTES=void 0,e.isCustomComponent=s,e.setStyleProp=i;var n=h,r=t(sc),a=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function s(f,d){return f.includes("-")?!a.has(f):!!(d&&typeof d.is=="string")}var o={reactCompat:!0};function i(f,d){if(typeof f=="string"){if(!f.trim()){d.style={};return}try{d.style=(0,r.default)(f,o)}catch{d.style={}}}}e.PRESERVE_CUSTOM_ATTRIBUTES=Number(n.version.split(".")[0])>=16,e.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var l=function(f){return!e.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(f.name)};e.canTextBeChildOfNode=l;var u=function(f){return f};e.returnFirstArg=u})(kn),Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.default=lc;var ut=Ce,fa=kn,oc=["checked","value"],ic=["input","select","textarea"],cc={reset:!0,submit:!0};function lc(e,t){e===void 0&&(e={});var n={},r=!!(e.type&&cc[e.type]);for(var a in e){var s=e[a];if((0,ut.isCustomAttribute)(a)){n[a]=s;continue}var o=a.toLowerCase(),i=da(o);if(i){var l=(0,ut.getPropertyInfo)(i);switch(oc.includes(i)&&ic.includes(t)&&!r&&(i=da("default"+o)),n[i]=s,l&&l.type){case ut.BOOLEAN:n[i]=!0;break;case ut.OVERLOADED_BOOLEAN:s===""&&(n[i]=!0);break}continue}fa.PRESERVE_CUSTOM_ATTRIBUTES&&(n[a]=s)}return(0,fa.setStyleProp)(e.style,n),n}function da(e){return ut.possibleStandardNames[e]}var xn={},uc=Y&&Y.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xn,"__esModule",{value:!0}),xn.default=_a;var En=h,fc=uc(Dt),ft=kn,dc={cloneElement:En.cloneElement,createElement:En.createElement,isValidElement:En.isValidElement};function _a(e,t){t===void 0&&(t={});for(var n=[],r=typeof t.replace=="function",a=t.transform||ft.returnFirstArg,s=t.library||dc,o=s.cloneElement,i=s.createElement,l=s.isValidElement,u=e.length,f=0;f<u;f++){var d=e[f];if(r){var _=t.replace(d,f);if(l(_)){u>1&&(_=o(_,{key:_.key||f})),n.push(a(_,d,f));continue}}if(d.type==="text"){var p=!d.data.trim().length;if(p&&d.parent&&!(0,ft.canTextBeChildOfNode)(d.parent)||t.trim&&p)continue;n.push(a(d.data,d,f));continue}var g=d,m={};_c(g)?((0,ft.setStyleProp)(g.attribs.style,g.attribs),m=g.attribs):g.attribs&&(m=(0,fc.default)(g.attribs,g.name));var v=void 0;switch(d.type){case"script":case"style":d.children[0]&&(m.dangerouslySetInnerHTML={__html:d.children[0].data});break;case"tag":d.name==="textarea"&&d.children[0]?m.defaultValue=d.children[0].data:d.children&&d.children.length&&(v=_a(d.children,t));break;default:continue}u>1&&(m.key=f),n.push(a(i(d.name,m,v),d,f))}return n.length===1?n[0]:n}function _c(e){return ft.PRESERVE_CUSTOM_ATTRIBUTES&&e.type==="tag"&&(0,ft.isCustomComponent)(e.name,e.attribs)}(function(e){var t=Y&&Y.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),e.htmlToDOM=e.domToReact=e.attributesToProps=e.Text=e.ProcessingInstruction=e.Element=e.Comment=void 0,e.default=i;var n=t(cn);e.htmlToDOM=n.default;var r=t(Dt);e.attributesToProps=r.default;var a=t(xn);e.domToReact=a.default;var s=un;Object.defineProperty(e,"Comment",{enumerable:!0,get:function(){return s.Comment}}),Object.defineProperty(e,"Element",{enumerable:!0,get:function(){return s.Element}}),Object.defineProperty(e,"ProcessingInstruction",{enumerable:!0,get:function(){return s.ProcessingInstruction}}),Object.defineProperty(e,"Text",{enumerable:!0,get:function(){return s.Text}});var o={lowerCaseAttributeNames:!1};function i(l,u){if(typeof l!="string")throw new TypeError("First argument must be a string");return l?(0,a.default)((0,n.default)(l,(u==null?void 0:u.htmlparser2)||o),u):[]}})(Mr);const ga=ui(Mr),gc=ga.default||ga;function mc(e){const t=gc(e);return Array.isArray(t)?t.map(n=>typeof n=="string"?{text:n}:on(n)):typeof t=="string"?[{text:t}]:[on(t)]}C.AlertContainer=Ca,C.AlertContent=ba,C.AlertDescription=xa,C.AlertIcon=Ea,C.AlertTitle=On,C.AudioPlayer=Mn,C.AudioUpload=Fa,C.Badge=Ta,C.Button=$e,C.CardTabButton=Aa,C.CardTabContainer=Ia,C.Checkbox=Ma,C.ClientOnly=La,C.CurrencyInput=ja,C.Divider=dt,C.DrawerContainer=Ua,C.DrawerHeader=Va,C.DrawerProvider=zs,C.FieldError=ke,C.FieldLabel=fe,C.FieldWrapper=me,C.FileUpload=Ra,C.FormProvider=wa,C.IconButton=_t,C.ImageUpload=Ya,C.Input=Hn,C.MaskedInput=Ja,C.ModalContainer=ts,C.ModalFooter=ns,C.ModalHeader=rs,C.ModalProvider=Gs,C.MultiSelect=ds,C.PhoneInput=xs,C.Popover=Es,C.RadioBox=Ns,C.RadioGroup=Fs,C.Slider=In,C.Switch=Ts,C.TabButton=As,C.TabContainer=Is,C.TableBody=Ms,C.TableCaption=Ds,C.TableContainer=Ls,C.TableFooter=$s,C.TableHeader=Bs,C.Textarea=js,C.ToastProvider=Do,C.Tooltip=gt,C.toHtml=li,C.toRichTextValue=mc,C.useDrawer=Hs,C.useForm=ye,C.useHydrated=$n,C.useModal=Us,C.useScopedParams=Vs,C.useScrollLock=Xe,C.useSlider=An,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})});
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/phoneInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AA0B7C,KAAK,eAAe,GAAG;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,cAAc,CAAC,EAAE,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC;IACnD,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwGG;AAEH,iBAAS,UAAU,CAAC,KAAK,EAAE,eAAe,2CAsLzC;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/phoneInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AA0B7C,KAAK,eAAe,GAAG;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,cAAc,CAAC,EAAE,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC;IACnD,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwGG;AAEH,iBAAS,UAAU,CAAC,KAAK,EAAE,eAAe,2CAuLzC;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -190,16 +190,16 @@ function PhoneInput(props) {
190
190
  returnValue += removeNumberMasks(props || value);
191
191
  return returnValue;
192
192
  }
193
- return (_jsxs(FieldWrapper, { children: [label && _jsx(FieldLabel, { showAsterisk: showAsterisk, children: label }), _jsxs(PhoneInputContainer, { id: phoneInputId, disabled: isDisabled, isError: isError, isLoading: isLoading, isFocused: isFocused, readOnly: readOnly, size: size, variant: variant, className: className, onFocus: handleContainerFocus, children: [_jsx(PhoneInputCountrySelector, { currentCountry: currentCountry, onClick: handleOpenCountryOptions, size: size }), _jsxs(PhoneInputCountryOptionsContainer, { isOpen: isDisabled ? false : showCountryOptions, search: search, placeholder: searchCountryPlaceholder, onSearch: setSearch, children: [countries
193
+ return (_jsxs(FieldWrapper, { children: [label && _jsx(FieldLabel, { showAsterisk: showAsterisk, children: label }), _jsxs(PhoneInputContainer, { id: phoneInputId, disabled: isDisabled, isError: isError, isLoading: isLoading, isFocused: isFocused, readOnly: readOnly, size: size, variant: variant, className: className, onFocus: handleContainerFocus, children: [_jsx(PhoneInputCountrySelector, { currentCountry: currentCountry, onClick: handleOpenCountryOptions, size: size }), _jsxs(PhoneInputCountryOptionsContainer, { isOpen: isDisabled ? false : readOnly ? false : showCountryOptions, search: search, placeholder: searchCountryPlaceholder, onSearch: setSearch, children: [countries
194
194
  .filter((country) => filterCountryFunction(country))
195
195
  .map((country) => (_jsx(PhoneInputCountryOption, { country: country, handleChangeValue: () => {
196
196
  setCurrentCountry(country);
197
197
  setShowCountryOptions(false);
198
198
  setValue(country.mask);
199
199
  }, isActive: country.iso === currentCountry.iso, size: size }, country.iso))), countries.filter((country) => filterCountryFunction(country))
200
- .length === 0 && _jsx("p", { children: notFoundCountryText })] }), _jsx(PhoneInputCountriesOverlay, { isOpen: isDisabled ? false : showCountryOptions, onClick: handleCloseCountryOptions }), _jsx(PhoneInputMask, { ref: inputPhoneMaskRef, currentCountry: currentCountry, value: value, onChange: (e) => {
200
+ .length === 0 && _jsx("p", { children: notFoundCountryText })] }), _jsx(PhoneInputCountriesOverlay, { isOpen: isDisabled ? false : readOnly ? false : showCountryOptions, onClick: handleCloseCountryOptions }), _jsx(PhoneInputMask, { ref: inputPhoneMaskRef, readonly: readOnly, currentCountry: currentCountry, value: value, disabled: isDisabled, onBlur: handleInputBlur, onFocus: handleInputFocus, size: size, onChange: (e) => {
201
201
  setValue(e);
202
202
  onChange && onChange(inputValue(e));
203
- }, disabled: isDisabled, onBlur: handleInputBlur, onFocus: handleInputFocus, size: size }), _jsx("input", { ref: phoneInputRef, type: "hidden", name: name, value: inputValue() })] }), errorMessage && _jsx(FieldError, { children: errorMessage })] }));
203
+ } }), _jsx("input", { ref: phoneInputRef, type: "hidden", name: name, value: inputValue() })] }), errorMessage && _jsx(FieldError, { children: errorMessage })] }));
204
204
  }
205
205
  export { PhoneInput };
@@ -11,6 +11,7 @@ type PhoneInputMaskProps = {
11
11
  onFocus: () => void;
12
12
  onBlur: () => void;
13
13
  disabled: boolean;
14
+ readonly: boolean;
14
15
  size: "md" | "lg";
15
16
  currentCountry: CountryType;
16
17
  value: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/phoneInput/phoneInputMask/index.tsx"],"names":[],"mappings":"AAiBA,OAAO,aAAa,CAAC;AAErB,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,IAAI,GAAG,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,KAAK,mBAAmB,GAAG;IACzB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,cAAc,EAAE,WAAW,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/B,CAAC;AASF,QAAA,MAAM,cAAc,kHAyDnB,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/phoneInput/phoneInputMask/index.tsx"],"names":[],"mappings":"AAiBA,OAAO,aAAa,CAAC;AAErB,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,IAAI,GAAG,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,KAAK,mBAAmB,GAAG;IACzB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,cAAc,EAAE,WAAW,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/B,CAAC;AASF,QAAA,MAAM,cAAc,kHAkEnB,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -7,7 +7,7 @@ const BaseInput = forwardRef((props, ref) => {
7
7
  return _jsx("input", { ref: ref, ...props });
8
8
  });
9
9
  const PhoneInputMask = forwardRef((props, ref) => {
10
- const { onFocus, onBlur, size, onChange, value, currentCountry, disabled } = props;
10
+ const { onFocus, readonly, onBlur, size, onChange, value, currentCountry, disabled, } = props;
11
11
  const [isMounted, setIsMounted] = useState(false);
12
12
  useEffect(() => {
13
13
  if (isMounted)
@@ -29,6 +29,6 @@ const PhoneInputMask = forwardRef((props, ref) => {
29
29
  if (currentCountry.code === "+55") {
30
30
  return (_jsx("input", { value: value, onChange: handleChange, className: className, onFocus: onFocus, onBlur: onBlur, disabled: disabled, ref: ref }));
31
31
  }
32
- return (_jsx(InputMask, { value: value, onChange: (e) => onChange(e.target.value), className: className, component: BaseInput, onFocus: onFocus, onBlur: onBlur, disabled: disabled, mask: currentCountry.mask, showMask: true, replacement: { _: /\d/ }, ref: ref }));
32
+ return (_jsx(InputMask, { value: value, readOnly: readonly, onChange: (e) => onChange(e.target.value), className: className, component: BaseInput, onFocus: onFocus, onBlur: onBlur, disabled: disabled, mask: currentCountry.mask, showMask: true, replacement: { _: /\d/ }, ref: ref }));
33
33
  });
34
34
  export { PhoneInputMask };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkyn/components",
3
- "version": "3.0.1-beta.42",
3
+ "version": "3.0.1-beta.44",
4
4
  "main": "./dist/bundle.js",
5
5
  "module": "./dist/bundle.js",
6
6
  "types": "./dist/index.d.ts",