dealposbooks 1.9.0 → 1.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/3rdpartylicenses.txt +43 -43
- package/assets/scss/layouts/_layout.scss +1 -1
- package/assets/scss/layouts/dark/_dark.scss +164 -153
- package/assets/scss/style.scss +1 -1
- package/assets/scss/variables/_variables.scss +4 -2
- package/assets/world.json +17808 -1
- package/{chunk-S64TQVWK.js → chunk-2GAPYNNZ.js} +1 -1
- package/chunk-2HYLQR56.js +1 -0
- package/chunk-2VTAWSHV.js +1 -0
- package/chunk-3R4UQAEP.js +1 -0
- package/chunk-3SPHZLLV.js +301 -0
- package/{chunk-CEMQLY34.js → chunk-4EDEITTK.js} +1 -1
- package/{chunk-3TRGIHUH.js → chunk-4FHVIHSY.js} +1 -1
- package/chunk-4OHRBQE4.js +1 -0
- package/chunk-4OXMK44M.js +1 -0
- package/chunk-4TTJBC5I.js +1 -0
- package/chunk-5CZUTVXD.js +47 -0
- package/chunk-5M3BH2HK.js +1 -0
- package/{chunk-UIM6GQ63.js → chunk-5MHVGNVO.js} +1 -1
- package/{chunk-VYTUB2DV.js → chunk-63XPN7AG.js} +1 -1
- package/chunk-74EMBNLM.js +1 -0
- package/chunk-75NY4EHJ.js +7 -0
- package/{chunk-ON4N4CPO.js → chunk-7CAU344O.js} +1 -1
- package/chunk-BS6MB7HD.js +1 -0
- package/chunk-C54Z7Z3J.js +246 -0
- package/{chunk-IF72X7RS.js → chunk-CCE4VMYO.js} +1 -1
- package/chunk-CP57YBBI.js +2 -0
- package/{chunk-SJTXIIX5.js → chunk-DCES5UJV.js} +1 -1
- package/{chunk-MS3UTNX6.js → chunk-DERWDCI5.js} +1 -1
- package/chunk-EDPSZYHH.js +1 -0
- package/{chunk-RNU2O7NF.js → chunk-ELUESCCC.js} +1 -1
- package/{chunk-CMHZLZ4E.js → chunk-FJ7IM55X.js} +1 -1
- package/{chunk-YILEWAVV.js → chunk-FNWWNWQP.js} +1 -1
- package/chunk-FOSJHYSQ.js +300 -0
- package/chunk-GH3BVHFE.js +1 -0
- package/{chunk-VVC3QQUI.js → chunk-GO3ETPB7.js} +1 -1
- package/chunk-GYI6FJNZ.js +1 -0
- package/{chunk-HZLUYZB3.js → chunk-GYOO2JKC.js} +1 -1
- package/chunk-HF7H6NPN.js +1 -0
- package/chunk-HGUXJRBI.js +1 -0
- package/{chunk-TL6UHPBU.js → chunk-HKFTHGN6.js} +1 -1
- package/{chunk-DWTUKOMR.js → chunk-JBLYOAVS.js} +1 -1
- package/chunk-JDKSRPMM.js +1 -0
- package/chunk-JWPV2SP2.js +59 -0
- package/chunk-K5GIEJY3.js +7 -0
- package/{chunk-QBJKUIXK.js → chunk-KOC7QQ5A.js} +1 -1
- package/{chunk-BTZS5NIZ.js → chunk-M66SFDOI.js} +1 -1
- package/chunk-MOGY4H6O.js +1 -0
- package/{chunk-PATWAZNE.js → chunk-OBBJFGOA.js} +1 -1
- package/{chunk-G7MS6UI4.js → chunk-OPNWLQQY.js} +1 -1
- package/{chunk-35EULUGT.js → chunk-OUJ6CGAI.js} +1 -1
- package/{chunk-AKZM2DMY.js → chunk-OVUTH3B6.js} +1 -1
- package/chunk-OWUXXKGD.js +180 -0
- package/{chunk-R3FUAON5.js → chunk-PAQGWJ3J.js} +1 -1
- package/chunk-PCZW753D.js +1 -0
- package/chunk-PMQ7L7VQ.js +1 -0
- package/chunk-PRVKVHZC.js +1 -0
- package/{chunk-UNNEEFI2.js → chunk-PZRWSIXN.js} +1 -1
- package/{chunk-G63G4UQZ.js → chunk-Q3HG4BLC.js} +2 -2
- package/chunk-QEQCMTMU.js +1 -0
- package/chunk-QMXENXYW.js +1 -0
- package/chunk-R4CV5F66.js +1 -0
- package/chunk-RJZW77TO.js +1 -0
- package/{chunk-DYZT7UKM.js → chunk-S6JRFIGG.js} +1 -1
- package/{chunk-F6SXKAYF.js → chunk-TO47DVWB.js} +1 -1
- package/chunk-UHDEQNDX.js +1 -0
- package/{chunk-34EMCCL5.js → chunk-V4MEQMDJ.js} +3 -3
- package/{chunk-GHZLR44M.js → chunk-VET2QT6C.js} +1 -1
- package/chunk-VHNXAKFS.js +1 -0
- package/chunk-W37QK7Z5.js +520 -0
- package/{chunk-HZ7WPLLK.js → chunk-W56XJVPD.js} +1 -1
- package/chunk-W5VZK5LZ.js +70 -0
- package/chunk-WF2ZEF5P.js +1 -0
- package/{chunk-Q4Y2IGA6.js → chunk-WLFERE5C.js} +1 -1
- package/chunk-WZ5MSCDB.js +1 -0
- package/chunk-XFW6LFAM.js +5 -0
- package/chunk-YAEJRHVD.js +1 -0
- package/chunk-Z5SFK23M.js +960 -0
- package/{chunk-ROX6NFMK.js → chunk-ZQKGNYP5.js} +1 -1
- package/{chunk-26X2X35R.js → chunk-ZZNYX7MX.js} +1 -1
- package/index.html +3 -3
- package/main-G22CDQKS.js +1 -0
- package/package.json +1 -1
- package/styles-ETBLCGC3.css +1 -0
- package/chunk-2VF35PRV.js +0 -7
- package/chunk-6TRUWOKK.js +0 -1
- package/chunk-7FE3ZTH3.js +0 -7
- package/chunk-7V4AFAU5.js +0 -1
- package/chunk-AVL6C3VX.js +0 -59
- package/chunk-CAI423H5.js +0 -1
- package/chunk-DDBPJDR6.js +0 -1
- package/chunk-DXCBV3NP.js +0 -1
- package/chunk-E2RBYY7Q.js +0 -1
- package/chunk-E2VJWAI2.js +0 -1
- package/chunk-EBTC6B2W.js +0 -2
- package/chunk-EHULZLLD.js +0 -300
- package/chunk-ESKS6LNH.js +0 -246
- package/chunk-G4MYTCDD.js +0 -1
- package/chunk-GGZEY27B.js +0 -1
- package/chunk-I7T4W6G2.js +0 -47
- package/chunk-JXI4NDYT.js +0 -1
- package/chunk-KFKLJQ2D.js +0 -1
- package/chunk-KLKIGY44.js +0 -1
- package/chunk-KO5IN2G2.js +0 -1
- package/chunk-L2BS7BTV.js +0 -1
- package/chunk-LUH5EEUM.js +0 -1
- package/chunk-MEKP6D5H.js +0 -1
- package/chunk-MQ5Y727W.js +0 -1
- package/chunk-NWVWD4IE.js +0 -1
- package/chunk-NXCLB2JQ.js +0 -1
- package/chunk-OVJSBJBH.js +0 -197
- package/chunk-PBI352JR.js +0 -1
- package/chunk-PKK7JSPR.js +0 -1
- package/chunk-PKPPDJWT.js +0 -301
- package/chunk-PMLVFBAT.js +0 -1
- package/chunk-TDHD3ZTF.js +0 -1
- package/chunk-UFS2HLAY.js +0 -1
- package/chunk-UM7MB5JU.js +0 -1
- package/chunk-USO7UKRV.js +0 -821
- package/chunk-YF4S6CQO.js +0 -524
- package/chunk-YNI2HWIV.js +0 -180
- package/main-YPUVQR54.js +0 -1
- package/styles-JMIKZHNX.css +0 -1
package/chunk-YF4S6CQO.js
DELETED
|
@@ -1,524 +0,0 @@
|
|
|
1
|
-
import{a as Ie}from"./chunk-G4XX7EU2.js";import{a as Sa}from"./chunk-S64TQVWK.js";import{a as In,b as Zi,c as Qi}from"./chunk-ROX6NFMK.js";import{b as wa,c as Nn}from"./chunk-DWTUKOMR.js";import{a as Yi}from"./chunk-PATWAZNE.js";import{a as Yo}from"./chunk-KO5IN2G2.js";import{a as fa}from"./chunk-IF72X7RS.js";import{a as mi,b as di}from"./chunk-Q4Y2IGA6.js";import{a as va,b as ya,d as _a,e as ba}from"./chunk-QBJKUIXK.js";import"./chunk-ON4N4CPO.js";import{a as Hi,b as qi}from"./chunk-I7T4W6G2.js";import"./chunk-GHZLR44M.js";import{a as De}from"./chunk-MEKP6D5H.js";import{c as Ui,d as ji}from"./chunk-F6SXKAYF.js";import{a as Qn,b as Yn}from"./chunk-UNNEEFI2.js";import{b as si,c as li,f as Ki,g as Wi,h as Rt,j as ha,k as ga,l as Mt}from"./chunk-MS3UTNX6.js";import{e as ia,g as ci,h as ui}from"./chunk-EHULZLLD.js";import"./chunk-AKZM2DMY.js";import"./chunk-AVL6C3VX.js";import{a as On,b as Lt}from"./chunk-G7MS6UI4.js";import{a as na,b as oa,c as da,d as pa,e as $i,f as Gi,g as wt}from"./chunk-YNI2HWIV.js";import{a as zi,f as ut,g as At}from"./chunk-USO7UKRV.js";import{a as Ji,b as ra,c as sa,d as la,e as ca,f as ua,g as ma}from"./chunk-CMHZLZ4E.js";import{d as En,f as Zo,i as Zn,m as Bi,n as ta,q as Tn,s as Fn,t as Dt,u as Vt,v as aa}from"./chunk-OVJSBJBH.js";import{a as Ho,b as Qt,c as He,e as Yt,f as Xt,g as Ft,h as B,j as qo,l as ei,m as Ii,n as Ni,o as ti,q as wn,r as xn,u as ii}from"./chunk-E2RBYY7Q.js";import{a as ri}from"./chunk-26X2X35R.js";import{C as kn,P as ea,a as Wn,b as oi,ca as on,d as ai,f as Hn,ga as Li,k as qn,ka as Ri,la as St,m as Xo,ma as Nt,ta as Mi}from"./chunk-35EULUGT.js";import{a as ni,c as Cn,d as Ot,k as It}from"./chunk-LUH5EEUM.js";import{a as Ai,d as Qo}from"./chunk-YILEWAVV.js";import{c as Pn,d as Di,f as _i,h as Vi,i as Gn,k as Kn}from"./chunk-F2X3VGZZ.js";import{d as Sn,g as Ko,k as Wo}from"./chunk-EBTC6B2W.js";import{a as jo,j as bt,k as Jo,l as $o,m as ct,n as Oi,o as qt,p as Go,q as bn,r as Tt,s as Ge,v as Zt}from"./chunk-SJTXIIX5.js";import{Ac as Bo,D as pn,Da as Oo,Dc as zo,Fa as Ve,Fb as Vo,Fc as Re,Gc as Je,Hc as _n,I as Ci,Ib as fe,Ic as W,Jb as y,Kb as Wt,Mb as $e,Nb as lt,Ob as Me,Pb as Ht,Qb as Jn,Rb as Ct,Rc as ft,Sb as Et,Sc as Ti,Tb as d,Ub as u,Uc as ot,V as Eo,Vb as D,Vc as Fi,Wb as Qe,Wc as Uo,X as yi,Xb as Ye,Yb as Xe,Z as Pe,Zb as q,aa as Po,ab as Io,ba as xt,bb as fn,c as jn,ca as Ei,cc as J,dc as P,ec as Ao,fb as g,fc as Lo,g as jt,ga as hn,gc as $n,ha as K,hc as je,ic as nt,jc as de,kb as No,kc as pe,lb as Jt,lc as Ro,mc as b,n as xi,nb as Do,nc as ae,oa as ko,oc as he,pa as R,pc as yn,qa as M,ra as To,s as _t,sa as gt,tb as Oe,u as Co,ua as Fo,ub as Pi,uc as et,vb as vn,vc as ve,wc as Ne,xb as kt,xc as ki,ya as st,yc as Mo,za as gn,zb as I}from"./chunk-2VF35PRV.js";import{a as me,b as ye,d as xo,e as vi}from"./chunk-EQDQRRRY.js";var ka=xo((rn,io)=>{var Pa,an;Pa=rn,an=()=>(()=>{var n={d:(s,_)=>{for(var k in _)n.o(_,k)&&!n.o(s,k)&&Object.defineProperty(s,k,{enumerable:!0,get:_[k]})},o:(s,_)=>Object.prototype.hasOwnProperty.call(s,_)},h={};n.d(h,{default:()=>nn});var t={allowedTagList:["b","caption","cite","code","const","dd","del","div","dfn","dt","em","h1","h2","h3","h4","h5","h6","input","ins","kdb","label","li","option","output","p","q","s","sample","span","strong","td","th","u"]};Object.freeze(t.allowedTagList),Object.defineProperty(t,"allowedTagList",{configurable:!1,writable:!1}),t.fromCharCodeKeyCode={0:"LaunchCalculator",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",91:"OS",92:"OSRight",93:"ContextMenu",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",173:"-",182:"MyComputer",183:"MyCalculator",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Meta",225:"AltGraph"},Object.freeze(t.fromCharCodeKeyCode),Object.defineProperty(t,"fromCharCodeKeyCode",{configurable:!1,writable:!1}),t.keyName={Unidentified:"Unidentified",AndroidDefault:"AndroidDefault",Alt:"Alt",AltGr:"AltGraph",CapsLock:"CapsLock",Ctrl:"Control",Fn:"Fn",FnLock:"FnLock",Hyper:"Hyper",Meta:"Meta",OSLeft:"OS",OSRight:"OS",Command:"OS",NumLock:"NumLock",ScrollLock:"ScrollLock",Shift:"Shift",Super:"Super",Symbol:"Symbol",SymbolLock:"SymbolLock",Enter:"Enter",Tab:"Tab",Space:" ",LeftArrow:"ArrowLeft",UpArrow:"ArrowUp",RightArrow:"ArrowRight",DownArrow:"ArrowDown",End:"End",Home:"Home",PageUp:"PageUp",PageDown:"PageDown",Backspace:"Backspace",Clear:"Clear",Copy:"Copy",CrSel:"CrSel",Cut:"Cut",Delete:"Delete",EraseEof:"EraseEof",ExSel:"ExSel",Insert:"Insert",Paste:"Paste",Redo:"Redo",Undo:"Undo",Accept:"Accept",Again:"Again",Attn:"Attn",Cancel:"Cancel",ContextMenu:"ContextMenu",Esc:"Escape",Execute:"Execute",Find:"Find",Finish:"Finish",Help:"Help",Pause:"Pause",Play:"Play",Props:"Props",Select:"Select",ZoomIn:"ZoomIn",ZoomOut:"ZoomOut",BrightnessDown:"BrightnessDown",BrightnessUp:"BrightnessUp",Eject:"Eject",LogOff:"LogOff",Power:"Power",PowerOff:"PowerOff",PrintScreen:"PrintScreen",Hibernate:"Hibernate",Standby:"Standby",WakeUp:"WakeUp",Compose:"Compose",Dead:"Dead",F1:"F1",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",F10:"F10",F11:"F11",F12:"F12",Print:"Print",num0:"0",num1:"1",num2:"2",num3:"3",num4:"4",num5:"5",num6:"6",num7:"7",num8:"8",num9:"9",a:"a",b:"b",c:"c",d:"d",e:"e",f:"f",g:"g",h:"h",i:"i",j:"j",k:"k",l:"l",m:"m",n:"n",o:"o",p:"p",q:"q",r:"r",s:"s",t:"t",u:"u",v:"v",w:"w",x:"x",y:"y",z:"z",A:"A",B:"B",C:"C",D:"D",E:"E",F:"F",G:"G",H:"H",I:"I",J:"J",K:"K",L:"L",M:"M",N:"N",O:"O",P:"P",Q:"Q",R:"R",S:"S",T:"T",U:"U",V:"V",W:"W",X:"X",Y:"Y",Z:"Z",Semicolon:";",Equal:"=",Comma:",",Hyphen:"-",Minus:"-",Plus:"+",Dot:".",Slash:"/",Backquote:"`",LeftParenthesis:"(",RightParenthesis:")",LeftBracket:"[",RightBracket:"]",Backslash:"\\",Quote:"'",numpad0:"0",numpad1:"1",numpad2:"2",numpad3:"3",numpad4:"4",numpad5:"5",numpad6:"6",numpad7:"7",numpad8:"8",numpad9:"9",NumpadDot:".",NumpadDotAlt:",",NumpadMultiply:"*",NumpadPlus:"+",NumpadMinus:"-",NumpadSubtract:"-",NumpadSlash:"/",NumpadDotObsoleteBrowsers:"Decimal",NumpadMultiplyObsoleteBrowsers:"Multiply",NumpadPlusObsoleteBrowsers:"Add",NumpadMinusObsoleteBrowsers:"Subtract",NumpadSlashObsoleteBrowsers:"Divide",_allFnKeys:["F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12"],_someNonPrintableKeys:["Tab","Enter","Shift","ShiftLeft","ShiftRight","Control","ControlLeft","ControlRight","Alt","AltLeft","AltRight","Pause","CapsLock","Escape"],_directionKeys:["PageUp","PageDown","End","Home","ArrowDown","ArrowLeft","ArrowRight","ArrowUp"]},Object.freeze(t.keyName._allFnKeys),Object.freeze(t.keyName._someNonPrintableKeys),Object.freeze(t.keyName._directionKeys),Object.freeze(t.keyName),Object.defineProperty(t,"keyName",{configurable:!1,writable:!1}),Object.freeze(t);let l=t;function c(s){return function(_){if(Array.isArray(_))return re(_)}(s)||function(_){if(typeof Symbol<"u"&&_[Symbol.iterator]!=null||_["@@iterator"]!=null)return Array.from(_)}(s)||L(s)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function v(){return v=Object.assign?Object.assign.bind():function(s){for(var _=1;_<arguments.length;_++){var k=arguments[_];for(var F in k)Object.prototype.hasOwnProperty.call(k,F)&&(s[F]=k[F])}return s},v.apply(this,arguments)}function V(s,_){return function(k){if(Array.isArray(k))return k}(s)||function(k,F){var e=k==null?null:typeof Symbol<"u"&&k[Symbol.iterator]||k["@@iterator"];if(e!=null){var i,r,o,m,f=[],w=!0,E=!1;try{if(o=(e=e.call(k)).next,F===0){if(Object(e)!==e)return;w=!1}else for(;!(w=(i=o.call(e)).done)&&(f.push(i.value),f.length!==F);w=!0);}catch(O){E=!0,r=O}finally{try{if(!w&&e.return!=null&&(m=e.return(),Object(m)!==m))return}finally{if(E)throw r}}return f}}(s,_)||L(s,_)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function L(s,_){if(s){if(typeof s=="string")return re(s,_);var k=Object.prototype.toString.call(s).slice(8,-1);return k==="Object"&&s.constructor&&(k=s.constructor.name),k==="Map"||k==="Set"?Array.from(s):k==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(k)?re(s,_):void 0}}function re(s,_){(_==null||_>s.length)&&(_=s.length);for(var k=0,F=new Array(_);k<_;k++)F[k]=s[k];return F}function we(s){return we=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},we(s)}function mt(s,_){for(var k=0;k<_.length;k++){var F=_[k];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(s,(e=F.key,i=void 0,i=function(r,o){if(we(r)!=="object"||r===null)return r;var m=r[Symbol.toPrimitive];if(m!==void 0){var f=m.call(r,o||"default");if(we(f)!=="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(r)}(e,"string"),we(i)==="symbol"?i:String(i)),F)}var e,i}var a=function(){function s(){(function(e,i){if(!(e instanceof i))throw new TypeError("Cannot call a class as a function")})(this,s)}var _,k,F;return _=s,F=[{key:"isNull",value:function(e){return e===null}},{key:"isUndefined",value:function(e){return e===void 0}},{key:"isUndefinedOrNullOrEmpty",value:function(e){return e==null||e===""}},{key:"isString",value:function(e){return typeof e=="string"||e instanceof String}},{key:"isEmptyString",value:function(e){return e===""}},{key:"isBoolean",value:function(e){return typeof e=="boolean"}},{key:"isTrueOrFalseString",value:function(e){var i=String(e).toLowerCase();return i==="true"||i==="false"}},{key:"isObject",value:function(e){return we(e)==="object"&&e!==null&&!Array.isArray(e)}},{key:"isEmptyObj",value:function(e){for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i))return!1;return!0}},{key:"isNumberStrict",value:function(e){return typeof e=="number"}},{key:"isNumber",value:function(e){return!this.isArray(e)&&!isNaN(parseFloat(e))&&isFinite(e)}},{key:"isDigit",value:function(e){return/\d/.test(e)}},{key:"isNumberOrArabic",value:function(e){var i=this.arabicToLatinNumbers(e,!1,!0,!0);return this.isNumber(i)}},{key:"isInt",value:function(e){return typeof e=="number"&&parseFloat(e)===parseInt(e,10)&&!isNaN(e)}},{key:"isFunction",value:function(e){return typeof e=="function"}},{key:"contains",value:function(e,i){return!(!this.isString(e)||!this.isString(i)||e===""||i==="")&&e.indexOf(i)!==-1}},{key:"isInArray",value:function(e,i){return!(!this.isArray(i)||i===[]||this.isUndefined(e))&&i.indexOf(e)!==-1}},{key:"isArray",value:function(e){if(Object.prototype.toString.call([])==="[object Array]")return Array.isArray(e)||we(e)==="object"&&Object.prototype.toString.call(e)==="[object Array]";throw new Error("toString message changed for Object Array")}},{key:"isElement",value:function(e){return typeof Element<"u"&&e instanceof Element}},{key:"isInputElement",value:function(e){return this.isElement(e)&&e.tagName.toLowerCase()==="input"}},{key:"decimalPlaces",value:function(e){var i=V(e.split("."),2)[1];return this.isUndefined(i)?0:i.length}},{key:"indexFirstNonZeroDecimalPlace",value:function(e){var i=V(String(Math.abs(e)).split("."),2)[1];if(this.isUndefined(i))return 0;var r=i.lastIndexOf("0");return r===-1?r=0:r+=2,r}},{key:"keyCodeNumber",value:function(e){return e.which===void 0?e.keyCode:e.which}},{key:"character",value:function(e){var i;if(e.key==="Unidentified"||e.key===void 0||this.isSeleniumBot()){var r=this.keyCodeNumber(e);if(r===229)return l.keyName.AndroidDefault;var o=l.fromCharCodeKeyCode[r];i=s.isUndefinedOrNullOrEmpty(o)?String.fromCharCode(r):o}else switch(e.key){case"Add":i=l.keyName.NumpadPlus;break;case"Apps":i=l.keyName.ContextMenu;break;case"Crsel":i=l.keyName.CrSel;break;case"Decimal":i=e.char?e.char:l.keyName.NumpadDot;break;case"Del":i=l.keyName.Delete;break;case"Divide":i=l.keyName.NumpadSlash;break;case"Down":i=l.keyName.DownArrow;break;case"Esc":i=l.keyName.Esc;break;case"Exsel":i=l.keyName.ExSel;break;case"Left":i=l.keyName.LeftArrow;break;case"Meta":case"Super":i=l.keyName.OSLeft;break;case"Multiply":i=l.keyName.NumpadMultiply;break;case"Right":i=l.keyName.RightArrow;break;case"Spacebar":i=l.keyName.Space;break;case"Subtract":i=l.keyName.NumpadMinus;break;case"Up":i=l.keyName.UpArrow;break;default:i=e.key}return i}},{key:"browser",value:function(){var e,i=navigator.userAgent,r=i.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(r[1])?{name:"ie",version:(e=/\brv[ :]+(\d+)/g.exec(i)||[])[1]||""}:r[1]==="Chrome"&&(e=i.match(/\b(OPR|Edge)\/(\d+)/))!==null?{name:e[1].replace("OPR","opera"),version:e[2]}:(r=r[2]?[r[1],r[2]]:[navigator.appName,navigator.appVersion,"-?"],(e=i.match(/version\/(\d+)/i))!==null&&r.splice(1,1,e[1]),{name:r[0].toLowerCase(),version:r[1]})}},{key:"isSeleniumBot",value:function(){return window.navigator.webdriver===!0}},{key:"isNegative",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"-",r=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];return e===i||e!==""&&(s.isNumber(e)?e<0:r?this.contains(e,i):this.isNegativeStrict(e,i))}},{key:"isNegativeStrict",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"-";return e.charAt(0)===i}},{key:"isNegativeWithBrackets",value:function(e,i,r){return e.charAt(0)===i&&this.contains(e,r)}},{key:"isZeroOrHasNoValue",value:function(e){return!/[1-9]/g.test(e)}},{key:"setRawNegativeSign",value:function(e){return this.isNegativeStrict(e,"-")?e:"-".concat(e)}},{key:"replaceCharAt",value:function(e,i,r){return"".concat(e.substr(0,i)).concat(r).concat(e.substr(i+r.length))}},{key:"clampToRangeLimits",value:function(e,i){return Math.max(i.minimumValue,Math.min(i.maximumValue,e))}},{key:"countNumberCharactersOnTheCaretLeftSide",value:function(e,i,r){for(var o=new RegExp("[0-9".concat(r,"-]")),m=0,f=0;f<i;f++)o.test(e[f])&&m++;return m}},{key:"findCaretPositionInFormattedNumber",value:function(e,i,r,o){var m,f=r.length,w=e.length,E=0;for(m=0;m<f&&E<w&&E<i;m++)(e[E]===r[m]||e[E]==="."&&r[m]===o)&&E++;return m}},{key:"countCharInText",value:function(e,i){for(var r=0,o=0;o<i.length;o++)i[o]===e&&r++;return r}},{key:"convertCharacterCountToIndexPosition",value:function(e){return Math.max(e,e-1)}},{key:"getElementSelection",value:function(e){var i,r={};try{i=this.isUndefined(e.selectionStart)}catch{i=!1}try{if(i){var o=window.getSelection().getRangeAt(0);r.start=o.startOffset,r.end=o.endOffset,r.length=r.end-r.start}else r.start=e.selectionStart,r.end=e.selectionEnd,r.length=r.end-r.start}catch{r.start=0,r.end=0,r.length=0}return r}},{key:"setElementSelection",value:function(e,i){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(this.isUndefinedOrNullOrEmpty(r)&&(r=i),this.isInputElement(e))e.setSelectionRange(i,r);else if(!s.isNull(e.firstChild)){var o=document.createRange();o.setStart(e.firstChild,i),o.setEnd(e.firstChild,r);var m=window.getSelection();m.removeAllRanges(),m.addRange(o)}}},{key:"throwError",value:function(e){throw new Error(e)}},{key:"warning",value:function(e){(!(arguments.length>1&&arguments[1]!==void 0)||arguments[1])&&console.warn("Warning: ".concat(e))}},{key:"isWheelEvent",value:function(e){return e instanceof WheelEvent}},{key:"isWheelUpEvent",value:function(e){return this.isWheelEvent(e)&&!this.isUndefinedOrNullOrEmpty(e.deltaY)||this.throwError("The event passed as a parameter is not a valid wheel event, '".concat(e.type,"' given.")),e.deltaY<0}},{key:"isWheelDownEvent",value:function(e){return this.isWheelEvent(e)&&!this.isUndefinedOrNullOrEmpty(e.deltaY)||this.throwError("The event passed as a parameter is not a valid wheel event, '".concat(e.type,"' given.")),e.deltaY>0}},{key:"isWheelEventWithZeroDeltaY",value:function(e){return this.isWheelEvent(e)&&!this.isUndefinedOrNullOrEmpty(e.deltaY)&&e.deltaY===0}},{key:"forceDecimalPlaces",value:function(e,i){var r=V(String(e).split("."),2),o=r[0],m=r[1];return m?"".concat(o,".").concat(m.substr(0,i)):e}},{key:"roundToNearest",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e3;return e===0?0:(i===0&&this.throwError("The `stepPlace` used to round is equal to `0`. This value must not be equal to zero."),Math.round(e/i)*i)}},{key:"modifyAndRoundToNearestAuto",value:function(e,i,r){e=Number(this.forceDecimalPlaces(e,r));var o=Math.abs(e);if(o>=0&&o<1){var m,f=Math.pow(10,-r);if(e===0)return i?f:-f;var w,E=r,O=this.indexFirstNonZeroDecimalPlace(e);return m=O>=E-1?f:Math.pow(10,-(O+1)),w=i?e+m:e-m,this.roundToNearest(w,m)}e=parseInt(e,10);var p,T=Math.abs(e).toString().length;switch(T){case 1:p=0;break;case 2:case 3:p=1;break;case 4:case 5:p=2;break;default:p=T-3}var A,G=Math.pow(10,p);return(A=i?e+G:e-G)<=10&&A>=-10?A:this.roundToNearest(A,G)}},{key:"addAndRoundToNearestAuto",value:function(e,i){return this.modifyAndRoundToNearestAuto(e,!0,i)}},{key:"subtractAndRoundToNearestAuto",value:function(e,i){return this.modifyAndRoundToNearestAuto(e,!1,i)}},{key:"arabicToLatinNumbers",value:function(e){var i=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],r=arguments.length>2&&arguments[2]!==void 0&&arguments[2],o=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(this.isNull(e))return e;var m=e.toString();if(m==="")return e;if(m.match(/[٠١٢٣٤٥٦٧٨٩۴۵۶]/g)===null)return i&&(m=Number(m)),m;r&&(m=m.replace(/٫/,".")),o&&(m=m.replace(/٬/g,"")),m=m.replace(/[٠١٢٣٤٥٦٧٨٩]/g,function(w){return w.charCodeAt(0)-1632}).replace(/[۰۱۲۳۴۵۶۷۸۹]/g,function(w){return w.charCodeAt(0)-1776});var f=Number(m);return isNaN(f)?f:(i&&(m=f),m)}},{key:"triggerEvent",value:function(e){var i,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:document,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,m=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],f=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4];window.CustomEvent?i=new CustomEvent(e,{detail:o,bubbles:m,cancelable:f}):(i=document.createEvent("CustomEvent")).initCustomEvent(e,m,f,{detail:o}),r.dispatchEvent(i)}},{key:"parseStr",value:function(e){var i,r,o,m,f={};if(e===0&&1/e<0&&(e="-0"),e=e.toString(),this.isNegativeStrict(e,"-")?(e=e.slice(1),f.s=-1):f.s=1,(i=e.indexOf("."))>-1&&(e=e.replace(".","")),i<0&&(i=e.length),(r=e.search(/[1-9]/i)===-1?e.length:e.search(/[1-9]/i))===(o=e.length))f.e=0,f.c=[0];else{for(m=o-1;e.charAt(m)==="0";m-=1)o-=1;for(o-=1,f.e=i-r-1,f.c=[],i=0;r<=o;r+=1)f.c[i]=+e.charAt(r),i+=1}return f}},{key:"testMinMax",value:function(e,i){var r=i.c,o=e.c,m=i.s,f=e.s,w=i.e,E=e.e;if(!r[0]||!o[0])return r[0]?m:o[0]?-f:0;if(m!==f)return m;var O=m<0;if(w!==E)return w>E^O?1:-1;for(m=-1,f=(w=r.length)<(E=o.length)?w:E,m+=1;m<f;m+=1)if(r[m]!==o[m])return r[m]>o[m]^O?1:-1;return w===E?0:w>E^O?1:-1}},{key:"randomString",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:5;return Math.random().toString(36).substr(2,e)}},{key:"domElement",value:function(e){var i;return i=s.isString(e)?document.querySelector(e):e,i}},{key:"getElementValue",value:function(e){return e.tagName.toLowerCase()==="input"?e.value:this.text(e)}},{key:"setElementValue",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;e.tagName.toLowerCase()==="input"?e.value=i:e.textContent=i}},{key:"setInvalidState",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Invalid";(i===""||this.isNull(i))&&this.throwError("Cannot set the invalid state with an empty message."),e.setCustomValidity(i)}},{key:"setValidState",value:function(e){e.setCustomValidity("")}},{key:"cloneObject",value:function(e){return v({},e)}},{key:"camelize",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"-",r=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],o=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3];if(this.isNull(e))return null;r&&(e=e.replace(/^data-/,""));var m=e.split(i).map(function(f){return"".concat(f.charAt(0).toUpperCase()).concat(f.slice(1))});return m=m.join(""),o&&(m="".concat(m.charAt(0).toLowerCase()).concat(m.slice(1))),m}},{key:"text",value:function(e){var i=e.nodeType;return i===Node.ELEMENT_NODE||i===Node.DOCUMENT_NODE||i===Node.DOCUMENT_FRAGMENT_NODE?e.textContent:i===Node.TEXT_NODE?e.nodeValue:""}},{key:"setText",value:function(e,i){var r=e.nodeType;r!==Node.ELEMENT_NODE&&r!==Node.DOCUMENT_NODE&&r!==Node.DOCUMENT_FRAGMENT_NODE||(e.textContent=i)}},{key:"filterOut",value:function(e,i){var r=this;return e.filter(function(o){return!r.isInArray(o,i)})}},{key:"trimPaddedZerosFromDecimalPlaces",value:function(e){if((e=String(e))==="")return"";var i=V(e.split("."),2),r=i[0],o=i[1];if(this.isUndefinedOrNullOrEmpty(o))return r;var m=o.replace(/0+$/g,"");return m===""?r:"".concat(r,".").concat(m)}},{key:"getHoveredElement",value:function(){var e=c(document.querySelectorAll(":hover"));return e[e.length-1]}},{key:"arrayTrim",value:function(e,i){var r=e.length;return r===0||i>r?e:i<0?[]:(e.length=parseInt(i,10),e)}},{key:"arrayUnique",value:function(){var e;return c(new Set((e=[]).concat.apply(e,arguments)))}},{key:"mergeMaps",value:function(){for(var e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];return new Map(i.reduce(function(o,m){return o.concat(c(m))},[]))}},{key:"objectKeyLookup",value:function(e,i){var r=Object.entries(e).find(function(m){return m[1]===i}),o=null;return r!==void 0&&(o=r[0]),o}},{key:"insertAt",value:function(e,i,r){if(r>(e=String(e)).length)throw new Error("The given index is out of the string range.");if(i.length!==1)throw new Error("The given string `char` should be only one character long.");return e===""&&r===0?i:"".concat(e.slice(0,r)).concat(i).concat(e.slice(r))}},{key:"scientificToDecimal",value:function(e){var i=Number(e);if(isNaN(i))return NaN;if(e=String(e),!this.contains(e,"e")&&!this.contains(e,"E"))return e;var r=V(e.split(/e/i),2),o=r[0],m=r[1],f=o<0;f&&(o=o.replace("-",""));var w=+m<0;w&&(m=m.replace("-",""));var E,O=V(o.split(/\./),2),p=O[0],T=O[1];return w?(E=p.length>m?this.insertAt(p,".",p.length-m):"0.".concat("0".repeat(m-p.length)).concat(p),E="".concat(E).concat(T||"")):T?(o="".concat(p).concat(T),E=m<T.length?this.insertAt(o,".",+m+p.length):"".concat(o).concat("0".repeat(m-T.length))):(o=o.replace(".",""),E="".concat(o).concat("0".repeat(Number(m)))),f&&(E="-".concat(E)),E}}],(k=null)&&mt(_.prototype,k),F&&mt(_,F),Object.defineProperty(_,"prototype",{writable:!1}),s}();function dt(s){return dt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},dt(s)}function $t(s,_){for(var k=0;k<_.length;k++){var F=_[k];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(s,(e=F.key,i=void 0,i=function(r,o){if(dt(r)!=="object"||r===null)return r;var m=r[Symbol.toPrimitive];if(m!==void 0){var f=m.call(r,o||"default");if(dt(f)!=="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(r)}(e,"string"),dt(i)==="symbol"?i:String(i)),F)}var e,i}var Gt=function(){function s(e){if(function(i,r){if(!(i instanceof r))throw new TypeError("Cannot call a class as a function")}(this,s),e===null)throw new Error("Invalid AST")}var _,k,F;return _=s,(k=[{key:"evaluate",value:function(e){if(e==null)throw new Error("Invalid AST sub-tree");if(e.type==="number")return e.value;if(e.type==="unaryMinus")return-this.evaluate(e.left);var i=this.evaluate(e.left),r=this.evaluate(e.right);switch(e.type){case"op_+":return Number(i)+Number(r);case"op_-":return i-r;case"op_*":return i*r;case"op_/":return i/r;default:throw new Error("Invalid operator '".concat(e.type,"'"))}}}])&&$t(_.prototype,k),F&&$t(_,F),Object.defineProperty(_,"prototype",{writable:!1}),s}();function Bt(s){return Bt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},Bt(s)}function ln(s,_){for(var k=0;k<_.length;k++){var F=_[k];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(s,(e=F.key,i=void 0,i=function(r,o){if(Bt(r)!=="object"||r===null)return r;var m=r[Symbol.toPrimitive];if(m!==void 0){var f=m.call(r,o||"default");if(Bt(f)!=="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(r)}(e,"string"),Bt(i)==="symbol"?i:String(i)),F)}var e,i}var pt=function(){function s(){(function(e,i){if(!(e instanceof i))throw new TypeError("Cannot call a class as a function")})(this,s)}var _,k,F;return _=s,F=[{key:"createNode",value:function(e,i,r){var o=new s;return o.type=e,o.left=i,o.right=r,o}},{key:"createUnaryNode",value:function(e){var i=new s;return i.type="unaryMinus",i.left=e,i.right=null,i}},{key:"createLeaf",value:function(e){var i=new s;return i.type="number",i.value=e,i}}],(k=null)&&ln(_.prototype,k),F&&ln(_,F),Object.defineProperty(_,"prototype",{writable:!1}),s}();function Kt(s){return Kt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},Kt(s)}function Si(s,_){for(var k=0;k<_.length;k++){var F=_[k];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(s,(e=F.key,i=void 0,i=function(r,o){if(Kt(r)!=="object"||r===null)return r;var m=r[Symbol.toPrimitive];if(m!==void 0){var f=m.call(r,o||"default");if(Kt(f)!=="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(r)}(e,"string"),Kt(i)==="symbol"?i:String(i)),F)}var e,i}function Pt(s,_,k){return _&&Si(s.prototype,_),k&&Si(s,k),Object.defineProperty(s,"prototype",{writable:!1}),s}var _e=Pt(function s(_,k,F){(function(e,i){if(!(e instanceof i))throw new TypeError("Cannot call a class as a function")})(this,s),this.type=_,this.value=k,this.symbol=F});function x(s){return x=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},x(s)}function C(s,_){for(var k=0;k<_.length;k++){var F=_[k];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(s,(e=F.key,i=void 0,i=function(r,o){if(x(r)!=="object"||r===null)return r;var m=r[Symbol.toPrimitive];if(m!==void 0){var f=m.call(r,o||"default");if(x(f)!=="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(r)}(e,"string"),x(i)==="symbol"?i:String(i)),F)}var e,i}var N=function(){function s(e){(function(i,r){if(!(i instanceof r))throw new TypeError("Cannot call a class as a function")})(this,s),this.text=e,this.textLength=e.length,this.index=0,this.token=new _e("Error",0,0)}var _,k,F;return _=s,k=[{key:"_skipSpaces",value:function(){for(;this.text[this.index]===" "&&this.index<=this.textLength;)this.index++}},{key:"getIndex",value:function(){return this.index}},{key:"getNextToken",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:".";if(this._skipSpaces(),this.textLength===this.index)return this.token.type="EOT",this.token;if(a.isDigit(this.text[this.index]))return this.token.type="num",this.token.value=this._getNumber(e),this.token;switch(this.token.type="Error",this.text[this.index]){case"+":this.token.type="+";break;case"-":this.token.type="-";break;case"*":this.token.type="*";break;case"/":this.token.type="/";break;case"(":this.token.type="(";break;case")":this.token.type=")"}if(this.token.type==="Error")throw new Error("Unexpected token '".concat(this.token.symbol,"' at position '").concat(this.token.index,"' in the token function"));return this.token.symbol=this.text[this.index],this.index++,this.token}},{key:"_getNumber",value:function(e){this._skipSpaces();for(var i=this.index;this.index<=this.textLength&&a.isDigit(this.text[this.index]);)this.index++;for(this.text[this.index]===e&&this.index++;this.index<=this.textLength&&a.isDigit(this.text[this.index]);)this.index++;if(this.index===i)throw new Error("No number has been found while it was expected");return this.text.substring(i,this.index).replace(e,".")}}],k&&C(_.prototype,k),F&&C(_,F),Object.defineProperty(_,"prototype",{writable:!1}),s}();function z(s){return z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},z(s)}function U(s,_){for(var k=0;k<_.length;k++){var F=_[k];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(s,(e=F.key,i=void 0,i=function(r,o){if(z(r)!=="object"||r===null)return r;var m=r[Symbol.toPrimitive];if(m!==void 0){var f=m.call(r,o||"default");if(z(f)!=="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(r)}(e,"string"),z(i)==="symbol"?i:String(i)),F)}var e,i}var ee=function(){function s(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:".";return function(r,o){if(!(r instanceof o))throw new TypeError("Cannot call a class as a function")}(this,s),this.text=e,this.decimalCharacter=i,this.lexer=new N(e),this.token=this.lexer.getNextToken(this.decimalCharacter),this._exp()}var _,k,F;return _=s,(k=[{key:"_exp",value:function(){var e=this._term(),i=this._moreExp();return pt.createNode("op_+",e,i)}},{key:"_moreExp",value:function(){var e,i;switch(this.token.type){case"+":return this.token=this.lexer.getNextToken(this.decimalCharacter),e=this._term(),i=this._moreExp(),pt.createNode("op_+",i,e);case"-":return this.token=this.lexer.getNextToken(this.decimalCharacter),e=this._term(),i=this._moreExp(),pt.createNode("op_-",i,e)}return pt.createLeaf(0)}},{key:"_term",value:function(){var e=this._factor(),i=this._moreTerms();return pt.createNode("op_*",e,i)}},{key:"_moreTerms",value:function(){var e,i;switch(this.token.type){case"*":return this.token=this.lexer.getNextToken(this.decimalCharacter),e=this._factor(),i=this._moreTerms(),pt.createNode("op_*",i,e);case"/":return this.token=this.lexer.getNextToken(this.decimalCharacter),e=this._factor(),i=this._moreTerms(),pt.createNode("op_/",i,e)}return pt.createLeaf(1)}},{key:"_factor",value:function(){var e,i,r;switch(this.token.type){case"num":return r=this.token.value,this.token=this.lexer.getNextToken(this.decimalCharacter),pt.createLeaf(r);case"-":return this.token=this.lexer.getNextToken(this.decimalCharacter),i=this._factor(),pt.createUnaryNode(i);case"(":return this.token=this.lexer.getNextToken(this.decimalCharacter),e=this._exp(),this._match(")"),e;default:throw new Error("Unexpected token '".concat(this.token.symbol,"' with type '").concat(this.token.type,"' at position '").concat(this.token.index,"' in the factor function"))}}},{key:"_match",value:function(e){var i=this.lexer.getIndex()-1;if(this.text[i]!==e)throw new Error("Unexpected token '".concat(this.token.symbol,"' at position '").concat(i,"' in the match function"));this.token=this.lexer.getNextToken(this.decimalCharacter)}}])&&U(_.prototype,k),F&&U(_,F),Object.defineProperty(_,"prototype",{writable:!1}),s}();function ke(s){return function(_){if(Array.isArray(_))return Q(_)}(s)||function(_){if(typeof Symbol<"u"&&_[Symbol.iterator]!=null||_["@@iterator"]!=null)return Array.from(_)}(s)||tt(s)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
4
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function te(s,_){return function(k){if(Array.isArray(k))return k}(s)||function(k,F){var e=k==null?null:typeof Symbol<"u"&&k[Symbol.iterator]||k["@@iterator"];if(e!=null){var i,r,o,m,f=[],w=!0,E=!1;try{if(o=(e=e.call(k)).next,F===0){if(Object(e)!==e)return;w=!1}else for(;!(w=(i=o.call(e)).done)&&(f.push(i.value),f.length!==F);w=!0);}catch(O){E=!0,r=O}finally{try{if(!w&&e.return!=null&&(m=e.return(),Object(m)!==m))return}finally{if(E)throw r}}return f}}(s,_)||tt(s,_)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
5
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function tt(s,_){if(s){if(typeof s=="string")return Q(s,_);var k=Object.prototype.toString.call(s).slice(8,-1);return k==="Object"&&s.constructor&&(k=s.constructor.name),k==="Map"||k==="Set"?Array.from(s):k==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(k)?Q(s,_):void 0}}function Q(s,_){(_==null||_>s.length)&&(_=s.length);for(var k=0,F=new Array(_);k<_;k++)F[k]=s[k];return F}function le(){return le=Object.assign?Object.assign.bind():function(s){for(var _=1;_<arguments.length;_++){var k=arguments[_];for(var F in k)Object.prototype.hasOwnProperty.call(k,F)&&(s[F]=k[F])}return s},le.apply(this,arguments)}function $(s){return $=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},$(s)}function Be(s,_){for(var k=0;k<_.length;k++){var F=_[k];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(s,ne(F.key),F)}}function Z(s,_,k){return(_=ne(_))in s?Object.defineProperty(s,_,{value:k,enumerable:!0,configurable:!0,writable:!0}):s[_]=k,s}function ne(s){var _=function(k,F){if($(k)!=="object"||k===null)return k;var e=k[Symbol.toPrimitive];if(e!==void 0){var i=e.call(k,F||"default");if($(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(F==="string"?String:Number)(k)}(s,"string");return $(_)==="symbol"?_:String(_)}var j,S=function(){function s(){var e=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;(function(p,T){if(!(p instanceof T))throw new TypeError("Cannot call a class as a function")})(this,s);var m=s._setArgumentsValues(i,r,o),f=m.domElement,w=m.initialValue,E=m.userOptions;if(this.domElement=f,this.defaultRawValue="",this._setSettings(E,!1),this._checkElement(),this.savedCancellableValue=null,this.historyTable=[],this.historyTableIndex=-1,this.onGoingRedo=!1,this.parentForm=this._getParentForm(),!this.runOnce&&this.settings.formatOnPageLoad)this._formatDefaultValueOnPageLoad(w);else{var O;if(a.isNull(w))switch(this.settings.emptyInputBehavior){case s.options.emptyInputBehavior.min:O=this.settings.minimumValue;break;case s.options.emptyInputBehavior.max:O=this.settings.maximumValue;break;case s.options.emptyInputBehavior.zero:O="0";break;case s.options.emptyInputBehavior.focus:case s.options.emptyInputBehavior.press:case s.options.emptyInputBehavior.always:O="";break;case s.options.emptyInputBehavior.null:O=null;break;default:O=this.settings.emptyInputBehavior}else O=w;this._setElementAndRawValue(O)}this.runOnce=!0,this.hasEventListeners=!1,(this.isInputElement||this.isContentEditable)&&(this.settings.noEventListeners||this._createEventListeners(),this._setWritePermissions(!0)),this._saveInitialValues(w),this.storageNamePrefix="AUTO_",this._setPersistentStorageName(),this.validState=!0,this.isFocused=!1,this.isWheelEvent=!1,this.isDropEvent=!1,this.isEditing=!1,this.rawValueOnFocus=void 0,this.internalModification=!1,this.attributeToWatch=this._getAttributeToWatch(),this.getterSetter=Object.getOwnPropertyDescriptor(this.domElement.__proto__,this.attributeToWatch),this._addWatcher(),this.settings.createLocalList&&this._createLocalList(),this.constructor._addToGlobalList(this),this.global={set:function(p){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;e.autoNumericLocalList.forEach(function(A){A.set(p,T)})},setUnformatted:function(p){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;e.autoNumericLocalList.forEach(function(A){A.setUnformatted(p,T)})},get:function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,T=[];return e.autoNumericLocalList.forEach(function(A){T.push(A.get())}),e._executeCallback(T,p),T},getNumericString:function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,T=[];return e.autoNumericLocalList.forEach(function(A){T.push(A.getNumericString())}),e._executeCallback(T,p),T},getFormatted:function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,T=[];return e.autoNumericLocalList.forEach(function(A){T.push(A.getFormatted())}),e._executeCallback(T,p),T},getNumber:function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,T=[];return e.autoNumericLocalList.forEach(function(A){T.push(A.getNumber())}),e._executeCallback(T,p),T},getLocalized:function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,T=[];return e.autoNumericLocalList.forEach(function(A){T.push(A.getLocalized())}),e._executeCallback(T,p),T},reformat:function(){e.autoNumericLocalList.forEach(function(p){p.reformat()})},unformat:function(){e.autoNumericLocalList.forEach(function(p){p.unformat()})},unformatLocalized:function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;e.autoNumericLocalList.forEach(function(T){T.unformatLocalized(p)})},update:function(){for(var p=arguments.length,T=new Array(p),A=0;A<p;A++)T[A]=arguments[A];e.autoNumericLocalList.forEach(function(G){G.update.apply(G,T)})},isPristine:function(){var p=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],T=!0;return e.autoNumericLocalList.forEach(function(A){T&&!A.isPristine(p)&&(T=!1)}),T},clear:function(){var p=arguments.length>0&&arguments[0]!==void 0&&arguments[0];e.autoNumericLocalList.forEach(function(T){T.clear(p)})},remove:function(){e.autoNumericLocalList.forEach(function(p){p.remove()})},wipe:function(){e.autoNumericLocalList.forEach(function(p){p.wipe()})},nuke:function(){e.autoNumericLocalList.forEach(function(p){p.nuke()})},has:function(p){return p instanceof s?e.autoNumericLocalList.has(p.node()):e.autoNumericLocalList.has(p)},addObject:function(p){var T,A;p instanceof s?(T=p.node(),A=p):(T=p,A=s.getAutoNumericElement(T)),e._hasLocalList()||e._createLocalList();var G,H=A._getLocalList();H.size===0&&(A._createLocalList(),H=A._getLocalList()),H instanceof Map?G=a.mergeMaps(e._getLocalList(),H):(e._addToLocalList(T,A),G=e._getLocalList()),G.forEach(function(ie){ie._setLocalList(G)})},removeObject:function(p){var T,A,G=arguments.length>1&&arguments[1]!==void 0&&arguments[1];p instanceof s?(T=p.node(),A=p):(T=p,A=s.getAutoNumericElement(T));var H=e.autoNumericLocalList;e.autoNumericLocalList.delete(T),H.forEach(function(ie){ie._setLocalList(e.autoNumericLocalList)}),G||T!==e.node()?A._createLocalList():A._setLocalList(new Map)},empty:function(){var p=arguments.length>0&&arguments[0]!==void 0&&arguments[0];e.autoNumericLocalList.forEach(function(T){p?T._createLocalList():T._setLocalList(new Map)})},elements:function(){var p=[];return e.autoNumericLocalList.forEach(function(T){p.push(T.node())}),p},getList:function(){return e.autoNumericLocalList},size:function(){return e.autoNumericLocalList.size}},this.options={reset:function(){return e.settings={rawValue:e.defaultRawValue},e.update(s.defaultSettings),e},allowDecimalPadding:function(p){return e.update({allowDecimalPadding:p}),e},alwaysAllowDecimalCharacter:function(p){return e.update({alwaysAllowDecimalCharacter:p}),e},caretPositionOnFocus:function(p){return e.settings.caretPositionOnFocus=p,e},createLocalList:function(p){return e.settings.createLocalList=p,e.settings.createLocalList?e._hasLocalList()||e._createLocalList():e._deleteLocalList(),e},currencySymbol:function(p){return e.update({currencySymbol:p}),e},currencySymbolPlacement:function(p){return e.update({currencySymbolPlacement:p}),e},decimalCharacter:function(p){return e.update({decimalCharacter:p}),e},decimalCharacterAlternative:function(p){return e.settings.decimalCharacterAlternative=p,e},decimalPlaces:function(p){return a.warning("Using `options.decimalPlaces()` instead of calling the specific `options.decimalPlacesRawValue()`, `options.decimalPlacesShownOnFocus()` and `options.decimalPlacesShownOnBlur()` methods will reset those options.\nPlease call the specific methods if you do not want to reset those.",e.settings.showWarnings),e.update({decimalPlaces:p}),e},decimalPlacesRawValue:function(p){return e.update({decimalPlacesRawValue:p}),e},decimalPlacesShownOnBlur:function(p){return e.update({decimalPlacesShownOnBlur:p}),e},decimalPlacesShownOnFocus:function(p){return e.update({decimalPlacesShownOnFocus:p}),e},defaultValueOverride:function(p){return e.update({defaultValueOverride:p}),e},digitalGroupSpacing:function(p){return e.update({digitalGroupSpacing:p}),e},digitGroupSeparator:function(p){return e.update({digitGroupSeparator:p}),e},divisorWhenUnfocused:function(p){return e.update({divisorWhenUnfocused:p}),e},emptyInputBehavior:function(p){return e.rawValue===null&&p!==s.options.emptyInputBehavior.null&&(a.warning("You are trying to modify the `emptyInputBehavior` option to something different than `'null'` (".concat(p,"), but the element raw value is currently set to `null`. This would result in an invalid `rawValue`. In order to fix that, the element value has been changed to the empty string `''`."),e.settings.showWarnings),e.rawValue=""),e.update({emptyInputBehavior:p}),e},eventBubbles:function(p){return e.settings.eventBubbles=p,e},eventIsCancelable:function(p){return e.settings.eventIsCancelable=p,e},failOnUnknownOption:function(p){return e.settings.failOnUnknownOption=p,e},formatOnPageLoad:function(p){return e.settings.formatOnPageLoad=p,e},formulaMode:function(p){return e.settings.formulaMode=p,e},historySize:function(p){return e.settings.historySize=p,e},invalidClass:function(p){return e.settings.invalidClass=p,e},isCancellable:function(p){return e.settings.isCancellable=p,e},leadingZero:function(p){return e.update({leadingZero:p}),e},maximumValue:function(p){return e.update({maximumValue:p}),e},minimumValue:function(p){return e.update({minimumValue:p}),e},modifyValueOnUpDownArrow:function(p){return e.settings.modifyValueOnUpDownArrow=p,e},modifyValueOnWheel:function(p){return e.settings.modifyValueOnWheel=p,e},negativeBracketsTypeOnBlur:function(p){return e.update({negativeBracketsTypeOnBlur:p}),e},negativePositiveSignPlacement:function(p){return e.update({negativePositiveSignPlacement:p}),e},negativeSignCharacter:function(p){return e.update({negativeSignCharacter:p}),e},negativePositiveSignBehavior:function(p){return e.settings.negativePositiveSignBehavior=p,e},noEventListeners:function(p){return p===s.options.noEventListeners.noEvents&&e.settings.noEventListeners===s.options.noEventListeners.addEvents&&e._removeEventListeners(),e.update({noEventListeners:p}),e},onInvalidPaste:function(p){return e.settings.onInvalidPaste=p,e},outputFormat:function(p){return e.settings.outputFormat=p,e},overrideMinMaxLimits:function(p){return e.update({overrideMinMaxLimits:p}),e},positiveSignCharacter:function(p){return e.update({positiveSignCharacter:p}),e},rawValueDivisor:function(p){return e.update({rawValueDivisor:p}),e},readOnly:function(p){return e.settings.readOnly=p,e._setWritePermissions(),e},roundingMethod:function(p){return e.update({roundingMethod:p}),e},saveValueToSessionStorage:function(p){return e.update({saveValueToSessionStorage:p}),e},symbolWhenUnfocused:function(p){return e.update({symbolWhenUnfocused:p}),e},selectNumberOnly:function(p){return e.settings.selectNumberOnly=p,e},selectOnFocus:function(p){return e.settings.selectOnFocus=p,e},serializeSpaces:function(p){return e.settings.serializeSpaces=p,e},showOnlyNumbersOnFocus:function(p){return e.update({showOnlyNumbersOnFocus:p}),e},showPositiveSign:function(p){return e.update({showPositiveSign:p}),e},showWarnings:function(p){return e.settings.showWarnings=p,e},styleRules:function(p){return e.update({styleRules:p}),e},suffixText:function(p){return e.update({suffixText:p}),e},unformatOnHover:function(p){return e.settings.unformatOnHover=p,e},unformatOnSubmit:function(p){return e.settings.unformatOnSubmit=p,e},upDownStep:function(p){return e.settings.upDownStep=p,e},valuesToStrings:function(p){return e.update({valuesToStrings:p}),e},watchExternalChanges:function(p){return e.update({watchExternalChanges:p}),e},wheelOn:function(p){return e.settings.wheelOn=p,e},wheelStep:function(p){return e.settings.wheelStep=p,e}},this._triggerEvent(s.events.initialized,this.domElement,{newValue:a.getElementValue(this.domElement),newRawValue:this.rawValue,error:null,aNElement:this})}var _,k,F;return _=s,k=[{key:"_saveInitialValues",value:function(e){this.initialValueHtmlAttribute=a.scientificToDecimal(this.domElement.getAttribute("value")),a.isNull(this.initialValueHtmlAttribute)&&(this.initialValueHtmlAttribute=""),this.initialValue=e,a.isNull(this.initialValue)&&(this.initialValue="")}},{key:"_createEventListeners",value:function(){var e=this;this.formulaMode=!1,this.compositioning=!1,this._onFocusInFunc=function(i){e._onFocusIn(i)},this._onFocusInAndMouseEnterFunc=function(i){e._onFocusInAndMouseEnter(i)},this._onFocusFunc=function(){e._onFocus()},this._onKeydownFunc=function(i){e._onKeydown(i)},this._onKeypressFunc=function(i){e._onKeypress(i)},this._onKeyupFunc=function(i){e._onKeyup(i)},this._onFocusOutAndMouseLeaveFunc=function(i){e._onFocusOutAndMouseLeave(i)},this._onPasteFunc=function(i){e._onPaste(i)},this._onWheelFunc=function(i){e._onWheel(i)},this._onDropFunc=function(i){e._onDrop(i)},this._onKeydownGlobalFunc=function(i){e._onKeydownGlobal(i)},this._onKeyupGlobalFunc=function(i){e._onKeyupGlobal(i)},this._onCompositionstartFunc=function(i){e._onCompositionstart(i)},this._onCompositionendFunc=function(i){e._onCompositionend(i)},this.domElement.addEventListener("focusin",this._onFocusInFunc,!1),this.domElement.addEventListener("focus",this._onFocusInAndMouseEnterFunc,!1),this.domElement.addEventListener("focus",this._onFocusFunc,!1),this.domElement.addEventListener("mouseenter",this._onFocusInAndMouseEnterFunc,!1),this.domElement.addEventListener("keydown",this._onKeydownFunc,!1),this.domElement.addEventListener("keypress",this._onKeypressFunc,!1),this.domElement.addEventListener("keyup",this._onKeyupFunc,!1),this.domElement.addEventListener("blur",this._onFocusOutAndMouseLeaveFunc,!1),this.domElement.addEventListener("mouseleave",this._onFocusOutAndMouseLeaveFunc,!1),this.domElement.addEventListener("paste",this._onPasteFunc,!1),this.domElement.addEventListener("wheel",this._onWheelFunc,!1),this.domElement.addEventListener("drop",this._onDropFunc,!1),this.domElement.addEventListener("compositionstart",this._onCompositionstartFunc,!1),this.domElement.addEventListener("compositionend",this._onCompositionendFunc,!1),this._setupFormListener(),this.hasEventListeners=!0,s._doesGlobalListExists()||(document.addEventListener("keydown",this._onKeydownGlobalFunc,!1),document.addEventListener("keyup",this._onKeyupGlobalFunc,!1))}},{key:"_removeEventListeners",value:function(){this.domElement.removeEventListener("focusin",this._onFocusInFunc,!1),this.domElement.removeEventListener("focus",this._onFocusInAndMouseEnterFunc,!1),this.domElement.removeEventListener("focus",this._onFocusFunc,!1),this.domElement.removeEventListener("mouseenter",this._onFocusInAndMouseEnterFunc,!1),this.domElement.removeEventListener("blur",this._onFocusOutAndMouseLeaveFunc,!1),this.domElement.removeEventListener("mouseleave",this._onFocusOutAndMouseLeaveFunc,!1),this.domElement.removeEventListener("keydown",this._onKeydownFunc,!1),this.domElement.removeEventListener("keypress",this._onKeypressFunc,!1),this.domElement.removeEventListener("keyup",this._onKeyupFunc,!1),this.domElement.removeEventListener("paste",this._onPasteFunc,!1),this.domElement.removeEventListener("wheel",this._onWheelFunc,!1),this.domElement.removeEventListener("drop",this._onDropFunc,!1),this.domElement.removeEventListener("compositionstart",this._onCompositionstartFunc,!1),this.domElement.removeEventListener("compositionend",this._onCompositionendFunc,!1),this._removeFormListener(),this.hasEventListeners=!1,document.removeEventListener("keydown",this._onKeydownGlobalFunc,!1),document.removeEventListener("keyup",this._onKeyupGlobalFunc,!1)}},{key:"_updateEventListeners",value:function(){this.settings.noEventListeners||this.hasEventListeners||this._createEventListeners(),this.settings.noEventListeners&&this.hasEventListeners&&this._removeEventListeners()}},{key:"_setupFormListener",value:function(){var e=this;a.isNull(this.parentForm)||(this._onFormSubmitFunc=function(){e._onFormSubmit()},this._onFormResetFunc=function(){e._onFormReset()},this._hasParentFormCounter()?this._incrementParentFormCounter():(this._initializeFormCounterToOne(),this.parentForm.addEventListener("submit",this._onFormSubmitFunc,!1),this.parentForm.addEventListener("reset",this._onFormResetFunc,!1),this._storeFormHandlerFunction()))}},{key:"_removeFormListener",value:function(){if(!a.isNull(this.parentForm)){var e=this._getParentFormCounter();e===1?(this.parentForm.removeEventListener("submit",this._getFormHandlerFunction().submitFn,!1),this.parentForm.removeEventListener("reset",this._getFormHandlerFunction().resetFn,!1),this._removeFormDataSetInfo()):e>1?this._decrementParentFormCounter():a.throwError("The AutoNumeric object count on the form is incoherent.")}}},{key:"_hasParentFormCounter",value:function(){return"anCount"in this.parentForm.dataset}},{key:"_getParentFormCounter",value:function(){return Number(this.parentForm.dataset.anCount)}},{key:"_initializeFormCounterToOne",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;this._getFormElement(e).dataset.anCount=1}},{key:"_incrementParentFormCounter",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;this._getFormElement(e).dataset.anCount++}},{key:"_decrementParentFormCounter",value:function(){this.parentForm.dataset.anCount--}},{key:"_hasFormHandlerFunction",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return"anFormHandler"in this._getFormElement(e).dataset}},{key:"_getFormElement",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return a.isNull(e)?this.parentForm:e}},{key:"_storeFormHandlerFunction",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;this.constructor._doesFormHandlerListExists()||this.constructor._createFormHandlerList();var i=a.randomString();this._getFormElement(e).dataset.anFormHandler=i,window.aNFormHandlerMap.set(i,{submitFn:this._onFormSubmitFunc,resetFn:this._onFormResetFunc})}},{key:"_getFormHandlerKey",value:function(){this._hasFormHandlerFunction()||a.throwError("Unable to retrieve the form handler name");var e=this.parentForm.dataset.anFormHandler;return e===""&&a.throwError("The form handler name is invalid"),e}},{key:"_getFormHandlerFunction",value:function(){var e=this._getFormHandlerKey();return window.aNFormHandlerMap.get(e)}},{key:"_removeFormDataSetInfo",value:function(){this._decrementParentFormCounter(),window.aNFormHandlerMap.delete(this._getFormHandlerKey()),this.parentForm.removeAttribute("data-an-count"),this.parentForm.removeAttribute("data-an-form-handler")}},{key:"_setWritePermissions",value:function(){arguments.length>0&&arguments[0]!==void 0&&arguments[0]&&this.domElement.readOnly||this.settings.readOnly?this._setReadOnly():this._setReadWrite()}},{key:"_setReadOnly",value:function(){this.isInputElement?this.domElement.readOnly=!0:this.domElement.setAttribute("contenteditable",!1)}},{key:"_setReadWrite",value:function(){this.isInputElement?this.domElement.readOnly=!1:this.domElement.setAttribute("contenteditable",!0)}},{key:"_addWatcher",value:function(){var e=this;if(!a.isUndefined(this.getterSetter)){var i=this.getterSetter,r=i.set,o=i.get;Object.defineProperty(this.domElement,this.attributeToWatch,{configurable:!0,get:function(){return o.call(e.domElement)},set:function(m){r.call(e.domElement,m),e.settings.watchExternalChanges&&!e.internalModification&&e.set(m)}})}}},{key:"_removeWatcher",value:function(){var e=this;if(!a.isUndefined(this.getterSetter)){var i=this.getterSetter,r=i.set,o=i.get;Object.defineProperty(this.domElement,this.attributeToWatch,{configurable:!0,get:function(){return o.call(e.domElement)},set:function(m){r.call(e.domElement,m)}})}}},{key:"_getAttributeToWatch",value:function(){var e;if(this.isInputElement)e="value";else{var i=this.domElement.nodeType;i===Node.ELEMENT_NODE||i===Node.DOCUMENT_NODE||i===Node.DOCUMENT_FRAGMENT_NODE?e="textContent":i===Node.TEXT_NODE&&(e="nodeValue")}return e}},{key:"_historyTableAdd",value:function(){var e=this.historyTable.length===0;if(e||this.rawValue!==this._historyTableCurrentValueUsed()){var i=!0;if(!e){var r=this.historyTableIndex+1;r<this.historyTable.length&&this.rawValue===this.historyTable[r].value?i=!1:a.arrayTrim(this.historyTable,this.historyTableIndex+1)}if(this.historyTableIndex++,i){var o=a.getElementSelection(this.domElement);this.selectionStart=o.start,this.selectionEnd=o.end,this.historyTable.push({value:this.rawValue,start:this.selectionStart+1,end:this.selectionEnd+1}),this.historyTable.length>1&&(this.historyTable[this.historyTableIndex-1].start=this.selectionStart,this.historyTable[this.historyTableIndex-1].end=this.selectionEnd)}this.historyTable.length>this.settings.historySize&&this._historyTableForget()}}},{key:"_historyTableUndoOrRedo",value:function(){var e;if(arguments.length>0&&arguments[0]!==void 0&&!arguments[0]?(e=this.historyTableIndex+1<this.historyTable.length)&&this.historyTableIndex++:(e=this.historyTableIndex>0)&&this.historyTableIndex--,e){var i=this.historyTable[this.historyTableIndex];this.set(i.value,null,!1),a.setElementSelection(this.domElement,i.start,i.end)}}},{key:"_historyTableUndo",value:function(){this._historyTableUndoOrRedo(!0)}},{key:"_historyTableRedo",value:function(){this._historyTableUndoOrRedo(!1)}},{key:"_historyTableForget",value:function(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,i=[],r=0;r<e;r++)i.push(this.historyTable.shift()),this.historyTableIndex--,this.historyTableIndex<0&&(this.historyTableIndex=0);return i.length===1?i[0]:i}},{key:"_historyTableCurrentValueUsed",value:function(){var e=this.historyTableIndex;return e<0&&(e=0),a.isUndefinedOrNullOrEmpty(this.historyTable[e])?"":this.historyTable[e].value}},{key:"_parseStyleRules",value:function(){var e=this;a.isUndefinedOrNullOrEmpty(this.settings.styleRules)||this.rawValue===""||(a.isUndefinedOrNullOrEmpty(this.settings.styleRules.positive)||(this.rawValue>=0?this._addCSSClass(this.settings.styleRules.positive):this._removeCSSClass(this.settings.styleRules.positive)),a.isUndefinedOrNullOrEmpty(this.settings.styleRules.negative)||(this.rawValue<0?this._addCSSClass(this.settings.styleRules.negative):this._removeCSSClass(this.settings.styleRules.negative)),a.isUndefinedOrNullOrEmpty(this.settings.styleRules.ranges)||this.settings.styleRules.ranges.length===0||this.settings.styleRules.ranges.forEach(function(i){e.rawValue>=i.min&&e.rawValue<i.max?e._addCSSClass(i.class):e._removeCSSClass(i.class)}),a.isUndefinedOrNullOrEmpty(this.settings.styleRules.userDefined)||this.settings.styleRules.userDefined.length===0||this.settings.styleRules.userDefined.forEach(function(i){if(a.isFunction(i.callback))if(a.isString(i.classes))i.callback(e.rawValue)?e._addCSSClass(i.classes):e._removeCSSClass(i.classes);else if(a.isArray(i.classes))if(i.classes.length===2)i.callback(e.rawValue)?(e._addCSSClass(i.classes[0]),e._removeCSSClass(i.classes[1])):(e._removeCSSClass(i.classes[0]),e._addCSSClass(i.classes[1]));else if(i.classes.length>2){var r=i.callback(e.rawValue);a.isArray(r)?i.classes.forEach(function(o,m){a.isInArray(m,r)?e._addCSSClass(o):e._removeCSSClass(o)}):a.isInt(r)?i.classes.forEach(function(o,m){m===r?e._addCSSClass(o):e._removeCSSClass(o)}):a.isNull(r)?i.classes.forEach(function(o){e._removeCSSClass(o)}):a.throwError("The callback result is not an array nor a valid array index, ".concat($(r)," given."))}else a.throwError("The classes attribute is not valid for the `styleRules` option.");else a.isUndefinedOrNullOrEmpty(i.classes)?i.callback(e):a.throwError("The callback/classes structure is not valid for the `styleRules` option.");else a.warning("The given `styleRules` callback is not a function, ".concat($(i.callback)," given."),e.settings.showWarnings)}))}},{key:"_addCSSClass",value:function(e){this.domElement.classList.add(e)}},{key:"_removeCSSClass",value:function(e){this.domElement.classList.remove(e)}},{key:"update",value:function(){for(var e=this,i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];Array.isArray(r)&&Array.isArray(r[0])&&(r=r[0]);var m=a.cloneObject(this.settings),f=this.rawValue,w={};a.isUndefinedOrNullOrEmpty(r)||r.length===0?w=null:r.length>=1&&r.forEach(function(E){e.constructor._isPreDefinedOptionValid(E)&&(E=e.constructor._getOptionObject(E)),le(w,E)});try{this._setSettings(w,!0),this._setWritePermissions(),this._updateEventListeners(),this.set(f)}catch(E){return this._setSettings(m,!0),a.throwError("Unable to update the settings, those are invalid: [".concat(E,"]")),this}return this}},{key:"getSettings",value:function(){return this.settings}},{key:"set",value:function(e){var i,r,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,m=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];if(a.isUndefined(e))return a.warning("You are trying to set an 'undefined' value ; an error could have occurred.",this.settings.showWarnings),this;if(a.isNull(o)||this._setSettings(o,!0),e===null&&this.settings.emptyInputBehavior!==s.options.emptyInputBehavior.null)return a.warning("You are trying to set the `null` value while the `emptyInputBehavior` option is set to ".concat(this.settings.emptyInputBehavior,". If you want to be able to set the `null` value, you need to change the 'emptyInputBehavior' option to `'null'`."),this.settings.showWarnings),this;if(e===null)return this._setElementAndRawValue(null,null,m),this._saveValueToPersistentStorage(),this;if(i=this.constructor._toNumericValue(e,this.settings),isNaN(Number(i)))return a.warning("The value you are trying to set results in `NaN`. The element value is set to the empty string instead.",this.settings.showWarnings),this.setValue("",m),this;if(i==="")switch(this.settings.emptyInputBehavior){case s.options.emptyInputBehavior.zero:i=0;break;case s.options.emptyInputBehavior.min:i=this.settings.minimumValue;break;case s.options.emptyInputBehavior.max:i=this.settings.maximumValue;break;default:a.isNumber(this.settings.emptyInputBehavior)&&(i=Number(this.settings.emptyInputBehavior))}if(i!==""){var f=te(this.constructor._checkIfInRangeWithOverrideOption(i,this.settings),2),w=f[0],E=f[1];if(w&&E&&this.settings.valuesToStrings&&this._checkValuesToStrings(i))return this._setElementAndRawValue(this.settings.valuesToStrings[i],i,m),this._saveValueToPersistentStorage(),this;if(a.isZeroOrHasNoValue(i)&&(i="0"),w&&E){var O=this.constructor._roundRawValue(i,this.settings);return O=this._trimLeadingAndTrailingZeros(O.replace(this.settings.decimalCharacter,".")),i=this._getRawValueToFormat(i),this.isFocused?i=this.constructor._roundFormattedValueShownOnFocus(i,this.settings):(this.settings.divisorWhenUnfocused&&(i=(i/=this.settings.divisorWhenUnfocused).toString()),i=this.constructor._roundFormattedValueShownOnBlur(i,this.settings)),i=this.constructor._modifyNegativeSignAndDecimalCharacterForFormattedValue(i,this.settings),i=this.constructor._addGroupSeparators(i,this.settings,this.isFocused,this.rawValue,O),!this.isFocused&&this.settings.symbolWhenUnfocused&&(i="".concat(i).concat(this.settings.symbolWhenUnfocused)),(this.settings.decimalPlacesShownOnFocus||this.settings.divisorWhenUnfocused)&&this._saveValueToPersistentStorage(),this._setElementAndRawValue(i,O,m),this._setValidOrInvalidState(O),this}return this._triggerRangeEvents(w,E),a.throwError("The value [".concat(i,"] being set falls outside of the minimumValue [").concat(this.settings.minimumValue,"] and maximumValue [").concat(this.settings.maximumValue,"] range set for this element")),this._removeValueFromPersistentStorage(),this.setValue("",m),this}return r=this.settings.emptyInputBehavior===s.options.emptyInputBehavior.always?this.settings.currencySymbol:"",this._setElementAndRawValue(r,"",m),this}},{key:"setUnformatted",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(e===null||a.isUndefined(e))return this;a.isNull(i)||this._setSettings(i,!0);var r=this.constructor._removeBrackets(e,this.settings),o=this.constructor._stripAllNonNumberCharacters(r,this.settings,!0,this.isFocused);return a.isNumber(o)||a.throwError("The value is not a valid one, it's not a numeric string nor a recognized currency."),this.constructor._isWithinRangeWithOverrideOption(o,this.settings)?this.setValue(e):a.throwError("The value is out of the range limits [".concat(this.settings.minimumValue,", ").concat(this.settings.maximumValue,"].")),this}},{key:"setValue",value:function(e){var i=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return this._setElementAndRawValue(e,i),this}},{key:"_setRawValue",value:function(e){var i=this,r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];if(this.rawValue!==e){var o=this.rawValue;this.rawValue=e,!a.isNull(this.settings.rawValueDivisor)&&this.settings.rawValueDivisor!==0&&e!==""&&e!==null&&this._isUserManuallyEditingTheValue()&&(this.rawValue/=this.settings.rawValueDivisor),this._triggerEvent(s.events.rawValueModified,this.domElement,{oldRawValue:o,newRawValue:this.rawValue,isPristine:this.isPristine(!0),error:null,aNElement:this}),this._parseStyleRules(),r&&window.requestAnimationFrame(function(){return i._historyTableAdd()})}}},{key:"_setElementValue",value:function(e){var i=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],r=a.getElementValue(this.domElement);return e!==r&&(this.internalModification=!0,a.setElementValue(this.domElement,e),this.internalModification=!1,i&&this._triggerEvent(s.events.formatted,this.domElement,{oldValue:r,newValue:e,oldRawValue:this.rawValue,newRawValue:this.rawValue,isPristine:this.isPristine(!1),error:null,aNElement:this})),this}},{key:"_setElementAndRawValue",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,r=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];return a.isNull(i)?i=e:a.isBoolean(i)&&(r=i,i=e),this._setElementValue(e),this._setRawValue(i,r),this}},{key:"_getRawValueToFormat",value:function(e){return a.isNull(this.settings.rawValueDivisor)||this.settings.rawValueDivisor===0||e===""||e===null?e:e*this.settings.rawValueDivisor}},{key:"_checkValuesToStrings",value:function(e){return this.constructor._checkValuesToStringsArray(e,this.valuesToStringsKeys)}},{key:"_isUserManuallyEditingTheValue",value:function(){return this.isFocused&&this.isEditing||this.isDropEvent}},{key:"_executeCallback",value:function(e,i){!a.isNull(i)&&a.isFunction(i)&&i(e,this)}},{key:"_triggerEvent",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:document,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;a.triggerEvent(e,i,r,this.settings.eventBubbles,this.settings.eventIsCancelable)}},{key:"get",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return this.getNumericString(e)}},{key:"getNumericString",value:function(){var e,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return e=a.isNull(this.rawValue)?null:a.trimPaddedZerosFromDecimalPlaces(this.rawValue),this._executeCallback(e,i),e}},{key:"getFormatted",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;"value"in this.domElement||"textContent"in this.domElement||a.throwError("Unable to get the formatted string from the element.");var i=a.getElementValue(this.domElement);return this._executeCallback(i,e),i}},{key:"getNumber",value:function(){var e,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return e=this.rawValue===null?null:this.constructor._toLocale(this.getNumericString(),"number",this.settings),this._executeCallback(e,i),e}},{key:"getLocalized",value:function(){var e,i,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;a.isFunction(r)&&a.isNull(o)&&(o=r,r=null),(e=a.isEmptyString(this.rawValue)?"":""+Number(this.rawValue))!=""&&Number(e)===0&&this.settings.leadingZero!==s.options.leadingZero.keep&&(e="0"),i=a.isNull(r)?this.settings.outputFormat:r;var m=this.constructor._toLocale(e,i,this.settings);return this._executeCallback(m,o),m}},{key:"reformat",value:function(){return this.set(this.rawValue),this}},{key:"unformat",value:function(){return this._setElementValue(this.getNumericString()),this}},{key:"unformatLocalized",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return this._setElementValue(this.getLocalized(e)),this}},{key:"isPristine",value:function(){return arguments.length>0&&arguments[0]!==void 0&&!arguments[0]?this.initialValueHtmlAttribute===this.getFormatted():this.initialValue===this.getNumericString()}},{key:"select",value:function(){return this.settings.selectNumberOnly?this.selectNumber():this._defaultSelectAll(),this}},{key:"_defaultSelectAll",value:function(){a.setElementSelection(this.domElement,0,a.getElementValue(this.domElement).length)}},{key:"selectNumber",value:function(){var e,i,r=a.getElementValue(this.domElement),o=r.length,m=this.settings.currencySymbol.length,f=this.settings.currencySymbolPlacement,w=a.isNegative(r,this.settings.negativeSignCharacter)?1:0,E=this.settings.suffixText.length;if(e=f===s.options.currencySymbolPlacement.suffix?0:this.settings.negativePositiveSignPlacement===s.options.negativePositiveSignPlacement.left&&w===1&&m>0?m+1:m,f===s.options.currencySymbolPlacement.prefix)i=o-E;else switch(this.settings.negativePositiveSignPlacement){case s.options.negativePositiveSignPlacement.left:i=o-(E+m);break;case s.options.negativePositiveSignPlacement.right:i=m>0?o-(m+w+E):o-(m+E);break;default:i=o-(m+E)}return a.setElementSelection(this.domElement,e,i),this}},{key:"selectInteger",value:function(){var e=0,i=this.rawValue>=0;this.settings.currencySymbolPlacement!==s.options.currencySymbolPlacement.prefix&&(this.settings.currencySymbolPlacement!==s.options.currencySymbolPlacement.suffix||this.settings.negativePositiveSignPlacement!==s.options.negativePositiveSignPlacement.prefix&&this.settings.negativePositiveSignPlacement!==s.options.negativePositiveSignPlacement.none)||(this.settings.showPositiveSign&&i||!i&&this.settings.currencySymbolPlacement===s.options.currencySymbolPlacement.prefix&&this.settings.negativePositiveSignPlacement===s.options.negativePositiveSignPlacement.left)&&(e+=1),this.settings.currencySymbolPlacement===s.options.currencySymbolPlacement.prefix&&(e+=this.settings.currencySymbol.length);var r=a.getElementValue(this.domElement),o=r.indexOf(this.settings.decimalCharacter);return o===-1&&(o=this.settings.currencySymbolPlacement===s.options.currencySymbolPlacement.suffix?r.length-this.settings.currencySymbol.length:r.length,i||this.settings.negativePositiveSignPlacement!==s.options.negativePositiveSignPlacement.suffix&&this.settings.currencySymbolPlacement!==s.options.currencySymbolPlacement.suffix||(o-=1),o-=this.settings.suffixText.length),a.setElementSelection(this.domElement,e,o),this}},{key:"selectDecimal",value:function(){var e,i,r=a.getElementValue(this.domElement).indexOf(this.settings.decimalCharacter);return r===-1?(r=0,e=0):(r+=1,i=this.isFocused?this.settings.decimalPlacesShownOnFocus:this.settings.decimalPlacesShownOnBlur,e=r+Number(i)),a.setElementSelection(this.domElement,r,e),this}},{key:"node",value:function(){return this.domElement}},{key:"parent",value:function(){return this.domElement.parentNode}},{key:"detach",value:function(){var e,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return e=a.isNull(i)?this.domElement:i.node(),this._removeFromLocalList(e),this}},{key:"attach",value:function(e){var i=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return this._addToLocalList(e.node()),i&&e.update(this.settings),this}},{key:"formatOther",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return this._formatOrUnformatOther(!0,e,i)}},{key:"unformatOther",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return this._formatOrUnformatOther(!1,e,i)}},{key:"_formatOrUnformatOther",value:function(e,i){var r,o,m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(r=a.isNull(m)?this.settings:this._cloneAndMergeSettings(m),a.isElement(i)){var f=a.getElementValue(i);return o=e?s.format(f,r):s.unformat(f,r),a.setElementValue(i,o),null}return o=e?s.format(i,r):s.unformat(i,r)}},{key:"init",value:function(e){var i=this,r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],o=!1,m=[];if(a.isString(e)?m=ke(document.querySelectorAll(e)):a.isElement(e)?(m.push(e),o=!0):a.isArray(e)?m=e:a.throwError("The given parameters to the 'init' function are invalid."),m.length===0)return a.warning("No valid DOM elements were given hence no AutoNumeric object were instantiated.",!0),[];var f=this._getLocalList(),w=[];return m.forEach(function(E){var O=i.settings.createLocalList;r&&(i.settings.createLocalList=!1);var p=new s(E,a.getElementValue(E),i.settings);r&&(p._setLocalList(f),i._addToLocalList(E,p),i.settings.createLocalList=O),w.push(p)}),o?w[0]:w}},{key:"clear",value:function(){if(arguments.length>0&&arguments[0]!==void 0&&arguments[0]){var e={emptyInputBehavior:s.options.emptyInputBehavior.focus};this.set("",e)}else this.set("");return this}},{key:"remove",value:function(){this._removeValueFromPersistentStorage(),this._removeEventListeners(),this._removeWatcher(),this._removeFromLocalList(this.domElement),this.constructor._removeFromGlobalList(this)}},{key:"wipe",value:function(){this._setElementValue("",!1),this.remove()}},{key:"nuke",value:function(){this.remove(),this.domElement.parentNode.removeChild(this.domElement)}},{key:"form",value:function(){if(arguments.length>0&&arguments[0]!==void 0&&arguments[0]||a.isUndefinedOrNullOrEmpty(this.parentForm)){var e=this._getParentForm();if(!a.isNull(e)&&e!==this.parentForm){var i=this._getFormAutoNumericChildren(this.parentForm);this.parentForm.dataset.anCount=i.length,this._hasFormHandlerFunction(e)?this._incrementParentFormCounter(e):(this._storeFormHandlerFunction(e),this._initializeFormCounterToOne(e))}this.parentForm=e}return this.parentForm}},{key:"_getFormAutoNumericChildren",value:function(e){var i=this,r=ke(e.elements),o=this._getContenteditableElements(e);return a.arrayUnique(r,o).filter(function(m){return i.constructor.isManagedByAutoNumeric(m)})}},{key:"_getContenteditableElements",value:function(e){if(a.isUndefinedOrNullOrEmpty(e)||!e.hasAttribute("id"))return[];var i=ke(e.querySelectorAll("[contenteditable=true]")),r=ke(document.querySelectorAll("*:not(input)[form=".concat(e.getAttribute("id"),"][contenteditable=true]")));return a.arrayUnique(i,r)}},{key:"_getParentForm",value:function(){if(!a.isUndefined(this.domElement.form))return this.domElement.form;if(this.domElement.tagName.toLowerCase()==="body")return null;var e,i=this.domElement;do{if(i=i.parentNode,a.isNull(i))return null;if((e=i.tagName?i.tagName.toLowerCase():"")==="body")break}while(e!=="form");return e==="form"?i:null}},{key:"formNumericString",value:function(){return this.constructor._serializeNumericString(this.form(),this.settings.serializeSpaces)}},{key:"formFormatted",value:function(){return this.constructor._serializeFormatted(this.form(),this.settings.serializeSpaces)}},{key:"formLocalized",value:function(){var e,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return e=a.isNull(i)?this.settings.outputFormat:i,this.constructor._serializeLocalized(this.form(),this.settings.serializeSpaces,e)}},{key:"formArrayNumericString",value:function(){return this.constructor._serializeNumericStringArray(this.form(),this.settings.serializeSpaces)}},{key:"formArrayFormatted",value:function(){return this.constructor._serializeFormattedArray(this.form(),this.settings.serializeSpaces)}},{key:"formArrayLocalized",value:function(){var e,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return e=a.isNull(i)?this.settings.outputFormat:i,this.constructor._serializeLocalizedArray(this.form(),this.settings.serializeSpaces,e)}},{key:"formJsonNumericString",value:function(){return JSON.stringify(this.formArrayNumericString())}},{key:"formJsonFormatted",value:function(){return JSON.stringify(this.formArrayFormatted())}},{key:"formJsonLocalized",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return JSON.stringify(this.formArrayLocalized(e))}},{key:"formUnformat",value:function(){return this.constructor._getChildANInputElement(this.form()).forEach(function(e){s.getAutoNumericElement(e).unformat()}),this}},{key:"formUnformatLocalized",value:function(){return this.constructor._getChildANInputElement(this.form()).forEach(function(e){s.getAutoNumericElement(e).unformatLocalized()}),this}},{key:"formReformat",value:function(){return this.constructor._getChildANInputElement(this.form()).forEach(function(e){s.getAutoNumericElement(e).reformat()}),this}},{key:"formSubmitNumericString",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return a.isNull(e)?(this.formUnformat(),this.form().submit(),this.formReformat()):a.isFunction(e)?e(this.formNumericString()):a.throwError("The given callback is not a function."),this}},{key:"formSubmitFormatted",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return a.isNull(e)?this.form().submit():a.isFunction(e)?e(this.formFormatted()):a.throwError("The given callback is not a function."),this}},{key:"formSubmitLocalized",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return a.isNull(i)?(this.formUnformatLocalized(),this.form().submit(),this.formReformat()):a.isFunction(i)?i(this.formLocalized(e)):a.throwError("The given callback is not a function."),this}},{key:"formSubmitArrayNumericString",value:function(e){return a.isFunction(e)?e(this.formArrayNumericString()):a.throwError("The given callback is not a function."),this}},{key:"formSubmitArrayFormatted",value:function(e){return a.isFunction(e)?e(this.formArrayFormatted()):a.throwError("The given callback is not a function."),this}},{key:"formSubmitArrayLocalized",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return a.isFunction(e)?e(this.formArrayLocalized(i)):a.throwError("The given callback is not a function."),this}},{key:"formSubmitJsonNumericString",value:function(e){return a.isFunction(e)?e(this.formJsonNumericString()):a.throwError("The given callback is not a function."),this}},{key:"formSubmitJsonFormatted",value:function(e){return a.isFunction(e)?e(this.formJsonFormatted()):a.throwError("The given callback is not a function."),this}},{key:"formSubmitJsonLocalized",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return a.isFunction(e)?e(this.formJsonLocalized(i)):a.throwError("The given callback is not a function."),this}},{key:"_createLocalList",value:function(){this.autoNumericLocalList=new Map,this._addToLocalList(this.domElement)}},{key:"_deleteLocalList",value:function(){delete this.autoNumericLocalList}},{key:"_setLocalList",value:function(e){this.autoNumericLocalList=e}},{key:"_getLocalList",value:function(){return this.autoNumericLocalList}},{key:"_hasLocalList",value:function(){return this.autoNumericLocalList instanceof Map&&this.autoNumericLocalList.size!==0}},{key:"_addToLocalList",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;a.isNull(i)&&(i=this),a.isUndefined(this.autoNumericLocalList)?a.throwError("The local list provided does not exists when trying to add an element. [".concat(this.autoNumericLocalList,"] given.")):this.autoNumericLocalList.set(e,i)}},{key:"_removeFromLocalList",value:function(e){a.isUndefined(this.autoNumericLocalList)?this.settings.createLocalList&&a.throwError("The local list provided does not exists when trying to remove an element. [".concat(this.autoNumericLocalList,"] given.")):this.autoNumericLocalList.delete(e)}},{key:"_mergeSettings",value:function(){for(var e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];le.apply(void 0,[this.settings].concat(i))}},{key:"_cloneAndMergeSettings",value:function(){for(var e={},i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return le.apply(void 0,[e,this.settings].concat(r)),e}},{key:"_updatePredefinedOptions",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return a.isNull(i)?this.update(e):(this._mergeSettings(e,i),this.update(this.settings)),this}},{key:"french",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return this._updatePredefinedOptions(s.getPredefinedOptions().French,e),this}},{key:"northAmerican",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return this._updatePredefinedOptions(s.getPredefinedOptions().NorthAmerican,e),this}},{key:"british",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return this._updatePredefinedOptions(s.getPredefinedOptions().British,e),this}},{key:"swiss",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return this._updatePredefinedOptions(s.getPredefinedOptions().Swiss,e),this}},{key:"japanese",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return this._updatePredefinedOptions(s.getPredefinedOptions().Japanese,e),this}},{key:"spanish",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return this._updatePredefinedOptions(s.getPredefinedOptions().Spanish,e),this}},{key:"chinese",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return this._updatePredefinedOptions(s.getPredefinedOptions().Chinese,e),this}},{key:"brazilian",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return this._updatePredefinedOptions(s.getPredefinedOptions().Brazilian,e),this}},{key:"_runCallbacksFoundInTheSettingsObject",value:function(){for(var e in this.settings)if(Object.prototype.hasOwnProperty.call(this.settings,e)){var i=this.settings[e];if(typeof i=="function")this.settings[e]=i(this,e);else{var r="";e in this.domElement.dataset&&(r=this.domElement.dataset[e]),r=a.camelize(r),typeof this.settings[r]=="function"&&(this.settings[e]=r(this,e))}}}},{key:"_setTrailingNegativeSignInfo",value:function(){this.isTrailingNegative=this.settings.currencySymbolPlacement===s.options.currencySymbolPlacement.prefix&&this.settings.negativePositiveSignPlacement===s.options.negativePositiveSignPlacement.suffix||this.settings.currencySymbolPlacement===s.options.currencySymbolPlacement.suffix&&(this.settings.negativePositiveSignPlacement===s.options.negativePositiveSignPlacement.left||this.settings.negativePositiveSignPlacement===s.options.negativePositiveSignPlacement.right)}},{key:"_modifyNegativeSignAndDecimalCharacterForRawValue",value:function(e){return this.settings.decimalCharacter!=="."&&(e=e.replace(this.settings.decimalCharacter,".")),this.settings.negativeSignCharacter!=="-"&&this.settings.isNegativeSignAllowed&&(e=e.replace(this.settings.negativeSignCharacter,"-")),e.match(/\d/)||(e+="0"),e}},{key:"_initialCaretPosition",value:function(e){a.isNull(this.settings.caretPositionOnFocus)&&this.settings.selectOnFocus===s.options.selectOnFocus.doNotSelect&&a.throwError("`_initialCaretPosition()` should never be called when the `caretPositionOnFocus` option is `null`.");var i=this.rawValue<0,r=a.isZeroOrHasNoValue(e),o=e.length,m=0,f=0,w=!1,E=0;this.settings.caretPositionOnFocus!==s.options.caretPositionOnFocus.start&&(m=(e=(e=(e=e.replace(this.settings.negativeSignCharacter,"")).replace(this.settings.positiveSignCharacter,"")).replace(this.settings.currencySymbol,"")).length,w=a.contains(e,this.settings.decimalCharacter),this.settings.caretPositionOnFocus!==s.options.caretPositionOnFocus.decimalLeft&&this.settings.caretPositionOnFocus!==s.options.caretPositionOnFocus.decimalRight||(w?(f=e.indexOf(this.settings.decimalCharacter),E=this.settings.decimalCharacter.length):(f=m,E=0)));var O="";i?O=this.settings.negativeSignCharacter:this.settings.showPositiveSign&&!r&&(O=this.settings.positiveSignCharacter);var p,T=O.length,A=this.settings.currencySymbol.length;if(this.settings.currencySymbolPlacement===s.options.currencySymbolPlacement.prefix){if(this.settings.caretPositionOnFocus===s.options.caretPositionOnFocus.start)if(this.settings.negativePositiveSignPlacement!==s.options.negativePositiveSignPlacement.none&&(i||!i&&this.settings.showPositiveSign&&!r))switch(this.settings.negativePositiveSignPlacement){case s.options.negativePositiveSignPlacement.prefix:case s.options.negativePositiveSignPlacement.left:case s.options.negativePositiveSignPlacement.right:p=T+A;break;case s.options.negativePositiveSignPlacement.suffix:p=A}else p=A;else if(this.settings.caretPositionOnFocus===s.options.caretPositionOnFocus.end)if(this.settings.negativePositiveSignPlacement!==s.options.negativePositiveSignPlacement.none&&(i||!i&&this.settings.showPositiveSign&&!r))switch(this.settings.negativePositiveSignPlacement){case s.options.negativePositiveSignPlacement.prefix:case s.options.negativePositiveSignPlacement.left:case s.options.negativePositiveSignPlacement.right:p=o;break;case s.options.negativePositiveSignPlacement.suffix:p=A+m}else p=o;else if(this.settings.caretPositionOnFocus===s.options.caretPositionOnFocus.decimalLeft)if(this.settings.negativePositiveSignPlacement!==s.options.negativePositiveSignPlacement.none&&(i||!i&&this.settings.showPositiveSign&&!r))switch(this.settings.negativePositiveSignPlacement){case s.options.negativePositiveSignPlacement.prefix:case s.options.negativePositiveSignPlacement.left:case s.options.negativePositiveSignPlacement.right:p=T+A+f;break;case s.options.negativePositiveSignPlacement.suffix:p=A+f}else p=A+f;else if(this.settings.caretPositionOnFocus===s.options.caretPositionOnFocus.decimalRight)if(this.settings.negativePositiveSignPlacement!==s.options.negativePositiveSignPlacement.none&&(i||!i&&this.settings.showPositiveSign&&!r))switch(this.settings.negativePositiveSignPlacement){case s.options.negativePositiveSignPlacement.prefix:case s.options.negativePositiveSignPlacement.left:case s.options.negativePositiveSignPlacement.right:p=T+A+f+E;break;case s.options.negativePositiveSignPlacement.suffix:p=A+f+E}else p=A+f+E}else if(this.settings.currencySymbolPlacement===s.options.currencySymbolPlacement.suffix){if(this.settings.caretPositionOnFocus===s.options.caretPositionOnFocus.start)if(this.settings.negativePositiveSignPlacement!==s.options.negativePositiveSignPlacement.none&&(i||!i&&this.settings.showPositiveSign&&!r))switch(this.settings.negativePositiveSignPlacement){case s.options.negativePositiveSignPlacement.suffix:case s.options.negativePositiveSignPlacement.right:case s.options.negativePositiveSignPlacement.left:p=0;break;case s.options.negativePositiveSignPlacement.prefix:p=T}else p=0;else if(this.settings.caretPositionOnFocus===s.options.caretPositionOnFocus.end)if(this.settings.negativePositiveSignPlacement!==s.options.negativePositiveSignPlacement.none&&(i||!i&&this.settings.showPositiveSign&&!r))switch(this.settings.negativePositiveSignPlacement){case s.options.negativePositiveSignPlacement.suffix:case s.options.negativePositiveSignPlacement.right:case s.options.negativePositiveSignPlacement.left:p=m;break;case s.options.negativePositiveSignPlacement.prefix:p=T+m}else p=m;else if(this.settings.caretPositionOnFocus===s.options.caretPositionOnFocus.decimalLeft)if(this.settings.negativePositiveSignPlacement!==s.options.negativePositiveSignPlacement.none&&(i||!i&&this.settings.showPositiveSign&&!r))switch(this.settings.negativePositiveSignPlacement){case s.options.negativePositiveSignPlacement.suffix:case s.options.negativePositiveSignPlacement.right:case s.options.negativePositiveSignPlacement.left:p=f;break;case s.options.negativePositiveSignPlacement.prefix:p=T+f}else p=f;else if(this.settings.caretPositionOnFocus===s.options.caretPositionOnFocus.decimalRight)if(this.settings.negativePositiveSignPlacement!==s.options.negativePositiveSignPlacement.none&&(i||!i&&this.settings.showPositiveSign&&!r))switch(this.settings.negativePositiveSignPlacement){case s.options.negativePositiveSignPlacement.suffix:case s.options.negativePositiveSignPlacement.right:case s.options.negativePositiveSignPlacement.left:p=f+E;break;case s.options.negativePositiveSignPlacement.prefix:p=T+f+E}else p=f+E}return p}},{key:"_triggerRangeEvents",value:function(e,i){e||this._triggerEvent(s.events.minRangeExceeded,this.domElement),i||this._triggerEvent(s.events.maxRangeExceeded,this.domElement)}},{key:"_setInvalidState",value:function(){this.isInputElement?a.setInvalidState(this.domElement):this._addCSSClass(this.settings.invalidClass),this._triggerEvent(s.events.invalidValue,this.domElement),this.validState=!1}},{key:"_setValidState",value:function(){this.isInputElement?a.setValidState(this.domElement):this._removeCSSClass(this.settings.invalidClass),this.validState||this._triggerEvent(s.events.correctedValue,this.domElement),this.validState=!0}},{key:"_setValidOrInvalidState",value:function(e){if(this.settings.overrideMinMaxLimits===s.options.overrideMinMaxLimits.invalid){var i=this.constructor._isMinimumRangeRespected(e,this.settings),r=this.constructor._isMaximumRangeRespected(e,this.settings);i&&r?this._setValidState():this._setInvalidState(),this._triggerRangeEvents(i,r)}}},{key:"_keepAnOriginalSettingsCopy",value:function(){this.originalDigitGroupSeparator=this.settings.digitGroupSeparator,this.originalCurrencySymbol=this.settings.currencySymbol,this.originalSuffixText=this.settings.suffixText}},{key:"_trimLeadingAndTrailingZeros",value:function(e){if(e===""||e===null)return e;if(this.settings.leadingZero!==s.options.leadingZero.keep){if(Number(e)===0)return"0";e=e.replace(/^(-)?0+(?=\d)/g,"$1")}return a.contains(e,".")&&(e=e.replace(/(\.[0-9]*?)0+$/,"$1")),e=e.replace(/\.$/,"")}},{key:"_setPersistentStorageName",value:function(){this.settings.saveValueToSessionStorage&&(this.domElement.name===""||a.isUndefined(this.domElement.name)?this.rawValueStorageName="".concat(this.storageNamePrefix).concat(this.domElement.id):this.rawValueStorageName="".concat(this.storageNamePrefix).concat(decodeURIComponent(this.domElement.name)))}},{key:"_saveValueToPersistentStorage",value:function(){this.settings.saveValueToSessionStorage&&sessionStorage.setItem(this.rawValueStorageName,this.rawValue)}},{key:"_getValueFromPersistentStorage",value:function(){return this.settings.saveValueToSessionStorage?sessionStorage.getItem(this.rawValueStorageName):(a.warning("`_getValueFromPersistentStorage()` is called but `settings.saveValueToSessionStorage` is false. There must be an error that needs fixing.",this.settings.showWarnings),null)}},{key:"_removeValueFromPersistentStorage",value:function(){this.settings.saveValueToSessionStorage&&sessionStorage.removeItem(this.rawValueStorageName)}},{key:"_getDefaultValue",value:function(e){var i=e.getAttribute("value");return a.isNull(i)?"":i}},{key:"_onFocusInAndMouseEnter",value:function(e){if(this.isEditing=!1,!this.formulaMode&&this.settings.unformatOnHover&&e.type==="mouseenter"&&e.altKey)this.constructor._unformatAltHovered(this);else if(e.type==="focus"&&(this.isFocused=!0,this.rawValueOnFocus=this.rawValue),e.type==="focus"&&this.settings.unformatOnHover&&this.hoveredWithAlt&&this.constructor._reformatAltHovered(this),e.type==="focus"||e.type==="mouseenter"&&!this.isFocused){var i=null;this.settings.emptyInputBehavior===s.options.emptyInputBehavior.focus&&this.rawValue<0&&this.settings.negativeBracketsTypeOnBlur!==null&&this.settings.isNegativeSignAllowed&&(i=this.constructor._removeBrackets(a.getElementValue(this.domElement),this.settings));var r=this._getRawValueToFormat(this.rawValue);if(r!==""){var o=this.constructor._roundFormattedValueShownOnFocusOrBlur(r,this.settings,this.isFocused);this.settings.showOnlyNumbersOnFocus===s.options.showOnlyNumbersOnFocus.onlyNumbers?(this.settings.digitGroupSeparator="",this.settings.currencySymbol="",this.settings.suffixText="",i=o.replace(".",this.settings.decimalCharacter)):i=a.isNull(o)?"":this.constructor._addGroupSeparators(o.replace(".",this.settings.decimalCharacter),this.settings,this.isFocused,r)}a.isNull(i)?this.valueOnFocus="":this.valueOnFocus=i,this.lastVal=this.valueOnFocus;var m=this.constructor._isElementValueEmptyOrOnlyTheNegativeSign(this.valueOnFocus,this.settings),f=this.constructor._orderValueCurrencySymbolAndSuffixText(this.valueOnFocus,this.settings,!0),w=m&&f!==""&&this.settings.emptyInputBehavior===s.options.emptyInputBehavior.focus;w&&(i=f),a.isNull(i)||this._setElementValue(i),w&&f===this.settings.currencySymbol&&this.settings.currencySymbolPlacement===s.options.currencySymbolPlacement.suffix&&a.setElementSelection(e.target,0)}}},{key:"_onFocus",value:function(){this.settings.isCancellable&&this._saveCancellableValue()}},{key:"_onFocusIn",value:function(e){this.settings.selectOnFocus?this.select():a.isNull(this.settings.caretPositionOnFocus)||a.setElementSelection(e.target,this._initialCaretPosition(a.getElementValue(this.domElement)))}},{key:"_enterFormulaMode",value:function(){this.settings.formulaMode&&(this.formulaMode=!0,a.setElementValue(this.domElement,"="),a.setElementSelection(this.domElement,1))}},{key:"_exitFormulaMode",value:function(){var e,i=a.getElementValue(this.domElement);i=i.replace(/^\s*=/,"");try{var r=new ee(i,this.settings.decimalCharacter);e=new Gt().evaluate(r)}catch{return this._triggerEvent(s.events.invalidFormula,this.domElement,{formula:i,aNElement:this}),this.reformat(),void(this.formulaMode=!1)}this._triggerEvent(s.events.validFormula,this.domElement,{formula:i,result:e,aNElement:this}),this.set(e),this.formulaMode=!1}},{key:"_acceptNonPrintableKeysInFormulaMode",value:function(){return this.eventKey===l.keyName.Backspace||this.eventKey===l.keyName.Delete||this.eventKey===l.keyName.LeftArrow||this.eventKey===l.keyName.RightArrow||this.eventKey===l.keyName.Home||this.eventKey===l.keyName.End}},{key:"_onKeydown",value:function(e){if(!this.compositioning)if(this.formatted=!1,this.isEditing=!0,this.formulaMode||this.isFocused||!this.settings.unformatOnHover||!e.altKey||this.domElement!==a.getHoveredElement()){if(this._updateEventKeyInfo(e),this.keydownEventCounter+=1,this.keydownEventCounter===1&&(this.initialValueOnFirstKeydown=a.getElementValue(e.target),this.initialRawValueOnFirstKeydown=this.rawValue),this.formulaMode){if(this.eventKey===l.keyName.Esc)return this.formulaMode=!1,void this.reformat();if(this.eventKey===l.keyName.Enter)return void this._exitFormulaMode();if(this._acceptNonPrintableKeysInFormulaMode())return}else{if(this.eventKey===l.keyName.Equal)return void this._enterFormulaMode();if(this.settings.modifyValueOnUpDownArrow&&(this.eventKey===l.keyName.UpArrow||this.eventKey===l.keyName.DownArrow))return void this.upDownArrowAction(e)}if(this.domElement.readOnly||this.settings.readOnly||this.domElement.disabled)this.processed=!0;else{this.eventKey===l.keyName.Esc&&(e.preventDefault(),this.settings.isCancellable&&this.rawValue!==this.savedCancellableValue&&(this.set(this.savedCancellableValue),this._triggerEvent(s.events.native.input,e.target)),this.select());var i=a.getElementValue(e.target);if(this.eventKey===l.keyName.Enter&&this.rawValue!==this.rawValueOnFocus&&(this._triggerEvent(s.events.native.change,e.target),this.valueOnFocus=i,this.rawValueOnFocus=this.rawValue,this.settings.isCancellable&&this._saveCancellableValue()),this._updateInternalProperties(e),this._processNonPrintableKeysAndShortcuts(e))this.processed=!0;else if(this.eventKey===l.keyName.Backspace||this.eventKey===l.keyName.Delete){var r=this._processCharacterDeletion(e);if(this.processed=!0,!r)return void e.preventDefault();this._formatValue(e),(i=a.getElementValue(e.target))!==this.lastVal&&this.throwInput&&(this._triggerEvent(s.events.native.input,e.target),e.preventDefault()),this.lastVal=i,this.throwInput=!0}}}else this.constructor._unformatAltHovered(this)}},{key:"_onKeypress",value:function(e){if(!this.compositioning){if(this.formulaMode){if(this._acceptNonPrintableKeysInFormulaMode()||this.settings.formulaChars.test(this.eventKey))return;e.preventDefault()}else if(this.eventKey!==l.keyName.Insert){var i=this.processed;if(this._updateInternalProperties(e),!this._processNonPrintableKeysAndShortcuts(e))if(i)e.preventDefault();else{if(this._processCharacterInsertion()){this._formatValue(e);var r=a.getElementValue(e.target);if(r!==this.lastVal&&this.throwInput)this._triggerEvent(s.events.native.input,e.target),e.preventDefault();else{if((this.eventKey===this.settings.decimalCharacter||this.eventKey===this.settings.decimalCharacterAlternative)&&a.getElementSelection(e.target).start===a.getElementSelection(e.target).end&&a.getElementSelection(e.target).start===r.indexOf(this.settings.decimalCharacter)){var o=a.getElementSelection(e.target).start+1;a.setElementSelection(e.target,o)}e.preventDefault()}return this.lastVal=a.getElementValue(e.target),this.throwInput=!0,void this._setValidOrInvalidState(this.rawValue)}e.preventDefault()}}}}},{key:"_onKeyup",value:function(e){if(!this.compositioning&&(this.isEditing=!1,this.keydownEventCounter=0,!this.formulaMode))if(this.settings.isCancellable&&this.eventKey===l.keyName.Esc)e.preventDefault();else{if(this._updateEventKeyInfo(e),this.eventKey===l.keyName.Z||this.eventKey===l.keyName.z){if(e.ctrlKey&&e.shiftKey)return e.preventDefault(),this._historyTableRedo(),this._triggerEvent(s.events.native.input,e.target),void(this.onGoingRedo=!0);if(e.ctrlKey&&!e.shiftKey){if(!this.onGoingRedo)return e.preventDefault(),this._historyTableUndo(),void this._triggerEvent(s.events.native.input,e.target);this.onGoingRedo=!1}}else if((this.eventKey===l.keyName.Y||this.eventKey===l.keyName.y)&&e.ctrlKey)return e.preventDefault(),this._historyTableRedo(),this._triggerEvent(s.events.native.input,e.target),void(this.onGoingRedo=!0);if(this.onGoingRedo&&(e.ctrlKey||e.shiftKey)&&(this.onGoingRedo=!1),(e.ctrlKey||e.metaKey)&&(this.eventKey===l.keyName.X||this.eventKey===l.keyName.x)){var i=a.getElementSelection(this.domElement).start,r=this.constructor._toNumericValue(a.getElementValue(e.target),this.settings);this.set(r),this._setCaretPosition(i)}if(this.eventKey===l.keyName.Alt&&this.settings.unformatOnHover&&this.hoveredWithAlt)this.constructor._reformatAltHovered(this);else if(!e.ctrlKey&&!e.metaKey||this.eventKey!==l.keyName.Backspace&&this.eventKey!==l.keyName.Delete){this._updateInternalProperties(e);var o=this._processNonPrintableKeysAndShortcuts(e);delete this.valuePartsBeforePaste;var m=a.getElementValue(e.target);if(!(o||m===""&&this.initialValueOnFirstKeydown==="")&&(m===this.settings.currencySymbol?this.settings.currencySymbolPlacement===s.options.currencySymbolPlacement.suffix?a.setElementSelection(e.target,0):a.setElementSelection(e.target,this.settings.currencySymbol.length):this.eventKey===l.keyName.Tab&&a.setElementSelection(e.target,0,m.length),(m===this.settings.suffixText||this.rawValue===""&&this.settings.currencySymbol!==""&&this.settings.suffixText!=="")&&a.setElementSelection(e.target,0),this.settings.decimalPlacesShownOnFocus!==null&&this._saveValueToPersistentStorage(),this.formatted||this._formatValue(e),this._setValidOrInvalidState(this.rawValue),this._saveRawValueForAndroid(),m!==this.initialValueOnFirstKeydown&&this._triggerEvent(s.events.formatted,e.target,{oldValue:this.initialValueOnFirstKeydown,newValue:m,oldRawValue:this.initialRawValueOnFirstKeydown,newRawValue:this.rawValue,isPristine:this.isPristine(!1),error:null,aNElement:this}),this.historyTable.length>1)){var f=a.getElementSelection(this.domElement);this.selectionStart=f.start,this.selectionEnd=f.end,this.historyTable[this.historyTableIndex].start=this.selectionStart,this.historyTable[this.historyTableIndex].end=this.selectionEnd}}else{var w=a.getElementValue(e.target);this._setRawValue(this._formatOrUnformatOther(!1,w))}}}},{key:"_saveRawValueForAndroid",value:function(){if(this.eventKey===l.keyName.AndroidDefault){var e=this.constructor._stripAllNonNumberCharactersExceptCustomDecimalChar(this.getFormatted(),this.settings,!0,this.isFocused);e=this.constructor._convertToNumericString(e,this.settings),this._setRawValue(e)}}},{key:"_onFocusOutAndMouseLeave",value:function(e){if(this.isEditing=!1,e.type!=="mouseleave"||!this.formulaMode){if(this.settings.unformatOnHover&&e.type==="mouseleave"&&this.hoveredWithAlt)this.constructor._reformatAltHovered(this);else if(e.type==="mouseleave"&&!this.isFocused||e.type==="blur"){e.type==="blur"&&this.formulaMode&&this._exitFormulaMode(),this._saveValueToPersistentStorage(),this.settings.showOnlyNumbersOnFocus===s.options.showOnlyNumbersOnFocus.onlyNumbers&&(this.settings.digitGroupSeparator=this.originalDigitGroupSeparator,this.settings.currencySymbol=this.originalCurrencySymbol,this.settings.suffixText=this.originalSuffixText);var i=this._getRawValueToFormat(this.rawValue),r=a.isNull(i),o=te(this.constructor._checkIfInRangeWithOverrideOption(i,this.settings),2),m=o[0],f=o[1],w=!1;if(i===""||r||(this._triggerRangeEvents(m,f),this.settings.valuesToStrings&&this._checkValuesToStrings(i)&&(this._setElementValue(this.settings.valuesToStrings[i]),w=!0)),!w){var E;if(E=r||i===""?i:String(i),i===""||r){if(i==="")switch(this.settings.emptyInputBehavior){case s.options.emptyInputBehavior.zero:this._setRawValue("0"),E=this.constructor._roundValue("0",this.settings,0);break;case s.options.emptyInputBehavior.min:this._setRawValue(this.settings.minimumValue),E=this.constructor._roundFormattedValueShownOnFocusOrBlur(this.settings.minimumValue,this.settings,this.isFocused);break;case s.options.emptyInputBehavior.max:this._setRawValue(this.settings.maximumValue),E=this.constructor._roundFormattedValueShownOnFocusOrBlur(this.settings.maximumValue,this.settings,this.isFocused);break;default:a.isNumber(this.settings.emptyInputBehavior)&&(this._setRawValue(this.settings.emptyInputBehavior),E=this.constructor._roundFormattedValueShownOnFocusOrBlur(this.settings.emptyInputBehavior,this.settings,this.isFocused))}}else m&&f&&!this.constructor._isElementValueEmptyOrOnlyTheNegativeSign(i,this.settings)?(E=this._modifyNegativeSignAndDecimalCharacterForRawValue(E),this.settings.divisorWhenUnfocused&&!a.isNull(E)&&(E=(E/=this.settings.divisorWhenUnfocused).toString()),E=this.constructor._roundFormattedValueShownOnBlur(E,this.settings),E=this.constructor._modifyNegativeSignAndDecimalCharacterForFormattedValue(E,this.settings)):this._triggerRangeEvents(m,f);var O=this.constructor._orderValueCurrencySymbolAndSuffixText(E,this.settings,!1);this.constructor._isElementValueEmptyOrOnlyTheNegativeSign(E,this.settings)||r&&this.settings.emptyInputBehavior===s.options.emptyInputBehavior.null||(O=this.constructor._addGroupSeparators(E,this.settings,!1,i)),O===i&&i!==""&&this.settings.allowDecimalPadding!==s.options.allowDecimalPadding.never&&this.settings.allowDecimalPadding!==s.options.allowDecimalPadding.floats||(this.settings.symbolWhenUnfocused&&i!==""&&i!==null&&(O="".concat(O).concat(this.settings.symbolWhenUnfocused)),this._setElementValue(O))}this._setValidOrInvalidState(this.rawValue),e.type==="blur"&&this._onBlur(e)}}}},{key:"_onPaste",value:function(e){if(e.preventDefault(),!(this.settings.readOnly||this.domElement.readOnly||this.domElement.disabled)){var i,r;e.clipboardData&&e.clipboardData.getData?i=e.clipboardData.getData("text/plain"):a.throwError("Unable to retrieve the pasted value. Please use a modern browser (i.e. Firefox or Chromium)."),r=e.target.tagName?e.target:e.explicitOriginalTarget;var o=a.getElementValue(r),m=r.selectionStart||0,f=r.selectionEnd||0,w=f-m;if(w===o.length){var E=this._preparePastedText(i),O=a.arabicToLatinNumbers(E,!1,!1,!1);return O==="."||O===""||O!=="."&&!a.isNumber(O)?(this.formatted=!0,void(this.settings.onInvalidPaste===s.options.onInvalidPaste.error&&a.throwError("The pasted value '".concat(i,"' is not a valid paste content.")))):(this.set(O),this.formatted=!0,void this._triggerEvent(s.events.native.input,r))}var p=a.isNegativeStrict(i,this.settings.negativeSignCharacter);p&&(i=i.slice(1,i.length));var T,A,G=this._preparePastedText(i);if((T=G==="."?".":a.arabicToLatinNumbers(G,!1,!1,!1))!=="."&&(!a.isNumber(T)||T===""))return this.formatted=!0,void(this.settings.onInvalidPaste===s.options.onInvalidPaste.error&&a.throwError("The pasted value '".concat(i,"' is not a valid paste content.")));var H,ie,qe=a.isNegativeStrict(this.getNumericString(),this.settings.negativeSignCharacter);p&&!qe?(qe=!0,H=!0):H=!1;var at=o.slice(0,m),rt=o.slice(f,o.length);ie=m!==f?this._preparePastedText(at+rt):this._preparePastedText(o),qe&&(ie=a.setRawNegativeSign(ie)),A=a.convertCharacterCountToIndexPosition(a.countNumberCharactersOnTheCaretLeftSide(o,m,this.settings.decimalCharacter)),H&&A++;var Ze=ie.slice(0,A),hi=ie.slice(A,ie.length),cn=!1;T==="."&&(a.contains(Ze,".")&&(cn=!0,Ze=Ze.replace(".","")),hi=hi.replace(".",""));var Un=!1;switch(Ze===""&&hi==="-"&&(Ze="-",hi="",Un=!0),this.settings.onInvalidPaste){case s.options.onInvalidPaste.truncate:case s.options.onInvalidPaste.replace:for(var _o=a.parseStr(this.settings.minimumValue),bo=a.parseStr(this.settings.maximumValue),gi=ie,fi=0,tr=Ze;fi<T.length&&(ie=(tr+=T[fi])+hi,this.constructor._checkIfInRange(ie,_o,bo));)gi=ie,fi++;if(A+=fi,Un&&A++,this.settings.onInvalidPaste===s.options.onInvalidPaste.truncate){ie=gi,cn&&A--;break}for(var wi=A,ir=gi.length;fi<T.length&&wi<ir;)if(gi[wi]!=="."){if(ie=a.replaceCharAt(gi,wi,T[fi]),!this.constructor._checkIfInRange(ie,_o,bo))break;gi=ie,fi++,wi++}else wi++;A=wi,cn&&A--,ie=gi;break;case s.options.onInvalidPaste.error:case s.options.onInvalidPaste.ignore:case s.options.onInvalidPaste.clamp:default:if(ie="".concat(Ze).concat(T).concat(hi),m===f)A=a.convertCharacterCountToIndexPosition(a.countNumberCharactersOnTheCaretLeftSide(o,m,this.settings.decimalCharacter))+T.length;else if(hi==="")A=a.convertCharacterCountToIndexPosition(a.countNumberCharactersOnTheCaretLeftSide(o,m,this.settings.decimalCharacter))+T.length,Un&&A++;else{var nr=a.convertCharacterCountToIndexPosition(a.countNumberCharactersOnTheCaretLeftSide(o,f,this.settings.decimalCharacter)),or=a.getElementValue(r).slice(m,f);A=nr-w+a.countCharInText(this.settings.digitGroupSeparator,or)+T.length}H&&A++,cn&&A--}if(a.isNumber(ie)&&ie!==""){var un=!1,So=!1;try{this.set(ie),un=!0}catch{var mn;switch(this.settings.onInvalidPaste){case s.options.onInvalidPaste.clamp:mn=a.clampToRangeLimits(ie,this.settings);try{this.set(mn)}catch{a.throwError("Fatal error: Unable to set the clamped value '".concat(mn,"'."))}So=!0,un=!0,ie=mn;break;case s.options.onInvalidPaste.error:case s.options.onInvalidPaste.truncate:case s.options.onInvalidPaste.replace:a.throwError("The pasted value '".concat(i,"' results in a value '").concat(ie,"' that is outside of the minimum [").concat(this.settings.minimumValue,"] and maximum [").concat(this.settings.maximumValue,"] value range."));case s.options.onInvalidPaste.ignore:default:return}}var wo,dn=a.getElementValue(r);if(un)switch(this.settings.onInvalidPaste){case s.options.onInvalidPaste.clamp:if(So){this.settings.currencySymbolPlacement===s.options.currencySymbolPlacement.suffix?a.setElementSelection(r,dn.length-this.settings.currencySymbol.length):a.setElementSelection(r,dn.length);break}case s.options.onInvalidPaste.error:case s.options.onInvalidPaste.ignore:case s.options.onInvalidPaste.truncate:case s.options.onInvalidPaste.replace:default:wo=a.findCaretPositionInFormattedNumber(ie,A,dn,this.settings.decimalCharacter),a.setElementSelection(r,wo)}un&&o!==dn&&this._triggerEvent(s.events.native.input,r)}else this.settings.onInvalidPaste===s.options.onInvalidPaste.error&&a.throwError("The pasted value '".concat(i,"' would result into an invalid content '").concat(ie,"'."))}}},{key:"_onBlur",value:function(e){this.isFocused=!1,this.isEditing=!1,a.trimPaddedZerosFromDecimalPlaces(this.rawValue)!==a.trimPaddedZerosFromDecimalPlaces(this.rawValueOnFocus)&&this._triggerEvent(s.events.native.change,e.target),this.rawValueOnFocus=void 0}},{key:"_wheelAndUpDownActions",value:function(e,i,r,o){var m,f=e.target.selectionStart||0,w=e.target.selectionEnd||0,E=this.rawValue;if(m=+(m=a.isUndefinedOrNullOrEmpty(E)?this.settings.minimumValue>0||this.settings.maximumValue<0?i?this.settings.minimumValue:this.settings.maximumValue:0:E),a.isNumber(o)){var O=+o;i?m+=O:r&&(m-=O)}else i?m=a.addAndRoundToNearestAuto(m,this.settings.decimalPlacesRawValue):r&&(m=a.subtractAndRoundToNearestAuto(m,this.settings.decimalPlacesRawValue));(m=a.clampToRangeLimits(m,this.settings))!==+E&&(this.set(m),this._triggerEvent(s.events.native.input,e.target)),e.preventDefault(),this._setSelection(f,w)}},{key:"upDownArrowAction",value:function(e){if(!(this.formulaMode||this.settings.readOnly||this.domElement.readOnly||this.domElement.disabled)){var i=!1,r=!1;this.eventKey===l.keyName.UpArrow?i=!0:this.eventKey===l.keyName.DownArrow?r=!0:a.throwError("Something has gone wrong since neither an Up or Down arrow key is detected, but the function was still called!"),this._wheelAndUpDownActions(e,i,r,this.settings.upDownStep)}}},{key:"_onWheel",value:function(e){this.formulaMode||this.settings.readOnly||this.domElement.readOnly||this.domElement.disabled||this.settings.modifyValueOnWheel&&(this.settings.wheelOn===s.options.wheelOn.focus?this.isFocused?e.shiftKey||this.wheelAction(e):e.shiftKey&&this.wheelAction(e):this.settings.wheelOn===s.options.wheelOn.hover?e.shiftKey?(e.preventDefault(),window.scrollBy(0,a.isNegativeStrict(String(e.deltaY))?-50:50)):this.wheelAction(e):a.throwError("Unknown `wheelOn` option."))}},{key:"wheelAction",value:function(e){this.isWheelEvent=!0;var i=!1,r=!1,o=!1;a.isWheelUpEvent(e)?i=!0:a.isWheelDownEvent(e)?r=!0:a.isWheelEventWithZeroDeltaY(e)?o=!0:a.throwError("The event is not a 'wheel' event."),o||this._wheelAndUpDownActions(e,i,r,this.settings.wheelStep),this.isWheelEvent=!1}},{key:"_onDrop",value:function(e){if(!this.formulaMode){this.isDropEvent=!0,e.preventDefault();var i=e.dataTransfer.getData("text/plain"),r=this.unformatOther(i),o=this.rawValue;this.set(r),this.isDropEvent=!1;var m=this.constructor._toNumericValue(r,this.settings);isNaN(Number(m))||a.trimPaddedZerosFromDecimalPlaces(o)!==a.trimPaddedZerosFromDecimalPlaces(m)&&this._triggerEvent(s.events.native.change,this.domElement)}}},{key:"_onFormSubmit",value:function(){var e=this;return this._getFormAutoNumericChildren(this.parentForm).map(function(i){return e.constructor.getAutoNumericElement(i)}).forEach(function(i){return i._unformatOnSubmit()}),!0}},{key:"_onFormReset",value:function(){var e=this;this._getFormAutoNumericChildren(this.parentForm).map(function(i){return e.constructor.getAutoNumericElement(i)}).forEach(function(i){var r=e._getDefaultValue(i.node());setTimeout(function(){return i.set(r)},0)})}},{key:"_unformatOnSubmit",value:function(){this.settings.unformatOnSubmit&&this._setElementValue(this.rawValue)}},{key:"_onKeydownGlobal",value:function(e){if(a.character(e)===l.keyName.Alt){var i=a.getHoveredElement();if(s.isManagedByAutoNumeric(i)){var r=s.getAutoNumericElement(i);!r.formulaMode&&r.settings.unformatOnHover&&this.constructor._unformatAltHovered(r)}}}},{key:"_onKeyupGlobal",value:function(e){if(a.character(e)===l.keyName.Alt){var i=a.getHoveredElement();if(s.isManagedByAutoNumeric(i)){var r=s.getAutoNumericElement(i);if(r.formulaMode||!r.settings.unformatOnHover)return;this.constructor._reformatAltHovered(r)}}}},{key:"_onCompositionstart",value:function(e){var i={key:l.keyName.Space,which:"32",keyCode:"32"},r=new KeyboardEvent("keydown",i);e.target.dispatchEvent(r),this.compositioning=!0}},{key:"_onCompositionend",value:function(e){this.compositioning=!1;var i={key:l.keyName.Space,which:"32",keyCode:"32"},r=new KeyboardEvent("keypress",i);e.target.dispatchEvent(r);var o=new KeyboardEvent("keyup",i);e.target.dispatchEvent(o)}},{key:"_isElementTagSupported",value:function(){return a.isElement(this.domElement)||a.throwError("The DOM element is not valid, ".concat(this.domElement," given.")),a.isInArray(this.domElement.tagName.toLowerCase(),this.allowedTagList)}},{key:"_isInputElement",value:function(){return this.domElement.tagName.toLowerCase()==="input"}},{key:"_isInputTypeSupported",value:function(){return this.domElement.type==="text"||this.domElement.type==="hidden"||this.domElement.type==="tel"||a.isUndefinedOrNullOrEmpty(this.domElement.type)}},{key:"_checkElement",value:function(){var e=this.domElement.tagName.toLowerCase();this._isElementTagSupported()||a.throwError("The <".concat(e,"> tag is not supported by autoNumeric")),this._isInputElement()?(this._isInputTypeSupported()||a.throwError('The input type "'.concat(this.domElement.type,'" is not supported by autoNumeric')),this.isInputElement=!0):(this.isInputElement=!1,this.isContentEditable=this._isContentEditable(this.domElement))}},{key:"_isContentEditable",value:function(e){return e.hasAttribute("contenteditable")&&e.getAttribute("contenteditable")==="true"}},{key:"_formatDefaultValueOnPageLoad",value:function(){var e,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,r=!0;if(a.isNull(i)?(e=a.getElementValue(this.domElement).trim(),this.domElement.setAttribute("value",e)):e=i,this.isInputElement||this.isContentEditable){var o=this.constructor._toNumericValue(e,this.settings);if(this.domElement.hasAttribute("value")&&this.domElement.getAttribute("value")!==""){if(this.settings.defaultValueOverride!==null&&this.settings.defaultValueOverride.toString()!==e||this.settings.defaultValueOverride===null&&e!==""&&e!==this.domElement.getAttribute("value")||e!==""&&this.domElement.getAttribute("type")==="hidden"&&!a.isNumber(o)){if(this.settings.saveValueToSessionStorage&&(this.settings.decimalPlacesShownOnFocus!==null||this.settings.divisorWhenUnfocused)&&this._setRawValue(this._getValueFromPersistentStorage()),!this.settings.saveValueToSessionStorage){var m=this.constructor._removeBrackets(e,this.settings);(this.settings.negativePositiveSignPlacement===s.options.negativePositiveSignPlacement.suffix||this.settings.negativePositiveSignPlacement!==s.options.negativePositiveSignPlacement.prefix&&this.settings.currencySymbolPlacement===s.options.currencySymbolPlacement.suffix)&&this.settings.negativeSignCharacter!==""&&a.isNegative(e,this.settings.negativeSignCharacter)?this._setRawValue("-".concat(this.constructor._stripAllNonNumberCharacters(m,this.settings,!0,this.isFocused))):this._setRawValue(this.constructor._stripAllNonNumberCharacters(m,this.settings,!0,this.isFocused))}r=!1}}else isNaN(Number(o))||o===1/0?a.throwError("The value [".concat(e,"] used in the input is not a valid value autoNumeric can work with.")):(this.set(o),r=!1);if(e==="")switch(this.settings.emptyInputBehavior){case s.options.emptyInputBehavior.focus:case s.options.emptyInputBehavior.press:break;case s.options.emptyInputBehavior.always:this._setElementValue(this.settings.currencySymbol);break;case s.options.emptyInputBehavior.min:this.set(this.settings.minimumValue);break;case s.options.emptyInputBehavior.max:this.set(this.settings.maximumValue);break;case s.options.emptyInputBehavior.zero:this.set("0");break;case s.options.emptyInputBehavior.null:this.set(null);break;default:this.set(this.settings.emptyInputBehavior)}else r&&e===this.domElement.getAttribute("value")&&this.set(e)}else this.settings.defaultValueOverride!==null&&this.settings.defaultValueOverride!==e||this.set(e)}},{key:"_calculateVMinAndVMaxIntegerSizes",value:function(){var e=te(this.settings.maximumValue.toString().split("."),1)[0],i=te(this.settings.minimumValue||this.settings.minimumValue===0?this.settings.minimumValue.toString().split("."):[],1)[0];e=e.replace(this.settings.negativeSignCharacter,""),i=i.replace(this.settings.negativeSignCharacter,""),this.settings.mIntPos=Math.max(e.length,1),this.settings.mIntNeg=Math.max(i.length,1)}},{key:"_calculateValuesToStringsKeys",value:function(){this.settings.valuesToStrings?this.valuesToStringsKeys=Object.keys(this.settings.valuesToStrings):this.valuesToStringsKeys=[]}},{key:"_transformOptionsValuesToDefaultTypes",value:function(){for(var e in this.settings)if(Object.prototype.hasOwnProperty.call(this.settings,e)){var i=this.settings[e];i!=="true"&&i!=="false"||(this.settings[e]=i==="true"),typeof i=="number"&&(this.settings[e]=i.toString())}}},{key:"_setSettings",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0&&arguments[1];!i&&a.isNull(e)||this.constructor._convertOldOptionsToNewOnes(e),i?("decimalPlacesRawValue"in e&&(this.settings.originalDecimalPlacesRawValue=e.decimalPlacesRawValue),"decimalPlaces"in e&&(this.settings.originalDecimalPlaces=e.decimalPlaces),this.constructor._calculateDecimalPlacesOnUpdate(e,this.settings),this._mergeSettings(e)):(this.settings={},this._mergeSettings(this.constructor.getDefaultConfig(),this.domElement.dataset,e,{rawValue:this.defaultRawValue}),this.caretFix=!1,this.throwInput=!0,this.allowedTagList=l.allowedTagList,this.runOnce=!1,this.hoveredWithAlt=!1),this._transformOptionsValuesToDefaultTypes(),this._runCallbacksFoundInTheSettingsObject(),this.constructor._correctNegativePositiveSignPlacementOption(this.settings),this.constructor._correctCaretPositionOnFocusAndSelectOnFocusOptions(this.settings),this.constructor._setNegativePositiveSignPermissions(this.settings),i||(a.isNull(e)||!e.decimalPlaces?this.settings.originalDecimalPlaces=null:this.settings.originalDecimalPlaces=e.decimalPlaces,this.settings.originalDecimalPlacesRawValue=this.settings.decimalPlacesRawValue,this.constructor._calculateDecimalPlacesOnInit(this.settings)),this._calculateVMinAndVMaxIntegerSizes(),this._setTrailingNegativeSignInfo(),this.regex={},this.constructor._cachesUsualRegularExpressions(this.settings,this.regex),this.constructor._setBrackets(this.settings),this._calculateValuesToStringsKeys(),a.isEmptyObj(this.settings)&&a.throwError("Unable to set the settings, those are invalid ; an empty object was given."),this.constructor.validate(this.settings,!1,e),this._keepAnOriginalSettingsCopy()}},{key:"_preparePastedText",value:function(e){return this.constructor._stripAllNonNumberCharacters(e,this.settings,!0,this.isFocused)}},{key:"_updateInternalProperties",value:function(){this.selection=a.getElementSelection(this.domElement),this.processed=!1}},{key:"_updateEventKeyInfo",value:function(e){this.eventKey=a.character(e)}},{key:"_saveCancellableValue",value:function(){this.savedCancellableValue=this.rawValue}},{key:"_setSelection",value:function(e,i){e=Math.max(e,0),i=Math.min(i,a.getElementValue(this.domElement).length),this.selection={start:e,end:i,length:i-e},a.setElementSelection(this.domElement,e,i)}},{key:"_setCaretPosition",value:function(e){this._setSelection(e,e)}},{key:"_getLeftAndRightPartAroundTheSelection",value:function(){var e=a.getElementValue(this.domElement);return[e.substring(0,this.selection.start),e.substring(this.selection.end,e.length)]}},{key:"_getUnformattedLeftAndRightPartAroundTheSelection",value:function(){var e=te(this._getLeftAndRightPartAroundTheSelection(),2),i=e[0],r=e[1];if(i===""&&r==="")return["",""];var o=!0;return this.eventKey!==l.keyName.Hyphen&&this.eventKey!==l.keyName.Minus||Number(i)!==0||(o=!1),this.isTrailingNegative&&(a.isNegative(r,this.settings.negativeSignCharacter)&&!a.isNegative(i,this.settings.negativeSignCharacter)||r===""&&a.isNegative(i,this.settings.negativeSignCharacter,!0))&&(i=i.replace(this.settings.negativeSignCharacter,""),r=r.replace(this.settings.negativeSignCharacter,""),i=i.replace("-",""),r=r.replace("-",""),i="-".concat(i)),[i=s._stripAllNonNumberCharactersExceptCustomDecimalChar(i,this.settings,o,this.isFocused),r=s._stripAllNonNumberCharactersExceptCustomDecimalChar(r,this.settings,!1,this.isFocused)]}},{key:"_normalizeParts",value:function(e,i){var r=!0;this.eventKey!==l.keyName.Hyphen&&this.eventKey!==l.keyName.Minus||Number(e)!==0||(r=!1),this.isTrailingNegative&&a.isNegative(i,this.settings.negativeSignCharacter)&&!a.isNegative(e,this.settings.negativeSignCharacter)&&(e="-".concat(e),i=i.replace(this.settings.negativeSignCharacter,"")),e=s._stripAllNonNumberCharactersExceptCustomDecimalChar(e,this.settings,r,this.isFocused),i=s._stripAllNonNumberCharactersExceptCustomDecimalChar(i,this.settings,!1,this.isFocused),this.settings.leadingZero!==s.options.leadingZero.deny||this.eventKey!==l.keyName.num0&&this.eventKey!==l.keyName.numpad0||Number(e)!==0||a.contains(e,this.settings.decimalCharacter)||i===""||(e=e.substring(0,e.length-1));var o=e+i;if(this.settings.decimalCharacter){var m=o.match(new RegExp("^".concat(this.regex.aNegRegAutoStrip,"\\").concat(this.settings.decimalCharacter)));m&&(o=(e=e.replace(m[1],m[1]+"0"))+i)}return[e,i,o]}},{key:"_setValueParts",value:function(e,i){var r=arguments.length>2&&arguments[2]!==void 0&&arguments[2],o=te(this._normalizeParts(e,i),3),m=o[0],f=o[1],w=o[2],E=te(s._checkIfInRangeWithOverrideOption(w,this.settings),2),O=E[0],p=E[1];if(O&&p){var T=s._truncateDecimalPlaces(w,this.settings,r,this.settings.decimalPlacesRawValue).replace(this.settings.decimalCharacter,".");if(T===""||T===this.settings.negativeSignCharacter){var A;switch(this.settings.emptyInputBehavior){case s.options.emptyInputBehavior.focus:case s.options.emptyInputBehavior.press:case s.options.emptyInputBehavior.always:A="";break;case s.options.emptyInputBehavior.min:A=this.settings.minimumValue;break;case s.options.emptyInputBehavior.max:A=this.settings.maximumValue;break;case s.options.emptyInputBehavior.zero:A="0";break;case s.options.emptyInputBehavior.null:A=null;break;default:A=this.settings.emptyInputBehavior}this._setRawValue(A)}else this._setRawValue(this._trimLeadingAndTrailingZeros(T));var G=s._truncateDecimalPlaces(w,this.settings,r,this.settings.decimalPlacesShownOnFocus),H=m.length;return H>G.length&&(H=G.length),H===1&&m==="0"&&this.settings.leadingZero===s.options.leadingZero.deny&&(H=f===""||m==="0"&&f!==""?1:0),this._setElementValue(G,!1),this._setCaretPosition(H),!0}return this._triggerRangeEvents(O,p),!1}},{key:"_getSignPosition",value:function(){var e;if(this.settings.currencySymbol){var i=this.settings.currencySymbol.length,r=a.getElementValue(this.domElement);if(this.settings.currencySymbolPlacement===s.options.currencySymbolPlacement.prefix)e=this.settings.negativeSignCharacter&&r&&r.charAt(0)===this.settings.negativeSignCharacter?[1,i+1]:[0,i];else{var o=r.length;e=[o-i,o]}}else e=[1e3,-1];return e}},{key:"_expandSelectionOnSign",value:function(){var e=te(this._getSignPosition(),2),i=e[0],r=e[1],o=this.selection;o.start<r&&o.end>i&&((o.start<i||o.end>r)&&a.getElementValue(this.domElement).substring(Math.max(o.start,i),Math.min(o.end,r)).match(/^\s*$/)?o.start<i?this._setSelection(o.start,i):this._setSelection(r,o.end):this._setSelection(Math.min(o.start,i),Math.max(o.end,r)))}},{key:"_checkPaste",value:function(){if(!this.formatted&&!a.isUndefined(this.valuePartsBeforePaste)){var e=this.valuePartsBeforePaste,i=te(this._getLeftAndRightPartAroundTheSelection(),2),r=i[0],o=i[1];delete this.valuePartsBeforePaste;var m=r.substr(0,e[0].length)+s._stripAllNonNumberCharactersExceptCustomDecimalChar(r.substr(e[0].length),this.settings,!0,this.isFocused);this._setValueParts(m,o,!0)||(this._setElementValue(e.join(""),!1),this._setCaretPosition(e[0].length))}}},{key:"_processNonPrintableKeysAndShortcuts",value:function(e){if((e.ctrlKey||e.metaKey)&&e.type==="keyup"&&!a.isUndefined(this.valuePartsBeforePaste)||e.shiftKey&&this.eventKey===l.keyName.Insert)return this._checkPaste(),!1;if(this.constructor._shouldSkipEventKey(this.eventKey))return!0;if((e.ctrlKey||e.metaKey)&&this.eventKey===l.keyName.a)return this.settings.selectNumberOnly&&(e.preventDefault(),this.selectNumber()),!0;if((e.ctrlKey||e.metaKey)&&(this.eventKey===l.keyName.c||this.eventKey===l.keyName.v||this.eventKey===l.keyName.x))return e.type==="keydown"&&this._expandSelectionOnSign(),this.eventKey!==l.keyName.v&&this.eventKey!==l.keyName.Insert||(e.type==="keydown"||e.type==="keypress"?a.isUndefined(this.valuePartsBeforePaste)&&(this.valuePartsBeforePaste=this._getLeftAndRightPartAroundTheSelection()):this._checkPaste()),e.type==="keydown"||e.type==="keypress"||this.eventKey===l.keyName.c;if(e.ctrlKey||e.metaKey)return!(this.eventKey===l.keyName.Z||this.eventKey===l.keyName.z);if(this.eventKey===l.keyName.LeftArrow||this.eventKey===l.keyName.RightArrow){if(e.type==="keydown"&&!e.shiftKey){var i=a.getElementValue(this.domElement);this.eventKey!==l.keyName.LeftArrow||i.charAt(this.selection.start-2)!==this.settings.digitGroupSeparator&&i.charAt(this.selection.start-2)!==this.settings.decimalCharacter?this.eventKey!==l.keyName.RightArrow||i.charAt(this.selection.start+1)!==this.settings.digitGroupSeparator&&i.charAt(this.selection.start+1)!==this.settings.decimalCharacter||this._setCaretPosition(this.selection.start+1):this._setCaretPosition(this.selection.start-1)}return!0}return a.isInArray(this.eventKey,l.keyName._directionKeys)}},{key:"_processCharacterDeletionIfTrailingNegativeSign",value:function(e){var i=te(e,2),r=i[0],o=i[1],m=a.getElementValue(this.domElement),f=a.isNegative(m,this.settings.negativeSignCharacter);if(this.settings.currencySymbolPlacement===s.options.currencySymbolPlacement.prefix&&this.settings.negativePositiveSignPlacement===s.options.negativePositiveSignPlacement.suffix&&(this.eventKey===l.keyName.Backspace?(this.caretFix=this.selection.start>=m.indexOf(this.settings.suffixText)&&this.settings.suffixText!=="",m.charAt(this.selection.start-1)==="-"?r=r.substring(1):this.selection.start<=m.length-this.settings.suffixText.length&&(r=r.substring(0,r.length-1))):(this.caretFix=this.selection.start>=m.indexOf(this.settings.suffixText)&&this.settings.suffixText!=="",this.selection.start>=m.indexOf(this.settings.currencySymbol)+this.settings.currencySymbol.length&&(o=o.substring(1,o.length)),a.isNegative(r,this.settings.negativeSignCharacter)&&m.charAt(this.selection.start)==="-"&&(r=r.substring(1)))),this.settings.currencySymbolPlacement===s.options.currencySymbolPlacement.suffix)switch(this.settings.negativePositiveSignPlacement){case s.options.negativePositiveSignPlacement.left:this.caretFix=this.selection.start>=m.indexOf(this.settings.negativeSignCharacter)+this.settings.negativeSignCharacter.length,this.eventKey===l.keyName.Backspace?this.selection.start===m.indexOf(this.settings.negativeSignCharacter)+this.settings.negativeSignCharacter.length&&f?r=r.substring(1):r!=="-"&&(this.selection.start<=m.indexOf(this.settings.negativeSignCharacter)||!f)&&(r=r.substring(0,r.length-1)):(r[0]==="-"&&(o=o.substring(1)),this.selection.start===m.indexOf(this.settings.negativeSignCharacter)&&f&&(r=r.substring(1)));break;case s.options.negativePositiveSignPlacement.right:this.caretFix=this.selection.start>=m.indexOf(this.settings.negativeSignCharacter)+this.settings.negativeSignCharacter.length,this.eventKey===l.keyName.Backspace?this.selection.start===m.indexOf(this.settings.negativeSignCharacter)+this.settings.negativeSignCharacter.length?r=r.substring(1):r!=="-"&&this.selection.start<=m.indexOf(this.settings.negativeSignCharacter)-this.settings.currencySymbol.length?r=r.substring(0,r.length-1):r===""||f||(r=r.substring(0,r.length-1)):(this.caretFix=this.selection.start>=m.indexOf(this.settings.currencySymbol)&&this.settings.currencySymbol!=="",this.selection.start===m.indexOf(this.settings.negativeSignCharacter)&&(r=r.substring(1)),o=o.substring(1))}return[r,o]}},{key:"_processCharacterDeletion",value:function(e){var i,r;if(this.selection.length){this._expandSelectionOnSign();var o=te(this._getUnformattedLeftAndRightPartAroundTheSelection(),2);i=o[0],r=o[1]}else{var m=te(this._getUnformattedLeftAndRightPartAroundTheSelection(),2);if(i=m[0],r=m[1],i===""&&r===""&&(this.throwInput=!1),this.isTrailingNegative&&a.isNegative(a.getElementValue(this.domElement),this.settings.negativeSignCharacter)){var f=te(this._processCharacterDeletionIfTrailingNegativeSign([i,r]),2);i=f[0],r=f[1]}else this.eventKey===l.keyName.Backspace?i=i.substring(0,i.length-1):r=r.substring(1,r.length)}return!!this.constructor._isWithinRangeWithOverrideOption("".concat(i).concat(r),this.settings)&&a.getElementValue(e.target)!==this.settings.currencySymbol&&(this._setValueParts(i,r),!0)}},{key:"_isDecimalCharacterInsertionAllowed",value:function(){return String(this.settings.decimalPlacesShownOnFocus)!==String(s.options.decimalPlacesShownOnFocus.none)&&String(this.settings.decimalPlaces)!==String(s.options.decimalPlaces.none)}},{key:"_processCharacterInsertion",value:function(){var e=te(this._getUnformattedLeftAndRightPartAroundTheSelection(),2),i=e[0],r=e[1];if(this.eventKey!==l.keyName.AndroidDefault&&(this.throwInput=!0),this.eventKey===this.settings.decimalCharacter||this.settings.decimalCharacterAlternative&&this.eventKey===this.settings.decimalCharacterAlternative){if(!this._isDecimalCharacterInsertionAllowed()||!this.settings.decimalCharacter)return!1;if(this.settings.alwaysAllowDecimalCharacter)i=i.replace(this.settings.decimalCharacter,""),r=r.replace(this.settings.decimalCharacter,"");else{if(a.contains(i,this.settings.decimalCharacter)||r.indexOf(this.settings.decimalCharacter)>0)return!0;r.indexOf(this.settings.decimalCharacter)===0&&(r=r.substr(1))}return this.settings.negativeSignCharacter&&a.contains(r,this.settings.negativeSignCharacter)&&(i="".concat(this.settings.negativeSignCharacter).concat(i),r=r.replace(this.settings.negativeSignCharacter,"")),this._setValueParts(i+this.settings.decimalCharacter,r),!0}if((this.eventKey==="-"||this.eventKey==="+")&&this.settings.isNegativeSignAllowed)return i===""&&a.contains(r,"-")?(this.settings.negativePositiveSignBehavior||!this.settings.negativePositiveSignBehavior&&this.eventKey==="+")&&(r=r.replace("-","")):a.isNegativeStrict(i,"-")?(this.settings.negativePositiveSignBehavior||!this.settings.negativePositiveSignBehavior&&this.eventKey==="+")&&(i=i.replace("-","")):(this.settings.negativePositiveSignBehavior||!this.settings.negativePositiveSignBehavior&&this.eventKey==="-")&&(i="".concat(this.settings.negativeSignCharacter).concat(i)),this._setValueParts(i,r),!0;var o=Number(this.eventKey);return o>=0&&o<=9?(this.settings.isNegativeSignAllowed&&i===""&&a.contains(r,"-")&&(i="-",r=r.substring(1,r.length)),this.settings.maximumValue<=0&&this.settings.minimumValue<this.settings.maximumValue&&!a.contains(a.getElementValue(this.domElement),this.settings.negativeSignCharacter)&&this.eventKey!=="0"&&(i="-".concat(i)),this._setValueParts("".concat(i).concat(this.eventKey),r),!0):(this.throwInput=!1,!1)}},{key:"_formatValue",value:function(e){var i=a.getElementValue(this.domElement),r=te(this._getUnformattedLeftAndRightPartAroundTheSelection(),1)[0];if((this.settings.digitGroupSeparator===""||this.settings.digitGroupSeparator!==""&&!a.contains(i,this.settings.digitGroupSeparator))&&(this.settings.currencySymbol===""||this.settings.currencySymbol!==""&&!a.contains(i,this.settings.currencySymbol))){var o=te(i.split(this.settings.decimalCharacter),1)[0],m="";a.isNegative(o,this.settings.negativeSignCharacter)&&(m=this.settings.negativeSignCharacter,o=o.replace(this.settings.negativeSignCharacter,""),r=r.replace("-","")),m===""&&o.length>this.settings.mIntPos&&r.charAt(0)==="0"&&(r=r.slice(1)),m===this.settings.negativeSignCharacter&&o.length>this.settings.mIntNeg&&r.charAt(0)==="0"&&(r=r.slice(1)),this.isTrailingNegative||(r="".concat(m).concat(r))}var f=this.constructor._addGroupSeparators(i,this.settings,this.isFocused,this.rawValue),w=f.length;if(f){var E,O=r.split("");if((this.settings.negativePositiveSignPlacement===s.options.negativePositiveSignPlacement.suffix||this.settings.negativePositiveSignPlacement!==s.options.negativePositiveSignPlacement.prefix&&this.settings.currencySymbolPlacement===s.options.currencySymbolPlacement.suffix)&&O[0]===this.settings.negativeSignCharacter&&!this.settings.isNegativeSignAllowed&&(O.shift(),(this.eventKey===l.keyName.Backspace||this.eventKey===l.keyName.Delete)&&this.caretFix&&((this.settings.currencySymbolPlacement===s.options.currencySymbolPlacement.suffix&&this.settings.negativePositiveSignPlacement===s.options.negativePositiveSignPlacement.left||this.settings.currencySymbolPlacement===s.options.currencySymbolPlacement.prefix&&this.settings.negativePositiveSignPlacement===s.options.negativePositiveSignPlacement.suffix)&&(O.push(this.settings.negativeSignCharacter),this.caretFix=e.type==="keydown"),this.settings.currencySymbolPlacement===s.options.currencySymbolPlacement.suffix&&this.settings.negativePositiveSignPlacement===s.options.negativePositiveSignPlacement.right))){var p=this.settings.currencySymbol.split(""),T=["\\","^","$",".","|","?","*","+","(",")","["],A=[];p.forEach(function(ie,qe){qe=p[ie],a.isInArray(qe,T)?A.push("\\"+qe):A.push(qe)}),this.eventKey===l.keyName.Backspace&&this.settings.negativeSignCharacter==="-"&&A.push("-"),O.push(A.join("")),this.caretFix=e.type==="keydown"}for(var G=0;G<O.length;G++)O[G].match("\\d")||(O[G]="\\"+O[G]);E=this.settings.currencySymbolPlacement===s.options.currencySymbolPlacement.suffix?new RegExp("^.*?".concat(O.join(".*?"))):new RegExp("^.*?[".concat(this.settings.currencySymbol,"]*").concat(O.join(".*?")));var H=f.match(E);H?(w=H[0].length,this.settings.showPositiveSign&&(w===0&&H.input.charAt(0)===this.settings.positiveSignCharacter&&(w=H.input.indexOf(this.settings.currencySymbol)===1?this.settings.currencySymbol.length+1:1),w===0&&H.input.charAt(this.settings.currencySymbol.length)===this.settings.positiveSignCharacter&&(w=this.settings.currencySymbol.length+1)),(w===0&&f.charAt(0)!==this.settings.negativeSignCharacter||w===1&&f.charAt(0)===this.settings.negativeSignCharacter)&&this.settings.currencySymbol&&this.settings.currencySymbolPlacement===s.options.currencySymbolPlacement.prefix&&(w=this.settings.currencySymbol.length+(a.isNegativeStrict(f,this.settings.negativeSignCharacter)?1:0))):(this.settings.currencySymbol&&this.settings.currencySymbolPlacement===s.options.currencySymbolPlacement.suffix&&(w-=this.settings.currencySymbol.length),this.settings.suffixText&&(w-=this.settings.suffixText.length))}f!==i&&(this._setElementValue(f,!1),this._setCaretPosition(w)),this.formatted=!0}}],F=[{key:"version",value:function(){return"4.10.8"}},{key:"_setArgumentsValues",value:function(e,i,r){a.isNull(e)&&a.throwError("At least one valid parameter is needed in order to initialize an AutoNumeric object");var o,m,f,w=a.isElement(e),E=a.isString(e),O=a.isObject(i),p=Array.isArray(i)&&i.length>0,T=a.isNumberOrArabic(i)||i==="",A=this._isPreDefinedOptionValid(i),G=a.isNull(i),H=a.isEmptyString(i),ie=a.isObject(r),qe=Array.isArray(r)&&r.length>0,at=a.isNull(r),rt=this._isPreDefinedOptionValid(r);return w&&G&&at?(o=e,f=null,m=null):w&&T&&at?(o=e,f=i,m=null):w&&O&&at?(o=e,f=null,m=i):w&&A&&at?(o=e,f=null,m=this._getOptionObject(i)):w&&p&&at?(o=e,f=null,m=this.mergeOptions(i)):w&&(G||H)&&ie?(o=e,f=null,m=r):w&&(G||H)&&qe?(o=e,f=null,m=this.mergeOptions(r)):E&&G&&at?(o=document.querySelector(e),f=null,m=null):E&&O&&at?(o=document.querySelector(e),f=null,m=i):E&&A&&at?(o=document.querySelector(e),f=null,m=this._getOptionObject(i)):E&&p&&at?(o=document.querySelector(e),f=null,m=this.mergeOptions(i)):E&&(G||H)&&ie?(o=document.querySelector(e),f=null,m=r):E&&(G||H)&&qe?(o=document.querySelector(e),f=null,m=this.mergeOptions(r)):E&&T&&at?(o=document.querySelector(e),f=i,m=null):E&&T&&ie?(o=document.querySelector(e),f=i,m=r):E&&T&&rt?(o=document.querySelector(e),f=i,m=this._getOptionObject(r)):E&&T&&qe?(o=document.querySelector(e),f=i,m=this.mergeOptions(r)):w&&T&&ie?(o=e,f=i,m=r):w&&T&&rt?(o=e,f=i,m=this._getOptionObject(r)):w&&T&&qe?(o=e,f=i,m=this.mergeOptions(r)):a.throwError("The parameters given to the AutoNumeric object are not valid, '".concat(e,"', '").concat(i,"' and '").concat(r,"' given.")),a.isNull(o)&&a.throwError("The selector '".concat(e,"' did not select any valid DOM element. Please check on which element you called AutoNumeric.")),{domElement:o,initialValue:f,userOptions:m}}},{key:"mergeOptions",value:function(e){var i=this,r={};return e.forEach(function(o){le(r,i._getOptionObject(o))}),r}},{key:"_isPreDefinedOptionValid",value:function(e){return Object.prototype.hasOwnProperty.call(s.predefinedOptions,e)}},{key:"_getOptionObject",value:function(e){var i;return a.isString(e)?(i=s.getPredefinedOptions()[e])==null&&a.warning("The given pre-defined option [".concat(e,"] is not recognized by autoNumeric. Please check that pre-defined option name."),!0):i=e,i}},{key:"_doesFormHandlerListExists",value:function(){var e=$(window.aNFormHandlerMap);return e!=="undefined"&&e==="object"}},{key:"_createFormHandlerList",value:function(){window.aNFormHandlerMap=new Map}},{key:"_checkValuesToStringsArray",value:function(e,i){return a.isInArray(String(e),i)}},{key:"_checkValuesToStringsSettings",value:function(e,i){return this._checkValuesToStringsArray(e,Object.keys(i.valuesToStrings))}},{key:"_checkStringsToValuesSettings",value:function(e,i){return this._checkValuesToStringsArray(e,Object.values(i.valuesToStrings))}},{key:"_unformatAltHovered",value:function(e){e.hoveredWithAlt=!0,e.unformat()}},{key:"_reformatAltHovered",value:function(e){e.hoveredWithAlt=!1,e.reformat()}},{key:"_getChildANInputElement",value:function(e){var i=this,r=e.getElementsByTagName("input"),o=[];return Array.prototype.slice.call(r,0).forEach(function(m){i.test(m)&&o.push(m)}),o}},{key:"test",value:function(e){return this._isInGlobalList(a.domElement(e))}},{key:"_createWeakMap",value:function(e){window[e]=new WeakMap}},{key:"_createGlobalList",value:function(){this.autoNumericGlobalListName="autoNumericGlobalList",this._createWeakMap(this.autoNumericGlobalListName)}},{key:"_doesGlobalListExists",value:function(){var e=$(window[this.autoNumericGlobalListName]);return e!=="undefined"&&e==="object"}},{key:"_addToGlobalList",value:function(e){this._doesGlobalListExists()||this._createGlobalList();var i=e.node();if(this._isInGlobalList(i)){if(this._getFromGlobalList(i)===this)return;a.warning("A reference to the DOM element you just initialized already exists in the global AutoNumeric element list. Please make sure to not initialize the same DOM element multiple times.",e.getSettings().showWarnings)}window[this.autoNumericGlobalListName].set(i,e)}},{key:"_removeFromGlobalList",value:function(e){this._doesGlobalListExists()&&window[this.autoNumericGlobalListName].delete(e.node())}},{key:"_getFromGlobalList",value:function(e){return this._doesGlobalListExists()?window[this.autoNumericGlobalListName].get(e):null}},{key:"_isInGlobalList",value:function(e){return!!this._doesGlobalListExists()&&window[this.autoNumericGlobalListName].has(e)}},{key:"validate",value:function(e){var i=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;!a.isUndefinedOrNullOrEmpty(e)&&a.isObject(e)||a.throwError("The userOptions are invalid ; it should be a valid object, [".concat(e,"] given."));var o,m=a.isObject(r);m||a.isNull(r)||a.throwError("The 'originalOptions' parameter is invalid ; it should either be a valid option object or `null`, [".concat(e,"] given.")),a.isNull(e)||this._convertOldOptionsToNewOnes(e),o=i?le({},this.getDefaultConfig(),e):e,a.isTrueOrFalseString(o.showWarnings)||a.isBoolean(o.showWarnings)||a.throwError("The debug option 'showWarnings' is invalid ; it should be either 'true' or 'false', [".concat(o.showWarnings,"] given."));var f,w=/^[0-9]+$/,E=/[0-9]+/,O=/^-?[0-9]+(\.?[0-9]+)?$/,p=/^[0-9]+(\.?[0-9]+)?$/;a.isTrueOrFalseString(o.allowDecimalPadding)||a.isBoolean(o.allowDecimalPadding)||o.allowDecimalPadding===s.options.allowDecimalPadding.floats||a.isNumber(o.allowDecimalPadding)&&o.allowDecimalPadding>0||a.throwError("The decimal padding option 'allowDecimalPadding' is invalid ; it should either be `false`, `true`, `'floats'` or a positive integer superior to 0, [".concat(o.allowDecimalPadding,"] given.")),a.isNumber(o.allowDecimalPadding)&&o.allowDecimalPadding>o.decimalPlaces&&a.warning("Setting 'allowDecimalPadding' to a number [".concat(o.allowDecimalPadding,"] superior to the current 'decimalPlaces' settings [").concat(o.decimalPlaces,"] is useless, since the padding will not be shown."),o.showWarnings),o.allowDecimalPadding!==s.options.allowDecimalPadding.never&&o.allowDecimalPadding!=="false"||o.decimalPlaces===s.options.decimalPlaces.none&&o.decimalPlacesShownOnBlur===s.options.decimalPlacesShownOnBlur.none&&o.decimalPlacesShownOnFocus===s.options.decimalPlacesShownOnFocus.none||a.warning("Setting 'allowDecimalPadding' to [".concat(o.allowDecimalPadding,"] will override the current 'decimalPlaces*' settings [").concat(o.decimalPlaces,", ").concat(o.decimalPlacesShownOnBlur," and ").concat(o.decimalPlacesShownOnFocus,"]."),o.showWarnings),a.isTrueOrFalseString(o.alwaysAllowDecimalCharacter)||a.isBoolean(o.alwaysAllowDecimalCharacter)||a.throwError("The option 'alwaysAllowDecimalCharacter' is invalid ; it should either be `true` or `false`, [".concat(o.alwaysAllowDecimalCharacter,"] given.")),a.isNull(o.caretPositionOnFocus)||a.isInArray(o.caretPositionOnFocus,[s.options.caretPositionOnFocus.start,s.options.caretPositionOnFocus.end,s.options.caretPositionOnFocus.decimalLeft,s.options.caretPositionOnFocus.decimalRight])||a.throwError("The display on empty string option 'caretPositionOnFocus' is invalid ; it should either be `null`, 'focus', 'press', 'always' or 'zero', [".concat(o.caretPositionOnFocus,"] given.")),f=m?r:this._correctCaretPositionOnFocusAndSelectOnFocusOptions(e),a.isNull(f)||f.caretPositionOnFocus===s.options.caretPositionOnFocus.doNoForceCaretPosition||f.selectOnFocus!==s.options.selectOnFocus.select||a.warning("The 'selectOnFocus' option is set to 'select', which is in conflict with the 'caretPositionOnFocus' which is set to '".concat(f.caretPositionOnFocus,"'. As a result, if this has been called when instantiating an AutoNumeric object, the 'selectOnFocus' option is forced to 'doNotSelect'."),o.showWarnings),a.isInArray(o.digitGroupSeparator,[s.options.digitGroupSeparator.comma,s.options.digitGroupSeparator.dot,s.options.digitGroupSeparator.normalSpace,s.options.digitGroupSeparator.thinSpace,s.options.digitGroupSeparator.narrowNoBreakSpace,s.options.digitGroupSeparator.noBreakSpace,s.options.digitGroupSeparator.noSeparator,s.options.digitGroupSeparator.apostrophe,s.options.digitGroupSeparator.arabicThousandsSeparator,s.options.digitGroupSeparator.dotAbove,s.options.digitGroupSeparator.privateUseTwo])||a.throwError(`The thousand separator character option 'digitGroupSeparator' is invalid ; it should be ',', '.', '\u066C', '\u02D9', "'", '\x92', ' ', '\u2009', '\u202F', '\xA0' or empty (''), [`.concat(o.digitGroupSeparator,"] given.")),a.isTrueOrFalseString(o.showOnlyNumbersOnFocus)||a.isBoolean(o.showOnlyNumbersOnFocus)||a.throwError("The 'showOnlyNumbersOnFocus' option is invalid ; it should be either 'true' or 'false', [".concat(o.showOnlyNumbersOnFocus,"] given.")),a.isInArray(o.digitalGroupSpacing,[s.options.digitalGroupSpacing.two,s.options.digitalGroupSpacing.twoThree,s.options.digitalGroupSpacing.twoScaled,s.options.digitalGroupSpacing.three,s.options.digitalGroupSpacing.four])||o.digitalGroupSpacing>=2&&o.digitalGroupSpacing<=4||a.throwError("The grouping separator option for thousands 'digitalGroupSpacing' is invalid ; it should be '2', '2t', '2s', '3', or '4', [".concat(o.digitalGroupSpacing,"] given.")),a.isInArray(o.decimalCharacter,[s.options.decimalCharacter.comma,s.options.decimalCharacter.dot,s.options.decimalCharacter.middleDot,s.options.decimalCharacter.arabicDecimalSeparator,s.options.decimalCharacter.decimalSeparatorKeySymbol])||a.throwError("The decimal separator character option 'decimalCharacter' is invalid ; it should be '.', ',', '\xB7', '\u2396' or '\u066B', [".concat(o.decimalCharacter,"] given.")),o.decimalCharacter===o.digitGroupSeparator&&a.throwError("autoNumeric will not function properly when the decimal character 'decimalCharacter' [".concat(o.decimalCharacter,"] and the thousand separator 'digitGroupSeparator' [").concat(o.digitGroupSeparator,"] are the same character.")),a.isNull(o.decimalCharacterAlternative)||a.isString(o.decimalCharacterAlternative)||a.throwError("The alternate decimal separator character option 'decimalCharacterAlternative' is invalid ; it should be a string, [".concat(o.decimalCharacterAlternative,"] given.")),o.currencySymbol===""||a.isString(o.currencySymbol)||a.throwError("The currency symbol option 'currencySymbol' is invalid ; it should be a string, [".concat(o.currencySymbol,"] given.")),a.isInArray(o.currencySymbolPlacement,[s.options.currencySymbolPlacement.prefix,s.options.currencySymbolPlacement.suffix])||a.throwError("The placement of the currency sign option 'currencySymbolPlacement' is invalid ; it should either be 'p' (prefix) or 's' (suffix), [".concat(o.currencySymbolPlacement,"] given.")),a.isInArray(o.negativePositiveSignPlacement,[s.options.negativePositiveSignPlacement.prefix,s.options.negativePositiveSignPlacement.suffix,s.options.negativePositiveSignPlacement.left,s.options.negativePositiveSignPlacement.right,s.options.negativePositiveSignPlacement.none])||a.throwError("The placement of the negative sign option 'negativePositiveSignPlacement' is invalid ; it should either be 'p' (prefix), 's' (suffix), 'l' (left), 'r' (right) or 'null', [".concat(o.negativePositiveSignPlacement,"] given.")),a.isTrueOrFalseString(o.showPositiveSign)||a.isBoolean(o.showPositiveSign)||a.throwError("The show positive sign option 'showPositiveSign' is invalid ; it should be either 'true' or 'false', [".concat(o.showPositiveSign,"] given.")),(!a.isString(o.suffixText)||o.suffixText!==""&&(a.isNegative(o.suffixText,o.negativeSignCharacter)||E.test(o.suffixText)))&&a.throwError("The additional suffix option 'suffixText' is invalid ; it should not contains the negative sign '".concat(o.negativeSignCharacter,"' nor any numerical characters, [").concat(o.suffixText,"] given.")),(!a.isString(o.negativeSignCharacter)||o.negativeSignCharacter.length!==1||a.isUndefinedOrNullOrEmpty(o.negativeSignCharacter)||E.test(o.negativeSignCharacter))&&a.throwError("The negative sign character option 'negativeSignCharacter' is invalid ; it should be a single character, and cannot be any numerical characters, [".concat(o.negativeSignCharacter,"] given.")),(!a.isString(o.positiveSignCharacter)||o.positiveSignCharacter.length!==1||a.isUndefinedOrNullOrEmpty(o.positiveSignCharacter)||E.test(o.positiveSignCharacter))&&a.throwError("The positive sign character option 'positiveSignCharacter' is invalid ; it should be a single character, and cannot be any numerical characters, [".concat(o.positiveSignCharacter,"] given.\nIf you want to show the positive sign character, you need to set the `showPositiveSign` option to `true`.")),o.negativeSignCharacter===o.positiveSignCharacter&&a.throwError("The positive 'positiveSignCharacter' and negative 'negativeSignCharacter' sign characters cannot be identical ; [".concat(o.negativeSignCharacter,"] given.")),a.isTrueOrFalseString(o.negativePositiveSignBehavior)||a.isBoolean(o.negativePositiveSignBehavior)||a.throwError("The option 'negativePositiveSignBehavior' is invalid ; it should be either 'true' or 'false', [".concat(o.negativePositiveSignBehavior,"] given."));var T=te(a.isNull(o.negativeBracketsTypeOnBlur)?["",""]:o.negativeBracketsTypeOnBlur.split(","),2),A=T[0],G=T[1];(a.contains(o.digitGroupSeparator,o.negativeSignCharacter)||a.contains(o.decimalCharacter,o.negativeSignCharacter)||a.contains(o.decimalCharacterAlternative,o.negativeSignCharacter)||a.contains(A,o.negativeSignCharacter)||a.contains(G,o.negativeSignCharacter)||a.contains(o.suffixText,o.negativeSignCharacter))&&a.throwError("The negative sign character option 'negativeSignCharacter' is invalid ; it should not be equal or a part of the digit separator, the decimal character, the decimal character alternative, the negative brackets or the suffix text, [".concat(o.negativeSignCharacter,"] given.")),(a.contains(o.digitGroupSeparator,o.positiveSignCharacter)||a.contains(o.decimalCharacter,o.positiveSignCharacter)||a.contains(o.decimalCharacterAlternative,o.positiveSignCharacter)||a.contains(A,o.positiveSignCharacter)||a.contains(G,o.positiveSignCharacter)||a.contains(o.suffixText,o.positiveSignCharacter))&&a.throwError("The positive sign character option 'positiveSignCharacter' is invalid ; it should not be equal or a part of the digit separator, the decimal character, the decimal character alternative, the negative brackets or the suffix text, [".concat(o.positiveSignCharacter,"] given.")),a.isNull(o.overrideMinMaxLimits)||a.isInArray(o.overrideMinMaxLimits,[s.options.overrideMinMaxLimits.ceiling,s.options.overrideMinMaxLimits.floor,s.options.overrideMinMaxLimits.ignore,s.options.overrideMinMaxLimits.invalid])||a.throwError("The override min & max limits option 'overrideMinMaxLimits' is invalid ; it should either be 'ceiling', 'floor', 'ignore' or 'invalid', [".concat(o.overrideMinMaxLimits,"] given.")),o.overrideMinMaxLimits!==s.options.overrideMinMaxLimits.invalid&&o.overrideMinMaxLimits!==s.options.overrideMinMaxLimits.ignore&&(o.minimumValue>0||o.maximumValue<0)&&a.warning("You've set a `minimumValue` or a `maximumValue` excluding the value `0`. AutoNumeric will force the users to always have a valid value in the input, hence preventing them to clear the field. If you want to allow for temporary invalid values (i.e. out-of-range), you should use the 'invalid' option for the 'overrideMinMaxLimits' setting."),a.isString(o.maximumValue)&&O.test(o.maximumValue)||a.throwError("The maximum possible value option 'maximumValue' is invalid ; it should be a string that represents a positive or negative number, [".concat(o.maximumValue,"] given.")),a.isString(o.minimumValue)&&O.test(o.minimumValue)||a.throwError("The minimum possible value option 'minimumValue' is invalid ; it should be a string that represents a positive or negative number, [".concat(o.minimumValue,"] given.")),parseFloat(o.minimumValue)>parseFloat(o.maximumValue)&&a.throwError("The minimum possible value option is greater than the maximum possible value option ; 'minimumValue' [".concat(o.minimumValue,"] should be smaller than 'maximumValue' [").concat(o.maximumValue,"].")),a.isInt(o.decimalPlaces)&&o.decimalPlaces>=0||a.isString(o.decimalPlaces)&&w.test(o.decimalPlaces)||a.throwError("The number of decimal places option 'decimalPlaces' is invalid ; it should be a positive integer, [".concat(o.decimalPlaces,"] given.")),a.isNull(o.decimalPlacesRawValue)||a.isInt(o.decimalPlacesRawValue)&&o.decimalPlacesRawValue>=0||a.isString(o.decimalPlacesRawValue)&&w.test(o.decimalPlacesRawValue)||a.throwError("The number of decimal places for the raw value option 'decimalPlacesRawValue' is invalid ; it should be a positive integer or `null`, [".concat(o.decimalPlacesRawValue,"] given.")),this._validateDecimalPlacesRawValue(o),a.isNull(o.decimalPlacesShownOnFocus)||w.test(String(o.decimalPlacesShownOnFocus))||a.throwError("The number of expanded decimal places option 'decimalPlacesShownOnFocus' is invalid ; it should be a positive integer or `null`, [".concat(o.decimalPlacesShownOnFocus,"] given.")),!a.isNull(o.decimalPlacesShownOnFocus)&&Number(o.decimalPlaces)>Number(o.decimalPlacesShownOnFocus)&&a.warning("The extended decimal places 'decimalPlacesShownOnFocus' [".concat(o.decimalPlacesShownOnFocus,"] should be greater than the 'decimalPlaces' [").concat(o.decimalPlaces,"] value. Currently, this will limit the ability of your user to manually change some of the decimal places. Do you really want to do that?"),o.showWarnings),(a.isNull(o.divisorWhenUnfocused)||p.test(o.divisorWhenUnfocused))&&o.divisorWhenUnfocused!==0&&o.divisorWhenUnfocused!=="0"&&o.divisorWhenUnfocused!==1&&o.divisorWhenUnfocused!=="1"||a.throwError("The divisor option 'divisorWhenUnfocused' is invalid ; it should be a positive number higher than one, preferably an integer, [".concat(o.divisorWhenUnfocused,"] given.")),a.isNull(o.decimalPlacesShownOnBlur)||w.test(o.decimalPlacesShownOnBlur)||a.throwError("The number of decimals shown when unfocused option 'decimalPlacesShownOnBlur' is invalid ; it should be a positive integer or `null`, [".concat(o.decimalPlacesShownOnBlur,"] given.")),a.isNull(o.symbolWhenUnfocused)||a.isString(o.symbolWhenUnfocused)||a.throwError("The symbol to show when unfocused option 'symbolWhenUnfocused' is invalid ; it should be a string, [".concat(o.symbolWhenUnfocused,"] given.")),a.isTrueOrFalseString(o.saveValueToSessionStorage)||a.isBoolean(o.saveValueToSessionStorage)||a.throwError("The save to session storage option 'saveValueToSessionStorage' is invalid ; it should be either 'true' or 'false', [".concat(o.saveValueToSessionStorage,"] given.")),a.isInArray(o.onInvalidPaste,[s.options.onInvalidPaste.error,s.options.onInvalidPaste.ignore,s.options.onInvalidPaste.clamp,s.options.onInvalidPaste.truncate,s.options.onInvalidPaste.replace])||a.throwError("The paste behavior option 'onInvalidPaste' is invalid ; it should either be 'error', 'ignore', 'clamp', 'truncate' or 'replace' (cf. documentation), [".concat(o.onInvalidPaste,"] given.")),a.isInArray(o.roundingMethod,[s.options.roundingMethod.halfUpSymmetric,s.options.roundingMethod.halfUpAsymmetric,s.options.roundingMethod.halfDownSymmetric,s.options.roundingMethod.halfDownAsymmetric,s.options.roundingMethod.halfEvenBankersRounding,s.options.roundingMethod.upRoundAwayFromZero,s.options.roundingMethod.downRoundTowardZero,s.options.roundingMethod.toCeilingTowardPositiveInfinity,s.options.roundingMethod.toFloorTowardNegativeInfinity,s.options.roundingMethod.toNearest05,s.options.roundingMethod.toNearest05Alt,s.options.roundingMethod.upToNext05,s.options.roundingMethod.downToNext05])||a.throwError("The rounding method option 'roundingMethod' is invalid ; it should either be 'S', 'A', 's', 'a', 'B', 'U', 'D', 'C', 'F', 'N05', 'CHF', 'U05' or 'D05' (cf. documentation), [".concat(o.roundingMethod,"] given.")),a.isNull(o.negativeBracketsTypeOnBlur)||a.isInArray(o.negativeBracketsTypeOnBlur,[s.options.negativeBracketsTypeOnBlur.parentheses,s.options.negativeBracketsTypeOnBlur.brackets,s.options.negativeBracketsTypeOnBlur.chevrons,s.options.negativeBracketsTypeOnBlur.curlyBraces,s.options.negativeBracketsTypeOnBlur.angleBrackets,s.options.negativeBracketsTypeOnBlur.japaneseQuotationMarks,s.options.negativeBracketsTypeOnBlur.halfBrackets,s.options.negativeBracketsTypeOnBlur.whiteSquareBrackets,s.options.negativeBracketsTypeOnBlur.quotationMarks,s.options.negativeBracketsTypeOnBlur.guillemets])||a.throwError("The brackets for negative values option 'negativeBracketsTypeOnBlur' is invalid ; it should either be '(,)', '[,]', '<,>', '{,}', '\u3008,\u3009', '\uFF62,\uFF63', '\u2E24,\u2E25', '\u27E6,\u27E7', '\u2039,\u203A' or '\xAB,\xBB', [".concat(o.negativeBracketsTypeOnBlur,"] given.")),(a.isString(o.emptyInputBehavior)||a.isNumber(o.emptyInputBehavior))&&(a.isInArray(o.emptyInputBehavior,[s.options.emptyInputBehavior.focus,s.options.emptyInputBehavior.press,s.options.emptyInputBehavior.always,s.options.emptyInputBehavior.min,s.options.emptyInputBehavior.max,s.options.emptyInputBehavior.zero,s.options.emptyInputBehavior.null])||O.test(o.emptyInputBehavior))||a.throwError("The display on empty string option 'emptyInputBehavior' is invalid ; it should either be 'focus', 'press', 'always', 'min', 'max', 'zero', 'null', a number, or a string that represents a number, [".concat(o.emptyInputBehavior,"] given.")),o.emptyInputBehavior===s.options.emptyInputBehavior.zero&&(o.minimumValue>0||o.maximumValue<0)&&a.throwError("The 'emptyInputBehavior' option is set to 'zero', but this value is outside of the range defined by 'minimumValue' and 'maximumValue' [".concat(o.minimumValue,", ").concat(o.maximumValue,"].")),O.test(String(o.emptyInputBehavior))&&(this._isWithinRangeWithOverrideOption(o.emptyInputBehavior,o)||a.throwError("The 'emptyInputBehavior' option is set to a number or a string that represents a number, but its value [".concat(o.emptyInputBehavior,"] is outside of the range defined by the 'minimumValue' and 'maximumValue' options [").concat(o.minimumValue,", ").concat(o.maximumValue,"]."))),a.isTrueOrFalseString(o.eventBubbles)||a.isBoolean(o.eventBubbles)||a.throwError("The event bubbles option 'eventBubbles' is invalid ; it should be either 'true' or 'false', [".concat(o.eventBubbles,"] given.")),a.isTrueOrFalseString(o.eventIsCancelable)||a.isBoolean(o.eventIsCancelable)||a.throwError("The event is cancelable option 'eventIsCancelable' is invalid ; it should be either 'true' or 'false', [".concat(o.eventIsCancelable,"] given.")),!a.isBoolean(o.invalidClass)&&/^-?[_a-zA-Z]+[_a-zA-Z0-9-]*$/.test(o.invalidClass)||a.throwError("The name of the 'invalidClass' option is not a valid CSS class name ; it should not be empty, and should follow the '^-?[_a-zA-Z]+[_a-zA-Z0-9-]*$' regex, [".concat(o.invalidClass,"] given.")),a.isInArray(o.leadingZero,[s.options.leadingZero.allow,s.options.leadingZero.deny,s.options.leadingZero.keep])||a.throwError("The leading zero behavior option 'leadingZero' is invalid ; it should either be 'allow', 'deny' or 'keep', [".concat(o.leadingZero,"] given.")),a.isTrueOrFalseString(o.formatOnPageLoad)||a.isBoolean(o.formatOnPageLoad)||a.throwError("The format on initialization option 'formatOnPageLoad' is invalid ; it should be either 'true' or 'false', [".concat(o.formatOnPageLoad,"] given.")),a.isTrueOrFalseString(o.formulaMode)||a.isBoolean(o.formulaMode)||a.throwError("The formula mode option 'formulaMode' is invalid ; it should be either 'true' or 'false', [".concat(o.formulaMode,"] given.")),w.test(o.historySize)&&o.historySize!==0||a.throwError("The history size option 'historySize' is invalid ; it should be a positive integer, [".concat(o.historySize,"] given.")),a.isTrueOrFalseString(o.selectNumberOnly)||a.isBoolean(o.selectNumberOnly)||a.throwError("The select number only option 'selectNumberOnly' is invalid ; it should be either 'true' or 'false', [".concat(o.selectNumberOnly,"] given.")),a.isTrueOrFalseString(o.selectOnFocus)||a.isBoolean(o.selectOnFocus)||a.throwError("The select on focus option 'selectOnFocus' is invalid ; it should be either 'true' or 'false', [".concat(o.selectOnFocus,"] given.")),a.isNull(o.defaultValueOverride)||o.defaultValueOverride===""||O.test(o.defaultValueOverride)||a.throwError("The unformatted default value option 'defaultValueOverride' is invalid ; it should be a string that represents a positive or negative number, [".concat(o.defaultValueOverride,"] given.")),a.isTrueOrFalseString(o.unformatOnSubmit)||a.isBoolean(o.unformatOnSubmit)||a.throwError("The remove formatting on submit option 'unformatOnSubmit' is invalid ; it should be either 'true' or 'false', [".concat(o.unformatOnSubmit,"] given.")),a.isNull(o.valuesToStrings)||a.isObject(o.valuesToStrings)||a.throwError("The option 'valuesToStrings' is invalid ; it should be an object, ideally with 'key -> value' entries, [".concat(o.valuesToStrings,"] given.")),a.isNull(o.outputFormat)||a.isInArray(o.outputFormat,[s.options.outputFormat.string,s.options.outputFormat.number,s.options.outputFormat.dot,s.options.outputFormat.negativeDot,s.options.outputFormat.comma,s.options.outputFormat.negativeComma,s.options.outputFormat.dotNegative,s.options.outputFormat.commaNegative])||a.throwError("The custom locale format option 'outputFormat' is invalid ; it should either be null, 'string', 'number', '.', '-.', ',', '-,', '.-' or ',-', [".concat(o.outputFormat,"] given.")),a.isTrueOrFalseString(o.isCancellable)||a.isBoolean(o.isCancellable)||a.throwError("The cancellable behavior option 'isCancellable' is invalid ; it should be either 'true' or 'false', [".concat(o.isCancellable,"] given.")),a.isTrueOrFalseString(o.modifyValueOnUpDownArrow)||a.isBoolean(o.modifyValueOnUpDownArrow)||a.throwError("The increment/decrement on up and down arrow keys 'modifyValueOnUpDownArrow' is invalid ; it should be either 'true' or 'false', [".concat(o.modifyValueOnUpDownArrow,"] given.")),a.isTrueOrFalseString(o.modifyValueOnWheel)||a.isBoolean(o.modifyValueOnWheel)||a.throwError("The increment/decrement on mouse wheel option 'modifyValueOnWheel' is invalid ; it should be either 'true' or 'false', [".concat(o.modifyValueOnWheel,"] given.")),a.isTrueOrFalseString(o.watchExternalChanges)||a.isBoolean(o.watchExternalChanges)||a.throwError("The option 'watchExternalChanges' is invalid ; it should be either 'true' or 'false', [".concat(o.watchExternalChanges,"] given.")),a.isInArray(o.wheelOn,[s.options.wheelOn.focus,s.options.wheelOn.hover])||a.throwError("The wheel behavior option 'wheelOn' is invalid ; it should either be 'focus' or 'hover', [".concat(o.wheelOn,"] given.")),(!a.isString(o.upDownStep)&&!a.isNumber(o.upDownStep)||o.upDownStep!=="progressive"&&!p.test(o.upDownStep)||Number(o.upDownStep)===0)&&a.throwError("The up/down arrow step value option 'upDownStep' is invalid ; it should either be the string 'progressive', or a number or a string that represents a positive number (excluding zero), [".concat(o.upDownStep,"] given.")),(!a.isString(o.wheelStep)&&!a.isNumber(o.wheelStep)||o.wheelStep!=="progressive"&&!p.test(o.wheelStep)||Number(o.wheelStep)===0)&&a.throwError("The wheel step value option 'wheelStep' is invalid ; it should either be the string 'progressive', or a number or a string that represents a positive number (excluding zero), [".concat(o.wheelStep,"] given.")),a.isInArray(o.serializeSpaces,[s.options.serializeSpaces.plus,s.options.serializeSpaces.percent])||a.throwError("The space replacement character option 'serializeSpaces' is invalid ; it should either be '+' or '%20', [".concat(o.serializeSpaces,"] given.")),a.isTrueOrFalseString(o.noEventListeners)||a.isBoolean(o.noEventListeners)||a.throwError("The option 'noEventListeners' that prevent the creation of event listeners is invalid ; it should be either 'true' or 'false', [".concat(o.noEventListeners,"] given.")),a.isNull(o.styleRules)||a.isObject(o.styleRules)&&(Object.prototype.hasOwnProperty.call(o.styleRules,"positive")||Object.prototype.hasOwnProperty.call(o.styleRules,"negative")||Object.prototype.hasOwnProperty.call(o.styleRules,"ranges")||Object.prototype.hasOwnProperty.call(o.styleRules,"userDefined"))||a.throwError("The option 'styleRules' is invalid ; it should be a correctly structured object, with one or more 'positive', 'negative', 'ranges' or 'userDefined' attributes, [".concat(o.styleRules,"] given.")),a.isNull(o.styleRules)||!Object.prototype.hasOwnProperty.call(o.styleRules,"userDefined")||a.isNull(o.styleRules.userDefined)||o.styleRules.userDefined.forEach(function(H){Object.prototype.hasOwnProperty.call(H,"callback")&&!a.isFunction(H.callback)&&a.throwError("The callback defined in the `userDefined` attribute is not a function, ".concat($(H.callback)," given."))}),(a.isNull(o.rawValueDivisor)||p.test(o.rawValueDivisor))&&o.rawValueDivisor!==0&&o.rawValueDivisor!=="0"&&o.rawValueDivisor!==1&&o.rawValueDivisor!=="1"||a.throwError("The raw value divisor option 'rawValueDivisor' is invalid ; it should be a positive number higher than one, preferably an integer, [".concat(o.rawValueDivisor,"] given.")),a.isTrueOrFalseString(o.readOnly)||a.isBoolean(o.readOnly)||a.throwError("The option 'readOnly' is invalid ; it should be either 'true' or 'false', [".concat(o.readOnly,"] given.")),a.isTrueOrFalseString(o.unformatOnHover)||a.isBoolean(o.unformatOnHover)||a.throwError("The option 'unformatOnHover' is invalid ; it should be either 'true' or 'false', [".concat(o.unformatOnHover,"] given.")),a.isTrueOrFalseString(o.failOnUnknownOption)||a.isBoolean(o.failOnUnknownOption)||a.throwError("The debug option 'failOnUnknownOption' is invalid ; it should be either 'true' or 'false', [".concat(o.failOnUnknownOption,"] given.")),a.isTrueOrFalseString(o.createLocalList)||a.isBoolean(o.createLocalList)||a.throwError("The debug option 'createLocalList' is invalid ; it should be either 'true' or 'false', [".concat(o.createLocalList,"] given."))}},{key:"_validateDecimalPlacesRawValue",value:function(e){a.isNull(e.decimalPlacesRawValue)||(e.decimalPlacesRawValue<e.decimalPlaces&&a.warning("The number of decimal places to store in the raw value [".concat(e.decimalPlacesRawValue,"] is lower than the ones to display [").concat(e.decimalPlaces,"]. This will likely confuse your users.\nTo solve that, you'd need to either set `decimalPlacesRawValue` to `null`, or set a number of decimal places for the raw value equal of bigger than `decimalPlaces`."),e.showWarnings),e.decimalPlacesRawValue<e.decimalPlacesShownOnFocus&&a.warning("The number of decimal places to store in the raw value [".concat(e.decimalPlacesRawValue,"] is lower than the ones shown on focus [").concat(e.decimalPlacesShownOnFocus,"]. This will likely confuse your users.\nTo solve that, you'd need to either set `decimalPlacesRawValue` to `null`, or set a number of decimal places for the raw value equal of bigger than `decimalPlacesShownOnFocus`."),e.showWarnings),e.decimalPlacesRawValue<e.decimalPlacesShownOnBlur&&a.warning("The number of decimal places to store in the raw value [".concat(e.decimalPlacesRawValue,"] is lower than the ones shown when unfocused [").concat(e.decimalPlacesShownOnBlur,"]. This will likely confuse your users.\nTo solve that, you'd need to either set `decimalPlacesRawValue` to `null`, or set a number of decimal places for the raw value equal of bigger than `decimalPlacesShownOnBlur`."),e.showWarnings))}},{key:"areSettingsValid",value:function(e){var i=!0;try{this.validate(e,!0)}catch{i=!1}return i}},{key:"getDefaultConfig",value:function(){return s.defaultSettings}},{key:"getPredefinedOptions",value:function(){return s.predefinedOptions}},{key:"_generateOptionsObjectFromOptionsArray",value:function(e){var i,r=this;return a.isUndefinedOrNullOrEmpty(e)||e.length===0?i=null:(i={},e.length===1&&Array.isArray(e[0])?e[0].forEach(function(o){le(i,r._getOptionObject(o))}):e.length>=1&&e.forEach(function(o){le(i,r._getOptionObject(o))})),i}},{key:"format",value:function(e){if(a.isUndefined(e)||e===null)return null;var i;i=a.isElement(e)?a.getElementValue(e):e,a.isString(i)||a.isNumber(i)||a.throwError('The value "'.concat(i,'" being "set" is not numeric and therefore cannot be used appropriately.'));for(var r=arguments.length,o=new Array(r>1?r-1:0),m=1;m<r;m++)o[m-1]=arguments[m];var f=this._generateOptionsObjectFromOptionsArray(o),w=le({},this.getDefaultConfig(),f);w.isNegativeSignAllowed=i<0,w.isPositiveSignAllowed=i>=0,this._setBrackets(w),this._cachesUsualRegularExpressions(w,{});var E=this._toNumericValue(i,w);return isNaN(Number(E))&&a.throwError("The value [".concat(E,"] that you are trying to format is not a recognized number.")),this._isWithinRangeWithOverrideOption(E,w)||(a.triggerEvent(s.events.formatted,document,{oldValue:null,newValue:null,oldRawValue:null,newRawValue:null,isPristine:null,error:"Range test failed",aNElement:null},!0,!0),a.throwError("The value [".concat(E,"] being set falls outside of the minimumValue [").concat(w.minimumValue,"] and maximumValue [").concat(w.maximumValue,"] range set for this element"))),w.valuesToStrings&&this._checkValuesToStringsSettings(i,w)?w.valuesToStrings[i]:(this._correctNegativePositiveSignPlacementOption(w),this._calculateDecimalPlacesOnInit(w),a.isUndefinedOrNullOrEmpty(w.rawValueDivisor)||w.rawValueDivisor===0||E===""||E===null||(E*=w.rawValueDivisor),E=this._roundFormattedValueShownOnFocus(E,w),E=this._modifyNegativeSignAndDecimalCharacterForFormattedValue(E,w),E=this._addGroupSeparators(E,w,!1,E))}},{key:"formatAndSet",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,r=this.format(e,i);return a.setElementValue(e,r),r}},{key:"unformat",value:function(e){if(a.isNumberStrict(e))return e;var i;if((i=a.isElement(e)?a.getElementValue(e):e)==="")return"";if(a.isUndefined(i)||i===null)return null;(a.isArray(i)||a.isObject(i))&&a.throwError("A number or a string representing a number is needed to be able to unformat it, [".concat(i,"] given."));for(var r=arguments.length,o=new Array(r>1?r-1:0),m=1;m<r;m++)o[m-1]=arguments[m];var f=this._generateOptionsObjectFromOptionsArray(o),w=le({},this.getDefaultConfig(),f);if(w.isNegativeSignAllowed=!1,w.isPositiveSignAllowed=!0,i=i.toString(),w.valuesToStrings&&this._checkStringsToValuesSettings(i,w))return a.objectKeyLookup(w.valuesToStrings,i);if(a.isNegative(i,w.negativeSignCharacter))w.isNegativeSignAllowed=!0,w.isPositiveSignAllowed=!1;else if(!a.isNull(w.negativeBracketsTypeOnBlur)){var E=te(w.negativeBracketsTypeOnBlur.split(","),2);w.firstBracket=E[0],w.lastBracket=E[1],i.charAt(0)===w.firstBracket&&i.charAt(i.length-1)===w.lastBracket&&(w.isNegativeSignAllowed=!0,w.isPositiveSignAllowed=!1,i=this._removeBrackets(i,w,!1))}return i=this._convertToNumericString(i,w),a.isNumber(Number(i))&&(i=a.scientificToDecimal(i)),new RegExp("[^+-0123456789.]","gi").test(i)?NaN:(this._correctNegativePositiveSignPlacementOption(w),w.decimalPlacesRawValue?w.originalDecimalPlacesRawValue=w.decimalPlacesRawValue:w.originalDecimalPlacesRawValue=w.decimalPlaces,this._calculateDecimalPlacesOnInit(w),a.isUndefinedOrNullOrEmpty(w.rawValueDivisor)||w.rawValueDivisor===0||i===""||i===null||(i/=w.rawValueDivisor),i=(i=this._roundRawValue(i,w)).replace(w.decimalCharacter,"."),i=this._toLocale(i,w.outputFormat,w))}},{key:"unformatAndSet",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,r=this.unformat(e,i);return a.setElementValue(e,r),r}},{key:"localize",value:function(e){var i,r,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return(i=a.isElement(e)?a.getElementValue(e):e)===""?"":(a.isNull(o)&&(o=s.defaultSettings),i=this.unformat(i,o),Number(i)===0&&o.leadingZero!==s.options.leadingZero.keep&&(i="0"),r=a.isNull(o)?o.outputFormat:s.defaultSettings.outputFormat,this._toLocale(i,r,o))}},{key:"localizeAndSet",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,r=this.localize(e,i);return a.setElementValue(e,r),r}},{key:"isManagedByAutoNumeric",value:function(e){return this._isInGlobalList(a.domElement(e))}},{key:"getAutoNumericElement",value:function(e){var i=a.domElement(e);return this.isManagedByAutoNumeric(i)?this._getFromGlobalList(i):null}},{key:"set",value:function(e,i){var r,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,m=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],f=a.domElement(e);return this.isManagedByAutoNumeric(f)?this.getAutoNumericElement(f).set(i,o,m):(r=!(!a.isNull(o)&&Object.prototype.hasOwnProperty.call(o,"showWarnings"))||o.showWarnings,a.warning("Impossible to find an AutoNumeric object for the given DOM element or selector.",r),null)}},{key:"getNumericString",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return this._get(e,"getNumericString",i)}},{key:"getFormatted",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return this._get(e,"getFormatted",i)}},{key:"getNumber",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return this._get(e,"getNumber",i)}},{key:"_get",value:function(e,i){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,o=a.domElement(e);return this.isManagedByAutoNumeric(o)||a.throwError("Impossible to find an AutoNumeric object for the given DOM element or selector."),this.getAutoNumericElement(o)[i](r)}},{key:"getLocalized",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,o=a.domElement(e);return this.isManagedByAutoNumeric(o)||a.throwError("Impossible to find an AutoNumeric object for the given DOM element or selector."),this.getAutoNumericElement(o).getLocalized(i,r)}},{key:"_stripAllNonNumberCharacters",value:function(e,i,r,o){return this._stripAllNonNumberCharactersExceptCustomDecimalChar(e,i,r,o).replace(i.decimalCharacter,".")}},{key:"_stripAllNonNumberCharactersExceptCustomDecimalChar",value:function(e,i,r,o){var m=(e=(e=this._normalizeCurrencySuffixAndNegativeSignCharacters(e,i)).replace(i.allowedAutoStrip,"")).match(i.numRegAutoStrip);if(e=m?[m[1],m[2],m[3]].join(""):"",i.leadingZero===s.options.leadingZero.allow||i.leadingZero===s.options.leadingZero.keep){var f="",w=te(e.split(i.decimalCharacter),2),E=w[0],O=w[1],p=E;a.contains(p,i.negativeSignCharacter)&&(f=i.negativeSignCharacter,p=p.replace(i.negativeSignCharacter,"")),f===""&&p.length>i.mIntPos&&p.charAt(0)==="0"&&(p=p.slice(1)),f!==""&&p.length>i.mIntNeg&&p.charAt(0)==="0"&&(p=p.slice(1)),e="".concat(f).concat(p).concat(a.isUndefined(O)?"":i.decimalCharacter+O)}return(r&&i.leadingZero===s.options.leadingZero.deny||!o&&i.leadingZero===s.options.leadingZero.allow)&&(e=e.replace(i.stripReg,"$1$2")),e}},{key:"_toggleNegativeBracket",value:function(e,i,r){return r?this._removeBrackets(e,i):this._addBrackets(e,i)}},{key:"_addBrackets",value:function(e,i){return a.isNull(i.negativeBracketsTypeOnBlur)?e:"".concat(i.firstBracket).concat(e.replace(i.negativeSignCharacter,"")).concat(i.lastBracket)}},{key:"_removeBrackets",value:function(e,i){var r,o=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];return a.isNull(i.negativeBracketsTypeOnBlur)||e.charAt(0)!==i.firstBracket?r=e:(r=(r=e.replace(i.firstBracket,"")).replace(i.lastBracket,""),o?(r=r.replace(i.currencySymbol,""),r=this._mergeCurrencySignNegativePositiveSignAndValue(r,i,!0,!1)):r="".concat(i.negativeSignCharacter).concat(r)),r}},{key:"_setBrackets",value:function(e){if(a.isNull(e.negativeBracketsTypeOnBlur))e.firstBracket="",e.lastBracket="";else{var i=te(e.negativeBracketsTypeOnBlur.split(","),2),r=i[0],o=i[1];e.firstBracket=r,e.lastBracket=o}}},{key:"_convertToNumericString",value:function(e,i){e=this._removeBrackets(e,i,!1),e=(e=this._normalizeCurrencySuffixAndNegativeSignCharacters(e,i)).replace(new RegExp("[".concat(i.digitGroupSeparator,"]"),"g"),""),i.decimalCharacter!=="."&&(e=e.replace(i.decimalCharacter,".")),a.isNegative(e)&&e.lastIndexOf("-")===e.length-1&&(e=e.replace("-",""),e="-".concat(e)),i.showPositiveSign&&(e=e.replace(i.positiveSignCharacter,""));var r=i.leadingZero!==s.options.leadingZero.keep,o=a.arabicToLatinNumbers(e,r,!1,!1);return isNaN(o)||(e=o.toString()),e}},{key:"_normalizeCurrencySuffixAndNegativeSignCharacters",value:function(e,i){return e=String(e),i.currencySymbol!==s.options.currencySymbol.none&&(e=e.replace(i.currencySymbol,"")),i.suffixText!==s.options.suffixText.none&&(e=e.replace(i.suffixText,"")),i.negativeSignCharacter!==s.options.negativeSignCharacter.hyphen&&(e=e.replace(i.negativeSignCharacter,"-")),e}},{key:"_toLocale",value:function(e,i,r){if(a.isNull(i)||i===s.options.outputFormat.string)return e;var o;switch(i){case s.options.outputFormat.number:o=Number(e);break;case s.options.outputFormat.dotNegative:o=a.isNegative(e)?e.replace("-","")+"-":e;break;case s.options.outputFormat.comma:case s.options.outputFormat.negativeComma:o=e.replace(".",",");break;case s.options.outputFormat.commaNegative:o=e.replace(".",","),o=a.isNegative(o)?o.replace("-","")+"-":o;break;case s.options.outputFormat.dot:case s.options.outputFormat.negativeDot:o=e;break;default:a.throwError("The given outputFormat [".concat(i,"] option is not recognized."))}return i!==s.options.outputFormat.number&&r.negativeSignCharacter!=="-"&&(o=o.replace("-",r.negativeSignCharacter)),o}},{key:"_modifyNegativeSignAndDecimalCharacterForFormattedValue",value:function(e,i){return i.negativeSignCharacter!=="-"&&(e=e.replace("-",i.negativeSignCharacter)),i.decimalCharacter!=="."&&(e=e.replace(".",i.decimalCharacter)),e}},{key:"_isElementValueEmptyOrOnlyTheNegativeSign",value:function(e,i){return e===""||e===i.negativeSignCharacter}},{key:"_orderValueCurrencySymbolAndSuffixText",value:function(e,i,r){var o;if(i.emptyInputBehavior===s.options.emptyInputBehavior.always||r)switch(i.negativePositiveSignPlacement){case s.options.negativePositiveSignPlacement.left:case s.options.negativePositiveSignPlacement.prefix:case s.options.negativePositiveSignPlacement.none:o=e+i.currencySymbol+i.suffixText;break;default:o=i.currencySymbol+e+i.suffixText}else o=e;return o}},{key:"_addGroupSeparators",value:function(e,i,r,o){var m,f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:null;if(m=a.isNull(f)?a.isNegative(e,i.negativeSignCharacter)||a.isNegativeWithBrackets(e,i.firstBracket,i.lastBracket):f<0,e=this._stripAllNonNumberCharactersExceptCustomDecimalChar(e,i,!1,r),this._isElementValueEmptyOrOnlyTheNegativeSign(e,i))return this._orderValueCurrencySymbolAndSuffixText(e,i,!0);var w=a.isZeroOrHasNoValue(e);m&&(e=e.replace("-",""));var E,O=te(e.split(i.decimalCharacter),2),p=O[0],T=O[1];if(i.decimalCharacterAlternative&&a.isUndefined(T)){var A=te(e.split(i.decimalCharacterAlternative),2);p=A[0],T=A[1]}if(i.digitGroupSeparator!==""){var G;switch(i.digitalGroupSpacing=i.digitalGroupSpacing.toString(),i.digitalGroupSpacing){case s.options.digitalGroupSpacing.twoThree:G=/(\d)((\d)(\d{2}?)+)$/;break;case s.options.digitalGroupSpacing.twoScaled:G=/(\d)((?:\d{2}){0,2}\d{3}(?:(?:\d{2}){2}\d{3})*?)$/;break;case s.options.digitalGroupSpacing.two:case s.options.digitalGroupSpacing.three:case s.options.digitalGroupSpacing.four:default:G=new RegExp("(\\d)((\\d{".concat(i.digitalGroupSpacing,"}?)+)$"))}for(;G.test(p);)p=p.replace(G,"$1".concat(i.digitGroupSeparator,"$2"))}return(E=r?i.decimalPlacesShownOnFocus:i.decimalPlacesShownOnBlur)===0||a.isUndefined(T)?e=p:(T.length>E&&(T=T.substring(0,E)),e="".concat(p).concat(i.decimalCharacter).concat(T)),e=s._mergeCurrencySignNegativePositiveSignAndValue(e,i,m,w),a.isNull(f)&&(f=o),i.negativeBracketsTypeOnBlur!==null&&(f<0||a.isNegativeStrict(e,i.negativeSignCharacter))&&(e=this._toggleNegativeBracket(e,i,r)),i.suffixText?"".concat(e).concat(i.suffixText):e}},{key:"_mergeCurrencySignNegativePositiveSignAndValue",value:function(e,i,r,o){var m,f="";if(r?f=i.negativeSignCharacter:i.showPositiveSign&&!o&&(f=i.positiveSignCharacter),i.currencySymbolPlacement===s.options.currencySymbolPlacement.prefix)if(i.negativePositiveSignPlacement!==s.options.negativePositiveSignPlacement.none&&(r||!r&&i.showPositiveSign&&!o))switch(i.negativePositiveSignPlacement){case s.options.negativePositiveSignPlacement.prefix:case s.options.negativePositiveSignPlacement.left:m="".concat(f).concat(i.currencySymbol).concat(e);break;case s.options.negativePositiveSignPlacement.right:m="".concat(i.currencySymbol).concat(f).concat(e);break;case s.options.negativePositiveSignPlacement.suffix:m="".concat(i.currencySymbol).concat(e).concat(f)}else m=i.currencySymbol+e;else if(i.currencySymbolPlacement===s.options.currencySymbolPlacement.suffix)if(i.negativePositiveSignPlacement!==s.options.negativePositiveSignPlacement.none&&(r||!r&&i.showPositiveSign&&!o))switch(i.negativePositiveSignPlacement){case s.options.negativePositiveSignPlacement.suffix:case s.options.negativePositiveSignPlacement.right:m="".concat(e).concat(i.currencySymbol).concat(f);break;case s.options.negativePositiveSignPlacement.left:m="".concat(e).concat(f).concat(i.currencySymbol);break;case s.options.negativePositiveSignPlacement.prefix:m="".concat(f).concat(e).concat(i.currencySymbol)}else m=e+i.currencySymbol;return m}},{key:"_truncateZeros",value:function(e,i){var r;switch(i){case 0:r=/(\.(?:\d*[1-9])?)0*$/;break;case 1:r=/(\.\d(?:\d*[1-9])?)0*$/;break;default:r=new RegExp("(\\.\\d{".concat(i,"}(?:\\d*[1-9])?)0*"))}return e=e.replace(r,"$1"),i===0&&(e=e.replace(/\.$/,"")),e}},{key:"_roundRawValue",value:function(e,i){return this._roundValue(e,i,i.decimalPlacesRawValue)}},{key:"_roundFormattedValueShownOnFocus",value:function(e,i){return this._roundValue(e,i,Number(i.decimalPlacesShownOnFocus))}},{key:"_roundFormattedValueShownOnBlur",value:function(e,i){return this._roundValue(e,i,Number(i.decimalPlacesShownOnBlur))}},{key:"_roundFormattedValueShownOnFocusOrBlur",value:function(e,i,r){return r?this._roundFormattedValueShownOnFocus(e,i):this._roundFormattedValueShownOnBlur(e,i)}},{key:"_roundValue",value:function(e,i,r){if(a.isNull(e))return e;if(e=e===""?"0":e.toString(),i.roundingMethod===s.options.roundingMethod.toNearest05||i.roundingMethod===s.options.roundingMethod.toNearest05Alt||i.roundingMethod===s.options.roundingMethod.upToNext05||i.roundingMethod===s.options.roundingMethod.downToNext05)return this._roundCloseTo05(e,i);var o,m=te(s._prepareValueForRounding(e,i),2),f=m[0],w=(e=m[1]).lastIndexOf("."),E=w===-1,O=te(e.split("."),2),p=O[0];if(!(O[1]>0||i.allowDecimalPadding!==s.options.allowDecimalPadding.never&&i.allowDecimalPadding!==s.options.allowDecimalPadding.floats))return Number(e)===0?p:"".concat(f).concat(p);o=i.allowDecimalPadding===s.options.allowDecimalPadding.always||i.allowDecimalPadding===s.options.allowDecimalPadding.floats?r:i.allowDecimalPadding>0?i.allowDecimalPadding:0;var T,A=E?e.length-1:w,G=e.length-1-A,H="";if(G<=r){if(H=e,G<o){E&&(H="".concat(H).concat(i.decimalCharacter));for(var ie="000000";G<o;)H+=ie=ie.substring(0,o-G),G+=ie.length}else G>o?H=this._truncateZeros(H,o):G===0&&o===0&&(H=H.replace(/\.$/,""));return Number(H)===0?H:"".concat(f).concat(H)}T=E?r-1:Number(r)+Number(w);var qe,at=Number(e.charAt(T+1)),rt=e.substring(0,T+1).split("");if(qe=e.charAt(T)==="."?e.charAt(T-1)%2:e.charAt(T)%2,this._shouldRoundUp(at,i,f,qe)){for(var Ze=rt.length-1;Ze>=0;Ze-=1)if(rt[Ze]!=="."){if(rt[Ze]=+rt[Ze]+1,rt[Ze]<10)break;Ze>0&&(rt[Ze]="0")}}return rt=rt.slice(0,T+1),H=this._truncateZeros(rt.join(""),o),Number(H)===0?H:"".concat(f).concat(H)}},{key:"_roundCloseTo05",value:function(e,i){switch(i.roundingMethod){case s.options.roundingMethod.toNearest05:case s.options.roundingMethod.toNearest05Alt:e=(Math.round(20*e)/20).toString();break;case s.options.roundingMethod.upToNext05:e=(Math.ceil(20*e)/20).toString();break;default:e=(Math.floor(20*e)/20).toString()}return a.contains(e,".")?e.length-e.indexOf(".")<3?e+"0":e:e+".00"}},{key:"_prepareValueForRounding",value:function(e,i){var r="";return a.isNegativeStrict(e,"-")&&(r="-",e=e.replace("-","")),e.match(/^\d/)||(e="0".concat(e)),Number(e)===0&&(r=""),(Number(e)>0&&i.leadingZero!==s.options.leadingZero.keep||e.length>0&&i.leadingZero===s.options.leadingZero.allow)&&(e=e.replace(/^0*(\d)/,"$1")),[r,e]}},{key:"_shouldRoundUp",value:function(e,i,r,o){return e>4&&i.roundingMethod===s.options.roundingMethod.halfUpSymmetric||e>4&&i.roundingMethod===s.options.roundingMethod.halfUpAsymmetric&&r===""||e>5&&i.roundingMethod===s.options.roundingMethod.halfUpAsymmetric&&r==="-"||e>5&&i.roundingMethod===s.options.roundingMethod.halfDownSymmetric||e>5&&i.roundingMethod===s.options.roundingMethod.halfDownAsymmetric&&r===""||e>4&&i.roundingMethod===s.options.roundingMethod.halfDownAsymmetric&&r==="-"||e>5&&i.roundingMethod===s.options.roundingMethod.halfEvenBankersRounding||e===5&&i.roundingMethod===s.options.roundingMethod.halfEvenBankersRounding&&o===1||e>0&&i.roundingMethod===s.options.roundingMethod.toCeilingTowardPositiveInfinity&&r===""||e>0&&i.roundingMethod===s.options.roundingMethod.toFloorTowardNegativeInfinity&&r==="-"||e>0&&i.roundingMethod===s.options.roundingMethod.upRoundAwayFromZero}},{key:"_truncateDecimalPlaces",value:function(e,i,r,o){r&&(e=this._roundFormattedValueShownOnFocus(e,i));var m=te(e.split(i.decimalCharacter),2),f=m[0],w=m[1];if(w&&w.length>o)if(o>0){var E=w.substring(0,o);e="".concat(f).concat(i.decimalCharacter).concat(E)}else e=f;return e}},{key:"_checkIfInRangeWithOverrideOption",value:function(e,i){if(a.isNull(e)&&i.emptyInputBehavior===s.options.emptyInputBehavior.null||i.overrideMinMaxLimits===s.options.overrideMinMaxLimits.ignore||i.overrideMinMaxLimits===s.options.overrideMinMaxLimits.invalid)return[!0,!0];e=(e=e.toString()).replace(",",".");var r,o=a.parseStr(i.minimumValue),m=a.parseStr(i.maximumValue),f=a.parseStr(e);switch(i.overrideMinMaxLimits){case s.options.overrideMinMaxLimits.floor:r=[a.testMinMax(o,f)>-1,!0];break;case s.options.overrideMinMaxLimits.ceiling:r=[!0,a.testMinMax(m,f)<1];break;default:r=[a.testMinMax(o,f)>-1,a.testMinMax(m,f)<1]}return r}},{key:"_isWithinRangeWithOverrideOption",value:function(e,i){var r=te(this._checkIfInRangeWithOverrideOption(e,i),2),o=r[0],m=r[1];return o&&m}},{key:"_cleanValueForRangeParse",value:function(e){return e=e.toString().replace(",","."),a.parseStr(e)}},{key:"_isMinimumRangeRespected",value:function(e,i){return a.testMinMax(a.parseStr(i.minimumValue),this._cleanValueForRangeParse(e))>-1}},{key:"_isMaximumRangeRespected",value:function(e,i){return a.testMinMax(a.parseStr(i.maximumValue),this._cleanValueForRangeParse(e))<1}},{key:"_correctNegativePositiveSignPlacementOption",value:function(e){if(a.isNull(e.negativePositiveSignPlacement))if(a.isUndefined(e)||!a.isUndefinedOrNullOrEmpty(e.negativePositiveSignPlacement)||a.isUndefinedOrNullOrEmpty(e.currencySymbol))e.negativePositiveSignPlacement=s.options.negativePositiveSignPlacement.left;else switch(e.currencySymbolPlacement){case s.options.currencySymbolPlacement.suffix:e.negativePositiveSignPlacement=s.options.negativePositiveSignPlacement.prefix;break;case s.options.currencySymbolPlacement.prefix:e.negativePositiveSignPlacement=s.options.negativePositiveSignPlacement.left}}},{key:"_correctCaretPositionOnFocusAndSelectOnFocusOptions",value:function(e){return a.isNull(e)?null:(!a.isUndefinedOrNullOrEmpty(e.caretPositionOnFocus)&&a.isUndefinedOrNullOrEmpty(e.selectOnFocus)&&(e.selectOnFocus=s.options.selectOnFocus.doNotSelect),a.isUndefinedOrNullOrEmpty(e.caretPositionOnFocus)&&!a.isUndefinedOrNullOrEmpty(e.selectOnFocus)&&e.selectOnFocus===s.options.selectOnFocus.select&&(e.caretPositionOnFocus=s.options.caretPositionOnFocus.doNoForceCaretPosition),e)}},{key:"_calculateDecimalPlacesOnInit",value:function(e){this._validateDecimalPlacesRawValue(e),e.decimalPlacesShownOnFocus===s.options.decimalPlacesShownOnFocus.useDefault&&(e.decimalPlacesShownOnFocus=e.decimalPlaces),e.decimalPlacesShownOnBlur===s.options.decimalPlacesShownOnBlur.useDefault&&(e.decimalPlacesShownOnBlur=e.decimalPlaces),e.decimalPlacesRawValue===s.options.decimalPlacesRawValue.useDefault&&(e.decimalPlacesRawValue=e.decimalPlaces);var i=0;e.rawValueDivisor&&e.rawValueDivisor!==s.options.rawValueDivisor.none&&(i=String(e.rawValueDivisor).length-1)<0&&(i=0),e.decimalPlacesRawValue=Math.max(Math.max(e.decimalPlacesShownOnBlur,e.decimalPlacesShownOnFocus)+i,Number(e.originalDecimalPlacesRawValue)+i)}},{key:"_calculateDecimalPlacesOnUpdate",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this._validateDecimalPlacesRawValue(e),a.isNull(i)&&a.throwError("When updating the settings, the previous ones should be passed as an argument.");var r="decimalPlaces"in e;if(r||"decimalPlacesRawValue"in e||"decimalPlacesShownOnFocus"in e||"decimalPlacesShownOnBlur"in e||"rawValueDivisor"in e){r?("decimalPlacesShownOnFocus"in e&&e.decimalPlacesShownOnFocus!==s.options.decimalPlacesShownOnFocus.useDefault||(e.decimalPlacesShownOnFocus=e.decimalPlaces),"decimalPlacesShownOnBlur"in e&&e.decimalPlacesShownOnBlur!==s.options.decimalPlacesShownOnBlur.useDefault||(e.decimalPlacesShownOnBlur=e.decimalPlaces),"decimalPlacesRawValue"in e&&e.decimalPlacesRawValue!==s.options.decimalPlacesRawValue.useDefault||(e.decimalPlacesRawValue=e.decimalPlaces)):(a.isUndefined(e.decimalPlacesShownOnFocus)&&(e.decimalPlacesShownOnFocus=i.decimalPlacesShownOnFocus),a.isUndefined(e.decimalPlacesShownOnBlur)&&(e.decimalPlacesShownOnBlur=i.decimalPlacesShownOnBlur));var o=0;e.rawValueDivisor&&e.rawValueDivisor!==s.options.rawValueDivisor.none&&(o=String(e.rawValueDivisor).length-1)<0&&(o=0),e.decimalPlaces||e.decimalPlacesRawValue?e.decimalPlacesRawValue=Math.max(Math.max(e.decimalPlacesShownOnBlur,e.decimalPlacesShownOnFocus)+o,Number(e.decimalPlacesRawValue)+o):e.decimalPlacesRawValue=Math.max(Math.max(e.decimalPlacesShownOnBlur,e.decimalPlacesShownOnFocus)+o,Number(i.originalDecimalPlacesRawValue)+o)}}},{key:"_cachesUsualRegularExpressions",value:function(e,i){var r;r=e.negativeSignCharacter!==s.options.negativeSignCharacter.hyphen?"([-\\".concat(e.negativeSignCharacter,"]?)"):"(-?)",i.aNegRegAutoStrip=r,e.allowedAutoStrip=new RegExp("[^-0123456789\\".concat(e.decimalCharacter,"]"),"g"),e.numRegAutoStrip=new RegExp("".concat(r,"(?:\\").concat(e.decimalCharacter,"?([0-9]+\\").concat(e.decimalCharacter,"[0-9]+)|([0-9]*(?:\\").concat(e.decimalCharacter,"[0-9]*)?))")),e.stripReg=new RegExp("^".concat(i.aNegRegAutoStrip,"0*([0-9])")),e.formulaChars=new RegExp("[0-9".concat(e.decimalCharacter,"+\\-*/() ]"))}},{key:"_convertOldOptionsToNewOnes",value:function(e){var i={aSep:"digitGroupSeparator",nSep:"showOnlyNumbersOnFocus",dGroup:"digitalGroupSpacing",aDec:"decimalCharacter",altDec:"decimalCharacterAlternative",aSign:"currencySymbol",pSign:"currencySymbolPlacement",pNeg:"negativePositiveSignPlacement",aSuffix:"suffixText",oLimits:"overrideMinMaxLimits",vMax:"maximumValue",vMin:"minimumValue",mDec:"decimalPlacesOverride",eDec:"decimalPlacesShownOnFocus",scaleDecimal:"decimalPlacesShownOnBlur",aStor:"saveValueToSessionStorage",mRound:"roundingMethod",aPad:"allowDecimalPadding",nBracket:"negativeBracketsTypeOnBlur",wEmpty:"emptyInputBehavior",lZero:"leadingZero",aForm:"formatOnPageLoad",sNumber:"selectNumberOnly",anDefault:"defaultValueOverride",unSetOnSubmit:"unformatOnSubmit",outputType:"outputFormat",debug:"showWarnings",allowDecimalPadding:!0,alwaysAllowDecimalCharacter:!0,caretPositionOnFocus:!0,createLocalList:!0,currencySymbol:!0,currencySymbolPlacement:!0,decimalCharacter:!0,decimalCharacterAlternative:!0,decimalPlaces:!0,decimalPlacesRawValue:!0,decimalPlacesShownOnBlur:!0,decimalPlacesShownOnFocus:!0,defaultValueOverride:!0,digitalGroupSpacing:!0,digitGroupSeparator:!0,divisorWhenUnfocused:!0,emptyInputBehavior:!0,eventBubbles:!0,eventIsCancelable:!0,failOnUnknownOption:!0,formatOnPageLoad:!0,formulaMode:!0,historySize:!0,isCancellable:!0,leadingZero:!0,maximumValue:!0,minimumValue:!0,modifyValueOnUpDownArrow:!0,modifyValueOnWheel:!0,negativeBracketsTypeOnBlur:!0,negativePositiveSignPlacement:!0,negativeSignCharacter:!0,negativePositiveSignBehavior:!0,noEventListeners:!0,onInvalidPaste:!0,outputFormat:!0,overrideMinMaxLimits:!0,positiveSignCharacter:!0,rawValueDivisor:!0,readOnly:!0,roundingMethod:!0,saveValueToSessionStorage:!0,selectNumberOnly:!0,selectOnFocus:!0,serializeSpaces:!0,showOnlyNumbersOnFocus:!0,showPositiveSign:!0,showWarnings:!0,styleRules:!0,suffixText:!0,symbolWhenUnfocused:!0,upDownStep:!0,unformatOnHover:!0,unformatOnSubmit:!0,valuesToStrings:!0,watchExternalChanges:!0,wheelOn:!0,wheelStep:!0,allowedAutoStrip:!0,formulaChars:!0,isNegativeSignAllowed:!0,isPositiveSignAllowed:!0,mIntNeg:!0,mIntPos:!0,numRegAutoStrip:!0,originalDecimalPlaces:!0,originalDecimalPlacesRawValue:!0,stripReg:!0};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(i[r]===!0)continue;Object.prototype.hasOwnProperty.call(i,r)?(a.warning("You are using the deprecated option name '".concat(r,"'. Please use '").concat(i[r],"' instead from now on. The old option name will be dropped very soon\u2122."),!0),e[i[r]]=e[r],delete e[r]):e.failOnUnknownOption&&a.throwError("Option name '".concat(r,"' is unknown. Please fix the options passed to autoNumeric"))}"mDec"in e&&a.warning("The old `mDec` option has been deprecated in favor of more accurate options ; `decimalPlaces`, `decimalPlacesRawValue`, `decimalPlacesShownOnFocus` and `decimalPlacesShownOnBlur`.",!0)}},{key:"_setNegativePositiveSignPermissions",value:function(e){e.isNegativeSignAllowed=e.minimumValue<0,e.isPositiveSignAllowed=e.maximumValue>=0}},{key:"_toNumericValue",value:function(e,i){var r;return a.isNumber(Number(e))?(a.isNumberStrict(e)||(e=String(e).trim()),r=a.scientificToDecimal(e)):(r=this._convertToNumericString(e.toString(),i),a.isNumber(Number(r))||(a.warning('The given value "'.concat(e,'" cannot be converted to a numeric one and therefore cannot be used appropriately.'),i.showWarnings),r=NaN)),r}},{key:"_checkIfInRange",value:function(e,i,r){var o=a.parseStr(e);return a.testMinMax(i,o)>-1&&a.testMinMax(r,o)<1}},{key:"_shouldSkipEventKey",value:function(e){var i=a.isInArray(e,l.keyName._allFnKeys),r=e===l.keyName.OSLeft||e===l.keyName.OSRight,o=e===l.keyName.ContextMenu,m=a.isInArray(e,l.keyName._someNonPrintableKeys),f=e===l.keyName.NumLock||e===l.keyName.ScrollLock||e===l.keyName.Insert||e===l.keyName.Command,w=e===l.keyName.Unidentified;return i||r||o||m||w||f}},{key:"_serialize",value:function(e){var i,r=this,o=arguments.length>1&&arguments[1]!==void 0&&arguments[1],m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"unformatted",f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"+",w=arguments.length>4&&arguments[4]!==void 0?arguments[4]:null,E=[];return $(e)==="object"&&e.nodeName.toLowerCase()==="form"&&Array.prototype.slice.call(e.elements).forEach(function(O){if(O.name&&!O.disabled&&["file","reset","submit","button"].indexOf(O.type)===-1){if(O.type==="select-multiple")Array.prototype.slice.call(O.options).forEach(function(G){G.selected&&(o?E.push({name:O.name,value:G.value}):E.push("".concat(encodeURIComponent(O.name),"=").concat(encodeURIComponent(G.value))))});else if(["checkbox","radio"].indexOf(O.type)===-1||O.checked){var p,T;if(r.isManagedByAutoNumeric(O))switch(m){case"unformatted":T=r.getAutoNumericElement(O),a.isNull(T)||(p=r.unformat(O,T.getSettings()));break;case"localized":if(T=r.getAutoNumericElement(O),!a.isNull(T)){var A=a.cloneObject(T.getSettings());a.isNull(w)||(A.outputFormat=w),p=r.localize(O,A)}break;default:p=O.value}else p=O.value;a.isUndefined(p)&&a.throwError("This error should never be hit. If it has, something really wrong happened!"),o?E.push({name:O.name,value:p}):E.push("".concat(encodeURIComponent(O.name),"=").concat(encodeURIComponent(p)))}}}),o?i=E:(i=E.join("&"),f==="+"&&(i=i.replace(/%20/g,"+"))),i}},{key:"_serializeNumericString",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"+";return this._serialize(e,!1,"unformatted",i)}},{key:"_serializeFormatted",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"+";return this._serialize(e,!1,"formatted",i)}},{key:"_serializeLocalized",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"+",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;return this._serialize(e,!1,"localized",i,r)}},{key:"_serializeNumericStringArray",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"+";return this._serialize(e,!0,"unformatted",i)}},{key:"_serializeFormattedArray",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"+";return this._serialize(e,!0,"formatted",i)}},{key:"_serializeLocalizedArray",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"+",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;return this._serialize(e,!0,"localized",i,r)}}],k&&Be(_.prototype,k),F&&Be(_,F),Object.defineProperty(_,"prototype",{writable:!1}),s}();Z(S,"options",void 0),Z(S,"events",void 0),Z(S,"defaultSettings",void 0),Z(S,"predefinedOptions",void 0),S.multiple=function(s){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,F=[];if(a.isObject(_)&&(k=_,_=null),a.isString(s))s=ke(document.querySelectorAll(s));else if(a.isObject(s)){Object.prototype.hasOwnProperty.call(s,"rootElement")||a.throwError("The object passed to the 'multiple' function is invalid ; no 'rootElement' attribute found.");var e=ke(s.rootElement.querySelectorAll("input"));Object.prototype.hasOwnProperty.call(s,"exclude")?(Array.isArray(s.exclude)||a.throwError("The 'exclude' array passed to the 'multiple' function is invalid."),s=a.filterOut(e,s.exclude)):s=e}else a.isArray(s)||a.throwError("The given parameters to the 'multiple' function are invalid.");if(s.length===0){var i=!0;return!a.isNull(k)&&a.isBoolean(k.showWarnings)&&(i=k.showWarnings),a.warning("No valid DOM elements were given hence no AutoNumeric objects were instantiated.",i),[]}var r=a.isArray(_)&&_.length>=1,o=!1,m=!1;if(r){var f=$(Number(_[0]));(o=f==="number"&&!isNaN(Number(_[0])))||(f==="string"||isNaN(f)||f==="object")&&(m=!0)}var w,E=!1;if(a.isArray(k)&&k.length>=1){var O=$(k[0]);O!=="string"&&O!=="object"||(E=!0)}w=m?S.mergeOptions(_):E?S.mergeOptions(k):k;var p,T=a.isNumber(_);return o&&(p=_.length),s.forEach(function(A,G){T?F.push(new S(A,_,w)):o&&G<=p?F.push(new S(A,_[G],w)):F.push(new S(A,null,w))}),F},S.events={correctedValue:"autoNumeric:correctedValue",initialized:"autoNumeric:initialized",invalidFormula:"autoNumeric:invalidFormula",invalidValue:"autoNumeric:invalidValue",formatted:"autoNumeric:formatted",rawValueModified:"autoNumeric:rawValueModified",minRangeExceeded:"autoNumeric:minExceeded",maxRangeExceeded:"autoNumeric:maxExceeded",native:{input:"input",change:"change"},validFormula:"autoNumeric:validFormula"},Object.freeze(S.events.native),Object.freeze(S.events),Object.defineProperty(S,"events",{configurable:!1,writable:!1}),S.options={allowDecimalPadding:{always:!0,never:!1,floats:"floats"},alwaysAllowDecimalCharacter:{alwaysAllow:!0,doNotAllow:!1},caretPositionOnFocus:{start:"start",end:"end",decimalLeft:"decimalLeft",decimalRight:"decimalRight",doNoForceCaretPosition:null},createLocalList:{createList:!0,doNotCreateList:!1},currencySymbol:{none:"",currencySign:"\xA4",austral:"\u20B3",australCentavo:"\xA2",baht:"\u0E3F",cedi:"\u20B5",cent:"\xA2",colon:"\u20A1",cruzeiro:"\u20A2",dollar:"$",dong:"\u20AB",drachma:"\u20AF",dram:"\u200B\u058F",european:"\u20A0",euro:"\u20AC",florin:"\u0192",franc:"\u20A3",guarani:"\u20B2",hryvnia:"\u20B4",kip:"\u20AD",att:"\u0EAD\u0EB1\u0E94",lepton:"\u039B.",lira:"\u20BA",liraOld:"\u20A4",lari:"\u20BE",mark:"\u2133",mill:"\u20A5",naira:"\u20A6",peseta:"\u20A7",peso:"\u20B1",pfennig:"\u20B0",pound:"\xA3",real:"R$ ",riel:"\u17DB",ruble:"\u20BD",rupee:"\u20B9",rupeeOld:"\u20A8",shekel:"\u20AA",shekelAlt:"\u05E9\u05F4\u05D7\u200E\u200E",taka:"\u09F3",tenge:"\u20B8",togrog:"\u20AE",won:"\u20A9",yen:"\xA5"},currencySymbolPlacement:{prefix:"p",suffix:"s"},decimalCharacter:{comma:",",dot:".",middleDot:"\xB7",arabicDecimalSeparator:"\u066B",decimalSeparatorKeySymbol:"\u2396"},decimalCharacterAlternative:{none:null,comma:",",dot:"."},decimalPlaces:{none:0,one:1,two:2,three:3,four:4,five:5,six:6},decimalPlacesRawValue:{useDefault:null,none:0,one:1,two:2,three:3,four:4,five:5,six:6},decimalPlacesShownOnBlur:{useDefault:null,none:0,one:1,two:2,three:3,four:4,five:5,six:6},decimalPlacesShownOnFocus:{useDefault:null,none:0,one:1,two:2,three:3,four:4,five:5,six:6},defaultValueOverride:{doNotOverride:null},digitalGroupSpacing:{two:"2",twoThree:"2t",twoScaled:"2s",three:"3",four:"4"},digitGroupSeparator:{comma:",",dot:".",normalSpace:" ",thinSpace:"\u2009",narrowNoBreakSpace:"\u202F",noBreakSpace:"\xA0",noSeparator:"",apostrophe:"'",arabicThousandsSeparator:"\u066C",dotAbove:"\u02D9",privateUseTwo:"\u2019"},divisorWhenUnfocused:{none:null,percentage:100,permille:1e3,basisPoint:1e4},emptyInputBehavior:{focus:"focus",press:"press",always:"always",zero:"zero",min:"min",max:"max",null:"null"},eventBubbles:{bubbles:!0,doesNotBubble:!1},eventIsCancelable:{isCancelable:!0,isNotCancelable:!1},failOnUnknownOption:{fail:!0,ignore:!1},formatOnPageLoad:{format:!0,doNotFormat:!1},formulaMode:{enabled:!0,disabled:!1},historySize:{verySmall:5,small:10,medium:20,large:50,veryLarge:100,insane:Number.MAX_SAFE_INTEGER},invalidClass:"an-invalid",isCancellable:{cancellable:!0,notCancellable:!1},leadingZero:{allow:"allow",deny:"deny",keep:"keep"},maximumValue:{tenTrillions:"10000000000000",oneBillion:"1000000000",zero:"0"},minimumValue:{tenTrillions:"-10000000000000",oneBillion:"-1000000000",zero:"0"},modifyValueOnUpDownArrow:{modifyValue:!0,doNothing:!1},modifyValueOnWheel:{modifyValue:!0,doNothing:!1},negativeBracketsTypeOnBlur:{parentheses:"(,)",brackets:"[,]",chevrons:"<,>",curlyBraces:"{,}",angleBrackets:"\u3008,\u3009",japaneseQuotationMarks:"\uFF62,\uFF63",halfBrackets:"\u2E24,\u2E25",whiteSquareBrackets:"\u27E6,\u27E7",quotationMarks:"\u2039,\u203A",guillemets:"\xAB,\xBB",none:null},negativePositiveSignPlacement:{prefix:"p",suffix:"s",left:"l",right:"r",none:null},negativeSignCharacter:{hyphen:"-",minus:"\u2212",heavyMinus:"\u2796",fullWidthHyphen:"\uFF0D",circledMinus:"\u2296",squaredMinus:"\u229F",triangleMinus:"\u2A3A",plusMinus:"\xB1",minusPlus:"\u2213",dotMinus:"\u2238",minusTilde:"\u2242",not:"\xAC"},negativePositiveSignBehavior:{toggle:!0,doNotToggle:!1},noEventListeners:{noEvents:!0,addEvents:!1},onInvalidPaste:{error:"error",ignore:"ignore",clamp:"clamp",truncate:"truncate",replace:"replace"},outputFormat:{string:"string",number:"number",dot:".",negativeDot:"-.",comma:",",negativeComma:"-,",dotNegative:".-",commaNegative:",-",none:null},overrideMinMaxLimits:{ceiling:"ceiling",floor:"floor",ignore:"ignore",invalid:"invalid",doNotOverride:null},positiveSignCharacter:{plus:"+",fullWidthPlus:"\uFF0B",heavyPlus:"\u2795",doublePlus:"\u29FA",triplePlus:"\u29FB",circledPlus:"\u2295",squaredPlus:"\u229E",trianglePlus:"\u2A39",plusMinus:"\xB1",minusPlus:"\u2213",dotPlus:"\u2214",altHebrewPlus:"\uFB29",normalSpace:" ",thinSpace:"\u2009",narrowNoBreakSpace:"\u202F",noBreakSpace:"\xA0"},rawValueDivisor:{none:null,percentage:100,permille:1e3,basisPoint:1e4},readOnly:{readOnly:!0,readWrite:!1},roundingMethod:{halfUpSymmetric:"S",halfUpAsymmetric:"A",halfDownSymmetric:"s",halfDownAsymmetric:"a",halfEvenBankersRounding:"B",upRoundAwayFromZero:"U",downRoundTowardZero:"D",toCeilingTowardPositiveInfinity:"C",toFloorTowardNegativeInfinity:"F",toNearest05:"N05",toNearest05Alt:"CHF",upToNext05:"U05",downToNext05:"D05"},saveValueToSessionStorage:{save:!0,doNotSave:!1},selectNumberOnly:{selectNumbersOnly:!0,selectAll:!1},selectOnFocus:{select:!0,doNotSelect:!1},serializeSpaces:{plus:"+",percent:"%20"},showOnlyNumbersOnFocus:{onlyNumbers:!0,showAll:!1},showPositiveSign:{show:!0,hide:!1},showWarnings:{show:!0,hide:!1},styleRules:{none:null,positiveNegative:{positive:"autoNumeric-positive",negative:"autoNumeric-negative"},range0To100With4Steps:{ranges:[{min:0,max:25,class:"autoNumeric-red"},{min:25,max:50,class:"autoNumeric-orange"},{min:50,max:75,class:"autoNumeric-yellow"},{min:75,max:100,class:"autoNumeric-green"}]},evenOdd:{userDefined:[{callback:function(s){return s%2==0},classes:["autoNumeric-even","autoNumeric-odd"]}]},rangeSmallAndZero:{userDefined:[{callback:function(s){return s>=-1&&s<0?0:Number(s)===0?1:s>0&&s<=1?2:null},classes:["autoNumeric-small-negative","autoNumeric-zero","autoNumeric-small-positive"]}]}},suffixText:{none:"",percentage:"%",permille:"\u2030",basisPoint:"\u2031"},symbolWhenUnfocused:{none:null,percentage:"%",permille:"\u2030",basisPoint:"\u2031"},unformatOnHover:{unformat:!0,doNotUnformat:!1},unformatOnSubmit:{unformat:!0,keepCurrentValue:!1},upDownStep:{progressive:"progressive"},valuesToStrings:{none:null,zeroDash:{0:"-"},oneAroundZero:{"-1":"Min",1:"Max"}},watchExternalChanges:{watch:!0,doNotWatch:!1},wheelOn:{focus:"focus",hover:"hover"},wheelStep:{progressive:"progressive"}},j=S.options,Object.getOwnPropertyNames(j).forEach(function(s){s==="valuesToStrings"?Object.getOwnPropertyNames(j.valuesToStrings).forEach(function(_){j.valuesToStrings[_]!==null&&Object.freeze(j.valuesToStrings[_])}):s!=="styleRules"&&j[s]!==null&&Object.freeze(j[s])}),Object.freeze(j),Object.defineProperty(S,"options",{configurable:!1,writable:!1}),S.defaultSettings={allowDecimalPadding:S.options.allowDecimalPadding.always,alwaysAllowDecimalCharacter:S.options.alwaysAllowDecimalCharacter.doNotAllow,caretPositionOnFocus:S.options.caretPositionOnFocus.doNoForceCaretPosition,createLocalList:S.options.createLocalList.createList,currencySymbol:S.options.currencySymbol.none,currencySymbolPlacement:S.options.currencySymbolPlacement.prefix,decimalCharacter:S.options.decimalCharacter.dot,decimalCharacterAlternative:S.options.decimalCharacterAlternative.none,decimalPlaces:S.options.decimalPlaces.two,decimalPlacesRawValue:S.options.decimalPlacesRawValue.useDefault,decimalPlacesShownOnBlur:S.options.decimalPlacesShownOnBlur.useDefault,decimalPlacesShownOnFocus:S.options.decimalPlacesShownOnFocus.useDefault,defaultValueOverride:S.options.defaultValueOverride.doNotOverride,digitalGroupSpacing:S.options.digitalGroupSpacing.three,digitGroupSeparator:S.options.digitGroupSeparator.comma,divisorWhenUnfocused:S.options.divisorWhenUnfocused.none,emptyInputBehavior:S.options.emptyInputBehavior.focus,eventBubbles:S.options.eventBubbles.bubbles,eventIsCancelable:S.options.eventIsCancelable.isCancelable,failOnUnknownOption:S.options.failOnUnknownOption.ignore,formatOnPageLoad:S.options.formatOnPageLoad.format,formulaMode:S.options.formulaMode.disabled,historySize:S.options.historySize.medium,invalidClass:S.options.invalidClass,isCancellable:S.options.isCancellable.cancellable,leadingZero:S.options.leadingZero.deny,maximumValue:S.options.maximumValue.tenTrillions,minimumValue:S.options.minimumValue.tenTrillions,modifyValueOnUpDownArrow:S.options.modifyValueOnUpDownArrow.modifyValue,modifyValueOnWheel:S.options.modifyValueOnWheel.modifyValue,negativeBracketsTypeOnBlur:S.options.negativeBracketsTypeOnBlur.none,negativePositiveSignPlacement:S.options.negativePositiveSignPlacement.none,negativeSignCharacter:S.options.negativeSignCharacter.hyphen,negativePositiveSignBehavior:S.options.negativePositiveSignBehavior.doNotToggle,noEventListeners:S.options.noEventListeners.addEvents,onInvalidPaste:S.options.onInvalidPaste.error,outputFormat:S.options.outputFormat.none,overrideMinMaxLimits:S.options.overrideMinMaxLimits.doNotOverride,positiveSignCharacter:S.options.positiveSignCharacter.plus,rawValueDivisor:S.options.rawValueDivisor.none,readOnly:S.options.readOnly.readWrite,roundingMethod:S.options.roundingMethod.halfUpSymmetric,saveValueToSessionStorage:S.options.saveValueToSessionStorage.doNotSave,selectNumberOnly:S.options.selectNumberOnly.selectNumbersOnly,selectOnFocus:S.options.selectOnFocus.select,serializeSpaces:S.options.serializeSpaces.plus,showOnlyNumbersOnFocus:S.options.showOnlyNumbersOnFocus.showAll,showPositiveSign:S.options.showPositiveSign.hide,showWarnings:S.options.showWarnings.show,styleRules:S.options.styleRules.none,suffixText:S.options.suffixText.none,symbolWhenUnfocused:S.options.symbolWhenUnfocused.none,unformatOnHover:S.options.unformatOnHover.unformat,unformatOnSubmit:S.options.unformatOnSubmit.keepCurrentValue,upDownStep:"1",valuesToStrings:S.options.valuesToStrings.none,watchExternalChanges:S.options.watchExternalChanges.doNotWatch,wheelOn:S.options.wheelOn.focus,wheelStep:S.options.wheelStep.progressive},Object.freeze(S.defaultSettings),Object.defineProperty(S,"defaultSettings",{configurable:!1,writable:!1});var ge={digitGroupSeparator:S.options.digitGroupSeparator.dot,decimalCharacter:S.options.decimalCharacter.comma,decimalCharacterAlternative:S.options.decimalCharacterAlternative.dot,currencySymbol:"\u202F\u20AC",currencySymbolPlacement:S.options.currencySymbolPlacement.suffix,negativePositiveSignPlacement:S.options.negativePositiveSignPlacement.prefix},Te={digitGroupSeparator:S.options.digitGroupSeparator.comma,decimalCharacter:S.options.decimalCharacter.dot,currencySymbol:S.options.currencySymbol.dollar,currencySymbolPlacement:S.options.currencySymbolPlacement.prefix,negativePositiveSignPlacement:S.options.negativePositiveSignPlacement.right},it={digitGroupSeparator:S.options.digitGroupSeparator.comma,decimalCharacter:S.options.decimalCharacter.dot,currencySymbol:S.options.currencySymbol.yen,currencySymbolPlacement:S.options.currencySymbolPlacement.prefix,negativePositiveSignPlacement:S.options.negativePositiveSignPlacement.right};a.cloneObject(ge).formulaMode=S.options.formulaMode.enabled;var oe=a.cloneObject(ge);oe.minimumValue=0;var se=a.cloneObject(ge);se.maximumValue=0,se.negativePositiveSignPlacement=S.options.negativePositiveSignPlacement.prefix;var xe=a.cloneObject(ge);xe.digitGroupSeparator=S.options.digitGroupSeparator.normalSpace;var Y=a.cloneObject(xe);Y.minimumValue=0;var be=a.cloneObject(xe);be.maximumValue=0,be.negativePositiveSignPlacement=S.options.negativePositiveSignPlacement.prefix;var Ce=a.cloneObject(ge);Ce.currencySymbol=S.options.currencySymbol.none,Ce.suffixText="\u202F".concat(S.options.suffixText.percentage),Ce.wheelStep=1e-4,Ce.rawValueDivisor=S.options.rawValueDivisor.percentage;var Se=a.cloneObject(Ce);Se.minimumValue=0;var ce=a.cloneObject(Ce);ce.maximumValue=0,ce.negativePositiveSignPlacement=S.options.negativePositiveSignPlacement.prefix;var X=a.cloneObject(Ce);X.decimalPlaces=3;var ze=a.cloneObject(Se);ze.decimalPlaces=3;var ue=a.cloneObject(ce);ue.decimalPlaces=3,a.cloneObject(Te).formulaMode=S.options.formulaMode.enabled;var Ee=a.cloneObject(Te);Ee.minimumValue=0;var Fe=a.cloneObject(Te);Fe.maximumValue=0,Fe.negativePositiveSignPlacement=S.options.negativePositiveSignPlacement.prefix;var zt=a.cloneObject(Fe);zt.negativeBracketsTypeOnBlur=S.options.negativeBracketsTypeOnBlur.parentheses;var Ue=a.cloneObject(Te);Ue.currencySymbol=S.options.currencySymbol.none,Ue.suffixText=S.options.suffixText.percentage,Ue.wheelStep=1e-4,Ue.rawValueDivisor=S.options.rawValueDivisor.percentage;var Ut=a.cloneObject(Ue);Ut.minimumValue=0;var Ae=a.cloneObject(Ue);Ae.maximumValue=0,Ae.negativePositiveSignPlacement=S.options.negativePositiveSignPlacement.prefix;var ht=a.cloneObject(Ue);ht.decimalPlaces=3;var Le=a.cloneObject(Ut);Le.decimalPlaces=3;var We=a.cloneObject(Ae);We.decimalPlaces=3;var yt=a.cloneObject(ge);yt.currencySymbol=S.options.currencySymbol.lira,S.predefinedOptions={euro:ge,euroPos:oe,euroNeg:se,euroSpace:xe,euroSpacePos:Y,euroSpaceNeg:be,percentageEU2dec:Ce,percentageEU2decPos:Se,percentageEU2decNeg:ce,percentageEU3dec:X,percentageEU3decPos:ze,percentageEU3decNeg:ue,dollar:Te,dollarPos:Ee,dollarNeg:Fe,dollarNegBrackets:zt,percentageUS2dec:Ue,percentageUS2decPos:Ut,percentageUS2decNeg:Ae,percentageUS3dec:ht,percentageUS3decPos:Le,percentageUS3decNeg:We,French:ge,Spanish:ge,NorthAmerican:Te,British:{digitGroupSeparator:S.options.digitGroupSeparator.comma,decimalCharacter:S.options.decimalCharacter.dot,currencySymbol:S.options.currencySymbol.pound,currencySymbolPlacement:S.options.currencySymbolPlacement.prefix,negativePositiveSignPlacement:S.options.negativePositiveSignPlacement.right},Swiss:{digitGroupSeparator:S.options.digitGroupSeparator.apostrophe,decimalCharacter:S.options.decimalCharacter.dot,currencySymbol:"\u202FCHF",currencySymbolPlacement:S.options.currencySymbolPlacement.suffix,negativePositiveSignPlacement:S.options.negativePositiveSignPlacement.prefix},Japanese:it,Chinese:it,Brazilian:{digitGroupSeparator:S.options.digitGroupSeparator.dot,decimalCharacter:S.options.decimalCharacter.comma,currencySymbol:S.options.currencySymbol.real,currencySymbolPlacement:S.options.currencySymbolPlacement.prefix,negativePositiveSignPlacement:S.options.negativePositiveSignPlacement.right},Turkish:yt,dotDecimalCharCommaSeparator:{digitGroupSeparator:S.options.digitGroupSeparator.comma,decimalCharacter:S.options.decimalCharacter.dot},commaDecimalCharDotSeparator:{digitGroupSeparator:S.options.digitGroupSeparator.dot,decimalCharacter:S.options.decimalCharacter.comma,decimalCharacterAlternative:S.options.decimalCharacterAlternative.dot},integer:{decimalPlaces:0},integerPos:{minimumValue:S.options.minimumValue.zero,decimalPlaces:0},integerNeg:{maximumValue:S.options.maximumValue.zero,decimalPlaces:0},float:{allowDecimalPadding:S.options.allowDecimalPadding.never},floatPos:{allowDecimalPadding:S.options.allowDecimalPadding.never,minimumValue:S.options.minimumValue.zero,maximumValue:S.options.maximumValue.tenTrillions},floatNeg:{allowDecimalPadding:S.options.allowDecimalPadding.never,minimumValue:S.options.minimumValue.tenTrillions,maximumValue:S.options.maximumValue.zero},numeric:{digitGroupSeparator:S.options.digitGroupSeparator.noSeparator,decimalCharacter:S.options.decimalCharacter.dot,currencySymbol:S.options.currencySymbol.none},numericPos:{digitGroupSeparator:S.options.digitGroupSeparator.noSeparator,decimalCharacter:S.options.decimalCharacter.dot,currencySymbol:S.options.currencySymbol.none,minimumValue:S.options.minimumValue.zero,maximumValue:S.options.maximumValue.tenTrillions},numericNeg:{digitGroupSeparator:S.options.digitGroupSeparator.noSeparator,decimalCharacter:S.options.decimalCharacter.dot,currencySymbol:S.options.currencySymbol.none,minimumValue:S.options.minimumValue.tenTrillions,maximumValue:S.options.maximumValue.zero}},Object.getOwnPropertyNames(S.predefinedOptions).forEach(function(s){Object.freeze(S.predefinedOptions[s])}),Object.freeze(S.predefinedOptions),Object.defineProperty(S,"predefinedOptions",{configurable:!1,writable:!1});let nn=S;return h=h.default})(),typeof rn=="object"&&typeof io=="object"?io.exports=an():typeof define=="function"&&define.amd?define([],an):typeof rn=="object"?rn.AutoNumeric=an():Pa.AutoNumeric=an()});var po=xo((uo,mo)=>{((n,h)=>{typeof define=="function"&&define.amd?define([],h):typeof mo=="object"&&typeof uo<"u"?mo.exports=h():n.Papa=h()})(uo,function n(){var h=typeof self<"u"?self:typeof window<"u"?window:h!==void 0?h:{},t,l=!h.document&&!!h.postMessage,c=h.IS_PAPA_WORKER||!1,v={},V=0,L={};function re(x){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(C){var N=Si(C);N.chunkSize=parseInt(N.chunkSize),C.step||C.chunk||(N.chunkSize=null),this._handle=new $t(N),(this._handle.streamer=this)._config=N}.call(this,x),this.parseChunk=function(C,N){var z=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<z){let ee=this._config.newline;ee||(U=this._config.quoteChar||'"',ee=this._handle.guessLineEndings(C,U)),C=[...C.split(ee).slice(z)].join(ee)}this.isFirstChunk&&_e(this._config.beforeFirstChunk)&&(U=this._config.beforeFirstChunk(C))!==void 0&&(C=U),this.isFirstChunk=!1,this._halted=!1;var z=this._partialLine+C,U=(this._partialLine="",this._handle.parse(z,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(C=U.meta.cursor,z=(this._finished||(this._partialLine=z.substring(C-this._baseIndex),this._baseIndex=C),U&&U.data&&(this._rowCount+=U.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),c)h.postMessage({results:U,workerId:L.WORKER_ID,finished:z});else if(_e(this._config.chunk)&&!N){if(this._config.chunk(U,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=U=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(U.data),this._completeResults.errors=this._completeResults.errors.concat(U.errors),this._completeResults.meta=U.meta),this._completed||!z||!_e(this._config.complete)||U&&U.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),z||U&&U.meta.paused||this._nextChunk(),U}this._halted=!0},this._sendError=function(C){_e(this._config.error)?this._config.error(C):c&&this._config.error&&h.postMessage({workerId:L.WORKER_ID,error:C,finished:!1})}}function we(x){var C;(x=x||{}).chunkSize||(x.chunkSize=L.RemoteChunkSize),re.call(this,x),this._nextChunk=l?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(N){this._input=N,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(C=new XMLHttpRequest,this._config.withCredentials&&(C.withCredentials=this._config.withCredentials),l||(C.onload=Pt(this._chunkLoaded,this),C.onerror=Pt(this._chunkError,this)),C.open(this._config.downloadRequestBody?"POST":"GET",this._input,!l),this._config.downloadRequestHeaders){var N,z=this._config.downloadRequestHeaders;for(N in z)C.setRequestHeader(N,z[N])}var U;this._config.chunkSize&&(U=this._start+this._config.chunkSize-1,C.setRequestHeader("Range","bytes="+this._start+"-"+U));try{C.send(this._config.downloadRequestBody)}catch(ee){this._chunkError(ee.message)}l&&C.status===0&&this._chunkError()}},this._chunkLoaded=function(){C.readyState===4&&(C.status<200||400<=C.status?this._chunkError():(this._start+=this._config.chunkSize||C.responseText.length,this._finished=!this._config.chunkSize||this._start>=(N=>(N=N.getResponseHeader("Content-Range"))!==null?parseInt(N.substring(N.lastIndexOf("/")+1)):-1)(C),this.parseChunk(C.responseText)))},this._chunkError=function(N){N=C.statusText||N,this._sendError(new Error(N))}}function mt(x){(x=x||{}).chunkSize||(x.chunkSize=L.LocalChunkSize),re.call(this,x);var C,N,z=typeof FileReader<"u";this.stream=function(U){this._input=U,N=U.slice||U.webkitSlice||U.mozSlice,z?((C=new FileReader).onload=Pt(this._chunkLoaded,this),C.onerror=Pt(this._chunkError,this)):C=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var U=this._input,ee=(this._config.chunkSize&&(ee=Math.min(this._start+this._config.chunkSize,this._input.size),U=N.call(U,this._start,ee)),C.readAsText(U,this._config.encoding));z||this._chunkLoaded({target:{result:ee}})},this._chunkLoaded=function(U){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(U.target.result)},this._chunkError=function(){this._sendError(C.error)}}function a(x){var C;re.call(this,x=x||{}),this.stream=function(N){return C=N,this._nextChunk()},this._nextChunk=function(){var N,z;if(!this._finished)return N=this._config.chunkSize,C=N?(z=C.substring(0,N),C.substring(N)):(z=C,""),this._finished=!C,this.parseChunk(z)}}function dt(x){re.call(this,x=x||{});var C=[],N=!0,z=!1;this.pause=function(){re.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){re.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(U){this._input=U,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){z&&C.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),C.length?this.parseChunk(C.shift()):N=!0},this._streamData=Pt(function(U){try{C.push(typeof U=="string"?U:U.toString(this._config.encoding)),N&&(N=!1,this._checkIsFinished(),this.parseChunk(C.shift()))}catch(ee){this._streamError(ee)}},this),this._streamError=Pt(function(U){this._streamCleanUp(),this._sendError(U)},this),this._streamEnd=Pt(function(){this._streamCleanUp(),z=!0,this._streamData("")},this),this._streamCleanUp=Pt(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function $t(x){var C,N,z,U,ee=Math.pow(2,53),ke=-ee,te=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,tt=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,Q=this,le=0,$=0,Be=!1,Z=!1,ne=[],j={data:[],errors:[],meta:{}};function S(oe){return x.skipEmptyLines==="greedy"?oe.join("").trim()==="":oe.length===1&&oe[0].length===0}function ge(){if(j&&z&&(it("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+L.DefaultDelimiter+"'"),z=!1),x.skipEmptyLines&&(j.data=j.data.filter(function(be){return!S(be)})),Te()){let be=function(Ce,Se){_e(x.transformHeader)&&(Ce=x.transformHeader(Ce,Se)),ne.push(Ce)};var Y=be;if(j)if(Array.isArray(j.data[0])){for(var oe=0;Te()&&oe<j.data.length;oe++)j.data[oe].forEach(be);j.data.splice(0,1)}else j.data.forEach(be)}function se(be,Ce){for(var Se=x.header?{}:[],ce=0;ce<be.length;ce++){var X=ce,ze=be[ce],ze=((ue,Ee)=>(Fe=>(x.dynamicTypingFunction&&x.dynamicTyping[Fe]===void 0&&(x.dynamicTyping[Fe]=x.dynamicTypingFunction(Fe)),(x.dynamicTyping[Fe]||x.dynamicTyping)===!0))(ue)?Ee==="true"||Ee==="TRUE"||Ee!=="false"&&Ee!=="FALSE"&&((Fe=>{if(te.test(Fe)&&(Fe=parseFloat(Fe),ke<Fe&&Fe<ee))return 1})(Ee)?parseFloat(Ee):tt.test(Ee)?new Date(Ee):Ee===""?null:Ee):Ee)(X=x.header?ce>=ne.length?"__parsed_extra":ne[ce]:X,ze=x.transform?x.transform(ze,X):ze);X==="__parsed_extra"?(Se[X]=Se[X]||[],Se[X].push(ze)):Se[X]=ze}return x.header&&(ce>ne.length?it("FieldMismatch","TooManyFields","Too many fields: expected "+ne.length+" fields but parsed "+ce,$+Ce):ce<ne.length&&it("FieldMismatch","TooFewFields","Too few fields: expected "+ne.length+" fields but parsed "+ce,$+Ce)),Se}var xe;j&&(x.header||x.dynamicTyping||x.transform)&&(xe=1,!j.data.length||Array.isArray(j.data[0])?(j.data=j.data.map(se),xe=j.data.length):j.data=se(j.data,0),x.header&&j.meta&&(j.meta.fields=ne),$+=xe)}function Te(){return x.header&&ne.length===0}function it(oe,se,xe,Y){oe={type:oe,code:se,message:xe},Y!==void 0&&(oe.row=Y),j.errors.push(oe)}_e(x.step)&&(U=x.step,x.step=function(oe){j=oe,Te()?ge():(ge(),j.data.length!==0&&(le+=oe.data.length,x.preview&&le>x.preview?N.abort():(j.data=j.data[0],U(j,Q))))}),this.parse=function(oe,se,xe){var Y=x.quoteChar||'"',Y=(x.newline||(x.newline=this.guessLineEndings(oe,Y)),z=!1,x.delimiter?_e(x.delimiter)&&(x.delimiter=x.delimiter(oe),j.meta.delimiter=x.delimiter):((Y=((be,Ce,Se,ce,X)=>{var ze,ue,Ee,Fe;X=X||[","," ","|",";",L.RECORD_SEP,L.UNIT_SEP];for(var zt=0;zt<X.length;zt++){for(var Ue,Ut=X[zt],Ae=0,ht=0,Le=0,We=(Ee=void 0,new Bt({comments:ce,delimiter:Ut,newline:Ce,preview:10}).parse(be)),yt=0;yt<We.data.length;yt++)Se&&S(We.data[yt])?Le++:(Ue=We.data[yt].length,ht+=Ue,Ee===void 0?Ee=Ue:0<Ue&&(Ae+=Math.abs(Ue-Ee),Ee=Ue));0<We.data.length&&(ht/=We.data.length-Le),(ue===void 0||Ae<=ue)&&(Fe===void 0||Fe<ht)&&1.99<ht&&(ue=Ae,ze=Ut,Fe=ht)}return{successful:!!(x.delimiter=ze),bestDelimiter:ze}})(oe,x.newline,x.skipEmptyLines,x.comments,x.delimitersToGuess)).successful?x.delimiter=Y.bestDelimiter:(z=!0,x.delimiter=L.DefaultDelimiter),j.meta.delimiter=x.delimiter),Si(x));return x.preview&&x.header&&Y.preview++,C=oe,N=new Bt(Y),j=N.parse(C,se,xe),ge(),Be?{meta:{paused:!0}}:j||{meta:{paused:!1}}},this.paused=function(){return Be},this.pause=function(){Be=!0,N.abort(),C=_e(x.chunk)?"":C.substring(N.getCharIndex())},this.resume=function(){Q.streamer._halted?(Be=!1,Q.streamer.parseChunk(C,!0)):setTimeout(Q.resume,3)},this.aborted=function(){return Z},this.abort=function(){Z=!0,N.abort(),j.meta.aborted=!0,_e(x.complete)&&x.complete(j),C=""},this.guessLineEndings=function(be,Y){be=be.substring(0,1048576);var Y=new RegExp(Gt(Y)+"([^]*?)"+Gt(Y),"gm"),xe=(be=be.replace(Y,"")).split("\r"),Y=be.split(`
|
|
6
|
-
`),be=1<Y.length&&Y[0].length<xe[0].length;if(xe.length===1||be)return`
|
|
7
|
-
`;for(var Ce=0,Se=0;Se<xe.length;Se++)xe[Se][0]===`
|
|
8
|
-
`&&Ce++;return Ce>=xe.length/2?`\r
|
|
9
|
-
`:"\r"}}function Gt(x){return x.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Bt(x){var C=(x=x||{}).delimiter,N=x.newline,z=x.comments,U=x.step,ee=x.preview,ke=x.fastMode,te=null,tt=!1,Q=x.quoteChar==null?'"':x.quoteChar,le=Q;if(x.escapeChar!==void 0&&(le=x.escapeChar),(typeof C!="string"||-1<L.BAD_DELIMITERS.indexOf(C))&&(C=","),z===C)throw new Error("Comment character same as delimiter");z===!0?z="#":(typeof z!="string"||-1<L.BAD_DELIMITERS.indexOf(z))&&(z=!1),N!==`
|
|
10
|
-
`&&N!=="\r"&&N!==`\r
|
|
11
|
-
`&&(N=`
|
|
12
|
-
`);var $=0,Be=!1;this.parse=function(Z,ne,j){if(typeof Z!="string")throw new Error("Input must be a string");var S=Z.length,ge=C.length,Te=N.length,it=z.length,oe=_e(U),se=[],xe=[],Y=[],be=$=0;if(!Z)return Ae();if(ke||ke!==!1&&Z.indexOf(Q)===-1){for(var Ce=Z.split(N),Se=0;Se<Ce.length;Se++){if(Y=Ce[Se],$+=Y.length,Se!==Ce.length-1)$+=N.length;else if(j)return Ae();if(!z||Y.substring(0,it)!==z){if(oe){if(se=[],Fe(Y.split(C)),ht(),Be)return Ae()}else Fe(Y.split(C));if(ee&&ee<=Se)return se=se.slice(0,ee),Ae(!0)}}return Ae()}for(var ce=Z.indexOf(C,$),X=Z.indexOf(N,$),ze=new RegExp(Gt(le)+Gt(Q),"g"),ue=Z.indexOf(Q,$);;)if(Z[$]===Q)for(ue=$,$++;;){if((ue=Z.indexOf(Q,ue+1))===-1)return j||xe.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:se.length,index:$}),Ue();if(ue===S-1)return Ue(Z.substring($,ue).replace(ze,Q));if(Q===le&&Z[ue+1]===le)ue++;else if(Q===le||ue===0||Z[ue-1]!==le){ce!==-1&&ce<ue+1&&(ce=Z.indexOf(C,ue+1));var Ee=zt((X=X!==-1&&X<ue+1?Z.indexOf(N,ue+1):X)===-1?ce:Math.min(ce,X));if(Z.substr(ue+1+Ee,ge)===C){Y.push(Z.substring($,ue).replace(ze,Q)),Z[$=ue+1+Ee+ge]!==Q&&(ue=Z.indexOf(Q,$)),ce=Z.indexOf(C,$),X=Z.indexOf(N,$);break}if(Ee=zt(X),Z.substring(ue+1+Ee,ue+1+Ee+Te)===N){if(Y.push(Z.substring($,ue).replace(ze,Q)),Ut(ue+1+Ee+Te),ce=Z.indexOf(C,$),ue=Z.indexOf(Q,$),oe&&(ht(),Be))return Ae();if(ee&&se.length>=ee)return Ae(!0);break}xe.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:se.length,index:$}),ue++}}else if(z&&Y.length===0&&Z.substring($,$+it)===z){if(X===-1)return Ae();$=X+Te,X=Z.indexOf(N,$),ce=Z.indexOf(C,$)}else if(ce!==-1&&(ce<X||X===-1))Y.push(Z.substring($,ce)),$=ce+ge,ce=Z.indexOf(C,$);else{if(X===-1)break;if(Y.push(Z.substring($,X)),Ut(X+Te),oe&&(ht(),Be))return Ae();if(ee&&se.length>=ee)return Ae(!0)}return Ue();function Fe(Le){se.push(Le),be=$}function zt(Le){var We=0;return We=Le!==-1&&(Le=Z.substring(ue+1,Le))&&Le.trim()===""?Le.length:We}function Ue(Le){return j||(Le===void 0&&(Le=Z.substring($)),Y.push(Le),$=S,Fe(Y),oe&&ht()),Ae()}function Ut(Le){$=Le,Fe(Y),Y=[],X=Z.indexOf(N,$)}function Ae(Le){if(x.header&&!ne&&se.length&&!tt){var We=se[0],yt=Object.create(null),nn=new Set(We);let s=!1;for(let _=0;_<We.length;_++){let k=We[_];if(yt[k=_e(x.transformHeader)?x.transformHeader(k,_):k]){let F,e=yt[k];for(;F=k+"_"+e,e++,nn.has(F););nn.add(F),We[_]=F,yt[k]++,s=!0,(te=te===null?{}:te)[F]=k}else yt[k]=1,We[_]=k;nn.add(k)}s&&console.warn("Duplicate headers found and renamed."),tt=!0}return{data:se,errors:xe,meta:{delimiter:C,linebreak:N,aborted:Be,truncated:!!Le,cursor:be+(ne||0),renamedHeaders:te}}}function ht(){U(Ae()),se=[],xe=[]}},this.abort=function(){Be=!0},this.getCharIndex=function(){return $}}function ln(x){var C=x.data,N=v[C.workerId],z=!1;if(C.error)N.userError(C.error,C.file);else if(C.results&&C.results.data){var U={abort:function(){z=!0,pt(C.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:Kt,resume:Kt};if(_e(N.userStep)){for(var ee=0;ee<C.results.data.length&&(N.userStep({data:C.results.data[ee],errors:C.results.errors,meta:C.results.meta},U),!z);ee++);delete C.results}else _e(N.userChunk)&&(N.userChunk(C.results,U,C.file),delete C.results)}C.finished&&!z&&pt(C.workerId,C.results)}function pt(x,C){var N=v[x];_e(N.userComplete)&&N.userComplete(C),N.terminate(),delete v[x]}function Kt(){throw new Error("Not implemented.")}function Si(x){if(typeof x!="object"||x===null)return x;var C,N=Array.isArray(x)?[]:{};for(C in x)N[C]=Si(x[C]);return N}function Pt(x,C){return function(){x.apply(C,arguments)}}function _e(x){return typeof x=="function"}return L.parse=function(x,C){var N=(C=C||{}).dynamicTyping||!1;if(_e(N)&&(C.dynamicTypingFunction=N,N={}),C.dynamicTyping=N,C.transform=!!_e(C.transform)&&C.transform,!C.worker||!L.WORKERS_SUPPORTED)return N=null,L.NODE_STREAM_INPUT,typeof x=="string"?(x=(z=>z.charCodeAt(0)!==65279?z:z.slice(1))(x),N=new(C.download?we:a)(C)):x.readable===!0&&_e(x.read)&&_e(x.on)?N=new dt(C):(h.File&&x instanceof File||x instanceof Object)&&(N=new mt(C)),N.stream(x);(N=(()=>{var z;return!!L.WORKERS_SUPPORTED&&(z=(()=>{var U=h.URL||h.webkitURL||null,ee=n.toString();return L.BLOB_URL||(L.BLOB_URL=U.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",ee,")();"],{type:"text/javascript"})))})(),(z=new h.Worker(z)).onmessage=ln,z.id=V++,v[z.id]=z)})()).userStep=C.step,N.userChunk=C.chunk,N.userComplete=C.complete,N.userError=C.error,C.step=_e(C.step),C.chunk=_e(C.chunk),C.complete=_e(C.complete),C.error=_e(C.error),delete C.worker,N.postMessage({input:x,config:C,workerId:N.id})},L.unparse=function(x,C){var N=!1,z=!0,U=",",ee=`\r
|
|
13
|
-
`,ke='"',te=ke+ke,tt=!1,Q=null,le=!1,$=((()=>{if(typeof C=="object"){if(typeof C.delimiter!="string"||L.BAD_DELIMITERS.filter(function(ne){return C.delimiter.indexOf(ne)!==-1}).length||(U=C.delimiter),typeof C.quotes!="boolean"&&typeof C.quotes!="function"&&!Array.isArray(C.quotes)||(N=C.quotes),typeof C.skipEmptyLines!="boolean"&&typeof C.skipEmptyLines!="string"||(tt=C.skipEmptyLines),typeof C.newline=="string"&&(ee=C.newline),typeof C.quoteChar=="string"&&(ke=C.quoteChar),typeof C.header=="boolean"&&(z=C.header),Array.isArray(C.columns)){if(C.columns.length===0)throw new Error("Option columns is empty");Q=C.columns}C.escapeChar!==void 0&&(te=C.escapeChar+ke),C.escapeFormulae instanceof RegExp?le=C.escapeFormulae:typeof C.escapeFormulae=="boolean"&&C.escapeFormulae&&(le=/^[=+\-@\t\r].*$/)}})(),new RegExp(Gt(ke),"g"));if(typeof x=="string"&&(x=JSON.parse(x)),Array.isArray(x)){if(!x.length||Array.isArray(x[0]))return Be(null,x,tt);if(typeof x[0]=="object")return Be(Q||Object.keys(x[0]),x,tt)}else if(typeof x=="object")return typeof x.data=="string"&&(x.data=JSON.parse(x.data)),Array.isArray(x.data)&&(x.fields||(x.fields=x.meta&&x.meta.fields||Q),x.fields||(x.fields=Array.isArray(x.data[0])?x.fields:typeof x.data[0]=="object"?Object.keys(x.data[0]):[]),Array.isArray(x.data[0])||typeof x.data[0]=="object"||(x.data=[x.data])),Be(x.fields||[],x.data||[],tt);throw new Error("Unable to serialize unrecognized input");function Be(ne,j,S){var ge="",Te=(typeof ne=="string"&&(ne=JSON.parse(ne)),typeof j=="string"&&(j=JSON.parse(j)),Array.isArray(ne)&&0<ne.length),it=!Array.isArray(j[0]);if(Te&&z){for(var oe=0;oe<ne.length;oe++)0<oe&&(ge+=U),ge+=Z(ne[oe],oe);0<j.length&&(ge+=ee)}for(var se=0;se<j.length;se++){var xe=(Te?ne:j[se]).length,Y=!1,be=Te?Object.keys(j[se]).length===0:j[se].length===0;if(S&&!Te&&(Y=S==="greedy"?j[se].join("").trim()==="":j[se].length===1&&j[se][0].length===0),S==="greedy"&&Te){for(var Ce=[],Se=0;Se<xe;Se++){var ce=it?ne[Se]:Se;Ce.push(j[se][ce])}Y=Ce.join("").trim()===""}if(!Y){for(var X=0;X<xe;X++){0<X&&!be&&(ge+=U);var ze=Te&&it?ne[X]:X;ge+=Z(j[se][ze],X)}se<j.length-1&&(!S||0<xe&&!be)&&(ge+=ee)}}return ge}function Z(ne,j){var S,ge;return ne==null?"":ne.constructor===Date?JSON.stringify(ne).slice(1,25):(ge=!1,le&&typeof ne=="string"&&le.test(ne)&&(ne="'"+ne,ge=!0),S=ne.toString().replace($,te),(ge=ge||N===!0||typeof N=="function"&&N(ne,j)||Array.isArray(N)&&N[j]||((Te,it)=>{for(var oe=0;oe<it.length;oe++)if(-1<Te.indexOf(it[oe]))return!0;return!1})(S,L.BAD_DELIMITERS)||-1<S.indexOf(U)||S.charAt(0)===" "||S.charAt(S.length-1)===" ")?ke+S+ke:S)}},L.RECORD_SEP="",L.UNIT_SEP="",L.BYTE_ORDER_MARK="\uFEFF",L.BAD_DELIMITERS=["\r",`
|
|
14
|
-
`,'"',L.BYTE_ORDER_MARK],L.WORKERS_SUPPORTED=!l&&!!h.Worker,L.NODE_STREAM_INPUT=1,L.LocalChunkSize=10485760,L.RemoteChunkSize=5242880,L.DefaultDelimiter=",",L.Parser=Bt,L.ParserHandle=$t,L.NetworkStreamer=we,L.FileStreamer=mt,L.StringStreamer=a,L.ReadableStreamStreamer=dt,h.jQuery&&((t=h.jQuery).fn.parse=function(x){var C=x.config||{},N=[];return this.each(function(ee){if(!(t(this).prop("tagName").toUpperCase()==="INPUT"&&t(this).attr("type").toLowerCase()==="file"&&h.FileReader)||!this.files||this.files.length===0)return!0;for(var ke=0;ke<this.files.length;ke++)N.push({file:this.files[ke],inputElem:this,instanceConfig:t.extend({},C)})}),z(),this;function z(){if(N.length===0)_e(x.complete)&&x.complete();else{var ee,ke,te,tt,Q=N[0];if(_e(x.before)){var le=x.before(Q.file,Q.inputElem);if(typeof le=="object"){if(le.action==="abort")return ee="AbortError",ke=Q.file,te=Q.inputElem,tt=le.reason,void(_e(x.error)&&x.error({name:ee},ke,te,tt));if(le.action==="skip")return void U();typeof le.config=="object"&&(Q.instanceConfig=t.extend(Q.instanceConfig,le.config))}else if(le==="skip")return void U()}var $=Q.instanceConfig.complete;Q.instanceConfig.complete=function(Be){_e($)&&$(Be,Q.file,Q.inputElem),U()},L.parse(Q.file,Q.instanceConfig)}}function U(){N.splice(0,1),z()}}),c&&(h.onmessage=function(x){x=x.data,L.WORKER_ID===void 0&&x&&(L.WORKER_ID=x.workerId),typeof x.input=="string"?h.postMessage({workerId:L.WORKER_ID,results:L.parse(x.input,x.config),finished:!0}):(h.File&&x.input instanceof File||x.input instanceof Object)&&(x=L.parse(x.input,x.config))&&h.postMessage({workerId:L.WORKER_ID,results:x,finished:!0})}),(we.prototype=Object.create(re.prototype)).constructor=we,(mt.prototype=Object.create(re.prototype)).constructor=mt,(a.prototype=Object.create(a.prototype)).constructor=a,(dt.prototype=Object.create(re.prototype)).constructor=dt,L})});var xa=(()=>{class n extends ta{pathId;ngOnInit(){this.pathId="url(#"+on()+")"}static \u0275fac=(()=>{let t;return function(c){return(t||(t=gt(n)))(c||n)}})();static \u0275cmp=Oe({type:n,selectors:[["UploadIcon"]],features:[kt],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M6.58942 9.82197C6.70165 9.93405 6.85328 9.99793 7.012 10C7.17071 9.99793 7.32234 9.93405 7.43458 9.82197C7.54681 9.7099 7.61079 9.55849 7.61286 9.4V2.04798L9.79204 4.22402C9.84752 4.28011 9.91365 4.32457 9.98657 4.35479C10.0595 4.38502 10.1377 4.40039 10.2167 4.40002C10.2956 4.40039 10.3738 4.38502 10.4467 4.35479C10.5197 4.32457 10.5858 4.28011 10.6413 4.22402C10.7538 4.11152 10.817 3.95902 10.817 3.80002C10.817 3.64102 10.7538 3.48852 10.6413 3.37602L7.45127 0.190618C7.44656 0.185584 7.44176 0.180622 7.43687 0.175736C7.32419 0.063214 7.17136 0 7.012 0C6.85264 0 6.69981 0.063214 6.58712 0.175736C6.58181 0.181045 6.5766 0.186443 6.5715 0.191927L3.38282 3.37602C3.27669 3.48976 3.2189 3.6402 3.22165 3.79564C3.2244 3.95108 3.28746 4.09939 3.39755 4.20932C3.50764 4.31925 3.65616 4.38222 3.81182 4.38496C3.96749 4.3877 4.11814 4.33001 4.23204 4.22402L6.41113 2.04807V9.4C6.41321 9.55849 6.47718 9.7099 6.58942 9.82197ZM11.9952 14H2.02883C1.751 13.9887 1.47813 13.9228 1.22584 13.8061C0.973545 13.6894 0.746779 13.5241 0.558517 13.3197C0.370254 13.1154 0.22419 12.876 0.128681 12.6152C0.0331723 12.3545 -0.00990605 12.0775 0.0019109 11.8V9.40005C0.0019109 9.24092 0.065216 9.08831 0.1779 8.97579C0.290584 8.86326 0.443416 8.80005 0.602775 8.80005C0.762134 8.80005 0.914966 8.86326 1.02765 8.97579C1.14033 9.08831 1.20364 9.24092 1.20364 9.40005V11.8C1.18295 12.0376 1.25463 12.274 1.40379 12.4602C1.55296 12.6463 1.76817 12.7681 2.00479 12.8H11.9952C12.2318 12.7681 12.447 12.6463 12.5962 12.4602C12.7453 12.274 12.817 12.0376 12.7963 11.8V9.40005C12.7963 9.24092 12.8596 9.08831 12.9723 8.97579C13.085 8.86326 13.2378 8.80005 13.3972 8.80005C13.5565 8.80005 13.7094 8.86326 13.8221 8.97579C13.9347 9.08831 13.998 9.24092 13.998 9.40005V11.8C14.022 12.3563 13.8251 12.8996 13.45 13.3116C13.0749 13.7236 12.552 13.971 11.9952 14Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(l,c){l&1&&(To(),d(0,"svg",0)(1,"g"),D(2,"path",1),u(),d(3,"defs")(4,"clipPath",2),D(5,"rect",3),u()()()),l&2&&(lt(c.getClassNames()),fe("aria-label",c.ariaLabel)("aria-hidden",c.ariaHidden)("role",c.role),g(),fe("clip-path",c.pathId),g(3),y("id",c.pathId))},encapsulation:2})}return n})();var Ke=(()=>{class n{constructor(){this.#e=K(Qo),this.authService=K(Yo)}#e;getJournalEntryLoader(){return this.#e.get("","api/JournalLoader/JournalEntry")}getJournalReceiveMoney(){return this.#e.get("","api/JournalLoader/ReceiveJournal")}getJournalRecordExpenseLoader(){return this.#e.get("","api/JournalLoader/RecordExpense")}getJournalEntryData(t,l={}){return this.#e.post("","api/Journal/JournalEntry",t,l)}getJournalEntryInfo(t){let l={ID:t};return this.#e.get("","/api/Journal/Info",{params:l})}getJournalEntryForm(t){return this.#e.get("",`api/journalloader/form/${t}`).pipe()}getJournalEntryCount(t){return this.#e.post("","api/Journal/JournalEntryCount",t)}getJournalEntryCustomerSuggestions(t){let l={Prefix:t,Count:100};return this.#e.get(this.authService.getTenantExternalURL(),"/API/AC/GetCustomerSuggestion",{params:l})}getJournalEntrySupplierSuggestions(t){let l={Prefix:t,Count:100};return this.#e.get(this.authService.getTenantExternalURL(),"/API/AC/GetSupplierSuggestion",{params:l})}submitJournalEntry(t){return this.#e.post(void 0,"api/journal/submit",t,{observe:"response"})}deleteJournalEntry(t){let l={params:{ID:t.join(",")}};return this.#e.delete(void 0,"/api/Journal/delete",l)}fetchCategoryOptions(){return this.#e.get("","api/ChartOfAccount/CategoryOptions")}submitChartAccount(t,l={}){return this.#e.post("","api/ChartOfAccount/Submit",t,l)}static{this.\u0275fac=function(l){return new(l||n)}}static{this.\u0275prov=xt({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var ar={filter:{transID:"",bulkID:"",rowCount:10,pageNumber:1,orderBy:0,orderbyCreated:0,auditEditor:!1,listOutletID:[],searchAudit:!1,number:"",from:"",to:""},data:[],count:0,metadata:{}},Xn=ra(ua(ar),ma("JournalEntryStore"),sa(n=>({first:ot(()=>(n.filter().pageNumber-1)*n.filter().rowCount+1),end:ot(()=>Math.min(n.filter().pageNumber*n.filter().rowCount,n.count())),selectedItems:ot(()=>n.data().filter(h=>h.checked))})),ca(n=>{let h=K(Ke),t={updateCount(l){Ji(n,c=>ye(me({},c),{count:l}))},updateFilter(l){Ji(n,c=>ye(me({},c),{filter:me(me({},c.filter),l),metadata:ye(me({},c.metadata),{paginator:!1})}))},loadJournalEntryLoader:Qn(jn(yi(()=>h.getJournalEntryLoader().pipe(Yn({next:l=>{console.log("response",l),Ji(n,c=>ye(me({},c),{filter:ye(me({},l.filter),{pageNumber:1}),metadata:{options:l.options,paginator:!1}})),t.loadJournalEntryData(n.filter),console.log("store",n)},error(l){console.log("error",l)}}))))),loadJournalEntryData:Qn(jn(pn(l=>!!l),yi(l=>h.getJournalEntryData(l).pipe(_t(c=>ye(me({},c),{data:c.data.map(v=>ye(me({},v),{checked:!1}))})),Co(c=>h.getJournalEntryCount(l).pipe(_t(v=>({journalEntry:c,count:v})))),Yn({next({journalEntry:c,count:v}){Ji(n,V=>ye(me({},V),{data:c.data,count:v.count}))},error(c){console.log("error",c)}}),De("getJournalEntryData"))))),updateData:l=>{Ji(n,c=>ye(me({},c),{data:l}))}};return t}),la({onInit(n){n.loadJournalEntryLoader()}}));var sr=["dt"],lr=["filterRef"],cr=["class","page"],ur=n=>[n],mr=n=>({id:n});function dr(n,h){if(n&1){let t=q();d(0,"p-button",15),J("onClick",function(){R(t);let c=P(2);return M(c.onDeleteJournalEntry())}),u()}}function pr(n,h){if(n&1){let t=q();d(0,"div",9),I(1,dr,1,0,"p-button",10),D(2,"p-button",11),d(3,"p-button",12),J("onClick",function(){R(t);let c=P();return M(c.onExportJournalEntry())}),u(),d(4,"a",13),D(5,"i",14),d(6,"span"),b(7,"Add"),u()()()}if(n&2){let t=P();g(),y("ngIf",t.JournalEntryStore.selectedItems().length>0)}}function hr(n,h){n&1&&(d(0,"tr")(1,"th"),D(2,"p-tableHeaderCheckbox"),u(),d(3,"th"),b(4,"Outlet"),u(),d(5,"th"),b(6,"Number"),u(),d(7,"th"),b(8,"Date/Name"),u(),d(9,"th"),b(10,"Description"),u(),d(11,"th",17),b(12," Account "),u(),d(13,"th",18),b(14,"Debit"),u(),d(15,"th",18),b(16,"Credit"),u()())}function gr(n,h){if(n&1&&(d(0,"div",22)(1,"div",24)(2,"span",25),b(3),u()(),d(4,"div",26)(5,"a",27),b(6),u()()()),n&2){let t=h.$implicit;g(3),ae(t.accountName),g(2),y("queryParams",Ne(3,mr,t.accountID)),g(),he("(",t.accountCode,")")}}function fr(n,h){if(n&1&&(d(0,"span"),b(1),Re(2,"number"),u()),n&2){let t=P().$implicit;g(),ae(Je(2,1,t.debitAmount))}}function vr(n,h){n&1&&(d(0,"span",28),b(1,'""'),u())}function yr(n,h){if(n&1&&I(0,fr,3,3,"span")(1,vr,2,0,"span",28),n&2){let t=h.$implicit;Me(t.debitAmount>0?0:1)}}function _r(n,h){if(n&1&&(d(0,"span"),b(1),Re(2,"number"),u()),n&2){let t=P().$implicit;g(),ae(Je(2,1,t.creditAmount))}}function br(n,h){n&1&&(d(0,"span",28),b(1,'""'),u())}function Sr(n,h){if(n&1&&I(0,_r,3,3,"span")(1,br,2,0,"span",28),n&2){let t=h.$implicit;Me(t.creditAmount>0?0:1)}}function wr(n,h){if(n&1&&(d(0,"tr")(1,"td"),D(2,"p-tableCheckbox",19),u(),d(3,"td"),b(4),u(),d(5,"td")(6,"a",20),b(7),u()(),d(8,"td"),b(9),Re(10,"date"),u(),d(11,"td"),b(12),u(),d(13,"td")(14,"div",21),Ct(15,gr,7,5,"div",22,Ht),u()(),d(17,"td")(18,"div",23),Ct(19,yr,2,1,null,null,Ht),u()(),d(21,"td")(22,"div",23),Ct(23,Sr,2,1,null,null,Ht),u()()()),n&2){let t=h.$implicit;g(2),y("value",t),g(2),ae(t.outletName),g(2),y("routerLink",Ne(9,ur,t.id)),g(),ae(t.number),g(2),ae(_n(10,6,t.date,"dd MMM y")),g(3),he(" ",t.note," "),g(3),Et(t.items),g(4),Et(t.items),g(4),Et(t.items)}}function xr(n,h){if(n&1&&b(0),n&2){let t=P(3);he(" ",t.JournalEntryStore.count()," ")}}function Cr(n,h){if(n&1){let t=q();d(0,"p-button",30),J("onClick",function(){R(t);let c=P(3);return M(c.getJournalEntryCount())}),u()}n&2&&y("rounded",!0)("text",!0)}function Er(n,h){if(n&1&&(b(0),I(1,xr,1,1)(2,Cr,1,2,"p-button",29),b(3," entries ")),n&2){let t=P(2);yn(" Showing ",t.JournalEntryStore.first()," to ",t.JournalEntryStore.end()," of "),g(),Me(t.JournalEntryStore.count()?1:2)}}function Pr(n,h){if(n&1){let t=q();d(0,"p-card")(1,"p-table",16,3),J("onPage",function(c){R(t);let v=P();return M(v.onPageChange(c))})("onRowSelect",function(c){R(t);let v=P();return M(v.onRowSelect(c))})("onRowUnselect",function(c){R(t);let v=P();return M(v.onRowUnselect(c))})("onHeaderCheckboxToggle",function(c){R(t);let v=P();return M(v.onHeaderCheckboxToggle(c))}),I(3,hr,17,0,"ng-template",null,4,W)(5,wr,25,11,"ng-template",null,5,W)(7,Er,4,3,"ng-template",null,6,W),u()()}if(n&2){let t=P();g(),y("resizableColumns",!0)("value",t.JournalEntryStore.data())("paginator",!0)("totalRecords",t.JournalEntryStore.count())("lazy",!0)("rows",t.JournalEntryStore.filter().rowCount)("scrollable",!0)("scrollHeight","calc(100vh - 200px)")}}function kr(n,h){if(n&1&&(d(0,"div",47)(1,"div"),b(2),u()()),n&2){let t=h.$implicit;g(2),ae(t.name)}}function Tr(n,h){if(n&1&&(d(0,"form",31)(1,"div",21)(2,"label",32),b(3,"Outlet"),u(),d(4,"p-multiselect",33),I(5,kr,3,1,"ng-template",null,7,W),u()(),d(7,"div",21)(8,"label",32),b(9,"From"),u(),D(10,"p-datepicker",34),u(),d(11,"div",21)(12,"label",32),b(13,"To"),u(),D(14,"p-datepicker",35),u(),d(15,"div",21)(16,"label",32),b(17,"Page Size"),u(),D(18,"input",36),u(),d(19,"div",21)(20,"label",32),b(21,"Order By Date"),u(),d(22,"div",37)(23,"div",38)(24,"div",39),D(25,"p-radiobutton",40),d(26,"label",41),b(27,"Date"),u()()(),d(28,"div",42)(29,"div",39),D(30,"p-radiobutton",43),d(31,"label",44),b(32,"Created"),u()()()()(),d(33,"div",21)(34,"label",32),b(35,"Order By"),u(),d(36,"div",37)(37,"div",38)(38,"div",39),D(39,"p-radiobutton",45),d(40,"label",41),b(41,"Asc"),u()()(),d(42,"div",42)(43,"div",39),D(44,"p-radiobutton",46),d(45,"label",44),b(46,"Desc"),u()()()()()()),n&2){let t,l=P();y("formGroup",l.filterForm),g(4),y("virtualScroll",!0)("virtualScrollItemSize",50)("options",l.JournalEntryStore==null||(t=l.JournalEntryStore.metadata())==null||t.options==null?null:t.options.outlets),g(6),y("iconDisplay","input")("showIcon",!0),g(4),y("iconDisplay","input")("showIcon",!0),g(11),y("value",0),g(5),y("value",1),g(9),y("value",0),g(5),y("value",1)}}var Ea=(()=>{class n{constructor(){this.JournalEntryStore=K(Xn),this.modalService=K(En),this.journalEntryService=K(Ke),this.fb=K(xn),this.dayjs=K(Sa),Fi(()=>{this.JournalEntryStore.filter()&&this.generateFilterForm()})}ngOnInit(){console.log("Journal Entry Page")}onSearch(t){this.JournalEntryStore.updateFilter({number:t})}onFilterOKEvent(){let t=this.filterForm.getRawValue();this.JournalEntryStore.updateFilter({from:this.dayjs.from(t.from)?this.dayjs.from(t.from).format():null,to:this.dayjs.from(t.to)?this.dayjs.from(t.to).format():null,pageNumber:1,rowCount:+t.rowCount,orderBy:t.orderBy,orderbyCreated:t.orderByCreated,listOutletID:t.listOutletID}),this.table.reset()}generateFilterForm(){this.filterForm=this.fb.group({from:[null],to:[null],rowCount:[this.JournalEntryStore.filter().rowCount],orderBy:[0],orderByCreated:[0],listOutletID:[this.JournalEntryStore.filter().listOutletID]})}onFilterChange(t){console.log("Filter Change",t),this.modalService.open(this.templateRef)}onRowSelect(t){this.updateRowSelection(t.data,!0)}onRowUnselect(t){Array.isArray(t.data)?this.JournalEntryStore.updateData(this.JournalEntryStore.data().map((l,c)=>l.id===t.data[c].id?ye(me({},l),{checked:!1}):l)):t.data&&typeof t.data=="object"&&"id"in t.data&&this.JournalEntryStore.updateData(this.JournalEntryStore.data().map(l=>l.id===t.data.id?ye(me({},l),{checked:!1}):l))}updateRowSelection(t,l){this.JournalEntryStore.updateData(this.JournalEntryStore.data().map(c=>c.id===t.id?ye(me({},c),{checked:l}):c))}onHeaderCheckboxToggle(t){let l=this.JournalEntryStore.data().map(c=>ye(me({},c),{checked:t.checked}));this.JournalEntryStore.updateData(l)}onPageChange(t){let l=t.first/t.rows;this.JournalEntryStore.updateFilter({pageNumber:l+1})}next(){this.JournalEntryStore.updateFilter({pageNumber:this.JournalEntryStore.filter().pageNumber+1})}prev(){this.JournalEntryStore.filter().pageNumber<=1||this.JournalEntryStore.updateFilter({pageNumber:this.JournalEntryStore.filter().pageNumber-1})}getJournalEntryCount(){this.journalEntryService.getJournalEntryCount(this.JournalEntryStore.filter()).pipe(Pe(t=>this.JournalEntryStore.updateCount(t.count))).subscribe()}onDeleteJournalEntry(){let l=this.JournalEntryStore.selectedItems().map(c=>c.id);this.journalEntryService.deleteJournalEntry(l).pipe(Pe(()=>{this.JournalEntryStore.loadJournalEntryData(this.JournalEntryStore.filter())})).subscribe()}onExportJournalEntry(){let t=ye(me({},this.JournalEntryStore.filter()),{export:!0,ExportPageNumber:1,ExportRowCount:1e4});this.journalEntryService.getJournalEntryData(t,{responseType:"blob"}).pipe(De("Export Journal Entry"),Pe(l=>{let c=l.type,v=[l],V=document.createElement("a");V.href=window.URL.createObjectURL(new Blob(v,{type:c}));let L=`journal-entries.${c.split("/")[1]}`;V.setAttribute("download",L),document.body.appendChild(V),V.click(),document.body.removeChild(V)})).subscribe()}static{this.\u0275fac=function(l){return new(l||n)}}static{this.\u0275cmp=Oe({type:n,selectors:[["app-journal-entry",8,"page"]],viewQuery:function(l,c){if(l&1&&(nt(sr,5),nt(lr,7)),l&2){let v;de(v=pe())&&(c.table=v.first),de(v=pe())&&(c.templateRef=v.first)}},features:[et([Xn])],attrs:cr,decls:7,vars:2,consts:[["actionButton",""],["content",""],["filters",""],["dt",""],["header",""],["body",""],["paginatorleft",""],["item",""],["pageTitle","Manual Journal",3,"search","filterConfirmed","isSearchableInput","isFilterable"],[1,"d-flex","gap-2"],["severity","danger","label","Delete","icon","fa-solid fa-trash",3,"onClick",4,"ngIf"],["severity","secondary","label","Import","icon","fa-solid fa-upload","variant","outlined"],["severity","secondary","label","Export","icon","fa-solid fa-download","variant","outlined",3,"onClick"],["type","button","routerLink","add",1,"p-button"],[1,"fa-solid","fa-plus"],["severity","danger","label","Delete","icon","fa-solid fa-trash",3,"onClick"],["columnResizeMode","expand","dataKey","id","styleClass","d-flex flex-column justify-content-between h-100",3,"onPage","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","resizableColumns","value","paginator","totalRecords","lazy","rows","scrollable","scrollHeight"],[2,"width","300px","min-width","300px","max-width","300px"],[1,"text-end"],[3,"value"],[1,"link","link-primary",3,"routerLink"],[1,"d-flex","flex-column"],[1,"row"],[1,"d-flex","flex-column","align-items-end"],[1,"col-6"],[1,"text-truncate","d-inline-block",2,"max-width","130px"],[1,"col"],["routerLink","/report/general-ledger",1,"link","link-primary",3,"queryParams"],[2,"color","transparent"],["icon","fa-light fa-question","severity","primary",3,"rounded","text"],["icon","fa-light fa-question","severity","primary",3,"onClick","rounded","text"],[1,"d-flex","flex-column","row-gap-2",3,"formGroup"],["for","outlet"],["formControlName","listOutletID","appendTo","body","optionLabel","name","optionValue","id","placeholder","Select Outlet",3,"virtualScroll","virtualScrollItemSize","options"],["formControlName","from","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon"],["formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon"],["type","text","pInputText","","formControlName","rowCount"],[1,"d-flex","flex-wrap","gap-4"],[1,"d-flex"],[1,"d-flex","align-items-baseline","gap-2"],["name","orderByCreated","formControlName","orderByCreated","inputId","date",3,"value"],["for","date",1,""],[1,"d-flex","items-center"],["name","orderByCreated","formControlName","orderByCreated","inputId","created",3,"value"],["for","created",1,""],["name","orderBy","formControlName","orderBy","inputId","date",3,"value"],["name","orderBy","formControlName","orderBy","inputId","created",3,"value"],[1,"flex","items-center","gap-2"]],template:function(l,c){if(l&1){let v=q();d(0,"app-main-panel",8),J("search",function(L){return R(v),M(c.onSearch(L))})("filterConfirmed",function(){return R(v),M(c.onFilterOKEvent())}),I(1,pr,8,1,"ng-template",null,0,W)(3,Pr,9,8,"ng-template",null,1,W)(5,Tr,47,12,"ng-template",null,2,W),u()}l&2&&y("isSearchableInput",!0)("isFilterable",!0)},dependencies:[wt,Ge,ct,Tt,bn,fa,Zo,It,Ot,Mt,Rt,ha,ga,At,ut,Lt,On,ya,va,li,si,ii,qo,Qt,Yt,Xt,ei,ti,Vt,Dt,Wi,Ki],encapsulation:2,changeDetection:0})}}return n})();var ro=vi(In());var no=vi(ka());var Xi=(()=>{class n{constructor(t){this.el=t,this.options={},this.previousValue=null,this.onChange=()=>{},this.onTouched=()=>{}}ngOnInit(){this.options=ye(me({},no.default.getPredefinedOptions()),{decimalPlaces:0}),this.initAutoNumeric()}ngOnChanges(t){t.options&&!t.options.firstChange&&this.reinitAutoNumeric()}ngOnDestroy(){this.anInstance?.remove()}initAutoNumeric(){this.anInstance=new no.default(this.el.nativeElement,this.options),this.previousValue!=null&&this.anInstance.set(this.previousValue)}reinitAutoNumeric(){this.anInstance?.remove(),this.initAutoNumeric()}writeValue(t){this.previousValue=t,this.anInstance&&this.anInstance.set(t??"")}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.el.nativeElement.disabled=t}onInput(){let t=this.anInstance?.getNumber();t!=null&&!isNaN(t)&&(this.previousValue=t),this.onChange(t??null)}onBlur(){this.onTouched();let t=this.el.nativeElement.value.trim(),l=this.anInstance?.getNumber();(t===""||l===void 0||isNaN(l))&&(this.previousValue!=null?this.anInstance?.set(this.previousValue):this.anInstance?.clear())}static{this.\u0275fac=function(l){return new(l||n)(Jt(Oo))}}static{this.\u0275dir=vn({type:n,selectors:[["","autoNumeric",""]],hostBindings:function(l,c){l&1&&J("input",function(){return c.onInput()})("blur",function(){return c.onBlur()})},inputs:{options:[0,"autoNumeric","options"]},features:[et([{provide:Ho,useExisting:Po(()=>n),multi:!0}]),ko]})}}return n})();var Fr=["container"],Or=["icon"],Ir=["closeicon"],Nr=["*"],Dr=(n,h)=>({showTransitionParams:n,hideTransitionParams:h}),Vr=n=>({value:"visible()",params:n}),Ar=n=>({closeCallback:n});function Lr(n,h){n&1&&Xe(0)}function Rr(n,h){if(n&1&&I(0,Lr,1,0,"ng-container",7),n&2){let t=P(2);y("ngTemplateOutlet",t.iconTemplate||t.iconTemplate)}}function Mr(n,h){if(n&1&&D(0,"i",3),n&2){let t=P(2);y("ngClass",t.icon)}}function Br(n,h){if(n&1&&D(0,"span",9),n&2){let t=P(3);y("ngClass",t.cx("text"))("innerHTML",t.text,Io)}}function zr(n,h){if(n&1&&(d(0,"div"),I(1,Br,1,2,"span",8),u()),n&2){let t=P(2);g(),y("ngIf",!t.escape)}}function Ur(n,h){if(n&1&&(d(0,"span",5),b(1),u()),n&2){let t=P(3);y("ngClass",t.cx("text")),g(),ae(t.text)}}function jr(n,h){if(n&1&&I(0,Ur,2,2,"span",10),n&2){let t=P(2);y("ngIf",t.escape&&t.text)}}function Jr(n,h){n&1&&Xe(0)}function $r(n,h){if(n&1&&I(0,Jr,1,0,"ng-container",11),n&2){let t=P(2);y("ngTemplateOutlet",t.containerTemplate||t.containerTemplate)("ngTemplateOutletContext",Ne(2,Ar,t.close.bind(t)))}}function Gr(n,h){if(n&1&&(d(0,"span",5),Lo(1),u()),n&2){let t=P(2);y("ngClass",t.cx("text"))}}function Kr(n,h){if(n&1&&D(0,"i",13),n&2){let t=P(3);y("ngClass",t.closeIcon)}}function Wr(n,h){n&1&&Xe(0)}function Hr(n,h){if(n&1&&I(0,Wr,1,0,"ng-container",7),n&2){let t=P(3);y("ngTemplateOutlet",t.closeIconTemplate||t._closeIconTemplate)}}function qr(n,h){n&1&&D(0,"TimesIcon",14)}function Zr(n,h){if(n&1){let t=q();d(0,"button",12),J("click",function(c){R(t);let v=P(2);return M(v.close(c))}),I(1,Kr,1,1,"i",13)(2,Hr,1,1,"ng-container")(3,qr,1,0,"TimesIcon",14),u()}if(n&2){let t=P(2);fe("aria-label",t.closeAriaLabel),g(),Me(t.closeIcon?1:-1),g(),Me(t.closeIconTemplate||t._closeIconTemplate?2:-1),g(),Me(!t.closeIconTemplate&&!t._closeIconTemplate&&!t.closeIcon?3:-1)}}function Qr(n,h){if(n&1&&(d(0,"div",1)(1,"div",2),I(2,Rr,1,1,"ng-container")(3,Mr,1,1,"i",3)(4,zr,2,1,"div",4)(5,jr,1,1,"ng-template",null,0,W)(7,$r,1,4,"ng-container")(8,Gr,2,1,"span",5)(9,Zr,4,4,"button",6),u()()),n&2){let t=Ro(6),l=P();y("ngClass",l.containerClass)("@messageAnimation",Ne(13,Vr,ki(10,Dr,l.showTransitionOptions,l.hideTransitionOptions))),fe("aria-live","polite")("role","alert"),g(2),Me(l.iconTemplate||l._iconTemplate?2:-1),g(),Me(l.icon?3:-1),g(),y("ngIf",!l.escape)("ngIfElse",t),g(3),Me(l.containerTemplate||l._containerTemplate?7:8),g(2),Me(l.closable?9:-1)}}var Yr=({dt:n})=>`
|
|
15
|
-
.p-message {
|
|
16
|
-
border-radius: ${n("message.border.radius")};
|
|
17
|
-
outline-width: ${n("message.border.width")};
|
|
18
|
-
outline-style: solid;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.p-message-content {
|
|
22
|
-
display: flex;
|
|
23
|
-
align-items: center;
|
|
24
|
-
padding: ${n("message.content.padding")};
|
|
25
|
-
gap: ${n("message.content.gap")};
|
|
26
|
-
height: 100%;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.p-message-icon {
|
|
30
|
-
flex-shrink: 0;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.p-message-close-button {
|
|
34
|
-
display: flex;
|
|
35
|
-
align-items: center;
|
|
36
|
-
justify-content: center;
|
|
37
|
-
flex-shrink: 0;
|
|
38
|
-
margin-inline-start: auto;
|
|
39
|
-
overflow: hidden;
|
|
40
|
-
position: relative;
|
|
41
|
-
width: ${n("message.close.button.width")};
|
|
42
|
-
height: ${n("message.close.button.height")};
|
|
43
|
-
border-radius: ${n("message.close.button.border.radius")};
|
|
44
|
-
background: transparent;
|
|
45
|
-
transition: background ${n("message.transition.duration")}, color ${n("message.transition.duration")}, outline-color ${n("message.transition.duration")}, box-shadow ${n("message.transition.duration")}, opacity 0.3s;
|
|
46
|
-
outline-color: transparent;
|
|
47
|
-
color: inherit;
|
|
48
|
-
padding: 0;
|
|
49
|
-
border: none;
|
|
50
|
-
cursor: pointer;
|
|
51
|
-
user-select: none;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.p-message-close-icon {
|
|
55
|
-
font-size: ${n("message.close.icon.size")};
|
|
56
|
-
width: ${n("message.close.icon.size")};
|
|
57
|
-
height: ${n("message.close.icon.size")};
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.p-message-close-button:focus-visible {
|
|
61
|
-
outline-width: ${n("message.close.button.focus.ring.width")};
|
|
62
|
-
outline-style: ${n("message.close.button.focus.ring.style")};
|
|
63
|
-
outline-offset: ${n("message.close.button.focus.ring.offset")};
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.p-message-info {
|
|
67
|
-
background: ${n("message.info.background")};
|
|
68
|
-
outline-color: ${n("message.info.border.color")};
|
|
69
|
-
color: ${n("message.info.color")};
|
|
70
|
-
box-shadow: ${n("message.info.shadow")};
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.p-message-info .p-message-close-button:focus-visible {
|
|
74
|
-
outline-color: ${n("message.info.close.button.focus.ring.color")};
|
|
75
|
-
box-shadow: ${n("message.info.close.button.focus.ring.shadow")};
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.p-message-info .p-message-close-button:hover {
|
|
79
|
-
background: ${n("message.info.close.button.hover.background")};
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.p-message-info.p-message-outlined {
|
|
83
|
-
color: ${n("message.info.outlined.color")};
|
|
84
|
-
outline-color: ${n("message.info.outlined.border.color")};
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.p-message-info.p-message-simple {
|
|
88
|
-
color: ${n("message.info.simple.color")};
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.p-message-success {
|
|
92
|
-
background: ${n("message.success.background")};
|
|
93
|
-
outline-color: ${n("message.success.border.color")};
|
|
94
|
-
color: ${n("message.success.color")};
|
|
95
|
-
box-shadow: ${n("message.success.shadow")};
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.p-message-success .p-message-close-button:focus-visible {
|
|
99
|
-
outline-color: ${n("message.success.close.button.focus.ring.color")};
|
|
100
|
-
box-shadow: ${n("message.success.close.button.focus.ring.shadow")};
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.p-message-success .p-message-close-button:hover {
|
|
104
|
-
background: ${n("message.success.close.button.hover.background")};
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.p-message-success.p-message-outlined {
|
|
108
|
-
color: ${n("message.success.outlined.color")};
|
|
109
|
-
outline-color: ${n("message.success.outlined.border.color")};
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.p-message-success.p-message-simple {
|
|
113
|
-
color: ${n("message.success.simple.color")};
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.p-message-warn {
|
|
117
|
-
background: ${n("message.warn.background")};
|
|
118
|
-
outline-color: ${n("message.warn.border.color")};
|
|
119
|
-
color: ${n("message.warn.color")};
|
|
120
|
-
box-shadow: ${n("message.warn.shadow")};
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.p-message-warn .p-message-close-button:focus-visible {
|
|
124
|
-
outline-color: ${n("message.warn.close.button.focus.ring.color")};
|
|
125
|
-
box-shadow: ${n("message.warn.close.button.focus.ring.shadow")};
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.p-message-warn .p-message-close-button:hover {
|
|
129
|
-
background: ${n("message.warn.close.button.hover.background")};
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.p-message-warn.p-message-outlined {
|
|
133
|
-
color: ${n("message.warn.outlined.color")};
|
|
134
|
-
outline-color: ${n("message.warn.outlined.border.color")};
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.p-message-warn.p-message-simple {
|
|
138
|
-
color: ${n("message.warn.simple.color")};
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.p-message-error {
|
|
142
|
-
background: ${n("message.error.background")};
|
|
143
|
-
outline-color: ${n("message.error.border.color")};
|
|
144
|
-
color: ${n("message.error.color")};
|
|
145
|
-
box-shadow: ${n("message.error.shadow")};
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.p-message-error .p-message-close-button:focus-visible {
|
|
149
|
-
outline-color: ${n("message.error.close.button.focus.ring.color")};
|
|
150
|
-
box-shadow: ${n("message.error.close.button.focus.ring.shadow")};
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.p-message-error .p-message-close-button:hover {
|
|
154
|
-
background: ${n("message.error.close.button.hover.background")};
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.p-message-error.p-message-outlined {
|
|
158
|
-
color: ${n("message.error.outlined.color")};
|
|
159
|
-
outline-color: ${n("message.error.outlined.border.color")};
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.p-message-error.p-message-simple {
|
|
163
|
-
color: ${n("message.error.simple.color")};
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.p-message-secondary {
|
|
167
|
-
background: ${n("message.secondary.background")};
|
|
168
|
-
outline-color: ${n("message.secondary.border.color")};
|
|
169
|
-
color: ${n("message.secondary.color")};
|
|
170
|
-
box-shadow: ${n("message.secondary.shadow")};
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.p-message-secondary .p-message-close-button:focus-visible {
|
|
174
|
-
outline-color: ${n("message.secondary.close.button.focus.ring.color")};
|
|
175
|
-
box-shadow: ${n("message.secondary.close.button.focus.ring.shadow")};
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
.p-message-secondary .p-message-close-button:hover {
|
|
179
|
-
background: ${n("message.secondary.close.button.hover.background")};
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.p-message-secondary.p-message-outlined {
|
|
183
|
-
color: ${n("message.secondary.outlined.color")};
|
|
184
|
-
outline-color: ${n("message.secondary.outlined.border.color")};
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.p-message-secondary.p-message-simple {
|
|
188
|
-
color: ${n("message.secondary.simple.color")};
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.p-message-contrast {
|
|
192
|
-
background: ${n("message.contrast.background")};
|
|
193
|
-
outline-color: ${n("message.contrast.border.color")};
|
|
194
|
-
color: ${n("message.contrast.color")};
|
|
195
|
-
box-shadow: ${n("message.contrast.shadow")};
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.p-message-contrast .p-message-close-button:focus-visible {
|
|
199
|
-
outline-color: ${n("message.contrast.close.button.focus.ring.color")};
|
|
200
|
-
box-shadow: ${n("message.contrast.close.button.focus.ring.shadow")};
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.p-message-contrast .p-message-close-button:hover {
|
|
204
|
-
background: ${n("message.contrast.close.button.hover.background")};
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.p-message-contrast.p-message-outlined {
|
|
208
|
-
color: ${n("message.contrast.outlined.color")};
|
|
209
|
-
outline-color: ${n("message.contrast.outlined.border.color")};
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.p-message-contrast.p-message-simple {
|
|
213
|
-
color: ${n("message.contrast.simple.color")};
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
.p-message-text {
|
|
217
|
-
display: inline-flex;
|
|
218
|
-
align-items: center;
|
|
219
|
-
font-size: ${n("message.text.font.size")};
|
|
220
|
-
font-weight: ${n("message.text.font.weight")};
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
.p-message-icon {
|
|
224
|
-
font-size: ${n("message.icon.size")};
|
|
225
|
-
width: ${n("message.icon.size")};
|
|
226
|
-
height: ${n("message.icon.size")};
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
.p-message-enter-from {
|
|
230
|
-
opacity: 0;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.p-message-enter-active {
|
|
234
|
-
transition: opacity 0.3s;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
.p-message.p-message-leave-from {
|
|
238
|
-
max-height: 1000px;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
.p-message.p-message-leave-to {
|
|
242
|
-
max-height: 0;
|
|
243
|
-
opacity: 0;
|
|
244
|
-
margin: 0;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
.p-message-leave-active {
|
|
248
|
-
overflow: hidden;
|
|
249
|
-
transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin 0.3s;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
.p-message-leave-active .p-message-close-button {
|
|
253
|
-
opacity: 0;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
.p-message-sm .p-message-content {
|
|
257
|
-
padding: ${n("message.content.sm.padding")};
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
.p-message-sm .p-message-text {
|
|
261
|
-
font-size: ${n("message.text.sm.font.size")};
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
.p-message-sm .p-message-icon {
|
|
265
|
-
font-size: ${n("message.icon.sm.size")};
|
|
266
|
-
width: ${n("message.icon.sm.size")};
|
|
267
|
-
height: ${n("message.icon.sm.size")};
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
.p-message-sm .p-message-close-icon {
|
|
271
|
-
font-size: ${n("message.close.icon.sm.size")};
|
|
272
|
-
width: ${n("message.close.icon.sm.size")};
|
|
273
|
-
height: ${n("message.close.icon.sm.size")};
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
.p-message-lg .p-message-content {
|
|
277
|
-
padding: ${n("message.content.lg.padding")};
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
.p-message-lg .p-message-text {
|
|
281
|
-
font-size: ${n("message.text.lg.font.size")};
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
.p-message-lg .p-message-icon {
|
|
285
|
-
font-size: ${n("message.icon.lg.size")};
|
|
286
|
-
width: ${n("message.icon.lg.size")};
|
|
287
|
-
height: ${n("message.icon.lg.size")};
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
.p-message-lg .p-message-close-icon {
|
|
291
|
-
font-size: ${n("message.close.icon.lg.size")};
|
|
292
|
-
width: ${n("message.close.icon.lg.size")};
|
|
293
|
-
height: ${n("message.close.icon.lg.size")};
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
.p-message-outlined {
|
|
297
|
-
background: transparent;
|
|
298
|
-
outline-width: ${n("message.outlined.border.width")};
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
.p-message-simple {
|
|
302
|
-
background: transparent;
|
|
303
|
-
outline-color: transparent;
|
|
304
|
-
box-shadow: none;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
.p-message-simple .p-message-content {
|
|
308
|
-
padding: ${n("message.simple.content.padding")};
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
.p-message-outlined .p-message-close-button:hover,
|
|
312
|
-
.p-message-simple .p-message-close-button:hover {
|
|
313
|
-
background: transparent;
|
|
314
|
-
}`,Xr={root:({props:n})=>["p-message p-component p-message-"+n.severity,{"p-message-simple":n.variant==="simple"}],content:"p-message-content",icon:"p-message-icon",text:"p-message-text",closeButton:"p-message-close-button",closeIcon:"p-message-close-icon"},Ta=(()=>{class n extends Mi{name="message";theme=Yr;classes=Xr;static \u0275fac=(()=>{let t;return function(c){return(t||(t=gt(n)))(c||n)}})();static \u0275prov=xt({token:n,factory:n.\u0275fac})}return n})();var Fa=(()=>{class n extends ri{severity="info";text;escape=!0;style;styleClass;closable=!1;icon;closeIcon;life;showTransitionOptions="300ms ease-out";hideTransitionOptions="200ms cubic-bezier(0.86, 0, 0.07, 1)";size;variant;onClose=new st;get closeAriaLabel(){return this.config.translation.aria?this.config.translation.aria.close:void 0}get containerClass(){let t=this.variant==="outlined"?"p-message-outlined":this.variant==="simple"?"p-message-simple":"",l=this.size==="small"?"p-message-sm":this.size==="large"?"p-message-lg":"";return`p-message-${this.severity} ${t} ${l}`.trim()+(this.styleClass?" "+this.styleClass:"")}visible=Ve(!0);_componentStyle=K(Ta);containerTemplate;iconTemplate;closeIconTemplate;templates;_containerTemplate;_iconTemplate;_closeIconTemplate;ngOnInit(){super.ngOnInit(),this.life&&setTimeout(()=>{this.visible.set(!1)},this.life)}ngAfterContentInit(){this.templates?.forEach(t=>{switch(t.getType()){case"container":this._containerTemplate=t.template;break;case"icon":this._iconTemplate=t.template;break;case"closeicon":this._closeIconTemplate=t.template;break}})}close(t){this.visible.set(!1),this.onClose.emit({originalEvent:t})}static \u0275fac=(()=>{let t;return function(c){return(t||(t=gt(n)))(c||n)}})();static \u0275cmp=Oe({type:n,selectors:[["p-message"]],contentQueries:function(l,c,v){if(l&1&&(je(v,Fr,4),je(v,Or,4),je(v,Ir,4),je(v,Ri,4)),l&2){let V;de(V=pe())&&(c.containerTemplate=V.first),de(V=pe())&&(c.iconTemplate=V.first),de(V=pe())&&(c.closeIconTemplate=V.first),de(V=pe())&&(c.templates=V)}},inputs:{severity:"severity",text:"text",escape:[2,"escape","escape",ft],style:"style",styleClass:"styleClass",closable:[2,"closable","closable",ft],icon:"icon",closeIcon:"closeIcon",life:"life",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",size:"size",variant:"variant"},outputs:{onClose:"onClose"},features:[et([Ta]),kt],ngContentSelectors:Nr,decls:1,vars:1,consts:[["escapeOut",""],[1,"p-message","p-component",3,"ngClass"],[1,"p-message-content"],[1,"p-message-icon",3,"ngClass"],[4,"ngIf","ngIfElse"],[3,"ngClass"],["pRipple","","type","button",1,"p-message-close-button"],[4,"ngTemplateOutlet"],[3,"ngClass","innerHTML",4,"ngIf"],[3,"ngClass","innerHTML"],[3,"ngClass",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["pRipple","","type","button",1,"p-message-close-button",3,"click"],[1,"p-message-close-icon",3,"ngClass"],["styleClass","p-message-close-icon"]],template:function(l,c){l&1&&(Ao(),I(0,Qr,10,15,"div",1)),l&2&&Me(c.visible()?0:-1)},dependencies:[Ge,bt,ct,qt,zi,aa,St],encapsulation:2,data:{animation:[Pn("messageAnimation",[Vi(":enter",[_i({opacity:0,transform:"translateY(-25%)"}),Di("{{showTransitionParams}}")]),Vi(":leave",[Di("{{hideTransitionParams}}",_i({height:0,marginTop:0,marginBottom:0,marginLeft:0,marginRight:0,opacity:0}))])])]},changeDetection:0})}return n})();var es=["content"],ts=(n,h)=>({"p-progressbar p-component":!0,"p-progressbar-determinate":n,"p-progressbar-indeterminate":h}),is=n=>({$implicit:n});function ns(n,h){if(n&1&&(d(0,"div"),b(1),u()),n&2){let t=P(2);Wt("display",t.value!=null&&t.value!==0?"flex":"none"),fe("data-pc-section","label"),g(),yn("",t.value,"",t.unit,"")}}function os(n,h){n&1&&Xe(0)}function as(n,h){if(n&1&&(d(0,"div",3)(1,"div",4),I(2,ns,2,5,"div",5)(3,os,1,0,"ng-container",6),u()()),n&2){let t=P();lt(t.valueStyleClass),Wt("width",t.value+"%")("background",t.color),y("ngClass","p-progressbar-value p-progressbar-value-animate"),fe("data-pc-section","value"),g(2),y("ngIf",t.showValue&&!t.contentTemplate&&!t._contentTemplate),g(),y("ngTemplateOutlet",t.contentTemplate||t._contentTemplate)("ngTemplateOutletContext",Ne(11,is,t.value))}}function rs(n,h){if(n&1&&(d(0,"div",7),D(1,"div",8),u()),n&2){let t=P();lt(t.valueStyleClass),y("ngClass","p-progressbar-indeterminate-container"),fe("data-pc-section","container"),g(),Wt("background",t.color),fe("data-pc-section","value")}}var ss=({dt:n})=>`
|
|
315
|
-
.p-progressbar {
|
|
316
|
-
position: relative;
|
|
317
|
-
overflow: hidden;
|
|
318
|
-
height: ${n("progressbar.height")};
|
|
319
|
-
background: ${n("progressbar.background")};
|
|
320
|
-
border-radius: ${n("progressbar.border.radius")};
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
.p-progressbar-value {
|
|
324
|
-
margin: 0;
|
|
325
|
-
background: ${n("progressbar.value.background")};
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
.p-progressbar-label {
|
|
329
|
-
color: ${n("progressbar.label.color")};
|
|
330
|
-
font-size: ${n("progressbar.label.font.size")};
|
|
331
|
-
font-weight: ${n("progressbar.label.font.weight")};
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
.p-progressbar-determinate .p-progressbar-value {
|
|
335
|
-
height: 100%;
|
|
336
|
-
width: 0%;
|
|
337
|
-
position: absolute;
|
|
338
|
-
display: none;
|
|
339
|
-
display: flex;
|
|
340
|
-
align-items: center;
|
|
341
|
-
justify-content: center;
|
|
342
|
-
overflow: hidden;
|
|
343
|
-
transition: width 1s ease-in-out;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
.p-progressbar-determinate .p-progressbar-label {
|
|
347
|
-
display: inline-flex;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
.p-progressbar-indeterminate .p-progressbar-value::before {
|
|
351
|
-
content: "";
|
|
352
|
-
position: absolute;
|
|
353
|
-
background: inherit;
|
|
354
|
-
top: 0;
|
|
355
|
-
inset-inline-start: 0;
|
|
356
|
-
bottom: 0;
|
|
357
|
-
will-change: inset-inline-start, inset-inline-end;
|
|
358
|
-
animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
.p-progressbar-indeterminate .p-progressbar-value::after {
|
|
362
|
-
content: "";
|
|
363
|
-
position: absolute;
|
|
364
|
-
background: inherit;
|
|
365
|
-
top: 0;
|
|
366
|
-
inset-inline-start: 0;
|
|
367
|
-
bottom: 0;
|
|
368
|
-
will-change: inset-inline-start, inset-inline-end;
|
|
369
|
-
animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
|
|
370
|
-
animation-delay: 1.15s;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
@-webkit-keyframes p-progressbar-indeterminate-anim {
|
|
374
|
-
0% {
|
|
375
|
-
inset-inline-start: -35%;
|
|
376
|
-
inset-inline-end: 100%;
|
|
377
|
-
}
|
|
378
|
-
60% {
|
|
379
|
-
inset-inline-start: 100%;
|
|
380
|
-
inset-inline-end: -90%;
|
|
381
|
-
}
|
|
382
|
-
100% {
|
|
383
|
-
inset-inline-start: 100%;
|
|
384
|
-
inset-inline-end: -90%;
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
@keyframes p-progressbar-indeterminate-anim {
|
|
388
|
-
0% {
|
|
389
|
-
inset-inline-start: -35%;
|
|
390
|
-
inset-inline-end: 100%;
|
|
391
|
-
}
|
|
392
|
-
60% {
|
|
393
|
-
inset-inline-start: 100%;
|
|
394
|
-
inset-inline-end: -90%;
|
|
395
|
-
}
|
|
396
|
-
100% {
|
|
397
|
-
inset-inline-start: 100%;
|
|
398
|
-
inset-inline-end: -90%;
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
@-webkit-keyframes p-progressbar-indeterminate-anim-short {
|
|
402
|
-
0% {
|
|
403
|
-
inset-inline-start: -200%;
|
|
404
|
-
inset-inline-end: 100%;
|
|
405
|
-
}
|
|
406
|
-
60% {
|
|
407
|
-
inset-inline-start: 107%;
|
|
408
|
-
inset-inline-end: -8%;
|
|
409
|
-
}
|
|
410
|
-
100% {
|
|
411
|
-
inset-inline-start: 107%;
|
|
412
|
-
inset-inline-end: -8%;
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
@keyframes p-progressbar-indeterminate-anim-short {
|
|
416
|
-
0% {
|
|
417
|
-
inset-inline-start: -200%;
|
|
418
|
-
inset-inline-end: 100%;
|
|
419
|
-
}
|
|
420
|
-
60% {
|
|
421
|
-
inset-inline-start: 107%;
|
|
422
|
-
inset-inline-end: -8%;
|
|
423
|
-
}
|
|
424
|
-
100% {
|
|
425
|
-
inset-inline-start: 107%;
|
|
426
|
-
inset-inline-end: -8%;
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
`,ls={root:({instance:n})=>["p-progressbar p-component",{"p-progressbar-determinate":n.determinate,"p-progressbar-indeterminate":n.indeterminate}],value:"p-progressbar-value",label:"p-progressbar-label"},Oa=(()=>{class n extends Mi{name="progressbar";theme=ss;classes=ls;static \u0275fac=(()=>{let t;return function(c){return(t||(t=gt(n)))(c||n)}})();static \u0275prov=xt({token:n,factory:n.\u0275fac})}return n})();var Ia=(()=>{class n extends ri{value;showValue=!0;styleClass;valueStyleClass;style;unit="%";mode="determinate";color;contentTemplate;_componentStyle=K(Oa);templates;_contentTemplate;ngAfterContentInit(){this.templates?.forEach(t=>{switch(t.getType()){case"content":this._contentTemplate=t.template;break;default:this._contentTemplate=t.template}})}static \u0275fac=(()=>{let t;return function(c){return(t||(t=gt(n)))(c||n)}})();static \u0275cmp=Oe({type:n,selectors:[["p-progressBar"],["p-progressbar"],["p-progress-bar"]],contentQueries:function(l,c,v){if(l&1&&(je(v,es,4),je(v,Ri,4)),l&2){let V;de(V=pe())&&(c.contentTemplate=V.first),de(V=pe())&&(c.templates=V)}},inputs:{value:[2,"value","value",Ti],showValue:[2,"showValue","showValue",ft],styleClass:"styleClass",valueStyleClass:"valueStyleClass",style:"style",unit:"unit",mode:"mode",color:"color"},features:[et([Oa]),kt],decls:3,vars:15,consts:[["role","progressbar",3,"ngStyle","ngClass"],["style","display:flex",3,"ngClass","class","width","background",4,"ngIf"],[3,"ngClass","class",4,"ngIf"],[2,"display","flex",3,"ngClass"],[1,"p-progressbar-label"],[3,"display",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngClass"],[1,"p-progressbar-value","p-progressbar-value-animate"]],template:function(l,c){l&1&&(d(0,"div",0),I(1,as,4,13,"div",1)(2,rs,2,7,"div",2),u()),l&2&&(lt(c.styleClass),y("ngStyle",c.style)("ngClass",ki(12,ts,c.mode==="determinate",c.mode==="indeterminate")),fe("aria-valuemin",0)("aria-valuenow",c.value)("aria-valuemax",100)("data-pc-name","progressbar")("data-pc-section","root")("aria-label",c.value+c.unit),g(),y("ngIf",c.mode==="determinate"),g(),y("ngIf",c.mode==="indeterminate"))},dependencies:[Ge,bt,ct,qt,Oi,St],encapsulation:2,changeDetection:0})}return n})();var cs=["file"],us=["header"],Na=["content"],ms=["toolbar"],ds=["chooseicon"],ps=["filelabel"],hs=["uploadicon"],gs=["cancelicon"],fs=["empty"],vs=["advancedfileinput"],ys=["basicfileinput"],_s=(n,h,t,l,c)=>({$implicit:n,uploadedFiles:h,chooseCallback:t,clearCallback:l,uploadCallback:c}),bs=(n,h,t,l,c,v,V,L)=>({$implicit:n,uploadedFiles:h,chooseCallback:t,clearCallback:l,removeUploadedFileCallback:c,removeFileCallback:v,progress:V,messages:L}),Ss=n=>({$implicit:n});function ws(n,h){if(n&1&&D(0,"span"),n&2){let t=P(3);lt(t.chooseIcon),fe("aria-label",!0)("data-pc-section","chooseicon")}}function xs(n,h){n&1&&D(0,"PlusIcon"),n&2&&fe("aria-label",!0)("data-pc-section","chooseicon")}function Cs(n,h){}function Es(n,h){n&1&&I(0,Cs,0,0,"ng-template")}function Ps(n,h){if(n&1&&(d(0,"span"),I(1,Es,1,0,null,11),u()),n&2){let t=P(4);fe("aria-label",!0)("data-pc-section","chooseicon"),g(),y("ngTemplateOutlet",t.chooseIconTemplate||t._chooseIconTemplate)}}function ks(n,h){if(n&1&&(Qe(0),I(1,xs,1,2,"PlusIcon",9)(2,Ps,2,3,"span",9),Ye()),n&2){let t=P(3);g(),y("ngIf",!t.chooseIconTemplate&&!t._chooseIconTemplate),g(),y("ngIf",t.chooseIconTemplate||t._chooseIconTemplate)}}function Ts(n,h){if(n&1&&D(0,"span",21),n&2){let t=P(4);y("ngClass",t.uploadIcon),fe("aria-hidden",!0)}}function Fs(n,h){n&1&&D(0,"UploadIcon")}function Os(n,h){}function Is(n,h){n&1&&I(0,Os,0,0,"ng-template")}function Ns(n,h){if(n&1&&(d(0,"span"),I(1,Is,1,0,null,11),u()),n&2){let t=P(5);fe("aria-hidden",!0),g(),y("ngTemplateOutlet",t.uploadIconTemplate||t._uploadIconTemplate)}}function Ds(n,h){if(n&1&&(Qe(0),I(1,Fs,1,0,"UploadIcon",9)(2,Ns,2,2,"span",9),Ye()),n&2){let t=P(4);g(),y("ngIf",!t.uploadIconTemplate&&!t._uploadIconTemplate),g(),y("ngIf",t.uploadIconTemplate||t._uploadIconTemplate)}}function Vs(n,h){if(n&1){let t=q();d(0,"p-button",19),J("onClick",function(){R(t);let c=P(3);return M(c.upload())}),I(1,Ts,1,2,"span",20)(2,Ds,3,2,"ng-container",9),u()}if(n&2){let t=P(3);y("label",t.uploadButtonLabel)("disabled",!t.hasFiles()||t.isFileLimitExceeded())("styleClass","p-fileupload-upload-button "+t.uploadStyleClass)("buttonProps",t.uploadButtonProps),g(),y("ngIf",t.uploadIcon),g(),y("ngIf",!t.uploadIcon)}}function As(n,h){if(n&1&&D(0,"span",21),n&2){let t=P(4);y("ngClass",t.cancelIcon)}}function Ls(n,h){n&1&&D(0,"TimesIcon"),n&2&&fe("aria-hidden",!0)}function Rs(n,h){}function Ms(n,h){n&1&&I(0,Rs,0,0,"ng-template")}function Bs(n,h){if(n&1&&(d(0,"span"),I(1,Ms,1,0,null,11),u()),n&2){let t=P(5);fe("aria-hidden",!0),g(),y("ngTemplateOutlet",t.cancelIconTemplate||t._cancelIconTemplate)}}function zs(n,h){if(n&1&&(Qe(0),I(1,Ls,1,1,"TimesIcon",9)(2,Bs,2,2,"span",9),Ye()),n&2){let t=P(4);g(),y("ngIf",!t.cancelIconTemplate&&!t._cancelIconTemplate),g(),y("ngIf",t.cancelIconTemplate||t._cancelIconTemplate)}}function Us(n,h){if(n&1){let t=q();d(0,"p-button",19),J("onClick",function(){R(t);let c=P(3);return M(c.clear())}),I(1,As,1,1,"span",20)(2,zs,3,2,"ng-container",9),u()}if(n&2){let t=P(3);y("label",t.cancelButtonLabel)("disabled",!t.hasFiles()||t.uploading)("styleClass","p-fileupload-cancel-button "+t.cancelStyleClass)("buttonProps",t.cancelButtonProps),g(),y("ngIf",t.cancelIcon),g(),y("ngIf",!t.cancelIcon)}}function js(n,h){if(n&1){let t=q();Qe(0),d(1,"p-button",16),J("focus",function(){R(t);let c=P(2);return M(c.onFocus())})("blur",function(){R(t);let c=P(2);return M(c.onBlur())})("onClick",function(){R(t);let c=P(2);return M(c.choose())})("keydown.enter",function(){R(t);let c=P(2);return M(c.choose())}),d(2,"input",7,0),J("change",function(c){R(t);let v=P(2);return M(v.onFileSelect(c))}),u(),I(4,ws,1,4,"span",17)(5,ks,3,2,"ng-container",9),u(),I(6,Vs,3,6,"p-button",18)(7,Us,3,6,"p-button",18),Ye()}if(n&2){let t=P(2);g(),y("styleClass","p-fileupload-choose-button "+t.chooseStyleClass)("disabled",t.disabled||t.isChooseDisabled())("label",t.chooseButtonLabel)("buttonProps",t.chooseButtonProps),fe("data-pc-section","choosebutton"),g(),y("multiple",t.multiple)("accept",t.accept)("disabled",t.disabled||t.isChooseDisabled()),fe("aria-label",t.browseFilesLabel)("title","")("data-pc-section","input"),g(2),y("ngIf",t.chooseIcon),g(),y("ngIf",!t.chooseIcon),g(),y("ngIf",!t.auto&&t.showUploadButton),g(),y("ngIf",!t.auto&&t.showCancelButton)}}function Js(n,h){n&1&&Xe(0)}function $s(n,h){n&1&&Xe(0)}function Gs(n,h){if(n&1&&D(0,"p-progressbar",22),n&2){let t=P(2);y("value",t.progress)("showValue",!1)}}function Ks(n,h){if(n&1&&D(0,"p-message",14),n&2){let t=h.$implicit;y("severity",t.severity)("text",t.text)}}function Ws(n,h){if(n&1){let t=q();d(0,"img",33),J("error",function(c){R(t);let v=P(5);return M(v.imageError(c))}),u()}if(n&2){let t=P().$implicit,l=P(4);y("src",t.objectURL,fn)("width",l.previewWidth)}}function Hs(n,h){n&1&&D(0,"TimesIcon")}function qs(n,h){}function Zs(n,h){n&1&&I(0,qs,0,0,"ng-template")}function Qs(n,h){if(n&1&&I(0,Hs,1,0,"TimesIcon",9)(1,Zs,1,0,null,11),n&2){let t=P(5);y("ngIf",!t.cancelIconTemplate&&!t._cancelIconTemplate),g(),y("ngTemplateOutlet",t.cancelIconTemplate||t._cancelIconTemplate)}}function Ys(n,h){if(n&1){let t=q();d(0,"div",24),I(1,Ws,1,2,"img",27),d(2,"div",28)(3,"div",29),b(4),u(),d(5,"span",30),b(6),u()(),d(7,"div",31)(8,"p-button",32),J("onClick",function(c){let v=R(t).index,V=P(4);return M(V.remove(c,v))}),I(9,Qs,2,2,"ng-template",null,2,W),u()()()}if(n&2){let t=h.$implicit,l=P(4);g(),y("ngIf",l.isImage(t)),g(3),ae(t.name),g(2),ae(l.formatSize(t.size)),g(2),y("disabled",l.uploading)("styleClass","p-fileupload-file-remove-button "+l.removeStyleClass)}}function Xs(n,h){if(n&1&&I(0,Ys,11,5,"div",26),n&2){let t=P(3);y("ngForOf",t.files)}}function el(n,h){}function tl(n,h){if(n&1&&I(0,el,0,0,"ng-template",25),n&2){let t=P(3);y("ngForOf",t.files)("ngForTemplate",t.fileTemplate||t._fileTemplate)}}function il(n,h){if(n&1&&(d(0,"div",23),I(1,Xs,1,1,"div",24)(2,tl,1,2,null,25),u()),n&2){let t=P(2);g(),Me(!t.fileTemplate&&!t._fileTemplate?1:-1),g(),Me(t.fileTemplate||t._fileTemplate?2:-1)}}function nl(n,h){n&1&&Xe(0)}function ol(n,h){n&1&&Xe(0)}function al(n,h){if(n&1&&I(0,ol,1,0,"ng-container",11),n&2){let t=P(2);y("ngTemplateOutlet",t.emptyTemplate||t._emptyTemplate)}}function rl(n,h){if(n&1){let t=q();d(0,"div",6)(1,"input",7,0),J("change",function(c){R(t);let v=P();return M(v.onFileSelect(c))}),u(),d(3,"div",8),I(4,js,8,15,"ng-container",9)(5,Js,1,0,"ng-container",10)(6,$s,1,0,"ng-container",11),u(),d(7,"div",12,1),J("dragenter",function(c){R(t);let v=P();return M(v.onDragEnter(c))})("dragleave",function(c){R(t);let v=P();return M(v.onDragLeave(c))})("drop",function(c){R(t);let v=P();return M(v.onDrop(c))}),I(9,Gs,1,2,"p-progressbar",13),Ct(10,Ks,1,2,"p-message",14,Jn),I(12,il,3,2,"div",15)(13,nl,1,0,"ng-container",10)(14,al,1,1,"ng-container"),u()()}if(n&2){let t=P();lt(t.styleClass),y("ngClass","p-fileupload p-fileupload-advanced p-component")("ngStyle",t.style),fe("data-pc-name","fileupload")("data-pc-section","root"),g(),Wt("display","none"),y("multiple",t.multiple)("accept",t.accept)("disabled",t.disabled||t.isChooseDisabled()),fe("aria-label",t.browseFilesLabel)("title","")("data-pc-section","input"),g(3),y("ngIf",!t.headerTemplate&&!t._headerTemplate),g(),y("ngTemplateOutlet",t.headerTemplate||t._headerTemplate)("ngTemplateOutletContext",Bo(24,_s,t.files,t.uploadedFiles,t.choose.bind(t),t.clear.bind(t),t.upload.bind(t))),g(),y("ngTemplateOutlet",t.toolbarTemplate||t._toolbarTemplate),g(),fe("data-pc-section","content"),g(2),y("ngIf",t.hasFiles()),g(),Et(t.msgs),g(2),y("ngIf",t.hasFiles()),g(),y("ngTemplateOutlet",t.contentTemplate||t._contentTemplate)("ngTemplateOutletContext",zo(30,bs,t.files,t.uploadedFiles,t.choose.bind(t),t.clear.bind(t),t.removeUploadedFile.bind(t),t.remove.bind(t),t.progress,t.msgs)),g(),Me((t.emptyTemplate||t._emptyTemplate)&&!t.hasFiles()&&!t.hasUploadedFiles()?14:-1)}}function sl(n,h){if(n&1&&D(0,"p-message",14),n&2){let t=h.$implicit;y("severity",t.severity)("text",t.text)}}function ll(n,h){if(n&1&&D(0,"span",37),n&2){let t=P(4);y("ngClass",t.uploadIcon)}}function cl(n,h){n&1&&D(0,"UploadIcon",40),n&2&&y("styleClass","p-button-icon p-button-icon-left")}function ul(n,h){}function ml(n,h){n&1&&I(0,ul,0,0,"ng-template")}function dl(n,h){if(n&1&&(d(0,"span",41),I(1,ml,1,0,null,11),u()),n&2){let t=P(5);g(),y("ngTemplateOutlet",t._uploadIconTemplate||t.uploadIconTemplate)}}function pl(n,h){if(n&1&&(Qe(0),I(1,cl,1,1,"UploadIcon",38)(2,dl,2,1,"span",39),Ye()),n&2){let t=P(4);g(),y("ngIf",!t.uploadIconTemplate&&!t._uploadIconTemplate),g(),y("ngIf",t._uploadIconTemplate||t.uploadIconTemplate)}}function hl(n,h){if(n&1&&I(0,ll,1,1,"span",36)(1,pl,3,2,"ng-container",9),n&2){let t=P(3);y("ngIf",t.uploadIcon),g(),y("ngIf",!t.uploadIcon)}}function gl(n,h){if(n&1&&D(0,"span",43),n&2){let t=P(4);y("ngClass",t.chooseIcon)}}function fl(n,h){n&1&&D(0,"PlusIcon"),n&2&&fe("data-pc-section","uploadicon")}function vl(n,h){}function yl(n,h){n&1&&I(0,vl,0,0,"ng-template")}function _l(n,h){if(n&1&&(Qe(0),I(1,fl,1,1,"PlusIcon",9)(2,yl,1,0,null,11),Ye()),n&2){let t=P(4);g(),y("ngIf",!t.chooseIconTemplate&&!t._chooseIconTemplate),g(),y("ngTemplateOutlet",t.chooseIconTemplate||t._chooseIconTemplate)}}function bl(n,h){if(n&1&&I(0,gl,1,1,"span",42)(1,_l,3,2,"ng-container",9),n&2){let t=P(3);y("ngIf",t.chooseIcon),g(),y("ngIf",!t.chooseIcon)}}function Sl(n,h){if(n&1&&I(0,hl,2,2)(1,bl,2,2),n&2){let t=P(2);Me(t.hasFiles()&&!t.auto?0:1)}}function wl(n,h){if(n&1&&(d(0,"span"),b(1),u()),n&2){let t=P(3);lt(t.cx("filelabel")),g(),he(" ",t.basicFileChosenLabel()," ")}}function xl(n,h){n&1&&Xe(0)}function Cl(n,h){if(n&1&&I(0,xl,1,0,"ng-container",10),n&2){let t=P(3);y("ngTemplateOutlet",t.fileLabelTemplate||t._fileLabelTemplate)("ngTemplateOutletContext",Ne(2,Ss,t.files))}}function El(n,h){if(n&1&&I(0,wl,2,3,"span",44)(1,Cl,1,4,"ng-container"),n&2){let t=P(2);Me(!t.fileLabelTemplate&&!t._fileLabelTemplate?0:1)}}function Pl(n,h){if(n&1){let t=q();d(0,"div",21),Ct(1,sl,1,2,"p-message",14,Jn),d(3,"p-button",34),J("onClick",function(){R(t);let c=P();return M(c.onBasicUploaderClick())})("keydown",function(c){R(t);let v=P();return M(v.onBasicKeydown(c))}),I(4,Sl,2,1,"ng-template",null,2,W),d(6,"input",35,3),J("change",function(c){R(t);let v=P();return M(v.onFileSelect(c))})("focus",function(){R(t);let c=P();return M(c.onFocus())})("blur",function(){R(t);let c=P();return M(c.onBlur())}),u()(),I(8,El,2,1),u()}if(n&2){let t=P();lt(t.styleClass),y("ngClass","p-fileupload p-fileupload-basic p-component"),fe("data-pc-name","fileupload"),g(),Et(t.msgs),g(2),$e(t.style),y("styleClass","p-fileupload-choose-button "+t.chooseStyleClass)("disabled",t.disabled)("label",t.chooseButtonLabel)("buttonProps",t.chooseButtonProps),g(3),y("accept",t.accept)("multiple",t.multiple)("disabled",t.disabled),fe("aria-label",t.browseFilesLabel)("data-pc-section","input"),g(2),Me(t.auto?-1:8)}}var kl=({dt:n})=>`
|
|
430
|
-
.p-fileupload input[type="file"] {
|
|
431
|
-
display: none;
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
.p-fileupload-advanced {
|
|
435
|
-
border: 1px solid ${n("fileupload.border.color")};
|
|
436
|
-
border-radius: ${n("fileupload.border.radius")};
|
|
437
|
-
background: ${n("fileupload.background")};
|
|
438
|
-
color: ${n("fileupload.color")};
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
.p-fileupload-header {
|
|
442
|
-
display: flex;
|
|
443
|
-
align-items: center;
|
|
444
|
-
padding: ${n("fileupload.header.padding")};
|
|
445
|
-
background: ${n("fileupload.header.background")};
|
|
446
|
-
color: ${n("fileupload.header.color")};
|
|
447
|
-
border-style: solid;
|
|
448
|
-
border-width: ${n("fileupload.header.border.width")};
|
|
449
|
-
border-color: ${n("fileupload.header.border.color")};
|
|
450
|
-
border-radius: ${n("fileupload.header.border.radius")};
|
|
451
|
-
gap: ${n("fileupload.header.gap")};
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
.p-fileupload-content {
|
|
455
|
-
border: 1px solid transparent;
|
|
456
|
-
display: flex;
|
|
457
|
-
flex-direction: column;
|
|
458
|
-
gap: ${n("fileupload.content.gap")};
|
|
459
|
-
transition: border-color ${n("fileupload.transition.duration")};
|
|
460
|
-
padding: ${n("fileupload.content.padding")};
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
.p-fileupload-content .p-progressbar {
|
|
464
|
-
width: 100%;
|
|
465
|
-
height: ${n("fileupload.progressbar.height")};
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
.p-fileupload-file-list {
|
|
469
|
-
display: flex;
|
|
470
|
-
flex-direction: column;
|
|
471
|
-
gap: ${n("fileupload.filelist.gap")};
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
.p-fileupload-file {
|
|
475
|
-
display: flex;
|
|
476
|
-
flex-wrap: wrap;
|
|
477
|
-
align-items: center;
|
|
478
|
-
padding: ${n("fileupload.file.padding")};
|
|
479
|
-
border-bottom: 1px solid ${n("fileupload.file.border.color")};
|
|
480
|
-
gap: ${n("fileupload.file.gap")};
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
.p-fileupload-file:last-child {
|
|
484
|
-
border-bottom: 0;
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
.p-fileupload-file-info {
|
|
488
|
-
display: flex;
|
|
489
|
-
flex-direction: column;
|
|
490
|
-
gap: ${n("fileupload.file.info.gap")};
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
.p-fileupload-file-thumbnail {
|
|
494
|
-
flex-shrink: 0;
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
.p-fileupload-file-actions {
|
|
498
|
-
margin-left: auto;
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
.p-fileupload-highlight {
|
|
502
|
-
border: 1px dashed ${n("fileupload.content.highlight.border.color")};
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
.p-fileupload-advanced .p-message {
|
|
506
|
-
margin-top: 0;
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
.p-fileupload-basic {
|
|
510
|
-
display: flex;
|
|
511
|
-
flex-wrap: wrap;
|
|
512
|
-
align-items: center;
|
|
513
|
-
justify-content: center;
|
|
514
|
-
gap: ${n("fileupload.basic.gap")};
|
|
515
|
-
}
|
|
516
|
-
`,Tl={root:({instance:n})=>`p-fileupload p-fileupload-${n.mode} p-component`,header:"p-fileupload-header",pcChooseButton:"p-fileupload-choose-button",pcUploadButton:"p-fileupload-upload-button",pcCancelButton:"p-fileupload-cancel-button",content:"p-fileupload-content",fileList:"p-fileupload-file-list",file:"p-fileupload-file",fileThumbnail:"p-fileupload-file-thumbnail",fileInfo:"p-fileupload-file-info",fileName:"p-fileupload-file-name",fileSize:"p-fileupload-file-size",pcFileBadge:"p-fileupload-file-badge",fileActions:"p-fileupload-file-actions",pcFileRemoveButton:"p-fileupload-file-remove-button"},Da=(()=>{class n extends Mi{name="fileupload";theme=kl;classes=Tl;static \u0275fac=(()=>{let t;return function(c){return(t||(t=gt(n)))(c||n)}})();static \u0275prov=xt({token:n,factory:n.\u0275fac})}return n})();var bi=(()=>{class n extends ri{name;url;method="post";multiple;accept;disabled;auto;withCredentials;maxFileSize;invalidFileSizeMessageSummary="{0}: Invalid file size, ";invalidFileSizeMessageDetail="maximum upload size is {0}.";invalidFileTypeMessageSummary="{0}: Invalid file type, ";invalidFileTypeMessageDetail="allowed file types: {0}.";invalidFileLimitMessageDetail="limit is {0} at most.";invalidFileLimitMessageSummary="Maximum number of files exceeded, ";style;styleClass;previewWidth=50;chooseLabel;uploadLabel;cancelLabel;chooseIcon;uploadIcon;cancelIcon;showUploadButton=!0;showCancelButton=!0;mode="advanced";headers;customUpload;fileLimit;uploadStyleClass;cancelStyleClass;removeStyleClass;chooseStyleClass;chooseButtonProps;uploadButtonProps={severity:"secondary"};cancelButtonProps={severity:"secondary"};onBeforeUpload=new st;onSend=new st;onUpload=new st;onError=new st;onClear=new st;onRemove=new st;onSelect=new st;onProgress=new st;uploadHandler=new st;onImageError=new st;onRemoveUploadedFile=new st;fileTemplate;headerTemplate;contentTemplate;toolbarTemplate;chooseIconTemplate;fileLabelTemplate;uploadIconTemplate;cancelIconTemplate;emptyTemplate;advancedFileInput;basicFileInput;content;set files(t){this._files=[];for(let l=0;l<t.length;l++){let c=t[l];this.validate(c)&&(this.isImage(c)&&(c.objectURL=this.sanitizer.bypassSecurityTrustUrl(window.URL.createObjectURL(t[l]))),this._files.push(t[l]))}}get files(){return this._files}get basicButtonLabel(){return this.auto||!this.hasFiles()?this.chooseLabel:this.uploadLabel??this.files[0].name}_files=[];progress=0;dragHighlight;msgs;uploadedFileCount=0;focus;uploading;duplicateIEEvent;translationSubscription;dragOverListener;uploadedFiles=[];sanitizer=K(Wo);zone=K(gn);http=K(Ko);_componentStyle=K(Da);ngOnInit(){super.ngOnInit(),this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.cd.markForCheck()})}ngAfterViewInit(){super.ngAfterViewInit(),Zt(this.platformId)&&this.mode==="advanced"&&this.zone.runOutsideAngular(()=>{this.content&&(this.dragOverListener=this.renderer.listen(this.content.nativeElement,"dragover",this.onDragOver.bind(this)))})}_headerTemplate;_contentTemplate;_toolbarTemplate;_chooseIconTemplate;_uploadIconTemplate;_cancelIconTemplate;_emptyTemplate;_fileTemplate;_fileLabelTemplate;templates;ngAfterContentInit(){this.templates?.forEach(t=>{switch(t.getType()){case"header":this._headerTemplate=t.template;break;case"file":this._fileTemplate=t.template;break;case"content":this._contentTemplate=t.template;break;case"toolbar":this._toolbarTemplate=t.template;break;case"chooseicon":this._chooseIconTemplate=t.template;break;case"uploadicon":this._uploadIconTemplate=t.template;break;case"cancelicon":this._cancelIconTemplate=t.template;break;case"empty":this._emptyTemplate=t.template;break;case"filelabel":this._fileLabelTemplate=t.template;break;default:this._fileTemplate=t.template;break}})}basicFileChosenLabel(){return this.auto?this.chooseButtonLabel:this.hasFiles()?this.files&&this.files.length===1?this.files[0].name:this.config.getTranslation("fileChosenMessage")?.replace("{0}",this.files.length):this.config.getTranslation("noFileChosenMessage")||""}getTranslation(t){return this.config.getTranslation(t)}choose(){this.advancedFileInput?.nativeElement.click()}onFileSelect(t){if(t.type!=="drop"&&this.isIE11()&&this.duplicateIEEvent){this.duplicateIEEvent=!1;return}this.msgs=[],this.multiple||(this.files=[]);let l=t.dataTransfer?t.dataTransfer.files:t.target.files;for(let c=0;c<l.length;c++){let v=l[c];this.isFileSelected(v)||this.validate(v)&&(this.isImage(v)&&(v.objectURL=this.sanitizer.bypassSecurityTrustUrl(window.URL.createObjectURL(l[c]))),this.files.push(l[c]))}this.onSelect.emit({originalEvent:t,files:l,currentFiles:this.files}),this.checkFileLimit(l),this.hasFiles()&&this.auto&&(this.mode!=="advanced"||!this.isFileLimitExceeded())&&this.upload(),t.type!=="drop"&&this.isIE11()?this.clearIEInput():this.clearInputElement()}isFileSelected(t){for(let l of this.files)if(l.name+l.type+l.size===t.name+t.type+t.size)return!0;return!1}isIE11(){if(Zt(this.platformId))return!!this.document.defaultView.MSInputMethodContext&&!!this.document.documentMode}validate(t){if(this.msgs=this.msgs||[],this.accept&&!this.isFileTypeValid(t)){let l=`${this.invalidFileTypeMessageSummary.replace("{0}",t.name)} ${this.invalidFileTypeMessageDetail.replace("{0}",this.accept)}`;return this.msgs.push({severity:"error",text:l}),!1}if(this.maxFileSize&&t.size>this.maxFileSize){let l=`${this.invalidFileSizeMessageSummary.replace("{0}",t.name)} ${this.invalidFileSizeMessageDetail.replace("{0}",this.formatSize(this.maxFileSize))}`;return this.msgs.push({severity:"error",text:l}),!1}return!0}isFileTypeValid(t){let l=this.accept?.split(",").map(c=>c.trim());for(let c of l)if(this.isWildcard(c)?this.getTypeClass(t.type)===this.getTypeClass(c):t.type==c||this.getFileExtension(t).toLowerCase()===c.toLowerCase())return!0;return!1}getTypeClass(t){return t.substring(0,t.indexOf("/"))}isWildcard(t){return t.indexOf("*")!==-1}getFileExtension(t){return"."+t.name.split(".").pop()}isImage(t){return/^image\//.test(t.type)}onImageLoad(t){window.URL.revokeObjectURL(t.src)}uploader(){if(this.customUpload)this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.uploadHandler.emit({files:this.files}),this.cd.markForCheck();else{this.uploading=!0,this.msgs=[];let t=new FormData;this.onBeforeUpload.emit({formData:t});for(let l=0;l<this.files.length;l++)t.append(this.name,this.files[l],this.files[l].name);this.http.request(this.method,this.url,{body:t,headers:this.headers,reportProgress:!0,observe:"events",withCredentials:this.withCredentials}).subscribe(l=>{switch(l.type){case Sn.Sent:this.onSend.emit({originalEvent:l,formData:t});break;case Sn.Response:this.uploading=!1,this.progress=0,l.status>=200&&l.status<300?(this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.onUpload.emit({originalEvent:l,files:this.files})):this.onError.emit({files:this.files}),this.uploadedFiles.push(...this.files),this.clear();break;case Sn.UploadProgress:{l.loaded&&(this.progress=Math.round(l.loaded*100/l.total)),this.onProgress.emit({originalEvent:l,progress:this.progress});break}}this.cd.markForCheck()},l=>{this.uploading=!1,this.onError.emit({files:this.files,error:l})})}}clear(){this.files=[],this.uploadedFileCount=0,this.onClear.emit(),this.clearInputElement(),this.msgs=[],this.cd.markForCheck()}remove(t,l){this.clearInputElement(),this.onRemove.emit({originalEvent:t,file:this.files[l]}),this.files.splice(l,1),this.checkFileLimit(this.files)}removeUploadedFile(t){let l=this.uploadedFiles.splice(t,1)[0];this.uploadedFiles=[...this.uploadedFiles],this.onRemoveUploadedFile.emit({file:l,files:this.uploadedFiles})}isFileLimitExceeded(){let l=this.auto?this.files.length:this.files.length+this.uploadedFileCount;return this.fileLimit&&this.fileLimit<=l&&this.focus&&(this.focus=!1),this.fileLimit&&this.fileLimit<l}isChooseDisabled(){return this.auto?this.fileLimit&&this.fileLimit<=this.files.length:this.fileLimit&&this.fileLimit<=this.files.length+this.uploadedFileCount}checkFileLimit(t){this.msgs??=[];let l=this.msgs.length>0&&this.fileLimit&&this.fileLimit<t.length;if(this.isFileLimitExceeded()||l){let c=`${this.invalidFileLimitMessageSummary.replace("{0}",this.fileLimit.toString())} ${this.invalidFileLimitMessageDetail.replace("{0}",this.fileLimit.toString())}`;this.msgs.push({severity:"error",text:c})}else this.msgs=this.msgs.filter(c=>!c.text.includes(this.invalidFileLimitMessageSummary))}clearInputElement(){this.advancedFileInput&&this.advancedFileInput.nativeElement&&(this.advancedFileInput.nativeElement.value=""),this.basicFileInput&&this.basicFileInput.nativeElement&&(this.basicFileInput.nativeElement.value="")}clearIEInput(){this.advancedFileInput&&this.advancedFileInput.nativeElement&&(this.duplicateIEEvent=!0,this.advancedFileInput.nativeElement.value="")}hasFiles(){return this.files&&this.files.length>0}hasUploadedFiles(){return this.uploadedFiles&&this.uploadedFiles.length>0}onDragEnter(t){this.disabled||(t.stopPropagation(),t.preventDefault())}onDragOver(t){this.disabled||(oi(this.content?.nativeElement,"p-fileupload-highlight"),this.dragHighlight=!0,t.stopPropagation(),t.preventDefault())}onDragLeave(t){this.disabled||ai(this.content?.nativeElement,"p-fileupload-highlight")}onDrop(t){if(!this.disabled){ai(this.content?.nativeElement,"p-fileupload-highlight"),t.stopPropagation(),t.preventDefault();let l=t.dataTransfer?t.dataTransfer.files:t.target.files;(this.multiple||l&&l.length===1)&&this.onFileSelect(t)}}onFocus(){this.focus=!0}onBlur(){this.focus=!1}formatSize(t){let v=this.getTranslation(Nt.FILE_SIZE_TYPES);if(t===0)return`0 ${v[0]}`;let V=Math.floor(Math.log(t)/Math.log(1024));return`${(t/Math.pow(1024,V)).toFixed(3)} ${v[V]}`}upload(){this.hasFiles()&&this.uploader()}onBasicUploaderClick(){this.basicFileInput?.nativeElement.click()}onBasicKeydown(t){switch(t.code){case"Space":case"Enter":this.onBasicUploaderClick(),t.preventDefault();break}}imageError(t){this.onImageError.emit(t)}getBlockableElement(){return this.el.nativeElement.children[0]}get chooseButtonLabel(){return this.chooseLabel||this.config.getTranslation(Nt.CHOOSE)}get uploadButtonLabel(){return this.uploadLabel||this.config.getTranslation(Nt.UPLOAD)}get cancelButtonLabel(){return this.cancelLabel||this.config.getTranslation(Nt.CANCEL)}get browseFilesLabel(){return this.config.getTranslation(Nt.ARIA)[Nt.BROWSE_FILES]}get pendingLabel(){return this.config.getTranslation(Nt.PENDING)}ngOnDestroy(){this.content&&this.content.nativeElement&&this.dragOverListener&&(this.dragOverListener(),this.dragOverListener=null),this.translationSubscription&&this.translationSubscription.unsubscribe(),super.ngOnDestroy()}static \u0275fac=(()=>{let t;return function(c){return(t||(t=gt(n)))(c||n)}})();static \u0275cmp=Oe({type:n,selectors:[["p-fileupload"],["p-fileUpload"]],contentQueries:function(l,c,v){if(l&1&&(je(v,cs,4),je(v,us,4),je(v,Na,4),je(v,ms,4),je(v,ds,4),je(v,ps,4),je(v,hs,4),je(v,gs,4),je(v,fs,4),je(v,Ri,4)),l&2){let V;de(V=pe())&&(c.fileTemplate=V.first),de(V=pe())&&(c.headerTemplate=V.first),de(V=pe())&&(c.contentTemplate=V.first),de(V=pe())&&(c.toolbarTemplate=V.first),de(V=pe())&&(c.chooseIconTemplate=V.first),de(V=pe())&&(c.fileLabelTemplate=V.first),de(V=pe())&&(c.uploadIconTemplate=V.first),de(V=pe())&&(c.cancelIconTemplate=V.first),de(V=pe())&&(c.emptyTemplate=V.first),de(V=pe())&&(c.templates=V)}},viewQuery:function(l,c){if(l&1&&(nt(vs,5),nt(ys,5),nt(Na,5)),l&2){let v;de(v=pe())&&(c.advancedFileInput=v.first),de(v=pe())&&(c.basicFileInput=v.first),de(v=pe())&&(c.content=v.first)}},inputs:{name:"name",url:"url",method:"method",multiple:[2,"multiple","multiple",ft],accept:"accept",disabled:[2,"disabled","disabled",ft],auto:[2,"auto","auto",ft],withCredentials:[2,"withCredentials","withCredentials",ft],maxFileSize:[2,"maxFileSize","maxFileSize",Ti],invalidFileSizeMessageSummary:"invalidFileSizeMessageSummary",invalidFileSizeMessageDetail:"invalidFileSizeMessageDetail",invalidFileTypeMessageSummary:"invalidFileTypeMessageSummary",invalidFileTypeMessageDetail:"invalidFileTypeMessageDetail",invalidFileLimitMessageDetail:"invalidFileLimitMessageDetail",invalidFileLimitMessageSummary:"invalidFileLimitMessageSummary",style:"style",styleClass:"styleClass",previewWidth:[2,"previewWidth","previewWidth",Ti],chooseLabel:"chooseLabel",uploadLabel:"uploadLabel",cancelLabel:"cancelLabel",chooseIcon:"chooseIcon",uploadIcon:"uploadIcon",cancelIcon:"cancelIcon",showUploadButton:[2,"showUploadButton","showUploadButton",ft],showCancelButton:[2,"showCancelButton","showCancelButton",ft],mode:"mode",headers:"headers",customUpload:[2,"customUpload","customUpload",ft],fileLimit:[2,"fileLimit","fileLimit",t=>Ti(t,null)],uploadStyleClass:"uploadStyleClass",cancelStyleClass:"cancelStyleClass",removeStyleClass:"removeStyleClass",chooseStyleClass:"chooseStyleClass",chooseButtonProps:"chooseButtonProps",uploadButtonProps:"uploadButtonProps",cancelButtonProps:"cancelButtonProps",files:"files"},outputs:{onBeforeUpload:"onBeforeUpload",onSend:"onSend",onUpload:"onUpload",onError:"onError",onClear:"onClear",onRemove:"onRemove",onSelect:"onSelect",onProgress:"onProgress",uploadHandler:"uploadHandler",onImageError:"onImageError",onRemoveUploadedFile:"onRemoveUploadedFile"},features:[et([Da]),kt],decls:2,vars:2,consts:[["advancedfileinput",""],["content",""],["icon",""],["basicfileinput",""],[3,"ngClass","ngStyle","class",4,"ngIf"],[3,"ngClass","class",4,"ngIf"],[3,"ngClass","ngStyle"],["type","file",3,"change","multiple","accept","disabled"],[1,"p-fileupload-header"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngTemplateOutlet"],[1,"p-fileupload-content",3,"dragenter","dragleave","drop"],[3,"value","showValue",4,"ngIf"],[3,"severity","text"],["class","p-fileupload-file-list",4,"ngIf"],[3,"focus","blur","onClick","keydown.enter","styleClass","disabled","label","buttonProps"],[3,"class",4,"ngIf"],[3,"label","disabled","styleClass","buttonProps","onClick",4,"ngIf"],[3,"onClick","label","disabled","styleClass","buttonProps"],[3,"ngClass",4,"ngIf"],[3,"ngClass"],[3,"value","showValue"],[1,"p-fileupload-file-list"],[1,"p-fileupload-file"],["ngFor","",3,"ngForOf","ngForTemplate"],["class","p-fileupload-file",4,"ngFor","ngForOf"],["class","p-fileupload-file-thumbnail",3,"src","width","error",4,"ngIf"],[1,"p-fileupload-file-info"],[1,"p-fileupload-file-name"],[1,"p-fileupload-file-size"],[1,"p-fileupload-file-actions"],["text","","rounded","","severity","danger",3,"onClick","disabled","styleClass"],[1,"p-fileupload-file-thumbnail",3,"error","src","width"],[3,"onClick","keydown","styleClass","disabled","label","buttonProps"],["type","file",3,"change","focus","blur","accept","multiple","disabled"],["class","p-button-icon p-button-icon-left",3,"ngClass",4,"ngIf"],[1,"p-button-icon","p-button-icon-left",3,"ngClass"],[3,"styleClass",4,"ngIf"],["class","p-button-icon p-button-icon-left",4,"ngIf"],[3,"styleClass"],[1,"p-button-icon","p-button-icon-left"],["class","p-button-icon p-button-icon-left pi",3,"ngClass",4,"ngIf"],[1,"p-button-icon","p-button-icon-left","pi",3,"ngClass"],[3,"class"]],template:function(l,c){l&1&&I(0,rl,15,39,"div",4)(1,Pl,9,16,"div",5),l&2&&(y("ngIf",c.mode==="advanced"),g(),y("ngIf",c.mode==="basic"))},dependencies:[Ge,bt,$o,ct,qt,Oi,ut,Ia,Fa,ia,xa,zi,St],encapsulation:2,changeDetection:0})}return n})(),en=(()=>{class n{static \u0275fac=function(l){return new(l||n)};static \u0275mod=Pi({type:n});static \u0275inj=Ei({imports:[bi,St,St]})}return n})();var ao=vi(In()),Va=n=>(0,ao.default)(n).isSame((0,ao.default)("0001-01-01T00:00:00"));var Fl=["class","page"],Ol=()=>({width:"25rem"}),Il=()=>({width:"100%"}),Aa=()=>({height:"calc(100vh - 100px)"}),Nl=()=>({"max-width":"100%","min-width":"50%"}),Dl=()=>({});function Vl(n,h){if(n&1){let t=q();d(0,"div",23)(1,"a",24),b(2,"Cancel"),u(),d(3,"p-button",25),J("onClick",function(){R(t);let c=P();return M(c.onSubmitJournalEntry())}),u()()}}function Al(n,h){if(n&1&&(d(0,"span",44),b(1),u()),n&2){let t=h.$implicit;g(),he(" ",t.name," ")}}function Ll(n,h){if(n&1&&(d(0,"div",23)(1,"div",45)(2,"span",46),b(3),u()(),d(4,"div")(5,"span"),b(6,"-"),u()(),d(7,"span",47),b(8),u()()),n&2){let t=h.$implicit;g(3),he("(",t.code,")"),g(5),ae(t.name)}}function Rl(n,h){n&1&&(d(0,"tr")(1,"th"),b(2,"Account"),u(),d(3,"th",48),b(4,"Amount"),u(),d(5,"th",48),b(6,"Note"),u(),D(7,"th",49),u())}function Ml(n,h){if(n&1&&(d(0,"div",23)(1,"div",45)(2,"span",46),b(3),u()(),d(4,"div")(5,"span"),b(6,"-"),u()(),d(7,"div",45)(8,"span",56),b(9),u()()()),n&2){let t=h.$implicit;g(3),he("(",t.code,")"),g(6),ae(t.name)}}function Bl(n,h){if(n&1&&(d(0,"div",23)(1,"div",45)(2,"span",46),b(3),u()(),d(4,"div")(5,"span"),b(6,"-"),u()(),d(7,"div",45)(8,"span",56),b(9),u()()()),n&2){let t=h.$implicit;g(3),he("(",t.code,")"),g(6),ae(t.name)}}function zl(n,h){if(n&1){let t=q();d(0,"div",57)(1,"p-button",58),J("onClick",function(){R(t);let c=P(3);return M(c.addIitemVisible.set(!c.addIitemVisible()))}),u()()}}function Ul(n,h){if(n&1){let t=q();d(0,"tr",50)(1,"td")(2,"p-select",51),I(3,Ml,10,2,"ng-template",null,7,W)(5,Bl,10,2,"ng-template",null,2,W)(7,zl,2,0,"ng-template",null,6,W),u()(),d(9,"td"),D(10,"input",52),u(),d(11,"td"),D(12,"textarea",53),u(),d(13,"td")(14,"button",54),J("click",function(){let c=R(t).rowIndex,v=P(2);return M(v.removeItem(c))}),D(15,"i",55),u()()()}if(n&2){let t=h.rowIndex,l=P(2);y("formGroupName",t),g(2),$e(ve(7,Nl)),y("filter",!0)("options",l.journalRecordExpense().options.accounts),g(8),y("autoNumeric",ve(8,Dl)),g(2),y("autoResize",!0)}}function jl(n,h){if(n&1){let t=q();d(0,"tr")(1,"td")(2,"div",59)(3,"p-button",60),J("onClick",function(){R(t);let c=P(2);return M(c.addItem())}),u(),d(4,"span"),b(5,"Total :"),u()()(),d(6,"td",61),b(7),Re(8,"async"),Re(9,"number"),u(),D(10,"td",62),u()}if(n&2){let t=P(2);g(7),he(" ",Je(9,3,Je(8,1,t.totalDebitAmount$))," ")}}function Jl(n,h){if(n&1){let t=q();d(0,"p-scrollpanel")(1,"p-panel",26)(2,"div",27)(3,"div",28)(4,"div",29)(5,"div",30)(6,"div",27)(7,"div",31)(8,"label",32),b(9,"Outlet"),u()(),d(10,"p-select",33),I(11,Al,2,1,"ng-template",null,2,W),u()()(),d(13,"div",30)(14,"div",27)(15,"div",31)(16,"label",32),b(17,"Date"),u()(),D(18,"p-datepicker",34),u()(),d(19,"div",30)(20,"div",27)(21,"div",31)(22,"label",32),b(23,"Number"),u()(),D(24,"input",35),u()(),d(25,"div",36)(26,"div",27)(27,"div",31)(28,"label",32),b(29,"Account"),u()(),d(30,"p-select",37),I(31,Ll,9,2,"ng-template",null,2,W),u()()(),d(33,"div",38)(34,"div",27)(35,"div",31)(36,"label",39),b(37,"Supplier"),u()(),d(38,"p-autocomplete",40),Re(39,"async"),J("completeMethod",function(c){R(t);let v=P();return M(v.search(c))}),u()()(),d(40,"div",30)(41,"div",27)(42,"div",31)(43,"label",39),b(44,"Upload"),u()(),d(45,"p-fileupload",41,3),J("onSelect",function(c){R(t);let v=P();return M(v.onUpload(c))}),u()()(),d(47,"div",30)(48,"div",27)(49,"div",31)(50,"label",39),b(51,"Note"),u()(),D(52,"textarea",42),u()()()()(),D(53,"hr"),d(54,"p-table",43),I(55,Rl,8,0,"ng-template",null,4,W)(57,Ul,16,9,"ng-template",null,5,W)(59,jl,11,5,"ng-template",null,6,W),u()()()}if(n&2){let t=P();$e(ve(14,Aa)),g(),$e(ve(15,Aa)),y("formGroup",t.form),g(9),y("options",t.journalRecordExpense().options.entities)("filter",!0),g(20),y("filter",!0)("options",t.journalRecordExpense().options.paymentAccounts),g(8),y("suggestions",Je(39,12,t.supplierSuggestions$)),g(14),y("autoResize",!0),g(2),y("value",t.form.controls.items.controls)}}var za=(()=>{class n{constructor(){this.fb=K(xn),this.journalRecordExpense=Ve(null),this.activatedRoute=K(ni),this.journalService=K(Ke),this.toasr=K(Ai),this.file=Ve(null),this.addIitemVisible=Ve(!1)}ngOnInit(){this.initForm(),this.loadJournalForm(),this.initFormAddItemCOA(),this.totalDebitAmount$=this.form.controls.items.valueChanges.pipe(_t(t=>t.reduce((l,c)=>l+c.debitAmount,0)),De("response"))}loadCategories(){this.categories$||(this.categories$=this.journalService.fetchCategoryOptions().pipe(Eo(1)))}initFormAddItemCOA(){this.formAddItemCOA=this.fb.group({ID:this.fb.control(Ie.toString()),Name:this.fb.control(""),Code:this.fb.control(""),Note:this.fb.control(""),CategoryID:this.fb.control(""),OutletID:this.fb.control(Ie.toString()),Balance:this.fb.control(0)})}onaddItemCOA(){if(this.formAddItemCOA.invalid){this.formAddItemCOA.markAllAsTouched();return}let t=Object.entries(this.formAddItemCOA.getRawValue()).reduce((l,[c,v])=>(c==="CategoryID"?l[c]=v.key||v:l[c]=v,l),{});this.journalService.submitChartAccount(t).pipe(yi(()=>this.journalService.getJournalRecordExpenseLoader().pipe(Pe(l=>{this.patchForm(l.form),this.journalRecordExpense.set(l),this.addIitemVisible.update(c=>!c)})))).subscribe()}loadJournalForm(){this.activatedRoute.data.pipe(_t(t=>t.form),Pe(t=>{this.patchForm(t.form),this.journalRecordExpense.set(t)})).subscribe()}initForm(){this.form=this.fb.group({order:this.buildOrderGroup(this.fb),items:this.fb.array([]),additionalAccountID:this.fb.control(""),file:this.fb.control("")}),this.form.controls.order.controls.date.disable()}buildOrderGroup(t){return t.group({id:t.control(""),number:t.control(""),date:t.control(new Date),note:t.control(""),entryTypeID:t.control(0),referenceID:t.control(""),referenceTypeID:t.control(0),referenceText:t.control(""),contactID:t.control(""),detailReferenceID:t.control(""),creatorID:t.control(""),created:t.control(""),modifierID:t.control(""),modified:t.control(""),outletID:t.control(""),statusID:t.control(""),contactName:t.control("")})}buildItemGroup(t){return t.group({id:t.control(Ie.toString()),journalID:t.control(Ie.toString()),accountID:t.control(""),debitAmount:t.control(0),creditAmount:t.control(0),index:t.control(0),note:t.control("")})}patchForm(t){if(!t)return;this.form.controls.order.patchValue({id:t.order.id,number:t.order.number,date:Va(t.order.date)?(0,ro.default)().toDate():(0,ro.default)(t.order.date).toDate(),note:t.order.note,entryTypeID:t.order.entryTypeID,referenceID:t.order.referenceID,referenceTypeID:t.order.referenceTypeID,referenceText:t.order.referenceText,contactID:t.order.contactID,detailReferenceID:t.order.detailReferenceID,creatorID:t.order.creatorID,created:t.order.created,modifierID:t.order.modifierID,modified:t.order.modified,outletID:t.order.outletID,statusID:t.order.statusID,contactName:t.order.contactName});let l=this.form.controls.items;l.clear(),t.items.forEach(c=>{let v=this.buildItemGroup(this.fb);v.patchValue(c),l.push(v)}),this.form.patchValue({items:void 0,order:void 0,additionalAccountID:null,file:t.file??""})}openDialogAddItemCOA(){this.addIitemVisible.update(t=>!t)}addItem(){let t=this.form.controls.items,l=this.buildItemGroup(this.fb);t.push(l)}removeItem(t){this.form.controls.items.removeAt(t)}search(t){let l=t.query;this.supplierSuggestions$=this.journalService.getJournalEntrySupplierSuggestions(l).pipe(De("response"))}onUpload(t){this.file.set(t.currentFiles[0])}onSubmitJournalEntry(){if(console.log(this.form.value),this.form.invalid){this.markFormInvalidAndNotify();return}this.form.controls.order.controls.date.enable();let t=this.getCleanedFormValue();console.log("cleanedFormValue",t);let l=this.buildFormData(t);this.journalService.submitJournalEntry(l).pipe(De("response"),Pe(()=>this.form.controls.order.controls.date.disable()),Ci(c=>xi(()=>c)),De("error")).subscribe()}markFormInvalidAndNotify(){this.form.markAllAsTouched(),this.toasr.warning("Please fill in all required fields","Warning")}getCleanedFormValue(){let t=this.form.getRawValue(),l=Object.entries(t).reduce((c,[v,V])=>(v==="items"?c[v]=V.map(L=>ye(me({},L),{debitAmount:+L.debitAmount,creditAmount:+L.creditAmount})):v==="order"?c[v]=ye(me({},V),{contactID:V.contactID||Ie}):v==="file"?c[v]=V.length>0?V:null:c[v]=V,c),{});return JSON.parse(JSON.stringify(l,(c,v)=>v==="null"?null:v))}buildFormData(t){let l=new FormData;return l.append("Data",JSON.stringify(t)),l.append("File",this.file()),l}static{this.\u0275fac=function(l){return new(l||n)}}static{this.\u0275cmp=Oe({type:n,selectors:[["app-journal-record-expense",8,"page"]],attrs:Fl,decls:27,vars:13,consts:[["actionButton",""],["content",""],["item",""],["fu",""],["header",""],["body",""],["footer",""],["selectedItem",""],["pageTitle","Record Expense"],["header","Add New Account",3,"modal","visible","closable"],[1,"row","row-gap-3",3,"formGroup"],[1,"col"],[1,"d-flex","flex-column"],["for","username",1,"font-semibold","w-24"],["formControlName","Name","pInputText","","id","username","autocomplete","off",1,"flex-auto"],["for","email",1,"font-semibold","w-24"],["formControlName","Code","pInputText","","id","email","autocomplete","off",1,"flex-auto"],[1,"col-12"],["for","password",1,"font-semibold","w-24"],["formControlName","CategoryID","containerStyleClass","w-100","appendTo","body","placeholder","Select Item",3,"onFocus","options"],[1,"d-flex","justify-content-end","gap-2"],["label","Cancel","severity","secondary",3,"click"],["label","Save",3,"click"],[1,"d-flex","gap-2"],["routerLink","..",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"onClick"],[3,"formGroup"],[1,"row"],[1,"col-4"],[1,"row","row-gap-3"],["formGroupName","order",1,"col-12","col-lg-12"],[1,"col-4","d-flex","align-items-center"],["for","outlet",1,"m-0","fs-4","fw-normal"],["showClear","","size","small","inputId","outlet","formControlName","outletID","optionLabel","name","optionValue","id","placeholder","Select an outlet","filterBy","name",1,"col",3,"options","filter"],["showClear","","size","small","styleClass","w-100","formControlName","date",1,"col","p-0"],["pSize","small","formControlName","number","type","text","pInputText","",1,"col"],[1,"col-12","col-lg-12"],["showClear","","size","small","filterBy","code,name","inputId","outlet","formControlName","additionalAccountID","optionLabel","name","optionValue","id","placeholder","Choose account to pay",1,"col",3,"filter","options"],["formGroupName","order",1,"col-12"],["for","",1,"m-0","fs-4","fw-normal"],["showClear","","size","small","styleClass","w-100","inputStyleClass","w-100","formControlName","contactID","optionLabel","Value","optionValue","Key",1,"col","p-0",3,"completeMethod","suggestions"],["styleClass","justify-content-start","mode","basic","chooseLabel","Choose","chooseIcon","fa-solid fa-upload","maxFileSize","1000000",1,"col","p-0",3,"onSelect"],["pSize","small","rows","4","pTextarea","","formControlName","note","placeholder","Add a note",1,"col",3,"autoResize"],["showGridlines","","formArrayName","items",3,"value"],[1,"d-inline-block","text-truncate",2,"max-width","300px"],[1,""],[1,"h-full","align-middle"],[1,"text-truncate","d-inline-block",2,"max-width","200px"],[1,"text-end",2,"width","10%"],[2,"width","5%"],[3,"formGroupName"],["filterBy","code,name","appendTo","body","formControlName","accountID","optionLabel","name","optionValue","id","placeholder","Select an account","showClear","",3,"filter","options"],["type","text","pInputText","","formControlName","debitAmount",1,"text-end",3,"autoNumeric"],["rows","1","pTextarea","","formControlName","note",3,"autoResize"],[1,"btn","btn-link",3,"click"],[1,"fa-light","fa-trash","text-danger"],[1,"text-truncate","d-inline-block","h-full","align-middle"],[1,"p-3"],["label","Add New","fluid","","text","","size","small","icon","pi pi-plus",3,"onClick"],[1,"d-flex","justify-content-between","align-items-center"],["label","Add","icon","fa-solid fa-plus",3,"onClick"],[1,"text-end"],["colspan","2"]],template:function(l,c){if(l&1){let v=q();d(0,"app-main-panel",8),I(1,Vl,4,0,"ng-template",null,0,W)(3,Jl,61,16,"ng-template",null,1,W),u(),d(5,"p-dialog",9)(6,"div",10)(7,"div",11)(8,"div",12)(9,"label",13),b(10,"Name"),u(),D(11,"input",14),u()(),d(12,"div",11)(13,"div",12)(14,"label",15),b(15,"Code"),u(),D(16,"input",16),u()(),d(17,"div",17)(18,"div",12)(19,"label",18),b(20,"Category"),u(),d(21,"p-treeselect",19),Re(22,"async"),J("onFocus",function(){return R(v),M(c.loadCategories())}),u()()(),d(23,"div",11)(24,"div",20)(25,"p-button",21),J("click",function(){return R(v),M(c.addIitemVisible.set(!c.addIitemVisible()))}),u(),d(26,"p-button",22),J("click",function(){return R(v),M(c.onaddItemCOA())}),u()()()()()}l&2&&(g(5),$e(ve(11,Ol)),y("modal",!0)("visible",c.addIitemVisible())("closable",!1),g(),y("formGroup",c.formAddItemCOA),g(15),$e(ve(12,Il)),y("options",Je(22,9,c.categories$)))},dependencies:[wt,Ge,Go,Tt,qi,Hi,ui,ci,li,si,Vt,Dt,Lt,Mt,Rt,ii,Qt,Yt,Xt,ei,ti,Ii,Ni,Xi,di,mi,Qi,Zi,en,bi,At,ut,Gi,$i,ba,_a,ji,Ui,It,Ot],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return n})();var $l=["filterRef"],Gl=["class","page"];function Kl(n,h){n&1&&(d(0,"div",10)(1,"div",5)(2,"h5",11),b(3,"Card title"),u(),d(4,"h6",12),b(5,"Card subtitle"),u(),d(6,"p",13),b(7," Some quick example text to build on the card title and make up the bulk of the card's content. "),u(),d(8,"a",14),b(9,"Card link"),u(),d(10,"a",14),b(11,"Another link"),u()()())}var Ua=(()=>{class n{constructor(){this.modalService=K(En)}onFilterChange(t){console.log("Filter Change",t),this.modalService.open(this.templateRef)}static{this.\u0275fac=function(l){return new(l||n)}}static{this.\u0275cmp=Oe({type:n,selectors:[["app-journal-deposit",8,"page"]],viewQuery:function(l,c){if(l&1&&nt($l,7),l&2){let v;de(v=pe())&&(c.templateRef=v.first)}},attrs:Gl,decls:44,vars:0,consts:[["filterRef",""],[3,"eventFilterChange"],["ngProjectAs","content",5,["content"]],[1,"container","my-4"],[1,"card"],[1,"card-body"],[1,"table"],["scope","col"],["scope","row"],["colspan","2"],[1,"card",2,"width","18rem"],[1,"card-title"],[1,"card-subtitle","mb-2","text-body-secondary"],[1,"card-text"],["href","#",1,"card-link"]],template:function(l,c){if(l&1){let v=q();d(0,"app-main-panel",1),J("eventFilterChange",function(L){return R(v),M(c.onFilterChange(L))}),Qe(1,2),d(2,"div",3)(3,"div",4)(4,"div",5)(5,"table",6)(6,"thead")(7,"tr")(8,"th",7),b(9,"#"),u(),d(10,"th",7),b(11,"First"),u(),d(12,"th",7),b(13,"Last"),u(),d(14,"th",7),b(15,"Handle"),u()()(),d(16,"tbody")(17,"tr")(18,"th",8),b(19,"1"),u(),d(20,"td"),b(21,"Mark"),u(),d(22,"td"),b(23,"Otto"),u(),d(24,"td"),b(25,"mdo"),u()(),d(26,"tr")(27,"th",8),b(28,"2"),u(),d(29,"td"),b(30,"Jacob"),u(),d(31,"td"),b(32,"Thornton"),u(),d(33,"td"),b(34,"fat"),u()(),d(35,"tr")(36,"th",8),b(37,"3"),u(),d(38,"td",9),b(39,"Larry the Bird"),u(),d(40,"td"),b(41,"twitter"),u()()()()()()(),Ye(),u(),I(42,Kl,12,0,"ng-template",null,0,W)}},dependencies:[wt],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return n})();var ho=vi(In());var Wl=["mask"],Hl=["content"],ql=["footer"],Zl=["titlebar"],Ql=(n,h,t)=>({position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex","justify-content":n,"align-items":h,"pointer-events":t}),Yl=n=>({"p-dialog p-component":!0,"p-dialog-maximized":n}),Xl=()=>({display:"flex","flex-direction":"column","pointer-events":"auto"}),ec=(n,h)=>({transform:n,transition:h}),tc=n=>({value:"visible",params:n});function ic(n,h){if(n&1){let t=q();d(0,"div",14),J("mousedown",function(c){R(t);let v=P(2);return M(v.initResize(c))}),u()}n&2&&y("ngClass","p-resizable-handle")}function nc(n,h){n&1&&Xe(0)}function oc(n,h){n&1&&D(0,"WindowMaximizeIcon")}function ac(n,h){n&1&&D(0,"WindowMinimizeIcon")}function rc(n,h){if(n&1&&(Qe(0),I(1,oc,1,0,"WindowMaximizeIcon",11)(2,ac,1,0,"WindowMinimizeIcon",11),Ye()),n&2){let t=P(5);g(),y("ngIf",!t.maximized&&!t.maximizeIconTemplate),g(),y("ngIf",t.maximized&&!t.minimizeIconTemplate)}}function sc(n,h){}function lc(n,h){n&1&&I(0,sc,0,0,"ng-template")}function cc(n,h){if(n&1&&(Qe(0),I(1,lc,1,0,null,21),Ye()),n&2){let t=P(5);g(),y("ngTemplateOutlet",t.maximizeIconTemplate)}}function uc(n,h){}function mc(n,h){n&1&&I(0,uc,0,0,"ng-template")}function dc(n,h){if(n&1&&(Qe(0),I(1,mc,1,0,null,21),Ye()),n&2){let t=P(5);g(),y("ngTemplateOutlet",t.minimizeIconTemplate)}}function pc(n,h){if(n&1){let t=q();d(0,"p-button",20),J("onClick",function(){R(t);let c=P(4);return M(c.maximize())})("keydown.enter",function(){R(t);let c=P(4);return M(c.maximize())}),I(1,rc,3,2,"ng-container",11)(2,cc,2,1,"ng-container",11)(3,dc,2,1,"ng-container",11),u()}if(n&2){let t=P(4);y("styleClass","p-dialog-maximize-button")("tabindex",t.maximizable?"0":"-1"),g(),y("ngIf",!t.maximizeIcon),g(),y("ngIf",!t.maximized),g(),y("ngIf",t.maximized)}}function hc(n,h){n&1&&(Qe(0),D(1,"TimesIcon"),Ye())}function gc(n,h){}function fc(n,h){n&1&&I(0,gc,0,0,"ng-template")}function vc(n,h){if(n&1&&(d(0,"span"),I(1,fc,1,0,null,21),u()),n&2){let t=P(5);g(),y("ngTemplateOutlet",t.closeIconTemplate)}}function yc(n,h){if(n&1){let t=q();d(0,"p-button",22),J("onClick",function(){R(t);let c=P(4);return M(c.hide())})("keydown.enter",function(){R(t);let c=P(4);return M(c.hide())}),I(1,hc,2,0,"ng-container",11)(2,vc,2,1,"span",11),u()}if(n&2){let t=P(4);y("styleClass","p-dialog-close-button")("ariaLabel",t.ddconfig.closeAriaLabel||t.defaultCloseAriaLabel),g(),y("ngIf",!t.closeIconTemplate),g(),y("ngIf",t.closeIconTemplate)}}function _c(n,h){if(n&1&&(Qe(0),d(1,"span",16),b(2),u(),d(3,"div",17),I(4,pc,4,5,"p-button",18)(5,yc,3,4,"p-button",19),u(),Ye()),n&2){let t=P(3);g(),y("ngClass","p-dialog-title")("id",t.ariaLabelledBy),g(),ae(t.ddconfig.header),g(),y("ngClass","p-dialog-header-actions"),g(),y("ngIf",t.ddconfig.maximizable),g(),y("ngIf",t.closable)}}function bc(n,h){if(n&1){let t=q();d(0,"div",15,3),J("mousedown",function(c){R(t);let v=P(2);return M(v.initDrag(c))}),I(2,nc,1,0,"ng-container",12)(3,_c,6,6,"ng-container",11),u()}if(n&2){let t=P(2);y("ngClass","p-dialog-header"),g(2),y("ngComponentOutlet",t.headerTemplate),g(),y("ngIf",!t.headerTemplate)}}function Sc(n,h){}function wc(n,h){n&1&&I(0,Sc,0,0,"ng-template",23)}function xc(n,h){n&1&&Xe(0)}function Cc(n,h){if(n&1&&(Qe(0),b(1),Ye()),n&2){let t=P(3);g(),he(" ",t.ddconfig.footer," ")}}function Ec(n,h){n&1&&Xe(0)}function Pc(n,h){if(n&1&&(d(0,"div",17,4),I(2,Cc,2,1,"ng-container",11)(3,Ec,1,0,"ng-container",12),u()),n&2){let t=P(2);y("ngClass","p-dialog-footer"),g(2),y("ngIf",!t.footerTemplate),g(),y("ngComponentOutlet",t.footerTemplate)}}function kc(n,h){if(n&1){let t=q();d(0,"div",7,1),J("@animation.start",function(c){R(t);let v=P();return M(v.onAnimationStart(c))})("@animation.done",function(c){R(t);let v=P();return M(v.onAnimationEnd(c))}),I(2,ic,1,1,"div",8)(3,bc,4,3,"div",9),d(4,"div",10,2),I(6,wc,1,0,null,11)(7,xc,1,0,"ng-container",12),u(),I(8,Pc,4,3,"div",13),u()}if(n&2){let t=P();$e(t.ddconfig.style),lt(t.ddconfig.styleClass),Wt("width",t.ddconfig.width)("height",t.ddconfig.height),y("ngClass",Ne(22,Yl,t.maximizable&&t.maximized))("ngStyle",ve(24,Xl))("@animation",Ne(28,tc,ki(25,ec,t.transformOptions,t.ddconfig.transitionOptions||"150ms cubic-bezier(0, 0, 0.2, 1)")))("pFocusTrapDisabled",t.ddconfig.focusTrap===!1),fe("aria-labelledby",t.ariaLabelledBy)("aria-modal",!0)("id",t.dialogId),g(2),y("ngIf",t.ddconfig.resizable),g(),y("ngIf",t.ddconfig.showHeader!==!1),g(),y("ngClass","p-dialog-content")("ngStyle",t.ddconfig.contentStyle),g(2),y("ngIf",!t.contentTemplate),g(),y("ngComponentOutlet",t.contentTemplate),g(),y("ngIf",t.ddconfig.footer||t.footerTemplate)}}var ja=(()=>{class n{viewContainerRef;constructor(t){this.viewContainerRef=t}static \u0275fac=function(l){return new(l||n)(Jt(Do))};static \u0275dir=vn({type:n,selectors:[["","pDynamicDialogContent",""]]})}return n})(),Ja=(()=>{class n extends pa{name="dialog";static \u0275fac=(()=>{let t;return function(c){return(t||(t=gt(n)))(c||n)}})();static \u0275prov=xt({token:n,factory:n.\u0275fac})}return n})();var Rn=class{data;inputValues;header;ariaLabelledBy;footer;width;height;closeOnEscape=!1;focusOnShow=!0;focusTrap=!0;baseZIndex;autoZIndex=!1;dismissableMask=!1;rtl=!1;style;contentStyle;styleClass;transitionOptions;closable=!1;showHeader=!1;modal=!1;maskStyleClass;resizable=!1;draggable=!1;keepInViewport=!1;minX;minY;maximizable=!1;maximizeIcon;minimizeIcon;position;closeAriaLabel;appendTo;duplicate=!1;breakpoints;templates},sn=class{constructor(){}close(h){this._onClose.next(h),setTimeout(()=>{this._onClose.complete()},1e3)}destroy(){this._onDestroy.next(null)}dragStart(h){this._onDragStart.next(h)}dragEnd(h){this._onDragEnd.next(h)}resizeInit(h){this._onResizeInit.next(h)}resizeEnd(h){this._onResizeEnd.next(h)}maximize(h){this._onMaximize.next(h)}_onClose=new jt;onClose=this._onClose.asObservable();_onDestroy=new jt;onDestroy=this._onDestroy.asObservable();_onDragStart=new jt;onDragStart=this._onDragStart.asObservable();_onDragEnd=new jt;onDragEnd=this._onDragEnd.asObservable();_onResizeInit=new jt;onResizeInit=this._onResizeInit.asObservable();_onResizeEnd=new jt;onResizeEnd=this._onResizeEnd.asObservable();_onMaximize=new jt;onMaximize=this._onMaximize.asObservable();onChildComponentLoaded=new jt},Tc=Gn([_i({transform:"{{transform}}",opacity:0}),Di("{{transition}}",_i({transform:"none",opacity:1}))]),Fc=Gn([Di("{{transition}}",_i({transform:"{{transform}}",opacity:0}))]),$a=(()=>{class n extends ri{renderer;ddconfig;dialogRef;zone;parentDialog;visible=!0;componentRef;mask;resizing;dragging;maximized;_style={};originalStyle;lastPageX;lastPageY;ariaLabelledBy;id=on("pn_id_");styleElement;insertionPoint;maskViewChild;contentViewChild;footerViewChild;headerViewChild;childComponentType;inputValues;container;wrapper;documentKeydownListener;documentEscapeListener;maskClickListener;transformOptions="scale(0.7)";documentResizeListener;documentResizeEndListener;documentDragListener;documentDragEndListener;_componentStyle=K(Ja);get minX(){return this.ddconfig.minX?this.ddconfig.minX:0}get minY(){return this.ddconfig.minY?this.ddconfig.minY:0}get keepInViewport(){return this.ddconfig.keepInViewport}get maximizable(){return this.ddconfig.maximizable}get maximizeIcon(){return this.ddconfig.maximizeIcon}get minimizeIcon(){return this.ddconfig.minimizeIcon}get closable(){return this.ddconfig.closable}get style(){return this._style}get position(){return this.ddconfig.position}get defaultCloseAriaLabel(){return this.config.getTranslation(Nt.ARIA).close}set style(t){t&&(this._style=me({},t),this.originalStyle=t)}get parent(){let t=Array.from(this.document.getElementsByClassName("p-dialog"));if(t.length>1)return t.pop()}get parentContent(){let t=Array.from(this.document.getElementsByClassName("p-dialog"));if(t.length>0){let l=t[t.length-1].querySelector(".p-dialog-content");if(l)return Array.isArray(l)?l[0]:l}}get header(){return this.ddconfig.header}get data(){return this.ddconfig.data}get breakpoints(){return this.ddconfig.breakpoints}get footerTemplate(){return this.ddconfig?.templates?.footer}get headerTemplate(){return this.ddconfig?.templates?.header}get contentTemplate(){return this.ddconfig?.templates?.content}get minimizeIconTemplate(){return this.ddconfig?.templates?.minimizeicon}get maximizeIconTemplate(){return this.ddconfig?.templates?.maximizeicon}get closeIconTemplate(){return this.ddconfig?.templates?.closeicon}get maskClass(){let l=["left","right","top","topleft","topright","bottom","bottomleft","bottomright"].find(c=>c===this.position);return{"p-dialog-mask":!0,"p-overlay-mask p-overlay-mask-enter":this.ddconfig.modal||this.ddconfig.dismissableMask,[`p-dialog-${l}`]:l}}get dialogId(){return this.attrSelector}zIndexForLayering;constructor(t,l,c,v,V){super(),this.renderer=t,this.ddconfig=l,this.dialogRef=c,this.zone=v,this.parentDialog=V}ngOnInit(){super.ngOnInit(),this.breakpoints&&this.createStyle()}createStyle(){if(Zt(this.platformId)&&!this.styleElement){this.styleElement=this.renderer.createElement("style"),this.styleElement.type="text/css",this.renderer.appendChild(this.document.head,this.styleElement);let t="";for(let l in this.breakpoints)t+=`
|
|
517
|
-
@media screen and (max-width: ${l}) {
|
|
518
|
-
.p-dialog[id=${this.dialogId}]:not(.p-dialog-maximized) {
|
|
519
|
-
width: ${this.breakpoints[l]} !important;
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
`;this.renderer.setProperty(this.styleElement,"innerHTML",t),ea(this.styleElement,"nonce",this.config?.csp()?.nonce)}}destroyStyle(){this.styleElement&&(this.renderer.removeChild(this.document.head,this.styleElement),this.styleElement=null)}ngAfterViewInit(){super.ngAfterViewInit(),this.loadChildComponent(this.childComponentType),this.ariaLabelledBy=this.getAriaLabelledBy(),this.cd.detectChanges()}getAriaLabelledBy(){let{header:t,showHeader:l}=this.ddconfig;return t===null||l===!1?null:on("pn_id_")+"_header"}loadChildComponent(t){let l=this.insertionPoint?.viewContainerRef;l?.clear(),this.componentRef=l?.createComponent(t),this.inputValues&&Object.entries(this.inputValues).forEach(([c,v])=>{this.componentRef.setInput(c,v)}),this.dialogRef.onChildComponentLoaded.next(this.componentRef.instance)}moveOnTop(){this.ddconfig.autoZIndex!==!1?(Bi.set("modal",this.container,(this.ddconfig.baseZIndex||0)+this.config.zIndex.modal),this.wrapper.style.zIndex=String(parseInt(this.container.style.zIndex,10)-1)):this.zIndexForLayering=Bi.generateZIndex("modal",(this.ddconfig.baseZIndex||0)+this.config.zIndex.modal)}onAnimationStart(t){switch(t.toState){case"visible":this.container=t.element,this.wrapper=this.container.parentElement,this.moveOnTop(),this.parent&&this.unbindGlobalListeners(),this.bindGlobalListeners(),this.container?.setAttribute(this.id,""),this.ddconfig.modal!==!1&&this.enableModality(),this.ddconfig.focusOnShow!==!1&&this.focus();break;case"void":this.wrapper&&this.ddconfig.modal!==!1&&oi(this.wrapper,"p-overlay-mask-leave");break}}onAnimationEnd(t){t.toState==="void"&&(this.parentContent&&this.focus(this.parentContent),this.onContainerDestroy(),this.dialogRef.destroy())}onContainerDestroy(){this.unbindGlobalListeners(),this.container&&this.ddconfig.autoZIndex!==!1&&Bi.clear(this.container),this.zIndexForLayering&&Bi.revertZIndex(this.zIndexForLayering),this.ddconfig.modal!==!1&&this.disableModality(),this.container=null}close(){this.visible=!1,this.cd.markForCheck()}hide(){this.dialogRef&&this.dialogRef.close()}enableModality(){this.ddconfig.dismissableMask&&(this.maskClickListener=this.renderer.listen(this.wrapper,"mousedown",t=>{this.wrapper&&this.wrapper.isSameNode(t.target)&&this.hide()})),this.ddconfig.modal!==!1&&oi(this.document.body,"p-overflow-hidden")}disableModality(){this.wrapper&&(this.ddconfig.dismissableMask&&this.unbindMaskClickListener(),this.ddconfig.modal!==!1&&ai(this.document.body,"p-overflow-hidden"),this.cd.destroyed||this.cd.detectChanges())}focus(t=this.contentViewChild.nativeElement){let l=Zn.getFocusableElement(t,"[autofocus]");if(l){this.zone.runOutsideAngular(()=>{setTimeout(()=>l.focus(),5)});return}let c=Zn.getFocusableElement(t);c?this.zone.runOutsideAngular(()=>{setTimeout(()=>c.focus(),5)}):this.footerViewChild?this.focus(this.footerViewChild.nativeElement):!c&&this.headerViewChild&&this.focus(this.headerViewChild.nativeElement)}maximize(){this.maximized=!this.maximized,this.maximized?oi(this.document.body,"p-overflow-hidden"):ai(this.document.body,"p-overflow-hidden"),this.dialogRef.maximize({maximized:this.maximized})}initResize(t){this.ddconfig.resizable&&(this.documentResizeListener||this.bindDocumentResizeListeners(),this.resizing=!0,this.lastPageX=t.pageX,this.lastPageY=t.pageY,oi(this.document.body,"p-unselectable-text"),this.dialogRef.resizeInit(t))}onResize(t){if(this.resizing){let l=t.pageX-this.lastPageX,c=t.pageY-this.lastPageY,v=qn(this.container),V=kn(this.container),L=kn(this.contentViewChild.nativeElement),re=v+l,we=V+c,mt=this.container.style.minWidth,a=this.container.style.minHeight,dt=this.container.getBoundingClientRect(),$t=Hn();(!parseInt(this.container.style.top)||!parseInt(this.container.style.left))&&(re+=l,we+=c),(!mt||re>parseInt(mt))&&dt.left+re<$t.width&&(this._style.width=re+"px",this.container.style.width=this._style.width),(!a||we>parseInt(a))&&dt.top+we<$t.height&&(this.contentViewChild.nativeElement.style.height=L+we-V+"px",this._style.height&&(this._style.height=we+"px",this.container.style.height=this._style.height)),this.lastPageX=t.pageX,this.lastPageY=t.pageY}}resizeEnd(t){this.resizing&&(this.resizing=!1,ai(this.document.body,"p-unselectable-text"),this.dialogRef.resizeEnd(t))}initDrag(t){Wn(t.target,"p-dialog-header-icon")||Wn(t.target.parentElement,"p-dialog-header-icon")||this.ddconfig.draggable&&(this.dragging=!0,this.lastPageX=t.pageX,this.lastPageY=t.pageY,this.container.style.margin="0",oi(this.document.body,"p-unselectable-text"),this.dialogRef.dragStart(t))}onDrag(t){if(this.dragging){let l=qn(this.container),c=kn(this.container),v=t.pageX-this.lastPageX,V=t.pageY-this.lastPageY,L=this.container.getBoundingClientRect(),re=L.left+v,we=L.top+V,mt=Hn();this.container.style.position="fixed",this.keepInViewport?(re>=this.minX&&re+l<mt.width&&(this._style.left=re+"px",this.lastPageX=t.pageX,this.container.style.left=re+"px"),we>=this.minY&&we+c<mt.height&&(this._style.top=we+"px",this.lastPageY=t.pageY,this.container.style.top=we+"px")):(this.lastPageX=t.pageX,this.container.style.left=re+"px",this.lastPageY=t.pageY,this.container.style.top=we+"px")}}endDrag(t){this.dragging&&(this.dragging=!1,ai(this.document.body,"p-unselectable-text"),this.dialogRef.dragEnd(t),this.cd.detectChanges())}resetPosition(){this.container.style.position="",this.container.style.left="",this.container.style.top="",this.container.style.margin=""}bindDocumentDragListener(){Zt(this.platformId)&&this.zone.runOutsideAngular(()=>{this.documentDragListener=this.renderer.listen(this.document,"mousemove",this.onDrag.bind(this))})}bindDocumentDragEndListener(){Zt(this.platformId)&&this.zone.runOutsideAngular(()=>{this.documentDragEndListener=this.renderer.listen(this.document,"mouseup",this.endDrag.bind(this))})}unbindDocumentDragEndListener(){this.documentDragEndListener&&(this.documentDragEndListener(),this.documentDragListener=null)}unbindDocumentDragListener(){this.documentDragListener&&(this.documentDragListener(),this.documentDragListener=null)}bindDocumentResizeListeners(){Zt(this.platformId)&&this.zone.runOutsideAngular(()=>{this.documentResizeListener=this.renderer.listen(this.document,"mousemove",this.onResize.bind(this)),this.documentResizeEndListener=this.renderer.listen(this.document,"mouseup",this.resizeEnd.bind(this))})}unbindDocumentResizeListeners(){this.documentResizeListener&&this.documentResizeEndListener&&(this.documentResizeListener(),this.documentResizeEndListener(),this.documentResizeListener=null,this.documentResizeEndListener=null)}bindGlobalListeners(){this.ddconfig.closeOnEscape!==!1&&this.bindDocumentEscapeListener(),this.ddconfig.resizable&&this.bindDocumentResizeListeners(),this.ddconfig.draggable&&(this.bindDocumentDragListener(),this.bindDocumentDragEndListener())}unbindGlobalListeners(){this.unbindDocumentEscapeListener(),this.unbindDocumentResizeListeners(),this.unbindDocumentDragListener(),this.unbindDocumentDragEndListener()}bindDocumentEscapeListener(){let t=this.maskViewChild?this.maskViewChild.nativeElement.ownerDocument:"document";this.documentEscapeListener=this.renderer.listen(t,"keydown",l=>{if(l.which==27){let c=Bi.getCurrent();(parseInt(this.container.style.zIndex)==c||this.zIndexForLayering==c)&&this.hide()}})}unbindDocumentEscapeListener(){this.documentEscapeListener&&(this.documentEscapeListener(),this.documentEscapeListener=null)}unbindMaskClickListener(){this.maskClickListener&&(this.maskClickListener(),this.maskClickListener=null)}ngOnDestroy(){this.onContainerDestroy(),this.componentRef&&this.componentRef.destroy(),this.destroyStyle(),super.ngOnDestroy()}static \u0275fac=function(l){return new(l||n)(Jt(No),Jt(Rn),Jt(sn),Jt(gn),Jt(n,12))};static \u0275cmp=Oe({type:n,selectors:[["p-dynamicDialog"],["p-dynamicdialog"],["p-dynamic-dialog"]],viewQuery:function(l,c){if(l&1&&(nt(ja,5),nt(Wl,5),nt(Hl,5),nt(ql,5),nt(Zl,5)),l&2){let v;de(v=pe())&&(c.insertionPoint=v.first),de(v=pe())&&(c.maskViewChild=v.first),de(v=pe())&&(c.contentViewChild=v.first),de(v=pe())&&(c.footerViewChild=v.first),de(v=pe())&&(c.headerViewChild=v.first)}},features:[et([Ja]),kt],decls:3,vars:9,consts:[["mask",""],["container",""],["content",""],["titlebar",""],["footer",""],[3,"ngStyle","ngClass"],["role","dialog","pFocusTrap","",3,"ngClass","ngStyle","style","class","pFocusTrapDisabled","width","height",4,"ngIf"],["role","dialog","pFocusTrap","",3,"ngClass","ngStyle","pFocusTrapDisabled"],["style","z-index: 90;",3,"ngClass","mousedown",4,"ngIf"],[3,"ngClass","mousedown",4,"ngIf"],[3,"ngClass","ngStyle"],[4,"ngIf"],[4,"ngComponentOutlet"],[3,"ngClass",4,"ngIf"],[2,"z-index","90",3,"mousedown","ngClass"],[3,"mousedown","ngClass"],[3,"ngClass","id"],[3,"ngClass"],["rounded","","text","",3,"styleClass","tabindex","onClick","keydown.enter",4,"ngIf"],["rounded","","text","","severity","secondary",3,"styleClass","ariaLabel","onClick","keydown.enter",4,"ngIf"],["rounded","","text","",3,"onClick","keydown.enter","styleClass","tabindex"],[4,"ngTemplateOutlet"],["rounded","","text","","severity","secondary",3,"onClick","keydown.enter","styleClass","ariaLabel"],["pDynamicDialogContent",""]],template:function(l,c){l&1&&(d(0,"div",5,0),I(2,kc,9,30,"div",6),u()),l&2&&(lt(c.ddconfig.maskStyleClass),y("ngStyle",Mo(5,Ql,c.position==="left"||c.position==="topleft"||c.position==="bottomleft"?"flex-start":c.position==="right"||c.position==="topright"||c.position==="bottomright"?"flex-end":"center",c.position==="top"||c.position==="topleft"||c.position==="topright"?"flex-start":c.position==="bottom"||c.position==="bottomleft"||c.position==="bottomright"?"flex-end":"center",c.ddconfig.modal?"auto":"none"))("ngClass",c.maskClass),g(2),y("ngIf",c.visible))},dependencies:[Ge,bt,Jo,ct,qt,Oi,St,ja,na,oa,zi,ut,da],encapsulation:2,data:{animation:[Pn("animation",[Vi("void => visible",[Kn(Tc)]),Vi("visible => void",[Kn(Fc)])])]}})}return n})(),Mn=(()=>{class n{static \u0275fac=function(l){return new(l||n)};static \u0275mod=Pi({type:n});static \u0275inj=Ei({imports:[$a,St,St]})}return n})(),co=class{_parentInjector;_additionalTokens;constructor(h,t){this._parentInjector=h,this._additionalTokens=t}get(h,t,l){let c=this._additionalTokens.get(h);return c||this._parentInjector.get(h,t)}},tn=(()=>{class n{appRef;injector;document;dialogComponentRefMap=new Map;constructor(t,l,c){this.appRef=t,this.injector=l,this.document=c}open(t,l){if(!this.duplicationPermission(t,l))return null;let c=this.appendDialogComponentToBody(l,t);return this.dialogComponentRefMap.get(c).instance.childComponentType=t,this.dialogComponentRefMap.get(c).instance.inputValues=l.inputValues,c}getInstance(t){return this.dialogComponentRefMap.get(t).instance}appendDialogComponentToBody(t,l){let c=new WeakMap;c.set(Rn,t);let v=new sn;c.set(sn,v);let V=v.onClose.subscribe(()=>{this.dialogComponentRefMap.get(v).instance.close()}),L=v.onDestroy.subscribe(()=>{this.removeDialogComponentFromBody(v),L.unsubscribe(),V.unsubscribe()}),re=Uo($a,{environmentInjector:this.appRef.injector,elementInjector:new co(this.injector,c)});this.appRef.attachView(re.hostView);let we=re.hostView.rootNodes[0];return!t.appendTo||t.appendTo==="body"?this.document.body.appendChild(we):Xo(t.appendTo,we),this.dialogComponentRefMap.set(v,re),v}removeDialogComponentFromBody(t){if(!t||!this.dialogComponentRefMap.has(t))return;let l=this.dialogComponentRefMap.get(t);this.appRef.detachView(l.hostView),l.destroy(),l.changeDetectorRef.detectChanges(),this.dialogComponentRefMap.delete(t)}duplicationPermission(t,l){if(l.duplicate)return!0;let c=!0;for(let[v,V]of this.dialogComponentRefMap)if(V.instance.childComponentType===t){c=!1;break}return c}static \u0275fac=function(l){return new(l||n)(hn(Vo),hn(Fo),hn(jo))};static \u0275prov=xt({token:n,factory:n.\u0275fac})}return n})();var Bn=()=>[],zn=(()=>{class n{static{this.\u0275fac=function(l){return new(l||n)}}static{this.\u0275cmp=Oe({type:n,selectors:[["app-dialog-create-customer-supplier"]],decls:66,vars:8,consts:[[1,"row","row-gap-2"],[1,"col-12"],[1,"form-group","d-flex","flex-column"],["for",""],["appendTo","body","optionLabel","name","placeholder","Select a City",1,"w-full","md:w-56",3,"options"],[1,"col-12","col-lg-4"],["pInputText","","autocomplete","off",1,"w-100"],["rows","1","cols","30","pTextarea",""],[1,"col-12","col-lg-6"]],template:function(l,c){l&1&&(d(0,"div",0)(1,"div",1)(2,"div",2)(3,"label",3),b(4,"Customer / Supplier"),u(),D(5,"p-select",4),u()(),d(6,"div",5)(7,"div",2)(8,"label",3),b(9,"Title"),u(),D(10,"input",6),u()(),d(11,"div",5)(12,"div",2)(13,"label",3),b(14,"First Name"),u(),D(15,"input",6),u()(),d(16,"div",5)(17,"div",2)(18,"label",3),b(19,"Last Name"),u(),D(20,"input",6),u()(),d(21,"div",5)(22,"div",2)(23,"label",3),b(24,"Mobile"),u(),D(25,"input",6),u()(),d(26,"div",5)(27,"div",2)(28,"label",3),b(29,"Email"),u(),D(30,"input",6),u()(),d(31,"div",5)(32,"div",2)(33,"label",3),b(34,"Identification"),u(),D(35,"input",6),u()(),d(36,"div",1)(37,"div",2)(38,"label",3),b(39,"Birthday"),u(),D(40,"input",6),u()(),d(41,"div",1)(42,"div",2)(43,"label",3),b(44,"Title"),u(),D(45,"textarea",7),u()(),d(46,"div",8)(47,"div",2)(48,"label",3),b(49,"City"),u(),D(50,"p-select",4),u()(),d(51,"div",8)(52,"div",2)(53,"label",3),b(54,"Nationality"),u(),D(55,"p-select",4),u()(),d(56,"div",8)(57,"div",2)(58,"label",3),b(59,"Gender"),u(),D(60,"p-select",4),u()(),d(61,"div",8)(62,"div",2)(63,"label",3),b(64,"Member Code"),u(),D(65,"textarea",7),u()()()),l&2&&(g(5),y("options",ve(4,Bn)),g(45),y("options",ve(5,Bn)),g(5),y("options",ve(6,Bn)),g(5),y("options",ve(7,Bn)))},dependencies:[di,mi,Vt,Dt,wa,ui,ci],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return n})();var Wa=vi(po());var Oc=["class","page"],Ic=()=>({width:"25rem"}),Nc=()=>[".."],Ha=()=>({height:"calc(100vh - 100px)"}),Dc=n=>({"ng-invalid ng-dirty":n}),Ga=()=>({}),Ka=n=>({"text-danger":n});function Vc(n,h){if(n&1){let t=q();d(0,"div",11)(1,"a",12),b(2,"Cancel"),u(),d(3,"p-button",13),J("onClick",function(){R(t);let c=P();return M(c.onSubmitJournalEntry())}),u()()}n&2&&(g(),y("routerLink",ve(1,Nc)))}function Ac(n,h){if(n&1&&(d(0,"div",36)(1,"div",37),b(2),u()()),n&2){let t=h.$implicit;g(2),he(" ",t.name," ")}}function Lc(n,h){if(n&1&&(d(0,"div",26),D(1,"p-radiobutton",38),d(2,"label",39),b(3),u()()),n&2){let t=h.$implicit;g(),$n("inputId","contactType-",t.key,""),y("value",t.key),g(),$n("for","contactType-",t.key,""),g(),he(" ",t.value," ")}}function Rc(n,h){n&1&&(d(0,"tr")(1,"th",40),b(2,"Account"),u(),d(3,"th",41),b(4,"Debit"),u(),d(5,"th",41),b(6,"Credit"),u(),d(7,"th",40),b(8,"Note"),u(),D(9,"th"),u())}function Mc(n,h){if(n&1&&(d(0,"div",48)(1,"div",17)(2,"span",49),b(3),u()(),d(4,"div",34)(5,"span",50),b(6),u()()()),n&2){let t=h.$implicit;g(3),he("(",t.code,")"),g(3),ae(t.name)}}function Bc(n,h){if(n&1){let t=q();d(0,"tr",42)(1,"td")(2,"p-select",43),I(3,Mc,7,2,"ng-template",null,3,W),u()(),d(5,"td"),D(6,"input",44),u(),d(7,"td"),D(8,"input",45),u(),d(9,"td"),D(10,"textarea",46),u(),d(11,"td")(12,"p-button",47),J("onClick",function(){let c=R(t).rowIndex,v=P(3);return M(v.removeItems(c))}),u()()()}if(n&2){let t=h.rowIndex,l=P(3);y("formGroupName",t),g(2),y("filter",!0)("options",l.journalEntryForm().options.accounts)("virtualScrollItemSize",50),g(4),y("autoNumeric",ve(7,Ga)),g(2),y("autoNumeric",ve(8,Ga)),g(4),y("text",!0)}}function zc(n,h){if(n&1&&(d(0,"span",56),b(1),Re(2,"number"),u()),n&2){let t=P(4);g(),he(" The total debit and credit amounts must be equal (Difference: ",Je(2,1,t.subTotalCredit()-t.subTotalDebit()),") ")}}function Uc(n,h){if(n&1){let t=q();d(0,"tr")(1,"td")(2,"div",51)(3,"div",11)(4,"p-button",52),J("onClick",function(){R(t);let c=P(3);return M(c.addItems())}),u()(),d(5,"span",53),b(6,"Total"),u()()(),d(7,"td",54),b(8),Re(9,"number"),u(),d(10,"td",54),b(11),Re(12,"number"),u(),d(13,"td"),I(14,zc,3,3,"span",55),u(),D(15,"td"),u()}if(n&2){let t=P(3);g(7),y("ngClass",Ne(9,Ka,t.subTotalCredit()!==t.subTotalDebit())),g(),he(" ",Je(9,5,t.subTotalDebit())," "),g(2),y("ngClass",Ne(11,Ka,t.subTotalCredit()!==t.subTotalDebit())),g(),he(" ",Je(12,7,t.subTotalCredit())," "),g(3),y("ngIf",t.subTotalCredit()!==t.subTotalDebit())}}function jc(n,h){if(n&1){let t=q();d(0,"div",15)(1,"p-panel")(2,"div",16)(3,"div",17)(4,"div",18)(5,"div",19)(6,"div",16)(7,"div",20)(8,"label",21),b(9,"Transaction Date"),u()(),D(10,"p-datepicker",22),u()(),d(11,"div",19)(12,"div",16)(13,"div",20)(14,"label",21),b(15,"Outlet"),u()(),d(16,"p-select",23),I(17,Ac,3,1,"ng-template",null,3,W),u()()(),d(19,"div",19)(20,"div",16)(21,"div",20)(22,"label",21),b(23,"Number"),u()(),D(24,"input",24),u()(),d(25,"div",19)(26,"div",16)(27,"div",20)(28,"label",21),b(29,"Contact"),u()(),d(30,"div",25),Ct(31,Lc,4,6,"div",26,Ht),u()()(),d(33,"div",27)(34,"div",16)(35,"div",20)(36,"label",28),b(37),u()(),d(38,"p-autocomplete",29),J("completeMethod",function(c){R(t);let v=P(2);return M(v.searchCustomer(c))}),u()()(),d(39,"div",19)(40,"div",16)(41,"div",20)(42,"label",28),b(43,"Upload"),u()(),d(44,"p-fileupload",30,4),J("onSelect",function(c){R(t);let v=P(2);return M(v.onUpload(c))}),u()()(),d(46,"div",27)(47,"div",16)(48,"div",17)(49,"label",31),b(50,"Note"),u()(),D(51,"textarea",32),u()()()()(),D(52,"hr"),d(53,"div",33)(54,"div",34)(55,"p-table",35),I(56,Rc,10,0,"ng-template",null,5,W)(58,Bc,13,9,"ng-template",null,6,W)(60,Uc,16,13,"ng-template",null,2,W),u()()()()()}if(n&2){let t=P(2);y("formGroup",t.form),g(),$e(ve(11,Ha)),g(9),y("showIcon",!0),g(6),y("options",t.outlets()),g(15),Et(t.contactType()),g(6),ae(+t.form.controls.order.controls.contactType.value==0?"Customer":"Supplier"),g(),y("suggestions",t.customerSuggestions())("placeholder",+t.form.controls.order.controls.contactType.value==0?"Search Customer":"Search Supplier"),g(13),y("ngClass",Ne(12,Dc,t.form.controls.order.controls.note.invalid&&(t.form.controls.order.controls.note.dirty||t.form.controls.order.controls.note.touched))),g(4),y("scrollable",!0)("value",t.form.controls.items.controls)}}function Jc(n,h){if(n&1&&(d(0,"p-scroll-panel"),I(1,jc,62,14,"div",14),u()),n&2){let t=P();$e(ve(3,Ha)),g(),y("ngIf",t.journalEntryForm())}}function $c(n,h){if(n&1){let t=q();d(0,"p-button",57),J("click",function(){R(t);let c=P();return M(c.uploadDialogVisible.set(!1))}),u(),d(1,"p-button",58),J("click",function(){R(t);let c=P();return M(c.uploadDialogVisible.set(!1))}),u()}n&2&&y("text",!0)}var go=(()=>{class n{constructor(){this.fileAttachment=Ve(new File([],"")),this.activatedRoute=K(ni),this.router=K(Cn),this.journalEntryService=K(Ke),this.journalEntryForm=Ve(null),this.customerSuggestions=Ve([]),this.itemsForm=Ve([]),this.subTotalDebit=ot(()=>this.itemsForm().reduce((t,l)=>t+ +l.debitAmount,0)),this.subTotalCredit=ot(()=>this.itemsForm().reduce((t,l)=>t+ +l.creditAmount,0)),this.contactType=Ve([{key:0,value:"Customer"},{key:1,value:"Supplier"}]),this.dialogService=K(tn),this.uploadDialogVisible=Ve(!1),this.messageService=K(Li),this.outlets=ot(()=>this.journalEntryForm()?.options?.outlets||[]),this.toasr=K(Ai),this.initializeFormEffect()}toggleDialog(){this.dialogService.open(zn,{header:"Create Customer/Supplier",width:"40vw",footer:"submit",closable:!0,dismissableMask:!0,modal:!0,showHeader:!0})}ngOnInit(){this.initializeForm(),this.loadJournalEntryForm()}onToggleUploadDialog(){this.uploadDialogVisible.update(t=>!t)}onUploadDialog(t){console.log(t),Wa.default.parse(t.currentFiles[0],{complete:l=>{console.log("Parsed result:",l)},error:l=>{console.error("Parsing error:",l)}})}initializeForm(){this.form=new Ft({order:new Ft({id:new B("",[He.required]),number:new B("",[He.required]),date:new B({value:new Date,disabled:!0},[He.required]),note:new B(""),entryTypeID:new B(1,[He.required]),referenceID:new B(""),referenceTypeID:new B(0,[He.required]),referenceText:new B(""),contactID:new B(""),detailReferenceID:new B(""),creatorID:new B("",[He.required]),created:new B("",[He.required]),modifierID:new B(""),modified:new B(""),outletID:new B(""),statusID:new B(0),contactName:new B(""),contactType:new B(0)}),items:new wn([],[He.required]),additionalAccountID:new B(""),file:new B(null)})}initializeFormEffect(){Fi(()=>{let t=this.journalEntryForm();t&&(this.form.patchValue({order:ye(me({},t.form.order),{entryTypeID:Number(t.form.order.entryTypeID===0&&1),referenceID:String(t.form.order.referenceID||Ie),contactID:String(t.form.order.contactID||""),detailReferenceID:String(t.form.order.detailReferenceID||Ie),contactName:String(t.form.order.contactName),date:ho.default.isDayjs(t.form.order.date)?t.form.order.date.toDate():(0,ho.default)().toDate(),modifierID:String(t.form.order.modifierID||Ie),statusID:t.form.order.statusID,modified:String(t.form.order.modified),outletID:String(t.form.order.outletID||Ie)}),additionalAccountID:t.form.additionalAccountID}),this.updateFormItems(t.form.items),this.form.controls.items.touched||this.itemsForm.set(this.form.controls.items.value),this.form.controls.items.valueChanges.subscribe(l=>{this.itemsForm.set(l)}))})}updateFormItems(t){let l=this.form.controls.items;l.clear(),t.forEach(c=>{l.push(new Ft({id:new B(c.id),journalID:new B(c.journalID),accountID:new B(c.accountID),debitAmount:new B(c.debitAmount),creditAmount:new B(c.creditAmount),index:new B(c.index),note:new B(c.note)}))})}loadJournalEntryForm(){this.activatedRoute.data.pipe(_t(t=>t.form),Pe(t=>this.journalEntryForm.set(t))).subscribe()}searchCustomer(t){switch(+this.form.controls.order.value.contactType){case 0:this.journalEntryService.getJournalEntryCustomerSuggestions(t.query).pipe(Pe(l=>this.customerSuggestions.set(l))).subscribe();break;case 1:this.journalEntryService.getJournalEntrySupplierSuggestions(t.query).pipe(Pe(l=>this.customerSuggestions.set(l))).subscribe();break;default:console.error("Invalid contact type");break}}addItems(){this.form.controls.items.push(new Ft({id:new B(Ie.toString()),journalID:new B(Ie.toString()),accountID:new B(Ie.toString()),debitAmount:new B(0),creditAmount:new B(0),index:new B(this.form.controls.items.length??0),note:new B("")}))}onSubmitJournalEntry(){if(console.log(this.form.value),this.form.invalid){this.markFormInvalidAndNotify();return}this.form.controls.order.controls.date.enable();let t=this.getCleanedFormValue();console.log("cleanedFormValue",t);let l=this.buildFormData(t);this.journalEntryService.submitJournalEntry(l).pipe(De("response"),Pe(()=>{this.form.controls.order.controls.date.disable(),this.router.navigate(["/journal/journal-entry"])}),Ci(c=>xi(()=>c)),De("error")).subscribe()}markFormInvalidAndNotify(){this.form.markAllAsTouched(),this.toasr.warning("Please fill in all required fields","Warning")}getCleanedFormValue(){let t=this.form.getRawValue(),l=Object.entries(t).reduce((c,[v,V])=>(v==="items"?c[v]=V.map(L=>ye(me({},L),{debitAmount:+L.debitAmount,creditAmount:+L.creditAmount})):v==="order"?c[v]=ye(me({},V),{contactID:V.contactID||Ie}):c[v]=V,c),{});return JSON.parse(JSON.stringify(l,(c,v)=>v==="null"?null:v))}buildFormData(t){let l=new FormData;return l.append("Data",JSON.stringify(t)),l.append("File",this.fileAttachment()),l}onUpload(t){console.log(t),this.fileAttachment.set(t.currentFiles[0])}removeItems(t){this.form.controls.items.removeAt(t)}onSwap(){let t=this.form.controls.items.value.map(l=>({id:l.id??"",journalID:l.journalID??"",accountID:l.accountID??"",debitAmount:l.creditAmount,creditAmount:l.debitAmount,index:l.index??0,note:l.note??""}));this.form.controls.items.setValue(t)}static{this.\u0275fac=function(l){return new(l||n)}}static{this.\u0275cmp=Oe({type:n,selectors:[["app-journal-entry-form",8,"page"]],features:[et([tn,Li])],attrs:Oc,decls:10,vars:5,consts:[["actionButton",""],["content",""],["footer",""],["item",""],["fu",""],["header",""],["body",""],["pageTitle",`Manual Journal Form
|
|
523
|
-
`],["header","Upload",3,"modal","visible"],["mode","basic","chooseLabel","Choose","chooseIcon","pi pi-upload",3,"onSelect"],["position","bottom-right"],[1,"d-flex","gap-2"],[1,"p-button","p-button-secondary","p-button-outlined",3,"routerLink"],["label","Submit",3,"onClick"],["class","d-flex flex-column row-gap-4",3,"formGroup",4,"ngIf"],[1,"d-flex","flex-column","row-gap-4",3,"formGroup"],[1,"row"],[1,"col-4"],[1,"row","row-gap-3"],["formGroupName","order",1,"col-12","col-lg-12"],[1,"col-4","d-flex","align-items-center"],["for","outlet",1,"m-0","fs-4","fw-normal"],["styleClass","w-100","dataType","string","dateFormat","dd M yy","size","small","formControlName","date",1,"col","p-0",3,"showIcon"],["filter","","filterBy","name","size","small","formControlName","outletID","optionLabel","name","optionValue","id","placeholder","Select an Outlet",1,"col","p-0",3,"options"],["pSize","small","type","text","pInputText","","formControlName","number","placeholder","Enter Number",1,"col"],[1,"col","d-flex","gap-2","p-0"],[1,"d-flex","align-items-center","gap-2"],["formGroupName","order",1,"col-12"],["for","",1,"m-0","fs-4","fw-normal"],["size","small","styleClass","w-100","inputStyleClass","w-100","formControlName","contactID","optionLabel","Value","optionValue","Key",1,"col","p-0",3,"completeMethod","suggestions","placeholder"],["styleClass","justify-content-start","mode","basic","chooseLabel","Choose","chooseIcon","fa-solid fa-upload","maxFileSize","1000000",1,"col","p-0",3,"onSelect"],["for","",1,"mb-0","fs-4","fw-normal"],["rows","4","cols","30","pSize","small","pTextarea","","formControlName","note","placeholder","Enter Note",1,"col","m-0",3,"ngClass"],["formArrayName","items",1,"row","mb-5"],[1,"col"],["scrollHeight","400px","showGridlines","",3,"scrollable","value"],[1,"flex","items-center","gap-2",2,"height","38x"],[1,"d-inline-block","text-truncate",2,"max-width","300px"],["formControlName","contactType","name","contactType",3,"value","inputId"],[1,"mb-0","d-flex","align-items-center","radiobutton-label",3,"for"],[2,"width","25%"],[1,"text-end",2,"width","25%"],[3,"formGroupName"],["appendTo","body","size","small","filterBy","code,name","formControlName","accountID","virtualScroll","","optionLabel","name","optionValue","id","placeholder","Select an account","styleClass","w-100","showClear","",3,"filter","options","virtualScrollItemSize"],["pSize","small","formControlName","debitAmount","type","text","pInputText","",1,"w-100","text-end",3,"autoNumeric"],["pSize","small","formControlName","creditAmount","type","text","pInputText","",1,"w-100","text-end",3,"autoNumeric"],["rows","1","cols","30","pTextarea","","formControlName","note",1,"w-100"],["size","small","icon","fa-solid fa-xmark","aria-label","Save","severity","danger",3,"onClick","text"],[1,"row","w-100"],[1,"h-full","align-middle"],[1,"text-truncate","d-inline-block","h-full","align-middle",2,"max-width","150px"],[1,"d-flex","justify-content-between","align-items-center"],["icon","fa-light fa-plus","size","small","label","Add",3,"onClick"],[2,"vertical-align","middle"],[1,"text-end","footer-total",3,"ngClass"],["class","text-danger",4,"ngIf"],[1,"text-danger"],["label","Cancel","severity","secondary",3,"click","text"],["label","OK(F2)","severity","primary",3,"click"]],template:function(l,c){if(l&1){let v=q();d(0,"app-main-panel",7),I(1,Vc,4,2,"ng-template",null,0,W)(3,Jc,2,4,"ng-template",null,1,W),u(),d(5,"p-dialog",8)(6,"p-fileupload",9),J("onSelect",function(L){return R(v),M(c.onUploadDialog(L))}),u(),I(7,$c,2,1,"ng-template",null,2,W),u(),D(9,"p-toast",10)}l&2&&(g(5),$e(ve(4,Ic)),y("modal",!0)("visible",c.uploadDialogVisible()))},dependencies:[ii,Qt,Yt,Xt,ei,ti,Ii,Ni,wt,Ge,bt,ct,Tt,ui,ci,li,si,Vt,Dt,Qi,Zi,Wi,Ki,Mt,Rt,At,ut,Lt,Tn,Fn,di,mi,Mn,en,bi,Gi,$i,Xi,Nn,ji,Ui,qi,Hi,It,Ot],encapsulation:2})}}return n})();var fo=n=>{let h=K(Ke),t=K(Yi);return t.show(),console.log("journalEntryResolver",n),h.getJournalEntryForm(n.paramMap.get("id")??"").pipe(De("response"),Pe(()=>t.hide()))};var Gc=()=>["edit"],Kc=()=>["/report/general-ledger"],Wc=n=>({id:n});function Hc(n,h){if(n&1){let t=q();d(0,"a",6),D(1,"i",7),b(2," Edit "),u(),d(3,"p-button",8),J("onClick",function(){R(t);let c=P();return M(c.onDeleteJournal())}),u()}n&2&&y("routerLink",ve(1,Gc))}function qc(n,h){n&1&&(d(0,"tr")(1,"th",17),b(2,"Code"),u(),d(3,"th"),b(4,"Account"),u(),d(5,"th",18),b(6,"Debit"),u(),d(7,"th",18),b(8,"Credit"),u()())}function Zc(n,h){if(n&1&&(d(0,"tr")(1,"td")(2,"a",19),b(3),u()(),d(4,"td"),b(5),u(),d(6,"td",20),b(7),Re(8,"number"),u(),d(9,"td",20),b(10),Re(11,"number"),u()()),n&2){let t=h.$implicit;g(2),y("routerLink",ve(10,Kc))("queryParams",Ne(11,Wc,t.accountID)),g(),ae(t.accountCode),g(2),ae(t.accountName),g(2),ae(Je(8,6,t.debitAmount)),g(3),ae(Je(11,8,t.creditAmount))}}function Qc(n,h){if(n&1&&(d(0,"tr")(1,"td",21),b(2,"Total"),u(),d(3,"td",20),b(4),Re(5,"number"),u(),d(6,"td",20),b(7),Re(8,"number"),u()()),n&2){let t=P(2);g(4),ae(Je(5,2,t.totalDebitAmount())),g(3),ae(Je(8,4,t.totalCreditAmount()))}}function Yc(n,h){if(n&1&&(d(0,"div",9)(1,"div",10)(2,"p-card",11)(3,"div",12)(4,"div",13)(5,"div",12)(6,"div",14),b(7,"Date"),u(),d(8,"div",13),b(9),Re(10,"date"),u()(),D(11,"hr"),d(12,"div",12)(13,"div",14),b(14,"Number"),u(),d(15,"div",13),b(16),u()(),D(17,"hr"),d(18,"div",12)(19,"div",14),b(20,"Outlet"),u(),d(21,"div",13),b(22),u()(),D(23,"hr"),d(24,"div",12)(25,"div",14),b(26,"File Attachment"),u(),d(27,"div",13)(28,"a",15),b(29,"File Attachment"),u()()()(),d(30,"div",13)(31,"div",12)(32,"div",14),b(33,"Document"),u(),D(34,"div",13),u(),D(35,"hr"),d(36,"div",12)(37,"div",14),b(38,"Contact"),u(),d(39,"div",13),b(40),u()(),D(41,"hr"),d(42,"div",12)(43,"div",14),b(44,"Note"),u(),d(45,"div",13),b(46),u()(),D(47,"hr"),u()()()(),d(48,"div",13)(49,"p-card")(50,"p-table",16),I(51,qc,9,0,"ng-template",null,2,W)(53,Zc,12,13,"ng-template",null,3,W)(55,Qc,9,6,"ng-template",null,4,W),u()()()()),n&2){let t,l,c,v,V,L,re=P();g(9),he(" ",_n(10,7,(t=re.journalEntryInfo())==null||t.order==null?null:t.order.date,"dd MMM yy")," "),g(7),ae((l=re.journalEntryInfo())==null||l.order==null?null:l.order.number),g(6),he(" ",(c=re.journalEntryInfo())==null||c.order==null?null:c.order.outletName," "),g(6),y("href",re.journalEntryInfo().order.fileAttachment,fn),g(12),he(" ",(v=re.journalEntryInfo())==null||v.order==null?null:v.order.contactName," "),g(6),ae((V=re.journalEntryInfo())==null||V.order==null?null:V.order.note),g(4),y("value",(L=re.journalEntryInfo())==null?null:L.items)}}var qa=(()=>{class n{constructor(){this.journalEntryService=K(Ke),this.route=K(ni),this.router=K(Cn),this.journalEntryInfo=Ve(null),this.totalDebitAmount=ot(()=>this.journalEntryInfo()?.items?.reduce((l,c)=>l+c.debitAmount,0)||0),this.totalCreditAmount=ot(()=>this.journalEntryInfo()?.items?.reduce((l,c)=>l+c.creditAmount,0)||0)}ngOnInit(){this.route.paramMap.pipe(pn(t=>t.has("id")),_t(t=>t.get("id")),yi(t=>this.journalEntryService.getJournalEntryInfo(t)),Pe(t=>this.journalEntryInfo.set(t)),De("response")).subscribe()}onDeleteJournal(){let t=this.route.snapshot.paramMap.get("id");t&&this.journalEntryService.deleteJournalEntry([t]).pipe(Pe(()=>{this.router.navigate(["/journal/journal-entry"])})).subscribe()}static{this.\u0275fac=function(l){return new(l||n)}}static{this.\u0275cmp=Oe({type:n,selectors:[["app-journal-entry-info"]],decls:5,vars:1,consts:[["actionButton",""],["content",""],["header",""],["body",""],["footer",""],[3,"pageTitle"],[1,"p-button","p-button-secondary","p-button-outlined",3,"routerLink"],[1,"fa-solid","fa-pen-to-square"],["label","Delete","severity","danger","icon","fa-solid fa-trash",3,"onClick"],[1,"row","row-gap-4"],[1,"col-12"],["header","Details"],[1,"row"],[1,"col"],[1,"col-2"],["target","_blank",1,"link","link-primary",3,"href"],[3,"value"],[2,"width","10%"],[1,"text-end",2,"width","10%"],[1,"link","link-primary",3,"routerLink","queryParams"],[1,"text-end"],["colspan","2",1,"text-end"]],template:function(l,c){if(l&1&&(d(0,"app-main-panel",5),I(1,Hc,4,2,"ng-template",null,0,W)(3,Yc,57,10,"ng-template",null,1,W),u()),l&2){let v;y("pageTitle","Journal #"+((v=c.journalEntryInfo())==null||v.order==null?null:v.order.number))}},dependencies:[wt,Ge,Tt,bn,Lt,On,Mt,Rt,It,Ot,At,ut],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return n})();var Za=n=>{let h=K(Ke),t=K(Yi);return t.show(),console.log("journalEntryResolver",n),h.getJournalRecordExpenseLoader().pipe(De("response"),Pe(()=>t.hide()))};var yo=vi(In());var Qa=vi(po());var Xc=()=>({width:"25rem"}),eu=()=>[".."],Ya=()=>({height:"calc(100vh - 100px)"}),vo=n=>({"ng-invalid ng-dirty":n}),tu=()=>({});function iu(n,h){if(n&1){let t=q();d(0,"div",11)(1,"a",12),b(2,"Cancel"),u(),d(3,"p-button",13),J("onClick",function(){R(t);let c=P();return M(c.onSubmitJournalEntry())}),u()()}n&2&&(g(),y("routerLink",ve(1,eu)))}function nu(n,h){if(n&1&&(d(0,"div",37)(1,"div",38),b(2),u()()),n&2){let t=h.$implicit;g(2),he(" ",t.name," ")}}function ou(n,h){if(n&1&&(d(0,"div",26),D(1,"p-radiobutton",39),d(2,"label",40),b(3),u()()),n&2){let t=h.$implicit;g(),y("value",t.key),g(2),ae(t.value)}}function au(n,h){if(n&1&&(d(0,"div",11)(1,"div",41)(2,"span",42),b(3),u()(),d(4,"div")(5,"span"),b(6,"-"),u()(),d(7,"span",43),b(8),u()()),n&2){let t=h.$implicit;g(3),he("(",t.code,")"),g(5),ae(t.name)}}function ru(n,h){if(n&1&&(d(0,"div",11)(1,"div",41)(2,"span",42),b(3),u()(),d(4,"div")(5,"span"),b(6,"-"),u()(),d(7,"div",41)(8,"span",44),b(9),u()()()),n&2){let t=h.$implicit;g(3),he("(",t.code,")"),g(6),ae(t.name)}}function su(n,h){n&1&&(d(0,"tr")(1,"th",45),b(2,"Account"),u(),d(3,"th",46),b(4,"Amount"),u(),d(5,"th"),b(6,"Note"),u(),D(7,"th",47),u())}function lu(n,h){if(n&1&&(d(0,"div",11)(1,"div",41)(2,"span",42),b(3),u()(),d(4,"div")(5,"span"),b(6,"-"),u()(),d(7,"div",41)(8,"span",54),b(9),u()()()),n&2){let t=h.$implicit;g(3),he("(",t.code,")"),g(6),ae(t.name)}}function cu(n,h){if(n&1&&(d(0,"div",11)(1,"div",41)(2,"span",42),b(3),u()(),d(4,"div")(5,"span"),b(6,"-"),u()(),d(7,"div",41)(8,"span",54),b(9),u()()()),n&2){let t=h.$implicit;g(3),he("(",t.code,")"),g(6),ae(t.name)}}function uu(n,h){if(n&1){let t=q();d(0,"tr",48)(1,"td")(2,"p-select",49),I(3,lu,10,2,"ng-template",null,4,W)(5,cu,10,2,"ng-template",null,3,W),u()(),d(7,"td"),D(8,"input",50),u(),d(9,"td"),D(10,"textarea",51),u(),d(11,"td")(12,"div",52)(13,"p-button",53),J("onClick",function(){let c=R(t).rowIndex,v=P(3);return M(v.removeItems(c))}),u()()()()}if(n&2){let t=h.rowIndex,l=P(3);y("formGroupName",t),g(2),y("options",l.JournalExpenseRecord().options.accounts),g(6),y("autoNumeric",ve(4,tu)),g(2),y("autoResize",!0)}}function mu(n,h){if(n&1){let t=q();d(0,"tr")(1,"td")(2,"div",55)(3,"div",11)(4,"p-button",56),J("onClick",function(){R(t);let c=P(3);return M(c.addItems())}),u()(),d(5,"span",57),b(6,"Total"),u()()(),d(7,"td",58),b(8),Re(9,"number"),u(),D(10,"td",59),u()}if(n&2){let t=P(3);g(8),he(" ",Je(9,1,t.subTotalDebit())," ")}}function du(n,h){if(n&1){let t=q();d(0,"div",15)(1,"p-panel")(2,"div",16)(3,"div",17)(4,"div",18)(5,"div",19)(6,"div",16)(7,"div",20)(8,"label",21),b(9,"Transaction Date"),u()(),D(10,"p-datepicker",22),u()(),d(11,"div",19)(12,"div",16)(13,"div",20)(14,"label",21),b(15,"Outlet"),u()(),d(16,"p-select",23),I(17,nu,3,1,"ng-template",null,3,W),u()()(),d(19,"div",19)(20,"div",16)(21,"div",20)(22,"label",21),b(23,"Number"),u()(),D(24,"input",24),u()(),d(25,"div",19)(26,"div",16)(27,"div",20)(28,"label",21),b(29,"Contact"),u()(),d(30,"div",25),Ct(31,ou,4,2,"div",26,Ht),u()()(),d(33,"div",27)(34,"div",16)(35,"div",20)(36,"label",28),b(37),u()(),d(38,"p-autocomplete",29),J("completeMethod",function(c){R(t);let v=P(2);return M(v.searchCustomer(c))}),u()()(),d(39,"div",30)(40,"div",16)(41,"div",20)(42,"label",28),b(43,"Payments"),u()(),d(44,"p-select",31),I(45,au,9,2,"ng-template",null,4,W)(47,ru,10,2,"ng-template",null,3,W),u()()(),d(49,"div",30)(50,"div",16)(51,"div",20)(52,"label",28),b(53,"Upload"),u()(),d(54,"p-fileupload",32,5),J("onSelect",function(c){R(t);let v=P(2);return M(v.onUpload(c))}),u()()(),d(56,"div",19)(57,"div",16)(58,"div",20)(59,"label",28),b(60,"Note"),u()(),D(61,"textarea",33),u()()()()(),D(62,"hr"),d(63,"div",34)(64,"div",35)(65,"p-table",36),I(66,su,8,0,"ng-template",null,6,W)(68,uu,14,5,"ng-template",null,7,W)(70,mu,11,3,"ng-template",null,2,W),u()()()()()}if(n&2){let t=P(2);y("formGroup",t.form),g(),$e(ve(15,Ya)),g(9),y("showIcon",!0)("ngClass",Ne(16,vo,t.form.controls.order.controls.date.invalid&&(t.form.controls.order.controls.date.dirty||t.form.controls.order.controls.date.touched))),g(6),y("options",t.outlets()),g(8),y("ngClass",Ne(18,vo,t.form.controls.order.controls.number.invalid&&(t.form.controls.order.controls.number.dirty||t.form.controls.order.controls.number.touched))),g(7),Et(t.contactType()),g(6),ae(+t.form.controls.order.controls.contactType.value==0?"Customer":"Supplier"),g(),y("suggestions",t.customerSuggestions())("placeholder",+t.form.controls.order.controls.contactType.value==0?"Search Customer":"Search Supplier"),g(6),y("options",t.JournalExpenseRecord().options.paymentAccounts),g(17),y("autoResize",!0)("ngClass",Ne(20,vo,t.form.controls.order.controls.note.invalid&&(t.form.controls.order.controls.note.dirty||t.form.controls.order.controls.note.touched))),g(4),y("scrollable",!0)("value",t.form.controls.items.controls)}}function pu(n,h){if(n&1&&(d(0,"p-scroll-panel"),I(1,du,72,22,"div",14),u()),n&2){let t=P();$e(ve(3,Ya)),g(),y("ngIf",t.JournalExpenseRecord())}}function hu(n,h){if(n&1){let t=q();d(0,"p-button",60),J("click",function(){R(t);let c=P();return M(c.uploadDialogVisible.set(!1))}),u(),d(1,"p-button",61),J("click",function(){R(t);let c=P();return M(c.uploadDialogVisible.set(!1))}),u()}n&2&&y("text",!0)}var Xa=(()=>{class n{constructor(){this.fileAttachment=Ve(new File([],"")),this.activatedRoute=K(ni),this.virtualScrollOptions={scrollHeight:"240px",itemSize:40,autoSize:!0},this.journalEntryService=K(Ke),this.JournalExpenseRecord=Ve(null),this.customerSuggestions=Ve([]),this.itemsForm=Ve([]),this.subTotalDebit=ot(()=>this.itemsForm().reduce((t,l)=>t+ +l.debitAmount,0)),this.subTotalCredit=ot(()=>this.itemsForm().reduce((t,l)=>t+ +l.creditAmount,0)),this.contactType=Ve([{key:0,value:"Customer"},{key:1,value:"Supplier"}]),this.dialogService=K(tn),this.uploadDialogVisible=Ve(!1),this.messageService=K(Li),this.outlets=ot(()=>this.JournalExpenseRecord()?.options?.entities||[]),this.toasr=K(Ai),this.initializeFormEffect()}toggleDialog(){this.dialogService.open(zn,{header:"Create Customer/Supplier",width:"40vw",footer:"submit",closable:!0,dismissableMask:!0,modal:!0,showHeader:!0})}ngOnInit(){this.initializeForm(),this.loadJournalExpenseRecord()}onToggleUploadDialog(){this.uploadDialogVisible.update(t=>!t)}onUploadDialog(t){console.log(t),Qa.default.parse(t.currentFiles[0],{complete:l=>{console.log("Parsed result:",l)},error:l=>{console.error("Parsing error:",l)}})}initializeForm(){this.form=new Ft({order:new Ft({id:new B("",[He.required]),number:new B("",[He.required]),date:new B({value:new Date,disabled:!0},[He.required]),note:new B(""),entryTypeID:new B(1,[He.required]),referenceID:new B(""),referenceTypeID:new B(0,[He.required]),referenceText:new B(""),contactID:new B(""),detailReferenceID:new B(""),creatorID:new B("",[He.required]),created:new B("",[He.required]),modifierID:new B(""),modified:new B(""),outletID:new B(""),statusID:new B(0),contactName:new B(""),contactType:new B(0)}),items:new wn([]),additionalAccountID:new B(""),file:new B(null)})}initializeFormEffect(){Fi(()=>{let t=this.JournalExpenseRecord();t&&(this.form.patchValue({order:ye(me({},t.form.order),{entryTypeID:Number(t.form.order.entryTypeID===0&&1),referenceID:String(t.form.order.referenceID||Ie),contactID:String(t.form.order.contactID||""),detailReferenceID:String(t.form.order.detailReferenceID||Ie),contactName:String(t.form.order.contactName),date:yo.default.isDayjs(t.form.order.date)?t.form.order.date.toDate():(0,yo.default)().toDate(),modifierID:String(t.form.order.modifierID||Ie),statusID:+t.form.order.statusID,modified:String(t.form.order.modified),outletID:String(t.form.order.outletID||Ie)}),additionalAccountID:t.form.additionalAccountID}),this.updateFormItems(t.form.items),this.form.controls.items.touched||this.itemsForm.set(this.form.controls.items.value),this.form.controls.items.valueChanges.subscribe(l=>{this.itemsForm.set(l)}))})}updateFormItems(t){let l=this.form.controls.items;l.clear(),t.forEach(c=>{l.push(new Ft({id:new B(c.id),journalID:new B(c.journalID),accountID:new B(c.accountID),debitAmount:new B(c.debitAmount),creditAmount:new B(c.creditAmount),index:new B(c.index),note:new B(c.note)}))})}loadJournalExpenseRecord(){this.activatedRoute.data.pipe(_t(t=>t.form),Pe(t=>this.JournalExpenseRecord.set(t))).subscribe()}searchCustomer(t){switch(+this.form.controls.order.value.contactType){case 0:this.journalEntryService.getJournalEntryCustomerSuggestions(t.query).pipe(Pe(l=>this.customerSuggestions.set(l))).subscribe();break;case 1:this.journalEntryService.getJournalEntrySupplierSuggestions(t.query).pipe(Pe(l=>this.customerSuggestions.set(l))).subscribe();break;default:console.error("Invalid contact type");break}}addItems(){this.form.controls.items.push(new Ft({id:new B(Ie.toString()),journalID:new B(Ie.toString()),accountID:new B(Ie.toString()),debitAmount:new B(0),creditAmount:new B(0),index:new B(this.form.controls.items.length??0),note:new B("")}))}onSubmitJournalEntry(){if(console.log(this.form.value),this.form.invalid){this.markFormInvalidAndNotify();return}this.form.controls.order.controls.date.enable();let t=this.getCleanedFormValue();console.log("cleanedFormValue",t);let l=this.buildFormData(t);this.journalEntryService.submitJournalEntry(l).pipe(De("response"),Pe(()=>this.form.controls.order.controls.date.disable()),Ci(c=>xi(()=>c)),De("error")).subscribe()}markFormInvalidAndNotify(){this.form.markAllAsTouched(),this.toasr.warning("Please fill in all required fields","Warning")}getCleanedFormValue(){let t=this.form.getRawValue(),l=Object.entries(t).reduce((c,[v,V])=>(v==="items"?c[v]=V.map(L=>ye(me({},L),{debitAmount:+L.debitAmount,creditAmount:+L.creditAmount})):v==="order"?c[v]=ye(me({},V),{contactID:V.contactID||Ie}):c[v]=V,c),{});return JSON.parse(JSON.stringify(l,(c,v)=>v==="null"?null:v))}buildFormData(t){let l=new FormData;return l.append("Data",JSON.stringify(t)),l.append("File",this.fileAttachment()),l}onUpload(t){console.log(t),this.fileAttachment.set(t.currentFiles[0])}removeItems(t){this.form.controls.items.removeAt(t)}onSwap(){let t=this.form.controls.items.value.map(l=>({id:l.id??"",journalID:l.journalID??"",accountID:l.accountID??"",debitAmount:l.creditAmount,creditAmount:l.debitAmount,index:l.index??0,note:l.note??""}));this.form.controls.items.setValue(t)}static{this.\u0275fac=function(l){return new(l||n)}}static{this.\u0275cmp=Oe({type:n,selectors:[["app-journal-receive-money"]],features:[et([tn,Li])],decls:10,vars:5,consts:[["actionButton",""],["content",""],["footer",""],["item",""],["selectedItem",""],["fu",""],["header",""],["body",""],["pageTitle",`Receive Money
|
|
524
|
-
`],["header","Upload",3,"modal","visible"],["mode","basic","chooseLabel","Choose","chooseIcon","pi pi-upload",3,"onSelect"],[1,"d-flex","gap-2"],[1,"p-button","p-button-secondary","p-button-outlined",3,"routerLink"],["label","Submit",3,"onClick"],["class","d-flex flex-column row-gap-4",3,"formGroup",4,"ngIf"],[1,"d-flex","flex-column","row-gap-4",3,"formGroup"],[1,"row"],[1,"col-4"],[1,"row","row-gap-3"],["formGroupName","order",1,"col-12","col-lg-12"],[1,"col-4","d-flex","align-items-center"],["for","outlet",1,"m-0","fs-4","fw-normal"],["styleClass","w-100","dataType","string","dateFormat","mm-dd-yy","size","small","formControlName","date",1,"col","p-0",3,"showIcon","ngClass"],["showClear","","filter","","filterBy","code,name","size","small","formControlName","outletID","optionLabel","name","optionValue","id","placeholder","Select an Outlet",1,"col",3,"options"],["pSize","small","type","text","pInputText","","formControlName","number","placeholder","Enter Number",1,"col",3,"ngClass"],[1,"col","d-flex","gap-3","p-0"],[1,"d-flex","align-items-center","gap-2"],["formGroupName","order",1,"col-12"],["for","",1,"m-0","fs-4","fw-normal"],["size","small","styleClass","w-100 ","inputStyleClass","w-100","formControlName","contactID","optionLabel","Value","optionValue","Key",1,"col","p-0",3,"completeMethod","suggestions","placeholder"],[1,"col-12","col-lg-12"],["filter","","filterBy","code,name","size","small","formControlName","additionalAccountID","optionLabel","name","optionValue","id","placeholder","Select Payment",1,"col",3,"options"],["styleClass","justify-content-start","mode","basic","chooseLabel","Choose","chooseIcon","fa-solid fa-upload","maxFileSize","1000000",1,"col","p-0",3,"onSelect"],["rows","4","cols","30","pTextarea","","formControlName","note","placeholder","Enter Note",1,"col",3,"autoResize","ngClass"],["formArrayName","items",1,"row"],[1,"col","mb-5"],["showGridlines","",3,"scrollable","value"],[1,"flex","items-center","gap-2",2,"height","38x"],[1,"d-inline-block","text-truncate",2,"max-width","300px"],["formControlName","contactType","name","contactType","inputId","ingredient1",3,"value"],["for","ingredient1",1,"mb-0","d-flex","align-items-center","radiobutton-label"],[1,""],[1,"h-full","align-middle"],[1,"d-inline-block","text-truncate",2,"max-width","150px"],[1,"d-inline-block","text-truncate",2,"max-width","200px"],[2,"width","25%"],[1,"text-end",2,"width","25%"],[2,"width","5%"],[3,"formGroupName"],["appendTo","body","size","small","formControlName","accountID","filter","","filterBy","code,name","optionLabel","name","optionValue","id","placeholder","Select an account","styleClass","w-100","showClear","",3,"options"],["pSize","small","formControlName","debitAmount","type","text","pInputText","",1,"w-100","text-end",3,"autoNumeric"],["pSize","small","rows","1","cols","30","pTextarea","","formControlName","note",1,"w-100",3,"autoResize"],[1,"d-flex","justify-content-center","align-items-center"],["size","small","icon","fa-solid fa-xmark","aria-label","Save","severity","danger",3,"onClick"],[1,"text-truncate","d-inline-block","h-full","align-middle"],[1,"d-flex","justify-content-between","align-items-center"],["icon","fa-light fa-plus","size","small","label","Add",3,"onClick"],[2,"vertical-align","middle"],[1,"text-end","footer-total"],["colspan","2"],["label","Cancel","severity","secondary",3,"click","text"],["label","OK(F2)","severity","primary",3,"click"]],template:function(l,c){if(l&1){let v=q();d(0,"app-main-panel",8),I(1,iu,4,2,"ng-template",null,0,W)(3,pu,2,4,"ng-template",null,1,W),u(),d(5,"p-dialog",9)(6,"p-fileupload",10),J("onSelect",function(L){return R(v),M(c.onUploadDialog(L))}),u(),I(7,hu,2,1,"ng-template",null,2,W),u(),D(9,"p-toast")}l&2&&(g(5),$e(ve(4,Xc)),y("modal",!0)("visible",c.uploadDialogVisible()))},dependencies:[ii,Qt,Yt,Xt,ei,ti,Ii,Ni,wt,Ge,bt,ct,Tt,ui,ci,li,si,Vt,Dt,Qi,Zi,Wi,Ki,Mt,Rt,At,ut,Lt,Tn,Fn,di,mi,Mn,en,bi,Gi,$i,Xi,Nn,qi,Hi,ji,Ui,It,Ot],encapsulation:2,changeDetection:0})}}return n})();var er=n=>{let h=K(Ke),t=K(Yi);return t.show(),console.log("journalEntryResolver",n),h.getJournalReceiveMoney().pipe(De("response"),Pe(()=>t.hide()))};var Pg=[{path:"",redirectTo:"journal-entry",pathMatch:"full"},{path:"journal-entry",children:[{path:"",component:Ea},{path:"add",component:go,resolve:{form:fo}},{path:":id",component:qa},{path:":id/edit",component:go,resolve:{form:fo}}]},{path:"record-expense",component:za,resolve:{form:Za}},{path:"receive-money",component:Xa,resolve:{form:er}},{path:"journal-deposit",component:Ua}];export{Pg as JOURNAL_ROUTES};
|