n2words 1.22.0 → 1.23.1

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.
Files changed (65) hide show
  1. package/README.md +4 -4
  2. package/dist/ar.js +1 -1
  3. package/dist/ar.js.map +1 -1
  4. package/dist/az.js +1 -1
  5. package/dist/az.js.map +1 -1
  6. package/dist/cz.js +1 -1
  7. package/dist/cz.js.map +1 -1
  8. package/dist/de.js +1 -1
  9. package/dist/de.js.map +1 -1
  10. package/dist/dk.js +1 -1
  11. package/dist/dk.js.map +1 -1
  12. package/dist/en.js +1 -1
  13. package/dist/en.js.map +1 -1
  14. package/dist/es.js +1 -1
  15. package/dist/es.js.map +1 -1
  16. package/dist/fa.js +1 -1
  17. package/dist/fa.js.map +1 -1
  18. package/dist/fr-BE.js +1 -1
  19. package/dist/fr-BE.js.map +1 -1
  20. package/dist/fr.js +1 -1
  21. package/dist/fr.js.map +1 -1
  22. package/dist/he.js +1 -1
  23. package/dist/he.js.map +1 -1
  24. package/dist/hr.js +1 -1
  25. package/dist/hr.js.map +1 -1
  26. package/dist/hu.js +1 -1
  27. package/dist/hu.js.map +1 -1
  28. package/dist/id.js +1 -1
  29. package/dist/id.js.map +1 -1
  30. package/dist/it.js +1 -1
  31. package/dist/it.js.map +1 -1
  32. package/dist/ko.js +1 -1
  33. package/dist/ko.js.map +1 -1
  34. package/dist/lt.js +1 -1
  35. package/dist/lt.js.map +1 -1
  36. package/dist/lv.js +1 -1
  37. package/dist/lv.js.map +1 -1
  38. package/dist/n2words.js +1 -1
  39. package/dist/n2words.js.map +1 -1
  40. package/dist/nl.js +1 -1
  41. package/dist/nl.js.map +1 -1
  42. package/dist/no.js +1 -1
  43. package/dist/no.js.map +1 -1
  44. package/dist/pl.js +1 -1
  45. package/dist/pl.js.map +1 -1
  46. package/dist/pt.js +1 -1
  47. package/dist/pt.js.map +1 -1
  48. package/dist/ro.js +1 -1
  49. package/dist/ro.js.map +1 -1
  50. package/dist/ru.js +1 -1
  51. package/dist/ru.js.map +1 -1
  52. package/dist/sr.js +1 -1
  53. package/dist/sr.js.map +1 -1
  54. package/dist/tr.js +1 -1
  55. package/dist/tr.js.map +1 -1
  56. package/dist/uk.js +1 -1
  57. package/dist/uk.js.map +1 -1
  58. package/dist/vi.js +1 -1
  59. package/dist/vi.js.map +1 -1
  60. package/dist/zh.js +1 -1
  61. package/dist/zh.js.map +1 -1
  62. package/lib/i18n/fa.js +2 -2
  63. package/lib/i18n/fr.d.ts +1 -1
  64. package/lib/i18n/fr.js +7 -5
  65. package/package.json +1 -1
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # n2words
2
2
 
