vue-spear-tip 0.2.2 → 0.2.4

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.
Files changed (56) hide show
  1. package/dist/.vite/manifest.json +45 -17
  2. package/dist/{Button-DZlKBvlw.js → Button-B9kTMsWx.js} +1 -1
  3. package/dist/{Button-DpDqwLlR.cjs → Button-n3ORJB24.cjs} +1 -1
  4. package/dist/{CodeHighlight-WaVjepT3.cjs → CodeHighlight-DKD4c3o1.cjs} +1 -1
  5. package/dist/{CodeHighlight-BONqkePV.js → CodeHighlight-zWW7mCKo.js} +1 -1
  6. package/dist/{DateField-BwOE2XuE.cjs → DateField-B15N_Er2.cjs} +4 -4
  7. package/dist/{DateField-DCshiDON.js → DateField-CLsz3fl7.js} +8 -7
  8. package/dist/FieldComponent.vue_vue_type_script_lang-CuwGxCct.cjs +1 -0
  9. package/dist/FieldComponent.vue_vue_type_script_lang-a0D3sf1R.js +10 -0
  10. package/dist/{SelectField-DJg-e6r7.cjs → SelectField-C8v92730.cjs} +6 -6
  11. package/dist/{SelectField-C97iZqqJ.js → SelectField-Dg0c03Hn.js} +100 -93
  12. package/dist/{StringField-q2EjZuwT.js → StringField-CN2J5hnc.js} +36 -35
  13. package/dist/StringField-SQwneDFM.cjs +1 -0
  14. package/dist/{Tabs-i2bTEtg7.js → Tabs-Btq9At3D.js} +1 -1
  15. package/dist/{Tabs--qXAltMn.cjs → Tabs-bdR0rIkV.cjs} +1 -1
  16. package/dist/TextField-CEstqDvf.js +19365 -0
  17. package/dist/TextField-DwbNmleH.cjs +149 -0
  18. package/dist/components/Fields/TextField/index.d.ts +2 -0
  19. package/dist/components/LazyComponents.d.ts +3 -6
  20. package/dist/{index-hQ1VmssH.js → index-Bm3M_ugz.js} +139 -138
  21. package/dist/{index-BmhExWks.cjs → index-pJmyVDoY.cjs} +1 -1
  22. package/dist/index.d.ts +1 -1
  23. package/dist/kit/fields/index.d.ts +2 -1
  24. package/dist/replaceable/FieldComponent.vue +1 -3
  25. package/dist/vue-spear-tip.cjs.js +1 -1
  26. package/dist/vue-spear-tip.css +1 -1
  27. package/dist/vue-spear-tip.es.js +10 -9
  28. package/docs/index.html +2 -2
  29. package/docs/static/Button-BUq3qi9I.js +1 -0
  30. package/docs/static/{CodeHighlight-DwP55Obc.js → CodeHighlight-BKaQtkER.js} +1 -1
  31. package/docs/static/DateField-BOXDZRGA.js +31 -0
  32. package/docs/static/FieldComponent.vue_vue_type_script_lang-CKikbrmF.js +1 -0
  33. package/docs/static/{SelectField-DdvXIk4C.js → SelectField-CWS45VNb.js} +7 -7
  34. package/docs/static/{StringField-BqYql_dk.js → StringField-DWX_WNoM.js} +1 -1
  35. package/docs/static/{StringField-DV9336PV.css → StringField-whdxCITB.css} +1 -1
  36. package/docs/static/Tabs-BNDTIJ3z.js +1 -0
  37. package/docs/static/TextField-CXCoqL3z.js +149 -0
  38. package/docs/static/TextField-DInjI1Vp.css +1 -0
  39. package/docs/static/index-D8NZNe9k.js +2 -0
  40. package/docs/static/main-D7RDfHbv.css +1 -0
  41. package/docs/static/main-b2Vu8ssu.js +103 -0
  42. package/package.json +23 -1
  43. package/dist/StringField-BiddnfN1.cjs +0 -1
  44. package/docs/static/Button-BI5BLid9.js +0 -1
  45. package/docs/static/ButtonInherited-Dwuz_QB-.js +0 -1
  46. package/docs/static/DateField-BD-4IMMe.js +0 -31
  47. package/docs/static/FieldComponent.vue_vue_type_script_lang-Dwp-wLcy.js +0 -1
  48. package/docs/static/Tabs-CwTc00Yi.js +0 -1
  49. package/docs/static/index-BXtpWRTc.js +0 -2
  50. package/docs/static/index-BeNEN9J-.js +0 -2
  51. package/docs/static/index-CMpYTAiF.js +0 -2
  52. package/docs/static/index-DMKgrxE1.js +0 -2
  53. package/docs/static/index-Dsi6A5t5.js +0 -2
  54. package/docs/static/index-Nc0Poa_J.js +0 -2
  55. package/docs/static/main-C7jrUur6.css +0 -1
  56. package/docs/static/main-C8MaaDZb.js +0 -103
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-spear-tip",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "vite build --mode examples-build",
@@ -31,13 +31,35 @@
31
31
  "@bunchtogether/vite-plugin-flow": "^1.0.2",
32
32
  "@heroicons/vue": "^2.2.0",
33
33
  "@rollup/plugin-typescript": "^12.1.4",
34
+ "@tiptap/core": "^3.7.2",
35
+ "@tiptap/extension-bubble-menu": "^3.7.2",
36
+ "@tiptap/extension-code-block-lowlight": "^3.7.2",
37
+ "@tiptap/extension-color": "^3.7.2",
38
+ "@tiptap/extension-focus": "^3.7.2",
39
+ "@tiptap/extension-font-family": "^3.7.2",
40
+ "@tiptap/extension-highlight": "^3.7.2",
41
+ "@tiptap/extension-history": "^3.7.2",
42
+ "@tiptap/extension-image": "^3.7.2",
43
+ "@tiptap/extension-link": "^3.7.2",
44
+ "@tiptap/extension-list-item": "^3.7.2",
45
+ "@tiptap/extension-placeholder": "^3.7.2",
46
+ "@tiptap/extension-text-align": "^3.7.2",
47
+ "@tiptap/extension-text-style": "^3.7.2",
48
+ "@tiptap/extension-underline": "^3.7.2",
49
+ "@tiptap/pm": "^3.7.2",
50
+ "@tiptap/starter-kit": "^3.7.2",
51
+ "@tiptap/vue-3": "^3.7.2",
52
+ "@types/yaireo__tagify": "^4.27.0",
34
53
  "@vitejs/plugin-vue": "^6.0.1",
54
+ "@yaireo/tagify": "^4.35.4",
35
55
  "flatpickr": "^4.6.13",
36
56
  "highlight.js": "^11.11.1",
37
57
  "pug": "^3.0.3",
38
58
  "sass-embedded": "^1.93.2",
39
59
  "temporal-polyfill": "^0.3.0",
40
60
  "tippy.js": "^6.3.7",
61
+ "tiptap": "^1.32.2",
62
+ "tiptap-markdown": "^0.9.0",
41
63
  "typescript": "^5.9.3",
42
64
  "unocss": "^66.5.3",
43
65
  "unocss-preset-scalpel": "^1.2.7",
