@zydon/common 1.1.2 → 1.1.3
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/components/Portal/index.d.ts.map +1 -1
- package/dist/components/Portal/props.d.ts +1 -0
- package/dist/components/Portal/props.d.ts.map +1 -1
- package/dist/{features-579e095b.js → features-866aa5ed.js} +1 -1
- package/dist/{index-5841142e.js → index-4e68ffa6.js} +125 -118
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a1 as u, as as d, at as c, av as v, aw as C, a2 as k, a3 as S, a4 as P, a5 as T, a6 as g, a7 as A, ax as F, ay as I, az as M, a8 as D, aQ as f, a9 as h, aa as B, aA as x, aS as E, aB as N, ab as y, aC as w, aT as R, ac as U, ad as L, ae as z, af as G, ag as H, ah as q, aD as V, bc as W, ai as j, aj as K, ak as O, aV as Z, aW as J, aU as Q, au as X, aJ as Y, aK as _, aL as $, al as aa, aE as sa, am as ea, aF as oa, an as ra, ao as ta, bd as ia, be as na, ap as ba, aG as la, aX as ma, aq as pa, aR as ua, ar as da, aH as ca, bf as va, aM as Ca, aN as ka, aO as Sa, aP as Pa, aI as Ta, bg as ga, bw as Aa, bh as Fa, bt as Ia, bu as Ma, bv as Da, bC as fa, bA as ha, bx as Ba, by as xa, bj as Ea, bk as Na, bl as ya, bm as wa, bn as Ra, bo as Ua, bp as La, bq as za, bi as Ga, br as Ha, bs as qa, bB as Va, bz as Wa, b9 as ja, ba as Ka, bb as Oa, b2 as Za, b5 as Ja, aZ as Qa, a$ as Xa, b4 as Ya, aY as _a, b3 as $a, b1 as as, b0 as ss, b7 as es, b8 as os, b6 as rs, a_ as ts } from "./index-
|
|
1
|
+
import { a1 as u, as as d, at as c, av as v, aw as C, a2 as k, a3 as S, a4 as P, a5 as T, a6 as g, a7 as A, ax as F, ay as I, az as M, a8 as D, aQ as f, a9 as h, aa as B, aA as x, aS as E, aB as N, ab as y, aC as w, aT as R, ac as U, ad as L, ae as z, af as G, ag as H, ah as q, aD as V, bc as W, ai as j, aj as K, ak as O, aV as Z, aW as J, aU as Q, au as X, aJ as Y, aK as _, aL as $, al as aa, aE as sa, am as ea, aF as oa, an as ra, ao as ta, bd as ia, be as na, ap as ba, aG as la, aX as ma, aq as pa, aR as ua, ar as da, aH as ca, bf as va, aM as Ca, aN as ka, aO as Sa, aP as Pa, aI as Ta, bg as ga, bw as Aa, bh as Fa, bt as Ia, bu as Ma, bv as Da, bC as fa, bA as ha, bx as Ba, by as xa, bj as Ea, bk as Na, bl as ya, bm as wa, bn as Ra, bo as Ua, bp as La, bq as za, bi as Ga, br as Ha, bs as qa, bB as Va, bz as Wa, b9 as ja, ba as Ka, bb as Oa, b2 as Za, b5 as Ja, aZ as Qa, a$ as Xa, b4 as Ya, aY as _a, b3 as $a, b1 as as, b0 as ss, b7 as es, b8 as os, b6 as rs, a_ as ts } from "./index-4e68ffa6.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "@mui/material";
|
|
4
4
|
import "@emotion/react";
|
package/dist/index.umd.cjs
CHANGED
|
@@ -301,7 +301,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),I=B,M=j),G===void 0&&(
|
|
|
301
301
|
Prefix can't start with '-' when allowNegative is true.
|
|
302
302
|
prefix: `+i+`
|
|
303
303
|
allowNegative: `+a+`
|
|
304
|
-
`),a=!1),Object.assign(Object.assign({},t),{allowNegative:a})}function pce(t){t=dce(t),t.decimalSeparator,t.allowedDecimalSeparators,t.thousandsGroupStyle;var e=t.suffix,n=t.allowNegative,r=t.allowLeadingZeros,i=t.onKeyDown;i===void 0&&(i=wr);var a=t.onBlur;a===void 0&&(a=wr);var o=t.thousandSeparator,s=t.decimalScale,l=t.fixedDecimalScale,c=t.prefix;c===void 0&&(c="");var u=t.defaultValue,d=t.value,p=t.valueIsNumericString,f=t.onValueChange,m=XA(t,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),_=Oc(t),g=_.decimalSeparator,h=_.allowedDecimalSeparators,E=function($){return sx($,t)},b=function($,B){return cce($,B,t)},v=wa(d)?u:d,S=p??lce(v,c,e);wa(d)?wa(u)||(S=S||typeof u=="number"):S=S||typeof d=="number";var C=function($){return ZA($)?$:(typeof $=="number"&&($=nx($)),S&&typeof s=="number"?rx($,s,!!l):$)},T=ox(C(d),C(u),!!S,E,b,f),y=T[0],x=y.numAsString,A=y.formattedValue,R=T[1],w=function($){var B=$.target,j=$.key,G=B.selectionStart,M=B.selectionEnd,I=B.value;if(I===void 0&&(I=""),G!==M){i($);return}j==="Backspace"&&I[0]==="-"&&G===c.length+1&&n&&ci(B,1),s&&l&&(j==="Backspace"&&I[G-1]===g?(ci(B,G-1),$.preventDefault()):j==="Delete"&&I[G]===g&&$.preventDefault()),h!=null&&h.includes(j)&&I[G]===g&&ci(B,G+1);var P=o===!0?",":o;j==="Backspace"&&I[G-1]===P&&ci(B,G-1),j==="Delete"&&I[G]===P&&ci(B,G+1),i($)},D=function($){var B=x;if(B.match(/\d/g)||(B=""),r||(B=Qle(B)),l&&s&&(B=rx(B,s,l)),B!==x){var j=sx(B,t);R({formattedValue:j,value:B,floatValue:parseFloat(B)},{event:$,source:Jo.event})}a($)},L=function($){return $===g?!0:es($)},F=function($){var B=$.currentValue,j=$.lastValue,G=$.formattedValue,M=$.currentValueIndex,I=$.formattedValueIndex,P=B[M],U=G[I],V=ix(j,B),Y=V.to;return M>=Y.start&&M<Y.end&&h&&h.includes(P)&&U===g?!0:P===U};return Object.assign(Object.assign({},m),{value:A,valueIsNumericString:!1,isValidInputCharacter:L,isCharacterSame:F,onValueChange:R,format:E,removeFormatting:b,getCaretBoundary:function($){return uce($,t)},onKeyDown:w,onBlur:D})}function fce(t){var e=pce(t);return O.createElement(ace,Object.assign({},e))}const Eh=O.forwardRef(({decimalScale:t=0,fixedDecimalScale:e=!0,prefix:n,allowNegative:r,minValue:i,maxValue:a=1/0,maxLength:o,value:s,inputProps:l,InputProps:c,size:u,disabled:d,name:p,helperText:f,error:m,fullWidth:_,label:g,required:h,onChange:E},b)=>{const v=O.useRef(null),S=C=>{E&&(v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{const{floatValue:T}=C,y=T||0;if(i!==void 0&&i>y){E({target:{name:p,value:i}});return}if(T!==void 0&&a<y){E({target:{name:p,value:a}});return}E({target:{name:p,value:T}})},600))};return O.useEffect(()=>()=>{v.current&&clearTimeout(v.current)},[]),N.jsx(fce,{getInputRef:b,value:s,prefix:n,decimalSeparator:",",thousandSeparator:".",decimalScale:t,fixedDecimalScale:e,autoComplete:"off",allowNegative:r,maxLength:o,onValueChange:S,customInput:Q.TextField,InputProps:{...c},inputProps:l,disabled:d,size:u,helperText:f,error:m,fullWidth:_,label:g,required:h})});Eh.displayName="NumberInput";const lx=O.forwardRef(({name:t,increment:e=1,updadteForMultiple:n,allowNegative:r=!1,value:i=0,onChange:a,minValue:o,maxValue:s,decimalScale:l,disabled:c,...u},d)=>{const p=KA(i,e,l),f=()=>{if(!r&&i-e<0)return;const g=i-e,h=Math.floor(i/e)*e,E=!p&&n?h:g;o!==void 0&&g<o?a(o):a(mh(E))},m=()=>{const g=Number(i)+e,h=Math.ceil(i/e)*e,b=mh(!p&&n?h:g);s!==void 0&&g>=s?a(s):a(o!==void 0&&b<=o?o:b)},_=g=>{const h=Number(g.target.value),E=Math.ceil(h/e)*e,b=n?E:h;if(o!==void 0&&h<=o){a(o);return}if(s!==void 0&&h>=s){a(s);return}a(b)};return N.jsx(Eh,{ref:d,name:t,value:i,minValue:o,maxValue:s,allowNegative:r,decimalScale:l,InputProps:{startAdornment:N.jsx(Q.InputAdornment,{position:"start",children:N.jsx(Q.IconButton,{size:"medium",disabled:c||(r?!1:!i),onClick:f,children:N.jsx(Ot,{icon:"eva:minus-fill",width:14,height:14,color:"primary.main"})})}),endAdornment:N.jsx(Q.InputAdornment,{position:"end",children:N.jsx(Q.IconButton,{size:"medium",onClick:m,disabled:c,children:N.jsx(Ot,{icon:"eva:plus-fill",width:14,height:14,color:"primary.main"})})}),inputProps:{style:{textAlign:"center"}}},onChange:_,disabled:c,...u})});lx.displayName="Incrementer";const _ce=qt(Q.Box)(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light",r=e.variant==="filled",i=e.variant==="outlined",a=e.variant==="soft",o={...e.color==="default"&&{...i&&{backgroundColor:"transparent",color:t.palette.text.primary,border:`1px solid ${be(t.palette.grey[500],.32)}`},...a&&{color:n?t.palette.text.primary:t.palette.common.white,backgroundColor:be(t.palette.grey[500],.16)}}},s={...e.color!=="default"&&{...r&&{color:t.palette[e.color].contrastText,backgroundColor:t.palette[e.color].main},...i&&{backgroundColor:"transparent",color:t.palette[e.color].main,border:`1px solid ${t.palette[e.color].main}`},...a&&{color:t.palette[e.color][n?"dark":"light"],backgroundColor:be(t.palette[e.color].main,.16)}}};return{height:24,minWidth:22,lineHeight:0,borderRadius:6,cursor:"default",alignItems:"center",whiteSpace:"nowrap",display:"inline-flex",justifyContent:"center",textTransform:"capitalize",padding:t.spacing(0,1),color:t.palette.grey[800],fontSize:t.typography.pxToRem(12),fontFamily:t.typography.fontFamily,backgroundColor:t.palette.grey[300],fontWeight:t.typography.fontWeightBold,...s,...o}}),cx=O.forwardRef(({children:t,color:e="default",variant:n="soft",startIcon:r,endIcon:i,sx:a,...o},s)=>{const l=$r(),c={width:16,height:16,"& svg, img":{width:1,height:1,objectFit:"cover"}};return N.jsxs(_ce,{ref:s,component:"span",ownerState:{color:e,variant:n},sx:{...r&&{pl:.75},...i&&{pr:.75},...a},theme:l,...o,children:[r&&N.jsxs(Q.Box,{sx:{mr:.75,...c},children:[" ",r," "]}),t,i&&N.jsxs(Q.Box,{sx:{ml:.75,...c},children:[" ",i," "]})]})});cx.displayName="Label";function Dr(t){return typeof t=="string"||t instanceof String}function ux(t){var e;return typeof t=="object"&&t!=null&&(t==null||(e=t.constructor)==null?void 0:e.name)==="Object"}function dx(t,e){return Array.isArray(e)?dx(t,(n,r)=>e.includes(r)):Object.entries(t).reduce((n,r)=>{let[i,a]=r;return e(a,i)&&(n[i]=a),n},{})}const ke={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function mce(t){switch(t){case ke.LEFT:return ke.FORCE_LEFT;case ke.RIGHT:return ke.FORCE_RIGHT;default:return t}}function vh(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Rc(t,e){if(e===t)return!0;const n=Array.isArray(e),r=Array.isArray(t);let i;if(n&&r){if(e.length!=t.length)return!1;for(i=0;i<e.length;i++)if(!Rc(e[i],t[i]))return!1;return!0}if(n!=r)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){const a=e instanceof Date,o=t instanceof Date;if(a&&o)return e.getTime()==t.getTime();if(a!=o)return!1;const s=e instanceof RegExp,l=t instanceof RegExp;if(s&&l)return e.toString()==t.toString();if(s!=l)return!1;const c=Object.keys(e);for(i=0;i<c.length;i++)if(!Object.prototype.hasOwnProperty.call(t,c[i]))return!1;for(i=0;i<c.length;i++)if(!Rc(t[c[i]],e[c[i]]))return!1;return!0}else if(e&&t&&typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();return!1}class gce{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?ke.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?ke.RIGHT:ke.LEFT}}function qe(t,e){return new qe.InputMask(t,e)}function px(t){if(t==null)throw new Error("mask property should be defined");return t instanceof RegExp?qe.MaskedRegExp:Dr(t)?qe.MaskedPattern:t===Date?qe.MaskedDate:t===Number?qe.MaskedNumber:Array.isArray(t)||t===Array?qe.MaskedDynamic:qe.Masked&&t.prototype instanceof qe.Masked?t:qe.Masked&&t instanceof qe.Masked?t.constructor:t instanceof Function?qe.MaskedFunction:(console.warn("Mask not found for mask",t),qe.Masked)}function Nc(t){if(!t)throw new Error("Options in not defined");if(qe.Masked){if(t.prototype instanceof qe.Masked)return{mask:t};const{mask:e=void 0,...n}=t instanceof qe.Masked?{mask:t}:ux(t)&&t.mask instanceof qe.Masked?t:{};if(e){const r=e.mask;return{...dx(e,(i,a)=>!a.startsWith("_")),mask:e.constructor,_mask:r,...n}}}return ux(t)?{...t}:{mask:t}}function ui(t){if(qe.Masked&&t instanceof qe.Masked)return t;const e=Nc(t),n=px(e.mask);if(!n)throw new Error("Masked class is not found for provided mask, appropriate module needs to be imported manually before creating mask.");return e.mask===n&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new n(e)}qe.createMask=ui;class bh{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,n){if(!(e==null||n==null||e===this.selectionStart&&n===this.selectionEnd))try{this._unsafeSelect(e,n)}catch{}}get isActive(){return!1}}qe.MaskElement=bh;class di extends bh{constructor(e){super(),this.input=e,this._handlers={}}get rootElement(){var e,n,r;return(e=(n=(r=this.input).getRootNode)==null?void 0:n.call(r))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){Object.keys(e).forEach(n=>this._toggleEventHandler(di.EVENTS_MAP[n],e[n]))}unbindEvents(){Object.keys(this._handlers).forEach(e=>this._toggleEventHandler(e))}_toggleEventHandler(e,n){this._handlers[e]&&(this.input.removeEventListener(e,this._handlers[e]),delete this._handlers[e]),n&&(this.input.addEventListener(e,n),this._handlers[e]=n)}}di.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"blur"},qe.HTMLMaskElement=di;class hce extends di{constructor(e){super(e),this.input=e,this._handlers={}}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,n){this.input.setSelectionRange(e,n)}get value(){return this.input.value}set value(e){this.input.value=e}}qe.HTMLMaskElement=di;class fx extends di{get _unsafeSelectionStart(){const e=this.rootElement,n=e.getSelection&&e.getSelection(),r=n&&n.anchorOffset,i=n&&n.focusOffset;return i==null||r==null||r<i?r:i}get _unsafeSelectionEnd(){const e=this.rootElement,n=e.getSelection&&e.getSelection(),r=n&&n.anchorOffset,i=n&&n.focusOffset;return i==null||r==null||r>i?r:i}_unsafeSelect(e,n){if(!this.rootElement.createRange)return;const r=this.rootElement.createRange();r.setStart(this.input.firstChild||this.input,e),r.setEnd(this.input.lastChild||this.input,n);const i=this.rootElement,a=i.getSelection&&i.getSelection();a&&(a.removeAllRanges(),a.addRange(r))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}qe.HTMLContenteditableMaskElement=fx;class Ece{constructor(e,n){this.el=e instanceof bh?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new fx(e):new hce(e),this.masked=ui(n),this._listeners={},this._value="",this._unmaskedValue="",this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var n;return e==null||((n=this.masked)==null?void 0:n.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof qe.Masked)&&this.masked.constructor===px(e)){this.masked.updateOptions({mask:e});return}const n=e instanceof qe.Masked?e:ui({mask:e});n.unmaskedValue=this.masked.unmaskedValue,this.masked=n}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl(),this.alignCursor())}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl(),this.alignCursor())}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,n){const r=this._listeners[e];r&&r.forEach(i=>i(n))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value}updateControl(){const e=this.masked.unmaskedValue,n=this.masked.value,r=this.displayValue,i=this.unmaskedValue!==e||this.value!==n;this._unmaskedValue=e,this._value=n,this.el.value!==r&&(this.el.value=r),i&&this._fireChangeEvents()}updateOptions(e){const{mask:n,...r}=e,i=!this.maskEquals(n),a=!Rc(this.masked,r);i&&(this.mask=n),a&&this.masked.updateOptions(r),(i||a)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,ke.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,n){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(n),this}off(e,n){if(!this._listeners[e])return this;if(!n)return delete this._listeners[e],this;const r=this._listeners[e].indexOf(n);return r>=0&&this._listeners[e].splice(r,1),this}_onInput(e){if(this._inputEvent=e,this._abortUpdateCursor(),!this._selection)return this.updateValue();const n=new gce({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),r=this.masked.rawInputValue,i=this.masked.splice(n.startChangePos,n.removed.length,n.inserted,n.removeDirection,{input:!0,raw:!0}).offset,a=r===this.masked.rawInputValue?n.removeDirection:ke.NONE;let o=this.masked.nearestInputPos(n.startChangePos+i,a);a!==ke.NONE&&(o=this.masked.nearestInputPos(o,ke.NONE)),this.updateControl(),this.updateCursor(o),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}qe.InputMask=Ece;class gt{static normalize(e){return Array.isArray(e)?e:[e,new gt]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",skip:!1,tailShift:0},e)}aggregate(e){return this.rawInserted+=e.rawInserted,this.skip=this.skip||e.skip,this.inserted+=e.inserted,this.tailShift+=e.tailShift,this}get offset(){return this.tailShift+this.inserted.length}}qe.ChangeDetails=gt;class cr{constructor(e,n,r){e===void 0&&(e=""),n===void 0&&(n=0),this.value=e,this.from=n,this.stop=r}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const n=this.value[0];return this.value=this.value.slice(1),n}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class hn{constructor(e){this._value="",this._update({...hn.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){Object.keys(e).length&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,n){n===void 0&&(n={input:!0}),this.reset(),this.append(e,n,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,n){return e}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),Math.min(this.displayValue.length,n-e)}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),this.displayValue.slice(e,n)}extractTail(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),new cr(this.extractInput(e,n),e)}appendTail(e){return Dr(e)&&(e=new cr(String(e))),e.appendTo(this)}_appendCharRaw(e,n){return e?(this._value+=e,new gt({inserted:e,rawInserted:e})):new gt}_appendChar(e,n,r){n===void 0&&(n={});const i=this.state;let a;if([e,a]=this.doPrepareChar(e,n),a=a.aggregate(this._appendCharRaw(e,n)),a.inserted){let o,s=this.doValidate(n)!==!1;if(s&&r!=null){const l=this.state;this.overwrite===!0&&(o=r.state,r.unshift(this.displayValue.length-a.tailShift));let c=this.appendTail(r);s=c.rawInserted===r.toString(),!(s&&c.inserted)&&this.overwrite==="shift"&&(this.state=l,o=r.state,r.shift(),c=this.appendTail(r),s=c.rawInserted===r.toString()),s&&c.inserted&&(this.state=l)}s||(a=new gt,this.state=i,r&&o&&(r.state=o))}return a}_appendPlaceholder(){return new gt}_appendEager(){return new gt}append(e,n,r){if(!Dr(e))throw new Error("value should be string");const i=Dr(r)?new cr(String(r)):r;n!=null&&n.tail&&(n._beforeTailState=this.state);let a;[e,a]=this.doPrepare(e,n);for(let o=0;o<e.length;++o){const s=this._appendChar(e[o],n,i);if(!s.rawInserted&&!this.doSkipInvalid(e[o],n,i))break;a.aggregate(s)}return(this.eager===!0||this.eager==="append")&&n!=null&&n.input&&e&&a.aggregate(this._appendEager()),i!=null&&(a.tailShift+=this.appendTail(i).tailShift),a}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(n),new gt}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const n=this.rawInputValue,r=this.value,i=e();return this.rawInputValue=n,this.value&&this.value!==r&&r.indexOf(this.value)===0&&this.append(r.slice(this.displayValue.length),{},""),delete this._refreshing,i}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const n=this.state,r=e(this);return this.state=n,delete this._isolated,r}doSkipInvalid(e,n,r){return!!this.skipInvalid}doPrepare(e,n){return n===void 0&&(n={}),gt.normalize(this.prepare?this.prepare(e,this,n):e)}doPrepareChar(e,n){return n===void 0&&(n={}),gt.normalize(this.prepareChar?this.prepareChar(e,this,n):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,n,r,i,a){i===void 0&&(i=ke.NONE),a===void 0&&(a={input:!0});const o=e+n,s=this.extractTail(o),l=this.eager===!0||this.eager==="remove";let c;l&&(i=mce(i),c=this.extractInput(0,o,{raw:!0}));let u=e;const d=new gt;if(i!==ke.NONE&&(u=this.nearestInputPos(e,n>1&&e!==0&&!l?ke.NONE:i),d.tailShift=u-e),d.aggregate(this.remove(u)),l&&i!==ke.NONE&&c===this.rawInputValue)if(i===ke.FORCE_LEFT){let p;for(;c===this.rawInputValue&&(p=this.displayValue.length);)d.aggregate(new gt({tailShift:-1})).aggregate(this.remove(p-1))}else i===ke.FORCE_RIGHT&&s.unshift();return d.aggregate(this.append(r,a,s))}maskEquals(e){return this.mask===e}typedValueEquals(e){const n=this.typedValue;return e===n||hn.EMPTY_VALUES.includes(e)&&hn.EMPTY_VALUES.includes(n)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}}hn.DEFAULTS={skipInvalid:!0},hn.EMPTY_VALUES=[void 0,null,""],qe.Masked=hn;class pi{constructor(e,n){e===void 0&&(e=[]),n===void 0&&(n=0),this.chunks=e,this.from=n}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=Dr(e)?new cr(String(e)):e;const n=this.chunks[this.chunks.length-1],r=n&&(n.stop===e.stop||e.stop==null)&&e.from===n.from+n.toString().length;if(e instanceof cr)r?n.extend(e.toString()):this.chunks.push(e);else if(e instanceof pi){if(e.stop==null){let i;for(;e.chunks.length&&e.chunks[0].stop==null;)i=e.chunks.shift(),i.from+=e.from,this.extend(i)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof qe.MaskedPattern))return new cr(this.toString()).appendTo(e);const n=new gt;for(let r=0;r<this.chunks.length&&!n.skip;++r){const i=this.chunks[r],a=e._mapPosToBlock(e.displayValue.length),o=i.stop;let s;if(o!=null&&(!a||a.index<=o)){if(i instanceof pi||e._stops.indexOf(o)>=0){const l=e._appendPlaceholder(o);n.aggregate(l)}s=i instanceof pi&&e._blocks[o]}if(s){const l=s.appendTail(i);l.skip=!1,n.aggregate(l),e._value+=l.inserted;const c=i.toString().slice(l.rawInserted.length);c&&n.aggregate(e.append(c,{tail:!0}))}else n.aggregate(e.append(i.toString(),{tail:!0}))}return n}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:n,...r}=e;Object.assign(this,r),this.chunks=n.map(i=>{const a="chunks"in i?new pi:new cr;return a.state=i,a})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const n=e!=null?e-this.from:e;let r=0;for(;r<this.chunks.length;){const i=this.chunks[r],a=i.unshift(n);if(i.toString()){if(!a)break;++r}else this.chunks.splice(r,1);if(a)return a}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const n=this.chunks[e],r=n.shift();if(n.toString()){if(!r)break;--e}else this.chunks.splice(e,1);if(r)return r}return""}}class vce{constructor(e,n){this.masked=e,this._log=[];const{offset:r,index:i}=e._mapPosToBlock(n)||(n<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=r,this.index=i,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((n=this.block)==null?void 0:n.displayValue.length)||0){var n;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,ke.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,ke.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,ke.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,ke.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,ke.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,ke.NONE),!0})}}class _x{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(n),this._value||(this._isRawInput=!1),new gt}nearestInputPos(e,n){n===void 0&&(n=ke.NONE);const r=0,i=this._value.length;switch(n){case ke.LEFT:case ke.FORCE_LEFT:return r;case ke.NONE:case ke.RIGHT:case ke.FORCE_RIGHT:default:return i}}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),this._isRawInput?n-e:0}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),r===void 0&&(r={}),r.raw&&this._isRawInput&&this._value.slice(e,n)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,n){n===void 0&&(n={});const r=new gt;if(this.isFilled)return r;const i=this.eager===!0||this.eager==="append",o=this.char===e&&(this.isUnmasking||n.input||n.raw)&&(!n.raw||!i)&&!n.tail;return o&&(r.rawInserted=this.char),this._value=r.inserted=this.char,this._isRawInput=o&&(n.raw||n.input),r}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new gt;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new cr("")}appendTail(e){return Dr(e)&&(e=new cr(String(e))),e.appendTo(this)}append(e,n,r){const i=this._appendChar(e[0],n);return r!=null&&(i.tailShift+=this.appendTail(r).tailShift),i}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}}class Ac{constructor(e){const{parent:n,isOptional:r,placeholderChar:i,displayChar:a,lazy:o,eager:s,...l}=e;this.masked=ui(l),Object.assign(this,{parent:n,isOptional:r,placeholderChar:i,displayChar:a,lazy:o,eager:s})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),e===0&&n>=1?(this.isFilled=!1,this.masked.remove(e,n)):new gt}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,n){if(n===void 0&&(n={}),this.isFilled)return new gt;const r=this.masked.state,i=this.masked._appendChar(e,this.currentMaskFlags(n));return i.inserted&&this.doValidate(n)===!1&&(i.inserted=i.rawInserted="",this.masked.state=r),!i.inserted&&!this.isOptional&&!this.lazy&&!n.input&&(i.inserted=this.placeholderChar),i.skip=!i.inserted&&!this.isOptional,this.isFilled=!!i.inserted,i}append(e,n,r){return this.masked.append(e,this.currentMaskFlags(n),r)}_appendPlaceholder(){const e=new gt;return this.isFilled||this.isOptional||(this.isFilled=!0,e.inserted=this.placeholderChar),e}_appendEager(){return new gt}extractTail(e,n){return this.masked.extractTail(e,n)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),this.masked.extractInput(e,n,r)}nearestInputPos(e,n){n===void 0&&(n=ke.NONE);const r=0,i=this.value.length,a=Math.min(Math.max(e,r),i);switch(n){case ke.LEFT:case ke.FORCE_LEFT:return this.isComplete?a:r;case ke.RIGHT:case ke.FORCE_RIGHT:return this.isComplete?a:i;case ke.NONE:default:return a}}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),this.value.slice(e,n).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var n;return{...e,_beforeTailState:(e==null||(n=e._beforeTailState)==null?void 0:n.masked)||(e==null?void 0:e._beforeTailState)}}}Ac.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class bce extends hn{updateOptions(e){super.updateOptions(e)}_update(e){const n=e.mask;n&&(e.validate=r=>r.search(n)>=0),super._update(e)}}qe.MaskedRegExp=bce;class En extends hn{constructor(e){super({...En.DEFAULTS,...e,definitions:Object.assign({},Ac.DEFAULT_DEFINITIONS,e==null?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const n=this.mask;if(!n||!e)return;let r=!1,i=!1;for(let a=0;a<n.length;++a){if(this.blocks){const c=n.slice(a),u=Object.keys(this.blocks).filter(p=>c.indexOf(p)===0);u.sort((p,f)=>f.length-p.length);const d=u[0];if(d){const{expose:p,...f}=Nc(this.blocks[d]),m=ui({lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,...f,parent:this});m&&(this._blocks.push(m),p&&(this.exposeBlock=m),this._maskedBlocks[d]||(this._maskedBlocks[d]=[]),this._maskedBlocks[d].push(this._blocks.length-1)),a+=d.length-1;continue}}let o=n[a],s=o in e;if(o===En.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(o==="{"||o==="}"){r=!r;continue}if(o==="["||o==="]"){i=!i;continue}if(o===En.ESCAPE_CHAR){if(++a,o=n[a],!o)break;s=!1}const l=s?new Ac({isOptional:i,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...Nc(e[o]),parent:this}):new _x({char:o,eager:this.eager,isUnmasking:r});this._blocks.push(l)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){const{_blocks:n,...r}=e;this._blocks.forEach((i,a)=>i.state=n[a]),super.state=r}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,n)=>e+=n.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(n),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,n)=>e+=n.value,"")}set value(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(n),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(n),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,n)=>e+=n.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const n=new gt;let r=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(r==null)return n;this._blocks[r].isFilled&&++r;for(let i=r;i<this._blocks.length;++i){const a=this._blocks[i]._appendEager();if(!a.inserted)break;n.aggregate(a)}return n}_appendCharRaw(e,n){n===void 0&&(n={});const r=this._mapPosToBlock(this.displayValue.length),i=new gt;if(!r)return i;for(let o=r.index;;++o){var a;const s=this._blocks[o];if(!s)break;const l=s._appendChar(e,{...n,_beforeTailState:(a=n._beforeTailState)==null||(a=a._blocks)==null?void 0:a[o]}),c=l.skip;if(i.aggregate(l),c||l.rawInserted)break}return i}extractTail(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);const r=new pi;return e===n||this._forEachBlocksInRange(e,n,(i,a,o,s)=>{const l=i.extractTail(o,s);l.stop=this._findStopBefore(a),l.from=this._blockStartPos(a),l instanceof pi&&(l.blockIndex=a),r.extend(l)}),r}extractInput(e,n,r){if(e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),r===void 0&&(r={}),e===n)return"";let i="";return this._forEachBlocksInRange(e,n,(a,o,s,l)=>{i+=a.extractInput(s,l,r)}),i}_findStopBefore(e){let n;for(let r=0;r<this._stops.length;++r){const i=this._stops[r];if(i<=e)n=i;else break}return n}_appendPlaceholder(e){const n=new gt;if(this.lazy&&e==null)return n;const r=this._mapPosToBlock(this.displayValue.length);if(!r)return n;const i=r.index,a=e??this._blocks.length;return this._blocks.slice(i,a).forEach(o=>{if(!o.lazy||e!=null){var s;const l=o._appendPlaceholder((s=o._blocks)==null?void 0:s.length);this._value+=l.inserted,n.aggregate(l)}}),n}_mapPosToBlock(e){let n="";for(let r=0;r<this._blocks.length;++r){const i=this._blocks[r],a=n.length;if(n+=i.displayValue,e<=n.length)return{index:r,offset:e-a}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((n,r)=>n+=r.displayValue.length,0)}_forEachBlocksInRange(e,n,r){n===void 0&&(n=this.displayValue.length);const i=this._mapPosToBlock(e);if(i){const a=this._mapPosToBlock(n),o=a&&i.index===a.index,s=i.offset,l=a&&o?a.offset:this._blocks[i.index].displayValue.length;if(r(this._blocks[i.index],i.index,s,l),a&&!o){for(let c=i.index+1;c<a.index;++c)r(this._blocks[c],c,0,this._blocks[c].displayValue.length);r(this._blocks[a.index],a.index,0,a.offset)}}}remove(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);const r=super.remove(e,n);return this._forEachBlocksInRange(e,n,(i,a,o,s)=>{r.aggregate(i.remove(o,s))}),r}nearestInputPos(e,n){if(n===void 0&&(n=ke.NONE),!this._blocks.length)return 0;const r=new vce(this,e);if(n===ke.NONE)return r.pushRightBeforeInput()||(r.popState(),r.pushLeftBeforeInput())?r.pos:this.displayValue.length;if(n===ke.LEFT||n===ke.FORCE_LEFT){if(n===ke.LEFT){if(r.pushRightBeforeFilled(),r.ok&&r.pos===e)return e;r.popState()}if(r.pushLeftBeforeInput(),r.pushLeftBeforeRequired(),r.pushLeftBeforeFilled(),n===ke.LEFT){if(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.ok&&r.pos<=e||(r.popState(),r.ok&&r.pos<=e))return r.pos;r.popState()}return r.ok?r.pos:n===ke.FORCE_LEFT?0:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:0)}return n===ke.RIGHT||n===ke.FORCE_RIGHT?(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.pushRightBeforeFilled()?r.pos:n===ke.FORCE_RIGHT?this.displayValue.length:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:this.nearestInputPos(e,ke.LEFT))):e}totalInputPositions(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);let r=0;return this._forEachBlocksInRange(e,n,(i,a,o,s)=>{r+=i.totalInputPositions(o,s)}),r}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const n=this._maskedBlocks[e];return n?n.map(r=>this._blocks[r]):[]}}En.DEFAULTS={lazy:!0,placeholderChar:"_"},En.STOP_CHAR="`",En.ESCAPE_CHAR="\\",En.InputDefinition=Ac,En.FixedDefinition=_x,qe.MaskedPattern=En;class xc extends En{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:n=this.to||0,from:r=this.from||0,maxLength:i=this.maxLength||0,autofix:a=this.autofix,...o}=e;this.to=n,this.from=r,this.maxLength=Math.max(String(n).length,i),this.autofix=a;const s=String(this.from).padStart(this.maxLength,"0"),l=String(this.to).padStart(this.maxLength,"0");let c=0;for(;c<l.length&&l[c]===s[c];)++c;o.mask=l.slice(0,c).replace(/0/g,"\\0")+"0".repeat(this.maxLength-c),super._update(o)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let n="",r="";const[,i,a]=e.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(n="0".repeat(i.length)+a,r="9".repeat(i.length)+a),n=n.padEnd(this.maxLength,"0"),r=r.padEnd(this.maxLength,"9"),[n,r]}doPrepareChar(e,n){n===void 0&&(n={});let r;if([e,r]=super.doPrepareChar(e.replace(/\D/g,""),n),!this.autofix||!e)return[e,r];const i=String(this.from).padStart(this.maxLength,"0"),a=String(this.to).padStart(this.maxLength,"0"),o=this.value+e;if(o.length>this.maxLength)return["",r];const[s,l]=this.boundaries(o);return Number(l)<this.from?[i[o.length-1],r]:Number(s)>this.to?this.autofix==="pad"&&o.length<this.maxLength?["",r.aggregate(this.append(i[o.length-1]+e,n))]:[a[o.length-1],r]:[e,r]}doValidate(e){const n=this.value;if(n.search(/[^0]/)===-1&&n.length<=this._matchFrom)return!0;const[i,a]=this.boundaries(n);return this.from<=Number(a)&&Number(i)<=this.to&&super.doValidate(e)}}qe.MaskedRange=xc;class fi extends En{constructor(e){const{mask:n,pattern:r,...i}={...fi.DEFAULTS,...e};super({...i,mask:Dr(n)?n:r})}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:n,pattern:r,blocks:i,...a}={...fi.DEFAULTS,...e},o=Object.assign({},fi.GET_DEFAULT_BLOCKS());e.min&&(o.Y.from=e.min.getFullYear()),e.max&&(o.Y.to=e.max.getFullYear()),e.min&&e.max&&o.Y.from===o.Y.to&&(o.m.from=e.min.getMonth()+1,o.m.to=e.max.getMonth()+1,o.m.from===o.m.to&&(o.d.from=e.min.getDate(),o.d.to=e.max.getDate())),Object.assign(o,this.blocks,i),Object.keys(o).forEach(s=>{const l=o[s];!("autofix"in l)&&"autofix"in e&&(l.autofix=e.autofix)}),super._update({...a,mask:Dr(n)?n:r,blocks:o})}doValidate(e){const n=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&n!=null&&(this.min==null||this.min<=n)&&(this.max==null||n<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}}fi.GET_DEFAULT_BLOCKS=()=>({d:{mask:xc,from:1,to:31,maxLength:2},m:{mask:xc,from:1,to:12,maxLength:2},Y:{mask:xc,from:1900,to:9999}}),fi.DEFAULTS={mask:Date,pattern:"d{.}`m{.}`Y",format:(t,e)=>{if(!t)return"";const n=String(t.getDate()).padStart(2,"0"),r=String(t.getMonth()+1).padStart(2,"0"),i=t.getFullYear();return[n,r,i].join(".")},parse:(t,e)=>{const[n,r,i]=t.split(".").map(Number);return new Date(i,r-1,n)}},qe.MaskedDate=fi;class ts extends hn{constructor(e){super({...ts.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(n=>{const{expose:r,...i}=Nc(n),a=ui({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...i});return r&&(this.exposeMask=a),a}):[])}_appendCharRaw(e,n){n===void 0&&(n={});const r=this._applyDispatch(e,n);return this.currentMask&&r.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(n))),r}_applyDispatch(e,n,r){e===void 0&&(e=""),n===void 0&&(n={}),r===void 0&&(r="");const i=n.tail&&n._beforeTailState!=null?n._beforeTailState._value:this.value,a=this.rawInputValue,o=n.tail&&n._beforeTailState!=null?n._beforeTailState._rawInputValue:a,s=a.slice(o.length),l=this.currentMask,c=new gt,u=l==null?void 0:l.state;if(this.currentMask=this.doDispatch(e,{...n},r),this.currentMask)if(this.currentMask!==l){if(this.currentMask.reset(),o){const d=this.currentMask.append(o,{raw:!0});c.tailShift=d.inserted.length-i.length}s&&(c.tailShift+=this.currentMask.append(s,{raw:!0,tail:!0}).tailShift)}else u&&(this.currentMask.state=u);return c}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const n=new gt;return e&&n.aggregate(this._applyDispatch("",{},e)),n.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var n,r;return{...e,_beforeTailState:((n=e._beforeTailState)==null?void 0:n.currentMaskRef)===this.currentMask&&((r=e._beforeTailState)==null?void 0:r.currentMask)||e._beforeTailState}}doDispatch(e,n,r){return n===void 0&&(n={}),r===void 0&&(r=""),this.dispatch(e,this,n,r)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,n){n===void 0&&(n={});let[r,i]=super.doPrepare(e,n);if(this.currentMask){let a;[r,a]=super.doPrepare(r,this.currentMaskFlags(n)),i=i.aggregate(a)}return[r,i]}doPrepareChar(e,n){n===void 0&&(n={});let[r,i]=super.doPrepareChar(e,n);if(this.currentMask){let a;[r,a]=super.doPrepareChar(r,this.currentMaskFlags(n)),i=i.aggregate(a)}return[r,i]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(n=>n.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let n=String(e);this.currentMask&&(this.currentMask.typedValue=e,n=this.currentMask.unmaskedValue),this.unmaskedValue=n}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,n){const r=new gt;return this.currentMask&&r.aggregate(this.currentMask.remove(e,n)).aggregate(this._applyDispatch()),r}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(n=>n.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:n,currentMaskRef:r,currentMask:i,...a}=e;n&&this.compiledMasks.forEach((o,s)=>o.state=n[s]),r!=null&&(this.currentMask=r,this.currentMask.state=i),super.state=a}extractInput(e,n,r){return this.currentMask?this.currentMask.extractInput(e,n,r):""}extractTail(e,n){return this.currentMask?this.currentMask.extractTail(e,n):super.extractTail(e,n)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,n){return this.currentMask?this.currentMask.nearestInputPos(e,n):super.nearestInputPos(e,n)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((n,r)=>{if(!e[r])return;const{mask:i,...a}=e[r];return Rc(n,a)&&n.maskEquals(i)}):super.maskEquals(e)}typedValueEquals(e){var n;return!!((n=this.currentMask)!=null&&n.typedValueEquals(e))}}ts.DEFAULTS=void 0,ts.DEFAULTS={dispatch:(t,e,n,r)=>{if(!e.compiledMasks.length)return;const i=e.rawInputValue,a=e.compiledMasks.map((o,s)=>{const l=e.currentMask===o,c=l?o.displayValue.length:o.nearestInputPos(o.displayValue.length,ke.FORCE_LEFT);return o.rawInputValue!==i?(o.reset(),o.append(i,{raw:!0})):l||o.remove(c),o.append(t,e.currentMaskFlags(n)),o.appendTail(r),{index:s,weight:o.rawInputValue.length,totalInputPositions:o.totalInputPositions(0,Math.max(c,o.nearestInputPos(o.displayValue.length,ke.FORCE_LEFT)))}});return a.sort((o,s)=>s.weight-o.weight||s.totalInputPositions-o.totalInputPositions),e.compiledMasks[a[0].index]}},qe.MaskedDynamic=ts;class Sce extends En{constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:n,...r}=e;if(n){const i=n.map(s=>s.length),a=Math.min(...i),o=Math.max(...i)-a;r.mask="*".repeat(a),o&&(r.mask+="["+"*".repeat(o)+"]"),this.enum=n}super._update(r)}doValidate(e){return this.enum.some(n=>n.indexOf(this.unmaskedValue)===0)&&super.doValidate(e)}}qe.MaskedEnum=Sce;class yce extends hn{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}qe.MaskedFunction=yce;class Tn extends hn{constructor(e){super({...Tn.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),n="\\d*",r=(this.scale?"("+vh(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+n+r),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(vh).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(vh(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const n=e.split(this.radix);return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),n.join(this.radix)}doPrepareChar(e,n){n===void 0&&(n={});const[r,i]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(n.input&&n.raw||!n.input&&!n.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),n);return e&&!r&&(i.skip=!0),r&&!this.allowPositive&&!this.value&&r!=="-"&&i.aggregate(this._appendChar("-")),[r,i]}_separatorsCount(e,n){n===void 0&&(n=!1);let r=0;for(let i=0;i<e;++i)this._value.indexOf(this.thousandsSeparator,i)===i&&(++r,n&&(e+=this.thousandsSeparator.length));return r}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),[e,n]=this._adjustRangeWithSeparators(e,n),this._removeThousandsSeparators(super.extractInput(e,n,r))}_appendCharRaw(e,n){if(n===void 0&&(n={}),!this.thousandsSeparator)return super._appendCharRaw(e,n);const r=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,i=this._separatorsCountFromSlice(r);this._value=this._removeThousandsSeparators(this.value);const a=super._appendCharRaw(e,n);this._value=this._insertThousandsSeparators(this._value);const o=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,s=this._separatorsCountFromSlice(o);return a.tailShift+=(s-i)*this.thousandsSeparator.length,a.skip=!a.rawInserted&&e===this.thousandsSeparator,a}_findSeparatorAround(e){if(this.thousandsSeparator){const n=e-this.thousandsSeparator.length+1,r=this.value.indexOf(this.thousandsSeparator,n);if(r<=e)return r}return-1}_adjustRangeWithSeparators(e,n){const r=this._findSeparatorAround(e);r>=0&&(e=r);const i=this._findSeparatorAround(n);return i>=0&&(n=i+this.thousandsSeparator.length),[e,n]}remove(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),[e,n]=this._adjustRangeWithSeparators(e,n);const r=this.value.slice(0,e),i=this.value.slice(n),a=this._separatorsCount(r.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(r+i));const o=this._separatorsCountFromSlice(r);return new gt({tailShift:(o-a)*this.thousandsSeparator.length})}nearestInputPos(e,n){if(!this.thousandsSeparator)return e;switch(n){case ke.NONE:case ke.LEFT:case ke.FORCE_LEFT:{const r=this._findSeparatorAround(e-1);if(r>=0){const i=r+this.thousandsSeparator.length;if(e<i||this.value.length<=i||n===ke.FORCE_LEFT)return r}break}case ke.RIGHT:case ke.FORCE_RIGHT:{const r=this._findSeparatorAround(e);if(r>=0)return r+this.thousandsSeparator.length}}return e}doValidate(e){let n=!!this._removeThousandsSeparators(this.value).match(this._numberRegExp);if(n){const r=this.number;n=n&&!isNaN(r)&&(this.min==null||this.min>=0||this.min<=this.number)&&(this.max==null||this.max<=0||this.number<=this.max)}return n&&super.doValidate(e)}doCommit(){if(this.value){const e=this.number;let n=e;this.min!=null&&(n=Math.max(n,this.min)),this.max!=null&&(n=Math.min(n,this.max)),n!==e&&(this.unmaskedValue=this.format(n,this));let r=this.value;this.normalizeZeros&&(r=this._normalizeZeros(r)),this.padFractionalZeros&&this.scale>0&&(r=this._padFractionalZeros(r)),this._value=r}super.doCommit()}_normalizeZeros(e){const n=this._removeThousandsSeparators(e).split(this.radix);return n[0]=n[0].replace(/^(\D*)(0*)(\d*)/,(r,i,a,o)=>i+o),e.length&&!/\d$/.test(n[0])&&(n[0]=n[0]+"0"),n.length>1&&(n[1]=n[1].replace(/0*$/,""),n[1].length||(n.length=1)),this._insertThousandsSeparators(n.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const n=e.split(this.radix);return n.length<2&&n.push(""),n[1]=n[1].padEnd(this.scale,"0"),n.join(this.radix)}doSkipInvalid(e,n,r){n===void 0&&(n={});const i=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===Tn.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,n,r)&&!i}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Tn.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(Tn.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||Tn.EMPTY_VALUES.includes(e)&&Tn.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}Tn.UNMASKED_RADIX=".",Tn.EMPTY_VALUES=[...hn.EMPTY_VALUES,0],Tn.DEFAULTS={mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Tn.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:t=>t.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},qe.MaskedNumber=Tn;const Sh={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function mx(t,e,n){e===void 0&&(e=Sh.MASKED),n===void 0&&(n=Sh.MASKED);const r=ui(t);return i=>r.runIsolated(a=>(a[e]=i,a[n]))}function Tce(t,e,n,r){return mx(e,n,r)(t)}qe.PIPE_TYPE=Sh,qe.createPipe=mx,qe.pipe=Tce;try{globalThis.IMask=qe}catch{}const gx={mask:te.oneOfType([te.array,te.func,te.string,te.instanceOf(RegExp),te.oneOf([Date,Number,qe.Masked]),te.instanceOf(qe.Masked)]),value:te.any,unmask:te.oneOfType([te.bool,te.oneOf(["typed"])]),prepare:te.func,prepareChar:te.func,validate:te.func,commit:te.func,overwrite:te.oneOfType([te.bool,te.oneOf(["shift"])]),eager:te.oneOfType([te.bool,te.oneOf(["append","remove"])]),skipInvalid:te.bool,onAccept:te.func,onComplete:te.func,placeholderChar:te.string,displayChar:te.string,lazy:te.bool,definitions:te.object,blocks:te.object,enum:te.arrayOf(te.string),maxLength:te.number,from:te.number,to:te.number,pattern:te.string,format:te.func,parse:te.func,autofix:te.oneOfType([te.bool,te.oneOf(["pad"])]),radix:te.string,thousandsSeparator:te.string,mapToRadix:te.arrayOf(te.string),scale:te.number,normalizeZeros:te.bool,padFractionalZeros:te.bool,min:te.oneOfType([te.number,te.instanceOf(Date)]),max:te.oneOfType([te.number,te.instanceOf(Date)]),dispatch:te.func,inputRef:te.oneOfType([te.func,te.shape({current:te.object})])},hx=Object.keys(gx).filter(t=>t!=="value"),Cce=["value","unmask","onAccept","onComplete","inputRef"],Oce=hx.filter(t=>Cce.indexOf(t)<0);function Rce(t){var e;const n=(e=class extends O.Component{constructor(a){super(a),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const a=this.props,o=this._extractMaskOptionsFromProps(a);if(o.mask)this.maskRef?(this.maskRef.updateOptions(o),"value"in a&&a.value!==void 0&&(this.maskValue=a.value)):this.initMask(o);else if(this.destroyMask(),"value"in a&&a.value!==void 0){var s;(s=this.element)!=null&&s.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=a.value:this.element.value=a.value}}componentWillUnmount(){this.destroyMask()}_inputRef(a){this.element=a,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=a:this.props.inputRef(a))}initMask(a){a===void 0&&(a=this._extractMaskOptionsFromProps(this.props)),this.maskRef=qe(this.element,a).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&this.props.value!==void 0&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(a){const{...o}=a;return Object.keys(o).filter(s=>Oce.indexOf(s)<0).forEach(s=>{delete o[s]}),o}_extractNonMaskProps(a){const{...o}=a;return hx.forEach(s=>{delete o[s]}),"defaultValue"in o||(o.defaultValue=a.mask?"":o.value),delete o.value,o}get maskValue(){return this.maskRef?this.props.unmask==="typed"?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(a){this.maskRef&&(a=a==null&&this.props.unmask!=="typed"?"":a,this.props.unmask==="typed"?this.maskRef.typedValue=a:this.props.unmask?this.maskRef.unmaskedValue=a:this.maskRef.value=a)}_onAccept(a){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,a)}_onComplete(a){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,a)}render(){return O.createElement(t,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}},e.displayName=void 0,e.propTypes=void 0,e),r=t.displayName||t.name||"Component";return n.displayName="IMask("+r+")",n.propTypes=gx,O.forwardRef((i,a)=>O.createElement(n,{...i,ref:a}))}const Nce=Rce(t=>{let{inputRef:e,...n}=t;return O.createElement("input",{...n,ref:e})}),Ace=(t,e)=>O.createElement(Nce,{...t,ref:e});O.forwardRef(Ace);function xce(t,e){let{onAccept:n,onComplete:r}=e===void 0?{}:e;const i=O.useRef(null),a=O.useRef(null),[o,s]=O.useState(!1),[l,c]=O.useState({}),[u,d]=O.useState(""),[p,f]=O.useState(""),[m,_]=O.useState(),g=O.useCallback(()=>{var b;o&&((b=a.current)==null||b.destroy(),a.current=null)},[]),h=O.useCallback(b=>{const v=a.current;v&&(c({value:v.value,unmaskedValue:v.unmaskedValue,typedValue:v.typedValue}),_(v.typedValue),f(v.unmaskedValue),d(v.value),n==null||n(v.value,v,b))},[n]),E=O.useCallback(()=>a.current&&(r==null?void 0:r(a.current.value,a.current)),[r]);return O.useEffect(()=>{const b=i.current;if(!b||!(t!=null&&t.mask))return g();const v=a.current;v?v==null||v.updateOptions(t):b&&t!=null&&t.mask&&(a.current=qe(b,t),h()),s(!!a.current)},[t,g,h]),O.useEffect(()=>{if(!a.current)return;const b=a.current;return b.on("accept",h),b.on("complete",E),()=>{b.off("accept",h),b.off("complete",E)}},[h,E]),O.useEffect(()=>{const{value:b,...v}=l,S=a.current;S&&o&&(b!==u&&(S.value=u),c(v))},[u]),O.useEffect(()=>{const{unmaskedValue:b,...v}=l,S=a.current;S&&o&&(b!==p&&(S.unmaskedValue=p),c(v))},[p]),O.useEffect(()=>{const{typedValue:b,...v}=l,S=a.current;S&&o&&(b!==m&&(S.typedValue=m),c(v))},[m]),O.useEffect(()=>g,[g]),{ref:i,maskRef:a,value:u,setValue:d,unmaskedValue:p,setUnmaskedValue:f,typedValue:m,setTypedValue:_}}const yh=O.forwardRef(({name:t,value:e,mask:n,onChange:r,...i},a)=>{const{ref:o,unmaskedValue:s,value:l,maskRef:c}=xce({mask:n});return O.useEffect(()=>{c.current.value=e||""},[c,e]),O.useEffect(()=>{r({target:{name:t,value:s||e||""}})},[t,s,e]),N.jsx(Q.TextField,{inputRef:a,inputProps:{ref:o},name:t,value:l,onChange:()=>r({target:{name:t,value:s}}),...i})});yh.displayName="MaskedInput";function Ice(t){let e;switch(t){case"top-left":e={style:{ml:-.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"top-center":e={style:{},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}};break;case"top-right":e={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"bottom-left":e={style:{ml:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"bottom-center":e={style:{},anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}};break;case"bottom-right":e={style:{ml:.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;case"left-top":e={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"left-center":e={anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}};break;case"left-bottom":e={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"right-top":e={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"right-center":e={anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}};break;case"right-bottom":e={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;default:e={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}}}return e}const wce=qt("span")(({arrow:t,theme:e})=>{const i=`solid 1px ${be(e.palette.grey[500],.12)}`,a={borderRadius:"0 0 3px 0",top:-6,borderBottom:i,borderRight:i},o={borderRadius:"3px 0 0 0",bottom:-6,borderTop:i,borderLeft:i},s={borderRadius:"0 3px 0 0",left:-6,borderTop:i,borderRight:i},l={borderRadius:"0 0 0 3px",right:-6,borderBottom:i,borderLeft:i};return{display:"none",[e.breakpoints.up("sm")]:{zIndex:1,width:12,height:12,content:'""',display:"block",position:"absolute",transform:"rotate(-135deg)",background:e.palette.background.paper},...t==="top-left"&&{...a,left:20},...t==="top-center"&&{...a,left:0,right:0,margin:"auto"},...t==="top-right"&&{...a,right:20},...t==="bottom-left"&&{...o,left:20},...t==="bottom-center"&&{...o,left:0,right:0,margin:"auto"},...t==="bottom-right"&&{...o,right:20},...t==="left-top"&&{...s,top:20},...t==="left-center"&&{...s,top:0,bottom:0,margin:"auto"},...t==="left-bottom"&&{...s,bottom:20},...t==="right-top"&&{...l,top:20},...t==="right-center"&&{...l,top:0,bottom:0,margin:"auto"},...t==="right-bottom"&&{...l,bottom:20}}}),Dce=({open:t,children:e,arrow:n="top-right",disabledArrow:r,sx:i,...a})=>{const{style:o,anchorOrigin:s,transformOrigin:l}=Ice(n);return N.jsxs(Q.Popover,{open:!!t,anchorEl:t,anchorOrigin:s,transformOrigin:l,PaperProps:{sx:{p:1,width:"auto",overflow:"inherit",...o,"& .MuiMenuItem-root":{px:1,typography:"body2",borderRadius:.75,"& svg":{mr:2,width:20,height:20,flexShrink:0}},...i}},...a,children:[!r&&N.jsx(wce,{arrow:n}),e]})},Mce=Q.styled(Q.Stack)(({theme:t})=>({flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderBottom:`1px solid ${t.palette.grey[300]}`,button:{marginRight:24}})),Lce=Q.styled(Q.DialogContent)({padding:"24px !important"}),Pce=Q.styled(Q.DialogActions)(({theme:t})=>({borderTop:`1px solid ${t.palette.grey[300]}`,backgroundColor:t.palette.grey[50]})),Ex=({children:t,actionsProps:e})=>N.jsx(Pce,{sx:{borderTop:"1px solid",borderColor:"grey.300",backgroundColor:"grey.50"},...e,children:t}),kce=({actions:t,actionsProps:e,children:n,dialogContentProps:r,dialogTitle:i,dialogTitleProps:a,onClose:o,...s})=>N.jsxs(Q.Dialog,{scroll:"body",...s,onClose:o,children:[N.jsxs(Mce,{children:[i&&N.jsx(Q.DialogTitle,{variant:"subtitle1",...a,children:i}),N.jsx(Q.IconButton,{onClick:o,children:N.jsx(Ot,{icon:"ic:round-close"})})]}),N.jsx(Lce,{...r,children:n}),t&&N.jsx(Ex,{actionsProps:e,children:t})]}),Fce=({children:t,container:e})=>is.createPortal(t,document.getElementById(e)||document.body),Bce=({onSearch:t,onChange:e,trigger:n="click",iconPosition:r="end",...i})=>{const a=O.useRef(null),o=N.jsx(Q.InputAdornment,{position:r,children:N.jsx(Q.IconButton,{color:"inherit",onClick:()=>{var s;t((s=a.current)==null?void 0:s.value)},children:N.jsx(Ot,{icon:"eva:search-fill",sx:{width:20,height:20}})})});return N.jsx(Q.TextField,{inputRef:a,InputProps:{onKeyDown:s=>{var l;s.key==="Enter"&&t((l=a.current)==null?void 0:l.value)},...r==="start"?{startAdornment:o}:{endAdornment:o}},onChange:s=>{if(n==="change"){t(s.target.value);return}s.target.value===""&&t(""),e&&e(s)},...i})},Uce=Q.styled(Q.StepConnector)(({theme:t})=>({top:10,left:"calc(-50% + 20px)",right:"calc(50% + 20px)","& .MuiStepConnector-line":{borderTopWidth:2,borderColor:t.palette.divider},"&.Mui-active, &.Mui-completed":{"& .MuiStepConnector-line":{borderColor:t.palette.primary.main}}})),Gce=({active:t,completed:e})=>N.jsx(Q.Stack,{alignItems:"center",justifyContent:"center",sx:{width:24,height:24,color:"text.disabled",...t&&{color:"primary.main"}},children:e?N.jsx(Ot,{icon:"eva:checkmark-fill",sx:{color:"primary.main"}}):N.jsx(Q.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:"currentColor"}})}),$ce=({steps:t,activeStep:e,showLabels:n=!0,sx:r,...i})=>N.jsx(Q.Stepper,{alternativeLabel:!0,activeStep:e,connector:N.jsx(Uce,{}),sx:r,...i,children:t.map(a=>N.jsx(Q.Step,{children:N.jsx(Q.StepLabel,{StepIconComponent:Gce,sx:{"& .MuiStepLabel-label":{typography:"subtitle2"}},children:n&&a})},a))}),qce=({children:t,value:e,index:n,sx:r})=>N.jsx(Q.Box,{role:"tabpanel",id:`simple-tabpanel-${n}`,"aria-labelledby":`simple-tab-${n}`,sx:{mt:3,...e.toString()!==n.toString()&&{position:"absolute",width:"100%",height:0,overflow:"hidden",visibility:"hidden"},...r},children:t}),Yce=({name:t,helperText:e,rules:n,...r})=>{const{control:i}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:i,rules:n,render:({field:a,fieldState:{error:o}})=>N.jsx($d,{...a,...r,onChange:s=>a.onChange(s),error:!!o,helperText:(o==null?void 0:o.message)||e})})},Vce=({name:t,helperText:e,...n})=>{const{control:r}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:r,render:({field:i,fieldState:{error:a}})=>N.jsxs("div",{children:[N.jsx(Q.FormControlLabel,{control:N.jsx(Q.Checkbox,{...i,checked:i.value}),...n}),(!!a||e)&&N.jsx(Q.FormHelperText,{error:!!a,children:a?a==null?void 0:a.message:e})]})})},Hce=({row:t,name:e,label:n,options:r,spacing:i,helperText:a,...o})=>{const{control:s}=rt.useFormContext(),l=(c,u)=>c.includes(u)?c.filter(d=>d!==u):[...c,u];return N.jsx(rt.Controller,{name:e,control:s,render:({field:c,fieldState:{error:u}})=>N.jsxs(Q.FormControl,{component:"fieldset",children:[n&&N.jsx(Q.FormLabel,{component:"legend",sx:{typography:"body2"},children:n}),N.jsx(Q.FormGroup,{sx:{...t&&{flexDirection:"row"},"& .MuiFormControlLabel-root":{"&:not(:last-of-type)":{mb:i||0},...t&&{mr:0,"&:not(:last-of-type)":{mr:i||2}}}},children:r.map(d=>N.jsx(Q.FormControlLabel,{control:N.jsx(Q.Checkbox,{checked:c.value.includes(d.value),onChange:()=>c.onChange(l(c.value,d.value))}),label:d.label,...o},d.value))}),(!!u||a)&&N.jsx(Q.FormHelperText,{error:!!u,sx:{mx:0},children:u?u==null?void 0:u.message:a})]})})},zce=typeof window<"u"?O.useLayoutEffect:O.useEffect;function vx(t,e,n,r){const i=O.useRef(e);zce(()=>{i.current=e},[e]),O.useEffect(()=>{const a=(n==null?void 0:n.current)||window;if(!(a&&a.addEventListener))return;const o=s=>i.current(s);return a.addEventListener(t,o,r),()=>{a.removeEventListener(t,o)}},[t,n,r])}const Wce=({keyName:t,inputs:e=[],rules:n,...r})=>{const i=O.useRef(null),{control:a,setValue:o,formState:{errors:s}}=rt.useFormContext(),l=d=>{const p=d.clipboardData.getData("text").split("");e.map((f,m)=>o(f,p[m])),d.preventDefault()},c=(d,p)=>{const{maxLength:f,value:m,name:_}=d.target,g=_.replace(t,""),h=Number(g),E=document.querySelector(`input[name=${t}${h+1}]`);m.length>f&&(d.target.value=m[0]),m.length>=f&&h<6&&E!==null&&E.focus(),p(d)};vx("paste",l,i);const u=e.some(d=>s[d]);return N.jsxs(Q.Stack,{children:[N.jsx(Q.Stack,{direction:"row",spacing:2,justifyContent:"center",ref:i,children:e.map((d,p)=>N.jsx(rt.Controller,{name:`${t}${p+1}`,control:a,rules:n,render:({field:f,fieldState:{error:m}})=>N.jsx(Q.TextField,{...r,...f,autoComplete:"none",error:!!m,autoFocus:p===0,placeholder:"-",onChange:_=>{c(_,f.onChange)},onFocus:_=>_.currentTarget.select(),InputProps:{sx:{width:{xs:36,sm:56},height:{xs:36,sm:56},"& input":{p:0,textAlign:"center"}}},inputProps:{maxLength:1,type:"number"}})},d))}),u&&N.jsx(Q.FormHelperText,{error:!0,sx:{px:2},children:"Código é obrigatório"})]})},jce=({name:t,rules:e,helperText:n,...r})=>{const{control:i}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:i,rules:e,render:({field:{ref:a,onChange:o,...s},fieldState:{error:l}})=>N.jsx(OC,{...s,onChangeColor:o,inputRef:a,fullWidth:!0,error:!!l,helperText:(l==null?void 0:l.message)||n,...r})})},Kce=({name:t,rules:e,...n})=>{const{control:r}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:r,rules:e,render:({field:{ref:i,...a},fieldState:{error:o}})=>{var s;return N.jsx(ka.DatePicker,{inputRef:i,format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...n.localeText},...a,...n,value:a.value?new Date(a.value):null,slotProps:{textField:{...(s=n.slotProps)==null?void 0:s.textField,error:!!o,helperText:o==null?void 0:o.message,autoComplete:"off",spellCheck:"false",fullWidth:!0}}})}})},Qce=({name:t,label:e,rules:n,...r})=>{const{control:i,setError:a}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:i,rules:n,render:({field:{value:o,onChange:s},fieldState:{error:l}})=>N.jsx(ka.DateRangePicker,{format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...r.localeText},value:[(o==null?void 0:o.startDate)||null,(o==null?void 0:o.endDate)||null],onChange:c=>s({startDate:c[0],endDate:c[1]}),onError:c=>{a(t,{message:c[0]||c[1]||void 0})},...r,slotProps:{textField:({position:c})=>{var u;return{...(u=r.slotProps)==null?void 0:u.textField,error:!!l,helperText:l==null?void 0:l.message,autoComplete:"off",spellCheck:"false",fullWidth:!0,label:c==="start"?`${e} (Dt. Início)`:`${e} (Dt. Fim)`}}},sx:{width:1}})})},Xce=({name:t,rules:e,...n})=>{const{control:r}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:r,rules:e,render:({field:{ref:i,...a},fieldState:{error:o}})=>{var s;return N.jsx(ka.DateTimePicker,{format:"dd/MM/yyyy HH:mm",inputRef:i,localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...n.localeText},...a,...n,value:a.value?new Date(a.value):null,slotProps:{textField:{...(s=n.slotProps)==null?void 0:s.textField,error:!!o,helperText:o==null?void 0:o.message,autoComplete:"off",spellCheck:"false",fullWidth:!0}}})}})},Zce=({name:t,helperText:e,rules:n,...r})=>{const{control:i}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:i,rules:n,render:({field:{name:a,onBlur:o,onChange:s,value:l},fieldState:{error:c}})=>N.jsx(wA,{id:`quill${a}`,onBlur:o,onChange:(u,d,p,f)=>s(f.getLength()===1?"":u),value:l,error:!!c,helperText:(c==null?void 0:c.message)||e,...r})})},bx=({name:t,helperText:e,rules:n,...r})=>{const{control:i}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:i,rules:n,render:({field:{ref:a,...o},fieldState:{error:s}})=>N.jsx(Q.TextField,{...o,inputRef:a,fullWidth:!0,error:!!s,helperText:(s==null?void 0:s.message)||e,...r})})},Jce=({id:t,children:e,onSubmit:n,methods:r})=>N.jsx(rt.FormProvider,{...r,children:N.jsx(Q.Stack,{component:"form",id:t,onSubmit:n,flex:1,width:1,noValidate:!0,children:e})}),eue=({name:t,helperText:e,rules:n,...r})=>{const{control:i}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:i,rules:n,render:({field:{name:a,onChange:o,value:s,ref:l},fieldState:{error:c}})=>N.jsx(yh,{ref:l,...r,name:a,value:s,error:!!c,helperText:(c==null?void 0:c.message)||e,onChange:({target:{value:u}})=>o(u)})})},tue=t=>{const[e,n]=O.useState(!1);return N.jsx(bx,{...t,type:e?"text":"password",InputProps:{endAdornment:N.jsx(Q.InputAdornment,{position:"end",children:N.jsx(Q.IconButton,{onClick:()=>n(!e),edge:"end","aria-label":"Mostrar/Ocultar senha",children:N.jsx(Ot,{icon:e?"eva:eye-off-fill":"eva:eye-fill"})})})}})},nue=({name:t,rules:e,row:n,label:r,options:i,spacing:a,helperText:o,decorated:s,onChange:l,...c})=>{const{control:u}=rt.useFormContext(),d=r?`${t}-${r}`:"";return N.jsx(rt.Controller,{name:t,control:u,rules:e,render:({field:p,fieldState:{error:f}})=>N.jsxs(Q.FormControl,{component:"fieldset",sx:{...s&&{paddingLeft:1.5}},children:[r&&N.jsx(Q.FormLabel,{component:"legend",id:d,sx:{typography:"body2"},children:r}),N.jsx(Q.RadioGroup,{...p,onChange:(m,_)=>{p.onChange(m),l&&l(m,_)},"aria-labelledby":d,row:n,...c,children:i.map(m=>N.jsx(Q.FormControlLabel,{value:m.value,control:N.jsx(Q.Radio,{}),label:m.label,sx:({palette:_})=>({"&:not(:last-of-type)":{mb:a||0},...n&&{mr:0,"&:not(:last-of-type)":{mr:a||2}},...s&&{border:`1px solid ${Q.alpha(_.grey[500],.32)}`,borderRadius:1,padding:.25,paddingRight:(a||0)/2||1,...p.value===m.value&&{borderColor:"primary.main",backgroundColor:Q.alpha(_.primary.main,.05)}}})},m.value))}),(!!f||o)&&N.jsx(Q.FormHelperText,{error:!!f,sx:{mx:0},children:f?f==null?void 0:f.message:o})]})})},rue=({name:t,helperText:e,onChange:n,...r})=>{const{control:i}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:i,render:({field:a,fieldState:{error:o}})=>N.jsxs("div",{children:[N.jsx(Q.FormControlLabel,{control:N.jsx(Q.Switch,{...a,checked:a.value,onChange:(s,l)=>{a.onChange(s),n&&n(s,l)}}),...r}),(!!o||e)&&N.jsx(Q.FormHelperText,{error:!!o,children:o?o==null?void 0:o.message:e})]})})},iue=({name:t,rules:e,...n})=>{const{control:r}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:r,rules:e,render:({field:{ref:i,...a},fieldState:{error:o}})=>{var s;return N.jsx(ka.TimePicker,{ampm:!1,format:"HH:mm",inputRef:i,localeText:{fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...n.localeText},...a,...n,value:a.value?new Date(a.value):null,slotProps:{textField:{...(s=n.slotProps)==null?void 0:s.textField,error:!!o,helperText:o==null?void 0:o.message,autoComplete:"off",spellCheck:"false",fullWidth:!0}}})}})},aue=t=>new Promise((e,n)=>{const r=new Image;r.addEventListener("load",()=>e(r)),r.addEventListener("error",i=>n(i)),r.setAttribute("crossOrigin","anonymous"),r.src=t});function Sx(t){return t*Math.PI/180}function oue(t,e,n){const r=Sx(n);return{width:Math.abs(Math.cos(r)*t)+Math.abs(Math.sin(r)*e),height:Math.abs(Math.sin(r)*t)+Math.abs(Math.cos(r)*e)}}async function sue(t,e,n=0,r={horizontal:!1,vertical:!1}){const i=await aue(t),a=document.createElement("canvas"),o=a.getContext("2d");if(!o)return null;const s=Sx(n),{width:l,height:c}=oue(i.width,i.height,n);a.width=l,a.height=c,o.translate(l/2,c/2),o.rotate(s),o.scale(r.horizontal?-1:1,r.vertical?-1:1),o.translate(-i.width/2,-i.height/2),o.drawImage(i,0,0);const u=o.getImageData(e.x,e.y,e.width,e.height);return a.width=e.width,a.height=e.height,o.putImageData(u,0,0),new Promise((d,p)=>{a.toBlob(f=>{d(f)},"image/png")})}function Da(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(d){o(d)}}function l(u){try{c(r.throw(u))}catch(d){o(d)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(t,e||[])).next())})}function Ma(t,e){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(a=c[0]&2?i.return:c[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,c[1])).done)return a;switch(i=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){n.label=c[1];break}if(c[0]===6&&n.label<a[1]){n.label=a[1],a=c;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(c);break}a[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(u){c=[6,u],i=0}finally{r=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function yx(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,a=[],o;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function Tx(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,a;r<i;r++)(a||!(r in e))&&(a||(a=Array.prototype.slice.call(e,0,r)),a[r]=e[r]);return t.concat(a||Array.prototype.slice.call(e))}typeof SuppressedError=="function"&&SuppressedError;var lue=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function ns(t,e){var n=cue(t);if(typeof n.path!="string"){var r=t.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof e=="string"?e:typeof r=="string"&&r.length>0?r:t.name,writable:!1,configurable:!1,enumerable:!0})}return n}function cue(t){var e=t.name,n=e&&e.lastIndexOf(".")!==-1;if(n&&!t.type){var r=e.split(".").pop().toLowerCase(),i=lue.get(r);i&&Object.defineProperty(t,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return t}var uue=[".DS_Store","Thumbs.db"];function due(t){return Da(this,void 0,void 0,function(){return Ma(this,function(e){return Ic(t)&&pue(t.dataTransfer)?[2,gue(t.dataTransfer,t.type)]:fue(t)?[2,_ue(t)]:Array.isArray(t)&&t.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,mue(t)]:[2,[]]})})}function pue(t){return Ic(t)}function fue(t){return Ic(t)&&Ic(t.target)}function Ic(t){return typeof t=="object"&&t!==null}function _ue(t){return Th(t.target.files).map(function(e){return ns(e)})}function mue(t){return Da(this,void 0,void 0,function(){var e;return Ma(this,function(n){switch(n.label){case 0:return[4,Promise.all(t.map(function(r){return r.getFile()}))];case 1:return e=n.sent(),[2,e.map(function(r){return ns(r)})]}})})}function gue(t,e){return Da(this,void 0,void 0,function(){var n,r;return Ma(this,function(i){switch(i.label){case 0:return t.items?(n=Th(t.items).filter(function(a){return a.kind==="file"}),e!=="drop"?[2,n]:[4,Promise.all(n.map(hue))]):[3,2];case 1:return r=i.sent(),[2,Cx(Ox(r))];case 2:return[2,Cx(Th(t.files).map(function(a){return ns(a)}))]}})})}function Cx(t){return t.filter(function(e){return uue.indexOf(e.name)===-1})}function Th(t){if(t===null)return[];for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(r)}return e}function hue(t){if(typeof t.webkitGetAsEntry!="function")return Rx(t);var e=t.webkitGetAsEntry();return e&&e.isDirectory?Nx(e):Rx(t)}function Ox(t){return t.reduce(function(e,n){return Tx(Tx([],yx(e),!1),yx(Array.isArray(n)?Ox(n):[n]),!1)},[])}function Rx(t){var e=t.getAsFile();if(!e)return Promise.reject("".concat(t," is not a File"));var n=ns(e);return Promise.resolve(n)}function Eue(t){return Da(this,void 0,void 0,function(){return Ma(this,function(e){return[2,t.isDirectory?Nx(t):vue(t)]})})}function Nx(t){var e=t.createReader();return new Promise(function(n,r){var i=[];function a(){var o=this;e.readEntries(function(s){return Da(o,void 0,void 0,function(){var l,c,u;return Ma(this,function(d){switch(d.label){case 0:if(s.length)return[3,5];d.label=1;case 1:return d.trys.push([1,3,,4]),[4,Promise.all(i)];case 2:return l=d.sent(),n(l),[3,4];case 3:return c=d.sent(),r(c),[3,4];case 4:return[3,6];case 5:u=Promise.all(s.map(Eue)),i.push(u),a(),d.label=6;case 6:return[2]}})})},function(s){r(s)})}a()})}function vue(t){return Da(this,void 0,void 0,function(){return Ma(this,function(e){return[2,new Promise(function(n,r){t.file(function(i){var a=ns(i,t.fullPath);n(a)},function(i){r(i)})})]})})}var bue=function(t,e){if(t&&e){var n=Array.isArray(e)?e:e.split(","),r=t.name||"",i=(t.type||"").toLowerCase(),a=i.replace(/\/.*$/,"");return n.some(function(o){var s=o.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?a===s.replace(/\/.*$/,""):i===s})}return!0};function Ax(t){return Tue(t)||yue(t)||Dx(t)||Sue()}function Sue(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
304
|
+
`),a=!1),Object.assign(Object.assign({},t),{allowNegative:a})}function pce(t){t=dce(t),t.decimalSeparator,t.allowedDecimalSeparators,t.thousandsGroupStyle;var e=t.suffix,n=t.allowNegative,r=t.allowLeadingZeros,i=t.onKeyDown;i===void 0&&(i=wr);var a=t.onBlur;a===void 0&&(a=wr);var o=t.thousandSeparator,s=t.decimalScale,l=t.fixedDecimalScale,c=t.prefix;c===void 0&&(c="");var u=t.defaultValue,d=t.value,p=t.valueIsNumericString,f=t.onValueChange,m=XA(t,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),_=Oc(t),g=_.decimalSeparator,h=_.allowedDecimalSeparators,E=function($){return sx($,t)},b=function($,B){return cce($,B,t)},v=wa(d)?u:d,S=p??lce(v,c,e);wa(d)?wa(u)||(S=S||typeof u=="number"):S=S||typeof d=="number";var C=function($){return ZA($)?$:(typeof $=="number"&&($=nx($)),S&&typeof s=="number"?rx($,s,!!l):$)},T=ox(C(d),C(u),!!S,E,b,f),y=T[0],x=y.numAsString,A=y.formattedValue,R=T[1],w=function($){var B=$.target,j=$.key,G=B.selectionStart,M=B.selectionEnd,I=B.value;if(I===void 0&&(I=""),G!==M){i($);return}j==="Backspace"&&I[0]==="-"&&G===c.length+1&&n&&ci(B,1),s&&l&&(j==="Backspace"&&I[G-1]===g?(ci(B,G-1),$.preventDefault()):j==="Delete"&&I[G]===g&&$.preventDefault()),h!=null&&h.includes(j)&&I[G]===g&&ci(B,G+1);var P=o===!0?",":o;j==="Backspace"&&I[G-1]===P&&ci(B,G-1),j==="Delete"&&I[G]===P&&ci(B,G+1),i($)},D=function($){var B=x;if(B.match(/\d/g)||(B=""),r||(B=Qle(B)),l&&s&&(B=rx(B,s,l)),B!==x){var j=sx(B,t);R({formattedValue:j,value:B,floatValue:parseFloat(B)},{event:$,source:Jo.event})}a($)},L=function($){return $===g?!0:es($)},F=function($){var B=$.currentValue,j=$.lastValue,G=$.formattedValue,M=$.currentValueIndex,I=$.formattedValueIndex,P=B[M],U=G[I],V=ix(j,B),Y=V.to;return M>=Y.start&&M<Y.end&&h&&h.includes(P)&&U===g?!0:P===U};return Object.assign(Object.assign({},m),{value:A,valueIsNumericString:!1,isValidInputCharacter:L,isCharacterSame:F,onValueChange:R,format:E,removeFormatting:b,getCaretBoundary:function($){return uce($,t)},onKeyDown:w,onBlur:D})}function fce(t){var e=pce(t);return O.createElement(ace,Object.assign({},e))}const Eh=O.forwardRef(({decimalScale:t=0,fixedDecimalScale:e=!0,prefix:n,allowNegative:r,minValue:i,maxValue:a=1/0,maxLength:o,value:s,inputProps:l,InputProps:c,size:u,disabled:d,name:p,helperText:f,error:m,fullWidth:_,label:g,required:h,onChange:E},b)=>{const v=O.useRef(null),S=C=>{E&&(v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{const{floatValue:T}=C,y=T||0;if(i!==void 0&&i>y){E({target:{name:p,value:i}});return}if(T!==void 0&&a<y){E({target:{name:p,value:a}});return}E({target:{name:p,value:T}})},600))};return O.useEffect(()=>()=>{v.current&&clearTimeout(v.current)},[]),N.jsx(fce,{getInputRef:b,value:s,prefix:n,decimalSeparator:",",thousandSeparator:".",decimalScale:t,fixedDecimalScale:e,autoComplete:"off",allowNegative:r,maxLength:o,onValueChange:S,customInput:Q.TextField,InputProps:{...c},inputProps:l,disabled:d,size:u,helperText:f,error:m,fullWidth:_,label:g,required:h})});Eh.displayName="NumberInput";const lx=O.forwardRef(({name:t,increment:e=1,updadteForMultiple:n,allowNegative:r=!1,value:i=0,onChange:a,minValue:o,maxValue:s,decimalScale:l,disabled:c,...u},d)=>{const p=KA(i,e,l),f=()=>{if(!r&&i-e<0)return;const g=i-e,h=Math.floor(i/e)*e,E=!p&&n?h:g;o!==void 0&&g<o?a(o):a(mh(E))},m=()=>{const g=Number(i)+e,h=Math.ceil(i/e)*e,b=mh(!p&&n?h:g);s!==void 0&&g>=s?a(s):a(o!==void 0&&b<=o?o:b)},_=g=>{const h=Number(g.target.value),E=Math.ceil(h/e)*e,b=n?E:h;if(o!==void 0&&h<=o){a(o);return}if(s!==void 0&&h>=s){a(s);return}a(b)};return N.jsx(Eh,{ref:d,name:t,value:i,minValue:o,maxValue:s,allowNegative:r,decimalScale:l,InputProps:{startAdornment:N.jsx(Q.InputAdornment,{position:"start",children:N.jsx(Q.IconButton,{size:"medium",disabled:c||(r?!1:!i),onClick:f,children:N.jsx(Ot,{icon:"eva:minus-fill",width:14,height:14,color:"primary.main"})})}),endAdornment:N.jsx(Q.InputAdornment,{position:"end",children:N.jsx(Q.IconButton,{size:"medium",onClick:m,disabled:c,children:N.jsx(Ot,{icon:"eva:plus-fill",width:14,height:14,color:"primary.main"})})}),inputProps:{style:{textAlign:"center"}}},onChange:_,disabled:c,...u})});lx.displayName="Incrementer";const _ce=qt(Q.Box)(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light",r=e.variant==="filled",i=e.variant==="outlined",a=e.variant==="soft",o={...e.color==="default"&&{...i&&{backgroundColor:"transparent",color:t.palette.text.primary,border:`1px solid ${be(t.palette.grey[500],.32)}`},...a&&{color:n?t.palette.text.primary:t.palette.common.white,backgroundColor:be(t.palette.grey[500],.16)}}},s={...e.color!=="default"&&{...r&&{color:t.palette[e.color].contrastText,backgroundColor:t.palette[e.color].main},...i&&{backgroundColor:"transparent",color:t.palette[e.color].main,border:`1px solid ${t.palette[e.color].main}`},...a&&{color:t.palette[e.color][n?"dark":"light"],backgroundColor:be(t.palette[e.color].main,.16)}}};return{height:24,minWidth:22,lineHeight:0,borderRadius:6,cursor:"default",alignItems:"center",whiteSpace:"nowrap",display:"inline-flex",justifyContent:"center",textTransform:"capitalize",padding:t.spacing(0,1),color:t.palette.grey[800],fontSize:t.typography.pxToRem(12),fontFamily:t.typography.fontFamily,backgroundColor:t.palette.grey[300],fontWeight:t.typography.fontWeightBold,...s,...o}}),cx=O.forwardRef(({children:t,color:e="default",variant:n="soft",startIcon:r,endIcon:i,sx:a,...o},s)=>{const l=$r(),c={width:16,height:16,"& svg, img":{width:1,height:1,objectFit:"cover"}};return N.jsxs(_ce,{ref:s,component:"span",ownerState:{color:e,variant:n},sx:{...r&&{pl:.75},...i&&{pr:.75},...a},theme:l,...o,children:[r&&N.jsxs(Q.Box,{sx:{mr:.75,...c},children:[" ",r," "]}),t,i&&N.jsxs(Q.Box,{sx:{ml:.75,...c},children:[" ",i," "]})]})});cx.displayName="Label";function Dr(t){return typeof t=="string"||t instanceof String}function ux(t){var e;return typeof t=="object"&&t!=null&&(t==null||(e=t.constructor)==null?void 0:e.name)==="Object"}function dx(t,e){return Array.isArray(e)?dx(t,(n,r)=>e.includes(r)):Object.entries(t).reduce((n,r)=>{let[i,a]=r;return e(a,i)&&(n[i]=a),n},{})}const ke={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function mce(t){switch(t){case ke.LEFT:return ke.FORCE_LEFT;case ke.RIGHT:return ke.FORCE_RIGHT;default:return t}}function vh(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Rc(t,e){if(e===t)return!0;const n=Array.isArray(e),r=Array.isArray(t);let i;if(n&&r){if(e.length!=t.length)return!1;for(i=0;i<e.length;i++)if(!Rc(e[i],t[i]))return!1;return!0}if(n!=r)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){const a=e instanceof Date,o=t instanceof Date;if(a&&o)return e.getTime()==t.getTime();if(a!=o)return!1;const s=e instanceof RegExp,l=t instanceof RegExp;if(s&&l)return e.toString()==t.toString();if(s!=l)return!1;const c=Object.keys(e);for(i=0;i<c.length;i++)if(!Object.prototype.hasOwnProperty.call(t,c[i]))return!1;for(i=0;i<c.length;i++)if(!Rc(t[c[i]],e[c[i]]))return!1;return!0}else if(e&&t&&typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();return!1}class gce{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?ke.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?ke.RIGHT:ke.LEFT}}function qe(t,e){return new qe.InputMask(t,e)}function px(t){if(t==null)throw new Error("mask property should be defined");return t instanceof RegExp?qe.MaskedRegExp:Dr(t)?qe.MaskedPattern:t===Date?qe.MaskedDate:t===Number?qe.MaskedNumber:Array.isArray(t)||t===Array?qe.MaskedDynamic:qe.Masked&&t.prototype instanceof qe.Masked?t:qe.Masked&&t instanceof qe.Masked?t.constructor:t instanceof Function?qe.MaskedFunction:(console.warn("Mask not found for mask",t),qe.Masked)}function Nc(t){if(!t)throw new Error("Options in not defined");if(qe.Masked){if(t.prototype instanceof qe.Masked)return{mask:t};const{mask:e=void 0,...n}=t instanceof qe.Masked?{mask:t}:ux(t)&&t.mask instanceof qe.Masked?t:{};if(e){const r=e.mask;return{...dx(e,(i,a)=>!a.startsWith("_")),mask:e.constructor,_mask:r,...n}}}return ux(t)?{...t}:{mask:t}}function ui(t){if(qe.Masked&&t instanceof qe.Masked)return t;const e=Nc(t),n=px(e.mask);if(!n)throw new Error("Masked class is not found for provided mask, appropriate module needs to be imported manually before creating mask.");return e.mask===n&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new n(e)}qe.createMask=ui;class bh{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,n){if(!(e==null||n==null||e===this.selectionStart&&n===this.selectionEnd))try{this._unsafeSelect(e,n)}catch{}}get isActive(){return!1}}qe.MaskElement=bh;class di extends bh{constructor(e){super(),this.input=e,this._handlers={}}get rootElement(){var e,n,r;return(e=(n=(r=this.input).getRootNode)==null?void 0:n.call(r))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){Object.keys(e).forEach(n=>this._toggleEventHandler(di.EVENTS_MAP[n],e[n]))}unbindEvents(){Object.keys(this._handlers).forEach(e=>this._toggleEventHandler(e))}_toggleEventHandler(e,n){this._handlers[e]&&(this.input.removeEventListener(e,this._handlers[e]),delete this._handlers[e]),n&&(this.input.addEventListener(e,n),this._handlers[e]=n)}}di.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"blur"},qe.HTMLMaskElement=di;class hce extends di{constructor(e){super(e),this.input=e,this._handlers={}}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,n){this.input.setSelectionRange(e,n)}get value(){return this.input.value}set value(e){this.input.value=e}}qe.HTMLMaskElement=di;class fx extends di{get _unsafeSelectionStart(){const e=this.rootElement,n=e.getSelection&&e.getSelection(),r=n&&n.anchorOffset,i=n&&n.focusOffset;return i==null||r==null||r<i?r:i}get _unsafeSelectionEnd(){const e=this.rootElement,n=e.getSelection&&e.getSelection(),r=n&&n.anchorOffset,i=n&&n.focusOffset;return i==null||r==null||r>i?r:i}_unsafeSelect(e,n){if(!this.rootElement.createRange)return;const r=this.rootElement.createRange();r.setStart(this.input.firstChild||this.input,e),r.setEnd(this.input.lastChild||this.input,n);const i=this.rootElement,a=i.getSelection&&i.getSelection();a&&(a.removeAllRanges(),a.addRange(r))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}qe.HTMLContenteditableMaskElement=fx;class Ece{constructor(e,n){this.el=e instanceof bh?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new fx(e):new hce(e),this.masked=ui(n),this._listeners={},this._value="",this._unmaskedValue="",this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var n;return e==null||((n=this.masked)==null?void 0:n.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof qe.Masked)&&this.masked.constructor===px(e)){this.masked.updateOptions({mask:e});return}const n=e instanceof qe.Masked?e:ui({mask:e});n.unmaskedValue=this.masked.unmaskedValue,this.masked=n}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl(),this.alignCursor())}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl(),this.alignCursor())}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,n){const r=this._listeners[e];r&&r.forEach(i=>i(n))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value}updateControl(){const e=this.masked.unmaskedValue,n=this.masked.value,r=this.displayValue,i=this.unmaskedValue!==e||this.value!==n;this._unmaskedValue=e,this._value=n,this.el.value!==r&&(this.el.value=r),i&&this._fireChangeEvents()}updateOptions(e){const{mask:n,...r}=e,i=!this.maskEquals(n),a=!Rc(this.masked,r);i&&(this.mask=n),a&&this.masked.updateOptions(r),(i||a)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,ke.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,n){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(n),this}off(e,n){if(!this._listeners[e])return this;if(!n)return delete this._listeners[e],this;const r=this._listeners[e].indexOf(n);return r>=0&&this._listeners[e].splice(r,1),this}_onInput(e){if(this._inputEvent=e,this._abortUpdateCursor(),!this._selection)return this.updateValue();const n=new gce({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),r=this.masked.rawInputValue,i=this.masked.splice(n.startChangePos,n.removed.length,n.inserted,n.removeDirection,{input:!0,raw:!0}).offset,a=r===this.masked.rawInputValue?n.removeDirection:ke.NONE;let o=this.masked.nearestInputPos(n.startChangePos+i,a);a!==ke.NONE&&(o=this.masked.nearestInputPos(o,ke.NONE)),this.updateControl(),this.updateCursor(o),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}qe.InputMask=Ece;class gt{static normalize(e){return Array.isArray(e)?e:[e,new gt]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",skip:!1,tailShift:0},e)}aggregate(e){return this.rawInserted+=e.rawInserted,this.skip=this.skip||e.skip,this.inserted+=e.inserted,this.tailShift+=e.tailShift,this}get offset(){return this.tailShift+this.inserted.length}}qe.ChangeDetails=gt;class cr{constructor(e,n,r){e===void 0&&(e=""),n===void 0&&(n=0),this.value=e,this.from=n,this.stop=r}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const n=this.value[0];return this.value=this.value.slice(1),n}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class hn{constructor(e){this._value="",this._update({...hn.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){Object.keys(e).length&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,n){n===void 0&&(n={input:!0}),this.reset(),this.append(e,n,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,n){return e}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),Math.min(this.displayValue.length,n-e)}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),this.displayValue.slice(e,n)}extractTail(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),new cr(this.extractInput(e,n),e)}appendTail(e){return Dr(e)&&(e=new cr(String(e))),e.appendTo(this)}_appendCharRaw(e,n){return e?(this._value+=e,new gt({inserted:e,rawInserted:e})):new gt}_appendChar(e,n,r){n===void 0&&(n={});const i=this.state;let a;if([e,a]=this.doPrepareChar(e,n),a=a.aggregate(this._appendCharRaw(e,n)),a.inserted){let o,s=this.doValidate(n)!==!1;if(s&&r!=null){const l=this.state;this.overwrite===!0&&(o=r.state,r.unshift(this.displayValue.length-a.tailShift));let c=this.appendTail(r);s=c.rawInserted===r.toString(),!(s&&c.inserted)&&this.overwrite==="shift"&&(this.state=l,o=r.state,r.shift(),c=this.appendTail(r),s=c.rawInserted===r.toString()),s&&c.inserted&&(this.state=l)}s||(a=new gt,this.state=i,r&&o&&(r.state=o))}return a}_appendPlaceholder(){return new gt}_appendEager(){return new gt}append(e,n,r){if(!Dr(e))throw new Error("value should be string");const i=Dr(r)?new cr(String(r)):r;n!=null&&n.tail&&(n._beforeTailState=this.state);let a;[e,a]=this.doPrepare(e,n);for(let o=0;o<e.length;++o){const s=this._appendChar(e[o],n,i);if(!s.rawInserted&&!this.doSkipInvalid(e[o],n,i))break;a.aggregate(s)}return(this.eager===!0||this.eager==="append")&&n!=null&&n.input&&e&&a.aggregate(this._appendEager()),i!=null&&(a.tailShift+=this.appendTail(i).tailShift),a}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(n),new gt}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const n=this.rawInputValue,r=this.value,i=e();return this.rawInputValue=n,this.value&&this.value!==r&&r.indexOf(this.value)===0&&this.append(r.slice(this.displayValue.length),{},""),delete this._refreshing,i}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const n=this.state,r=e(this);return this.state=n,delete this._isolated,r}doSkipInvalid(e,n,r){return!!this.skipInvalid}doPrepare(e,n){return n===void 0&&(n={}),gt.normalize(this.prepare?this.prepare(e,this,n):e)}doPrepareChar(e,n){return n===void 0&&(n={}),gt.normalize(this.prepareChar?this.prepareChar(e,this,n):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,n,r,i,a){i===void 0&&(i=ke.NONE),a===void 0&&(a={input:!0});const o=e+n,s=this.extractTail(o),l=this.eager===!0||this.eager==="remove";let c;l&&(i=mce(i),c=this.extractInput(0,o,{raw:!0}));let u=e;const d=new gt;if(i!==ke.NONE&&(u=this.nearestInputPos(e,n>1&&e!==0&&!l?ke.NONE:i),d.tailShift=u-e),d.aggregate(this.remove(u)),l&&i!==ke.NONE&&c===this.rawInputValue)if(i===ke.FORCE_LEFT){let p;for(;c===this.rawInputValue&&(p=this.displayValue.length);)d.aggregate(new gt({tailShift:-1})).aggregate(this.remove(p-1))}else i===ke.FORCE_RIGHT&&s.unshift();return d.aggregate(this.append(r,a,s))}maskEquals(e){return this.mask===e}typedValueEquals(e){const n=this.typedValue;return e===n||hn.EMPTY_VALUES.includes(e)&&hn.EMPTY_VALUES.includes(n)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}}hn.DEFAULTS={skipInvalid:!0},hn.EMPTY_VALUES=[void 0,null,""],qe.Masked=hn;class pi{constructor(e,n){e===void 0&&(e=[]),n===void 0&&(n=0),this.chunks=e,this.from=n}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=Dr(e)?new cr(String(e)):e;const n=this.chunks[this.chunks.length-1],r=n&&(n.stop===e.stop||e.stop==null)&&e.from===n.from+n.toString().length;if(e instanceof cr)r?n.extend(e.toString()):this.chunks.push(e);else if(e instanceof pi){if(e.stop==null){let i;for(;e.chunks.length&&e.chunks[0].stop==null;)i=e.chunks.shift(),i.from+=e.from,this.extend(i)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof qe.MaskedPattern))return new cr(this.toString()).appendTo(e);const n=new gt;for(let r=0;r<this.chunks.length&&!n.skip;++r){const i=this.chunks[r],a=e._mapPosToBlock(e.displayValue.length),o=i.stop;let s;if(o!=null&&(!a||a.index<=o)){if(i instanceof pi||e._stops.indexOf(o)>=0){const l=e._appendPlaceholder(o);n.aggregate(l)}s=i instanceof pi&&e._blocks[o]}if(s){const l=s.appendTail(i);l.skip=!1,n.aggregate(l),e._value+=l.inserted;const c=i.toString().slice(l.rawInserted.length);c&&n.aggregate(e.append(c,{tail:!0}))}else n.aggregate(e.append(i.toString(),{tail:!0}))}return n}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:n,...r}=e;Object.assign(this,r),this.chunks=n.map(i=>{const a="chunks"in i?new pi:new cr;return a.state=i,a})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const n=e!=null?e-this.from:e;let r=0;for(;r<this.chunks.length;){const i=this.chunks[r],a=i.unshift(n);if(i.toString()){if(!a)break;++r}else this.chunks.splice(r,1);if(a)return a}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const n=this.chunks[e],r=n.shift();if(n.toString()){if(!r)break;--e}else this.chunks.splice(e,1);if(r)return r}return""}}class vce{constructor(e,n){this.masked=e,this._log=[];const{offset:r,index:i}=e._mapPosToBlock(n)||(n<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=r,this.index=i,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((n=this.block)==null?void 0:n.displayValue.length)||0){var n;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,ke.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,ke.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,ke.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,ke.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,ke.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,ke.NONE),!0})}}class _x{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(n),this._value||(this._isRawInput=!1),new gt}nearestInputPos(e,n){n===void 0&&(n=ke.NONE);const r=0,i=this._value.length;switch(n){case ke.LEFT:case ke.FORCE_LEFT:return r;case ke.NONE:case ke.RIGHT:case ke.FORCE_RIGHT:default:return i}}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),this._isRawInput?n-e:0}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),r===void 0&&(r={}),r.raw&&this._isRawInput&&this._value.slice(e,n)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,n){n===void 0&&(n={});const r=new gt;if(this.isFilled)return r;const i=this.eager===!0||this.eager==="append",o=this.char===e&&(this.isUnmasking||n.input||n.raw)&&(!n.raw||!i)&&!n.tail;return o&&(r.rawInserted=this.char),this._value=r.inserted=this.char,this._isRawInput=o&&(n.raw||n.input),r}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new gt;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new cr("")}appendTail(e){return Dr(e)&&(e=new cr(String(e))),e.appendTo(this)}append(e,n,r){const i=this._appendChar(e[0],n);return r!=null&&(i.tailShift+=this.appendTail(r).tailShift),i}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}}class Ac{constructor(e){const{parent:n,isOptional:r,placeholderChar:i,displayChar:a,lazy:o,eager:s,...l}=e;this.masked=ui(l),Object.assign(this,{parent:n,isOptional:r,placeholderChar:i,displayChar:a,lazy:o,eager:s})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),e===0&&n>=1?(this.isFilled=!1,this.masked.remove(e,n)):new gt}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,n){if(n===void 0&&(n={}),this.isFilled)return new gt;const r=this.masked.state,i=this.masked._appendChar(e,this.currentMaskFlags(n));return i.inserted&&this.doValidate(n)===!1&&(i.inserted=i.rawInserted="",this.masked.state=r),!i.inserted&&!this.isOptional&&!this.lazy&&!n.input&&(i.inserted=this.placeholderChar),i.skip=!i.inserted&&!this.isOptional,this.isFilled=!!i.inserted,i}append(e,n,r){return this.masked.append(e,this.currentMaskFlags(n),r)}_appendPlaceholder(){const e=new gt;return this.isFilled||this.isOptional||(this.isFilled=!0,e.inserted=this.placeholderChar),e}_appendEager(){return new gt}extractTail(e,n){return this.masked.extractTail(e,n)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),this.masked.extractInput(e,n,r)}nearestInputPos(e,n){n===void 0&&(n=ke.NONE);const r=0,i=this.value.length,a=Math.min(Math.max(e,r),i);switch(n){case ke.LEFT:case ke.FORCE_LEFT:return this.isComplete?a:r;case ke.RIGHT:case ke.FORCE_RIGHT:return this.isComplete?a:i;case ke.NONE:default:return a}}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),this.value.slice(e,n).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var n;return{...e,_beforeTailState:(e==null||(n=e._beforeTailState)==null?void 0:n.masked)||(e==null?void 0:e._beforeTailState)}}}Ac.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class bce extends hn{updateOptions(e){super.updateOptions(e)}_update(e){const n=e.mask;n&&(e.validate=r=>r.search(n)>=0),super._update(e)}}qe.MaskedRegExp=bce;class En extends hn{constructor(e){super({...En.DEFAULTS,...e,definitions:Object.assign({},Ac.DEFAULT_DEFINITIONS,e==null?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const n=this.mask;if(!n||!e)return;let r=!1,i=!1;for(let a=0;a<n.length;++a){if(this.blocks){const c=n.slice(a),u=Object.keys(this.blocks).filter(p=>c.indexOf(p)===0);u.sort((p,f)=>f.length-p.length);const d=u[0];if(d){const{expose:p,...f}=Nc(this.blocks[d]),m=ui({lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,...f,parent:this});m&&(this._blocks.push(m),p&&(this.exposeBlock=m),this._maskedBlocks[d]||(this._maskedBlocks[d]=[]),this._maskedBlocks[d].push(this._blocks.length-1)),a+=d.length-1;continue}}let o=n[a],s=o in e;if(o===En.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(o==="{"||o==="}"){r=!r;continue}if(o==="["||o==="]"){i=!i;continue}if(o===En.ESCAPE_CHAR){if(++a,o=n[a],!o)break;s=!1}const l=s?new Ac({isOptional:i,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...Nc(e[o]),parent:this}):new _x({char:o,eager:this.eager,isUnmasking:r});this._blocks.push(l)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){const{_blocks:n,...r}=e;this._blocks.forEach((i,a)=>i.state=n[a]),super.state=r}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,n)=>e+=n.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(n),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,n)=>e+=n.value,"")}set value(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(n),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(n),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,n)=>e+=n.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const n=new gt;let r=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(r==null)return n;this._blocks[r].isFilled&&++r;for(let i=r;i<this._blocks.length;++i){const a=this._blocks[i]._appendEager();if(!a.inserted)break;n.aggregate(a)}return n}_appendCharRaw(e,n){n===void 0&&(n={});const r=this._mapPosToBlock(this.displayValue.length),i=new gt;if(!r)return i;for(let o=r.index;;++o){var a;const s=this._blocks[o];if(!s)break;const l=s._appendChar(e,{...n,_beforeTailState:(a=n._beforeTailState)==null||(a=a._blocks)==null?void 0:a[o]}),c=l.skip;if(i.aggregate(l),c||l.rawInserted)break}return i}extractTail(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);const r=new pi;return e===n||this._forEachBlocksInRange(e,n,(i,a,o,s)=>{const l=i.extractTail(o,s);l.stop=this._findStopBefore(a),l.from=this._blockStartPos(a),l instanceof pi&&(l.blockIndex=a),r.extend(l)}),r}extractInput(e,n,r){if(e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),r===void 0&&(r={}),e===n)return"";let i="";return this._forEachBlocksInRange(e,n,(a,o,s,l)=>{i+=a.extractInput(s,l,r)}),i}_findStopBefore(e){let n;for(let r=0;r<this._stops.length;++r){const i=this._stops[r];if(i<=e)n=i;else break}return n}_appendPlaceholder(e){const n=new gt;if(this.lazy&&e==null)return n;const r=this._mapPosToBlock(this.displayValue.length);if(!r)return n;const i=r.index,a=e??this._blocks.length;return this._blocks.slice(i,a).forEach(o=>{if(!o.lazy||e!=null){var s;const l=o._appendPlaceholder((s=o._blocks)==null?void 0:s.length);this._value+=l.inserted,n.aggregate(l)}}),n}_mapPosToBlock(e){let n="";for(let r=0;r<this._blocks.length;++r){const i=this._blocks[r],a=n.length;if(n+=i.displayValue,e<=n.length)return{index:r,offset:e-a}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((n,r)=>n+=r.displayValue.length,0)}_forEachBlocksInRange(e,n,r){n===void 0&&(n=this.displayValue.length);const i=this._mapPosToBlock(e);if(i){const a=this._mapPosToBlock(n),o=a&&i.index===a.index,s=i.offset,l=a&&o?a.offset:this._blocks[i.index].displayValue.length;if(r(this._blocks[i.index],i.index,s,l),a&&!o){for(let c=i.index+1;c<a.index;++c)r(this._blocks[c],c,0,this._blocks[c].displayValue.length);r(this._blocks[a.index],a.index,0,a.offset)}}}remove(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);const r=super.remove(e,n);return this._forEachBlocksInRange(e,n,(i,a,o,s)=>{r.aggregate(i.remove(o,s))}),r}nearestInputPos(e,n){if(n===void 0&&(n=ke.NONE),!this._blocks.length)return 0;const r=new vce(this,e);if(n===ke.NONE)return r.pushRightBeforeInput()||(r.popState(),r.pushLeftBeforeInput())?r.pos:this.displayValue.length;if(n===ke.LEFT||n===ke.FORCE_LEFT){if(n===ke.LEFT){if(r.pushRightBeforeFilled(),r.ok&&r.pos===e)return e;r.popState()}if(r.pushLeftBeforeInput(),r.pushLeftBeforeRequired(),r.pushLeftBeforeFilled(),n===ke.LEFT){if(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.ok&&r.pos<=e||(r.popState(),r.ok&&r.pos<=e))return r.pos;r.popState()}return r.ok?r.pos:n===ke.FORCE_LEFT?0:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:0)}return n===ke.RIGHT||n===ke.FORCE_RIGHT?(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.pushRightBeforeFilled()?r.pos:n===ke.FORCE_RIGHT?this.displayValue.length:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:this.nearestInputPos(e,ke.LEFT))):e}totalInputPositions(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);let r=0;return this._forEachBlocksInRange(e,n,(i,a,o,s)=>{r+=i.totalInputPositions(o,s)}),r}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const n=this._maskedBlocks[e];return n?n.map(r=>this._blocks[r]):[]}}En.DEFAULTS={lazy:!0,placeholderChar:"_"},En.STOP_CHAR="`",En.ESCAPE_CHAR="\\",En.InputDefinition=Ac,En.FixedDefinition=_x,qe.MaskedPattern=En;class xc extends En{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:n=this.to||0,from:r=this.from||0,maxLength:i=this.maxLength||0,autofix:a=this.autofix,...o}=e;this.to=n,this.from=r,this.maxLength=Math.max(String(n).length,i),this.autofix=a;const s=String(this.from).padStart(this.maxLength,"0"),l=String(this.to).padStart(this.maxLength,"0");let c=0;for(;c<l.length&&l[c]===s[c];)++c;o.mask=l.slice(0,c).replace(/0/g,"\\0")+"0".repeat(this.maxLength-c),super._update(o)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let n="",r="";const[,i,a]=e.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(n="0".repeat(i.length)+a,r="9".repeat(i.length)+a),n=n.padEnd(this.maxLength,"0"),r=r.padEnd(this.maxLength,"9"),[n,r]}doPrepareChar(e,n){n===void 0&&(n={});let r;if([e,r]=super.doPrepareChar(e.replace(/\D/g,""),n),!this.autofix||!e)return[e,r];const i=String(this.from).padStart(this.maxLength,"0"),a=String(this.to).padStart(this.maxLength,"0"),o=this.value+e;if(o.length>this.maxLength)return["",r];const[s,l]=this.boundaries(o);return Number(l)<this.from?[i[o.length-1],r]:Number(s)>this.to?this.autofix==="pad"&&o.length<this.maxLength?["",r.aggregate(this.append(i[o.length-1]+e,n))]:[a[o.length-1],r]:[e,r]}doValidate(e){const n=this.value;if(n.search(/[^0]/)===-1&&n.length<=this._matchFrom)return!0;const[i,a]=this.boundaries(n);return this.from<=Number(a)&&Number(i)<=this.to&&super.doValidate(e)}}qe.MaskedRange=xc;class fi extends En{constructor(e){const{mask:n,pattern:r,...i}={...fi.DEFAULTS,...e};super({...i,mask:Dr(n)?n:r})}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:n,pattern:r,blocks:i,...a}={...fi.DEFAULTS,...e},o=Object.assign({},fi.GET_DEFAULT_BLOCKS());e.min&&(o.Y.from=e.min.getFullYear()),e.max&&(o.Y.to=e.max.getFullYear()),e.min&&e.max&&o.Y.from===o.Y.to&&(o.m.from=e.min.getMonth()+1,o.m.to=e.max.getMonth()+1,o.m.from===o.m.to&&(o.d.from=e.min.getDate(),o.d.to=e.max.getDate())),Object.assign(o,this.blocks,i),Object.keys(o).forEach(s=>{const l=o[s];!("autofix"in l)&&"autofix"in e&&(l.autofix=e.autofix)}),super._update({...a,mask:Dr(n)?n:r,blocks:o})}doValidate(e){const n=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&n!=null&&(this.min==null||this.min<=n)&&(this.max==null||n<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}}fi.GET_DEFAULT_BLOCKS=()=>({d:{mask:xc,from:1,to:31,maxLength:2},m:{mask:xc,from:1,to:12,maxLength:2},Y:{mask:xc,from:1900,to:9999}}),fi.DEFAULTS={mask:Date,pattern:"d{.}`m{.}`Y",format:(t,e)=>{if(!t)return"";const n=String(t.getDate()).padStart(2,"0"),r=String(t.getMonth()+1).padStart(2,"0"),i=t.getFullYear();return[n,r,i].join(".")},parse:(t,e)=>{const[n,r,i]=t.split(".").map(Number);return new Date(i,r-1,n)}},qe.MaskedDate=fi;class ts extends hn{constructor(e){super({...ts.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(n=>{const{expose:r,...i}=Nc(n),a=ui({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...i});return r&&(this.exposeMask=a),a}):[])}_appendCharRaw(e,n){n===void 0&&(n={});const r=this._applyDispatch(e,n);return this.currentMask&&r.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(n))),r}_applyDispatch(e,n,r){e===void 0&&(e=""),n===void 0&&(n={}),r===void 0&&(r="");const i=n.tail&&n._beforeTailState!=null?n._beforeTailState._value:this.value,a=this.rawInputValue,o=n.tail&&n._beforeTailState!=null?n._beforeTailState._rawInputValue:a,s=a.slice(o.length),l=this.currentMask,c=new gt,u=l==null?void 0:l.state;if(this.currentMask=this.doDispatch(e,{...n},r),this.currentMask)if(this.currentMask!==l){if(this.currentMask.reset(),o){const d=this.currentMask.append(o,{raw:!0});c.tailShift=d.inserted.length-i.length}s&&(c.tailShift+=this.currentMask.append(s,{raw:!0,tail:!0}).tailShift)}else u&&(this.currentMask.state=u);return c}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const n=new gt;return e&&n.aggregate(this._applyDispatch("",{},e)),n.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var n,r;return{...e,_beforeTailState:((n=e._beforeTailState)==null?void 0:n.currentMaskRef)===this.currentMask&&((r=e._beforeTailState)==null?void 0:r.currentMask)||e._beforeTailState}}doDispatch(e,n,r){return n===void 0&&(n={}),r===void 0&&(r=""),this.dispatch(e,this,n,r)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,n){n===void 0&&(n={});let[r,i]=super.doPrepare(e,n);if(this.currentMask){let a;[r,a]=super.doPrepare(r,this.currentMaskFlags(n)),i=i.aggregate(a)}return[r,i]}doPrepareChar(e,n){n===void 0&&(n={});let[r,i]=super.doPrepareChar(e,n);if(this.currentMask){let a;[r,a]=super.doPrepareChar(r,this.currentMaskFlags(n)),i=i.aggregate(a)}return[r,i]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(n=>n.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let n=String(e);this.currentMask&&(this.currentMask.typedValue=e,n=this.currentMask.unmaskedValue),this.unmaskedValue=n}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,n){const r=new gt;return this.currentMask&&r.aggregate(this.currentMask.remove(e,n)).aggregate(this._applyDispatch()),r}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(n=>n.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:n,currentMaskRef:r,currentMask:i,...a}=e;n&&this.compiledMasks.forEach((o,s)=>o.state=n[s]),r!=null&&(this.currentMask=r,this.currentMask.state=i),super.state=a}extractInput(e,n,r){return this.currentMask?this.currentMask.extractInput(e,n,r):""}extractTail(e,n){return this.currentMask?this.currentMask.extractTail(e,n):super.extractTail(e,n)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,n){return this.currentMask?this.currentMask.nearestInputPos(e,n):super.nearestInputPos(e,n)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((n,r)=>{if(!e[r])return;const{mask:i,...a}=e[r];return Rc(n,a)&&n.maskEquals(i)}):super.maskEquals(e)}typedValueEquals(e){var n;return!!((n=this.currentMask)!=null&&n.typedValueEquals(e))}}ts.DEFAULTS=void 0,ts.DEFAULTS={dispatch:(t,e,n,r)=>{if(!e.compiledMasks.length)return;const i=e.rawInputValue,a=e.compiledMasks.map((o,s)=>{const l=e.currentMask===o,c=l?o.displayValue.length:o.nearestInputPos(o.displayValue.length,ke.FORCE_LEFT);return o.rawInputValue!==i?(o.reset(),o.append(i,{raw:!0})):l||o.remove(c),o.append(t,e.currentMaskFlags(n)),o.appendTail(r),{index:s,weight:o.rawInputValue.length,totalInputPositions:o.totalInputPositions(0,Math.max(c,o.nearestInputPos(o.displayValue.length,ke.FORCE_LEFT)))}});return a.sort((o,s)=>s.weight-o.weight||s.totalInputPositions-o.totalInputPositions),e.compiledMasks[a[0].index]}},qe.MaskedDynamic=ts;class Sce extends En{constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:n,...r}=e;if(n){const i=n.map(s=>s.length),a=Math.min(...i),o=Math.max(...i)-a;r.mask="*".repeat(a),o&&(r.mask+="["+"*".repeat(o)+"]"),this.enum=n}super._update(r)}doValidate(e){return this.enum.some(n=>n.indexOf(this.unmaskedValue)===0)&&super.doValidate(e)}}qe.MaskedEnum=Sce;class yce extends hn{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}qe.MaskedFunction=yce;class Tn extends hn{constructor(e){super({...Tn.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),n="\\d*",r=(this.scale?"("+vh(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+n+r),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(vh).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(vh(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const n=e.split(this.radix);return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),n.join(this.radix)}doPrepareChar(e,n){n===void 0&&(n={});const[r,i]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(n.input&&n.raw||!n.input&&!n.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),n);return e&&!r&&(i.skip=!0),r&&!this.allowPositive&&!this.value&&r!=="-"&&i.aggregate(this._appendChar("-")),[r,i]}_separatorsCount(e,n){n===void 0&&(n=!1);let r=0;for(let i=0;i<e;++i)this._value.indexOf(this.thousandsSeparator,i)===i&&(++r,n&&(e+=this.thousandsSeparator.length));return r}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),[e,n]=this._adjustRangeWithSeparators(e,n),this._removeThousandsSeparators(super.extractInput(e,n,r))}_appendCharRaw(e,n){if(n===void 0&&(n={}),!this.thousandsSeparator)return super._appendCharRaw(e,n);const r=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,i=this._separatorsCountFromSlice(r);this._value=this._removeThousandsSeparators(this.value);const a=super._appendCharRaw(e,n);this._value=this._insertThousandsSeparators(this._value);const o=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,s=this._separatorsCountFromSlice(o);return a.tailShift+=(s-i)*this.thousandsSeparator.length,a.skip=!a.rawInserted&&e===this.thousandsSeparator,a}_findSeparatorAround(e){if(this.thousandsSeparator){const n=e-this.thousandsSeparator.length+1,r=this.value.indexOf(this.thousandsSeparator,n);if(r<=e)return r}return-1}_adjustRangeWithSeparators(e,n){const r=this._findSeparatorAround(e);r>=0&&(e=r);const i=this._findSeparatorAround(n);return i>=0&&(n=i+this.thousandsSeparator.length),[e,n]}remove(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),[e,n]=this._adjustRangeWithSeparators(e,n);const r=this.value.slice(0,e),i=this.value.slice(n),a=this._separatorsCount(r.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(r+i));const o=this._separatorsCountFromSlice(r);return new gt({tailShift:(o-a)*this.thousandsSeparator.length})}nearestInputPos(e,n){if(!this.thousandsSeparator)return e;switch(n){case ke.NONE:case ke.LEFT:case ke.FORCE_LEFT:{const r=this._findSeparatorAround(e-1);if(r>=0){const i=r+this.thousandsSeparator.length;if(e<i||this.value.length<=i||n===ke.FORCE_LEFT)return r}break}case ke.RIGHT:case ke.FORCE_RIGHT:{const r=this._findSeparatorAround(e);if(r>=0)return r+this.thousandsSeparator.length}}return e}doValidate(e){let n=!!this._removeThousandsSeparators(this.value).match(this._numberRegExp);if(n){const r=this.number;n=n&&!isNaN(r)&&(this.min==null||this.min>=0||this.min<=this.number)&&(this.max==null||this.max<=0||this.number<=this.max)}return n&&super.doValidate(e)}doCommit(){if(this.value){const e=this.number;let n=e;this.min!=null&&(n=Math.max(n,this.min)),this.max!=null&&(n=Math.min(n,this.max)),n!==e&&(this.unmaskedValue=this.format(n,this));let r=this.value;this.normalizeZeros&&(r=this._normalizeZeros(r)),this.padFractionalZeros&&this.scale>0&&(r=this._padFractionalZeros(r)),this._value=r}super.doCommit()}_normalizeZeros(e){const n=this._removeThousandsSeparators(e).split(this.radix);return n[0]=n[0].replace(/^(\D*)(0*)(\d*)/,(r,i,a,o)=>i+o),e.length&&!/\d$/.test(n[0])&&(n[0]=n[0]+"0"),n.length>1&&(n[1]=n[1].replace(/0*$/,""),n[1].length||(n.length=1)),this._insertThousandsSeparators(n.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const n=e.split(this.radix);return n.length<2&&n.push(""),n[1]=n[1].padEnd(this.scale,"0"),n.join(this.radix)}doSkipInvalid(e,n,r){n===void 0&&(n={});const i=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===Tn.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,n,r)&&!i}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Tn.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(Tn.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||Tn.EMPTY_VALUES.includes(e)&&Tn.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}Tn.UNMASKED_RADIX=".",Tn.EMPTY_VALUES=[...hn.EMPTY_VALUES,0],Tn.DEFAULTS={mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Tn.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:t=>t.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},qe.MaskedNumber=Tn;const Sh={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function mx(t,e,n){e===void 0&&(e=Sh.MASKED),n===void 0&&(n=Sh.MASKED);const r=ui(t);return i=>r.runIsolated(a=>(a[e]=i,a[n]))}function Tce(t,e,n,r){return mx(e,n,r)(t)}qe.PIPE_TYPE=Sh,qe.createPipe=mx,qe.pipe=Tce;try{globalThis.IMask=qe}catch{}const gx={mask:te.oneOfType([te.array,te.func,te.string,te.instanceOf(RegExp),te.oneOf([Date,Number,qe.Masked]),te.instanceOf(qe.Masked)]),value:te.any,unmask:te.oneOfType([te.bool,te.oneOf(["typed"])]),prepare:te.func,prepareChar:te.func,validate:te.func,commit:te.func,overwrite:te.oneOfType([te.bool,te.oneOf(["shift"])]),eager:te.oneOfType([te.bool,te.oneOf(["append","remove"])]),skipInvalid:te.bool,onAccept:te.func,onComplete:te.func,placeholderChar:te.string,displayChar:te.string,lazy:te.bool,definitions:te.object,blocks:te.object,enum:te.arrayOf(te.string),maxLength:te.number,from:te.number,to:te.number,pattern:te.string,format:te.func,parse:te.func,autofix:te.oneOfType([te.bool,te.oneOf(["pad"])]),radix:te.string,thousandsSeparator:te.string,mapToRadix:te.arrayOf(te.string),scale:te.number,normalizeZeros:te.bool,padFractionalZeros:te.bool,min:te.oneOfType([te.number,te.instanceOf(Date)]),max:te.oneOfType([te.number,te.instanceOf(Date)]),dispatch:te.func,inputRef:te.oneOfType([te.func,te.shape({current:te.object})])},hx=Object.keys(gx).filter(t=>t!=="value"),Cce=["value","unmask","onAccept","onComplete","inputRef"],Oce=hx.filter(t=>Cce.indexOf(t)<0);function Rce(t){var e;const n=(e=class extends O.Component{constructor(a){super(a),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const a=this.props,o=this._extractMaskOptionsFromProps(a);if(o.mask)this.maskRef?(this.maskRef.updateOptions(o),"value"in a&&a.value!==void 0&&(this.maskValue=a.value)):this.initMask(o);else if(this.destroyMask(),"value"in a&&a.value!==void 0){var s;(s=this.element)!=null&&s.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=a.value:this.element.value=a.value}}componentWillUnmount(){this.destroyMask()}_inputRef(a){this.element=a,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=a:this.props.inputRef(a))}initMask(a){a===void 0&&(a=this._extractMaskOptionsFromProps(this.props)),this.maskRef=qe(this.element,a).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&this.props.value!==void 0&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(a){const{...o}=a;return Object.keys(o).filter(s=>Oce.indexOf(s)<0).forEach(s=>{delete o[s]}),o}_extractNonMaskProps(a){const{...o}=a;return hx.forEach(s=>{delete o[s]}),"defaultValue"in o||(o.defaultValue=a.mask?"":o.value),delete o.value,o}get maskValue(){return this.maskRef?this.props.unmask==="typed"?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(a){this.maskRef&&(a=a==null&&this.props.unmask!=="typed"?"":a,this.props.unmask==="typed"?this.maskRef.typedValue=a:this.props.unmask?this.maskRef.unmaskedValue=a:this.maskRef.value=a)}_onAccept(a){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,a)}_onComplete(a){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,a)}render(){return O.createElement(t,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}},e.displayName=void 0,e.propTypes=void 0,e),r=t.displayName||t.name||"Component";return n.displayName="IMask("+r+")",n.propTypes=gx,O.forwardRef((i,a)=>O.createElement(n,{...i,ref:a}))}const Nce=Rce(t=>{let{inputRef:e,...n}=t;return O.createElement("input",{...n,ref:e})}),Ace=(t,e)=>O.createElement(Nce,{...t,ref:e});O.forwardRef(Ace);function xce(t,e){let{onAccept:n,onComplete:r}=e===void 0?{}:e;const i=O.useRef(null),a=O.useRef(null),[o,s]=O.useState(!1),[l,c]=O.useState({}),[u,d]=O.useState(""),[p,f]=O.useState(""),[m,_]=O.useState(),g=O.useCallback(()=>{var b;o&&((b=a.current)==null||b.destroy(),a.current=null)},[]),h=O.useCallback(b=>{const v=a.current;v&&(c({value:v.value,unmaskedValue:v.unmaskedValue,typedValue:v.typedValue}),_(v.typedValue),f(v.unmaskedValue),d(v.value),n==null||n(v.value,v,b))},[n]),E=O.useCallback(()=>a.current&&(r==null?void 0:r(a.current.value,a.current)),[r]);return O.useEffect(()=>{const b=i.current;if(!b||!(t!=null&&t.mask))return g();const v=a.current;v?v==null||v.updateOptions(t):b&&t!=null&&t.mask&&(a.current=qe(b,t),h()),s(!!a.current)},[t,g,h]),O.useEffect(()=>{if(!a.current)return;const b=a.current;return b.on("accept",h),b.on("complete",E),()=>{b.off("accept",h),b.off("complete",E)}},[h,E]),O.useEffect(()=>{const{value:b,...v}=l,S=a.current;S&&o&&(b!==u&&(S.value=u),c(v))},[u]),O.useEffect(()=>{const{unmaskedValue:b,...v}=l,S=a.current;S&&o&&(b!==p&&(S.unmaskedValue=p),c(v))},[p]),O.useEffect(()=>{const{typedValue:b,...v}=l,S=a.current;S&&o&&(b!==m&&(S.typedValue=m),c(v))},[m]),O.useEffect(()=>g,[g]),{ref:i,maskRef:a,value:u,setValue:d,unmaskedValue:p,setUnmaskedValue:f,typedValue:m,setTypedValue:_}}const yh=O.forwardRef(({name:t,value:e,mask:n,onChange:r,...i},a)=>{const{ref:o,unmaskedValue:s,value:l,maskRef:c}=xce({mask:n});return O.useEffect(()=>{c.current.value=e||""},[c,e]),O.useEffect(()=>{r({target:{name:t,value:s||e||""}})},[t,s,e]),N.jsx(Q.TextField,{inputRef:a,inputProps:{ref:o},name:t,value:l,onChange:()=>r({target:{name:t,value:s}}),...i})});yh.displayName="MaskedInput";function Ice(t){let e;switch(t){case"top-left":e={style:{ml:-.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"top-center":e={style:{},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}};break;case"top-right":e={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"bottom-left":e={style:{ml:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"bottom-center":e={style:{},anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}};break;case"bottom-right":e={style:{ml:.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;case"left-top":e={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"left-center":e={anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}};break;case"left-bottom":e={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"right-top":e={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"right-center":e={anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}};break;case"right-bottom":e={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;default:e={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}}}return e}const wce=qt("span")(({arrow:t,theme:e})=>{const i=`solid 1px ${be(e.palette.grey[500],.12)}`,a={borderRadius:"0 0 3px 0",top:-6,borderBottom:i,borderRight:i},o={borderRadius:"3px 0 0 0",bottom:-6,borderTop:i,borderLeft:i},s={borderRadius:"0 3px 0 0",left:-6,borderTop:i,borderRight:i},l={borderRadius:"0 0 0 3px",right:-6,borderBottom:i,borderLeft:i};return{display:"none",[e.breakpoints.up("sm")]:{zIndex:1,width:12,height:12,content:'""',display:"block",position:"absolute",transform:"rotate(-135deg)",background:e.palette.background.paper},...t==="top-left"&&{...a,left:20},...t==="top-center"&&{...a,left:0,right:0,margin:"auto"},...t==="top-right"&&{...a,right:20},...t==="bottom-left"&&{...o,left:20},...t==="bottom-center"&&{...o,left:0,right:0,margin:"auto"},...t==="bottom-right"&&{...o,right:20},...t==="left-top"&&{...s,top:20},...t==="left-center"&&{...s,top:0,bottom:0,margin:"auto"},...t==="left-bottom"&&{...s,bottom:20},...t==="right-top"&&{...l,top:20},...t==="right-center"&&{...l,top:0,bottom:0,margin:"auto"},...t==="right-bottom"&&{...l,bottom:20}}}),Dce=({open:t,children:e,arrow:n="top-right",disabledArrow:r,sx:i,...a})=>{const{style:o,anchorOrigin:s,transformOrigin:l}=Ice(n);return N.jsxs(Q.Popover,{open:!!t,anchorEl:t,anchorOrigin:s,transformOrigin:l,PaperProps:{sx:{p:1,width:"auto",overflow:"inherit",...o,"& .MuiMenuItem-root":{px:1,typography:"body2",borderRadius:.75,"& svg":{mr:2,width:20,height:20,flexShrink:0}},...i}},...a,children:[!r&&N.jsx(wce,{arrow:n}),e]})},Mce=Q.styled(Q.Stack)(({theme:t})=>({flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderBottom:`1px solid ${t.palette.grey[300]}`,button:{marginRight:24}})),Lce=Q.styled(Q.DialogContent)({padding:"24px !important"}),Pce=Q.styled(Q.DialogActions)(({theme:t})=>({borderTop:`1px solid ${t.palette.grey[300]}`,backgroundColor:t.palette.grey[50]})),Ex=({children:t,actionsProps:e})=>N.jsx(Pce,{sx:{borderTop:"1px solid",borderColor:"grey.300",backgroundColor:"grey.50"},...e,children:t}),kce=({actions:t,actionsProps:e,children:n,dialogContentProps:r,dialogTitle:i,dialogTitleProps:a,onClose:o,...s})=>N.jsxs(Q.Dialog,{scroll:"body",...s,onClose:o,children:[N.jsxs(Mce,{children:[i&&N.jsx(Q.DialogTitle,{variant:"subtitle1",...a,children:i}),N.jsx(Q.IconButton,{onClick:o,children:N.jsx(Ot,{icon:"ic:round-close"})})]}),N.jsx(Lce,{...r,children:n}),t&&N.jsx(Ex,{actionsProps:e,children:t})]}),Fce=({children:t,container:e,waitBeforeShow:n=50})=>{const[r,i]=O.useState(!1);return O.useEffect(()=>{const a=setTimeout(()=>i(!0),n);return()=>clearTimeout(a)},[n]),r?is.createPortal(t,document.getElementById(e)||document.body):null},Bce=({onSearch:t,onChange:e,trigger:n="click",iconPosition:r="end",...i})=>{const a=O.useRef(null),o=N.jsx(Q.InputAdornment,{position:r,children:N.jsx(Q.IconButton,{color:"inherit",onClick:()=>{var s;t((s=a.current)==null?void 0:s.value)},children:N.jsx(Ot,{icon:"eva:search-fill",sx:{width:20,height:20}})})});return N.jsx(Q.TextField,{inputRef:a,InputProps:{onKeyDown:s=>{var l;s.key==="Enter"&&t((l=a.current)==null?void 0:l.value)},...r==="start"?{startAdornment:o}:{endAdornment:o}},onChange:s=>{if(n==="change"){t(s.target.value);return}s.target.value===""&&t(""),e&&e(s)},...i})},Uce=Q.styled(Q.StepConnector)(({theme:t})=>({top:10,left:"calc(-50% + 20px)",right:"calc(50% + 20px)","& .MuiStepConnector-line":{borderTopWidth:2,borderColor:t.palette.divider},"&.Mui-active, &.Mui-completed":{"& .MuiStepConnector-line":{borderColor:t.palette.primary.main}}})),Gce=({active:t,completed:e})=>N.jsx(Q.Stack,{alignItems:"center",justifyContent:"center",sx:{width:24,height:24,color:"text.disabled",...t&&{color:"primary.main"}},children:e?N.jsx(Ot,{icon:"eva:checkmark-fill",sx:{color:"primary.main"}}):N.jsx(Q.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:"currentColor"}})}),$ce=({steps:t,activeStep:e,showLabels:n=!0,sx:r,...i})=>N.jsx(Q.Stepper,{alternativeLabel:!0,activeStep:e,connector:N.jsx(Uce,{}),sx:r,...i,children:t.map(a=>N.jsx(Q.Step,{children:N.jsx(Q.StepLabel,{StepIconComponent:Gce,sx:{"& .MuiStepLabel-label":{typography:"subtitle2"}},children:n&&a})},a))}),qce=({children:t,value:e,index:n,sx:r})=>N.jsx(Q.Box,{role:"tabpanel",id:`simple-tabpanel-${n}`,"aria-labelledby":`simple-tab-${n}`,sx:{mt:3,...e.toString()!==n.toString()&&{position:"absolute",width:"100%",height:0,overflow:"hidden",visibility:"hidden"},...r},children:t}),Yce=({name:t,helperText:e,rules:n,...r})=>{const{control:i}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:i,rules:n,render:({field:a,fieldState:{error:o}})=>N.jsx($d,{...a,...r,onChange:s=>a.onChange(s),error:!!o,helperText:(o==null?void 0:o.message)||e})})},Vce=({name:t,helperText:e,...n})=>{const{control:r}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:r,render:({field:i,fieldState:{error:a}})=>N.jsxs("div",{children:[N.jsx(Q.FormControlLabel,{control:N.jsx(Q.Checkbox,{...i,checked:i.value}),...n}),(!!a||e)&&N.jsx(Q.FormHelperText,{error:!!a,children:a?a==null?void 0:a.message:e})]})})},Hce=({row:t,name:e,label:n,options:r,spacing:i,helperText:a,...o})=>{const{control:s}=rt.useFormContext(),l=(c,u)=>c.includes(u)?c.filter(d=>d!==u):[...c,u];return N.jsx(rt.Controller,{name:e,control:s,render:({field:c,fieldState:{error:u}})=>N.jsxs(Q.FormControl,{component:"fieldset",children:[n&&N.jsx(Q.FormLabel,{component:"legend",sx:{typography:"body2"},children:n}),N.jsx(Q.FormGroup,{sx:{...t&&{flexDirection:"row"},"& .MuiFormControlLabel-root":{"&:not(:last-of-type)":{mb:i||0},...t&&{mr:0,"&:not(:last-of-type)":{mr:i||2}}}},children:r.map(d=>N.jsx(Q.FormControlLabel,{control:N.jsx(Q.Checkbox,{checked:c.value.includes(d.value),onChange:()=>c.onChange(l(c.value,d.value))}),label:d.label,...o},d.value))}),(!!u||a)&&N.jsx(Q.FormHelperText,{error:!!u,sx:{mx:0},children:u?u==null?void 0:u.message:a})]})})},zce=typeof window<"u"?O.useLayoutEffect:O.useEffect;function vx(t,e,n,r){const i=O.useRef(e);zce(()=>{i.current=e},[e]),O.useEffect(()=>{const a=(n==null?void 0:n.current)||window;if(!(a&&a.addEventListener))return;const o=s=>i.current(s);return a.addEventListener(t,o,r),()=>{a.removeEventListener(t,o)}},[t,n,r])}const Wce=({keyName:t,inputs:e=[],rules:n,...r})=>{const i=O.useRef(null),{control:a,setValue:o,formState:{errors:s}}=rt.useFormContext(),l=d=>{const p=d.clipboardData.getData("text").split("");e.map((f,m)=>o(f,p[m])),d.preventDefault()},c=(d,p)=>{const{maxLength:f,value:m,name:_}=d.target,g=_.replace(t,""),h=Number(g),E=document.querySelector(`input[name=${t}${h+1}]`);m.length>f&&(d.target.value=m[0]),m.length>=f&&h<6&&E!==null&&E.focus(),p(d)};vx("paste",l,i);const u=e.some(d=>s[d]);return N.jsxs(Q.Stack,{children:[N.jsx(Q.Stack,{direction:"row",spacing:2,justifyContent:"center",ref:i,children:e.map((d,p)=>N.jsx(rt.Controller,{name:`${t}${p+1}`,control:a,rules:n,render:({field:f,fieldState:{error:m}})=>N.jsx(Q.TextField,{...r,...f,autoComplete:"none",error:!!m,autoFocus:p===0,placeholder:"-",onChange:_=>{c(_,f.onChange)},onFocus:_=>_.currentTarget.select(),InputProps:{sx:{width:{xs:36,sm:56},height:{xs:36,sm:56},"& input":{p:0,textAlign:"center"}}},inputProps:{maxLength:1,type:"number"}})},d))}),u&&N.jsx(Q.FormHelperText,{error:!0,sx:{px:2},children:"Código é obrigatório"})]})},jce=({name:t,rules:e,helperText:n,...r})=>{const{control:i}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:i,rules:e,render:({field:{ref:a,onChange:o,...s},fieldState:{error:l}})=>N.jsx(OC,{...s,onChangeColor:o,inputRef:a,fullWidth:!0,error:!!l,helperText:(l==null?void 0:l.message)||n,...r})})},Kce=({name:t,rules:e,...n})=>{const{control:r}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:r,rules:e,render:({field:{ref:i,...a},fieldState:{error:o}})=>{var s;return N.jsx(ka.DatePicker,{inputRef:i,format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...n.localeText},...a,...n,value:a.value?new Date(a.value):null,slotProps:{textField:{...(s=n.slotProps)==null?void 0:s.textField,error:!!o,helperText:o==null?void 0:o.message,autoComplete:"off",spellCheck:"false",fullWidth:!0}}})}})},Qce=({name:t,label:e,rules:n,...r})=>{const{control:i,setError:a}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:i,rules:n,render:({field:{value:o,onChange:s},fieldState:{error:l}})=>N.jsx(ka.DateRangePicker,{format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...r.localeText},value:[(o==null?void 0:o.startDate)||null,(o==null?void 0:o.endDate)||null],onChange:c=>s({startDate:c[0],endDate:c[1]}),onError:c=>{a(t,{message:c[0]||c[1]||void 0})},...r,slotProps:{textField:({position:c})=>{var u;return{...(u=r.slotProps)==null?void 0:u.textField,error:!!l,helperText:l==null?void 0:l.message,autoComplete:"off",spellCheck:"false",fullWidth:!0,label:c==="start"?`${e} (Dt. Início)`:`${e} (Dt. Fim)`}}},sx:{width:1}})})},Xce=({name:t,rules:e,...n})=>{const{control:r}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:r,rules:e,render:({field:{ref:i,...a},fieldState:{error:o}})=>{var s;return N.jsx(ka.DateTimePicker,{format:"dd/MM/yyyy HH:mm",inputRef:i,localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...n.localeText},...a,...n,value:a.value?new Date(a.value):null,slotProps:{textField:{...(s=n.slotProps)==null?void 0:s.textField,error:!!o,helperText:o==null?void 0:o.message,autoComplete:"off",spellCheck:"false",fullWidth:!0}}})}})},Zce=({name:t,helperText:e,rules:n,...r})=>{const{control:i}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:i,rules:n,render:({field:{name:a,onBlur:o,onChange:s,value:l},fieldState:{error:c}})=>N.jsx(wA,{id:`quill${a}`,onBlur:o,onChange:(u,d,p,f)=>s(f.getLength()===1?"":u),value:l,error:!!c,helperText:(c==null?void 0:c.message)||e,...r})})},bx=({name:t,helperText:e,rules:n,...r})=>{const{control:i}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:i,rules:n,render:({field:{ref:a,...o},fieldState:{error:s}})=>N.jsx(Q.TextField,{...o,inputRef:a,fullWidth:!0,error:!!s,helperText:(s==null?void 0:s.message)||e,...r})})},Jce=({id:t,children:e,onSubmit:n,methods:r})=>N.jsx(rt.FormProvider,{...r,children:N.jsx(Q.Stack,{component:"form",id:t,onSubmit:n,flex:1,width:1,noValidate:!0,children:e})}),eue=({name:t,helperText:e,rules:n,...r})=>{const{control:i}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:i,rules:n,render:({field:{name:a,onChange:o,value:s,ref:l},fieldState:{error:c}})=>N.jsx(yh,{ref:l,...r,name:a,value:s,error:!!c,helperText:(c==null?void 0:c.message)||e,onChange:({target:{value:u}})=>o(u)})})},tue=t=>{const[e,n]=O.useState(!1);return N.jsx(bx,{...t,type:e?"text":"password",InputProps:{endAdornment:N.jsx(Q.InputAdornment,{position:"end",children:N.jsx(Q.IconButton,{onClick:()=>n(!e),edge:"end","aria-label":"Mostrar/Ocultar senha",children:N.jsx(Ot,{icon:e?"eva:eye-off-fill":"eva:eye-fill"})})})}})},nue=({name:t,rules:e,row:n,label:r,options:i,spacing:a,helperText:o,decorated:s,onChange:l,...c})=>{const{control:u}=rt.useFormContext(),d=r?`${t}-${r}`:"";return N.jsx(rt.Controller,{name:t,control:u,rules:e,render:({field:p,fieldState:{error:f}})=>N.jsxs(Q.FormControl,{component:"fieldset",sx:{...s&&{paddingLeft:1.5}},children:[r&&N.jsx(Q.FormLabel,{component:"legend",id:d,sx:{typography:"body2"},children:r}),N.jsx(Q.RadioGroup,{...p,onChange:(m,_)=>{p.onChange(m),l&&l(m,_)},"aria-labelledby":d,row:n,...c,children:i.map(m=>N.jsx(Q.FormControlLabel,{value:m.value,control:N.jsx(Q.Radio,{}),label:m.label,sx:({palette:_})=>({"&:not(:last-of-type)":{mb:a||0},...n&&{mr:0,"&:not(:last-of-type)":{mr:a||2}},...s&&{border:`1px solid ${Q.alpha(_.grey[500],.32)}`,borderRadius:1,padding:.25,paddingRight:(a||0)/2||1,...p.value===m.value&&{borderColor:"primary.main",backgroundColor:Q.alpha(_.primary.main,.05)}}})},m.value))}),(!!f||o)&&N.jsx(Q.FormHelperText,{error:!!f,sx:{mx:0},children:f?f==null?void 0:f.message:o})]})})},rue=({name:t,helperText:e,onChange:n,...r})=>{const{control:i}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:i,render:({field:a,fieldState:{error:o}})=>N.jsxs("div",{children:[N.jsx(Q.FormControlLabel,{control:N.jsx(Q.Switch,{...a,checked:a.value,onChange:(s,l)=>{a.onChange(s),n&&n(s,l)}}),...r}),(!!o||e)&&N.jsx(Q.FormHelperText,{error:!!o,children:o?o==null?void 0:o.message:e})]})})},iue=({name:t,rules:e,...n})=>{const{control:r}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:r,rules:e,render:({field:{ref:i,...a},fieldState:{error:o}})=>{var s;return N.jsx(ka.TimePicker,{ampm:!1,format:"HH:mm",inputRef:i,localeText:{fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...n.localeText},...a,...n,value:a.value?new Date(a.value):null,slotProps:{textField:{...(s=n.slotProps)==null?void 0:s.textField,error:!!o,helperText:o==null?void 0:o.message,autoComplete:"off",spellCheck:"false",fullWidth:!0}}})}})},aue=t=>new Promise((e,n)=>{const r=new Image;r.addEventListener("load",()=>e(r)),r.addEventListener("error",i=>n(i)),r.setAttribute("crossOrigin","anonymous"),r.src=t});function Sx(t){return t*Math.PI/180}function oue(t,e,n){const r=Sx(n);return{width:Math.abs(Math.cos(r)*t)+Math.abs(Math.sin(r)*e),height:Math.abs(Math.sin(r)*t)+Math.abs(Math.cos(r)*e)}}async function sue(t,e,n=0,r={horizontal:!1,vertical:!1}){const i=await aue(t),a=document.createElement("canvas"),o=a.getContext("2d");if(!o)return null;const s=Sx(n),{width:l,height:c}=oue(i.width,i.height,n);a.width=l,a.height=c,o.translate(l/2,c/2),o.rotate(s),o.scale(r.horizontal?-1:1,r.vertical?-1:1),o.translate(-i.width/2,-i.height/2),o.drawImage(i,0,0);const u=o.getImageData(e.x,e.y,e.width,e.height);return a.width=e.width,a.height=e.height,o.putImageData(u,0,0),new Promise((d,p)=>{a.toBlob(f=>{d(f)},"image/png")})}function Da(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(d){o(d)}}function l(u){try{c(r.throw(u))}catch(d){o(d)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(t,e||[])).next())})}function Ma(t,e){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(a=c[0]&2?i.return:c[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,c[1])).done)return a;switch(i=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){n.label=c[1];break}if(c[0]===6&&n.label<a[1]){n.label=a[1],a=c;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(c);break}a[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(u){c=[6,u],i=0}finally{r=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function yx(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,a=[],o;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function Tx(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,a;r<i;r++)(a||!(r in e))&&(a||(a=Array.prototype.slice.call(e,0,r)),a[r]=e[r]);return t.concat(a||Array.prototype.slice.call(e))}typeof SuppressedError=="function"&&SuppressedError;var lue=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function ns(t,e){var n=cue(t);if(typeof n.path!="string"){var r=t.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof e=="string"?e:typeof r=="string"&&r.length>0?r:t.name,writable:!1,configurable:!1,enumerable:!0})}return n}function cue(t){var e=t.name,n=e&&e.lastIndexOf(".")!==-1;if(n&&!t.type){var r=e.split(".").pop().toLowerCase(),i=lue.get(r);i&&Object.defineProperty(t,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return t}var uue=[".DS_Store","Thumbs.db"];function due(t){return Da(this,void 0,void 0,function(){return Ma(this,function(e){return Ic(t)&&pue(t.dataTransfer)?[2,gue(t.dataTransfer,t.type)]:fue(t)?[2,_ue(t)]:Array.isArray(t)&&t.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,mue(t)]:[2,[]]})})}function pue(t){return Ic(t)}function fue(t){return Ic(t)&&Ic(t.target)}function Ic(t){return typeof t=="object"&&t!==null}function _ue(t){return Th(t.target.files).map(function(e){return ns(e)})}function mue(t){return Da(this,void 0,void 0,function(){var e;return Ma(this,function(n){switch(n.label){case 0:return[4,Promise.all(t.map(function(r){return r.getFile()}))];case 1:return e=n.sent(),[2,e.map(function(r){return ns(r)})]}})})}function gue(t,e){return Da(this,void 0,void 0,function(){var n,r;return Ma(this,function(i){switch(i.label){case 0:return t.items?(n=Th(t.items).filter(function(a){return a.kind==="file"}),e!=="drop"?[2,n]:[4,Promise.all(n.map(hue))]):[3,2];case 1:return r=i.sent(),[2,Cx(Ox(r))];case 2:return[2,Cx(Th(t.files).map(function(a){return ns(a)}))]}})})}function Cx(t){return t.filter(function(e){return uue.indexOf(e.name)===-1})}function Th(t){if(t===null)return[];for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(r)}return e}function hue(t){if(typeof t.webkitGetAsEntry!="function")return Rx(t);var e=t.webkitGetAsEntry();return e&&e.isDirectory?Nx(e):Rx(t)}function Ox(t){return t.reduce(function(e,n){return Tx(Tx([],yx(e),!1),yx(Array.isArray(n)?Ox(n):[n]),!1)},[])}function Rx(t){var e=t.getAsFile();if(!e)return Promise.reject("".concat(t," is not a File"));var n=ns(e);return Promise.resolve(n)}function Eue(t){return Da(this,void 0,void 0,function(){return Ma(this,function(e){return[2,t.isDirectory?Nx(t):vue(t)]})})}function Nx(t){var e=t.createReader();return new Promise(function(n,r){var i=[];function a(){var o=this;e.readEntries(function(s){return Da(o,void 0,void 0,function(){var l,c,u;return Ma(this,function(d){switch(d.label){case 0:if(s.length)return[3,5];d.label=1;case 1:return d.trys.push([1,3,,4]),[4,Promise.all(i)];case 2:return l=d.sent(),n(l),[3,4];case 3:return c=d.sent(),r(c),[3,4];case 4:return[3,6];case 5:u=Promise.all(s.map(Eue)),i.push(u),a(),d.label=6;case 6:return[2]}})})},function(s){r(s)})}a()})}function vue(t){return Da(this,void 0,void 0,function(){return Ma(this,function(e){return[2,new Promise(function(n,r){t.file(function(i){var a=ns(i,t.fullPath);n(a)},function(i){r(i)})})]})})}var bue=function(t,e){if(t&&e){var n=Array.isArray(e)?e:e.split(","),r=t.name||"",i=(t.type||"").toLowerCase(),a=i.replace(/\/.*$/,"");return n.some(function(o){var s=o.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?a===s.replace(/\/.*$/,""):i===s})}return!0};function Ax(t){return Tue(t)||yue(t)||Dx(t)||Sue()}function Sue(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
305
305
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yue(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Tue(t){if(Array.isArray(t))return Ch(t)}function xx(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ix(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?xx(Object(n),!0).forEach(function(r){wx(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xx(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function wx(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function rs(t,e){return Rue(t)||Oue(t,e)||Dx(t,e)||Cue()}function Cue(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
306
306
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dx(t,e){if(t){if(typeof t=="string")return Ch(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ch(t,e)}}function Ch(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Oue(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(t);!(i=(o=n.next()).done)&&(r.push(o.value),!(e&&r.length===e));i=!0);}catch(l){a=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function Rue(t){if(Array.isArray(t))return t}var Nue="file-invalid-type",Aue="file-too-large",xue="file-too-small",Iue="too-many-files",wue=function(e){e=Array.isArray(e)&&e.length===1?e[0]:e;var n=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{code:Nue,message:"File type must be ".concat(n)}},Mx=function(e){return{code:Aue,message:"File is larger than ".concat(e," ").concat(e===1?"byte":"bytes")}},Lx=function(e){return{code:xue,message:"File is smaller than ".concat(e," ").concat(e===1?"byte":"bytes")}},Due={code:Iue,message:"Too many files"};function Px(t,e){var n=t.type==="application/x-moz-file"||bue(t,e);return[n,n?null:wue(e)]}function kx(t,e,n){if(_i(t.size))if(_i(e)&&_i(n)){if(t.size>n)return[!1,Mx(n)];if(t.size<e)return[!1,Lx(e)]}else{if(_i(e)&&t.size<e)return[!1,Lx(e)];if(_i(n)&&t.size>n)return[!1,Mx(n)]}return[!0,null]}function _i(t){return t!=null}function Mue(t){var e=t.files,n=t.accept,r=t.minSize,i=t.maxSize,a=t.multiple,o=t.maxFiles,s=t.validator;return!a&&e.length>1||a&&o>=1&&e.length>o?!1:e.every(function(l){var c=Px(l,n),u=rs(c,1),d=u[0],p=kx(l,r,i),f=rs(p,1),m=f[0],_=s?s(l):null;return d&&m&&!_})}function wc(t){return typeof t.isPropagationStopped=="function"?t.isPropagationStopped():typeof t.cancelBubble<"u"?t.cancelBubble:!1}function Dc(t){return t.dataTransfer?Array.prototype.some.call(t.dataTransfer.types,function(e){return e==="Files"||e==="application/x-moz-file"}):!!t.target&&!!t.target.files}function Fx(t){t.preventDefault()}function Lue(t){return t.indexOf("MSIE")!==-1||t.indexOf("Trident/")!==-1}function Pue(t){return t.indexOf("Edge/")!==-1}function kue(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Lue(t)||Pue(t)}function zn(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(r){for(var i=arguments.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];return e.some(function(s){return!wc(r)&&s&&s.apply(void 0,[r].concat(a)),wc(r)})}}function Fue(){return"showOpenFilePicker"in window}function Bue(t){if(_i(t)){var e=Object.entries(t).filter(function(n){var r=rs(n,2),i=r[0],a=r[1],o=!0;return Bx(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),(!Array.isArray(a)||!a.every(Ux))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(n,r){var i=rs(r,2),a=i[0],o=i[1];return Ix(Ix({},n),{},wx({},a,o))},{});return[{description:"Files",accept:e}]}return t}function Uue(t){if(_i(t))return Object.entries(t).reduce(function(e,n){var r=rs(n,2),i=r[0],a=r[1];return[].concat(Ax(e),[i],Ax(a))},[]).filter(function(e){return Bx(e)||Ux(e)}).join(",")}function Gue(t){return t instanceof DOMException&&(t.name==="AbortError"||t.code===t.ABORT_ERR)}function $ue(t){return t instanceof DOMException&&(t.name==="SecurityError"||t.code===t.SECURITY_ERR)}function Bx(t){return t==="audio/*"||t==="video/*"||t==="image/*"||t==="text/*"||/\w+\/[-+.\w]+/g.test(t)}function Ux(t){return/^.*\.[\w]+$/.test(t)}var que=["children"],Yue=["open"],Vue=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Hue=["refKey","onChange","onClick"];function zue(t){return Kue(t)||jue(t)||Gx(t)||Wue()}function Wue(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
307
307
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jue(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Kue(t){if(Array.isArray(t))return Rh(t)}function Oh(t,e){return Zue(t)||Xue(t,e)||Gx(t,e)||Que()}function Que(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|