dealposbarcode 1.3.2 → 1.3.3
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/barcode/803.77a93585d46aefb0.js +1 -0
- package/barcode/assets/css/bootstrap_light.scss +13 -5
- package/barcode/assets/css/pos_variable.scss +5 -5
- package/barcode/assets/css/toastr-bootstrap-5.scss +237 -0
- package/barcode/index.html +3 -3
- package/barcode/main.313aa86944efb650.js +1 -0
- package/barcode/ngsw.json +14 -12
- package/barcode/{runtime.9c31bdd775a643e8.js → runtime.becddb656e0087b1.js} +1 -1
- package/barcode/styles.32eea4e6db3de98e.css +6 -0
- package/package.json +1 -1
- package/barcode/469.0cec287d20ffba2e.js +0 -1
- package/barcode/main.f6024d4f9941973d.js +0 -1
- package/barcode/styles.6d8f93377c27abf9.css +0 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunkbarcode_app=self.webpackChunkbarcode_app||[]).push([[803],{1813:function(H){H.exports=function(){return M={},S.m=A=[function(N,e,x){"use strict";x.r(e);var F={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(F.allowedTagList),Object.defineProperty(F,"allowedTagList",{configurable:!1,writable:!1}),F.keyCode={Backspace:8,Tab:9,Enter:13,Shift:16,Ctrl:17,Alt:18,Pause:19,CapsLock:20,Esc:27,Space:32,PageUp:33,PageDown:34,End:35,Home:36,LeftArrow:37,UpArrow:38,RightArrow:39,DownArrow:40,Insert:45,Delete:46,num0:48,num1:49,num2:50,num3:51,num4:52,num5:53,num6:54,num7:55,num8:56,num9:57,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,OSLeft:91,OSRight:92,ContextMenu:93,numpad0:96,numpad1:97,numpad2:98,numpad3:99,numpad4:100,numpad5:101,numpad6:102,numpad7:103,numpad8:104,numpad9:105,MultiplyNumpad:106,PlusNumpad:107,MinusNumpad:109,DotNumpad:110,SlashNumpad:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NumLock:144,ScrollLock:145,HyphenFirefox:173,MyComputer:182,MyCalculator:183,Semicolon:186,Equal:187,Comma:188,Hyphen:189,Dot:190,Slash:191,Backquote:192,LeftBracket:219,Backslash:220,RightBracket:221,Quote:222,Command:224,AltGraph:225,AndroidDefault:229},Object.freeze(F.keyCode),Object.defineProperty(F,"keyCode",{configurable:!1,writable:!1}),F.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(F.fromCharCodeKeyCode),Object.defineProperty(F,"fromCharCodeKeyCode",{configurable:!1,writable:!1}),F.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(F.keyName._allFnKeys),Object.freeze(F.keyName._someNonPrintableKeys),Object.freeze(F.keyName._directionKeys),Object.freeze(F.keyName),Object.defineProperty(F,"keyName",{configurable:!1,writable:!1}),Object.freeze(F);var O=F;function E(o){return function(h){if(Array.isArray(h))return u(h)}(o)||function(h){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(h))return Array.from(h)}(o)||s(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(){return(L=Object.assign||function(o){for(var h=1;h<arguments.length;h++){var g=arguments[h];for(var t in g)Object.prototype.hasOwnProperty.call(g,t)&&(o[t]=g[t])}return o}).apply(this,arguments)}function b(o,h){return function(g){if(Array.isArray(g))return g}(o)||function(g,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(g)){var i=[],r=!0,m=!1,p=void 0;try{for(var l,C=g[Symbol.iterator]();!(r=(l=C.next()).done)&&(i.push(l.value),!t||i.length!==t);r=!0);}catch(I){m=!0,p=I}finally{try{r||null==C.return||C.return()}finally{if(m)throw p}}return i}}(o,h)||s(o,h)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(o,h){if(o){if("string"==typeof o)return u(o,h);var g=Object.prototype.toString.call(o).slice(8,-1);return"Object"===g&&o.constructor&&(g=o.constructor.name),"Map"===g||"Set"===g?Array.from(g):"Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g)?u(o,h):void 0}}function u(o,h){(null==h||h>o.length)&&(h=o.length);for(var g=0,t=new Array(h);g<h;g++)t[g]=o[g];return t}function d(o){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(h){return typeof h}:function(h){return h&&"function"==typeof Symbol&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h})(o)}var n=function(){function o(){!function(h){if(!(h instanceof o))throw new TypeError("Cannot call a class as a function")}(this)}return function(h,g){for(var t=0;t<g.length;t++){var i=g[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(h,i.key,i)}}(o,[{key:"isNull",value:function(h){return null===h}},{key:"isUndefined",value:function(h){return void 0===h}},{key:"isUndefinedOrNullOrEmpty",value:function(h){return null==h||""===h}},{key:"isString",value:function(h){return"string"==typeof h||h instanceof String}},{key:"isEmptyString",value:function(h){return""===h}},{key:"isBoolean",value:function(h){return"boolean"==typeof h}},{key:"isTrueOrFalseString",value:function(h){var g=String(h).toLowerCase();return"true"===g||"false"===g}},{key:"isObject",value:function(h){return"object"===d(h)&&null!==h&&!Array.isArray(h)}},{key:"isEmptyObj",value:function(h){for(var g in h)if(Object.prototype.hasOwnProperty.call(h,g))return!1;return!0}},{key:"isNumberStrict",value:function(h){return"number"==typeof h}},{key:"isNumber",value:function(h){return!this.isArray(h)&&!isNaN(parseFloat(h))&&isFinite(h)}},{key:"isDigit",value:function(h){return/\d/.test(h)}},{key:"isNumberOrArabic",value:function(h){var g=this.arabicToLatinNumbers(h,!1,!0,!0);return this.isNumber(g)}},{key:"isInt",value:function(h){return"number"==typeof h&&parseFloat(h)===parseInt(h,10)&&!isNaN(h)}},{key:"isFunction",value:function(h){return"function"==typeof h}},{key:"isIE11",value:function(){return"undefined"!=typeof window&&!!window.MSInputMethodContext&&!!document.documentMode}},{key:"contains",value:function(h,g){return!(!this.isString(h)||!this.isString(g)||""===h||""===g)&&-1!==h.indexOf(g)}},{key:"isInArray",value:function(h,g){return!(!this.isArray(g)||g===[]||this.isUndefined(h))&&-1!==g.indexOf(h)}},{key:"isArray",value:function(h){if("[object Array]"===Object.prototype.toString.call([]))return Array.isArray(h)||"object"===d(h)&&"[object Array]"===Object.prototype.toString.call(h);throw new Error("toString message changed for Object Array")}},{key:"isElement",value:function(h){return"undefined"!=typeof Element&&h instanceof Element}},{key:"isInputElement",value:function(h){return this.isElement(h)&&"input"===h.tagName.toLowerCase()}},{key:"decimalPlaces",value:function(h){var g=b(h.split("."),2)[1];return this.isUndefined(g)?0:g.length}},{key:"indexFirstNonZeroDecimalPlace",value:function(h){var g=b(String(Math.abs(h)).split("."),2)[1];if(this.isUndefined(g))return 0;var t=g.lastIndexOf("0");return-1===t?t=0:t+=2,t}},{key:"keyCodeNumber",value:function(h){return void 0===h.which?h.keyCode:h.which}},{key:"character",value:function(h){var g;if("Unidentified"===h.key||void 0===h.key||this.isSeleniumBot()){var t=this.keyCodeNumber(h);if(t===O.keyCode.AndroidDefault)return O.keyName.AndroidDefault;var i=O.fromCharCodeKeyCode[t];g=o.isUndefinedOrNullOrEmpty(i)?String.fromCharCode(t):i}else{var r;switch(h.key){case"Add":g=O.keyName.NumpadPlus;break;case"Apps":g=O.keyName.ContextMenu;break;case"Crsel":g=O.keyName.CrSel;break;case"Decimal":g=h.char?h.char:O.keyName.NumpadDot;break;case"Del":g="firefox"===(r=this.browser()).name&&r.version<=36||"ie"===r.name&&r.version<=9?O.keyName.Dot:O.keyName.Delete;break;case"Divide":g=O.keyName.NumpadSlash;break;case"Down":g=O.keyName.DownArrow;break;case"Esc":g=O.keyName.Esc;break;case"Exsel":g=O.keyName.ExSel;break;case"Left":g=O.keyName.LeftArrow;break;case"Meta":case"Super":g=O.keyName.OSLeft;break;case"Multiply":g=O.keyName.NumpadMultiply;break;case"Right":g=O.keyName.RightArrow;break;case"Spacebar":g=O.keyName.Space;break;case"Subtract":g=O.keyName.NumpadMinus;break;case"Up":g=O.keyName.UpArrow;break;default:g=h.key}}return g}},{key:"browser",value:function(){var h,g=navigator.userAgent,t=g.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(t[1])?{name:"ie",version:(h=/\brv[ :]+(\d+)/g.exec(g)||[])[1]||""}:"Chrome"===t[1]&&null!==(h=g.match(/\b(OPR|Edge)\/(\d+)/))?{name:h[1].replace("OPR","opera"),version:h[2]}:(t=t[2]?[t[1],t[2]]:[navigator.appName,navigator.appVersion,"-?"],null!==(h=g.match(/version\/(\d+)/i))&&t.splice(1,1,h[1]),{name:t[0].toLowerCase(),version:t[1]})}},{key:"isSeleniumBot",value:function(){return!0===window.navigator.webdriver}},{key:"isNegative",value:function(h,g,t){var i=1<arguments.length&&void 0!==g?g:"-",r=!(2<arguments.length&&void 0!==t)||t;return h===i||""!==h&&(o.isNumber(h)?h<0:r?this.contains(h,i):this.isNegativeStrict(h,i))}},{key:"isNegativeStrict",value:function(h,g){var t=1<arguments.length&&void 0!==g?g:"-";return h.charAt(0)===t}},{key:"isNegativeWithBrackets",value:function(h,g,t){return h.charAt(0)===g&&this.contains(h,t)}},{key:"isZeroOrHasNoValue",value:function(h){return!/[1-9]/g.test(h)}},{key:"setRawNegativeSign",value:function(h){return this.isNegativeStrict(h,"-")?h:"-".concat(h)}},{key:"replaceCharAt",value:function(h,g,t){return"".concat(h.substr(0,g)).concat(t).concat(h.substr(g+t.length))}},{key:"clampToRangeLimits",value:function(h,g){return Math.max(g.minimumValue,Math.min(g.maximumValue,h))}},{key:"countNumberCharactersOnTheCaretLeftSide",value:function(h,g,t){for(var i=new RegExp("[0-9".concat(t,"-]")),r=0,m=0;m<g;m++)i.test(h[m])&&r++;return r}},{key:"findCaretPositionInFormattedNumber",value:function(h,g,t,i){var r,m=t.length,p=h.length,l=0;for(r=0;r<m&&l<p&&l<g;r++)(h[l]===t[r]||"."===h[l]&&t[r]===i)&&l++;return r}},{key:"countCharInText",value:function(h,g){for(var t=0,i=0;i<g.length;i++)g[i]===h&&t++;return t}},{key:"convertCharacterCountToIndexPosition",value:function(h){return Math.max(h,h-1)}},{key:"getElementSelection",value:function(h){var g,t={};try{g=this.isUndefined(h.selectionStart)}catch(r){g=!1}try{if(g){var i=window.getSelection().getRangeAt(0);t.start=i.startOffset,t.end=i.endOffset,t.length=t.end-t.start}else t.start=h.selectionStart,t.end=h.selectionEnd,t.length=t.end-t.start}catch(r){t.start=0,t.end=0,t.length=0}return t}},{key:"setElementSelection",value:function(h,g,t){var i=2<arguments.length&&void 0!==t?t:null;if(this.isUndefinedOrNullOrEmpty(i)&&(i=g),this.isInputElement(h))h.setSelectionRange(g,i);else if(!o.isNull(h.firstChild)){var r=document.createRange();r.setStart(h.firstChild,g),r.setEnd(h.firstChild,i);var m=window.getSelection();m.removeAllRanges(),m.addRange(r)}}},{key:"throwError",value:function(h){throw new Error(h)}},{key:"warning",value:function(h,g){1<arguments.length&&void 0!==g&&!g||console.warn("Warning: ".concat(h))}},{key:"isWheelUpEvent",value:function(h){return h.deltaY||this.throwError("The event passed as a parameter is not a valid wheel event, '".concat(h.type,"' given.")),h.deltaY<0}},{key:"isWheelDownEvent",value:function(h){return h.deltaY||this.throwError("The event passed as a parameter is not a valid wheel event, '".concat(h.type,"' given.")),0<h.deltaY}},{key:"forceDecimalPlaces",value:function(h,g){var t=b(String(h).split("."),2),r=t[1];return r?"".concat(t[0],".").concat(r.substr(0,g)):h}},{key:"roundToNearest",value:function(h,g){var t=1<arguments.length&&void 0!==g?g:1e3;return 0===h?0:(0===t&&this.throwError("The `stepPlace` used to round is equal to `0`. This value must not be equal to zero."),Math.round(h/t)*t)}},{key:"modifyAndRoundToNearestAuto",value:function(h,g,t){h=Number(this.forceDecimalPlaces(h,t));var i=Math.abs(h);if(0<=i&&i<1){var r,m=Math.pow(10,-t);if(0===h)return g?m:-m;var l=t,C=this.indexFirstNonZeroDecimalPlace(h);return r=l-1<=C?m:Math.pow(10,-(C+1)),this.roundToNearest(g?h+r:h-r,r)}h=parseInt(h,10);var I,q=Math.abs(h).toString().length;switch(q){case 1:I=0;break;case 2:case 3:I=1;break;case 4:case 5:I=2;break;default:I=q-3}var v,D=Math.pow(10,I);return(v=g?h+D:h-D)<=10&&-10<=v?v:this.roundToNearest(v,D)}},{key:"addAndRoundToNearestAuto",value:function(h,g){return this.modifyAndRoundToNearestAuto(h,!0,g)}},{key:"subtractAndRoundToNearestAuto",value:function(h,g){return this.modifyAndRoundToNearestAuto(h,!1,g)}},{key:"arabicToLatinNumbers",value:function(h,g,t,i){var r=!(1<arguments.length&&void 0!==g)||g,m=2<arguments.length&&void 0!==t&&t,p=3<arguments.length&&void 0!==i&&i;if(this.isNull(h))return h;var l=h.toString();if(""===l)return h;if(null===l.match(/[\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u06f4\u06f5\u06f6]/g))return r&&(l=Number(l)),l;m&&(l=l.replace(/\u066b/,".")),p&&(l=l.replace(/\u066c/g,"")),l=l.replace(/[\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669]/g,function(I){return I.charCodeAt(0)-1632}).replace(/[\u06f0\u06f1\u06f2\u06f3\u06f4\u06f5\u06f6\u06f7\u06f8\u06f9]/g,function(I){return I.charCodeAt(0)-1776});var C=Number(l);return isNaN(C)?C:(r&&(l=C),l)}},{key:"triggerEvent",value:function(h,g,t,i,r){var m,p=1<arguments.length&&void 0!==g?g:document,l=2<arguments.length&&void 0!==t?t:null,C=!(3<arguments.length&&void 0!==i)||i,I=!(4<arguments.length&&void 0!==r)||r;window.CustomEvent?m=new CustomEvent(h,{detail:l,bubbles:C,cancelable:I}):(m=document.createEvent("CustomEvent")).initCustomEvent(h,C,I,{detail:l}),p.dispatchEvent(m)}},{key:"parseStr",value:function(h){var g,t,i,r,m={};if(0===h&&1/h<0&&(h="-0"),h=h.toString(),this.isNegativeStrict(h,"-")?(h=h.slice(1),m.s=-1):m.s=1,-1<(g=h.indexOf("."))&&(h=h.replace(".","")),g<0&&(g=h.length),(t=-1===h.search(/[1-9]/i)?h.length:h.search(/[1-9]/i))===(i=h.length))m.e=0,m.c=[0];else{for(r=i-1;"0"===h.charAt(r);--r)--i;for(--i,m.e=g-t-1,m.c=[],g=0;t<=i;t+=1)m.c[g]=+h.charAt(t),g+=1}return m}},{key:"testMinMax",value:function(h,g){var t=g.c,i=h.c,r=g.s,m=h.s,p=g.e,l=h.e;if(!t[0]||!i[0])return t[0]?r:i[0]?-m:0;if(r!==m)return r;var C=r<0;if(p!==l)return l<p^C?1:-1;for(r=-1,m=(p=t.length)<(l=i.length)?p:l,r+=1;r<m;r+=1)if(t[r]!==i[r])return t[r]>i[r]^C?1:-1;return p===l?0:l<p^C?1:-1}},{key:"randomString",value:function(h){var g=0<arguments.length&&void 0!==h?h:5;return Math.random().toString(36).substr(2,g)}},{key:"domElement",value:function(h){return o.isString(h)?document.querySelector(h):h}},{key:"getElementValue",value:function(h){return"input"===h.tagName.toLowerCase()?h.value:this.text(h)}},{key:"setElementValue",value:function(h,g){var t=1<arguments.length&&void 0!==g?g:null;"input"===h.tagName.toLowerCase()?h.value=t:h.textContent=t}},{key:"setInvalidState",value:function(h,g){var t=1<arguments.length&&void 0!==g?g:"Invalid";""!==t&&!this.isNull(t)||this.throwError("Cannot set the invalid state with an empty message."),h.setCustomValidity(t)}},{key:"setValidState",value:function(h){h.setCustomValidity("")}},{key:"cloneObject",value:function(h){return L({},h)}},{key:"camelize",value:function(h,g,t,i){var r=1<arguments.length&&void 0!==g?g:"-",m=!(2<arguments.length&&void 0!==t)||t,p=!(3<arguments.length&&void 0!==i)||i;if(this.isNull(h))return null;m&&(h=h.replace(/^data-/,""));var l=h.split(r).map(function(C){return"".concat(C.charAt(0).toUpperCase()).concat(C.slice(1))});return l=l.join(""),p&&(l="".concat(l.charAt(0).toLowerCase()).concat(l.slice(1))),l}},{key:"text",value:function(h){var g=h.nodeType;return g===Node.ELEMENT_NODE||g===Node.DOCUMENT_NODE||g===Node.DOCUMENT_FRAGMENT_NODE?h.textContent:g===Node.TEXT_NODE?h.nodeValue:""}},{key:"setText",value:function(h,g){var t=h.nodeType;t!==Node.ELEMENT_NODE&&t!==Node.DOCUMENT_NODE&&t!==Node.DOCUMENT_FRAGMENT_NODE||(h.textContent=g)}},{key:"filterOut",value:function(h,g){var t=this;return h.filter(function(i){return!t.isInArray(i,g)})}},{key:"trimPaddedZerosFromDecimalPlaces",value:function(h){if(""===(h=String(h)))return"";var g=b(h.split("."),2),t=g[0],i=g[1];if(this.isUndefinedOrNullOrEmpty(i))return t;var r=i.replace(/0+$/g,"");return""===r?t:"".concat(t,".").concat(r)}},{key:"getHoveredElement",value:function(){var h=E(document.querySelectorAll(":hover"));return h[h.length-1]}},{key:"arrayTrim",value:function(h,g){var t=h.length;return 0===t||t<g?h:g<0?[]:(h.length=parseInt(g,10),h)}},{key:"arrayUnique",value:function(){var h;return E(new Set((h=[]).concat.apply(h,arguments)))}},{key:"mergeMaps",value:function(){for(var h=arguments.length,g=new Array(h),t=0;t<h;t++)g[t]=arguments[t];return new Map(g.reduce(function(i,r){return i.concat(E(r))},[]))}},{key:"objectKeyLookup",value:function(h,g){var t=Object.entries(h).find(function(r){return r[1]===g}),i=null;return void 0!==t&&(i=t[0]),i}},{key:"insertAt",value:function(h,g,t){if(t>(h=String(h)).length)throw new Error("The given index is out of the string range.");if(1!==g.length)throw new Error("The given string `char` should be only one character long.");return""===h&&0===t?g:"".concat(h.slice(0,t)).concat(g).concat(h.slice(t))}},{key:"scientificToDecimal",value:function(h){var g=Number(h);if(isNaN(g))return NaN;if(h=String(h),!this.contains(h,"e")&&!this.contains(h,"E"))return h;var t=b(h.split(/e/i),2),i=t[0],r=t[1],m=i<0;m&&(i=i.replace("-",""));var p=+r<0;p&&(r=r.replace("-",""));var l,C=b(i.split(/\./),2),I=C[0],q=C[1];return l=p?(l=I.length>r?this.insertAt(I,".",I.length-r):"0.".concat("0".repeat(r-I.length)).concat(I),"".concat(l).concat(q||"")):q?(i="".concat(I).concat(q),r<q.length?this.insertAt(i,".",+r+I.length):"".concat(i).concat("0".repeat(r-q.length))):(i=i.replace(".",""),"".concat(i).concat("0".repeat(Number(r)))),m&&(l="-".concat(l)),l}}]),o}(),f=function(){function o(h){if(function(g){if(!(g instanceof o))throw new TypeError("Cannot call a class as a function")}(this),null===h)throw new Error("Invalid AST")}return function(h,g){for(var t=0;t<g.length;t++){var i=g[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(h,i.key,i)}}(o.prototype,[{key:"evaluate",value:function(h){if(null==h)throw new Error("Invalid AST sub-tree");if("number"===h.type)return h.value;if("unaryMinus"===h.type)return-this.evaluate(h.left);var g=this.evaluate(h.left),t=this.evaluate(h.right);switch(h.type){case"op_+":return Number(g)+Number(t);case"op_-":return g-t;case"op_*":return g*t;case"op_/":return g/t;default:throw new Error("Invalid operator '".concat(h.type,"'"))}}}]),o}(),P=function(){function o(){!function(h){if(!(h instanceof o))throw new TypeError("Cannot call a class as a function")}(this)}return function(h,g){for(var t=0;t<g.length;t++){var i=g[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(h,i.key,i)}}(o,[{key:"createNode",value:function(h,g,t){var i=new o;return i.type=h,i.left=g,i.right=t,i}},{key:"createUnaryNode",value:function(h){var g=new o;return g.type="unaryMinus",g.left=h,g.right=null,g}},{key:"createLeaf",value:function(h){var g=new o;return g.type="number",g.value=h,g}}]),o}();function T(o,h,g){(function(t){if(!(t instanceof T))throw new TypeError("Cannot call a class as a function")})(this),this.type=o,this.value=h,this.symbol=g}var Z=function(){function o(h){(function(g){if(!(g instanceof o))throw new TypeError("Cannot call a class as a function")})(this),this.text=h,this.textLength=h.length,this.index=0,this.token=new T("Error",0,0)}return function(h,g){for(var t=0;t<g.length;t++){var i=g[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(h,i.key,i)}}(o.prototype,[{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(h){var g=0<arguments.length&&void 0!==h?h:".";if(this._skipSpaces(),this.textLength===this.index)return this.token.type="EOT",this.token;if(n.isDigit(this.text[this.index]))return this.token.type="num",this.token.value=this._getNumber(g),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("Error"===this.token.type)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(h){this._skipSpaces();for(var g=this.index;this.index<=this.textLength&&n.isDigit(this.text[this.index]);)this.index++;for(this.text[this.index]===h&&this.index++;this.index<=this.textLength&&n.isDigit(this.text[this.index]);)this.index++;if(this.index===g)throw new Error("No number has been found while it was expected");return this.text.substring(g,this.index).replace(h,".")}}]),o}(),U=function(){function o(h){var g=1<arguments.length&&void 0!==arguments[1]?arguments[1]:".";return function(t){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this),this.text=h,this.decimalCharacter=g,this.lexer=new Z(h),this.token=this.lexer.getNextToken(this.decimalCharacter),this._exp()}return function(h,g){for(var t=0;t<g.length;t++){var i=g[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(h,i.key,i)}}(o.prototype,[{key:"_exp",value:function(){var h=this._term(),g=this._moreExp();return P.createNode("op_+",h,g)}},{key:"_moreExp",value:function(){var h,g;switch(this.token.type){case"+":return this.token=this.lexer.getNextToken(this.decimalCharacter),h=this._term(),g=this._moreExp(),P.createNode("op_+",g,h);case"-":return this.token=this.lexer.getNextToken(this.decimalCharacter),h=this._term(),g=this._moreExp(),P.createNode("op_-",g,h)}return P.createLeaf(0)}},{key:"_term",value:function(){var h=this._factor(),g=this._moreTerms();return P.createNode("op_*",h,g)}},{key:"_moreTerms",value:function(){var h,g;switch(this.token.type){case"*":return this.token=this.lexer.getNextToken(this.decimalCharacter),h=this._factor(),g=this._moreTerms(),P.createNode("op_*",g,h);case"/":return this.token=this.lexer.getNextToken(this.decimalCharacter),h=this._factor(),g=this._moreTerms(),P.createNode("op_/",g,h)}return P.createLeaf(1)}},{key:"_factor",value:function(){var h,g,t;switch(this.token.type){case"num":return t=this.token.value,this.token=this.lexer.getNextToken(this.decimalCharacter),P.createLeaf(t);case"-":return this.token=this.lexer.getNextToken(this.decimalCharacter),g=this._factor(),P.createUnaryNode(g);case"(":return this.token=this.lexer.getNextToken(this.decimalCharacter),h=this._exp(),this._match(")"),h;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(h){var g=this.lexer.getIndex()-1;if(this.text[g]!==h)throw new Error("Unexpected token '".concat(this.token.symbol,"' at position '").concat(g,"' in the match function"));this.token=this.lexer.getNextToken(this.decimalCharacter)}}]),o}();function G(o){return function(h){if(Array.isArray(h))return de(h)}(o)||function(h){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(h))return Array.from(h)}(o)||$(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function K(o,h){return function(g){if(Array.isArray(g))return g}(o)||function(g,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(g)){var i=[],r=!0,m=!1,p=void 0;try{for(var l,C=g[Symbol.iterator]();!(r=(l=C.next()).done)&&(i.push(l.value),!t||i.length!==t);r=!0);}catch(I){m=!0,p=I}finally{try{r||null==C.return||C.return()}finally{if(m)throw p}}return i}}(o,h)||$(o,h)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $(o,h){if(o){if("string"==typeof o)return de(o,h);var g=Object.prototype.toString.call(o).slice(8,-1);return"Object"===g&&o.constructor&&(g=o.constructor.name),"Map"===g||"Set"===g?Array.from(g):"Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g)?de(o,h):void 0}}function de(o,h){(null==h||h>o.length)&&(h=o.length);for(var g=0,t=new Array(h);g<h;g++)t[g]=o[g];return t}function ae(){return(ae=Object.assign||function(o){for(var h=1;h<arguments.length;h++){var g=arguments[h];for(var t in g)Object.prototype.hasOwnProperty.call(g,t)&&(o[t]=g[t])}return o}).apply(this,arguments)}function re(o){return(re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(h){return typeof h}:function(h){return h&&"function"==typeof Symbol&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h})(o)}function ge(o,h){for(var g=0;g<h.length;g++){var t=h[g];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(o,t.key,t)}}var J,k=function(){function o(){var t=this,i=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,m=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;!function(v){if(!(v instanceof o))throw new TypeError("Cannot call a class as a function")}(this);var p=o._setArgumentsValues(i,r,m),C=p.initialValue,I=p.userOptions;if(this.domElement=p.domElement,this.defaultRawValue="",this._setSettings(I,!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(C);else{var q;if(n.isNull(C))switch(this.settings.emptyInputBehavior){case o.options.emptyInputBehavior.min:q=this.settings.minimumValue;break;case o.options.emptyInputBehavior.max:q=this.settings.maximumValue;break;case o.options.emptyInputBehavior.zero:q="0";break;case o.options.emptyInputBehavior.focus:case o.options.emptyInputBehavior.press:case o.options.emptyInputBehavior.always:case o.options.emptyInputBehavior.null:q="";break;default:q=this.settings.emptyInputBehavior}else q=C;this._setElementAndRawValue(q)}this.runOnce=!0,this.hasEventListeners=!1,(this.isInputElement||this.isContentEditable)&&(this.settings.noEventListeners||this._createEventListeners(),this._setWritePermissions(!0)),this._saveInitialValues(C),this.sessionStorageAvailable=this.constructor._storageTest(),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(v,D){var R=1<arguments.length&&void 0!==D?D:null;t.autoNumericLocalList.forEach(function(B){B.set(v,R)})},setUnformatted:function(v,D){var R=1<arguments.length&&void 0!==D?D:null;t.autoNumericLocalList.forEach(function(B){B.setUnformatted(v,R)})},get:function(v){var D=0<arguments.length&&void 0!==v?v:null,R=[];return t.autoNumericLocalList.forEach(function(B){R.push(B.get())}),t._executeCallback(R,D),R},getNumericString:function(v){var D=0<arguments.length&&void 0!==v?v:null,R=[];return t.autoNumericLocalList.forEach(function(B){R.push(B.getNumericString())}),t._executeCallback(R,D),R},getFormatted:function(v){var D=0<arguments.length&&void 0!==v?v:null,R=[];return t.autoNumericLocalList.forEach(function(B){R.push(B.getFormatted())}),t._executeCallback(R,D),R},getNumber:function(v){var D=0<arguments.length&&void 0!==v?v:null,R=[];return t.autoNumericLocalList.forEach(function(B){R.push(B.getNumber())}),t._executeCallback(R,D),R},getLocalized:function(v){var D=0<arguments.length&&void 0!==v?v:null,R=[];return t.autoNumericLocalList.forEach(function(B){R.push(B.getLocalized())}),t._executeCallback(R,D),R},reformat:function(){t.autoNumericLocalList.forEach(function(v){v.reformat()})},unformat:function(){t.autoNumericLocalList.forEach(function(v){v.unformat()})},unformatLocalized:function(v){var D=0<arguments.length&&void 0!==v?v:null;t.autoNumericLocalList.forEach(function(R){R.unformatLocalized(D)})},update:function(){for(var v=arguments.length,D=new Array(v),R=0;R<v;R++)D[R]=arguments[R];t.autoNumericLocalList.forEach(function(B){B.update.apply(B,D)})},isPristine:function(){var v=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],D=!0;return t.autoNumericLocalList.forEach(function(R){D&&!R.isPristine(v)&&(D=!1)}),D},clear:function(v){var D=0<arguments.length&&void 0!==v&&v;t.autoNumericLocalList.forEach(function(R){R.clear(D)})},remove:function(){t.autoNumericLocalList.forEach(function(v){v.remove()})},wipe:function(){t.autoNumericLocalList.forEach(function(v){v.wipe()})},nuke:function(){t.autoNumericLocalList.forEach(function(v){v.nuke()})},has:function(v){return t.autoNumericLocalList.has(v instanceof o?v.node():v)},addObject:function(v){var D,R;R=v instanceof o?(D=v.node(),v):o.getAutoNumericElement(D=v),t._hasLocalList()||t._createLocalList();var B,j=R._getLocalList();0===j.size&&(R._createLocalList(),j=R._getLocalList()),(B=j instanceof Map?n.mergeMaps(t._getLocalList(),j):(t._addToLocalList(D,R),t._getLocalList())).forEach(function(z){z._setLocalList(B)})},removeObject:function(v,D){var R,B,j=1<arguments.length&&void 0!==D&&D;B=v instanceof o?(R=v.node(),v):o.getAutoNumericElement(R=v);var z=t.autoNumericLocalList;t.autoNumericLocalList.delete(R),z.forEach(function(ee){ee._setLocalList(t.autoNumericLocalList)}),j||R!==t.node()?B._createLocalList():B._setLocalList(new Map)},empty:function(v){var D=0<arguments.length&&void 0!==v&&v;t.autoNumericLocalList.forEach(function(R){D?R._createLocalList():R._setLocalList(new Map)})},elements:function(){var v=[];return t.autoNumericLocalList.forEach(function(D){v.push(D.node())}),v},getList:function(){return t.autoNumericLocalList},size:function(){return t.autoNumericLocalList.size}},this.options={reset:function(){return t.settings={rawValue:t.defaultRawValue},t.update(o.defaultSettings),t},allowDecimalPadding:function(v){return t.update({allowDecimalPadding:v}),t},alwaysAllowDecimalCharacter:function(v){return t.update({alwaysAllowDecimalCharacter:v}),t},caretPositionOnFocus:function(v){return t.settings.caretPositionOnFocus=v,t},createLocalList:function(v){return t.settings.createLocalList=v,t.settings.createLocalList?t._hasLocalList()||t._createLocalList():t._deleteLocalList(),t},currencySymbol:function(v){return t.update({currencySymbol:v}),t},currencySymbolPlacement:function(v){return t.update({currencySymbolPlacement:v}),t},decimalCharacter:function(v){return t.update({decimalCharacter:v}),t},decimalCharacterAlternative:function(v){return t.settings.decimalCharacterAlternative=v,t},decimalPlaces:function(v){return n.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.",t.settings.showWarnings),t.update({decimalPlaces:v}),t},decimalPlacesRawValue:function(v){return t.update({decimalPlacesRawValue:v}),t},decimalPlacesShownOnBlur:function(v){return t.update({decimalPlacesShownOnBlur:v}),t},decimalPlacesShownOnFocus:function(v){return t.update({decimalPlacesShownOnFocus:v}),t},defaultValueOverride:function(v){return t.update({defaultValueOverride:v}),t},digitalGroupSpacing:function(v){return t.update({digitalGroupSpacing:v}),t},digitGroupSeparator:function(v){return t.update({digitGroupSeparator:v}),t},divisorWhenUnfocused:function(v){return t.update({divisorWhenUnfocused:v}),t},emptyInputBehavior:function(v){return null===t.rawValue&&v!==o.options.emptyInputBehavior.null&&(n.warning("You are trying to modify the `emptyInputBehavior` option to something different than `'null'` (".concat(v,"), 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 `''`."),t.settings.showWarnings),t.rawValue=""),t.update({emptyInputBehavior:v}),t},eventBubbles:function(v){return t.settings.eventBubbles=v,t},eventIsCancelable:function(v){return t.settings.eventIsCancelable=v,t},failOnUnknownOption:function(v){return t.settings.failOnUnknownOption=v,t},formatOnPageLoad:function(v){return t.settings.formatOnPageLoad=v,t},formulaMode:function(v){return t.settings.formulaMode=v,t},historySize:function(v){return t.settings.historySize=v,t},invalidClass:function(v){return t.settings.invalidClass=v,t},isCancellable:function(v){return t.settings.isCancellable=v,t},leadingZero:function(v){return t.update({leadingZero:v}),t},maximumValue:function(v){return t.update({maximumValue:v}),t},minimumValue:function(v){return t.update({minimumValue:v}),t},modifyValueOnWheel:function(v){return t.settings.modifyValueOnWheel=v,t},negativeBracketsTypeOnBlur:function(v){return t.update({negativeBracketsTypeOnBlur:v}),t},negativePositiveSignPlacement:function(v){return t.update({negativePositiveSignPlacement:v}),t},negativeSignCharacter:function(v){return t.update({negativeSignCharacter:v}),t},noEventListeners:function(v){return v===o.options.noEventListeners.noEvents&&t.settings.noEventListeners===o.options.noEventListeners.addEvents&&t._removeEventListeners(),t.update({noEventListeners:v}),t},onInvalidPaste:function(v){return t.settings.onInvalidPaste=v,t},outputFormat:function(v){return t.settings.outputFormat=v,t},overrideMinMaxLimits:function(v){return t.update({overrideMinMaxLimits:v}),t},positiveSignCharacter:function(v){return t.update({positiveSignCharacter:v}),t},rawValueDivisor:function(v){return t.update({rawValueDivisor:v}),t},readOnly:function(v){return t.settings.readOnly=v,t._setWritePermissions(),t},roundingMethod:function(v){return t.update({roundingMethod:v}),t},saveValueToSessionStorage:function(v){return t.update({saveValueToSessionStorage:v}),t},symbolWhenUnfocused:function(v){return t.update({symbolWhenUnfocused:v}),t},selectNumberOnly:function(v){return t.settings.selectNumberOnly=v,t},selectOnFocus:function(v){return t.settings.selectOnFocus=v,t},serializeSpaces:function(v){return t.settings.serializeSpaces=v,t},showOnlyNumbersOnFocus:function(v){return t.update({showOnlyNumbersOnFocus:v}),t},showPositiveSign:function(v){return t.update({showPositiveSign:v}),t},showWarnings:function(v){return t.settings.showWarnings=v,t},styleRules:function(v){return t.update({styleRules:v}),t},suffixText:function(v){return t.update({suffixText:v}),t},unformatOnHover:function(v){return t.settings.unformatOnHover=v,t},unformatOnSubmit:function(v){return t.settings.unformatOnSubmit=v,t},valuesToStrings:function(v){return t.update({valuesToStrings:v}),t},watchExternalChanges:function(v){return t.update({watchExternalChanges:v}),t},wheelOn:function(v){return t.settings.wheelOn=v,t},wheelStep:function(v){return t.settings.wheelStep=v,t}},this._triggerEvent(o.events.initialized,this.domElement,{newValue:n.getElementValue(this.domElement),newRawValue:this.rawValue,error:null,aNElement:this})}var h,g;return g=[{key:"version",value:function(){return"4.6.0"}},{key:"_setArgumentsValues",value:function(t,i,r){n.isNull(t)&&n.throwError("At least one valid parameter is needed in order to initialize an AutoNumeric object");var m,p,l,C=n.isElement(t),I=n.isString(t),q=n.isObject(i),v=Array.isArray(i)&&0<i.length,D=n.isNumberOrArabic(i)||""===i,R=this._isPreDefinedOptionValid(i),B=n.isNull(i),j=n.isEmptyString(i),z=n.isObject(r),ee=Array.isArray(r)&&0<r.length,ie=n.isNull(r),ue=this._isPreDefinedOptionValid(r);return C&&B&&ie?(m=t,p=l=null):C&&D&&ie?(m=t,l=i,p=null):C&&q&&ie?(m=t,l=null,p=i):C&&R&&ie?(m=t,l=null,p=this._getOptionObject(i)):C&&v&&ie?(m=t,l=null,p=this.mergeOptions(i)):C&&(B||j)&&z?(m=t,l=null,p=r):C&&(B||j)&&ee?(m=t,l=null,p=this.mergeOptions(r)):I&&B&&ie?(m=document.querySelector(t),p=l=null):I&&q&&ie?(m=document.querySelector(t),l=null,p=i):I&&R&&ie?(m=document.querySelector(t),l=null,p=this._getOptionObject(i)):I&&v&&ie?(m=document.querySelector(t),l=null,p=this.mergeOptions(i)):I&&(B||j)&&z?(m=document.querySelector(t),l=null,p=r):I&&(B||j)&&ee?(m=document.querySelector(t),l=null,p=this.mergeOptions(r)):I&&D&&ie?(m=document.querySelector(t),l=i,p=null):I&&D&&z?(m=document.querySelector(t),l=i,p=r):I&&D&&ue?(m=document.querySelector(t),l=i,p=this._getOptionObject(r)):I&&D&&ee?(m=document.querySelector(t),l=i,p=this.mergeOptions(r)):C&&D&&z?(m=t,l=i,p=r):C&&D&&ue?(m=t,l=i,p=this._getOptionObject(r)):C&&D&&ee?(m=t,l=i,p=this.mergeOptions(r)):n.throwError("The parameters given to the AutoNumeric object are not valid, '".concat(t,"', '").concat(i,"' and '").concat(r,"' given.")),n.isNull(m)&&n.throwError("The selector '".concat(t,"' did not select any valid DOM element. Please check on which element you called AutoNumeric.")),{domElement:m,initialValue:l,userOptions:p}}},{key:"mergeOptions",value:function(t){var i=this,r={};return t.forEach(function(m){ae(r,i._getOptionObject(m))}),r}},{key:"_isPreDefinedOptionValid",value:function(t){return Object.prototype.hasOwnProperty.call(o.predefinedOptions,t)}},{key:"_getOptionObject",value:function(t){var i;return n.isString(t)?null==(i=o.getPredefinedOptions()[t])&&n.warning("The given pre-defined option [".concat(t,"] is not recognized by autoNumeric. Please check that pre-defined option name."),!0):i=t,i}},{key:"_doesFormHandlerListExists",value:function(){var t=re(window.aNFormHandlerMap);return"undefined"!==t&&"object"===t}},{key:"_createFormHandlerList",value:function(){window.aNFormHandlerMap=new Map}},{key:"_checkValuesToStringsArray",value:function(t,i){return n.isInArray(String(t),i)}},{key:"_checkValuesToStringsSettings",value:function(t,i){return this._checkValuesToStringsArray(t,Object.keys(i.valuesToStrings))}},{key:"_checkStringsToValuesSettings",value:function(t,i){return this._checkValuesToStringsArray(t,Object.values(i.valuesToStrings))}},{key:"_unformatAltHovered",value:function(t){t.hoveredWithAlt=!0,t.unformat()}},{key:"_reformatAltHovered",value:function(t){t.hoveredWithAlt=!1,t.reformat()}},{key:"_getChildANInputElement",value:function(t){var i=this,r=t.getElementsByTagName("input"),m=[];return Array.prototype.slice.call(r,0).forEach(function(p){i.test(p)&&m.push(p)}),m}},{key:"test",value:function(t){return this._isInGlobalList(n.domElement(t))}},{key:"_createWeakMap",value:function(t){window[t]=new WeakMap}},{key:"_createGlobalList",value:function(){this.autoNumericGlobalListName="autoNumericGlobalList",this._createWeakMap(this.autoNumericGlobalListName)}},{key:"_doesGlobalListExists",value:function(){var t=re(window[this.autoNumericGlobalListName]);return"undefined"!==t&&"object"===t}},{key:"_addToGlobalList",value:function(t){this._doesGlobalListExists()||this._createGlobalList();var i=t.node();if(this._isInGlobalList(i)){if(this._getFromGlobalList(i)===this)return;n.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.",t.getSettings().showWarnings)}window[this.autoNumericGlobalListName].set(i,t)}},{key:"_removeFromGlobalList",value:function(t){this._doesGlobalListExists()&&window[this.autoNumericGlobalListName].delete(t.node())}},{key:"_getFromGlobalList",value:function(t){return this._doesGlobalListExists()?window[this.autoNumericGlobalListName].get(t):null}},{key:"_isInGlobalList",value:function(t){return!!this._doesGlobalListExists()&&window[this.autoNumericGlobalListName].has(t)}},{key:"validate",value:function(t,i,r){var m=!(1<arguments.length&&void 0!==i)||i,p=2<arguments.length&&void 0!==r?r:null;!n.isUndefinedOrNullOrEmpty(t)&&n.isObject(t)||n.throwError("The userOptions are invalid ; it should be a valid object, [".concat(t,"] given."));var l,C=n.isObject(p);C||n.isNull(p)||n.throwError("The 'originalOptions' parameter is invalid ; it should either be a valid option object or `null`, [".concat(t,"] given.")),n.isNull(t)||this._convertOldOptionsToNewOnes(t),l=m?ae({},this.getDefaultConfig(),t):t,n.isTrueOrFalseString(l.showWarnings)||n.isBoolean(l.showWarnings)||n.throwError("The debug option 'showWarnings' is invalid ; it should be either 'true' or 'false', [".concat(l.showWarnings,"] given."));var I,q=/^[0-9]+$/,v=/[0-9]+/,D=/^-?[0-9]+(\.?[0-9]+)?$/,R=/^[0-9]+(\.?[0-9]+)?$/;n.isTrueOrFalseString(l.allowDecimalPadding)||n.isBoolean(l.allowDecimalPadding)||l.allowDecimalPadding===o.options.allowDecimalPadding.floats||n.throwError("The decimal padding option 'allowDecimalPadding' is invalid ; it should either be `false`, `true` or `'floats'`, [".concat(l.allowDecimalPadding,"] given.")),l.allowDecimalPadding!==o.options.allowDecimalPadding.never&&"false"!==l.allowDecimalPadding||l.decimalPlaces===o.options.decimalPlaces.none&&l.decimalPlacesShownOnBlur===o.options.decimalPlacesShownOnBlur.none&&l.decimalPlacesShownOnFocus===o.options.decimalPlacesShownOnFocus.none||n.warning("Setting 'allowDecimalPadding' to [".concat(l.allowDecimalPadding,"] will override the current 'decimalPlaces*' settings [").concat(l.decimalPlaces,", ").concat(l.decimalPlacesShownOnBlur," and ").concat(l.decimalPlacesShownOnFocus,"]."),l.showWarnings),n.isTrueOrFalseString(l.alwaysAllowDecimalCharacter)||n.isBoolean(l.alwaysAllowDecimalCharacter)||n.throwError("The option 'alwaysAllowDecimalCharacter' is invalid ; it should either be `true` or `false`, [".concat(l.alwaysAllowDecimalCharacter,"] given.")),n.isNull(l.caretPositionOnFocus)||n.isInArray(l.caretPositionOnFocus,[o.options.caretPositionOnFocus.start,o.options.caretPositionOnFocus.end,o.options.caretPositionOnFocus.decimalLeft,o.options.caretPositionOnFocus.decimalRight])||n.throwError("The display on empty string option 'caretPositionOnFocus' is invalid ; it should either be `null`, 'focus', 'press', 'always' or 'zero', [".concat(l.caretPositionOnFocus,"] given.")),I=C?p:this._correctCaretPositionOnFocusAndSelectOnFocusOptions(t),n.isNull(I)||I.caretPositionOnFocus===o.options.caretPositionOnFocus.doNoForceCaretPosition||I.selectOnFocus!==o.options.selectOnFocus.select||n.warning("The 'selectOnFocus' option is set to 'select', which is in conflict with the 'caretPositionOnFocus' which is set to '".concat(I.caretPositionOnFocus,"'. As a result, if this has been called when instantiating an AutoNumeric object, the 'selectOnFocus' option is forced to 'doNotSelect'."),l.showWarnings),n.isInArray(l.digitGroupSeparator,[o.options.digitGroupSeparator.comma,o.options.digitGroupSeparator.dot,o.options.digitGroupSeparator.normalSpace,o.options.digitGroupSeparator.thinSpace,o.options.digitGroupSeparator.narrowNoBreakSpace,o.options.digitGroupSeparator.noBreakSpace,o.options.digitGroupSeparator.noSeparator,o.options.digitGroupSeparator.apostrophe,o.options.digitGroupSeparator.arabicThousandsSeparator,o.options.digitGroupSeparator.dotAbove,o.options.digitGroupSeparator.privateUseTwo])||n.throwError("The thousand separator character option 'digitGroupSeparator' is invalid ; it should be ',', '.', '\u066c', '\u02d9', \"'\", '\x92', ' ', '\u2009', '\u202f', '\xa0' or empty (''), [".concat(l.digitGroupSeparator,"] given.")),n.isTrueOrFalseString(l.showOnlyNumbersOnFocus)||n.isBoolean(l.showOnlyNumbersOnFocus)||n.throwError("The 'showOnlyNumbersOnFocus' option is invalid ; it should be either 'true' or 'false', [".concat(l.showOnlyNumbersOnFocus,"] given.")),n.isInArray(l.digitalGroupSpacing,[o.options.digitalGroupSpacing.two,o.options.digitalGroupSpacing.twoScaled,o.options.digitalGroupSpacing.three,o.options.digitalGroupSpacing.four])||2<=l.digitalGroupSpacing&&l.digitalGroupSpacing<=4||n.throwError("The grouping separator option for thousands 'digitalGroupSpacing' is invalid ; it should be '2', '2s', '3', or '4', [".concat(l.digitalGroupSpacing,"] given.")),n.isInArray(l.decimalCharacter,[o.options.decimalCharacter.comma,o.options.decimalCharacter.dot,o.options.decimalCharacter.middleDot,o.options.decimalCharacter.arabicDecimalSeparator,o.options.decimalCharacter.decimalSeparatorKeySymbol])||n.throwError("The decimal separator character option 'decimalCharacter' is invalid ; it should be '.', ',', '\xb7', '\u2396' or '\u066b', [".concat(l.decimalCharacter,"] given.")),l.decimalCharacter===l.digitGroupSeparator&&n.throwError("autoNumeric will not function properly when the decimal character 'decimalCharacter' [".concat(l.decimalCharacter,"] and the thousand separator 'digitGroupSeparator' [").concat(l.digitGroupSeparator,"] are the same character.")),n.isNull(l.decimalCharacterAlternative)||n.isString(l.decimalCharacterAlternative)||n.throwError("The alternate decimal separator character option 'decimalCharacterAlternative' is invalid ; it should be a string, [".concat(l.decimalCharacterAlternative,"] given.")),""===l.currencySymbol||n.isString(l.currencySymbol)||n.throwError("The currency symbol option 'currencySymbol' is invalid ; it should be a string, [".concat(l.currencySymbol,"] given.")),n.isInArray(l.currencySymbolPlacement,[o.options.currencySymbolPlacement.prefix,o.options.currencySymbolPlacement.suffix])||n.throwError("The placement of the currency sign option 'currencySymbolPlacement' is invalid ; it should either be 'p' (prefix) or 's' (suffix), [".concat(l.currencySymbolPlacement,"] given.")),n.isInArray(l.negativePositiveSignPlacement,[o.options.negativePositiveSignPlacement.prefix,o.options.negativePositiveSignPlacement.suffix,o.options.negativePositiveSignPlacement.left,o.options.negativePositiveSignPlacement.right,o.options.negativePositiveSignPlacement.none])||n.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(l.negativePositiveSignPlacement,"] given.")),n.isTrueOrFalseString(l.showPositiveSign)||n.isBoolean(l.showPositiveSign)||n.throwError("The show positive sign option 'showPositiveSign' is invalid ; it should be either 'true' or 'false', [".concat(l.showPositiveSign,"] given.")),n.isString(l.suffixText)&&(""===l.suffixText||!n.isNegative(l.suffixText,l.negativeSignCharacter)&&!v.test(l.suffixText))||n.throwError("The additional suffix option 'suffixText' is invalid ; it should not contains the negative sign '".concat(l.negativeSignCharacter,"' nor any numerical characters, [").concat(l.suffixText,"] given.")),n.isString(l.negativeSignCharacter)&&1===l.negativeSignCharacter.length&&!n.isUndefinedOrNullOrEmpty(l.negativeSignCharacter)&&!v.test(l.negativeSignCharacter)||n.throwError("The negative sign character option 'negativeSignCharacter' is invalid ; it should be a single character, and cannot be any numerical characters, [".concat(l.negativeSignCharacter,"] given.")),n.isString(l.positiveSignCharacter)&&1===l.positiveSignCharacter.length&&!n.isUndefinedOrNullOrEmpty(l.positiveSignCharacter)&&!v.test(l.positiveSignCharacter)||n.throwError("The positive sign character option 'positiveSignCharacter' is invalid ; it should be a single character, and cannot be any numerical characters, [".concat(l.positiveSignCharacter,"] given.\nIf you want to hide the positive sign character, you need to set the `showPositiveSign` option to `true`.")),l.negativeSignCharacter===l.positiveSignCharacter&&n.throwError("The positive 'positiveSignCharacter' and negative 'negativeSignCharacter' sign characters cannot be identical ; [".concat(l.negativeSignCharacter,"] given."));var B=K(n.isNull(l.negativeBracketsTypeOnBlur)?["",""]:l.negativeBracketsTypeOnBlur.split(","),2),j=B[0],z=B[1];(n.contains(l.digitGroupSeparator,l.negativeSignCharacter)||n.contains(l.decimalCharacter,l.negativeSignCharacter)||n.contains(l.decimalCharacterAlternative,l.negativeSignCharacter)||n.contains(j,l.negativeSignCharacter)||n.contains(z,l.negativeSignCharacter)||n.contains(l.suffixText,l.negativeSignCharacter))&&n.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(l.negativeSignCharacter,"] given.")),(n.contains(l.digitGroupSeparator,l.positiveSignCharacter)||n.contains(l.decimalCharacter,l.positiveSignCharacter)||n.contains(l.decimalCharacterAlternative,l.positiveSignCharacter)||n.contains(j,l.positiveSignCharacter)||n.contains(z,l.positiveSignCharacter)||n.contains(l.suffixText,l.positiveSignCharacter))&&n.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(l.positiveSignCharacter,"] given.")),n.isNull(l.overrideMinMaxLimits)||n.isInArray(l.overrideMinMaxLimits,[o.options.overrideMinMaxLimits.ceiling,o.options.overrideMinMaxLimits.floor,o.options.overrideMinMaxLimits.ignore,o.options.overrideMinMaxLimits.invalid])||n.throwError("The override min & max limits option 'overrideMinMaxLimits' is invalid ; it should either be 'ceiling', 'floor', 'ignore' or 'invalid', [".concat(l.overrideMinMaxLimits,"] given.")),l.overrideMinMaxLimits!==o.options.overrideMinMaxLimits.invalid&&l.overrideMinMaxLimits!==o.options.overrideMinMaxLimits.ignore&&(0<l.minimumValue||l.maximumValue<0)&&n.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 (ie. out-of-range), you should use the 'invalid' option for the 'overrideMinMaxLimits' setting."),n.isString(l.maximumValue)&&D.test(l.maximumValue)||n.throwError("The maximum possible value option 'maximumValue' is invalid ; it should be a string that represents a positive or negative number, [".concat(l.maximumValue,"] given.")),n.isString(l.minimumValue)&&D.test(l.minimumValue)||n.throwError("The minimum possible value option 'minimumValue' is invalid ; it should be a string that represents a positive or negative number, [".concat(l.minimumValue,"] given.")),parseFloat(l.minimumValue)>parseFloat(l.maximumValue)&&n.throwError("The minimum possible value option is greater than the maximum possible value option ; 'minimumValue' [".concat(l.minimumValue,"] should be smaller than 'maximumValue' [").concat(l.maximumValue,"].")),n.isInt(l.decimalPlaces)&&0<=l.decimalPlaces||n.isString(l.decimalPlaces)&&q.test(l.decimalPlaces)||n.throwError("The number of decimal places option 'decimalPlaces' is invalid ; it should be a positive integer, [".concat(l.decimalPlaces,"] given.")),n.isNull(l.decimalPlacesRawValue)||n.isInt(l.decimalPlacesRawValue)&&0<=l.decimalPlacesRawValue||n.isString(l.decimalPlacesRawValue)&&q.test(l.decimalPlacesRawValue)||n.throwError("The number of decimal places for the raw value option 'decimalPlacesRawValue' is invalid ; it should be a positive integer or `null`, [".concat(l.decimalPlacesRawValue,"] given.")),this._validateDecimalPlacesRawValue(l),n.isNull(l.decimalPlacesShownOnFocus)||q.test(String(l.decimalPlacesShownOnFocus))||n.throwError("The number of expanded decimal places option 'decimalPlacesShownOnFocus' is invalid ; it should be a positive integer or `null`, [".concat(l.decimalPlacesShownOnFocus,"] given.")),!n.isNull(l.decimalPlacesShownOnFocus)&&Number(l.decimalPlaces)>Number(l.decimalPlacesShownOnFocus)&&n.warning("The extended decimal places 'decimalPlacesShownOnFocus' [".concat(l.decimalPlacesShownOnFocus,"] should be greater than the 'decimalPlaces' [").concat(l.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?"),l.showWarnings),(n.isNull(l.divisorWhenUnfocused)||R.test(l.divisorWhenUnfocused))&&0!==l.divisorWhenUnfocused&&"0"!==l.divisorWhenUnfocused&&1!==l.divisorWhenUnfocused&&"1"!==l.divisorWhenUnfocused||n.throwError("The divisor option 'divisorWhenUnfocused' is invalid ; it should be a positive number higher than one, preferably an integer, [".concat(l.divisorWhenUnfocused,"] given.")),n.isNull(l.decimalPlacesShownOnBlur)||q.test(l.decimalPlacesShownOnBlur)||n.throwError("The number of decimals shown when unfocused option 'decimalPlacesShownOnBlur' is invalid ; it should be a positive integer or `null`, [".concat(l.decimalPlacesShownOnBlur,"] given.")),n.isNull(l.symbolWhenUnfocused)||n.isString(l.symbolWhenUnfocused)||n.throwError("The symbol to show when unfocused option 'symbolWhenUnfocused' is invalid ; it should be a string, [".concat(l.symbolWhenUnfocused,"] given.")),n.isTrueOrFalseString(l.saveValueToSessionStorage)||n.isBoolean(l.saveValueToSessionStorage)||n.throwError("The save to session storage option 'saveValueToSessionStorage' is invalid ; it should be either 'true' or 'false', [".concat(l.saveValueToSessionStorage,"] given.")),n.isInArray(l.onInvalidPaste,[o.options.onInvalidPaste.error,o.options.onInvalidPaste.ignore,o.options.onInvalidPaste.clamp,o.options.onInvalidPaste.truncate,o.options.onInvalidPaste.replace])||n.throwError("The paste behavior option 'onInvalidPaste' is invalid ; it should either be 'error', 'ignore', 'clamp', 'truncate' or 'replace' (cf. documentation), [".concat(l.onInvalidPaste,"] given.")),n.isInArray(l.roundingMethod,[o.options.roundingMethod.halfUpSymmetric,o.options.roundingMethod.halfUpAsymmetric,o.options.roundingMethod.halfDownSymmetric,o.options.roundingMethod.halfDownAsymmetric,o.options.roundingMethod.halfEvenBankersRounding,o.options.roundingMethod.upRoundAwayFromZero,o.options.roundingMethod.downRoundTowardZero,o.options.roundingMethod.toCeilingTowardPositiveInfinity,o.options.roundingMethod.toFloorTowardNegativeInfinity,o.options.roundingMethod.toNearest05,o.options.roundingMethod.toNearest05Alt,o.options.roundingMethod.upToNext05,o.options.roundingMethod.downToNext05])||n.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(l.roundingMethod,"] given.")),n.isNull(l.negativeBracketsTypeOnBlur)||n.isInArray(l.negativeBracketsTypeOnBlur,[o.options.negativeBracketsTypeOnBlur.parentheses,o.options.negativeBracketsTypeOnBlur.brackets,o.options.negativeBracketsTypeOnBlur.chevrons,o.options.negativeBracketsTypeOnBlur.curlyBraces,o.options.negativeBracketsTypeOnBlur.angleBrackets,o.options.negativeBracketsTypeOnBlur.japaneseQuotationMarks,o.options.negativeBracketsTypeOnBlur.halfBrackets,o.options.negativeBracketsTypeOnBlur.whiteSquareBrackets,o.options.negativeBracketsTypeOnBlur.quotationMarks,o.options.negativeBracketsTypeOnBlur.guillemets])||n.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(l.negativeBracketsTypeOnBlur,"] given.")),(n.isString(l.emptyInputBehavior)||n.isNumber(l.emptyInputBehavior))&&(n.isInArray(l.emptyInputBehavior,[o.options.emptyInputBehavior.focus,o.options.emptyInputBehavior.press,o.options.emptyInputBehavior.always,o.options.emptyInputBehavior.min,o.options.emptyInputBehavior.max,o.options.emptyInputBehavior.zero,o.options.emptyInputBehavior.null])||D.test(l.emptyInputBehavior))||n.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(l.emptyInputBehavior,"] given.")),l.emptyInputBehavior===o.options.emptyInputBehavior.zero&&(0<l.minimumValue||l.maximumValue<0)&&n.throwError("The 'emptyInputBehavior' option is set to 'zero', but this value is outside of the range defined by 'minimumValue' and 'maximumValue' [".concat(l.minimumValue,", ").concat(l.maximumValue,"].")),D.test(String(l.emptyInputBehavior))&&(this._isWithinRangeWithOverrideOption(l.emptyInputBehavior,l)||n.throwError("The 'emptyInputBehavior' option is set to a number or a string that represents a number, but its value [".concat(l.emptyInputBehavior,"] is outside of the range defined by the 'minimumValue' and 'maximumValue' options [").concat(l.minimumValue,", ").concat(l.maximumValue,"]."))),n.isTrueOrFalseString(l.eventBubbles)||n.isBoolean(l.eventBubbles)||n.throwError("The event bubbles option 'eventBubbles' is invalid ; it should be either 'true' or 'false', [".concat(l.eventBubbles,"] given.")),n.isTrueOrFalseString(l.eventIsCancelable)||n.isBoolean(l.eventIsCancelable)||n.throwError("The event is cancelable option 'eventIsCancelable' is invalid ; it should be either 'true' or 'false', [".concat(l.eventIsCancelable,"] given.")),!n.isBoolean(l.invalidClass)&&/^-?[_a-zA-Z]+[_a-zA-Z0-9-]*$/.test(l.invalidClass)||n.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(l.invalidClass,"] given.")),n.isInArray(l.leadingZero,[o.options.leadingZero.allow,o.options.leadingZero.deny,o.options.leadingZero.keep])||n.throwError("The leading zero behavior option 'leadingZero' is invalid ; it should either be 'allow', 'deny' or 'keep', [".concat(l.leadingZero,"] given.")),n.isTrueOrFalseString(l.formatOnPageLoad)||n.isBoolean(l.formatOnPageLoad)||n.throwError("The format on initialization option 'formatOnPageLoad' is invalid ; it should be either 'true' or 'false', [".concat(l.formatOnPageLoad,"] given.")),n.isTrueOrFalseString(l.formulaMode)||n.isBoolean(l.formulaMode)||n.throwError("The formula mode option 'formulaMode' is invalid ; it should be either 'true' or 'false', [".concat(l.formulaMode,"] given.")),q.test(l.historySize)&&0!==l.historySize||n.throwError("The history size option 'historySize' is invalid ; it should be a positive integer, [".concat(l.historySize,"] given.")),n.isTrueOrFalseString(l.selectNumberOnly)||n.isBoolean(l.selectNumberOnly)||n.throwError("The select number only option 'selectNumberOnly' is invalid ; it should be either 'true' or 'false', [".concat(l.selectNumberOnly,"] given.")),n.isTrueOrFalseString(l.selectOnFocus)||n.isBoolean(l.selectOnFocus)||n.throwError("The select on focus option 'selectOnFocus' is invalid ; it should be either 'true' or 'false', [".concat(l.selectOnFocus,"] given.")),n.isNull(l.defaultValueOverride)||""===l.defaultValueOverride||D.test(l.defaultValueOverride)||n.throwError("The unformatted default value option 'defaultValueOverride' is invalid ; it should be a string that represents a positive or negative number, [".concat(l.defaultValueOverride,"] given.")),n.isTrueOrFalseString(l.unformatOnSubmit)||n.isBoolean(l.unformatOnSubmit)||n.throwError("The remove formatting on submit option 'unformatOnSubmit' is invalid ; it should be either 'true' or 'false', [".concat(l.unformatOnSubmit,"] given.")),n.isNull(l.valuesToStrings)||n.isObject(l.valuesToStrings)||n.throwError("The option 'valuesToStrings' is invalid ; it should be an object, ideally with 'key -> value' entries, [".concat(l.valuesToStrings,"] given.")),n.isNull(l.outputFormat)||n.isInArray(l.outputFormat,[o.options.outputFormat.string,o.options.outputFormat.number,o.options.outputFormat.dot,o.options.outputFormat.negativeDot,o.options.outputFormat.comma,o.options.outputFormat.negativeComma,o.options.outputFormat.dotNegative,o.options.outputFormat.commaNegative])||n.throwError("The custom locale format option 'outputFormat' is invalid ; it should either be null, 'string', 'number', '.', '-.', ',', '-,', '.-' or ',-', [".concat(l.outputFormat,"] given.")),n.isTrueOrFalseString(l.isCancellable)||n.isBoolean(l.isCancellable)||n.throwError("The cancellable behavior option 'isCancellable' is invalid ; it should be either 'true' or 'false', [".concat(l.isCancellable,"] given.")),n.isTrueOrFalseString(l.modifyValueOnWheel)||n.isBoolean(l.modifyValueOnWheel)||n.throwError("The increment/decrement on mouse wheel option 'modifyValueOnWheel' is invalid ; it should be either 'true' or 'false', [".concat(l.modifyValueOnWheel,"] given.")),n.isTrueOrFalseString(l.watchExternalChanges)||n.isBoolean(l.watchExternalChanges)||n.throwError("The option 'watchExternalChanges' is invalid ; it should be either 'true' or 'false', [".concat(l.watchExternalChanges,"] given.")),n.isInArray(l.wheelOn,[o.options.wheelOn.focus,o.options.wheelOn.hover])||n.throwError("The wheel behavior option 'wheelOn' is invalid ; it should either be 'focus' or 'hover', [".concat(l.wheelOn,"] given.")),(n.isString(l.wheelStep)||n.isNumber(l.wheelStep))&&("progressive"===l.wheelStep||R.test(l.wheelStep))&&0!==Number(l.wheelStep)||n.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(l.wheelStep,"] given.")),n.isInArray(l.serializeSpaces,[o.options.serializeSpaces.plus,o.options.serializeSpaces.percent])||n.throwError("The space replacement character option 'serializeSpaces' is invalid ; it should either be '+' or '%20', [".concat(l.serializeSpaces,"] given.")),n.isTrueOrFalseString(l.noEventListeners)||n.isBoolean(l.noEventListeners)||n.throwError("The option 'noEventListeners' that prevent the creation of event listeners is invalid ; it should be either 'true' or 'false', [".concat(l.noEventListeners,"] given.")),n.isNull(l.styleRules)||n.isObject(l.styleRules)&&(Object.prototype.hasOwnProperty.call(l.styleRules,"positive")||Object.prototype.hasOwnProperty.call(l.styleRules,"negative")||Object.prototype.hasOwnProperty.call(l.styleRules,"ranges")||Object.prototype.hasOwnProperty.call(l.styleRules,"userDefined"))||n.throwError("The option 'styleRules' is invalid ; it should be a correctly structured object, with one or more 'positive', 'negative', 'ranges' or 'userDefined' attributes, [".concat(l.styleRules,"] given.")),n.isNull(l.styleRules)||!Object.prototype.hasOwnProperty.call(l.styleRules,"userDefined")||n.isNull(l.styleRules.userDefined)||l.styleRules.userDefined.forEach(function(ee){Object.prototype.hasOwnProperty.call(ee,"callback")&&!n.isFunction(ee.callback)&&n.throwError("The callback defined in the `userDefined` attribute is not a function, ".concat(re(ee.callback)," given."))}),(n.isNull(l.rawValueDivisor)||R.test(l.rawValueDivisor))&&0!==l.rawValueDivisor&&"0"!==l.rawValueDivisor&&1!==l.rawValueDivisor&&"1"!==l.rawValueDivisor||n.throwError("The raw value divisor option 'rawValueDivisor' is invalid ; it should be a positive number higher than one, preferably an integer, [".concat(l.rawValueDivisor,"] given.")),n.isTrueOrFalseString(l.readOnly)||n.isBoolean(l.readOnly)||n.throwError("The option 'readOnly' is invalid ; it should be either 'true' or 'false', [".concat(l.readOnly,"] given.")),n.isTrueOrFalseString(l.unformatOnHover)||n.isBoolean(l.unformatOnHover)||n.throwError("The option 'unformatOnHover' is invalid ; it should be either 'true' or 'false', [".concat(l.unformatOnHover,"] given.")),n.isTrueOrFalseString(l.failOnUnknownOption)||n.isBoolean(l.failOnUnknownOption)||n.throwError("The debug option 'failOnUnknownOption' is invalid ; it should be either 'true' or 'false', [".concat(l.failOnUnknownOption,"] given.")),n.isTrueOrFalseString(l.createLocalList)||n.isBoolean(l.createLocalList)||n.throwError("The debug option 'createLocalList' is invalid ; it should be either 'true' or 'false', [".concat(l.createLocalList,"] given."))}},{key:"_validateDecimalPlacesRawValue",value:function(t){n.isNull(t.decimalPlacesRawValue)||(t.decimalPlacesRawValue<t.decimalPlaces&&n.warning("The number of decimal places to store in the raw value [".concat(t.decimalPlacesRawValue,"] is lower than the ones to display [").concat(t.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`."),t.showWarnings),t.decimalPlacesRawValue<t.decimalPlacesShownOnFocus&&n.warning("The number of decimal places to store in the raw value [".concat(t.decimalPlacesRawValue,"] is lower than the ones shown on focus [").concat(t.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`."),t.showWarnings),t.decimalPlacesRawValue<t.decimalPlacesShownOnBlur&&n.warning("The number of decimal places to store in the raw value [".concat(t.decimalPlacesRawValue,"] is lower than the ones shown when unfocused [").concat(t.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`."),t.showWarnings))}},{key:"areSettingsValid",value:function(t){var i=!0;try{this.validate(t,!0)}catch(r){i=!1}return i}},{key:"getDefaultConfig",value:function(){return o.defaultSettings}},{key:"getPredefinedOptions",value:function(){return o.predefinedOptions}},{key:"_generateOptionsObjectFromOptionsArray",value:function(t){var i,r=this;return n.isUndefinedOrNullOrEmpty(t)||0===t.length?i=null:(i={},1===t.length&&Array.isArray(t[0])?t[0].forEach(function(m){ae(i,r._getOptionObject(m))}):1<=t.length&&t.forEach(function(m){ae(i,r._getOptionObject(m))})),i}},{key:"format",value:function(t){if(n.isUndefined(t)||null===t)return null;var i;i=n.isElement(t)?n.getElementValue(t):t,n.isString(i)||n.isNumber(i)||n.throwError('The value "'.concat(i,'" being "set" is not numeric and therefore cannot be used appropriately.'));for(var r=arguments.length,m=new Array(1<r?r-1:0),p=1;p<r;p++)m[p-1]=arguments[p];var l=this._generateOptionsObjectFromOptionsArray(m),C=ae({},this.getDefaultConfig(),l);C.isNegativeSignAllowed=i<0,C.isPositiveSignAllowed=0<=i,this._setBrackets(C),this._cachesUsualRegularExpressions(C,{});var I=this._toNumericValue(i,C);return isNaN(Number(I))&&n.throwError("The value [".concat(I,"] that you are trying to format is not a recognized number.")),this._isWithinRangeWithOverrideOption(I,C)||(n.triggerEvent(o.events.formatted,document,{oldValue:null,newValue:null,oldRawValue:null,newRawValue:null,isPristine:null,error:"Range test failed",aNElement:null},!0,!0),n.throwError("The value [".concat(I,"] being set falls outside of the minimumValue [").concat(C.minimumValue,"] and maximumValue [").concat(C.maximumValue,"] range set for this element"))),C.valuesToStrings&&this._checkValuesToStringsSettings(i,C)?C.valuesToStrings[i]:(this._correctNegativePositiveSignPlacementOption(C),this._calculateDecimalPlacesOnInit(C),n.isUndefinedOrNullOrEmpty(C.rawValueDivisor)||0===C.rawValueDivisor||""===I||null===I||(I*=C.rawValueDivisor),I=this._roundFormattedValueShownOnFocus(I,C),I=this._modifyNegativeSignAndDecimalCharacterForFormattedValue(I,C),I=this._addGroupSeparators(I,C,!1,I))}},{key:"formatAndSet",value:function(t,i){var m=this.format(t,1<arguments.length&&void 0!==i?i:null);return n.setElementValue(t,m),m}},{key:"unformat",value:function(t){if(n.isNumberStrict(t))return t;var i;if(""===(i=n.isElement(t)?n.getElementValue(t):t))return"";if(n.isUndefined(i)||null===i)return null;(n.isArray(i)||n.isObject(i))&&n.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,m=new Array(1<r?r-1:0),p=1;p<r;p++)m[p-1]=arguments[p];var l=this._generateOptionsObjectFromOptionsArray(m),C=ae({},this.getDefaultConfig(),l);if(C.isNegativeSignAllowed=!1,C.isPositiveSignAllowed=!0,i=i.toString(),C.valuesToStrings&&this._checkStringsToValuesSettings(i,C))return n.objectKeyLookup(C.valuesToStrings,i);if(n.isNegative(i,C.negativeSignCharacter))C.isNegativeSignAllowed=!0,C.isPositiveSignAllowed=!1;else if(!n.isNull(C.negativeBracketsTypeOnBlur)){var I=K(C.negativeBracketsTypeOnBlur.split(","),2);C.firstBracket=I[0],C.lastBracket=I[1],i.charAt(0)===C.firstBracket&&i.charAt(i.length-1)===C.lastBracket&&(C.isNegativeSignAllowed=!0,C.isPositiveSignAllowed=!1,i=this._removeBrackets(i,C,!1))}return i=this._convertToNumericString(i,C),new RegExp("[^+-0123456789.]","gi").test(i)?NaN:(this._correctNegativePositiveSignPlacementOption(C),C.originalDecimalPlacesRawValue=C.decimalPlacesRawValue?C.decimalPlacesRawValue:C.decimalPlaces,this._calculateDecimalPlacesOnInit(C),n.isUndefinedOrNullOrEmpty(C.rawValueDivisor)||0===C.rawValueDivisor||""===i||null===i||(i/=C.rawValueDivisor),i=(i=this._roundRawValue(i,C)).replace(C.decimalCharacter,"."),i=this._toLocale(i,C.outputFormat,C))}},{key:"unformatAndSet",value:function(t,i){var m=this.unformat(t,1<arguments.length&&void 0!==i?i:null);return n.setElementValue(t,m),m}},{key:"localize",value:function(t,i){var r,m,p=1<arguments.length&&void 0!==i?i:null;return""===(r=n.isElement(t)?n.getElementValue(t):t)?"":(n.isNull(p)&&(p=o.defaultSettings),r=this.unformat(r,p),0===Number(r)&&p.leadingZero!==o.options.leadingZero.keep&&(r="0"),m=n.isNull(p)?p.outputFormat:o.defaultSettings.outputFormat,this._toLocale(r,m,p))}},{key:"localizeAndSet",value:function(t,i){var m=this.localize(t,1<arguments.length&&void 0!==i?i:null);return n.setElementValue(t,m),m}},{key:"isManagedByAutoNumeric",value:function(t){return this._isInGlobalList(n.domElement(t))}},{key:"getAutoNumericElement",value:function(t){var i=n.domElement(t);return this.isManagedByAutoNumeric(i)?this._getFromGlobalList(i):null}},{key:"set",value:function(t,i,r,m){var p,l=2<arguments.length&&void 0!==r?r:null,C=!(3<arguments.length&&void 0!==m)||m,I=n.domElement(t);return this.isManagedByAutoNumeric(I)?this.getAutoNumericElement(I).set(i,l,C):(p=!(!n.isNull(l)&&Object.prototype.hasOwnProperty.call(l,"showWarnings"))||l.showWarnings,n.warning("Impossible to find an AutoNumeric object for the given DOM element or selector.",p),null)}},{key:"getNumericString",value:function(t,i){return this._get(t,"getNumericString",1<arguments.length&&void 0!==i?i:null)}},{key:"getFormatted",value:function(t,i){return this._get(t,"getFormatted",1<arguments.length&&void 0!==i?i:null)}},{key:"getNumber",value:function(t,i){return this._get(t,"getNumber",1<arguments.length&&void 0!==i?i:null)}},{key:"_get",value:function(t,i,r){var m=2<arguments.length&&void 0!==r?r:null,p=n.domElement(t);return this.isManagedByAutoNumeric(p)||n.throwError("Impossible to find an AutoNumeric object for the given DOM element or selector."),this.getAutoNumericElement(p)[i](m)}},{key:"getLocalized",value:function(t,i,r){var m=1<arguments.length&&void 0!==i?i:null,p=2<arguments.length&&void 0!==r?r:null,l=n.domElement(t);return this.isManagedByAutoNumeric(l)||n.throwError("Impossible to find an AutoNumeric object for the given DOM element or selector."),this.getAutoNumericElement(l).getLocalized(m,p)}},{key:"_stripAllNonNumberCharacters",value:function(t,i,r,m){return this._stripAllNonNumberCharactersExceptCustomDecimalChar(t,i,r,m).replace(i.decimalCharacter,".")}},{key:"_stripAllNonNumberCharactersExceptCustomDecimalChar",value:function(t,i,r,m){var p=(t=(t=this._normalizeCurrencySuffixAndNegativeSignCharacters(t,i)).replace(i.allowedAutoStrip,"")).match(i.numRegAutoStrip);if(t=p?[p[1],p[2],p[3]].join(""):"",i.leadingZero===o.options.leadingZero.allow||i.leadingZero===o.options.leadingZero.keep){var l="",C=K(t.split(i.decimalCharacter),2),q=C[1],v=C[0];n.contains(v,i.negativeSignCharacter)&&(l=i.negativeSignCharacter,v=v.replace(i.negativeSignCharacter,"")),""===l&&v.length>i.mIntPos&&"0"===v.charAt(0)&&(v=v.slice(1)),""!==l&&v.length>i.mIntNeg&&"0"===v.charAt(0)&&(v=v.slice(1)),t="".concat(l).concat(v).concat(n.isUndefined(q)?"":i.decimalCharacter+q)}return(r&&i.leadingZero===o.options.leadingZero.deny||!m&&i.leadingZero===o.options.leadingZero.allow)&&(t=t.replace(i.stripReg,"$1$2")),t}},{key:"_toggleNegativeBracket",value:function(t,i,r){return r?this._removeBrackets(t,i):this._addBrackets(t,i)}},{key:"_addBrackets",value:function(t,i){return n.isNull(i.negativeBracketsTypeOnBlur)?t:"".concat(i.firstBracket).concat(t.replace(i.negativeSignCharacter,"")).concat(i.lastBracket)}},{key:"_removeBrackets",value:function(t,i,r){var m,p=!(2<arguments.length&&void 0!==r)||r;return n.isNull(i.negativeBracketsTypeOnBlur)||t.charAt(0)!==i.firstBracket?t:(m=(m=t.replace(i.firstBracket,"")).replace(i.lastBracket,""),p?(m=m.replace(i.currencySymbol,""),this._mergeCurrencySignNegativePositiveSignAndValue(m,i,!0,!1)):"".concat(i.negativeSignCharacter).concat(m))}},{key:"_setBrackets",value:function(t){if(n.isNull(t.negativeBracketsTypeOnBlur))t.firstBracket="",t.lastBracket="";else{var i=K(t.negativeBracketsTypeOnBlur.split(","),2),m=i[1];t.firstBracket=i[0],t.lastBracket=m}}},{key:"_convertToNumericString",value:function(t,i){t=this._removeBrackets(t,i,!1),t=(t=this._normalizeCurrencySuffixAndNegativeSignCharacters(t,i)).replace(new RegExp("[".concat(i.digitGroupSeparator,"]"),"g"),""),"."!==i.decimalCharacter&&(t=t.replace(i.decimalCharacter,".")),n.isNegative(t)&&t.lastIndexOf("-")===t.length-1&&(t=t.replace("-",""),t="-".concat(t)),i.showPositiveSign&&(t=t.replace(i.positiveSignCharacter,""));var m=n.arabicToLatinNumbers(t,i.leadingZero!==o.options.leadingZero.keep,!1,!1);return isNaN(m)||(t=m.toString()),t}},{key:"_normalizeCurrencySuffixAndNegativeSignCharacters",value:function(t,i){return t=String(t),i.currencySymbol!==o.options.currencySymbol.none&&(t=t.replace(i.currencySymbol,"")),i.suffixText!==o.options.suffixText.none&&(t=t.replace(i.suffixText,"")),i.negativeSignCharacter!==o.options.negativeSignCharacter.hyphen&&(t=t.replace(i.negativeSignCharacter,"-")),t}},{key:"_toLocale",value:function(t,i,r){if(n.isNull(i)||i===o.options.outputFormat.string)return t;var m;switch(i){case o.options.outputFormat.number:m=Number(t);break;case o.options.outputFormat.dotNegative:m=n.isNegative(t)?t.replace("-","")+"-":t;break;case o.options.outputFormat.comma:case o.options.outputFormat.negativeComma:m=t.replace(".",",");break;case o.options.outputFormat.commaNegative:m=t.replace(".",","),m=n.isNegative(m)?m.replace("-","")+"-":m;break;case o.options.outputFormat.dot:case o.options.outputFormat.negativeDot:m=t;break;default:n.throwError("The given outputFormat [".concat(i,"] option is not recognized."))}return i!==o.options.outputFormat.number&&"-"!==r.negativeSignCharacter&&(m=m.replace("-",r.negativeSignCharacter)),m}},{key:"_modifyNegativeSignAndDecimalCharacterForFormattedValue",value:function(t,i){return"-"!==i.negativeSignCharacter&&(t=t.replace("-",i.negativeSignCharacter)),"."!==i.decimalCharacter&&(t=t.replace(".",i.decimalCharacter)),t}},{key:"_isElementValueEmptyOrOnlyTheNegativeSign",value:function(t,i){return""===t||t===i.negativeSignCharacter}},{key:"_orderValueCurrencySymbolAndSuffixText",value:function(t,i,r){var m;if(i.emptyInputBehavior===o.options.emptyInputBehavior.always||r)switch(i.negativePositiveSignPlacement){case o.options.negativePositiveSignPlacement.left:case o.options.negativePositiveSignPlacement.prefix:case o.options.negativePositiveSignPlacement.none:m=t+i.currencySymbol+i.suffixText;break;default:m=i.currencySymbol+t+i.suffixText}else m=t;return m}},{key:"_addGroupSeparators",value:function(t,i,r,m,p){var l,C=4<arguments.length&&void 0!==p?p:null;if(l=n.isNull(C)?n.isNegative(t,i.negativeSignCharacter)||n.isNegativeWithBrackets(t,i.firstBracket,i.lastBracket):C<0,t=this._stripAllNonNumberCharactersExceptCustomDecimalChar(t,i,!1,r),this._isElementValueEmptyOrOnlyTheNegativeSign(t,i))return this._orderValueCurrencySymbolAndSuffixText(t,i,!0);var I,q=n.isZeroOrHasNoValue(t);switch(l&&(t=t.replace("-","")),i.digitalGroupSpacing=i.digitalGroupSpacing.toString(),i.digitalGroupSpacing){case o.options.digitalGroupSpacing.two:I=/(\d)((\d)(\d{2}?)+)$/;break;case o.options.digitalGroupSpacing.twoScaled:I=/(\d)((?:\d{2}){0,2}\d{3}(?:(?:\d{2}){2}\d{3})*?)$/;break;case o.options.digitalGroupSpacing.four:I=/(\d)((\d{4}?)+)$/;break;default:I=/(\d)((\d{3}?)+)$/}var v,D=K(t.split(i.decimalCharacter),2),R=D[0],B=D[1];if(i.decimalCharacterAlternative&&n.isUndefined(B)){var j=K(t.split(i.decimalCharacterAlternative),2);R=j[0],B=j[1]}if(""!==i.digitGroupSeparator)for(;I.test(R);)R=R.replace(I,"$1".concat(i.digitGroupSeparator,"$2"));return t=0===(v=r?i.decimalPlacesShownOnFocus:i.decimalPlacesShownOnBlur)||n.isUndefined(B)?R:(B.length>v&&(B=B.substring(0,v)),"".concat(R).concat(i.decimalCharacter).concat(B)),t=o._mergeCurrencySignNegativePositiveSignAndValue(t,i,l,q),n.isNull(C)&&(C=m),null!==i.negativeBracketsTypeOnBlur&&(C<0||n.isNegativeStrict(t,i.negativeSignCharacter))&&(t=this._toggleNegativeBracket(t,i,r)),i.suffixText?"".concat(t).concat(i.suffixText):t}},{key:"_mergeCurrencySignNegativePositiveSignAndValue",value:function(t,i,r,m){var p,l="";if(r?l=i.negativeSignCharacter:i.showPositiveSign&&!m&&(l=i.positiveSignCharacter),i.currencySymbolPlacement===o.options.currencySymbolPlacement.prefix)if(i.negativePositiveSignPlacement!==o.options.negativePositiveSignPlacement.none&&(r||!r&&i.showPositiveSign&&!m))switch(i.negativePositiveSignPlacement){case o.options.negativePositiveSignPlacement.prefix:case o.options.negativePositiveSignPlacement.left:p="".concat(l).concat(i.currencySymbol).concat(t);break;case o.options.negativePositiveSignPlacement.right:p="".concat(i.currencySymbol).concat(l).concat(t);break;case o.options.negativePositiveSignPlacement.suffix:p="".concat(i.currencySymbol).concat(t).concat(l)}else p=i.currencySymbol+t;else if(i.currencySymbolPlacement===o.options.currencySymbolPlacement.suffix)if(i.negativePositiveSignPlacement!==o.options.negativePositiveSignPlacement.none&&(r||!r&&i.showPositiveSign&&!m))switch(i.negativePositiveSignPlacement){case o.options.negativePositiveSignPlacement.suffix:case o.options.negativePositiveSignPlacement.right:p="".concat(t).concat(i.currencySymbol).concat(l);break;case o.options.negativePositiveSignPlacement.left:p="".concat(t).concat(l).concat(i.currencySymbol);break;case o.options.negativePositiveSignPlacement.prefix:p="".concat(l).concat(t).concat(i.currencySymbol)}else p=t+i.currencySymbol;return p}},{key:"_truncateZeros",value:function(t,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 t=t.replace(r,"$1"),0===i&&(t=t.replace(/\.$/,"")),t}},{key:"_roundRawValue",value:function(t,i){return this._roundValue(t,i,i.decimalPlacesRawValue)}},{key:"_roundFormattedValueShownOnFocus",value:function(t,i){return this._roundValue(t,i,Number(i.decimalPlacesShownOnFocus))}},{key:"_roundFormattedValueShownOnBlur",value:function(t,i){return this._roundValue(t,i,Number(i.decimalPlacesShownOnBlur))}},{key:"_roundFormattedValueShownOnFocusOrBlur",value:function(t,i,r){return r?this._roundFormattedValueShownOnFocus(t,i):this._roundFormattedValueShownOnBlur(t,i)}},{key:"_roundValue",value:function(t,i,r){if(n.isNull(t))return t;if(t=""===t?"0":t.toString(),i.roundingMethod===o.options.roundingMethod.toNearest05||i.roundingMethod===o.options.roundingMethod.toNearest05Alt||i.roundingMethod===o.options.roundingMethod.upToNext05||i.roundingMethod===o.options.roundingMethod.downToNext05)return this._roundCloseTo05(t,i);var m,p=K(o._prepareValueForRounding(t,i),2),l=p[0],C=(t=p[1]).lastIndexOf("."),I=-1===C,q=K(t.split("."),2),v=q[0];if(!(0<q[1]||i.allowDecimalPadding!==o.options.allowDecimalPadding.never&&i.allowDecimalPadding!==o.options.allowDecimalPadding.floats))return 0===Number(t)?v:"".concat(l).concat(v);m=i.allowDecimalPadding===o.options.allowDecimalPadding.always||i.allowDecimalPadding===o.options.allowDecimalPadding.floats?r:0;var D,B=t.length-1-(I?t.length-1:C),j="";if(B<=r){if(j=t,B<m){I&&(j="".concat(j).concat(i.decimalCharacter));for(var z="000000";B<m;)j+=z=z.substring(0,m-B),B+=z.length}else m<B?j=this._truncateZeros(j,m):0===B&&0===m&&(j=j.replace(/\.$/,""));return 0===Number(j)?j:"".concat(l).concat(j)}D=I?r-1:Number(r)+Number(C);var ee,ie=Number(t.charAt(D+1)),ue=t.substring(0,D+1).split("");if(ee="."===t.charAt(D)?t.charAt(D-1)%2:t.charAt(D)%2,this._shouldRoundUp(ie,i,l,ee))for(var oe=ue.length-1;0<=oe;--oe)if("."!==ue[oe]){if(ue[oe]=+ue[oe]+1,ue[oe]<10)break;0<oe&&(ue[oe]="0")}return ue=ue.slice(0,D+1),j=this._truncateZeros(ue.join(""),m),0===Number(j)?j:"".concat(l).concat(j)}},{key:"_roundCloseTo05",value:function(t,i){switch(i.roundingMethod){case o.options.roundingMethod.toNearest05:case o.options.roundingMethod.toNearest05Alt:t=(Math.round(20*t)/20).toString();break;case o.options.roundingMethod.upToNext05:t=(Math.ceil(20*t)/20).toString();break;default:t=(Math.floor(20*t)/20).toString()}return n.contains(t,".")?t.length-t.indexOf(".")<3?t+"0":t:t+".00"}},{key:"_prepareValueForRounding",value:function(t,i){var r="";return n.isNegativeStrict(t,"-")&&(r="-",t=t.replace("-","")),t.match(/^\d/)||(t="0".concat(t)),0===Number(t)&&(r=""),(0<Number(t)&&i.leadingZero!==o.options.leadingZero.keep||0<t.length&&i.leadingZero===o.options.leadingZero.allow)&&(t=t.replace(/^0*(\d)/,"$1")),[r,t]}},{key:"_shouldRoundUp",value:function(t,i,r,m){return 4<t&&i.roundingMethod===o.options.roundingMethod.halfUpSymmetric||4<t&&i.roundingMethod===o.options.roundingMethod.halfUpAsymmetric&&""===r||5<t&&i.roundingMethod===o.options.roundingMethod.halfUpAsymmetric&&"-"===r||5<t&&i.roundingMethod===o.options.roundingMethod.halfDownSymmetric||5<t&&i.roundingMethod===o.options.roundingMethod.halfDownAsymmetric&&""===r||4<t&&i.roundingMethod===o.options.roundingMethod.halfDownAsymmetric&&"-"===r||5<t&&i.roundingMethod===o.options.roundingMethod.halfEvenBankersRounding||5===t&&i.roundingMethod===o.options.roundingMethod.halfEvenBankersRounding&&1===m||0<t&&i.roundingMethod===o.options.roundingMethod.toCeilingTowardPositiveInfinity&&""===r||0<t&&i.roundingMethod===o.options.roundingMethod.toFloorTowardNegativeInfinity&&"-"===r||0<t&&i.roundingMethod===o.options.roundingMethod.upRoundAwayFromZero}},{key:"_truncateDecimalPlaces",value:function(t,i,r,m){r&&(t=this._roundFormattedValueShownOnFocus(t,i));var p=K(t.split(i.decimalCharacter),2),l=p[0],C=p[1];if(C&&C.length>m)if(0<m){var I=C.substring(0,m);t="".concat(l).concat(i.decimalCharacter).concat(I)}else t=l;return t}},{key:"_checkIfInRangeWithOverrideOption",value:function(t,i){if(n.isNull(t)&&i.emptyInputBehavior===o.options.emptyInputBehavior.null||i.overrideMinMaxLimits===o.options.overrideMinMaxLimits.ignore||i.overrideMinMaxLimits===o.options.overrideMinMaxLimits.invalid)return[!0,!0];t=(t=t.toString()).replace(",",".");var r,m=n.parseStr(i.minimumValue),p=n.parseStr(i.maximumValue),l=n.parseStr(t);switch(i.overrideMinMaxLimits){case o.options.overrideMinMaxLimits.floor:r=[-1<n.testMinMax(m,l),!0];break;case o.options.overrideMinMaxLimits.ceiling:r=[!0,n.testMinMax(p,l)<1];break;default:r=[-1<n.testMinMax(m,l),n.testMinMax(p,l)<1]}return r}},{key:"_isWithinRangeWithOverrideOption",value:function(t,i){var r=K(this._checkIfInRangeWithOverrideOption(t,i),2);return r[0]&&r[1]}},{key:"_cleanValueForRangeParse",value:function(t){return t=t.toString().replace(",","."),n.parseStr(t)}},{key:"_isMinimumRangeRespected",value:function(t,i){return-1<n.testMinMax(n.parseStr(i.minimumValue),this._cleanValueForRangeParse(t))}},{key:"_isMaximumRangeRespected",value:function(t,i){return n.testMinMax(n.parseStr(i.maximumValue),this._cleanValueForRangeParse(t))<1}},{key:"_readCookie",value:function(t){for(var i=t+"=",r=document.cookie.split(";"),m="",p=0;p<r.length;p+=1){for(m=r[p];" "===m.charAt(0);)m=m.substring(1,m.length);if(0===m.indexOf(i))return m.substring(i.length,m.length)}return null}},{key:"_storageTest",value:function(){var t="modernizr";try{return sessionStorage.setItem(t,t),sessionStorage.removeItem(t),!0}catch(i){return!1}}},{key:"_correctNegativePositiveSignPlacementOption",value:function(t){if(n.isNull(t.negativePositiveSignPlacement))if(n.isUndefined(t)||!n.isUndefinedOrNullOrEmpty(t.negativePositiveSignPlacement)||n.isUndefinedOrNullOrEmpty(t.currencySymbol))t.negativePositiveSignPlacement=o.options.negativePositiveSignPlacement.left;else switch(t.currencySymbolPlacement){case o.options.currencySymbolPlacement.suffix:t.negativePositiveSignPlacement=o.options.negativePositiveSignPlacement.prefix;break;case o.options.currencySymbolPlacement.prefix:t.negativePositiveSignPlacement=o.options.negativePositiveSignPlacement.left}}},{key:"_correctCaretPositionOnFocusAndSelectOnFocusOptions",value:function(t){return n.isNull(t)?null:(!n.isUndefinedOrNullOrEmpty(t.caretPositionOnFocus)&&n.isUndefinedOrNullOrEmpty(t.selectOnFocus)&&(t.selectOnFocus=o.options.selectOnFocus.doNotSelect),n.isUndefinedOrNullOrEmpty(t.caretPositionOnFocus)&&!n.isUndefinedOrNullOrEmpty(t.selectOnFocus)&&t.selectOnFocus===o.options.selectOnFocus.select&&(t.caretPositionOnFocus=o.options.caretPositionOnFocus.doNoForceCaretPosition),t)}},{key:"_calculateDecimalPlacesOnInit",value:function(t){this._validateDecimalPlacesRawValue(t),t.decimalPlacesShownOnFocus===o.options.decimalPlacesShownOnFocus.useDefault&&(t.decimalPlacesShownOnFocus=t.decimalPlaces),t.decimalPlacesShownOnBlur===o.options.decimalPlacesShownOnBlur.useDefault&&(t.decimalPlacesShownOnBlur=t.decimalPlaces),t.decimalPlacesRawValue===o.options.decimalPlacesRawValue.useDefault&&(t.decimalPlacesRawValue=t.decimalPlaces);var i=0;t.rawValueDivisor&&t.rawValueDivisor!==o.options.rawValueDivisor.none&&(i=String(t.rawValueDivisor).length-1)<0&&(i=0),t.decimalPlacesRawValue=Math.max(Math.max(t.decimalPlacesShownOnBlur,t.decimalPlacesShownOnFocus)+i,Number(t.originalDecimalPlacesRawValue)+i)}},{key:"_calculateDecimalPlacesOnUpdate",value:function(t,i){var r=1<arguments.length&&void 0!==i?i:null;this._validateDecimalPlacesRawValue(t),n.isNull(r)&&n.throwError("When updating the settings, the previous ones should be passed as an argument.");var m="decimalPlaces"in t;if(m||"decimalPlacesRawValue"in t||"decimalPlacesShownOnFocus"in t||"decimalPlacesShownOnBlur"in t||"rawValueDivisor"in t){m?("decimalPlacesShownOnFocus"in t&&t.decimalPlacesShownOnFocus!==o.options.decimalPlacesShownOnFocus.useDefault||(t.decimalPlacesShownOnFocus=t.decimalPlaces),"decimalPlacesShownOnBlur"in t&&t.decimalPlacesShownOnBlur!==o.options.decimalPlacesShownOnBlur.useDefault||(t.decimalPlacesShownOnBlur=t.decimalPlaces),"decimalPlacesRawValue"in t&&t.decimalPlacesRawValue!==o.options.decimalPlacesRawValue.useDefault||(t.decimalPlacesRawValue=t.decimalPlaces)):(n.isUndefined(t.decimalPlacesShownOnFocus)&&(t.decimalPlacesShownOnFocus=r.decimalPlacesShownOnFocus),n.isUndefined(t.decimalPlacesShownOnBlur)&&(t.decimalPlacesShownOnBlur=r.decimalPlacesShownOnBlur));var p=0;t.rawValueDivisor&&t.rawValueDivisor!==o.options.rawValueDivisor.none&&(p=String(t.rawValueDivisor).length-1)<0&&(p=0),t.decimalPlacesRawValue=t.decimalPlaces||t.decimalPlacesRawValue?Math.max(Math.max(t.decimalPlacesShownOnBlur,t.decimalPlacesShownOnFocus)+p,Number(t.decimalPlacesRawValue)+p):Math.max(Math.max(t.decimalPlacesShownOnBlur,t.decimalPlacesShownOnFocus)+p,Number(r.originalDecimalPlacesRawValue)+p)}}},{key:"_cachesUsualRegularExpressions",value:function(t,i){var r;r=t.negativeSignCharacter!==o.options.negativeSignCharacter.hyphen?"([-\\".concat(t.negativeSignCharacter,"]?)"):"(-?)",i.aNegRegAutoStrip=r,t.allowedAutoStrip=new RegExp("[^-0123456789\\".concat(t.decimalCharacter,"]"),"g"),t.numRegAutoStrip=new RegExp("".concat(r,"(?:\\").concat(t.decimalCharacter,"?([0-9]+\\").concat(t.decimalCharacter,"[0-9]+)|([0-9]*(?:\\").concat(t.decimalCharacter,"[0-9]*)?))")),t.stripReg=new RegExp("^".concat(i.aNegRegAutoStrip,"0*([0-9])")),t.formulaChars=new RegExp("[0-9".concat(t.decimalCharacter,"+\\-*/() ]"))}},{key:"_convertOldOptionsToNewOnes",value:function(t){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,modifyValueOnWheel:!0,negativeBracketsTypeOnBlur:!0,negativePositiveSignPlacement:!0,negativeSignCharacter:!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,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 t)if(Object.prototype.hasOwnProperty.call(t,r)){if(!0===i[r])continue;Object.prototype.hasOwnProperty.call(i,r)?(n.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),t[i[r]]=t[r],delete t[r]):t.failOnUnknownOption&&n.throwError("Option name '".concat(r,"' is unknown. Please fix the options passed to autoNumeric"))}"mDec"in t&&n.warning("The old `mDec` option has been deprecated in favor of more accurate options ; `decimalPlaces`, `decimalPlacesRawValue`, `decimalPlacesShownOnFocus` and `decimalPlacesShownOnBlur`.",!0)}},{key:"_setNegativePositiveSignPermissions",value:function(t){t.isNegativeSignAllowed=t.minimumValue<0,t.isPositiveSignAllowed=0<=t.maximumValue}},{key:"_toNumericValue",value:function(t,i){var r;return n.isNumber(Number(t))?r=n.scientificToDecimal(t):(r=this._convertToNumericString(t.toString(),i),n.isNumber(Number(r))||(n.warning('The given value "'.concat(t,'" cannot be converted to a numeric one and therefore cannot be used appropriately.'),i.showWarnings),r=NaN)),r}},{key:"_checkIfInRange",value:function(t,i,r){var m=n.parseStr(t);return-1<n.testMinMax(i,m)&&n.testMinMax(r,m)<1}},{key:"_shouldSkipEventKey",value:function(t){var i=n.isInArray(t,O.keyName._allFnKeys),r=t===O.keyName.OSLeft||t===O.keyName.OSRight,m=t===O.keyName.ContextMenu,p=n.isInArray(t,O.keyName._someNonPrintableKeys);return i||r||m||p||t===O.keyName.Unidentified||t===O.keyName.NumLock||t===O.keyName.ScrollLock||t===O.keyName.Insert||t===O.keyName.Command}},{key:"_serialize",value:function(t,i,r,m,p){var l,C=this,I=1<arguments.length&&void 0!==i&&i,q=2<arguments.length&&void 0!==r?r:"unformatted",v=3<arguments.length&&void 0!==m?m:"+",D=4<arguments.length&&void 0!==p?p:null,R=[];return"object"===re(t)&&"form"===t.nodeName.toLowerCase()&&Array.prototype.slice.call(t.elements).forEach(function(B){if(B.name&&!B.disabled&&-1===["file","reset","submit","button"].indexOf(B.type))if("select-multiple"===B.type)Array.prototype.slice.call(B.options).forEach(function(ie){ie.selected&&R.push(I?{name:B.name,value:ie.value}:"".concat(encodeURIComponent(B.name),"=").concat(encodeURIComponent(ie.value)))});else if(-1===["checkbox","radio"].indexOf(B.type)||B.checked){var j,z;if(C.isManagedByAutoNumeric(B))switch(q){case"unformatted":z=C.getAutoNumericElement(B),n.isNull(z)||(j=C.unformat(B,z.getSettings()));break;case"localized":if(z=C.getAutoNumericElement(B),!n.isNull(z)){var ee=n.cloneObject(z.getSettings());n.isNull(D)||(ee.outputFormat=D),j=C.localize(B,ee)}break;default:j=B.value}else j=B.value;n.isUndefined(j)&&n.throwError("This error should never be hit. If it has, something really wrong happened!"),R.push(I?{name:B.name,value:j}:"".concat(encodeURIComponent(B.name),"=").concat(encodeURIComponent(j)))}}),I?l=R:(l=R.join("&"),"+"===v&&(l=l.replace(/%20/g,"+"))),l}},{key:"_serializeNumericString",value:function(t,i){return this._serialize(t,!1,"unformatted",1<arguments.length&&void 0!==i?i:"+")}},{key:"_serializeFormatted",value:function(t,i){return this._serialize(t,!1,"formatted",1<arguments.length&&void 0!==i?i:"+")}},{key:"_serializeLocalized",value:function(t,i,r){return this._serialize(t,!1,"localized",1<arguments.length&&void 0!==i?i:"+",2<arguments.length&&void 0!==r?r:null)}},{key:"_serializeNumericStringArray",value:function(t,i){return this._serialize(t,!0,"unformatted",1<arguments.length&&void 0!==i?i:"+")}},{key:"_serializeFormattedArray",value:function(t,i){return this._serialize(t,!0,"formatted",1<arguments.length&&void 0!==i?i:"+")}},{key:"_serializeLocalizedArray",value:function(t,i,r){return this._serialize(t,!0,"localized",1<arguments.length&&void 0!==i?i:"+",2<arguments.length&&void 0!==r?r:null)}}],ge((h=o).prototype,[{key:"_saveInitialValues",value:function(t){this.initialValueHtmlAttribute=n.scientificToDecimal(this.domElement.getAttribute("value")),n.isNull(this.initialValueHtmlAttribute)&&(this.initialValueHtmlAttribute=""),this.initialValue=t,n.isNull(this.initialValue)&&(this.initialValue="")}},{key:"_createEventListeners",value:function(){var t=this;this.formulaMode=!1,this._onFocusInFunc=function(i){t._onFocusIn(i)},this._onFocusInAndMouseEnterFunc=function(i){t._onFocusInAndMouseEnter(i)},this._onFocusFunc=function(){t._onFocus()},this._onKeydownFunc=function(i){t._onKeydown(i)},this._onKeypressFunc=function(i){t._onKeypress(i)},this._onKeyupFunc=function(i){t._onKeyup(i)},this._onFocusOutAndMouseLeaveFunc=function(i){t._onFocusOutAndMouseLeave(i)},this._onPasteFunc=function(i){t._onPaste(i)},this._onWheelFunc=function(i){t._onWheel(i)},this._onDropFunc=function(i){t._onDrop(i)},this._onKeydownGlobalFunc=function(i){t._onKeydownGlobal(i)},this._onKeyupGlobalFunc=function(i){t._onKeyupGlobal(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._setupFormListener(),this.hasEventListeners=!0,o._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._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 t=this;n.isNull(this.parentForm)||(this._onFormSubmitFunc=function(){t._onFormSubmit()},this._onFormResetFunc=function(){t._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(!n.isNull(this.parentForm)){var t=this._getParentFormCounter();1===t?(this.parentForm.removeEventListener("submit",this._getFormHandlerFunction().submitFn,!1),this.parentForm.removeEventListener("reset",this._getFormHandlerFunction().resetFn,!1),this._removeFormDataSetInfo()):1<t?this._decrementParentFormCounter():n.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(t){this._getFormElement(0<arguments.length&&void 0!==t?t:null).dataset.anCount=1}},{key:"_incrementParentFormCounter",value:function(t){this._getFormElement(0<arguments.length&&void 0!==t?t:null).dataset.anCount++}},{key:"_decrementParentFormCounter",value:function(){this.parentForm.dataset.anCount--}},{key:"_hasFormHandlerFunction",value:function(t){return"anFormHandler"in this._getFormElement(0<arguments.length&&void 0!==t?t:null).dataset}},{key:"_getFormElement",value:function(t){var i=0<arguments.length&&void 0!==t?t:null;return n.isNull(i)?this.parentForm:i}},{key:"_storeFormHandlerFunction",value:function(t){var i=0<arguments.length&&void 0!==t?t:null;this.constructor._doesFormHandlerListExists()||this.constructor._createFormHandlerList();var r=n.randomString();this._getFormElement(i).dataset.anFormHandler=r,window.aNFormHandlerMap.set(r,{submitFn:this._onFormSubmitFunc,resetFn:this._onFormResetFunc})}},{key:"_getFormHandlerKey",value:function(){this._hasFormHandlerFunction()||n.throwError("Unable to retrieve the form handler name");var t=this.parentForm.dataset.anFormHandler;return""===t&&n.throwError("The form handler name is invalid"),t}},{key:"_getFormHandlerFunction",value:function(){var t=this._getFormHandlerKey();return window.aNFormHandlerMap.get(t)}},{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(t){0<arguments.length&&void 0!==t&&t&&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 t=this;if(!n.isUndefined(this.getterSetter)){var i=this.getterSetter,r=i.set,m=i.get;Object.defineProperty(this.domElement,this.attributeToWatch,{configurable:!0,get:function(){return m.call(t.domElement)},set:function(p){r.call(t.domElement,p),t.settings.watchExternalChanges&&!t.internalModification&&t.set(p)}})}}},{key:"_removeWatcher",value:function(){var t=this;if(!n.isUndefined(this.getterSetter)){var i=this.getterSetter,r=i.set,m=i.get;Object.defineProperty(this.domElement,this.attributeToWatch,{configurable:!0,get:function(){return m.call(t.domElement)},set:function(p){r.call(t.domElement,p)}})}}},{key:"_getAttributeToWatch",value:function(){var t;if(this.isInputElement)t="value";else{var i=this.domElement.nodeType;i===Node.ELEMENT_NODE||i===Node.DOCUMENT_NODE||i===Node.DOCUMENT_FRAGMENT_NODE?t="textContent":i===Node.TEXT_NODE&&(t="nodeValue")}return t}},{key:"_historyTableAdd",value:function(){var t=0===this.historyTable.length;if(t||this.rawValue!==this._historyTableCurrentValueUsed()){var i=!0;if(!t){var r=this.historyTableIndex+1;r<this.historyTable.length&&this.rawValue===this.historyTable[r].value?i=!1:n.arrayTrim(this.historyTable,this.historyTableIndex+1)}if(this.historyTableIndex++,i){var m=n.getElementSelection(this.domElement);this.selectionStart=m.start,this.selectionEnd=m.end,this.historyTable.push({value:this.rawValue,start:this.selectionStart+1,end:this.selectionEnd+1}),1<this.historyTable.length&&(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(t){var i;if(0<arguments.length&&void 0!==t&&!t?(i=this.historyTableIndex+1<this.historyTable.length)&&this.historyTableIndex++:(i=0<this.historyTableIndex)&&this.historyTableIndex--,i){var r=this.historyTable[this.historyTableIndex];this.set(r.value,null,!1),n.setElementSelection(this.domElement,r.start,r.end)}}},{key:"_historyTableUndo",value:function(){this._historyTableUndoOrRedo(!0)}},{key:"_historyTableRedo",value:function(){this._historyTableUndoOrRedo(!1)}},{key:"_historyTableForget",value:function(t){for(var i=0<arguments.length&&void 0!==t?t:1,r=[],m=0;m<i;m++)r.push(this.historyTable.shift()),this.historyTableIndex--,this.historyTableIndex<0&&(this.historyTableIndex=0);return 1===r.length?r[0]:r}},{key:"_historyTableCurrentValueUsed",value:function(){var t=this.historyTableIndex;return t<0&&(t=0),n.isUndefinedOrNullOrEmpty(this.historyTable[t])?"":this.historyTable[t].value}},{key:"_parseStyleRules",value:function(){var t=this;n.isUndefinedOrNullOrEmpty(this.settings.styleRules)||""===this.rawValue||(n.isUndefinedOrNullOrEmpty(this.settings.styleRules.positive)||(0<=this.rawValue?this._addCSSClass(this.settings.styleRules.positive):this._removeCSSClass(this.settings.styleRules.positive)),n.isUndefinedOrNullOrEmpty(this.settings.styleRules.negative)||(this.rawValue<0?this._addCSSClass(this.settings.styleRules.negative):this._removeCSSClass(this.settings.styleRules.negative)),n.isUndefinedOrNullOrEmpty(this.settings.styleRules.ranges)||0===this.settings.styleRules.ranges.length||this.settings.styleRules.ranges.forEach(function(i){t.rawValue>=i.min&&t.rawValue<i.max?t._addCSSClass(i.class):t._removeCSSClass(i.class)}),n.isUndefinedOrNullOrEmpty(this.settings.styleRules.userDefined)||0===this.settings.styleRules.userDefined.length||this.settings.styleRules.userDefined.forEach(function(i){if(n.isFunction(i.callback))if(n.isString(i.classes))i.callback(t.rawValue)?t._addCSSClass(i.classes):t._removeCSSClass(i.classes);else if(n.isArray(i.classes))if(2===i.classes.length)i.callback(t.rawValue)?(t._addCSSClass(i.classes[0]),t._removeCSSClass(i.classes[1])):(t._removeCSSClass(i.classes[0]),t._addCSSClass(i.classes[1]));else if(2<i.classes.length){var r=i.callback(t.rawValue);n.isArray(r)?i.classes.forEach(function(m,p){n.isInArray(p,r)?t._addCSSClass(m):t._removeCSSClass(m)}):n.isInt(r)?i.classes.forEach(function(m,p){p===r?t._addCSSClass(m):t._removeCSSClass(m)}):n.isNull(r)?i.classes.forEach(function(m){t._removeCSSClass(m)}):n.throwError("The callback result is not an array nor a valid array index, ".concat(re(r)," given."))}else n.throwError("The classes attribute is not valid for the `styleRules` option.");else n.isUndefinedOrNullOrEmpty(i.classes)?i.callback(t):n.throwError("The callback/classes structure is not valid for the `styleRules` option.");else n.warning("The given `styleRules` callback is not a function, ".concat("undefined"==typeof callback?"undefined":re(callback)," given."),t.settings.showWarnings)}))}},{key:"_addCSSClass",value:function(t){this.domElement.classList.add(t)}},{key:"_removeCSSClass",value:function(t){this.domElement.classList.remove(t)}},{key:"update",value:function(){for(var t=this,i=arguments.length,r=new Array(i),m=0;m<i;m++)r[m]=arguments[m];Array.isArray(r)&&Array.isArray(r[0])&&(r=r[0]);var p=n.cloneObject(this.settings),l=this.rawValue,C={};n.isUndefinedOrNullOrEmpty(r)||0===r.length?C=null:1<=r.length&&r.forEach(function(I){t.constructor._isPreDefinedOptionValid(I)&&(I=t.constructor._getOptionObject(I)),ae(C,I)});try{this._setSettings(C,!0),this._setWritePermissions(),this._updateEventListeners(),this.set(l)}catch(I){return this._setSettings(p,!0),n.throwError("Unable to update the settings, those are invalid: [".concat(I,"]")),this}return this}},{key:"getSettings",value:function(){return this.settings}},{key:"set",value:function(t,i,r){var m,p=1<arguments.length&&void 0!==i?i:null,l=!(2<arguments.length&&void 0!==r)||r;if(n.isUndefined(t))return n.warning("You are trying to set an 'undefined' value ; an error could have occurred.",this.settings.showWarnings),this;if(n.isNull(p)||this._setSettings(p,!0),null===t&&this.settings.emptyInputBehavior!==o.options.emptyInputBehavior.null)return n.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(null===t)return this._setElementAndRawValue(null,null,l),this._saveValueToPersistentStorage(),this;if(m=this.constructor._toNumericValue(t,this.settings),isNaN(Number(m)))return n.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("",l),this;if(""===m)switch(this.settings.emptyInputBehavior){case o.options.emptyInputBehavior.zero:m=0;break;case o.options.emptyInputBehavior.min:m=this.settings.minimumValue;break;case o.options.emptyInputBehavior.max:m=this.settings.maximumValue;break;default:n.isNumber(this.settings.emptyInputBehavior)&&(m=Number(this.settings.emptyInputBehavior))}if(""===m)return this._setElementAndRawValue(this.settings.emptyInputBehavior===o.options.emptyInputBehavior.always?this.settings.currencySymbol:"","",l),this;var I=K(this.constructor._checkIfInRangeWithOverrideOption(m,this.settings),2),q=I[0],v=I[1];if(q&&v&&this.settings.valuesToStrings&&this._checkValuesToStrings(m))return this._setElementAndRawValue(this.settings.valuesToStrings[m],m,l),this._saveValueToPersistentStorage(),this;if(n.isZeroOrHasNoValue(m)&&(m="0"),q&&v){var D=this.constructor._roundRawValue(m,this.settings);return D=this._trimLeadingAndTrailingZeros(D.replace(this.settings.decimalCharacter,".")),m=this._getRawValueToFormat(m),m=this.isFocused?this.constructor._roundFormattedValueShownOnFocus(m,this.settings):(this.settings.divisorWhenUnfocused&&(m=(m/=this.settings.divisorWhenUnfocused).toString()),this.constructor._roundFormattedValueShownOnBlur(m,this.settings)),m=this.constructor._modifyNegativeSignAndDecimalCharacterForFormattedValue(m,this.settings),m=this.constructor._addGroupSeparators(m,this.settings,this.isFocused,this.rawValue,D),!this.isFocused&&this.settings.symbolWhenUnfocused&&(m="".concat(m).concat(this.settings.symbolWhenUnfocused)),(this.settings.decimalPlacesShownOnFocus||this.settings.divisorWhenUnfocused)&&this._saveValueToPersistentStorage(),this._setElementAndRawValue(m,D,l),this._setValidOrInvalidState(D),this}return this._triggerRangeEvents(q,v),n.throwError("The value [".concat(m,"] 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("",l),this}},{key:"setUnformatted",value:function(t,i){var r=1<arguments.length&&void 0!==i?i:null;if(null===t||n.isUndefined(t))return this;n.isNull(r)||this._setSettings(r,!0);var m=this.constructor._removeBrackets(t,this.settings),p=this.constructor._stripAllNonNumberCharacters(m,this.settings,!0,this.isFocused);return n.isNumber(p)||n.throwError("The value is not a valid one, it's not a numeric string nor a recognized currency."),this.constructor._isWithinRangeWithOverrideOption(p,this.settings)?this.setValue(t):n.throwError("The value is out of the range limits [".concat(this.settings.minimumValue,", ").concat(this.settings.maximumValue,"].")),this}},{key:"setValue",value:function(t,i){return this._setElementAndRawValue(t,!(1<arguments.length&&void 0!==i)||i),this}},{key:"_setRawValue",value:function(t,i){var r=!(1<arguments.length&&void 0!==i)||i;if(this.rawValue!==t){var m=this.rawValue;this.rawValue=t,!n.isNull(this.settings.rawValueDivisor)&&0!==this.settings.rawValueDivisor&&""!==t&&null!==t&&this._isUserManuallyEditingTheValue()&&(this.rawValue/=this.settings.rawValueDivisor),this._triggerEvent(o.events.rawValueModified,this.domElement,{oldRawValue:m,newRawValue:this.rawValue,isPristine:this.isPristine(!0),error:null,aNElement:this}),this._parseStyleRules(),r&&this._historyTableAdd()}}},{key:"_setElementValue",value:function(t,i){var r=!(1<arguments.length&&void 0!==i)||i,m=n.getElementValue(this.domElement);return t!==m&&(this.internalModification=!0,n.setElementValue(this.domElement,t),this.internalModification=!1,r&&this._triggerEvent(o.events.formatted,this.domElement,{oldValue:m,newValue:t,oldRawValue:this.rawValue,newRawValue:this.rawValue,isPristine:this.isPristine(!1),error:null,aNElement:this})),this}},{key:"_setElementAndRawValue",value:function(t,i,r){var m=1<arguments.length&&void 0!==i?i:null,p=!(2<arguments.length&&void 0!==r)||r;return n.isNull(m)?m=t:n.isBoolean(m)&&(p=m,m=t),this._setElementValue(t),this._setRawValue(m,p),this}},{key:"_getRawValueToFormat",value:function(t){return n.isNull(this.settings.rawValueDivisor)||0===this.settings.rawValueDivisor||""===t||null===t?t:t*this.settings.rawValueDivisor}},{key:"_checkValuesToStrings",value:function(t){return this.constructor._checkValuesToStringsArray(t,this.valuesToStringsKeys)}},{key:"_isUserManuallyEditingTheValue",value:function(){return this.isFocused&&this.isEditing||this.isDropEvent}},{key:"_executeCallback",value:function(t,i){!n.isNull(i)&&n.isFunction(i)&&i(t,this)}},{key:"_triggerEvent",value:function(t,i,r){var m=1<arguments.length&&void 0!==i?i:document;n.triggerEvent(t,m,2<arguments.length&&void 0!==r?r:null,this.settings.eventBubbles,this.settings.eventIsCancelable)}},{key:"get",value:function(t){return this.getNumericString(0<arguments.length&&void 0!==t?t:null)}},{key:"getNumericString",value:function(t){var i,r=0<arguments.length&&void 0!==t?t:null;return i=n.isNull(this.rawValue)?null:n.trimPaddedZerosFromDecimalPlaces(this.rawValue),this._executeCallback(i,r),i}},{key:"getFormatted",value:function(t){var i=0<arguments.length&&void 0!==t?t:null;"value"in this.domElement||"textContent"in this.domElement||n.throwError("Unable to get the formatted string from the element.");var r=n.getElementValue(this.domElement);return this._executeCallback(r,i),r}},{key:"getNumber",value:function(t){var i,r=0<arguments.length&&void 0!==t?t:null;return i=null===this.rawValue?null:this.constructor._toLocale(this.getNumericString(),"number",this.settings),this._executeCallback(i,r),i}},{key:"getLocalized",value:function(t,i){var r,m,p=0<arguments.length&&void 0!==t?t:null,l=1<arguments.length&&void 0!==i?i:null;n.isFunction(p)&&n.isNull(l)&&(l=p,p=null),(r=n.isEmptyString(this.rawValue)?"":""+Number(this.rawValue))&&0===Number(r)&&this.settings.leadingZero!==o.options.leadingZero.keep&&(r="0"),m=n.isNull(p)?this.settings.outputFormat:p;var C=this.constructor._toLocale(r,m,this.settings);return this._executeCallback(C,l),C}},{key:"reformat",value:function(){return this.set(this.rawValue),this}},{key:"unformat",value:function(){return this._setElementValue(this.getNumericString()),this}},{key:"unformatLocalized",value:function(t){return this._setElementValue(this.getLocalized(0<arguments.length&&void 0!==t?t:null)),this}},{key:"isPristine",value:function(t){return 0<arguments.length&&void 0!==t&&!t?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(){n.setElementSelection(this.domElement,0,n.getElementValue(this.domElement).length)}},{key:"selectNumber",value:function(){var t,i,r=n.getElementValue(this.domElement),m=r.length,p=this.settings.currencySymbol.length,l=this.settings.currencySymbolPlacement,C=n.isNegative(r,this.settings.negativeSignCharacter)?1:0,I=this.settings.suffixText.length;if(t=l===o.options.currencySymbolPlacement.suffix?0:this.settings.negativePositiveSignPlacement===o.options.negativePositiveSignPlacement.left&&1==C&&0<p?p+1:p,l===o.options.currencySymbolPlacement.prefix)i=m-I;else switch(this.settings.negativePositiveSignPlacement){case o.options.negativePositiveSignPlacement.left:i=m-(I+p);break;case o.options.negativePositiveSignPlacement.right:i=0<p?m-(p+C+I):m-(p+I);break;default:i=m-(p+I)}return n.setElementSelection(this.domElement,t,i),this}},{key:"selectInteger",value:function(){var t=0,i=0<=this.rawValue;this.settings.currencySymbolPlacement!==o.options.currencySymbolPlacement.prefix&&(this.settings.currencySymbolPlacement!==o.options.currencySymbolPlacement.suffix||this.settings.negativePositiveSignPlacement!==o.options.negativePositiveSignPlacement.prefix&&this.settings.negativePositiveSignPlacement!==o.options.negativePositiveSignPlacement.none)||(this.settings.showPositiveSign&&i||!i&&this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.prefix&&this.settings.negativePositiveSignPlacement===o.options.negativePositiveSignPlacement.left)&&(t+=1),this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.prefix&&(t+=this.settings.currencySymbol.length);var r=n.getElementValue(this.domElement),m=r.indexOf(this.settings.decimalCharacter);return-1===m&&(m=this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.suffix?r.length-this.settings.currencySymbol.length:r.length,i||this.settings.negativePositiveSignPlacement!==o.options.negativePositiveSignPlacement.suffix&&this.settings.currencySymbolPlacement!==o.options.currencySymbolPlacement.suffix||--m,m-=this.settings.suffixText.length),n.setElementSelection(this.domElement,t,m),this}},{key:"selectDecimal",value:function(){var t,r=n.getElementValue(this.domElement).indexOf(this.settings.decimalCharacter);return t=-1===r?r=0:(r+=1)+Number(this.isFocused?this.settings.decimalPlacesShownOnFocus:this.settings.decimalPlacesShownOnBlur),n.setElementSelection(this.domElement,r,t),this}},{key:"node",value:function(){return this.domElement}},{key:"parent",value:function(){return this.domElement.parentNode}},{key:"detach",value:function(t){var i,r=0<arguments.length&&void 0!==t?t:null;return i=n.isNull(r)?this.domElement:r.node(),this._removeFromLocalList(i),this}},{key:"attach",value:function(t,i){var r=!(1<arguments.length&&void 0!==i)||i;return this._addToLocalList(t.node()),r&&t.update(this.settings),this}},{key:"formatOther",value:function(t,i){return this._formatOrUnformatOther(!0,t,1<arguments.length&&void 0!==i?i:null)}},{key:"unformatOther",value:function(t,i){return this._formatOrUnformatOther(!1,t,1<arguments.length&&void 0!==i?i:null)}},{key:"_formatOrUnformatOther",value:function(t,i,r){var m,p,l=2<arguments.length&&void 0!==r?r:null;if(m=n.isNull(l)?this.settings:this._cloneAndMergeSettings(l),n.isElement(i)){var C=n.getElementValue(i);return p=t?o.format(C,m):o.unformat(C,m),n.setElementValue(i,p),null}return t?o.format(i,m):o.unformat(i,m)}},{key:"init",value:function(t,i){var r=this,m=!(1<arguments.length&&void 0!==i)||i,p=!1,l=[];if(n.isString(t)?l=G(document.querySelectorAll(t)):n.isElement(t)?(l.push(t),p=!0):n.isArray(t)?l=t:n.throwError("The given parameters to the 'init' function are invalid."),0===l.length)return n.warning("No valid DOM elements were given hence no AutoNumeric object were instantiated.",!0),[];var C=this._getLocalList(),I=[];return l.forEach(function(q){var v=r.settings.createLocalList;m&&(r.settings.createLocalList=!1);var D=new o(q,n.getElementValue(q),r.settings);m&&(D._setLocalList(C),r._addToLocalList(q,D),r.settings.createLocalList=v),I.push(D)}),p?I[0]:I}},{key:"clear",value:function(t){return 0<arguments.length&&void 0!==t&&t?this.set("",{emptyInputBehavior:o.options.emptyInputBehavior.focus}):this.set(""),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(t){if(0<arguments.length&&void 0!==t&&t||n.isUndefinedOrNullOrEmpty(this.parentForm)){var i=this._getParentForm();if(!n.isNull(i)&&i!==this.parentForm){var r=this._getFormAutoNumericChildren(this.parentForm);this.parentForm.dataset.anCount=r.length,this._hasFormHandlerFunction(i)?this._incrementParentFormCounter(i):(this._storeFormHandlerFunction(i),this._initializeFormCounterToOne(i))}this.parentForm=i}return this.parentForm}},{key:"_getFormAutoNumericChildren",value:function(t){var i=this;return G(t.querySelectorAll("input")).filter(function(r){return i.constructor.isManagedByAutoNumeric(r)})}},{key:"_getParentForm",value:function(){if("body"===this.domElement.tagName.toLowerCase())return null;var t,i=this.domElement;do{if(n.isNull(i=i.parentNode))return null;if("body"===(t=i.tagName?i.tagName.toLowerCase():""))break}while("form"!==t);return"form"===t?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(t){var i,r=0<arguments.length&&void 0!==t?t:null;return i=n.isNull(r)?this.settings.outputFormat:r,this.constructor._serializeLocalized(this.form(),this.settings.serializeSpaces,i)}},{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(t){var i,r=0<arguments.length&&void 0!==t?t:null;return i=n.isNull(r)?this.settings.outputFormat:r,this.constructor._serializeLocalizedArray(this.form(),this.settings.serializeSpaces,i)}},{key:"formJsonNumericString",value:function(){return JSON.stringify(this.formArrayNumericString())}},{key:"formJsonFormatted",value:function(){return JSON.stringify(this.formArrayFormatted())}},{key:"formJsonLocalized",value:function(t){return JSON.stringify(this.formArrayLocalized(0<arguments.length&&void 0!==t?t:null))}},{key:"formUnformat",value:function(){return this.constructor._getChildANInputElement(this.form()).forEach(function(t){o.getAutoNumericElement(t).unformat()}),this}},{key:"formUnformatLocalized",value:function(){return this.constructor._getChildANInputElement(this.form()).forEach(function(t){o.getAutoNumericElement(t).unformatLocalized()}),this}},{key:"formReformat",value:function(){return this.constructor._getChildANInputElement(this.form()).forEach(function(t){o.getAutoNumericElement(t).reformat()}),this}},{key:"formSubmitNumericString",value:function(t){var i=0<arguments.length&&void 0!==t?t:null;return n.isNull(i)?(this.formUnformat(),this.form().submit(),this.formReformat()):n.isFunction(i)?i(this.formNumericString()):n.throwError("The given callback is not a function."),this}},{key:"formSubmitFormatted",value:function(t){var i=0<arguments.length&&void 0!==t?t:null;return n.isNull(i)?this.form().submit():n.isFunction(i)?i(this.formFormatted()):n.throwError("The given callback is not a function."),this}},{key:"formSubmitLocalized",value:function(t,i){var r=0<arguments.length&&void 0!==t?t:null,m=1<arguments.length&&void 0!==i?i:null;return n.isNull(m)?(this.formUnformatLocalized(),this.form().submit(),this.formReformat()):n.isFunction(m)?m(this.formLocalized(r)):n.throwError("The given callback is not a function."),this}},{key:"formSubmitArrayNumericString",value:function(t){return n.isFunction(t)?t(this.formArrayNumericString()):n.throwError("The given callback is not a function."),this}},{key:"formSubmitArrayFormatted",value:function(t){return n.isFunction(t)?t(this.formArrayFormatted()):n.throwError("The given callback is not a function."),this}},{key:"formSubmitArrayLocalized",value:function(t,i){var r=1<arguments.length&&void 0!==i?i:null;return n.isFunction(t)?t(this.formArrayLocalized(r)):n.throwError("The given callback is not a function."),this}},{key:"formSubmitJsonNumericString",value:function(t){return n.isFunction(t)?t(this.formJsonNumericString()):n.throwError("The given callback is not a function."),this}},{key:"formSubmitJsonFormatted",value:function(t){return n.isFunction(t)?t(this.formJsonFormatted()):n.throwError("The given callback is not a function."),this}},{key:"formSubmitJsonLocalized",value:function(t,i){var r=1<arguments.length&&void 0!==i?i:null;return n.isFunction(t)?t(this.formJsonLocalized(r)):n.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(t){this.autoNumericLocalList=t}},{key:"_getLocalList",value:function(){return this.autoNumericLocalList}},{key:"_hasLocalList",value:function(){return this.autoNumericLocalList instanceof Map&&0!==this.autoNumericLocalList.size}},{key:"_addToLocalList",value:function(t,i){var r=1<arguments.length&&void 0!==i?i:null;n.isNull(r)&&(r=this),n.isUndefined(this.autoNumericLocalList)?n.throwError("The local list provided does not exists when trying to add an element. [".concat(this.autoNumericLocalList,"] given.")):this.autoNumericLocalList.set(t,r)}},{key:"_removeFromLocalList",value:function(t){n.isUndefined(this.autoNumericLocalList)?this.settings.createLocalList&&n.throwError("The local list provided does not exists when trying to remove an element. [".concat(this.autoNumericLocalList,"] given.")):this.autoNumericLocalList.delete(t)}},{key:"_mergeSettings",value:function(){for(var t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];ae.apply(void 0,[this.settings].concat(i))}},{key:"_cloneAndMergeSettings",value:function(){for(var t={},i=arguments.length,r=new Array(i),m=0;m<i;m++)r[m]=arguments[m];return ae.apply(void 0,[t,this.settings].concat(r)),t}},{key:"_updatePredefinedOptions",value:function(t,i){var r=1<arguments.length&&void 0!==i?i:null;return n.isNull(r)?this.update(t):(this._mergeSettings(t,r),this.update(this.settings)),this}},{key:"french",value:function(t){var i=0<arguments.length&&void 0!==t?t:null;return this._updatePredefinedOptions(o.getPredefinedOptions().French,i),this}},{key:"northAmerican",value:function(t){var i=0<arguments.length&&void 0!==t?t:null;return this._updatePredefinedOptions(o.getPredefinedOptions().NorthAmerican,i),this}},{key:"british",value:function(t){var i=0<arguments.length&&void 0!==t?t:null;return this._updatePredefinedOptions(o.getPredefinedOptions().British,i),this}},{key:"swiss",value:function(t){var i=0<arguments.length&&void 0!==t?t:null;return this._updatePredefinedOptions(o.getPredefinedOptions().Swiss,i),this}},{key:"japanese",value:function(t){var i=0<arguments.length&&void 0!==t?t:null;return this._updatePredefinedOptions(o.getPredefinedOptions().Japanese,i),this}},{key:"spanish",value:function(t){var i=0<arguments.length&&void 0!==t?t:null;return this._updatePredefinedOptions(o.getPredefinedOptions().Spanish,i),this}},{key:"chinese",value:function(t){var i=0<arguments.length&&void 0!==t?t:null;return this._updatePredefinedOptions(o.getPredefinedOptions().Chinese,i),this}},{key:"brazilian",value:function(t){var i=0<arguments.length&&void 0!==t?t:null;return this._updatePredefinedOptions(o.getPredefinedOptions().Brazilian,i),this}},{key:"_runCallbacksFoundInTheSettingsObject",value:function(){for(var t in this.settings)if(Object.prototype.hasOwnProperty.call(this.settings,t)){var i=this.settings[t];if("function"==typeof i)this.settings[t]=i(this,t);else{var r=this.domElement.getAttribute(t);r=n.camelize(r),"function"==typeof this.settings[r]&&(this.settings[t]=r(this,t))}}}},{key:"_setTrailingNegativeSignInfo",value:function(){this.isTrailingNegative=this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.prefix&&this.settings.negativePositiveSignPlacement===o.options.negativePositiveSignPlacement.suffix||this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.suffix&&(this.settings.negativePositiveSignPlacement===o.options.negativePositiveSignPlacement.left||this.settings.negativePositiveSignPlacement===o.options.negativePositiveSignPlacement.right)}},{key:"_modifyNegativeSignAndDecimalCharacterForRawValue",value:function(t){return"."!==this.settings.decimalCharacter&&(t=t.replace(this.settings.decimalCharacter,".")),"-"!==this.settings.negativeSignCharacter&&this.settings.isNegativeSignAllowed&&(t=t.replace(this.settings.negativeSignCharacter,"-")),t.match(/\d/)||(t+="0"),t}},{key:"_initialCaretPosition",value:function(t){n.isNull(this.settings.caretPositionOnFocus)&&this.settings.selectOnFocus===o.options.selectOnFocus.doNotSelect&&n.throwError("`_initialCaretPosition()` should never be called when the `caretPositionOnFocus` option is `null`.");var i=this.rawValue<0,r=n.isZeroOrHasNoValue(t),m=t.length,p=0,l=0,C=!1,I=0;this.settings.caretPositionOnFocus!==o.options.caretPositionOnFocus.start&&(p=(t=(t=(t=t.replace(this.settings.negativeSignCharacter,"")).replace(this.settings.positiveSignCharacter,"")).replace(this.settings.currencySymbol,"")).length,C=n.contains(t,this.settings.decimalCharacter),this.settings.caretPositionOnFocus!==o.options.caretPositionOnFocus.decimalLeft&&this.settings.caretPositionOnFocus!==o.options.caretPositionOnFocus.decimalRight||(I=C?(l=t.indexOf(this.settings.decimalCharacter),this.settings.decimalCharacter.length):(l=p,0)));var q="";i?q=this.settings.negativeSignCharacter:this.settings.showPositiveSign&&!r&&(q=this.settings.positiveSignCharacter);var v,D=q.length,R=this.settings.currencySymbol.length;if(this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.prefix){if(this.settings.caretPositionOnFocus===o.options.caretPositionOnFocus.start)if(this.settings.negativePositiveSignPlacement!==o.options.negativePositiveSignPlacement.none&&(i||!i&&this.settings.showPositiveSign&&!r))switch(this.settings.negativePositiveSignPlacement){case o.options.negativePositiveSignPlacement.prefix:case o.options.negativePositiveSignPlacement.left:case o.options.negativePositiveSignPlacement.right:v=D+R;break;case o.options.negativePositiveSignPlacement.suffix:v=R}else v=R;else if(this.settings.caretPositionOnFocus===o.options.caretPositionOnFocus.end)if(this.settings.negativePositiveSignPlacement!==o.options.negativePositiveSignPlacement.none&&(i||!i&&this.settings.showPositiveSign&&!r))switch(this.settings.negativePositiveSignPlacement){case o.options.negativePositiveSignPlacement.prefix:case o.options.negativePositiveSignPlacement.left:case o.options.negativePositiveSignPlacement.right:v=m;break;case o.options.negativePositiveSignPlacement.suffix:v=R+p}else v=m;else if(this.settings.caretPositionOnFocus===o.options.caretPositionOnFocus.decimalLeft)if(this.settings.negativePositiveSignPlacement!==o.options.negativePositiveSignPlacement.none&&(i||!i&&this.settings.showPositiveSign&&!r))switch(this.settings.negativePositiveSignPlacement){case o.options.negativePositiveSignPlacement.prefix:case o.options.negativePositiveSignPlacement.left:case o.options.negativePositiveSignPlacement.right:v=D+R+l;break;case o.options.negativePositiveSignPlacement.suffix:v=R+l}else v=R+l;else if(this.settings.caretPositionOnFocus===o.options.caretPositionOnFocus.decimalRight)if(this.settings.negativePositiveSignPlacement!==o.options.negativePositiveSignPlacement.none&&(i||!i&&this.settings.showPositiveSign&&!r))switch(this.settings.negativePositiveSignPlacement){case o.options.negativePositiveSignPlacement.prefix:case o.options.negativePositiveSignPlacement.left:case o.options.negativePositiveSignPlacement.right:v=D+R+l+I;break;case o.options.negativePositiveSignPlacement.suffix:v=R+l+I}else v=R+l+I}else if(this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.suffix)if(this.settings.caretPositionOnFocus===o.options.caretPositionOnFocus.start)if(this.settings.negativePositiveSignPlacement!==o.options.negativePositiveSignPlacement.none&&(i||!i&&this.settings.showPositiveSign&&!r))switch(this.settings.negativePositiveSignPlacement){case o.options.negativePositiveSignPlacement.suffix:case o.options.negativePositiveSignPlacement.right:case o.options.negativePositiveSignPlacement.left:v=0;break;case o.options.negativePositiveSignPlacement.prefix:v=D}else v=0;else if(this.settings.caretPositionOnFocus===o.options.caretPositionOnFocus.end)if(this.settings.negativePositiveSignPlacement!==o.options.negativePositiveSignPlacement.none&&(i||!i&&this.settings.showPositiveSign&&!r))switch(this.settings.negativePositiveSignPlacement){case o.options.negativePositiveSignPlacement.suffix:case o.options.negativePositiveSignPlacement.right:case o.options.negativePositiveSignPlacement.left:v=p;break;case o.options.negativePositiveSignPlacement.prefix:v=D+p}else v=p;else if(this.settings.caretPositionOnFocus===o.options.caretPositionOnFocus.decimalLeft)if(this.settings.negativePositiveSignPlacement!==o.options.negativePositiveSignPlacement.none&&(i||!i&&this.settings.showPositiveSign&&!r))switch(this.settings.negativePositiveSignPlacement){case o.options.negativePositiveSignPlacement.suffix:case o.options.negativePositiveSignPlacement.right:case o.options.negativePositiveSignPlacement.left:v=l;break;case o.options.negativePositiveSignPlacement.prefix:v=D+l}else v=l;else if(this.settings.caretPositionOnFocus===o.options.caretPositionOnFocus.decimalRight)if(this.settings.negativePositiveSignPlacement!==o.options.negativePositiveSignPlacement.none&&(i||!i&&this.settings.showPositiveSign&&!r))switch(this.settings.negativePositiveSignPlacement){case o.options.negativePositiveSignPlacement.suffix:case o.options.negativePositiveSignPlacement.right:case o.options.negativePositiveSignPlacement.left:v=l+I;break;case o.options.negativePositiveSignPlacement.prefix:v=D+l+I}else v=l+I;return v}},{key:"_triggerRangeEvents",value:function(t,i){t||this._triggerEvent(o.events.minRangeExceeded,this.domElement),i||this._triggerEvent(o.events.maxRangeExceeded,this.domElement)}},{key:"_setInvalidState",value:function(){this.isInputElement?n.setInvalidState(this.domElement):this._addCSSClass(this.settings.invalidClass),this._triggerEvent(o.events.invalidValue,this.domElement),this.validState=!1}},{key:"_setValidState",value:function(){this.isInputElement?n.setValidState(this.domElement):this._removeCSSClass(this.settings.invalidClass),this.validState||this._triggerEvent(o.events.correctedValue,this.domElement),this.validState=!0}},{key:"_setValidOrInvalidState",value:function(t){if(this.settings.overrideMinMaxLimits===o.options.overrideMinMaxLimits.invalid){var i=this.constructor._isMinimumRangeRespected(t,this.settings),r=this.constructor._isMaximumRangeRespected(t,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(t){if(""===t||null===t)return t;if(this.settings.leadingZero!==o.options.leadingZero.keep){if(0===Number(t))return"0";t=t.replace(/^(-)?0+(?=\d)/g,"$1")}return n.contains(t,".")&&(t=t.replace(/(\.[0-9]*?)0+$/,"$1")),t.replace(/\.$/,"")}},{key:"_setPersistentStorageName",value:function(){this.settings.saveValueToSessionStorage&&(this.rawValueStorageName=""===this.domElement.name||n.isUndefined(this.domElement.name)?"".concat(this.storageNamePrefix).concat(this.domElement.id):"".concat(this.storageNamePrefix).concat(decodeURIComponent(this.domElement.name)))}},{key:"_saveValueToPersistentStorage",value:function(){this.settings.saveValueToSessionStorage&&(this.sessionStorageAvailable?sessionStorage.setItem(this.rawValueStorageName,this.rawValue):document.cookie="".concat(this.rawValueStorageName,"=").concat(this.rawValue,"; expires= ; path=/"))}},{key:"_getValueFromPersistentStorage",value:function(){return this.settings.saveValueToSessionStorage?this.sessionStorageAvailable?sessionStorage.getItem(this.rawValueStorageName):this.constructor._readCookie(this.rawValueStorageName):(n.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(){if(this.settings.saveValueToSessionStorage)if(this.sessionStorageAvailable)sessionStorage.removeItem(this.rawValueStorageName);else{var t=new Date;t.setTime(t.getTime()-864e5);var i="; expires=".concat(t.toUTCString());document.cookie="".concat(this.rawValueStorageName,"='' ;").concat(i,"; path=/")}}},{key:"_getDefaultValue",value:function(t){var i=t.getAttribute("value");return n.isNull(i)?"":i}},{key:"_onFocusInAndMouseEnter",value:function(t){if(this.isEditing=!1,!this.formulaMode&&this.settings.unformatOnHover&&"mouseenter"===t.type&&t.altKey)this.constructor._unformatAltHovered(this);else if("focus"===t.type&&(this.isFocused=!0,this.rawValueOnFocus=this.rawValue),"focus"===t.type&&this.settings.unformatOnHover&&this.hoveredWithAlt&&this.constructor._reformatAltHovered(this),"focus"===t.type||"mouseenter"===t.type&&!this.isFocused){var i=null;this.settings.emptyInputBehavior===o.options.emptyInputBehavior.focus&&this.rawValue<0&&null!==this.settings.negativeBracketsTypeOnBlur&&this.settings.isNegativeSignAllowed&&(i=this.constructor._removeBrackets(n.getElementValue(this.domElement),this.settings));var r=this._getRawValueToFormat(this.rawValue);if(""!==r){var m=this.constructor._roundFormattedValueShownOnFocusOrBlur(r,this.settings,this.isFocused);i=this.settings.showOnlyNumbersOnFocus===o.options.showOnlyNumbersOnFocus.onlyNumbers?(this.settings.digitGroupSeparator="",this.settings.currencySymbol="",this.settings.suffixText="",m.replace(".",this.settings.decimalCharacter)):n.isNull(m)?"":this.constructor._addGroupSeparators(m.replace(".",this.settings.decimalCharacter),this.settings,this.isFocused,r)}this.valueOnFocus=n.isNull(i)?"":i,this.lastVal=this.valueOnFocus;var p=this.constructor._isElementValueEmptyOrOnlyTheNegativeSign(this.valueOnFocus,this.settings),l=this.constructor._orderValueCurrencySymbolAndSuffixText(this.valueOnFocus,this.settings,!0),C=p&&""!==l&&this.settings.emptyInputBehavior===o.options.emptyInputBehavior.focus;C&&(i=l),n.isNull(i)||this._setElementValue(i),C&&l===this.settings.currencySymbol&&this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.suffix&&n.setElementSelection(t.target,0)}}},{key:"_onFocus",value:function(){this.settings.isCancellable&&this._saveCancellableValue()}},{key:"_onFocusIn",value:function(t){this.settings.selectOnFocus?this.select():n.isNull(this.settings.caretPositionOnFocus)||n.setElementSelection(t.target,this._initialCaretPosition(n.getElementValue(this.domElement)))}},{key:"_enterFormulaMode",value:function(){this.settings.formulaMode&&(this.formulaMode=!0,n.setElementValue(this.domElement,"="),n.setElementSelection(this.domElement,1))}},{key:"_exitFormulaMode",value:function(){var t,i=n.getElementValue(this.domElement);i=i.replace(/^\s*=/,"");try{var r=new U(i,this.settings.decimalCharacter);t=(new f).evaluate(r)}catch(m){return this._triggerEvent(o.events.invalidFormula,this.domElement,{formula:i,aNElement:this}),this.reformat(),void(this.formulaMode=!1)}this._triggerEvent(o.events.validFormula,this.domElement,{formula:i,result:t,aNElement:this}),this.set(t),this.formulaMode=!1}},{key:"_acceptNonPrintableKeysInFormulaMode",value:function(){return this.eventKey===O.keyName.Backspace||this.eventKey===O.keyName.Delete||this.eventKey===O.keyName.LeftArrow||this.eventKey===O.keyName.RightArrow||this.eventKey===O.keyName.Home||this.eventKey===O.keyName.End}},{key:"_onKeydown",value:function(t){if(this.formatted=!1,this.isEditing=!0,this.formulaMode||this.isFocused||!this.settings.unformatOnHover||!t.altKey||this.domElement!==n.getHoveredElement()){if(this._updateEventKeyInfo(t),this.keydownEventCounter+=1,1===this.keydownEventCounter&&(this.initialValueOnFirstKeydown=n.getElementValue(t.target),this.initialRawValueOnFirstKeydown=this.rawValue),this.formulaMode){if(this.eventKey===O.keyName.Esc)return this.formulaMode=!1,void this.reformat();if(this.eventKey===O.keyName.Enter)return void this._exitFormulaMode();if(this._acceptNonPrintableKeysInFormulaMode())return}else if(this.eventKey===O.keyName.Equal)return void this._enterFormulaMode();if(this.domElement.readOnly||this.settings.readOnly||this.domElement.disabled)this.processed=!0;else{this.eventKey===O.keyName.Esc&&(t.preventDefault(),this.settings.isCancellable&&this.rawValue!==this.savedCancellableValue&&(this.set(this.savedCancellableValue),this._triggerEvent(o.events.native.input,t.target)),this.select());var i=n.getElementValue(t.target);if(this.eventKey===O.keyName.Enter&&this.rawValue!==this.rawValueOnFocus&&(this._triggerEvent(o.events.native.change,t.target),this.valueOnFocus=i,this.rawValueOnFocus=this.rawValue,this.settings.isCancellable&&this._saveCancellableValue()),this._updateInternalProperties(t),this._processNonPrintableKeysAndShortcuts(t))this.processed=!0;else if(this.eventKey===O.keyName.Backspace||this.eventKey===O.keyName.Delete){var r=this._processCharacterDeletion();if(this.processed=!0,!r)return void t.preventDefault();this._formatValue(t),(i=n.getElementValue(t.target))!==this.lastVal&&this.throwInput&&(this._triggerEvent(o.events.native.input,t.target),t.preventDefault()),this.lastVal=i,this.throwInput=!0}}}else this.constructor._unformatAltHovered(this)}},{key:"_onKeypress",value:function(t){if(this.formulaMode){if(this._acceptNonPrintableKeysInFormulaMode()||this.settings.formulaChars.test(this.eventKey))return;t.preventDefault()}else if(this.eventKey!==O.keyName.Insert){var i=this.processed;if(this._updateInternalProperties(t),!this._processNonPrintableKeysAndShortcuts(t))if(i)t.preventDefault();else{if(this._processCharacterInsertion()){this._formatValue(t);var r=n.getElementValue(t.target);if(r!==this.lastVal&&this.throwInput)this._triggerEvent(o.events.native.input,t.target),t.preventDefault();else{if((this.eventKey===this.settings.decimalCharacter||this.eventKey===this.settings.decimalCharacterAlternative)&&n.getElementSelection(t.target).start===n.getElementSelection(t.target).end&&n.getElementSelection(t.target).start===r.indexOf(this.settings.decimalCharacter)){var m=n.getElementSelection(t.target).start+1;n.setElementSelection(t.target,m)}t.preventDefault()}return this.lastVal=n.getElementValue(t.target),this.throwInput=!0,void this._setValidOrInvalidState(this.rawValue)}t.preventDefault()}}}},{key:"_onKeyup",value:function(t){if(this.isEditing=!1,this.keydownEventCounter=0,!this.formulaMode)if(this.settings.isCancellable&&this.eventKey===O.keyName.Esc)t.preventDefault();else{if(this.eventKey===O.keyName.Z||this.eventKey===O.keyName.z){if(t.ctrlKey&&t.shiftKey)return t.preventDefault(),this._historyTableRedo(),void(this.onGoingRedo=!0);if(t.ctrlKey&&!t.shiftKey){if(!this.onGoingRedo)return t.preventDefault(),void this._historyTableUndo();this.onGoingRedo=!1}}if(this.onGoingRedo&&(t.ctrlKey||t.shiftKey)&&(this.onGoingRedo=!1),(t.ctrlKey||t.metaKey)&&this.eventKey===O.keyName.x){var i=n.getElementSelection(this.domElement).start,r=this.constructor._toNumericValue(n.getElementValue(t.target),this.settings);this.set(r),this._setCaretPosition(i)}if(this.eventKey===O.keyName.Alt&&this.settings.unformatOnHover&&this.hoveredWithAlt)this.constructor._reformatAltHovered(this);else if(!t.ctrlKey&&!t.metaKey||this.eventKey!==O.keyName.Backspace&&this.eventKey!==O.keyName.Delete){this._updateInternalProperties(t);var m=this._processNonPrintableKeysAndShortcuts(t);delete this.valuePartsBeforePaste;var p=n.getElementValue(t.target);if(!(m||""===p&&""===this.initialValueOnFirstKeydown)&&(p===this.settings.currencySymbol?n.setElementSelection(t.target,this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.suffix?0:this.settings.currencySymbol.length):this.eventKey===O.keyName.Tab&&n.setElementSelection(t.target,0,p.length),(p===this.settings.suffixText||""===this.rawValue&&""!==this.settings.currencySymbol&&""!==this.settings.suffixText)&&n.setElementSelection(t.target,0),null!==this.settings.decimalPlacesShownOnFocus&&this._saveValueToPersistentStorage(),this.formatted||this._formatValue(t),this._setValidOrInvalidState(this.rawValue),this._saveRawValueForAndroid(),p!==this.initialValueOnFirstKeydown&&this._triggerEvent(o.events.formatted,t.target,{oldValue:this.initialValueOnFirstKeydown,newValue:p,oldRawValue:this.initialRawValueOnFirstKeydown,newRawValue:this.rawValue,isPristine:this.isPristine(!1),error:null,aNElement:this}),1<this.historyTable.length)){var l=n.getElementSelection(this.domElement);this.selectionStart=l.start,this.selectionEnd=l.end,this.historyTable[this.historyTableIndex].start=this.selectionStart,this.historyTable[this.historyTableIndex].end=this.selectionEnd}}else{var C=n.getElementValue(t.target);this._setRawValue(this._formatOrUnformatOther(!1,C))}}}},{key:"_saveRawValueForAndroid",value:function(){if(this.eventKey===O.keyName.AndroidDefault){var t=this.constructor._stripAllNonNumberCharactersExceptCustomDecimalChar(this.getFormatted(),this.settings,!0,this.isFocused);t=this.constructor._convertToNumericString(t,this.settings),this._setRawValue(t)}}},{key:"_onFocusOutAndMouseLeave",value:function(t){if(this.isEditing=!1,"mouseleave"!==t.type||!this.formulaMode)if(this.settings.unformatOnHover&&"mouseleave"===t.type&&this.hoveredWithAlt)this.constructor._reformatAltHovered(this);else if("mouseleave"===t.type&&!this.isFocused||"blur"===t.type){"blur"===t.type&&this.formulaMode&&this._exitFormulaMode(),this._saveValueToPersistentStorage(),this.settings.showOnlyNumbersOnFocus===o.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=n.isNull(i),m=K(this.constructor._checkIfInRangeWithOverrideOption(i,this.settings),2),p=m[0],l=m[1],C=!1;if(""===i||r||(this._triggerRangeEvents(p,l),this.settings.valuesToStrings&&this._checkValuesToStrings(i)&&(this._setElementValue(this.settings.valuesToStrings[i]),C=!0)),!C){var I;if(I=r||""===i?i:String(i),""===i||r){if(""===i)switch(this.settings.emptyInputBehavior){case o.options.emptyInputBehavior.zero:this._setRawValue("0"),I=this.constructor._roundValue("0",this.settings,0);break;case o.options.emptyInputBehavior.min:this._setRawValue(this.settings.minimumValue),I=this.constructor._roundFormattedValueShownOnFocusOrBlur(this.settings.minimumValue,this.settings,this.isFocused);break;case o.options.emptyInputBehavior.max:this._setRawValue(this.settings.maximumValue),I=this.constructor._roundFormattedValueShownOnFocusOrBlur(this.settings.maximumValue,this.settings,this.isFocused);break;default:n.isNumber(this.settings.emptyInputBehavior)&&(this._setRawValue(this.settings.emptyInputBehavior),I=this.constructor._roundFormattedValueShownOnFocusOrBlur(this.settings.emptyInputBehavior,this.settings,this.isFocused))}}else p&&l&&!this.constructor._isElementValueEmptyOrOnlyTheNegativeSign(i,this.settings)?(I=this._modifyNegativeSignAndDecimalCharacterForRawValue(I),this.settings.divisorWhenUnfocused&&!n.isNull(I)&&(I=(I/=this.settings.divisorWhenUnfocused).toString()),I=this.constructor._roundFormattedValueShownOnBlur(I,this.settings),I=this.constructor._modifyNegativeSignAndDecimalCharacterForFormattedValue(I,this.settings)):this._triggerRangeEvents(p,l);var q=this.constructor._orderValueCurrencySymbolAndSuffixText(I,this.settings,!1);this.constructor._isElementValueEmptyOrOnlyTheNegativeSign(I,this.settings)||r&&this.settings.emptyInputBehavior===o.options.emptyInputBehavior.null||(q=this.constructor._addGroupSeparators(I,this.settings,!1,i)),q===i&&""!==i&&this.settings.allowDecimalPadding!==o.options.allowDecimalPadding.never&&this.settings.allowDecimalPadding!==o.options.allowDecimalPadding.floats||(this.settings.symbolWhenUnfocused&&""!==i&&null!==i&&(q="".concat(q).concat(this.settings.symbolWhenUnfocused)),this._setElementValue(q))}this._setValidOrInvalidState(this.rawValue),"blur"===t.type&&this._onBlur(t)}}},{key:"_onPaste",value:function(t){if(t.preventDefault(),!(this.settings.readOnly||this.domElement.readOnly||this.domElement.disabled)){var i,r;window.clipboardData&&window.clipboardData.getData?i=window.clipboardData.getData("Text"):t.clipboardData&&t.clipboardData.getData?i=t.clipboardData.getData("text/plain"):n.throwError("Unable to retrieve the pasted value. Please use a modern browser (ie. Firefox or Chromium).");var m=n.getElementValue(r=t.target.tagName?t.target:t.explicitOriginalTarget),p=r.selectionStart||0,l=r.selectionEnd||0,C=l-p;if(C===m.length){var I=this._preparePastedText(i),q=n.arabicToLatinNumbers(I,!1,!1,!1);return"."===q||""===q||"."!==q&&!n.isNumber(q)?(this.formatted=!0,void(this.settings.onInvalidPaste===o.options.onInvalidPaste.error&&n.throwError("The pasted value '".concat(i,"' is not a valid paste content.")))):(this.set(q),this.formatted=!0,void this._triggerEvent(o.events.native.input,r))}var v=n.isNegativeStrict(i,this.settings.negativeSignCharacter);v&&(i=i.slice(1,i.length));var D,R,B=this._preparePastedText(i);if("."!==(D="."===B?".":n.arabicToLatinNumbers(B,!1,!1,!1))&&(!n.isNumber(D)||""===D))return this.formatted=!0,void(this.settings.onInvalidPaste===o.options.onInvalidPaste.error&&n.throwError("The pasted value '".concat(i,"' is not a valid paste content.")));var j,z,ee=n.isNegativeStrict(this.getNumericString(),this.settings.negativeSignCharacter);j=!(!v||ee)&&(ee=!0);var ie=m.slice(0,p),ue=m.slice(l,m.length);z=this._preparePastedText(p!==l?ie+ue:m),ee&&(z=n.setRawNegativeSign(z)),R=n.convertCharacterCountToIndexPosition(n.countNumberCharactersOnTheCaretLeftSide(m,p,this.settings.decimalCharacter)),j&&R++;var oe=z.slice(0,R),ye=z.slice(R,z.length),Fe=!1;"."===D&&(n.contains(oe,".")&&(Fe=!0,oe=oe.replace(".","")),ye=ye.replace(".",""));var Re=!1;switch(""===oe&&"-"===ye&&(oe="-",Re=!(ye="")),this.settings.onInvalidPaste){case o.options.onInvalidPaste.truncate:case o.options.onInvalidPaste.replace:for(var He=n.parseStr(this.settings.minimumValue),Ze=n.parseStr(this.settings.maximumValue),_e=z,be=0,me=oe;be<D.length&&(z=(me+=D[be])+ye,this.constructor._checkIfInRange(z,He,Ze));)_e=z,be++;if(R+=be,Re&&R++,this.settings.onInvalidPaste===o.options.onInvalidPaste.truncate){z=_e,Fe&&R--;break}for(var Pe=R,$e=_e.length;be<D.length&&Pe<$e;)if("."!==_e[Pe]){if(z=n.replaceCharAt(_e,Pe,D[be]),!this.constructor._checkIfInRange(z,He,Ze))break;_e=z,be++,Pe++}else Pe++;R=Pe,Fe&&R--,z=_e;break;default:if(z="".concat(oe).concat(D).concat(ye),p===l)R=n.convertCharacterCountToIndexPosition(n.countNumberCharactersOnTheCaretLeftSide(m,p,this.settings.decimalCharacter))+D.length;else if(""===ye)R=n.convertCharacterCountToIndexPosition(n.countNumberCharactersOnTheCaretLeftSide(m,p,this.settings.decimalCharacter))+D.length,Re&&R++;else{var Ye=n.convertCharacterCountToIndexPosition(n.countNumberCharactersOnTheCaretLeftSide(m,l,this.settings.decimalCharacter)),Xe=n.getElementValue(r).slice(p,l);R=Ye-C+n.countCharInText(this.settings.digitGroupSeparator,Xe)+D.length}j&&R++,Fe&&R--}if(n.isNumber(z)&&""!==z){var Me=!1,Je=!1;try{this.set(z),Me=!0}catch(tt){var Ie;switch(this.settings.onInvalidPaste){case o.options.onInvalidPaste.clamp:Ie=n.clampToRangeLimits(z,this.settings);try{this.set(Ie)}catch(nt){n.throwError("Fatal error: Unable to set the clamped value '".concat(Ie,"'."))}Me=Je=!0,z=Ie;break;case o.options.onInvalidPaste.error:case o.options.onInvalidPaste.truncate:case o.options.onInvalidPaste.replace:n.throwError("The pasted value '".concat(i,"' results in a value '").concat(z,"' that is outside of the minimum [").concat(this.settings.minimumValue,"] and maximum [").concat(this.settings.maximumValue,"] value range."));default:return}}var Qe,Le=n.getElementValue(r);if(Me)switch(this.settings.onInvalidPaste){case o.options.onInvalidPaste.clamp:if(Je){n.setElementSelection(r,this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.suffix?Le.length-this.settings.currencySymbol.length:Le.length);break}default:Qe=n.findCaretPositionInFormattedNumber(z,R,Le,this.settings.decimalCharacter),n.setElementSelection(r,Qe)}Me&&m!==Le&&this._triggerEvent(o.events.native.input,r)}else this.settings.onInvalidPaste===o.options.onInvalidPaste.error&&n.throwError("The pasted value '".concat(i,"' would result into an invalid content '").concat(z,"'."))}}},{key:"_onBlur",value:function(t){this.isFocused=!1,this.isEditing=!1,this.rawValue!==this.rawValueOnFocus&&this._triggerEvent(o.events.native.change,t.target),this.rawValueOnFocus=void 0}},{key:"_onWheel",value:function(t){this.formulaMode||this.settings.readOnly||this.domElement.readOnly||this.domElement.disabled||this.settings.modifyValueOnWheel&&(this.settings.wheelOn===o.options.wheelOn.focus?this.isFocused?t.shiftKey||this.wheelAction(t):t.shiftKey&&this.wheelAction(t):this.settings.wheelOn===o.options.wheelOn.hover?t.shiftKey?(t.preventDefault(),window.scrollBy(0,n.isNegativeStrict(String(t.deltaY))?-50:50)):this.wheelAction(t):n.throwError("Unknown `wheelOn` option."))}},{key:"wheelAction",value:function(t){this.isWheelEvent=!0;var i,r=t.target.selectionStart||0,m=t.target.selectionEnd||0,p=this.rawValue;if(n.isUndefinedOrNullOrEmpty(p)?0<this.settings.minimumValue||this.settings.maximumValue<0?n.isWheelUpEvent(t)?i=this.settings.minimumValue:n.isWheelDownEvent(t)?i=this.settings.maximumValue:n.throwError("The event is not a 'wheel' event."):i=0:i=p,i=+i,n.isNumber(this.settings.wheelStep)){var l=+this.settings.wheelStep;n.isWheelUpEvent(t)?i+=l:n.isWheelDownEvent(t)&&(i-=l)}else n.isWheelUpEvent(t)?i=n.addAndRoundToNearestAuto(i,this.settings.decimalPlacesRawValue):n.isWheelDownEvent(t)&&(i=n.subtractAndRoundToNearestAuto(i,this.settings.decimalPlacesRawValue));(i=n.clampToRangeLimits(i,this.settings))!==+p&&(this.set(i),this._triggerEvent(o.events.native.input,t.target)),t.preventDefault(),this._setSelection(r,m),this.isWheelEvent=!1}},{key:"_onDrop",value:function(t){if(!this.formulaMode){var i;this.isDropEvent=!0,t.preventDefault(),i=n.isIE11()?"text":"text/plain";var r=t.dataTransfer.getData(i),m=this.unformatOther(r);this.set(m),this.isDropEvent=!1}}},{key:"_onFormSubmit",value:function(){var t=this;return this._getFormAutoNumericChildren(this.parentForm).map(function(i){return t.constructor.getAutoNumericElement(i)}).forEach(function(i){return i._unformatOnSubmit()}),!0}},{key:"_onFormReset",value:function(){var t=this;this._getFormAutoNumericChildren(this.parentForm).map(function(i){return t.constructor.getAutoNumericElement(i)}).forEach(function(i){var r=t._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(t){if(n.character(t)===O.keyName.Alt){var i=n.getHoveredElement();if(o.isManagedByAutoNumeric(i)){var r=o.getAutoNumericElement(i);!r.formulaMode&&r.settings.unformatOnHover&&this.constructor._unformatAltHovered(r)}}}},{key:"_onKeyupGlobal",value:function(t){if(n.character(t)===O.keyName.Alt){var i=n.getHoveredElement();if(o.isManagedByAutoNumeric(i)){var r=o.getAutoNumericElement(i);if(r.formulaMode||!r.settings.unformatOnHover)return;this.constructor._reformatAltHovered(r)}}}},{key:"_isElementTagSupported",value:function(){return n.isElement(this.domElement)||n.throwError("The DOM element is not valid, ".concat(this.domElement," given.")),n.isInArray(this.domElement.tagName.toLowerCase(),this.allowedTagList)}},{key:"_isInputElement",value:function(){return"input"===this.domElement.tagName.toLowerCase()}},{key:"_isInputTypeSupported",value:function(){return"text"===this.domElement.type||"hidden"===this.domElement.type||"tel"===this.domElement.type||n.isUndefinedOrNullOrEmpty(this.domElement.type)}},{key:"_checkElement",value:function(){var t=this.domElement.tagName.toLowerCase();this._isElementTagSupported()||n.throwError("The <".concat(t,"> tag is not supported by autoNumeric")),this._isInputElement()?(this._isInputTypeSupported()||n.throwError('The input type "'.concat(this.domElement.type,'" is not supported by autoNumeric')),this.isInputElement=!0):(this.isInputElement=!1,this.isContentEditable=this.domElement.hasAttribute("contenteditable")&&"true"===this.domElement.getAttribute("contenteditable"))}},{key:"_formatDefaultValueOnPageLoad",value:function(t){var i,r=0<arguments.length&&void 0!==t?t:null,m=!0;if(n.isNull(r)?(i=n.getElementValue(this.domElement).trim(),this.domElement.setAttribute("value",i)):i=r,this.isInputElement||this.isContentEditable){var p=this.constructor._toNumericValue(i,this.settings);if(this.domElement.hasAttribute("value")&&""!==this.domElement.getAttribute("value")){if(null!==this.settings.defaultValueOverride&&this.settings.defaultValueOverride.toString()!==i||null===this.settings.defaultValueOverride&&""!==i&&i!==this.domElement.getAttribute("value")||""!==i&&"hidden"===this.domElement.getAttribute("type")&&!n.isNumber(p)){if(this.settings.saveValueToSessionStorage&&(null!==this.settings.decimalPlacesShownOnFocus||this.settings.divisorWhenUnfocused)&&this._setRawValue(this._getValueFromPersistentStorage()),!this.settings.saveValueToSessionStorage){var l=this.constructor._removeBrackets(i,this.settings);(this.settings.negativePositiveSignPlacement===o.options.negativePositiveSignPlacement.suffix||this.settings.negativePositiveSignPlacement!==o.options.negativePositiveSignPlacement.prefix&&this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.suffix)&&""!==this.settings.negativeSignCharacter&&n.isNegative(i,this.settings.negativeSignCharacter)?this._setRawValue("-".concat(this.constructor._stripAllNonNumberCharacters(l,this.settings,!0,this.isFocused))):this._setRawValue(this.constructor._stripAllNonNumberCharacters(l,this.settings,!0,this.isFocused))}m=!1}}else isNaN(Number(p))||1/0===p?n.throwError("The value [".concat(i,"] used in the input is not a valid value autoNumeric can work with.")):(this.set(p),m=!1);if(""===i)switch(this.settings.emptyInputBehavior){case o.options.emptyInputBehavior.focus:case o.options.emptyInputBehavior.null:case o.options.emptyInputBehavior.press:break;case o.options.emptyInputBehavior.always:this._setElementValue(this.settings.currencySymbol);break;case o.options.emptyInputBehavior.min:this.set(this.settings.minimumValue);break;case o.options.emptyInputBehavior.max:this.set(this.settings.maximumValue);break;case o.options.emptyInputBehavior.zero:this.set("0");break;default:this.set(this.settings.emptyInputBehavior)}else m&&i===this.domElement.getAttribute("value")&&this.set(i)}else null!==this.settings.defaultValueOverride&&this.settings.defaultValueOverride!==i||this.set(i)}},{key:"_calculateVMinAndVMaxIntegerSizes",value:function(){var t=K(this.settings.maximumValue.toString().split("."),1)[0],i=K(this.settings.minimumValue||0===this.settings.minimumValue?this.settings.minimumValue.toString().split("."):[],1)[0];t=t.replace(this.settings.negativeSignCharacter,""),i=i.replace(this.settings.negativeSignCharacter,""),this.settings.mIntPos=Math.max(t.length,1),this.settings.mIntNeg=Math.max(i.length,1)}},{key:"_calculateValuesToStringsKeys",value:function(){this.valuesToStringsKeys=this.settings.valuesToStrings?Object.keys(this.settings.valuesToStrings):[]}},{key:"_transformOptionsValuesToDefaultTypes",value:function(){for(var t in this.settings)if(Object.prototype.hasOwnProperty.call(this.settings,t)){var i=this.settings[t];"true"!==i&&"false"!==i||(this.settings[t]="true"===i),"number"==typeof i&&(this.settings[t]=i.toString())}}},{key:"_setSettings",value:function(t,i){var r=1<arguments.length&&void 0!==i&&i;!r&&n.isNull(t)||this.constructor._convertOldOptionsToNewOnes(t),r?("decimalPlacesRawValue"in t&&(this.settings.originalDecimalPlacesRawValue=t.decimalPlacesRawValue),"decimalPlaces"in t&&(this.settings.originalDecimalPlaces=t.decimalPlaces),this.constructor._calculateDecimalPlacesOnUpdate(t,this.settings),this._mergeSettings(t)):(this.settings={},this._mergeSettings(this.constructor.getDefaultConfig(),this.domElement.dataset,t,{rawValue:this.defaultRawValue}),this.caretFix=!1,this.throwInput=!0,this.allowedTagList=O.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),r||(this.settings.originalDecimalPlaces=n.isNull(t)||!t.decimalPlaces?null:t.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(),n.isEmptyObj(this.settings)&&n.throwError("Unable to set the settings, those are invalid ; an empty object was given."),this.constructor.validate(this.settings,!1,t),this._keepAnOriginalSettingsCopy()}},{key:"_preparePastedText",value:function(t){return this.constructor._stripAllNonNumberCharacters(t,this.settings,!0,this.isFocused)}},{key:"_updateInternalProperties",value:function(){this.selection=n.getElementSelection(this.domElement),this.processed=!1}},{key:"_updateEventKeyInfo",value:function(t){this.eventKey=n.character(t)}},{key:"_saveCancellableValue",value:function(){this.savedCancellableValue=this.rawValue}},{key:"_setSelection",value:function(t,i){t=Math.max(t,0),i=Math.min(i,n.getElementValue(this.domElement).length),this.selection={start:t,end:i,length:i-t},n.setElementSelection(this.domElement,t,i)}},{key:"_setCaretPosition",value:function(t){this._setSelection(t,t)}},{key:"_getLeftAndRightPartAroundTheSelection",value:function(){var t=n.getElementValue(this.domElement);return[t.substring(0,this.selection.start),t.substring(this.selection.end,t.length)]}},{key:"_getUnformattedLeftAndRightPartAroundTheSelection",value:function(){var t=K(this._getLeftAndRightPartAroundTheSelection(),2),i=t[0],r=t[1];if(""===i&&""===r)return["",""];var m=!0;return this.eventKey!==O.keyName.Hyphen&&this.eventKey!==O.keyName.Minus||0!==Number(i)||(m=!1),this.isTrailingNegative&&(n.isNegative(r,this.settings.negativeSignCharacter)&&!n.isNegative(i,this.settings.negativeSignCharacter)||""===r&&n.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=o._stripAllNonNumberCharactersExceptCustomDecimalChar(i,this.settings,m,this.isFocused),r=o._stripAllNonNumberCharactersExceptCustomDecimalChar(r,this.settings,!1,this.isFocused)]}},{key:"_normalizeParts",value:function(t,i){var r=!0;this.eventKey!==O.keyName.Hyphen&&this.eventKey!==O.keyName.Minus||0!==Number(t)||(r=!1),this.isTrailingNegative&&n.isNegative(i,this.settings.negativeSignCharacter)&&!n.isNegative(t,this.settings.negativeSignCharacter)&&(t="-".concat(t),i=i.replace(this.settings.negativeSignCharacter,"")),t=o._stripAllNonNumberCharactersExceptCustomDecimalChar(t,this.settings,r,this.isFocused),i=o._stripAllNonNumberCharactersExceptCustomDecimalChar(i,this.settings,!1,this.isFocused),this.settings.leadingZero!==o.options.leadingZero.deny||this.eventKey!==O.keyName.num0&&this.eventKey!==O.keyName.numpad0||0!==Number(t)||n.contains(t,this.settings.decimalCharacter)||""===i||(t=t.substring(0,t.length-1));var m=t+i;if(this.settings.decimalCharacter){var p=m.match(new RegExp("^".concat(this.regex.aNegRegAutoStrip,"\\").concat(this.settings.decimalCharacter)));p&&(m=(t=t.replace(p[1],p[1]+"0"))+i)}return[t,i,m]}},{key:"_setValueParts",value:function(t,i,r){var m=2<arguments.length&&void 0!==r&&r,p=K(this._normalizeParts(t,i),3),l=p[0],C=p[1],I=p[2],q=K(o._checkIfInRangeWithOverrideOption(I,this.settings),2),v=q[0],D=q[1];if(v&&D){var R=o._truncateDecimalPlaces(I,this.settings,m,this.settings.decimalPlacesRawValue).replace(this.settings.decimalCharacter,".");if(""===R||R===this.settings.negativeSignCharacter){var B;switch(this.settings.emptyInputBehavior){case o.options.emptyInputBehavior.focus:case o.options.emptyInputBehavior.press:case o.options.emptyInputBehavior.always:B="";break;case o.options.emptyInputBehavior.min:B=this.settings.minimumValue;break;case o.options.emptyInputBehavior.max:B=this.settings.maximumValue;break;case o.options.emptyInputBehavior.zero:B="0";break;case o.options.emptyInputBehavior.null:B=null;break;default:B=this.settings.emptyInputBehavior}this._setRawValue(B)}else this._setRawValue(this._trimLeadingAndTrailingZeros(R));var j=o._truncateDecimalPlaces(I,this.settings,m,this.settings.decimalPlacesShownOnFocus),z=l.length;return z>j.length&&(z=j.length),1===z&&"0"===l&&this.settings.leadingZero===o.options.leadingZero.deny&&(z=""===C||"0"===l&&""!==C?1:0),this._setElementValue(j,!1),this._setCaretPosition(z),!0}return this._triggerRangeEvents(v,D),!1}},{key:"_getSignPosition",value:function(){var t;if(this.settings.currencySymbol){var i=this.settings.currencySymbol.length,r=n.getElementValue(this.domElement);if(this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.prefix)t=this.settings.negativeSignCharacter&&r&&r.charAt(0)===this.settings.negativeSignCharacter?[1,i+1]:[0,i];else{var m=r.length;t=[m-i,m]}}else t=[1e3,-1];return t}},{key:"_expandSelectionOnSign",value:function(){var t=K(this._getSignPosition(),2),i=t[0],r=t[1],m=this.selection;m.start<r&&m.end>i&&((m.start<i||m.end>r)&&n.getElementValue(this.domElement).substring(Math.max(m.start,i),Math.min(m.end,r)).match(/^\s*$/)?m.start<i?this._setSelection(m.start,i):this._setSelection(r,m.end):this._setSelection(Math.min(m.start,i),Math.max(m.end,r)))}},{key:"_checkPaste",value:function(){if(!this.formatted&&!n.isUndefined(this.valuePartsBeforePaste)){var t=this.valuePartsBeforePaste,i=K(this._getLeftAndRightPartAroundTheSelection(),2),r=i[0],m=i[1];delete this.valuePartsBeforePaste;var p=r.substr(0,t[0].length)+o._stripAllNonNumberCharactersExceptCustomDecimalChar(r.substr(t[0].length),this.settings,!0,this.isFocused);this._setValueParts(p,m,!0)||(this._setElementValue(t.join(""),!1),this._setCaretPosition(t[0].length))}}},{key:"_processNonPrintableKeysAndShortcuts",value:function(t){if((t.ctrlKey||t.metaKey)&&"keyup"===t.type&&!n.isUndefined(this.valuePartsBeforePaste)||t.shiftKey&&this.eventKey===O.keyName.Insert)return this._checkPaste(),!1;if(this.constructor._shouldSkipEventKey(this.eventKey))return!0;if((t.ctrlKey||t.metaKey)&&this.eventKey===O.keyName.a)return this.settings.selectNumberOnly&&(t.preventDefault(),this.selectNumber()),!0;if((t.ctrlKey||t.metaKey)&&(this.eventKey===O.keyName.c||this.eventKey===O.keyName.v||this.eventKey===O.keyName.x))return"keydown"===t.type&&this._expandSelectionOnSign(),this.eventKey!==O.keyName.v&&this.eventKey!==O.keyName.Insert||("keydown"===t.type||"keypress"===t.type?n.isUndefined(this.valuePartsBeforePaste)&&(this.valuePartsBeforePaste=this._getLeftAndRightPartAroundTheSelection()):this._checkPaste()),"keydown"===t.type||"keypress"===t.type||this.eventKey===O.keyName.c;if(t.ctrlKey||t.metaKey)return!(this.eventKey===O.keyName.Z||this.eventKey===O.keyName.z);if(this.eventKey!==O.keyName.LeftArrow&&this.eventKey!==O.keyName.RightArrow)return n.isInArray(this.eventKey,O.keyName._directionKeys);if("keydown"===t.type&&!t.shiftKey){var i=n.getElementValue(this.domElement);this.eventKey!==O.keyName.LeftArrow||i.charAt(this.selection.start-2)!==this.settings.digitGroupSeparator&&i.charAt(this.selection.start-2)!==this.settings.decimalCharacter?this.eventKey!==O.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}},{key:"_processCharacterDeletionIfTrailingNegativeSign",value:function(t){var i=K(t,2),r=i[0],m=i[1],p=n.getElementValue(this.domElement),l=n.isNegative(p,this.settings.negativeSignCharacter);if(this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.prefix&&this.settings.negativePositiveSignPlacement===o.options.negativePositiveSignPlacement.suffix&&(this.eventKey===O.keyName.Backspace?(this.caretFix=this.selection.start>=p.indexOf(this.settings.suffixText)&&""!==this.settings.suffixText,"-"===p.charAt(this.selection.start-1)?r=r.substring(1):this.selection.start<=p.length-this.settings.suffixText.length&&(r=r.substring(0,r.length-1))):(this.caretFix=this.selection.start>=p.indexOf(this.settings.suffixText)&&""!==this.settings.suffixText,this.selection.start>=p.indexOf(this.settings.currencySymbol)+this.settings.currencySymbol.length&&(m=m.substring(1,m.length)),n.isNegative(r,this.settings.negativeSignCharacter)&&"-"===p.charAt(this.selection.start)&&(r=r.substring(1)))),this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.suffix)switch(this.settings.negativePositiveSignPlacement){case o.options.negativePositiveSignPlacement.left:this.caretFix=this.selection.start>=p.indexOf(this.settings.negativeSignCharacter)+this.settings.negativeSignCharacter.length,this.eventKey===O.keyName.Backspace?this.selection.start===p.indexOf(this.settings.negativeSignCharacter)+this.settings.negativeSignCharacter.length&&l?r=r.substring(1):"-"!==r&&(this.selection.start<=p.indexOf(this.settings.negativeSignCharacter)||!l)&&(r=r.substring(0,r.length-1)):("-"===r[0]&&(m=m.substring(1)),this.selection.start===p.indexOf(this.settings.negativeSignCharacter)&&l&&(r=r.substring(1)));break;case o.options.negativePositiveSignPlacement.right:this.caretFix=this.selection.start>=p.indexOf(this.settings.negativeSignCharacter)+this.settings.negativeSignCharacter.length,this.eventKey===O.keyName.Backspace?this.selection.start===p.indexOf(this.settings.negativeSignCharacter)+this.settings.negativeSignCharacter.length?r=r.substring(1):("-"!==r&&this.selection.start<=p.indexOf(this.settings.negativeSignCharacter)-this.settings.currencySymbol.length||""!==r&&!l)&&(r=r.substring(0,r.length-1)):(this.caretFix=this.selection.start>=p.indexOf(this.settings.currencySymbol)&&""!==this.settings.currencySymbol,this.selection.start===p.indexOf(this.settings.negativeSignCharacter)&&(r=r.substring(1)),m=m.substring(1))}return[r,m]}},{key:"_processCharacterDeletion",value:function(){var t,i;if(this.selection.length){this._expandSelectionOnSign();var r=K(this._getUnformattedLeftAndRightPartAroundTheSelection(),2);t=r[0],i=r[1]}else{var m=K(this._getUnformattedLeftAndRightPartAroundTheSelection(),2);if(i=m[1],""===(t=m[0])&&""===i&&(this.throwInput=!1),this.isTrailingNegative&&n.isNegative(n.getElementValue(this.domElement),this.settings.negativeSignCharacter)){var p=K(this._processCharacterDeletionIfTrailingNegativeSign([t,i]),2);t=p[0],i=p[1]}else this.eventKey===O.keyName.Backspace?t=t.substring(0,t.length-1):i=i.substring(1,i.length)}return!!this.constructor._isWithinRangeWithOverrideOption("".concat(t).concat(i),this.settings)&&(this._setValueParts(t,i),!0)}},{key:"_isDecimalCharacterInsertionAllowed",value:function(){return String(this.settings.decimalPlacesShownOnFocus)!==String(o.options.decimalPlacesShownOnFocus.none)&&String(this.settings.decimalPlaces)!==String(o.options.decimalPlaces.none)}},{key:"_processCharacterInsertion",value:function(){var t=K(this._getUnformattedLeftAndRightPartAroundTheSelection(),2),i=t[0],r=t[1];if(this.eventKey!==O.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(n.contains(i,this.settings.decimalCharacter)||0<r.indexOf(this.settings.decimalCharacter))return!0;0===r.indexOf(this.settings.decimalCharacter)&&(r=r.substr(1))}return this.settings.negativeSignCharacter&&n.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&&n.contains(r,"-")?r=r.replace("-",""):i=n.isNegativeStrict(i,"-")?i.replace("-",""):"".concat(this.settings.negativeSignCharacter).concat(i),this._setValueParts(i,r),!0;var m=Number(this.eventKey);return 0<=m&&m<=9?(this.settings.isNegativeSignAllowed&&""===i&&n.contains(r,"-")&&(i="-",r=r.substring(1,r.length)),this.settings.maximumValue<=0&&this.settings.minimumValue<this.settings.maximumValue&&!n.contains(n.getElementValue(this.domElement),this.settings.negativeSignCharacter)&&"0"!==this.eventKey&&(i="-".concat(i)),this._setValueParts("".concat(i).concat(this.eventKey),r),!0):this.throwInput=!1}},{key:"_formatValue",value:function(t){var i=n.getElementValue(this.domElement),r=K(this._getUnformattedLeftAndRightPartAroundTheSelection(),1)[0];if((""===this.settings.digitGroupSeparator||""!==this.settings.digitGroupSeparator&&!n.contains(i,this.settings.digitGroupSeparator))&&(""===this.settings.currencySymbol||""!==this.settings.currencySymbol&&!n.contains(i,this.settings.currencySymbol))){var m=K(i.split(this.settings.decimalCharacter),1)[0],p="";n.isNegative(m,this.settings.negativeSignCharacter)&&(p=this.settings.negativeSignCharacter,m=m.replace(this.settings.negativeSignCharacter,""),r=r.replace("-","")),""===p&&m.length>this.settings.mIntPos&&"0"===r.charAt(0)&&(r=r.slice(1)),p===this.settings.negativeSignCharacter&&m.length>this.settings.mIntNeg&&"0"===r.charAt(0)&&(r=r.slice(1)),this.isTrailingNegative||(r="".concat(p).concat(r))}var l=this.constructor._addGroupSeparators(i,this.settings,this.isFocused,this.rawValue),C=l.length;if(l){var I,q=r.split("");if((this.settings.negativePositiveSignPlacement===o.options.negativePositiveSignPlacement.suffix||this.settings.negativePositiveSignPlacement!==o.options.negativePositiveSignPlacement.prefix&&this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.suffix)&&q[0]===this.settings.negativeSignCharacter&&!this.settings.isNegativeSignAllowed&&(q.shift(),(this.eventKey===O.keyName.Backspace||this.eventKey===O.keyName.Delete)&&this.caretFix&&((this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.suffix&&this.settings.negativePositiveSignPlacement===o.options.negativePositiveSignPlacement.left||this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.prefix&&this.settings.negativePositiveSignPlacement===o.options.negativePositiveSignPlacement.suffix)&&(q.push(this.settings.negativeSignCharacter),this.caretFix="keydown"===t.type),this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.suffix&&this.settings.negativePositiveSignPlacement===o.options.negativePositiveSignPlacement.right))){var v=this.settings.currencySymbol.split(""),D=["\\","^","$",".","|","?","*","+","(",")","["],R=[];v.forEach(function(z,ee){n.isInArray(ee=v[z],D)?R.push("\\"+ee):R.push(ee)}),this.eventKey===O.keyName.Backspace&&"-"===this.settings.negativeSignCharacter&&R.push("-"),q.push(R.join("")),this.caretFix="keydown"===t.type}for(var B=0;B<q.length;B++)q[B].match("\\d")||(q[B]="\\"+q[B]);I=this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.suffix?new RegExp("^.*?".concat(q.join(".*?"))):new RegExp("^.*?".concat(this.settings.currencySymbol).concat(q.join(".*?")));var j=l.match(I);j?(C=j[0].length,this.settings.showPositiveSign&&(0===C&&j.input.charAt(0)===this.settings.positiveSignCharacter&&(C=1===j.input.indexOf(this.settings.currencySymbol)?this.settings.currencySymbol.length+1:1),0===C&&j.input.charAt(this.settings.currencySymbol.length)===this.settings.positiveSignCharacter&&(C=this.settings.currencySymbol.length+1)),(0===C&&l.charAt(0)!==this.settings.negativeSignCharacter||1===C&&l.charAt(0)===this.settings.negativeSignCharacter)&&this.settings.currencySymbol&&this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.prefix&&(C=this.settings.currencySymbol.length+(n.isNegativeStrict(l,this.settings.negativeSignCharacter)?1:0))):(this.settings.currencySymbol&&this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.suffix&&(C-=this.settings.currencySymbol.length),this.settings.suffixText&&(C-=this.settings.suffixText.length))}l!==i&&(this._setElementValue(l,!1),this._setCaretPosition(C)),this.formatted=!0}}]),ge(h,g),o}();function te(o,h){h=h||{bubbles:!1,cancelable:!1,detail:void 0};var g=document.createEvent("CustomEvent");return g.initCustomEvent(o,h.bubbles,h.cancelable,h.detail),g}k.multiple=function(o){var h=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,g=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,t=[];if(n.isObject(h)&&(g=h,h=null),n.isString(o))o=G(document.querySelectorAll(o));else if(n.isObject(o)){Object.prototype.hasOwnProperty.call(o,"rootElement")||n.throwError("The object passed to the 'multiple' function is invalid ; no 'rootElement' attribute found.");var i=G(o.rootElement.querySelectorAll("input"));o=Object.prototype.hasOwnProperty.call(o,"exclude")?(Array.isArray(o.exclude)||n.throwError("The 'exclude' array passed to the 'multiple' function is invalid."),n.filterOut(i,o.exclude)):i}else n.isArray(o)||n.throwError("The given parameters to the 'multiple' function are invalid.");if(0===o.length){var r=!0;return!n.isNull(g)&&n.isBoolean(g.showWarnings)&&(r=g.showWarnings),n.warning("No valid DOM elements were given hence no AutoNumeric objects were instantiated.",r),[]}var m=n.isArray(h)&&1<=h.length,p=!1,l=!1;if(m){var C=re(Number(h[0]));(p="number"===C&&!isNaN(Number(h[0])))||"string"!==C&&!isNaN(C)&&"object"!==C||(l=!0)}var I,q=!1;if(n.isArray(g)&&1<=g.length){var v=re(g[0]);"string"!==v&&"object"!==v||(q=!0)}I=l?k.mergeOptions(h):q?k.mergeOptions(g):g;var D,R=n.isNumber(h);return p&&(D=h.length),o.forEach(function(B,j){t.push(new k(B,R?h:p&&j<=D?h[j]:null,I))}),t},Array.from||(Array.from=function(o){return[].slice.call(o)}),"undefined"!=typeof window&&"function"!=typeof window.CustomEvent&&(te.prototype=window.Event.prototype,window.CustomEvent=te),k.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(k.events.native),Object.freeze(k.events),Object.defineProperty(k,"events",{configurable:!1,writable:!1}),k.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",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"},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"},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(o){return o%2==0},classes:["autoNumeric-even","autoNumeric-odd"]}]},rangeSmallAndZero:{userDefined:[{callback:function(o){return-1<=o&&o<0?0:0===Number(o)?1:0<o&&o<=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},valuesToStrings:{none:null,zeroDash:{0:"-"},oneAroundZero:{"-1":"Min",1:"Max"}},watchExternalChanges:{watch:!0,doNotWatch:!1},wheelOn:{focus:"focus",hover:"hover"},wheelStep:{progressive:"progressive"}},J=k.options,Object.getOwnPropertyNames(J).forEach(function(o){"valuesToStrings"===o?Object.getOwnPropertyNames(J.valuesToStrings).forEach(function(h){n.isIE11()||null===J.valuesToStrings[h]||Object.freeze(J.valuesToStrings[h])}):"styleRules"!==o&&(n.isIE11()||null===J[o]||Object.freeze(J[o]))}),Object.freeze(J),Object.defineProperty(k,"options",{configurable:!1,writable:!1}),k.defaultSettings={allowDecimalPadding:k.options.allowDecimalPadding.always,alwaysAllowDecimalCharacter:k.options.alwaysAllowDecimalCharacter.doNotAllow,caretPositionOnFocus:k.options.caretPositionOnFocus.doNoForceCaretPosition,createLocalList:k.options.createLocalList.createList,currencySymbol:k.options.currencySymbol.none,currencySymbolPlacement:k.options.currencySymbolPlacement.prefix,decimalCharacter:k.options.decimalCharacter.dot,decimalCharacterAlternative:k.options.decimalCharacterAlternative.none,decimalPlaces:k.options.decimalPlaces.two,decimalPlacesRawValue:k.options.decimalPlacesRawValue.useDefault,decimalPlacesShownOnBlur:k.options.decimalPlacesShownOnBlur.useDefault,decimalPlacesShownOnFocus:k.options.decimalPlacesShownOnFocus.useDefault,defaultValueOverride:k.options.defaultValueOverride.doNotOverride,digitalGroupSpacing:k.options.digitalGroupSpacing.three,digitGroupSeparator:k.options.digitGroupSeparator.comma,divisorWhenUnfocused:k.options.divisorWhenUnfocused.none,emptyInputBehavior:k.options.emptyInputBehavior.focus,eventBubbles:k.options.eventBubbles.bubbles,eventIsCancelable:k.options.eventIsCancelable.isCancelable,failOnUnknownOption:k.options.failOnUnknownOption.ignore,formatOnPageLoad:k.options.formatOnPageLoad.format,formulaMode:k.options.formulaMode.disabled,historySize:k.options.historySize.medium,invalidClass:k.options.invalidClass,isCancellable:k.options.isCancellable.cancellable,leadingZero:k.options.leadingZero.deny,maximumValue:k.options.maximumValue.tenTrillions,minimumValue:k.options.minimumValue.tenTrillions,modifyValueOnWheel:k.options.modifyValueOnWheel.modifyValue,negativeBracketsTypeOnBlur:k.options.negativeBracketsTypeOnBlur.none,negativePositiveSignPlacement:k.options.negativePositiveSignPlacement.none,negativeSignCharacter:k.options.negativeSignCharacter.hyphen,noEventListeners:k.options.noEventListeners.addEvents,onInvalidPaste:k.options.onInvalidPaste.error,outputFormat:k.options.outputFormat.none,overrideMinMaxLimits:k.options.overrideMinMaxLimits.doNotOverride,positiveSignCharacter:k.options.positiveSignCharacter.plus,rawValueDivisor:k.options.rawValueDivisor.none,readOnly:k.options.readOnly.readWrite,roundingMethod:k.options.roundingMethod.halfUpSymmetric,saveValueToSessionStorage:k.options.saveValueToSessionStorage.doNotSave,selectNumberOnly:k.options.selectNumberOnly.selectNumbersOnly,selectOnFocus:k.options.selectOnFocus.select,serializeSpaces:k.options.serializeSpaces.plus,showOnlyNumbersOnFocus:k.options.showOnlyNumbersOnFocus.showAll,showPositiveSign:k.options.showPositiveSign.hide,showWarnings:k.options.showWarnings.show,styleRules:k.options.styleRules.none,suffixText:k.options.suffixText.none,symbolWhenUnfocused:k.options.symbolWhenUnfocused.none,unformatOnHover:k.options.unformatOnHover.unformat,unformatOnSubmit:k.options.unformatOnSubmit.keepCurrentValue,valuesToStrings:k.options.valuesToStrings.none,watchExternalChanges:k.options.watchExternalChanges.doNotWatch,wheelOn:k.options.wheelOn.focus,wheelStep:k.options.wheelStep.progressive},Object.freeze(k.defaultSettings),Object.defineProperty(k,"defaultSettings",{configurable:!1,writable:!1});var Q={digitGroupSeparator:k.options.digitGroupSeparator.dot,decimalCharacter:k.options.decimalCharacter.comma,decimalCharacterAlternative:k.options.decimalCharacterAlternative.dot,currencySymbol:"\u202f\u20ac",currencySymbolPlacement:k.options.currencySymbolPlacement.suffix,negativePositiveSignPlacement:k.options.negativePositiveSignPlacement.prefix},Y={digitGroupSeparator:k.options.digitGroupSeparator.comma,decimalCharacter:k.options.decimalCharacter.dot,currencySymbol:k.options.currencySymbol.dollar,currencySymbolPlacement:k.options.currencySymbolPlacement.prefix,negativePositiveSignPlacement:k.options.negativePositiveSignPlacement.right},le={digitGroupSeparator:k.options.digitGroupSeparator.comma,decimalCharacter:k.options.decimalCharacter.dot,currencySymbol:k.options.currencySymbol.yen,currencySymbolPlacement:k.options.currencySymbolPlacement.prefix,negativePositiveSignPlacement:k.options.negativePositiveSignPlacement.right};n.cloneObject(Q).formulaMode=k.options.formulaMode.enabled;var Ce=n.cloneObject(Q);Ce.minimumValue=0;var Oe=n.cloneObject(Q);Oe.maximumValue=0,Oe.negativePositiveSignPlacement=k.options.negativePositiveSignPlacement.prefix;var Se=n.cloneObject(Q);Se.digitGroupSeparator=k.options.digitGroupSeparator.normalSpace;var ke=n.cloneObject(Se);ke.minimumValue=0;var Te=n.cloneObject(Se);Te.maximumValue=0,Te.negativePositiveSignPlacement=k.options.negativePositiveSignPlacement.prefix;var ve=n.cloneObject(Q);ve.currencySymbol=k.options.currencySymbol.none,ve.suffixText="\u202f".concat(k.options.suffixText.percentage),ve.wheelStep=1e-4,ve.rawValueDivisor=k.options.rawValueDivisor.percentage;var fe=n.cloneObject(ve);fe.minimumValue=0;var Ne=n.cloneObject(ve);Ne.maximumValue=0,Ne.negativePositiveSignPlacement=k.options.negativePositiveSignPlacement.prefix;var De=n.cloneObject(ve);De.decimalPlaces=3;var Be=n.cloneObject(fe);Be.decimalPlaces=3;var Ue=n.cloneObject(Ne);Ue.decimalPlaces=3,n.cloneObject(Y).formulaMode=k.options.formulaMode.enabled;var qe=n.cloneObject(Y);qe.minimumValue=0;var xe=n.cloneObject(Y);xe.maximumValue=0,xe.negativePositiveSignPlacement=k.options.negativePositiveSignPlacement.prefix;var Ge=n.cloneObject(xe);Ge.negativeBracketsTypeOnBlur=k.options.negativeBracketsTypeOnBlur.parentheses;var pe=n.cloneObject(Y);pe.currencySymbol=k.options.currencySymbol.none,pe.suffixText=k.options.suffixText.percentage,pe.wheelStep=1e-4,pe.rawValueDivisor=k.options.rawValueDivisor.percentage;var Ve=n.cloneObject(pe);Ve.minimumValue=0;var Ae=n.cloneObject(pe);Ae.maximumValue=0,Ae.negativePositiveSignPlacement=k.options.negativePositiveSignPlacement.prefix;var je=n.cloneObject(pe);je.decimalPlaces=3;var ze=n.cloneObject(Ve);ze.decimalPlaces=3;var We=n.cloneObject(Ae);We.decimalPlaces=3;var Ke=n.cloneObject(Q);Ke.currencySymbol=k.options.currencySymbol.lira,k.predefinedOptions={euro:Q,euroPos:Ce,euroNeg:Oe,euroSpace:Se,euroSpacePos:ke,euroSpaceNeg:Te,percentageEU2dec:ve,percentageEU2decPos:fe,percentageEU2decNeg:Ne,percentageEU3dec:De,percentageEU3decPos:Be,percentageEU3decNeg:Ue,dollar:Y,dollarPos:qe,dollarNeg:xe,dollarNegBrackets:Ge,percentageUS2dec:pe,percentageUS2decPos:Ve,percentageUS2decNeg:Ae,percentageUS3dec:je,percentageUS3decPos:ze,percentageUS3decNeg:We,French:Q,Spanish:Q,NorthAmerican:Y,British:{digitGroupSeparator:k.options.digitGroupSeparator.comma,decimalCharacter:k.options.decimalCharacter.dot,currencySymbol:k.options.currencySymbol.pound,currencySymbolPlacement:k.options.currencySymbolPlacement.prefix,negativePositiveSignPlacement:k.options.negativePositiveSignPlacement.right},Swiss:{digitGroupSeparator:k.options.digitGroupSeparator.apostrophe,decimalCharacter:k.options.decimalCharacter.dot,currencySymbol:"\u202fCHF",currencySymbolPlacement:k.options.currencySymbolPlacement.suffix,negativePositiveSignPlacement:k.options.negativePositiveSignPlacement.prefix},Japanese:le,Chinese:le,Brazilian:{digitGroupSeparator:k.options.digitGroupSeparator.dot,decimalCharacter:k.options.decimalCharacter.comma,currencySymbol:k.options.currencySymbol.real,currencySymbolPlacement:k.options.currencySymbolPlacement.prefix,negativePositiveSignPlacement:k.options.negativePositiveSignPlacement.right},Turkish:Ke,dotDecimalCharCommaSeparator:{digitGroupSeparator:k.options.digitGroupSeparator.comma,decimalCharacter:k.options.decimalCharacter.dot},commaDecimalCharDotSeparator:{digitGroupSeparator:k.options.digitGroupSeparator.dot,decimalCharacter:k.options.decimalCharacter.comma,decimalCharacterAlternative:k.options.decimalCharacterAlternative.dot},integer:{decimalPlaces:0},integerPos:{minimumValue:k.options.minimumValue.zero,decimalPlaces:0},integerNeg:{maximumValue:k.options.maximumValue.zero,decimalPlaces:0},float:{allowDecimalPadding:k.options.allowDecimalPadding.never},floatPos:{allowDecimalPadding:k.options.allowDecimalPadding.never,minimumValue:k.options.minimumValue.zero,maximumValue:k.options.maximumValue.tenTrillions},floatNeg:{allowDecimalPadding:k.options.allowDecimalPadding.never,minimumValue:k.options.minimumValue.tenTrillions,maximumValue:k.options.maximumValue.zero},numeric:{digitGroupSeparator:k.options.digitGroupSeparator.noSeparator,decimalCharacter:k.options.decimalCharacter.dot,currencySymbol:k.options.currencySymbol.none},numericPos:{digitGroupSeparator:k.options.digitGroupSeparator.noSeparator,decimalCharacter:k.options.decimalCharacter.dot,currencySymbol:k.options.currencySymbol.none,minimumValue:k.options.minimumValue.zero,maximumValue:k.options.maximumValue.tenTrillions},numericNeg:{digitGroupSeparator:k.options.digitGroupSeparator.noSeparator,decimalCharacter:k.options.decimalCharacter.dot,currencySymbol:k.options.currencySymbol.none,minimumValue:k.options.minimumValue.tenTrillions,maximumValue:k.options.maximumValue.zero}},Object.getOwnPropertyNames(k.predefinedOptions).forEach(function(o){Object.freeze(k.predefinedOptions[o])}),Object.freeze(k.predefinedOptions),Object.defineProperty(k,"predefinedOptions",{configurable:!1,writable:!1}),e.default=k}],S.c=M,S.d=function(N,e,x){S.o(N,e)||Object.defineProperty(N,e,{enumerable:!0,get:x})},S.r=function(N){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(N,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(N,"__esModule",{value:!0})},S.t=function(N,e){if(1&e&&(N=S(N)),8&e||4&e&&"object"==typeof N&&N&&N.__esModule)return N;var x=Object.create(null);if(S.r(x),Object.defineProperty(x,"default",{enumerable:!0,value:N}),2&e&&"string"!=typeof N)for(var F in N)S.d(x,F,function(O){return N[O]}.bind(null,F));return x},S.n=function(N){var e=N&&N.__esModule?function(){return N.default}:function(){return N};return S.d(e,"a",e),e},S.o=function(N,e){return Object.prototype.hasOwnProperty.call(N,e)},S.p="",S(S.s=0).default;function S(N){if(M[N])return M[N].exports;var e=M[N]={i:N,l:!1,exports:{}};return A[N].call(e.exports,e,e.exports,S),e.l=!0,e.exports}var A,M}()},9489:(H,S,A)=>{"use strict";var N=U(A(3413)),x=U(A(7720)),O=U(A(2308)),L=U(A(7095)),s=U(A(4441)),d=U(A(201)),f=U(A(400)),P=A(4779),Z=U(A(1452));function U(J){return J&&J.__esModule?J:{default:J}}var G=function(){},K=function(k,te,Q){var Y=new G;if(void 0===k)throw Error("No element to render on was provided.");return Y._renderProperties=(0,s.default)(k),Y._encodings=[],Y._options=Z.default,Y._errorHandler=new f.default(Y),void 0!==te&&((Q=Q||{}).format||(Q.format=re()),Y.options(Q)[Q.format](te,Q).render()),Y};for(var $ in K.getModule=function(J){return N.default[J]},N.default)N.default.hasOwnProperty($)&&de(N.default,$);function de(J,k){G.prototype[k]=G.prototype[k.toUpperCase()]=G.prototype[k.toLowerCase()]=function(te,Q){var Y=this;return Y._errorHandler.wrapBarcodeCall(function(){Q.text=void 0===Q.text?void 0:""+Q.text;var le=(0,x.default)(Y._options,Q);le=(0,d.default)(le);var Oe=ae(te,J[k],le);return Y._encodings.push(Oe),Y})}}function ae(J,k,te){var Q=new k(J=""+J,te);if(!Q.valid())throw new P.InvalidInputException(Q.constructor.name,J);var Y=Q.encode();Y=(0,O.default)(Y);for(var le=0;le<Y.length;le++)Y[le].options=(0,x.default)(te,Y[le].options);return Y}function re(){return N.default.CODE128?"CODE128":Object.keys(N.default)[0]}function ge(J,k,te){k=(0,O.default)(k);for(var Q=0;Q<k.length;Q++)k[Q].options=(0,x.default)(te,k[Q].options),(0,L.default)(k[Q].options);(0,L.default)(te),new(0,J.renderer)(J.element,k,te).render(),J.afterRender&&J.afterRender()}G.prototype.options=function(J){return this._options=(0,x.default)(this._options,J),this},G.prototype.blank=function(J){var k=new Array(J+1).join("0");return this._encodings.push({data:k}),this},G.prototype.init=function(){var J;if(this._renderProperties)for(var k in Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]),this._renderProperties){var te=(0,x.default)(this._options,(J=this._renderProperties[k]).options);"auto"==te.format&&(te.format=re()),this._errorHandler.wrapBarcodeCall(function(){var le=ae(te.value,N.default[te.format.toUpperCase()],te);ge(J,le,te)})}},G.prototype.render=function(){if(!this._renderProperties)throw new P.NoElementException;if(Array.isArray(this._renderProperties))for(var J=0;J<this._renderProperties.length;J++)ge(this._renderProperties[J],this._encodings,this._options);else ge(this._renderProperties,this._encodings,this._options);return this},G.prototype._defaults=Z.default,"undefined"!=typeof window&&(window.JsBarcode=K),"undefined"!=typeof jQuery&&(jQuery.fn.JsBarcode=function(J,k){var te=[];return jQuery(this).each(function(){te.push(this)}),K(te,J,k)}),H.exports=K},6615:(H,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function N(e,x){(function(N,e){if(!(N instanceof e))throw new TypeError("Cannot call a class as a function")})(this,N),this.data=e,this.text=x.text||e,this.options=x}},8901:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var s,M=function(){function s(u,d){for(var n=0;n<d.length;n++){var f=d[n];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(u,f.key,f)}}return function(u,d,n){return d&&s(u.prototype,d),n&&s(u,n),u}}(),e=(s=A(6615))&&s.__esModule?s:{default:s},x=A(5286),b=function(s){function u(d,n){!function(s,u){if(!(s instanceof u))throw new TypeError("Cannot call a class as a function")}(this,u);var f=function(s,u){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!u||"object"!=typeof u&&"function"!=typeof u?s:u}(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,d.substring(1),n));return f.bytes=d.split("").map(function(P){return P.charCodeAt(0)}),f}return function(s,u){if("function"!=typeof u&&null!==u)throw new TypeError("Super expression must either be null or a function, not "+typeof u);s.prototype=Object.create(u&&u.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(s,u):s.__proto__=u)}(u,s),M(u,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var n=this.bytes,f=n.shift()-105,P=x.SET_BY_CODE[f];if(void 0===P)throw new RangeError("The encoding does not start with a start character.");!0===this.shouldEncodeAsEan128()&&n.unshift(x.FNC1);var T=u.next(n,1,P);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:u.getBar(f)+T.result+u.getBar((T.checksum+f)%x.MODULO)+u.getBar(x.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var n=this.options.ean128||!1;return"string"==typeof n&&(n="true"===n.toLowerCase()),n}}],[{key:"getBar",value:function(n){return x.BARS[n]?x.BARS[n].toString():""}},{key:"correctIndex",value:function(n,f){if(f===x.SET_A){var P=n.shift();return P<32?P+64:P-32}return f===x.SET_B?n.shift()-32:10*(n.shift()-48)+n.shift()-48}},{key:"next",value:function(n,f,P){if(!n.length)return{result:"",checksum:0};var T=void 0,Z=void 0;if(n[0]>=200){Z=n.shift()-105;var U=x.SWAP[Z];void 0!==U?T=u.next(n,f+1,U):((P===x.SET_A||P===x.SET_B)&&Z===x.SHIFT&&(n[0]=P===x.SET_A?n[0]>95?n[0]-96:n[0]:n[0]<32?n[0]+96:n[0]),T=u.next(n,f+1,P))}else Z=u.correctIndex(n,P),T=u.next(n,f+1,P);return{result:u.getBar(Z)+T.result,checksum:Z*f+T.checksum}}}]),u}(e.default);S.default=b},972:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var s,M=function(){function s(u,d){for(var n=0;n<d.length;n++){var f=d[n];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(u,f.key,f)}}return function(u,d,n){return d&&s(u.prototype,d),n&&s(u,n),u}}(),e=(s=A(8901))&&s.__esModule?s:{default:s},x=A(5286),b=function(s){function u(d,n){return function(s,u){if(!(s instanceof u))throw new TypeError("Cannot call a class as a function")}(this,u),function(s,u){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!u||"object"!=typeof u&&"function"!=typeof u?s:u}(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,x.A_START_CHAR+d,n))}return function(s,u){if("function"!=typeof u&&null!==u)throw new TypeError("Super expression must either be null or a function, not "+typeof u);s.prototype=Object.create(u&&u.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(s,u):s.__proto__=u)}(u,s),M(u,[{key:"valid",value:function(){return new RegExp("^"+x.A_CHARS+"+$").test(this.data)}}]),u}(e.default);S.default=b},399:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var s,M=function(){function s(u,d){for(var n=0;n<d.length;n++){var f=d[n];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(u,f.key,f)}}return function(u,d,n){return d&&s(u.prototype,d),n&&s(u,n),u}}(),e=(s=A(8901))&&s.__esModule?s:{default:s},x=A(5286),b=function(s){function u(d,n){return function(s,u){if(!(s instanceof u))throw new TypeError("Cannot call a class as a function")}(this,u),function(s,u){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!u||"object"!=typeof u&&"function"!=typeof u?s:u}(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,x.B_START_CHAR+d,n))}return function(s,u){if("function"!=typeof u&&null!==u)throw new TypeError("Super expression must either be null or a function, not "+typeof u);s.prototype=Object.create(u&&u.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(s,u):s.__proto__=u)}(u,s),M(u,[{key:"valid",value:function(){return new RegExp("^"+x.B_CHARS+"+$").test(this.data)}}]),u}(e.default);S.default=b},8108:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var s,M=function(){function s(u,d){for(var n=0;n<d.length;n++){var f=d[n];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(u,f.key,f)}}return function(u,d,n){return d&&s(u.prototype,d),n&&s(u,n),u}}(),e=(s=A(8901))&&s.__esModule?s:{default:s},x=A(5286),b=function(s){function u(d,n){return function(s,u){if(!(s instanceof u))throw new TypeError("Cannot call a class as a function")}(this,u),function(s,u){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!u||"object"!=typeof u&&"function"!=typeof u?s:u}(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,x.C_START_CHAR+d,n))}return function(s,u){if("function"!=typeof u&&null!==u)throw new TypeError("Super expression must either be null or a function, not "+typeof u);s.prototype=Object.create(u&&u.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(s,u):s.__proto__=u)}(u,s),M(u,[{key:"valid",value:function(){return new RegExp("^"+x.C_CHARS+"+$").test(this.data)}}]),u}(e.default);S.default=b},4156:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var N=F(A(8901)),x=F(A(993));function F(s){return s&&s.__esModule?s:{default:s}}function E(s,u){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!u||"object"!=typeof u&&"function"!=typeof u?s:u}var b=function(s){function u(d,n){if(function(s,u){if(!(s instanceof u))throw new TypeError("Cannot call a class as a function")}(this,u),/^[\x00-\x7F\xC8-\xD3]+$/.test(d))var f=E(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,(0,x.default)(d),n));else f=E(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,d,n));return E(f)}return function(s,u){if("function"!=typeof u&&null!==u)throw new TypeError("Super expression must either be null or a function, not "+typeof u);s.prototype=Object.create(u&&u.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(s,u):s.__proto__=u)}(u,s),u}(N.default);S.default=b},993:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var M=A(5286),N=function(L){return L.match(new RegExp("^"+M.A_CHARS+"*"))[0].length},e=function(L){return L.match(new RegExp("^"+M.B_CHARS+"*"))[0].length},x=function(L){return L.match(new RegExp("^"+M.C_CHARS+"*"))[0]};function F(E,L){var b=L?M.A_CHARS:M.B_CHARS,s=E.match(new RegExp("^("+b+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(s)return s[1]+String.fromCharCode(204)+O(E.substring(s[1].length));var u=E.match(new RegExp("^"+b+"+"))[0];return u.length===E.length?E:u+String.fromCharCode(L?205:206)+F(E.substring(u.length),!L)}function O(E){var L=x(E),b=L.length;if(b===E.length)return E;E=E.substring(b);var s=N(E)>=e(E);return L+String.fromCharCode(s?206:205)+F(E,s)}S.default=function(E){var L=void 0;if(x(E).length>=2)L=M.C_START_CHAR+O(E);else{var s=N(E)>e(E);L=(s?M.A_START_CHAR:M.B_START_CHAR)+F(E,s)}return L.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(u,d){return String.fromCharCode(203)+d})}},5286:(H,S)=>{"use strict";var A;function M($,de,ae){return de in $?Object.defineProperty($,de,{value:ae,enumerable:!0,configurable:!0,writable:!0}):$[de]=ae,$}Object.defineProperty(S,"__esModule",{value:!0});var N=S.SET_A=0,e=S.SET_B=1,x=S.SET_C=2,O=(S.SHIFT=98,S.START_A=103),E=S.START_B=104,L=S.START_C=105;S.MODULO=103,S.STOP=106,S.FNC1=207,S.SET_BY_CODE=(M(A={},O,N),M(A,E,e),M(A,L,x),A),S.SWAP={101:N,100:e,99:x},S.A_START_CHAR=String.fromCharCode(208),S.B_START_CHAR=String.fromCharCode(209),S.C_START_CHAR=String.fromCharCode(210),S.A_CHARS="[\0-_\xc8-\xcf]",S.B_CHARS="[ -\x7f\xc8-\xcf]",S.C_CHARS="(\xcf*[0-9]{2}\xcf*)",S.BARS=[11011001100,11001101100,11001100110,10010011e3,10010001100,10001001100,10011001e3,10011000100,10001100100,11001001e3,11001000100,11000100100,10110011100,10011011100,10011001110,10111001100,10011101100,10011100110,11001110010,11001011100,11001001110,11011100100,11001110100,11101101110,11101001100,11100101100,11100100110,11101100100,11100110100,11100110010,11011011e3,11011000110,11000110110,10100011e3,10001011e3,10001000110,10110001e3,10001101e3,10001100010,11010001e3,11000101e3,11000100010,10110111e3,10110001110,10001101110,10111011e3,10111000110,10001110110,11101110110,11010001110,11000101110,11011101e3,11011100010,11011101110,11101011e3,11101000110,11100010110,11101101e3,11101100010,11100011010,11101111010,11001000010,11110001010,1010011e4,10100001100,1001011e4,10010000110,10000101100,10000100110,1011001e4,10110000100,1001101e4,10011000010,10000110100,10000110010,11000010010,1100101e4,11110111010,11000010100,10001111010,10100111100,10010111100,10010011110,10111100100,10011110100,10011110010,11110100100,11110010100,11110010010,11011011110,11011110110,11110110110,10101111e3,10100011110,10001011110,10111101e3,10111100010,11110101e3,11110100010,10111011110,10111101110,11101011110,11110101110,11010000100,1101001e4,11010011100,1100011101011]},6625:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.CODE128C=S.CODE128B=S.CODE128A=S.CODE128=void 0;var N=b(A(4156)),x=b(A(972)),O=b(A(399)),L=b(A(8108));function b(s){return s&&s.__esModule?s:{default:s}}S.CODE128=N.default,S.CODE128A=x.default,S.CODE128B=O.default,S.CODE128C=L.default},8104:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.CODE39=void 0;var T,M=function(){function T(Z,U){for(var G=0;G<U.length;G++){var K=U[G];K.enumerable=K.enumerable||!1,K.configurable=!0,"value"in K&&(K.writable=!0),Object.defineProperty(Z,K.key,K)}}return function(Z,U,G){return U&&T(Z.prototype,U),G&&T(Z,G),Z}}(),L=function(T){function Z(U,G){return function(T,Z){if(!(T instanceof Z))throw new TypeError("Cannot call a class as a function")}(this,Z),U=U.toUpperCase(),G.mod43&&(U+=function(T){return b[T]}(function(T){for(var Z=0,U=0;U<T.length;U++)Z+=f(T[U]);return Z%43}(U))),function(T,Z){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!Z||"object"!=typeof Z&&"function"!=typeof Z?T:Z}(this,(Z.__proto__||Object.getPrototypeOf(Z)).call(this,U,G))}return function(T,Z){if("function"!=typeof Z&&null!==Z)throw new TypeError("Super expression must either be null or a function, not "+typeof Z);T.prototype=Object.create(Z&&Z.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),Z&&(Object.setPrototypeOf?Object.setPrototypeOf(T,Z):T.__proto__=Z)}(Z,T),M(Z,[{key:"encode",value:function(){for(var G=u("*"),K=0;K<this.data.length;K++)G+=u(this.data[K])+"0";return{data:G+=u("*"),text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)}}]),Z}(((T=A(6615))&&T.__esModule?T:{default:T}).default),b=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","*"],s=[20957,29783,23639,30485,20951,29813,23669,20855,29789,23645,29975,23831,30533,22295,30149,24005,21623,29981,23837,22301,30023,23879,30545,22343,30161,24017,21959,30065,23921,22385,29015,18263,29141,17879,29045,18293,17783,29021,18269,17477,17489,17681,20753,35770];function u(T){return function(T){return s[T].toString(2)}(f(T))}function f(T){return b.indexOf(T)}S.CODE39=L},2679:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var M=function(){function d(n,f){for(var P=0;P<f.length;P++){var T=f[P];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(n,T.key,T)}}return function(n,f,P){return f&&d(n.prototype,f),P&&d(n,P),n}}(),N=A(2998),x=E(A(188));function E(d){return d&&d.__esModule?d:{default:d}}var u=function(d){function n(f,P){!function(d,n){if(!(d instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n);var T=function(d,n){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?d:n}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,f,P));return T.fontSize=!P.flat&&P.fontSize>10*P.width?10*P.width:P.fontSize,T.guardHeight=P.height+T.fontSize/2+P.textMargin,T}return function(d,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);d.prototype=Object.create(n&&n.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(d,n):d.__proto__=n)}(n,d),M(n,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(P,T){return this.text.substr(P,T)}},{key:"leftEncode",value:function(P,T){return(0,x.default)(P,T)}},{key:"rightText",value:function(P,T){return this.text.substr(P,T)}},{key:"rightEncode",value:function(P,T){return(0,x.default)(P,T)}},{key:"encodeGuarded",value:function(){var P={fontSize:this.fontSize},T={height:this.guardHeight};return[{data:N.SIDE_BIN,options:T},{data:this.leftEncode(),text:this.leftText(),options:P},{data:N.MIDDLE_BIN,options:T},{data:this.rightEncode(),text:this.rightText(),options:P},{data:N.SIDE_BIN,options:T}]}},{key:"encodeFlat",value:function(){return{data:[N.SIDE_BIN,this.leftEncode(),N.MIDDLE_BIN,this.rightEncode(),N.SIDE_BIN].join(""),text:this.text}}}]),n}(E(A(6615)).default);S.default=u},7674:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var d,M=function(){function d(n,f){for(var P=0;P<f.length;P++){var T=f[P];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(n,T.key,T)}}return function(n,f,P){return f&&d(n.prototype,f),P&&d(n,P),n}}(),N=function d(n,f,P){null===n&&(n=Function.prototype);var T=Object.getOwnPropertyDescriptor(n,f);if(void 0===T){var Z=Object.getPrototypeOf(n);return null===Z?void 0:d(Z,f,P)}if("value"in T)return T.value;var U=T.get;return void 0===U?void 0:U.call(P)},e=A(2998),F=(d=A(2679))&&d.__esModule?d:{default:d},s=function(n){return(10-n.substr(0,12).split("").map(function(P){return+P}).reduce(function(P,T,Z){return Z%2?P+3*T:P+T},0)%10)%10},u=function(d){function n(f,P){(function(d,n){if(!(d instanceof n))throw new TypeError("Cannot call a class as a function")})(this,n),-1!==f.search(/^[0-9]{12}$/)&&(f+=s(f));var T=function(d,n){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?d:n}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,f,P));return T.lastChar=P.lastChar,T}return function(d,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);d.prototype=Object.create(n&&n.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(d,n):d.__proto__=n)}(n,d),M(n,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{13}$/)&&+this.data[12]===s(this.data)}},{key:"leftText",value:function(){return N(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var P=this.data.substr(1,6),T=e.EAN13_STRUCTURE[this.data[0]];return N(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"leftEncode",this).call(this,P,T)}},{key:"rightText",value:function(){return N(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var P=this.data.substr(7,6);return N(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"rightEncode",this).call(this,P,"RRRRRR")}},{key:"encodeGuarded",value:function(){var P=N(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(P.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(P.push({data:"00"}),P.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),P}}]),n}(F.default);S.default=u},2649:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var M=function(){function d(n,f){for(var P=0;P<f.length;P++){var T=f[P];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(n,T.key,T)}}return function(n,f,P){return f&&d(n.prototype,f),P&&d(n,P),n}}(),N=A(2998),x=E(A(188));function E(d){return d&&d.__esModule?d:{default:d}}var u=function(d){function n(f,P){return function(d,n){if(!(d instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),function(d,n){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?d:n}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,f,P))}return function(d,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);d.prototype=Object.create(n&&n.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(d,n):d.__proto__=n)}(n,d),M(n,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{2}$/)}},{key:"encode",value:function(){var P=N.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,x.default)(this.data,P,"01"),text:this.text}}}]),n}(E(A(6615)).default);S.default=u},639:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var M=function(){function n(f,P){for(var T=0;T<P.length;T++){var Z=P[T];Z.enumerable=Z.enumerable||!1,Z.configurable=!0,"value"in Z&&(Z.writable=!0),Object.defineProperty(f,Z.key,Z)}}return function(f,P,T){return P&&n(f.prototype,P),T&&n(f,T),f}}(),N=A(2998),x=E(A(188));function E(n){return n&&n.__esModule?n:{default:n}}var d=function(n){function f(P,T){return function(n,f){if(!(n instanceof f))throw new TypeError("Cannot call a class as a function")}(this,f),function(n,f){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!f||"object"!=typeof f&&"function"!=typeof f?n:f}(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,P,T))}return function(n,f){if("function"!=typeof f&&null!==f)throw new TypeError("Super expression must either be null or a function, not "+typeof f);n.prototype=Object.create(f&&f.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(n,f):n.__proto__=f)}(f,n),M(f,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{5}$/)}},{key:"encode",value:function(){var T=N.EAN5_STRUCTURE[function(f){return f.split("").map(function(T){return+T}).reduce(function(T,Z,U){return U%2?T+9*Z:T+3*Z},0)%10}(this.data)];return{data:"1011"+(0,x.default)(this.data,T,"01"),text:this.text}}}]),f}(E(A(6615)).default);S.default=d},8036:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var u,M=function(){function u(d,n){for(var f=0;f<n.length;f++){var P=n[f];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(d,P.key,P)}}return function(d,n,f){return n&&u(d.prototype,n),f&&u(d,f),d}}(),N=function u(d,n,f){null===d&&(d=Function.prototype);var P=Object.getOwnPropertyDescriptor(d,n);if(void 0===P){var T=Object.getPrototypeOf(d);return null===T?void 0:u(T,n,f)}if("value"in P)return P.value;var Z=P.get;return void 0===Z?void 0:Z.call(f)},x=(u=A(2679))&&u.__esModule?u:{default:u},b=function(d){return(10-d.substr(0,7).split("").map(function(f){return+f}).reduce(function(f,P,T){return T%2?f+P:f+3*P},0)%10)%10},s=function(u){function d(n,f){return function(u,d){if(!(u instanceof d))throw new TypeError("Cannot call a class as a function")}(this,d),-1!==n.search(/^[0-9]{7}$/)&&(n+=b(n)),function(u,d){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!d||"object"!=typeof d&&"function"!=typeof d?u:d}(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,n,f))}return function(u,d){if("function"!=typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+typeof d);u.prototype=Object.create(d&&d.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(u,d):u.__proto__=d)}(d,u),M(d,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{8}$/)&&+this.data[7]===b(this.data)}},{key:"leftText",value:function(){return N(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"leftText",this).call(this,0,4)}},{key:"leftEncode",value:function(){var f=this.data.substr(0,4);return N(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"leftEncode",this).call(this,f,"LLLL")}},{key:"rightText",value:function(){return N(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"rightText",this).call(this,4,4)}},{key:"rightEncode",value:function(){var f=this.data.substr(4,4);return N(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"rightEncode",this).call(this,f,"RRRR")}}]),d}(x.default);S.default=s},2589:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var M=function(){function d(n,f){for(var P=0;P<f.length;P++){var T=f[P];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(n,T.key,T)}}return function(n,f,P){return f&&d(n.prototype,f),P&&d(n,P),n}}();S.checksum=u;var e=O(A(188));function O(d){return d&&d.__esModule?d:{default:d}}var s=function(d){function n(f,P){(function(d,n){if(!(d instanceof n))throw new TypeError("Cannot call a class as a function")})(this,n),-1!==f.search(/^[0-9]{11}$/)&&(f+=u(f));var T=function(d,n){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?d:n}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,f,P));return T.displayValue=P.displayValue,T.fontSize=P.fontSize>10*P.width?10*P.width:P.fontSize,T.guardHeight=P.height+T.fontSize/2+P.textMargin,T}return function(d,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);d.prototype=Object.create(n&&n.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(d,n):d.__proto__=n)}(n,d),M(n,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{12}$/)&&this.data[11]==u(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var P="";return P+="101",P+=(0,e.default)(this.data.substr(0,6),"LLLLLL"),P+="01010",P+=(0,e.default)(this.data.substr(6,6),"RRRRRR"),{data:P+="101",text:this.text}}},{key:"guardedEncoding",value:function(){var P=[];return this.displayValue&&P.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),P.push({data:"101"+(0,e.default)(this.data[0],"L"),options:{height:this.guardHeight}}),P.push({data:(0,e.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),P.push({data:"01010",options:{height:this.guardHeight}}),P.push({data:(0,e.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),P.push({data:(0,e.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&P.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),P}}]),n}(O(A(6615)).default);function u(d){var f,n=0;for(f=1;f<11;f+=2)n+=parseInt(d[f]);for(f=0;f<11;f+=2)n+=3*parseInt(d[f]);return(10-n%10)%10}S.default=s},2054:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var M=function(){function P(T,Z){for(var U=0;U<Z.length;U++){var G=Z[U];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(T,G.key,G)}}return function(T,Z,U){return Z&&P(T.prototype,Z),U&&P(T,U),T}}(),e=E(A(188)),F=E(A(6615)),O=A(2589);function E(P){return P&&P.__esModule?P:{default:P}}function b(P,T){if(!P)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!T||"object"!=typeof T&&"function"!=typeof T?P:T}var u=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],d=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],n=function(P){function T(Z,U){!function(P,T){if(!(P instanceof T))throw new TypeError("Cannot call a class as a function")}(this,T);var G=b(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,Z,U));if(G.isValid=!1,-1!==Z.search(/^[0-9]{6}$/))G.middleDigits=Z,G.upcA=f(Z,"0"),G.text=U.text||""+G.upcA[0]+Z+G.upcA[G.upcA.length-1],G.isValid=!0;else{if(-1===Z.search(/^[01][0-9]{7}$/))return b(G);if(G.middleDigits=Z.substring(1,Z.length-1),G.upcA=f(G.middleDigits,Z[0]),G.upcA[G.upcA.length-1]!==Z[Z.length-1])return b(G);G.isValid=!0}return G.displayValue=U.displayValue,G.fontSize=U.fontSize>10*U.width?10*U.width:U.fontSize,G.guardHeight=U.height+G.fontSize/2+U.textMargin,G}return function(P,T){if("function"!=typeof T&&null!==T)throw new TypeError("Super expression must either be null or a function, not "+typeof T);P.prototype=Object.create(T&&T.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(P,T):P.__proto__=T)}(T,P),M(T,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var U="";return U+="101",U+=this.encodeMiddleDigits(),{data:U+="010101",text:this.text}}},{key:"guardedEncoding",value:function(){var U=[];return this.displayValue&&U.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),U.push({data:"101",options:{height:this.guardHeight}}),U.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),U.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&U.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),U}},{key:"encodeMiddleDigits",value:function(){var U=this.upcA[0],K=d[parseInt(this.upcA[this.upcA.length-1])][parseInt(U)];return(0,e.default)(this.middleDigits,K)}}]),T}(F.default);function f(P,T){for(var Z=parseInt(P[P.length-1]),U=u[Z],G="",K=0,$=0;$<U.length;$++){var de=U[$];G+="X"===de?P[K++]:de}return(G=""+T+G)+(0,O.checksum)(G)}S.default=n},2998:(H,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.SIDE_BIN="101",S.MIDDLE_BIN="01010",S.BINARIES={L:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],G:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],R:["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"],O:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],E:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"]},S.EAN2_STRUCTURE=["LL","LG","GL","GG"],S.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],S.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]},188:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var M=A(2998);S.default=function(x,F,O){var E=x.split("").map(function(b,s){return M.BINARIES[F[s]]}).map(function(b,s){return b?b[x[s]]:""});if(O){var L=x.length-1;E=E.map(function(b,s){return s<L?b+O:b})}return E.join("")}},9214:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.UPCE=S.UPC=S.EAN2=S.EAN5=S.EAN8=S.EAN13=void 0;var N=n(A(7674)),x=n(A(8036)),O=n(A(639)),L=n(A(2649)),s=n(A(2589)),d=n(A(2054));function n(f){return f&&f.__esModule?f:{default:f}}S.EAN13=N.default,S.EAN8=x.default,S.EAN5=O.default,S.EAN2=L.default,S.UPC=s.default,S.UPCE=d.default},6651:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.GenericBarcode=void 0;var b,M=function(){function b(s,u){for(var d=0;d<u.length;d++){var n=u[d];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(s,n.key,n)}}return function(s,u,d){return u&&b(s.prototype,u),d&&b(s,d),s}}(),L=function(b){function s(u,d){return function(b,s){if(!(b instanceof s))throw new TypeError("Cannot call a class as a function")}(this,s),function(b,s){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!s||"object"!=typeof s&&"function"!=typeof s?b:s}(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,u,d))}return function(b,s){if("function"!=typeof s&&null!==s)throw new TypeError("Super expression must either be null or a function, not "+typeof s);b.prototype=Object.create(s&&s.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(b,s):b.__proto__=s)}(s,b),M(s,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),s}(((b=A(6615))&&b.__esModule?b:{default:b}).default);S.GenericBarcode=L},9237:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var s,M=function(){function s(u,d){for(var n=0;n<d.length;n++){var f=d[n];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(u,f.key,f)}}return function(u,d,n){return d&&s(u.prototype,d),n&&s(u,n),u}}(),N=A(7851);function O(s,u){if(!(s instanceof u))throw new TypeError("Cannot call a class as a function")}function E(s,u){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!u||"object"!=typeof u&&"function"!=typeof u?s:u}var b=function(s){function u(){return O(this,u),E(this,(u.__proto__||Object.getPrototypeOf(u)).apply(this,arguments))}return function(s,u){if("function"!=typeof u&&null!==u)throw new TypeError("Super expression must either be null or a function, not "+typeof u);s.prototype=Object.create(u&&u.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(s,u):s.__proto__=u)}(u,s),M(u,[{key:"valid",value:function(){return-1!==this.data.search(/^([0-9]{2})+$/)}},{key:"encode",value:function(){var n=this,f=this.data.match(/.{2}/g).map(function(P){return n.encodePair(P)}).join("");return{data:N.START_BIN+f+N.END_BIN,text:this.text}}},{key:"encodePair",value:function(n){var f=N.BINARIES[n[1]];return N.BINARIES[n[0]].split("").map(function(P,T){return("1"===P?"111":"1")+("1"===f[T]?"000":"0")}).join("")}}]),u}(((s=A(6615))&&s.__esModule?s:{default:s}).default);S.default=b},6701:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var s,M=function(){function s(u,d){for(var n=0;n<d.length;n++){var f=d[n];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(u,f.key,f)}}return function(u,d,n){return d&&s(u.prototype,d),n&&s(u,n),u}}(),e=(s=A(9237))&&s.__esModule?s:{default:s},L=function(u){var d=u.substr(0,13).split("").map(function(n){return parseInt(n,10)}).reduce(function(n,f,P){return n+f*(3-P%2*2)},0);return 10*Math.ceil(d/10)-d},b=function(s){function u(d,n){return function(s,u){if(!(s instanceof u))throw new TypeError("Cannot call a class as a function")}(this,u),-1!==d.search(/^[0-9]{13}$/)&&(d+=L(d)),function(s,u){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!u||"object"!=typeof u&&"function"!=typeof u?s:u}(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,d,n))}return function(s,u){if("function"!=typeof u&&null!==u)throw new TypeError("Super expression must either be null or a function, not "+typeof u);s.prototype=Object.create(u&&u.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(s,u):s.__proto__=u)}(u,s),M(u,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{14}$/)&&+this.data[13]===L(this.data)}}]),u}(e.default);S.default=b},7851:(H,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.START_BIN="1010",S.END_BIN="11101",S.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"]},4059:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.ITF14=S.ITF=void 0;var N=F(A(9237)),x=F(A(6701));function F(O){return O&&O.__esModule?O:{default:O}}S.ITF=N.default,S.ITF14=x.default},44:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var s,M=function(){function s(u,d){for(var n=0;n<d.length;n++){var f=d[n];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(u,f.key,f)}}return function(u,d,n){return d&&s(u.prototype,d),n&&s(u,n),u}}(),L=function(s){function u(d,n){return function(s,u){if(!(s instanceof u))throw new TypeError("Cannot call a class as a function")}(this,u),function(s,u){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!u||"object"!=typeof u&&"function"!=typeof u?s:u}(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,d,n))}return function(s,u){if("function"!=typeof u&&null!==u)throw new TypeError("Super expression must either be null or a function, not "+typeof u);s.prototype=Object.create(u&&u.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(s,u):s.__proto__=u)}(u,s),M(u,[{key:"encode",value:function(){for(var n="110",f=0;f<this.data.length;f++){var T=parseInt(this.data[f]).toString(2);T=b(T,4-T.length);for(var Z=0;Z<T.length;Z++)n+="0"==T[Z]?"100":"110"}return{data:n+="1001",text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]+$/)}}]),u}(((s=A(6615))&&s.__esModule?s:{default:s}).default);function b(s,u){for(var d=0;d<u;d++)s="0"+s;return s}S.default=L},6926:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var b,N=(b=A(44))&&b.__esModule?b:{default:b},e=A(9122),L=function(b){function s(u,d){return function(b,s){if(!(b instanceof s))throw new TypeError("Cannot call a class as a function")}(this,s),function(b,s){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!s||"object"!=typeof s&&"function"!=typeof s?b:s}(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,u+(0,e.mod10)(u),d))}return function(b,s){if("function"!=typeof s&&null!==s)throw new TypeError("Super expression must either be null or a function, not "+typeof s);b.prototype=Object.create(s&&s.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(b,s):b.__proto__=s)}(s,b),s}(N.default);S.default=L},6375:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var b,N=(b=A(44))&&b.__esModule?b:{default:b},e=A(9122),L=function(b){function s(u,d){return function(b,s){if(!(b instanceof s))throw new TypeError("Cannot call a class as a function")}(this,s),u+=(0,e.mod10)(u),u+=(0,e.mod10)(u),function(b,s){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!s||"object"!=typeof s&&"function"!=typeof s?b:s}(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,u,d))}return function(b,s){if("function"!=typeof s&&null!==s)throw new TypeError("Super expression must either be null or a function, not "+typeof s);b.prototype=Object.create(s&&s.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(b,s):b.__proto__=s)}(s,b),s}(N.default);S.default=L},2558:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var b,N=(b=A(44))&&b.__esModule?b:{default:b},e=A(9122),L=function(b){function s(u,d){return function(b,s){if(!(b instanceof s))throw new TypeError("Cannot call a class as a function")}(this,s),function(b,s){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!s||"object"!=typeof s&&"function"!=typeof s?b:s}(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,u+(0,e.mod11)(u),d))}return function(b,s){if("function"!=typeof s&&null!==s)throw new TypeError("Super expression must either be null or a function, not "+typeof s);b.prototype=Object.create(s&&s.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(b,s):b.__proto__=s)}(s,b),s}(N.default);S.default=L},3332:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var b,N=(b=A(44))&&b.__esModule?b:{default:b},e=A(9122),L=function(b){function s(u,d){return function(b,s){if(!(b instanceof s))throw new TypeError("Cannot call a class as a function")}(this,s),u+=(0,e.mod11)(u),u+=(0,e.mod10)(u),function(b,s){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!s||"object"!=typeof s&&"function"!=typeof s?b:s}(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,u,d))}return function(b,s){if("function"!=typeof s&&null!==s)throw new TypeError("Super expression must either be null or a function, not "+typeof s);b.prototype=Object.create(s&&s.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(b,s):b.__proto__=s)}(s,b),s}(N.default);S.default=L},9122:(H,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.mod10=function(N){for(var e=0,x=0;x<N.length;x++){var F=parseInt(N[x]);e+=(x+N.length)%2==0?F:2*F%10+Math.floor(2*F/10)}return(10-e%10)%10},S.mod11=function(N){for(var e=0,x=[2,3,4,5,6,7],F=0;F<N.length;F++){var O=parseInt(N[N.length-1-F]);e+=x[F%x.length]*O}return(11-e%11)%11}},495:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.MSI1110=S.MSI1010=S.MSI11=S.MSI10=S.MSI=void 0;var N=u(A(44)),x=u(A(6926)),O=u(A(2558)),L=u(A(6375)),s=u(A(3332));function u(d){return d&&d.__esModule?d:{default:d}}S.MSI=N.default,S.MSI10=x.default,S.MSI11=O.default,S.MSI1010=L.default,S.MSI1110=s.default},4162:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.codabar=void 0;var b,M=function(){function b(s,u){for(var d=0;d<u.length;d++){var n=u[d];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(s,n.key,n)}}return function(s,u,d){return u&&b(s.prototype,u),d&&b(s,d),s}}(),L=function(b){function s(u,d){(function(b,s){if(!(b instanceof s))throw new TypeError("Cannot call a class as a function")})(this,s),0===u.search(/^[0-9\-\$\:\.\+\/]+$/)&&(u="A"+u+"A");var n=function(b,s){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!s||"object"!=typeof s&&"function"!=typeof s?b:s}(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,u.toUpperCase(),d));return n.text=n.options.text||n.text.replace(/[A-D]/g,""),n}return function(b,s){if("function"!=typeof s&&null!==s)throw new TypeError("Super expression must either be null or a function, not "+typeof s);b.prototype=Object.create(s&&s.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(b,s):b.__proto__=s)}(s,b),M(s,[{key:"valid",value:function(){return-1!==this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)}},{key:"encode",value:function(){for(var d=[],n=this.getEncodings(),f=0;f<this.data.length;f++)d.push(n[this.data.charAt(f)]),f!==this.data.length-1&&d.push("0");return{text:this.text,data:d.join("")}}},{key:"getEncodings",value:function(){return{0:"101010011",1:"101011001",2:"101001011",3:"110010101",4:"101101001",5:"110101001",6:"100101011",7:"100101101",8:"100110101",9:"110100101","-":"101001101",$:"101100101",":":"1101011011","/":"1101101011",".":"1101101101","+":"1011011011",A:"1011001001",B:"1001001011",C:"1010010011",D:"1010011001"}}}]),s}(((b=A(6615))&&b.__esModule?b:{default:b}).default);S.codabar=L},3413:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var M=A(8104),N=A(6625),e=A(9214),x=A(4059),F=A(495),O=A(3133),E=A(4162),L=A(6651);S.default={CODE39:M.CODE39,CODE128:N.CODE128,CODE128A:N.CODE128A,CODE128B:N.CODE128B,CODE128C:N.CODE128C,EAN13:e.EAN13,EAN8:e.EAN8,EAN5:e.EAN5,EAN2:e.EAN2,UPC:e.UPC,UPCE:e.UPCE,ITF14:x.ITF14,ITF:x.ITF,MSI:F.MSI,MSI10:F.MSI10,MSI11:F.MSI11,MSI1010:F.MSI1010,MSI1110:F.MSI1110,pharmacode:O.pharmacode,codabar:E.codabar,GenericBarcode:L.GenericBarcode}},3133:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.pharmacode=void 0;var b,M=function(){function b(s,u){for(var d=0;d<u.length;d++){var n=u[d];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(s,n.key,n)}}return function(s,u,d){return u&&b(s.prototype,u),d&&b(s,d),s}}(),L=function(b){function s(u,d){!function(b,s){if(!(b instanceof s))throw new TypeError("Cannot call a class as a function")}(this,s);var n=function(b,s){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!s||"object"!=typeof s&&"function"!=typeof s?b:s}(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,u,d));return n.number=parseInt(u,10),n}return function(b,s){if("function"!=typeof s&&null!==s)throw new TypeError("Super expression must either be null or a function, not "+typeof s);b.prototype=Object.create(s&&s.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(b,s):b.__proto__=s)}(s,b),M(s,[{key:"encode",value:function(){for(var d=this.number,n="";!isNaN(d)&&0!=d;)d%2==0?(n="11100"+n,d=(d-2)/2):(n="100"+n,d=(d-1)/2);return{data:n=n.slice(0,-2),text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),s}(((b=A(6615))&&b.__esModule?b:{default:b}).default);S.pharmacode=L},400:(H,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var A=function(){function e(x,F){for(var O=0;O<F.length;O++){var E=F[O];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(x,E.key,E)}}return function(x,F,O){return F&&e(x.prototype,F),O&&e(x,O),x}}(),N=function(){function e(x){(function(e,x){if(!(e instanceof x))throw new TypeError("Cannot call a class as a function")})(this,e),this.api=x}return A(e,[{key:"handleCatch",value:function(F){if("InvalidInputException"!==F.name)throw F;if(this.api._options.valid===this.api._defaults.valid)throw F.message;this.api._options.valid(!1),this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(F){try{var O=F.apply(void 0,arguments);return this.api._options.valid(!0),O}catch(E){return this.handleCatch(E),this.api}}}]),e}();S.default=N},4779:(H,S)=>{"use strict";function A(O,E){if(!(O instanceof E))throw new TypeError("Cannot call a class as a function")}function M(O,E){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!E||"object"!=typeof E&&"function"!=typeof E?O:E}function N(O,E){if("function"!=typeof E&&null!==E)throw new TypeError("Super expression must either be null or a function, not "+typeof E);O.prototype=Object.create(E&&E.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(O,E):O.__proto__=E)}Object.defineProperty(S,"__esModule",{value:!0});var e=function(O){function E(L,b){A(this,E);var s=M(this,(E.__proto__||Object.getPrototypeOf(E)).call(this));return s.name="InvalidInputException",s.symbology=L,s.input=b,s.message='"'+s.input+'" is not a valid input for '+s.symbology,s}return N(E,Error),E}(),x=function(O){function E(){A(this,E);var L=M(this,(E.__proto__||Object.getPrototypeOf(E)).call(this));return L.name="InvalidElementException",L.message="Not supported type to render on",L}return N(E,Error),E}(),F=function(O){function E(){A(this,E);var L=M(this,(E.__proto__||Object.getPrototypeOf(E)).call(this));return L.name="NoElementException",L.message="No element to render on.",L}return N(E,Error),E}();S.InvalidInputException=e,S.InvalidElementException=x,S.NoElementException=F},7095:(H,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function(M){return M.marginTop=M.marginTop||M.margin,M.marginBottom=M.marginBottom||M.margin,M.marginRight=M.marginRight||M.margin,M.marginLeft=M.marginLeft||M.margin,M}},7866:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var N=F(A(201)),x=F(A(1452));function F(E){return E&&E.__esModule?E:{default:E}}S.default=function(E){var L={};for(var b in x.default)x.default.hasOwnProperty(b)&&(E.hasAttribute("jsbarcode-"+b.toLowerCase())&&(L[b]=E.getAttribute("jsbarcode-"+b.toLowerCase())),E.hasAttribute("data-"+b.toLowerCase())&&(L[b]=E.getAttribute("data-"+b.toLowerCase())));return L.value=E.getAttribute("jsbarcode-value")||E.getAttribute("data-value"),(0,N.default)(L)}},4441:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(u){return typeof u}:function(u){return u&&"function"==typeof Symbol&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},e=E(A(7866)),F=E(A(1462)),O=A(4779);function E(u){return u&&u.__esModule?u:{default:u}}S.default=function L(u){if("string"==typeof u)return function(u){var d=document.querySelectorAll(u);if(0!==d.length){for(var n=[],f=0;f<d.length;f++)n.push(L(d[f]));return n}}(u);if(Array.isArray(u)){for(var d=[],n=0;n<u.length;n++)d.push(L(u[n]));return d}if("undefined"!=typeof HTMLCanvasElement&&u instanceof HTMLImageElement)return function(u){var d=document.createElement("canvas");return{element:d,options:(0,e.default)(u),renderer:F.default.CanvasRenderer,afterRender:function(){u.setAttribute("src",d.toDataURL())}}}(u);if(u&&u.nodeName&&"svg"===u.nodeName.toLowerCase()||"undefined"!=typeof SVGElement&&u instanceof SVGElement)return{element:u,options:(0,e.default)(u),renderer:F.default.SVGRenderer};if("undefined"!=typeof HTMLCanvasElement&&u instanceof HTMLCanvasElement)return{element:u,options:(0,e.default)(u),renderer:F.default.CanvasRenderer};if(u&&u.getContext)return{element:u,renderer:F.default.CanvasRenderer};if(u&&"object"===(void 0===u?"undefined":M(u))&&!u.nodeName)return{element:u,renderer:F.default.ObjectRenderer};throw new O.InvalidElementException}},2308:(H,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function(M){var N=[];return function e(x){if(Array.isArray(x))for(var F=0;F<x.length;F++)e(x[F]);else x.text=x.text||"",x.data=x.data||"",N.push(x)}(M),N}},7720:(H,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var A=Object.assign||function(M){for(var N=1;N<arguments.length;N++){var e=arguments[N];for(var x in e)Object.prototype.hasOwnProperty.call(e,x)&&(M[x]=e[x])}return M};S.default=function(M,N){return A({},M,N)}},201:(H,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function(M){var N=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var e in N)N.hasOwnProperty(e)&&"string"==typeof M[e=N[e]]&&(M[e]=parseInt(M[e],10));return"string"==typeof M.displayValue&&(M.displayValue="false"!=M.displayValue),M}},1452:(H,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default={width:2,height:100,format:"auto",displayValue:!0,fontOptions:"",font:"monospace",text:void 0,textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,valid:function(){}}},3010:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var L,M=function(){function L(b,s){for(var u=0;u<s.length;u++){var d=s[u];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(b,d.key,d)}}return function(b,s,u){return s&&L(b.prototype,s),u&&L(b,u),b}}(),e=(L=A(7720))&&L.__esModule?L:{default:L},x=A(9390),E=function(){function L(b,s,u){(function(L,b){if(!(L instanceof b))throw new TypeError("Cannot call a class as a function")})(this,L),this.canvas=b,this.encodings=s,this.options=u}return M(L,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var s=0;s<this.encodings.length;s++){var u=(0,e.default)(this.options,this.encodings[s].options);this.drawCanvasBarcode(u,this.encodings[s]),this.drawCanvasText(u,this.encodings[s]),this.moveCanvasDrawing(this.encodings[s])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var s=this.canvas.getContext("2d");s.save(),(0,x.calculateEncodingAttributes)(this.encodings,this.options,s);var u=(0,x.getTotalWidthOfEncodings)(this.encodings),d=(0,x.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=u+this.options.marginLeft+this.options.marginRight,this.canvas.height=d,s.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(s.fillStyle=this.options.background,s.fillRect(0,0,this.canvas.width,this.canvas.height)),s.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(s,u){var f,d=this.canvas.getContext("2d"),n=u.data;f="top"==s.textPosition?s.marginTop+s.fontSize+s.textMargin:s.marginTop,d.fillStyle=s.lineColor;for(var P=0;P<n.length;P++){var T=P*s.width+u.barcodePadding;"1"===n[P]?d.fillRect(T,f,s.width,s.height):n[P]&&d.fillRect(T,f,s.width,s.height*n[P])}}},{key:"drawCanvasText",value:function(s,u){var f,P,d=this.canvas.getContext("2d");s.displayValue&&(P="top"==s.textPosition?s.marginTop+s.fontSize-s.textMargin:s.height+s.textMargin+s.marginTop+s.fontSize,d.font=s.fontOptions+" "+s.fontSize+"px "+s.font,"left"==s.textAlign||u.barcodePadding>0?(f=0,d.textAlign="left"):"right"==s.textAlign?(f=u.width-1,d.textAlign="right"):(f=u.width/2,d.textAlign="center"),d.fillText(u.text,f,P))}},{key:"moveCanvasDrawing",value:function(s){this.canvas.getContext("2d").translate(s.width,0)}},{key:"restoreCanvas",value:function(){this.canvas.getContext("2d").restore()}}]),L}();S.default=E},1462:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var N=E(A(3010)),x=E(A(5995)),O=E(A(3911));function E(L){return L&&L.__esModule?L:{default:L}}S.default={CanvasRenderer:N.default,SVGRenderer:x.default,ObjectRenderer:O.default}},3911:(H,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var A=function(){function e(x,F){for(var O=0;O<F.length;O++){var E=F[O];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(x,E.key,E)}}return function(x,F,O){return F&&e(x.prototype,F),O&&e(x,O),x}}(),N=function(){function e(x,F,O){(function(e,x){if(!(e instanceof x))throw new TypeError("Cannot call a class as a function")})(this,e),this.object=x,this.encodings=F,this.options=O}return A(e,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),e}();S.default=N},9390:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.getTotalWidthOfEncodings=S.calculateEncodingAttributes=S.getBarcodePadding=S.getEncodingHeight=S.getMaximumHeightOfEncodings=void 0;var s,N=(s=A(7720))&&s.__esModule?s:{default:s};function x(s,u){return u.height+(u.displayValue&&s.text.length>0?u.fontSize+u.textMargin:0)+u.marginTop+u.marginBottom}function F(s,u,d){if(d.displayValue&&u<s){if("center"==d.textAlign)return Math.floor((s-u)/2);if("left"==d.textAlign)return 0;if("right"==d.textAlign)return Math.floor(s-u)}return 0}function b(s,u,d){var n;if(d)n=d;else{if("undefined"==typeof document)return 0;n=document.createElement("canvas").getContext("2d")}n.font=u.fontOptions+" "+u.fontSize+"px "+u.font;var f=n.measureText(s);return f?f.width:0}S.getMaximumHeightOfEncodings=function(s){for(var u=0,d=0;d<s.length;d++)s[d].height>u&&(u=s[d].height);return u},S.getEncodingHeight=x,S.getBarcodePadding=F,S.calculateEncodingAttributes=function(s,u,d){for(var n=0;n<s.length;n++){var T,f=s[n],P=(0,N.default)(u,f.options);T=P.displayValue?b(f.text,P,d):0;var Z=f.data.length*P.width;f.width=Math.ceil(Math.max(T,Z)),f.height=x(f,P),f.barcodePadding=F(T,Z,P)}},S.getTotalWidthOfEncodings=function(s){for(var u=0,d=0;d<s.length;d++)u+=s[d].width;return u}},5995:(H,S,A)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var b,M=function(){function b(s,u){for(var d=0;d<u.length;d++){var n=u[d];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(s,n.key,n)}}return function(s,u,d){return u&&b(s.prototype,u),d&&b(s,d),s}}(),e=(b=A(7720))&&b.__esModule?b:{default:b},x=A(9390),E="http://www.w3.org/2000/svg",L=function(){function b(s,u,d){(function(b,s){if(!(b instanceof s))throw new TypeError("Cannot call a class as a function")})(this,b),this.svg=s,this.encodings=u,this.options=d,this.document=d.xmlDocument||document}return M(b,[{key:"render",value:function(){var u=this.options.marginLeft;this.prepareSVG();for(var d=0;d<this.encodings.length;d++){var n=this.encodings[d],f=(0,e.default)(this.options,n.options),P=this.createGroup(u,f.marginTop,this.svg);this.setGroupOptions(P,f),this.drawSvgBarcode(P,f,n),this.drawSVGText(P,f,n),u+=n.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,x.calculateEncodingAttributes)(this.encodings,this.options);var u=(0,x.getTotalWidthOfEncodings)(this.encodings),d=(0,x.getMaximumHeightOfEncodings)(this.encodings),n=u+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(n,d),this.options.background&&this.drawRect(0,0,n,d,this.svg).setAttribute("style","fill:"+this.options.background+";")}},{key:"drawSvgBarcode",value:function(u,d,n){var P,f=n.data;P="top"==d.textPosition?d.fontSize+d.textMargin:0;for(var T=0,Z=0,U=0;U<f.length;U++)Z=U*d.width+n.barcodePadding,"1"===f[U]?T++:T>0&&(this.drawRect(Z-d.width*T,P,d.width*T,d.height,u),T=0);T>0&&this.drawRect(Z-d.width*(T-1),P,d.width*T,d.height,u)}},{key:"drawSVGText",value:function(u,d,n){var P,T,f=this.document.createElementNS(E,"text");d.displayValue&&(f.setAttribute("style","font:"+d.fontOptions+" "+d.fontSize+"px "+d.font),T="top"==d.textPosition?d.fontSize-d.textMargin:d.height+d.textMargin+d.fontSize,"left"==d.textAlign||n.barcodePadding>0?(P=0,f.setAttribute("text-anchor","start")):"right"==d.textAlign?(P=n.width-1,f.setAttribute("text-anchor","end")):(P=n.width/2,f.setAttribute("text-anchor","middle")),f.setAttribute("x",P),f.setAttribute("y",T),f.appendChild(this.document.createTextNode(n.text)),u.appendChild(f))}},{key:"setSvgAttributes",value:function(u,d){var n=this.svg;n.setAttribute("width",u+"px"),n.setAttribute("height",d+"px"),n.setAttribute("x","0px"),n.setAttribute("y","0px"),n.setAttribute("viewBox","0 0 "+u+" "+d),n.setAttribute("xmlns",E),n.setAttribute("version","1.1"),n.setAttribute("style","transform: translate(0,0)")}},{key:"createGroup",value:function(u,d,n){var f=this.document.createElementNS(E,"g");return f.setAttribute("transform","translate("+u+", "+d+")"),n.appendChild(f),f}},{key:"setGroupOptions",value:function(u,d){u.setAttribute("style","fill:"+d.lineColor+";")}},{key:"drawRect",value:function(u,d,n,f,P){var T=this.document.createElementNS(E,"rect");return T.setAttribute("x",u),T.setAttribute("y",d),T.setAttribute("width",n),T.setAttribute("height",f),P.appendChild(T),T}}]),b}();S.default=L},7803:(H,S,A)=>{"use strict";A.r(S),A.d(S,{PagesModule:()=>gt});var M=A(6019),N=A(1086),e=A(3668),x=A(4099),F=A(8735);let O=(()=>{class _{constructor(){this.store=new x.X([])}getState(){return this.store.asObservable().pipe((0,F.h)(a=>void 0!==a))}setState(a){this.store.next(a)}}return _.\u0275fac=function(a){return new(a||_)},_.\u0275prov=e.Yz7({token:_,factory:_.\u0275fac,providedIn:"root"}),_})();var E=A(1286),L=A(1273),b=A(3405),s=A(8805);let u=(()=>{class _{static StringFormat(a,...c){for(let w=0;w<c.length;w++)a=a.replace(`{${w}}`,c[w]);return a}static IsNotEmpty(a){return""!=a&&a!=_.GuidEmpty&&null!=a&&null!=a}static IsEmpty(a){return""==a||null==a||null==a||a==_.GuidEmpty}static FilterByID(a,c){try{const w=a.filter(V=>V.ID==c);if(w.length>0)return w[0]}catch(w){console.log("error filter")}return null}static DateOnly(a){return a?new Date(new Date(a).toDateString()):new Date((new Date).toDateString())}}return _.GuidEmpty="00000000-0000-0000-0000-000000000000",_.DecimalMinValue="-7.922816251426434e+28",_.InputLockTimeSpan=500,_.MinDate="0001-01-01T00:00:00",_.MinTime="00:00:00",_})();var T=(()=>{return(_=T||(T={}))[_.SUPPLIER_BILL=0]="SUPPLIER_BILL",_[_.OUTLET_DELIVERY=1]="OUTLET_DELIVERY",T;var _})(),Z=A(5304),U=A(2193),G=A(9090),K=A(5496),$=A(9010);let de=(()=>{class _{constructor(a,c){this.data=a,this.dialogRef=c,this.outlets=a.outlets}ngOnInit(){this.initModalConfig(),this.initTransactionType()}initModalConfig(){this.modalConfig=new U.O,this.modalConfig.title="Choose your transaction",this.modalConfig.hideMoreButton=!0}initTransactionType(){this.transactionTypes=[{title:"Supplier Bill",type:T.SUPPLIER_BILL},{title:"Outlet Delivery",type:T.OUTLET_DELIVERY}]}onOk(){this.selectedOutlet&&this.poNumber&&this.dialogRef.close({Outlet:this.selectedOutlet.getName,Number:this.poNumber,Type:this.selectedTransactionType})}onCancel(){this.dialogRef.close()}}return _.\u0275fac=function(a){return new(a||_)(e.Y36(Z.WI),e.Y36(Z.so))},_.\u0275cmp=e.Xpm({type:_,selectors:[["app-form-add-bill"]],decls:16,vars:10,consts:[[3,"config","onOk","onCancel"],[1,"row"],["align","center",1,"col-sm-12","mt-3"],[2,"position","relative","width","100%"],[1,"w-100"],["bindLabel","title","bindValue","type","placeholder","Choose Type",1,"sticky-top","tall",3,"items","ngModel","clearable","appendTo","ngModelChange"],[1,"pt-6"],["bindLabel","Name","placeholder","Choose Outlet",1,"sticky-top","tall",3,"items","ngModel","clearable","appendTo","ngModelChange"],[1,"form-label-group"],["min","1","id","qty","type","text","placeholder","Number","aria-label","width",1,"form-control",3,"ngModel","ngModelChange"]],template:function(a,c){1&a&&(e.TgZ(0,"modal-material",0),e.NdJ("onOk",function(){return c.onOk()})("onCancel",function(){return c.onCancel()}),e.TgZ(1,"content"),e.TgZ(2,"div",1),e.TgZ(3,"div",2),e.TgZ(4,"table",3),e.TgZ(5,"tbody"),e.TgZ(6,"tr",4),e.TgZ(7,"td"),e.TgZ(8,"ng-select",5),e.NdJ("ngModelChange",function(V){return c.selectedTransactionType=V}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(9,"tr",4),e.TgZ(10,"td",6),e.TgZ(11,"ng-select",7),e.NdJ("ngModelChange",function(V){return c.selectedOutlet=V}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(12,"tr",4),e.TgZ(13,"td",6),e.TgZ(14,"div",8),e.TgZ(15,"input",9),e.NdJ("ngModelChange",function(V){return c.poNumber=V}),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&a&&(e.Q6J("config",c.modalConfig),e.xp6(8),e.Q6J("items",c.transactionTypes)("ngModel",c.selectedTransactionType)("clearable",!1)("appendTo","body"),e.xp6(3),e.Q6J("items",c.outlets)("ngModel",c.selectedOutlet)("clearable",!1)("appendTo","body"),e.xp6(4),e.Q6J("ngModel",c.poNumber))},directives:[G.M,K.w9,$.JJ,$.On,$.Fj],styles:[""]}),_})();var ae=A(1366),re=A(8053),ge=A(8930);let J=(()=>{class _{constructor(a){this.httpService=a,this.barcodeConfigState=new x.X(null)}updatePaperFormatConfig(a){let c=localStorage.getItem("Domain");return this.httpService.post("/api/Config/SaveConfig",{SubDomain:c,Version:this.paperFormatVersion,PaperFormats:a})}getPaperFormatConfig(){let a=localStorage.getItem("Domain"),c=[];return this.httpService.post("/api/Config/PaperConfig",{SubDomain:a}).pipe((0,re.U)(W=>(this.paperFormatVersion=W.version,c=W.PaperFormats,c)))}setBarcodeConfigState(a){this.barcodeConfigState.next(a)}getBarcodeConfigState(){return this.barcodeConfigState.asObservable().pipe((0,F.h)(a=>u.IsNotEmpty(a)))}}return _.\u0275fac=function(a){return new(a||_)(e.LFG(ge.O))},_.\u0275prov=e.Yz7({token:_,factory:_.\u0275fac,providedIn:"root"}),_})();var k=A(4522);class te{constructor(y){y&&(this.AccountID=y.AccountID,this.CalculationTypeID=y.CalculationTypeID,this.ID=y.ID,this.Index=y.Index,this.Label=y.Label,this.MultipleTaxTypeID=y.MultipleTaxTypeID,this.Note=y.Note,this.PrintVisible=y.PrintVisible,this.Rate=y.Rate,this.TypeID=y.TypeID,this.Name=y.Name,this.Type=y.Type)}get getID(){return this.ID}get getType(){return this.Type}get getName(){return this.Name}get getAccountID(){return this.AccountID}set setAccountId(y){this.AccountID=y}get getCalculationTypeID(){return this.CalculationTypeID}set setCalculationID(y){this.CalculationTypeID=y}get getRate(){return this.Rate}set setRate(y){this.Rate=y}get getLabel(){return this.Label}}class Q{get getID(){return this.ID}set setID(y){this.ID=y}get getSelectedPromotion(){return this.SelectedPromotion}set setSelectedPromotion(y){this.SelectedPromotion=y}get getDescription(){return this.description}set setDescription(y){this.description=y}set setBarcodeTitle(y){this.barcodeTitle=y}get getBarcodeTitle(){return this.barcodeTitle}set setCustomPrice(y){this.customPrice=y}get getCustomPrice(){return this.customPrice}get getUnitPrice(){return this.UnitPrice}set setUnitPrice(y){this.UnitPrice=y}get getCode(){return this.Code}set setCode(y){this.barcodeTitle=y,this.Code=y}get getModel(){return this.Model}set setModel(y){this.Model=y}get getName(){return this.Name}set setName(y){this.Name=y}get getCurrency(){return this.CurrencySymbol}set setCurrency(y){this.CurrencySymbol=y}}class Y{get getCode(){return this.Code}get getName(){return this.Name}get getSuspended(){return this.Suspended}set setCode(y){this.Code=y}set setName(y){this.Name=y}set setSuspended(y){this.Suspended=y}}class le{get getOutlet(){return this.Outlet}get getNumber(){return this.Number}get getDate(){return this.Date}get getDueDate(){return this.DueDate}get getSupplier(){return this.Supplier}get getCreatorID(){return this.CreatorID}get getCreated(){return this.Created}get getDiscount1(){return this.Discount1}get getDiscountAmount(){return this.DiscountAmount}get getGross(){return this.Gross}get getDiscountTotal(){return this.DiscountTotal}get getTaxType(){return this.TaxType}get getTax(){return this.Tax}get getPurchase(){return this.Purchase}get getPurchaseNTax(){return this.PurchaseNTax}get getDelivery(){return this.Delivery}get getVariants(){return this.Variants}get getPayments(){return this.Payments}set setOutlet(y){this.Outlet=y}set setNumber(y){this.Number=y}set setDate(y){this.Date=y}set setDueDate(y){this.DueDate=y}set setSupplier(y){this.Supplier=y}set setCreatorID(y){this.CreatorID=y}set setCreated(y){this.Created=y}set setDiscount1(y){this.Discount1=y}set setDiscountAmount(y){this.DiscountAmount=y}set setGross(y){this.Gross=y}set setDiscountTotal(y){this.DiscountTotal=y}set setTaxType(y){this.TaxType=y}set setTax(y){this.Tax=y}set setPurchase(y){this.Purchase=y}set setPurchaseNTax(y){this.PurchaseNTax=y}set setDelivery(y){this.Delivery=y}set setVariants(y){this.Variants=y}set setPayments(y){this.Payments=y}}class Ce extends Q{constructor(){super()}get getVariantID(){return this.VariantID}get getQuantity(){return this.Quantity}get getPrice(){return this.Price}get getDiscount(){return this.Discount}get getNettPrice(){return this.NettPrice}set setVariantID(y){this.VariantID=y}set setQuantity(y){this.Quantity=y}set setPrice(y){this.Price=y}set setDiscount(y){this.Discount=y}set setNettPrice(y){this.NettPrice=y}}class Oe{get getID(){return this.ID}set setID(y){this.ID=y}get getName(){return this.Name}set setName(y){this.Name=y}get getDiscount(){return this.Discount}get getExtraCost(){return this.ExtraCost}get getPromotionID(){return this.PromotionID}get getUnitPrice(){return this.UnitPrice}set setDiscount(y){this.Discount=y}set setExtraCost(y){this.ExtraCost=y}set setPromotionID(y){this.PromotionID=y}set setUnitPrice(y){this.UnitPrice=y}}let Se=(()=>{class _{constructor(){}getProductModel(a){let c=new Q;return c.setID=a.ID,c.setCode=a.Code,c.setCurrency=a.CurrencySymbol,c.setModel=a.Model,c.setName=a.Name,c.setUnitPrice=a.UnitPrice,c.setDescription=a.Description,c}getTaxModel(a){return new te(a)}getOutletModel(a){let c=new Y;return c.setCode=a.Code,c.setName=a.Name,c.setSuspended=a.Suspended,c}getVariantModel(a){let c=new Ce;return c.setCode=a.Code,c.setDiscount=a.Discount,c.setNettPrice=a.NettPrice,c.setPrice=a.Price,c.setUnitPrice=a.UnitPrice,c.setQuantity=a.Quantity,c.setVariantID=a.VariantID,c.setName=a.Name,c}getBillModel(a){let c=new le;return c.setNumber=a.Number,c.setOutlet=a.Outlet,c.setVariants=a.Variants?a.Variants.map(w=>this.getVariantModel(w)):[],c}getPromotionModel(a){let c=new Oe;return c.setDiscount=a.Discount,c.setExtraCost=a.ExtraCost,c.setPromotionID=a.PromotionID,c.setUnitPrice=a.UnitPrice,c.setName=a.Name,c.setID=a.ID,c}}return _.\u0275fac=function(a){return new(a||_)},_.\u0275prov=e.Yz7({token:_,factory:_.\u0275fac,providedIn:"root"}),_})(),ke=(()=>{class _{constructor(a,c,w){this.httpService=a,this.http=c,this.factoryService=w}getProductById(a){let c=localStorage.getItem("Domain");return this.httpService.post(`https://${c}/API/V3/Variant/ID`,{ID:a}).pipe((0,re.U)(w=>this.factoryService.getProductModel(w)))}getPromotionByProducID(a){let c=localStorage.getItem("Domain");return this.httpService.post(`https://${c}/API/v3/PromotionEvent/GetByVariantID`,{VariantID:a}).pipe((0,re.U)(w=>w.map(W=>this.factoryService.getPromotionModel(W))))}uploadProducts(a){let c=localStorage.getItem("Domain"),w=new FormData;return w.append("file",a,a.name),this.httpService.postFormData(`https://${c}/API/Product/UploadCSVforBarcode`,w).pipe((0,re.U)(V=>V.map(W=>(W.Print=W.Print.map(X=>this.factoryService.getProductModel(X)),W))))}getTax(){let a=localStorage.getItem("Domain"),c=localStorage.getItem("Token"),w=`https://${a}/API/V3/Tax`,V=new k.WM({authorization:"Bearer "+c,"content-type":"application/json","X-ClientId":"dealpos-app"});return this.http.get(w,{headers:V}).pipe((0,re.U)(W=>{if(W)return W.map(X=>this.factoryService.getTaxModel(X))}))}}return _.\u0275fac=function(a){return new(a||_)(e.LFG(ge.O),e.LFG(k.eN),e.LFG(Se))},_.\u0275prov=e.Yz7({token:_,factory:_.\u0275fac,providedIn:"root"}),_})();var Te=A(8076),ve=A(5686),fe=A(6731);const Ne=["input"];function De(_,y){if(1&_&&e._UZ(0,"img",10),2&_){const a=e.oxw().$implicit;e.Q6J("src",a.ImgUrl,e.LSH)}}function Be(_,y){if(1&_){const a=e.EpF();e.TgZ(0,"mat-option",8),e.NdJ("click",function(w){const W=e.CHM(a).$implicit;return e.oxw().changeDisplayName(W),w.stopPropagation()}),e.YNc(1,De,1,1,"img",9),e._uU(2),e.qZA()}if(2&_){const a=y.$implicit,c=e.oxw();e.Q6J("value",a),e.xp6(1),e.Q6J("ngIf",c.renderThumbnail&&a.ImgUrl),e.xp6(1),e.hij(" ",a.Value," ")}}let Ue=(()=>{class _{constructor(a,c){this.httpService=a,this.ngZone=c,this.offlineStorage=[],this.inputLock=!1,this.renderThumbnail=!1,this.onOffline=new e.vpe,this.onEnter=new e.vpe,this.onSelect=new e.vpe,this.onOptionSelect=new e.vpe,this.reset=new e.vpe,this.termControl=new $.NI(""),this.options=[],this.complete=!1,this.foundProduct=!1,this.propagateChange=w=>{},this.termControl.valueChanges.pipe((0,ve.b)(500)).subscribe(w=>{this.options=[],"object"==typeof w?(this.value=w.Key,this.clearOnSelect?this.clear():(this.termControl.setValue(w.Value),this.complete=!0),this.onSelect&&this.onSelect.emit(w.Key),this.options=[],"object"==typeof w&&(this.value=w.Key,this.clearOnSelect?this.clear():(this.termControl.setValue(w.Value),this.complete=!0),this.onOptionSelect)&&this.onOptionSelect.emit(JSON.stringify({Key:w.Key,Value:w.Value}))):"string"==typeof w&&w.length>0?w.length>2&&!this.inputLock&&this.search(w):this.clear()})}set display(a){this.input.nativeElement.value=a}get value(){return this._value}set value(a){this._value=a,this.propagateChange(this._value)}ngOnChanges(a){null!=a.ngModel&&null==a.ngModel.currentValue&&this.clear(),null!=a.display&&a.display.currentValue!=a.display.previousValue&&this.termControl.setValue(a.display.currentValue)}ngAfterViewInit(){}search(a){if(this.termControl.value.length>0){let c={};if(this.data&&(c=this.data),c.prefix=a,c.count=100,this.complete)this.complete=!1;else{let w=this.url,V=localStorage.getItem("Domain");V&&(w=`https://${V}${this.url}`),this.httpService.post(w,c).subscribe(W=>{this.options=W,this.foundProduct=this.options.length>0})}}else this.options=null}onblur(){setTimeout(()=>{},600)}changeDisplayName(a){this.input.nativeElement.value=a.Value}onKeydown(a){const c=a.key;"Enter"===c?(this.clearOnSelect&&this.clear(),!this.foundProduct&&this.termControl.value.length>0&&(this.onEnter.emit(this.termControl.value),a.stopPropagation()),null!=this.termControl.value&&(this.input.nativeElement.value=this.termControl.value.Value),this.foundProduct=!1):(this.inputLock&&("Backspace"===c?this.clear():this.validateInputLock()),this.complete=!1,this.reset.emit())}validateInputLock(){""==this.input.nativeElement.value||0==this.input.nativeElement.value.length?this.startInput=new Date:(new Date).getTime()-this.startInput.getTime()>500&&this.clear()}clear(){this.value=null,this.input.nativeElement.value=""}displayFn(a){return a&&a.Value}writeValue(a){}registerOnChange(a){this.propagateChange=a}registerOnTouched(){}}return _.\u0275fac=function(a){return new(a||_)(e.Y36(ge.O),e.Y36(e.R0b))},_.\u0275cmp=e.Xpm({type:_,selectors:[["autocomplete"]],viewQuery:function(a,c){if(1&a&&e.Gf(Ne,7),2&a){let w;e.iGM(w=e.CRH())&&(c.input=w.first)}},inputs:{placeholder:"placeholder",url:"url",clearOnSelect:"clearOnSelect",offlineStorage:"offlineStorage",inputLock:"inputLock",data:"data",renderThumbnail:"renderThumbnail",ngModel:"ngModel",displayText:"displayText",localStorage:"localStorage",_value:"_value",display:"display"},outputs:{onOffline:"onOffline",onEnter:"onEnter",onSelect:"onSelect",onOptionSelect:"onOptionSelect",reset:"reset"},features:[e._Bn([{provide:$.JU,useExisting:(0,e.Gpc)(()=>_),multi:!0}]),e.TTD],decls:9,vars:5,consts:[[1,"w-100"],[1,"form-label-group"],["id","input","type","text","matInput","",1,"form-control","text-black",3,"matAutocomplete","placeholder","formControl","paste","keydown","blur"],["input",""],["for","input"],["autoActiveFirstOption","true"],["autocomplete","matAutocomplete"],["class","option-autocomplete",3,"value","click",4,"ngFor","ngForOf"],[1,"option-autocomplete",3,"value","click"],["width","30","height","30",3,"src",4,"ngIf"],["width","30","height","30",3,"src"]],template:function(a,c){if(1&a&&(e.TgZ(0,"mat-form-field",0),e.TgZ(1,"div",1),e.TgZ(2,"input",2,3),e.NdJ("paste",function(V){return c.inputLock?V.preventDefault():""})("keydown",function(V){return c.onKeydown(V)})("blur",function(){return c.onblur()}),e.qZA(),e.TgZ(4,"label",4),e._uU(5),e.qZA(),e.qZA(),e.qZA(),e.TgZ(6,"mat-autocomplete",5,6),e.YNc(8,Be,3,3,"mat-option",7),e.qZA()),2&a){const w=e.MAs(7);e.xp6(2),e.s9C("placeholder",c.placeholder||""),e.Q6J("matAutocomplete",w)("formControl",c.termControl),e.xp6(3),e.Oqu(c.placeholder||""),e.xp6(3),e.Q6J("ngForOf",c.options)}},directives:[Te.ZL,$.Fj,$.JJ,$.oH,Te.XC,M.sg,fe.ey,M.O5],styles:["mat-option[_ngcontent-%COMP%]{font-size:12px}"]}),_})(),qe=(()=>{class _{}return _.\u0275fac=function(a){return new(a||_)},_.\u0275mod=e.oAB({type:_}),_.\u0275inj=e.cJS({imports:[[Te.Bb,M.ez,$.UX]]}),_})();var xe=A(1813);let Ge=(()=>{class _{constructor(a){this.elementRef=a,this.decimalPlaces=4,this.modifyValueOnWheel=!0,this.max="999999999999999.9999",this.min="-999999999999999.9999",this.propagateChange=w=>{},this.preventNegative=!1,this.numericElement=new xe(this.elementRef.nativeElement,null,{digitGroupSeparator:",",decimalCharacter:".",decimalPlaces:this.decimalPlaces,maximumValue:this.max,minimumValue:this.min,allowDecimalPadding:!1,showWarnings:!1})}set _max(a){a&&(this.max=a,this.updateNumericSettings())}set _min(a){a&&(this.min=a,this.updateNumericSettings())}ngOnInit(){""==this.percentage&&(this.max="100"),this.preventNegative&&(this.min="0.00"),this.updateNumericSettings()}updateNumericSettings(){const a={maximumValue:this.max,minimumValue:this.min,readOnly:this.isElementDisabled(),decimalPlaces:this.decimalPlaces,modifyValueOnWheel:this.modifyValueOnWheel};this.numericElement.update(a)}onKeyUp(){let a=this.numericElement.getNumber();this.propagateChange(a)}isElementDisabled(){let a=!1;return(!0===this.elementRef.nativeElement.readOnly||!0===this.elementRef.nativeElement.disabled)&&(a=!0),a}writeValue(a){null!=a&&this.numericElement.set(a)}registerOnChange(a){this.propagateChange=a}registerOnTouched(){}}return _.\u0275fac=function(a){return new(a||_)(e.Y36(e.SBq))},_.\u0275dir=e.lG2({type:_,selectors:[["","autoNum",""]],hostBindings:function(a,c){1&a&&e.NdJ("keyup",function(){return c.onKeyUp()})},inputs:{percentage:"percentage",preventNegative:"preventNegative",decimalPlaces:"decimalPlaces",modifyValueOnWheel:"modifyValueOnWheel",_max:["max","_max"],_min:["min","_min"]},features:[e._Bn([{provide:$.JU,useExisting:(0,e.Gpc)(()=>_),multi:!0}])]}),_})(),pe=(()=>{class _{constructor(a,c,w,V,W){this.dialogRef=a,this.barcodeService=c,this.productService=w,this.authenticationService=V,this.data=W,this.modalConfig=new U.O,this.variantName="",this.hasProductEdit=!0,this.hasPromotion=!1,this.destroy$=new b.xQ,this.variantName=W.variantName,this.qty=W.qty,this.customPrice=W.customPrice}ngOnInit(){this.getBarcodeConfig(),this.initModalConfig(),this.initProductUpdate(),this.initRoleProductEdit()}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}initRoleProductEdit(){let a=this.authenticationService.getRoles();this.hasProductEdit=-1!==a.findIndex(c=>"ProdE"==c)}initProductUpdate(){u.IsNotEmpty(this.data.variantId)&&this.getProductById(this.data.variantId).subscribe(a=>{this.product.setSelectedPromotion=this.data.promotion,this.hasPromotion=u.IsNotEmpty(this.data.promotion)})}getBarcodeConfig(){this.barcodeService.getBarcodeConfigState().pipe((0,s.R)(this.destroy$)).subscribe(a=>{a&&(this.paperFormat=a)})}initModalConfig(){this.modalConfig.title="Add New Product Barcode?",this.modalConfig.hideMoreButton=!0}onSelectProduct(a){this.getProductById(a).subscribe(c=>{this.customPrice=c.getUnitPrice,this.hasPromotion=!1,this.product.setSelectedPromotion=null})}getProductById(a){return this.productService.getProductById(a).pipe((0,ae.b)(c=>{this.product=c,this.getPromotionByProductID(a)}))}getPromotionByProductID(a){this.productService.getPromotionByProducID(a).subscribe(c=>{this.promotions=c})}onCustomPriceChange(a){this.customPrice=a}onSelectPromotion(a){a?(this.product.setSelectedPromotion=this.promotions.find(c=>c.getName==(null==a?void 0:a.getName)),this.customPrice=this.product.getUnitPrice,this.hasPromotion=u.IsNotEmpty(this.product.getSelectedPromotion)):(this.hasPromotion=!1,this.product.setSelectedPromotion=null)}onOk(){this.qty&&this.qty>0&&this.product&&this.dialogRef.close({customPrice:this.customPrice,product:this.product,quantity:this.qty})}onCancel(){this.dialogRef.close()}}return _.\u0275fac=function(a){return new(a||_)(e.Y36(Z.so),e.Y36(J),e.Y36(ke),e.Y36(E.$),e.Y36(Z.WI))},_.\u0275cmp=e.Xpm({type:_,selectors:[["app-form-add-variant"]],features:[e._Bn([M.JJ])],decls:24,vars:7,consts:[[3,"config","onOk","onCancel"],[1,"row"],["align","center",1,"col-sm-12","mt-3"],[2,"position","relative","width","100%"],[1,"w-100"],["placeholder","Name","url","/API/AC/GetVariantSuggestionByCodeNName",3,"display","onSelect"],[1,"form-label-group"],["id","qty","type","text","placeholder","Quantity","aria-label","width","autoNum","",1,"form-control",3,"ngModel","ngModelChange"],["for","qty"],[1,"pb-9"],["bindLabel","Name","bindValue","PromotionID","appendTo","body","placeholder","Select Promotion Price",1,"sticky-top","tall",3,"items","ngModel","change"],["placeholder","Price","aria-label","width","autoNum","",1,"form-control",3,"ngModel","readonly","ngModelChange"],["for","price"]],template:function(a,c){1&a&&(e.TgZ(0,"modal-material",0),e.NdJ("onOk",function(){return c.onOk()})("onCancel",function(){return c.onCancel()}),e.TgZ(1,"content"),e.TgZ(2,"div",1),e.TgZ(3,"div",2),e.TgZ(4,"table",3),e.TgZ(5,"tbody"),e.TgZ(6,"tr",4),e.TgZ(7,"td"),e.TgZ(8,"autocomplete",5),e.NdJ("onSelect",function(V){return c.onSelectProduct(V)}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(9,"tr",4),e.TgZ(10,"td"),e.TgZ(11,"div",6),e.TgZ(12,"input",7),e.NdJ("ngModelChange",function(V){return c.qty=V}),e.qZA(),e.TgZ(13,"label",8),e._uU(14,"Quantity"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(15,"tr",4),e.TgZ(16,"td",9),e.TgZ(17,"ng-select",10),e.NdJ("change",function(V){return c.onSelectPromotion(V)}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(18,"tr",4),e.TgZ(19,"td"),e.TgZ(20,"div",6),e.TgZ(21,"input",11),e.NdJ("ngModelChange",function(V){return c.onCustomPriceChange(V)}),e.qZA(),e.TgZ(22,"label",12),e._uU(23,"Price"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&a&&(e.Q6J("config",c.modalConfig),e.xp6(8),e.Q6J("display",c.variantName),e.xp6(4),e.Q6J("ngModel",c.qty),e.xp6(5),e.Q6J("items",c.promotions)("ngModel",null==c.product||null==c.product.getSelectedPromotion?null:c.product.getSelectedPromotion.getPromotionID),e.xp6(4),e.Q6J("ngModel",c.customPrice)("readonly",c.hasPromotion||!c.hasProductEdit))},directives:[G.M,Ue,$.Fj,Ge,$.JJ,$.On,K.w9],styles:[""]}),_})(),Ve=(()=>{class _{constructor(a,c){this.dialogRef=a,this.data=c,this.event=new e.vpe,this.modalConfig=new U.O}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig.title="Upload New Product Barcode?",this.modalConfig.hideMoreButton=!0}onOk(){this.dialogRef.close(this.files)}onCancel(){this.dialogRef.close()}onUploadFile(a){a&&(this.files=a.target.files)}}return _.\u0275fac=function(a){return new(a||_)(e.Y36(Z.so),e.Y36(Z.WI))},_.\u0275cmp=e.Xpm({type:_,selectors:[["app-form-upload-variant"]],outputs:{event:"event"},decls:15,vars:1,consts:[[3,"config","onOk","onCancel"],[1,"row"],[1,"col-sm-12"],["href","//res.cloudinary.com/pos/raw/upload/POS/CSV/Barcode_DealPOS.csv",2,"font-size","12px"],[1,"value-title"],["type","file","aria-label","upload",3,"change"]],template:function(a,c){1&a&&(e.TgZ(0,"modal-material",0),e.NdJ("onOk",function(){return c.onOk()})("onCancel",function(){return c.onCancel()}),e.TgZ(1,"content"),e.TgZ(2,"div",1),e.TgZ(3,"div",2),e.TgZ(4,"a",3),e._uU(5,"Download Sample CSV"),e.qZA(),e.TgZ(6,"table"),e.TgZ(7,"tbody"),e.TgZ(8,"tr"),e.TgZ(9,"th",4),e._uU(10,"CSV File"),e.qZA(),e.TgZ(11,"td"),e._uU(12,":"),e.qZA(),e.TgZ(13,"td"),e.TgZ(14,"input",5),e.NdJ("change",function(V){return c.onUploadFile(V)}),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&a&&e.Q6J("config",c.modalConfig)},directives:[G.M],styles:[""]}),_})();var Ae=A(8452);let je=(()=>{class _{constructor(a,c){this.httpService=a,this.factoryService=c}get(){let c=localStorage.getItem("Domain");return this.httpService.post(`https://${c}/api/v3/Outlet/p`,{Suspended:!1}).pipe((0,re.U)(w=>{let V=[];return w&&(V=w.map(W=>this.factoryService.getOutletModel(W))),V}))}}return _.\u0275fac=function(a){return new(a||_)(e.LFG(ge.O),e.LFG(Se))},_.\u0275prov=e.Yz7({token:_,factory:_.\u0275fac,providedIn:"root"}),_})(),ze=(()=>{class _{constructor(a,c){this.httpService=a,this.factoryService=c}get(a){let c=localStorage.getItem("Domain"),w=this.getEndPointByType(a.Type);return this.httpService.post(`https://${c}${w}`,{Outlet:a.Outlet,Number:a.Number}).pipe((0,re.U)(W=>W.map(X=>this.factoryService.getVariantModel(X))))}getEndPointByType(a){let c;return c=a===T.SUPPLIER_BILL?"/API/V3/Barcode/byBillNumber":"/API/V3/Barcode/byOutletDeliveryNumber",c}}return _.\u0275fac=function(a){return new(a||_)(e.LFG(ge.O),e.LFG(Se))},_.\u0275prov=e.Yz7({token:_,factory:_.\u0275fac,providedIn:"root"}),_})();function We(_,y){if(1&_){const a=e.EpF();e.TgZ(0,"tr",18),e.NdJ("click",function(){const w=e.CHM(a),V=w.$implicit,W=w.index;return e.oxw().onUpdateProduct(V,W)}),e.TgZ(1,"td"),e.TgZ(2,"i",19),e.NdJ("click",function(){const V=e.CHM(a).index;return e.oxw().onDeleteProduct(V)}),e.qZA(),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td",20),e._uU(6),e.qZA(),e.qZA()}if(2&_){const a=y.$implicit;e.xp6(4),e.AsE(" ",null==a||null==a.Variants[0]?null:a.Variants[0].getName,"- ",null==a||null==a.Variants[0]?null:a.Variants[0].getCode," - "),e.xp6(2),e.Oqu(null==a?null:a.Quantity)}}let Ke=(()=>{class _{constructor(a,c,w,V,W,X,se){this.dialog=a,this.productStateService=c,this.productService=w,this.toastService=V,this.queryParamService=W,this.outletService=X,this.billService=se,this.destroy$=new b.xQ,this.stickerTotal=0,this.productGroups=[],this.productSource=[],this.getRouteParam(),this.initOutlets()}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}getRouteParam(){this.queryParamService.getState().pipe((0,s.R)(this.destroy$),(0,F.h)(a=>u.IsEmpty(a))).subscribe(a=>{a.ID&&this.getProductById(a.ID,5),a.billNumber&&this.getBill({Number:a.billNumber,Outlet:a.outletName,Type:T.SUPPLIER_BILL})})}initOutlets(){this.outletService.get().pipe((0,s.R)(this.destroy$)).subscribe(a=>{this.outlets=a})}onAddBill(){this.dialog.open(de,{width:"350px",data:{outlets:this.outlets}}).afterClosed().pipe((0,s.R)(this.destroy$)).subscribe(a=>{a&&this.getBill(a)})}getBill(a){this.billService.get(a).pipe((0,s.R)(this.destroy$)).subscribe(c=>{c&&c.forEach(w=>{this.checkAvailableProductCode(w);let V=this.generateProductByQty(w,w.getQuantity);this.productGroups=[...this.productGroups,{VariantID:w.getVariantID,Quantity:w.getQuantity,Variants:V}],this.updateProductsSource()})})}onAddProduct(){this.dialog.open(pe,{width:"350px",data:{variantName:"",variantId:null,qty:null}}).afterClosed().pipe((0,s.R)(this.destroy$)).subscribe(a=>{a&&(this.customPrice=a.customPrice,this.generateProductBarcode(a.product,a.quantity))})}getProductById(a,c){this.productService.getProductById(a).pipe((0,s.R)(this.destroy$)).subscribe(w=>{w&&this.generateProductBarcode(w,c)})}generateProductBarcode(a,c){this.checkAvailableProductCode(a);let w=this.generateProductByQty(a,c);w=this.updateCustomPriceProducts(w),this.productGroups=[...this.productGroups,{VariantID:a.getID,Quantity:c,Variants:w}],this.updateProductsSource()}checkAvailableProductCode(a){a.getCode||this.toastService.error("Product has no code","Code Not Found")}onUpdateProduct(a,c){this.dialog.open(pe,{width:"350px",data:{variantName:a.Variants[0].getName+" - "+a.Variants[0].getCode,variantId:a.VariantID,qty:a.Quantity,customPrice:a.Variants[0].getCustomPrice,promotion:a.Variants[0].getSelectedPromotion}}).afterClosed().pipe((0,s.R)(this.destroy$)).subscribe(ce=>{if(ce){this.customPrice=ce.customPrice,this.checkAvailableProductCode(ce.product);let we=this.generateProductByQty(ce.product,ce.quantity);we=this.updateCustomPriceProducts(we),this.productGroups[c].Variants=we,this.productGroups[c].Quantity=ce.quantity,this.productGroups[c].VariantID=ce.product.getID,this.updateProductsSource()}})}onDeleteProduct(a){this.productGroups=this.productGroups.filter((c,w)=>w!==a),this.updateProductsSource()}updateProductsSource(){this.productSource=[],this.productGroups.forEach(a=>{this.productSource=[...this.productSource,...a.Variants]}),this.stickerTotal=this.productSource.length,this.productStateService.setState(this.productSource)}onUploadProduct(){this.dialog.open(Ve,{width:"350px"}).afterClosed().pipe((0,s.R)(this.destroy$)).subscribe(a=>{if(a){let c;this.productService.uploadProducts(a[0]).pipe((0,s.R)(this.destroy$)).subscribe(w=>{w&&(this.productGroups=[...this.productGroups,...w.map(V=>(c={Quantity:V.Quantity,VariantID:V.VariantID,Variants:V.Print},c))],this.updateProductsSource())})}})}updateCustomPriceProducts(a){let c=a;return this.customPrice&&(c=a.map(w=>(w.setCustomPrice=this.customPrice,w))),c}generateProductByQty(a,c){let w=[];for(let V=1;V<=c;V++)w.push(a);return w}onClear(){this.productGroups=[],this.updateProductsSource()}onPrint(){window.print()}}return _.\u0275fac=function(a){return new(a||_)(e.Y36(Z.uw),e.Y36(O),e.Y36(ke),e.Y36(Ae._W),e.Y36(L.U),e.Y36(je),e.Y36(ze))},_.\u0275cmp=e.Xpm({type:_,selectors:[["app-list-products"]],decls:29,vars:2,consts:[[1,"card","mt-3","sticky-top"],[1,"card-header","d-flex","justify-content-between","align-items-center","bg-white","pb-5",2,"border","none"],[1,"fw-light","m-1"],[1,"ms-1","fst-italic","text-info","d-block","mt-1"],[1,"btn-group"],["type","button",1,"btn-md","btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa","fa-cart-plus"],["aria-hidden","true",1,"fa","fa-plus"],["aria-hidden","true",1,"fa","fa-upload"],[1,"card-body","py-0"],[1,"table","table-borderless","table-fixed"],[1,"table-light","lh-1"],["scope","col"],["scope","col",1,"text-end"],[3,"click",4,"ngFor","ngForOf"],[1,"card-footer","d-flex","justify-content-end","bg-white","py-8"],[1,"btn","btn-xl","btn-outline-secondary","ms-5",3,"click"],[1,"btn","btn-xl","btn-success","ms-5",3,"click"],[3,"click"],["aria-hidden","true",1,"fa","fa-times",2,"color","#fb404b !important","cursor","pointer",3,"click"],[1,"text-end"]],template:function(a,c){1&a&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"h1",2),e._uU(3," Products "),e.TgZ(4,"small",3),e._uU(5),e.qZA(),e.qZA(),e.TgZ(6,"div",4),e.TgZ(7,"button",5),e.NdJ("click",function(){return c.onAddBill()}),e._UZ(8,"i",6),e.qZA(),e.TgZ(9,"button",5),e.NdJ("click",function(){return c.onAddProduct()}),e._UZ(10,"i",7),e.qZA(),e.TgZ(11,"button",5),e.NdJ("click",function(){return c.onUploadProduct()}),e._UZ(12,"i",8),e.qZA(),e.qZA(),e.qZA(),e.TgZ(13,"div",9),e.TgZ(14,"table",10),e.TgZ(15,"thead",11),e.TgZ(16,"tr"),e._UZ(17,"th",12),e.TgZ(18,"th",12),e._uU(19,"NAME"),e.qZA(),e.TgZ(20,"th",13),e._uU(21,"QTY"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(22,"tbody"),e.YNc(23,We,7,3,"tr",14),e.qZA(),e.qZA(),e.qZA(),e.TgZ(24,"div",15),e.TgZ(25,"a",16),e.NdJ("click",function(){return c.onClear()}),e._uU(26,"Clear"),e.qZA(),e.TgZ(27,"a",17),e.NdJ("click",function(){return c.onPrint()}),e._uU(28,"Print"),e.qZA(),e.qZA(),e.qZA()),2&a&&(e.xp6(5),e.hij("( ",0===c.stickerTotal?"":c.stickerTotal," stickers )"),e.xp6(18),e.Q6J("ngForOf",c.productGroups))},directives:[M.sg],styles:["td[_ngcontent-%COMP%]{font-size:12px}th[_ngcontent-%COMP%]{font-size:12px}.btn[_ngcontent-%COMP%]{font-size:14px!important}"]}),_})();var o=A(7497),h=A(348);let C=(()=>{class _{constructor(){this._listeners=[]}notify(a,c){for(let w of this._listeners)w(a,c)}listen(a){return this._listeners.push(a),()=>{this._listeners=this._listeners.filter(c=>a!==c)}}ngOnDestroy(){this._listeners=[]}}return _.\u0275fac=function(a){return new(a||_)},_.\u0275prov=e.Yz7({token:_,factory:_.\u0275fac,providedIn:"root"}),_})();var q=A(9555);const v=["input"],D=function(_){return{enterDuration:_}},R=["*"],B=new e.OlP("mat-radio-default-options",{providedIn:"root",factory:function(){return{color:"accent"}}});let z=0;const ee={provide:$.JU,useExisting:(0,e.Gpc)(()=>ye),multi:!0};class ie{constructor(y,a){this.source=y,this.value=a}}const ue=new e.OlP("MatRadioGroup");let oe=(()=>{class _{constructor(a){this._changeDetector=a,this._value=null,this._name="mat-radio-group-"+z++,this._selected=null,this._isInitialized=!1,this._labelPosition="after",this._disabled=!1,this._required=!1,this._controlValueAccessorChangeFn=()=>{},this.onTouched=()=>{},this.change=new e.vpe}get name(){return this._name}set name(a){this._name=a,this._updateRadioButtonNames()}get labelPosition(){return this._labelPosition}set labelPosition(a){this._labelPosition="before"===a?"before":"after",this._markRadiosForCheck()}get value(){return this._value}set value(a){this._value!==a&&(this._value=a,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())}_checkSelectedRadioButton(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)}get selected(){return this._selected}set selected(a){this._selected=a,this.value=a?a.value:null,this._checkSelectedRadioButton()}get disabled(){return this._disabled}set disabled(a){this._disabled=(0,h.Ig)(a),this._markRadiosForCheck()}get required(){return this._required}set required(a){this._required=(0,h.Ig)(a),this._markRadiosForCheck()}ngAfterContentInit(){this._isInitialized=!0}_touch(){this.onTouched&&this.onTouched()}_updateRadioButtonNames(){this._radios&&this._radios.forEach(a=>{a.name=this.name,a._markForCheck()})}_updateSelectedRadioFromValue(){this._radios&&(null===this._selected||this._selected.value!==this._value)&&(this._selected=null,this._radios.forEach(c=>{c.checked=this.value===c.value,c.checked&&(this._selected=c)}))}_emitChangeEvent(){this._isInitialized&&this.change.emit(new ie(this._selected,this._value))}_markRadiosForCheck(){this._radios&&this._radios.forEach(a=>a._markForCheck())}writeValue(a){this.value=a,this._changeDetector.markForCheck()}registerOnChange(a){this._controlValueAccessorChangeFn=a}registerOnTouched(a){this.onTouched=a}setDisabledState(a){this.disabled=a,this._changeDetector.markForCheck()}}return _.\u0275fac=function(a){return new(a||_)(e.Y36(e.sBO))},_.\u0275dir=e.lG2({type:_,inputs:{color:"color",name:"name",labelPosition:"labelPosition",value:"value",selected:"selected",disabled:"disabled",required:"required"},outputs:{change:"change"}}),_})(),ye=(()=>{class _ extends oe{}return _.\u0275fac=function(){let y;return function(c){return(y||(y=e.n5z(_)))(c||_)}}(),_.\u0275dir=e.lG2({type:_,selectors:[["mat-radio-group"]],contentQueries:function(a,c,w){if(1&a&&e.Suo(w,Ze,5),2&a){let V;e.iGM(V=e.CRH())&&(c._radios=V)}},hostAttrs:["role","radiogroup",1,"mat-radio-group"],exportAs:["matRadioGroup"],features:[e._Bn([ee,{provide:ue,useExisting:_}]),e.qOj]}),_})();class Fe{constructor(y){this._elementRef=y}}const Re=(0,fe.Kr)((0,fe.sb)(Fe));let He=(()=>{class _ extends Re{constructor(a,c,w,V,W,X,se,ne){super(c),this._changeDetector=w,this._focusMonitor=V,this._radioDispatcher=W,this._providerOverride=se,this._uniqueId="mat-radio-"+ ++z,this.id=this._uniqueId,this.change=new e.vpe,this._checked=!1,this._value=null,this._removeUniqueSelectionListener=()=>{},this.radioGroup=a,this._noopAnimations="NoopAnimations"===X,ne&&(this.tabIndex=(0,h.su)(ne,0)),this._removeUniqueSelectionListener=W.listen((he,ce)=>{he!==this.id&&ce===this.name&&(this.checked=!1)})}get checked(){return this._checked}set checked(a){const c=(0,h.Ig)(a);this._checked!==c&&(this._checked=c,c&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!c&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),c&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}get value(){return this._value}set value(a){this._value!==a&&(this._value=a,null!==this.radioGroup&&(this.checked||(this.checked=this.radioGroup.value===a),this.checked&&(this.radioGroup.selected=this)))}get labelPosition(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"}set labelPosition(a){this._labelPosition=a}get disabled(){return this._disabled||null!==this.radioGroup&&this.radioGroup.disabled}set disabled(a){this._setDisabled((0,h.Ig)(a))}get required(){return this._required||this.radioGroup&&this.radioGroup.required}set required(a){this._required=(0,h.Ig)(a)}get color(){return this._color||this.radioGroup&&this.radioGroup.color||this._providerOverride&&this._providerOverride.color||"accent"}set color(a){this._color=a}get inputId(){return`${this.id||this._uniqueId}-input`}focus(a,c){c?this._focusMonitor.focusVia(this._inputElement,c,a):this._inputElement.nativeElement.focus(a)}_markForCheck(){this._changeDetector.markForCheck()}ngOnInit(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.checked&&(this.radioGroup.selected=this),this.name=this.radioGroup.name)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(a=>{!a&&this.radioGroup&&this.radioGroup._touch()})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}_emitChangeEvent(){this.change.emit(new ie(this,this._value))}_isRippleDisabled(){return this.disableRipple||this.disabled}_onInputClick(a){a.stopPropagation()}_onInputInteraction(a){if(a.stopPropagation(),!this.checked&&!this.disabled){const c=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),c&&this.radioGroup._emitChangeEvent())}}_setDisabled(a){this._disabled!==a&&(this._disabled=a,this._changeDetector.markForCheck())}}return _.\u0275fac=function(a){e.$Z()},_.\u0275dir=e.lG2({type:_,viewQuery:function(a,c){if(1&a&&e.Gf(v,5),2&a){let w;e.iGM(w=e.CRH())&&(c._inputElement=w.first)}},inputs:{id:"id",name:"name",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],checked:"checked",value:"value",labelPosition:"labelPosition",disabled:"disabled",required:"required",color:"color"},outputs:{change:"change"},features:[e.qOj]}),_})(),Ze=(()=>{class _ extends He{constructor(a,c,w,V,W,X,se,ne){super(a,c,w,V,W,X,se,ne)}}return _.\u0275fac=function(a){return new(a||_)(e.Y36(ue,8),e.Y36(e.SBq),e.Y36(e.sBO),e.Y36(o.tE),e.Y36(C),e.Y36(q.Qb,8),e.Y36(B,8),e.$8M("tabindex"))},_.\u0275cmp=e.Xpm({type:_,selectors:[["mat-radio-button"]],hostAttrs:[1,"mat-radio-button"],hostVars:17,hostBindings:function(a,c){1&a&&e.NdJ("focus",function(){return c._inputElement.nativeElement.focus()}),2&a&&(e.uIk("tabindex",null)("id",c.id)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),e.ekj("mat-radio-checked",c.checked)("mat-radio-disabled",c.disabled)("_mat-animation-noopable",c._noopAnimations)("mat-primary","primary"===c.color)("mat-accent","accent"===c.color)("mat-warn","warn"===c.color))},inputs:{disableRipple:"disableRipple",tabIndex:"tabIndex"},exportAs:["matRadioButton"],features:[e.qOj],ngContentSelectors:R,decls:13,vars:20,consts:[[1,"mat-radio-label"],["label",""],[1,"mat-radio-container"],[1,"mat-radio-outer-circle"],[1,"mat-radio-inner-circle"],["type","radio",1,"mat-radio-input","cdk-visually-hidden",3,"id","checked","disabled","tabIndex","required","change","click"],["input",""],["mat-ripple","",1,"mat-radio-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered","matRippleRadius","matRippleAnimation"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[1,"mat-radio-label-content"],[2,"display","none"]],template:function(a,c){if(1&a&&(e.F$t(),e.TgZ(0,"label",0,1),e.TgZ(2,"span",2),e._UZ(3,"span",3),e._UZ(4,"span",4),e.TgZ(5,"input",5,6),e.NdJ("change",function(V){return c._onInputInteraction(V)})("click",function(V){return c._onInputClick(V)}),e.qZA(),e.TgZ(7,"span",7),e._UZ(8,"span",8),e.qZA(),e.qZA(),e.TgZ(9,"span",9),e.TgZ(10,"span",10),e._uU(11,"\xa0"),e.qZA(),e.Hsn(12),e.qZA(),e.qZA()),2&a){const w=e.MAs(1);e.uIk("for",c.inputId),e.xp6(5),e.Q6J("id",c.inputId)("checked",c.checked)("disabled",c.disabled)("tabIndex",c.tabIndex)("required",c.required),e.uIk("name",c.name)("value",c.value)("aria-label",c.ariaLabel)("aria-labelledby",c.ariaLabelledby)("aria-describedby",c.ariaDescribedby),e.xp6(2),e.Q6J("matRippleTrigger",w)("matRippleDisabled",c._isRippleDisabled())("matRippleCentered",!0)("matRippleRadius",20)("matRippleAnimation",e.VKq(18,D,c._noopAnimations?0:150)),e.xp6(2),e.ekj("mat-radio-label-before","before"==c.labelPosition)}},directives:[fe.wG],styles:[".mat-radio-button{display:inline-block;-webkit-tap-highlight-color:transparent;outline:0}.mat-radio-label{-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap;vertical-align:middle;width:100%}.mat-radio-container{box-sizing:border-box;display:inline-block;position:relative;width:20px;height:20px;flex-shrink:0}.mat-radio-outer-circle{box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;transition:border-color ease 280ms;width:20px;border-width:2px;border-style:solid;border-radius:50%}._mat-animation-noopable .mat-radio-outer-circle{transition:none}.mat-radio-inner-circle{border-radius:50%;box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;opacity:0;transition:transform ease 280ms,background-color ease 280ms,opacity linear 1ms 280ms;width:20px;transform:scale(0.001);-webkit-print-color-adjust:exact;color-adjust:exact}.mat-radio-checked .mat-radio-inner-circle{transform:scale(0.5);opacity:1;transition:transform ease 280ms,background-color ease 280ms}.cdk-high-contrast-active .mat-radio-checked .mat-radio-inner-circle{border:solid 10px}._mat-animation-noopable .mat-radio-inner-circle{transition:none}.mat-radio-label-content{-webkit-user-select:auto;-moz-user-select:auto;user-select:auto;display:inline-block;order:0;line-height:inherit;padding-left:8px;padding-right:0}[dir=rtl] .mat-radio-label-content{padding-right:8px;padding-left:0}.mat-radio-label-content.mat-radio-label-before{order:-1;padding-left:0;padding-right:8px}[dir=rtl] .mat-radio-label-content.mat-radio-label-before{padding-right:0;padding-left:8px}.mat-radio-disabled,.mat-radio-disabled .mat-radio-label{cursor:default}.mat-radio-button .mat-radio-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-radio-button .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple){opacity:.16}.mat-radio-persistent-ripple{width:100%;height:100%;transform:none;top:0;left:0}.mat-radio-container:hover .mat-radio-persistent-ripple{opacity:.04}.mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-persistent-ripple,.mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-persistent-ripple{opacity:.12}.mat-radio-persistent-ripple,.mat-radio-disabled .mat-radio-container:hover .mat-radio-persistent-ripple{opacity:0}@media(hover: none){.mat-radio-container:hover .mat-radio-persistent-ripple{display:none}}.mat-radio-input{bottom:0;left:50%}.cdk-high-contrast-active .mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-ripple,.cdk-high-contrast-active .mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-ripple{outline:solid 3px}.cdk-high-contrast-active .mat-radio-disabled{opacity:.5}\n"],encapsulation:2,changeDetection:0}),_})(),_e=(()=>{class _{}return _.\u0275fac=function(a){return new(a||_)},_.\u0275mod=e.oAB({type:_}),_.\u0275inj=e.cJS({imports:[[fe.si,fe.BQ],fe.BQ]}),_})();function be(_,y){if(1&_){const a=e.EpF();e.TgZ(0,"tr"),e.TgZ(1,"td"),e._uU(2,"Selected Tax"),e.qZA(),e.TgZ(3,"td"),e.TgZ(4,"ng-select",28),e.NdJ("ngModelChange",function(w){return e.CHM(a),e.oxw().taxOptionSelected=w})("change",function(){return e.CHM(a),e.oxw().onSelectTaxType()}),e.qZA(),e.qZA(),e.TgZ(5,"td"),e.TgZ(6,"span"),e._uU(7,"Applied Tax ex: 100 + 10% = 110"),e.qZA(),e.qZA(),e.qZA()}if(2&_){const a=e.oxw();e.xp6(4),e.Q6J("items",a.taxOptions)("ngModel",a.taxOptionSelected)("clearable",!1)}}const me=function(_){return{active:_}};let Pe=(()=>{class _{constructor(a,c){this.dialogRef=a,this.data=c,this.event=new e.vpe,this.modalConfig=new U.O,this.taxOptions=[],this.paperWidth=0,this.marginTop=0,this.marginLeft=0,this.stickerWidth=0,this.stickerHeight=0,this.barcodeHeight=0,this.spacingColumn=0,this.spacingRow=0,this.barcode=!0,this.code=!0,this.price=!0,this.name=!0,this.removeDefault=!0,this.desc=!0,this.priceTax=!0,this.fontSize=0,this.namePrefix="",this.maxChar=0,this.publiclineHeight=0,this.paperFormat=JSON.parse(JSON.stringify(c.paperFormat)),this.taxs=c.taxs,this.authTax=c.authTax,this.initTaxOptions(),this.activeTab="paper"}ngOnInit(){this.initModalConfig(),this.initFormValue(),this.authTax&&this.initTaxOptionSelected()}initTaxOptions(){this.taxOptions=[],this.taxs.forEach((a,c)=>{this.taxOptions=[...this.taxOptions,{id:c+1,name:a.getName,ID:a.getID}]})}initTaxOptionSelected(){this.taxSelected&&(this.taxOptionSelected=this.taxOptions.find(a=>a.ID===this.taxSelected.ID))}onSelectTaxType(){this.taxSelected=this.taxs.find(a=>a.getID===this.taxOptionSelected.ID)}initModalConfig(){this.modalConfig.title="Sticker Configuration",this.modalConfig.hideMoreButton=!0}onOk(){this.setPaperFormat(),this.dialogRef.close(this.paperFormat)}onCancel(){this.dialogRef.close()}initFormValue(){this.paperFormat&&(this.barcodeHeight=this.paperFormat.BarcodeHeight,this.paperWidth=this.paperFormat.PaperWidth,this.marginTop=this.paperFormat.MarginTop,this.marginLeft=this.paperFormat.MarginLeft,this.stickerWidth=this.paperFormat.StickerWidth,this.stickerHeight=this.paperFormat.StickerHeight,this.barcodeHeight=this.paperFormat.BarcodeHeight,this.spacingColumn=this.paperFormat.ColumnSpacing,this.spacingRow=this.paperFormat.RowSpacing,this.barcode=this.paperFormat.BarcodeVisible,this.code=this.paperFormat.CodeVisible,this.price=this.paperFormat.PriceVisible,this.name=this.paperFormat.NameVisible,this.desc=this.paperFormat.DescriptionAsCode,this.fontSize=this.paperFormat.ProductNameFontSize,this.namePrefix=this.paperFormat.ProductNamePrefix,this.maxChar=this.paperFormat.ProductNameMaxLength,this.lineHeight=this.paperFormat.LineHeight,this.priceTax=this.paperFormat.PriceWithTax,this.taxSelected=this.paperFormat.TaxType,this.storeName=this.paperFormat.StoreName,this.currencySymbol=this.paperFormat.CurrencySymbol,this.promotionPriceLabel=this.paperFormat.PromotionPriceLabel,this.basicPriceLabel=this.paperFormat.BasicPriceLabel)}setPaperFormat(){this.paperFormat&&(this.checkPriceWithTax(),this.paperFormat.BarcodeHeight=this.barcodeHeight,this.paperFormat.PaperWidth=this.paperWidth,this.paperFormat.MarginTop=this.marginTop,this.paperFormat.MarginLeft=this.marginLeft,this.paperFormat.StickerWidth=this.stickerWidth,this.paperFormat.StickerHeight=this.stickerHeight,this.paperFormat.BarcodeHeight=this.barcodeHeight,this.paperFormat.ColumnSpacing=this.spacingColumn,this.paperFormat.RowSpacing=this.spacingRow,this.paperFormat.BarcodeVisible=this.barcode,this.paperFormat.CodeVisible=this.code,this.paperFormat.PriceVisible=this.price,this.paperFormat.NameVisible=this.name,this.paperFormat.DescriptionAsCode=this.desc,this.paperFormat.ProductNameFontSize=this.fontSize,this.paperFormat.ProductNamePrefix=this.namePrefix,this.paperFormat.ProductNameMaxLength=this.maxChar,this.paperFormat.LineHeight=this.lineHeight,this.paperFormat.PriceWithTax=this.priceTax,this.paperFormat.TaxType=this.taxSelected,this.paperFormat.StoreName=this.storeName,this.paperFormat.CurrencySymbol=this.currencySymbol,this.paperFormat.PromotionPriceLabel=this.promotionPriceLabel,this.paperFormat.BasicPriceLabel=this.basicPriceLabel)}checkPriceWithTax(){this.priceTax||(this.taxSelected=this.taxs.find(a=>"No Tax"==a.getLabel))}dataTarget(a){this.activeTab=a}}return _.\u0275fac=function(a){return new(a||_)(e.Y36(Z.so),e.Y36(Z.WI))},_.\u0275cmp=e.Xpm({type:_,selectors:[["app-form-settings"]],outputs:{event:"event"},decls:283,vars:68,consts:[[3,"config","onOk","onCancel"],["container",""],["id","myTab","role","tablist",1,"nav","nav-tabs"],["tabs",""],[1,"nav-item"],["data-bs-toggle","tab",1,"nav-link",3,"ngClass","click"],["id","spacing-tab","data-bs-toggle","tab","data-bs-target","'#spacing'","role","tab","aria-selected","true",1,"nav-link",3,"ngClass","click"],["id","dua-tab","data-bs-toggle","tab","data-bs-target","'#sticker-content'","role","tab","aria-selected","true",1,"nav-link",3,"ngClass","click"],["id","price-tab","data-bs-toggle","tab","data-bs-target","'#price'","role","tab","aria-selected","true",1,"nav-link",3,"ngClass","click"],["id","advanced-tab","data-bs-toggle","tab","data-bs-target","'#advanced'","role","tab","aria-selected","true",1,"nav-link",3,"ngClass","click"],["id","promotionLabel-tab","data-bs-toggle","tab","data-bs-target","'#promotionLabel'","role","tab","aria-selected","true",1,"nav-link",3,"ngClass","click"],[1,"tab-content","border","bg-white"],["id","paper",1,"tab-pane","mt-0",3,"ngClass"],[1,"table","table-bordered","w-100"],[1,"input-group"],["type","number","aria-label","width",1,"form-control",3,"ngModel","ngModelChange"],[1,"input-group-append"],[1,"input-group-text"],["id","spacing",1,"tab-pane","mt-0",3,"ngClass"],["id","sticker-content",1,"tab-pane","mt-0",3,"ngClass"],["aria-label","Select an option","color","primary"],["value","false",3,"checked","change"],["value","true",1,"ms-4",3,"checked","change"],["id","price",1,"tab-pane","mt-0",3,"ngClass"],[4,"ngIf"],["type","text","aria-label","width",1,"form-control",3,"ngModel","ngModelChange"],["id","advanced",1,"tab-pane","mt-0",3,"ngClass"],["id","promotionLabel",1,"tab-pane","mt-0",3,"ngClass"],["appendTo","body","bindLabel","name","placeholder","Select Column",1,"sticky-top",3,"items","ngModel","clearable","ngModelChange","change"]],template:function(a,c){1&a&&(e.TgZ(0,"modal-material",0),e.NdJ("onOk",function(){return c.onOk()})("onCancel",function(){return c.onCancel()}),e.TgZ(1,"content"),e.TgZ(2,"div",1),e.TgZ(3,"ul",2,3),e.TgZ(5,"li",4),e.TgZ(6,"a",5),e.NdJ("click",function(){return c.dataTarget("paper")}),e._uU(7,"Paper"),e.qZA(),e.qZA(),e.TgZ(8,"li",4),e.TgZ(9,"a",6),e.NdJ("click",function(){return c.dataTarget("spacing")}),e._uU(10,"Spacing"),e.qZA(),e.qZA(),e.TgZ(11,"li",4),e.TgZ(12,"a",7),e.NdJ("click",function(){return c.dataTarget("sticker-content")}),e._uU(13,"Sticker Content"),e.qZA(),e.qZA(),e.TgZ(14,"li",4),e.TgZ(15,"a",8),e.NdJ("click",function(){return c.dataTarget("price")}),e._uU(16,"Price"),e.qZA(),e.qZA(),e.TgZ(17,"li",4),e.TgZ(18,"a",9),e.NdJ("click",function(){return c.dataTarget("advanced")}),e._uU(19,"Advanced"),e.qZA(),e.qZA(),e.TgZ(20,"li",4),e.TgZ(21,"a",10),e.NdJ("click",function(){return c.dataTarget("promotionLabel")}),e._uU(22,"Label"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(23,"div",11),e.TgZ(24,"div",12),e.TgZ(25,"table",13),e.TgZ(26,"tr"),e.TgZ(27,"td"),e._uU(28,"Paper Width"),e.qZA(),e.TgZ(29,"td"),e.TgZ(30,"div",14),e.TgZ(31,"input",15),e.NdJ("ngModelChange",function(V){return c.paperWidth=V}),e.qZA(),e.TgZ(32,"div",16),e.TgZ(33,"span",17),e._uU(34,"px"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(35,"td"),e.TgZ(36,"span"),e._uU(37,"The width of the paper"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(38,"tr"),e.TgZ(39,"td"),e._uU(40,"Sticker Width"),e.qZA(),e.TgZ(41,"td"),e.TgZ(42,"div",14),e.TgZ(43,"input",15),e.NdJ("ngModelChange",function(V){return c.stickerWidth=V}),e.qZA(),e.TgZ(44,"div",16),e.TgZ(45,"span",17),e._uU(46,"px"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(47,"td"),e.TgZ(48,"span"),e._uU(49,"The width of the sticker"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(50,"tr"),e.TgZ(51,"td"),e._uU(52,"Sticker Height"),e.qZA(),e.TgZ(53,"td"),e.TgZ(54,"div",14),e.TgZ(55,"input",15),e.NdJ("ngModelChange",function(V){return c.stickerHeight=V}),e.qZA(),e.TgZ(56,"div",16),e.TgZ(57,"span",17),e._uU(58,"px"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(59,"td"),e.TgZ(60,"span"),e._uU(61,"The height of the sticker"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(62,"div",18),e.TgZ(63,"table",13),e.TgZ(64,"tr"),e.TgZ(65,"td"),e._uU(66,"Left Indent"),e.qZA(),e.TgZ(67,"td"),e.TgZ(68,"div",14),e.TgZ(69,"input",15),e.NdJ("ngModelChange",function(V){return c.marginLeft=V}),e.qZA(),e.TgZ(70,"div",16),e.TgZ(71,"span",17),e._uU(72,"px"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(73,"td"),e.TgZ(74,"span"),e._uU(75,"The number of pixels appended before the first COLUMN"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(76,"tr"),e.TgZ(77,"td"),e._uU(78,"Top Indent"),e.qZA(),e.TgZ(79,"td"),e.TgZ(80,"div",14),e.TgZ(81,"input",15),e.NdJ("ngModelChange",function(V){return c.marginTop=V}),e.qZA(),e.TgZ(82,"div",16),e.TgZ(83,"span",17),e._uU(84,"px"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(85,"td"),e.TgZ(86,"span"),e._uU(87,"The number of pixels appended before the first ROW"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(88,"tr"),e.TgZ(89,"td"),e._uU(90,"Row Spacing"),e.qZA(),e.TgZ(91,"td"),e.TgZ(92,"div",14),e.TgZ(93,"input",15),e.NdJ("ngModelChange",function(V){return c.spacingRow=V}),e.qZA(),e.TgZ(94,"div",16),e.TgZ(95,"span",17),e._uU(96,"px"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(97,"td"),e.TgZ(98,"span"),e._uU(99,"The number of pixels between each ROW"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(100,"tr"),e.TgZ(101,"td"),e._uU(102,"Column Spacing"),e.qZA(),e.TgZ(103,"td"),e.TgZ(104,"div",14),e.TgZ(105,"input",15),e.NdJ("ngModelChange",function(V){return c.spacingColumn=V}),e.qZA(),e.TgZ(106,"div",16),e.TgZ(107,"span",17),e._uU(108,"px"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(109,"td"),e.TgZ(110,"span"),e._uU(111,"The number of pixels between each COLUMN"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(112,"div",19),e.TgZ(113,"table",13),e.TgZ(114,"tr"),e.TgZ(115,"td"),e._uU(116,"Barcode Height"),e.qZA(),e.TgZ(117,"td"),e.TgZ(118,"div",14),e.TgZ(119,"input",15),e.NdJ("ngModelChange",function(V){return c.barcodeHeight=V}),e.qZA(),e.TgZ(120,"div",16),e.TgZ(121,"span",17),e._uU(122,"px"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(123,"td"),e.TgZ(124,"span"),e._uU(125,"The height of the generated barcode in pixels"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(126,"tr"),e.TgZ(127,"td"),e._uU(128,"Font Size"),e.qZA(),e.TgZ(129,"td"),e.TgZ(130,"div",14),e.TgZ(131,"input",15),e.NdJ("ngModelChange",function(V){return c.fontSize=V}),e.qZA(),e.TgZ(132,"div",16),e.TgZ(133,"span",17),e._uU(134,"px"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(135,"td"),e.TgZ(136,"span"),e._uU(137,"Change all font size (include price)"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(138,"tr"),e.TgZ(139,"td"),e._uU(140,"Barcode"),e.qZA(),e.TgZ(141,"td"),e.TgZ(142,"mat-radio-group",20),e.TgZ(143,"mat-radio-button",21),e.NdJ("change",function(){return c.barcode=!1}),e._uU(144,"No "),e.qZA(),e.TgZ(145,"mat-radio-button",22),e.NdJ("change",function(){return c.barcode=!0}),e._uU(146,"Yes"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(147,"td"),e.TgZ(148,"span"),e._uU(149,"Whether barcode is visible"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(150,"tr"),e.TgZ(151,"td"),e._uU(152,"Code"),e.qZA(),e.TgZ(153,"td"),e.TgZ(154,"mat-radio-group",20),e.TgZ(155,"mat-radio-button",21),e.NdJ("change",function(){return c.code=!1}),e._uU(156,"No "),e.qZA(),e.TgZ(157,"mat-radio-button",22),e.NdJ("change",function(){return c.code=!0}),e._uU(158,"Yes"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(159,"td"),e.TgZ(160,"span"),e._uU(161,"Whether variant code is visible"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(162,"tr"),e.TgZ(163,"td"),e._uU(164,"Price"),e.qZA(),e.TgZ(165,"td"),e.TgZ(166,"mat-radio-group",20),e.TgZ(167,"mat-radio-button",21),e.NdJ("change",function(){return c.price=!1}),e._uU(168,"No "),e.qZA(),e.TgZ(169,"mat-radio-button",22),e.NdJ("change",function(){return c.price=!0}),e._uU(170,"Yes"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(171,"td"),e.TgZ(172,"span"),e._uU(173,"Whether variant price is visible"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(174,"tr"),e.TgZ(175,"td"),e._uU(176,"Name"),e.qZA(),e.TgZ(177,"td"),e.TgZ(178,"mat-radio-group",20),e.TgZ(179,"mat-radio-button",21),e.NdJ("change",function(){return c.name=!1}),e._uU(180,"No "),e.qZA(),e.TgZ(181,"mat-radio-button",22),e.NdJ("change",function(){return c.name=!0}),e._uU(182,"Yes"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(183,"td"),e.TgZ(184,"span"),e._uU(185,"Whether variant name is visible"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(186,"div",23),e.TgZ(187,"table",13),e.TgZ(188,"tr"),e.TgZ(189,"td"),e._uU(190,"Price with Tax"),e.qZA(),e.TgZ(191,"td"),e.TgZ(192,"mat-radio-group",20),e.TgZ(193,"mat-radio-button",21),e.NdJ("change",function(){return c.priceTax=!1}),e._uU(194," No"),e.qZA(),e.TgZ(195,"mat-radio-button",22),e.NdJ("change",function(){return c.priceTax=!0}),e._uU(196,"Yes"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(197,"td"),e.TgZ(198,"span"),e._uU(199),e.qZA(),e.qZA(),e.qZA(),e.YNc(200,be,8,3,"tr",24),e.TgZ(201,"tr"),e.TgZ(202,"td"),e._uU(203,"Currency"),e.qZA(),e.TgZ(204,"td"),e.TgZ(205,"div",14),e.TgZ(206,"input",25),e.NdJ("ngModelChange",function(V){return c.currencySymbol=V}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(207,"td"),e.TgZ(208,"span"),e._uU(209,"The default currency"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(210,"div",26),e.TgZ(211,"table",13),e.TgZ(212,"tr"),e.TgZ(213,"td"),e._uU(214,"Max Character"),e.qZA(),e.TgZ(215,"td"),e.TgZ(216,"div",14),e.TgZ(217,"input",15),e.NdJ("ngModelChange",function(V){return c.maxChar=V}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(218,"td"),e.TgZ(219,"span"),e._uU(220,"The max character of the product name"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(221,"tr"),e.TgZ(222,"td"),e._uU(223,"Name Prefix"),e.qZA(),e.TgZ(224,"td"),e.TgZ(225,"div",14),e.TgZ(226,"input",25),e.NdJ("ngModelChange",function(V){return c.namePrefix=V}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(227,"td"),e.TgZ(228,"span"),e._uU(229,"A word, letter, or number placed before product name"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(230,"tr"),e.TgZ(231,"td"),e._uU(232,"Store Name"),e.qZA(),e.TgZ(233,"td"),e.TgZ(234,"div",14),e.TgZ(235,"input",25),e.NdJ("ngModelChange",function(V){return c.storeName=V}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(236,"td"),e.TgZ(237,"span"),e._uU(238,"The name of the store"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(239,"tr"),e.TgZ(240,"td"),e._uU(241,"Use description as code"),e.qZA(),e.TgZ(242,"td"),e.TgZ(243,"mat-radio-group",20),e.TgZ(244,"mat-radio-button",21),e.NdJ("change",function(){return c.desc=!1}),e._uU(245,"No "),e.qZA(),e.TgZ(246,"mat-radio-button",22),e.NdJ("change",function(){return c.desc=!0}),e._uU(247,"Yes"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(248,"td"),e.TgZ(249,"span"),e._uU(250,"Copy product description into Product Code"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(251,"tr"),e.TgZ(252,"td"),e._uU(253,'Remove "Default"'),e.qZA(),e.TgZ(254,"td"),e.TgZ(255,"mat-radio-group",20),e.TgZ(256,"mat-radio-button",21),e.NdJ("change",function(){return c.removeDefault=!1}),e._uU(257,"No "),e.qZA(),e.TgZ(258,"mat-radio-button",22),e.NdJ("change",function(){return c.removeDefault=!0}),e._uU(259,"Yes"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(260,"td"),e.TgZ(261,"span"),e._uU(262,'Remove "Default" Label from product name'),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(263,"div",27),e.TgZ(264,"table",13),e.TgZ(265,"tr"),e.TgZ(266,"td"),e._uU(267,"Normal Price"),e.qZA(),e.TgZ(268,"td"),e.TgZ(269,"div",14),e.TgZ(270,"input",25),e.NdJ("ngModelChange",function(V){return c.promotionPriceLabel=V}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(271,"td"),e.TgZ(272,"span"),e._uU(273,"Custom label normal price"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(274,"tr"),e.TgZ(275,"td"),e._uU(276,"Promotion Price"),e.qZA(),e.TgZ(277,"td"),e.TgZ(278,"div",14),e.TgZ(279,"input",25),e.NdJ("ngModelChange",function(V){return c.basicPriceLabel=V}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(280,"td"),e.TgZ(281,"span"),e._uU(282,"Custom label promotion price"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&a&&(e.Q6J("config",c.modalConfig),e.xp6(6),e.Q6J("ngClass",e.VKq(44,me,"paper"===c.activeTab)),e.xp6(3),e.Q6J("ngClass",e.VKq(46,me,"spacing"===c.activeTab)),e.xp6(3),e.Q6J("ngClass",e.VKq(48,me,"sticker-content"===c.activeTab)),e.xp6(3),e.Q6J("ngClass",e.VKq(50,me,"price"===c.activeTab)),e.xp6(3),e.Q6J("ngClass",e.VKq(52,me,"advanced"===c.activeTab)),e.xp6(3),e.Q6J("ngClass",e.VKq(54,me,"promotionLabel"===c.activeTab)),e.xp6(3),e.Q6J("ngClass",e.VKq(56,me,"paper"===c.activeTab)),e.xp6(7),e.Q6J("ngModel",c.paperWidth),e.xp6(12),e.Q6J("ngModel",c.stickerWidth),e.xp6(12),e.Q6J("ngModel",c.stickerHeight),e.xp6(7),e.Q6J("ngClass",e.VKq(58,me,"spacing"===c.activeTab)),e.xp6(7),e.Q6J("ngModel",c.marginLeft),e.xp6(12),e.Q6J("ngModel",c.marginTop),e.xp6(12),e.Q6J("ngModel",c.spacingRow),e.xp6(12),e.Q6J("ngModel",c.spacingColumn),e.xp6(7),e.Q6J("ngClass",e.VKq(60,me,"sticker-content"===c.activeTab)),e.xp6(7),e.Q6J("ngModel",c.barcodeHeight),e.xp6(12),e.Q6J("ngModel",c.fontSize),e.xp6(12),e.Q6J("checked",!c.barcode),e.xp6(2),e.Q6J("checked",c.barcode),e.xp6(10),e.Q6J("checked",!c.code),e.xp6(2),e.Q6J("checked",c.code),e.xp6(10),e.Q6J("checked",!c.price),e.xp6(2),e.Q6J("checked",c.price),e.xp6(10),e.Q6J("checked",!c.name),e.xp6(2),e.Q6J("checked",c.name),e.xp6(5),e.Q6J("ngClass",e.VKq(62,me,"price"===c.activeTab)),e.xp6(7),e.Q6J("checked",!c.priceTax),e.xp6(2),e.Q6J("checked",c.priceTax),e.xp6(4),e.hij("Tax is added to the product base price ",c.authTax,""),e.xp6(1),e.Q6J("ngIf",1==c.priceTax&&1==c.authTax),e.xp6(6),e.Q6J("ngModel",c.currencySymbol),e.xp6(4),e.Q6J("ngClass",e.VKq(64,me,"advanced"===c.activeTab)),e.xp6(7),e.Q6J("ngModel",c.maxChar),e.xp6(9),e.Q6J("ngModel",c.namePrefix),e.xp6(9),e.Q6J("ngModel",c.storeName),e.xp6(9),e.Q6J("checked",!c.desc),e.xp6(2),e.Q6J("checked",c.desc),e.xp6(10),e.Q6J("checked",!c.removeDefault),e.xp6(2),e.Q6J("checked",c.removeDefault),e.xp6(5),e.Q6J("ngClass",e.VKq(66,me,"promotionLabel"===c.activeTab)),e.xp6(7),e.Q6J("ngModel",c.promotionPriceLabel),e.xp6(9),e.Q6J("ngModel",c.basicPriceLabel))},directives:[G.M,M.mk,$.wV,$.Fj,$.JJ,$.On,ye,Ze,M.O5,K.w9],styles:[".input-group-append[_ngcontent-%COMP%]{height:30px}.form-control[_ngcontent-%COMP%]{height:30px;font-size:12px}.input-group-text[_ngcontent-%COMP%]{font-size:12px}.value-title[_ngcontent-%COMP%]{font-size:12px;font-weight:550;width:90px}.advance-value-title[_ngcontent-%COMP%]{font-size:12px;font-weight:550;width:135px}h3[_ngcontent-%COMP%]{margin-bottom:0;font-weight:550}label[_ngcontent-%COMP%]{font-size:12px}bs-dropdown-container[_ngcontent-%COMP%]{z-index:1060}.nav-tabs-custom-border[_ngcontent-%COMP%] .nav-tabs[_ngcontent-%COMP%]{border-bottom:0}.tab-content[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] .table[_ngcontent-%COMP%]{border:1px solid #dee2e6;margin-bottom:15px}.tab-content[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(1){font-weight:bold;width:172px;padding:12px 1rem}.tab-content[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(2){width:120px}.tab-content[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:nth-child(2), .tab-content[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(2){border-right:1px solid #dee2e6;border-left:1px solid #dee2e6}.tab-content[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(2) input[_ngcontent-%COMP%]{border:0;border-bottom:1px solid #dee2e6}.tab-content[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(2) .input-group-text[_ngcontent-%COMP%]{border:0;border-bottom:1px solid #dee2e6;margin-top:-1px}.tab-content[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(3){font-style:italic;color:#28a745}.nav-link[_ngcontent-%COMP%]{cursor:pointer} .mat-radio-checked .mat-radio-outer-circle{border-color:#0075ff} .mat-radio-checked .mat-radio-inner-circle{background-color:#0075ff}"]}),_})();const $e=["bcElement"],Ye=A(9489);let Xe=(()=>{class _{constructor(a){this.renderer=a,this.elementType="svg",this.cssClass="barcode",this.format="CODE128",this.lineColor="#000000",this.width=2,this.height=100,this.displayValue=!1,this.fontOptions="",this.font="monospace",this.textAlign="center",this.textPosition="bottom",this.textMargin=2,this.fontSize=20,this.background="#ffffff",this.margin=10,this.marginTop=10,this.marginBottom=10,this.marginLeft=10,this.marginRight=10,this.value="",this.valid=()=>!0}get options(){return{format:this.format,lineColor:this.lineColor,width:this.width,height:this.height,displayValue:this.displayValue,fontOptions:this.fontOptions,font:this.font,textAlign:this.textAlign,textPosition:this.textPosition,textMargin:this.textMargin,fontSize:this.fontSize,background:this.background,margin:this.margin,marginTop:this.marginTop,marginBottom:this.marginBottom,marginLeft:this.marginLeft,marginRight:this.marginRight,valid:this.valid}}ngOnChanges(){this.createBarcode()}createBarcode(){if(!this.value)return;let a;switch(this.elementType){case"img":a=this.renderer.createElement("img");break;case"canvas":a=this.renderer.createElement("canvas");break;default:a=this.renderer.createElement("svg","svg")}Ye(a,this.value,this.options);for(const c of this.bcElement.nativeElement.childNodes)this.renderer.removeChild(this.bcElement.nativeElement,c);this.renderer.appendChild(this.bcElement.nativeElement,a)}}return _.\u0275fac=function(a){return new(a||_)(e.Y36(e.Qsj))},_.\u0275cmp=e.Xpm({type:_,selectors:[["ngx-barcode6"]],viewQuery:function(a,c){if(1&a&&e.Gf($e,7),2&a){let w;e.iGM(w=e.CRH())&&(c.bcElement=w.first)}},inputs:{elementType:["bc-element-type","elementType"],cssClass:["bc-class","cssClass"],format:["bc-format","format"],lineColor:["bc-line-color","lineColor"],width:["bc-width","width"],height:["bc-height","height"],displayValue:["bc-display-value","displayValue"],fontOptions:["bc-font-options","fontOptions"],font:["bc-font","font"],textAlign:["bc-text-align","textAlign"],textPosition:["bc-text-position","textPosition"],textMargin:["bc-text-margin","textMargin"],fontSize:["bc-font-size","fontSize"],background:["bc-background","background"],margin:["bc-margin","margin"],marginTop:["bc-margin-top","marginTop"],marginBottom:["bc-margin-bottom","marginBottom"],marginLeft:["bc-margin-left","marginLeft"],marginRight:["bc-margin-right","marginRight"],value:["bc-value","value"],valid:["bc-valid","valid"]},features:[e.TTD],decls:2,vars:2,consts:[["bcElement",""]],template:function(a,c){1&a&&e._UZ(0,"div",null,0),2&a&&e.Tol(c.cssClass)},encapsulation:2}),_})(),Me=(()=>{class _{}return _.\u0275fac=function(a){return new(a||_)},_.\u0275mod=e.oAB({type:_}),_.\u0275inj=e.cJS({imports:[[]]}),_})(),Je=(()=>{class _{transform(a,c){let w=a,V=0;return c&&0!==c&&(V=a*(c/100),w=a+V),w}}return _.\u0275fac=function(a){return new(a||_)},_.\u0275pipe=e.Yjl({name:"taxPipe",type:_,pure:!0}),_})();function Ie(_,y){if(1&_&&e._UZ(0,"ngx-barcode6",18),2&_){const a=e.oxw().$implicit,c=e.oxw();e.Q6J("bc-value",null==a?null:a.getCode)("bc-element-type","img")("bc-width",1)("bc-height",null==c.selectedPaperFormat?null:c.selectedPaperFormat.BarcodeHeight)}}function Qe(_,y){if(1&_&&(e.TgZ(0,"span",19),e._uU(1),e.qZA()),2&_){const a=e.oxw().$implicit,c=e.oxw();e.Udp("font-size",(null==c.selectedPaperFormat?null:c.selectedPaperFormat.ProductNameFontSize)+"px"),e.xp6(1),e.Oqu(a.getBarcodeTitle)}}function Le(_,y){if(1&_&&(e.ynx(0),e.TgZ(1,"div",22),e.TgZ(2,"span",23),e._uU(3),e.qZA(),e.TgZ(4,"span",24),e.TgZ(5,"span",25),e.TgZ(6,"span",26),e._uU(7),e.ALo(8,"number"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(9,"div",27),e.TgZ(10,"span",23),e._uU(11),e.qZA(),e.TgZ(12,"span",28),e._uU(13),e.ALo(14,"number"),e.qZA(),e.qZA(),e.BQk()),2&_){const a=e.oxw(2).$implicit,c=e.oxw();e.xp6(3),e.Oqu(c.selectedPaperFormat.BasicPriceLabel?c.selectedPaperFormat.BasicPriceLabel:"N. Price"),e.xp6(4),e.AsE("",null==c.selectedPaperFormat?null:c.selectedPaperFormat.CurrencySymbol," ",e.lcZ(8,6,null==a?null:a.getUnitPrice),""),e.xp6(4),e.Oqu(c.selectedPaperFormat.PromotionPriceLabel?c.selectedPaperFormat.PromotionPriceLabel:"Spc. Price"),e.xp6(2),e.AsE("",null==c.selectedPaperFormat?null:c.selectedPaperFormat.CurrencySymbol," ",e.lcZ(14,8,null==a||null==a.getSelectedPromotion?null:a.getSelectedPromotion.getUnitPrice),"")}}function tt(_,y){if(1&_&&(e.ynx(0),e._uU(1),e.ALo(2,"number"),e.ALo(3,"taxPipe"),e.BQk()),2&_){const a=e.oxw(3).$implicit,c=e.oxw();e.xp6(1),e.AsE(" ",null==c.selectedPaperFormat?null:c.selectedPaperFormat.CurrencySymbol," ",e.lcZ(2,2,e.xi3(3,4,null==a?null:a.getCustomPrice,c.tax))," ")}}function nt(_,y){if(1&_&&(e.ynx(0),e._uU(1),e.ALo(2,"number"),e.ALo(3,"taxPipe"),e.BQk()),2&_){const a=e.oxw(4).$implicit,c=e.oxw();e.xp6(1),e.AsE(" ",null==c.selectedPaperFormat?null:c.selectedPaperFormat.CurrencySymbol," ",e.lcZ(2,2,e.xi3(3,4,null==a?null:a.getUnitPrice,c.tax))," ")}}function rt(_,y){if(1&_&&e.YNc(0,nt,4,7,"ng-container",20),2&_){e.oxw();const a=e.MAs(5),c=e.oxw(3);e.Q6J("ngIf",(null==c.selectedPaperFormat?null:c.selectedPaperFormat.PriceWithTax)&&c.tax&&0!=c.tax)("ngIfElse",a)}}function at(_,y){if(1&_&&(e._uU(0),e.ALo(1,"number")),2&_){const a=e.oxw(3).$implicit,c=e.oxw();e.AsE(" ",null==c.selectedPaperFormat?null:c.selectedPaperFormat.CurrencySymbol," ",e.lcZ(1,2,null==a?null:a.getUnitPrice)," ")}}function ot(_,y){if(1&_&&(e.TgZ(0,"strong"),e.YNc(1,tt,4,7,"ng-container",20),e.YNc(2,rt,1,2,"ng-template",null,29,e.W1O),e.YNc(4,at,2,4,"ng-template",null,30,e.W1O),e.qZA()),2&_){const a=e.MAs(3),c=e.oxw(2).$implicit;e.xp6(1),e.Q6J("ngIf",0!==(null==c?null:c.getCustomPrice)&&void 0!==(null==c?null:c.getCustomPrice))("ngIfElse",a)}}function st(_,y){if(1&_&&(e.TgZ(0,"span",19),e.YNc(1,Le,15,10,"ng-container",20),e.YNc(2,ot,6,2,"ng-template",null,21,e.W1O),e.qZA()),2&_){const a=e.MAs(3),c=e.oxw().$implicit,w=e.oxw();e.Udp("font-size",(null==w.selectedPaperFormat?null:w.selectedPaperFormat.ProductNameFontSize)+"px"),e.xp6(1),e.Q6J("ngIf",c.getSelectedPromotion)("ngIfElse",a)}}function lt(_,y){if(1&_&&(e.TgZ(0,"span",19),e._uU(1),e.ALo(2,"slice"),e.qZA()),2&_){const a=e.oxw().$implicit,c=e.oxw();e.Udp("font-size",(null==c.selectedPaperFormat?null:c.selectedPaperFormat.ProductNameFontSize)+"px"),e.xp6(1),e.hij(" ",e.Dn7(2,3,null!=c.selectedPaperFormat&&c.selectedPaperFormat.ProductNamePrefix?(null==c.selectedPaperFormat?null:c.selectedPaperFormat.ProductNamePrefix)+" "+a.getName:a.getName,0,null==c.selectedPaperFormat?null:c.selectedPaperFormat.ProductNameMaxLength)," ")}}function ut(_,y){if(1&_&&(e.TgZ(0,"li"),e.TgZ(1,"div",13),e.YNc(2,Ie,1,4,"ngx-barcode6",14),e.TgZ(3,"div",15),e.YNc(4,Qe,2,3,"span",16),e.YNc(5,st,4,4,"span",16),e.YNc(6,lt,3,7,"span",16),e.qZA(),e.TgZ(7,"div",17),e._uU(8),e.qZA(),e.qZA(),e.qZA()),2&_){const a=y.index,c=e.oxw();e.Udp("width",(null==c.selectedPaperFormat?null:c.selectedPaperFormat.StickerWidth)+"px")("height",(null==c.selectedPaperFormat?null:c.selectedPaperFormat.StickerHeight)+"px")("margin-right",(a+1)%c.totalStickerPerRow==0?0:(null==c.selectedPaperFormat?null:c.selectedPaperFormat.ColumnSpacing)+"px")("margin-bottom",a>=c.productPreview.length-c.lastIndex?0:(null==c.selectedPaperFormat?null:c.selectedPaperFormat.RowSpacing)+"px"),e.xp6(2),e.Q6J("ngIf",null==c.selectedPaperFormat?null:c.selectedPaperFormat.BarcodeVisible),e.xp6(2),e.Q6J("ngIf",null==c.selectedPaperFormat?null:c.selectedPaperFormat.CodeVisible),e.xp6(1),e.Q6J("ngIf",null==c.selectedPaperFormat?null:c.selectedPaperFormat.PriceVisible),e.xp6(1),e.Q6J("ngIf",null==c.selectedPaperFormat?null:c.selectedPaperFormat.NameVisible),e.xp6(1),e.Udp("font-size",(null==c.selectedPaperFormat?null:c.selectedPaperFormat.ProductNameFontSize)+"px"),e.xp6(1),e.hij(" ",null==c.selectedPaperFormat?null:c.selectedPaperFormat.StoreName," ")}}let ct=(()=>{class _{constructor(a,c,w,V,W,X){this.dialog=a,this.productStateService=c,this.productService=w,this.barcodeService=V,this.toastService=W,this.authService=X,this.paperFormatOptions=[],this.optionSelected={id:1,name:"Continuous - 3 Column"},this.paperFormats=[],this.totalStickerPerRow=0,this.lastIndex=0,this.destroy$=new b.xQ,this.productPreview=[],this.taxs=[]}ngOnInit(){this.getPaperFormats(),this.checkAuthTax(),this.subscribeToObsproducts()}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}checkAuthTax(){this.authService.getRoles().find(w=>"StpE"===w)?(this.getProductTax(),this.authTax=!0):this.authTax=!1}subscribeToObsproducts(){this.productStateService.getState().pipe((0,s.R)(this.destroy$)).subscribe(a=>{this.productPreview=a,this.relayout()})}getProductTax(){this.productService.getTax().pipe((0,s.R)(this.destroy$)).subscribe(a=>{a&&(this.taxs=a)})}getPaperFormats(){this.barcodeService.getPaperFormatConfig().pipe((0,s.R)(this.destroy$)).subscribe(a=>{a&&(this.paperFormats=a,this.setSelectedPaperFormat(a[0]),this.initOptionFormat(),this.initOptionSelected(this.selectedPaperFormat))},a=>{console.error(a)})}initOptionFormat(){this.paperFormatOptions=[],this.paperFormats.forEach((a,c)=>{this.paperFormatOptions=[...this.paperFormatOptions,{id:c+1,name:a.Name}]})}initOptionSelected(a){this.optionSelected=this.paperFormatOptions.find(c=>c.name===a.Name)}openSettingModal(){this.dialog.open(Pe,{width:"850px",data:{paperFormat:this.selectedPaperFormat,taxs:this.taxs,authTax:this.authTax}}).afterClosed().pipe((0,s.R)(this.destroy$)).subscribe(a=>{a&&this.selectedPaperFormat&&(this.updatePaperFormatSource(a),this.updatePaperFormat(),this.setSelectedPaperFormat(a))})}onSelectPaperFormat(){this.getPaperFormatBarcode()}getPaperFormatBarcode(){let c=this.findPaperFormatByName(this.optionSelected.name);this.setSelectedPaperFormat(c)}updatePaperFormat(){this.barcodeService.updatePaperFormatConfig(this.paperFormats).pipe((0,s.R)(this.destroy$)).subscribe(()=>{this.toastService.success("Success Update Paper Format","Success")},a=>{console.error(a)})}setSelectedPaperFormat(a){this.selectedPaperFormat=a,this.barcodeService.setBarcodeConfigState(a),this.relayout(),this.getPPnVal(a)}findPaperFormatByName(a){return this.paperFormats.find(w=>w.Name==a)}updatePaperFormatSource(a){this.paperFormats=this.paperFormats.map(c=>(a.Name===c.Name&&(c=a),c))}getPPnVal(a){this.tax=a.TaxType?a.TaxType.Rate:null}relayout(){var a,c,w,V,W,X;let se=(null===(a=this.selectedPaperFormat)||void 0===a?void 0:a.PaperWidth)?null===(c=this.selectedPaperFormat)||void 0===c?void 0:c.PaperWidth:0,ne=(null===(w=this.selectedPaperFormat)||void 0===w?void 0:w.StickerWidth)?null===(V=this.selectedPaperFormat)||void 0===V?void 0:V.StickerWidth:0,he=(null===(W=this.selectedPaperFormat)||void 0===W?void 0:W.ColumnSpacing)?null===(X=this.selectedPaperFormat)||void 0===X?void 0:X.ColumnSpacing:0,we=Math.floor((se+he)/(ne+he));this.totalStickerPerRow=we;let pt=Math.floor(this.productPreview.length/we),it=this.productPreview.length-pt*we;this.lastIndex=0===it?we:it,this.productPreview=this.productPreview.map(Ee=>{var et;return Ee.setBarcodeTitle=(null===(et=this.selectedPaperFormat)||void 0===et?void 0:et.DescriptionAsCode)&&Ee.getDescription?Ee.getDescription:Ee.getCode,Ee})}}return _.\u0275fac=function(a){return new(a||_)(e.Y36(Z.uw),e.Y36(O),e.Y36(ke),e.Y36(J),e.Y36(Ae._W),e.Y36(E.$))},_.\u0275cmp=e.Xpm({type:_,selectors:[["app-print-preview"]],decls:15,vars:10,consts:[[1,"mt-3","d-print-none"],[1,"card","mt-0","mb-0","paper-barcode"],[1,"card-header","d-flex","justify-content-between","align-items-center","border-bottom","pb-5","d-print-none"],[1,"fw-light"],["align","right",2,"width","400px"],[1,"d-inline-block","fw-light","text-info","fst-italic"],["align","left","bindLabel","name","placeholder","Select Column",1,"d-inline-block","ms-4",3,"items","ngModel","clearable","ngModelChange","change"],[1,"btn","btn","btn-outline-secondary","ms-4",3,"click"],["aria-hidden","true",1,"fa","fa-cog"],[1,"card-body",2,"padding","0"],[1,"canvas","clearfix"],[1,"barcodes"],[3,"width","height","margin-right","margin-bottom",4,"ngFor","ngForOf"],[1,"position-relative"],[3,"bc-value","bc-element-type","bc-width","bc-height",4,"ngIf"],[2,"margin-top","-4px","line-height","1"],["class","d-block",3,"font-size",4,"ngIf"],[1,"vertical-text"],[3,"bc-value","bc-element-type","bc-width","bc-height"],[1,"d-block"],[4,"ngIf","ngIfElse"],["WITHOUT_PROMOTION",""],[1,"d-flex","justify-content-between"],[1,"ms-12"],[1,"me-12"],[1,"text-danger",2,"text-decoration","line-through","text-decoration-thickness","1.5px"],[1,"text-dark"],[1,"d-flex","justify-content-between","mt-1"],[1,"me-12","text-danger"],["WITH_TAX",""],["WITHOUT_TAX",""]],template:function(a,c){1&a&&(e._UZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"div",2),e.TgZ(3,"h1",3),e._uU(4," Print Preview "),e.qZA(),e.TgZ(5,"div",4),e.TgZ(6,"h5",5),e._uU(7,"Paper Source"),e.qZA(),e.TgZ(8,"ng-select",6),e.NdJ("ngModelChange",function(V){return c.optionSelected=V})("change",function(){return c.onSelectPaperFormat()}),e.qZA(),e.TgZ(9,"button",7),e.NdJ("click",function(){return c.openSettingModal()}),e._UZ(10,"i",8),e.qZA(),e.qZA(),e.qZA(),e.TgZ(11,"div",9),e.TgZ(12,"div",10),e.TgZ(13,"ul",11),e.YNc(14,ut,9,15,"li",12),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&a&&(e.xp6(8),e.Q6J("items",c.paperFormatOptions)("ngModel",c.optionSelected)("clearable",!1),e.xp6(4),e.Udp("width",(null==c.selectedPaperFormat?null:c.selectedPaperFormat.PaperWidth)+"px")("margin-top",(null==c.selectedPaperFormat?null:c.selectedPaperFormat.MarginTop)+"px")("margin-left",(null==c.selectedPaperFormat?null:c.selectedPaperFormat.MarginLeft)+"px"),e.xp6(2),e.Q6J("ngForOf",c.productPreview))},directives:[K.w9,$.JJ,$.On,M.sg,M.O5,Xe],pipes:[M.JJ,Je,M.OU],styles:["ng-select[_ngcontent-%COMP%]{width:50%}.card-header[_ngcontent-%COMP%]{height:65px} div.barcode>img{text-align:center;max-width:100%;border:none;outline:none}@media (max-width: 480px){ div.barcode>img{border:none!important}} div.canvas ul.barcodes li img{display:block;margin:0 auto}.vertical-text[_ngcontent-%COMP%]{transform:rotate(180deg);writing-mode:vertical-rl;position:absolute;right:0px;height:100%;top:8%;text-align:center}"]}),_})(),ht=(()=>{class _{constructor(a,c,w){this.variantServiceState=a,this.authService=c,this.queryParamService=w,this.domainName=localStorage.getItem("Domain")}onLogout(){this.variantServiceState.setState([]),this.queryParamService.setState(null),this.authService.logout()}}return _.\u0275fac=function(a){return new(a||_)(e.Y36(O),e.Y36(E.$),e.Y36(L.U))},_.\u0275cmp=e.Xpm({type:_,selectors:[["app-pages"]],decls:20,vars:2,consts:[[1,"container"],[1,"row"],[1,"col-4","d-print-none"],[1,"col-8","p-0"],[1,"d-md-block","d-print-none"],[1,"row","justify-content-between","align-items-center"],[1,"col-auto","d-inline-flex"],[1,"pt-1rem","me-3"],["target","_blank","href","https://www.dealpos.com"],["src","https://res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png","alt","dealpos-logo",1,"img-fluid"],[1,"col-auto"],[1,"logout","d-print-none"],[3,"href"],[3,"click"],[1,"fa","fa-sign-out-alt"]],template:function(a,c){1&a&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"div",2),e._UZ(3,"app-list-products"),e.qZA(),e.TgZ(4,"div",3),e._UZ(5,"app-print-preview"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(6,"footer",4),e.TgZ(7,"div",5),e.TgZ(8,"div",6),e.TgZ(9,"p",7),e._uU(10,"Powered by : "),e.qZA(),e.TgZ(11,"a",8),e._UZ(12,"img",9),e.qZA(),e.qZA(),e.TgZ(13,"div",10),e.TgZ(14,"div",11),e.TgZ(15,"a",12),e._uU(16),e.qZA(),e.TgZ(17,"h5",13),e.NdJ("click",function(){return c.onLogout()}),e._UZ(18,"span",14),e._uU(19,"\xa0Logout"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&a&&(e.xp6(15),e.MGl("href","https://",c.domainName,"",e.LSH),e.xp6(1),e.Oqu(c.domainName))},directives:[Ke,ct],styles:[".logout[_ngcontent-%COMP%]{position:relative;left:2.5vw;top:-5px;font-size:14px;cursor:pointer}footer[_ngcontent-%COMP%]{position:relative;bottom:0;width:90%;left:3rem;top:-1%}@media (min-height: 720px){footer[_ngcontent-%COMP%]{position:relative;bottom:0;width:90%;left:3rem;top:12%}}@media (min-height: 768px){footer[_ngcontent-%COMP%]{position:relative;bottom:0;width:90%;left:3rem;top:16%}}"]}),_})();var dt=A(8367);const mt=[{path:"",component:ht}];let gt=(()=>{class _{}return _.\u0275fac=function(a){return new(a||_)},_.\u0275mod=e.oAB({type:_}),_.\u0275inj=e.cJS({imports:[[M.ez,dt.m,qe,Me,_e,N.Bz.forChild(mt)]]}),_})()}}]);
|