3
- [![Test](https://github.com/forzagreen/n2words/workflows/Test/badge.svg?branch=master)](https://github.com/forzagreen/n2words/actions)
4
- [![Coverage Status](https://coveralls.io/repos/github/forzagreen/n2words/badge.svg?branch=master)](https://coveralls.io/github/forzagreen/n2words?branch=master)
3
+ [![CI](https://github.com/forzagreen/n2words/actions/workflows/test.yml/badge.svg)](https://github.com/forzagreen/n2words/actions/workflows/test.yml)
4
+ [![Coverage Status](https://coveralls.io/repos/github/forzagreen/n2words/badge.svg?branch=main)](https://coveralls.io/github/forzagreen/n2words?branch=main)
5
5
  [![npm](https://img.shields.io/npm/v/n2words.svg)](https://npmjs.com/package/n2words)
6
6
  [![npm](https://img.shields.io/npm/dw/n2words)](https://npmjs.com/package/n2words)
7
7
  [![jsDelivr](https://data.jsdelivr.com/v1/package/npm/n2words/badge)](https://www.jsdelivr.com/package/npm/n2words)
@@ -16,7 +16,7 @@ n2words(-1.5) // 'minus one point five'
16
16
 
17
17
  n2words(123, {lang: 'fr'}) // 'cent vingt-trois'
18
18
  n2words(123, {lang: 'es'}) // 'ciento veintitrés'
19
- n2words(123, {lang: 'ar'}) // 'مائة و ثلاثة و عشرون'
19
+ n2words(123, {lang: 'ar'}) // 'مائة وثلاثة وعشرون'
20
20
  ```
21
21
 
22
22
  See the [Wiki](https://github.com/forzagreen/n2words/wiki) for examples and advanced usage like [importing only specific languages](https://github.com/forzagreen/n2words/wiki/Importing-only-specific-languages).
@@ -91,4 +91,4 @@ __This library is in active development.__ We want to improve the design and pro
91
91
 
92
92
  ## License
93
93
 
94
- [MIT](https://github.com/forzagreen/n2words/blob/master/LICENSE)
94
+ [MIT](https://github.com/forzagreen/n2words/blob/main/LICENSE)
package/dist/ar.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(r,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.n2words=t():r.n2words=t()}(this,()=>(()=>{"use strict";var r={34:(r,t,e)=>{var n=e(4901);r.exports=function(r){return"object"==typeof r?null!==r:n(r)}},283:(r,t,e)=>{var n=e(9504),o=e(9039),i=e(4901),a=e(9297),u=e(3724),s=e(350).CONFIGURABLE,c=e(3706),p=e(1181),f=p.enforce,l=p.get,h=String,v=Object.defineProperty,b=n("".slice),y=n("".replace),d=n([].join),g=u&&!o(function(){return 8!==v(function(){},"length",{value:8}).length}),m=String(String).split("String"),x=r.exports=function(r,t,e){"Symbol("===b(h(t),0,7)&&(t="["+y(h(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),e&&e.getter&&(t="get "+t),e&&e.setter&&(t="set "+t),(!a(r,"name")||s&&r.name!==t)&&(u?v(r,"name",{value:t,configurable:!0}):r.name=t),g&&e&&a(e,"arity")&&r.length!==e.arity&&v(r,"length",{value:e.arity});try{e&&a(e,"constructor")&&e.constructor?u&&v(r,"prototype",{writable:!1}):r.prototype&&(r.prototype=void 0)}catch(r){}var n=f(r);return a(n,"source")||(n.source=d(m,"string"==typeof t?t:"")),r};Function.prototype.toString=x(function(){return i(this)&&l(this).source||c(this)},"toString")},350:(r,t,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);r.exports={EXISTS:u,PROPER:s,CONFIGURABLE:c}},421:r=>{r.exports={}},616:(r,t,e)=>{var n=e(9039);r.exports=!n(function(){var r=function(){}.bind();return"function"!=typeof r||r.hasOwnProperty("prototype")})},741:r=>{var t=Math.ceil,e=Math.floor;r.exports=Math.trunc||function(r){var n=+r;return(n>0?e:t)(n)}},757:(r,t,e)=>{var n=e(7751),o=e(4901),i=e(1625),a=e(7040),u=Object;r.exports=a?function(r){return"symbol"==typeof r}:function(r){var t=n("Symbol");return o(t)&&i(t.prototype,u(r))}},1181:(r,t,e)=>{var n,o,i,a=e(8622),u=e(4576),s=e(34),c=e(6699),p=e(9297),f=e(7629),l=e(6119),h=e(421),v="Object already initialized",b=u.TypeError,y=u.WeakMap;if(a||f.state){var d=f.state||(f.state=new y);d.get=d.get,d.has=d.has,d.set=d.set,n=function(r,t){if(d.has(r))throw new b(v);return t.facade=r,d.set(r,t),t},o=function(r){return d.get(r)||{}},i=function(r){return d.has(r)}}else{var g=l("state");h[g]=!0,n=function(r,t){if(p(r,g))throw new b(v);return t.facade=r,c(r,g,t),t},o=function(r){return p(r,g)?r[g]:{}},i=function(r){return p(r,g)}}r.exports={set:n,get:o,has:i,enforce:function(r){return i(r)?o(r):n(r,{})},getterFor:function(r){return function(t){var e;if(!s(t)||(e=o(t)).type!==r)throw new b("Incompatible receiver, "+r+" required");return e}}}},1291:(r,t,e)=>{var n=e(741);r.exports=function(r){var t=+r;return t!=t||0===t?0:n(t)}},1625:(r,t,e)=>{var n=e(9504);r.exports=n({}.isPrototypeOf)},1828:(r,t,e)=>{var n=e(9504),o=e(9297),i=e(5397),a=e(9617).indexOf,u=e(421),s=n([].push);r.exports=function(r,t){var e,n=i(r),c=0,p=[];for(e in n)!o(u,e)&&o(n,e)&&s(p,e);for(;t.length>c;)o(n,e=t[c++])&&(~a(p,e)||s(p,e));return p}},2195:(r,t,e)=>{var n=e(9504),o=n({}.toString),i=n("".slice);r.exports=function(r){return i(o(r),8,-1)}},2777:(r,t,e)=>{var n=e(9565),o=e(34),i=e(757),a=e(5966),u=e(4270),s=e(8227),c=TypeError,p=s("toPrimitive");r.exports=function(r,t){if(!o(r)||i(r))return r;var e,s=a(r,p);if(s){if(void 0===t&&(t="default"),e=n(s,r,t),!o(e)||i(e))return e;throw new c("Can't convert object to primitive value")}return void 0===t&&(t="number"),u(r,t)}},2796:(r,t,e)=>{var n=e(9039),o=e(4901),i=/#|\.prototype\./,a=function(r,t){var e=s[u(r)];return e===p||e!==c&&(o(t)?n(t):!!t)},u=a.normalize=function(r){return String(r).replace(i,".").toLowerCase()},s=a.data={},c=a.NATIVE="N",p=a.POLYFILL="P";r.exports=a},2839:(r,t,e)=>{var n=e(4576).navigator,o=n&&n.userAgent;r.exports=o?String(o):""},3392:(r,t,e)=>{var n=e(9504),o=0,i=Math.random(),a=n(1.1.toString);r.exports=function(r){return"Symbol("+(void 0===r?"":r)+")_"+a(++o+i,36)}},3706:(r,t,e)=>{var n=e(9504),o=e(4901),i=e(7629),a=n(Function.toString);o(i.inspectSource)||(i.inspectSource=function(r){return a(r)}),r.exports=i.inspectSource},3717:(r,t)=>{t.f=Object.getOwnPropertySymbols},3724:(r,t,e)=>{var n=e(9039);r.exports=!n(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},4055:(r,t,e)=>{var n=e(4576),o=e(34),i=n.document,a=o(i)&&o(i.createElement);r.exports=function(r){return a?i.createElement(r):{}}},4114:(r,t,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(r){return r instanceof TypeError}}()},{push:function(r){var t=o(this),e=i(t),n=arguments.length;u(e+n);for(var s=0;s<n;s++)t[e]=arguments[s],e++;return a(t,e),e}})},4117:r=>{r.exports=function(r){return null==r}},4270:(r,t,e)=>{var n=e(9565),o=e(4901),i=e(34),a=TypeError;r.exports=function(r,t){var e,u;if("string"===t&&o(e=r.toString)&&!i(u=n(e,r)))return u;if(o(e=r.valueOf)&&!i(u=n(e,r)))return u;if("string"!==t&&o(e=r.toString)&&!i(u=n(e,r)))return u;throw new a("Can't convert object to primitive value")}},4376:(r,t,e)=>{var n=e(2195);r.exports=Array.isArray||function(r){return"Array"===n(r)}},4495:(r,t,e)=>{var n=e(9519),o=e(9039),i=e(4576).String;r.exports=!!Object.getOwnPropertySymbols&&!o(function(){var r=Symbol("symbol detection");return!i(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&n&&n<41})},4527:(r,t,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(r){return r instanceof TypeError}}();r.exports=u?function(r,t){if(o(r)&&!a(r,"length").writable)throw new i("Cannot set read only .length");return r.length=t}:function(r,t){return r.length=t}},4576:function(r){var t=function(r){return r&&r.Math===Math&&r};r.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof global&&global)||t("object"==typeof this&&this)||function(){return this}()||Function("return this")()},4901:r=>{var t="object"==typeof document&&document.all;r.exports=void 0===t&&void 0!==t?function(r){return"function"==typeof r||r===t}:function(r){return"function"==typeof r}},4913:(r,t,e)=>{var n=e(3724),o=e(5917),i=e(8686),a=e(8551),u=e(6969),s=TypeError,c=Object.defineProperty,p=Object.getOwnPropertyDescriptor,f="enumerable",l="configurable",h="writable";t.f=n?i?function(r,t,e){if(a(r),t=u(t),a(e),"function"==typeof r&&"prototype"===t&&"value"in e&&h in e&&!e[h]){var n=p(r,t);n&&n[h]&&(r[t]=e.value,e={configurable:l in e?e[l]:n[l],enumerable:f in e?e[f]:n[f],writable:!1})}return c(r,t,e)}:c:function(r,t,e){if(a(r),t=u(t),a(e),o)try{return c(r,t,e)}catch(r){}if("get"in e||"set"in e)throw new s("Accessors not supported");return"value"in e&&(r[t]=e.value),r}},5031:(r,t,e)=>{var n=e(7751),o=e(9504),i=e(8480),a=e(3717),u=e(8551),s=o([].concat);r.exports=n("Reflect","ownKeys")||function(r){var t=i.f(u(r)),e=a.f;return e?s(t,e(r)):t}},5397:(r,t,e)=>{var n=e(7055),o=e(7750);r.exports=function(r){return n(o(r))}},5610:(r,t,e)=>{var n=e(1291),o=Math.max,i=Math.min;r.exports=function(r,t){var e=n(r);return e<0?o(e+t,0):i(e,t)}},5745:(r,t,e)=>{var n=e(7629);r.exports=function(r,t){return n[r]||(n[r]=t||{})}},5917:(r,t,e)=>{var n=e(3724),o=e(9039),i=e(4055);r.exports=!n&&!o(function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})},5966:(r,t,e)=>{var n=e(9306),o=e(4117);r.exports=function(r,t){var e=r[t];return o(e)?void 0:n(e)}},6119:(r,t,e)=>{var n=e(5745),o=e(3392),i=n("keys");r.exports=function(r){return i[r]||(i[r]=o(r))}},6198:(r,t,e)=>{var n=e(8014);r.exports=function(r){return n(r.length)}},6298:(r,t,e)=>{e.d(t,{A:()=>n}),e(4114);const n=class{#r;#t;#e;#n;#o;constructor(r){r=Object.assign({negativeWord:"",separatorWord:"",zero:"",spaceSeparator:" "},r),this.#r=r.negativeWord,this.#t=r.separatorWord,this.#e=r.zero,this.#n=r.spaceSeparator}get negativeWord(){return this.#r}get separatorWord(){return this.#t}get zero(){return this.#e}get spaceSeparator(){return this.#n}get wholeNumber(){return this.#o}decimalToCardinal(r){const t=[],e=[...r];let n=0;for(;n<e.length&&"0"===e[n];)t.push(this.zero),n++;return n===e.length?t:[...t,this.toCardinal(BigInt(r))]}floatToCardinal(r){if("number"==typeof r){if(Number.isNaN(r))throw new TypeError("NaN is not an accepted number.");r=r.toString()}else if("string"==typeof r){if(0===(r=r.trim()).length||Number.isNaN(Number(r)))throw new Error('"'+r+'" is not a valid number.')}else if("bigint"!=typeof r)throw new TypeError("Invalid variable type: "+typeof r);let t,e,n=[];if(r<0&&n.push(this.negativeWord),"bigint"==typeof r)t=r;else{const n=r.split(".");t=BigInt(n[0]),e=n[1]}return t<0&&(t=-t),this.#o=t,n=[...n,this.toCardinal(t)],e&&(n.push(this.separatorWord),n=[...n,...this.decimalToCardinal(e)]),n.join(this.spaceSeparator)}}},6395:r=>{r.exports=!1},6518:(r,t,e)=>{var n=e(4576),o=e(7347).f,i=e(6699),a=e(6840),u=e(9433),s=e(7740),c=e(2796);r.exports=function(r,t){var e,p,f,l,h,v=r.target,b=r.global,y=r.stat;if(e=b?n:y?n[v]||u(v,{}):n[v]&&n[v].prototype)for(p in t){if(l=t[p],f=r.dontCallGetSet?(h=o(e,p))&&h.value:e[p],!c(b?p:v+(y?".":"#")+p,r.forced)&&void 0!==f){if(typeof l==typeof f)continue;s(l,f)}(r.sham||f&&f.sham)&&i(l,"sham",!0),a(e,p,l,r)}}},6699:(r,t,e)=>{var n=e(3724),o=e(4913),i=e(6980);r.exports=n?function(r,t,e){return o.f(r,t,i(1,e))}:function(r,t,e){return r[t]=e,r}},6823:r=>{var t=String;r.exports=function(r){try{return t(r)}catch(r){return"Object"}}},6837:r=>{var t=TypeError;r.exports=function(r){if(r>9007199254740991)throw t("Maximum allowed index exceeded");return r}},6840:(r,t,e)=>{var n=e(4901),o=e(4913),i=e(283),a=e(9433);r.exports=function(r,t,e,u){u||(u={});var s=u.enumerable,c=void 0!==u.name?u.name:t;if(n(e)&&i(e,c,u),u.global)s?r[t]=e:a(t,e);else{try{u.unsafe?r[t]&&(s=!0):delete r[t]}catch(r){}s?r[t]=e:o.f(r,t,{value:e,enumerable:!1,configurable:!u.nonConfigurable,writable:!u.nonWritable})}return r}},6969:(r,t,e)=>{var n=e(2777),o=e(757);r.exports=function(r){var t=n(r,"string");return o(t)?t:t+""}},6980:r=>{r.exports=function(r,t){return{enumerable:!(1&r),configurable:!(2&r),writable:!(4&r),value:t}}},7040:(r,t,e)=>{var n=e(4495);r.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7055:(r,t,e)=>{var n=e(9504),o=e(9039),i=e(2195),a=Object,u=n("".split);r.exports=o(function(){return!a("z").propertyIsEnumerable(0)})?function(r){return"String"===i(r)?u(r,""):a(r)}:a},7347:(r,t,e)=>{var n=e(3724),o=e(9565),i=e(8773),a=e(6980),u=e(5397),s=e(6969),c=e(9297),p=e(5917),f=Object.getOwnPropertyDescriptor;t.f=n?f:function(r,t){if(r=u(r),t=s(t),p)try{return f(r,t)}catch(r){}if(c(r,t))return a(!o(i.f,r,t),r[t])}},7629:(r,t,e)=>{var n=e(6395),o=e(4576),i=e(9433),a="__core-js_shared__",u=r.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"})},7740:(r,t,e)=>{var n=e(9297),o=e(5031),i=e(7347),a=e(4913);r.exports=function(r,t,e){for(var u=o(t),s=a.f,c=i.f,p=0;p<u.length;p++){var f=u[p];n(r,f)||e&&n(e,f)||s(r,f,c(t,f))}}},7750:(r,t,e)=>{var n=e(4117),o=TypeError;r.exports=function(r){if(n(r))throw new o("Can't call method on "+r);return r}},7751:(r,t,e)=>{var n=e(4576),o=e(4901);r.exports=function(r,t){return arguments.length<2?(e=n[r],o(e)?e:void 0):n[r]&&n[r][t];var e}},8014:(r,t,e)=>{var n=e(1291),o=Math.min;r.exports=function(r){var t=n(r);return t>0?o(t,9007199254740991):0}},8227:(r,t,e)=>{var n=e(4576),o=e(5745),i=e(9297),a=e(3392),u=e(4495),s=e(7040),c=n.Symbol,p=o("wks"),f=s?c.for||c:c&&c.withoutSetter||a;r.exports=function(r){return i(p,r)||(p[r]=u&&i(c,r)?c[r]:f("Symbol."+r)),p[r]}},8480:(r,t,e)=>{var n=e(1828),o=e(8727).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(r){return n(r,o)}},8551:(r,t,e)=>{var n=e(34),o=String,i=TypeError;r.exports=function(r){if(n(r))return r;throw new i(o(r)+" is not an object")}},8622:(r,t,e)=>{var n=e(4576),o=e(4901),i=n.WeakMap;r.exports=o(i)&&/native code/.test(String(i))},8686:(r,t,e)=>{var n=e(3724),o=e(9039);r.exports=n&&o(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},8727:r=>{r.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},8773:(r,t)=>{var e={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!e.call({1:2},1);t.f=o?function(r){var t=n(this,r);return!!t&&t.enumerable}:e},8981:(r,t,e)=>{var n=e(7750),o=Object;r.exports=function(r){return o(n(r))}},9039:r=>{r.exports=function(r){try{return!!r()}catch(r){return!0}}},9297:(r,t,e)=>{var n=e(9504),o=e(8981),i=n({}.hasOwnProperty);r.exports=Object.hasOwn||function(r,t){return i(o(r),t)}},9306:(r,t,e)=>{var n=e(4901),o=e(6823),i=TypeError;r.exports=function(r){if(n(r))return r;throw new i(o(r)+" is not a function")}},9433:(r,t,e)=>{var n=e(4576),o=Object.defineProperty;r.exports=function(r,t){try{o(n,r,{value:t,configurable:!0,writable:!0})}catch(e){n[r]=t}return t}},9504:(r,t,e)=>{var n=e(616),o=Function.prototype,i=o.call,a=n&&o.bind.bind(i,i);r.exports=n?a:function(r){return function(){return i.apply(r,arguments)}}},9519:(r,t,e)=>{var n,o,i=e(4576),a=e(2839),u=i.process,s=i.Deno,c=u&&u.versions||s&&s.version,p=c&&c.v8;p&&(o=(n=p.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]),r.exports=o},9565:(r,t,e)=>{var n=e(616),o=Function.prototype.call;r.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},9617:(r,t,e)=>{var n=e(5397),o=e(5610),i=e(6198),a=function(r){return function(t,e,a){var u=n(t),s=i(u);if(0===s)return!r&&-1;var c,p=o(a,s);if(r&&e!=e){for(;s>p;)if((c=u[p++])!=c)return!0}else for(;s>p;p++)if((r||p in u)&&u[p]===e)return r||p||0;return!r&&-1}};r.exports={includes:a(!0),indexOf:a(!1)}}},t={};function e(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return r[n].call(i.exports,i,i.exports,e),i.exports}e.d=(r,t)=>{for(var n in t)e.o(t,n)&&!e.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:t[n]})},e.o=(r,t)=>Object.prototype.hasOwnProperty.call(r,t);var n={};e.d(n,{default:()=>a});var o=e(6298);class i extends o.A{number;feminine;ones={masculine:["واحد","اثنان","ثلاثة","أربعة","خمسة","ستة","سبعة","ثمانية","تسعة","عشرة","أحد عشر","اثنا عشر","ثلاثة عشر","أربعة عشر","خمسة عشر","ستة عشر","سبعة عشر","ثمانية عشر","تسعة عشر"],feminine:["واحدة","اثنتان","ثلاث","أربع","خمس","ست","سبع","ثمان","تسع","عشر","إحدى عشرة","اثنتا عشرة","ثلاث عشرة","أربع عشرة","خمس عشرة","ست عشرة","سبع عشرة","ثماني عشرة","تسع عشرة"]};arabicTens=["عشرون","ثلاثون","أربعون","خمسون","ستون","سبعون","ثمانون","تسعون"];arabicHundreds=["","مائة","مئتان","ثلاثمائة","أربعمائة","خمسمائة","ستمائة","سبعمائة","ثمانمائة","تسعمائة"];arabicAppendedTwos=["مئتا","ألفا","مليونا","مليارا","تريليونا","كوادريليونا","كوينتليونا","سكستيليونا"];arabicTwos=["مئتان","ألفان","مليونان","ملياران","تريليونان","كوادريليونان","كوينتليونان","سكستيليونان"];arabicGroup=["مائة","ألف","مليون","مليار","تريليون","كوادريليون","كوينتليون","سكستيليون"];arabicAppendedGroup=["","ألفاً","مليوناً","ملياراً","تريليوناً","كوادريليوناً","كوينتليوناً","سكستيليوناً"];arabicPluralGroups=["","آلاف","ملايين","مليارات","تريليونات","كوادريليونات","كوينتليونات","سكستيليونات"];constructor(r){super(r=Object.assign({negativeWord:"ناقص",separatorWord:"فاصلة",zero:"صفر",feminine:!1},r)),this.feminine=r.feminine}digitFeminineStatus(r){return this.ones[this.feminine?"feminine":"masculine"][r-1]}processArabicGroup(r,t){let e=r%100;const n=r/100;let o="";if(Math.trunc(n)>0&&(0==e&&2==Math.trunc(n)?o=this.arabicTwos[0]:(o=this.arabicHundreds[Math.trunc(n)],""!=o&&0!=e&&(o+=" و"))),e>0&&e<20)if(2===e&&0===Math.trunc(n)&&t>0){const e=Math.trunc(Math.log10(Number(this.number)));o=e%3==0&&this.number===2*Math.pow(10,e)?2===r?this.arabicTwos[Math.trunc(t)]:this.arabicAppendedTwos[Math.trunc(t)]:this.arabicTwos[Math.trunc(t)]}else o+=1===e&&t>0?this.arabicGroup[Math.trunc(t)]:this.digitFeminineStatus(Math.trunc(e),t);else if(e>=20){const r=e%10,n=e/10-2;r>0&&(o+=this.digitFeminineStatus(r,t)),""!=o&&0!=r&&(o+=" و"),o+=this.arabicTens[Math.trunc(n)]}return o}toCardinal(r){if(0==r)return this.zero;this.number=r;let t,e=r,n=0,o="";for(;e>0;){t=e;const r=Number(t%1000n);e=t/1000n;const i=this.processArabicGroup(r,n);""!=i&&(n>0&&(""!=o&&(o=" و"+o),r>2&&(o=r%100==1?this.arabicGroup[n]+" "+o:r>=3&&r<=10?this.arabicPluralGroups[n]+" "+o:""==o?this.arabicGroup[n]+" "+o:this.arabicAppendedGroup[n]+" "+o)),o=i+" "+o),n++}return o=o.replaceAll(/ +/g," "),o.trim()}}function a(r,t={}){return new i(t).floatToCardinal(r)}return n.default})());
1
+ !function(r,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.n2words=t():r.n2words=t()}(this,()=>(()=>{"use strict";var r={34:(r,t,e)=>{var n=e(4901);r.exports=function(r){return"object"==typeof r?null!==r:n(r)}},283:(r,t,e)=>{var n=e(9504),o=e(9039),i=e(4901),a=e(9297),u=e(3724),s=e(350).CONFIGURABLE,c=e(3706),p=e(1181),f=p.enforce,l=p.get,h=String,v=Object.defineProperty,b=n("".slice),y=n("".replace),d=n([].join),g=u&&!o(function(){return 8!==v(function(){},"length",{value:8}).length}),m=String(String).split("String"),x=r.exports=function(r,t,e){"Symbol("===b(h(t),0,7)&&(t="["+y(h(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),e&&e.getter&&(t="get "+t),e&&e.setter&&(t="set "+t),(!a(r,"name")||s&&r.name!==t)&&(u?v(r,"name",{value:t,configurable:!0}):r.name=t),g&&e&&a(e,"arity")&&r.length!==e.arity&&v(r,"length",{value:e.arity});try{e&&a(e,"constructor")&&e.constructor?u&&v(r,"prototype",{writable:!1}):r.prototype&&(r.prototype=void 0)}catch(r){}var n=f(r);return a(n,"source")||(n.source=d(m,"string"==typeof t?t:"")),r};Function.prototype.toString=x(function(){return i(this)&&l(this).source||c(this)},"toString")},350:(r,t,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);r.exports={EXISTS:u,PROPER:s,CONFIGURABLE:c}},421:r=>{r.exports={}},616:(r,t,e)=>{var n=e(9039);r.exports=!n(function(){var r=function(){}.bind();return"function"!=typeof r||r.hasOwnProperty("prototype")})},741:r=>{var t=Math.ceil,e=Math.floor;r.exports=Math.trunc||function(r){var n=+r;return(n>0?e:t)(n)}},757:(r,t,e)=>{var n=e(7751),o=e(4901),i=e(1625),a=e(7040),u=Object;r.exports=a?function(r){return"symbol"==typeof r}:function(r){var t=n("Symbol");return o(t)&&i(t.prototype,u(r))}},1181:(r,t,e)=>{var n,o,i,a=e(8622),u=e(4576),s=e(34),c=e(6699),p=e(9297),f=e(7629),l=e(6119),h=e(421),v="Object already initialized",b=u.TypeError,y=u.WeakMap;if(a||f.state){var d=f.state||(f.state=new y);d.get=d.get,d.has=d.has,d.set=d.set,n=function(r,t){if(d.has(r))throw new b(v);return t.facade=r,d.set(r,t),t},o=function(r){return d.get(r)||{}},i=function(r){return d.has(r)}}else{var g=l("state");h[g]=!0,n=function(r,t){if(p(r,g))throw new b(v);return t.facade=r,c(r,g,t),t},o=function(r){return p(r,g)?r[g]:{}},i=function(r){return p(r,g)}}r.exports={set:n,get:o,has:i,enforce:function(r){return i(r)?o(r):n(r,{})},getterFor:function(r){return function(t){var e;if(!s(t)||(e=o(t)).type!==r)throw new b("Incompatible receiver, "+r+" required");return e}}}},1291:(r,t,e)=>{var n=e(741);r.exports=function(r){var t=+r;return t!=t||0===t?0:n(t)}},1625:(r,t,e)=>{var n=e(9504);r.exports=n({}.isPrototypeOf)},1828:(r,t,e)=>{var n=e(9504),o=e(9297),i=e(5397),a=e(9617).indexOf,u=e(421),s=n([].push);r.exports=function(r,t){var e,n=i(r),c=0,p=[];for(e in n)!o(u,e)&&o(n,e)&&s(p,e);for(;t.length>c;)o(n,e=t[c++])&&(~a(p,e)||s(p,e));return p}},2195:(r,t,e)=>{var n=e(9504),o=n({}.toString),i=n("".slice);r.exports=function(r){return i(o(r),8,-1)}},2777:(r,t,e)=>{var n=e(9565),o=e(34),i=e(757),a=e(5966),u=e(4270),s=e(8227),c=TypeError,p=s("toPrimitive");r.exports=function(r,t){if(!o(r)||i(r))return r;var e,s=a(r,p);if(s){if(void 0===t&&(t="default"),e=n(s,r,t),!o(e)||i(e))return e;throw new c("Can't convert object to primitive value")}return void 0===t&&(t="number"),u(r,t)}},2796:(r,t,e)=>{var n=e(9039),o=e(4901),i=/#|\.prototype\./,a=function(r,t){var e=s[u(r)];return e===p||e!==c&&(o(t)?n(t):!!t)},u=a.normalize=function(r){return String(r).replace(i,".").toLowerCase()},s=a.data={},c=a.NATIVE="N",p=a.POLYFILL="P";r.exports=a},2839:(r,t,e)=>{var n=e(4576).navigator,o=n&&n.userAgent;r.exports=o?String(o):""},3392:(r,t,e)=>{var n=e(9504),o=0,i=Math.random(),a=n(1.1.toString);r.exports=function(r){return"Symbol("+(void 0===r?"":r)+")_"+a(++o+i,36)}},3706:(r,t,e)=>{var n=e(9504),o=e(4901),i=e(7629),a=n(Function.toString);o(i.inspectSource)||(i.inspectSource=function(r){return a(r)}),r.exports=i.inspectSource},3717:(r,t)=>{t.f=Object.getOwnPropertySymbols},3724:(r,t,e)=>{var n=e(9039);r.exports=!n(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},4055:(r,t,e)=>{var n=e(4576),o=e(34),i=n.document,a=o(i)&&o(i.createElement);r.exports=function(r){return a?i.createElement(r):{}}},4114:(r,t,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(r){return r instanceof TypeError}}()},{push:function(r){var t=o(this),e=i(t),n=arguments.length;u(e+n);for(var s=0;s<n;s++)t[e]=arguments[s],e++;return a(t,e),e}})},4117:r=>{r.exports=function(r){return null==r}},4270:(r,t,e)=>{var n=e(9565),o=e(4901),i=e(34),a=TypeError;r.exports=function(r,t){var e,u;if("string"===t&&o(e=r.toString)&&!i(u=n(e,r)))return u;if(o(e=r.valueOf)&&!i(u=n(e,r)))return u;if("string"!==t&&o(e=r.toString)&&!i(u=n(e,r)))return u;throw new a("Can't convert object to primitive value")}},4376:(r,t,e)=>{var n=e(2195);r.exports=Array.isArray||function(r){return"Array"===n(r)}},4495:(r,t,e)=>{var n=e(9519),o=e(9039),i=e(4576).String;r.exports=!!Object.getOwnPropertySymbols&&!o(function(){var r=Symbol("symbol detection");return!i(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&n&&n<41})},4527:(r,t,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(r){return r instanceof TypeError}}();r.exports=u?function(r,t){if(o(r)&&!a(r,"length").writable)throw new i("Cannot set read only .length");return r.length=t}:function(r,t){return r.length=t}},4576:function(r){var t=function(r){return r&&r.Math===Math&&r};r.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof global&&global)||t("object"==typeof this&&this)||function(){return this}()||Function("return this")()},4901:r=>{var t="object"==typeof document&&document.all;r.exports=void 0===t&&void 0!==t?function(r){return"function"==typeof r||r===t}:function(r){return"function"==typeof r}},4913:(r,t,e)=>{var n=e(3724),o=e(5917),i=e(8686),a=e(8551),u=e(6969),s=TypeError,c=Object.defineProperty,p=Object.getOwnPropertyDescriptor,f="enumerable",l="configurable",h="writable";t.f=n?i?function(r,t,e){if(a(r),t=u(t),a(e),"function"==typeof r&&"prototype"===t&&"value"in e&&h in e&&!e[h]){var n=p(r,t);n&&n[h]&&(r[t]=e.value,e={configurable:l in e?e[l]:n[l],enumerable:f in e?e[f]:n[f],writable:!1})}return c(r,t,e)}:c:function(r,t,e){if(a(r),t=u(t),a(e),o)try{return c(r,t,e)}catch(r){}if("get"in e||"set"in e)throw new s("Accessors not supported");return"value"in e&&(r[t]=e.value),r}},5031:(r,t,e)=>{var n=e(7751),o=e(9504),i=e(8480),a=e(3717),u=e(8551),s=o([].concat);r.exports=n("Reflect","ownKeys")||function(r){var t=i.f(u(r)),e=a.f;return e?s(t,e(r)):t}},5397:(r,t,e)=>{var n=e(7055),o=e(7750);r.exports=function(r){return n(o(r))}},5610:(r,t,e)=>{var n=e(1291),o=Math.max,i=Math.min;r.exports=function(r,t){var e=n(r);return e<0?o(e+t,0):i(e,t)}},5745:(r,t,e)=>{var n=e(7629);r.exports=function(r,t){return n[r]||(n[r]=t||{})}},5917:(r,t,e)=>{var n=e(3724),o=e(9039),i=e(4055);r.exports=!n&&!o(function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})},5966:(r,t,e)=>{var n=e(9306),o=e(4117);r.exports=function(r,t){var e=r[t];return o(e)?void 0:n(e)}},6119:(r,t,e)=>{var n=e(5745),o=e(3392),i=n("keys");r.exports=function(r){return i[r]||(i[r]=o(r))}},6198:(r,t,e)=>{var n=e(8014);r.exports=function(r){return n(r.length)}},6298:(r,t,e)=>{e.d(t,{A:()=>n}),e(4114);const n=class{#r;#t;#e;#n;#o;constructor(r){r=Object.assign({negativeWord:"",separatorWord:"",zero:"",spaceSeparator:" "},r),this.#r=r.negativeWord,this.#t=r.separatorWord,this.#e=r.zero,this.#n=r.spaceSeparator}get negativeWord(){return this.#r}get separatorWord(){return this.#t}get zero(){return this.#e}get spaceSeparator(){return this.#n}get wholeNumber(){return this.#o}decimalToCardinal(r){const t=[],e=[...r];let n=0;for(;n<e.length&&"0"===e[n];)t.push(this.zero),n++;return n===e.length?t:[...t,this.toCardinal(BigInt(r))]}floatToCardinal(r){if("number"==typeof r){if(Number.isNaN(r))throw new TypeError("NaN is not an accepted number.");r=r.toString()}else if("string"==typeof r){if(0===(r=r.trim()).length||Number.isNaN(Number(r)))throw new Error('"'+r+'" is not a valid number.')}else if("bigint"!=typeof r)throw new TypeError("Invalid variable type: "+typeof r);let t,e,n=[];if(r<0&&n.push(this.negativeWord),"bigint"==typeof r)t=r;else{const n=r.split(".");t=BigInt(n[0]),e=n[1]}return t<0&&(t=-t),this.#o=t,n=[...n,this.toCardinal(t)],e&&(n.push(this.separatorWord),n=[...n,...this.decimalToCardinal(e)]),n.join(this.spaceSeparator)}}},6395:r=>{r.exports=!1},6518:(r,t,e)=>{var n=e(4576),o=e(7347).f,i=e(6699),a=e(6840),u=e(9433),s=e(7740),c=e(2796);r.exports=function(r,t){var e,p,f,l,h,v=r.target,b=r.global,y=r.stat;if(e=b?n:y?n[v]||u(v,{}):n[v]&&n[v].prototype)for(p in t){if(l=t[p],f=r.dontCallGetSet?(h=o(e,p))&&h.value:e[p],!c(b?p:v+(y?".":"#")+p,r.forced)&&void 0!==f){if(typeof l==typeof f)continue;s(l,f)}(r.sham||f&&f.sham)&&i(l,"sham",!0),a(e,p,l,r)}}},6699:(r,t,e)=>{var n=e(3724),o=e(4913),i=e(6980);r.exports=n?function(r,t,e){return o.f(r,t,i(1,e))}:function(r,t,e){return r[t]=e,r}},6823:r=>{var t=String;r.exports=function(r){try{return t(r)}catch(r){return"Object"}}},6837:r=>{var t=TypeError;r.exports=function(r){if(r>9007199254740991)throw t("Maximum allowed index exceeded");return r}},6840:(r,t,e)=>{var n=e(4901),o=e(4913),i=e(283),a=e(9433);r.exports=function(r,t,e,u){u||(u={});var s=u.enumerable,c=void 0!==u.name?u.name:t;if(n(e)&&i(e,c,u),u.global)s?r[t]=e:a(t,e);else{try{u.unsafe?r[t]&&(s=!0):delete r[t]}catch(r){}s?r[t]=e:o.f(r,t,{value:e,enumerable:!1,configurable:!u.nonConfigurable,writable:!u.nonWritable})}return r}},6969:(r,t,e)=>{var n=e(2777),o=e(757);r.exports=function(r){var t=n(r,"string");return o(t)?t:t+""}},6980:r=>{r.exports=function(r,t){return{enumerable:!(1&r),configurable:!(2&r),writable:!(4&r),value:t}}},7040:(r,t,e)=>{var n=e(4495);r.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7055:(r,t,e)=>{var n=e(9504),o=e(9039),i=e(2195),a=Object,u=n("".split);r.exports=o(function(){return!a("z").propertyIsEnumerable(0)})?function(r){return"String"===i(r)?u(r,""):a(r)}:a},7347:(r,t,e)=>{var n=e(3724),o=e(9565),i=e(8773),a=e(6980),u=e(5397),s=e(6969),c=e(9297),p=e(5917),f=Object.getOwnPropertyDescriptor;t.f=n?f:function(r,t){if(r=u(r),t=s(t),p)try{return f(r,t)}catch(r){}if(c(r,t))return a(!o(i.f,r,t),r[t])}},7629:(r,t,e)=>{var n=e(6395),o=e(4576),i=e(9433),a="__core-js_shared__",u=r.exports=o[a]||i(a,{});(u.versions||(u.versions=[])).push({version:"3.46.0",mode:n?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.46.0/LICENSE",source:"https://github.com/zloirock/core-js"})},7740:(r,t,e)=>{var n=e(9297),o=e(5031),i=e(7347),a=e(4913);r.exports=function(r,t,e){for(var u=o(t),s=a.f,c=i.f,p=0;p<u.length;p++){var f=u[p];n(r,f)||e&&n(e,f)||s(r,f,c(t,f))}}},7750:(r,t,e)=>{var n=e(4117),o=TypeError;r.exports=function(r){if(n(r))throw new o("Can't call method on "+r);return r}},7751:(r,t,e)=>{var n=e(4576),o=e(4901);r.exports=function(r,t){return arguments.length<2?(e=n[r],o(e)?e:void 0):n[r]&&n[r][t];var e}},8014:(r,t,e)=>{var n=e(1291),o=Math.min;r.exports=function(r){var t=n(r);return t>0?o(t,9007199254740991):0}},8227:(r,t,e)=>{var n=e(4576),o=e(5745),i=e(9297),a=e(3392),u=e(4495),s=e(7040),c=n.Symbol,p=o("wks"),f=s?c.for||c:c&&c.withoutSetter||a;r.exports=function(r){return i(p,r)||(p[r]=u&&i(c,r)?c[r]:f("Symbol."+r)),p[r]}},8480:(r,t,e)=>{var n=e(1828),o=e(8727).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(r){return n(r,o)}},8551:(r,t,e)=>{var n=e(34),o=String,i=TypeError;r.exports=function(r){if(n(r))return r;throw new i(o(r)+" is not an object")}},8622:(r,t,e)=>{var n=e(4576),o=e(4901),i=n.WeakMap;r.exports=o(i)&&/native code/.test(String(i))},8686:(r,t,e)=>{var n=e(3724),o=e(9039);r.exports=n&&o(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},8727:r=>{r.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},8773:(r,t)=>{var e={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!e.call({1:2},1);t.f=o?function(r){var t=n(this,r);return!!t&&t.enumerable}:e},8981:(r,t,e)=>{var n=e(7750),o=Object;r.exports=function(r){return o(n(r))}},9039:r=>{r.exports=function(r){try{return!!r()}catch(r){return!0}}},9297:(r,t,e)=>{var n=e(9504),o=e(8981),i=n({}.hasOwnProperty);r.exports=Object.hasOwn||function(r,t){return i(o(r),t)}},9306:(r,t,e)=>{var n=e(4901),o=e(6823),i=TypeError;r.exports=function(r){if(n(r))return r;throw new i(o(r)+" is not a function")}},9433:(r,t,e)=>{var n=e(4576),o=Object.defineProperty;r.exports=function(r,t){try{o(n,r,{value:t,configurable:!0,writable:!0})}catch(e){n[r]=t}return t}},9504:(r,t,e)=>{var n=e(616),o=Function.prototype,i=o.call,a=n&&o.bind.bind(i,i);r.exports=n?a:function(r){return function(){return i.apply(r,arguments)}}},9519:(r,t,e)=>{var n,o,i=e(4576),a=e(2839),u=i.process,s=i.Deno,c=u&&u.versions||s&&s.version,p=c&&c.v8;p&&(o=(n=p.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]),r.exports=o},9565:(r,t,e)=>{var n=e(616),o=Function.prototype.call;r.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},9617:(r,t,e)=>{var n=e(5397),o=e(5610),i=e(6198),a=function(r){return function(t,e,a){var u=n(t),s=i(u);if(0===s)return!r&&-1;var c,p=o(a,s);if(r&&e!=e){for(;s>p;)if((c=u[p++])!=c)return!0}else for(;s>p;p++)if((r||p in u)&&u[p]===e)return r||p||0;return!r&&-1}};r.exports={includes:a(!0),indexOf:a(!1)}}},t={};function e(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return r[n].call(i.exports,i,i.exports,e),i.exports}e.d=(r,t)=>{for(var n in t)e.o(t,n)&&!e.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:t[n]})},e.o=(r,t)=>Object.prototype.hasOwnProperty.call(r,t);var n={};e.d(n,{default:()=>a});var o=e(6298);class i extends o.A{number;feminine;ones={masculine:["واحد","اثنان","ثلاثة","أربعة","خمسة","ستة","سبعة","ثمانية","تسعة","عشرة","أحد عشر","اثنا عشر","ثلاثة عشر","أربعة عشر","خمسة عشر","ستة عشر","سبعة عشر","ثمانية عشر","تسعة عشر"],feminine:["واحدة","اثنتان","ثلاث","أربع","خمس","ست","سبع","ثمان","تسع","عشر","إحدى عشرة","اثنتا عشرة","ثلاث عشرة","أربع عشرة","خمس عشرة","ست عشرة","سبع عشرة","ثماني عشرة","تسع عشرة"]};arabicTens=["عشرون","ثلاثون","أربعون","خمسون","ستون","سبعون","ثمانون","تسعون"];arabicHundreds=["","مائة","مئتان","ثلاثمائة","أربعمائة","خمسمائة","ستمائة","سبعمائة","ثمانمائة","تسعمائة"];arabicAppendedTwos=["مئتا","ألفا","مليونا","مليارا","تريليونا","كوادريليونا","كوينتليونا","سكستيليونا"];arabicTwos=["مئتان","ألفان","مليونان","ملياران","تريليونان","كوادريليونان","كوينتليونان","سكستيليونان"];arabicGroup=["مائة","ألف","مليون","مليار","تريليون","كوادريليون","كوينتليون","سكستيليون"];arabicAppendedGroup=["","ألفاً","مليوناً","ملياراً","تريليوناً","كوادريليوناً","كوينتليوناً","سكستيليوناً"];arabicPluralGroups=["","آلاف","ملايين","مليارات","تريليونات","كوادريليونات","كوينتليونات","سكستيليونات"];constructor(r){super(r=Object.assign({negativeWord:"ناقص",separatorWord:"فاصلة",zero:"صفر",feminine:!1},r)),this.feminine=r.feminine}digitFeminineStatus(r){return this.ones[this.feminine?"feminine":"masculine"][r-1]}processArabicGroup(r,t){let e=r%100;const n=r/100;let o="";if(Math.trunc(n)>0&&(0==e&&2==Math.trunc(n)?o=this.arabicTwos[0]:(o=this.arabicHundreds[Math.trunc(n)],""!=o&&0!=e&&(o+=" و"))),e>0&&e<20)if(2===e&&0===Math.trunc(n)&&t>0){const e=Math.trunc(Math.log10(Number(this.number)));o=e%3==0&&this.number===2*Math.pow(10,e)?2===r?this.arabicTwos[Math.trunc(t)]:this.arabicAppendedTwos[Math.trunc(t)]:this.arabicTwos[Math.trunc(t)]}else o+=1===e&&t>0?this.arabicGroup[Math.trunc(t)]:this.digitFeminineStatus(Math.trunc(e),t);else if(e>=20){const r=e%10,n=e/10-2;r>0&&(o+=this.digitFeminineStatus(r,t)),""!=o&&0!=r&&(o+=" و"),o+=this.arabicTens[Math.trunc(n)]}return o}toCardinal(r){if(0==r)return this.zero;this.number=r;let t,e=r,n=0,o="";for(;e>0;){t=e;const r=Number(t%1000n);e=t/1000n;const i=this.processArabicGroup(r,n);""!=i&&(n>0&&(""!=o&&(o=" و"+o),r>2&&(o=r%100==1?this.arabicGroup[n]+" "+o:r>=3&&r<=10?this.arabicPluralGroups[n]+" "+o:""==o?this.arabicGroup[n]+" "+o:this.arabicAppendedGroup[n]+" "+o)),o=i+" "+o),n++}return o=o.replaceAll(/ +/g," "),o.trim()}}function a(r,t={}){return new i(t).floatToCardinal(r)}return n.default})());
2
2
  //# sourceMappingURL=ar.js.map