@phila/phila-ui-date-field 0.0.9-beta.0 → 0.0.9-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.css CHANGED
@@ -1 +1 @@
1
- .phila-text-field .phila-button{color:var(--Schemes-On-Surface)!important}.phila-input--required .phila-label:after{content:"*";padding-left:.125rem}.phila-input{display:flex;flex-direction:column}.phila-input:focus-within .phila-label{color:var(--Schemes-Primary)}.phila-input .phila-label{color:var(--Schemes-On-Surface)}.phila-input .phila-label--disabled{color:var(--Schemes-Surface-Container-High)}.phila-input .phila-text-field{box-sizing:border-box;border:2px solid transparent;box-shadow:inset 0 0 0 1px var(--Schemes-Border);border-radius:var(--border-radius-s);background-color:var(--Schemes-Background);background-clip:padding-box;display:flex;width:25rem;padding:0 var(--spacing-2xs) 0 var(--spacing-xs);flex-direction:column;align-items:center;gap:.625rem;flex:1 0 0;cursor:text}.phila-input .phila-text-field:focus-within{box-shadow:none;border:2px solid var(--Schemes-Primary)}.phila-input .phila-text-field:hover:not(:focus-within){background-color:var(--Schemes-Background)}.phila-input .phila-text-field button{cursor:pointer}.phila-input .phila-text-field button:focus{z-index:1}.phila-input .phila-text-field--filled{background-color:var(--Schemes-Background);border:2px solid transparent;box-shadow:inset 0 0 0 1px var(--Schemes-On-Surface)}.phila-input .phila-text-field--filled:focus-within{box-shadow:none;border:2px solid var(--Schemes-Primary)}.phila-input .state-layer{display:flex;padding:var(--spacing-2xs, .25rem) var(--spacing-xs, .5rem);align-items:center;gap:.5rem;flex:1 0 0;align-self:stretch}.phila-input .content{display:flex;height:var(--dimension-core-600);padding:var(--spacing-2xs, .25rem) 0;flex-direction:column;justify-content:center;align-items:flex-start;flex:1 0 0}.phila-input .input-text-container{display:flex;align-items:center;gap:.125rem;align-self:stretch;width:100%}.phila-input .phila-text-field-input{width:100%;background-color:inherit;border:none;color:var(--Schemes-On-Surface, #000)}.phila-input .phila-text-field-input:focus{outline:none}.phila-input .phila-text-field-input:focus-visible{outline:none}.phila-input .phila-text-field-input::placeholder{color:var(--Schemes-Surface-Container-Highest);font-family:var(--Static-Body-Large-Font);font-size:var(--Static-Body-Large-Size);font-style:normal;font-weight:400;line-height:var(--Static-Body-Large-Line-Height);letter-spacing:var(--Static-Body-Large-Tracking)}.phila-input .phila-supporting-text--disabled{color:var(--Schemes-Surface-Container-High)}.phila-input .phila-supporting-text{color:var(--Schemes-On-Surface)}.phila-input .phila-error-text{color:var(--Schemes-Error);display:flex;align-items:center}.phila-input--error:focus-within .phila-label{color:var(--Schemes-Error)}.phila-input--error .phila-label{color:var(--Schemes-Error)}.phila-input--error .phila-text-field{background-color:var(--Schemes-Background);border-color:var(--Schemes-Error);border-width:2px;border-style:solid;box-shadow:none}.phila-input--error .phila-text-field:focus-within{background-color:var(--Schemes-Background);border-color:var(--Schemes-Error);border-width:2px;border-style:solid}.phila-input--disabled{cursor:not-allowed}.phila-input--disabled .phila-label{cursor:not-allowed;color:var(--Schemes-Surface-Container-High)}.phila-input--disabled .phila-text-field{cursor:not-allowed;color:var(--Schemes-Surface-Container-High);border-color:var(--Schemes-Surface-Container-High);border-width:1px;border-style:solid;background-color:var(--Schemes-Surface-Container-Lowest)}.phila-input--disabled .phila-supporting-text{color:var(--Schemes-Surface-Container-High)}.date-picker[data-v-8fd98834]{position:absolute;background:var(--Schemes-Surface-Container-Lowest);border:var(--border-width-s) solid var(--colors-Medium-Grey);border-radius:var(--sizes-small);padding:var(--spacing-m)}.date-picker .calendar[data-v-8fd98834]{display:flex;width:15rem}.date-picker .calendar .calendar-day[data-v-8fd98834]{width:calc(100% / 7);display:flex}.date-picker .calendar .calendar-day button[data-v-8fd98834]{width:100%}.date-picker .calendar .calendar-day button.active[data-v-8fd98834]{background:var(--colors-Orange)!important;color:var(--Schemes-On-Primary)}.date-picker .calendar .calendar-day.outside-month button[data-v-8fd98834]{opacity:.3!important}.date-picker button[data-v-8fd98834]{outline-offset:0}
1
+ .phila-text-field .phila-button{color:var(--Schemes-On-Surface)!important}.phila-input--required .phila-label:after{content:"*";padding-left:.125rem}.phila-input{display:flex;flex-direction:column}.phila-input:focus-within .phila-label{color:var(--Schemes-Primary)}.phila-input .phila-label{color:var(--Schemes-On-Surface)}.phila-input .phila-label--disabled{color:var(--Schemes-Surface-Container-High)}.phila-input .phila-text-field{box-sizing:border-box;border:2px solid transparent;box-shadow:inset 0 0 0 1px var(--Schemes-Border-low);border-radius:var(--border-radius-s);background-color:var(--Schemes-Background);background-clip:padding-box;display:flex;width:25rem;padding:0 var(--spacing-2xs) 0 var(--spacing-xs);flex-direction:column;align-items:center;gap:.625rem;flex:1 0 0;cursor:text}.phila-input .phila-text-field:focus-within{box-shadow:none;border:2px solid var(--Schemes-Primary)}.phila-input .phila-text-field:hover:not(:focus-within){background-color:var(--Schemes-Background)}.phila-input .phila-text-field button{cursor:pointer}.phila-input .phila-text-field button:focus{z-index:1}.phila-input .phila-text-field--filled{background-color:var(--Schemes-Background);border:2px solid transparent;box-shadow:inset 0 0 0 1px var(--Schemes-On-Surface)}.phila-input .phila-text-field--filled:focus-within{box-shadow:none;border:2px solid var(--Schemes-Primary)}.phila-input .state-layer{display:flex;padding:var(--spacing-2xs, .25rem) var(--spacing-xs, .5rem);align-items:center;gap:.5rem;flex:1 0 0;align-self:stretch}.phila-input .content{display:flex;height:var(--scale-600);padding:var(--spacing-2xs, .25rem) 0;flex-direction:column;justify-content:center;align-items:flex-start;flex:1 0 0}.phila-input .input-text-container{display:flex;align-items:center;gap:.125rem;align-self:stretch;width:100%}.phila-input .phila-text-field-input{width:100%;background-color:inherit;border:none;color:var(--Schemes-On-Surface, #000)}.phila-input .phila-text-field-input:focus{outline:none}.phila-input .phila-text-field-input:focus-visible{outline:none}.phila-input .phila-text-field-input::placeholder{color:var(--Schemes-Surface-Container-Highest);font-family:var(--Body-Large-font-body-large-family);font-size:var(--Body-Large-font-body-large-size);font-style:normal;font-weight:400;line-height:var(--Body-Large-font-body-large-lineheight)}.phila-input .phila-supporting-text--disabled{color:var(--Schemes-Surface-Container-High)}.phila-input .phila-supporting-text{color:var(--Schemes-On-Surface)}.phila-input .phila-error-text{color:var(--Schemes-Error);display:flex;align-items:center}.phila-input--error:focus-within .phila-label{color:var(--Schemes-Error)}.phila-input--error .phila-label{color:var(--Schemes-Error)}.phila-input--error .phila-text-field{background-color:var(--Schemes-Background);border-color:var(--Schemes-Error);border-width:2px;border-style:solid;box-shadow:none}.phila-input--error .phila-text-field:focus-within{background-color:var(--Schemes-Background);border-color:var(--Schemes-Error);border-width:2px;border-style:solid}.phila-input--disabled{cursor:not-allowed}.phila-input--disabled .phila-label{cursor:not-allowed;color:var(--Schemes-Surface-Container-High)}.phila-input--disabled .phila-text-field{cursor:not-allowed;color:var(--Schemes-Surface-Container-High);border-color:var(--Schemes-Surface-Container-High);border-width:1px;border-style:solid;background-color:var(--Schemes-Surface-Container-Lowest)}.phila-input--disabled .phila-supporting-text{color:var(--Schemes-Surface-Container-High)}.date-picker[data-v-225c8851]{position:absolute;background:var(--Schemes-Surface-Container-Lowest);border:var(--border-width-s) solid var(--colors-Medium-Grey);border-radius:var(--scale-175);padding:var(--spacing-m)}.date-picker .calendar[data-v-225c8851]{display:flex;width:15rem}.date-picker .calendar .calendar-day[data-v-225c8851]{width:calc(100% / 7);display:flex}.date-picker .calendar .calendar-day button[data-v-225c8851]{width:100%}.date-picker .calendar .calendar-day button.active[data-v-225c8851]{background:var(--colors-Flyers-Orange)!important;color:var(--Schemes-On-Primary)}.date-picker .calendar .calendar-day.outside-month button[data-v-225c8851]{opacity:.3!important}.date-picker button[data-v-225c8851]{outline-offset:0}
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const i=require("vue"),$=require("@phila/phila-ui-core"),Ie=["disabled"],Pe=i.defineComponent({inheritAttrs:!1,__name:"PhlButton",props:{href:{},to:{},target:{},rel:{},disabled:{type:Boolean,default:!1},clickTarget:{},variant:{default:"primary"},size:{default:"medium"},iconOnly:{type:Boolean,default:!1},iconRight:{type:Boolean},text:{},className:{},iconDefinition:{},iconClass:{},src:{},svgRaw:{}},setup(u){const e=u,t=r=>"href"in r&&r.href!==void 0||"to"in r&&r.to!==void 0,s=i.computed(()=>$.cn("phila-button",`phila-button--${e.variant}`,e.size&&`is-${e.size}`,e.iconOnly&&"icon-button",e.iconOnly&&e.variant==="standard"&&"icon-button--standard",e.className)),a=i.computed(()=>t(e)?"to"in e&&e.to!==void 0?{to:e.to,disabled:e.disabled,className:s.value}:{href:e.href,target:e.target,rel:e.rel,disabled:e.disabled,className:s.value}:{}),n=i.computed(()=>({iconDefinition:e.iconDefinition,iconClass:e.iconClass,src:e.src,iconRight:e.iconRight,iconOnly:e.iconOnly,text:e.text,size:e.size}));return(r,l)=>t(e)?(i.openBlock(),i.createBlock(i.unref($.BaseLink),i.mergeProps({key:0},{...a.value,...r.$attrs},{role:"button"}),{default:i.withCtx(()=>[i.createVNode(i.unref($.ActionContent),i.normalizeProps(i.guardReactiveProps(n.value)),{default:i.withCtx(()=>[i.renderSlot(r.$slots,"default",{},()=>[i.createTextVNode(i.toDisplayString(e.text),1)])]),_:3},16)]),_:3},16)):(i.openBlock(),i.createElementBlock("button",i.mergeProps({key:1,type:"button",disabled:e.disabled,class:s.value},r.$attrs),[i.createVNode(i.unref($.ActionContent),i.normalizeProps(i.guardReactiveProps(n.value)),{default:i.withCtx(()=>[i.renderSlot(r.$slots,"default",{},()=>[i.createTextVNode(i.toDisplayString(e.text),1)])]),_:3},16)],16,Ie))}});var Re={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zm0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"]},Oe=Re,Le={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]},Ne=Le;function Q(u){return typeof u=="string"||u instanceof String}function Fe(u){var e;return typeof u=="object"&&u!=null&&(u==null||(e=u.constructor)==null?void 0:e.name)==="Object"}function Se(u,e){return Array.isArray(e)?Se(u,(t,s)=>e.includes(s)):Object.entries(u).reduce((t,s)=>{let[a,n]=s;return e(n,a)&&(t[a]=n),t},{})}const g={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function $e(u){switch(u){case g.LEFT:return g.FORCE_LEFT;case g.RIGHT:return g.FORCE_RIGHT;default:return u}}function _e(u){return u.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function pe(u,e){if(e===u)return!0;const t=Array.isArray(e),s=Array.isArray(u);let a;if(t&&s){if(e.length!=u.length)return!1;for(a=0;a<e.length;a++)if(!pe(e[a],u[a]))return!1;return!0}if(t!=s)return!1;if(e&&u&&typeof e=="object"&&typeof u=="object"){const n=e instanceof Date,r=u instanceof Date;if(n&&r)return e.getTime()==u.getTime();if(n!=r)return!1;const l=e instanceof RegExp,o=u instanceof RegExp;if(l&&o)return e.toString()==u.toString();if(l!=o)return!1;const h=Object.keys(e);for(a=0;a<h.length;a++)if(!Object.prototype.hasOwnProperty.call(u,h[a]))return!1;for(a=0;a<h.length;a++)if(!pe(u[h[a]],e[h[a]]))return!1;return!0}else if(e&&u&&typeof e=="function"&&typeof u=="function")return e.toString()===u.toString();return!1}class Ue{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}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?g.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?g.RIGHT:g.LEFT}}function E(u,e){return new E.InputMask(u,e)}function Be(u){if(u==null)throw new Error("mask property should be defined");return u instanceof RegExp?E.MaskedRegExp:Q(u)?E.MaskedPattern:u===Date?E.MaskedDate:u===Number?E.MaskedNumber:Array.isArray(u)||u===Array?E.MaskedDynamic:E.Masked&&u.prototype instanceof E.Masked?u:E.Masked&&u instanceof E.Masked?u.constructor:u instanceof Function?E.MaskedFunction:E.Masked}function ue(u){if(!u)throw new Error("Options in not defined");if(E.Masked){if(u.prototype instanceof E.Masked)return{mask:u};const{mask:e=void 0,...t}=u instanceof E.Masked?{mask:u}:Fe(u)&&u.mask instanceof E.Masked?u:{};if(e){const s=e.mask;return{...Se(e,(a,n)=>!n.startsWith("_")),mask:e.constructor,_mask:s,...t}}}return Fe(u)?{...u}:{mask:u}}function W(u){if(E.Masked&&u instanceof E.Masked)return u;const e=ue(u),t=Be(e.mask);if(!t)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===t&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new t(e)}E.createMask=W;class Ee{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,t){if(!(e==null||t==null||e===this.selectionStart&&t===this.selectionEnd))try{this._unsafeSelect(e,t)}catch{}}get isActive(){return!1}}E.MaskElement=Ee;const xe=90,Ye=89;class me extends Ee{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,t,s;return(e=(t=(s=this.input).getRootNode)==null?void 0:t.call(s))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){if(this._handlers.redo&&(e.keyCode===xe&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===Ye&&e.ctrlKey))return e.preventDefault(),this._handlers.redo(e);if(this._handlers.undo&&e.keyCode===xe&&(e.metaKey||e.ctrlKey))return e.preventDefault(),this._handlers.undo(e);e.isComposing||this._handlers.selectionChange(e)}_onBeforeinput(e){if(e.inputType==="historyUndo"&&this._handlers.undo)return e.preventDefault(),this._handlers.undo(e);if(e.inputType==="historyRedo"&&this._handlers.redo)return e.preventDefault(),this._handlers.redo(e)}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}E.HTMLMaskElement=me;class ze extends me{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,t){this.input.setSelectionRange(e,t)}get value(){return this.input.value}set value(e){this.input.value=e}}E.HTMLMaskElement=me;class Ve extends me{get _unsafeSelectionStart(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,a=t&&t.focusOffset;return a==null||s==null||s<a?s:a}get _unsafeSelectionEnd(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,a=t&&t.focusOffset;return a==null||s==null||s>a?s:a}_unsafeSelect(e,t){if(!this.rootElement.createRange)return;const s=this.rootElement.createRange();s.setStart(this.input.firstChild||this.input,e),s.setEnd(this.input.lastChild||this.input,t);const a=this.rootElement,n=a.getSelection&&a.getSelection();n&&(n.removeAllRanges(),n.addRange(s))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}E.HTMLContenteditableMaskElement=Ve;class ge{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>ge.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}ge.MAX_LENGTH=100;class je{constructor(e,t){this.el=e instanceof Ee?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new Ve(e):new ze(e),this.masked=W(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new ge,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._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var t;return e==null||((t=this.masked)==null?void 0:t.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof E.Masked)&&this.masked.constructor===Be(e)){this.masked.updateOptions({mask:e});return}const t=e instanceof E.Masked?e:W({mask:e});t.unmaskedValue=this.masked.unmaskedValue,this.masked=t}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}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,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,t){const s=this._listeners[e];s&&s.forEach(a=>a(t))}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,this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const t=this.masked.unmaskedValue,s=this.masked.value,a=this.masked.rawInputValue,n=this.displayValue,r=this.unmaskedValue!==t||this.value!==s||this._rawInputValue!==a;this._unmaskedValue=t,this._value=s,this._rawInputValue=a,this.el.value!==n&&(this.el.value=n),e==="auto"?this.alignCursor():e!=null&&(this.cursorPos=e),r&&this._fireChangeEvents(),!this._historyChanging&&(r||this.history.isEmpty)&&this.history.push({unmaskedValue:t,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:t,...s}=e,a=!this.maskEquals(t),n=this.masked.optionsIsChanged(s);a&&(this.mask=t),n&&this.masked.updateOptions(s),(a||n)&&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,g.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,t){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t),this}off(e,t){if(!this._listeners[e])return this;if(!t)return delete this._listeners[e],this;const s=this._listeners[e].indexOf(t);return s>=0&&this._listeners[e].splice(s,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const t=new Ue({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),s=this.masked.rawInputValue,a=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,n=s===this.masked.rawInputValue?t.removeDirection:g.NONE;let r=this.masked.nearestInputPos(t.startChangePos+a,n);n!==g.NONE&&(r=this.masked.nearestInputPos(r,g.NONE)),this.updateControl(r),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()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}E.InputMask=je;class D{static normalize(e){return Array.isArray(e)?e:[e,new D]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}E.ChangeDetails=D;class K{constructor(e,t,s){e===void 0&&(e=""),t===void 0&&(t=0),this.value=e,this.from=t,this.stop=s}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 t=this.value[0];return this.value=this.value.slice(1),t}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}let H=class he{constructor(e){this._value="",this._update({...he.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&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,t){t===void 0&&(t={input:!0}),this.reset(),this.append(e,t,""),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,t){return e}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),Math.min(this.displayValue.length,t-e)}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this.displayValue.slice(e,t)}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new K(this.extractInput(e,t),e)}appendTail(e){return Q(e)&&(e=new K(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new D({inserted:e,rawInserted:e})):new D}_appendChar(e,t,s){t===void 0&&(t={});const a=this.state;let n;if([e,n]=this.doPrepareChar(e,t),e&&(n=n.aggregate(this._appendCharRaw(e,t)),!n.rawInserted&&this.autofix==="pad")){const r=this.state;this.state=a;let l=this.pad(t);const o=this._appendCharRaw(e,t);l=l.aggregate(o),o.rawInserted||l.equals(n)?n=l:this.state=r}if(n.inserted){let r,l=this.doValidate(t)!==!1;if(l&&s!=null){const o=this.state;if(this.overwrite===!0){r=s.state;for(let d=0;d<n.rawInserted.length;++d)s.unshift(this.displayValue.length-n.tailShift)}let h=this.appendTail(s);if(l=h.rawInserted.length===s.toString().length,!(l&&h.inserted)&&this.overwrite==="shift"){this.state=o,r=s.state;for(let d=0;d<n.rawInserted.length;++d)s.shift();h=this.appendTail(s),l=h.rawInserted.length===s.toString().length}l&&h.inserted&&(this.state=o)}l||(n=new D,this.state=a,s&&r&&(s.state=r))}return n}_appendPlaceholder(){return new D}_appendEager(){return new D}append(e,t,s){if(!Q(e))throw new Error("value should be string");const a=Q(s)?new K(String(s)):s;t!=null&&t.tail&&(t._beforeTailState=this.state);let n;[e,n]=this.doPrepare(e,t);for(let r=0;r<e.length;++r){const l=this._appendChar(e[r],t,a);if(!l.rawInserted&&!this.doSkipInvalid(e[r],t,a))break;n.aggregate(l)}return(this.eager===!0||this.eager==="append")&&t!=null&&t.input&&e&&n.aggregate(this._appendEager()),a!=null&&(n.tailShift+=this.appendTail(a).tailShift),n}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(t),new D}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const t=this.rawInputValue,s=this.value,a=e();return this.rawInputValue=t,this.value&&this.value!==s&&s.indexOf(this.value)===0&&(this.append(s.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,a}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const t=this.state,s=e(this);return this.state=t,delete this._isolated,s}doSkipInvalid(e,t,s){return!!this.skipInvalid}doPrepare(e,t){return t===void 0&&(t={}),D.normalize(this.prepare?this.prepare(e,this,t):e)}doPrepareChar(e,t){return t===void 0&&(t={}),D.normalize(this.prepareChar?this.prepareChar(e,this,t):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,t,s,a,n){s===void 0&&(s=""),a===void 0&&(a=g.NONE),n===void 0&&(n={input:!0});const r=e+t,l=this.extractTail(r),o=this.eager===!0||this.eager==="remove";let h;o&&(a=$e(a),h=this.extractInput(0,r,{raw:!0}));let d=e;const p=new D;if(a!==g.NONE&&(d=this.nearestInputPos(e,t>1&&e!==0&&!o?g.NONE:a),p.tailShift=d-e),p.aggregate(this.remove(d)),o&&a!==g.NONE&&h===this.rawInputValue)if(a===g.FORCE_LEFT){let _;for(;h===this.rawInputValue&&(_=this.displayValue.length);)p.aggregate(new D({tailShift:-1})).aggregate(this.remove(_-1))}else a===g.FORCE_RIGHT&&l.unshift();return p.aggregate(this.append(s,n,l))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!pe(this,e)}typedValueEquals(e){const t=this.typedValue;return e===t||he.EMPTY_VALUES.includes(e)&&he.EMPTY_VALUES.includes(t)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new D}};H.DEFAULTS={skipInvalid:!0};H.EMPTY_VALUES=[void 0,null,""];E.Masked=H;class ae{constructor(e,t){e===void 0&&(e=[]),t===void 0&&(t=0),this.chunks=e,this.from=t}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=Q(e)?new K(String(e)):e;const t=this.chunks[this.chunks.length-1],s=t&&(t.stop===e.stop||e.stop==null)&&e.from===t.from+t.toString().length;if(e instanceof K)s?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof ae){if(e.stop==null){let a;for(;e.chunks.length&&e.chunks[0].stop==null;)a=e.chunks.shift(),a.from+=e.from,this.extend(a)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof E.MaskedPattern))return new K(this.toString()).appendTo(e);const t=new D;for(let s=0;s<this.chunks.length;++s){const a=this.chunks[s],n=e._mapPosToBlock(e.displayValue.length),r=a.stop;let l;if(r!=null&&(!n||n.index<=r)&&((a instanceof ae||e._stops.indexOf(r)>=0)&&t.aggregate(e._appendPlaceholder(r)),l=a instanceof ae&&e._blocks[r]),l){const o=l.appendTail(a);t.aggregate(o);const h=a.toString().slice(o.rawInserted.length);h&&t.aggregate(e.append(h,{tail:!0}))}else t.aggregate(e.append(a.toString(),{tail:!0}))}return t}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:t,...s}=e;Object.assign(this,s),this.chunks=t.map(a=>{const n="chunks"in a?new ae:new K;return n.state=a,n})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const t=e!=null?e-this.from:e;let s=0;for(;s<this.chunks.length;){const a=this.chunks[s],n=a.unshift(t);if(a.toString()){if(!n)break;++s}else this.chunks.splice(s,1);if(n)return n}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const t=this.chunks[e],s=t.shift();if(t.toString()){if(!s)break;--e}else this.chunks.splice(e,1);if(s)return s}return""}}class He{constructor(e,t){this.masked=e,this._log=[];const{offset:s,index:a}=e._mapPosToBlock(t)||(t<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=s,this.index=a,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=((t=this.block)==null?void 0:t.displayValue.length)||0){var t;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,g.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,g.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,g.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,g.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,g.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,g.NONE),!0})}}class Me{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,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(t),this._value||(this._isRawInput=!1),new D}nearestInputPos(e,t){t===void 0&&(t=g.NONE);const s=0,a=this._value.length;switch(t){case g.LEFT:case g.FORCE_LEFT:return s;case g.NONE:case g.RIGHT:case g.FORCE_RIGHT:default:return a}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._isRawInput?t-e:0}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),s===void 0&&(s={}),s.raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new D;const s=this.eager===!0||this.eager==="append",a=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!s)&&!t.tail,n=new D({inserted:this.char,rawInserted:a?this.char:""});return this._value=this.char,this._isRawInput=a&&(t.raw||t.input),n}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new D;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new K("")}appendTail(e){return Q(e)&&(e=new K(String(e))),e.appendTo(this)}append(e,t,s){const a=this._appendChar(e[0],t);return s!=null&&(a.tailShift+=this.appendTail(s).tailShift),a}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}pad(e){return this._appendPlaceholder()}}class fe{constructor(e){const{parent:t,isOptional:s,placeholderChar:a,displayChar:n,lazy:r,eager:l,...o}=e;this.masked=W(o),Object.assign(this,{parent:t,isOptional:s,placeholderChar:a,displayChar:n,lazy:r,eager:l})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),e===0&&t>=1?(this.isFilled=!1,this.masked.remove(e,t)):new D}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,t){if(t===void 0&&(t={}),this.isFilled)return new D;const s=this.masked.state;let a=this.masked._appendChar(e,this.currentMaskFlags(t));return a.inserted&&this.doValidate(t)===!1&&(a=new D,this.masked.state=s),!a.inserted&&!this.isOptional&&!this.lazy&&!t.input&&(a.inserted=this.placeholderChar),a.skip=!a.inserted&&!this.isOptional,this.isFilled=!!a.inserted,a}append(e,t,s){return this.masked.append(e,this.currentMaskFlags(t),s)}_appendPlaceholder(){return this.isFilled||this.isOptional?new D:(this.isFilled=!0,new D({inserted:this.placeholderChar}))}_appendEager(){return new D}extractTail(e,t){return this.masked.extractTail(e,t)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.masked.extractInput(e,t,s)}nearestInputPos(e,t){t===void 0&&(t=g.NONE);const s=0,a=this.value.length,n=Math.min(Math.max(e,s),a);switch(t){case g.LEFT:case g.FORCE_LEFT:return this.isComplete?n:s;case g.RIGHT:case g.FORCE_RIGHT:return this.isComplete?n:a;case g.NONE:default:return n}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.value.slice(e,t).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 t;return{...e,_beforeTailState:(e==null||(t=e._beforeTailState)==null?void 0:t.masked)||e?._beforeTailState}}pad(e){return new D}}fe.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 qe extends H{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=s=>s.search(t)>=0),super._update(e)}}E.MaskedRegExp=qe;class U extends H{constructor(e){super({...U.DEFAULTS,...e,definitions:Object.assign({},fe.DEFAULT_DEFINITIONS,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 t=this.mask;if(!t||!e)return;let s=!1,a=!1;for(let n=0;n<t.length;++n){if(this.blocks){const h=t.slice(n),d=Object.keys(this.blocks).filter(_=>h.indexOf(_)===0);d.sort((_,v)=>v.length-_.length);const p=d[0];if(p){const{expose:_,repeat:v,...x}=ue(this.blocks[p]),w={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...x,repeat:v,parent:this},O=v!=null?new E.RepeatBlock(w):W(w);O&&(this._blocks.push(O),_&&(this.exposeBlock=O),this._maskedBlocks[p]||(this._maskedBlocks[p]=[]),this._maskedBlocks[p].push(this._blocks.length-1)),n+=p.length-1;continue}}let r=t[n],l=r in e;if(r===U.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(r==="{"||r==="}"){s=!s;continue}if(r==="["||r==="]"){a=!a;continue}if(r===U.ESCAPE_CHAR){if(++n,r=t[n],!r)break;l=!1}const o=l?new fe({isOptional:a,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...ue(e[r]),parent:this}):new Me({char:r,eager:this.eager,isUnmasking:s});this._blocks.push(o)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e){this.reset();return}const{_blocks:t,...s}=e;this._blocks.forEach((a,n)=>a.state=t[n]),super.state=s}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,t)=>e+=t.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(t),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,t)=>e+=t.value,"")}set value(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(t),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(t),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,t)=>e+=t.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const t=new D;let s=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(s==null)return t;this._blocks[s].isFilled&&++s;for(let a=s;a<this._blocks.length;++a){const n=this._blocks[a]._appendEager();if(!n.inserted)break;t.aggregate(n)}return t}_appendCharRaw(e,t){t===void 0&&(t={});const s=this._mapPosToBlock(this.displayValue.length),a=new D;if(!s)return a;for(let r=s.index,l;l=this._blocks[r];++r){var n;const o=l._appendChar(e,{...t,_beforeTailState:(n=t._beforeTailState)==null||(n=n._blocks)==null?void 0:n[r]});if(a.aggregate(o),o.consumed)break}return a}extractTail(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=new ae;return e===t||this._forEachBlocksInRange(e,t,(a,n,r,l)=>{const o=a.extractTail(r,l);o.stop=this._findStopBefore(n),o.from=this._blockStartPos(n),o instanceof ae&&(o.blockIndex=n),s.extend(o)}),s}extractInput(e,t,s){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),s===void 0&&(s={}),e===t)return"";let a="";return this._forEachBlocksInRange(e,t,(n,r,l,o)=>{a+=n.extractInput(l,o,s)}),a}_findStopBefore(e){let t;for(let s=0;s<this._stops.length;++s){const a=this._stops[s];if(a<=e)t=a;else break}return t}_appendPlaceholder(e){const t=new D;if(this.lazy&&e==null)return t;const s=this._mapPosToBlock(this.displayValue.length);if(!s)return t;const a=s.index,n=e??this._blocks.length;return this._blocks.slice(a,n).forEach(r=>{if(!r.lazy||e!=null){var l;t.aggregate(r._appendPlaceholder((l=r._blocks)==null?void 0:l.length))}}),t}_mapPosToBlock(e){let t="";for(let s=0;s<this._blocks.length;++s){const a=this._blocks[s],n=t.length;if(t+=a.displayValue,e<=t.length)return{index:s,offset:e-n}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((t,s)=>t+=s.displayValue.length,0)}_forEachBlocksInRange(e,t,s){t===void 0&&(t=this.displayValue.length);const a=this._mapPosToBlock(e);if(a){const n=this._mapPosToBlock(t),r=n&&a.index===n.index,l=a.offset,o=n&&r?n.offset:this._blocks[a.index].displayValue.length;if(s(this._blocks[a.index],a.index,l,o),n&&!r){for(let h=a.index+1;h<n.index;++h)s(this._blocks[h],h,0,this._blocks[h].displayValue.length);s(this._blocks[n.index],n.index,0,n.offset)}}}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=super.remove(e,t);return this._forEachBlocksInRange(e,t,(a,n,r,l)=>{s.aggregate(a.remove(r,l))}),s}nearestInputPos(e,t){if(t===void 0&&(t=g.NONE),!this._blocks.length)return 0;const s=new He(this,e);if(t===g.NONE)return s.pushRightBeforeInput()||(s.popState(),s.pushLeftBeforeInput())?s.pos:this.displayValue.length;if(t===g.LEFT||t===g.FORCE_LEFT){if(t===g.LEFT){if(s.pushRightBeforeFilled(),s.ok&&s.pos===e)return e;s.popState()}if(s.pushLeftBeforeInput(),s.pushLeftBeforeRequired(),s.pushLeftBeforeFilled(),t===g.LEFT){if(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.ok&&s.pos<=e||(s.popState(),s.ok&&s.pos<=e))return s.pos;s.popState()}return s.ok?s.pos:t===g.FORCE_LEFT?0:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:0)}return t===g.RIGHT||t===g.FORCE_RIGHT?(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.pushRightBeforeFilled()?s.pos:t===g.FORCE_RIGHT?this.displayValue.length:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:this.nearestInputPos(e,g.LEFT))):e}totalInputPositions(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);let s=0;return this._forEachBlocksInRange(e,t,(a,n,r,l)=>{s+=a.totalInputPositions(r,l)}),s}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const t=this._maskedBlocks[e];return t?t.map(s=>this._blocks[s]):[]}pad(e){const t=new D;return this._forEachBlocksInRange(0,this.displayValue.length,s=>t.aggregate(s.pad(e))),t}}U.DEFAULTS={...H.DEFAULTS,lazy:!0,placeholderChar:"_"};U.STOP_CHAR="`";U.ESCAPE_CHAR="\\";U.InputDefinition=fe;U.FixedDefinition=Me;E.MaskedPattern=U;class de extends U{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:t=this.to||0,from:s=this.from||0,maxLength:a=this.maxLength||0,autofix:n=this.autofix,...r}=e;this.to=t,this.from=s,this.maxLength=Math.max(String(t).length,a),this.autofix=n;const l=String(this.from).padStart(this.maxLength,"0"),o=String(this.to).padStart(this.maxLength,"0");let h=0;for(;h<o.length&&o[h]===l[h];)++h;r.mask=o.slice(0,h).replace(/0/g,"\\0")+"0".repeat(this.maxLength-h),super._update(r)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let t="",s="";const[,a,n]=e.match(/^(\D*)(\d*)(\D*)/)||[];return n&&(t="0".repeat(a.length)+n,s="9".repeat(a.length)+n),t=t.padEnd(this.maxLength,"0"),s=s.padEnd(this.maxLength,"9"),[t,s]}doPrepareChar(e,t){t===void 0&&(t={});let s;return[e,s]=super.doPrepareChar(e.replace(/\D/g,""),t),e||(s.skip=!this.isComplete),[e,s]}_appendCharRaw(e,t){if(t===void 0&&(t={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,t);const s=String(this.from).padStart(this.maxLength,"0"),a=String(this.to).padStart(this.maxLength,"0"),[n,r]=this.boundaries(this.value+e);return Number(r)<this.from?super._appendCharRaw(s[this.value.length],t):Number(n)>this.to?!t.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(s[this.value.length],t).aggregate(this._appendCharRaw(e,t)):super._appendCharRaw(a[this.value.length],t):super._appendCharRaw(e,t)}doValidate(e){const t=this.value;if(t.search(/[^0]/)===-1&&t.length<=this._matchFrom)return!0;const[s,a]=this.boundaries(t);return this.from<=Number(a)&&Number(s)<=this.to&&super.doValidate(e)}pad(e){const t=new D;if(this.value.length===this.maxLength)return t;const s=this.value,a=this.maxLength-this.value.length;if(a){this.reset();for(let n=0;n<a;++n)t.aggregate(super._appendCharRaw("0",e));s.split("").forEach(n=>this._appendCharRaw(n))}return t}}E.MaskedRange=de;const Ke="d{.}`m{.}`Y";class Z extends U{static extractPatternOptions(e){const{mask:t,pattern:s,...a}=e;return{...a,mask:Q(t)?t:s}}constructor(e){super(Z.extractPatternOptions({...Z.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:t,pattern:s,blocks:a,...n}={...Z.DEFAULTS,...e},r=Object.assign({},Z.GET_DEFAULT_BLOCKS());e.min&&(r.Y.from=e.min.getFullYear()),e.max&&(r.Y.to=e.max.getFullYear()),e.min&&e.max&&r.Y.from===r.Y.to&&(r.m.from=e.min.getMonth()+1,r.m.to=e.max.getMonth()+1,r.m.from===r.m.to&&(r.d.from=e.min.getDate(),r.d.to=e.max.getDate())),Object.assign(r,this.blocks,a),super._update({...n,mask:Q(t)?t:s,blocks:r})}doValidate(e){const t=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&t!=null&&(this.min==null||this.min<=t)&&(this.max==null||t<=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)}optionsIsChanged(e){return super.optionsIsChanged(Z.extractPatternOptions(e))}}Z.GET_DEFAULT_BLOCKS=()=>({d:{mask:de,from:1,to:31,maxLength:2},m:{mask:de,from:1,to:12,maxLength:2},Y:{mask:de,from:1900,to:9999}});Z.DEFAULTS={...U.DEFAULTS,mask:Date,pattern:Ke,format:(u,e)=>{if(!u)return"";const t=String(u.getDate()).padStart(2,"0"),s=String(u.getMonth()+1).padStart(2,"0"),a=u.getFullYear();return[t,s,a].join(".")},parse:(u,e)=>{const[t,s,a]=u.split(".").map(Number);return new Date(a,s-1,t)}};E.MaskedDate=Z;class ke extends H{constructor(e){super({...ke.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(t=>{const{expose:s,...a}=ue(t),n=W({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...a});return s&&(this.exposeMask=n),n}):[])}_appendCharRaw(e,t){t===void 0&&(t={});const s=this._applyDispatch(e,t);return this.currentMask&&s.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),s}_applyDispatch(e,t,s){e===void 0&&(e=""),t===void 0&&(t={}),s===void 0&&(s="");const a=t.tail&&t._beforeTailState!=null?t._beforeTailState._value:this.value,n=this.rawInputValue,r=t.tail&&t._beforeTailState!=null?t._beforeTailState._rawInputValue:n,l=n.slice(r.length),o=this.currentMask,h=new D,d=o?.state;return this.currentMask=this.doDispatch(e,{...t},s),this.currentMask&&(this.currentMask!==o?(this.currentMask.reset(),r&&(this.currentMask.append(r,{raw:!0}),h.tailShift=this.currentMask.value.length-a.length),l&&(h.tailShift+=this.currentMask.append(l,{raw:!0,tail:!0}).tailShift)):d&&(this.currentMask.state=d)),h}_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 t=new D;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var t,s;return{...e,_beforeTailState:((t=e._beforeTailState)==null?void 0:t.currentMaskRef)===this.currentMask&&((s=e._beforeTailState)==null?void 0:s.currentMask)||e._beforeTailState}}doDispatch(e,t,s){return t===void 0&&(t={}),s===void 0&&(s=""),this.dispatch(e,this,t,s)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,t){t===void 0&&(t={});let[s,a]=super.doPrepare(e,t);if(this.currentMask){let n;[s,n]=super.doPrepare(s,this.currentMaskFlags(t)),a=a.aggregate(n)}return[s,a]}doPrepareChar(e,t){t===void 0&&(t={});let[s,a]=super.doPrepareChar(e,t);if(this.currentMask){let n;[s,n]=super.doPrepareChar(s,this.currentMaskFlags(t)),a=a.aggregate(n)}return[s,a]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(t=>t.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 t=String(e);this.currentMask&&(this.currentMask.typedValue=e,t=this.currentMask.unmaskedValue),this.unmaskedValue=t}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,t){const s=new D;return this.currentMask&&s.aggregate(this.currentMask.remove(e,t)).aggregate(this._applyDispatch()),s}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(t=>t.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:t,currentMaskRef:s,currentMask:a,...n}=e;t&&this.compiledMasks.forEach((r,l)=>r.state=t[l]),s!=null&&(this.currentMask=s,this.currentMask.state=a),super.state=n}extractInput(e,t,s){return this.currentMask?this.currentMask.extractInput(e,t,s):""}extractTail(e,t){return this.currentMask?this.currentMask.extractTail(e,t):super.extractTail(e,t)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,t){return this.currentMask?this.currentMask.nearestInputPos(e,t):super.nearestInputPos(e,t)}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}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((t,s)=>{if(!e[s])return;const{mask:a,...n}=e[s];return pe(t,n)&&t.maskEquals(a)}):super.maskEquals(e)}typedValueEquals(e){var t;return!!((t=this.currentMask)!=null&&t.typedValueEquals(e))}}ke.DEFAULTS={...H.DEFAULTS,dispatch:(u,e,t,s)=>{if(!e.compiledMasks.length)return;const a=e.rawInputValue,n=e.compiledMasks.map((r,l)=>{const o=e.currentMask===r,h=o?r.displayValue.length:r.nearestInputPos(r.displayValue.length,g.FORCE_LEFT);return r.rawInputValue!==a?(r.reset(),r.append(a,{raw:!0})):o||r.remove(h),r.append(u,e.currentMaskFlags(t)),r.appendTail(s),{index:l,weight:r.rawInputValue.length,totalInputPositions:r.totalInputPositions(0,Math.max(h,r.nearestInputPos(r.displayValue.length,g.FORCE_LEFT)))}});return n.sort((r,l)=>l.weight-r.weight||l.totalInputPositions-r.totalInputPositions),e.compiledMasks[n[0].index]}};E.MaskedDynamic=ke;class ve extends U{constructor(e){super({...ve.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:t,...s}=e;if(t){const a=t.map(l=>l.length),n=Math.min(...a),r=Math.max(...a)-n;s.mask="*".repeat(n),r&&(s.mask+="["+"*".repeat(r)+"]"),this.enum=t}super._update(s)}_appendCharRaw(e,t){t===void 0&&(t={});const s=Math.min(this.nearestInputPos(0,g.FORCE_RIGHT),this.value.length),a=this.enum.filter(n=>this.matchValue(n,this.unmaskedValue+e,s));if(a.length){a.length===1&&this._forEachBlocksInRange(0,this.value.length,(r,l)=>{const o=a[0][l];l>=this.value.length||o===r.value||(r.reset(),r._appendChar(o,t))});const n=super._appendCharRaw(a[0][this.value.length],t);return a.length===1&&a[0].slice(this.unmaskedValue.length).split("").forEach(r=>n.aggregate(super._appendCharRaw(r))),n}return new D({skip:!this.isComplete})}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new K("",e)}remove(e,t){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),e===t)return new D;const s=Math.min(super.nearestInputPos(0,g.FORCE_RIGHT),this.value.length);let a;for(a=e;a>=0&&!(this.enum.filter(r=>this.matchValue(r,this.value.slice(s,a),s)).length>1);--a);const n=super.remove(a,t);return n.tailShift+=a-e,n}get isComplete(){return this.enum.indexOf(this.value)>=0}}ve.DEFAULTS={...U.DEFAULTS,matchValue:(u,e,t)=>u.indexOf(e,t)===t};E.MaskedEnum=ve;class Ge extends H{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}E.MaskedFunction=Ge;var we;class z extends H{constructor(e){super({...z.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),t="\\d*",s=(this.scale?"("+_e(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+t+s),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(_e).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(_e(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const t=e.split(this.radix);return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),t.join(this.radix)}doPrepareChar(e,t){t===void 0&&(t={});const[s,a]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),t);return e&&!s&&(a.skip=!0),s&&!this.allowPositive&&!this.value&&s!=="-"&&a.aggregate(this._appendChar("-")),[s,a]}_separatorsCount(e,t){t===void 0&&(t=!1);let s=0;for(let a=0;a<e;++a)this._value.indexOf(this.thousandsSeparator,a)===a&&(++s,t&&(e+=this.thousandsSeparator.length));return s}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t),this._removeThousandsSeparators(super.extractInput(e,t,s))}_appendCharRaw(e,t){t===void 0&&(t={});const s=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,a=this._separatorsCountFromSlice(s);this._value=this._removeThousandsSeparators(this.value);const n=this._value;this._value+=e;const r=this.number;let l=!isNaN(r),o=!1;if(l){let _;this.min!=null&&this.min<0&&this.number<this.min&&(_=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(_=this.max),_!=null&&(this.autofix?(this._value=this.format(_,this).replace(z.UNMASKED_RADIX,this.radix),o||(o=n===this._value&&!t.tail)):l=!1),l&&(l=!!this._value.match(this._numberRegExp))}let h;l?h=new D({inserted:this._value.slice(n.length),rawInserted:o?"":e,skip:o}):(this._value=n,h=new D),this._value=this._insertThousandsSeparators(this._value);const d=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,p=this._separatorsCountFromSlice(d);return h.tailShift+=(p-a)*this.thousandsSeparator.length,h}_findSeparatorAround(e){if(this.thousandsSeparator){const t=e-this.thousandsSeparator.length+1,s=this.value.indexOf(this.thousandsSeparator,t);if(s<=e)return s}return-1}_adjustRangeWithSeparators(e,t){const s=this._findSeparatorAround(e);s>=0&&(e=s);const a=this._findSeparatorAround(t);return a>=0&&(t=a+this.thousandsSeparator.length),[e,t]}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t);const s=this.value.slice(0,e),a=this.value.slice(t),n=this._separatorsCount(s.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(s+a));const r=this._separatorsCountFromSlice(s);return new D({tailShift:(r-n)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case g.NONE:case g.LEFT:case g.FORCE_LEFT:{const s=this._findSeparatorAround(e-1);if(s>=0){const a=s+this.thousandsSeparator.length;if(e<a||this.value.length<=a||t===g.FORCE_LEFT)return s}break}case g.RIGHT:case g.FORCE_RIGHT:{const s=this._findSeparatorAround(e);if(s>=0)return s+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let t=e;this.min!=null&&(t=Math.max(t,this.min)),this.max!=null&&(t=Math.min(t,this.max)),t!==e&&(this.unmaskedValue=this.format(t,this));let s=this.value;this.normalizeZeros&&(s=this._normalizeZeros(s)),this.padFractionalZeros&&this.scale>0&&(s=this._padFractionalZeros(s)),this._value=s}super.doCommit()}_normalizeZeros(e){const t=this._removeThousandsSeparators(e).split(this.radix);return t[0]=t[0].replace(/^(\D*)(0*)(\d*)/,(s,a,n,r)=>a+r),e.length&&!/\d$/.test(t[0])&&(t[0]=t[0]+"0"),t.length>1&&(t[1]=t[1].replace(/0*$/,""),t[1].length||(t.length=1)),this._insertThousandsSeparators(t.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const t=e.split(this.radix);return t.length<2&&t.push(""),t[1]=t[1].padEnd(this.scale,"0"),t.join(this.radix)}doSkipInvalid(e,t,s){t===void 0&&(t={});const a=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===z.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,t,s)&&!a}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,z.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(z.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)||z.EMPTY_VALUES.includes(e)&&z.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}we=z;z.UNMASKED_RADIX=".";z.EMPTY_VALUES=[...H.EMPTY_VALUES,0];z.DEFAULTS={...H.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[we.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:u=>u.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})};E.MaskedNumber=z;const Ce={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function Te(u,e,t){e===void 0&&(e=Ce.MASKED),t===void 0&&(t=Ce.MASKED);const s=W(u);return a=>s.runIsolated(n=>(n[e]=a,n[t]))}function Ze(u,e,t,s){return Te(e,t,s)(u)}E.PIPE_TYPE=Ce;E.createPipe=Te;E.pipe=Ze;class We extends U{get repeatFrom(){var e;return(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?e:0}get repeatTo(){var e;return(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var t,s,a;const{repeat:n,...r}=ue(e);this._blockOpts=Object.assign({},this._blockOpts,r);const l=W(this._blockOpts);this.repeat=(t=(s=n??l.repeat)!=null?s:this.repeat)!=null?t:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((a=this._blocks)==null?void 0:a.length)||0,this.repeatFrom)),blocks:{m:l},eager:l.eager,overwrite:l.overwrite,skipInvalid:l.skipInvalid,lazy:l.lazy,placeholderChar:l.placeholderChar,displayChar:l.displayChar})}_allocateBlock(e){if(e<this._blocks.length)return this._blocks[e];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(W(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(e,t){t===void 0&&(t={});const s=new D;for(let o=(a=(n=this._mapPosToBlock(this.displayValue.length))==null?void 0:n.index)!=null?a:Math.max(this._blocks.length-1,0),h,d;h=(r=this._blocks[o])!=null?r:d=!d&&this._allocateBlock(o);++o){var a,n,r,l;const p=h._appendChar(e,{...t,_beforeTailState:(l=t._beforeTailState)==null||(l=l._blocks)==null?void 0:l[o]});if(p.skip&&d){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(s.aggregate(p),p.consumed)break}return s}_trimEmptyTail(e,t){var s,a;e===void 0&&(e=0);const n=Math.max(((s=this._mapPosToBlock(e))==null?void 0:s.index)||0,this.repeatFrom,0);let r;t!=null&&(r=(a=this._mapPosToBlock(t))==null?void 0:a.index),r==null&&(r=this._blocks.length-1);let l=0;for(let o=r;n<=o&&!this._blocks[o].unmaskedValue;--o,++l);l&&(this._blocks.splice(r-l+1,l),this.mask=this.mask.slice(l))}reset(){super.reset(),this._trimEmptyTail()}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=super.remove(e,t);return this._trimEmptyTail(e,t),s}totalInputPositions(e,t){return e===void 0&&(e=0),t==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,t)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}}E.RepeatBlock=We;try{globalThis.IMask=E}catch{}var Xe={mask:void 0,prepare:Function,prepareChar:Function,validate:Function,commit:Function,overwrite:{type:Boolean,required:!1,default:void 0},eager:{required:!1,default:void 0,validator:u=>["append","remove"].includes(u)||typeof u=="boolean"},skipInvalid:{type:Boolean,required:!1,default:void 0},placeholderChar:String,displayChar:String,lazy:{type:Boolean,required:!1,default:void 0},definitions:Object,blocks:Object,enum:Array,maxLength:Number,from:Number,to:Number,pattern:String,format:Function,parse:Function,autofix:{required:!1,default:void 0,validator:u=>u==="pad"||typeof u=="boolean"},radix:String,thousandsSeparator:String,mapToRadix:Array,scale:Number,normalizeZeros:{type:Boolean,required:!1,default:void 0},padFractionalZeros:{type:Boolean,required:!1,default:void 0},min:[Number,Date],max:[Number,Date],dispatch:Function};function Je(u,e){let{emit:t,onAccept:s,onComplete:a,defaultValue:n,defaultUnmaskedValue:r,defaultTypedValue:l}=e===void 0?{}:e;const o=i.isRef(u)?u:i.ref(u),h=i.ref(),d=i.ref(),p=i.ref(""),_=i.ref(""),v=i.ref();let x,w=p.value,O=_.value,ee=v.value;function X(){ee=v.value=d.value.typedValue,O=_.value=d.value.unmaskedValue,w=p.value=d.value.value}function S(b){X(),t&&(t("accept",p.value,b),t("accept:masked",p.value,b),t("accept:typed",v.value,b),t("accept:unmasked",_.value,b)),s?.(b)}function I(b){t&&(t("complete",d.value.value,b),t("complete:masked",d.value.value,b),t("complete:typed",d.value.typedValue,b),t("complete:unmasked",d.value.unmaskedValue,b)),a?.(b)}const y=()=>{!d.value||_.value===void 0||(O!==_.value&&(d.value.unmaskedValue=_.value,d.value.unmaskedValue!==_.value&&S()),O=void 0)};i.watch(_,y);const M=()=>{!d.value||p.value===void 0||(w!==p.value&&(d.value.value=p.value,d.value.value!==p.value&&S()),w=void 0)};i.watch(p,M);const L=()=>{!d.value||v.value===void 0||(ee!==v.value&&(d.value.typedValue=v.value,d.value.masked.typedValueEquals(v.value)||S()),ee=void 0)};i.watch(v,L);function P(){x=h.value;const b=o.value;!x||!(b!=null&&b.mask)||(d.value=E(x,b),n!==void 0&&(p.value=n),r!==void 0&&(_.value=r),l!==void 0&&(v.value=l),y(),M(),L(),X(),d.value.on("accept",S).on("complete",I))}function G(){var b;(b=d.value)==null||b.destroy(),d.value=void 0}return i.onMounted(P),i.onUnmounted(G),i.watch([h,o],()=>{const b=h.value,B=o.value;(!(B!=null&&B.mask)||b!==x)&&G(),b&&(d.value?d.value.updateOptions(B):P())}),{el:h,mask:i.readonly(d),masked:p,unmasked:_,typed:v}}function Qe(u,e){return u={...u},Object.keys(u).forEach(t=>{(u[t]===void 0||e.includes(t))&&delete u[t]}),u}const et=["typed","unmasked","value","modelValue"];var tt=i.defineComponent({name:"imask-input",inheritAttrs:!1,props:{modelValue:String,value:String,unmasked:String,typed:{validator:()=>!0},...Xe},emits:["update:modelValue","update:masked","update:value","update:unmasked","update:typed","accept","accept:value","accept:masked","accept:unmasked","accept:typed","complete","complete:value","complete:masked","complete:unmasked","complete:typed"],setup(u,e){let{attrs:t,emit:s}=e;const{el:a,mask:n,masked:r,unmasked:l,typed:o}=Je(Qe(u,et),{emit:s,onAccept:v=>{const x=r.value;s("accept:value",x,v),s("update:value",x,v),s("update:masked",x,v),s("update:modelValue",x,v),s("update:unmasked",l.value,v),s("update:typed",o.value,v)},onComplete:v=>{s("complete:value",r.value,v)}}),h=i.toRef(u,"value"),d=i.toRef(u,"modelValue"),p=i.toRef(u,"unmasked"),_=i.toRef(u,"typed");return r.value=d.value||h.value||"",l.value=p.value||"",o.value=_.value,i.watch(h,v=>r.value=v),i.watch(d,v=>r.value=v),i.watch(p,v=>l.value=v),i.watch(_,v=>o.value=v),()=>{const v={...t,value:u.value!=null?u.value:u.modelValue!=null?u.modelValue:n.value?n.value.displayValue:"",ref:a};return u.mask||(v.onInput=x=>{s("update:modelValue",x.target.value),s("update:value",x.target.value)}),i.h("input",v)}}}),st=tt;const at=["for"],it={class:"state-layer"},nt={class:"content"},rt={class:"input-text-container"},ut=["id","placeholder","aria-label"],lt={key:1,class:"has-text-body-small phila-supporting-text"},ot={key:2,class:"has-text-body-small phila-error-text"},be=i.defineComponent({inheritAttrs:!1,__name:"TextField",props:{modelValue:{default:void 0},className:{default:""},label:{default:""},id:{default:`phila-text-field-${Math.random().toString(36).substring(2,9)}`},imaskProps:{default:void 0},supportingText:{default:""},placeholder:{default:""},leadingIcon:{default:""},trailingIcon:{default:""},error:{default(){return[]}}},emits:["update:modelValue","complete"],setup(u,{emit:e}){const t=i.useAttrs(),s=u,a=i.computed(()=>typeof s.error=="string"?s.error:s.error[0]),n=i.toRef(s,"id"),r=e,l=i.ref(""),o=i.computed({get:()=>s.modelValue!==void 0?s.modelValue:l.value,set:x=>{r("update:modelValue",x),l.value=x}}),h=i.computed(()=>{const x=["default-class"];return t.disabled!=null&&x.push("phila-input--disabled"),a.value&&x.push("phila-input--error"),t.required!=null&&x.push("phila-input--required"),$.cn(...x)}),d=i.computed(()=>{const x=[];return o.value!==""&&x.push("phila-text-field--filled"),s.className&&x.push(s.className),$.cn(...x)}),p=i.computed(()=>{if(!(s.label||t["aria-label"]))return s.placeholder||void 0}),_=i.ref(null),v=x=>{x.target.closest("button")||_.value?.focus()};return(x,w)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["phila-input",h.value])},[s.label?(i.openBlock(),i.createElementBlock("label",{key:0,for:n.value,class:"has-text-label-small phila-label"},i.toDisplayString(s.label),9,at)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(["phila-text-field",d.value]),onClick:i.withModifiers(v,["prevent"])},[i.createElementVNode("div",it,[s.leadingIcon?(i.openBlock(),i.createBlock(i.unref($.Icon),{key:0,"icon-class":s.leadingIcon,inline:"",decorative:""},null,8,["icon-class"])):i.createCommentVNode("",!0),i.createElementVNode("div",nt,[i.createElementVNode("div",rt,[s.imaskProps?.mask?(i.openBlock(),i.createBlock(i.unref(st),i.mergeProps({key:0},{...i.unref(t),...s.imaskProps},{id:n.value,modelValue:o.value,"onUpdate:modelValue":w[0]||(w[0]=O=>o.value=O),class:"phila-text-field-input has-text-body-default",placeholder:s.placeholder,onComplete:w[1]||(w[1]=()=>r("complete",l.value))}),null,16,["id","modelValue","placeholder"])):i.withDirectives((i.openBlock(),i.createElementBlock("input",i.mergeProps({key:1},i.unref(t),{id:n.value,"onUpdate:modelValue":w[2]||(w[2]=O=>o.value=O),class:"phila-text-field-input has-text-body-default",placeholder:s.placeholder,"aria-label":p.value}),null,16,ut)),[[i.vModelDynamic,o.value]])])]),o.value!=""?(i.openBlock(),i.createBlock(i.unref(Pe),{key:1,variant:"standard",size:"small","icon-only":"","icon-definition":i.unref(Ne),onClick:w[3]||(w[3]=O=>o.value="")},null,8,["icon-definition"])):i.createCommentVNode("",!0),s.trailingIcon?(i.openBlock(),i.createBlock(i.unref($.Icon),{key:2,size:"small","icon-class":s.trailingIcon,inline:"",decorative:""},null,8,["icon-class"])):i.createCommentVNode("",!0),i.renderSlot(x.$slots,"trailing-action")])],2),s.supportingText?(i.openBlock(),i.createElementBlock("div",lt,i.toDisplayString(s.supportingText),1)):i.createCommentVNode("",!0),a.value?(i.openBlock(),i.createElementBlock("div",ot,[i.createVNode(i.unref($.Icon),{"icon-definition":i.unref(Oe),size:"small",inline:"",decorative:""},null,8,["icon-definition"]),i.createTextVNode(" "+i.toDisplayString(a.value),1)])):i.createCommentVNode("",!0)],2))}}),ht=["data-toggle","aria-label","aria-expanded","aria-controls"],dt=i.defineComponent({__name:"CollapsePanel",props:{className:{},id:{},group:{default:void 0},blurClose:{type:Boolean,default:!1},openSingle:{type:Boolean,default:!1},mouseOverToggle:{type:Boolean,default:!1},outsideClickClose:{type:Boolean,default:!1},escapeKeyClose:{type:Boolean,default:!1},toggleAttrs:{default:void 0}},setup(u){const e=u,{isCollapsed:t,onMouseEnter:s,onMouseLeave:a,onClickToggle:n,onClickOpen:r,focusChange:l}=$.useCollapse(e),o=i.computed(()=>t(e.id));return(h,d)=>(i.openBlock(),i.createElementBlock("div",{onMouseenter:d[1]||(d[1]=(...p)=>i.unref(s)&&i.unref(s)(...p)),onMouseleave:d[2]||(d[2]=(...p)=>i.unref(a)&&i.unref(a)(...p)),onFocusout:d[3]||(d[3]=(...p)=>i.unref(l)&&i.unref(l)(...p))},[i.renderSlot(h.$slots,"toggle",i.normalizeProps(i.guardReactiveProps({open:o.value,ariaLabel:o.value?"Close panel":"Open panel",ariaExpanded:o.value,ariaControls:u.id,onClickToggle:i.unref(n),onClickOpen:i.unref(r),focusChange:i.unref(l),onClick:i.unref(n)})),()=>[i.createElementVNode("button",i.mergeProps({"data-toggle":u.id,"aria-label":o.value?"Close panel":"Open panel","aria-expanded":o.value,"aria-controls":u.id},u.toggleAttrs,{onClick:d[0]||(d[0]=i.withModifiers((...p)=>i.unref(n)&&i.unref(n)(...p),["prevent"]))}),null,16,ht)]),i.renderSlot(h.$slots,"default",i.normalizeProps(i.guardReactiveProps({id:u.id,open:o.value,onClickToggle:i.unref(n),focusChange:i.unref(l),hidden:!o.value})))],32))}}),ct=["disabled"],pt=i.defineComponent({inheritAttrs:!1,__name:"PhlButton",props:{href:{},to:{},target:{},rel:{},disabled:{type:Boolean,default:!1},clickTarget:{},variant:{default:"primary"},size:{default:"medium"},iconOnly:{type:Boolean,default:!1},iconRight:{type:Boolean},text:{},className:{},iconDefinition:{},iconClass:{},src:{},svgRaw:{}},setup(u){const e=u,t=r=>"href"in r&&r.href!==void 0||"to"in r&&r.to!==void 0,s=i.computed(()=>$.cn("phila-button",`phila-button--${e.variant}`,e.size&&`is-${e.size}`,e.iconOnly&&"icon-button",e.iconOnly&&e.variant==="standard"&&"icon-button--standard",e.className)),a=i.computed(()=>t(e)?"to"in e&&e.to!==void 0?{to:e.to,disabled:e.disabled,className:s.value}:{href:e.href,target:e.target,rel:e.rel,disabled:e.disabled,className:s.value}:{}),n=i.computed(()=>({iconDefinition:e.iconDefinition,iconClass:e.iconClass,src:e.src,iconRight:e.iconRight,iconOnly:e.iconOnly,text:e.text,size:e.size}));return(r,l)=>t(e)?(i.openBlock(),i.createBlock(i.unref($.BaseLink),i.mergeProps({key:0},{...a.value,...r.$attrs},{role:"button"}),{default:i.withCtx(()=>[i.createVNode(i.unref($.ActionContent),i.normalizeProps(i.guardReactiveProps(n.value)),{default:i.withCtx(()=>[i.renderSlot(r.$slots,"default",{},()=>[i.createTextVNode(i.toDisplayString(e.text),1)])]),_:3},16)]),_:3},16)):(i.openBlock(),i.createElementBlock("button",i.mergeProps({key:1,type:"button",disabled:e.disabled,class:s.value},r.$attrs),[i.createVNode(i.unref($.ActionContent),i.normalizeProps(i.guardReactiveProps(n.value)),{default:i.withCtx(()=>[i.renderSlot(r.$slots,"default",{},()=>[i.createTextVNode(i.toDisplayString(e.text),1)])]),_:3},16)],16,ct))}});var ft={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]},mt=ft;function gt(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var ce={exports:{}},kt=ce.exports,De;function vt(){return De||(De=1,(function(u,e){(function(t,s){u.exports=s()})(kt,(function(){var t=1e3,s=6e4,a=36e5,n="millisecond",r="second",l="minute",o="hour",h="day",d="week",p="month",_="quarter",v="year",x="date",w="Invalid Date",O=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,ee=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,X={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(C){var m=["th","st","nd","rd"],c=C%100;return"["+C+(m[(c-20)%10]||m[c]||m[0])+"]"}},S=function(C,m,c){var k=String(C);return!k||k.length>=m?C:""+Array(m+1-k.length).join(c)+C},I={s:S,z:function(C){var m=-C.utcOffset(),c=Math.abs(m),k=Math.floor(c/60),f=c%60;return(m<=0?"+":"-")+S(k,2,"0")+":"+S(f,2,"0")},m:function C(m,c){if(m.date()<c.date())return-C(c,m);var k=12*(c.year()-m.year())+(c.month()-m.month()),f=m.clone().add(k,p),A=c-f<0,F=m.clone().add(k+(A?-1:1),p);return+(-(k+(c-f)/(A?f-F:F-f))||0)},a:function(C){return C<0?Math.ceil(C)||0:Math.floor(C)},p:function(C){return{M:p,y:v,w:d,d:h,D:x,h:o,m:l,s:r,ms:n,Q:_}[C]||String(C||"").toLowerCase().replace(/s$/,"")},u:function(C){return C===void 0}},y="en",M={};M[y]=X;var L="$isDayjsObject",P=function(C){return C instanceof le||!(!C||!C[L])},G=function C(m,c,k){var f;if(!m)return y;if(typeof m=="string"){var A=m.toLowerCase();M[A]&&(f=A),c&&(M[A]=c,f=A);var F=m.split("-");if(!f&&F.length>1)return C(F[0])}else{var V=m.name;M[V]=m,f=V}return!k&&f&&(y=f),f||!k&&y},b=function(C,m){if(P(C))return C.clone();var c=typeof m=="object"?m:{};return c.date=C,c.args=arguments,new le(c)},B=I;B.l=G,B.i=P,B.w=function(C,m){return b(C,{locale:m.$L,utc:m.$u,x:m.$x,$offset:m.$offset})};var le=(function(){function C(c){this.$L=G(c.locale,null,!0),this.parse(c),this.$x=this.$x||c.x||{},this[L]=!0}var m=C.prototype;return m.parse=function(c){this.$d=(function(k){var f=k.date,A=k.utc;if(f===null)return new Date(NaN);if(B.u(f))return new Date;if(f instanceof Date)return new Date(f);if(typeof f=="string"&&!/Z$/i.test(f)){var F=f.match(O);if(F){var V=F[2]-1||0,T=(F[7]||"0").substring(0,3);return A?new Date(Date.UTC(F[1],V,F[3]||1,F[4]||0,F[5]||0,F[6]||0,T)):new Date(F[1],V,F[3]||1,F[4]||0,F[5]||0,F[6]||0,T)}}return new Date(f)})(c),this.init()},m.init=function(){var c=this.$d;this.$y=c.getFullYear(),this.$M=c.getMonth(),this.$D=c.getDate(),this.$W=c.getDay(),this.$H=c.getHours(),this.$m=c.getMinutes(),this.$s=c.getSeconds(),this.$ms=c.getMilliseconds()},m.$utils=function(){return B},m.isValid=function(){return this.$d.toString()!==w},m.isSame=function(c,k){var f=b(c);return this.startOf(k)<=f&&f<=this.endOf(k)},m.isAfter=function(c,k){return b(c)<this.startOf(k)},m.isBefore=function(c,k){return this.endOf(k)<b(c)},m.$g=function(c,k,f){return B.u(c)?this[k]:this.set(f,c)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(c,k){var f=this,A=!!B.u(k)||k,F=B.p(c),V=function(se,Y){var J=B.w(f.$u?Date.UTC(f.$y,Y,se):new Date(f.$y,Y,se),f);return A?J:J.endOf(h)},T=function(se,Y){return B.w(f.toDate()[se].apply(f.toDate("s"),(A?[0,0,0,0]:[23,59,59,999]).slice(Y)),f)},R=this.$W,N=this.$M,j=this.$D,ie="set"+(this.$u?"UTC":"");switch(F){case v:return A?V(1,0):V(31,11);case p:return A?V(1,N):V(0,N+1);case d:var te=this.$locale().weekStart||0,ne=(R<te?R+7:R)-te;return V(A?j-ne:j+(6-ne),N);case h:case x:return T(ie+"Hours",0);case o:return T(ie+"Minutes",1);case l:return T(ie+"Seconds",2);case r:return T(ie+"Milliseconds",3);default:return this.clone()}},m.endOf=function(c){return this.startOf(c,!1)},m.$set=function(c,k){var f,A=B.p(c),F="set"+(this.$u?"UTC":""),V=(f={},f[h]=F+"Date",f[x]=F+"Date",f[p]=F+"Month",f[v]=F+"FullYear",f[o]=F+"Hours",f[l]=F+"Minutes",f[r]=F+"Seconds",f[n]=F+"Milliseconds",f)[A],T=A===h?this.$D+(k-this.$W):k;if(A===p||A===v){var R=this.clone().set(x,1);R.$d[V](T),R.init(),this.$d=R.set(x,Math.min(this.$D,R.daysInMonth())).$d}else V&&this.$d[V](T);return this.init(),this},m.set=function(c,k){return this.clone().$set(c,k)},m.get=function(c){return this[B.p(c)]()},m.add=function(c,k){var f,A=this;c=Number(c);var F=B.p(k),V=function(N){var j=b(A);return B.w(j.date(j.date()+Math.round(N*c)),A)};if(F===p)return this.set(p,this.$M+c);if(F===v)return this.set(v,this.$y+c);if(F===h)return V(1);if(F===d)return V(7);var T=(f={},f[l]=s,f[o]=a,f[r]=t,f)[F]||1,R=this.$d.getTime()+c*T;return B.w(R,this)},m.subtract=function(c,k){return this.add(-1*c,k)},m.format=function(c){var k=this,f=this.$locale();if(!this.isValid())return f.invalidDate||w;var A=c||"YYYY-MM-DDTHH:mm:ssZ",F=B.z(this),V=this.$H,T=this.$m,R=this.$M,N=f.weekdays,j=f.months,ie=f.meridiem,te=function(Y,J,re,oe){return Y&&(Y[J]||Y(k,A))||re[J].slice(0,oe)},ne=function(Y){return B.s(V%12||12,Y,"0")},se=ie||function(Y,J,re){var oe=Y<12?"AM":"PM";return re?oe.toLowerCase():oe};return A.replace(ee,(function(Y,J){return J||(function(re){switch(re){case"YY":return String(k.$y).slice(-2);case"YYYY":return B.s(k.$y,4,"0");case"M":return R+1;case"MM":return B.s(R+1,2,"0");case"MMM":return te(f.monthsShort,R,j,3);case"MMMM":return te(j,R);case"D":return k.$D;case"DD":return B.s(k.$D,2,"0");case"d":return String(k.$W);case"dd":return te(f.weekdaysMin,k.$W,N,2);case"ddd":return te(f.weekdaysShort,k.$W,N,3);case"dddd":return N[k.$W];case"H":return String(V);case"HH":return B.s(V,2,"0");case"h":return ne(1);case"hh":return ne(2);case"a":return se(V,T,!0);case"A":return se(V,T,!1);case"m":return String(T);case"mm":return B.s(T,2,"0");case"s":return String(k.$s);case"ss":return B.s(k.$s,2,"0");case"SSS":return B.s(k.$ms,3,"0");case"Z":return F}return null})(Y)||F.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(c,k,f){var A,F=this,V=B.p(k),T=b(c),R=(T.utcOffset()-this.utcOffset())*s,N=this-T,j=function(){return B.m(F,T)};switch(V){case v:A=j()/12;break;case p:A=j();break;case _:A=j()/3;break;case d:A=(N-R)/6048e5;break;case h:A=(N-R)/864e5;break;case o:A=N/a;break;case l:A=N/s;break;case r:A=N/t;break;default:A=N}return f?A:B.a(A)},m.daysInMonth=function(){return this.endOf(p).$D},m.$locale=function(){return M[this.$L]},m.locale=function(c,k){if(!c)return this.$L;var f=this.clone(),A=G(c,k,!0);return A&&(f.$L=A),f},m.clone=function(){return B.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},C})(),Ae=le.prototype;return b.prototype=Ae,[["$ms",n],["$s",r],["$m",l],["$H",o],["$W",h],["$M",p],["$y",v],["$D",x]].forEach((function(C){Ae[C[1]]=function(m){return this.$g(m,C[0],C[1])}})),b.extend=function(C,m){return C.$i||(C(m,le,b),C.$i=!0),b},b.locale=G,b.isDayjs=P,b.unix=function(C){return b(1e3*C)},b.en=M[y],b.Ls=M,b.p={},b}))})(ce)),ce.exports}var _t=vt();const q=gt(_t),Ct=["id"],Et={class:"date-picker-close is-flex is-justify-flex-end"},yt={class:"date-picker-header is-flex is-justify-space-between is-align-center mb-2 content"},At={class:"calendar is-flex is-flex-wrap content"},Ft=["title","tabindex","disabled","onClick"],xt=["id","title","tabindex","disabled","onClick"],bt=["title","disabled","onClick"],Dt=i.defineComponent({__name:"DatePicker",props:{id:{},close:{type:Function},initialValue:{},min:{},max:{},format:{}},emits:["update:modelValue"],setup(u,{expose:e,emit:t}){const s=u,a=t,n=["Su","Mo","Tu","We","Th","Fr","Sa"],r=i.ref(q(s.initialValue===""?void 0:s.initialValue)),l=i.ref(r.value),o=i.computed(()=>{const S=l.value.daysInMonth();return Array.from({length:S},(I,y)=>l.value.date(y+1))}),h=i.computed(()=>Array.from({length:l.value.date(1).day()},(I,y)=>l.value.date(-y)).reverse()),d=i.computed(()=>Array.from({length:6-l.value.endOf("month").day()},(I,y)=>l.value.endOf("month").add(y+1,"day"))),p=S=>!ye(S,s.min,s.max),_=S=>{r.value=S,a("update:modelValue",r.value.format(s.format)),s.close()},v=S=>{a("update:modelValue",S),S?(r.value=q(S,s.format),l.value=r.value):(r.value=q(),l.value=q())},x=()=>{l.value=l.value.add(1,"month")},w=()=>{l.value=l.value.subtract(1,"month")},O=S=>{const I=document.querySelector("#selected-day");I instanceof HTMLButtonElement&&(S.preventDefault(),I.focus())},ee=S=>{const I=document.querySelector(`#${s.id} button`);I instanceof HTMLButtonElement&&(S.preventDefault(),I.focus())},X=S=>{if(S.key==="Tab"&&!S.shiftKey&&ee(S),["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End"].includes(S.key)){S.preventDefault();const y=document.activeElement;if(y instanceof HTMLButtonElement){const M=Array.from(document.querySelectorAll(".calendar button")).filter(G=>!G.disabled),L=M.indexOf(y);let P=L;switch(S.key){case"ArrowUp":P=L-7;break;case"ArrowDown":P=L+7;break;case"ArrowLeft":P=L-1;break;case"ArrowRight":P=L+1;break;case"Home":P=0;break;case"End":P=M.length-1;break}P>=0&&P<M.length?M[P].focus():P<0?(w(),i.nextTick(()=>{document.querySelector(".calendar > span:last-of-type button:last-of-type")?.focus()})):P>=M.length&&(x(),i.nextTick(()=>{document.querySelector(".calendar button")?.focus()}))}}};return e({update:v,focusDatePicker:O}),(S,I)=>(i.openBlock(),i.createElementBlock("div",{id:u.id,class:"date-picker"},[i.createElementVNode("div",Et,[i.createVNode(i.unref(pt),{id:`${u.id}-date-picker-toggle`,variant:"standard",size:"extra-small","icon-only":"","icon-definition":i.unref(mt),"aria-label":"close date picker",onClick:i.withModifiers(u.close,["prevent"])},null,8,["id","icon-definition","onClick"])]),i.createElementVNode("div",yt,[i.createElementVNode("button",{class:"phila-button icon-button--secondary is-extra-small",onClick:i.withModifiers(w,["prevent"])}," Prev "),i.createElementVNode("span",null,i.toDisplayString(l.value.format("MMMM YYYY")),1),i.createElementVNode("button",{class:"phila-button is-extra-small",onClick:i.withModifiers(x,["prevent"])},"Next")]),i.createElementVNode("div",At,[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(n,y=>i.createElementVNode("span",{key:y,class:"calendar-day is-5 has-text-weight-bold"},i.toDisplayString(y),1)),64)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(h.value,(y,M)=>(i.openBlock(),i.createElementBlock("span",{key:"day-in-previous-month-"+y.date(),class:"calendar-day outside-month is-5"},[i.createElementVNode("button",{class:"phila-button is-extra-small p-2",title:`${y.format("MMMM D, YYYY")}`,tabindex:M===0?0:-1,disabled:p(y),onKeydown:I[0]||(I[0]=L=>X(L)),onClick:i.withModifiers(L=>_(y),["prevent"])},i.toDisplayString(y.date()),41,Ft)]))),128)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.value,(y,M)=>(i.openBlock(),i.createElementBlock("span",{key:`day-in-current-month-${y.date()}`,class:"calendar-day is-5"},[i.createElementVNode("button",{id:y.isSame(r.value,"day")?"selected-day":void 0,class:i.normalizeClass(["phila-button is-extra-small p-2",{active:y.isSame(r.value,"day")}]),title:y.format("MMMM D, YYYY"),tabindex:y.isSame(r.value,"day")||y.month()!==r.value.month()&&M===0?0:-1,disabled:p(y),onKeydown:I[1]||(I[1]=L=>X(L)),onClick:i.withModifiers(()=>_(y),["prevent"])},i.toDisplayString(y.date()),43,xt)]))),128)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(d.value,y=>(i.openBlock(),i.createElementBlock("span",{key:"day-in-next-month-"+y.date(),class:"calendar-day outside-month is-5"},[i.createElementVNode("button",{class:"phila-button is-extra-small p-2",title:`${y.format("MMMM D, YYYY")}`,tabindex:"-1",disabled:p(y),onKeydown:I[2]||(I[2]=M=>X(M)),onClick:i.withModifiers(M=>_(y),["prevent"])},i.toDisplayString(y.date()),41,bt)]))),128))])],8,Ct))}}),St=(u,e)=>{const t=u.__vccOpts||u;for(const[s,a]of e)t[s]=a;return t},Bt=St(Dt,[["__scopeId","data-v-8fd98834"]]),Vt=i.defineComponent({inheritAttrs:!1,__name:"DateField",props:{format:{default:"MM/DD/YYYY"},datePicker:{type:Boolean},imaskProps:{default:()=>({mask:Date,pattern:"m/d/Y",format:u=>q(u).format("MM/DD/YYYY"),parse:u=>q(u,"MM/DD/YYYY").toDate()})},datePickerOptions:{},min:{},max:{},className:{},modelValue:{},label:{},id:{default:()=>$.generateRandomId("phila-date-field-")},supportingText:{},placeholder:{},leadingIcon:{},trailingIcon:{},error:{}},setup(u){const e=u,t=i.useAttrs(),s=i.useTemplateRef("datePicker"),a=i.ref(e.modelValue),n=i.ref(""),r=i.computed(()=>$.cn("default-class",e.className)),l=h=>{a.value=h},o=h=>{(e.min||e.max)&&(ye(h,e.min,e.max)?n.value="":n.value="Selected date should be between "+q(e.min).format(e.format)+" and "+q(e.max).format(e.format)),s.value?.update(h)};return(h,d)=>u.datePicker?(i.openBlock(),i.createBlock(i.unref(dt),{key:0,id:`${e.id}-date-picker`,group:"date-picker","outside-click-close":"","escape-key-close":"","open-single":""},{toggle:i.withCtx(p=>[i.createVNode(i.unref(be),i.mergeProps({...i.unref(t),...e},{modelValue:a.value,"onUpdate:modelValue":[d[0]||(d[0]=_=>a.value=_),l],class:r.value,"aria-controls":p.ariaControls,"trailing-icon":"fa-solid fa-calendar",min:void 0,max:void 0,error:n.value||e.error,onFocus:_=>p.open?null:p?.onClickToggle(_),onClick:_=>p.open?null:p?.onClickOpen(_),onKeydown:d[1]||(d[1]=i.withKeys(_=>s.value?.focusDatePicker(_),["tab"])),onComplete:o}),null,16,["modelValue","class","aria-controls","error","onFocus","onClick"])]),default:i.withCtx(({open:p,id:_,onClickToggle:v})=>[p?(i.openBlock(),i.createBlock(Bt,i.mergeProps({key:0,id:_,ref:"datePicker"},e.datePickerOptions,{"initial-value":a.value,min:e.min,max:e.max,format:e.format,close:v,"onUpdate:modelValue":l}),null,16,["id","initial-value","min","max","format","close"])):i.createCommentVNode("",!0)]),_:1},8,["id"])):(i.openBlock(),i.createBlock(i.unref(be),i.mergeProps({key:1},{...i.unref(t),...e},{modelValue:a.value,"onUpdate:modelValue":[d[2]||(d[2]=p=>a.value=p),l],class:r.value,label:"Date field","trailing-icon":"fa-solid fa-calendar",errors:n.value||e.error,min:void 0,max:void 0}),null,16,["modelValue","class","errors"]))}}),ye=(u,e,t)=>{typeof u=="string"&&(u=q(u));const s=e?q(e):null,a=t?q(t):null;return!(s&&u.isBefore(s,"day")||a&&u.isAfter(a,"day"))};exports.DateField=Vt;exports.isInDateRange=ye;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const i=require("vue"),$=require("@phila/phila-ui-core"),Ie=["disabled"],Pe=i.defineComponent({inheritAttrs:!1,__name:"PhlButton",props:{href:{},to:{},target:{},rel:{},disabled:{type:Boolean,default:!1},clickTarget:{},variant:{default:"primary"},size:{default:"medium"},iconOnly:{type:Boolean,default:!1},iconRight:{type:Boolean},text:{},className:{},iconDefinition:{},iconClass:{},src:{},svgRaw:{}},setup(u){const e=u,t=r=>"href"in r&&r.href!==void 0||"to"in r&&r.to!==void 0,s=i.computed(()=>$.cn("phila-button",`phila-button--${e.variant}`,e.size&&`is-${e.size}`,e.iconOnly&&"icon-button",e.iconOnly&&e.variant==="standard"&&"icon-button--standard",e.className)),a=i.computed(()=>t(e)?"to"in e&&e.to!==void 0?{to:e.to,disabled:e.disabled,className:s.value}:{href:e.href,target:e.target,rel:e.rel,disabled:e.disabled,className:s.value}:{}),n=i.computed(()=>({iconDefinition:e.iconDefinition,iconClass:e.iconClass,src:e.src,iconRight:e.iconRight,iconOnly:e.iconOnly,text:e.text,size:e.size}));return(r,l)=>t(e)?(i.openBlock(),i.createBlock(i.unref($.BaseLink),i.mergeProps({key:0},{...a.value,...r.$attrs},{role:"button"}),{default:i.withCtx(()=>[i.createVNode(i.unref($.ActionContent),i.normalizeProps(i.guardReactiveProps(n.value)),{default:i.withCtx(()=>[i.renderSlot(r.$slots,"default",{},()=>[i.createTextVNode(i.toDisplayString(e.text),1)])]),_:3},16)]),_:3},16)):(i.openBlock(),i.createElementBlock("button",i.mergeProps({key:1,type:"button",disabled:e.disabled,class:s.value},r.$attrs),[i.createVNode(i.unref($.ActionContent),i.normalizeProps(i.guardReactiveProps(n.value)),{default:i.withCtx(()=>[i.renderSlot(r.$slots,"default",{},()=>[i.createTextVNode(i.toDisplayString(e.text),1)])]),_:3},16)],16,Ie))}});var Re={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zm0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"]},Oe=Re,Le={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]},Ne=Le;function Q(u){return typeof u=="string"||u instanceof String}function Fe(u){var e;return typeof u=="object"&&u!=null&&(u==null||(e=u.constructor)==null?void 0:e.name)==="Object"}function Se(u,e){return Array.isArray(e)?Se(u,(t,s)=>e.includes(s)):Object.entries(u).reduce((t,s)=>{let[a,n]=s;return e(n,a)&&(t[a]=n),t},{})}const g={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function $e(u){switch(u){case g.LEFT:return g.FORCE_LEFT;case g.RIGHT:return g.FORCE_RIGHT;default:return u}}function _e(u){return u.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function pe(u,e){if(e===u)return!0;const t=Array.isArray(e),s=Array.isArray(u);let a;if(t&&s){if(e.length!=u.length)return!1;for(a=0;a<e.length;a++)if(!pe(e[a],u[a]))return!1;return!0}if(t!=s)return!1;if(e&&u&&typeof e=="object"&&typeof u=="object"){const n=e instanceof Date,r=u instanceof Date;if(n&&r)return e.getTime()==u.getTime();if(n!=r)return!1;const l=e instanceof RegExp,o=u instanceof RegExp;if(l&&o)return e.toString()==u.toString();if(l!=o)return!1;const h=Object.keys(e);for(a=0;a<h.length;a++)if(!Object.prototype.hasOwnProperty.call(u,h[a]))return!1;for(a=0;a<h.length;a++)if(!pe(u[h[a]],e[h[a]]))return!1;return!0}else if(e&&u&&typeof e=="function"&&typeof u=="function")return e.toString()===u.toString();return!1}class Ue{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}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?g.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?g.RIGHT:g.LEFT}}function E(u,e){return new E.InputMask(u,e)}function Be(u){if(u==null)throw new Error("mask property should be defined");return u instanceof RegExp?E.MaskedRegExp:Q(u)?E.MaskedPattern:u===Date?E.MaskedDate:u===Number?E.MaskedNumber:Array.isArray(u)||u===Array?E.MaskedDynamic:E.Masked&&u.prototype instanceof E.Masked?u:E.Masked&&u instanceof E.Masked?u.constructor:u instanceof Function?E.MaskedFunction:E.Masked}function ue(u){if(!u)throw new Error("Options in not defined");if(E.Masked){if(u.prototype instanceof E.Masked)return{mask:u};const{mask:e=void 0,...t}=u instanceof E.Masked?{mask:u}:Fe(u)&&u.mask instanceof E.Masked?u:{};if(e){const s=e.mask;return{...Se(e,(a,n)=>!n.startsWith("_")),mask:e.constructor,_mask:s,...t}}}return Fe(u)?{...u}:{mask:u}}function W(u){if(E.Masked&&u instanceof E.Masked)return u;const e=ue(u),t=Be(e.mask);if(!t)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===t&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new t(e)}E.createMask=W;class Ee{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,t){if(!(e==null||t==null||e===this.selectionStart&&t===this.selectionEnd))try{this._unsafeSelect(e,t)}catch{}}get isActive(){return!1}}E.MaskElement=Ee;const xe=90,Ye=89;class me extends Ee{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,t,s;return(e=(t=(s=this.input).getRootNode)==null?void 0:t.call(s))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){if(this._handlers.redo&&(e.keyCode===xe&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===Ye&&e.ctrlKey))return e.preventDefault(),this._handlers.redo(e);if(this._handlers.undo&&e.keyCode===xe&&(e.metaKey||e.ctrlKey))return e.preventDefault(),this._handlers.undo(e);e.isComposing||this._handlers.selectionChange(e)}_onBeforeinput(e){if(e.inputType==="historyUndo"&&this._handlers.undo)return e.preventDefault(),this._handlers.undo(e);if(e.inputType==="historyRedo"&&this._handlers.redo)return e.preventDefault(),this._handlers.redo(e)}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}E.HTMLMaskElement=me;class ze extends me{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,t){this.input.setSelectionRange(e,t)}get value(){return this.input.value}set value(e){this.input.value=e}}E.HTMLMaskElement=me;class Ve extends me{get _unsafeSelectionStart(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,a=t&&t.focusOffset;return a==null||s==null||s<a?s:a}get _unsafeSelectionEnd(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,a=t&&t.focusOffset;return a==null||s==null||s>a?s:a}_unsafeSelect(e,t){if(!this.rootElement.createRange)return;const s=this.rootElement.createRange();s.setStart(this.input.firstChild||this.input,e),s.setEnd(this.input.lastChild||this.input,t);const a=this.rootElement,n=a.getSelection&&a.getSelection();n&&(n.removeAllRanges(),n.addRange(s))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}E.HTMLContenteditableMaskElement=Ve;class ge{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>ge.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}ge.MAX_LENGTH=100;class je{constructor(e,t){this.el=e instanceof Ee?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new Ve(e):new ze(e),this.masked=W(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new ge,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._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var t;return e==null||((t=this.masked)==null?void 0:t.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof E.Masked)&&this.masked.constructor===Be(e)){this.masked.updateOptions({mask:e});return}const t=e instanceof E.Masked?e:W({mask:e});t.unmaskedValue=this.masked.unmaskedValue,this.masked=t}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}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,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,t){const s=this._listeners[e];s&&s.forEach(a=>a(t))}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,this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const t=this.masked.unmaskedValue,s=this.masked.value,a=this.masked.rawInputValue,n=this.displayValue,r=this.unmaskedValue!==t||this.value!==s||this._rawInputValue!==a;this._unmaskedValue=t,this._value=s,this._rawInputValue=a,this.el.value!==n&&(this.el.value=n),e==="auto"?this.alignCursor():e!=null&&(this.cursorPos=e),r&&this._fireChangeEvents(),!this._historyChanging&&(r||this.history.isEmpty)&&this.history.push({unmaskedValue:t,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:t,...s}=e,a=!this.maskEquals(t),n=this.masked.optionsIsChanged(s);a&&(this.mask=t),n&&this.masked.updateOptions(s),(a||n)&&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,g.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,t){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t),this}off(e,t){if(!this._listeners[e])return this;if(!t)return delete this._listeners[e],this;const s=this._listeners[e].indexOf(t);return s>=0&&this._listeners[e].splice(s,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const t=new Ue({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),s=this.masked.rawInputValue,a=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,n=s===this.masked.rawInputValue?t.removeDirection:g.NONE;let r=this.masked.nearestInputPos(t.startChangePos+a,n);n!==g.NONE&&(r=this.masked.nearestInputPos(r,g.NONE)),this.updateControl(r),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()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}E.InputMask=je;class D{static normalize(e){return Array.isArray(e)?e:[e,new D]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}E.ChangeDetails=D;class K{constructor(e,t,s){e===void 0&&(e=""),t===void 0&&(t=0),this.value=e,this.from=t,this.stop=s}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 t=this.value[0];return this.value=this.value.slice(1),t}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}let H=class he{constructor(e){this._value="",this._update({...he.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&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,t){t===void 0&&(t={input:!0}),this.reset(),this.append(e,t,""),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,t){return e}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),Math.min(this.displayValue.length,t-e)}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this.displayValue.slice(e,t)}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new K(this.extractInput(e,t),e)}appendTail(e){return Q(e)&&(e=new K(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new D({inserted:e,rawInserted:e})):new D}_appendChar(e,t,s){t===void 0&&(t={});const a=this.state;let n;if([e,n]=this.doPrepareChar(e,t),e&&(n=n.aggregate(this._appendCharRaw(e,t)),!n.rawInserted&&this.autofix==="pad")){const r=this.state;this.state=a;let l=this.pad(t);const o=this._appendCharRaw(e,t);l=l.aggregate(o),o.rawInserted||l.equals(n)?n=l:this.state=r}if(n.inserted){let r,l=this.doValidate(t)!==!1;if(l&&s!=null){const o=this.state;if(this.overwrite===!0){r=s.state;for(let d=0;d<n.rawInserted.length;++d)s.unshift(this.displayValue.length-n.tailShift)}let h=this.appendTail(s);if(l=h.rawInserted.length===s.toString().length,!(l&&h.inserted)&&this.overwrite==="shift"){this.state=o,r=s.state;for(let d=0;d<n.rawInserted.length;++d)s.shift();h=this.appendTail(s),l=h.rawInserted.length===s.toString().length}l&&h.inserted&&(this.state=o)}l||(n=new D,this.state=a,s&&r&&(s.state=r))}return n}_appendPlaceholder(){return new D}_appendEager(){return new D}append(e,t,s){if(!Q(e))throw new Error("value should be string");const a=Q(s)?new K(String(s)):s;t!=null&&t.tail&&(t._beforeTailState=this.state);let n;[e,n]=this.doPrepare(e,t);for(let r=0;r<e.length;++r){const l=this._appendChar(e[r],t,a);if(!l.rawInserted&&!this.doSkipInvalid(e[r],t,a))break;n.aggregate(l)}return(this.eager===!0||this.eager==="append")&&t!=null&&t.input&&e&&n.aggregate(this._appendEager()),a!=null&&(n.tailShift+=this.appendTail(a).tailShift),n}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(t),new D}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const t=this.rawInputValue,s=this.value,a=e();return this.rawInputValue=t,this.value&&this.value!==s&&s.indexOf(this.value)===0&&(this.append(s.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,a}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const t=this.state,s=e(this);return this.state=t,delete this._isolated,s}doSkipInvalid(e,t,s){return!!this.skipInvalid}doPrepare(e,t){return t===void 0&&(t={}),D.normalize(this.prepare?this.prepare(e,this,t):e)}doPrepareChar(e,t){return t===void 0&&(t={}),D.normalize(this.prepareChar?this.prepareChar(e,this,t):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,t,s,a,n){s===void 0&&(s=""),a===void 0&&(a=g.NONE),n===void 0&&(n={input:!0});const r=e+t,l=this.extractTail(r),o=this.eager===!0||this.eager==="remove";let h;o&&(a=$e(a),h=this.extractInput(0,r,{raw:!0}));let d=e;const p=new D;if(a!==g.NONE&&(d=this.nearestInputPos(e,t>1&&e!==0&&!o?g.NONE:a),p.tailShift=d-e),p.aggregate(this.remove(d)),o&&a!==g.NONE&&h===this.rawInputValue)if(a===g.FORCE_LEFT){let _;for(;h===this.rawInputValue&&(_=this.displayValue.length);)p.aggregate(new D({tailShift:-1})).aggregate(this.remove(_-1))}else a===g.FORCE_RIGHT&&l.unshift();return p.aggregate(this.append(s,n,l))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!pe(this,e)}typedValueEquals(e){const t=this.typedValue;return e===t||he.EMPTY_VALUES.includes(e)&&he.EMPTY_VALUES.includes(t)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new D}};H.DEFAULTS={skipInvalid:!0};H.EMPTY_VALUES=[void 0,null,""];E.Masked=H;class ae{constructor(e,t){e===void 0&&(e=[]),t===void 0&&(t=0),this.chunks=e,this.from=t}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=Q(e)?new K(String(e)):e;const t=this.chunks[this.chunks.length-1],s=t&&(t.stop===e.stop||e.stop==null)&&e.from===t.from+t.toString().length;if(e instanceof K)s?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof ae){if(e.stop==null){let a;for(;e.chunks.length&&e.chunks[0].stop==null;)a=e.chunks.shift(),a.from+=e.from,this.extend(a)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof E.MaskedPattern))return new K(this.toString()).appendTo(e);const t=new D;for(let s=0;s<this.chunks.length;++s){const a=this.chunks[s],n=e._mapPosToBlock(e.displayValue.length),r=a.stop;let l;if(r!=null&&(!n||n.index<=r)&&((a instanceof ae||e._stops.indexOf(r)>=0)&&t.aggregate(e._appendPlaceholder(r)),l=a instanceof ae&&e._blocks[r]),l){const o=l.appendTail(a);t.aggregate(o);const h=a.toString().slice(o.rawInserted.length);h&&t.aggregate(e.append(h,{tail:!0}))}else t.aggregate(e.append(a.toString(),{tail:!0}))}return t}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:t,...s}=e;Object.assign(this,s),this.chunks=t.map(a=>{const n="chunks"in a?new ae:new K;return n.state=a,n})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const t=e!=null?e-this.from:e;let s=0;for(;s<this.chunks.length;){const a=this.chunks[s],n=a.unshift(t);if(a.toString()){if(!n)break;++s}else this.chunks.splice(s,1);if(n)return n}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const t=this.chunks[e],s=t.shift();if(t.toString()){if(!s)break;--e}else this.chunks.splice(e,1);if(s)return s}return""}}class He{constructor(e,t){this.masked=e,this._log=[];const{offset:s,index:a}=e._mapPosToBlock(t)||(t<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=s,this.index=a,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=((t=this.block)==null?void 0:t.displayValue.length)||0){var t;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,g.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,g.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,g.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,g.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,g.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,g.NONE),!0})}}class Me{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,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(t),this._value||(this._isRawInput=!1),new D}nearestInputPos(e,t){t===void 0&&(t=g.NONE);const s=0,a=this._value.length;switch(t){case g.LEFT:case g.FORCE_LEFT:return s;case g.NONE:case g.RIGHT:case g.FORCE_RIGHT:default:return a}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._isRawInput?t-e:0}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),s===void 0&&(s={}),s.raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new D;const s=this.eager===!0||this.eager==="append",a=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!s)&&!t.tail,n=new D({inserted:this.char,rawInserted:a?this.char:""});return this._value=this.char,this._isRawInput=a&&(t.raw||t.input),n}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new D;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new K("")}appendTail(e){return Q(e)&&(e=new K(String(e))),e.appendTo(this)}append(e,t,s){const a=this._appendChar(e[0],t);return s!=null&&(a.tailShift+=this.appendTail(s).tailShift),a}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}pad(e){return this._appendPlaceholder()}}class fe{constructor(e){const{parent:t,isOptional:s,placeholderChar:a,displayChar:n,lazy:r,eager:l,...o}=e;this.masked=W(o),Object.assign(this,{parent:t,isOptional:s,placeholderChar:a,displayChar:n,lazy:r,eager:l})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),e===0&&t>=1?(this.isFilled=!1,this.masked.remove(e,t)):new D}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,t){if(t===void 0&&(t={}),this.isFilled)return new D;const s=this.masked.state;let a=this.masked._appendChar(e,this.currentMaskFlags(t));return a.inserted&&this.doValidate(t)===!1&&(a=new D,this.masked.state=s),!a.inserted&&!this.isOptional&&!this.lazy&&!t.input&&(a.inserted=this.placeholderChar),a.skip=!a.inserted&&!this.isOptional,this.isFilled=!!a.inserted,a}append(e,t,s){return this.masked.append(e,this.currentMaskFlags(t),s)}_appendPlaceholder(){return this.isFilled||this.isOptional?new D:(this.isFilled=!0,new D({inserted:this.placeholderChar}))}_appendEager(){return new D}extractTail(e,t){return this.masked.extractTail(e,t)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.masked.extractInput(e,t,s)}nearestInputPos(e,t){t===void 0&&(t=g.NONE);const s=0,a=this.value.length,n=Math.min(Math.max(e,s),a);switch(t){case g.LEFT:case g.FORCE_LEFT:return this.isComplete?n:s;case g.RIGHT:case g.FORCE_RIGHT:return this.isComplete?n:a;case g.NONE:default:return n}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.value.slice(e,t).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 t;return{...e,_beforeTailState:(e==null||(t=e._beforeTailState)==null?void 0:t.masked)||e?._beforeTailState}}pad(e){return new D}}fe.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 qe extends H{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=s=>s.search(t)>=0),super._update(e)}}E.MaskedRegExp=qe;class U extends H{constructor(e){super({...U.DEFAULTS,...e,definitions:Object.assign({},fe.DEFAULT_DEFINITIONS,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 t=this.mask;if(!t||!e)return;let s=!1,a=!1;for(let n=0;n<t.length;++n){if(this.blocks){const h=t.slice(n),d=Object.keys(this.blocks).filter(_=>h.indexOf(_)===0);d.sort((_,v)=>v.length-_.length);const p=d[0];if(p){const{expose:_,repeat:v,...x}=ue(this.blocks[p]),w={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...x,repeat:v,parent:this},O=v!=null?new E.RepeatBlock(w):W(w);O&&(this._blocks.push(O),_&&(this.exposeBlock=O),this._maskedBlocks[p]||(this._maskedBlocks[p]=[]),this._maskedBlocks[p].push(this._blocks.length-1)),n+=p.length-1;continue}}let r=t[n],l=r in e;if(r===U.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(r==="{"||r==="}"){s=!s;continue}if(r==="["||r==="]"){a=!a;continue}if(r===U.ESCAPE_CHAR){if(++n,r=t[n],!r)break;l=!1}const o=l?new fe({isOptional:a,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...ue(e[r]),parent:this}):new Me({char:r,eager:this.eager,isUnmasking:s});this._blocks.push(o)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e){this.reset();return}const{_blocks:t,...s}=e;this._blocks.forEach((a,n)=>a.state=t[n]),super.state=s}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,t)=>e+=t.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(t),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,t)=>e+=t.value,"")}set value(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(t),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(t),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,t)=>e+=t.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const t=new D;let s=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(s==null)return t;this._blocks[s].isFilled&&++s;for(let a=s;a<this._blocks.length;++a){const n=this._blocks[a]._appendEager();if(!n.inserted)break;t.aggregate(n)}return t}_appendCharRaw(e,t){t===void 0&&(t={});const s=this._mapPosToBlock(this.displayValue.length),a=new D;if(!s)return a;for(let r=s.index,l;l=this._blocks[r];++r){var n;const o=l._appendChar(e,{...t,_beforeTailState:(n=t._beforeTailState)==null||(n=n._blocks)==null?void 0:n[r]});if(a.aggregate(o),o.consumed)break}return a}extractTail(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=new ae;return e===t||this._forEachBlocksInRange(e,t,(a,n,r,l)=>{const o=a.extractTail(r,l);o.stop=this._findStopBefore(n),o.from=this._blockStartPos(n),o instanceof ae&&(o.blockIndex=n),s.extend(o)}),s}extractInput(e,t,s){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),s===void 0&&(s={}),e===t)return"";let a="";return this._forEachBlocksInRange(e,t,(n,r,l,o)=>{a+=n.extractInput(l,o,s)}),a}_findStopBefore(e){let t;for(let s=0;s<this._stops.length;++s){const a=this._stops[s];if(a<=e)t=a;else break}return t}_appendPlaceholder(e){const t=new D;if(this.lazy&&e==null)return t;const s=this._mapPosToBlock(this.displayValue.length);if(!s)return t;const a=s.index,n=e??this._blocks.length;return this._blocks.slice(a,n).forEach(r=>{if(!r.lazy||e!=null){var l;t.aggregate(r._appendPlaceholder((l=r._blocks)==null?void 0:l.length))}}),t}_mapPosToBlock(e){let t="";for(let s=0;s<this._blocks.length;++s){const a=this._blocks[s],n=t.length;if(t+=a.displayValue,e<=t.length)return{index:s,offset:e-n}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((t,s)=>t+=s.displayValue.length,0)}_forEachBlocksInRange(e,t,s){t===void 0&&(t=this.displayValue.length);const a=this._mapPosToBlock(e);if(a){const n=this._mapPosToBlock(t),r=n&&a.index===n.index,l=a.offset,o=n&&r?n.offset:this._blocks[a.index].displayValue.length;if(s(this._blocks[a.index],a.index,l,o),n&&!r){for(let h=a.index+1;h<n.index;++h)s(this._blocks[h],h,0,this._blocks[h].displayValue.length);s(this._blocks[n.index],n.index,0,n.offset)}}}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=super.remove(e,t);return this._forEachBlocksInRange(e,t,(a,n,r,l)=>{s.aggregate(a.remove(r,l))}),s}nearestInputPos(e,t){if(t===void 0&&(t=g.NONE),!this._blocks.length)return 0;const s=new He(this,e);if(t===g.NONE)return s.pushRightBeforeInput()||(s.popState(),s.pushLeftBeforeInput())?s.pos:this.displayValue.length;if(t===g.LEFT||t===g.FORCE_LEFT){if(t===g.LEFT){if(s.pushRightBeforeFilled(),s.ok&&s.pos===e)return e;s.popState()}if(s.pushLeftBeforeInput(),s.pushLeftBeforeRequired(),s.pushLeftBeforeFilled(),t===g.LEFT){if(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.ok&&s.pos<=e||(s.popState(),s.ok&&s.pos<=e))return s.pos;s.popState()}return s.ok?s.pos:t===g.FORCE_LEFT?0:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:0)}return t===g.RIGHT||t===g.FORCE_RIGHT?(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.pushRightBeforeFilled()?s.pos:t===g.FORCE_RIGHT?this.displayValue.length:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:this.nearestInputPos(e,g.LEFT))):e}totalInputPositions(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);let s=0;return this._forEachBlocksInRange(e,t,(a,n,r,l)=>{s+=a.totalInputPositions(r,l)}),s}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const t=this._maskedBlocks[e];return t?t.map(s=>this._blocks[s]):[]}pad(e){const t=new D;return this._forEachBlocksInRange(0,this.displayValue.length,s=>t.aggregate(s.pad(e))),t}}U.DEFAULTS={...H.DEFAULTS,lazy:!0,placeholderChar:"_"};U.STOP_CHAR="`";U.ESCAPE_CHAR="\\";U.InputDefinition=fe;U.FixedDefinition=Me;E.MaskedPattern=U;class de extends U{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:t=this.to||0,from:s=this.from||0,maxLength:a=this.maxLength||0,autofix:n=this.autofix,...r}=e;this.to=t,this.from=s,this.maxLength=Math.max(String(t).length,a),this.autofix=n;const l=String(this.from).padStart(this.maxLength,"0"),o=String(this.to).padStart(this.maxLength,"0");let h=0;for(;h<o.length&&o[h]===l[h];)++h;r.mask=o.slice(0,h).replace(/0/g,"\\0")+"0".repeat(this.maxLength-h),super._update(r)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let t="",s="";const[,a,n]=e.match(/^(\D*)(\d*)(\D*)/)||[];return n&&(t="0".repeat(a.length)+n,s="9".repeat(a.length)+n),t=t.padEnd(this.maxLength,"0"),s=s.padEnd(this.maxLength,"9"),[t,s]}doPrepareChar(e,t){t===void 0&&(t={});let s;return[e,s]=super.doPrepareChar(e.replace(/\D/g,""),t),e||(s.skip=!this.isComplete),[e,s]}_appendCharRaw(e,t){if(t===void 0&&(t={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,t);const s=String(this.from).padStart(this.maxLength,"0"),a=String(this.to).padStart(this.maxLength,"0"),[n,r]=this.boundaries(this.value+e);return Number(r)<this.from?super._appendCharRaw(s[this.value.length],t):Number(n)>this.to?!t.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(s[this.value.length],t).aggregate(this._appendCharRaw(e,t)):super._appendCharRaw(a[this.value.length],t):super._appendCharRaw(e,t)}doValidate(e){const t=this.value;if(t.search(/[^0]/)===-1&&t.length<=this._matchFrom)return!0;const[s,a]=this.boundaries(t);return this.from<=Number(a)&&Number(s)<=this.to&&super.doValidate(e)}pad(e){const t=new D;if(this.value.length===this.maxLength)return t;const s=this.value,a=this.maxLength-this.value.length;if(a){this.reset();for(let n=0;n<a;++n)t.aggregate(super._appendCharRaw("0",e));s.split("").forEach(n=>this._appendCharRaw(n))}return t}}E.MaskedRange=de;const Ke="d{.}`m{.}`Y";class Z extends U{static extractPatternOptions(e){const{mask:t,pattern:s,...a}=e;return{...a,mask:Q(t)?t:s}}constructor(e){super(Z.extractPatternOptions({...Z.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:t,pattern:s,blocks:a,...n}={...Z.DEFAULTS,...e},r=Object.assign({},Z.GET_DEFAULT_BLOCKS());e.min&&(r.Y.from=e.min.getFullYear()),e.max&&(r.Y.to=e.max.getFullYear()),e.min&&e.max&&r.Y.from===r.Y.to&&(r.m.from=e.min.getMonth()+1,r.m.to=e.max.getMonth()+1,r.m.from===r.m.to&&(r.d.from=e.min.getDate(),r.d.to=e.max.getDate())),Object.assign(r,this.blocks,a),super._update({...n,mask:Q(t)?t:s,blocks:r})}doValidate(e){const t=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&t!=null&&(this.min==null||this.min<=t)&&(this.max==null||t<=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)}optionsIsChanged(e){return super.optionsIsChanged(Z.extractPatternOptions(e))}}Z.GET_DEFAULT_BLOCKS=()=>({d:{mask:de,from:1,to:31,maxLength:2},m:{mask:de,from:1,to:12,maxLength:2},Y:{mask:de,from:1900,to:9999}});Z.DEFAULTS={...U.DEFAULTS,mask:Date,pattern:Ke,format:(u,e)=>{if(!u)return"";const t=String(u.getDate()).padStart(2,"0"),s=String(u.getMonth()+1).padStart(2,"0"),a=u.getFullYear();return[t,s,a].join(".")},parse:(u,e)=>{const[t,s,a]=u.split(".").map(Number);return new Date(a,s-1,t)}};E.MaskedDate=Z;class ke extends H{constructor(e){super({...ke.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(t=>{const{expose:s,...a}=ue(t),n=W({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...a});return s&&(this.exposeMask=n),n}):[])}_appendCharRaw(e,t){t===void 0&&(t={});const s=this._applyDispatch(e,t);return this.currentMask&&s.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),s}_applyDispatch(e,t,s){e===void 0&&(e=""),t===void 0&&(t={}),s===void 0&&(s="");const a=t.tail&&t._beforeTailState!=null?t._beforeTailState._value:this.value,n=this.rawInputValue,r=t.tail&&t._beforeTailState!=null?t._beforeTailState._rawInputValue:n,l=n.slice(r.length),o=this.currentMask,h=new D,d=o?.state;return this.currentMask=this.doDispatch(e,{...t},s),this.currentMask&&(this.currentMask!==o?(this.currentMask.reset(),r&&(this.currentMask.append(r,{raw:!0}),h.tailShift=this.currentMask.value.length-a.length),l&&(h.tailShift+=this.currentMask.append(l,{raw:!0,tail:!0}).tailShift)):d&&(this.currentMask.state=d)),h}_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 t=new D;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var t,s;return{...e,_beforeTailState:((t=e._beforeTailState)==null?void 0:t.currentMaskRef)===this.currentMask&&((s=e._beforeTailState)==null?void 0:s.currentMask)||e._beforeTailState}}doDispatch(e,t,s){return t===void 0&&(t={}),s===void 0&&(s=""),this.dispatch(e,this,t,s)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,t){t===void 0&&(t={});let[s,a]=super.doPrepare(e,t);if(this.currentMask){let n;[s,n]=super.doPrepare(s,this.currentMaskFlags(t)),a=a.aggregate(n)}return[s,a]}doPrepareChar(e,t){t===void 0&&(t={});let[s,a]=super.doPrepareChar(e,t);if(this.currentMask){let n;[s,n]=super.doPrepareChar(s,this.currentMaskFlags(t)),a=a.aggregate(n)}return[s,a]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(t=>t.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 t=String(e);this.currentMask&&(this.currentMask.typedValue=e,t=this.currentMask.unmaskedValue),this.unmaskedValue=t}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,t){const s=new D;return this.currentMask&&s.aggregate(this.currentMask.remove(e,t)).aggregate(this._applyDispatch()),s}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(t=>t.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:t,currentMaskRef:s,currentMask:a,...n}=e;t&&this.compiledMasks.forEach((r,l)=>r.state=t[l]),s!=null&&(this.currentMask=s,this.currentMask.state=a),super.state=n}extractInput(e,t,s){return this.currentMask?this.currentMask.extractInput(e,t,s):""}extractTail(e,t){return this.currentMask?this.currentMask.extractTail(e,t):super.extractTail(e,t)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,t){return this.currentMask?this.currentMask.nearestInputPos(e,t):super.nearestInputPos(e,t)}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}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((t,s)=>{if(!e[s])return;const{mask:a,...n}=e[s];return pe(t,n)&&t.maskEquals(a)}):super.maskEquals(e)}typedValueEquals(e){var t;return!!((t=this.currentMask)!=null&&t.typedValueEquals(e))}}ke.DEFAULTS={...H.DEFAULTS,dispatch:(u,e,t,s)=>{if(!e.compiledMasks.length)return;const a=e.rawInputValue,n=e.compiledMasks.map((r,l)=>{const o=e.currentMask===r,h=o?r.displayValue.length:r.nearestInputPos(r.displayValue.length,g.FORCE_LEFT);return r.rawInputValue!==a?(r.reset(),r.append(a,{raw:!0})):o||r.remove(h),r.append(u,e.currentMaskFlags(t)),r.appendTail(s),{index:l,weight:r.rawInputValue.length,totalInputPositions:r.totalInputPositions(0,Math.max(h,r.nearestInputPos(r.displayValue.length,g.FORCE_LEFT)))}});return n.sort((r,l)=>l.weight-r.weight||l.totalInputPositions-r.totalInputPositions),e.compiledMasks[n[0].index]}};E.MaskedDynamic=ke;class ve extends U{constructor(e){super({...ve.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:t,...s}=e;if(t){const a=t.map(l=>l.length),n=Math.min(...a),r=Math.max(...a)-n;s.mask="*".repeat(n),r&&(s.mask+="["+"*".repeat(r)+"]"),this.enum=t}super._update(s)}_appendCharRaw(e,t){t===void 0&&(t={});const s=Math.min(this.nearestInputPos(0,g.FORCE_RIGHT),this.value.length),a=this.enum.filter(n=>this.matchValue(n,this.unmaskedValue+e,s));if(a.length){a.length===1&&this._forEachBlocksInRange(0,this.value.length,(r,l)=>{const o=a[0][l];l>=this.value.length||o===r.value||(r.reset(),r._appendChar(o,t))});const n=super._appendCharRaw(a[0][this.value.length],t);return a.length===1&&a[0].slice(this.unmaskedValue.length).split("").forEach(r=>n.aggregate(super._appendCharRaw(r))),n}return new D({skip:!this.isComplete})}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new K("",e)}remove(e,t){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),e===t)return new D;const s=Math.min(super.nearestInputPos(0,g.FORCE_RIGHT),this.value.length);let a;for(a=e;a>=0&&!(this.enum.filter(r=>this.matchValue(r,this.value.slice(s,a),s)).length>1);--a);const n=super.remove(a,t);return n.tailShift+=a-e,n}get isComplete(){return this.enum.indexOf(this.value)>=0}}ve.DEFAULTS={...U.DEFAULTS,matchValue:(u,e,t)=>u.indexOf(e,t)===t};E.MaskedEnum=ve;class Ge extends H{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}E.MaskedFunction=Ge;var we;class z extends H{constructor(e){super({...z.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),t="\\d*",s=(this.scale?"("+_e(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+t+s),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(_e).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(_e(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const t=e.split(this.radix);return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),t.join(this.radix)}doPrepareChar(e,t){t===void 0&&(t={});const[s,a]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),t);return e&&!s&&(a.skip=!0),s&&!this.allowPositive&&!this.value&&s!=="-"&&a.aggregate(this._appendChar("-")),[s,a]}_separatorsCount(e,t){t===void 0&&(t=!1);let s=0;for(let a=0;a<e;++a)this._value.indexOf(this.thousandsSeparator,a)===a&&(++s,t&&(e+=this.thousandsSeparator.length));return s}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t),this._removeThousandsSeparators(super.extractInput(e,t,s))}_appendCharRaw(e,t){t===void 0&&(t={});const s=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,a=this._separatorsCountFromSlice(s);this._value=this._removeThousandsSeparators(this.value);const n=this._value;this._value+=e;const r=this.number;let l=!isNaN(r),o=!1;if(l){let _;this.min!=null&&this.min<0&&this.number<this.min&&(_=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(_=this.max),_!=null&&(this.autofix?(this._value=this.format(_,this).replace(z.UNMASKED_RADIX,this.radix),o||(o=n===this._value&&!t.tail)):l=!1),l&&(l=!!this._value.match(this._numberRegExp))}let h;l?h=new D({inserted:this._value.slice(n.length),rawInserted:o?"":e,skip:o}):(this._value=n,h=new D),this._value=this._insertThousandsSeparators(this._value);const d=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,p=this._separatorsCountFromSlice(d);return h.tailShift+=(p-a)*this.thousandsSeparator.length,h}_findSeparatorAround(e){if(this.thousandsSeparator){const t=e-this.thousandsSeparator.length+1,s=this.value.indexOf(this.thousandsSeparator,t);if(s<=e)return s}return-1}_adjustRangeWithSeparators(e,t){const s=this._findSeparatorAround(e);s>=0&&(e=s);const a=this._findSeparatorAround(t);return a>=0&&(t=a+this.thousandsSeparator.length),[e,t]}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t);const s=this.value.slice(0,e),a=this.value.slice(t),n=this._separatorsCount(s.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(s+a));const r=this._separatorsCountFromSlice(s);return new D({tailShift:(r-n)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case g.NONE:case g.LEFT:case g.FORCE_LEFT:{const s=this._findSeparatorAround(e-1);if(s>=0){const a=s+this.thousandsSeparator.length;if(e<a||this.value.length<=a||t===g.FORCE_LEFT)return s}break}case g.RIGHT:case g.FORCE_RIGHT:{const s=this._findSeparatorAround(e);if(s>=0)return s+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let t=e;this.min!=null&&(t=Math.max(t,this.min)),this.max!=null&&(t=Math.min(t,this.max)),t!==e&&(this.unmaskedValue=this.format(t,this));let s=this.value;this.normalizeZeros&&(s=this._normalizeZeros(s)),this.padFractionalZeros&&this.scale>0&&(s=this._padFractionalZeros(s)),this._value=s}super.doCommit()}_normalizeZeros(e){const t=this._removeThousandsSeparators(e).split(this.radix);return t[0]=t[0].replace(/^(\D*)(0*)(\d*)/,(s,a,n,r)=>a+r),e.length&&!/\d$/.test(t[0])&&(t[0]=t[0]+"0"),t.length>1&&(t[1]=t[1].replace(/0*$/,""),t[1].length||(t.length=1)),this._insertThousandsSeparators(t.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const t=e.split(this.radix);return t.length<2&&t.push(""),t[1]=t[1].padEnd(this.scale,"0"),t.join(this.radix)}doSkipInvalid(e,t,s){t===void 0&&(t={});const a=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===z.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,t,s)&&!a}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,z.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(z.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)||z.EMPTY_VALUES.includes(e)&&z.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}we=z;z.UNMASKED_RADIX=".";z.EMPTY_VALUES=[...H.EMPTY_VALUES,0];z.DEFAULTS={...H.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[we.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:u=>u.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})};E.MaskedNumber=z;const Ce={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function Te(u,e,t){e===void 0&&(e=Ce.MASKED),t===void 0&&(t=Ce.MASKED);const s=W(u);return a=>s.runIsolated(n=>(n[e]=a,n[t]))}function Ze(u,e,t,s){return Te(e,t,s)(u)}E.PIPE_TYPE=Ce;E.createPipe=Te;E.pipe=Ze;class We extends U{get repeatFrom(){var e;return(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?e:0}get repeatTo(){var e;return(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var t,s,a;const{repeat:n,...r}=ue(e);this._blockOpts=Object.assign({},this._blockOpts,r);const l=W(this._blockOpts);this.repeat=(t=(s=n??l.repeat)!=null?s:this.repeat)!=null?t:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((a=this._blocks)==null?void 0:a.length)||0,this.repeatFrom)),blocks:{m:l},eager:l.eager,overwrite:l.overwrite,skipInvalid:l.skipInvalid,lazy:l.lazy,placeholderChar:l.placeholderChar,displayChar:l.displayChar})}_allocateBlock(e){if(e<this._blocks.length)return this._blocks[e];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(W(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(e,t){t===void 0&&(t={});const s=new D;for(let o=(a=(n=this._mapPosToBlock(this.displayValue.length))==null?void 0:n.index)!=null?a:Math.max(this._blocks.length-1,0),h,d;h=(r=this._blocks[o])!=null?r:d=!d&&this._allocateBlock(o);++o){var a,n,r,l;const p=h._appendChar(e,{...t,_beforeTailState:(l=t._beforeTailState)==null||(l=l._blocks)==null?void 0:l[o]});if(p.skip&&d){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(s.aggregate(p),p.consumed)break}return s}_trimEmptyTail(e,t){var s,a;e===void 0&&(e=0);const n=Math.max(((s=this._mapPosToBlock(e))==null?void 0:s.index)||0,this.repeatFrom,0);let r;t!=null&&(r=(a=this._mapPosToBlock(t))==null?void 0:a.index),r==null&&(r=this._blocks.length-1);let l=0;for(let o=r;n<=o&&!this._blocks[o].unmaskedValue;--o,++l);l&&(this._blocks.splice(r-l+1,l),this.mask=this.mask.slice(l))}reset(){super.reset(),this._trimEmptyTail()}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=super.remove(e,t);return this._trimEmptyTail(e,t),s}totalInputPositions(e,t){return e===void 0&&(e=0),t==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,t)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}}E.RepeatBlock=We;try{globalThis.IMask=E}catch{}var Xe={mask:void 0,prepare:Function,prepareChar:Function,validate:Function,commit:Function,overwrite:{type:Boolean,required:!1,default:void 0},eager:{required:!1,default:void 0,validator:u=>["append","remove"].includes(u)||typeof u=="boolean"},skipInvalid:{type:Boolean,required:!1,default:void 0},placeholderChar:String,displayChar:String,lazy:{type:Boolean,required:!1,default:void 0},definitions:Object,blocks:Object,enum:Array,maxLength:Number,from:Number,to:Number,pattern:String,format:Function,parse:Function,autofix:{required:!1,default:void 0,validator:u=>u==="pad"||typeof u=="boolean"},radix:String,thousandsSeparator:String,mapToRadix:Array,scale:Number,normalizeZeros:{type:Boolean,required:!1,default:void 0},padFractionalZeros:{type:Boolean,required:!1,default:void 0},min:[Number,Date],max:[Number,Date],dispatch:Function};function Je(u,e){let{emit:t,onAccept:s,onComplete:a,defaultValue:n,defaultUnmaskedValue:r,defaultTypedValue:l}=e===void 0?{}:e;const o=i.isRef(u)?u:i.ref(u),h=i.ref(),d=i.ref(),p=i.ref(""),_=i.ref(""),v=i.ref();let x,w=p.value,O=_.value,ee=v.value;function X(){ee=v.value=d.value.typedValue,O=_.value=d.value.unmaskedValue,w=p.value=d.value.value}function S(b){X(),t&&(t("accept",p.value,b),t("accept:masked",p.value,b),t("accept:typed",v.value,b),t("accept:unmasked",_.value,b)),s?.(b)}function I(b){t&&(t("complete",d.value.value,b),t("complete:masked",d.value.value,b),t("complete:typed",d.value.typedValue,b),t("complete:unmasked",d.value.unmaskedValue,b)),a?.(b)}const y=()=>{!d.value||_.value===void 0||(O!==_.value&&(d.value.unmaskedValue=_.value,d.value.unmaskedValue!==_.value&&S()),O=void 0)};i.watch(_,y);const M=()=>{!d.value||p.value===void 0||(w!==p.value&&(d.value.value=p.value,d.value.value!==p.value&&S()),w=void 0)};i.watch(p,M);const L=()=>{!d.value||v.value===void 0||(ee!==v.value&&(d.value.typedValue=v.value,d.value.masked.typedValueEquals(v.value)||S()),ee=void 0)};i.watch(v,L);function P(){x=h.value;const b=o.value;!x||!(b!=null&&b.mask)||(d.value=E(x,b),n!==void 0&&(p.value=n),r!==void 0&&(_.value=r),l!==void 0&&(v.value=l),y(),M(),L(),X(),d.value.on("accept",S).on("complete",I))}function G(){var b;(b=d.value)==null||b.destroy(),d.value=void 0}return i.onMounted(P),i.onUnmounted(G),i.watch([h,o],()=>{const b=h.value,B=o.value;(!(B!=null&&B.mask)||b!==x)&&G(),b&&(d.value?d.value.updateOptions(B):P())}),{el:h,mask:i.readonly(d),masked:p,unmasked:_,typed:v}}function Qe(u,e){return u={...u},Object.keys(u).forEach(t=>{(u[t]===void 0||e.includes(t))&&delete u[t]}),u}const et=["typed","unmasked","value","modelValue"];var tt=i.defineComponent({name:"imask-input",inheritAttrs:!1,props:{modelValue:String,value:String,unmasked:String,typed:{validator:()=>!0},...Xe},emits:["update:modelValue","update:masked","update:value","update:unmasked","update:typed","accept","accept:value","accept:masked","accept:unmasked","accept:typed","complete","complete:value","complete:masked","complete:unmasked","complete:typed"],setup(u,e){let{attrs:t,emit:s}=e;const{el:a,mask:n,masked:r,unmasked:l,typed:o}=Je(Qe(u,et),{emit:s,onAccept:v=>{const x=r.value;s("accept:value",x,v),s("update:value",x,v),s("update:masked",x,v),s("update:modelValue",x,v),s("update:unmasked",l.value,v),s("update:typed",o.value,v)},onComplete:v=>{s("complete:value",r.value,v)}}),h=i.toRef(u,"value"),d=i.toRef(u,"modelValue"),p=i.toRef(u,"unmasked"),_=i.toRef(u,"typed");return r.value=d.value||h.value||"",l.value=p.value||"",o.value=_.value,i.watch(h,v=>r.value=v),i.watch(d,v=>r.value=v),i.watch(p,v=>l.value=v),i.watch(_,v=>o.value=v),()=>{const v={...t,value:u.value!=null?u.value:u.modelValue!=null?u.modelValue:n.value?n.value.displayValue:"",ref:a};return u.mask||(v.onInput=x=>{s("update:modelValue",x.target.value),s("update:value",x.target.value)}),i.h("input",v)}}}),st=tt;const at=["for"],it={class:"state-layer"},nt={class:"content"},rt={class:"input-text-container"},ut=["id","placeholder","aria-label"],lt={key:1,class:"has-text-body-small phila-supporting-text"},ot={key:2,class:"has-text-body-small phila-error-text"},be=i.defineComponent({inheritAttrs:!1,__name:"TextField",props:{modelValue:{default:void 0},className:{default:""},label:{default:""},id:{default:`phila-text-field-${Math.random().toString(36).substring(2,9)}`},imaskProps:{default:void 0},supportingText:{default:""},placeholder:{default:""},leadingIcon:{default:""},trailingIcon:{default:""},error:{default(){return[]}}},emits:["update:modelValue","complete"],setup(u,{emit:e}){const t=i.useAttrs(),s=u,a=i.computed(()=>typeof s.error=="string"?s.error:s.error[0]),n=i.toRef(s,"id"),r=e,l=i.ref(""),o=i.computed({get:()=>s.modelValue!==void 0?s.modelValue:l.value,set:x=>{r("update:modelValue",x),l.value=x}}),h=i.computed(()=>{const x=["default-class"];return t.disabled!=null&&x.push("phila-input--disabled"),a.value&&x.push("phila-input--error"),t.required!=null&&x.push("phila-input--required"),$.cn(...x)}),d=i.computed(()=>{const x=[];return o.value!==""&&x.push("phila-text-field--filled"),s.className&&x.push(s.className),$.cn(...x)}),p=i.computed(()=>{if(!(s.label||t["aria-label"]))return s.placeholder||void 0}),_=i.ref(null),v=x=>{x.target.closest("button")||_.value?.focus()};return(x,w)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["phila-input",h.value])},[s.label?(i.openBlock(),i.createElementBlock("label",{key:0,for:n.value,class:"has-text-label-small phila-label"},i.toDisplayString(s.label),9,at)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(["phila-text-field",d.value]),onClick:i.withModifiers(v,["prevent"])},[i.createElementVNode("div",it,[s.leadingIcon?(i.openBlock(),i.createBlock(i.unref($.Icon),{key:0,"icon-class":s.leadingIcon,inline:"",decorative:""},null,8,["icon-class"])):i.createCommentVNode("",!0),i.createElementVNode("div",nt,[i.createElementVNode("div",rt,[s.imaskProps?.mask?(i.openBlock(),i.createBlock(i.unref(st),i.mergeProps({key:0},{...i.unref(t),...s.imaskProps},{id:n.value,modelValue:o.value,"onUpdate:modelValue":w[0]||(w[0]=O=>o.value=O),class:"phila-text-field-input has-text-body-default",placeholder:s.placeholder,onComplete:w[1]||(w[1]=()=>r("complete",l.value))}),null,16,["id","modelValue","placeholder"])):i.withDirectives((i.openBlock(),i.createElementBlock("input",i.mergeProps({key:1},i.unref(t),{id:n.value,"onUpdate:modelValue":w[2]||(w[2]=O=>o.value=O),class:"phila-text-field-input has-text-body-default",placeholder:s.placeholder,"aria-label":p.value}),null,16,ut)),[[i.vModelDynamic,o.value]])])]),o.value!=""?(i.openBlock(),i.createBlock(i.unref(Pe),{key:1,variant:"standard",size:"small","icon-only":"","icon-definition":i.unref(Ne),onClick:w[3]||(w[3]=O=>o.value="")},null,8,["icon-definition"])):i.createCommentVNode("",!0),s.trailingIcon?(i.openBlock(),i.createBlock(i.unref($.Icon),{key:2,size:"small","icon-class":s.trailingIcon,inline:"",decorative:""},null,8,["icon-class"])):i.createCommentVNode("",!0),i.renderSlot(x.$slots,"trailing-action")])],2),s.supportingText?(i.openBlock(),i.createElementBlock("div",lt,i.toDisplayString(s.supportingText),1)):i.createCommentVNode("",!0),a.value?(i.openBlock(),i.createElementBlock("div",ot,[i.createVNode(i.unref($.Icon),{"icon-definition":i.unref(Oe),size:"small",inline:"",decorative:""},null,8,["icon-definition"]),i.createTextVNode(" "+i.toDisplayString(a.value),1)])):i.createCommentVNode("",!0)],2))}}),ht=["data-toggle","aria-label","aria-expanded","aria-controls"],dt=i.defineComponent({__name:"CollapsePanel",props:{className:{},id:{},group:{default:void 0},blurClose:{type:Boolean,default:!1},openSingle:{type:Boolean,default:!1},mouseOverToggle:{type:Boolean,default:!1},outsideClickClose:{type:Boolean,default:!1},escapeKeyClose:{type:Boolean,default:!1},toggleAttrs:{default:void 0}},setup(u){const e=u,{isCollapsed:t,onMouseEnter:s,onMouseLeave:a,onClickToggle:n,onClickOpen:r,focusChange:l}=$.useCollapse(e),o=i.computed(()=>t(e.id));return(h,d)=>(i.openBlock(),i.createElementBlock("div",{onMouseenter:d[1]||(d[1]=(...p)=>i.unref(s)&&i.unref(s)(...p)),onMouseleave:d[2]||(d[2]=(...p)=>i.unref(a)&&i.unref(a)(...p)),onFocusout:d[3]||(d[3]=(...p)=>i.unref(l)&&i.unref(l)(...p))},[i.renderSlot(h.$slots,"toggle",i.normalizeProps(i.guardReactiveProps({open:o.value,ariaLabel:o.value?"Close panel":"Open panel",ariaExpanded:o.value,ariaControls:u.id,onClickToggle:i.unref(n),onClickOpen:i.unref(r),focusChange:i.unref(l),onClick:i.unref(n)})),()=>[i.createElementVNode("button",i.mergeProps({"data-toggle":u.id,"aria-label":o.value?"Close panel":"Open panel","aria-expanded":o.value,"aria-controls":u.id},u.toggleAttrs,{onClick:d[0]||(d[0]=i.withModifiers((...p)=>i.unref(n)&&i.unref(n)(...p),["prevent"]))}),null,16,ht)]),i.renderSlot(h.$slots,"default",i.normalizeProps(i.guardReactiveProps({id:u.id,open:o.value,onClickToggle:i.unref(n),focusChange:i.unref(l),hidden:!o.value})))],32))}}),ct=["disabled"],pt=i.defineComponent({inheritAttrs:!1,__name:"PhlButton",props:{href:{},to:{},target:{},rel:{},disabled:{type:Boolean,default:!1},clickTarget:{},variant:{default:"primary"},size:{default:"medium"},iconOnly:{type:Boolean,default:!1},iconRight:{type:Boolean},text:{},className:{},iconDefinition:{},iconClass:{},src:{},svgRaw:{}},setup(u){const e=u,t=r=>"href"in r&&r.href!==void 0||"to"in r&&r.to!==void 0,s=i.computed(()=>$.cn("phila-button",`phila-button--${e.variant}`,e.size&&`is-${e.size}`,e.iconOnly&&"icon-button",e.iconOnly&&e.variant==="standard"&&"icon-button--standard",e.className)),a=i.computed(()=>t(e)?"to"in e&&e.to!==void 0?{to:e.to,disabled:e.disabled,className:s.value}:{href:e.href,target:e.target,rel:e.rel,disabled:e.disabled,className:s.value}:{}),n=i.computed(()=>({iconDefinition:e.iconDefinition,iconClass:e.iconClass,src:e.src,iconRight:e.iconRight,iconOnly:e.iconOnly,text:e.text,size:e.size}));return(r,l)=>t(e)?(i.openBlock(),i.createBlock(i.unref($.BaseLink),i.mergeProps({key:0},{...a.value,...r.$attrs},{role:"button"}),{default:i.withCtx(()=>[i.createVNode(i.unref($.ActionContent),i.normalizeProps(i.guardReactiveProps(n.value)),{default:i.withCtx(()=>[i.renderSlot(r.$slots,"default",{},()=>[i.createTextVNode(i.toDisplayString(e.text),1)])]),_:3},16)]),_:3},16)):(i.openBlock(),i.createElementBlock("button",i.mergeProps({key:1,type:"button",disabled:e.disabled,class:s.value},r.$attrs),[i.createVNode(i.unref($.ActionContent),i.normalizeProps(i.guardReactiveProps(n.value)),{default:i.withCtx(()=>[i.renderSlot(r.$slots,"default",{},()=>[i.createTextVNode(i.toDisplayString(e.text),1)])]),_:3},16)],16,ct))}});var ft={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]},mt=ft;function gt(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var ce={exports:{}},kt=ce.exports,De;function vt(){return De||(De=1,(function(u,e){(function(t,s){u.exports=s()})(kt,(function(){var t=1e3,s=6e4,a=36e5,n="millisecond",r="second",l="minute",o="hour",h="day",d="week",p="month",_="quarter",v="year",x="date",w="Invalid Date",O=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,ee=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,X={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(C){var m=["th","st","nd","rd"],c=C%100;return"["+C+(m[(c-20)%10]||m[c]||m[0])+"]"}},S=function(C,m,c){var k=String(C);return!k||k.length>=m?C:""+Array(m+1-k.length).join(c)+C},I={s:S,z:function(C){var m=-C.utcOffset(),c=Math.abs(m),k=Math.floor(c/60),f=c%60;return(m<=0?"+":"-")+S(k,2,"0")+":"+S(f,2,"0")},m:function C(m,c){if(m.date()<c.date())return-C(c,m);var k=12*(c.year()-m.year())+(c.month()-m.month()),f=m.clone().add(k,p),A=c-f<0,F=m.clone().add(k+(A?-1:1),p);return+(-(k+(c-f)/(A?f-F:F-f))||0)},a:function(C){return C<0?Math.ceil(C)||0:Math.floor(C)},p:function(C){return{M:p,y:v,w:d,d:h,D:x,h:o,m:l,s:r,ms:n,Q:_}[C]||String(C||"").toLowerCase().replace(/s$/,"")},u:function(C){return C===void 0}},y="en",M={};M[y]=X;var L="$isDayjsObject",P=function(C){return C instanceof le||!(!C||!C[L])},G=function C(m,c,k){var f;if(!m)return y;if(typeof m=="string"){var A=m.toLowerCase();M[A]&&(f=A),c&&(M[A]=c,f=A);var F=m.split("-");if(!f&&F.length>1)return C(F[0])}else{var V=m.name;M[V]=m,f=V}return!k&&f&&(y=f),f||!k&&y},b=function(C,m){if(P(C))return C.clone();var c=typeof m=="object"?m:{};return c.date=C,c.args=arguments,new le(c)},B=I;B.l=G,B.i=P,B.w=function(C,m){return b(C,{locale:m.$L,utc:m.$u,x:m.$x,$offset:m.$offset})};var le=(function(){function C(c){this.$L=G(c.locale,null,!0),this.parse(c),this.$x=this.$x||c.x||{},this[L]=!0}var m=C.prototype;return m.parse=function(c){this.$d=(function(k){var f=k.date,A=k.utc;if(f===null)return new Date(NaN);if(B.u(f))return new Date;if(f instanceof Date)return new Date(f);if(typeof f=="string"&&!/Z$/i.test(f)){var F=f.match(O);if(F){var V=F[2]-1||0,T=(F[7]||"0").substring(0,3);return A?new Date(Date.UTC(F[1],V,F[3]||1,F[4]||0,F[5]||0,F[6]||0,T)):new Date(F[1],V,F[3]||1,F[4]||0,F[5]||0,F[6]||0,T)}}return new Date(f)})(c),this.init()},m.init=function(){var c=this.$d;this.$y=c.getFullYear(),this.$M=c.getMonth(),this.$D=c.getDate(),this.$W=c.getDay(),this.$H=c.getHours(),this.$m=c.getMinutes(),this.$s=c.getSeconds(),this.$ms=c.getMilliseconds()},m.$utils=function(){return B},m.isValid=function(){return this.$d.toString()!==w},m.isSame=function(c,k){var f=b(c);return this.startOf(k)<=f&&f<=this.endOf(k)},m.isAfter=function(c,k){return b(c)<this.startOf(k)},m.isBefore=function(c,k){return this.endOf(k)<b(c)},m.$g=function(c,k,f){return B.u(c)?this[k]:this.set(f,c)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(c,k){var f=this,A=!!B.u(k)||k,F=B.p(c),V=function(se,Y){var J=B.w(f.$u?Date.UTC(f.$y,Y,se):new Date(f.$y,Y,se),f);return A?J:J.endOf(h)},T=function(se,Y){return B.w(f.toDate()[se].apply(f.toDate("s"),(A?[0,0,0,0]:[23,59,59,999]).slice(Y)),f)},R=this.$W,N=this.$M,j=this.$D,ie="set"+(this.$u?"UTC":"");switch(F){case v:return A?V(1,0):V(31,11);case p:return A?V(1,N):V(0,N+1);case d:var te=this.$locale().weekStart||0,ne=(R<te?R+7:R)-te;return V(A?j-ne:j+(6-ne),N);case h:case x:return T(ie+"Hours",0);case o:return T(ie+"Minutes",1);case l:return T(ie+"Seconds",2);case r:return T(ie+"Milliseconds",3);default:return this.clone()}},m.endOf=function(c){return this.startOf(c,!1)},m.$set=function(c,k){var f,A=B.p(c),F="set"+(this.$u?"UTC":""),V=(f={},f[h]=F+"Date",f[x]=F+"Date",f[p]=F+"Month",f[v]=F+"FullYear",f[o]=F+"Hours",f[l]=F+"Minutes",f[r]=F+"Seconds",f[n]=F+"Milliseconds",f)[A],T=A===h?this.$D+(k-this.$W):k;if(A===p||A===v){var R=this.clone().set(x,1);R.$d[V](T),R.init(),this.$d=R.set(x,Math.min(this.$D,R.daysInMonth())).$d}else V&&this.$d[V](T);return this.init(),this},m.set=function(c,k){return this.clone().$set(c,k)},m.get=function(c){return this[B.p(c)]()},m.add=function(c,k){var f,A=this;c=Number(c);var F=B.p(k),V=function(N){var j=b(A);return B.w(j.date(j.date()+Math.round(N*c)),A)};if(F===p)return this.set(p,this.$M+c);if(F===v)return this.set(v,this.$y+c);if(F===h)return V(1);if(F===d)return V(7);var T=(f={},f[l]=s,f[o]=a,f[r]=t,f)[F]||1,R=this.$d.getTime()+c*T;return B.w(R,this)},m.subtract=function(c,k){return this.add(-1*c,k)},m.format=function(c){var k=this,f=this.$locale();if(!this.isValid())return f.invalidDate||w;var A=c||"YYYY-MM-DDTHH:mm:ssZ",F=B.z(this),V=this.$H,T=this.$m,R=this.$M,N=f.weekdays,j=f.months,ie=f.meridiem,te=function(Y,J,re,oe){return Y&&(Y[J]||Y(k,A))||re[J].slice(0,oe)},ne=function(Y){return B.s(V%12||12,Y,"0")},se=ie||function(Y,J,re){var oe=Y<12?"AM":"PM";return re?oe.toLowerCase():oe};return A.replace(ee,(function(Y,J){return J||(function(re){switch(re){case"YY":return String(k.$y).slice(-2);case"YYYY":return B.s(k.$y,4,"0");case"M":return R+1;case"MM":return B.s(R+1,2,"0");case"MMM":return te(f.monthsShort,R,j,3);case"MMMM":return te(j,R);case"D":return k.$D;case"DD":return B.s(k.$D,2,"0");case"d":return String(k.$W);case"dd":return te(f.weekdaysMin,k.$W,N,2);case"ddd":return te(f.weekdaysShort,k.$W,N,3);case"dddd":return N[k.$W];case"H":return String(V);case"HH":return B.s(V,2,"0");case"h":return ne(1);case"hh":return ne(2);case"a":return se(V,T,!0);case"A":return se(V,T,!1);case"m":return String(T);case"mm":return B.s(T,2,"0");case"s":return String(k.$s);case"ss":return B.s(k.$s,2,"0");case"SSS":return B.s(k.$ms,3,"0");case"Z":return F}return null})(Y)||F.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(c,k,f){var A,F=this,V=B.p(k),T=b(c),R=(T.utcOffset()-this.utcOffset())*s,N=this-T,j=function(){return B.m(F,T)};switch(V){case v:A=j()/12;break;case p:A=j();break;case _:A=j()/3;break;case d:A=(N-R)/6048e5;break;case h:A=(N-R)/864e5;break;case o:A=N/a;break;case l:A=N/s;break;case r:A=N/t;break;default:A=N}return f?A:B.a(A)},m.daysInMonth=function(){return this.endOf(p).$D},m.$locale=function(){return M[this.$L]},m.locale=function(c,k){if(!c)return this.$L;var f=this.clone(),A=G(c,k,!0);return A&&(f.$L=A),f},m.clone=function(){return B.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},C})(),Ae=le.prototype;return b.prototype=Ae,[["$ms",n],["$s",r],["$m",l],["$H",o],["$W",h],["$M",p],["$y",v],["$D",x]].forEach((function(C){Ae[C[1]]=function(m){return this.$g(m,C[0],C[1])}})),b.extend=function(C,m){return C.$i||(C(m,le,b),C.$i=!0),b},b.locale=G,b.isDayjs=P,b.unix=function(C){return b(1e3*C)},b.en=M[y],b.Ls=M,b.p={},b}))})(ce)),ce.exports}var _t=vt();const q=gt(_t),Ct=["id"],Et={class:"date-picker-close is-flex is-justify-flex-end"},yt={class:"date-picker-header is-flex is-justify-space-between is-align-center mb-2 content"},At={class:"calendar is-flex is-flex-wrap content"},Ft=["title","tabindex","disabled","onClick"],xt=["id","title","tabindex","disabled","onClick"],bt=["title","disabled","onClick"],Dt=i.defineComponent({__name:"DatePicker",props:{id:{},close:{type:Function},initialValue:{},min:{},max:{},format:{}},emits:["update:modelValue"],setup(u,{expose:e,emit:t}){const s=u,a=t,n=["Su","Mo","Tu","We","Th","Fr","Sa"],r=i.ref(q(s.initialValue===""?void 0:s.initialValue)),l=i.ref(r.value),o=i.computed(()=>{const S=l.value.daysInMonth();return Array.from({length:S},(I,y)=>l.value.date(y+1))}),h=i.computed(()=>Array.from({length:l.value.date(1).day()},(I,y)=>l.value.date(-y)).reverse()),d=i.computed(()=>Array.from({length:6-l.value.endOf("month").day()},(I,y)=>l.value.endOf("month").add(y+1,"day"))),p=S=>!ye(S,s.min,s.max),_=S=>{r.value=S,a("update:modelValue",r.value.format(s.format)),s.close()},v=S=>{a("update:modelValue",S),S?(r.value=q(S,s.format),l.value=r.value):(r.value=q(),l.value=q())},x=()=>{l.value=l.value.add(1,"month")},w=()=>{l.value=l.value.subtract(1,"month")},O=S=>{const I=document.querySelector("#selected-day");I instanceof HTMLButtonElement&&(S.preventDefault(),I.focus())},ee=S=>{const I=document.querySelector(`#${s.id} button`);I instanceof HTMLButtonElement&&(S.preventDefault(),I.focus())},X=S=>{if(S.key==="Tab"&&!S.shiftKey&&ee(S),["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End"].includes(S.key)){S.preventDefault();const y=document.activeElement;if(y instanceof HTMLButtonElement){const M=Array.from(document.querySelectorAll(".calendar button")).filter(G=>!G.disabled),L=M.indexOf(y);let P=L;switch(S.key){case"ArrowUp":P=L-7;break;case"ArrowDown":P=L+7;break;case"ArrowLeft":P=L-1;break;case"ArrowRight":P=L+1;break;case"Home":P=0;break;case"End":P=M.length-1;break}P>=0&&P<M.length?M[P].focus():P<0?(w(),i.nextTick(()=>{document.querySelector(".calendar > span:last-of-type button:last-of-type")?.focus()})):P>=M.length&&(x(),i.nextTick(()=>{document.querySelector(".calendar button")?.focus()}))}}};return e({update:v,focusDatePicker:O}),(S,I)=>(i.openBlock(),i.createElementBlock("div",{id:u.id,class:"date-picker"},[i.createElementVNode("div",Et,[i.createVNode(i.unref(pt),{id:`${u.id}-date-picker-toggle`,variant:"standard",size:"extra-small","icon-only":"","icon-definition":i.unref(mt),"aria-label":"close date picker",onClick:i.withModifiers(u.close,["prevent"])},null,8,["id","icon-definition","onClick"])]),i.createElementVNode("div",yt,[i.createElementVNode("button",{class:"phila-button icon-button--secondary is-extra-small",onClick:i.withModifiers(w,["prevent"])}," Prev "),i.createElementVNode("span",null,i.toDisplayString(l.value.format("MMMM YYYY")),1),i.createElementVNode("button",{class:"phila-button is-extra-small",onClick:i.withModifiers(x,["prevent"])},"Next")]),i.createElementVNode("div",At,[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(n,y=>i.createElementVNode("span",{key:y,class:"calendar-day is-5 has-text-weight-bold"},i.toDisplayString(y),1)),64)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(h.value,(y,M)=>(i.openBlock(),i.createElementBlock("span",{key:"day-in-previous-month-"+y.date(),class:"calendar-day outside-month is-5"},[i.createElementVNode("button",{class:"phila-button is-extra-small p-2",title:`${y.format("MMMM D, YYYY")}`,tabindex:M===0?0:-1,disabled:p(y),onKeydown:I[0]||(I[0]=L=>X(L)),onClick:i.withModifiers(L=>_(y),["prevent"])},i.toDisplayString(y.date()),41,Ft)]))),128)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.value,(y,M)=>(i.openBlock(),i.createElementBlock("span",{key:`day-in-current-month-${y.date()}`,class:"calendar-day is-5"},[i.createElementVNode("button",{id:y.isSame(r.value,"day")?"selected-day":void 0,class:i.normalizeClass(["phila-button is-extra-small p-2",{active:y.isSame(r.value,"day")}]),title:y.format("MMMM D, YYYY"),tabindex:y.isSame(r.value,"day")||y.month()!==r.value.month()&&M===0?0:-1,disabled:p(y),onKeydown:I[1]||(I[1]=L=>X(L)),onClick:i.withModifiers(()=>_(y),["prevent"])},i.toDisplayString(y.date()),43,xt)]))),128)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(d.value,y=>(i.openBlock(),i.createElementBlock("span",{key:"day-in-next-month-"+y.date(),class:"calendar-day outside-month is-5"},[i.createElementVNode("button",{class:"phila-button is-extra-small p-2",title:`${y.format("MMMM D, YYYY")}`,tabindex:"-1",disabled:p(y),onKeydown:I[2]||(I[2]=M=>X(M)),onClick:i.withModifiers(M=>_(y),["prevent"])},i.toDisplayString(y.date()),41,bt)]))),128))])],8,Ct))}}),St=(u,e)=>{const t=u.__vccOpts||u;for(const[s,a]of e)t[s]=a;return t},Bt=St(Dt,[["__scopeId","data-v-225c8851"]]),Vt=i.defineComponent({inheritAttrs:!1,__name:"DateField",props:{format:{default:"MM/DD/YYYY"},datePicker:{type:Boolean},imaskProps:{default:()=>({mask:Date,pattern:"m/d/Y",format:u=>q(u).format("MM/DD/YYYY"),parse:u=>q(u,"MM/DD/YYYY").toDate()})},datePickerOptions:{},min:{},max:{},className:{},modelValue:{},label:{},id:{default:()=>$.generateRandomId("phila-date-field-")},supportingText:{},placeholder:{},leadingIcon:{},trailingIcon:{},error:{}},setup(u){const e=u,t=i.useAttrs(),s=i.useTemplateRef("datePicker"),a=i.ref(e.modelValue),n=i.ref(""),r=i.computed(()=>$.cn("default-class",e.className)),l=h=>{a.value=h},o=h=>{(e.min||e.max)&&(ye(h,e.min,e.max)?n.value="":n.value="Selected date should be between "+q(e.min).format(e.format)+" and "+q(e.max).format(e.format)),s.value?.update(h)};return(h,d)=>u.datePicker?(i.openBlock(),i.createBlock(i.unref(dt),{key:0,id:`${e.id}-date-picker`,group:"date-picker","outside-click-close":"","escape-key-close":"","open-single":""},{toggle:i.withCtx(p=>[i.createVNode(i.unref(be),i.mergeProps({...i.unref(t),...e},{modelValue:a.value,"onUpdate:modelValue":[d[0]||(d[0]=_=>a.value=_),l],class:r.value,"aria-controls":p.ariaControls,"trailing-icon":"fa-solid fa-calendar",min:void 0,max:void 0,error:n.value||e.error,onFocus:_=>p.open?null:p?.onClickToggle(_),onClick:_=>p.open?null:p?.onClickOpen(_),onKeydown:d[1]||(d[1]=i.withKeys(_=>s.value?.focusDatePicker(_),["tab"])),onComplete:o}),null,16,["modelValue","class","aria-controls","error","onFocus","onClick"])]),default:i.withCtx(({open:p,id:_,onClickToggle:v})=>[p?(i.openBlock(),i.createBlock(Bt,i.mergeProps({key:0,id:_,ref:"datePicker"},e.datePickerOptions,{"initial-value":a.value,min:e.min,max:e.max,format:e.format,close:v,"onUpdate:modelValue":l}),null,16,["id","initial-value","min","max","format","close"])):i.createCommentVNode("",!0)]),_:1},8,["id"])):(i.openBlock(),i.createBlock(i.unref(be),i.mergeProps({key:1},{...i.unref(t),...e},{modelValue:a.value,"onUpdate:modelValue":[d[2]||(d[2]=p=>a.value=p),l],class:r.value,label:"Date field","trailing-icon":"fa-solid fa-calendar",errors:n.value||e.error,min:void 0,max:void 0}),null,16,["modelValue","class","errors"]))}}),ye=(u,e,t)=>{typeof u=="string"&&(u=q(u));const s=e?q(e):null,a=t?q(t):null;return!(s&&u.isBefore(s,"day")||a&&u.isAfter(a,"day"))};exports.DateField=Vt;exports.isInDateRange=ye;
package/dist/index.mjs CHANGED
@@ -3302,7 +3302,7 @@ const X = /* @__PURE__ */ es(as), is = ["id"], ns = { class: "date-picker-close
3302
3302
  for (const [s, a] of e)
3303
3303
  t[s] = a;
3304
3304
  return t;
3305
- }, ps = /* @__PURE__ */ cs(ds, [["__scopeId", "data-v-8fd98834"]]), gs = /* @__PURE__ */ ve({
3305
+ }, ps = /* @__PURE__ */ cs(ds, [["__scopeId", "data-v-225c8851"]]), gs = /* @__PURE__ */ ve({
3306
3306
  inheritAttrs: !1,
3307
3307
  __name: "DateField",
3308
3308
  props: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phila/phila-ui-date-field",
3
- "version": "0.0.9-beta.0",
3
+ "version": "0.0.9-beta.2",
4
4
  "type": "module",
5
5
  "description": "A date input component.",
6
6
  "main": "./dist/index.js",
@@ -30,10 +30,10 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "dayjs": "^1.11.19",
33
- "@phila/phila-ui-core": "2.3.3-beta.0",
34
- "@phila/phila-ui-text-field": "1.1.3-beta.0",
35
- "@phila/phila-ui-collapse-panel": "0.1.1-beta.0",
36
- "@phila/phila-ui-button": "2.2.3-beta.0"
33
+ "@phila/phila-ui-core": "2.4.0-beta.2",
34
+ "@phila/phila-ui-text-field": "1.1.3-beta.2",
35
+ "@phila/phila-ui-collapse-panel": "0.1.1-beta.2",
36
+ "@phila/phila-ui-button": "2.2.3-beta.2"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/node": "^24.0.0",