PageSourceSearch

https://open.first.bank/_next/static/chunks/658-d5b871f25848616f.js

js first.bank collected 2026-09-24 10:30:51 UTC 125,135 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[658],{1028:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,s.default)(e),!e||/[\s<>]/.test(e)||0===e.indexOf("mailto:")||(t=(0,l.default)(t,d)).validate_length&&e.length>t.max_allowed_length||!t.allow_fragments&&(0,i.default)(e,"#")||!t.allow_query_components&&((0,i.default)(e,"?")||(0,i.default)(e,"&")))return!1;var r,o,p,f,g,m,v,_,k=(e=(v=(e=(v=e.split("#")).shift()).split("?")).shift()).match(/^([a-z][a-z0-9+\-.]*):/i),y=!1,b=function(s){return y=!0,r=s.toLowerCase(),(!t.require_valid_protocol||-1!==t.protocols.indexOf(r))&&e.substring(k[0].length)};if(k){var x=k[1],A=e.substring(k[0].length);if("//"===A.slice(0,2)){if(!1===(e=b(x)))return!1}else{var E=A.indexOf("/"),C=-1===E?A:A.substring(0,E),F=C.indexOf("@");if(-1!==F){var S=C.substring(0,F);if(/^[a-zA-Z0-9\-_.%:]*$/.test(S)){if(t.require_protocol)return!1}else if(!1===(e=b(x)))return!1}else if(/^[0-9]/.test(A)){if(t.require_protocol)return!1}else if(!1===(e=b(x)))return!1}}else if(t.require_protocol)return!1;if("//"===e.slice(0,2)){if(!y&&!t.allow_protocol_relative_urls)return!1;e=e.slice(2)}if(""===e)return!1;if(""===(e=(v=e.split("/")).shift())&&!t.require_host)return!0;if((v=e.split("@")).length>1){if(t.disallow_auth||""===v[0]||(o=v.shift()).indexOf(":")>=0&&o.split(":").length>2)return!1;var V,w=function(e){if(Array.isArray(e))return e}(V=o.split(":"))||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var s,a,i,n,u=[],l=!0,o=!1;try{i=(r=r.call(e)).next,!1;for(;!(l=(s=i.call(r)).done)&&(u.push(s.value),u.length!==t);l=!0);}catch(e){o=!0,a=e}finally{try{if(!l&&null!=r.return&&(n=r.return(),Object(n)!==n))return}finally{if(o)throw a}}return u}}(V,2)||function(e,t){if(e){if("string"==typeof e)return h(e,2);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(e,t):void 0}}(V,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),D=w[0],T=w[1];if(""===D&&""===T)return!1}f=v.join("@"),m=null,_=null;var B=f.match(c);if(B?(p="",_=B[1],m=B[2]||null):(p=(v=f.split(":")).shift(),v.length&&(m=v.join(":"))),null!==m&&m.length>0){if(g=parseInt(m,10),!/^[0-9]+$/.test(m)||g<=0||g>65535)return!1}else if(t.require_port)return!1;return t.host_whitelist?(0,a.default)(p,t.host_whitelist):""===p&&!t.require_host||(!!(0,u.default)(p)||!!(0,n.default)(p,t)||!!_&&!!(0,u.default)(_,6))&&(p=p||_,!(t.host_blacklist&&(0,a.default)(p,t.host_blacklist)))};var s=o(r(69991)),a=o(r(76282)),i=o(r(57820)),n=o(r(38420)),u=o(r(15946)),l=o(r(21184));function o(e){return e&&e.__esModule?e:{default:e}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,s=Array(t);r<t;r++)s[r]=e[r];return s}var d={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0,max_allowed_length:2084},c=/^\[([^\]]+)\](?::([0-9]+))?$/;e.exports=t.default,e.exports.default=t.default},11652:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidInputType=void 0,t.isValidInputType=function(e){return"string"==typeof e||e instanceof String}},12428:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clone=void 0,t.clone=function(e){return e?JSON.parse(JSON.stringify(e)):null}},15946:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,s.default)(t);var i=("object"===a(r)?r.version:arguments[1])||"";return i?"4"===i.toString()?u.test(t):"6"===i.toString()&&o.test(t):e(t,{version:4})||e(t,{version:6})};
1var s=function(e){return e&&e.__esModule?e:{default:e}}(r(69991));function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",n="(".concat(i,"[.]){3}").concat(i),u=new RegExp("^".concat(n,"$")),l="(?:[0-9a-fA-F]{1,4})",o=RegExp("^("+"(?:".concat(l,":){7}(?:").concat(l,"|:)|")+"(?:".concat(l,":){6}(?:").concat(n,"|:").concat(l,"|:)|")+"(?:".concat(l,":){5}(?::").concat(n,"|(:").concat(l,"){1,2}|:)|")+"(?:".concat(l,":){4}(?:(:").concat(l,"){0,1}:").concat(n,"|(:").concat(l,"){1,3}|:)|")+"(?:".concat(l,":){3}(?:(:").concat(l,"){0,2}:").concat(n,"|(:").concat(l,"){1,4}|:)|")+"(?:".concat(l,":){2}(?:(:").concat(l,"){0,3}:").concat(n,"|(:").concat(l,"){1,5}|:)|")+"(?:".concat(l,":){1}(?:(:").concat(l,"){0,4}:").concat(n,"|(:").concat(l,"){1,6}|:)|")+"(?::((?::".concat(l,"){0,5}:").concat(n,"|(?::").concat(l,"){1,7}|:))")+")(%[0-9a-zA-Z.]{1,})?$");e.exports=t.default,e.exports.default=t.default},20447:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,s.default)(e);for(var t,r,a=e.replace(/[- ]+/g,""),i=0,n=a.length-1;n>=0;n--)t=parseInt(a.substring(n,n+1),10),r&&(t*=2)>=10?i+=t%10+1:i+=t,r=!r;return!!(i%10==0&&a)};var s=function(e){return e&&e.__esModule?e:{default:e}}(r(69991));e.exports=t.default,e.exports.default=t.default},21184:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;for(var r in t)void 0===e[r]&&(e[r]=t[r]);return e},e.exports=t.default,e.exports.default=t.default},22026:(e,t,r)=>{"use strict";r.d(t,{FH:()=>S,Op:()=>v,as:()=>V,jz:()=>en,mN:()=>ek,xI:()=>w,xW:()=>m});var s=r(53239),a=e=>e instanceof Date,i=e=>null==e,n=e=>!i(e)&&!Array.isArray(e)&&"object"==typeof e&&!a(e),u=e=>n(e)&&e.target?"checkbox"===e.target.type?e.target.checked:e.target.value:e,l=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),o=e=>Array.isArray(e)?e.filter(Boolean):[],h=e=>void 0===e,d=(e,t,r)=>{if(!t||!n(e))return r;let s=o(t.split(/[,[\].]+?/)).reduce((e,t)=>i(e)?e:e[t],e);return h(s)||s===e?h(e[t])?r:e[t]:s};let c={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},p={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},f={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},g=s.createContext(null),m=()=>s.useContext(g),v=e=>{let{children:t,...r}=e;return s.createElement(g.Provider,{value:r},t)};var _=(e,t,r,s=!0)=>{let a={};for(let i in e)Object.defineProperty(a,i,{get:()=>(t[i]!==p.all&&(t[i]=!s||p.all),r&&(r[i]=!0),e[i])});return a},k=e=>n(e)&&!Object.keys(e).length,y=(e,t,r)=>{let{name:s,...a}=e;return k(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(e=>t[e]===(!r||p.all))},b=e=>Array.isArray(e)?e:[e],x=(e,t,r)=>r&&t?e===t:!e||!t||e===t||b(e).some(e=>e&&(e.startsWith(t)||t.startsWith(e)));function A(e){let t=s.useRef(e);t.current=e,s.useEffect(()=>{let r=!e.disabled&&t.current.subject.subscribe({next:t.current.callback});return()=>{r&&r.unsubscribe()}},[e.disabled])}var E=(e,t,r,s)=>{let a=Array.isArray(e);return"string"==typeof e?(s&&t.watch.add(e),d(r,e)):a?e.map(e=>(s&&t.watch.add(e),d(r,e))):(s&&(t.watchAll=!0),r)},C=e=>"function"==typeof e,F=e=>{for(let t in e)if(C(e[t]))return!0;return!1};function S(e){let t=m(),{control:r=t.control,name:a,defaultValue:i,disabled:u,exact:l}=e||{},o=s.useRef(a);o.current=a;let d=s.useCallback(e=>{if(x(o.current,e.name,l)){let t=E(o.current,r._names,e.values||r._formValues);p(h(o.current)||n(t)&&!F(t)?{...t}
1:Array.isArray(t)?[...t]:h(t)?i:t)}},[r,l,i]);A({disabled:u,subject:r._subjects.watch,callback:d});let[c,p]=s.useState(h(i)?r._getWatch(a):i);return s.useEffect(()=>{r._removeUnmounted()}),c}function V(e){let t=m(),{name:r,control:a=t.control,shouldUnregister:i}=e,n=l(a._names.array,r),o=S({control:a,name:r,defaultValue:d(a._formValues,r,d(a._defaultValues,r,e.defaultValue)),exact:!0}),h=function(e){let t=m(),{control:r=t.control,disabled:a,name:i,exact:n}=e||{},[u,l]=s.useState(r._formState),o=s.useRef({isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),h=s.useRef(i),d=s.useRef(!0);return h.current=i,A({disabled:a,callback:s.useCallback(e=>d.current&&x(h.current,e.name,n)&&y(e,o.current)&&l({...r._formState,...e}),[r,n]),subject:r._subjects.state}),s.useEffect(()=>(d.current=!0,()=>{d.current=!1}),[]),_(u,r._proxyFormState,o.current,!1)}({control:a,name:r}),p=s.useRef(a.register(r,{...e.rules,value:o}));return s.useEffect(()=>{let e=(e,t)=>{let r=d(a._fields,e);r&&(r._f.mount=t)};return e(r,!0),()=>{let t=a._options.shouldUnregister||i;(n?t&&!a._stateFlags.action:t)?a.unregister(r):e(r,!1)}},[r,a,n,i]),{field:{name:r,value:o,onChange:s.useCallback(e=>{p.current.onChange({target:{value:u(e),name:r},type:c.CHANGE})},[r]),onBlur:s.useCallback(()=>{p.current.onBlur({target:{value:d(a._formValues,r),name:r},type:c.BLUR})},[r,a]),ref:s.useCallback(e=>{let t=d(a._fields,r);e&&t&&e.focus&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})},[r,a._fields])},formState:h,fieldState:Object.defineProperties({},{invalid:{get:()=>!!d(h.errors,r)},isDirty:{get:()=>!!d(h.dirtyFields,r)},isTouched:{get:()=>!!d(h.touchedFields,r)},error:{get:()=>d(h.errors,r)}})}}let w=e=>e.render(V(e));var D=(e,t,r,s,a)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[s]:a||!0}}:{},T=e=>/^\w*$/.test(e),B=e=>o(e.replace(/["|']|\]/g,"").split(/\.|\[/));function M(e,t,r){let s=-1,a=T(t)?[t]:B(t),i=a.length,u=i-1;for(;++s<i;){let t=a[s],i=r;if(s!==u){let r=e[t];i=n(r)||Array.isArray(r)?r:isNaN(+a[s+1])?{}:[]}e[t]=i,e=e[t]}return e}let R=(e,t,r)=>{for(let s of r||Object.keys(e)){let r=d(e,s);if(r){let{_f:e,...s}=r;if(e&&t(e.name)){if(e.ref.focus&&h(e.ref.focus()))break;else if(e.refs){e.refs[0].focus();break}}else n(s)&&R(s,t)}}};var I=()=>{let e="undefined"==typeof performance?Date.now():1e3*performance.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let r=(16*Math.random()+e)%16|0;return("x"==t?r:3&r|8).toString(16)})},O=(e,t,r={})=>r.shouldFocus||h(r.shouldFocus)?r.focusName||`${e}.${h(r.focusIndex)?t:r.focusIndex}.`:"",P=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length)))),L=(e,t,r)=>{let s=o(d(e,r));return M(s,"root",t[r]),M(e,r,s),e},N=e=>"string"==typeof e||s.isValidElement(e);let j={value:!1,isValid:!1},U={value:!0,isValid:!0};var $=e=>{if(Array.isArray(e)){if(e.length>1){let t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!h(e[0].attributes.value)?h(e[0].value)||""===e[0].value?U:{value:e[0].value,isValid:!0}:U:j}return j};let z={isValid:!1,value:null};var H=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,z):z;function q(e,t,r="validate"){if(N(e)||Array.isArray(e)&&e.every(N)||"boolean"==typeof e&&!e)return{type:r,message:N(e)?e:"",ref:t}}var G=e=>!n(e)||e instanceof RegExp?{value:e,message:""}:e,K=async(e,t,r,s,a)=>{let{ref:u,refs:l,required:o,maxLength:h,minLength:d,min:c,max:p,pattern:g,validate:m,name:v,valueAsNumber:_,mount:y,disabled:b}=e._f;if(!y||b)return{};let x=l?l[0]:u,A=e=>{s&&x.reportValidity&&(x.setCustomValidity("boolean"==typeof e?"":e||" "),x.reportValidity())},E={},F="radio"===u.type,S="checkbox"===u.type,V=(_||"file"===u.type)&&!u.value||""===t||Array.isArray(t)&&!t.length,w=D.bind(null,v,r,E),T=(e,t,r,s=f.maxLength,a=f.minLength)=>{let i=e?t:r;E[v]={type:e?s:a,message:i,ref:u,...w(e?s:a,i)}};if(a?!Array.isArray(t)||!t.length:o&&(!(F||S)&&(V||i(t))||"boolean"==typeof t&&!t||S&&!$(l).isValid||F&&!H(l).isValid)){let{value:e,message:t}=N(o)?{value:!!o,message:o}:G(o);if(e&&(E[v]={type:f.required,message:t,ref:x,...w(f.required,t)},!r))return A(t),E}if(!V&&(!i(c)||!i(p))){let e,s,a=G(p),n=G(c);if(i(t)||isNaN(t)){let r=u.valueAsDate||new Date(t);"string"==typeof a.value&&(e=r>new Date(a.value)),"string"==typeof n.value&&(s=r<new Date(n.value))}else{let r=u.valueAsNumber||+t;i(a.value)||(e=r>a.value),i(n.value)||(s=r<n.value)}if((e||s)&&(T(!!e,a.message,n.message,f.max,f.min),!r))return A(E[v].message),E}
1if((h||d)&&!V&&("string"==typeof t||a&&Array.isArray(t))){let e=G(h),s=G(d),a=!i(e.value)&&t.length>e.value,n=!i(s.value)&&t.length<s.value;if((a||n)&&(T(a,e.message,s.message),!r))return A(E[v].message),E}if(g&&!V&&"string"==typeof t){let{value:e,message:s}=G(g);if(e instanceof RegExp&&!t.match(e)&&(E[v]={type:f.pattern,message:s,ref:u,...w(f.pattern,s)},!r))return A(s),E}if(m){if(C(m)){let e=q(await m(t),x);if(e&&(E[v]={...e,...w(f.validate,e.message)},!r))return A(e.message),E}else if(n(m)){let e={};for(let s in m){if(!k(e)&&!r)break;let a=q(await m[s](t),x,s);a&&(e={...a,...w(s,a.message)},A(a.message),r&&(E[v]=e))}if(!k(e)&&(E[v]={ref:x,...e},!r))return E}}return A(!0),E};function W(e,t){return[...e,...b(t)]}var Z="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function Y(e){let t,r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(!(Z&&(e instanceof Blob||e instanceof FileList))&&(r||n(e))))return e;else for(let s in t=r?[]:{},e){if(C(e[s])){t=e;break}t[s]=Y(e[s])}return t}var X=e=>Array.isArray(e)?e.map(()=>void 0):void 0,J=e=>({isOnSubmit:!e||e===p.onSubmit,isOnBlur:e===p.onBlur,isOnChange:e===p.onChange,isOnAll:e===p.all,isOnTouch:e===p.onTouched});function Q(e,t,r){return[...e.slice(0,t),...b(r),...e.slice(t)]}var ee=(e,t,r)=>Array.isArray(e)?(h(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[];function et(e,t){return[...b(t),...b(e)]}var er=(e,t)=>h(t)?[]:function(e,t){let r=0,s=[...e];for(let e of t)s.splice(e-r,1),r++;return o(s).length?s:[]}(e,b(t).sort((e,t)=>e-t)),es=(e,t,r)=>{e[t]=[e[r],e[r]=e[t]][0]};function ea(e,t){let r,s=T(t)?[t]:B(t),a=1==s.length?e:function(e,t){let r=t.slice(0,-1).length,s=0;for(;s<r;)e=h(e)?s++:e[t[s++]];return e}(e,s),i=s[s.length-1];a&&delete a[i];for(let t=0;t<s.slice(0,-1).length;t++){let a,i=-1,u=s.slice(0,-(t+1)),l=u.length-1;for(t>0&&(r=e);++i<u.length;){let t=u[i];a=a?a[t]:e[t],l===i&&(n(a)&&k(a)||Array.isArray(a)&&function(e){for(let t in e)if(!h(e[t]))return!1;return!0}(a))&&(r?delete r[t]:delete e[t]),r=a}}return e}var ei=(e,t,r)=>(e[t]=r,e);function en(e){let t=m(),{control:r=t.control,name:a,keyName:i="id",shouldUnregister:n}=e,[u,l]=s.useState(r._getFieldArray(a)),o=s.useRef(r._getFieldArray(a).map(I)),h=s.useRef(u),c=s.useRef(a),f=s.useRef(!1);c.current=a,h.current=u,r._names.array.add(a),e.rules&&r.register(a,e.rules),A({callback:s.useCallback(({values:e,name:t})=>{if(t===c.current||!t){let t=d(e,c.current,[]);l(t),o.current=t.map(I)}},[]),subject:r._subjects.array});let g=s.useCallback(e=>{f.current=!0,r._updateFieldArray(a,e)},[r,a]);return s.useEffect(()=>{if(r._stateFlags.action=!1,P(a,r._names)&&r._subjects.state.next({}),f.current)if(r._options.resolver)r._executeSchema([a]).then(e=>{let t=d(e.errors,a),s=d(r._formState.errors,a);(s?!t&&s.type:t&&t.type)&&(t?M(r._formState.errors,a,t):ea(r._formState.errors,a),r._subjects.state.next({errors:r._formState.errors}))});else{let e=d(r._fields,a);(!J(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&e&&e._f&&K(e,d(r._formValues,a),r._options.criteriaMode===p.all,r._options.shouldUseNativeValidation,!0).then(e=>!k(e)&&r._subjects.state.next({errors:L(r._formState.errors,e,a)}))}r._subjects.watch.next({name:a,values:r._formValues}),r._names.focus&&R(r._fields,e=>e.startsWith(r._names.focus)),r._names.focus="",r._proxyFormState.isValid&&r._updateValid()},[u,a,r]),s.useEffect(()=>(d(r._formValues,a)||r._updateFieldArray(a),()=>{(r._options.shouldUnregister||n)&&r.unregister(a)}),[a,r,i,n]),{swap:s.useCallback((e,t)=>{let s=r._getFieldArray(a);es(s,e,t),es(o.current,e,t),g(s),l(s),r._updateFieldArray(a,s,es,{argA:e,argB:t},!1)},[g,a,r]),move:s.useCallback((e,t)=>{let s=r._getFieldArray(a);ee(s,e,t),ee(o.current,e,t),g(s),l(s),r._updateFieldArray(a,s,ee,{argA:e,argB:t},!1)},[g,a,r]),prepend:s.useCallback((e,t)=>{let s=b(Y(e)),i=et(r._getFieldArray(a),s);r._names.focus=O(a,0,t),o.current=et(o.current,s.map(I)),g(i),l(i),r._updateFieldArray(a,i,et,{argA:X(e)})},[g,a,r]),append:s.useCallback((e,t)=>{let s=b(Y(e)),i=W(r._getFieldArray(a),s);r._names.focus=O(a,i.length-1,t),o.current=W(o.current,s.map(I)),g(i),l(i),r._updateFieldArray(a,i,W,{argA:X(e)})},[g,a,r]),remove:s.useCallback(e=>{let t=er(r._getFieldArray(a),e);o.current=er(o.current,e),g(t),l(t),r._updateFieldArray(a,t,er,{argA:e})},[g,a,r]),insert:s.useCallback((e,t,s)=>{let i=b(Y(t)),n=Q(r._getFieldArray(a),e,i);r._names.focus=O(a,e,s),o.current=Q(o.current,e,i.map(I)),g(n),l(n),r._updateFieldArray(a,n,Q,{argA:e,argB:X(t)})},[g,a,r]),update:s.useCallback((e,t)=>{let s=Y(t),i=ei(r._getFieldArray(a),e,s);o.current=[...i].map((t,r)=>t&&r!==e?o.current[r]:I()),g(i),l([...i]),r._updateFieldArray(a,i,ei,{argA:e,argB:s},!0,!1)},[g,a,r]),replace:s.useCallback(e=>{let t=b(Y(e));o.current=t.map(I),g([...t]),l([...t]),r._updateFieldArray(a,[...t],e=>e,{},!0,!1)},[g,a,r]),fields:s.useMemo(()=>u.map((e,t)=>({...e,[i]:o.current[t]||I()})),[u,i])}}function eu(){let e=[];return{get observers(){return e},next:t=>{for(let r of e)r.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}}var el=e=>i(e)||"object"!=typeof e;function eo(e,t){if(el(e)||el(t))return e===t;if(a(e)&&a(t))return e.getTime()===t.getTime();let r=Object.keys(e),s=Object.keys(t);if(r.length!==s.length)return!1;for(let i of r){let r=e[i];if(!s.includes(i))return!1;if("ref"!==i){let e=t[i];if(a(r)&&a(e)||n(r)&&n(e)||Array.isArray(r)&&Array.isArray(e)?!eo(r,e):r!==e)return!1}}return!0}var eh=e=>{let t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ed=e=>eh(e)&&e.isConnected;function ec(e,t={}){let r=Array.isArray(e);if(n(e)||r)for(let r in e)Array.isArray(e[r])||n(e[r])&&!F(e[r])?(t[r]=Array.isArray(e[r])?[]:{},ec(e[r],t[r])):i(e[r])||(t[r]=!0);return t}var ep=(e,t)=>(function e(t,r,s){let a=Array.isArray(t);if(n(t)||a)for(let a in t)Array.isArray(t[a])||n(t[a])&&!F(t[a])?h(r)||el(s[a])?s[a]=Array.isArray(t[a])?ec(t[a],[]):{...ec(t[a])}:e(t[a],i(r)?{}:r[a],s[a]):s[a]=!eo(t[a],r[a]);return s}
1)(e,t,ec(t)),ef=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:s})=>h(e)?e:t?""===e||i(e)?NaN:+e:r&&"string"==typeof e?new Date(e):s?s(e):e;function eg(e){let t=e.ref;if(e.refs?!e.refs.every(e=>e.disabled):!t.disabled)return"file"===t.type?t.files:"radio"===t.type?H(e.refs).value:"select-multiple"===t.type?[...t.selectedOptions].map(({value:e})=>e):"checkbox"===t.type?$(e.refs).value:ef(h(t.value)?e.ref.value:t.value,e)}var em=e=>h(e)?void 0:e instanceof RegExp?e.source:n(e)?e.value instanceof RegExp?e.value.source:e.value:e;function ev(e,t,r){let s=d(e,r);if(s||T(r))return{error:s,name:r};let a=r.split(".");for(;a.length;){let s=a.join("."),i=d(t,s),n=d(e,s);if(i&&!Array.isArray(i)&&r!==s)break;if(n&&n.type)return{name:s,error:n};a.pop()}return{name:r}}let e_={mode:p.onSubmit,reValidateMode:p.onChange,shouldFocusError:!0};function ek(e={}){let t=s.useRef(),[r,n]=s.useState({isDirty:!1,isValidating:!1,dirtyFields:{},isSubmitted:!1,submitCount:0,touchedFields:{},isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,errors:{}});t.current?t.current.control._options=e:t.current={...function(e={}){let t,r={...e_,...e},s={isDirty:!1,isValidating:!1,dirtyFields:{},isSubmitted:!1,submitCount:0,touchedFields:{},isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,errors:{}},n={},f=Y(r.defaultValues)||{},g=r.shouldUnregister?{}:Y(f),m={action:!1,mount:!1,watch:!1},v={mount:new Set,unMount:new Set,array:new Set,watch:new Set},_=0,y={},x={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},A={watch:eu(),array:eu(),state:eu()},F=J(r.mode),S=J(r.reValidateMode),V=r.criteriaMode===p.all,w=async e=>{let t=!1;return x.isValid&&(t=r.resolver?k((await I()).errors):await N(n,!0),e||t===s.isValid||(s.isValid=t,A.state.next({isValid:t}))),t},D=(e,t,r,s)=>{let a=d(n,e);if(a){let i=d(g,e,h(r)?d(f,e):r);h(i)||s&&s.defaultChecked||t?M(g,e,t?i:eg(a._f)):$(e,i),m.mount&&w()}},T=(e,t,r,a,i)=>{let n=!1,u={name:e},l=d(s.touchedFields,e);if(x.isDirty){let e=s.isDirty;s.isDirty=u.isDirty=j(),n=e!==u.isDirty}if(x.dirtyFields&&(!r||a)){let r=d(s.dirtyFields,e);eo(d(f,e),t)?ea(s.dirtyFields,e):M(s.dirtyFields,e,!0),u.dirtyFields=s.dirtyFields,n=n||r!==d(s.dirtyFields,e)}return r&&!l&&(M(s.touchedFields,e,r),u.touchedFields=s.touchedFields,n=n||x.touchedFields&&l!==r),n&&i&&A.state.next(u),n?u:{}},B=async(r,a,i,n)=>{let u=d(s.errors,r),l=x.isValid&&s.isValid!==a;if(e.delayError&&i){let a;a=()=>{M(s.errors,r,i),A.state.next({errors:s.errors})},(t=e=>{clearTimeout(_),_=window.setTimeout(a,e)})(e.delayError)}else clearTimeout(_),t=null,i?M(s.errors,r,i):ea(s.errors,r);if((i?!eo(u,i):u)||!k(n)||l){let e={...n,...l?{isValid:a}:{},errors:s.errors,name:r};s={...s,...e},A.state.next(e)}y[r]--,x.isValidating&&!Object.values(y).some(e=>e)&&(A.state.next({isValidating:!1}),y={})},I=async e=>r.resolver?await r.resolver({...g},r.context,((e,t,r,s)=>{let a={};for(let r of e){let e=d(t,r);e&&M(a,r,e._f)}return{criteriaMode:r,names:[...e],fields:a,shouldUseNativeValidation:s}})(e||v.mount,n,r.criteriaMode,r.shouldUseNativeValidation)):{},O=async e=>{let{errors:t}=await I();if(e)for(let r of e){let e=d(t,r);e?M(s.errors,r,e):ea(s.errors,r)}else s.errors=t;return t},N=async(e,t,a={valid:!0})=>{for(let i in e){let n=e[i];if(n){let{_f:e,...i}=n;if(e){let i=v.array.has(e.name),u=await K(n,d(g,e.name),V,r.shouldUseNativeValidation,i);
1if(u[e.name]&&(a.valid=!1,t))break;t||(d(u,e.name)?i?L(s.errors,u,e.name):M(s.errors,e.name,u[e.name]):ea(s.errors,e.name))}i&&await N(i,t,a)}}return a.valid},j=(e,t)=>(e&&t&&M(g,e,t),!eo(W(),f)),U=(e,t,r)=>{let s={...m.mount?g:h(t)?f:"string"==typeof e?{[e]:t}:t};return E(e,v,s,r)},$=(e,t,r={})=>{let s=d(n,e),a=t;if(s){let r=s._f;r&&(r.disabled||M(g,e,ef(t,r)),a=Z&&eh(r.ref)&&i(t)?"":t,"select-multiple"===r.ref.type?[...r.ref.options].forEach(e=>e.selected=a.includes(e.value)):r.refs?"checkbox"===r.ref.type?r.refs.length>1?r.refs.forEach(e=>!e.disabled&&(e.checked=Array.isArray(a)?!!a.find(t=>t===e.value):a===e.value)):r.refs[0]&&(r.refs[0].checked=!!a):r.refs.forEach(e=>e.checked=e.value===a):"file"===r.ref.type?r.ref.value="":(r.ref.value=a,r.ref.type||A.watch.next({name:e})))}(r.shouldDirty||r.shouldTouch)&&T(e,a,r.shouldTouch,r.shouldDirty,!0),r.shouldValidate&&G(e)},z=(e,t,r)=>{for(let s in t){let i=t[s],u=`${e}.${s}`,l=d(n,u);!v.array.has(e)&&el(i)&&(!l||l._f)||a(i)?$(u,i,r):z(u,i,r)}},H=(e,t,r={})=>{let a=d(n,e),u=v.array.has(e),l=Y(t);M(g,e,l),u?(A.array.next({name:e,values:g}),(x.isDirty||x.dirtyFields)&&r.shouldDirty&&(s.dirtyFields=ep(f,g),A.state.next({name:e,dirtyFields:s.dirtyFields,isDirty:j(e,l)}))):!a||a._f||i(l)?$(e,l,r):z(e,l,r),P(e,v)&&A.state.next({}),A.watch.next({name:e})},q=async e=>{let a=e.target,i=a.name,l=d(n,i);if(l){var o,h,p,f,m;let _,b,x,E=a.type?eg(l._f):u(e),C=e.type===c.BLUR||e.type===c.FOCUS_OUT,D=!((x=l._f).mount&&(x.required||x.min||x.max||x.maxLength||x.minLength||x.pattern||x.validate))&&!r.resolver&&!d(s.errors,i)&&!l._f.deps||(o=C,h=d(s.touchedFields,i),p=s.isSubmitted,f=S,!(m=F).isOnAll&&(!p&&m.isOnTouch?!(h||o):(p?f.isOnBlur:m.isOnBlur)?!o:(p?!f.isOnChange:!m.isOnChange)||o)),R=P(i,v,C);M(g,i,E),C?(l._f.onBlur&&l._f.onBlur(e),t&&t(0)):l._f.onChange&&l._f.onChange(e);let O=T(i,E,C,!1),L=!k(O)||R;if(C||A.watch.next({name:i,type:e.type}),D)return L&&A.state.next({name:i,...R?{}:O});if(!C&&R&&A.state.next({}),y[i]=(y[i],1),A.state.next({isValidating:!0}),r.resolver){let{errors:e}=await I([i]),t=ev(s.errors,n,i),r=ev(e,n,t.name||i);_=r.error,i=r.name,b=k(e)}else _=(await K(l,d(g,i),V,r.shouldUseNativeValidation))[i],b=await w(!0);l._f.deps&&G(l._f.deps),B(i,b,_,O)}},G=async(e,t={})=>{let a,i,u=b(e);if(A.state.next({isValidating:!0}),r.resolver){let t=await O(h(e)?e:u);a=k(t),i=e?!u.some(e=>d(t,e)):a}else e?((i=(await Promise.all(u.map(async e=>{let t=d(n,e);return await N(t&&t._f?{[e]:t}:t)}))).every(Boolean))||s.isValid)&&w():i=a=await N(n);return A.state.next({..."string"!=typeof e||x.isValid&&a!==s.isValid?{}:{name:e},...r.resolver?{isValid:a}:{},errors:s.errors,isValidating:!1}),t.shouldFocus&&!i&&R(n,e=>d(s.errors,e),e?u:v.mount),i},W=e=>{let t={...f,...m.mount?g:{}};return h(e)?t:"string"==typeof e?d(t,e):e.map(e=>d(t,e))},X=(e,t)=>({invalid:!!d((t||s).errors,e),isDirty:!!d((t||s).dirtyFields,e),isTouched:!!d((t||s).touchedFields,e),error:d((t||s).errors,e)}),Q=(e,t={})=>{for(let a of e?b(e):v.mount)v.mount.delete(a),v.array.delete(a),d(n,a)&&(t.keepValue||(ea(n,a),ea(g,a)),t.keepError||ea(s.errors,a),t.keepDirty||ea(s.dirtyFields,a),t.keepTouched||ea(s.touchedFields,a),r.shouldUnregister||t.keepDefaultValue||ea(f,a));A.watch.next({}),A.state.next({...s,...!t.keepDirty?{}:{isDirty:j()}}),t.keepIsValid||w()},ee=(e,t={})=>{let s=d(n,e),a="boolean"==typeof t.disabled;return M(n,e,{_f:{...s&&s._f?s._f:{ref:{name:e}},name:e,mount:!0,...t}}),v.mount.add(e),s?a&&M(g,e,t.disabled?void 0:d(g,e,eg(s._f))):D(e,!0,t.value),{...a?{disabled:t.disabled}:{},...r.shouldUseNativeValidation?{required:!!t.required,min:em(t.min),max:em(t.max),minLength:em(t.minLength),maxLength:em(t.maxLength),pattern:em(t.pattern)}:{},name:e,onChange:q,onBlur:q,ref:a=>{if(a){let r;ee(e,t),s=d(n,e);let i=h(a.value)&&a.querySelectorAll&&a.querySelectorAll("input,select,textarea")[0]||a,u="radio"===(r=i).type||"checkbox"===r.type,l=s._f.refs||[];(u?l.find(e=>e===i):i===s._f.ref)||(M(n,e,{_f:{...s._f,...u?{refs:[...l.filter(ed),i,...Array.isArray(d(f,e))?[{}]:[]],ref:{type:i.type,name:e}}:{ref:i}}}),D(e,!1,void 0,i))}else(s=d(n,e,{}))._f&&(s._f.mount=!1),(r.shouldUnregister||t.shouldUnregister)&&!(l(v.array,e)&&m.action)&&v.unMount.add(e)}}};return{control:{register:ee,unregister:Q,getFieldState:X,_executeSchema:I,_getWatch:U,_getDirty:j,_updateV
1alid:w,_removeUnmounted:()=>{for(let e of v.unMount){let t=d(n,e);t&&(t._f.refs?t._f.refs.every(e=>!ed(e)):!ed(t._f.ref))&&Q(e)}v.unMount=new Set},_updateFieldArray:(e,t=[],r,a,i=!0,u=!0)=>{if(a&&r){if(m.action=!0,u&&Array.isArray(d(n,e))){let t=r(d(n,e),a.argA,a.argB);i&&M(n,e,t)}if(x.errors&&u&&Array.isArray(d(s.errors,e))){let t,n=r(d(s.errors,e),a.argA,a.argB);i&&M(s.errors,e,n),o(d(t=s.errors,e)).length||ea(t,e)}if(x.touchedFields&&u&&Array.isArray(d(s.touchedFields,e))){let t=r(d(s.touchedFields,e),a.argA,a.argB);i&&M(s.touchedFields,e,t)}x.dirtyFields&&(s.dirtyFields=ep(f,g)),A.state.next({isDirty:j(e,t),dirtyFields:s.dirtyFields,errors:s.errors,isValid:s.isValid})}else M(g,e,t)},_getFieldArray:t=>o(d(m.mount?g:f,t,e.shouldUnregister?d(f,t,[]):[])),_subjects:A,_proxyFormState:x,get _fields(){return n},get _formValues(){return g},get _stateFlags(){return m},set _stateFlags(value){m=value},get _defaultValues(){return f},get _names(){return v},set _names(value){v=value},get _formState(){return s},set _formState(value){s=value},get _options(){return r},set _options(value){r={...r,...value}}},trigger:G,register:ee,handleSubmit:(e,t)=>async a=>{a&&(a.preventDefault&&a.preventDefault(),a.persist&&a.persist());let i=!0,u=Y(g);A.state.next({isSubmitting:!0});try{if(r.resolver){let{errors:e,values:t}=await I();s.errors=e,u=t}else await N(n);k(s.errors)?(A.state.next({errors:{},isSubmitting:!0}),await e(u,a)):(t&&await t({...s.errors},a),r.shouldFocusError&&R(n,e=>d(s.errors,e),v.mount))}catch(e){throw i=!1,e}finally{s.isSubmitted=!0,A.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:k(s.errors)&&i,submitCount:s.submitCount+1,errors:s.errors})}},watch:(e,t)=>C(e)?A.watch.subscribe({next:r=>e(U(void 0,t),r)}):U(e,t,!0),setValue:H,getValues:W,reset:(t,r={})=>{let a=t||f,i=Y(a),u=t&&!k(t)?i:f;if(r.keepDefaultValues||(f=a),!r.keepValues){if(r.keepDirtyValues)for(let e of v.mount)d(s.dirtyFields,e)?M(u,e,d(g,e)):H(e,d(u,e));else{if(Z&&h(t))for(let e of v.mount){let t=d(n,e);if(t&&t._f){let e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;try{if(eh(e)){e.closest("form").reset();break}}catch(e){}}}n={}}g=e.shouldUnregister?r.keepDefaultValues?Y(f):{}:i,A.array.next({values:u}),A.watch.next({values:u})}v={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},m.mount=!x.isValid||!!r.keepIsValid,m.watch=!!e.shouldUnregister,A.state.next({submitCount:r.keepSubmitCount?s.submitCount:0,isDirty:r.keepDirty||r.keepDirtyValues?s.isDirty:!!(r.keepDefaultValues&&!eo(t,f)),isSubmitted:!!r.keepIsSubmitted&&s.isSubmitted,dirtyFields:r.keepDirty||r.keepDirtyValues?s.dirtyFields:r.keepDefaultValues&&t?ep(f,t):{},touchedFields:r.keepTouched?s.touchedFields:{},errors:r.keepErrors?s.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},resetField:(e,t={})=>{d(n,e)&&(h(t.defaultValue)?H(e,d(f,e)):(H(e,t.defaultValue),M(f,e,t.defaultValue)),t.keepTouched||ea(s.touchedFields,e),t.keepDirty||(ea(s.dirtyFields,e),s.isDirty=t.defaultValue?j(e,d(f,e)):j()),!t.keepError&&(ea(s.errors,e),x.isValid&&w()),A.state.next({...s}))},clearErrors:e=>{e?b(e).forEach(e=>ea(s.errors,e)):s.errors={},A.state.next({errors:s.errors})},unregister:Q,setError:(e,t,r)=>{let a=(d(n,e,{_f:{}})._f||{}).ref;M(s.errors,e,{...t,ref:a}),A.state.next({name:e,errors:s.errors,isValid:!1}),r&&r.shouldFocus&&a&&a.focus&&a.focus()},setFocus:(e,t={})=>{let r=d(n,e)._f,s=r.refs?r.refs[0]:r.ref;s.focus(),t.shouldSelect&&s.select()},getFieldState:X}}(e),formState:r};let f=t.current.control,g=s.useCallback(e=>{y(e,f._proxyFormState,!0)&&(f._formState={...f._formState,...e},n({...f._formState}))},[f]);return A({subject:f._subjects.state,callback:g}),s.useEffect(()=>{f._stateFlags.mount||(f._proxyFormState.isValid&&f._updateValid(),f._stateFlags.mount=!0),f._stateFlags.watch&&(f._stateFlags.watch=!1,f._subjects.state.next({})),f._removeUnmounted()}),t.current.formState=_(r,f._proxyFormState),t.current}},25929:function(e,t,r){"use strict";var s=this&&this.__assign||function(){return(s=Object.assign||function(e){for(var t,r=1,s=arguments.length;r<s;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=r(44049),i=r(64701),n=r(11652),u=r(50057),l=r(12428),o={},h={VISA:"visa",MASTERCARD:"mastercard",AMERICAN_EXPRESS:"american-express",DINERS_CLUB:"diners-club",DISCOVER:"discover",JCB:"jcb",UNIONPAY:"unionpay",VERVE:"verve",MAESTRO:"maestro",ELO:"elo",MIR:"mir",HIPER:"hiper",HIPERCARD:"hipercard"},d=[h.VISA,h.MASTERCARD,h.AMERICAN_EXPRESS,h.DINERS_CLUB,h.DISCOVER,h.JCB,h.UNIONPAY,h.VERVE,h.MAESTRO,h.ELO,h.MIR,h.HIPER,h.HIPERCARD],c=(0,l.clone)(d);function p(e){return o[e]||a[e]}function f(e,t){void 0===t&&(t=!1);var r=c.indexOf(e);if(!t&&-1===r)throw Error('"'+e+'" is not a supported card type.');return r}function g(e){var t=[];if(!(0,n.isValidInputType)(e))return t;if(0===e.length)return c.map(function(e){return(0,l.clone)(p(e))});
1c.forEach(function(r){var s=p(r);(0,i.addMatchingCardsToResults)(e,s,t)});var r=(0,u.findBestMatch)(t);return r?[r]:t}g.getTypeInfo=function(e){return(0,l.clone)(p(e))},g.removeCard=function(e){var t=f(e);c.splice(t,1)},g.addCard=function(e){var t=f(e.type,!0);o[e.type]=e,-1===t&&c.push(e.type)},g.updateCard=function(e,t){var r=o[e]||a[e];if(!r)throw Error('"'.concat(e,"\" is not a recognized type. Use `addCard` instead.'"));if(t.type&&r.type!==t.type)throw Error("Cannot overwrite type parameter.");var i=(0,l.clone)(r);o[(i=s(s({},i),t)).type]=i},g.changeOrder=function(e,t){var r=f(e);c.splice(r,1),c.splice(t,0,e)},g.resetModifications=function(){c=(0,l.clone)(d),o={}},g.types=h,e.exports=g},27948:(e,t,r)=>{"use strict";function s(e){return"string"==typeof e||e instanceof String}function a(e){var t;return"object"==typeof e&&null!=e&&(null==e||null==(t=e.constructor)?void 0:t.name)==="Object"}r.d(t,{$o:()=>H});let i={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function n(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function u(e,t){let r;if(t===e)return!0;let s=Array.isArray(t),a=Array.isArray(e);if(s&&a){if(t.length!=e.length)return!1;for(r=0;r<t.length;r++)if(!u(t[r],e[r]))return!1;return!0}if(s!=a)return!1;if(t&&e&&"object"==typeof t&&"object"==typeof e){let s=t instanceof Date,a=e instanceof Date;if(s&&a)return t.getTime()==e.getTime();if(s!=a)return!1;let i=t instanceof RegExp,n=e instanceof RegExp;if(i&&n)return t.toString()==e.toString();if(i!=n)return!1;let l=Object.keys(t);for(r=0;r<l.length;r++)if(!Object.prototype.hasOwnProperty.call(e,l[r]))return!1;for(r=0;r<l.length;r++)if(!u(e[l[r]],t[l[r]]))return!1;return!0}return!!t&&!!e&&"function"==typeof t&&"function"==typeof e&&t.toString()===e.toString()}class l{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?i.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?i.RIGHT:i.LEFT}}function o(e,t){return new o.InputMask(e,t)}function h(e){if(null==e)throw Error("mask property should be defined");return e instanceof RegExp?o.MaskedRegExp:s(e)?o.MaskedPattern:e===Date?o.MaskedDate:e===Number?o.MaskedNumber:Array.isArray(e)||e===Array?o.MaskedDynamic:o.Masked&&e.prototype instanceof o.Masked?e:o.Masked&&e instanceof o.Masked?e.constructor:e instanceof Function?o.MaskedFunction:(console.warn("Mask not found for mask",e),o.Masked)}function d(e){if(!e)throw Error("Options in not defined");if(o.Masked){if(e.prototype instanceof o.Masked)return{mask:e};let{mask:t,...r}=e instanceof o.Masked?{mask:e}:a(e)&&e.mask instanceof o.Masked?e:{};if(t){let e=t.mask;return{...function e(t,r){return Array.isArray(r)?e(t,(e,t)=>r.includes(t)):Object.entries(t).reduce((e,t)=>{let[s,a]=t;return r(a,s)&&(e[s]=a),e},{})}(t,(e,t)=>!t.startsWith("_")),mask:t.constructor,_mask:e,...r}}}return a(e)?{...e}:{mask:e}}function c(e){if(o.Masked&&e instanceof o.Masked)return e;let t=d(e),r=h(t.mask);if(!r)throw Error("Masked class is not found for provided mask "+t.mask+", appropriate module needs to be imported manually before creating mask.");return t.mask===r&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new r(t)}o.createMask=c;class p{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return null!=e?e:this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return null!=e?e:this.value.length}select(e,t){if(null!=e&&null!=t&&(e!==this.selectionStart||t!==this.selectionEnd))try{this._unsafeSelect(e,t)}catch{}}get isActive(){return!1}}o.MaskElement=p;class f extends p{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,t,r;return null!=(e=null==(t=(r=this.input).getRootNode)?void 0:t.call(r))?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){return this._handlers.redo&&(90===e.keyCode&&e.shiftKey&&(e.metaKey||e.ctrlKey)||89===e.keyCode&&e.ctrlKey)?(e.preventDefault(),this._handlers.redo(e)):this._handlers.undo&&90===e.keyCode&&(e.metaKey||e.ctrlKey)?(e.preventDefault(),this._handlers.undo(e)):void(!e.isComposing&&this._handlers.selectionChange(e))}_onBeforeinput(e){return"historyUndo"===e.inputType&&this._handlers.undo?(e.preventDefault(),this._handlers.undo(e)):"historyRedo"===e.inputType&&this._handlers.redo?(e.preventDefault(),this._handlers.redo(e)):void 0}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}o.HTMLMaskElement=f;class g extends f{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return null!=this.input.selectionStart?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,t){this.input.setSelectionRange(e,t)}get value(){return this.input.value}set value(e){this.input.value=e}}o.HTMLMaskElement=f;class m extends f{get _unsafeSelectionStart(){let e=this.rootElement,t=e.getSelection&&e.getSelection(),r=t&&t.anchorOffset,s=t&&t.focusOffset;return null==s||null==r||r<s?r:s}get _unsafeSelectionEnd(){let e=this.rootElement,t=e.getSelection&&e.getSelection(),r=t&&t.anchorOffset,s=t&&t.focusOffset;return null==s||null==r||r>s?r:s}_unsafeSelect(e,t){if(!this.rootElement.createRange)return;let r=this.rootElement.createRange();r.setStart(this.input.firstChild||this.input,e),r.setEnd(this.input.last
vendor: 4,290 bytes, line 1
1Child||this.input,t);let s=this.rootElement,a=s.getSelection&&s.getSelection();a&&(a.removeAllRanges(),a.addRange(r))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}o.HTMLContenteditableMaskElement=m;class v{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return 0===this.states.length}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>v.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}v.MAX_LENGTH=100;class _{constructor(e,t){this.el=e instanceof p?e:e.isContentEditable&&"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName?new m(e):new g(e),this.masked=c(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new v,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var t;return null==e||(null==(t=this.masked)?void 0:t.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof o.Masked)&&this.masked.constructor===h(e))return void this.masked.updateOptions({mask:e});let t=e instanceof o.Masked?e:c({mask:e});t.unmaskedValue=this.masked.unmaskedValue,this.masked=t}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,t){let r=this._listeners[e];r&&r.forEach(e=>e(t))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){this.el&&this.el.isActive&&(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){let t=this.masked.unmaskedValue,r=this.masked.value,s=this.masked.rawInputValue,a=this.displayValue,i=this.unmaskedValue!==t||this.value!==r||this._rawInputValue!==s;this._unmaskedValue=t,this._value=r,this._rawInputValue=s,this.el.value!==a&&(this.el.value=a),"auto"===e?this.alignCursor():null!=e&&(this.cursorPos=e),i&&this._fireChangeEvents(),!this._historyChanging&&(i||this.history.isEmpty)&&this.history.push({unmaskedValue:t,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){let{mask:t,...r}=e,s=!this.maskEquals(t),a=this.masked.optionsIsChanged(r);s&&(this.mask=t),a&&this.masked.updateOptions(r),(s||a)&&this.updateControl()}updateCursor(e){null!=e&&(this.cursorPos=e,this._delayUpdateCursor(e))}
1_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,i.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,t){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t),this}off(e,t){if(!this._listeners[e])return this;if(!t)return delete this._listeners[e],this;let r=this._listeners[e].indexOf(t);return r>=0&&this._listeners[e].splice(r,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();let t=new l({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),r=this.masked.rawInputValue,s=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,a=r===this.masked.rawInputValue?t.removeDirection:i.NONE,n=this.masked.nearestInputPos(t.startChangePos+s,a);a!==i.NONE&&(n=this.masked.nearestInputPos(n,i.NONE)),this.updateControl(n),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}o.InputMask=_;class k{static normalize(e){return Array.isArray(e)?e:[e,new k]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}o.ChangeDetails=k;class y{constructor(e,t,r){void 0===e&&(e=""),void 0===t&&(t=0),this.value=e,this.from=t,this.stop=r}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||null!=e&&this.from>=e)return"";let t=this.value[0];return this.value=this.value.slice(1),t}shift(){if(!this.value.length)return"";let e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class b{constructor(e){this._value="",this._update({...b.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,t){void 0===t&&(t={input:!0}),this.reset(),this.append(e,t,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,t){return e}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),Math.min(this.displayValue.length,t-e)}extractInput(e,t,r){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),this.displayValue.slice(e,t)}extractTail(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),new y(this.extractInput(e,t),e)}appendTail(e){return s(e)&&(e=new y(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new k({inserted:e,rawInserted:e})):new k}_appendChar(e,t,r){let s;void 0===t&&(t={});let a=this.state;if([e,s]=this.doPrepareChar(e,t),e&&!(s=s.aggregate(this._appendCharRaw(e,t))).rawInserted&&"pad"===this.autofix){let r=this.state;this.state=a;let i=this.pad(t),n=this._appendCharRaw(e,t);i=i.aggregate(n),n.rawInserted||i.equals(s)?s=i:this.state=r}if(s.inserted){let e,i=!1!==this.doValidate(t);if(i&&null!=r){let t=this.state;if(!0===this.overwrite){e=r.state;for(let e=0;e<s.rawInserted.length;++e)r.unshift(this.displayValue.length-s.tailShift)}let a=this.appendTail(r);if(!((i=a.rawInserted.length===r.toString().length)&&a.inserted)&&"shift"===this.overwrite){this.state=t,e=r.state;for(let e=0;e<s.rawInserted.length;++e)r.shift();i=(a=this.appendTail(r)).rawInserted.length===r.toString().length}i&&a.inserted&&(this.state=t)}!i&&(s=new k,this.state=a,r&&e&&(r.state=e))}return s}_appendPlaceholder(){return new k}_appendEager(){return new k}append(e,t,r){let a;if(!s(e))throw Error("value should be string");let i=s(r)?new y(String(r)):r;null!=t&&t.tail&&(t._beforeTailState=this.state),[e,a]=this.doPrepare(e,t);for(let r=0;r<e.length;++r){let s=this._appendChar(e[r],t,i);if(!s.rawInserted&&!this.doSkipInvalid(e[r],t,i))break;a.aggregate(s)}return(!0===this.eager||"append"===this.eager)&&null!=t&&t.input&&e&&a.aggregate(this._appendEager()),null!=i&&(a.tailShift+=this.appendTail(i).tailShift),a}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(t),new k}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;let t=this.rawInputValue,r=this.value,s=e();return this.rawInputValue=t,this.value&&this.value!==r&&0===r.indexOf(this.value)&&(this.append(r.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,s}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;let t=this.state,r=e(this);return this.state=t,delete this._isolated,r}doSkipInvalid(e,t,r){return!!this.skipInvalid}doPrepare(e,t){return void 0===t&&(t={}),k.normalize(this.prepare?this.prepare(e,this,t):e)}doPrepareChar(e,t){return void 0===t&&(t={}),k.normalize(this.prepareChar?this.prepareChar(e,this,t):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,t,r,s,a){let n;void 0===r&&(r=""),void 0===s&&(s=i.NONE),void 0===a&&(a={input:!0});let u=e+t,l=this.extractTail(u),o=!0===this.eager||"remove"===this.eager;o&&(s=function(e){switch(e){case i.LEFT:return i.FORCE_LEFT;case i.RIGHT:return i.FORCE_RIGHT;default:return e}}(s),n=this.extractInput(0,u,{raw:!0}));let h=e,d=new k;if(s!==i.NONE&&(d.tailShift=(h=this.nearestInputPos(e,t>1&&0!==e&&!o?i.NONE:s))-e),d.aggregate(this.remove(h)),o&&s!==i.NONE&&n===this.rawInputValue)if(s===i.FORCE_LEFT){let e;for(;n===this.rawInputValue&&(e=this.displayValue.length);)d.aggregate(new k({tailShift:-1})).aggregate(this.remove(e-1))}else s===i.FORCE_RIGHT&&l.unshift();return d.aggregate(this.append(r,a,l))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!u(this,e)}
1typedValueEquals(e){let t=this.typedValue;return e===t||b.EMPTY_VALUES.includes(e)&&b.EMPTY_VALUES.includes(t)||!!this.format&&this.format(e,this)===this.format(this.typedValue,this)}pad(e){return new k}}b.DEFAULTS={skipInvalid:!0},b.EMPTY_VALUES=[void 0,null,""],o.Masked=b;class x{constructor(e,t){void 0===e&&(e=[]),void 0===t&&(t=0),this.chunks=e,this.from=t}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=s(e)?new y(String(e)):e;let t=this.chunks[this.chunks.length-1],r=t&&(t.stop===e.stop||null==e.stop)&&e.from===t.from+t.toString().length;if(e instanceof y)r?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof x){if(null==e.stop){let t;for(;e.chunks.length&&null==e.chunks[0].stop;)t=e.chunks.shift(),t.from+=e.from,this.extend(t)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof o.MaskedPattern))return new y(this.toString()).appendTo(e);let t=new k;for(let r=0;r<this.chunks.length;++r){let s,a=this.chunks[r],i=e._mapPosToBlock(e.displayValue.length),n=a.stop;if(null!=n&&(!i||i.index<=n)&&((a instanceof x||e._stops.indexOf(n)>=0)&&t.aggregate(e._appendPlaceholder(n)),s=a instanceof x&&e._blocks[n]),s){let r=s.appendTail(a);t.aggregate(r);let i=a.toString().slice(r.rawInserted.length);i&&t.aggregate(e.append(i,{tail:!0}))}else t.aggregate(e.append(a.toString(),{tail:!0}))}return t}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){let{chunks:t,...r}=e;Object.assign(this,r),this.chunks=t.map(e=>{let t="chunks"in e?new x:new y;return t.state=e,t})}unshift(e){if(!this.chunks.length||null!=e&&this.from>=e)return"";let t=null!=e?e-this.from:e,r=0;for(;r<this.chunks.length;){let e=this.chunks[r],s=e.unshift(t);if(e.toString()){if(!s)break;++r}else this.chunks.splice(r,1);if(s)return s}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){let t=this.chunks[e],r=t.shift();if(t.toString()){if(!r)break;--e}else this.chunks.splice(e,1);if(r)return r}return""}}class A{constructor(e,t){this.masked=e,this._log=[];let{offset:r,index:s}=e._mapPosToBlock(t)||(t<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=r,this.index=s,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){let e=this._log.pop();return e&&(this.state=e),e}bindBlock(){!this.block&&(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=(null==(t=this.block)?void 0:t.displayValue.length)||0){var t;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!this.block.isFixed&&this.block.value&&(this.offset=this.block.nearestInputPos(this.offset,i.FORCE_LEFT),0!==this.offset))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,i.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!this.block.isFixed&&(!this.block.isOptional||this.block.value))return this.offset=this.block.nearestInputPos(this.offset,i.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!this.block.isFixed&&this.block.value&&(this.offset=this.block.nearestInputPos(this.offset,i.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,i.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!this.block.isFixed&&(!this.block.isOptional||this.block.value))return this.offset=this.block.nearestInputPos(this.offset,i.NONE),!0})}}class E{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(t),this._value||(this._isRawInput=!1),new k}nearestInputPos(e,t){void 0===t&&(t=i.NONE);let r=this._value.length;switch(t){case i.LEFT:case i.FORCE_LEFT:return 0;case i.NONE:case i.RIGHT:case i.FORCE_RIGHT:default:return r}}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),this._isRawInput?t-e:0}extractInput(e,t,r){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),void 0===r&&(r={}),r.raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,t){if(void 0===t&&(t={}),this.isFilled)return new k;let r=!0===this.eager||"append"===this.eager,s=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!r)&&!t.tail,a=new k({inserted:this.char,rawInserted:s?this.char:""});return this._value=this.char,this._isRawInput=s&&(t.raw||t.input),a}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){let e=new k;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new y("")}appendTail(e){return s(e)&&(e=new y(String(e))),e.appendTo(this)}append(e,t,r){let s=this._appendChar(e[0],t);return null!=r&&(s.tailShift+=this.appendTail(r).tailShift),s}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}
1pad(e){return this._appendPlaceholder()}}class C{constructor(e){let{parent:t,isOptional:r,placeholderChar:s,displayChar:a,lazy:i,eager:n,...u}=e;this.masked=c(u),Object.assign(this,{parent:t,isOptional:r,placeholderChar:s,displayChar:a,lazy:i,eager:n})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,t){return(void 0===e&&(e=0),void 0===t&&(t=this.value.length),0===e&&t>=1)?(this.isFilled=!1,this.masked.remove(e,t)):new k}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,t){if(void 0===t&&(t={}),this.isFilled)return new k;let r=this.masked.state,s=this.masked._appendChar(e,this.currentMaskFlags(t));return s.inserted&&!1===this.doValidate(t)&&(s=new k,this.masked.state=r),s.inserted||this.isOptional||this.lazy||t.input||(s.inserted=this.placeholderChar),s.skip=!s.inserted&&!this.isOptional,this.isFilled=!!s.inserted,s}append(e,t,r){return this.masked.append(e,this.currentMaskFlags(t),r)}_appendPlaceholder(){return this.isFilled||this.isOptional?new k:(this.isFilled=!0,new k({inserted:this.placeholderChar}))}_appendEager(){return new k}extractTail(e,t){return this.masked.extractTail(e,t)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,t,r){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),this.masked.extractInput(e,t,r)}nearestInputPos(e,t){void 0===t&&(t=i.NONE);let r=this.value.length,s=Math.min(Math.max(e,0),r);switch(t){case i.LEFT:case i.FORCE_LEFT:return this.isComplete?s:0;case i.RIGHT:case i.FORCE_RIGHT:return this.isComplete?s:r;case i.NONE:default:return s}}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),this.value.slice(e,t).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var t;return{...e,_beforeTailState:(null==e||null==(t=e._beforeTailState)?void 0:t.masked)||(null==e?void 0:e._beforeTailState)}}pad(e){return new k}}C.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\u
10EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class F extends b{updateOptions(e){super.updateOptions(e)}_update(e){let t=e.mask;t&&(e.validate=e=>e.search(t)>=0),super._update(e)}}o.MaskedRegExp=F;class S extends b{constructor(e){super({...S.DEFAULTS,...e,definitions:Object.assign({},C.DEFAULT_DEFINITIONS,null==e?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){let e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};let t=this.mask;if(!t||!e)return;let r=!1,s=!1;for(let a=0;a<t.length;++a){if(this.blocks){let e=t.slice(a),r=Object.keys(this.blocks).filter(t=>0===e.indexOf(t));r.sort((e,t)=>t.length-e.length);let s=r[0];if(s){let{expose:e,repeat:t,...r}=d(this.blocks[s]),i={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...r,repeat:t,parent:this},n=null!=t?new o.RepeatBlock(i):c(i);n&&(this._blocks.push(n),e&&(this.exposeBlock=n),this._maskedBlocks[s]||(this._maskedBlocks[s]=[]),this._maskedBlocks[s].push(this._blocks.length-1)),a+=s.length-1;continue}}let i=t[a],n=i in e;if(i===S.STOP_CHAR){this._stops.push(this._blocks.length);continue}if("{"===i||"}"===i){r=!r;continue}if("["===i||"]"===i){s=!s;continue}if(i===S.ESCAPE_CHAR){if(!(i=t[++a]))break;n=!1}let u=n?new C({isOptional:s,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...d(e[i]),parent:this}):new E({char:i,eager:this.eager,isUnmasking:r});this._blocks.push(u)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e)return void this.reset();let{_blocks:t,...r}=e;this._blocks.forEach((e,r)=>e.state=t[r]),super.state=r}
1reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,t)=>e+=t.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){let t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(t),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,t)=>e+=t.value,"")}set value(e){if(this.exposeBlock){let t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(t),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){let t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(t),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,t)=>e+=t.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;let t=new k,r=null==(e=this._mapPosToBlock(this.displayValue.length))?void 0:e.index;if(null==r)return t;this._blocks[r].isFilled&&++r;for(let e=r;e<this._blocks.length;++e){let r=this._blocks[e]._appendEager();if(!r.inserted)break;t.aggregate(r)}return t}_appendCharRaw(e,t){void 0===t&&(t={});let r=this._mapPosToBlock(this.displayValue.length),s=new k;if(!r)return s;for(let i=r.index,n;n=this._blocks[i];++i){var a;let r=n._appendChar(e,{...t,_beforeTailState:null==(a=t._beforeTailState)||null==(a=a._blocks)?void 0:a[i]});if(s.aggregate(r),r.consumed)break}return s}extractTail(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);let r=new x;return e===t||this._forEachBlocksInRange(e,t,(e,t,s,a)=>{let i=e.extractTail(s,a);i.stop=this._findStopBefore(t),i.from=this._blockStartPos(t),i instanceof x&&(i.blockIndex=t),r.extend(i)}),r}extractInput(e,t,r){if(void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),void 0===r&&(r={}),e===t)return"";let s="";return this._forEachBlocksInRange(e,t,(e,t,a,i)=>{s+=e.extractInput(a,i,r)}),s}_findStopBefore(e){let t;for(let r=0;r<this._stops.length;++r){let s=this._stops[r];if(s<=e)t=s;else break}return t}_appendPlaceholder(e){let t=new k;if(this.lazy&&null==e)return t;let r=this._mapPosToBlock(this.displayValue.length);if(!r)return t;let s=r.index,a=null!=e?e:this._blocks.length;return this._blocks.slice(s,a).forEach(r=>{if(!r.lazy||null!=e){var s;t.aggregate(r._appendPlaceholder(null==(s=r._blocks)?void 0:s.length))}}),t}_mapPosToBlock(e){let t="";for(let r=0;r<this._blocks.length;++r){let s=this._blocks[r],a=t.length;if(e<=(t+=s.displayValue).length)return{index:r,offset:e-a}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((e,t)=>e+=t.displayValue.length,0)}_forEachBlocksInRange(e,t,r){void 0===t&&(t=this.displayValue.length);let s=this._mapPosToBlock(e);if(s){let e=this._mapPosToBlock(t),a=e&&s.index===e.index,i=s.offset,n=e&&a?e.offset:this._blocks[s.index].displayValue.length;if(r(this._blocks[s.index],s.index,i,n),e&&!a){for(let t=s.index+1;t<e.index;++t)r(this._blocks[t],t,0,this._blocks[t].displayValue.length);r(this._blocks[e.index],e.index,0,e.offset)}}}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);let r=super.remove(e,t);return this._forEachBlocksInRange(e,t,(e,t,s,a)=>{r.aggregate(e.remove(s,a))}),r}nearestInputPos(e,t){if(void 0===t&&(t=i.NONE),!this._blocks.length)return 0;let r=new A(this,e);if(t===i.NONE)return r.pushRightBeforeInput()||(r.popState(),r.pushLeftBeforeInput())?r.pos:this.displayValue.length;if(t===i.LEFT||t===i.FORCE_LEFT){if(t===i.LEFT){if(r.pushRightBeforeFilled(),r.ok&&r.pos===e)return e;r.popState()}if(r.pushLeftBeforeInput(),r.pushLeftBeforeRequired(),r.pushLeftBeforeFilled(),t===i.LEFT){if(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.ok&&r.pos<=e||(r.popState(),r.ok&&r.pos<=e))return r.pos;r.popState()}return r.ok?r.pos:t===i.FORCE_LEFT?0:(r.popState(),r.ok||(r.popState(),r.ok))?r.pos:0}return t===i.RIGHT||t===i.FORCE_RIGHT?(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.pushRightBeforeFilled())?r.pos:t===i.FORCE_RIGHT?this.displayValue.length:(r.popState(),r.ok||(r.popState(),r.ok))?r.pos:this.nearestInputPos(e,i.LEFT):e}totalInputPositions(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);let r=0;
1return this._forEachBlocksInRange(e,t,(e,t,s,a)=>{r+=e.totalInputPositions(s,a)}),r}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){let t=this._maskedBlocks[e];return t?t.map(e=>this._blocks[e]):[]}pad(e){let t=new k;return this._forEachBlocksInRange(0,this.displayValue.length,r=>t.aggregate(r.pad(e))),t}}S.DEFAULTS={...b.DEFAULTS,lazy:!0,placeholderChar:"_"},S.STOP_CHAR="`",S.ESCAPE_CHAR="\\",S.InputDefinition=C,S.FixedDefinition=E,o.MaskedPattern=S;class V extends S{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){let{to:t=this.to||0,from:r=this.from||0,maxLength:s=this.maxLength||0,autofix:a=this.autofix,...i}=e;this.to=t,this.from=r,this.maxLength=Math.max(String(t).length,s),this.autofix=a;let n=String(this.from).padStart(this.maxLength,"0"),u=String(this.to).padStart(this.maxLength,"0"),l=0;for(;l<u.length&&u[l]===n[l];)++l;i.mask=u.slice(0,l).replace(/0/g,"\\0")+"0".repeat(this.maxLength-l),super._update(i)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let t="",r="",[,s,a]=e.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(t="0".repeat(s.length)+a,r="9".repeat(s.length)+a),[t=t.padEnd(this.maxLength,"0"),r=r.padEnd(this.maxLength,"9")]}doPrepareChar(e,t){let r;return void 0===t&&(t={}),[e,r]=super.doPrepareChar(e.replace(/\D/g,""),t),e||(r.skip=!this.isComplete),[e,r]}_appendCharRaw(e,t){if(void 0===t&&(t={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,t);let r=String(this.from).padStart(this.maxLength,"0"),s=String(this.to).padStart(this.maxLength,"0"),[a,i]=this.boundaries(this.value+e);return Number(i)<this.from?super._appendCharRaw(r[this.value.length],t):Number(a)>this.to?!t.tail&&"pad"===this.autofix&&this.value.length+1<this.maxLength?super._appendCharRaw(r[this.value.length],t).aggregate(this._appendCharRaw(e,t)):super._appendCharRaw(s[this.value.length],t):super._appendCharRaw(e,t)}doValidate(e){let t=this.value;if(-1===t.search(/[^0]/)&&t.length<=this._matchFrom)return!0;let[r,s]=this.boundaries(t);return this.from<=Number(s)&&Number(r)<=this.to&&super.doValidate(e)}pad(e){let t=new k;if(this.value.length===this.maxLength)return t;let r=this.value,s=this.maxLength-this.value.length;if(s){this.reset();for(let r=0;r<s;++r)t.aggregate(super._appendCharRaw("0",e));r.split("").forEach(e=>this._appendCharRaw(e))}return t}}o.MaskedRange=V;class w extends S{static extractPatternOptions(e){let{mask:t,pattern:r,...a}=e;return{...a,mask:s(t)?t:r}}constructor(e){super(w.extractPatternOptions({...w.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){let{mask:t,pattern:r,blocks:a,...i}={...w.DEFAULTS,...e},n=Object.assign({},w.GET_DEFAULT_BLOCKS());e.min&&(n.Y.from=e.min.getFullYear()),e.max&&(n.Y.to=e.max.getFullYear()),e.min&&e.max&&n.Y.from===n.Y.to&&(n.m.from=e.min.getMonth()+1,n.m.to=e.max.getMonth()+1,n.m.from===n.m.to&&(n.d.from=e.min.getDate(),n.d.to=e.max.getDate())),Object.assign(n,this.blocks,a),super._update({...i,mask:s(t)?t:r,blocks:n})}doValidate(e){let t=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&null!=t&&(null==this.min||this.min<=t)&&(null==this.max||t<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(w.extractPatternOptions(e))}}w.GET_DEFAULT_BLOCKS=()=>({d:{mask:V,from:1,to:31,maxLength:2},m:{mask:V,from:1,to:12,maxLength:2},Y:{mask:V,from:1900,to:9999}}),w.DEFAULTS={...S.DEFAULTS,mask:Date,pattern:"d{.}`m{.}`Y",format:(e,t)=>{if(!e)return"";let r=String(e.getDate()).padStart(2,"0");return[r,String(e.getMonth()+1).padStart(2,"0"),e.getFullYear()].join(".")},parse:(e,t)=>{let[r,s,a]=e.split(".").map(Number);return new Date(a,s-1,r)}},o.MaskedDate=w;class D extends b{constructor(e){super({...D.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(e=>{let{expose:t,...r}=d(e),s=c({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...r});return t&&(this.exposeMask=s),s}):[])}_appendCharRaw(e,t){void 0===t&&(t={});let r=this._applyDispatch(e,t);return this.currentMask&&r.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),r}_applyDispatch(e,t,r){void 0===e&&(e=""),void 0===t&&(t={}),void 0===r&&(r="");let s=t.tail&&null!=t._beforeTailState?t._beforeTailState._value:this.value,a=this.rawInputValue,i=t.tail&&null!=t._beforeTailState?t._beforeTailState._rawInputValue:a,n=a.slice(i.length),u=this.currentMask,l=new k,o=null==u?void 0:u.state;
1return this.currentMask=this.doDispatch(e,{...t},r),this.currentMask&&(this.currentMask!==u?(this.currentMask.reset(),i&&(this.currentMask.append(i,{raw:!0}),l.tailShift=this.currentMask.value.length-s.length),n&&(l.tailShift+=this.currentMask.append(n,{raw:!0,tail:!0}).tailShift)):o&&(this.currentMask.state=o)),l}_appendPlaceholder(){let e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){let e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){let t=new k;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var t,r;return{...e,_beforeTailState:(null==(t=e._beforeTailState)?void 0:t.currentMaskRef)===this.currentMask&&(null==(r=e._beforeTailState)?void 0:r.currentMask)||e._beforeTailState}}doDispatch(e,t,r){return void 0===t&&(t={}),void 0===r&&(r=""),this.dispatch(e,this,t,r)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,t){void 0===t&&(t={});let[r,s]=super.doPrepare(e,t);if(this.currentMask){let e;[r,e]=super.doPrepare(r,this.currentMaskFlags(t)),s=s.aggregate(e)}return[r,s]}doPrepareChar(e,t){void 0===t&&(t={});let[r,s]=super.doPrepareChar(e,t);if(this.currentMask){let e;[r,e]=super.doPrepareChar(r,this.currentMaskFlags(t)),s=s.aggregate(e)}return[r,s]}reset(){var e;null==(e=this.currentMask)||e.reset(),this.compiledMasks.forEach(e=>e.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let t=String(e);this.currentMask&&(this.currentMask.typedValue=e,t=this.currentMask.unmaskedValue),this.unmaskedValue=t}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!(null==(e=this.currentMask)?void 0:e.isComplete)}get isFilled(){var e;return!!(null==(e=this.currentMask)?void 0:e.isFilled)}remove(e,t){let r=new k;return this.currentMask&&r.aggregate(this.currentMask.remove(e,t)).aggregate(this._applyDispatch()),r}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(e=>e.state),currentMaskRef:this.currentMask,currentMask:null==(e=this.currentMask)?void 0:e.state}}set state(e){let{compiledMasks:t,currentMaskRef:r,currentMask:s,...a}=e;t&&this.compiledMasks.forEach((e,r)=>e.state=t[r]),null!=r&&(this.currentMask=r,this.currentMask.state=s),super.state=a}extractInput(e,t,r){return this.currentMask?this.currentMask.extractInput(e,t,r):""}extractTail(e,t){return this.currentMask?this.currentMask.extractTail(e,t):super.extractTail(e,t)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,t){return this.currentMask?this.currentMask.nearestInputPos(e,t):super.nearestInputPos(e,t)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((t,r)=>{if(!e[r])return;let{mask:s,...a}=e[r];return u(t,a)&&t.maskEquals(s)}):super.maskEquals(e)}typedValueEquals(e){var t;return!!(null==(t=this.currentMask)?void 0:t.typedValueEquals(e))}}D.DEFAULTS={...b.DEFAULTS,dispatch:(e,t,r,s)=>{if(!t.compiledMasks.length)return;let a=t.rawInputValue,n=t.compiledMasks.map((n,u)=>{let l=t.currentMask===n,o=l?n.displayValue.length:n.nearestInputPos(n.displayValue.length,i.FORCE_LEFT);return n.rawInputValue!==a?(n.reset(),n.append(a,{raw:!0})):l||n.remove(o),n.append(e,t.currentMaskFlags(r)),n.appendTail(s),{index:u,weight:n.rawInputValue.length,totalInputPositions:n.totalInputPositions(0,Math.max(o,n.nearestInputPos(n.displayValue.length,i.FORCE_LEFT)))}});return n.sort((e,t)=>
1t.weight-e.weight||t.totalInputPositions-e.totalInputPositions),t.compiledMasks[n[0].index]}},o.MaskedDynamic=D;class T extends S{constructor(e){super({...T.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){let{enum:t,...r}=e;if(t){let e=t.map(e=>e.length),s=Math.min(...e),a=Math.max(...e)-s;r.mask="*".repeat(s),a&&(r.mask+="["+"*".repeat(a)+"]"),this.enum=t}super._update(r)}_appendCharRaw(e,t){void 0===t&&(t={});let r=Math.min(this.nearestInputPos(0,i.FORCE_RIGHT),this.value.length),s=this.enum.filter(t=>this.matchValue(t,this.unmaskedValue+e,r));if(s.length){1===s.length&&this._forEachBlocksInRange(0,this.value.length,(e,r)=>{let a=s[0][r];r>=this.value.length||a===e.value||(e.reset(),e._appendChar(a,t))});let e=super._appendCharRaw(s[0][this.value.length],t);return 1===s.length&&s[0].slice(this.unmaskedValue.length).split("").forEach(t=>e.aggregate(super._appendCharRaw(t))),e}return new k({skip:!this.isComplete})}extractTail(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),new y("",e)}remove(e,t){let r;if(void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),e===t)return new k;let s=Math.min(super.nearestInputPos(0,i.FORCE_RIGHT),this.value.length);for(r=e;r>=0&&!(this.enum.filter(e=>this.matchValue(e,this.value.slice(s,r),s)).length>1);--r);let a=super.remove(r,t);return a.tailShift+=r-e,a}get isComplete(){return this.enum.indexOf(this.value)>=0}}T.DEFAULTS={...S.DEFAULTS,matchValue:(e,t,r)=>e.indexOf(t,r)===r},o.MaskedEnum=T;class B extends b{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}o.MaskedFunction=B;class M extends b{constructor(e){super({...M.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){let e="^"+(this.allowNegative?"[+|\\-]?":""),t=(this.scale?"("+n(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=RegExp(e+"\\d*"+t),this._mapToRadixRegExp=RegExp("["+this.mapToRadix.map(n).join("")+"]","g"),this._thousandsSeparatorRegExp=RegExp(n(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){let t=e.split(this.radix);return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),t.join(this.radix)}doPrepareChar(e,t){void 0===t&&(t={});let[r,s]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),t);return e&&!r&&(s.skip=!0),!r||this.allowPositive||this.value||"-"===r||s.aggregate(this._appendChar("-")),[r,s]}_separatorsCount(e,t){void 0===t&&(t=!1);let r=0;for(let s=0;s<e;++s)this._value.indexOf(this.thousandsSeparator,s)===s&&(++r,t&&(e+=this.thousandsSeparator.length));return r}_separatorsCountFromSlice(e){return void 0===e&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,t,r){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t),this._removeThousandsSeparators(super.extractInput(e,t,r))}_appendCharRaw(e,t){let r;void 0===t&&(t={});let s=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,a=this._separatorsCountFromSlice(s);this._value=this._removeThousandsSeparators(this.value);let i=this._value;this._value+=e;let n=!isNaN(this.number),u=!1;if(n){let e;null!=this.min&&this.min<0&&this.number<this.min&&(e=this.min),null!=this.max&&this.max>0&&this.number>this.max&&(e=this.max),null!=e&&(this.autofix?(this._value=this.format(e,this).replace(M.UNMASKED_RADIX,this.radix),u||(u=i===this._value&&!t.tail)):n=!1),n&&(n=!!this._value.match(this._numberRegExp))}n?r=new k({inserted:this._value.slice(i.length),rawInserted:u?"":e,skip:u}):(this._value=i,r=new k),this._value=this._insertThousandsSeparators(this._value);let l=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,o=this._separatorsCountFromSlice(l);return r.tailShift+=(o-a)*this.thousandsSeparator.length,r}_findSeparatorAround(e){if(this.thousandsSeparator){let t=e-this.thousandsSeparator.length+1,r=this.value.indexOf(this.thousandsSeparator,t);if(r<=e)return r}return -1}_adjustRangeWithSeparators(e,t){let r=this._findSeparatorAround(e);r>=0&&(e=r);let s=this._findSeparatorAround(t);return s>=0&&(t=s+this.thousandsSeparator.length),[e,t]}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t);let r=this.value.slice(0,e),s=this.value.slice(t),a=this._separatorsCount(r.length);return this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(r+s)),new k({tailShift:(this._separatorsCountFromSlice(r)-a)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case i.NONE:case i.LEFT:case i.FORCE_LEFT:{let r=this._findSeparatorAround(e-1);if(r>=0){let s=r+this.thousandsSeparator.length;if(e<s||this.value.length<=s||t===i.FORCE_LEFT)return r}break}case i.RIGHT:case i.FORCE_RIGHT:{let t=this._findSeparatorAround(e);if(t>=0)return t+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){let e=this.number,t=e;null!=this.min&&(t=Math.max(t,this.min)),null!=this.max&&(t=Math.min(t,this.max)),t!==e&&(this.unmaskedValue=this.format(t,this));let r=this.value;this.normalizeZeros&&(r=this._normalizeZeros(r)),this.padFractionalZeros&&this.scale>0&&(r=this._padFractionalZeros(r)),this._value=r}super.doCommit()}_normalizeZeros(e){let t=this._removeThousandsSeparators(e).split(this.radix);return t[0]=t[0].replace(/^(\D*)(0*)(\d*)/,(e,t,r,s)=>t+s),e.length&&!/\d$/.test(t[0])&&(t[0]=t[0]+"0"),t.length>1&&(t[1]=t[1].replace(/0*$/,""),t[1].length||(t.length=1)),this._insertThousandsSeparators(t.join(this.radix))}_padFractionalZeros(e){if(!e)return e;let t=e.split(this.radix);return t.length<2&&t.push(""),t[1]=t[1].padEnd(this.scale,"0"),t.join(this.radix)}doSkipInvalid(e,t,r){void 0===t&&(t={});let s=0===this.scale&&e!==this.thousandsSeparator&&(e===this.radix||e===M.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,t,r)&&!s}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,M.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(M.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return null!=this.min&&this.min<0||null!=this.max&&this.max<0}get allowPositive(){return null!=this.min&&this.min>0||null!=this.max&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||M.EMPTY_VALUES.includes(e)&&M.EMPTY_VALUES.includes(this.typedValue))&&(0!==e||""!==this.value)}}M.UNMASKED_RADIX=".",M.EMPTY_VALUES=[...b.EMPTY_VALUES,0],M.DEFAULTS={...b.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[M.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:e=>
1e.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},o.MaskedNumber=M;let R={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function I(e,t,r){void 0===t&&(t=R.MASKED),void 0===r&&(r=R.MASKED);let s=c(e);return e=>s.runIsolated(s=>(s[t]=e,s[r]))}o.PIPE_TYPE=R,o.createPipe=I,o.pipe=function(e,t,r,s){return I(t,r,s)(e)};class O extends S{get repeatFrom(){var e;return null!=(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)?e:0}get repeatTo(){var e;return null!=(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var t,r,s;let{repeat:a,...i}=d(e);this._blockOpts=Object.assign({},this._blockOpts,i);let n=c(this._blockOpts);this.repeat=null!=(t=null!=(r=null!=a?a:n.repeat)?r:this.repeat)?t:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&(null==(s=this._blocks)?void 0:s.length)||0,this.repeatFrom)),blocks:{m:n},eager:n.eager,overwrite:n.overwrite,skipInvalid:n.skipInvalid,lazy:n.lazy,placeholderChar:n.placeholderChar,displayChar:n.displayChar})}_allocateBlock(e){return e<this._blocks.length?this._blocks[e]:this.repeatTo===1/0||this._blocks.length<this.repeatTo?(this._blocks.push(c(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]):void 0}_appendCharRaw(e,t){void 0===t&&(t={});let r=new k;for(let u=null!=(s=null==(a=this._mapPosToBlock(this.displayValue.length))?void 0:a.index)?s:Math.max(this._blocks.length-1,0),l,o;l=null!=(i=this._blocks[u])?i:o=!o&&this._allocateBlock(u);++u){var s,a,i,n;let h=l._appendChar(e,{...t,_beforeTailState:null==(n=t._beforeTailState)||null==(n=n._blocks)?void 0:n[u]});if(h.skip&&o){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(r.aggregate(h),h.consumed)break}return r}_trimEmptyTail(e,t){var r,s;let a;void 0===e&&(e=0);let i=Math.max((null==(r=this._mapPosToBlock(e))?void 0:r.index)||0,this.repeatFrom,0);null!=t&&(a=null==(s=this._mapPosToBlock(t))?void 0:s.index),null==a&&(a=this._blocks.length-1);let n=0;for(let e=a;i<=e&&!this._blocks[e].unmaskedValue;--e,++n);n&&(this._blocks.splice(a-n+1,n),this.mask=this.mask.slice(n))}reset(){super.reset(),this._trimEmptyTail()}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);let r=super.remove(e,t);return this._trimEmptyTail(e,t),r}totalInputPositions(e,t){return(void 0===e&&(e=0),null==t&&this.repeatTo===1/0)?1/0:super.totalInputPositions(e,t)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}}o.RepeatBlock=O;try{globalThis.IMask=o}catch{}var P=r(53239),L=r(77117);let N={mask:L.oneOfType([L.array,L.func,L.string,L.instanceOf(RegExp),L.oneOf([Date,Number,o.Masked]),L.instanceOf(o.Masked)]),value:L.any,unmask:L.oneOfType([L.bool,L.oneOf(["typed"])]),prepare:L.func,prepareChar:L.func,validate:L.func,commit:L.func,overwrite:L.oneOfType([L.bool,L.oneOf(["shift"])]),eager:L.oneOfType([L.bool,L.oneOf(["append","remove"])]),skipInvalid:L.bool,onAccept:L.func,onComplete:L.func,placeholderChar:L.string,displayChar:L.string,lazy:L.bool,definitions:L.object,blocks:L.object,enum:L.arrayOf(L.string),maxLength:L.number,from:L.number,to:L.number,pattern:L.string,format:L.func,parse:L.func,autofix:L.oneOfType([L.bool,L.oneOf(["pad"])]),radix:L.string,thousandsSeparator:L.string,mapToRadix:L.arrayOf(L.string),scale:L.number,normalizeZeros:L.bool,padFractionalZeros:L.bool,min:L.oneOfType([L.number,L.instanceOf(Date)]),max:L.oneOfType([L.number,L.instanceOf(Date)]),dispatch:L.func,inputRef:L.oneOfType([L.func,L.shape({current:L.object})])},j=Object.keys(N).filter(e=>"value"!==e),U=["value","unmask","onAccept","onComplete","inputRef"],$=j.filter(e=>0>U.indexOf(e)),z=function(e){var t;let r=((t=class extends P.Component{constructor(e){super(e),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){let e=this.props,t=this._extractMaskOptionsFromProps(e);if(t.mask)this.maskRef?(this.maskRef.updateOptions(t),"value"in e&&void 0!==e.value&&(this.maskValue=e.value)):this.initMask(t);else if(this.destroyMask(),"value"in e&&void 0!==e.value){var r;null!=(r=this.element)&&r.isContentEditable&&"INPUT"!==this.element.tagName&&"TEXTAREA"!==this.element.tagName?this.element.textContent=e.value:this.element.value=e.value}}componentWillUnmount(){this.destroyMask()}_inputRef(e){this.element=e,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=e:this.props.inputRef(e))}initMask(e){void 0===e&&(e=this._extractMaskOptionsFromProps(this.props)),this.maskRef=o(this.element,e).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&void 0!==this.props.value&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(e){let{...t}=e;return Object.keys(t).filter(e=>0>
1$.indexOf(e)).forEach(e=>{delete t[e]}),t}_extractNonMaskProps(e){let{...t}=e;return j.forEach(e=>{"maxLength"!==e&&delete t[e]}),"defaultValue"in t||(t.defaultValue=e.mask?"":t.value),delete t.value,t}get maskValue(){return this.maskRef?"typed"===this.props.unmask?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(e){this.maskRef&&(e=null==e&&"typed"!==this.props.unmask?"":e,"typed"===this.props.unmask?this.maskRef.typedValue=e:this.props.unmask?this.maskRef.unmaskedValue=e:this.maskRef.value=e)}_onAccept(e){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,e)}_onComplete(e){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,e)}render(){return P.createElement(e,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}}).displayName=void 0,t.propTypes=void 0,t);return r.displayName="IMask("+(e.displayName||e.name||"Component")+")",r.propTypes=N,P.forwardRef((e,t)=>P.createElement(r,{...e,ref:t}))}(e=>{let{inputRef:t,...r}=e;return P.createElement("input",{...r,ref:t})});function H(e,t){let{onAccept:r,onComplete:s,ref:a=(0,P.useRef)(null),defaultValue:i,defaultUnmaskedValue:n,defaultTypedValue:u}=void 0===t?{}:t,l=(0,P.useRef)(null),[h,d]=(0,P.useState)({}),[c,p]=(0,P.useState)(""),[f,g]=(0,P.useState)(""),[m,v]=(0,P.useState)(),_=(0,P.useCallback)(()=>{var e;null==(e=l.current)||e.destroy(),l.current=null},[]),k=(0,P.useCallback)(()=>{let e=l.current;e&&(d({value:e.value,unmaskedValue:e.unmaskedValue,typedValue:e.typedValue}),v(e.typedValue),g(e.unmaskedValue),p(e.value))},[]),y=(0,P.useCallback)(e=>{let t=l.current;t&&(k(),null==r||r(t.value,t,e))},[r]),b=(0,P.useCallback)(e=>l.current&&(null==s?void 0:s(l.current.value,l.current,e)),[s]);return(0,P.useEffect)(()=>{let{value:e,...t}=h,r=l.current;r&&void 0!==c&&(e!==c&&(r.value=c,r.value!==c&&y()),d(t))},[c]),(0,P.useEffect)(()=>{let{unmaskedValue:e,...t}=h,r=l.current;r&&void 0!==f&&(e!==f&&(r.unmaskedValue=f,r.unmaskedValue!==f&&y()),d(t))},[f]),(0,P.useEffect)(()=>{let{typedValue:e,...t}=h,r=l.current;r&&void 0!==m&&(e!==m&&(r.typedValue=m,r.masked.typedValueEquals(m)||y()),d(t))},[m]),(0,P.useEffect)(()=>{let t=a.current;if(!t||!(null!=e&&e.mask))return _();let r=l.current;r?null==r||r.updateOptions(e):t&&null!=e&&e.mask&&(l.current=o(t,e),k(),void 0!==i&&p(i),void 0!==n&&g(n),void 0!==u&&v(u))},[e,_,y]),(0,P.useEffect)(()=>{if(!l.current)return;let e=l.current;return e.on("accept",y),e.on("complete",b),()=>{e.off("accept",y),e.off("complete",b)}},[y,b]),(0,P.useEffect)(()=>_,[_]),{ref:a,maskRef:l,value:c,setValue:p,unmaskedValue:f,setUnmaskedValue:g,typedValue:m,setTypedValue:v}}P.forwardRef((e,t)=>P.createElement(z,{...e,ref:t}))},29027:(e,t,r)=>{"use strict";var s=r(34544);function a(){}function i(){}i.resetWarningCache=a,e.exports=function(){function e(e,t,r,a,i,n){if(n!==s){var u=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:a};return r.PropTypes=r,r}},34544:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},37449:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,s.default)(e);for(var r=e.length-1;r>=0;r--)if(-1===t.indexOf(e[r]))return!1;return!0};var s=function(e){return e&&e.__esModule?e:{default:e}}(r(69991));e.exports=t.default,e.exports.default=t.default},38420:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,s.default)(e),(t=(0,a.default)(t,n)).allow_trailing_dot&&"."===e[e.length-1]&&(e=e.substring(0,e.length-1)),!0===t.allow_wildcard&&0===e.indexOf("*.")&&(e=e.substring(2));var r=e.split("."),i=r[r.length-1];return!(t.require_tld&&(r.length<2||!t.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(i)||/\s/.test(i)))&&!(!t.allow_numeric_tld&&/^\d+$/.test(i))&&r.every(function(e){return!(e.length>63&&!t.ignore_max_length||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(e)||/[\uff01-\uff5e]/.test(e)||/^-|-$/.test(e)||!t.allow_underscores&&/_/.test(e))})};var s=i(r(69991)),a=i(r(21184));
1function i(e){return e&&e.__esModule?e:{default:e}}var n={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};e.exports=t.default,e.exports.default=t.default},39421:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,s.default)(e),(t=(0,l.default)(t,h)).require_display_name||t.allow_display_name){var r=e.match(d);if(r){var o,v,_=r[1];if(e=e.replace(_,"").replace(/(^<|>$)/g,""),_.endsWith(" ")&&(_=_.slice(0,-1)),!(!(!(v=(o=_).replace(/^"(.+)"$/,"$1")).trim()||/[\.";<>]/.test(v)&&(v===o||v.split('"').length!==v.split('\\"').length))&&1))return!1}else if(t.require_display_name)return!1}if(!t.ignore_max_length&&e.length>254)return!1;var k=e.split("@"),y=k.pop(),b=y.toLowerCase();if(t.host_blacklist.length>0&&(0,a.default)(b,t.host_blacklist)||t.host_whitelist.length>0&&!(0,a.default)(b,t.host_whitelist))return!1;var x=k.join("@");if(t.domain_specific_validation&&("gmail.com"===b||"googlemail.com"===b)){var A=(x=x.toLowerCase()).split("+")[0];if(!(0,i.default)(A.replace(/\./g,""),{min:6,max:30}))return!1;for(var E=A.split("."),C=0;C<E.length;C++)if(!p.test(E[C]))return!1}if(!1===t.ignore_max_length&&(!(0,i.default)(x,{max:64})||!(0,i.default)(y,{max:254})))return!1;if(!(0,n.default)(y,{require_tld:t.require_tld,ignore_max_length:t.ignore_max_length,allow_underscores:t.allow_underscores})){if(!t.allow_ip_domain)return!1;if(!(0,u.default)(y)){if(!y.startsWith("[")||!y.endsWith("]"))return!1;var F=y.slice(1,-1);if(0===F.length||!(0,u.default)(F))return!1}}if(t.blacklisted_chars&&-1!==x.search(RegExp("[".concat(t.blacklisted_chars,"]+"),"g")))return!1;if('"'===x[0]&&'"'===x[x.length-1])return x=x.slice(1,x.length-1),t.allow_utf8_local_part?m.test(x):f.test(x);for(var S=t.allow_utf8_local_part?g:c,V=x.split("."),w=0;w<V.length;w++)if(!S.test(V[w]))return!1;return!0};var s=o(r(69991)),a=o(r(76282)),i=o(r(82325)),n=o(r(38420)),u=o(r(15946)),l=o(r(21184));function o(e){return e&&e.__esModule?e:{default:e}}var h={allow_display_name:!1,allow_underscores:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blackl
1isted_chars:"",ignore_max_length:!1,host_blacklist:[],host_whitelist:[]},d=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,c=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,p=/^[a-z\d]+$/,f=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,g=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,m=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i;e.exports=t.default,e.exports.default=t.default},44049:e=>{"use strict";e.exports={visa:{niceType:"Visa",type:"visa",patterns:[4],gaps:[4,8,12],lengths:[16,18,19],code:{name:"CVV",size:3}},mastercard:{niceType:"Mastercard",type:"mastercard",patterns:[[51,55],[2221,2229],[223,229],[23,26],[270,271],2720],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}},"american-express":{niceType:"American Express",type:"american-express",patterns:[34,37],gaps:[4,10],lengths:[15],code:{name:"CID",size:4}},"diners-club":{niceType:"Diners Club",type:"diners-club",patterns:[[300,305],36,38,39],gaps:[4,10],lengths:[14,16,19],code:{name:"CVV",size:3}},discover:{niceType:"Discover",type:"discover",patterns:[6011,[644,649],65],gaps:[4,8,12],lengths:[16,19],code:{name:"CID",size:3}},jcb:{niceType:"JCB",type:"jcb",patterns:[2131,1800,[3528,3589]],gaps:[4,8,12],lengths:[16,17,18,19],code:{name:"CVV",size:3}},unionpay:{niceType:"UnionPay",type:"unionpay",patterns:[620,[62100,62182],[62184,62187],[62185,62197],[62200,62205],[622010,622999],622018,[62207,62209],[623,626],6270,6272,6276,[627700,627779],[627781,627799],[6282,6289],6291,6292,810,[8110,8131],[8132,8151],[8152,8163],[8164,8171]],gaps:[4,8,12],lengths:[14,15,16,17,18,19],code:{name:"CVN",size:3}},maestro:{niceType:"Maestro",type:"maestro",patterns:[493698,[5e5,504174],[504176,506698],[506779,508999],[56,59],63,67,6],gaps:[4,8,12],lengths:[12,13,14,15,16,17,18,19],code:{name:"CVC",size:3}},elo:{niceType:"Elo",type:"elo",patterns:[401178,401179,438935,457631,457632,431274,451416,457393,504175,[506699,506778],[509e3,509999],627780,636297,636368,[650031,650033],[650035,650051],[650405,650439],[650485,650538],[650541,650598],[650700,650718],[650720,650727],[650901,650978],[651652,651679],[655e3,655019],[655021,655058]],gaps:[4,8,12],lengths:[16],code:{name:"CVE",size:3}},mir:{niceType:"Mir",type:"mir",patterns:[[2200,2204]],gaps:[4,8,12],lengths:[16,17,18,19],code:{name:"CVP2",size:3}},hiper:{niceType:"Hiper",type:"hiper",patterns:[637095,0x3cc8e4f,0x3cca57e,637568,637599,637609,637612],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}},hipercard:{niceType:"Hipercard",type:"hipercard",patterns:[606282],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}},verve:{niceType:"Verve",type:"verve",patterns:[[506099,506127],506129,[506133,506150],[506158,506163],506166,506168,506170,506173,[506176,506180],506184,[506187,506188],506191,506195,506197,507865,507866,[507868,507877],[507880,507888],507900,507941],gaps:[4,8,12],lengths:[16,18,19],code:{name:"CVV",size:3}}}},50057:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findBestMatch=void 0,t.findBestMatch=function(e){var t;return(t=e.filter(function(e){return e.matchStrength}).length)>0&&t===e.length?e.reduce(function(e,t){return!e||Number(e.matchStrength)<Number(t.matchStrength)?t:e}):null}},53023:(e,t,r)=>{"use strict";r.d(t,{A:()=>x});var s=r(36330),a=r(21287),i=r(53239),n=r(40733),u=function(e,t){if("function"==typeof e)return void e(t);e.current=t},l=function(e,t){var r=i.useRef();return i.useCallback(function(s){e.current=s,r.current&&u(r.current,null),r.current=t,t&&u(t,s)},[t])},o={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},h=function(e){Object.keys(o).forEach(function(t){e.style.setProperty(t,o[t],"important")})},d=null,c=function(e,t){var r=e.scrollHeight;return"border-box"===t.sizingStyle.boxSizing?r+t.borderSize:r-t.paddingSize},p=function(){},f=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],g=!!document.documentElement.currentStyle,m=function(e){var t=window.getComputedStyle(e);
1if(null===t)return null;var r=f.reduce(function(e,r){return e[r]=t[r],e},{}),s=r.boxSizing;if(""===s)return null;g&&"border-box"===s&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var a=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),i=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:a,borderSize:i}};function v(e,t,r){var s=(0,n.A)(r);i.useLayoutEffect(function(){var r=function(e){return s.current(e)};if(e)return e.addEventListener(t,r),function(){return e.removeEventListener(t,r)}},[])}var _=function(e,t){v(document.body,"reset",function(r){e.current.form===r.target&&t(r)})},k=function(e){v(window,"resize",e)},y=function(e){v(document.fonts,"loadingdone",e)},b=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],x=i.forwardRef(function(e,t){var r=e.cacheMeasurements,n=e.maxRows,u=e.minRows,o=e.onChange,f=void 0===o?p:o,g=e.onHeightChange,v=void 0===g?p:g,x=(0,a.A)(e,b),A=void 0!==x.value,E=i.useRef(null),C=l(E,t),F=i.useRef(0),S=i.useRef(),V=function(){var e=E.current,t=r&&S.current?S.current:m(e);if(t){S.current=t;var s,a,i,l,o,p,f,g,_,k,y,b=(s=e.value||e.placeholder||"x",void 0===(a=u)&&(a=1),void 0===(i=n)&&(i=1/0),d||((d=document.createElement("textarea")).setAttribute("tabindex","-1"),d.setAttribute("aria-hidden","true"),h(d)),null===d.parentNode&&document.body.appendChild(d),l=t.paddingSize,o=t.borderSize,f=(p=t.sizingStyle).boxSizing,Object.keys(p).forEach(function(e){d.style[e]=p[e]}),h(d),d.value=s,g=c(d,t),d.value=s,g=c(d,t),d.value="x",k=(_=d.scrollHeight-l)*a,"border-box"===f&&(k=k+l+o),g=Math.max(k,g),y=_*i,"border-box"===f&&(y=y+l+o),[g=Math.min(y,g),_]),x=b[0],A=b[1];F.current!==x&&(F.current=x,e.style.setProperty("height",x+"px","important"),v(x,{rowHeight:A}))}};return i.useLayoutEffect(V),_(E,function(){if(!A){var e=E.current.value;requestAnimationFrame(function(){var t=E.current;t&&e!==t.value&&V()})}}),k(V),y(V),i.createElement("textarea",(0,s.A)({},x,{onChange:function(e){A||V(),f(e)},ref:C}))})},57820:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=function(e,t){return -1!==e.indexOf(t)},e.exports=t.default,e.exports.default=t.default},64701:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addMatchingCardsToResults=void 0;var s=r(12428),a=r(79920);t.addMatchingCardsToResults=function(e,t,r){var i,n;for(i=0;i<t.patterns.length;i++){var u=t.patterns[i];if((0,a.matches)(e,u)){var l=(0,s.clone)(t);n=Array.isArray(u)?String(u[0]).length:String(u).length,e.length>=n&&(l.matchStrength=n),r.push(l);break}}}},76282:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){for(var r=0;r<t.length;r++){var s=t[r];if(e===s||"[object RegExp]"===Object.prototype.toString.call(s)&&s.test(e))return!0}return!1},e.exports=t.default,e.exports.default=t.default},77117:(e,t,r)=>{e.exports=r(29027)()},79920:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.matches=void 0,t.matches=function(e,t){var r,s,a,i,n,u;return Array.isArray(t)?(r=t[0],s=t[1],a=String(r).length,n=parseInt(i=e.substr(0,a),10),r=parseInt(String(r).substr(0,i.length),10),s=parseInt(String(s).substr(0,i.length),10),n>=r&&n<=s):(u=String(u=t)).substring(0,e.length)===e.substring(0,u.length)}},81054:(e,t,r)=>{"use strict";r.d(t,{HG:()=>w});var s,a=r(53239);function i(e,t){var r={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(r[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,s=Object.getOwnPropertySymbols(e);a<s.length;a++)0>t.indexOf(s[a])&&Object.prototype.propertyIsEnumerable.call(e,s[a])&&(r[s[a]]=e[s[a]]);return r}function n(){}function u(e){return!!(e||"").match(/\d/)}function l(e){return null==e}function o(e){return l(e)||"number"==typeof e&&isNaN(e)||"number"==typeof e&&!isFinite(e)}function h(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function d(e,t){void 0===t&&(t=!0);var r="-"===e[0],s=r&&t,a=(e=e.replace("-","")).split(".");
1return{beforeDecimal:a[0],afterDecimal:a[1]||"",hasNegation:r,addNegation:s}}function c(e,t,r){for(var s="",a=r?"0":"",i=0;i<=t-1;i++)s+=e[i]||a;return s}function p(e,t){return Array(t+1).join(e)}function f(e){var t=e+"",r="-"===t[0]?"-":"";r&&(t=t.substring(1));var s=t.split(/[eE]/g),a=s[0],i=s[1];if(!(i=Number(i)))return r+a;a=a.replace(".","");var n=1+i,u=a.length;return n<0?a="0."+p("0",Math.abs(n))+a:n>=u?a+=p("0",n-u):a=(a.substring(0,n)||"0")+"."+a.substring(n),r+a}function g(e,t,r){if(-1!==["","-"].indexOf(e))return e;var s=(-1!==e.indexOf(".")||r)&&t,a=d(e),i=a.beforeDecimal,n=a.afterDecimal,u=a.hasNegation,l=parseFloat("0."+(n||"0")),o=(n.length<=t?"0."+n:l.toFixed(t)).split("."),h=i;return i&&Number(o[0])&&(h=i.split("").reverse().reduce(function(e,t,r){return e.length>r?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e},o[0])),(u?"-":"")+h+(s?".":"")+c(o[1]||"",t,r)}function m(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}!function(e){e.event="event",e.props="prop"}(s||(s={}));var v=function(e){var t,r=void 0;return function(){for(var s=[],a=arguments.length;a--;)s[a]=arguments[a];return t&&s.length===t.length&&s.every(function(e,r){return e===t[r]})?r:(t=s,r=e.apply(void 0,s))}}(function(e,t){for(var r=0,s=0,a=e.length,i=t.length;e[r]===t[r]&&r<a;)r++;for(;e[a-1-s]===t[i-1-s]&&i-s>r&&a-s>r;)s++;return{from:{start:r,end:a-s},to:{start:r,end:i-s}}}),_=function(e,t){var r=Math.min(e.selectionStart,t);return{from:{start:r,end:e.selectionEnd},to:{start:r,end:t}}};function k(e){return Math.max(e.selectionStart,e.selectionEnd)}function y(e){var t=e.currentValue,r=e.formattedValue,s=e.currentValueIndex,a=e.formattedValueIndex;return t[s]===r[a]}function b(e,t,r,s){var a=e.length;if(t=Math.min(Math.max(t,0),a),"left"===s){for(;t>=0&&!r[t];)t--;-1===t&&(t=r.indexOf(!0))}else{for(;t<=a&&!r[t];)t++;t>a&&(t=r.lastIndexOf(!0))}return -1===t&&(t=a),t}function x(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,s=t.length;r<s;r++)t[r]=!!(u(e[r])||u(e[r-1]));return t}function A(e,t,r,s,i,u){void 0===u&&(u=n);var h,d,c=(h=function(e,t){var r,a;return o(e)?(a="",r=""):r="number"==typeof e||t?s(a="number"==typeof e?f(e):e):s(a=i(e,void 0)),{formattedValue:r,numAsString:a}},(d=(0,a.useRef)(h)).current=h,(0,a.useRef)(function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return d.current.apply(d,e)}).current),p=(0,a.useState)(function(){return c(l(e)?t:e,r)}),g=p[0],m=p[1],v=e,_=r;l(e)&&(v=g.numAsString,_=!0);var k=c(v,_);return(0,a.useMemo)(function(){m(k)},[k.formattedValue]),[g,function(e,t){e.formattedValue!==g.formattedValue&&m({formattedValue:e.formattedValue,numAsString:e.value}),u(e,t)}]}function E(e){return e.replace(/[^0-9]/g,"")}function C(e){return e}function F(e){var t=e.type;void 0===t&&(t="text");var r=e.displayType;void 0===r&&(r="input");var l=e.customInput,o=e.renderText,h=e.getInputRef,d=e.format;void 0===d&&(d=C);var c=e.removeFormatting;void 0===c&&(c=E);var p=e.defaultValue,f=e.valueIsNumericString,g=e.onValueChange,F=e.isAllowed,S=e.onChange;void 0===S&&(S=n);var V=e.onKeyDown;void 0===V&&(V=n);var w=e.onMouseUp;void 0===w&&(w=n);var D=e.onFocus;void 0===D&&(D=n);var T=e.onBlur;void 0===T&&(T=n);var B=e.value,M=e.getCaretBoundary;void 0===M&&(M=x);var R=e.isValidInputCharacter;void 0===R&&(R=u);var I=e.isCharacterSame,O=i(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),P=A(B,p,!!f,d,c,g),L=P[0],N=L.formattedValue,j=L.numAsString,U=P[1],$=(0,a.useRef)(),z=(0,a.useRef)({formattedValue:N,numAsString:j}),H=function(e,t){z.current={formattedValue:e.formattedValue,numAsString:e.value},U(e,t)},q=(0,a.useState)(!1),G=q[0],K=q[1],W=(0,a.useRef)(null),Z=(0,a.useRef)({setCaretTimeout:null,focusTimeout:null});(0,a.useEffect)(function(){return K(!0),function(){clearTimeout(Z.current.setCaretTimeout),clearTimeout(Z.current.focusTimeout)}},[]);var Y=d,X=function(e,t){var r=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(r)?void 0:r}},J=function(e,t,r){(0!==e.selectionStart||e.selectionEnd!==e.value.length)&&(m(e,t),Z.current.setCaretTimeout=setTimeout(function(){e.value===r&&e.selectionStart!==t&&m(e,t)},0))},Q=function(e,t,r){return b(e,t,M(e),r)},ee=function(e,t,r){var s=M(t),a=function(e,t,r,s,a,i,n){void 0===n&&(n=y);var u=a.findIndex(function(e){return e}),l=e.slice(0,u);t||r.startsWith(l)||(t=l,r=l+r,s+=l.length);for(var o=r.length,h=e.length,d={},c=Array(o),p=0;p<o;p++){c[p]=-1;for(var f=0;f<h;f++)if(n({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:p,formattedValueIndex:f})&&!0!==d[f]){c[p]=f,d[f]=!0;break}}for(var g=s;g<o&&(-1===c[g]||!i(r[g]));)g++;var m=g===o||-1===c[g]?h:c[g];for(g=s-1;g>0&&-1===c[g];)g--;var v=-1===g||-1===c[g]?0:c[g]+1;return v>m?m:s-v<m-s?v:m}(t,N,e,r,s,R,I);return b(t,a,s)},et=function(e){var t,r=e.formattedValue;void 0===r&&(r="");var s=e.input,a=e.source,i=e.event,n=e.numAsString;if(s){var u=e.inputValue||s.value,l=k(s);s.value=r,void 0!==(t=ee(u,r,l))&&J(s,t,r)}r!==N&&H(X(r,n),{event:i,source:a})};(0,a.useEffect)(function(){var e=z.current,t=e.formattedValue,r=e.numAsString;(N!==t||j!==r)&&H(X(N,j),{event:void 0,source:s.props})},[N,j]);var er=W.current?k(W.current):void 0;("undefined"!=typeof window?a.useLayoutEffect:a.useEffect)(function(){var e=W.current;if(N!==z.current.formattedValue&&e){var t=ee(z.current.formattedValue,N,er);e.value=N,J(e,t,N)}},[N]);var es=function(e,t,r){var s=t.target,a=Object.assign(Object.assign({},$.current?_($.current,s.selectionEnd):v(N,e)),{lastValue:N}),i=c(e,a),n=Y(i);if(i=c(n,void 0),F&&!F(X(n,i))){var u=t.target,l=ee(e,N,k(u));return u.value=N,J(u,l,N),!1}return et({formattedValue:n,numAsString:i,inputValue:e,event:t,source:r,input:t.target}),!0},ea=function(e,t){void 0===t&&(t=0),$.current={selectionStart:e.selectionStart,selectionEnd:e.selectionEnd+t}},ei=Object.assign({inputMode:G&&"undefined"!=typeof navigator&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))?"numeric":void 0},O,{type:t,value:N,onChange:function(e){es(e.target.value,e,s.event)&&S(e),$.current=void 0},onKeyDown:function(e){var t,r=e.target,s=e.key,a=r.selectionStart,i=r.selectionEnd,n=r.value;void 0===n&&(n=""),"ArrowLeft"===s||"Backspace"===s?t=Math.max(a-1,0):"ArrowRight"===s?t=Math.min(a+1,n.length):"Delete"===s&&(t=a);var u=0;"Delete"===s&&a===i&&(u=1);var l="ArrowLeft"===s||"ArrowRight"===s;if(void 0===t||a!==i&&!l){V(e),ea(r,u);return}var o=t;l?(o=Q(n,t,"ArrowLeft"===s?"left":"right"))!==t&&e.preventDefault():"Delete"!==s||R(n[t])?"Backspace"!==s||R(n[t])||(o=Q(n,t,"left")):o=Q(n,t,"right"),o!==t&&J(r,o,n),V(e),ea(r,u)},onMouseUp:function(e){var t=e.target,r=function(){var e=t.selectionStart,r=t.selectionEnd,s=t.value;if(void 0===s&&(s=""),e===r){var a=Q(s,e);a!==e&&J(t,a,s)}};r(),requestAnimationFrame(function(){r()}),w(e),ea(t)},onFocus:function(e){e.persist&&e.persist();var t=e.target,r=e.currentTarget;W.current=t,Z.current.focusTimeout=setTimeout(function(){var s=t.selectionStart,a=t.selectionEnd,i=t.value;void 0===i&&(i="");var n=Q(i,s);n!==s&&(0!==s||a!==i.length)&&J(t,n,i),D(Object.assign(Object.assign({},e),{currentTarget:r}))},0)},onBlur:function(e){W.current=null,clearTimeout(Z.current.focusTimeout),clearTimeout(Z.current.setCaretTimeout),T(e)}});return"text"===r?o?a.createElement(a.Fragment,null,o(N,O)||null):a.createElement("span",Object.assign({},O,{ref:h}),N):l?a.createElement(l,Object.assign({},ei,{ref:h})):a.createElement("input",Object.assign({},ei,{ref:h}))}function S(e,t){var r,s,a,i=t.decimalScale,n=t.fixedDecimalScale,u=t.prefix;void 0===u&&(u="");var l=t.suffix;void 0===l&&(l="");
1var o=t.allowNegative,h=t.thousandsGroupStyle;if(void 0===h&&(h="thousand"),""===e||"-"===e)return e;var p=V(t),f=p.thousandSeparator,g=p.decimalSeparator,m=0!==i&&-1!==e.indexOf(".")||i&&n,v=d(e,o),_=v.beforeDecimal,k=v.afterDecimal,y=v.addNegation;return void 0!==i&&(k=c(k,i,!!n)),f&&(r=_,s=function(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}(h),a=-1===(a=r.search(/[1-9]/))?r.length:a,_=r.substring(0,a)+r.substring(a,r.length).replace(s,"$1"+f)),u&&(_=u+_),l&&(k+=l),y&&(_="-"+_),e=_+(m&&g||"")+k}function V(e){var t=e.decimalSeparator;void 0===t&&(t=".");var r=e.thousandSeparator,s=e.allowedDecimalSeparators;return!0===r&&(r=","),s||(s=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:s}}function w(e){var t,r,c,p,_,k,y,b,x,E,C,w,D,T,B,M,R,I,O,P,L,N,j,U,$,z,H,q,G,K=((t=function(e){var t=V(e),r=t.thousandSeparator,s=t.decimalSeparator,a=e.prefix;void 0===a&&(a="");var i=e.allowNegative;if(void 0===i&&(i=!0),r===s)throw Error("\n        Decimal separator can't be same as thousand separator.\n        thousandSeparator: "+r+' (thousandSeparator = {true} is same as thousandSeparator = ",")\n        decimalSeparator: '+s+" (default value for decimalSeparator is .)\n     ");return a.startsWith("-")&&i&&(console.error("\n      Prefix can't start with '-' when allowNegative is true.\n      prefix: "+a+"\n      allowNegative: "+i+"\n    "),i=!1),Object.assign(Object.assign({},e),{allowNegative:i})}(t=e)).decimalSeparator,t.allowedDecimalSeparators,t.thousandsGroupStyle,r=t.suffix,c=t.allowNegative,p=t.allowLeadingZeros,void 0===(_=t.onKeyDown)&&(_=n),void 0===(k=t.onBlur)&&(k=n),y=t.thousandSeparator,b=t.decimalScale,x=t.fixedDecimalScale,void 0===(E=t.prefix)&&(E=""),C=t.defaultValue,w=t.value,D=t.valueIsNumericString,T=t.onValueChange,B=i(t,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),R=(M=V(t)).decimalSeparator,I=M.allowedDecimalSeparators,O=function(e){return S(e,t)},P=function(e,r){return function(e,t,r){void 0===t&&(t={from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""});var s,a,i,n,l=r.allowNegative,o=r.prefix;void 0===o&&(o="");var c=r.suffix;void 0===c&&(c="");var p=r.decimalScale,f=t.from,g=t.to,m=g.start,v=g.end,_=V(r),k=_.allowedDecimalSeparators,y=_.decimalSeparator,b=e[v]===y;if(u(e)&&(e===o||e===c)&&""===t.lastValue)return e;if(v-m==1&&-1!==k.indexOf(e[m])){var x=0===p?"":y;e=e.substring(0,m)+x+e.substring(m+1,e.length)}var A=function(e,t,r){var s=!1,a=!1;o.startsWith("-")?s=!1:e.startsWith("--")?(s=!1,a=!0):c.startsWith("-")&&e.length===c.length?s=!1:"-"===e[0]&&(s=!0);var i=+!!s;return a&&(i=2),i&&(e=e.substring(i),t-=i,r-=i),{value:e,start:t,end:r,hasNegation:s}},E=A(e,m,v),C=E.hasNegation;e=E.value,m=E.start,v=E.end;var F=A(t.lastValue,f.start,f.end),S=F.start,w=F.end,D=F.value,T=e.substring(m,v);e.length&&D.length&&(S>D.length-c.length||w<o.length)&&!(T&&c.startsWith(T))&&(e=D);var B=0;
1e.startsWith(o)?B+=o.length:m<o.length&&(B=m),e=e.substring(B),v-=B;var M=e.length,R=e.length-c.length;e.endsWith(c)?M=R:v>R?M=v:v>e.length-c.length&&(M=v),e=e.substring(0,M),void 0===(s=C?"-"+e:e)&&(s=""),a=RegExp("(-)(.)*(-)"),i=/(-)/.test(s),n=a.test(s),s=s.replace(/-/g,""),i&&!n&&l&&(s="-"+s);var I=(e=((e=s).match(RegExp("(^-)|[0-9]|"+h(y),"g"))||[]).join("")).indexOf(y),O=d(e=e.replace(RegExp(h(y),"g"),function(e,t){return t===I?".":""}),l),P=O.beforeDecimal,L=O.afterDecimal,N=O.addNegation;return g.end-g.start<f.end-f.start&&""===P&&b&&!parseFloat(L)&&(e=N?"-":""),e}(e,r,t)},L=l(w)?C:w,j=null!=D?D:(N=E,""===L||!(null==N?void 0:N.match(/\d/))&&!(null==r?void 0:r.match(/\d/))&&"string"==typeof L&&!isNaN(Number(L))),l(w)?l(C)||(j=j||"number"==typeof C):j=j||"number"==typeof w,H=(z=($=A((U=function(e){return o(e)?e:("number"==typeof e&&(e=f(e)),j&&"number"==typeof b)?g(e,b,!!x):e})(w),U(C),!!j,O,P,T))[0]).numAsString,q=z.formattedValue,G=$[1],Object.assign(Object.assign({},B),{value:q,valueIsNumericString:!1,isValidInputCharacter:function(e){return e===R||u(e)},isCharacterSame:function(e){var t=e.currentValue,r=e.lastValue,s=e.formattedValue,a=e.currentValueIndex,i=e.formattedValueIndex,n=t[a],u=s[i],l=v(r,t).to,o=function(e){return P(e).indexOf(".")+E.length};return!(0===w&&x&&b&&t[l.start]===R&&o(t)<a&&o(s)>i)&&(!!(a>=l.start&&a<l.end&&I&&I.includes(n))&&u===R||n===u)},onValueChange:G,format:O,removeFormatting:P,getCaretBoundary:function(e){var r,s,a,i,n,u;return void 0===(s=(r=t).prefix)&&(s=""),void 0===(a=r.suffix)&&(a=""),i=Array.from({length:e.length+1}).map(function(){return!0}),n="-"===e[0],i.fill(!1,0,s.length+ +!!n),u=e.length,i.fill(!1,u-a.length+1,u+1),i},onKeyDown:function(e){var t=e.target,r=e.key,s=t.selectionStart,a=t.selectionEnd,i=t.value;if(void 0===i&&(i=""),("Backspace"===r||"Delete"===r)&&a<E.length)return void e.preventDefault();if(s!==a)return void _(e);"Backspace"===r&&"-"===i[0]&&s===E.length+1&&c&&m(t,1),b&&x&&("Backspace"===r&&i[s-1]===R?(m(t,s-1),e.preventDefault()):"Delete"===r&&i[s]===R&&e.preventDefault()),(null==I?void 0:I.includes(r))&&i[s]===R&&m(t,s+1);var n=!0===y?",":y;"Backspace"===r&&i[s-1]===n&&m(t,s-1),"Delete"===r&&i[s]===n&&m(t,s+1),_(e)},onBlur:function(e){var r=H;r.match(/\d/g)||(r=""),p||(r=function(e){if(!e)return e;var t="-"===e[0];t&&(e=e.substring(1,e.length));var r=e.split("."),s=r[0].replace(/^0+/,"")||"0",a=r[1]||"";return(t?"-":"")+s+(a?"."+a:"")}(r)),x&&b&&(r=g(r,b,x)),r!==H&&G({formattedValue:S(r,t),value:r,floatValue:parseFloat(r)},{event:e,source:s.event}),k(e)}}));return a.createElement(F,Object.assign({},K))}},81613:(e,t,r)=>{"use strict";t.Ay=function(e,t){if((0,s.default)(e),t in l)return l[t].test(e);if("any"===t){for(var r in l)if(l.hasOwnProperty(r)&&l[r].test(e))return!0;return!1}throw Error("Invalid locale '".concat(t,"'"))};var s=function(e){return e&&e.__esModule?e:{default:e}}(r(69991)),a=/^\d{3}$/,i=/^\d{4}$/,n=/^\d{5}$/,u=/^\d{6}$/,l={AD:/^AD\d{3}$/,AT:i,AU:i,AZ:/^AZ\d{4}$/,BA:/^([7-8]\d{4}$)/,BD:/^([1-8][0-9]{3}|9[0-4][0-9]{2})$/,BE:i,BG:i,BR:/^\d{5}-?\d{3}$/,BY:/^2[1-4]\d{4}$/,CA:/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][\s\-]?\d[ABCEGHJ-NPRSTV-Z]\d$/i,CH:i,CN:/^(0[1-7]|1[012356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[1-5]|8[1345]|9[09])\d{4}$/,CO:/^(05|08|11|13|15|17|18|19|20|23|25|27|41|44|47|50|52|54|63|66|68|70|73|76|81|85|86|88|91|94|95|97|99)(\d{4})$/,CZ:/^\d{3}\s?\d{2}$/,DE:n,DK:i,DO:n,DZ:n,EE:n,ES:/^(5[0-2]{1}|[0-4]{1}\d{1})\d{3}$/,FI:n,FR:/^(?:(?:0[1-9]|[1-8]\d|9[0-5])\d{3}|97[1-46]\d{2})$/,GB:/^(gir\s?0aa|[a-z]{1,2}\d[\da-z]?\s?(\d[a-z]{2})?)$/i,GR:/^\d{3}\s?\d{2}$/,HR:/^([1-5]\d{4}$)/,HT:/^HT\d{4}$/,HU:i,ID:n,IE:/^(?!.*(?:o))[A-Za-z]\d[\dw]\s\w{4}$/i,IL:/^(\d{5}|\d{7})$/,IN:/^((?!10|29|35|54|55|65|66|86|87|88|89)[1-9][0-9]{5})$/,IR:/^(?!(\d)\1{3})[13-9]{4}[1346-9][013-9]{5}$/,IS:a,IT:n,JP:/^\d{3}\-\d{4}$/,KE:n,KR:/^(\d{5}|\d{6})$/,LI:/^(948[5-9]|949[0-7])$/,LT:/^LT\-\d{5}$/,LU:i,LV:/^LV\-\d{4}$/,LK:n,MG:a,MX:n,MT:/^[A-Za-z]{3}\s{0,1}\d{4}$/,MY:n,NL:/^[1-9]\d{3}\s?(?!sa|sd|ss)[a-z]{2}$/i,NO:i,NP:/^(10|21|22|32|33|34|44|45|56|57)\d{3}$|^(977)$/i,NZ:i,PK:n,PL:/^\d{2}\-\d{3}$/,PR:/^00[679]\d{2}([ -]\d{4})?$/,PT:/^\d{4}\-\d{3}?$/,RO:u,RU:u,SA:n,SE:/^[1-9]\d{2}\s?\d{2}$/,SG:u,SI:i,SK:/^\d{3}\s?\d{2}$/,TH:n,TN:i,TW:/^\d{3}(\d{2,3})?$/,UA:n,US:/^\d{5}(-\d{4})?$/,ZA:i,ZM:n};Object.keys(l)},82325:(e,t,r)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,s.default)(e),"object"===a(t)?(r=t.min||0,i=t.max):(r=arguments[1],i=arguments[2]);var r,i,n=encodeURI(e).split(/%..|./).length-1;return n>=r&&(void 0===i||n<=i)};var s=function(e){return e&&e.__esModule?e:{default:e}}(r(69991));function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=t.default,e.exports.default=t.default},85215:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var s=r(4567),a=r(83737);function i(e){(0,a.A)(1,arguments);var t=(0,s.A)(e);return t.setDate(1),t.setHours(0,0,0,0),t}},89840:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,s.default)(e);var r=t.provider,i=e.replace(/[- ]+/g,"");if(r&&r.toLowerCase()in n){if(!n[r.toLowerCase()].test(i))return!1}else if(!r||r.toLowerCase()in n){if(!u.some(function(e){return e.test(i)}))return!1}else throw Error("".concat(r," is not a valid credit card provider."));return(0,a.default)(e)};var s=i(r(69991)),a=i(r(20447));function i(e){return e&&e.__esModule?e:{default:e}}var n={amex:/^3[47][0-9]{13}$/,dinersclub:/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/,discover:/^6(?:011|5[0-9][0-9])[0-9]{12,15}$/,jcb:/^(?:2131|1800|35\d{3})\d{11}$/,mastercard:/^5[1-5][0-9]{2}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$/,unionpay:/^(6[27][0-9]{14}|^(81[0-9]{14,17}))$/,visa:/^(?:4[0-9]{12})(?:[0-9]{3,6})?$/},u=function(){var e=[];for(var t in n)n.hasOwnProperty(t)&&e.push(n[t]);return e}();e.exports=t.default,e.exports.default=t.default}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.