n2words
Version:
n2words converts a numerical number into a written one, supports 28 languages and has zero dependencies.
2 lines • 30.9 kB
JavaScript
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports.n2words=r():t.n2words=r()}(this,()=>(()=>{"use strict";var t={34:(t,r,e)=>{var n=e(4901);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},81:(t,r,e)=>{var n=e(9565),o=e(9306),i=e(8551),a=e(6823),u=e(851),s=TypeError;t.exports=function(t,r){var e=arguments.length<2?u(t):r;if(o(e))return i(n(e,t));throw new s(a(t)+" is not iterable")}},116:(t,r,e)=>{var n=e(6518),o=e(9565),i=e(2652),a=e(9306),u=e(8551),s=e(1767),c=e(9539),f=e(4549)("find",TypeError);n({target:"Iterator",proto:!0,real:!0,forced:f},{find:function(t){u(this);try{a(t)}catch(t){c(this,"throw",t)}if(f)return o(f,this,t);var r=s(this),e=0;return i(r,function(r,n){if(t(r,e++))return n(r)},{IS_RECORD:!0,INTERRUPTED:!0}).result}})},283:(t,r,e)=>{var n=e(9504),o=e(9039),i=e(4901),a=e(9297),u=e(3724),s=e(350).CONFIGURABLE,c=e(3706),f=e(1181),p=f.enforce,l=f.get,h=String,v=Object.defineProperty,d=n("".slice),y=n("".replace),g=n([].join),x=u&&!o(function(){return 8!==v(function(){},"length",{value:8}).length}),b=String(String).split("String"),m=t.exports=function(t,r,e){"Symbol("===d(h(r),0,7)&&(r="["+y(h(r),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),e&&e.getter&&(r="get "+r),e&&e.setter&&(r="set "+r),(!a(t,"name")||s&&t.name!==r)&&(u?v(t,"name",{value:r,configurable:!0}):t.name=r),x&&e&&a(e,"arity")&&t.length!==e.arity&&v(t,"length",{value:e.arity});try{e&&a(e,"constructor")&&e.constructor?u&&v(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=p(t);return a(n,"source")||(n.source=g(b,"string"==typeof r?r:"")),t};Function.prototype.toString=m(function(){return i(this)&&l(this).source||c(this)},"toString")},350:(t,r,e)=>{var n=e(3724),o=e(9297),i=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,u=o(i,"name"),s=u&&"something"===function(){}.name,c=u&&(!n||n&&a(i,"name").configurable);t.exports={EXISTS:u,PROPER:s,CONFIGURABLE:c}},397:(t,r,e)=>{var n=e(7751);t.exports=n("document","documentElement")},421:t=>{t.exports={}},507:(t,r,e)=>{var n=e(9565);t.exports=function(t,r,e){for(var o,i,a=e?t:t.iterator,u=t.next;!(o=n(u,a)).done;)if(void 0!==(i=r(o.value)))return i}},616:(t,r,e)=>{var n=e(9039);t.exports=!n(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})},679:(t,r,e)=>{var n=e(1625),o=TypeError;t.exports=function(t,r){if(n(r,t))return t;throw new o("Incorrect invocation")}},684:t=>{t.exports=function(t,r){var e="function"==typeof Iterator&&Iterator.prototype[t];if(e)try{e.call({next:null},r).next()}catch(t){return!0}}},741:t=>{var r=Math.ceil,e=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?e:r)(n)}},757:(t,r,e)=>{var n=e(7751),o=e(4901),i=e(1625),a=e(7040),u=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var r=n("Symbol");return o(r)&&i(r.prototype,u(t))}},851:(t,r,e)=>{var n=e(6955),o=e(5966),i=e(4117),a=e(6269),u=e(8227)("iterator");t.exports=function(t){if(!i(t))return o(t,u)||o(t,"@@iterator")||a[n(t)]}},1072:(t,r,e)=>{var n=e(1828),o=e(8727);t.exports=Object.keys||function(t){return n(t,o)}},1181:(t,r,e)=>{var n,o,i,a=e(8622),u=e(4576),s=e(34),c=e(6699),f=e(9297),p=e(7629),l=e(6119),h=e(421),v="Object already initialized",d=u.TypeError,y=u.WeakMap;if(a||p.state){var g=p.state||(p.state=new y);g.get=g.get,g.has=g.has,g.set=g.set,n=function(t,r){if(g.has(t))throw new d(v);return r.facade=t,g.set(t,r),r},o=function(t){return g.get(t)||{}},i=function(t){return g.has(t)}}else{var x=l("state");h[x]=!0,n=function(t,r){if(f(t,x))throw new d(v);return r.facade=t,c(t,x,r),r},o=function(t){return f(t,x)?t[x]:{}},i=function(t){return f(t,x)}}t.exports={set:n,get:o,has:i,enforce:function(t){return i(t)?o(t):n(t,{})},getterFor:function(t){return function(r){var e;if(!s(r)||(e=o(r)).type!==t)throw new d("Incompatible receiver, "+t+" required");return e}}}},1291:(t,r,e)=>{var n=e(741);t.exports=function(t){var r=+t;return r!=r||0===r?0:n(r)}},1385:(t,r,e)=>{var n=e(9539);t.exports=function(t,r,e){for(var o=t.length-1;o>=0;o--)if(void 0!==t[o])try{e=n(t[o].iterator,r,e)}catch(t){r="throw",e=t}if("throw"===r)throw e;return e}},1454:(t,r,e)=>{e(1701)},1625:(t,r,e)=>{var n=e(9504);t.exports=n({}.isPrototypeOf)},1698:(t,r,e)=>{var n=e(6518),o=e(4204),i=e(9835);n({target:"Set",proto:!0,real:!0,forced:!e(4916)("union")||!i("union")},{union:o})},1701:(t,r,e)=>{var n=e(6518),o=e(9565),i=e(9306),a=e(8551),u=e(1767),s=e(9462),c=e(6319),f=e(9539),p=e(684),l=e(4549),h=e(6395),v=!h&&!p("map",function(){}),d=!h&&!v&&l("map",TypeError),y=h||v||d,g=s(function(){var t=this.iterator,r=a(o(this.next,t));if(!(this.done=!!r.done))return c(t,this.mapper,[r.value,this.counter++],!0)});n({target:"Iterator",proto:!0,real:!0,forced:y},{map:function(t){a(this);try{i(t)}catch(t){f(this,"throw",t)}return d?o(d,this,t):new g(u(this),{mapper:t})}})},1767:t=>{t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},1828:(t,r,e)=>{var n=e(9504),o=e(9297),i=e(5397),a=e(9617).indexOf,u=e(421),s=n([].push);t.exports=function(t,r){var e,n=i(t),c=0,f=[];for(e in n)!o(u,e)&&o(n,e)&&s(f,e);for(;r.length>c;)o(n,e=r[c++])&&(~a(f,e)||s(f,e));return f}},2106:(t,r,e)=>{var n=e(283),o=e(4913);t.exports=function(t,r,e){return e.get&&n(e.get,r,{getter:!0}),e.set&&n(e.set,r,{setter:!0}),o.f(t,r,e)}},2140:(t,r,e)=>{var n={};n[e(8227)("toStringTag")]="z",t.exports="[object z]"===String(n)},2195:(t,r,e)=>{var n=e(9504),o=n({}.toString),i=n("".slice);t.exports=function(t){return i(o(t),8,-1)}},2211:(t,r,e)=>{var n=e(9039);t.exports=!n(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})},2360:(t,r,e)=>{var n,o=e(8551),i=e(6801),a=e(8727),u=e(421),s=e(397),c=e(4055),f=e(6119),p="prototype",l="script",h=f("IE_PROTO"),v=function(){},d=function(t){return"<"+l+">"+t+"</"+l+">"},y=function(t){t.write(d("")),t.close();var r=t.parentWindow.Object;return t=null,r},g=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,r,e;g="undefined"!=typeof document?document.domain&&n?y(n):(r=c("iframe"),e="java"+l+":",r.style.display="none",s.appendChild(r),r.src=String(e),(t=r.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F):y(n);for(var o=a.length;o--;)delete g[p][a[o]];return g()};u[h]=!0,t.exports=Object.create||function(t,r){var e;return null!==t?(v[p]=o(t),e=new v,v[p]=null,e[h]=t):e=g(),void 0===r?e:i.f(e,r)}},2475:(t,r,e)=>{var n=e(6518),o=e(8527);n({target:"Set",proto:!0,real:!0,forced:!e(4916)("isSupersetOf",function(t){return!t})},{isSupersetOf:o})},2529:t=>{t.exports=function(t,r){return{value:t,done:r}}},2577:(t,r,e)=>{e(116)},2652:(t,r,e)=>{var n=e(6080),o=e(9565),i=e(8551),a=e(6823),u=e(4209),s=e(6198),c=e(1625),f=e(81),p=e(851),l=e(9539),h=TypeError,v=function(t,r){this.stopped=t,this.result=r},d=v.prototype;t.exports=function(t,r,e){var y,g,x,b,m,w,S,O=e&&e.that,j=!(!e||!e.AS_ENTRIES),T=!(!e||!e.IS_RECORD),I=!(!e||!e.IS_ITERATOR),E=!(!e||!e.INTERRUPTED),C=n(r,O),P=function(t){return y&&l(y,"normal"),new v(!0,t)},z=function(t){return j?(i(t),E?C(t[0],t[1],P):C(t[0],t[1])):E?C(t,P):C(t)};if(T)y=t.iterator;else if(I)y=t;else{if(!(g=p(t)))throw new h(a(t)+" is not iterable");if(u(g)){for(x=0,b=s(t);b>x;x++)if((m=z(t[x]))&&c(d,m))return m;return new v(!1)}y=f(t,g)}for(w=T?t.next:y.next;!(S=o(w,y)).done;){try{m=z(S.value)}catch(t){l(y,"throw",t)}if("object"==typeof m&&m&&c(d,m))return m}return new v(!1)}},2777:(t,r,e)=>{var n=e(9565),o=e(34),i=e(757),a=e(5966),u=e(4270),s=e(8227),c=TypeError,f=s("toPrimitive");t.exports=function(t,r){if(!o(t)||i(t))return t;var e,s=a(t,f);if(s){if(void 0===r&&(r="default"),e=n(s,t,r),!o(e)||i(e))return e;throw new c("Can't convert object to primitive value")}return void 0===r&&(r="number"),u(t,r)}},2787:(t,r,e)=>{var n=e(9297),o=e(4901),i=e(8981),a=e(6119),u=e(2211),s=a("IE_PROTO"),c=Object,f=c.prototype;t.exports=u?c.getPrototypeOf:function(t){var r=i(t);if(n(r,s))return r[s];var e=r.constructor;return o(e)&&r instanceof e?e.prototype:r instanceof c?f:null}},2796:(t,r,e)=>{var n=e(9039),o=e(4901),i=/#|\.prototype\./,a=function(t,r){var e=s[u(t)];return e===f||e!==c&&(o(r)?n(r):!!r)},u=a.normalize=function(t){return String(t).replace(i,".").toLowerCase()},s=a.data={},c=a.NATIVE="N",f=a.POLYFILL="P";t.exports=a},2839:(t,r,e)=>{var n=e(4576).navigator,o=n&&n.userAgent;t.exports=o?String(o):""},3392:(t,r,e)=>{var n=e(9504),o=0,i=Math.random(),a=n(1.1.toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++o+i,36)}},3440:(t,r,e)=>{var n=e(7080),o=e(4402),i=e(9286),a=e(5170),u=e(3789),s=e(8469),c=e(507),f=o.has,p=o.remove;t.exports=function(t){var r=n(this),e=u(t),o=i(r);return a(r)<=e.size?s(r,function(t){e.includes(t)&&p(o,t)}):c(e.getIterator(),function(t){f(o,t)&&p(o,t)}),o}},3650:(t,r,e)=>{var n=e(7080),o=e(4402),i=e(9286),a=e(3789),u=e(507),s=o.add,c=o.has,f=o.remove;t.exports=function(t){var r=n(this),e=a(t).getIterator(),o=i(r);return u(e,function(t){c(r,t)?f(o,t):s(o,t)}),o}},3706:(t,r,e)=>{var n=e(9504),o=e(4901),i=e(7629),a=n(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return a(t)}),t.exports=i.inspectSource},3717:(t,r)=>{r.f=Object.getOwnPropertySymbols},3724:(t,r,e)=>{var n=e(9039);t.exports=!n(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},3789:(t,r,e)=>{var n=e(9306),o=e(8551),i=e(9565),a=e(1291),u=e(1767),s="Invalid size",c=RangeError,f=TypeError,p=Math.max,l=function(t,r){this.set=t,this.size=p(r,0),this.has=n(t.has),this.keys=n(t.keys)};l.prototype={getIterator:function(){return u(o(i(this.keys,this.set)))},includes:function(t){return i(this.has,this.set,t)}},t.exports=function(t){o(t);var r=+t.size;if(r!=r)throw new f(s);var e=a(r);if(e<0)throw new c(s);return new l(t,e)}},3838:(t,r,e)=>{var n=e(7080),o=e(5170),i=e(8469),a=e(3789);t.exports=function(t){var r=n(this),e=a(t);return!(o(r)>e.size)&&!1!==i(r,function(t){if(!e.includes(t))return!1},!0)}},3843:(t,r,e)=>{e.d(r,{A:()=>i}),e(4114),e(8992),e(2577);var n=e(6298);class o extends n.A{#t;constructor(t,r){super(t),this.#t=r}get cards(){return this.#t}set cards(t){this.#t=t}getCardWord(t){const r=this.cards.find(r=>r[0]==t);return Array.isArray(r)?r[1]:void 0}toCardMatches(t){const r=[];let e=t;do{const t=this.cards.find(t=>e>=t[0]);let n;0==e?(n=1,e=0):(n=e/t[0],e%=t[0]),1==n?r.push({[this.getCardWord(1)]:1}):r.push(this.toCardMatches(n)),r.push({[t[1]]:t[0]})}while(e>0);return r}clean(t){let r=t;for(;1!=t.length;){r=[];const e=t[0],n=t[1];if(Array.isArray(e)||Array.isArray(n))for(const e of t)Array.isArray(e)?1==e.length?r.push(e[0]):r.push(this.clean(e)):r.push(e);else r.push(this.merge(e,n)),t.slice(2).length>0&&r.push(t.slice(2));t=r}return r[0]}postClean(t){return t.trimEnd()}toCardinal(t){const r=this.toCardMatches(t),e=Object.keys(this.clean(r))[0];return this.postClean(e)}}const i=o},3853:(t,r,e)=>{var n=e(6518),o=e(4449);n({target:"Set",proto:!0,real:!0,forced:!e(4916)("isDisjointFrom",function(t){return!t})},{isDisjointFrom:o})},4055:(t,r,e)=>{var n=e(4576),o=e(34),i=n.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},4114:(t,r,e)=>{var n=e(6518),o=e(8981),i=e(6198),a=e(4527),u=e(6837);n({target:"Array",proto:!0,arity:1,forced:e(9039)(function(){return 4294967297!==[].push.call({length:4294967296},1)})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function(t){var r=o(this),e=i(r),n=arguments.length;u(e+n);for(var s=0;s<n;s++)r[e]=arguments[s],e++;return a(r,e),e}})},4117:t=>{t.exports=function(t){return null==t}},4204:(t,r,e)=>{var n=e(7080),o=e(4402).add,i=e(9286),a=e(3789),u=e(507);t.exports=function(t){var r=n(this),e=a(t).getIterator(),s=i(r);return u(e,function(t){o(s,t)}),s}},4209:(t,r,e)=>{var n=e(8227),o=e(6269),i=n("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},4270:(t,r,e)=>{var n=e(9565),o=e(4901),i=e(34),a=TypeError;t.exports=function(t,r){var e,u;if("string"===r&&o(e=t.toString)&&!i(u=n(e,t)))return u;if(o(e=t.valueOf)&&!i(u=n(e,t)))return u;if("string"!==r&&o(e=t.toString)&&!i(u=n(e,t)))return u;throw new a("Can't convert object to primitive value")}},4376:(t,r,e)=>{var n=e(2195);t.exports=Array.isArray||function(t){return"Array"===n(t)}},4402:(t,r,e)=>{var n=e(9504),o=Set.prototype;t.exports={Set,add:n(o.add),has:n(o.has),remove:n(o.delete),proto:o}},4449:(t,r,e)=>{var n=e(7080),o=e(4402).has,i=e(5170),a=e(3789),u=e(8469),s=e(507),c=e(9539);t.exports=function(t){var r=n(this),e=a(t);if(i(r)<=e.size)return!1!==u(r,function(t){if(e.includes(t))return!1},!0);var f=e.getIterator();return!1!==s(f,function(t){if(o(r,t))return c(f,"normal",!1)})}},4495:(t,r,e)=>{var n=e(9519),o=e(9039),i=e(4576).String;t.exports=!!Object.getOwnPropertySymbols&&!o(function(){var t=Symbol("symbol detection");return!i(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41})},4527:(t,r,e)=>{var n=e(3724),o=e(4376),i=TypeError,a=Object.getOwnPropertyDescriptor,u=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=u?function(t,r){if(o(t)&&!a(t,"length").writable)throw new i("Cannot set read only .length");return t.length=r}:function(t,r){return t.length=r}},4549:(t,r,e)=>{var n=e(4576);t.exports=function(t,r){var e=n.Iterator,o=e&&e.prototype,i=o&&o[t],a=!1;if(i)try{i.call({next:function(){return{done:!0}},return:function(){a=!0}},-1)}catch(t){t instanceof r||(a=!1)}if(!a)return i}},4576:function(t){var r=function(t){return t&&t.Math===Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof global&&global)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},4659:(t,r,e)=>{var n=e(3724),o=e(4913),i=e(6980);t.exports=function(t,r,e){n?o.f(t,r,i(0,e)):t[r]=e}},4901:t=>{var r="object"==typeof document&&document.all;t.exports=void 0===r&&void 0!==r?function(t){return"function"==typeof t||t===r}:function(t){return"function"==typeof t}},4913:(t,r,e)=>{var n=e(3724),o=e(5917),i=e(8686),a=e(8551),u=e(6969),s=TypeError,c=Object.defineProperty,f=Object.getOwnPropertyDescriptor,p="enumerable",l="configurable",h="writable";r.f=n?i?function(t,r,e){if(a(t),r=u(r),a(e),"function"==typeof t&&"prototype"===r&&"value"in e&&h in e&&!e[h]){var n=f(t,r);n&&n[h]&&(t[r]=e.value,e={configurable:l in e?e[l]:n[l],enumerable:p in e?e[p]:n[p],writable:!1})}return c(t,r,e)}:c:function(t,r,e){if(a(t),r=u(r),a(e),o)try{return c(t,r,e)}catch(t){}if("get"in e||"set"in e)throw new s("Accessors not supported");return"value"in e&&(t[r]=e.value),t}},4916:(t,r,e)=>{var n=e(7751),o=function(t){return{size:t,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},i=function(t){return{size:t,has:function(){return!0},keys:function(){throw new Error("e")}}};t.exports=function(t,r){var e=n("Set");try{(new e)[t](o(0));try{return(new e)[t](o(-1)),!1}catch(n){if(!r)return!0;try{return(new e)[t](i(-1/0)),!1}catch(n){var a=new e;return a.add(1),a.add(2),r(a[t](i(1/0)))}}}catch(t){return!1}}},5024:(t,r,e)=>{var n=e(6518),o=e(3650),i=e(9835);n({target:"Set",proto:!0,real:!0,forced:!e(4916)("symmetricDifference")||!i("symmetricDifference")},{symmetricDifference:o})},5031:(t,r,e)=>{var n=e(7751),o=e(9504),i=e(8480),a=e(3717),u=e(8551),s=o([].concat);t.exports=n("Reflect","ownKeys")||function(t){var r=i.f(u(t)),e=a.f;return e?s(r,e(t)):r}},5170:(t,r,e)=>{var n=e(6706),o=e(4402);t.exports=n(o.proto,"size","get")||function(t){return t.size}},5397:(t,r,e)=>{var n=e(7055),o=e(7750);t.exports=function(t){return n(o(t))}},5610:(t,r,e)=>{var n=e(1291),o=Math.max,i=Math.min;t.exports=function(t,r){var e=n(t);return e<0?o(e+r,0):i(e,r)}},5745:(t,r,e)=>{var n=e(7629);t.exports=function(t,r){return n[t]||(n[t]=r||{})}},5876:(t,r,e)=>{var n=e(6518),o=e(3838);n({target:"Set",proto:!0,real:!0,forced:!e(4916)("isSubsetOf",function(t){return t})},{isSubsetOf:o})},5917:(t,r,e)=>{var n=e(3724),o=e(9039),i=e(4055);t.exports=!n&&!o(function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})},5966:(t,r,e)=>{var n=e(9306),o=e(4117);t.exports=function(t,r){var e=t[r];return o(e)?void 0:n(e)}},6080:(t,r,e)=>{var n=e(7476),o=e(9306),i=e(616),a=n(n.bind);t.exports=function(t,r){return o(t),void 0===r?t:i?a(t,r):function(){return t.apply(r,arguments)}}},6119:(t,r,e)=>{var n=e(5745),o=e(3392),i=n("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},6198:(t,r,e)=>{var n=e(8014);t.exports=function(t){return n(t.length)}},6269:t=>{t.exports={}},6279:(t,r,e)=>{var n=e(6840);t.exports=function(t,r,e){for(var o in r)n(t,o,r[o],e);return t}},6298:(t,r,e)=>{e.d(r,{A:()=>n}),e(4114);const n=class{#r;#e;#n;#o;#i;constructor(t){t=Object.assign({negativeWord:"",separatorWord:"",zero:"",spaceSeparator:" "},t),this.#r=t.negativeWord,this.#e=t.separatorWord,this.#n=t.zero,this.#o=t.spaceSeparator}get negativeWord(){return this.#r}get separatorWord(){return this.#e}get zero(){return this.#n}get spaceSeparator(){return this.#o}get wholeNumber(){return this.#i}decimalToCardinal(t){const r=[],e=[...t];let n=0;for(;n<e.length&&"0"===e[n];)r.push(this.zero),n++;return n===e.length?r:[...r,this.toCardinal(BigInt(t))]}floatToCardinal(t){if("number"==typeof t){if(Number.isNaN(t))throw new TypeError("NaN is not an accepted number.");t=t.toString()}else if("string"==typeof t){if(0===(t=t.trim()).length||Number.isNaN(Number(t)))throw new Error('"'+t+'" is not a valid number.')}else if("bigint"!=typeof t)throw new TypeError("Invalid variable type: "+typeof t);let r,e,n=[];if(t<0&&n.push(this.negativeWord),"bigint"==typeof t)r=t;else{const n=t.split(".");r=BigInt(n[0]),e=n[1]}return r<0&&(r=-r),this.#i=r,n=[...n,this.toCardinal(r)],e&&(n.push(this.separatorWord),n=[...n,...this.decimalToCardinal(e)]),n.join(this.spaceSeparator)}}},6319:(t,r,e)=>{var n=e(8551),o=e(9539);t.exports=function(t,r,e,i){try{return i?r(n(e)[0],e[1]):r(e)}catch(r){o(t,"throw",r)}}},6395:t=>{t.exports=!1},6518:(t,r,e)=>{var n=e(4576),o=e(7347).f,i=e(6699),a=e(6840),u=e(9433),s=e(7740),c=e(2796);t.exports=function(t,r){var e,f,p,l,h,v=t.target,d=t.global,y=t.stat;if(e=d?n:y?n[v]||u(v,{}):n[v]&&n[v].prototype)for(f in r){if(l=r[f],p=t.dontCallGetSet?(h=o(e,f))&&h.value:e[f],!c(d?f:v+(y?".":"#")+f,t.forced)&&void 0!==p){if(typeof l==typeof p)continue;s(l,p)}(t.sham||p&&p.sham)&&i(l,"sham",!0),a(e,f,l,t)}}},6699:(t,r,e)=>{var n=e(3724),o=e(4913),i=e(6980);t.exports=n?function(t,r,e){return o.f(t,r,i(1,e))}:function(t,r,e){return t[r]=e,t}},6706:(t,r,e)=>{var n=e(9504),o=e(9306);t.exports=function(t,r,e){try{return n(o(Object.getOwnPropertyDescriptor(t,r)[e]))}catch(t){}}},6801:(t,r,e)=>{var n=e(3724),o=e(8686),i=e(4913),a=e(8551),u=e(5397),s=e(1072);r.f=n&&!o?Object.defineProperties:function(t,r){a(t);for(var e,n=u(r),o=s(r),c=o.length,f=0;c>f;)i.f(t,e=o[f++],n[e]);return t}},6823:t=>{var r=String;t.exports=function(t){try{return r(t)}catch(t){return"Object"}}},6837:t=>{var r=TypeError;t.exports=function(t){if(t>9007199254740991)throw r("Maximum allowed index exceeded");return t}},6840:(t,r,e)=>{var n=e(4901),o=e(4913),i=e(283),a=e(9433);t.exports=function(t,r,e,u){u||(u={});var s=u.enumerable,c=void 0!==u.name?u.name:r;if(n(e)&&i(e,c,u),u.global)s?t[r]=e:a(r,e);else{try{u.unsafe?t[r]&&(s=!0):delete t[r]}catch(t){}s?t[r]=e:o.f(t,r,{value:e,enumerable:!1,configurable:!u.nonConfigurable,writable:!u.nonWritable})}return t}},6955:(t,r,e)=>{var n=e(2140),o=e(4901),i=e(2195),a=e(8227)("toStringTag"),u=Object,s="Arguments"===i(function(){return arguments}());t.exports=n?i:function(t){var r,e,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=function(t,r){try{return t[r]}catch(t){}}(r=u(t),a))?e:s?i(r):"Object"===(n=i(r))&&o(r.callee)?"Arguments":n}},6969:(t,r,e)=>{var n=e(2777),o=e(757);t.exports=function(t){var r=n(t,"string");return o(r)?r:r+""}},6980:t=>{t.exports=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}}},7040:(t,r,e)=>{var n=e(4495);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7055:(t,r,e)=>{var n=e(9504),o=e(9039),i=e(2195),a=Object,u=n("".split);t.exports=o(function(){return!a("z").propertyIsEnumerable(0)})?function(t){return"String"===i(t)?u(t,""):a(t)}:a},7080:(t,r,e)=>{var n=e(4402).has;t.exports=function(t){return n(t),t}},7347:(t,r,e)=>{var n=e(3724),o=e(9565),i=e(8773),a=e(6980),u=e(5397),s=e(6969),c=e(9297),f=e(5917),p=Object.getOwnPropertyDescriptor;r.f=n?p:function(t,r){if(t=u(t),r=s(r),f)try{return p(t,r)}catch(t){}if(c(t,r))return a(!o(i.f,t,r),t[r])}},7476:(t,r,e)=>{var n=e(2195),o=e(9504);t.exports=function(t){if("Function"===n(t))return o(t)}},7629:(t,r,e)=>{var n=e(6395),o=e(4576),i=e(9433),a="__core-js_shared__",u=t.exports=o[a]||i(a,{});(u.versions||(u.versions=[])).push({version:"3.45.0",mode:n?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.0/LICENSE",source:"https://github.com/zloirock/core-js"})},7642:(t,r,e)=>{var n=e(6518),o=e(3440),i=e(9039);n({target:"Set",proto:!0,real:!0,forced:!e(4916)("difference",function(t){return 0===t.size})||i(function(){var t={size:1,has:function(){return!0},keys:function(){var t=0;return{next:function(){var e=t++>1;return r.has(1)&&r.clear(),{done:e,value:2}}}}},r=new Set([1,2,3,4]);return 3!==r.difference(t).size})},{difference:o})},7657:(t,r,e)=>{var n,o,i,a=e(9039),u=e(4901),s=e(34),c=e(2360),f=e(2787),p=e(6840),l=e(8227),h=e(6395),v=l("iterator"),d=!1;[].keys&&("next"in(i=[].keys())?(o=f(f(i)))!==Object.prototype&&(n=o):d=!0),!s(n)||a(function(){var t={};return n[v].call(t)!==t})?n={}:h&&(n=c(n)),u(n[v])||p(n,v,function(){return this}),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:d}},7740:(t,r,e)=>{var n=e(9297),o=e(5031),i=e(7347),a=e(4913);t.exports=function(t,r,e){for(var u=o(r),s=a.f,c=i.f,f=0;f<u.length;f++){var p=u[f];n(t,p)||e&&n(e,p)||s(t,p,c(r,p))}}},7750:(t,r,e)=>{var n=e(4117),o=TypeError;t.exports=function(t){if(n(t))throw new o("Can't call method on "+t);return t}},7751:(t,r,e)=>{var n=e(4576),o=e(4901);t.exports=function(t,r){return arguments.length<2?(e=n[t],o(e)?e:void 0):n[t]&&n[t][r];var e}},8004:(t,r,e)=>{var n=e(6518),o=e(9039),i=e(8750);n({target:"Set",proto:!0,real:!0,forced:!e(4916)("intersection",function(t){return 2===t.size&&t.has(1)&&t.has(2)})||o(function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))})},{intersection:i})},8014:(t,r,e)=>{var n=e(1291),o=Math.min;t.exports=function(t){var r=n(t);return r>0?o(r,9007199254740991):0}},8111:(t,r,e)=>{var n=e(6518),o=e(4576),i=e(679),a=e(8551),u=e(4901),s=e(2787),c=e(2106),f=e(4659),p=e(9039),l=e(9297),h=e(8227),v=e(7657).IteratorPrototype,d=e(3724),y=e(6395),g="constructor",x="Iterator",b=h("toStringTag"),m=TypeError,w=o[x],S=y||!u(w)||w.prototype!==v||!p(function(){w({})}),O=function(){if(i(this,v),s(this)===v)throw new m("Abstract class Iterator not directly constructable")},j=function(t,r){d?c(v,t,{configurable:!0,get:function(){return r},set:function(r){if(a(this),this===v)throw new m("You can't redefine this property");l(this,t)?this[t]=r:f(this,t,r)}}):v[t]=r};l(v,b)||j(b,x),!S&&l(v,g)&&v[g]!==Object||j(g,O),O.prototype=v,n({global:!0,constructor:!0,forced:S},{Iterator:O})},8227:(t,r,e)=>{var n=e(4576),o=e(5745),i=e(9297),a=e(3392),u=e(4495),s=e(7040),c=n.Symbol,f=o("wks"),p=s?c.for||c:c&&c.withoutSetter||a;t.exports=function(t){return i(f,t)||(f[t]=u&&i(c,t)?c[t]:p("Symbol."+t)),f[t]}},8469:(t,r,e)=>{var n=e(9504),o=e(507),i=e(4402),a=i.Set,u=i.proto,s=n(u.forEach),c=n(u.keys),f=c(new a).next;t.exports=function(t,r,e){return e?o({iterator:c(t),next:f},r):s(t,r)}},8480:(t,r,e)=>{var n=e(1828),o=e(8727).concat("length","prototype");r.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},8527:(t,r,e)=>{var n=e(7080),o=e(4402).has,i=e(5170),a=e(3789),u=e(507),s=e(9539);t.exports=function(t){var r=n(this),e=a(t);if(i(r)<e.size)return!1;var c=e.getIterator();return!1!==u(c,function(t){if(!o(r,t))return s(c,"normal",!1)})}},8551:(t,r,e)=>{var n=e(34),o=String,i=TypeError;t.exports=function(t){if(n(t))return t;throw new i(o(t)+" is not an object")}},8622:(t,r,e)=>{var n=e(4576),o=e(4901),i=n.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},8686:(t,r,e)=>{var n=e(3724),o=e(9039);t.exports=n&&o(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},8727:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},8750:(t,r,e)=>{var n=e(7080),o=e(4402),i=e(5170),a=e(3789),u=e(8469),s=e(507),c=o.Set,f=o.add,p=o.has;t.exports=function(t){var r=n(this),e=a(t),o=new c;return i(r)>e.size?s(e.getIterator(),function(t){p(r,t)&&f(o,t)}):u(r,function(t){e.includes(t)&&f(o,t)}),o}},8773:(t,r)=>{var e={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!e.call({1:2},1);r.f=o?function(t){var r=n(this,t);return!!r&&r.enumerable}:e},8981:(t,r,e)=>{var n=e(7750),o=Object;t.exports=function(t){return o(n(t))}},8992:(t,r,e)=>{e(8111)},9039:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},9286:(t,r,e)=>{var n=e(4402),o=e(8469),i=n.Set,a=n.add;t.exports=function(t){var r=new i;return o(t,function(t){a(r,t)}),r}},9297:(t,r,e)=>{var n=e(9504),o=e(8981),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,r){return i(o(t),r)}},9306:(t,r,e)=>{var n=e(4901),o=e(6823),i=TypeError;t.exports=function(t){if(n(t))return t;throw new i(o(t)+" is not a function")}},9433:(t,r,e)=>{var n=e(4576),o=Object.defineProperty;t.exports=function(t,r){try{o(n,t,{value:r,configurable:!0,writable:!0})}catch(e){n[t]=r}return r}},9462:(t,r,e)=>{var n=e(9565),o=e(2360),i=e(6699),a=e(6279),u=e(8227),s=e(1181),c=e(5966),f=e(7657).IteratorPrototype,p=e(2529),l=e(9539),h=e(1385),v=u("toStringTag"),d="IteratorHelper",y="WrapForValidIterator",g="normal",x="throw",b=s.set,m=function(t){var r=s.getterFor(t?y:d);return a(o(f),{next:function(){var e=r(this);if(t)return e.nextHandler();if(e.done)return p(void 0,!0);try{var n=e.nextHandler();return e.returnHandlerResult?n:p(n,e.done)}catch(t){throw e.done=!0,t}},return:function(){var e=r(this),o=e.iterator;if(e.done=!0,t){var i=c(o,"return");return i?n(i,o):p(void 0,!0)}if(e.inner)try{l(e.inner.iterator,g)}catch(t){return l(o,x,t)}if(e.openIters)try{h(e.openIters,g)}catch(t){return l(o,x,t)}return o&&l(o,g),p(void 0,!0)}})},w=m(!0),S=m(!1);i(S,v,"Iterator Helper"),t.exports=function(t,r,e){var n=function(n,o){o?(o.iterator=n.iterator,o.next=n.next):o=n,o.type=r?y:d,o.returnHandlerResult=!!e,o.nextHandler=t,o.counter=0,o.done=!1,b(this,o)};return n.prototype=r?w:S,n}},9504:(t,r,e)=>{var n=e(616),o=Function.prototype,i=o.call,a=n&&o.bind.bind(i,i);t.exports=n?a:function(t){return function(){return i.apply(t,arguments)}}},9519:(t,r,e)=>{var n,o,i=e(4576),a=e(2839),u=i.process,s=i.Deno,c=u&&u.versions||s&&s.version,f=c&&c.v8;f&&(o=(n=f.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(o=+n[1]),t.exports=o},9539:(t,r,e)=>{var n=e(9565),o=e(8551),i=e(5966);t.exports=function(t,r,e){var a,u;o(t);try{if(!(a=i(t,"return"))){if("throw"===r)throw e;return e}a=n(a,t)}catch(t){u=!0,a=t}if("throw"===r)throw e;if(u)throw a;return o(a),e}},9565:(t,r,e)=>{var n=e(616),o=Function.prototype.call;t.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},9617:(t,r,e)=>{var n=e(5397),o=e(5610),i=e(6198),a=function(t){return function(r,e,a){var u=n(r),s=i(u);if(0===s)return!t&&-1;var c,f=o(a,s);if(t&&e!=e){for(;s>f;)if((c=u[f++])!=c)return!0}else for(;s>f;f++)if((t||f in u)&&u[f]===e)return t||f||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},9835:t=>{t.exports=function(t){try{var r=new Set,e={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return r.clear(),r.add(4),function(){return{done:!0}}}})}},n=r[t](e);return 1===n.size&&4===n.values().next().value}catch(t){return!1}}}},r={};function e(n){var o=r[n];if(void 0!==o)return o.exports;var i=r[n]={exports:{}};return t[n].call(i.exports,i,i.exports,e),i.exports}e.d=(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r);var n={};e.d(n,{default:()=>a}),e(7642),e(8004),e(3853),e(5876),e(2475),e(5024),e(1698),e(8992),e(1454);var o=e(3843);class i extends o.A{cardinalWords=[this.zero,"uno","due","tre","quattro","cinque","sei","sette","otto","nove","dieci","undici","dodici","tredici","quattordici","quindici","sedici","diciassette","diciotto","diciannove"];strTens={2:"venti",3:"trenta",4:"quaranta",6:"sessanta"};exponentPrefixes=[this.zero,"m","b","tr","quadr","quint","sest","sett","ott","nov","dec"];constructor(t){super(t=Object.assign({negativeWord:"meno",separatorWord:"virgola",zero:"zero"},t),[])}accentuate(t){return t.split(" ").map(t=>"tre"==t.slice(-3)&&t.length>3?t.replaceAll("tré","tre").slice(0,-3)+"tré":t.replaceAll("tré","tre")).join(" ")}omitIfZero(t){return t==this.zero?"":t}phoneticContraction(t){return t.replaceAll("oo","o").replaceAll("ao","o").replaceAll("io","o").replaceAll("au","u").replaceAll("iu","u")}tensToCardinal(t){const r=Math.floor(t/10),e=t%10;let n;n=Object.prototype.hasOwnProperty.call(this.strTens,r)?this.strTens[r]:this.cardinalWords[r].slice(0,-1)+"anta";const o=this.omitIfZero(this.cardinalWords[e]);return this.phoneticContraction(n+o)}hundredsToCardinal(t){const r=Math.floor(t/100);let e="cento";1!=r&&(e=this.cardinalWords[r]+e);const n=this.omitIfZero(this.toCardinal(t%100));return this.phoneticContraction(e+n)}thousandsToCardinal(t){const r=Math.floor(t/1e3);let e;return e=1==r?"mille":this.toCardinal(r)+"mila",e+this.omitIfZero(this.toCardinal(t%1e3))}exponentLengthToString(t){const r=this.exponentPrefixes[Math.floor(t/6)];return t%6==0?r+"ilione":r+"iliardo"}bigNumberToCardinal(t){const r=[...t.toString()];let e=r.length%3;0==e&&(e=3);const n=r.slice(0,e),o=r.slice(e);let i,a,u=this.exponentLengthToString(o.length);var s,c;return"1"==n?i="un ":(i=this.toCardinal(Math.trunc(Number(n.join("")))),u=" "+u.slice(0,-1)+"i"),s=new Set(o),c=new Set(["0"]),s.size==c.size&&[...s].every(t=>c.has(t))?a="":(a=this.toCardinal(Math.trunc(o.join(""))),u+=a.includes(" e ")?", ":" e "),i+u+a}toCardinal(t){let r="";return r=t<20?this.cardinalWords[t]:t<100?this.tensToCardinal(Number(t)):t<1e3?this.hundredsToCardinal(Number(t)):t<1e6?this.thousandsToCardinal(Number(t)):this.bigNumberToCardinal(t),this.accentuate(r)}}function a(t,r={}){return new i(r).floatToCardinal(t)}return n.default})());
//# sourceMappingURL=it.js.map