@@ -1 +0,0 @@
1
- "use strict";var Ue=Object.defineProperty;var h=(r,e)=>Ue(r,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("./index-BmhExWks.cjs"),o=require("vue"),$e=require("./_plugin-vue_export-helper-BaHX9ZKS.cjs");function w(r){return typeof r=="string"||r instanceof String}h(w,"isString");function Me(r){var e;return typeof r=="object"&&r!=null&&(r==null||(e=r.constructor)==null?void 0:e.name)==="Object"}h(Me,"isObject");function Re(r,e){return Array.isArray(e)?Re(r,(t,s)=>e.includes(s)):Object.entries(r).reduce((t,s)=>{let[i,a]=s;return e(a,i)&&(t[i]=a),t},{})}h(Re,"pick");const p={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Ye(r){switch(r){case p.LEFT:return p.FORCE_LEFT;case p.RIGHT:return p.FORCE_RIGHT;default:return r}}h(Ye,"forceDirection");function ae(r){return r.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}h(ae,"escapeRegExp");function z(r,e){if(e===r)return!0;const t=Array.isArray(e),s=Array.isArray(r);let i;if(t&&s){if(e.length!=r.length)return!1;for(i=0;i<e.length;i++)if(!z(e[i],r[i]))return!1;return!0}if(t!=s)return!1;if(e&&r&&typeof e=="object"&&typeof r=="object"){const a=e instanceof Date,n=r instanceof Date;if(a&&n)return e.getTime()==r.getTime();if(a!=n)return!1;const u=e instanceof RegExp,l=r instanceof RegExp;if(u&&l)return e.toString()==r.toString();if(u!=l)return!1;const d=Object.keys(e);for(i=0;i<d.length;i++)if(!Object.prototype.hasOwnProperty.call(r,d[i]))return!1;for(i=0;i<d.length;i++)if(!z(r[d[i]],e[d[i]]))return!1;return!0}else if(e&&r&&typeof e=="function"&&typeof r=="function")return e.toString()===r.toString();return!1}h(z,"objectIncludes");const ce=class ce{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?p.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?p.RIGHT:p.LEFT}};h(ce,"ActionDetails");let ne=ce;function f(r,e){return new f.InputMask(r,e)}h(f,"IMask");function Oe(r){if(r==null)throw new Error("mask property should be defined");return r instanceof RegExp?f.MaskedRegExp:w(r)?f.MaskedPattern:r===Date?f.MaskedDate:r===Number?f.MaskedNumber:Array.isArray(r)||r===Array?f.MaskedDynamic:f.Masked&&r.prototype instanceof f.Masked?r:f.Masked&&r instanceof f.Masked?r.constructor:r instanceof Function?f.MaskedFunction:(console.warn("Mask not found for mask",r),f.Masked)}h(Oe,"maskedClass");function $(r){if(!r)throw new Error("Options in not defined");if(f.Masked){if(r.prototype instanceof f.Masked)return{mask:r};const{mask:e=void 0,...t}=r instanceof f.Masked?{mask:r}:Me(r)&&r.mask instanceof f.Masked?r:{};if(e){const s=e.mask;return{...Re(e,(i,a)=>!a.startsWith("_")),mask:e.constructor,_mask:s,...t}}}return Me(r)?{...r}:{mask:r}}h($,"normalizeOpts");function S(r){if(f.Masked&&r instanceof f.Masked)return r;const e=$(r),t=Oe(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)}h(S,"createMask");f.createMask=S;const fe=class fe{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}};h(fe,"MaskElement");let Y=fe;f.MaskElement=Y;const Te=90,je=89,me=class me extends Y{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===Te&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===je&&e.ctrlKey))return e.preventDefault(),this._handlers.redo(e);if(this._handlers.undo&&e.keyCode===Te&&(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={}}};h(me,"HTMLMaskElement");let P=me;f.HTMLMaskElement=P;const ke=class ke extends P{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}};h(ke,"HTMLInputMaskElement");let re=ke;f.HTMLMaskElement=P;const ge=class ge extends P{get _unsafeSelectionStart(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,i=t&&t.focusOffset;return i==null||s==null||s<i?s:i}get _unsafeSelectionEnd(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,i=t&&t.focusOffset;return i==null||s==null||s>i?s:i}_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 i=this.rootElement,a=i.getSelection&&i.getSelection();a&&(a.removeAllRanges(),a.addRange(s))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}};h(ge,"HTMLContenteditableMaskElement");let K=ge;f.HTMLContenteditableMaskElement=K;const J=class J{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>J.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}};h(J,"InputHistory");let H=J;H.MAX_LENGTH=100;const ve=class ve{constructor(e,t){this.el=e instanceof Y?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new K(e):new re(e),this.masked=S(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new H,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 f.Masked)&&this.masked.constructor===Oe(e)){this.masked.updateOptions({mask:e});return}const t=e instanceof f.Masked?e:S({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(i=>i(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&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const t=this.masked.unmaskedValue,s=this.masked.value,i=this.masked.rawInputValue,a=this.displayValue,n=this.unmaskedValue!==t||this.value!==s||this._rawInputValue!==i;this._unmaskedValue=t,this._value=s,this._rawInputValue=i,this.el.value!==a&&(this.el.value=a),e==="auto"?this.alignCursor():e!=null&&(this.cursorPos=e),n&&this._fireChangeEvents(),!this._historyChanging&&(n||this.history.isEmpty)&&this.history.push({unmaskedValue:t,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:t,...s}=e,i=!this.maskEquals(t),a=this.masked.optionsIsChanged(s);i&&(this.mask=t),a&&this.masked.updateOptions(s),(i||a)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,p.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 ne({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),s=this.masked.rawInputValue,i=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,a=s===this.masked.rawInputValue?t.removeDirection:p.NONE;let n=this.masked.nearestInputPos(t.startChangePos+i,a);a!==p.NONE&&(n=this.masked.nearestInputPos(n,p.NONE)),this.updateControl(n),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}};h(ve,"InputMask");let ue=ve;f.InputMask=ue;const Q=class Q{static normalize(e){return Array.isArray(e)?e:[e,new Q]}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}};h(Q,"ChangeDetails");let m=Q;f.ChangeDetails=m;const _e=class _e{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}};h(_e,"ContinuousTailDetails");let F=_e;const R=class R{constructor(e){this._value="",this._update({...R.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 F(this.extractInput(e,t),e)}appendTail(e){return w(e)&&(e=new F(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new m({inserted:e,rawInserted:e})):new m}_appendChar(e,t,s){t===void 0&&(t={});const i=this.state;let a;if([e,a]=this.doPrepareChar(e,t),e&&(a=a.aggregate(this._appendCharRaw(e,t)),!a.rawInserted&&this.autofix==="pad")){const n=this.state;this.state=i;let u=this.pad(t);const l=this._appendCharRaw(e,t);u=u.aggregate(l),l.rawInserted||u.equals(a)?a=u:this.state=n}if(a.inserted){let n,u=this.doValidate(t)!==!1;if(u&&s!=null){const l=this.state;if(this.overwrite===!0){n=s.state;for(let c=0;c<a.rawInserted.length;++c)s.unshift(this.displayValue.length-a.tailShift)}let d=this.appendTail(s);if(u=d.rawInserted.length===s.toString().length,!(u&&d.inserted)&&this.overwrite==="shift"){this.state=l,n=s.state;for(let c=0;c<a.rawInserted.length;++c)s.shift();d=this.appendTail(s),u=d.rawInserted.length===s.toString().length}u&&d.inserted&&(this.state=l)}u||(a=new m,this.state=i,s&&n&&(s.state=n))}return a}_appendPlaceholder(){return new m}_appendEager(){return new m}append(e,t,s){if(!w(e))throw new Error("value should be string");const i=w(s)?new F(String(s)):s;t!=null&&t.tail&&(t._beforeTailState=this.state);let a;[e,a]=this.doPrepare(e,t);for(let n=0;n<e.length;++n){const u=this._appendChar(e[n],t,i);if(!u.rawInserted&&!this.doSkipInvalid(e[n],t,i))break;a.aggregate(u)}return(this.eager===!0||this.eager==="append")&&t!=null&&t.input&&e&&a.aggregate(this._appendEager()),i!=null&&(a.tailShift+=this.appendTail(i).tailShift),a}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 m}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const t=this.rawInputValue,s=this.value,i=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,i}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={}),m.normalize(this.prepare?this.prepare(e,this,t):e)}doPrepareChar(e,t){return t===void 0&&(t={}),m.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,i,a){s===void 0&&(s=""),i===void 0&&(i=p.NONE),a===void 0&&(a={input:!0});const n=e+t,u=this.extractTail(n),l=this.eager===!0||this.eager==="remove";let d;l&&(i=Ye(i),d=this.extractInput(0,n,{raw:!0}));let c=e;const g=new m;if(i!==p.NONE&&(c=this.nearestInputPos(e,t>1&&e!==0&&!l?p.NONE:i),g.tailShift=c-e),g.aggregate(this.remove(c)),l&&i!==p.NONE&&d===this.rawInputValue)if(i===p.FORCE_LEFT){let v;for(;d===this.rawInputValue&&(v=this.displayValue.length);)g.aggregate(new m({tailShift:-1})).aggregate(this.remove(v-1))}else i===p.FORCE_RIGHT&&u.unshift();return g.aggregate(this.append(s,a,u))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!z(this,e)}typedValueEquals(e){const t=this.typedValue;return e===t||R.EMPTY_VALUES.includes(e)&&R.EMPTY_VALUES.includes(t)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new m}};h(R,"Masked");let E=R;E.DEFAULTS={skipInvalid:!0};E.EMPTY_VALUES=[void 0,null,""];f.Masked=E;const D=class D{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=w(e)?new F(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 F)s?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof D){if(e.stop==null){let i;for(;e.chunks.length&&e.chunks[0].stop==null;)i=e.chunks.shift(),i.from+=e.from,this.extend(i)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof f.MaskedPattern))return new F(this.toString()).appendTo(e);const t=new m;for(let s=0;s<this.chunks.length;++s){const i=this.chunks[s],a=e._mapPosToBlock(e.displayValue.length),n=i.stop;let u;if(n!=null&&(!a||a.index<=n)&&((i instanceof D||e._stops.indexOf(n)>=0)&&t.aggregate(e._appendPlaceholder(n)),u=i instanceof D&&e._blocks[n]),u){const l=u.appendTail(i);t.aggregate(l);const d=i.toString().slice(l.rawInserted.length);d&&t.aggregate(e.append(d,{tail:!0}))}else t.aggregate(e.append(i.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(i=>{const a="chunks"in i?new D:new F;return a.state=i,a})}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 i=this.chunks[s],a=i.unshift(t);if(i.toString()){if(!a)break;++s}else this.chunks.splice(s,1);if(a)return a}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""}};h(D,"ChunksTailDetails");let Z=D;const Ce=class Ce{constructor(e,t){this.masked=e,this._log=[];const{offset:s,index:i}=e._mapPosToBlock(t)||(t<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=s,this.index=i,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((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,p.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,p.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,p.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,p.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,p.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,p.NONE),!0})}};h(Ce,"PatternCursor");let le=Ce;const Ee=class Ee{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 m}nearestInputPos(e,t){t===void 0&&(t=p.NONE);const s=0,i=this._value.length;switch(t){case p.LEFT:case p.FORCE_LEFT:return s;case p.NONE:case p.RIGHT:case p.FORCE_RIGHT:default:return i}}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 m;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 m({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 m;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new F("")}appendTail(e){return w(e)&&(e=new F(String(e))),e.appendTo(this)}append(e,t,s){const i=this._appendChar(e[0],t);return s!=null&&(i.tailShift+=this.appendTail(s).tailShift),i}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()}};h(Ee,"PatternFixedDefinition");let G=Ee;const Ae=class Ae{constructor(e){const{parent:t,isOptional:s,placeholderChar:i,displayChar:a,lazy:n,eager:u,...l}=e;this.masked=S(l),Object.assign(this,{parent:t,isOptional:s,placeholderChar:i,displayChar:a,lazy:n,eager:u})}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 m}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 m;const s=this.masked.state;let i=this.masked._appendChar(e,this.currentMaskFlags(t));return i.inserted&&this.doValidate(t)===!1&&(i=new m,this.masked.state=s),!i.inserted&&!this.isOptional&&!this.lazy&&!t.input&&(i.inserted=this.placeholderChar),i.skip=!i.inserted&&!this.isOptional,this.isFilled=!!i.inserted,i}append(e,t,s){return this.masked.append(e,this.currentMaskFlags(t),s)}_appendPlaceholder(){return this.isFilled||this.isOptional?new m:(this.isFilled=!0,new m({inserted:this.placeholderChar}))}_appendEager(){return new m}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=p.NONE);const s=0,i=this.value.length,a=Math.min(Math.max(e,s),i);switch(t){case p.LEFT:case p.FORCE_LEFT:return this.isComplete?a:s;case p.RIGHT:case p.FORCE_RIGHT:return this.isComplete?a:i;case p.NONE:default:return a}}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 m}};h(Ae,"PatternInputDefinition");let U=Ae;U.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]/,"*":/./};const Fe=class Fe extends E{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=s=>s.search(t)>=0),super._update(e)}};h(Fe,"MaskedRegExp");let oe=Fe;f.MaskedRegExp=oe;const O=class O extends E{constructor(e){super({...O.DEFAULTS,...e,definitions:Object.assign({},U.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,i=!1;for(let a=0;a<t.length;++a){if(this.blocks){const d=t.slice(a),c=Object.keys(this.blocks).filter(v=>d.indexOf(v)===0);c.sort((v,k)=>k.length-v.length);const g=c[0];if(g){const{expose:v,repeat:k,...C}=$(this.blocks[g]),T={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...C,repeat:k,parent:this},I=k!=null?new f.RepeatBlock(T):S(T);I&&(this._blocks.push(I),v&&(this.exposeBlock=I),this._maskedBlocks[g]||(this._maskedBlocks[g]=[]),this._maskedBlocks[g].push(this._blocks.length-1)),a+=g.length-1;continue}}let n=t[a],u=n in e;if(n===O.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(n==="{"||n==="}"){s=!s;continue}if(n==="["||n==="]"){i=!i;continue}if(n===O.ESCAPE_CHAR){if(++a,n=t[a],!n)break;u=!1}const l=u?new U({isOptional:i,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...$(e[n]),parent:this}):new G({char:n,eager:this.eager,isUnmasking:s});this._blocks.push(l)}}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((i,a)=>i.state=t[a]),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 m;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 i=s;i<this._blocks.length;++i){const a=this._blocks[i]._appendEager();if(!a.inserted)break;t.aggregate(a)}return t}_appendCharRaw(e,t){t===void 0&&(t={});const s=this._mapPosToBlock(this.displayValue.length),i=new m;if(!s)return i;for(let n=s.index,u;u=this._blocks[n];++n){var a;const l=u._appendChar(e,{...t,_beforeTailState:(a=t._beforeTailState)==null||(a=a._blocks)==null?void 0:a[n]});if(i.aggregate(l),l.consumed)break}return i}extractTail(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=new Z;return e===t||this._forEachBlocksInRange(e,t,(i,a,n,u)=>{const l=i.extractTail(n,u);l.stop=this._findStopBefore(a),l.from=this._blockStartPos(a),l instanceof Z&&(l.blockIndex=a),s.extend(l)}),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 i="";return this._forEachBlocksInRange(e,t,(a,n,u,l)=>{i+=a.extractInput(u,l,s)}),i}_findStopBefore(e){let t;for(let s=0;s<this._stops.length;++s){const i=this._stops[s];if(i<=e)t=i;else break}return t}_appendPlaceholder(e){const t=new m;if(this.lazy&&e==null)return t;const s=this._mapPosToBlock(this.displayValue.length);if(!s)return t;const i=s.index,a=e??this._blocks.length;return this._blocks.slice(i,a).forEach(n=>{if(!n.lazy||e!=null){var u;t.aggregate(n._appendPlaceholder((u=n._blocks)==null?void 0:u.length))}}),t}_mapPosToBlock(e){let t="";for(let s=0;s<this._blocks.length;++s){const i=this._blocks[s],a=t.length;if(t+=i.displayValue,e<=t.length)return{index:s,offset:e-a}}}_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 i=this._mapPosToBlock(e);if(i){const a=this._mapPosToBlock(t),n=a&&i.index===a.index,u=i.offset,l=a&&n?a.offset:this._blocks[i.index].displayValue.length;if(s(this._blocks[i.index],i.index,u,l),a&&!n){for(let d=i.index+1;d<a.index;++d)s(this._blocks[d],d,0,this._blocks[d].displayValue.length);s(this._blocks[a.index],a.index,0,a.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,(i,a,n,u)=>{s.aggregate(i.remove(n,u))}),s}nearestInputPos(e,t){if(t===void 0&&(t=p.NONE),!this._blocks.length)return 0;const s=new le(this,e);if(t===p.NONE)return s.pushRightBeforeInput()||(s.popState(),s.pushLeftBeforeInput())?s.pos:this.displayValue.length;if(t===p.LEFT||t===p.FORCE_LEFT){if(t===p.LEFT){if(s.pushRightBeforeFilled(),s.ok&&s.pos===e)return e;s.popState()}if(s.pushLeftBeforeInput(),s.pushLeftBeforeRequired(),s.pushLeftBeforeFilled(),t===p.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===p.FORCE_LEFT?0:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:0)}return t===p.RIGHT||t===p.FORCE_RIGHT?(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.pushRightBeforeFilled()?s.pos:t===p.FORCE_RIGHT?this.displayValue.length:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:this.nearestInputPos(e,p.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,(i,a,n,u)=>{s+=i.totalInputPositions(n,u)}),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 m;return this._forEachBlocksInRange(0,this.displayValue.length,s=>t.aggregate(s.pad(e))),t}};h(O,"MaskedPattern");let A=O;A.DEFAULTS={...E.DEFAULTS,lazy:!0,placeholderChar:"_"};A.STOP_CHAR="`";A.ESCAPE_CHAR="\\";A.InputDefinition=U;A.FixedDefinition=G;f.MaskedPattern=A;const ye=class ye extends A{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:i=this.maxLength||0,autofix:a=this.autofix,...n}=e;this.to=t,this.from=s,this.maxLength=Math.max(String(t).length,i),this.autofix=a;const u=String(this.from).padStart(this.maxLength,"0"),l=String(this.to).padStart(this.maxLength,"0");let d=0;for(;d<l.length&&l[d]===u[d];)++d;n.mask=l.slice(0,d).replace(/0/g,"\\0")+"0".repeat(this.maxLength-d),super._update(n)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let t="",s="";const[,i,a]=e.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(t="0".repeat(i.length)+a,s="9".repeat(i.length)+a),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"),i=String(this.to).padStart(this.maxLength,"0"),[a,n]=this.boundaries(this.value+e);return Number(n)<this.from?super._appendCharRaw(s[this.value.length],t):Number(a)>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(i[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[i,a]=this.boundaries(t);return this.from<=Number(a)&&Number(i)<=this.to&&super.doValidate(e)}pad(e){const t=new m;if(this.value.length===this.maxLength)return t;const s=this.value,i=this.maxLength-this.value.length;if(i){this.reset();for(let a=0;a<i;++a)t.aggregate(super._appendCharRaw("0",e));s.split("").forEach(a=>this._appendCharRaw(a))}return t}};h(ye,"MaskedRange");let L=ye;f.MaskedRange=L;const qe="d{.}`m{.}`Y",x=class x extends A{static extractPatternOptions(e){const{mask:t,pattern:s,...i}=e;return{...i,mask:w(t)?t:s}}constructor(e){super(x.extractPatternOptions({...x.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:t,pattern:s,blocks:i,...a}={...x.DEFAULTS,...e},n=Object.assign({},x.GET_DEFAULT_BLOCKS());e.min&&(n.Y.from=e.min.getFullYear()),e.max&&(n.Y.to=e.max.getFullYear()),e.min&&e.max&&n.Y.from===n.Y.to&&(n.m.from=e.min.getMonth()+1,n.m.to=e.max.getMonth()+1,n.m.from===n.m.to&&(n.d.from=e.min.getDate(),n.d.to=e.max.getDate())),Object.assign(n,this.blocks,i),super._update({...a,mask:w(t)?t:s,blocks:n})}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(x.extractPatternOptions(e))}};h(x,"MaskedDate");let j=x;j.GET_DEFAULT_BLOCKS=()=>({d:{mask:L,from:1,to:31,maxLength:2},m:{mask:L,from:1,to:12,maxLength:2},Y:{mask:L,from:1900,to:9999}});j.DEFAULTS={...A.DEFAULTS,mask:Date,pattern:qe,format:h((r,e)=>{if(!r)return"";const t=String(r.getDate()).padStart(2,"0"),s=String(r.getMonth()+1).padStart(2,"0"),i=r.getFullYear();return[t,s,i].join(".")},"format"),parse:h((r,e)=>{const[t,s,i]=r.split(".").map(Number);return new Date(i,s-1,t)},"parse")};f.MaskedDate=j;const ee=class ee extends E{constructor(e){super({...ee.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,...i}=$(t),a=S({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...i});return s&&(this.exposeMask=a),a}):[])}_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 i=t.tail&&t._beforeTailState!=null?t._beforeTailState._value:this.value,a=this.rawInputValue,n=t.tail&&t._beforeTailState!=null?t._beforeTailState._rawInputValue:a,u=a.slice(n.length),l=this.currentMask,d=new m,c=l?.state;return this.currentMask=this.doDispatch(e,{...t},s),this.currentMask&&(this.currentMask!==l?(this.currentMask.reset(),n&&(this.currentMask.append(n,{raw:!0}),d.tailShift=this.currentMask.value.length-i.length),u&&(d.tailShift+=this.currentMask.append(u,{raw:!0,tail:!0}).tailShift)):c&&(this.currentMask.state=c)),d}_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 m;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,i]=super.doPrepare(e,t);if(this.currentMask){let a;[s,a]=super.doPrepare(s,this.currentMaskFlags(t)),i=i.aggregate(a)}return[s,i]}doPrepareChar(e,t){t===void 0&&(t={});let[s,i]=super.doPrepareChar(e,t);if(this.currentMask){let a;[s,a]=super.doPrepareChar(s,this.currentMaskFlags(t)),i=i.aggregate(a)}return[s,i]}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 m;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:i,...a}=e;t&&this.compiledMasks.forEach((n,u)=>n.state=t[u]),s!=null&&(this.currentMask=s,this.currentMask.state=i),super.state=a}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:i,...a}=e[s];return z(t,a)&&t.maskEquals(i)}):super.maskEquals(e)}typedValueEquals(e){var t;return!!((t=this.currentMask)!=null&&t.typedValueEquals(e))}};h(ee,"MaskedDynamic");let X=ee;X.DEFAULTS={...E.DEFAULTS,dispatch:h((r,e,t,s)=>{if(!e.compiledMasks.length)return;const i=e.rawInputValue,a=e.compiledMasks.map((n,u)=>{const l=e.currentMask===n,d=l?n.displayValue.length:n.nearestInputPos(n.displayValue.length,p.FORCE_LEFT);return n.rawInputValue!==i?(n.reset(),n.append(i,{raw:!0})):l||n.remove(d),n.append(r,e.currentMaskFlags(t)),n.appendTail(s),{index:u,weight:n.rawInputValue.length,totalInputPositions:n.totalInputPositions(0,Math.max(d,n.nearestInputPos(n.displayValue.length,p.FORCE_LEFT)))}});return a.sort((n,u)=>u.weight-n.weight||u.totalInputPositions-n.totalInputPositions),e.compiledMasks[a[0].index]},"dispatch")};f.MaskedDynamic=X;const te=class te extends A{constructor(e){super({...te.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:t,...s}=e;if(t){const i=t.map(u=>u.length),a=Math.min(...i),n=Math.max(...i)-a;s.mask="*".repeat(a),n&&(s.mask+="["+"*".repeat(n)+"]"),this.enum=t}super._update(s)}_appendCharRaw(e,t){t===void 0&&(t={});const s=Math.min(this.nearestInputPos(0,p.FORCE_RIGHT),this.value.length),i=this.enum.filter(a=>this.matchValue(a,this.unmaskedValue+e,s));if(i.length){i.length===1&&this._forEachBlocksInRange(0,this.value.length,(n,u)=>{const l=i[0][u];u>=this.value.length||l===n.value||(n.reset(),n._appendChar(l,t))});const a=super._appendCharRaw(i[0][this.value.length],t);return i.length===1&&i[0].slice(this.unmaskedValue.length).split("").forEach(n=>a.aggregate(super._appendCharRaw(n))),a}return new m({skip:!this.isComplete})}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new F("",e)}remove(e,t){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),e===t)return new m;const s=Math.min(super.nearestInputPos(0,p.FORCE_RIGHT),this.value.length);let i;for(i=e;i>=0&&!(this.enum.filter(u=>this.matchValue(u,this.value.slice(s,i),s)).length>1);--i);const a=super.remove(i,t);return a.tailShift+=i-e,a}get isComplete(){return this.enum.indexOf(this.value)>=0}};h(te,"MaskedEnum");let W=te;W.DEFAULTS={...A.DEFAULTS,matchValue:h((r,e,t)=>r.indexOf(e,t)===t,"matchValue")};f.MaskedEnum=W;const Be=class Be extends E{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}};h(Be,"MaskedFunction");let he=Be;f.MaskedFunction=he;var Le;const y=class y extends E{constructor(e){super({...y.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),t="\\d*",s=(this.scale?"("+ae(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+t+s),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(ae).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(ae(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,i]=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&&(i.skip=!0),s&&!this.allowPositive&&!this.value&&s!=="-"&&i.aggregate(this._appendChar("-")),[s,i]}_separatorsCount(e,t){t===void 0&&(t=!1);let s=0;for(let i=0;i<e;++i)this._value.indexOf(this.thousandsSeparator,i)===i&&(++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,i=this._separatorsCountFromSlice(s);this._value=this._removeThousandsSeparators(this.value);const a=this._value;this._value+=e;const n=this.number;let u=!isNaN(n),l=!1;if(u){let v;this.min!=null&&this.min<0&&this.number<this.min&&(v=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(v=this.max),v!=null&&(this.autofix?(this._value=this.format(v,this).replace(y.UNMASKED_RADIX,this.radix),l||(l=a===this._value&&!t.tail)):u=!1),u&&(u=!!this._value.match(this._numberRegExp))}let d;u?d=new m({inserted:this._value.slice(a.length),rawInserted:l?"":e,skip:l}):(this._value=a,d=new m),this._value=this._insertThousandsSeparators(this._value);const c=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,g=this._separatorsCountFromSlice(c);return d.tailShift+=(g-i)*this.thousandsSeparator.length,d}_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 i=this._findSeparatorAround(t);return i>=0&&(t=i+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),i=this.value.slice(t),a=this._separatorsCount(s.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(s+i));const n=this._separatorsCountFromSlice(s);return new m({tailShift:(n-a)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case p.NONE:case p.LEFT:case p.FORCE_LEFT:{const s=this._findSeparatorAround(e-1);if(s>=0){const i=s+this.thousandsSeparator.length;if(e<i||this.value.length<=i||t===p.FORCE_LEFT)return s}break}case p.RIGHT:case p.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,i,a,n)=>i+n),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 i=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===y.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,t,s)&&!i}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,y.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(y.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)||y.EMPTY_VALUES.includes(e)&&y.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}};h(y,"MaskedNumber");let M=y;Le=M;M.UNMASKED_RADIX=".";M.EMPTY_VALUES=[...E.EMPTY_VALUES,0];M.DEFAULTS={...E.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Le.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:h(r=>r.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20}),"format")};f.MaskedNumber=M;const de={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function Ne(r,e,t){e===void 0&&(e=de.MASKED),t===void 0&&(t=de.MASKED);const s=S(r);return i=>s.runIsolated(a=>(a[e]=i,a[t]))}h(Ne,"createPipe");function ze(r,e,t,s){return Ne(e,t,s)(r)}h(ze,"pipe");f.PIPE_TYPE=de;f.createPipe=Ne;f.pipe=ze;const Se=class Se extends A{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,i;const{repeat:a,...n}=$(e);this._blockOpts=Object.assign({},this._blockOpts,n);const u=S(this._blockOpts);this.repeat=(t=(s=a??u.repeat)!=null?s:this.repeat)!=null?t:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((i=this._blocks)==null?void 0:i.length)||0,this.repeatFrom)),blocks:{m:u},eager:u.eager,overwrite:u.overwrite,skipInvalid:u.skipInvalid,lazy:u.lazy,placeholderChar:u.placeholderChar,displayChar:u.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(S(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(e,t){t===void 0&&(t={});const s=new m;for(let l=(i=(a=this._mapPosToBlock(this.displayValue.length))==null?void 0:a.index)!=null?i:Math.max(this._blocks.length-1,0),d,c;d=(n=this._blocks[l])!=null?n:c=!c&&this._allocateBlock(l);++l){var i,a,n,u;const g=d._appendChar(e,{...t,_beforeTailState:(u=t._beforeTailState)==null||(u=u._blocks)==null?void 0:u[l]});if(g.skip&&c){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(s.aggregate(g),g.consumed)break}return s}_trimEmptyTail(e,t){var s,i;e===void 0&&(e=0);const a=Math.max(((s=this._mapPosToBlock(e))==null?void 0:s.index)||0,this.repeatFrom,0);let n;t!=null&&(n=(i=this._mapPosToBlock(t))==null?void 0:i.index),n==null&&(n=this._blocks.length-1);let u=0;for(let l=n;a<=l&&!this._blocks[l].unmaskedValue;--l,++u);u&&(this._blocks.splice(n-u+1,u),this.mask=this.mask.slice(u))}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}};h(Se,"RepeatBlock");let pe=Se;f.RepeatBlock=pe;try{globalThis.IMask=f}catch{}var Ke={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:h(r=>["append","remove"].includes(r)||typeof r=="boolean","validator")},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:h(r=>r==="pad"||typeof r=="boolean","validator")},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 He(r,e){let{emit:t,onAccept:s,onComplete:i,defaultValue:a,defaultUnmaskedValue:n,defaultTypedValue:u}=e===void 0?{}:e;const l=o.isRef(r)?r:o.ref(r),d=o.ref(),c=o.ref(),g=o.ref(""),v=o.ref(""),k=o.ref();let C,T=g.value,I=v.value,se=k.value;function Ve(){se=k.value=c.value.typedValue,I=v.value=c.value.unmaskedValue,T=g.value=c.value.value}h(Ve,"storeLastAcceptedValues");function q(_){Ve(),t&&(t("accept",g.value,_),t("accept:masked",g.value,_),t("accept:typed",k.value,_),t("accept:unmasked",v.value,_)),s?.(_)}h(q,"_onAccept");function Pe(_){t&&(t("complete",c.value.value,_),t("complete:masked",c.value.value,_),t("complete:typed",c.value.typedValue,_),t("complete:unmasked",c.value.unmaskedValue,_)),i?.(_)}h(Pe,"_onComplete");const xe=h(()=>{!c.value||v.value===void 0||(I!==v.value&&(c.value.unmaskedValue=v.value,c.value.unmaskedValue!==v.value&&q()),I=void 0)},"updateUnmaskedValue");o.watch(v,xe);const we=h(()=>{!c.value||g.value===void 0||(T!==g.value&&(c.value.value=g.value,c.value.value!==g.value&&q()),T=void 0)},"updateMaskedValue");o.watch(g,we);const be=h(()=>{!c.value||k.value===void 0||(se!==k.value&&(c.value.typedValue=k.value,c.value.masked.typedValueEquals(k.value)||q()),se=void 0)},"updateTypedValue");o.watch(k,be);function Ie(){C=d.value;const _=l.value;!C||!(_!=null&&_.mask)||(c.value=f(C,_),a!==void 0&&(g.value=a),n!==void 0&&(v.value=n),u!==void 0&&(k.value=u),xe(),we(),be(),Ve(),c.value.on("accept",q).on("complete",Pe))}h(Ie,"_initMask");function De(){var _;(_=c.value)==null||_.destroy(),c.value=void 0}return h(De,"_destroyMask"),o.onMounted(Ie),o.onUnmounted(De),o.watch([d,l],()=>{const _=d.value,ie=l.value;(!(ie!=null&&ie.mask)||_!==C)&&De(),_&&(c.value?c.value.updateOptions(ie):Ie())}),{el:d,mask:o.readonly(c),masked:g,unmasked:v,typed:k}}h(He,"useIMask");function Ze(r,e){return r={...r},Object.keys(r).forEach(t=>{(r[t]===void 0||e.includes(t))&&delete r[t]}),r}h(Ze,"extractOptionsFromProps");const Ge=["typed","unmasked","value","modelValue"];var Xe=o.defineComponent({name:"imask-input",inheritAttrs:!1,props:{modelValue:String,value:String,unmasked:String,typed:{validator:h(()=>!0,"validator")},...Ke},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(r,e){let{attrs:t,emit:s}=e;const{el:i,mask:a,masked:n,unmasked:u,typed:l}=He(Ze(r,Ge),{emit:s,onAccept:h(k=>{const C=n.value;s("accept:value",C,k),s("update:value",C,k),s("update:masked",C,k),s("update:modelValue",C,k),s("update:unmasked",u.value,k),s("update:typed",l.value,k)},"onAccept"),onComplete:h(k=>{s("complete:value",n.value,k)},"onComplete")}),d=o.toRef(r,"value"),c=o.toRef(r,"modelValue"),g=o.toRef(r,"unmasked"),v=o.toRef(r,"typed");return n.value=c.value||d.value||"",u.value=g.value||"",l.value=v.value,o.watch(d,k=>n.value=k),o.watch(c,k=>n.value=k),o.watch(g,k=>u.value=k),o.watch(v,k=>l.value=k),()=>{const k={...t,value:r.value!=null?r.value:r.modelValue!=null?r.modelValue:a.value?a.value.displayValue:"",ref:i};return r.mask||(k.onInput=C=>{s("update:modelValue",C.target.value),s("update:value",C.target.value)}),o.h("input",k)}}}),We=Xe;function Je(r,e){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"fill-rule":"evenodd",d:"M8.603 3.799A4.49 4.49 0 0 1 12 2.25c1.357 0 2.573.6 3.397 1.549a4.49 4.49 0 0 1 3.498 1.307 4.491 4.491 0 0 1 1.307 3.497A4.49 4.49 0 0 1 21.75 12a4.49 4.49 0 0 1-1.549 3.397 4.491 4.491 0 0 1-1.307 3.497 4.491 4.491 0 0 1-3.497 1.307A4.49 4.49 0 0 1 12 21.75a4.49 4.49 0 0 1-3.397-1.549 4.49 4.49 0 0 1-3.498-1.306 4.491 4.491 0 0 1-1.307-3.498A4.49 4.49 0 0 1 2.25 12c0-1.357.6-2.573 1.549-3.397a4.49 4.49 0 0 1 1.307-3.497 4.49 4.49 0 0 1 3.497-1.307Zm7.007 6.387a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z","clip-rule":"evenodd"})])}h(Je,"render$3");function Qe(r,e){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"fill-rule":"evenodd",d:"M7.502 6h7.128A3.375 3.375 0 0 1 18 9.375v9.375a3 3 0 0 0 3-3V6.108c0-1.505-1.125-2.811-2.664-2.94a48.972 48.972 0 0 0-.673-.05A3 3 0 0 0 15 1.5h-1.5a3 3 0 0 0-2.663 1.618c-.225.015-.45.032-.673.05C8.662 3.295 7.554 4.542 7.502 6ZM13.5 3A1.5 1.5 0 0 0 12 4.5h4.5A1.5 1.5 0 0 0 15 3h-1.5Z","clip-rule":"evenodd"}),o.createElementVNode("path",{"fill-rule":"evenodd",d:"M3 9.375C3 8.339 3.84 7.5 4.875 7.5h9.75c1.036 0 1.875.84 1.875 1.875v11.25c0 1.035-.84 1.875-1.875 1.875h-9.75A1.875 1.875 0 0 1 3 20.625V9.375ZM6 12a.75.75 0 0 1 .75-.75h.008a.75.75 0 0 1 .75.75v.008a.75.75 0 0 1-.75.75H6.75a.75.75 0 0 1-.75-.75V12Zm2.25 0a.75.75 0 0 1 .75-.75h3.75a.75.75 0 0 1 0 1.5H9a.75.75 0 0 1-.75-.75ZM6 15a.75.75 0 0 1 .75-.75h.008a.75.75 0 0 1 .75.75v.008a.75.75 0 0 1-.75.75H6.75a.75.75 0 0 1-.75-.75V15Zm2.25 0a.75.75 0 0 1 .75-.75h3.75a.75.75 0 0 1 0 1.5H9a.75.75 0 0 1-.75-.75ZM6 18a.75.75 0 0 1 .75-.75h.008a.75.75 0 0 1 .75.75v.008a.75.75 0 0 1-.75.75H6.75a.75.75 0 0 1-.75-.75V18Zm2.25 0a.75.75 0 0 1 .75-.75h3.75a.75.75 0 0 1 0 1.5H9a.75.75 0 0 1-.75-.75Z","clip-rule":"evenodd"})])}h(Qe,"render$2");function et(r,e){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"fill-rule":"evenodd",d:"m5.965 4.904 9.131 9.131a6.5 6.5 0 0 0-9.131-9.131Zm8.07 10.192L4.904 5.965a6.5 6.5 0 0 0 9.131 9.131ZM4.343 4.343a8 8 0 1 1 11.314 11.314A8 8 0 0 1 4.343 4.343Z","clip-rule":"evenodd"})])}h(et,"render$1");var tt=Object.defineProperty,st=Object.getOwnPropertyDescriptor,b=h((r,e,t,s)=>{for(var i=s>1?void 0:s?st(e,t):e,a=r.length-1,n;a>=0;a--)(n=r[a])&&(i=(s?n(e,t,i):n(i))||i);return s&&i&&tt(e,t,i),i},"__decorateClass"),N;let B=(N=class extends V.FieldComponent{maskPreset=null;force12hours=!1;alwaysCopyIcon=!1;disabled=!1;dtPresetLocale="";emitsParent=["input","change","focus","update:modelValue","dateMaskChange","keypress.enter"];componentsParent={IMaskComponent:We,ClipboardDocumentListIcon:Qe,CheckBadgeIcon:Je,NoSymbolIcon:et};mask=null;maskBlocks={};utc="UTC";placeholder="Введите текст";onAccept(e){const t=this.getFromMask(this.mask,e,"MM"),s=this.getFromMask(this.mask,e,"YYYY"),i=this.getFromMask(this.mask,e,"DD");let a=this.getFromMask(this.mask,e,"hh");const n=this.getFromMask(this.mask,e,"mm"),u=this.getFromMask(this.mask,e,"ss"),l=this.is12hours?e.toLowerCase().includes("am")?"am":"pm":"";this.$emit("dateMaskChange",{month:t,year:s,day:i,hour:a,minute:n,seconds:u,AmPm:l})}onCompleteTyped(e){}is12hours=!1;_randKey="";createdParent(){if(this._randKey=$VST.generateRandomKey(),!this.is12hours&&this.isDateTime)try{const e=new Intl.DateTimeFormat(this.dtPresetLocale||this.VST.$r.locale,{hour:"numeric"}).resolvedOptions();this.is12hours=e.hourCycle==="h11"||e.hourCycle==="h12"}catch{this.is12hours=!1}else this.force12hours&&(this.is12hours=!0)}beforeMountParent(){if(this.value=this.modelValue||this.inputValue||"",this.isDateTime){const e=new Intl.DateTimeFormat(this.dtPresetLocale||this.VST.$r.locale,{year:"numeric",month:"2-digit",day:"2-digit",hour:this.maskPreset=="datetime"||this.maskPreset=="datetimeSec"?"2-digit":void 0,minute:this.maskPreset=="datetime"||this.maskPreset=="datetimeSec"?"2-digit":void 0,second:this.maskPreset=="datetimeSec"?"2-digit":void 0,timeZoneName:"longOffset"}).formatToParts(new Date($VST.DT().epochMilliseconds));if(this.mask=e.map(t=>{switch(t.type){case"year":return"YYYY";case"month":return"MM";case"day":return"DD";case"hour":return"hh";case"second":return"ss";case"minute":return"mm";case"literal":return t.value;case"timeZoneName":return this.utc=t.value,"";default:return""}}).join(""),this.is12hours&&this.maskPreset!=="date")this.mask+="!";else if(this.maskPreset==="date"){const t=this._extractDateOnly(this.mask);t&&(this.mask=t)}this.mask=this.mask.replace(/\s+/g," "),this.maskBlocks={YYYY:{mask:f.MaskedRange,from:1e3,to:2300,validate:h((t,s)=>this.dateMaskValidateWithReplaceDays(s),"validate"),overwrite:!0},MM:{mask:f.MaskedRange,from:1,to:12,validate:h((t,s)=>this.dateMaskValidateWithReplaceDays(s),"validate"),overwrite:!0},DD:{mask:f.MaskedRange,from:1,to:31,validate:h((t,s)=>this.dateMaskValidateWithReplaceDays(s),"validate"),overwrite:!0},hh:{mask:f.MaskedRange,from:this.is12hours?1:0,to:this.is12hours?12:23,overwrite:!0},mm:{mask:f.MaskedRange,from:0,to:59,overwrite:!0},ss:{mask:f.MaskedRange,from:0,to:59,overwrite:!0},"!":{mask:f.MaskedEnum,enum:["AM","PM","am","pm"],overwrite:!0}}}}mountedParent(){this.$refs.selectInput.$el.addEventListener("focus",this._onFocus),this.isDateTime||this.$refs.selectInput.$el.addEventListener("input",this._onInput)}beforeUnmountParent(){this.$refs.selectInput.$el.removeEventListener("focus",this._onFocus),this.isDateTime||this.$refs.selectInput.$el.removeEventListener("input",this._onInput)}focus(e=0,t=0){const s=this.$el.querySelector("input.inputMask");s?.focus?.(),s?.setSelectionRange?.(e,t>e?t||e:t)}blur(){this.$el.querySelector("input.inputMask")?.blur?.()}_onFocus(){this.$emit("focus")}_onInput(e){const t=e?.target?.value?.trim?.()||e;typeof t=="string"&&(this.$emit("input",this.value=t),this.$emit("change",this.value),this.$emit("update:modelValue",this.value))}_extractDateOnly(e){const t=/([\d\w]{2,4}[./_-][\d\w]{2,4}[./_-][\d\w]{2,4})/,s=e.match(t);return s?s?.[0]??null:null}getFromMask(e,t,s="MM"){const i=e.indexOf(s);if(i===-1)return 0;const a=t.slice(i,i+s.length),n=parseInt(a,10);return isNaN(n)?0:n}setValue(e){this.$refs?.selectInput?.maskRef&&(this.$refs.selectInput.maskRef.unmaskedValue=e),super.setValue(e)}_prepareIMask(e){if(this.isDateTime)return e.toUpperCase()}replaceInMask(e,t,s,i="MM"){const a=e.indexOf(i);if(a===-1)return t;const n=s.toString().padStart(2,"0");return t.slice(0,a)+n+t.slice(a+i.length)}dateMaskValidateWithReplaceDays(e){const t=this.getFromMask(e.parent.mask,e.parent.displayValue,"MM"),s=this.getFromMask(e.parent.mask,e.parent.displayValue,"YYYY"),i=this.getFromMask(e.parent.mask,e.parent.displayValue,"DD");let a=i;return t&&(t==2&&(!s||s&&s%4==0)?a=29:t==2&&s&&s.toString().length==4&&s%4!=0?a=28:[1,3,5,7,8,10,12].includes(t)?a=31:a=30,a<i&&this.nextTick(()=>{this.$refs.selectInput.$el.value=this.replaceInMask(e.parent.mask,e.parent.displayValue,a.toString(),"DD"),this.$refs.selectInput.$el.blur(),this.nextTick(()=>{this.$refs.selectInput.$el.focus()})})),!0}_isOnlyValueCopied=!1;_copyValueToClipboard(){this.value&&$VST.copyToClipboard(this.value),this._isOnlyValueCopied=!0,setTimeout(()=>this._isOnlyValueCopied=!1,500)}_valueComputed(){return["date","datetime","datetimeSec"].includes(this.maskPreset??"")}},h(N,"StringField"),N);b([V.Prop(String)],B.prototype,"maskPreset",2);b([V.Prop(Boolean)],B.prototype,"force12hours",2);b([V.Prop(Boolean)],B.prototype,"alwaysCopyIcon",2);b([V.Prop(Boolean)],B.prototype,"disabled",2);b([V.Prop(String)],B.prototype,"dtPresetLocale",2);b([V.Prop(String)],B.prototype,"placeholder",2);b([V.Computed("isDateTime")],B.prototype,"_valueComputed",1);B=b([V.VST],B);const it={class:"relative w100%"},at={key:0,class:"w22px h22px text-stone absolute t-13px l-12px z4 cursor-pointer hover:scale-130"};function nt(r,e,t,s,i,a){const n=o.resolveComponent("IMaskComponent"),u=o.resolveComponent("ClipboardDocumentListIcon"),l=o.resolveComponent("CheckBadgeIcon"),d=o.resolveComponent("NoSymbolIcon");return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["d-inline-block my2px w100% relative",{["sf"+r._randKey]:!0}])},[o.createElementVNode("div",it,[o.createVNode(n,{class:o.normalizeClass(["w100% inputMask",{"hover:bg-white":!r.disabled,"user-select-none!":r.disabled}]),value:r.value,mask:r.mask,radix:",",placeholder:r.placeholder,ref:"selectInput",lazy:!1,overwrite:!0,blocks:r.maskBlocks,autocomplete:r.maskPreset=="email"?"email":"off",onsubmit:"return false;",autocorrect:"off",autocapitalize:"off",onAccept:r.onAccept,"onComplete:typed":r.onCompleteTyped,disabled:r.disabled,prepare:r._prepareIMask,onKeypress:e[0]||(e[0]=o.withKeys(c=>r.$emit("keypress.enter"),["enter"]))},null,8,["value","mask","placeholder","blocks","autocomplete","onAccept","onComplete:typed","class","disabled","prepare"]),r.maskPreset=="datetime"||r.maskPreset=="datetimeSec"?(o.openBlock(),o.createElementBlock("div",{key:0,class:"absolute! r-15px! t-2 fs-0.7rem text-stone-500 hover:scale-110 hover:fw-bold",style:o.normalizeStyle({pointerEvents:r.disabled?"none !important":void 0})},o.toDisplayString(r.utc),5)):o.createCommentVNode("",!0)]),r.disabled||r.alwaysCopyIcon?(o.openBlock(),o.createElementBlock("div",at,[r._isOnlyValueCopied?(o.openBlock(),o.createBlock(l,{key:1,class:"text-emerald-500"})):(o.openBlock(),o.createBlock(u,{key:0,onClick:e[1]||(e[1]=c=>r._copyValueToClipboard())}))])):o.createCommentVNode("",!0),!r.disabled&&r.value?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(["w25px h25px text-stone absolute r-12px z4 cursor-pointer hover:scale-130",{"t-15px":r.maskPreset=="datetime"||r.maskPreset=="datetimeSec","t-9px":r.maskPreset!="datetime"&&r.maskPreset!="datetimeSec"}])},[o.createVNode(d,{onClick:e[2]||(e[2]=c=>r._onInput(""))})],2)):o.createCommentVNode("",!0),r.disabled||r.alwaysCopyIcon?(o.openBlock(),o.createBlock(o.resolveDynamicComponent("style"),{key:2},{default:o.withCtx(()=>[o.createTextVNode(".sf"+o.toDisplayString(r._randKey)+"["+o.toDisplayString(r.$options.__scopeId)+"] input { padding-left: 40px !important; } ",1)]),_:1})):o.createCommentVNode("",!0)],2)}h(nt,"render");const rt=$e._export_sfc(B,[["render",nt],["__scopeId","data-v-9b5c4527"]]);exports.default=rt;
@@ -1 +0,0 @@
1
- var v=Object.defineProperty;var f=(e,o)=>v(e,"name",{value:o,configurable:!0});import{q as g,a as r,g as s,b as t,e as w,z as C,f as B,k as b,t as a,j as d,A as T,p,F as y,B as $,l as R,y as H}from"./main-C8MaaDZb.js";import{B as M}from"./ButtonInherited-Dwuz_QB-.js";var O=Object.getOwnPropertyDescriptor,S=f((e,o,k,m)=>{for(var l=m>1?void 0:m?O(o,k):o,u=e.length-1,n;u>=0;u--)(n=e[u])&&(l=n(l)||l);return l},"__decorateClass"),i;let h=(i=class extends M{},f(i,"Button"),i);h=S([g],h);const z=["title","data-theme","data-offset","data-placement"],W=["title","data-theme","data-offset","data-placement","disabled","type"],A=["innerHTML"],D=["innerHTML"],F=["href"],I=["href"];function L(e,o,k,m,l,u){return e.showButton?(t(),r("span",{key:0,class:"d-inline-block relative min-h40px whitespace-nowrap",title:e.disabled?e.disabledTitle:"","data-theme":e.dataThemeInner,"data-offset":e.dataOffset,"data-placement":e.dataPlacement},[w("button",{class:d(["relative w100% h100% flex! items-center! justify-center!",{shine:e.shine,[e.randomClass+(e.isOnHover?" hover":"")]:!0}]),title:e.disabled?"":e.innerTitle,"data-theme":e.dataThemeInner,"data-offset":e.dataOffset,"data-placement":e.dataPlacement,onMouseover:o[0]||(o[0]=n=>e.isOnHover=!0),onMouseout:o[1]||(o[1]=n=>e.isOnHover=!1),onClick:o[2]||(o[2]=(...n)=>e.click&&e.click(...n)),onTouchstart:o[3]||(o[3]=(...n)=>e.touchstart&&e.touchstart(...n)),onTouchend:o[4]||(o[4]=(...n)=>e.touchend&&e.touchend(...n)),onMouseup:o[5]||(o[5]=(...n)=>e.mouseup&&e.mouseup(...n)),onMousedown:o[6]||(o[6]=(...n)=>e.mousedown&&e.mousedown(...n)),onKeydown:o[7]||(o[7]=R((...n)=>e.keydownEnter&&e.keydownEnter(...n),["enter"])),onMouseleave:o[8]||(o[8]=n=>e.isButtonActive=!1),disabled:e.disabled,type:e.type,style:b({fontSize:e.fontSize,fontFamily:e.fontFamily,borderRadius:e.borderRadius,width:e.width,...e.style}),ref:"button"},[e.badge?(t(),r("div",{key:0,class:"absolute right--9px top--9px bg-lightblue-400 fw-bold rounded-full z-3 px7px",style:b({background:e.badgeBg??void 0,color:e.badgeColor??"#ffffff"})},a(e.badge),5)):s("",!0),e.icon?(t(),r("span",{key:1,class:d(["left-icon-animate",e.$slots.default&&e.$refs?.button?.innerText?.trim?.()?.length?"left-icon":""])},[e.icon?.startsWith("<")?(t(),r("div",{key:0,innerHTML:e.icon},null,8,A)):(t(),r("i",{key:1,class:d(["fa",e.icon])},null,2))],2)):s("",!0),C(e.$slots,"default",{},void 0),e.iconRight?(t(),r("span",{key:2,class:d(["right-icon-animate",e.$slots.default&&e.$refs?.button?.innerText?.trim?.()?.length?"right-icon":""])},[e.iconRight?.startsWith("<")?(t(),r("div",{key:0,innerHTML:e.iconRight},null,8,D)):(t(),r("i",{key:1,class:d(["fa",e.iconRight])},null,2))],2)):s("",!0),(t(),B($("style"),null,{default:T(()=>[p("."+a(e.randomClass)+" { background: "+a(e.style?.bacground??e.currentBg+"!important")+"; box-shadow: none !important; color: "+a(e.currentColor)+" !important; border-color: "+a(e.currentBorderColor)+" !important; }",1),e.currentColorHover?(t(),r(y,{key:0},[p("."+a(e.randomClass)+":hover { color: "+a(e.style?.color??e.currentColorHover+"!important")+"; }",1)],64)):s("",!0),e.disabled?s("",!0):(t(),r(y,{key:1},[p("."+a(e.randomClass)+":active { background: "+a(e.currentBgActive)+" !important; border-color: "+a(e.currentBorderColorActive)+" !important; color: "+a(e.currentColorActive)+" !important; opacity: 1 !important; "+a(e.boxShadowCss)+" !important; }",1)],64))]),_:1})),e.link&&e.link?.startsWith("http")||e.link?.startsWith("//")?(t(),r("a",{key:3,class:"d-none",ref:"link",href:e.link,target:"_blank"}," ",8,F)):!e.link&&e.linkRevert&&!e.linkRevert?.startsWith("http")&&!e.linkRevert?.startsWith("//")?(t(),r("a",{key:4,class:"d-none",ref:"link",href:e.linkRevert,target:"_blank"}," ",8,I)):s("",!0)],46,W)],8,z)):s("",!0)}f(L,"render");const E=H(h,[["render",L],["__scopeId","data-v-1a442f24"]]);export{E as default};
@@ -1 +0,0 @@
1
- var a=Object.defineProperty;var u=(l,e)=>a(l,"name",{value:e,configurable:!0});import{P as o,C,W as f}from"./main-C8MaaDZb.js";var p=Object.defineProperty,g=Object.getOwnPropertyDescriptor,r=u((l,e,h,s)=>{for(var i=s>1?void 0:s?g(e,h):e,c=l.length-1,n;c>=0;c--)(n=l[c])&&(i=(s?n(e,h,i):n(i))||i);return s&&i&&p(e,h,i),i},"__decorateClass");const d=class d extends C{emits=["click","touchstart","touchend","mousedown","mouseup","clickTap","clickTouch","clickOrTouchstart","clickOrTouchend","mousedownOrTouchstart","mouseupOrTouchend","keydownEnter"];icon="";iconRight="";badge="";badgeBg=null;badgeColor=null;style={};bg=null;color=null;borderColor=null;bgActive=null;colorActive=null;colorHover=null;borderColorActive=null;boxShadowColor=null;fontSize="1rem";fontFamily=null;bgGradientTop=null;bgGradientBottom=null;disabled=!1;shine=!1;type="button";title=null;disabledTitle=null;dataTheme="black";dataDisabledTheme="gray";dataPlacement="top";dataOffset="top";width="calc(100% - 8px)";borderRadius="3px";link=null;linkRevert=null;theme="default";backgroundCss="";boxShadowCss="";isOnHover=!1;isButtonActive=!1;randomClass="";dataThemeInner="";showButton=!0;currentBg=null;currentColor=null;currentColorHover=null;currentBorderColor=null;currentBgActive=null;currentBorderColorActive=null;currentBoxShadowColor=null;currentColorActive=null;innerTitle=null;hasTouchpad=!1;mountedParent(){this.randomClass="button-c"+Math.random().toString().split(".")[1],this.updateTheme(),this.$refs?.button}updateTheme(){const e="#ccc",h="#000",s="#cacaca",i="#ccc",c="#b6b6b6",n="#5b5a5a";this.currentBgActive,this.currentBorderColor=this.currentColor=this.currentBg=this.currentColorActive=null,this.theme=="primary"&&(this.currentBg="#005bbf",this.currentColor="#fff",this.currentBorderColor="#0367d5",this.currentBgActive="#005fc8",this.currentBorderColorActive="#0871e3",this.currentBoxShadowColor="#065e8d",this.currentColorActive="#fff",this.currentColorHover="#fff"),this.theme=="success"?(this.currentBg="#0aa86d",this.currentColor="#fff",this.currentBorderColor="#24a876",this.currentBgActive="#0b9762",this.currentBorderColorActive="#0b9762",this.currentBoxShadowColor="#31735b",this.currentColorActive="#fff",this.currentColorHover="#fff"):this.theme=="danger"?(this.currentBg="#FF3B30",this.currentColor="#fff",this.currentBorderColor="#FF3B30",this.currentBgActive="#FF3B30",this.currentBorderColorActive="#FF3B30",this.currentBoxShadowColor="#ff8179",this.currentColorActive="#fff",this.currentColorHover="#fff"):this.theme=="pink"?(this.currentBg="#ff6161",this.currentColor="#fff",this.currentBorderColor="#ff4741c9",this.currentBgActive="#ff6a60",this.currentBorderColorActive="#ff4141",this.currentBoxShadowColor="#ff6a60",this.currentColorActive="#fff",this.currentColorHover="#fff"):this.theme=="warning"?(this.currentBg="#FF9500",this.currentColor="#fff",this.currentBorderColor="#FF9500",this.currentBgActive="#ffb546",this.currentBorderColorActive="#ffb546",this.currentBoxShadowColor="#ffbe64",this.currentColorActive="#fdff98",this.currentColorHover="#fff8e8"):this.theme=="info"?(this.currentBg="#78d9ff",this.currentColor="#203464",this.currentColorHover="#34aff1",this.currentBorderColor="#3db0ee",this.currentBgActive="#78d9ff",this.currentBorderColorActive="#78d9ff",this.currentBoxShadowColor="#78d9ff",this.currentColorActive="#fff",this.currentColorHover="#304460"):this.theme=="yellow"?(this.currentBg="#ffd900",this.currentColor="#444",this.currentBorderColor="#ffd900",this.currentBgActive="#ffc400",this.currentBorderColorActive="#f3c922",this.currentBoxShadowColor="#cac838",this.currentColorActive="#fff"):this.theme=="white"?(this.currentBg="#ffffff",this.currentColor="#444",this.currentColorHover="#164205",this.currentBorderColor="#cacaca",this.currentBgActive="#efede7",this.currentBorderColorActive="##cacaca",this.currentBoxShadowColor="#b3b3ab",this.currentColorActive="#164205"):this.theme=="purple"?(this.currentBg="#942cdd",this.currentColor="#fff",this.currentColorHover="#e7c0ff",this.currentBorderColor="#a539f3",this.currentBgActive="#b755ff",this.currentBorderColorActive="#b755ff",this.currentBoxShadowColor="#7f18c5",this.currentColorActive="#ffffff"):this.theme=="indigo"?(this.currentBg="#5b2cdd",this.currentColor="#fff",this.currentColorHover="#e7c0ff",this.currentBorderColor="#6b39f3",this.currentBgActive="#8855ff",this.currentBorderColorActive="#6f55ff",this.currentBoxShadowColor="#5a18c5",this.currentColorActive="#ffffff"):this.theme=="black"?(this.currentBg="#32383e",this.currentColor="#fff",this.currentColorHover="#ebf8b3",this.currentBorderColor="#32383e",this.currentBgActive="#3b4249",this.currentBorderColorActive="#3b4249",this.currentBoxShadowColor="#32383e",this.currentColorActive="#ffffff"):this.theme=="grey"&&(this.currentBg="#5f6163",this.currentColor="#fff",this.currentColorHover="#cec6c4",this.currentBorderColor="#898d90",this.currentBgActive="#878c92",this.currentBorderColorActive="#686c71",this.currentBoxShadowColor="#626a71",this.currentColorActive="#ffffff"),this.currentBg=this.bg??this.currentBg??e,this.currentColor=this.color??this.currentColor??h,this.currentBorderColor=this.borderColor??this.currentBorderColor??s,this.currentBgActive=this.bgActive??this.currentBgActive??i,this.currentBorderColorActive=this.borderColorActive??this.currentBorderColorActive??c,this.currentBoxShadowColor=this.boxShadowColor??this.currentBoxShadowColor??n,this.currentColorActive=this.colorActive??this.currentColorActive??null,this.boxShadowCss=this.disabled?"box-shadow: none":`box-shadow: 0px 1px 2px 0px ${this.currentBoxShadowColor}`,this.dataThemeInner=this.disabled?this.dataDisabledTheme:this.dataTheme,this.backgroundCss="background: "+(this.bgGradientTop&&this.bgGradientBottom?`linear-gradient(to bottom, ${this.bgGradientTop}, ${this.bgGradientBottom})`:this.bg)}click(e){this.disabled||(this.$emit("click",e,this),this.hasTouchpad||(this.$emit("clickTouch",e,this),this.$emit("clickOrTouchstart",e,this),this.$emit("clickTap",e,this),this.link&&(this.link?.startsWith("http")||this.link?.startsWith("//"))||this.link&&this.linkRevert&&!this.linkRevert?.startsWith("http")&&!this.linkRevert?.startsWith("//")?this.$refs.link?.click():(this.link||this.linkRevert)&&window.pjax(this.link||this.linkRevert)))}touchstart(e){this.disabled||(this.$emit("touchstart",e,this),this.hasTouchpad&&(this.$emit("clickTouch",e,this),this.$emit("clickOrTouchstart",e,this)))}touchend(e){this.disabled||(this.$emit("touchend",e,this),this.hasTouchpad||this.$emit("clickOrTouchend",e,this))}mouseup(e){this.disabled||(this.$emit("mouseup",e,this),this.$emit("mouseupOrTouchend",e,this),this.$emit("clickOrTouchend",e,this))}mousedown(e){this.disabled||(this.$emit("mousedown",e,this),this.$emit("mousedownOrTouchstart",e,this))}keydownEnter(e){this.disabled||this.$emit("keydownEnter",e,this)}focus(){this.$refs?.button?.focus()}_onThemeChanged(){this.updateTheme()}_onTitleChanged(e){this.innerTitle=null,e&&this.nextTick(()=>this.innerTitle=e)}_onDisabledChanged(e){this.dataThemeInner=e?this.dataDisabledTheme:this.dataTheme,this.showButton=!1,this.nextTick(()=>this.showButton=!0)}};u(d,"ButtonInherited");let t=d;r([o(String)],t.prototype,"icon",2);r([o(String)],t.prototype,"iconRight",2);r([o(String)],t.prototype,"badge",2);r([o(String)],t.prototype,"badgeBg",2);r([o(String)],t.prototype,"badgeColor",2);r([o(Object)],t.prototype,"style",2);r([o(String,null)],t.prototype,"bg",2);r([o(String,null)],t.prototype,"color",2);r([o(String,null)],t.prototype,"borderColor",2);r([o(String,null)],t.prototype,"bgActive",2);r([o(String,null)],t.prototype,"colorActive",2);r([o(String,null)],t.prototype,"colorHover",2);r([o(String,null)],t.prototype,"borderColorActive",2);r([o(String,null)],t.prototype,"boxShadowColor",2);r([o(String)],t.prototype,"fontSize",2);r([o(String)],t.prototype,"fontFamily",2);r([o(String)],t.prototype,"bgGradientTop",2);r([o(String)],t.prototype,"bgGradientBottom",2);r([o(Boolean)],t.prototype,"disabled",2);r([o(Boolean)],t.prototype,"shine",2);r([o(String)],t.prototype,"type",2);r([o(String)],t.prototype,"title",2);r([o(String)],t.prototype,"disabledTitle",2);r([o(String)],t.prototype,"dataTheme",2);r([o(String)],t.prototype,"dataDisabledTheme",2);r([o(String)],t.prototype,"dataPlacement",2);r([o(String)],t.prototype,"dataOffset",2);r([o(String)],t.prototype,"width",2);r([o(String)],t.prototype,"borderRadius",2);r([o(String)],t.prototype,"link",2);r([o(String)],t.prototype,"linkRevert",2);r([o(String,null)],t.prototype,"theme",2);r([f("theme")],t.prototype,"_onThemeChanged",1);r([f("title",!1,!0)],t.prototype,"_onTitleChanged",1);r([f("disabled")],t.prototype,"_onDisabledChanged",1);export{t as B};