vue-spear-tip 0.2.15 → 0.3.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +32 -32
- package/dist/{Button-BkzQb0g8.js → Button-BF1AdShx.js} +1 -1
- package/dist/{Button-DjuvVLMq.cjs → Button-DdKqAWiW.cjs} +1 -1
- package/dist/{CodeHighlight-C8Y-gfDc.cjs → CodeHighlight-B-7X4bsQ.cjs} +1 -1
- package/dist/{CodeHighlight-Bh23z1uf.js → CodeHighlight-hOzktOHM.js} +1 -1
- package/dist/{DateField-Bw053ye0.js → DateField-BTNsMeiD.js} +38 -7
- package/dist/DateField-CyrZ5PW6.cjs +31 -0
- package/dist/{FieldComponent.vue_vue_type_script_lang-Cz840qnG.js → FieldComponent.vue_vue_type_script_lang-BIS_wyes.js} +1 -1
- package/dist/{FieldComponent.vue_vue_type_script_lang-CeH-5wkc.cjs → FieldComponent.vue_vue_type_script_lang-D0xUuutA.cjs} +1 -1
- package/dist/Interfaces/IBaseVueComponent.d.ts +1 -1
- package/dist/Interfaces/IFieldComponent.d.ts +2 -1
- package/dist/Interfaces/IGlobalVST.d.ts +1 -1
- package/dist/Interfaces/IVueClass.d.ts +15 -3
- package/dist/{SelectField-CAXhi6l3.js → SelectField-DRWFNtCM.js} +2 -2
- package/dist/{SelectField-CTGlQluA.cjs → SelectField-DrOKcqsv.cjs} +1 -1
- package/dist/StringField-CS2xLLVC.js +2947 -0
- package/dist/StringField-Cr_aiq1K.cjs +1 -0
- package/dist/SwitchField-D-_rNjBg.cjs +1 -0
- package/dist/SwitchField-DWRm_R_f.js +247 -0
- package/dist/{Tabs-DkxUPHsT.cjs → Tabs-CHK1RNEM.cjs} +1 -1
- package/dist/{Tabs-Be4PuSkW.js → Tabs-ChUGsLW2.js} +1 -1
- package/dist/{TextField-DPh0d_BF.js → TextField-DAikXv-z.js} +2 -2
- package/dist/{TextField-Cd89tDiv.cjs → TextField-Dr1PRxFM.cjs} +1 -1
- package/dist/components/Elements/Button/ButtonInherited.d.ts +1 -1
- package/dist/components/Fields/DateField/IDateField.d.ts +1 -1
- package/dist/core/VST.lib.d.ts +4 -0
- package/dist/core/VueClass.d.ts +10 -2
- package/dist/core/VueClassComponent.d.ts +2 -2
- package/dist/core/index.d.ts +5 -16
- package/dist/index-8WdmYTGn.cjs +1 -0
- package/dist/index-CcAID4PQ.js +4721 -0
- package/dist/replaceable/BaseComponent.vue +7 -8
- package/dist/replaceable/Elements/Button/ButtonInherited.d.ts +1 -1
- package/dist/replaceable/FieldComponent.vue +1 -1
- package/dist/vue-spear-tip.cjs.js +1 -1
- package/dist/vue-spear-tip.css +1 -1
- package/dist/vue-spear-tip.es.js +1 -1
- package/docs/index.html +2 -2
- package/docs/static/{Button-sUI9KqkY.js → Button-CbOocEhR.js} +1 -1
- package/docs/static/{CodeHighlight-DaitPlT0.js → CodeHighlight-DSclQlbd.js} +1 -1
- package/docs/static/DateField-BaLIpfL8.js +31 -0
- package/docs/static/{FieldComponent.vue_vue_type_script_lang-Bta9r3fM.js → FieldComponent.vue_vue_type_script_lang-CYzvY7Mz.js} +1 -1
- package/docs/static/{NoSymbolIcon-CkMqcao3.js → NoSymbolIcon-C5J25dU7.js} +1 -1
- package/docs/static/{SelectField-CU1j3fu_.js → SelectField-B5BRfn_m.js} +1 -1
- package/docs/static/StringField-DV2WOJ76.js +1 -0
- package/docs/static/StringField-DphbH6-i.css +1 -0
- package/docs/static/SwitchField-BC2XMgaP.js +1 -0
- package/docs/static/{Tabs-xXm2jMOr.js → Tabs-DjphcqdT.js} +1 -1
- package/docs/static/{TextField-CGJzy2V1.js → TextField-DlMc7Nnt.js} +1 -1
- package/docs/static/index-B5cKjOBa.js +2 -0
- package/docs/static/main-CPQng82-.css +1 -0
- package/docs/static/main-DiaxPkgh.js +119 -0
- package/package.json +2 -1
- package/dist/DateField-B82HWIBS.cjs +0 -5
- package/dist/StringField-CVG8C0Va.cjs +0 -1
- package/dist/StringField-s9Wz67z0.js +0 -2949
- package/dist/SwitchField-B3U3kL7v.js +0 -255
- package/dist/SwitchField-CLF9MHBX.cjs +0 -1
- package/dist/index-C3iH518C.js +0 -4674
- package/dist/index-_vuPJ0dk.cjs +0 -1
- package/docs/static/DateField-qDHcnTNL.js +0 -5
- package/docs/static/StringField-BJ5e1NcF.css +0 -1
- package/docs/static/StringField-DrzuLoiI.js +0 -1
- package/docs/static/SwitchField-CYjiGtTW.js +0 -1
- package/docs/static/index-YY1vacQn.js +0 -2
- package/docs/static/main-CjwB_FDy.js +0 -95
- package/docs/static/main-CkcC65yN.css +0 -1
- package/dist/core/{Computed.d.ts → Decorators/Computed.d.ts} +0 -0
- package/dist/core/{Props.d.ts → Decorators/Props.d.ts} +1 -1
- /package/dist/core/{Watch.d.ts → Decorators/Watch.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var Vt=Object.defineProperty;var p=(r,t)=>Vt(r,"name",{value:t,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index-8WdmYTGn.cjs"),bt=require("./FieldComponent.vue_vue_type_script_lang-D0xUuutA.cjs"),wt=require("./NoSymbolIcon-BoH28Kep.cjs"),c=require("vue"),Dt=require("./_plugin-vue_export-helper-BaHX9ZKS.cjs");function B(r){return typeof r=="string"||r instanceof String}p(B,"isString");function Ft(r){var t;return typeof r=="object"&&r!=null&&(r==null||(t=r.constructor)==null?void 0:t.name)==="Object"}p(Ft,"isObject");function yt(r,t){return Array.isArray(t)?yt(r,(e,s)=>t.includes(s)):Object.entries(r).reduce((e,s)=>{let[i,a]=s;return t(a,i)&&(e[i]=a),e},{})}p(yt,"pick");const h={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Mt(r){switch(r){case h.LEFT:return h.FORCE_LEFT;case h.RIGHT:return h.FORCE_RIGHT;default:return r}}p(Mt,"forceDirection");function J(r){return r.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}p(J,"escapeRegExp");function U(r,t){if(t===r)return!0;const e=Array.isArray(t),s=Array.isArray(r);let i;if(e&&s){if(t.length!=r.length)return!1;for(i=0;i<t.length;i++)if(!U(t[i],r[i]))return!1;return!0}if(e!=s)return!1;if(t&&r&&typeof t=="object"&&typeof r=="object"){const a=t instanceof Date,n=r instanceof Date;if(a&&n)return t.getTime()==r.getTime();if(a!=n)return!1;const u=t instanceof RegExp,o=r instanceof RegExp;if(u&&o)return t.toString()==r.toString();if(u!=o)return!1;const l=Object.keys(t);for(i=0;i<l.length;i++)if(!Object.prototype.hasOwnProperty.call(r,l[i]))return!1;for(i=0;i<l.length;i++)if(!U(r[l[i]],t[l[i]]))return!1;return!0}else if(t&&r&&typeof t=="function"&&typeof r=="function")return t.toString()===r.toString();return!1}p(U,"objectIncludes");const ut=class ut{constructor(t){for(Object.assign(this,t);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?h.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?h.RIGHT:h.LEFT}};p(ut,"ActionDetails");let Q=ut;function d(r,t){return new d.InputMask(r,t)}p(d,"IMask");function It(r){if(r==null)throw new Error("mask property should be defined");return r instanceof RegExp?d.MaskedRegExp:B(r)?d.MaskedPattern:r===Date?d.MaskedDate:r===Number?d.MaskedNumber:Array.isArray(r)||r===Array?d.MaskedDynamic:d.Masked&&r.prototype instanceof d.Masked?r:d.Masked&&r instanceof d.Masked?r.constructor:r instanceof Function?d.MaskedFunction:(console.warn("Mask not found for mask",r),d.Masked)}p(It,"maskedClass");function O(r){if(!r)throw new Error("Options in not defined");if(d.Masked){if(r.prototype instanceof d.Masked)return{mask:r};const{mask:t=void 0,...e}=r instanceof d.Masked?{mask:r}:Ft(r)&&r.mask instanceof d.Masked?r:{};if(t){const s=t.mask;return{...yt(t,(i,a)=>!a.startsWith("_")),mask:t.constructor,_mask:s,...e}}}return Ft(r)?{...r}:{mask:r}}p(O,"normalizeOpts");function I(r){if(d.Masked&&r instanceof d.Masked)return r;const t=O(r),e=It(t.mask);if(!e)throw new Error("Masked class is not found for provided mask "+t.mask+", appropriate module needs to be imported manually before creating mask.");return t.mask===e&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new e(t)}p(I,"createMask");d.createMask=I;const ot=class ot{get selectionStart(){let t;try{t=this._unsafeSelectionStart}catch{}return t??this.value.length}get selectionEnd(){let t;try{t=this._unsafeSelectionEnd}catch{}return t??this.value.length}select(t,e){if(!(t==null||e==null||t===this.selectionStart&&e===this.selectionEnd))try{this._unsafeSelect(t,e)}catch{}}get isActive(){return!1}};p(ot,"MaskElement");let N=ot;d.MaskElement=N;const At=90,Tt=89,lt=class lt extends N{constructor(t){super(),this.input=t,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 t,e,s;return(t=(e=(s=this.input).getRootNode)==null?void 0:e.call(s))!=null?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(t){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",t.drop),this.input.addEventListener("click",t.click),this.input.addEventListener("focus",t.focus),this.input.addEventListener("blur",t.commit),this._handlers=t}_onKeydown(t){if(this._handlers.redo&&(t.keyCode===At&&t.shiftKey&&(t.metaKey||t.ctrlKey)||t.keyCode===Tt&&t.ctrlKey))return t.preventDefault(),this._handlers.redo(t);if(this._handlers.undo&&t.keyCode===At&&(t.metaKey||t.ctrlKey))return t.preventDefault(),this._handlers.undo(t);t.isComposing||this._handlers.selectionChange(t)}_onBeforeinput(t){if(t.inputType==="historyUndo"&&this._handlers.undo)return t.preventDefault(),this._handlers.undo(t);if(t.inputType==="historyRedo"&&this._handlers.redo)return t.preventDefault(),this._handlers.redo(t)}_onCompositionEnd(t){this._handlers.input(t)}_onInput(t){t.isComposing||this._handlers.input(t)}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={}}};p(lt,"HTMLMaskElement");let T=lt;d.HTMLMaskElement=T;const ht=class ht extends T{constructor(t){super(t),this.input=t}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(t,e){this.input.setSelectionRange(t,e)}get value(){return this.input.value}set value(t){this.input.value=t}};p(ht,"HTMLInputMaskElement");let tt=ht;d.HTMLMaskElement=T;const pt=class pt extends T{get _unsafeSelectionStart(){const t=this.rootElement,e=t.getSelection&&t.getSelection(),s=e&&e.anchorOffset,i=e&&e.focusOffset;return i==null||s==null||s<i?s:i}get _unsafeSelectionEnd(){const t=this.rootElement,e=t.getSelection&&t.getSelection(),s=e&&e.anchorOffset,i=e&&e.focusOffset;return i==null||s==null||s>i?s:i}_unsafeSelect(t,e){if(!this.rootElement.createRange)return;const s=this.rootElement.createRange();s.setStart(this.input.firstChild||this.input,t),s.setEnd(this.input.lastChild||this.input,e);const i=this.rootElement,a=i.getSelection&&i.getSelection();a&&(a.removeAllRanges(),a.addRange(s))}get value(){return this.input.textContent||""}set value(t){this.input.textContent=t}};p(pt,"HTMLContenteditableMaskElement");let $=pt;d.HTMLContenteditableMaskElement=$;const q=class q{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(t){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(t),this.states.length>q.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(t){return this.currentIndex=Math.min(Math.max(this.currentIndex+t,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}};p(q,"InputHistory");let Y=q;Y.MAX_LENGTH=100;const dt=class dt{constructor(t,e){this.el=t instanceof N?t:t.isContentEditable&&t.tagName!=="INPUT"&&t.tagName!=="TEXTAREA"?new $(t):new tt(t),this.masked=I(e),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new Y,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(t){var e;return t==null||((e=this.masked)==null?void 0:e.maskEquals(t))}get mask(){return this.masked.mask}set mask(t){if(this.maskEquals(t))return;if(!(t instanceof d.Masked)&&this.masked.constructor===It(t)){this.masked.updateOptions({mask:t});return}const e=t instanceof d.Masked?t:I({mask:t});e.unmaskedValue=this.masked.unmaskedValue,this.masked=e}get value(){return this._value}set value(t){this.value!==t&&(this.masked.value=t,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(t){this.unmaskedValue!==t&&(this.masked.unmaskedValue=t,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(t){this.rawInputValue!==t&&(this.masked.rawInputValue=t,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(t){this.masked.typedValueEquals(t)||(this.masked.typedValue=t,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(t,e){const s=this._listeners[t];s&&s.forEach(i=>i(e))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(t){!this.el||!this.el.isActive||(this.el.select(t,t),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(t){const e=this.masked.unmaskedValue,s=this.masked.value,i=this.masked.rawInputValue,a=this.displayValue,n=this.unmaskedValue!==e||this.value!==s||this._rawInputValue!==i;this._unmaskedValue=e,this._value=s,this._rawInputValue=i,this.el.value!==a&&(this.el.value=a),t==="auto"?this.alignCursor():t!=null&&(this.cursorPos=t),n&&this._fireChangeEvents(),!this._historyChanging&&(n||this.history.isEmpty)&&this.history.push({unmaskedValue:e,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(t){const{mask:e,...s}=t,i=!this.maskEquals(e),a=this.masked.optionsIsChanged(s);i&&(this.mask=e),a&&this.masked.updateOptions(s),(i||a)&&this.updateControl()}updateCursor(t){t!=null&&(this.cursorPos=t,this._delayUpdateCursor(t))}_delayUpdateCursor(t){this._abortUpdateCursor(),this._changingCursorPos=t,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,h.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(t,e){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(e),this}off(t,e){if(!this._listeners[t])return this;if(!e)return delete this._listeners[t],this;const s=this._listeners[t].indexOf(e);return s>=0&&this._listeners[t].splice(s,1),this}_onInput(t){this._inputEvent=t,this._abortUpdateCursor();const e=new Q({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),s=this.masked.rawInputValue,i=this.masked.splice(e.startChangePos,e.removed.length,e.inserted,e.removeDirection,{input:!0,raw:!0}).offset,a=s===this.masked.rawInputValue?e.removeDirection:h.NONE;let n=this.masked.nearestInputPos(e.startChangePos+i,a);a!==h.NONE&&(n=this.masked.nearestInputPos(n,h.NONE)),this.updateControl(n),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(t){t.preventDefault(),t.stopPropagation()}_onFocus(t){this.alignCursorFriendly()}_onClick(t){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(t){t&&(this._historyChanging=!0,this.unmaskedValue=t.unmaskedValue,this.el.select(t.selection.start,t.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}};p(dt,"InputMask");let et=dt;d.InputMask=et;const G=class G{static normalize(t){return Array.isArray(t)?t:[t,new G]}constructor(t){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},t)}aggregate(t){return this.inserted+=t.inserted,this.rawInserted+=t.rawInserted,this.tailShift+=t.tailShift,this.skip=this.skip||t.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(t){return this.inserted===t.inserted&&this.tailShift===t.tailShift&&this.rawInserted===t.rawInserted&&this.skip===t.skip}};p(G,"ChangeDetails");let f=G;d.ChangeDetails=f;const ct=class ct{constructor(t,e,s){t===void 0&&(t=""),e===void 0&&(e=0),this.value=t,this.from=e,this.stop=s}toString(){return this.value}extend(t){this.value+=String(t)}appendTo(t){return t.append(this.toString(),{tail:!0}).aggregate(t._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(t){Object.assign(this,t)}unshift(t){if(!this.value.length||t!=null&&this.from>=t)return"";const e=this.value[0];return this.value=this.value.slice(1),e}shift(){if(!this.value.length)return"";const t=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),t}};p(ct,"ContinuousTailDetails");let A=ct;const b=class b{constructor(t){this._value="",this._update({...b.DEFAULTS,...t}),this._initialized=!0}updateOptions(t){this.optionsIsChanged(t)&&this.withValueRefresh(this._update.bind(this,t))}_update(t){Object.assign(this,t)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value}reset(){this._value=""}get value(){return this._value}set value(t){this.resolve(t,{input:!0})}resolve(t,e){e===void 0&&(e={input:!0}),this.reset(),this.append(t,e,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(t){this.resolve(t,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(t){this.format?this.value=this.format(t,this):this.unmaskedValue=String(t)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(t){this.resolve(t,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(t,e){return t}totalInputPositions(t,e){return t===void 0&&(t=0),e===void 0&&(e=this.displayValue.length),Math.min(this.displayValue.length,e-t)}extractInput(t,e,s){return t===void 0&&(t=0),e===void 0&&(e=this.displayValue.length),this.displayValue.slice(t,e)}extractTail(t,e){return t===void 0&&(t=0),e===void 0&&(e=this.displayValue.length),new A(this.extractInput(t,e),t)}appendTail(t){return B(t)&&(t=new A(String(t))),t.appendTo(this)}_appendCharRaw(t,e){return t?(this._value+=t,new f({inserted:t,rawInserted:t})):new f}_appendChar(t,e,s){e===void 0&&(e={});const i=this.state;let a;if([t,a]=this.doPrepareChar(t,e),t&&(a=a.aggregate(this._appendCharRaw(t,e)),!a.rawInserted&&this.autofix==="pad")){const n=this.state;this.state=i;let u=this.pad(e);const o=this._appendCharRaw(t,e);u=u.aggregate(o),o.rawInserted||u.equals(a)?a=u:this.state=n}if(a.inserted){let n,u=this.doValidate(e)!==!1;if(u&&s!=null){const o=this.state;if(this.overwrite===!0){n=s.state;for(let m=0;m<a.rawInserted.length;++m)s.unshift(this.displayValue.length-a.tailShift)}let l=this.appendTail(s);if(u=l.rawInserted.length===s.toString().length,!(u&&l.inserted)&&this.overwrite==="shift"){this.state=o,n=s.state;for(let m=0;m<a.rawInserted.length;++m)s.shift();l=this.appendTail(s),u=l.rawInserted.length===s.toString().length}u&&l.inserted&&(this.state=o)}u||(a=new f,this.state=i,s&&n&&(s.state=n))}return a}_appendPlaceholder(){return new f}_appendEager(){return new f}append(t,e,s){if(!B(t))throw new Error("value should be string");const i=B(s)?new A(String(s)):s;e!=null&&e.tail&&(e._beforeTailState=this.state);let a;[t,a]=this.doPrepare(t,e);for(let n=0;n<t.length;++n){const u=this._appendChar(t[n],e,i);if(!u.rawInserted&&!this.doSkipInvalid(t[n],e,i))break;a.aggregate(u)}return(this.eager===!0||this.eager==="append")&&e!=null&&e.input&&t&&a.aggregate(this._appendEager()),i!=null&&(a.tailShift+=this.appendTail(i).tailShift),a}remove(t,e){return t===void 0&&(t=0),e===void 0&&(e=this.displayValue.length),this._value=this.displayValue.slice(0,t)+this.displayValue.slice(e),new f}withValueRefresh(t){if(this._refreshing||!this._initialized)return t();this._refreshing=!0;const e=this.rawInputValue,s=this.value,i=t();return this.rawInputValue=e,this.value&&this.value!==s&&s.indexOf(this.value)===0&&(this.append(s.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,i}runIsolated(t){if(this._isolated||!this._initialized)return t(this);this._isolated=!0;const e=this.state,s=t(this);return this.state=e,delete this._isolated,s}doSkipInvalid(t,e,s){return!!this.skipInvalid}doPrepare(t,e){return e===void 0&&(e={}),f.normalize(this.prepare?this.prepare(t,this,e):t)}doPrepareChar(t,e){return e===void 0&&(e={}),f.normalize(this.prepareChar?this.prepareChar(t,this,e):t)}doValidate(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}doCommit(){this.commit&&this.commit(this.value,this)}splice(t,e,s,i,a){s===void 0&&(s=""),i===void 0&&(i=h.NONE),a===void 0&&(a={input:!0});const n=t+e,u=this.extractTail(n),o=this.eager===!0||this.eager==="remove";let l;o&&(i=Mt(i),l=this.extractInput(0,n,{raw:!0}));let m=t;const v=new f;if(i!==h.NONE&&(m=this.nearestInputPos(t,e>1&&t!==0&&!o?h.NONE:i),v.tailShift=m-t),v.aggregate(this.remove(m)),o&&i!==h.NONE&&l===this.rawInputValue)if(i===h.FORCE_LEFT){let F;for(;l===this.rawInputValue&&(F=this.displayValue.length);)v.aggregate(new f({tailShift:-1})).aggregate(this.remove(F-1))}else i===h.FORCE_RIGHT&&u.unshift();return v.aggregate(this.append(s,a,u))}maskEquals(t){return this.mask===t}optionsIsChanged(t){return!U(this,t)}typedValueEquals(t){const e=this.typedValue;return t===e||b.EMPTY_VALUES.includes(t)&&b.EMPTY_VALUES.includes(e)||(this.format?this.format(t,this)===this.format(this.typedValue,this):!1)}pad(t){return new f}};p(b,"Masked");let C=b;C.DEFAULTS={skipInvalid:!0};C.EMPTY_VALUES=[void 0,null,""];d.Masked=C;const x=class x{constructor(t,e){t===void 0&&(t=[]),e===void 0&&(e=0),this.chunks=t,this.from=e}toString(){return this.chunks.map(String).join("")}extend(t){if(!String(t))return;t=B(t)?new A(String(t)):t;const e=this.chunks[this.chunks.length-1],s=e&&(e.stop===t.stop||t.stop==null)&&t.from===e.from+e.toString().length;if(t instanceof A)s?e.extend(t.toString()):this.chunks.push(t);else if(t instanceof x){if(t.stop==null){let i;for(;t.chunks.length&&t.chunks[0].stop==null;)i=t.chunks.shift(),i.from+=t.from,this.extend(i)}t.toString()&&(t.stop=t.blockIndex,this.chunks.push(t))}}appendTo(t){if(!(t instanceof d.MaskedPattern))return new A(this.toString()).appendTo(t);const e=new f;for(let s=0;s<this.chunks.length;++s){const i=this.chunks[s],a=t._mapPosToBlock(t.displayValue.length),n=i.stop;let u;if(n!=null&&(!a||a.index<=n)&&((i instanceof x||t._stops.indexOf(n)>=0)&&e.aggregate(t._appendPlaceholder(n)),u=i instanceof x&&t._blocks[n]),u){const o=u.appendTail(i);e.aggregate(o);const l=i.toString().slice(o.rawInserted.length);l&&e.aggregate(t.append(l,{tail:!0}))}else e.aggregate(t.append(i.toString(),{tail:!0}))}return e}get state(){return{chunks:this.chunks.map(t=>t.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(t){const{chunks:e,...s}=t;Object.assign(this,s),this.chunks=e.map(i=>{const a="chunks"in i?new x:new A;return a.state=i,a})}unshift(t){if(!this.chunks.length||t!=null&&this.from>=t)return"";const e=t!=null?t-this.from:t;let s=0;for(;s<this.chunks.length;){const i=this.chunks[s],a=i.unshift(e);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 t=this.chunks.length-1;for(;0<=t;){const e=this.chunks[t],s=e.shift();if(e.toString()){if(!s)break;--t}else this.chunks.splice(t,1);if(s)return s}return""}};p(x,"ChunksTailDetails");let K=x;const ft=class ft{constructor(t,e){this.masked=t,this._log=[];const{offset:s,index:i}=t._mapPosToBlock(e)||(e<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(t){Object.assign(this,t)}pushState(){this._log.push(this.state)}popState(){const t=this._log.pop();return t&&(this.state=t),t}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(t){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((e=this.block)==null?void 0:e.displayValue.length)||0){var e;if(t())return this.ok=!0}return this.ok=!1}_pushRight(t){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(t())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,h.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,h.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,h.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,h.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,h.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,h.NONE),!0})}};p(ft,"PatternCursor");let st=ft;const mt=class mt{constructor(t){Object.assign(this,t),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(t,e){return t===void 0&&(t=0),e===void 0&&(e=this._value.length),this._value=this._value.slice(0,t)+this._value.slice(e),this._value||(this._isRawInput=!1),new f}nearestInputPos(t,e){e===void 0&&(e=h.NONE);const s=0,i=this._value.length;switch(e){case h.LEFT:case h.FORCE_LEFT:return s;case h.NONE:case h.RIGHT:case h.FORCE_RIGHT:default:return i}}totalInputPositions(t,e){return t===void 0&&(t=0),e===void 0&&(e=this._value.length),this._isRawInput?e-t:0}extractInput(t,e,s){return t===void 0&&(t=0),e===void 0&&(e=this._value.length),s===void 0&&(s={}),s.raw&&this._isRawInput&&this._value.slice(t,e)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(t,e){if(e===void 0&&(e={}),this.isFilled)return new f;const s=this.eager===!0||this.eager==="append",a=this.char===t&&(this.isUnmasking||e.input||e.raw)&&(!e.raw||!s)&&!e.tail,n=new f({inserted:this.char,rawInserted:a?this.char:""});return this._value=this.char,this._isRawInput=a&&(e.raw||e.input),n}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const t=new f;return this.isFilled||(this._value=t.inserted=this.char),t}extractTail(){return new A("")}appendTail(t){return B(t)&&(t=new A(String(t))),t.appendTo(this)}append(t,e,s){const i=this._appendChar(t[0],e);return s!=null&&(i.tailShift+=this.appendTail(s).tailShift),i}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value,this._isRawInput=!!t._rawInputValue}pad(t){return this._appendPlaceholder()}};p(mt,"PatternFixedDefinition");let z=mt;const kt=class kt{constructor(t){const{parent:e,isOptional:s,placeholderChar:i,displayChar:a,lazy:n,eager:u,...o}=t;this.masked=I(o),Object.assign(this,{parent:e,isOptional:s,placeholderChar:i,displayChar:a,lazy:n,eager:u})}reset(){this.isFilled=!1,this.masked.reset()}remove(t,e){return t===void 0&&(t=0),e===void 0&&(e=this.value.length),t===0&&e>=1?(this.isFilled=!1,this.masked.remove(t,e)):new f}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(t,e){if(e===void 0&&(e={}),this.isFilled)return new f;const s=this.masked.state;let i=this.masked._appendChar(t,this.currentMaskFlags(e));return i.inserted&&this.doValidate(e)===!1&&(i=new f,this.masked.state=s),!i.inserted&&!this.isOptional&&!this.lazy&&!e.input&&(i.inserted=this.placeholderChar),i.skip=!i.inserted&&!this.isOptional,this.isFilled=!!i.inserted,i}append(t,e,s){return this.masked.append(t,this.currentMaskFlags(e),s)}_appendPlaceholder(){return this.isFilled||this.isOptional?new f:(this.isFilled=!0,new f({inserted:this.placeholderChar}))}_appendEager(){return new f}extractTail(t,e){return this.masked.extractTail(t,e)}appendTail(t){return this.masked.appendTail(t)}extractInput(t,e,s){return t===void 0&&(t=0),e===void 0&&(e=this.value.length),this.masked.extractInput(t,e,s)}nearestInputPos(t,e){e===void 0&&(e=h.NONE);const s=0,i=this.value.length,a=Math.min(Math.max(t,s),i);switch(e){case h.LEFT:case h.FORCE_LEFT:return this.isComplete?a:s;case h.RIGHT:case h.FORCE_RIGHT:return this.isComplete?a:i;case h.NONE:default:return a}}totalInputPositions(t,e){return t===void 0&&(t=0),e===void 0&&(e=this.value.length),this.value.slice(t,e).length}doValidate(t){return this.masked.doValidate(this.currentMaskFlags(t))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(t)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(t){this.masked.state=t.masked,this.isFilled=t.isFilled}currentMaskFlags(t){var e;return{...t,_beforeTailState:(t==null||(e=t._beforeTailState)==null?void 0:e.masked)||t?._beforeTailState}}pad(t){return new f}};p(kt,"PatternInputDefinition");let R=kt;R.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 gt=class gt extends C{updateOptions(t){super.updateOptions(t)}_update(t){const e=t.mask;e&&(t.validate=s=>s.search(e)>=0),super._update(t)}};p(gt,"MaskedRegExp");let it=gt;d.MaskedRegExp=it;const w=class w extends C{constructor(t){super({...w.DEFAULTS,...t,definitions:Object.assign({},R.DEFAULT_DEFINITIONS,t?.definitions)})}updateOptions(t){super.updateOptions(t)}_update(t){t.definitions=Object.assign({},this.definitions,t.definitions),super._update(t),this._rebuildMask()}_rebuildMask(){const t=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const e=this.mask;if(!e||!t)return;let s=!1,i=!1;for(let a=0;a<e.length;++a){if(this.blocks){const l=e.slice(a),m=Object.keys(this.blocks).filter(F=>l.indexOf(F)===0);m.sort((F,P)=>P.length-F.length);const v=m[0];if(v){const{expose:F,repeat:P,...xt}=O(this.blocks[v]),Et={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...xt,repeat:P,parent:this},X=P!=null?new d.RepeatBlock(Et):I(Et);X&&(this._blocks.push(X),F&&(this.exposeBlock=X),this._maskedBlocks[v]||(this._maskedBlocks[v]=[]),this._maskedBlocks[v].push(this._blocks.length-1)),a+=v.length-1;continue}}let n=e[a],u=n in t;if(n===w.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(n==="{"||n==="}"){s=!s;continue}if(n==="["||n==="]"){i=!i;continue}if(n===w.ESCAPE_CHAR){if(++a,n=e[a],!n)break;u=!1}const o=u?new R({isOptional:i,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...O(t[n]),parent:this}):new z({char:n,eager:this.eager,isUnmasking:s});this._blocks.push(o)}}get state(){return{...super.state,_blocks:this._blocks.map(t=>t.state)}}set state(t){if(!t){this.reset();return}const{_blocks:e,...s}=t;this._blocks.forEach((i,a)=>i.state=e[a]),super.state=s}reset(){super.reset(),this._blocks.forEach(t=>t.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(t=>t.isComplete)}get isFilled(){return this._blocks.every(t=>t.isFilled)}get isFixed(){return this._blocks.every(t=>t.isFixed)}get isOptional(){return this._blocks.every(t=>t.isOptional)}doCommit(){this._blocks.forEach(t=>t.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((t,e)=>t+=e.unmaskedValue,"")}set unmaskedValue(t){if(this.exposeBlock){const e=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=t,this.appendTail(e),this.doCommit()}else super.unmaskedValue=t}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((t,e)=>t+=e.value,"")}set value(t){if(this.exposeBlock){const e=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=t,this.appendTail(e),this.doCommit()}else super.value=t}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(t){if(this.exposeBlock){const e=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=t,this.appendTail(e),this.doCommit()}else super.typedValue=t}get displayValue(){return this._blocks.reduce((t,e)=>t+=e.displayValue,"")}appendTail(t){return super.appendTail(t).aggregate(this._appendPlaceholder())}_appendEager(){var t;const e=new f;let s=(t=this._mapPosToBlock(this.displayValue.length))==null?void 0:t.index;if(s==null)return e;this._blocks[s].isFilled&&++s;for(let i=s;i<this._blocks.length;++i){const a=this._blocks[i]._appendEager();if(!a.inserted)break;e.aggregate(a)}return e}_appendCharRaw(t,e){e===void 0&&(e={});const s=this._mapPosToBlock(this.displayValue.length),i=new f;if(!s)return i;for(let n=s.index,u;u=this._blocks[n];++n){var a;const o=u._appendChar(t,{...e,_beforeTailState:(a=e._beforeTailState)==null||(a=a._blocks)==null?void 0:a[n]});if(i.aggregate(o),o.consumed)break}return i}extractTail(t,e){t===void 0&&(t=0),e===void 0&&(e=this.displayValue.length);const s=new K;return t===e||this._forEachBlocksInRange(t,e,(i,a,n,u)=>{const o=i.extractTail(n,u);o.stop=this._findStopBefore(a),o.from=this._blockStartPos(a),o instanceof K&&(o.blockIndex=a),s.extend(o)}),s}extractInput(t,e,s){if(t===void 0&&(t=0),e===void 0&&(e=this.displayValue.length),s===void 0&&(s={}),t===e)return"";let i="";return this._forEachBlocksInRange(t,e,(a,n,u,o)=>{i+=a.extractInput(u,o,s)}),i}_findStopBefore(t){let e;for(let s=0;s<this._stops.length;++s){const i=this._stops[s];if(i<=t)e=i;else break}return e}_appendPlaceholder(t){const e=new f;if(this.lazy&&t==null)return e;const s=this._mapPosToBlock(this.displayValue.length);if(!s)return e;const i=s.index,a=t??this._blocks.length;return this._blocks.slice(i,a).forEach(n=>{if(!n.lazy||t!=null){var u;e.aggregate(n._appendPlaceholder((u=n._blocks)==null?void 0:u.length))}}),e}_mapPosToBlock(t){let e="";for(let s=0;s<this._blocks.length;++s){const i=this._blocks[s],a=e.length;if(e+=i.displayValue,t<=e.length)return{index:s,offset:t-a}}}_blockStartPos(t){return this._blocks.slice(0,t).reduce((e,s)=>e+=s.displayValue.length,0)}_forEachBlocksInRange(t,e,s){e===void 0&&(e=this.displayValue.length);const i=this._mapPosToBlock(t);if(i){const a=this._mapPosToBlock(e),n=a&&i.index===a.index,u=i.offset,o=a&&n?a.offset:this._blocks[i.index].displayValue.length;if(s(this._blocks[i.index],i.index,u,o),a&&!n){for(let l=i.index+1;l<a.index;++l)s(this._blocks[l],l,0,this._blocks[l].displayValue.length);s(this._blocks[a.index],a.index,0,a.offset)}}}remove(t,e){t===void 0&&(t=0),e===void 0&&(e=this.displayValue.length);const s=super.remove(t,e);return this._forEachBlocksInRange(t,e,(i,a,n,u)=>{s.aggregate(i.remove(n,u))}),s}nearestInputPos(t,e){if(e===void 0&&(e=h.NONE),!this._blocks.length)return 0;const s=new st(this,t);if(e===h.NONE)return s.pushRightBeforeInput()||(s.popState(),s.pushLeftBeforeInput())?s.pos:this.displayValue.length;if(e===h.LEFT||e===h.FORCE_LEFT){if(e===h.LEFT){if(s.pushRightBeforeFilled(),s.ok&&s.pos===t)return t;s.popState()}if(s.pushLeftBeforeInput(),s.pushLeftBeforeRequired(),s.pushLeftBeforeFilled(),e===h.LEFT){if(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.ok&&s.pos<=t||(s.popState(),s.ok&&s.pos<=t))return s.pos;s.popState()}return s.ok?s.pos:e===h.FORCE_LEFT?0:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:0)}return e===h.RIGHT||e===h.FORCE_RIGHT?(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.pushRightBeforeFilled()?s.pos:e===h.FORCE_RIGHT?this.displayValue.length:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:this.nearestInputPos(t,h.LEFT))):t}totalInputPositions(t,e){t===void 0&&(t=0),e===void 0&&(e=this.displayValue.length);let s=0;return this._forEachBlocksInRange(t,e,(i,a,n,u)=>{s+=i.totalInputPositions(n,u)}),s}maskedBlock(t){return this.maskedBlocks(t)[0]}maskedBlocks(t){const e=this._maskedBlocks[t];return e?e.map(s=>this._blocks[s]):[]}pad(t){const e=new f;return this._forEachBlocksInRange(0,this.displayValue.length,s=>e.aggregate(s.pad(t))),e}};p(w,"MaskedPattern");let E=w;E.DEFAULTS={...C.DEFAULTS,lazy:!0,placeholderChar:"_"};E.STOP_CHAR="`";E.ESCAPE_CHAR="\\";E.InputDefinition=R;E.FixedDefinition=z;d.MaskedPattern=E;const _t=class _t extends E{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{to:e=this.to||0,from:s=this.from||0,maxLength:i=this.maxLength||0,autofix:a=this.autofix,...n}=t;this.to=e,this.from=s,this.maxLength=Math.max(String(e).length,i),this.autofix=a;const u=String(this.from).padStart(this.maxLength,"0"),o=String(this.to).padStart(this.maxLength,"0");let l=0;for(;l<o.length&&o[l]===u[l];)++l;n.mask=o.slice(0,l).replace(/0/g,"\\0")+"0".repeat(this.maxLength-l),super._update(n)}get isComplete(){return super.isComplete&&!!this.value}boundaries(t){let e="",s="";const[,i,a]=t.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(e="0".repeat(i.length)+a,s="9".repeat(i.length)+a),e=e.padEnd(this.maxLength,"0"),s=s.padEnd(this.maxLength,"9"),[e,s]}doPrepareChar(t,e){e===void 0&&(e={});let s;return[t,s]=super.doPrepareChar(t.replace(/\D/g,""),e),t||(s.skip=!this.isComplete),[t,s]}_appendCharRaw(t,e){if(e===void 0&&(e={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(t,e);const s=String(this.from).padStart(this.maxLength,"0"),i=String(this.to).padStart(this.maxLength,"0"),[a,n]=this.boundaries(this.value+t);return Number(n)<this.from?super._appendCharRaw(s[this.value.length],e):Number(a)>this.to?!e.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(s[this.value.length],e).aggregate(this._appendCharRaw(t,e)):super._appendCharRaw(i[this.value.length],e):super._appendCharRaw(t,e)}doValidate(t){const e=this.value;if(e.search(/[^0]/)===-1&&e.length<=this._matchFrom)return!0;const[i,a]=this.boundaries(e);return this.from<=Number(a)&&Number(i)<=this.to&&super.doValidate(t)}pad(t){const e=new f;if(this.value.length===this.maxLength)return e;const s=this.value,i=this.maxLength-this.value.length;if(i){this.reset();for(let a=0;a<i;++a)e.aggregate(super._appendCharRaw("0",t));s.split("").forEach(a=>this._appendCharRaw(a))}return e}};p(_t,"MaskedRange");let D=_t;d.MaskedRange=D;const Rt="d{.}`m{.}`Y",S=class S extends E{static extractPatternOptions(t){const{mask:e,pattern:s,...i}=t;return{...i,mask:B(e)?e:s}}constructor(t){super(S.extractPatternOptions({...S.DEFAULTS,...t}))}updateOptions(t){super.updateOptions(t)}_update(t){const{mask:e,pattern:s,blocks:i,...a}={...S.DEFAULTS,...t},n=Object.assign({},S.GET_DEFAULT_BLOCKS());t.min&&(n.Y.from=t.min.getFullYear()),t.max&&(n.Y.to=t.max.getFullYear()),t.min&&t.max&&n.Y.from===n.Y.to&&(n.m.from=t.min.getMonth()+1,n.m.to=t.max.getMonth()+1,n.m.from===n.m.to&&(n.d.from=t.min.getDate(),n.d.to=t.max.getDate())),Object.assign(n,this.blocks,i),super._update({...a,mask:B(e)?e:s,blocks:n})}doValidate(t){const e=this.date;return super.doValidate(t)&&(!this.isComplete||this.isDateExist(this.value)&&e!=null&&(this.min==null||this.min<=e)&&(this.max==null||e<=this.max))}isDateExist(t){return this.format(this.parse(t,this),this).indexOf(t)>=0}get date(){return this.typedValue}set date(t){this.typedValue=t}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(t){super.typedValue=t}maskEquals(t){return t===Date||super.maskEquals(t)}optionsIsChanged(t){return super.optionsIsChanged(S.extractPatternOptions(t))}};p(S,"MaskedDate");let L=S;L.GET_DEFAULT_BLOCKS=()=>({d:{mask:D,from:1,to:31,maxLength:2},m:{mask:D,from:1,to:12,maxLength:2},Y:{mask:D,from:1900,to:9999}});L.DEFAULTS={...E.DEFAULTS,mask:Date,pattern:Rt,format:p((r,t)=>{if(!r)return"";const e=String(r.getDate()).padStart(2,"0"),s=String(r.getMonth()+1).padStart(2,"0"),i=r.getFullYear();return[e,s,i].join(".")},"format"),parse:p((r,t)=>{const[e,s,i]=r.split(".").map(Number);return new Date(i,s-1,e)},"parse")};d.MaskedDate=L;const Z=class Z extends C{constructor(t){super({...Z.DEFAULTS,...t}),this.currentMask=void 0}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),"mask"in t&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(t.mask)?t.mask.map(e=>{const{expose:s,...i}=O(e),a=I({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...i});return s&&(this.exposeMask=a),a}):[])}_appendCharRaw(t,e){e===void 0&&(e={});const s=this._applyDispatch(t,e);return this.currentMask&&s.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(e))),s}_applyDispatch(t,e,s){t===void 0&&(t=""),e===void 0&&(e={}),s===void 0&&(s="");const i=e.tail&&e._beforeTailState!=null?e._beforeTailState._value:this.value,a=this.rawInputValue,n=e.tail&&e._beforeTailState!=null?e._beforeTailState._rawInputValue:a,u=a.slice(n.length),o=this.currentMask,l=new f,m=o?.state;return this.currentMask=this.doDispatch(t,{...e},s),this.currentMask&&(this.currentMask!==o?(this.currentMask.reset(),n&&(this.currentMask.append(n,{raw:!0}),l.tailShift=this.currentMask.value.length-i.length),u&&(l.tailShift+=this.currentMask.append(u,{raw:!0,tail:!0}).tailShift)):m&&(this.currentMask.state=m)),l}_appendPlaceholder(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendPlaceholder()),t}_appendEager(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendEager()),t}appendTail(t){const e=new f;return t&&e.aggregate(this._applyDispatch("",{},t)),e.aggregate(this.currentMask?this.currentMask.appendTail(t):super.appendTail(t))}currentMaskFlags(t){var e,s;return{...t,_beforeTailState:((e=t._beforeTailState)==null?void 0:e.currentMaskRef)===this.currentMask&&((s=t._beforeTailState)==null?void 0:s.currentMask)||t._beforeTailState}}doDispatch(t,e,s){return e===void 0&&(e={}),s===void 0&&(s=""),this.dispatch(t,this,e,s)}doValidate(t){return super.doValidate(t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))}doPrepare(t,e){e===void 0&&(e={});let[s,i]=super.doPrepare(t,e);if(this.currentMask){let a;[s,a]=super.doPrepare(s,this.currentMaskFlags(e)),i=i.aggregate(a)}return[s,i]}doPrepareChar(t,e){e===void 0&&(e={});let[s,i]=super.doPrepareChar(t,e);if(this.currentMask){let a;[s,a]=super.doPrepareChar(s,this.currentMaskFlags(e)),i=i.aggregate(a)}return[s,i]}reset(){var t;(t=this.currentMask)==null||t.reset(),this.compiledMasks.forEach(e=>e.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(t){this.exposeMask?(this.exposeMask.value=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=t}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(t){this.exposeMask?(this.exposeMask.unmaskedValue=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=t}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(t){if(this.exposeMask){this.exposeMask.typedValue=t,this.currentMask=this.exposeMask,this._applyDispatch();return}let e=String(t);this.currentMask&&(this.currentMask.typedValue=t,e=this.currentMask.unmaskedValue),this.unmaskedValue=e}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var t;return!!((t=this.currentMask)!=null&&t.isComplete)}get isFilled(){var t;return!!((t=this.currentMask)!=null&&t.isFilled)}remove(t,e){const s=new f;return this.currentMask&&s.aggregate(this.currentMask.remove(t,e)).aggregate(this._applyDispatch()),s}get state(){var t;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(e=>e.state),currentMaskRef:this.currentMask,currentMask:(t=this.currentMask)==null?void 0:t.state}}set state(t){const{compiledMasks:e,currentMaskRef:s,currentMask:i,...a}=t;e&&this.compiledMasks.forEach((n,u)=>n.state=e[u]),s!=null&&(this.currentMask=s,this.currentMask.state=i),super.state=a}extractInput(t,e,s){return this.currentMask?this.currentMask.extractInput(t,e,s):""}extractTail(t,e){return this.currentMask?this.currentMask.extractTail(t,e):super.extractTail(t,e)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(t,e){return this.currentMask?this.currentMask.nearestInputPos(t,e):super.nearestInputPos(t,e)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(t){this._overwrite=t}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(t){this._eager=t}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(t){this._skipInvalid=t}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(t){this._autofix=t}maskEquals(t){return Array.isArray(t)?this.compiledMasks.every((e,s)=>{if(!t[s])return;const{mask:i,...a}=t[s];return U(e,a)&&e.maskEquals(i)}):super.maskEquals(t)}typedValueEquals(t){var e;return!!((e=this.currentMask)!=null&&e.typedValueEquals(t))}};p(Z,"MaskedDynamic");let j=Z;j.DEFAULTS={...C.DEFAULTS,dispatch:p((r,t,e,s)=>{if(!t.compiledMasks.length)return;const i=t.rawInputValue,a=t.compiledMasks.map((n,u)=>{const o=t.currentMask===n,l=o?n.displayValue.length:n.nearestInputPos(n.displayValue.length,h.FORCE_LEFT);return n.rawInputValue!==i?(n.reset(),n.append(i,{raw:!0})):o||n.remove(l),n.append(r,t.currentMaskFlags(e)),n.appendTail(s),{index:u,weight:n.rawInputValue.length,totalInputPositions:n.totalInputPositions(0,Math.max(l,n.nearestInputPos(n.displayValue.length,h.FORCE_LEFT)))}});return a.sort((n,u)=>u.weight-n.weight||u.totalInputPositions-n.totalInputPositions),t.compiledMasks[a[0].index]},"dispatch")};d.MaskedDynamic=j;const W=class W extends E{constructor(t){super({...W.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){const{enum:e,...s}=t;if(e){const i=e.map(u=>u.length),a=Math.min(...i),n=Math.max(...i)-a;s.mask="*".repeat(a),n&&(s.mask+="["+"*".repeat(n)+"]"),this.enum=e}super._update(s)}_appendCharRaw(t,e){e===void 0&&(e={});const s=Math.min(this.nearestInputPos(0,h.FORCE_RIGHT),this.value.length),i=this.enum.filter(a=>this.matchValue(a,this.unmaskedValue+t,s));if(i.length){i.length===1&&this._forEachBlocksInRange(0,this.value.length,(n,u)=>{const o=i[0][u];u>=this.value.length||o===n.value||(n.reset(),n._appendChar(o,e))});const a=super._appendCharRaw(i[0][this.value.length],e);return i.length===1&&i[0].slice(this.unmaskedValue.length).split("").forEach(n=>a.aggregate(super._appendCharRaw(n))),a}return new f({skip:!this.isComplete})}extractTail(t,e){return t===void 0&&(t=0),e===void 0&&(e=this.displayValue.length),new A("",t)}remove(t,e){if(t===void 0&&(t=0),e===void 0&&(e=this.displayValue.length),t===e)return new f;const s=Math.min(super.nearestInputPos(0,h.FORCE_RIGHT),this.value.length);let i;for(i=t;i>=0&&!(this.enum.filter(u=>this.matchValue(u,this.value.slice(s,i),s)).length>1);--i);const a=super.remove(i,e);return a.tailShift+=i-t,a}get isComplete(){return this.enum.indexOf(this.value)>=0}};p(W,"MaskedEnum");let H=W;H.DEFAULTS={...E.DEFAULTS,matchValue:p((r,t,e)=>r.indexOf(t,e)===e,"matchValue")};d.MaskedEnum=H;const vt=class vt extends C{updateOptions(t){super.updateOptions(t)}_update(t){super._update({...t,validate:t.mask})}};p(vt,"MaskedFunction");let at=vt;d.MaskedFunction=at;var St;const y=class y extends C{constructor(t){super({...y.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),this._updateRegExps()}_updateRegExps(){const t="^"+(this.allowNegative?"[+|\\-]?":""),e="\\d*",s=(this.scale?"("+J(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+e+s),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(J).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(J(this.thousandsSeparator),"g")}_removeThousandsSeparators(t){return t.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(t){const e=t.split(this.radix);return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),e.join(this.radix)}doPrepareChar(t,e){e===void 0&&(e={});const[s,i]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(e.input&&e.raw||!e.input&&!e.raw)?t.replace(this._mapToRadixRegExp,this.radix):t),e);return t&&!s&&(i.skip=!0),s&&!this.allowPositive&&!this.value&&s!=="-"&&i.aggregate(this._appendChar("-")),[s,i]}_separatorsCount(t,e){e===void 0&&(e=!1);let s=0;for(let i=0;i<t;++i)this._value.indexOf(this.thousandsSeparator,i)===i&&(++s,e&&(t+=this.thousandsSeparator.length));return s}_separatorsCountFromSlice(t){return t===void 0&&(t=this._value),this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}extractInput(t,e,s){return t===void 0&&(t=0),e===void 0&&(e=this.displayValue.length),[t,e]=this._adjustRangeWithSeparators(t,e),this._removeThousandsSeparators(super.extractInput(t,e,s))}_appendCharRaw(t,e){e===void 0&&(e={});const s=e.tail&&e._beforeTailState?e._beforeTailState._value:this._value,i=this._separatorsCountFromSlice(s);this._value=this._removeThousandsSeparators(this.value);const a=this._value;this._value+=t;const n=this.number;let u=!isNaN(n),o=!1;if(u){let F;this.min!=null&&this.min<0&&this.number<this.min&&(F=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(F=this.max),F!=null&&(this.autofix?(this._value=this.format(F,this).replace(y.UNMASKED_RADIX,this.radix),o||(o=a===this._value&&!e.tail)):u=!1),u&&(u=!!this._value.match(this._numberRegExp))}let l;u?l=new f({inserted:this._value.slice(a.length),rawInserted:o?"":t,skip:o}):(this._value=a,l=new f),this._value=this._insertThousandsSeparators(this._value);const m=e.tail&&e._beforeTailState?e._beforeTailState._value:this._value,v=this._separatorsCountFromSlice(m);return l.tailShift+=(v-i)*this.thousandsSeparator.length,l}_findSeparatorAround(t){if(this.thousandsSeparator){const e=t-this.thousandsSeparator.length+1,s=this.value.indexOf(this.thousandsSeparator,e);if(s<=t)return s}return-1}_adjustRangeWithSeparators(t,e){const s=this._findSeparatorAround(t);s>=0&&(t=s);const i=this._findSeparatorAround(e);return i>=0&&(e=i+this.thousandsSeparator.length),[t,e]}remove(t,e){t===void 0&&(t=0),e===void 0&&(e=this.displayValue.length),[t,e]=this._adjustRangeWithSeparators(t,e);const s=this.value.slice(0,t),i=this.value.slice(e),a=this._separatorsCount(s.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(s+i));const n=this._separatorsCountFromSlice(s);return new f({tailShift:(n-a)*this.thousandsSeparator.length})}nearestInputPos(t,e){if(!this.thousandsSeparator)return t;switch(e){case h.NONE:case h.LEFT:case h.FORCE_LEFT:{const s=this._findSeparatorAround(t-1);if(s>=0){const i=s+this.thousandsSeparator.length;if(t<i||this.value.length<=i||e===h.FORCE_LEFT)return s}break}case h.RIGHT:case h.FORCE_RIGHT:{const s=this._findSeparatorAround(t);if(s>=0)return s+this.thousandsSeparator.length}}return t}doCommit(){if(this.value){const t=this.number;let e=t;this.min!=null&&(e=Math.max(e,this.min)),this.max!=null&&(e=Math.min(e,this.max)),e!==t&&(this.unmaskedValue=this.format(e,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(t){const e=this._removeThousandsSeparators(t).split(this.radix);return e[0]=e[0].replace(/^(\D*)(0*)(\d*)/,(s,i,a,n)=>i+n),t.length&&!/\d$/.test(e[0])&&(e[0]=e[0]+"0"),e.length>1&&(e[1]=e[1].replace(/0*$/,""),e[1].length||(e.length=1)),this._insertThousandsSeparators(e.join(this.radix))}_padFractionalZeros(t){if(!t)return t;const e=t.split(this.radix);return e.length<2&&e.push(""),e[1]=e[1].padEnd(this.scale,"0"),e.join(this.radix)}doSkipInvalid(t,e,s){e===void 0&&(e={});const i=this.scale===0&&t!==this.thousandsSeparator&&(t===this.radix||t===y.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,e,s)&&!i}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,y.UNMASKED_RADIX)}set unmaskedValue(t){super.unmaskedValue=t}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(t){this.rawInputValue=this.format(t,this).replace(y.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(t){this.typedValue=t}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(t){return(super.typedValueEquals(t)||y.EMPTY_VALUES.includes(t)&&y.EMPTY_VALUES.includes(this.typedValue))&&!(t===0&&this.value==="")}};p(y,"MaskedNumber");let V=y;St=V;V.UNMASKED_RADIX=".";V.EMPTY_VALUES=[...C.EMPTY_VALUES,0];V.DEFAULTS={...C.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[St.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:p(r=>r.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20}),"format")};d.MaskedNumber=V;const nt={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function Bt(r,t,e){t===void 0&&(t=nt.MASKED),e===void 0&&(e=nt.MASKED);const s=I(r);return i=>s.runIsolated(a=>(a[t]=i,a[e]))}p(Bt,"createPipe");function Ot(r,t,e,s){return Bt(t,e,s)(r)}p(Ot,"pipe");d.PIPE_TYPE=nt;d.createPipe=Bt;d.pipe=Ot;const Ct=class Ct extends E{get repeatFrom(){var t;return(t=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?t:0}get repeatTo(){var t;return(t=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?t:1/0}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){var e,s,i;const{repeat:a,...n}=O(t);this._blockOpts=Object.assign({},this._blockOpts,n);const u=I(this._blockOpts);this.repeat=(e=(s=a??u.repeat)!=null?s:this.repeat)!=null?e: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(t){if(t<this._blocks.length)return this._blocks[t];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(I(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(t,e){e===void 0&&(e={});const s=new f;for(let o=(i=(a=this._mapPosToBlock(this.displayValue.length))==null?void 0:a.index)!=null?i:Math.max(this._blocks.length-1,0),l,m;l=(n=this._blocks[o])!=null?n:m=!m&&this._allocateBlock(o);++o){var i,a,n,u;const v=l._appendChar(t,{...e,_beforeTailState:(u=e._beforeTailState)==null||(u=u._blocks)==null?void 0:u[o]});if(v.skip&&m){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(s.aggregate(v),v.consumed)break}return s}_trimEmptyTail(t,e){var s,i;t===void 0&&(t=0);const a=Math.max(((s=this._mapPosToBlock(t))==null?void 0:s.index)||0,this.repeatFrom,0);let n;e!=null&&(n=(i=this._mapPosToBlock(e))==null?void 0:i.index),n==null&&(n=this._blocks.length-1);let u=0;for(let o=n;a<=o&&!this._blocks[o].unmaskedValue;--o,++u);u&&(this._blocks.splice(n-u+1,u),this.mask=this.mask.slice(u))}reset(){super.reset(),this._trimEmptyTail()}remove(t,e){t===void 0&&(t=0),e===void 0&&(e=this.displayValue.length);const s=super.remove(t,e);return this._trimEmptyTail(t,e),s}totalInputPositions(t,e){return t===void 0&&(t=0),e==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(t,e)}get state(){return super.state}set state(t){this._blocks.length=t._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=t}};p(Ct,"RepeatBlock");let rt=Ct;d.RepeatBlock=rt;try{globalThis.IMask=d}catch{}function Nt(r,t){return c.openBlock(),c.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[c.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"})])}p(Nt,"render$2");function Lt(r,t){return c.openBlock(),c.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[c.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"}),c.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"})])}p(Lt,"render$1");var Pt=Object.defineProperty,Ut=Object.getOwnPropertyDescriptor,_=p((r,t,e,s)=>{for(var i=s>1?void 0:s?Ut(t,e):t,a=r.length-1,n;a>=0;a--)(n=r[a])&&(i=(s?n(t,e,i):n(i))||i);return s&&i&&Pt(t,e,i),i},"__decorateClass"),M;let k=(M=class extends bt.FieldComponentUnoCss{maskPreset=null;force12hours=!1;alwaysCopyIcon=!1;disabled=!1;asNumber=!1;radix=",";mask=null;mapToRadix=[".",";","/"];dtPresetLocale="";thousandsSeparator=" ";step=1;min=0;max=null;emitsParent=["input","change","focus","blur","update:modelValue","dateMaskChange","keypress.enter","reset"];componentsParent={ClipboardDocumentListIcon:Lt,CheckBadgeIcon:Nt,NoSymbolIcon:wt.render};maskInner=null;maskBlocks={};utc="UTC";_numVal=0;_asNum=!1;_iMaskInput(t){console.log(t?.srcElement?.value.replaceAll(this.thousandsSeparator,"").replace(new RegExp(`^[W\\${this.radix}]+$`,"g"),""),parseInt(t?.srcElement?.value)),this._asNum||(this.value=t?.srcElement?.value||"")}placeholder="Введите текст";is12hours=!1;_randKey="";_iMaskedInst;setup(t,e,s){let i=null;return{initIMask:p(l=>{if(l)return console.log("self.maskInner",s.maskInner),i=d(l,{mask:s.maskInner||String}),i.on("accept",()=>{}),i.on("complete",()=>{}),i},"initIMask"),updateIMaskOptions:p(l=>{i&&i.updateOptions(l)},"updateIMaskOptions"),setIMaskValue:p(l=>{i&&(i.value=l)},"setIMaskValue"),getUnmaskedValue:p(()=>i?i.unmaskedValue:"","getUnmaskedValue"),imaskInstance:p(()=>i,"imaskInstance")}}createdParent(){if(console.log("this.default",this.default),!this.is12hours&&this.isDateTime)try{const t=new Intl.DateTimeFormat(this.dtPresetLocale||this.VST.$r.locale,{hour:"numeric"}).resolvedOptions();this.is12hours=t.hourCycle==="h11"||t.hourCycle==="h12"}catch{this.is12hours=!1}else this.force12hours&&(this.is12hours=!0);this._asNum&&(this.maskInner=Number)}beforeMountParent(){let t=this.modelValue||this.inputValue||"";if(typeof t!="string"&&(t=""),this._preResetValue="",this.value=t,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.maskInner=e.map(s=>{switch(s.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 s.value;case"timeZoneName":return this.utc=s.value,"";default:return""}}).join(""),this.is12hours&&this.maskPreset!=="date")this.maskInner+="!";else if(this.maskPreset==="date"){const s=this._extractDateOnly(this.maskInner);s&&(this.maskInner=s)}this.maskInner=this.maskInner.replace(/\s+/g," "),this.maskBlocks={YYYY:{mask:d.MaskedRange,from:1e3,to:2300,validate:p((s,i)=>this.dateMaskValidateWithReplaceDays(i),"validate"),overwrite:!0},MM:{mask:d.MaskedRange,from:1,to:12,validate:p((s,i)=>this.dateMaskValidateWithReplaceDays(i),"validate"),overwrite:!0},DD:{mask:d.MaskedRange,from:1,to:31,validate:p((s,i)=>this.dateMaskValidateWithReplaceDays(i),"validate"),overwrite:!0},hh:{mask:d.MaskedRange,from:this.is12hours?1:0,to:this.is12hours?12:23,overwrite:!0},mm:{mask:d.MaskedRange,from:0,to:59,overwrite:!0},ss:{mask:d.MaskedRange,from:0,to:59,overwrite:!0},"!":{mask:d.MaskedEnum,enum:["AM","PM","am","pm"],overwrite:!0}}}else this.mask&&(this.maskInner=this.mask);this._asNum=this.asNumber,this._randKey=$VST.generateRandomKey(),console.log("_asNum",this._asNum,this.asNumber)}mountedParent(){console.log("_asNum",this._asNum,this.asNumber),this._asNum=this.asNumber,this.nextTick(()=>{this.selectInput&&(this.selectInput.addEventListener("focus",this._onFocus),this.selectInput.addEventListener("blur",this._onBlur),this.selectInput.addEventListener("wheel",this._onWheel.bind(this)),this.isDateTime||(this.selectInput.addEventListener("input",this._onInput),this.selectInput.addEventListener("keydown",this._onKeydown)))},5)}beforeUnmountParent(){this.selectInput&&(this.selectInput.removeEventListener("focus",this._onFocus),this.selectInput.removeEventListener("blur",this._onBlur),this.selectInput.removeEventListener("wheel",this._onWheel.bind(this)),this.isDateTime||(this.selectInput.removeEventListener("input",this._onInput),this.selectInput.removeEventListener("keydown",this._onKeydown)))}onAcceptUnmasked(t){}onAccept(t){const e=this.getFromMask(this.maskInner,t,"MM"),s=this.getFromMask(this.maskInner,t,"YYYY"),i=this.getFromMask(this.maskInner,t,"DD");let a=this.getFromMask(this.maskInner,t,"hh");const n=this.getFromMask(this.maskInner,t,"mm"),u=this.getFromMask(this.maskInner,t,"ss"),o=this.is12hours?t.toLowerCase().includes("am")?"am":"pm":"";this.$emit("dateMaskChange",{month:e,year:s,day:i,hour:a,minute:n,seconds:u,AmPm:o})}focus(t=0,e=0){const s=this.$el.querySelector("input.inputMask");s?.focus?.(),s?.setSelectionRange&&s?.value?.trim?.()&&s?.setSelectionRange?.(t,e>t?e||t:e)}blur(){this.$el.querySelector("input.inputMask")?.blur?.()}_preResetValue="";_onReset(){this._preResetValue=this.value,this.$emit("reset"),this._onInput("",!0),this.selectInput?.focus?.()}restore(){this._preResetValue&&(this.setValue(this._preResetValue),this.nextTick(()=>{["string","number"].includes(typeof this.value)&&(this.$emit("input",this.value),this.$emit("change",this.value),this.$emit("update:modelValue",this.value)),this._preResetValue="",this.selectInput?.focus?.()}))}selectInput;_setupIMask(t){const e=!!this.selectInput;this.selectInput=t,t&&(e&&this.updateIMaskOptions({mask:this.maskInner||String,scale:typeof this.asNumber=="number"?this._asNum:0,autofix:!0,min:this.min,max:this.max,radix:this.radix,placeholder:this.placeholder,thousandsSeparator:" ",padFractionalZeros:!0,overwrite:!0,lazy:!1,autocomplete:this.maskPreset==="email"?"email":"off",blocks:this.maskBlocks}),!this.maskInner&&this.mask&&(this.maskInner=this.mask),this.initIMask(t))}_onFocus(){this.$emit("focus")}_onBlur(){this.nextTick(()=>this.$emit("blur",this.selectInput?.value))}_onWheel=p(t=>{if(console.log("wheel",this._asNum,this.asNumber),t.preventDefault(),this.disabled||!this._asNum)return;t.preventDefault();let e=parseFloat(this.value.replace(this.radix,"."));isNaN(e)&&(e=0);const s=this.step||1;t.deltaY<0?e+=s:e-=s,this.min!==void 0&&e<this.min&&(e=this.min),this.max!==void 0&&e>this.max&&(e=this.max),this.step&&(e=parseFloat(e.toFixed(this.step))),this.setValue(e),this.$emit("input",e),this.$emit("update:modelValue",e),this.$emit("change",e)},"_onWheel");_onKeydown(t){const e=t?.ctrlKey||t?.metaKey;this._preResetValue&&e&&t.key==="z"&&this.restore()}_onInput(t,e=!1){const s=t?.target?.value?.trim?.()||t;if(typeof s!="string"){this.isDateTime||(this.$emit("input",this.value="",e),this.$emit("change","",e),this.$emit("update:modelValue",""));return}else s&&(this._preResetValue="");["string","number"].includes(typeof(this.value=s))&&(this.$emit("input",this.value,e),this.$emit("change",this.value,e),this.$emit("update:modelValue",this.value))}_extractDateOnly(t){const e=/([\d\w]{2,4}[./_-][\d\w]{2,4}[./_-][\d\w]{2,4})/,s=t.match(e);return s?s?.[0]??null:null}getFromMask(t,e,s="MM"){const i=t?.toString().indexOf(s);if(i===-1)return 0;const a=e.slice(i,i+s.length),n=parseInt(a,10);return isNaN(n)?0:n}setValue(t){this.selectInput?.maskRef&&(this.selectInput.maskRef.unmaskedValue=t),super.setValue(t)}getValue(){return this._asNum?parseInt(this.value):this.value}_prepareIMask(t){if(this.isDateTime)return t.toUpperCase()}replaceInMask(t,e,s,i="MM"){const a=t.indexOf(i);if(a===-1)return e;const n=s.toString().padStart(2,"0");return e.slice(0,a)+n+e.slice(a+i.length)}dateMaskValidateWithReplaceDays(t){const e=this.getFromMask(t.parent.mask,t.parent.displayValue,"MM"),s=this.getFromMask(t.parent.mask,t.parent.displayValue,"YYYY"),i=this.getFromMask(t.parent.mask,t.parent.displayValue,"DD");let a=i;return e&&(e==2&&(!s||s&&s%4==0)?a=29:e==2&&s&&s.toString().length==4&&s%4!=0?a=28:[1,3,5,7,8,10,12].includes(e)?a=31:a=30,a<i&&this.nextTick(()=>{this.selectInput&&(this.selectInput.value=this.replaceInMask(t.parent.mask,t.parent.displayValue,a.toString(),"DD"),this.selectInput.blur(),this.nextTick(()=>{this.selectInput?.focus()}))})),!0}_isOnlyValueCopied=!1;_copyValueToClipboard(){this.value&&$VST.copyToClipboard(this.value),this._isOnlyValueCopied=!0,setTimeout(()=>this._isOnlyValueCopied=!1,500)}_canIncrementComputed(){if(!this._asNum||this.disabled)return!1;const t=parseFloat(this.value);return!this.max||t<this.max}_canDecrementComputed(){if(!this._asNum||this.disabled)return!1;const t=parseFloat(this.value);return!this.min||t>this.min}_valueComputed(){return["date","datetime","datetimeSec"].includes(this.maskPreset??"")}},p(M,"StringField"),M);_([g.Prop(String)],k.prototype,"maskPreset",2);_([g.Prop(Boolean)],k.prototype,"force12hours",2);_([g.Prop(Boolean)],k.prototype,"alwaysCopyIcon",2);_([g.Prop(Boolean)],k.prototype,"disabled",2);_([g.Prop(Boolean,Number)],k.prototype,"asNumber",2);_([g.Prop(String)],k.prototype,"radix",2);_([g.Prop(String)],k.prototype,"mask",2);_([g.Prop(Array)],k.prototype,"mapToRadix",2);_([g.Prop(String)],k.prototype,"dtPresetLocale",2);_([g.Prop(String)],k.prototype,"thousandsSeparator",2);_([g.Prop(Number)],k.prototype,"step",2);_([g.Prop(Number)],k.prototype,"min",2);_([g.Prop(Number)],k.prototype,"max",2);_([g.Prop(String)],k.prototype,"placeholder",2);_([g.Computed("canIncrement")],k.prototype,"_canIncrementComputed",1);_([g.Computed("canDecrement")],k.prototype,"_canDecrementComputed",1);_([g.Computed("isDateTime")],k.prototype,"_valueComputed",1);k=_([g.VST],k);const $t={class:"relative w100%"},Yt=["value","disabled","placeholder","prepare","autocomplete"],Kt={key:0,class:"w22px h22px text-stone absolute t-11px l-12px z4 cursor-pointer hover:scale-130"};function zt(r,t,e,s,i,a){const n=c.resolveComponent("ClipboardDocumentListIcon"),u=c.resolveComponent("CheckBadgeIcon"),o=c.resolveComponent("NoSymbolIcon");return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["d-inline-block my2px w100% relative",{["sf"+r._randKey]:!0}])},[c.createElementVNode("div",$t,[c.createElementVNode("input",{class:c.normalizeClass(["w100% inputMask",{"hover:bg-white":!r.disabled,"user-select-none!":r.disabled}]),value:r.value,disabled:r.disabled,placeholder:r.placeholder,prepare:r._prepareIMask,ref:r._setupIMask,onInput:t[0]||(t[0]=l=>r._iMaskInput(l)),onKeypress:t[1]||(t[1]=c.withKeys(l=>r.$emit("keypress.enter"),["enter"])),autocomplete:r.maskPreset=="email"?"email":"off",onsubmit:"return false",autocorrect:"off",autocapitalize:"off"},null,42,Yt),r.maskPreset=="datetime"||r.maskPreset=="datetimeSec"?(c.openBlock(),c.createElementBlock("div",{key:0,class:"absolute! r-15px! t-2 fs-0.7rem text-stone-500 hover:scale-110 hover:fw-bold",style:c.normalizeStyle({pointerEvents:r.disabled?"none !important":void 0})},c.toDisplayString(r.utc),5)):c.createCommentVNode("",!0)]),(r.disabled||r.alwaysCopyIcon)&&r.value?.toString?.()?.trim?.()?(c.openBlock(),c.createElementBlock("div",Kt,[r._isOnlyValueCopied?(c.openBlock(),c.createBlock(u,{key:1,class:"text-emerald-500"})):(c.openBlock(),c.createBlock(n,{key:0,onClick:t[2]||(t[2]=l=>r._copyValueToClipboard())}))])):c.createCommentVNode("",!0),!r.disabled&&(r.value||r._preResetValue)?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.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"}])},[r._preResetValue?(c.openBlock(),c.createElementBlock("svg",{key:0,class:"icon icon-tabler icons-tabler-outline icon-tabler-arrow-back-up text-teal-500",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",onClick:t[3]||(t[3]=(...l)=>r.restore&&r.restore(...l))},[...t[5]||(t[5]=[c.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),c.createElementVNode("path",{d:"M9 14l-4 -4l4 -4"},null,-1),c.createElementVNode("path",{d:"M5 10h11a4 4 0 1 1 0 8h-1"},null,-1)])])):(c.openBlock(),c.createBlock(o,{key:1,onClick:t[4]||(t[4]=l=>r._onReset())}))],2)):c.createCommentVNode("",!0),(r.disabled||r.alwaysCopyIcon)&&r.value?.toString?.()?.trim?.()?(c.openBlock(),c.createBlock(c.resolveDynamicComponent("style"),{key:2},{default:c.withCtx(()=>[c.createTextVNode(".sf"+c.toDisplayString(r._randKey)+"["+c.toDisplayString(r.$options.__scopeId)+"] input { padding-left: 40px !important; }",1)]),_:1})):c.createCommentVNode("",!0)],2)}p(zt,"render");const jt=Dt._export_sfc(k,[["render",zt],["__scopeId","data-v-aeb9c22f"]]);exports.default=jt;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var m=Object.defineProperty;var b=(o,l)=>m(o,"name",{value:l,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-8WdmYTGn.cjs"),u=require("./FieldComponent.vue_vue_type_script_lang-D0xUuutA.cjs"),e=require("vue"),h=require("./_plugin-vue_export-helper-BaHX9ZKS.cjs");var y=Object.defineProperty,v=Object.getOwnPropertyDescriptor,a=b((o,l,p,s)=>{for(var d=s>1?void 0:s?v(l,p):l,g=o.length-1,i;g>=0;g--)(i=o[g])&&(d=(s?i(l,p,d):i(d))||d);return s&&d&&y(l,p,d),d},"__decorateClass"),n;let t=(n=class extends u.FieldComponentUnoCss{disabled=!1;bg="linear-gradient(330deg, #0aa86d 0%, #4eb18d 50%, #0ca86e 100%)";bgInactive="#a1a1a1";title=null;titleTheme="info";bgTogglerY="#3db37e";bgTogglerN="#FF3A19";titleTogglerY="Active";titleTogglerN="Inactive";togglerWidth="100px";togglerWidthActive="100px";togglerRevertColors=null;boxShadow="0 0 2px #1ca95e";disabledTitle="Disabled";disabledTitleTheme="grey";boxShadowHover="0 0 2px #9eeda8";labelColor="#fff";labelBoxShadow="0 0 4px #a4a4a4";type="switcher";modelValue=!1;value=!1;beforeMount(){this.value=this.modelValue||this.inputValue,this.randomId=$VST.generateRandomKey(32)}emits=["update:modelValue","change"];onValueChange(){this.$emit("update:modelValue",this.value),this.$emit("change",this.value)}randomId="";_modelValueChanged(l){this.setValue(l)}},b(n,"SwitchField"),n);a([r.Prop(Boolean)],t.prototype,"disabled",2);a([r.Prop(String)],t.prototype,"bg",2);a([r.Prop(String)],t.prototype,"bgInactive",2);a([r.Prop(String)],t.prototype,"title",2);a([r.Prop(String)],t.prototype,"titleTheme",2);a([r.Prop(String)],t.prototype,"bgTogglerY",2);a([r.Prop(String)],t.prototype,"bgTogglerN",2);a([r.Prop(String)],t.prototype,"titleTogglerY",2);a([r.Prop(String)],t.prototype,"titleTogglerN",2);a([r.Prop(String)],t.prototype,"togglerWidth",2);a([r.Prop(String)],t.prototype,"togglerWidthActive",2);a([r.Prop(Boolean)],t.prototype,"togglerRevertColors",2);a([r.Prop(String)],t.prototype,"boxShadow",2);a([r.Prop(String)],t.prototype,"disabledTitle",2);a([r.Prop(String)],t.prototype,"disabledTitleTheme",2);a([r.Prop(String)],t.prototype,"boxShadowHover",2);a([r.Prop(String)],t.prototype,"labelColor",2);a([r.Prop(String)],t.prototype,"labelBoxShadow",2);a([r.Prop(String)],t.prototype,"type",2);a([r.Prop(Boolean,null)],t.prototype,"modelValue",2);a([r.Watch("modelValue",!0)],t.prototype,"_modelValueChanged",1);t=a([r.VST],t);const c=["title","data-theme"],S={class:"switch_box"},f=["id","disabled"],w=["for"],k=["id","disabled"],C=["data-tg-off","data-tg-on","for"],V=["id","disabled"],T=["for"];function D(o,l,p,s,d,g){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["container-switch",{"min-w64px":o.type!="checkbox"}]),title:o.disabled?o.disabledTitle:o.title,"data-theme":o.disabled?o.disabledTitleTheme:o.titleTheme,"data-offset":"[-15, 15]"},[l[6]||(l[6]=e.createTextVNode(" ",-1)),o.type=="switcher"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["switch",o.disabled?"disabled":""])},[e.createElementVNode("div",S,[e.createElementVNode("div",{class:"cursor-pointer fs-1rem mb2px",onClick:l[0]||(l[0]=i=>o.disabled?null:o.value=!o.value)},[e.renderSlot(o.$slots,"default")]),e.withDirectives(e.createElementVNode("input",{id:"switch-"+o.randomId,type:"checkbox","onUpdate:modelValue":l[1]||(l[1]=i=>o.value=i),disabled:o.disabled},null,8,f),[[e.vModelCheckbox,o.value]]),e.createElementVNode("label",{for:"switch-"+o.randomId,class:e.normalizeClass({disabled:o.disabled})},null,10,w)])],2)):o.type=="toggler"?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["hybrid-checkbox",{["toggler-"+o.randomId]:!0}])},[e.withDirectives(e.createElementVNode("input",{class:"tgl tgl-flip",id:"toggler-"+o.randomId,type:"checkbox","onUpdate:modelValue":l[2]||(l[2]=i=>o.value=i),disabled:o.disabled},null,8,k),[[e.vModelCheckbox,o.value]]),e.createElementVNode("label",{class:"tgl-btn","data-tg-off":o.titleTogglerN,"data-tg-on":o.titleTogglerY,for:"toggler-"+o.randomId},null,8,C)],2)):o.type=="checkbox"?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["typical-checkbox",{disabled:o.disabled}])},[e.createElementVNode("span",null,[e.withDirectives(e.createElementVNode("input",{type:"checkbox",id:"checkbox-"+o.randomId,"onUpdate:modelValue":l[3]||(l[3]=i=>o.value=i),disabled:o.disabled},null,8,V),[[e.vModelCheckbox,o.value]]),e.createElementVNode("label",{class:e.normalizeClass(["check pb3px! w20px! p0!",{"bg-white":o.value,"mt3px!":!o.value}]),for:"checkbox-"+o.randomId},[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["w20px",{"svg-unchecked bg-white":!o.value}]),width:"20px",height:"20px",viewBox:"0 0 18 18"},[...l[5]||(l[5]=[e.createElementVNode("path",{d:"M1,9 L1,3.5 C1,2 2,1 3.5,1 L14.5,1 C16,1 17,2 17,3.5 L17,14.5 C17,16 16,17 14.5,17 L3.5,17 C2,17 1,16 1,14.5 L1,9 Z"},null,-1),e.createElementVNode("polyline",{points:"1 9 7 14 15 4"},null,-1)])],2))],10,T)]),o.$slots.default?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["cursor-pointer fs-1rem mx15px my2px whitespace-nowrap",{"fw-bold underline underline-black":o.value}]),onClick:l[4]||(l[4]=i=>o.disabled?null:o.value=!o.value)},[e.renderSlot(o.$slots,"default")],2)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),o.type=="toggler"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent("style"),{key:3},{default:e.withCtx(()=>[e.createTextVNode(".toggler-"+e.toDisplayString(o.randomId)+" .tgl-flip + .tgl-btn { perspective: "+e.toDisplayString(o.value?o.togglerWidthActive:o.togglerWidth)+" !important; width: "+e.toDisplayString(o.value?o.togglerWidthActive:o.togglerWidth)+" !important; } .toggler-"+e.toDisplayString(o.randomId)+" .tgl-flip + .tgl-btn:before { background: "+e.toDisplayString(o.togglerRevertColors?o.bgTogglerY:o.bgTogglerN)+" } .toggler-"+e.toDisplayString(o.randomId)+" .tgl-flip:checked + .tgl-btn:after { background: "+e.toDisplayString(o.togglerRevertColors?o.bgTogglerN:o.bgTogglerY)+" }",1)]),_:1})):e.createCommentVNode("",!0),o.type=="toggler"&&o.disabled?(e.openBlock(),e.createBlock(e.resolveDynamicComponent("style"),{key:4},{default:e.withCtx(()=>[e.createTextVNode(".toggler-"+e.toDisplayString(o.randomId)+" { opacity: 0.5 !important; }",1)]),_:1})):e.createCommentVNode("",!0),o.type=="checkbox"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent("style"),{key:5},{default:e.withCtx(()=>[e.createTextVNode("#checkbox-"+e.toDisplayString(o.randomId)+" { display: none; visibility: hidden; } #checkbox-"+e.toDisplayString(o.randomId)+" + label { box-sizing: content-box !important; }",1)]),_:1})):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent("style"),null,{default:e.withCtx(()=>[e.createTextVNode('[for="switch-'+e.toDisplayString(o.randomId)+'"]::before { background: '+e.toDisplayString(o.bg)+"; box-shadow: "+e.toDisplayString(o.boxShadow)+' !important; } [for="switch-'+e.toDisplayString(o.randomId)+'"]:not(.disabled):hover { box-shadow: '+e.toDisplayString(o.boxShadowHover)+'; } .switch_box [for="switch-'+e.toDisplayString(o.randomId)+'"]::after { background: '+e.toDisplayString(o.labelColor)+" !important; box-shadow: "+e.toDisplayString(o.labelBoxShadow)+'; } .switch_box [for="switch-'+e.toDisplayString(o.randomId)+'"] input { display: none !important; } .switch_box label[for="switch-'+e.toDisplayString(o.randomId)+'"] { background: '+e.toDisplayString(o.bgInactive)+" !important; }",1)]),_:1}))],10,c)}b(D,"render");const N=h._export_sfc(t,[["render",D]]);exports.default=N;
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
var V = Object.defineProperty;
|
|
2
|
+
var f = (e, l) => V(e, "name", { value: l, configurable: !0 });
|
|
3
|
+
import { P as d, W as $, V as c } from "./index-CcAID4PQ.js";
|
|
4
|
+
import { F as B } from "./FieldComponent.vue_vue_type_script_lang-BIS_wyes.js";
|
|
5
|
+
import { createElementBlock as p, openBlock as s, normalizeClass as g, createTextVNode as h, createCommentVNode as m, createBlock as w, createElementVNode as i, withDirectives as T, renderSlot as I, vModelCheckbox as C, resolveDynamicComponent as S, withCtx as k, toDisplayString as a } from "vue";
|
|
6
|
+
import { _ as N } from "./_plugin-vue_export-helper-B9nE8o7z.js";
|
|
7
|
+
var W = Object.defineProperty, Y = Object.getOwnPropertyDescriptor, t = /* @__PURE__ */ f((e, l, v, u) => {
|
|
8
|
+
for (var n = u > 1 ? void 0 : u ? Y(l, v) : l, y = e.length - 1, r; y >= 0; y--)
|
|
9
|
+
(r = e[y]) && (n = (u ? r(l, v, n) : r(n)) || n);
|
|
10
|
+
return u && n && W(l, v, n), n;
|
|
11
|
+
}, "__decorateClass"), b;
|
|
12
|
+
let o = (b = class extends B {
|
|
13
|
+
disabled = !1;
|
|
14
|
+
bg = "linear-gradient(330deg, #0aa86d 0%, #4eb18d 50%, #0ca86e 100%)";
|
|
15
|
+
bgInactive = "#a1a1a1";
|
|
16
|
+
title = null;
|
|
17
|
+
titleTheme = "info";
|
|
18
|
+
bgTogglerY = "#3db37e";
|
|
19
|
+
bgTogglerN = "#FF3A19";
|
|
20
|
+
titleTogglerY = "Active";
|
|
21
|
+
titleTogglerN = "Inactive";
|
|
22
|
+
togglerWidth = "100px";
|
|
23
|
+
togglerWidthActive = "100px";
|
|
24
|
+
togglerRevertColors = null;
|
|
25
|
+
boxShadow = "0 0 2px #1ca95e";
|
|
26
|
+
disabledTitle = "Disabled";
|
|
27
|
+
disabledTitleTheme = "grey";
|
|
28
|
+
boxShadowHover = "0 0 2px #9eeda8";
|
|
29
|
+
labelColor = "#fff";
|
|
30
|
+
labelBoxShadow = "0 0 4px #a4a4a4";
|
|
31
|
+
type = "switcher";
|
|
32
|
+
modelValue = !1;
|
|
33
|
+
value = !1;
|
|
34
|
+
beforeMount() {
|
|
35
|
+
this.value = this.modelValue || this.inputValue, this.randomId = $VST.generateRandomKey(32);
|
|
36
|
+
}
|
|
37
|
+
emits = ["update:modelValue", "change"];
|
|
38
|
+
onValueChange() {
|
|
39
|
+
this.$emit("update:modelValue", this.value), this.$emit("change", this.value);
|
|
40
|
+
}
|
|
41
|
+
randomId = "";
|
|
42
|
+
_modelValueChanged(l) {
|
|
43
|
+
this.setValue(l);
|
|
44
|
+
}
|
|
45
|
+
}, f(b, "SwitchField"), b);
|
|
46
|
+
t([
|
|
47
|
+
d(Boolean)
|
|
48
|
+
], o.prototype, "disabled", 2);
|
|
49
|
+
t([
|
|
50
|
+
d(String)
|
|
51
|
+
], o.prototype, "bg", 2);
|
|
52
|
+
t([
|
|
53
|
+
d(String)
|
|
54
|
+
], o.prototype, "bgInactive", 2);
|
|
55
|
+
t([
|
|
56
|
+
d(String)
|
|
57
|
+
], o.prototype, "title", 2);
|
|
58
|
+
t([
|
|
59
|
+
d(String)
|
|
60
|
+
], o.prototype, "titleTheme", 2);
|
|
61
|
+
t([
|
|
62
|
+
d(String)
|
|
63
|
+
], o.prototype, "bgTogglerY", 2);
|
|
64
|
+
t([
|
|
65
|
+
d(String)
|
|
66
|
+
], o.prototype, "bgTogglerN", 2);
|
|
67
|
+
t([
|
|
68
|
+
d(String)
|
|
69
|
+
], o.prototype, "titleTogglerY", 2);
|
|
70
|
+
t([
|
|
71
|
+
d(String)
|
|
72
|
+
], o.prototype, "titleTogglerN", 2);
|
|
73
|
+
t([
|
|
74
|
+
d(String)
|
|
75
|
+
], o.prototype, "togglerWidth", 2);
|
|
76
|
+
t([
|
|
77
|
+
d(String)
|
|
78
|
+
], o.prototype, "togglerWidthActive", 2);
|
|
79
|
+
t([
|
|
80
|
+
d(Boolean)
|
|
81
|
+
], o.prototype, "togglerRevertColors", 2);
|
|
82
|
+
t([
|
|
83
|
+
d(String)
|
|
84
|
+
], o.prototype, "boxShadow", 2);
|
|
85
|
+
t([
|
|
86
|
+
d(String)
|
|
87
|
+
], o.prototype, "disabledTitle", 2);
|
|
88
|
+
t([
|
|
89
|
+
d(String)
|
|
90
|
+
], o.prototype, "disabledTitleTheme", 2);
|
|
91
|
+
t([
|
|
92
|
+
d(String)
|
|
93
|
+
], o.prototype, "boxShadowHover", 2);
|
|
94
|
+
t([
|
|
95
|
+
d(String)
|
|
96
|
+
], o.prototype, "labelColor", 2);
|
|
97
|
+
t([
|
|
98
|
+
d(String)
|
|
99
|
+
], o.prototype, "labelBoxShadow", 2);
|
|
100
|
+
t([
|
|
101
|
+
d(String)
|
|
102
|
+
], o.prototype, "type", 2);
|
|
103
|
+
t([
|
|
104
|
+
d(Boolean, null)
|
|
105
|
+
], o.prototype, "modelValue", 2);
|
|
106
|
+
t([
|
|
107
|
+
$("modelValue", !0)
|
|
108
|
+
], o.prototype, "_modelValueChanged", 1);
|
|
109
|
+
o = t([
|
|
110
|
+
c
|
|
111
|
+
], o);
|
|
112
|
+
const A = ["title", "data-theme"], D = { class: "switch_box" }, F = ["id", "disabled"], P = ["for"], L = ["id", "disabled"], R = ["data-tg-off", "data-tg-on", "for"], O = ["id", "disabled"], U = ["for"];
|
|
113
|
+
function H(e, l, v, u, n, y) {
|
|
114
|
+
return s(), p("div", {
|
|
115
|
+
class: g(["container-switch", {
|
|
116
|
+
"min-w64px": e.type != "checkbox"
|
|
117
|
+
}]),
|
|
118
|
+
title: e.disabled ? e.disabledTitle : e.title,
|
|
119
|
+
"data-theme": e.disabled ? e.disabledTitleTheme : e.titleTheme,
|
|
120
|
+
"data-offset": "[-15, 15]"
|
|
121
|
+
}, [
|
|
122
|
+
l[6] || (l[6] = h(" ", -1)),
|
|
123
|
+
e.type == "switcher" ? (s(), p("div", {
|
|
124
|
+
key: 0,
|
|
125
|
+
class: g(["switch", e.disabled ? "disabled" : ""])
|
|
126
|
+
}, [
|
|
127
|
+
i("div", D, [
|
|
128
|
+
i("div", {
|
|
129
|
+
class: "cursor-pointer fs-1rem mb2px",
|
|
130
|
+
onClick: l[0] || (l[0] = (r) => e.disabled ? null : e.value = !e.value)
|
|
131
|
+
}, [
|
|
132
|
+
I(e.$slots, "default")
|
|
133
|
+
]),
|
|
134
|
+
T(i("input", {
|
|
135
|
+
id: "switch-" + e.randomId,
|
|
136
|
+
type: "checkbox",
|
|
137
|
+
"onUpdate:modelValue": l[1] || (l[1] = (r) => e.value = r),
|
|
138
|
+
disabled: e.disabled
|
|
139
|
+
}, null, 8, F), [
|
|
140
|
+
[C, e.value]
|
|
141
|
+
]),
|
|
142
|
+
i("label", {
|
|
143
|
+
for: "switch-" + e.randomId,
|
|
144
|
+
class: g({
|
|
145
|
+
disabled: e.disabled
|
|
146
|
+
})
|
|
147
|
+
}, null, 10, P)
|
|
148
|
+
])
|
|
149
|
+
], 2)) : e.type == "toggler" ? (s(), p("div", {
|
|
150
|
+
key: 1,
|
|
151
|
+
class: g(["hybrid-checkbox", {
|
|
152
|
+
["toggler-" + e.randomId]: !0
|
|
153
|
+
}])
|
|
154
|
+
}, [
|
|
155
|
+
T(i("input", {
|
|
156
|
+
class: "tgl tgl-flip",
|
|
157
|
+
id: "toggler-" + e.randomId,
|
|
158
|
+
type: "checkbox",
|
|
159
|
+
"onUpdate:modelValue": l[2] || (l[2] = (r) => e.value = r),
|
|
160
|
+
disabled: e.disabled
|
|
161
|
+
}, null, 8, L), [
|
|
162
|
+
[C, e.value]
|
|
163
|
+
]),
|
|
164
|
+
i("label", {
|
|
165
|
+
class: "tgl-btn",
|
|
166
|
+
"data-tg-off": e.titleTogglerN,
|
|
167
|
+
"data-tg-on": e.titleTogglerY,
|
|
168
|
+
for: "toggler-" + e.randomId
|
|
169
|
+
}, null, 8, R)
|
|
170
|
+
], 2)) : e.type == "checkbox" ? (s(), p("div", {
|
|
171
|
+
key: 2,
|
|
172
|
+
class: g(["typical-checkbox", {
|
|
173
|
+
disabled: e.disabled
|
|
174
|
+
}])
|
|
175
|
+
}, [
|
|
176
|
+
i("span", null, [
|
|
177
|
+
T(i("input", {
|
|
178
|
+
type: "checkbox",
|
|
179
|
+
id: "checkbox-" + e.randomId,
|
|
180
|
+
"onUpdate:modelValue": l[3] || (l[3] = (r) => e.value = r),
|
|
181
|
+
disabled: e.disabled
|
|
182
|
+
}, null, 8, O), [
|
|
183
|
+
[C, e.value]
|
|
184
|
+
]),
|
|
185
|
+
i("label", {
|
|
186
|
+
class: g(["check pb3px! w20px! p0!", {
|
|
187
|
+
"bg-white": e.value,
|
|
188
|
+
"mt3px!": !e.value
|
|
189
|
+
}]),
|
|
190
|
+
for: "checkbox-" + e.randomId
|
|
191
|
+
}, [
|
|
192
|
+
(s(), p("svg", {
|
|
193
|
+
class: g(["w20px", {
|
|
194
|
+
"svg-unchecked bg-white": !e.value
|
|
195
|
+
}]),
|
|
196
|
+
width: "20px",
|
|
197
|
+
height: "20px",
|
|
198
|
+
viewBox: "0 0 18 18"
|
|
199
|
+
}, [...l[5] || (l[5] = [
|
|
200
|
+
i("path", {
|
|
201
|
+
d: "M1,9 L1,3.5 C1,2 2,1 3.5,1 L14.5,1 C16,1 17,2 17,3.5 L17,14.5 C17,16 16,17 14.5,17 L3.5,17 C2,17 1,16 1,14.5 L1,9 Z"
|
|
202
|
+
}, null, -1),
|
|
203
|
+
i("polyline", { points: "1 9 7 14 15 4" }, null, -1)
|
|
204
|
+
])], 2))
|
|
205
|
+
], 10, U)
|
|
206
|
+
]),
|
|
207
|
+
e.$slots.default ? (s(), p("span", {
|
|
208
|
+
key: 0,
|
|
209
|
+
class: g(["cursor-pointer fs-1rem mx15px my2px whitespace-nowrap", {
|
|
210
|
+
"fw-bold underline underline-black": e.value
|
|
211
|
+
}]),
|
|
212
|
+
onClick: l[4] || (l[4] = (r) => e.disabled ? null : e.value = !e.value)
|
|
213
|
+
}, [
|
|
214
|
+
I(e.$slots, "default")
|
|
215
|
+
], 2)) : m("", !0)
|
|
216
|
+
], 2)) : m("", !0),
|
|
217
|
+
e.type == "toggler" ? (s(), w(S("style"), { key: 3 }, {
|
|
218
|
+
default: k(() => [
|
|
219
|
+
h(".toggler-" + a(e.randomId) + " .tgl-flip + .tgl-btn { perspective: " + a(e.value ? e.togglerWidthActive : e.togglerWidth) + " !important; width: " + a(e.value ? e.togglerWidthActive : e.togglerWidth) + " !important; } .toggler-" + a(e.randomId) + " .tgl-flip + .tgl-btn:before { background: " + a(e.togglerRevertColors ? e.bgTogglerY : e.bgTogglerN) + " } .toggler-" + a(e.randomId) + " .tgl-flip:checked + .tgl-btn:after { background: " + a(e.togglerRevertColors ? e.bgTogglerN : e.bgTogglerY) + " }", 1)
|
|
220
|
+
]),
|
|
221
|
+
_: 1
|
|
222
|
+
})) : m("", !0),
|
|
223
|
+
e.type == "toggler" && e.disabled ? (s(), w(S("style"), { key: 4 }, {
|
|
224
|
+
default: k(() => [
|
|
225
|
+
h(".toggler-" + a(e.randomId) + " { opacity: 0.5 !important; }", 1)
|
|
226
|
+
]),
|
|
227
|
+
_: 1
|
|
228
|
+
})) : m("", !0),
|
|
229
|
+
e.type == "checkbox" ? (s(), w(S("style"), { key: 5 }, {
|
|
230
|
+
default: k(() => [
|
|
231
|
+
h("#checkbox-" + a(e.randomId) + " { display: none; visibility: hidden; } #checkbox-" + a(e.randomId) + " + label { box-sizing: content-box !important; }", 1)
|
|
232
|
+
]),
|
|
233
|
+
_: 1
|
|
234
|
+
})) : m("", !0),
|
|
235
|
+
(s(), w(S("style"), null, {
|
|
236
|
+
default: k(() => [
|
|
237
|
+
h('[for="switch-' + a(e.randomId) + '"]::before { background: ' + a(e.bg) + "; box-shadow: " + a(e.boxShadow) + ' !important; } [for="switch-' + a(e.randomId) + '"]:not(.disabled):hover { box-shadow: ' + a(e.boxShadowHover) + '; } .switch_box [for="switch-' + a(e.randomId) + '"]::after { background: ' + a(e.labelColor) + " !important; box-shadow: " + a(e.labelBoxShadow) + '; } .switch_box [for="switch-' + a(e.randomId) + '"] input { display: none !important; } .switch_box label[for="switch-' + a(e.randomId) + '"] { background: ' + a(e.bgInactive) + " !important; }", 1)
|
|
238
|
+
]),
|
|
239
|
+
_: 1
|
|
240
|
+
}))
|
|
241
|
+
], 10, A);
|
|
242
|
+
}
|
|
243
|
+
f(H, "render");
|
|
244
|
+
const Z = /* @__PURE__ */ N(o, [["render", H]]);
|
|
245
|
+
export {
|
|
246
|
+
Z as default
|
|
247
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var m=Object.defineProperty;var l=(t,o)=>m(t,"name",{value:o,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./index-
|
|
1
|
+
"use strict";var m=Object.defineProperty;var l=(t,o)=>m(t,"name",{value:o,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./index-8WdmYTGn.cjs"),e=require("vue"),_=require("./_plugin-vue_export-helper-BaHX9ZKS.cjs");var b=Object.getOwnPropertyDescriptor,B=l((t,o,d,i)=>{for(var s=i>1?void 0:i?b(o,d):o,c=t.length-1,a;c>=0;c--)(a=t[c])&&(s=a(s)||s);return s},"__decorateClass"),n;let u=(n=class extends p.BaseComponent{currentTab="default";CommentT=Comment;mounted(){}setCurrentTab(o){this.currentTab=o}getTabTitle(o){return o.props?.title||"Без названия"}},l(n,"Tabs"),n);u=B([p.VST],u);const v={class:"tabs"},h={class:"tabs__headers"},$=["onClick"],C=["onClick"],T={key:0,class:"tabs__content"};function g(t,o,d,i,s,c){return e.openBlock(),e.createElementBlock("div",v,[e.createElementVNode("div",h,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.$slots,(a,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[r.startsWith("$title-")?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["tabs__header",{"tabs__header--active":t.currentTab===r.split("-")[1]}]),onClick:l(k=>t.setCurrentTab(r.split("-")[1]),"onClick")},[e.renderSlot(t.$slots,r,{},void 0,!0)],10,$)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.$slots,(a,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!r.startsWith("$title")&&!t.$slots?.[`$title-${r}`]?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["tabs__header",{"tabs__header--active":t.currentTab===r}]),onClick:l(k=>t.setCurrentTab(r),"onClick")},e.toDisplayString(r),11,C)):e.createCommentVNode("",!0)],64))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.$slots,(a,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[r.startsWith("$")?e.createCommentVNode("",!0):e.withDirectives((e.openBlock(),e.createElementBlock("div",T,[e.renderSlot(t.$slots,r,{},void 0,!0)],512)),[[e.vShow,t.currentTab==r]])],64))),256))])}l(g,"render");const E=_._export_sfc(u,[["render",g],["__scopeId","data-v-f8d3de0a"]]);exports.default=E;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var C = Object.defineProperty;
|
|
2
2
|
var l = (t, o) => C(t, "name", { value: o, configurable: !0 });
|
|
3
|
-
import { a as f, V as m } from "./index-
|
|
3
|
+
import { a as f, V as m } from "./index-CcAID4PQ.js";
|
|
4
4
|
import { createElementBlock as s, openBlock as r, createElementVNode as k, Fragment as n, renderList as _, createCommentVNode as p, normalizeClass as $, renderSlot as v, toDisplayString as g, withDirectives as y, vShow as w } from "vue";
|
|
5
5
|
import { _ as D } from "./_plugin-vue_export-helper-B9nE8o7z.js";
|
|
6
6
|
var S = Object.getOwnPropertyDescriptor, V = /* @__PURE__ */ l((t, o, h, c) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var G0 = Object.defineProperty;
|
|
2
2
|
var a = (t, e) => G0(t, "name", { value: e, configurable: !0 });
|
|
3
3
|
import { defineComponent as Cr, h as Ut, ref as wf, getCurrentInstance as Z0, watchEffect as X0, nextTick as Cf, unref as Y0, onBeforeUnmount as vl, markRaw as Q0, customRef as em, onMounted as Sf, Teleport as Ef, resolveComponent as Mr, createElementBlock as Fs, openBlock as Tr, createBlock as hc, createCommentVNode as Ls, createVNode as De, createElementVNode as G, withCtx as qe, normalizeClass as at, createTextVNode as Ps, normalizeStyle as tm, withDirectives as nm, vModelText as rm, resolveDynamicComponent as im } from "vue";
|
|
4
|
-
import { b as om, c as sm, P as ps, W as um, V as lm } from "./index-
|
|
5
|
-
import { F as am } from "./FieldComponent.vue_vue_type_script_lang-
|
|
4
|
+
import { b as om, c as sm, P as ps, W as um, V as lm } from "./index-CcAID4PQ.js";
|
|
5
|
+
import { F as am } from "./FieldComponent.vue_vue_type_script_lang-BIS_wyes.js";
|
|
6
6
|
import { g as cm } from "./_commonjsHelpers-VXLwngCN.js";
|
|
7
7
|
import { r as dm } from "./NoSymbolIcon-aoAIVIx7.js";
|
|
8
8
|
import { _ as fm } from "./_plugin-vue_export-helper-B9nE8o7z.js";
|