reslib 1.0.0

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 (200) hide show
  1. package/README.md +298 -0
  2. package/build/auth/index.d.ts +2034 -0
  3. package/build/auth/index.js +5 -0
  4. package/build/auth/types.d.ts +465 -0
  5. package/build/auth/types.js +1 -0
  6. package/build/countries/countries.d.ts +1454 -0
  7. package/build/countries/countries.js +1 -0
  8. package/build/countries/index.d.ts +159 -0
  9. package/build/countries/index.js +5 -0
  10. package/build/countries/types.d.ts +65 -0
  11. package/build/countries/types.js +1 -0
  12. package/build/currency/currencies.d.ts +8 -0
  13. package/build/currency/currencies.js +1 -0
  14. package/build/currency/index.d.ts +51 -0
  15. package/build/currency/index.js +5 -0
  16. package/build/currency/session.d.ts +23 -0
  17. package/build/currency/session.js +5 -0
  18. package/build/currency/types.d.ts +1039 -0
  19. package/build/currency/types.js +1 -0
  20. package/build/currency/utils.d.ts +25 -0
  21. package/build/currency/utils.js +1 -0
  22. package/build/i18n/index.d.ts +640 -0
  23. package/build/i18n/index.js +5 -0
  24. package/build/inputFormatter/index.d.ts +396 -0
  25. package/build/inputFormatter/index.js +5 -0
  26. package/build/inputFormatter/types.d.ts +544 -0
  27. package/build/inputFormatter/types.js +1 -0
  28. package/build/logger/index.d.ts +235 -0
  29. package/build/logger/index.js +5 -0
  30. package/build/observable/index.d.ts +329 -0
  31. package/build/observable/index.js +1 -0
  32. package/build/platform/index.d.ts +32 -0
  33. package/build/platform/index.js +1 -0
  34. package/build/resources/ResourcePaginationHelper.d.ts +537 -0
  35. package/build/resources/ResourcePaginationHelper.js +2 -0
  36. package/build/resources/decorators/create.decorator.d.ts +20 -0
  37. package/build/resources/decorators/create.decorator.js +1 -0
  38. package/build/resources/decorators/index.d.ts +41 -0
  39. package/build/resources/decorators/index.js +1 -0
  40. package/build/resources/fields/index.d.ts +33 -0
  41. package/build/resources/fields/index.js +1 -0
  42. package/build/resources/filters.d.ts +62 -0
  43. package/build/resources/filters.js +1 -0
  44. package/build/resources/index.d.ts +854 -0
  45. package/build/resources/index.js +6 -0
  46. package/build/resources/types/filters.d.ts +508 -0
  47. package/build/resources/types/filters.js +1 -0
  48. package/build/resources/types/index.d.ts +4138 -0
  49. package/build/resources/types/index.js +1 -0
  50. package/build/session/index.d.ts +1474 -0
  51. package/build/session/index.js +1 -0
  52. package/build/translations/auth.en.d.ts +3 -0
  53. package/build/translations/auth.en.js +1 -0
  54. package/build/translations/countries.en.d.ts +6 -0
  55. package/build/translations/countries.en.js +1 -0
  56. package/build/translations/currencies.en.d.ts +5 -0
  57. package/build/translations/currencies.en.js +1 -0
  58. package/build/translations/date.en.d.ts +19 -0
  59. package/build/translations/date.en.js +1 -0
  60. package/build/translations/index.d.ts +1583 -0
  61. package/build/translations/index.js +5 -0
  62. package/build/translations/resources.en.d.ts +6 -0
  63. package/build/translations/resources.en.js +1 -0
  64. package/build/translations/validator.en.d.ts +104 -0
  65. package/build/translations/validator.en.js +5 -0
  66. package/build/types/date.d.ts +44 -0
  67. package/build/types/date.js +1 -0
  68. package/build/types/dictionary.d.ts +29 -0
  69. package/build/types/dictionary.js +1 -0
  70. package/build/types/i18n.d.ts +121 -0
  71. package/build/types/i18n.js +1 -0
  72. package/build/types/index.d.ts +145 -0
  73. package/build/types/index.js +1 -0
  74. package/build/utils/areEquals.d.ts +19 -0
  75. package/build/utils/areEquals.js +1 -0
  76. package/build/utils/date/dateHelper.d.ts +371 -0
  77. package/build/utils/date/dateHelper.js +5 -0
  78. package/build/utils/date/index.d.ts +212 -0
  79. package/build/utils/date/index.js +5 -0
  80. package/build/utils/date/isDateObj.d.ts +14 -0
  81. package/build/utils/date/isDateObj.js +1 -0
  82. package/build/utils/debounce.d.ts +52 -0
  83. package/build/utils/debounce.js +1 -0
  84. package/build/utils/defaultArray.d.ts +18 -0
  85. package/build/utils/defaultArray.js +1 -0
  86. package/build/utils/defaultBool.d.ts +14 -0
  87. package/build/utils/defaultBool.js +1 -0
  88. package/build/utils/defaultStr.d.ts +17 -0
  89. package/build/utils/defaultStr.js +1 -0
  90. package/build/utils/defaultVal.d.ts +18 -0
  91. package/build/utils/defaultVal.js +1 -0
  92. package/build/utils/dom/index.d.ts +65 -0
  93. package/build/utils/dom/index.js +1 -0
  94. package/build/utils/dom/isDOMElement.d.ts +11 -0
  95. package/build/utils/dom/isDOMElement.js +1 -0
  96. package/build/utils/file/index.d.ts +26 -0
  97. package/build/utils/file/index.js +1 -0
  98. package/build/utils/global.d.ts +53 -0
  99. package/build/utils/global.js +1 -0
  100. package/build/utils/image.d.ts +56 -0
  101. package/build/utils/image.js +1 -0
  102. package/build/utils/index.d.ts +39 -0
  103. package/build/utils/index.js +6 -0
  104. package/build/utils/interpolate.d.ts +105 -0
  105. package/build/utils/interpolate.js +1 -0
  106. package/build/utils/isEmail.d.ts +57 -0
  107. package/build/utils/isEmail.js +1 -0
  108. package/build/utils/isEmpty.d.ts +18 -0
  109. package/build/utils/isEmpty.js +1 -0
  110. package/build/utils/isNonNullString.d.ts +17 -0
  111. package/build/utils/isNonNullString.js +1 -0
  112. package/build/utils/isNullable.d.ts +7 -0
  113. package/build/utils/isNullable.js +1 -0
  114. package/build/utils/isNumber.d.ts +36 -0
  115. package/build/utils/isNumber.js +1 -0
  116. package/build/utils/isPrimitive.d.ts +16 -0
  117. package/build/utils/isPrimitive.js +1 -0
  118. package/build/utils/isPromise.d.ts +14 -0
  119. package/build/utils/isPromise.js +1 -0
  120. package/build/utils/isRegex.d.ts +15 -0
  121. package/build/utils/isRegex.js +1 -0
  122. package/build/utils/isTime.d.ts +18 -0
  123. package/build/utils/isTime.js +1 -0
  124. package/build/utils/json.d.ts +224 -0
  125. package/build/utils/json.js +1 -0
  126. package/build/utils/numbers.d.ts +148 -0
  127. package/build/utils/numbers.js +5 -0
  128. package/build/utils/object.d.ts +567 -0
  129. package/build/utils/object.js +1 -0
  130. package/build/utils/sort.d.ts +67 -0
  131. package/build/utils/sort.js +1 -0
  132. package/build/utils/string.d.ts +165 -0
  133. package/build/utils/string.js +1 -0
  134. package/build/utils/stringify.d.ts +23 -0
  135. package/build/utils/stringify.js +1 -0
  136. package/build/utils/uniqid.d.ts +18 -0
  137. package/build/utils/uniqid.js +1 -0
  138. package/build/utils/uri/index.d.ts +333 -0
  139. package/build/utils/uri/index.js +2 -0
  140. package/build/validator/index.d.ts +4 -0
  141. package/build/validator/index.js +6 -0
  142. package/build/validator/rules/array.d.ts +848 -0
  143. package/build/validator/rules/array.js +5 -0
  144. package/build/validator/rules/boolean.d.ts +87 -0
  145. package/build/validator/rules/boolean.js +5 -0
  146. package/build/validator/rules/date.d.ts +551 -0
  147. package/build/validator/rules/date.js +5 -0
  148. package/build/validator/rules/default.d.ts +367 -0
  149. package/build/validator/rules/default.js +5 -0
  150. package/build/validator/rules/enum.d.ts +155 -0
  151. package/build/validator/rules/enum.js +5 -0
  152. package/build/validator/rules/file.d.ts +356 -0
  153. package/build/validator/rules/file.js +5 -0
  154. package/build/validator/rules/format.d.ts +2825 -0
  155. package/build/validator/rules/format.js +6 -0
  156. package/build/validator/rules/index.d.ts +16 -0
  157. package/build/validator/rules/index.js +6 -0
  158. package/build/validator/rules/multiRules.d.ts +475 -0
  159. package/build/validator/rules/multiRules.js +5 -0
  160. package/build/validator/rules/numeric.d.ts +1135 -0
  161. package/build/validator/rules/numeric.js +5 -0
  162. package/build/validator/rules/string.d.ts +504 -0
  163. package/build/validator/rules/string.js +5 -0
  164. package/build/validator/rules/target.d.ts +137 -0
  165. package/build/validator/rules/target.js +5 -0
  166. package/build/validator/rules/utils.d.ts +1 -0
  167. package/build/validator/rules/utils.js +1 -0
  168. package/build/validator/rulesMarkers.d.ts +11 -0
  169. package/build/validator/rulesMarkers.js +1 -0
  170. package/build/validator/types.d.ts +2906 -0
  171. package/build/validator/types.js +1 -0
  172. package/build/validator/validator.d.ts +3692 -0
  173. package/build/validator/validator.js +5 -0
  174. package/lib/cjs/auth.js +1 -0
  175. package/lib/cjs/countries.js +1 -0
  176. package/lib/cjs/currency.js +1 -0
  177. package/lib/cjs/i18n.js +1 -0
  178. package/lib/cjs/inputFormatter.js +1 -0
  179. package/lib/cjs/logger.js +1 -0
  180. package/lib/cjs/observable.js +1 -0
  181. package/lib/cjs/platform.js +1 -0
  182. package/lib/cjs/resources.js +1 -0
  183. package/lib/cjs/session.js +1 -0
  184. package/lib/cjs/types.js +1 -0
  185. package/lib/cjs/utils.js +1 -0
  186. package/lib/cjs/validator.js +1 -0
  187. package/lib/esm/auth.mjs +1 -0
  188. package/lib/esm/countries.mjs +1 -0
  189. package/lib/esm/currency.mjs +1 -0
  190. package/lib/esm/i18n.mjs +1 -0
  191. package/lib/esm/inputFormatter.mjs +1 -0
  192. package/lib/esm/logger.mjs +1 -0
  193. package/lib/esm/observable.mjs +1 -0
  194. package/lib/esm/platform.mjs +1 -0
  195. package/lib/esm/resources.mjs +1 -0
  196. package/lib/esm/session.mjs +1 -0
  197. package/lib/esm/types.mjs +1 -0
  198. package/lib/esm/utils.mjs +1 -0
  199. package/lib/esm/validator.mjs +1 -0
  200. package/package.json +244 -0
@@ -0,0 +1,5 @@
1
+ 'use strict';require('reflect-metadata');var Y=require('moment'),i18nJs=require('i18n-js');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Y__default=/*#__PURE__*/_interopDefault(Y);var _=Object.defineProperty,Ne=Object.defineProperties;var we=Object.getOwnPropertyDescriptors;var R=Object.getOwnPropertySymbols;var X=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var q=(e,r,t)=>r in e?_(e,r,{enumerable:true,configurable:true,writable:true,value:t}):e[r]=t,ee=(e,r)=>{for(var t in r||(r={}))X.call(r,t)&&q(e,t,r[t]);if(R)for(var t of R(r))j.call(r,t)&&q(e,t,r[t]);return e},te=(e,r)=>Ne(e,we(r));var re=(e,r)=>{var t={};for(var a in e)X.call(e,a)&&r.indexOf(a)<0&&(t[a]=e[a]);if(e!=null&&R)for(var a of R(e))r.indexOf(a)<0&&j.call(e,a)&&(t[a]=e[a]);return t};var Ee=(e,r)=>{for(var t in r)_(e,t,{get:r[t],enumerable:true});};var ae=function(e){let r={},t={},a=Array.prototype.slice;return te(ee({},Object.assign({},e)),{on:function(i,n){return n&&i&&(r[i]=r[i]||[]).push(n),{remove:()=>{this.off(i,n);}}},finally:function(i,n){return n&&i?((t[i]=t[i]||[]).push(n),this):this},off:function(i,n){if(!i)return this;if(i=="*"&&!n)r={};else if(n)for(var o=r[i],s=0,c;c=o&&o[s];++s)c==n&&o.splice(s--,1);return this},once:function(i,n){let o=(...s)=>{this.off(i,o),n.apply(this,s);};return this.on(i,o)},trigger:function(i,...n){if(!i)return this;let o,s,c,l=null;typeof n[n.length-1]=="function"&&(l=n.pop()),o=a.call(r[i]||[],0);let y=[];for(c=0;s=o[c];++c)typeof s=="function"&&y.push(s.apply(this,n));typeof r["*"]=="function"&&i!="*"&&(this.trigger(i,...n),this.trigger("*",...n));var h=a.call(t[i]||[],0);for(c=0;s=h[c];++c)s.call(this,y,n);return l&&l.call(this,y,n),this},offAll:function(){return r={},t={},this},getEventCallBacks:function(){return r}})};function ie(e,r){return (t,a)=>{let i=t==null?void 0:t.constructor,n=Object.assign({},Reflect.getMetadata(e,i)),o=n[a],s=typeof r=="function"?r(o,n,t,a):r;n[a]=s,Reflect.defineMetadata(e,n,i),Reflect.defineMetadata(e,r,t,a);}}function ne(e,r){return Object.assign({},Object.assign({},Reflect.getMetadata(r,e)),Object.assign({},Reflect.getMetadata(r,e.prototype)))}var K={};Ee(K,{en:()=>Ie});var oe={AF:{code:"AF",dialCode:"93",name:"Afghanistan (\u202B\u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646\u202C\u200E)",priority:0},AL:{code:"AL",dialCode:"355",name:"Albania (Shqip\xEBri)",priority:0},DZ:{code:"DZ",dialCode:"213",name:"Algeria (\u202B\u0627\u0644\u062C\u0632\u0627\u0626\u0631\u202C\u200E)",priority:0},AS:{code:"AS",dialCode:"1684",name:"American Samoa",priority:0},AD:{code:"AD",dialCode:"376",name:"Andorra",priority:0},AO:{code:"AO",dialCode:"244",name:"Angola",priority:0},AI:{code:"AI",dialCode:"1264",name:"Anguilla",priority:0},AG:{code:"AG",dialCode:"1268",name:"Antigua and Barbuda",priority:0},AR:{code:"AR",dialCode:"54",name:"Argentina",priority:0},AM:{code:"AM",dialCode:"374",name:"Armenia (\u0540\u0561\u0575\u0561\u057D\u057F\u0561\u0576)",priority:0},AW:{code:"AW",dialCode:"297",name:"Aruba",priority:0},AU:{code:"AU",dialCode:"61",name:"Australia",priority:0},AT:{code:"AT",dialCode:"43",name:"Austria (\xD6sterreich)",priority:0},AZ:{code:"AZ",dialCode:"994",name:"Azerbaijan (Az\u0259rbaycan)",priority:0},BS:{code:"BS",dialCode:"1242",name:"Bahamas",priority:0},BH:{code:"BH",dialCode:"973",name:"Bahrain (\u202B\u0627\u0644\u0628\u062D\u0631\u064A\u0646\u202C\u200E)",priority:0},BD:{code:"BD",dialCode:"880",name:"Bangladesh (\u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6)",priority:0},BB:{code:"BB",dialCode:"1246",name:"Barbados",priority:0},BY:{code:"BY",dialCode:"375",name:"Belarus (\u0411\u0435\u043B\u0430\u0440\u0443\u0441\u044C)",priority:0},BE:{code:"BE",dialCode:"32",name:"Belgium (Belgi\xEB)",priority:0},BZ:{code:"BZ",dialCode:"501",name:"Belize",priority:0},BJ:{code:"BJ",dialCode:"229",name:"Benin (B\xE9nin)",priority:0},BM:{code:"BM",dialCode:"1441",name:"Bermuda",priority:0},BT:{code:"BT",dialCode:"975",name:"Bhutan (\u0F60\u0F56\u0FB2\u0F74\u0F42)",priority:0},BO:{code:"BO",dialCode:"591",name:"Bolivia",priority:0},BA:{code:"BA",dialCode:"387",name:"Bosnia and Herzegovina (\u0411\u043E\u0441\u043D\u0430 \u0438 \u0425\u0435\u0440\u0446\u0435\u0433\u043E\u0432\u0438\u043D\u0430)",priority:0},BW:{code:"BW",dialCode:"267",name:"Botswana",priority:0},BR:{code:"BR",dialCode:"55",name:"Brazil (Brasil)",priority:0},IO:{code:"IO",dialCode:"246",name:"British Indian Ocean Territory",priority:0},VG:{code:"VG",dialCode:"1284",name:"British Virgin Islands",priority:0},BN:{code:"BN",dialCode:"673",name:"Brunei",priority:0},BG:{code:"BG",dialCode:"359",name:"Bulgaria (\u0411\u044A\u043B\u0433\u0430\u0440\u0438\u044F)",priority:0},BF:{code:"BF",dialCode:"226",name:"Burkina Faso",priority:0},BI:{code:"BI",dialCode:"257",name:"Burundi (Uburundi)",priority:0},KH:{code:"KH",dialCode:"855",name:"Cambodia (\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6)",priority:0},CM:{code:"CM",dialCode:"237",name:"Cameroon (Cameroun)",priority:0},CA:{code:"CA",dialCode:"1",name:"Canada",priority:1},CV:{code:"CV",dialCode:"238",name:"Cape Verde (Kabu Verdi)",priority:0},BQ:{code:"BQ",dialCode:"599",name:"Caribbean Netherlands",priority:1},KY:{code:"KY",dialCode:"1345",name:"Cayman Islands",priority:0},CF:{code:"CF",dialCode:"236",name:"Central African Republic (R\xE9publique centrafricaine)",priority:0},TD:{code:"TD",dialCode:"235",name:"Chad (Tchad)",priority:0},CL:{code:"CL",dialCode:"56",name:"Chile",priority:0},CN:{code:"CN",dialCode:"86",name:"China (\u4E2D\u56FD)",priority:0},CX:{code:"CX",dialCode:"61",name:"Christmas Island",priority:2},CC:{code:"CC",dialCode:"61",name:"Cocos (Keeling) Islands",priority:1},CO:{code:"CO",dialCode:"57",name:"Colombia",priority:0},KM:{code:"KM",dialCode:"269",name:"Comoros (\u202B\u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631\u202C\u200E)",priority:0},CD:{code:"CD",dialCode:"243",name:"Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)",priority:0},CG:{code:"CG",dialCode:"242",name:"Congo (Republic) (Congo-Brazzaville)",priority:0},CK:{code:"CK",dialCode:"682",name:"Cook Islands",priority:0},CR:{code:"CR",dialCode:"506",name:"Costa Rica",priority:0},CI:{code:"CI",dialCode:"225",name:"C\xF4te d\u2019Ivoire",priority:0},HR:{code:"HR",dialCode:"385",name:"Croatia (Hrvatska)",priority:0},CU:{code:"CU",dialCode:"53",name:"Cuba",priority:0},CW:{code:"CW",dialCode:"599",name:"Cura\xE7ao",priority:0},CY:{code:"CY",dialCode:"357",name:"Cyprus (\u039A\u03CD\u03C0\u03C1\u03BF\u03C2)",priority:0},CZ:{code:"CZ",dialCode:"420",name:"Czech Republic (\u010Cesk\xE1 republika)",priority:0},DK:{code:"DK",dialCode:"45",name:"Denmark (Danmark)",priority:0},DJ:{code:"DJ",dialCode:"253",name:"Djibouti",priority:0},DM:{code:"DM",dialCode:"1767",name:"Dominica",priority:0},DO:{code:"DO",dialCode:"1",name:"Dominican Republic (Rep\xFAblica Dominicana)",priority:2},EC:{code:"EC",dialCode:"593",name:"Ecuador",priority:0},EG:{code:"EG",dialCode:"20",name:"Egypt (\u202B\u0645\u0635\u0631\u202C\u200E)",priority:0},SV:{code:"SV",dialCode:"503",name:"El Salvador",priority:0},GQ:{code:"GQ",dialCode:"240",name:"Equatorial Guinea (Guinea Ecuatorial)",priority:0},ER:{code:"ER",dialCode:"291",name:"Eritrea",priority:0},EE:{code:"EE",dialCode:"372",name:"Estonia (Eesti)",priority:0},ET:{code:"ET",dialCode:"251",name:"Ethiopia",priority:0},FK:{code:"FK",dialCode:"500",name:"Falkland Islands (Islas Malvinas)",priority:0},FO:{code:"FO",dialCode:"298",name:"Faroe Islands (F\xF8royar)",priority:0},FJ:{code:"FJ",dialCode:"679",name:"Fiji",priority:0},FI:{code:"FI",dialCode:"358",name:"Finland (Suomi)",priority:0},FR:{code:"FR",dialCode:"33",name:"France",priority:0},GF:{code:"GF",dialCode:"594",name:"French Guiana (Guyane fran\xE7aise)",priority:0},PF:{code:"PF",dialCode:"689",name:"French Polynesia (Polyn\xE9sie fran\xE7aise)",priority:0},GA:{code:"GA",dialCode:"241",name:"Gabon",priority:0},GM:{code:"GM",dialCode:"220",name:"Gambia",priority:0},GE:{code:"GE",dialCode:"995",name:"Georgia (\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD)",priority:0},DE:{code:"DE",dialCode:"49",name:"Germany (Deutschland)",priority:0},GH:{code:"GH",dialCode:"233",name:"Ghana (Gaana)",priority:0},GI:{code:"GI",dialCode:"350",name:"Gibraltar",priority:0},GR:{code:"GR",dialCode:"30",name:"Greece (\u0395\u03BB\u03BB\u03AC\u03B4\u03B1)",priority:0},GL:{code:"GL",dialCode:"299",name:"Greenland (Kalaallit Nunaat)",priority:0},GD:{code:"GD",dialCode:"1473",name:"Grenada",priority:0},GP:{code:"GP",dialCode:"590",name:"Guadeloupe",priority:0},GU:{code:"GU",dialCode:"1671",name:"Guam",priority:0},GT:{code:"GT",dialCode:"502",name:"Guatemala",priority:0},GG:{code:"GG",dialCode:"44",name:"Guernsey",priority:1},GN:{code:"GN",dialCode:"224",name:"Guinea (Guin\xE9e)",priority:0},GW:{code:"GW",dialCode:"245",name:"Guinea-Bissau (Guin\xE9 Bissau)",priority:0},GY:{code:"GY",dialCode:"592",name:"Guyana",priority:0},HT:{code:"HT",dialCode:"509",name:"Haiti",priority:0},HN:{code:"HN",dialCode:"504",name:"Honduras",priority:0},HK:{code:"HK",dialCode:"852",name:"Hong Kong (\u9999\u6E2F)",priority:0},HU:{code:"HU",dialCode:"36",name:"Hungary (Magyarorsz\xE1g)",priority:0},IS:{code:"IS",dialCode:"354",name:"Iceland (\xCDsland)",priority:0},IN:{code:"IN",dialCode:"91",name:"India (\u092D\u093E\u0930\u0924)",priority:0},ID:{code:"ID",dialCode:"62",name:"Indonesia",priority:0},IR:{code:"IR",dialCode:"98",name:"Iran (\u202B\u0627\u06CC\u0631\u0627\u0646\u202C\u200E)",priority:0},IQ:{code:"IQ",dialCode:"964",name:"Iraq (\u202B\u0627\u0644\u0639\u0631\u0627\u0642\u202C\u200E)",priority:0},IE:{code:"IE",dialCode:"353",name:"Ireland",priority:0},IM:{code:"IM",dialCode:"44",name:"Isle of Man",priority:2},IL:{code:"IL",dialCode:"972",name:"Israel (\u202B\u05D9\u05E9\u05E8\u05D0\u05DC\u202C\u200E)",priority:0},IT:{code:"IT",dialCode:"39",name:"Italy (Italia)",priority:0},JM:{code:"JM",dialCode:"1876",name:"Jamaica",priority:0},JP:{code:"JP",dialCode:"81",name:"Japan (\u65E5\u672C)",priority:0},JE:{code:"JE",dialCode:"44",name:"Jersey",priority:3},JO:{code:"JO",dialCode:"962",name:"Jordan (\u202B\u0627\u0644\u0623\u0631\u062F\u0646\u202C\u200E)",priority:0},KZ:{code:"KZ",dialCode:"77",name:"Kazakhstan (\u041A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D)",priority:1},KE:{code:"KE",dialCode:"254",name:"Kenya",priority:0},KI:{code:"KI",dialCode:"686",name:"Kiribati",priority:0},KW:{code:"KW",dialCode:"965",name:"Kuwait (\u202B\u0627\u0644\u0643\u0648\u064A\u062A\u202C\u200E)",priority:0},KG:{code:"KG",dialCode:"996",name:"Kyrgyzstan (\u041A\u044B\u0440\u0433\u044B\u0437\u0441\u0442\u0430\u043D)",priority:0},LA:{code:"LA",dialCode:"856",name:"Laos (\u0EA5\u0EB2\u0EA7)",priority:0},LV:{code:"LV",dialCode:"371",name:"Latvia (Latvija)",priority:0},LB:{code:"LB",dialCode:"961",name:"Lebanon (\u202B\u0644\u0628\u0646\u0627\u0646\u202C\u200E)",priority:0},LS:{code:"LS",dialCode:"266",name:"Lesotho",priority:0},LR:{code:"LR",dialCode:"231",name:"Liberia",priority:0},LY:{code:"LY",dialCode:"218",name:"Libya (\u202B\u0644\u064A\u0628\u064A\u0627\u202C\u200E)",priority:0},LI:{code:"LI",dialCode:"423",name:"Liechtenstein",priority:0},LT:{code:"LT",dialCode:"370",name:"Lithuania (Lietuva)",priority:0},LU:{code:"LU",dialCode:"352",name:"Luxembourg",priority:0},MO:{code:"MO",dialCode:"853",name:"Macau (\u6FB3\u9580)",priority:0},MK:{code:"MK",dialCode:"389",name:"Macedonia (FYROM) (\u041C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430)",priority:0},MG:{code:"MG",dialCode:"261",name:"Madagascar (Madagasikara)",priority:0},MW:{code:"MW",dialCode:"265",name:"Malawi",priority:0},MY:{code:"MY",dialCode:"60",name:"Malaysia",priority:0},MV:{code:"MV",dialCode:"960",name:"Maldives",priority:0},ML:{code:"ML",dialCode:"223",name:"Mali",priority:0},MT:{code:"MT",dialCode:"356",name:"Malta",priority:0},MH:{code:"MH",dialCode:"692",name:"Marshall Islands",priority:0},MQ:{code:"MQ",dialCode:"596",name:"Martinique",priority:0},MR:{code:"MR",dialCode:"222",name:"Mauritania (\u202B\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627\u202C\u200E)",priority:0},MU:{code:"MU",dialCode:"230",name:"Mauritius (Moris)",priority:0},YT:{code:"YT",dialCode:"262",name:"Mayotte",priority:1},MX:{code:"MX",dialCode:"52",name:"Mexico (M\xE9xico)",priority:0},FM:{code:"FM",dialCode:"691",name:"Micronesia",priority:0},MD:{code:"MD",dialCode:"373",name:"Moldova (Republica Moldova)",priority:0},MC:{code:"MC",dialCode:"377",name:"Monaco",priority:0},MN:{code:"MN",dialCode:"976",name:"Mongolia (\u041C\u043E\u043D\u0433\u043E\u043B)",priority:0},ME:{code:"ME",dialCode:"382",name:"Montenegro (Crna Gora)",priority:0},MS:{code:"MS",dialCode:"1664",name:"Montserrat",priority:0},MA:{code:"MA",dialCode:"212",name:"Morocco (\u202B\u0627\u0644\u0645\u063A\u0631\u0628\u202C\u200E)",priority:0},MZ:{code:"MZ",dialCode:"258",name:"Mozambique (Mo\xE7ambique)",priority:0},MM:{code:"MM",dialCode:"95",name:"Myanmar (Burma)",priority:0},NA:{code:"NA",dialCode:"264",name:"Namibia (Namibi\xEB)",priority:0},NR:{code:"NR",dialCode:"674",name:"Nauru",priority:0},NP:{code:"NP",dialCode:"977",name:"Nepal (\u0928\u0947\u092A\u093E\u0932)",priority:0},NL:{code:"NL",dialCode:"31",name:"Netherlands (Nederland)",priority:0},NC:{code:"NC",dialCode:"687",name:"New Caledonia (Nouvelle-Cal\xE9donie)",priority:0},NZ:{code:"NZ",dialCode:"64",name:"New Zealand",priority:0},NI:{code:"NI",dialCode:"505",name:"Nicaragua",priority:0},NE:{code:"NE",dialCode:"227",name:"Niger (Nijar)",priority:0},NG:{code:"NG",dialCode:"234",name:"Nigeria",priority:0},NU:{code:"NU",dialCode:"683",name:"Niue",priority:0},NF:{code:"NF",dialCode:"672",name:"Norfolk Island",priority:0},KP:{code:"KP",dialCode:"850",name:"North Korea (\uC870\uC120 \uBBFC\uC8FC\uC8FC\uC758 \uC778\uBBFC \uACF5\uD654\uAD6D)",priority:0},MP:{code:"MP",dialCode:"1670",name:"Northern Mariana Islands",priority:0},NO:{code:"NO",dialCode:"47",name:"Norway (Norge)",priority:0},OM:{code:"OM",dialCode:"968",name:"Oman (\u202B\u0639\u064F\u0645\u0627\u0646\u202C\u200E)",priority:0},PK:{code:"PK",dialCode:"92",name:"Pakistan (\u202B\u067E\u0627\u06A9\u0633\u062A\u0627\u0646\u202C\u200E)",priority:0},PW:{code:"PW",dialCode:"680",name:"Palau",priority:0},PS:{code:"PS",dialCode:"970",name:"Palestine (\u202B\u0641\u0644\u0633\u0637\u064A\u0646\u202C\u200E)",priority:0},PA:{code:"PA",dialCode:"507",name:"Panama (Panam\xE1)",priority:0},PG:{code:"PG",dialCode:"675",name:"Papua New Guinea",priority:0},PY:{code:"PY",dialCode:"595",name:"Paraguay",priority:0},PE:{code:"PE",dialCode:"51",name:"Peru (Per\xFA)",priority:0},PH:{code:"PH",dialCode:"63",name:"Philippines",priority:0},PL:{code:"PL",dialCode:"48",name:"Poland (Polska)",priority:0},PT:{code:"PT",dialCode:"351",name:"Portugal",priority:0},PR:{code:"PR",dialCode:"1",name:"Puerto Rico",priority:3},QA:{code:"QA",dialCode:"974",name:"Qatar (\u202B\u0642\u0637\u0631\u202C\u200E)",priority:0},RE:{code:"RE",dialCode:"262",name:"R\xE9union (La R\xE9union)",priority:0},RO:{code:"RO",dialCode:"40",name:"Romania (Rom\xE2nia)",priority:0},RU:{code:"RU",dialCode:"7",name:"Russia (\u0420\u043E\u0441\u0441\u0438\u044F)",priority:0},RW:{code:"RW",dialCode:"250",name:"Rwanda",priority:0},BL:{code:"BL",dialCode:"590",name:"Saint Barth\xE9lemy (Saint-Barth\xE9lemy)",priority:1},SH:{code:"SH",dialCode:"290",name:"Saint Helena",priority:0},KN:{code:"KN",dialCode:"1869",name:"Saint Kitts and Nevis",priority:0},LC:{code:"LC",dialCode:"1758",name:"Saint Lucia",priority:0},MF:{code:"MF",dialCode:"590",name:"Saint Martin (Saint-Martin (partie fran\xE7aise))",priority:2},PM:{code:"PM",dialCode:"508",name:"Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)",priority:0},VC:{code:"VC",dialCode:"1784",name:"Saint Vincent and the Grenadines",priority:0},WS:{code:"WS",dialCode:"685",name:"Samoa",priority:0},SM:{code:"SM",dialCode:"378",name:"San Marino",priority:0},ST:{code:"ST",dialCode:"239",name:"S\xE3o Tom\xE9 and Pr\xEDncipe (S\xE3o Tom\xE9 e Pr\xEDncipe)",priority:0},SA:{code:"SA",dialCode:"966",name:"Saudi Arabia (\u202B\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629\u202C\u200E)",priority:0},SN:{code:"SN",dialCode:"221",name:"Senegal (S\xE9n\xE9gal)",priority:0},RS:{code:"RS",dialCode:"381",name:"Serbia (\u0421\u0440\u0431\u0438\u0458\u0430)",priority:0},SC:{code:"SC",dialCode:"248",name:"Seychelles",priority:0},SL:{code:"SL",dialCode:"232",name:"Sierra Leone",priority:0},SG:{code:"SG",dialCode:"65",name:"Singapore",priority:0},SX:{code:"SX",dialCode:"1721",name:"Sint Maarten",priority:0},SK:{code:"SK",dialCode:"421",name:"Slovakia (Slovensko)",priority:0},SI:{code:"SI",dialCode:"386",name:"Slovenia (Slovenija)",priority:0},SB:{code:"SB",dialCode:"677",name:"Solomon Islands",priority:0},SO:{code:"SO",dialCode:"252",name:"Somalia (Soomaaliya)",priority:0},ZA:{code:"ZA",dialCode:"27",name:"South Africa",priority:0},KR:{code:"KR",dialCode:"82",name:"South Korea (\uB300\uD55C\uBBFC\uAD6D)",priority:0},SS:{code:"SS",dialCode:"211",name:"South Sudan (\u202B\u062C\u0646\u0648\u0628 \u0627\u0644\u0633\u0648\u062F\u0627\u0646\u202C\u200E)",priority:0},ES:{code:"ES",dialCode:"34",name:"Spain (Espa\xF1a)",priority:0},LK:{code:"LK",dialCode:"94",name:"Sri Lanka (\u0DC1\u0DCA\u200D\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0)",priority:0},SD:{code:"SD",dialCode:"249",name:"Sudan (\u202B\u0627\u0644\u0633\u0648\u062F\u0627\u0646\u202C\u200E)",priority:0},SR:{code:"SR",dialCode:"597",name:"Suriname",priority:0},SJ:{code:"SJ",dialCode:"47",name:"Svalbard and Jan Mayen",priority:1},SZ:{code:"SZ",dialCode:"268",name:"Swaziland",priority:0},SE:{code:"SE",dialCode:"46",name:"Sweden (Sverige)",priority:0},CH:{code:"CH",dialCode:"41",name:"Switzerland (Schweiz)",priority:0},SY:{code:"SY",dialCode:"963",name:"Syria (\u202B\u0633\u0648\u0631\u064A\u0627\u202C\u200E)",priority:0},TW:{code:"TW",dialCode:"886",name:"Taiwan (\u53F0\u7063)",priority:0},TJ:{code:"TJ",dialCode:"992",name:"Tajikistan",priority:0},TZ:{code:"TZ",dialCode:"255",name:"Tanzania",priority:0},TH:{code:"TH",dialCode:"66",name:"Thailand (\u0E44\u0E17\u0E22)",priority:0},TL:{code:"TL",dialCode:"670",name:"Timor-Leste",priority:0},TG:{code:"TG",dialCode:"228",name:"Togo",priority:0},TK:{code:"TK",dialCode:"690",name:"Tokelau",priority:0},TO:{code:"TO",dialCode:"676",name:"Tonga",priority:0},TT:{code:"TT",dialCode:"1868",name:"Trinidad and Tobago",priority:0},TN:{code:"TN",dialCode:"216",name:"Tunisia (\u202B\u062A\u0648\u0646\u0633\u202C\u200E)",priority:0},TR:{code:"TR",dialCode:"90",name:"Turkey (T\xFCrkiye)",priority:0},TM:{code:"TM",dialCode:"993",name:"Turkmenistan",priority:0},TC:{code:"TC",dialCode:"1649",name:"Turks and Caicos Islands",priority:0},TV:{code:"TV",dialCode:"688",name:"Tuvalu",priority:0},VI:{code:"VI",dialCode:"1340",name:"U.S. Virgin Islands",priority:0},UG:{code:"UG",dialCode:"256",name:"Uganda",priority:0},UA:{code:"UA",dialCode:"380",name:"Ukraine (\u0423\u043A\u0440\u0430\u0457\u043D\u0430)",priority:0},AE:{code:"AE",dialCode:"971",name:"United Arab Emirates (\u202B\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629\u202C\u200E)",priority:0},GB:{code:"GB",dialCode:"44",name:"United Kingdom",priority:0},US:{code:"US",dialCode:"1",name:"United States",priority:0},UY:{code:"UY",dialCode:"598",name:"Uruguay",priority:0},UZ:{code:"UZ",dialCode:"998",name:"Uzbekistan (O\u02BBzbekiston)",priority:0},VU:{code:"VU",dialCode:"678",name:"Vanuatu",priority:0},VA:{code:"VA",dialCode:"39",name:"Vatican City (Citt\xE0 del Vaticano)",priority:1},VE:{code:"VE",dialCode:"58",name:"Venezuela",priority:0},VN:{code:"VN",dialCode:"84",name:"Vietnam (Vi\u1EC7t Nam)",priority:0},WF:{code:"WF",dialCode:"681",name:"Wallis and Futuna",priority:0},EH:{code:"EH",dialCode:"212",name:"Western Sahara (\u202B\u0627\u0644\u0635\u062D\u0631\u0627\u0621 \u0627\u0644\u063A\u0631\u0628\u064A\u0629\u202C\u200E)",priority:1},YE:{code:"YE",dialCode:"967",name:"Yemen (\u202B\u0627\u0644\u064A\u0645\u0646\u202C\u200E)",priority:0},ZM:{code:"ZM",dialCode:"260",name:"Zambia",priority:0},ZW:{code:"ZW",dialCode:"263",name:"Zimbabwe",priority:0},AX:{code:"AX",dialCode:"358",name:"\xC5land Islands",priority:1}};var se={invalidSignInUser:"Invalid user provided to sign in"};var de={thousandSeparator:",",decimalSeparator:".",decimalDigits:2};var le={defaultDateFormat:"YYYY-MM-DD",defaultTimeFormat:"HH:mm",defaultDateTimeFormat:"YYYY-MM-DD HH:mm",invalidDate:"Invalid date",invalidTime:"Invalid time",invalidDateTime:"Invalid date and time",today:"Today",yesterday:"Yesterday",tomorrow:"Tomorrow",selectedDate:"Selected date",selectedTime:"Selected time",selectedDateTime:"Selected date and time"};var ce={};var ue={separators:{multiple:", ",single:", "},failedForNFields:{one:"Validation failed for one field",other:"Validation failed for %{count} fields"},failedForNItems:{one:"Validation failed for one item",other:"Validation failed for %{count} items"},multipleOf:"This field must be a multiple of %{multipleOf}",invalidRule:"Invalid validation rule: %{rule}",invalidRuleParams:"Invalid parameters for rule %{rule}; params: %{ruleParams[0]}, %{ruleParams[1]}, ...",invalidMessage:"Invalid validation message for rule %{rule}; error validating value %{value}",invalidEnumValue:"The field %{field} must be one of %{expectedValues}",required:"This field is required",minLength:"This field must be at least %{minLength} characters long",maxLength:"This field must be at most %{maxLength} characters long",minValue:"This field must be at least %{minValue}",maxValue:"This field must be at most %{maxValue}",pattern:"This field must match the pattern %{pattern}",email:"This field must be a valid email address",url:"This field must be a valid URL",date:"This field must be a valid date",time:"This field must be a valid time",datetime:"This field must be a valid date and time","datetime-local":"This field must be a valid date and time",month:"This field must be a valid month",week:"This field must be a valid week",number:"This field must be a valid number",integer:"This field must be a valid integer",evenNumber:"This field must be an even integer",oddNumber:"This field must be an odd integer",float:"This field must be a valid float",fileName:"This field must be a valid file name",isNumber:"This field must be a valid number",isNonNullString:"This field must be a non null string",length:"This field must be exactly %{length} characters long",lengthRange:"This field must be between %{minLength} and %{maxLength} characters long",numberLTE:"This field must be less than or equal to %{ruleParams[0]}",numberLT:"This field must be less than %{ruleParams[0]}",numberGTE:"This field must be greater than or equal to %{ruleParams[0]}",numberGT:"This field must be greater than %{ruleParams[0]}",noteEquals:"This field must be different from %{ruleParams[0]}",numberIsDifferentFrom:"This field must be different from %{ruleParams[0]}",numberEquals:"This field must be equal to %{ruleParams[0]}",phoneNumber:"This field must be a valid phone number",emailOrPhoneNumber:"This field must be a valid email or phone number",boolean:"This field must be a valid boolean value",numberBetween:"This field must be between %{min} and %{max}",decimalCount:"This field must have(at least) %{ruleParams[0]} decimal places or/and at most %{ruleParams[1]} decimal places",decimalPlaces:"This field must have exactly %{places} decimal places",string:"This field must be a string",endsWithOneOf:"This field must end with one of the following values: %{endings}",startsWithOneOf:"This field must start with one of the following values: %{prefixes}",array:"This field must be an array",arrayMinLength:"This field must have at least %{minLength} items",arrayMaxLength:"This field must have at most %{maxLength} items",arrayLength:"This field must have exactly %{length} items",arrayContains:"This field must contain all of the following values: %{requiredValues}",arrayUnique:"This field must contain only unique values",arrayAllStrings:"This field must be an array of strings",arrayAllNumbers:"This field must be an array of numbers",arrayOf:`The field %{fieldName} must be an array where each item matches all the specified rules. Errors:
2
+ %{failedRulesErrors}`,oneOf:`The field %{fieldName} must match at least one of the following validation rules:
3
+ %{failedRulesErrors}`,allOf:`The field %{fieldName} must match all of the following validation rules:
4
+ %{failedRulesErrors}`,validateNested:`The field %{fieldName} must be a valid nested object. Errors:
5
+ %{nestedErrors}`,validateNestedInvalidType:"The field %{fieldName} must be an object, but received %{receivedType}",dateAfter:"This field must be after %{date}",dateBefore:"This field must be before %{date}",dateBetween:"This field must be between %{startDate} and %{endDate}",dateEquals:"This field must be equal to %{date}",futureDate:"This field must be a date in the future",pastDate:"This field must be a date in the past",file:"This field must be a valid file",fileSize:"This field must not exceed %{maxSize} bytes",fileType:"This field must be one of the following types: %{allowedTypes}",image:"This field must be a valid image file",fileExtension:"This field must have one of the following extensions: %{allowedExtensions}",minFileSize:"This field must be at least %{minSize} bytes",uuid:"This field must be a valid UUID",json:"This field must be valid JSON",base64:"This field must be valid Base64 encoded data",hexColor:"This field must be a valid hexadecimal color code",creditCard:"This field must be a valid credit card number",ip:"This field must be a valid IP address (version %{version})",macAddress:"This field must be a valid MAC address",matches:"This field must match the pattern %{pattern}",tests:{entity:{name:"Name",id:"Id",email:"Email",aString:"A String",url:"Url",note:"Note",createdAt:"Created At",updatedAt:"Updated At"}}};var Ie={auth:se,currencies:de,countries:oe,dates:le,resources:ce,validator:ue};function u(e){return !!(e&&typeof e=="string")}function f(...e){for(var r in e){let t=e[r];if(u(t))return t}return ""}function V(e){return !!(e==null||typeof e=="undefined"||typeof e=="string"&&e===""||Array.isArray(e)&&!e.length)}function b(e){return typeof e=="number"&&!isNaN(e)&&isFinite(e)}function N(e){return !e||typeof e!="object"?false:e instanceof Date?true:typeof e.getTime!="function"?false:!(Object.prototype.toString.call(e)!=="[object Date]"||isNaN(e.getTime()))}var d=class d{static parseString(r,t){if(u(r)&&u(t))try{let a=Y__default.default(r,t,!0);if(a.isValid())return {date:a.toDate(),matchedFormat:t,isValid:!0}}catch(a){}try{if(Array.isArray(t)&&(t!=null&&t.length))for(let a of t){let i=me(r,a);if(i)return i}for(let a of d.DATE_FORMATS){let i=me(r,a);if(i)return i}return {date:null,matchedFormat:null,isValid:!1,error:"Unable to parse date string with any known format"}}catch(a){return {date:null,matchedFormat:null,isValid:false,error:a instanceof Error?a.message:"Unknown error occurred while parsing date"}}}static toIsoString(r){let t=r?d.parseDate(r):new Date;return t?t.toISOString():""}static isoStringToDate(r){return new Date(r)}static parseDate(r,t){if(d.isDateObj(r))return r;if(!u(t)){let a=d.parseString(r);return a!=null&&a.isValid?a.date:null}if(V(r))return null;try{let a=Y__default.default(r,t,!0);if(a!=null&&a.isValid())return a.toDate()}catch(a){console.error(a," parsing date with moment : ",r," format is : ",t);}return null}static toSQLDateTimeFormat(r){if(!d.isDateObj(r))return "";let t=r.getFullYear(),a=String(r.getMonth()+1).padStart(2,"0"),i=String(r.getDate()).padStart(2,"0"),n=String(r.getHours()).padStart(2,"0"),o=String(r.getMinutes()).padStart(2,"0"),s=String(r.getSeconds()).padStart(2,"0");return `${t}-${a}-${i} ${n}:${o}:${s}`}static getI18n(r){return v.isI18nInstance(r)?r:v.getInstance()}static getDefaultDateTimeFormat(r){return f(this.getI18n(r).getNestedTranslation("dates.defaultDateTimeFormat"),"YYYY-MM-DD HH:mm")}static getDefaultDateFormat(r){return f(this.getI18n(r).getNestedTranslation("dates.defaultDateFormat"),"YYYY-MM-DD")}static toSQLDateFormat(r){if(!d.isDateObj(r))return "";let t=r.getFullYear(),a=String(r.getMonth()+1).padStart(2,"0"),i=String(r.getDate()).padStart(2,"0");return `${t}-${a}-${i}`}static toSQLTimeFormat(r){if(!d.isDateObj(r))return "";let t=String(r.getHours()).padStart(2,"0"),a=String(r.getMinutes()).padStart(2,"0"),i=String(r.getSeconds()).padStart(2,"0");return `${t}:${a}:${i}`}static getDefaultTimeFormat(r){return f(this.getI18n(r).getNestedTranslation("dates.defaultTimeFormat"),"HH:mm")}static isValidDate(r,t){if(r==null||typeof r=="boolean")return false;if(d.isDateObj(r))return true;if(b(r)){let i=new Date(r);return i&&!isNaN(i.getTime())}if(u(r))return !!d.parseDate(r,t);if(r!=null&&r.toString&&(r==null?void 0:r.toString())==parseInt(r).toString())return false;let a=new Date(r);return d.isDateObj(a)}static addToDate(r,t,a){if(b(r)||(r=0),V(t)&&(t=new Date),d.isValidDate(t)&&u(t)&&(t=new Date(t)),d.isValidDate(t)||(t=u(t)?new Date(t):new Date),u(a)&&typeof t["set"+a]=="function"&&typeof t["get"+a]=="function"){let i="set"+a,n="get"+a;t=new Date(t[i](t[n]()+r));}return t}static addDays(r,t){return d.addToDate(r,t,"Date")}static addMilliseconds(r,t){return b(r)||(r=0),d.isDateObj(t)||(t=new Date),t=t||new Date,new Date(t.getTime()+r)}static addSeconds(r,t){return b(r)||(r=0),d.addMilliseconds(r*1e3,t)}static addMinutes(r,t){return b(r)||(r=0),d.addMilliseconds(r*6e4,t)}static addHours(r,t){return b(r)||(r=0),d.addMilliseconds(r*36e5,t)}static addMonths(r,t,a){return d.addToDate(r,t,"Month")}static addWeeks(r,t){return r=(b(r)?r:0)*7,d.addToDate(r,t,"Date")}static addYears(r,t){b(r)||(r=0);let a=new Date(d.addToDate(0,t)),i=a.getFullYear();return i+r<0?r=0:r+=i,a.setFullYear(r),new Date(a)}static formatDate(r,t){try{let a=Y__default.default(r);if(a.isValid())return a.format(f(t,d.getDefaultDateTimeFormat()))}catch(a){}return f(d.isValidDate(r)?r==null?void 0:r.toString():"")}static getUTCDateTimeDetails(r){let t=r?Y__default.default.utc(r):Y__default.default.utc();return {year:t.year(),day:t.day(),month:t.month(),monthString:t.format("MM"),hours:t.hours(),date:t.date(),minutes:t.minutes(),seconds:t.seconds(),monthName:t.format("MMMM"),dayName:t.format("dddd"),dayNameShort:t.format("ddd")}}};d.DATE_FORMATS=["YYYY-MM-DD","YYYY-MM-DDTHH:mm:ss","YYYY-MM-DDTHH:mm:ssZ","YYYY-MM-DDTHH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ss[Z]","YYYY-MM-DDTHH:mm:ss.SSS[Z]","YYYY-MM-DDTHH:mm:ss.SSSZ ","YYYY-MM-DDTHH:mm:ss.SSS","YYYY-MM-DD HH:mm:ss","YYYY-MM-DD HH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ss.SSS[Z]","YYYY-MM-DD HH:mm:ssZ","YYYY-MM-DD HH:mmZ","MM/DD/YYYY","MM-DD-YYYY","MM.DD.YYYY","MM/DD/YY","MMMM DD, YYYY","MMM DD, YYYY","DD/MM/YYYY","DD-MM-YYYY","DD.MM.YYYY","DD/MM/YY","DD MMMM YYYY","DD MMM YYYY","HH:mm:ss.SSSZ","HH:mm:ssZ","HH:mmZ","YYYYMMDD","YYYYMMDDTHHMM","YYYYMMDDTHHMMSS","HH:mm:ss","HH:mm","hh:mm A","h:mm A","HH:mm:ss.SSS","YYYY-DDD","YYYY-Www","YYYY-Www-D","YYYY/MM/DD","YYYY.MM.DD","MMM D, YYYY","MMMM D, YYYY","D MMM YYYY","D MMMM YYYY","MMM D YYYY","ddd, DD MMM YYYY HH:mm:ss ZZ","ddd, DD MMM YYYY HH:mm:ss","dddd, MMMM D, YYYY","dddd, D MMMM YYYY","hh:mm:ss A","H:mm:ss","YYYY-[W]WW","YYYY-[W]WW-E","YYYY-MM-DDTHH:mm:ss.SSS","DD-MM-YYYY HH:mm:ss","YYYY/MM/DD HH:mm:ss","YYYY.MM.DD HH:mm:ss","DD/MM/YYYY HH:mm:ss","MMM D YYYY, h:mm a","MMMM D YYYY, h:mm a","h:mm A MMM D, YYYY","MMMM D, YYYY","YY-MM-DD","DD-MM-YY","MM/DD/YY","MMM DD, YY","D MMM YY","D MMMM YY","YYYY MMM D","YYYY-MM-DD HH:mm","YYYY-MM-DD HH:mm:ss.SSS"],d.SQL_DATE_FORMAT="YYYY-MM-DD",d.SQL_DATE_TIME_FORMAT="YYYY-MM-DD HH:mm:ss",d.SQL_TIME_FORMAT="HH:mm:ss",d.getCurrentMonthDaysRange=r=>{let t=d.isValidDate(r)?new Date(r):new Date().resetHours2Minutes2Seconds(),a=new Date(t.getFullYear(),t.getMonth(),1),i=new Date(t.getFullYear(),t.getMonth()+1,0);return {first:a,last:i}},d.getPreviousWeekDaysRange=r=>{let t=d.isValidDate(r)?new Date(r):new Date().resetHours2Minutes2Seconds(),a=new Date(t.getTime()-3600*24*7*1e3),i=new Date(a),n=a.getDay(),o=a.getDate()-n+(n===0?-6:1),s=new Date(a.setDate(o)),c=new Date(i.setDate(o+6));return {first:s,last:c}},d.getCurrentWeekDaysRange=r=>{let t=d.isValidDate(r)?new Date(r):new Date().resetHours2Minutes2Seconds(),a=t.getDay(),i=t.getDate()-a+(a==0?-6:1),n=new Date(t),o=new Date(t.setDate(i));return n.setDate(n.getDate()+6),{first:o,last:n}},d.isDateObj=N;var g=d,me=(e,r)=>{let t=Y__default.default(e,r,true);try{if(t.isValid()&&t.format(r)===e||Y__default.default.utc(t,!0).format(r)===e)return {date:t.toDate(),matchedFormat:r,isValid:!0}}catch(a){}return null};Date.prototype.toSQLDateTimeFormat=function(){return g.toSQLDateTimeFormat(this)};Date.prototype.toSQLDateFormat=function(){return g.toSQLDateFormat(this)};Date.prototype.toSQLTimeFormat=function(){return g.toSQLTimeFormat(this)};Date.prototype.resetHours=function(){return this.setHours(0),this};Date.prototype.resetMinutes=function(){return this.setMinutes(0),this};Date.prototype.resetSeconds=function(){return this.setSeconds(0),this};Date.prototype.resetMilliseconds=function(){return this.setMilliseconds(0),this};Date.prototype.resetHours2Minutes2Seconds=function(){return this.setHours(0),this.setMinutes(0),this.setSeconds(0),this.setMilliseconds(0),this};Date.prototype.toFormat=function(e){return g.formatDate(this,e)};Date.prototype.addYears=function(e){return g.addYears(e,this)};Date.prototype.addMonths=function(e){return g.addMonths(e,this)};Date.prototype.addMinutes=function(e){return g.addMinutes(e,this)};Date.prototype.addSeconds=function(e){return g.addSeconds(e,this)};Date.prototype.addDays=function(e){return g.addDays(e,this)};Date.prototype.addWeeks=function(e){return g.addWeeks(e,this)};Date.prototype.addHours=function(e){return g.addHours(e,this)};var C=class C{static get logger(){let r=Reflect.getMetadata(C.loggerMetaData,C);return fe(r)&&(this._logger=r),this._logger?this._logger:console}static set logger(r){fe(r)&&Reflect.defineMetadata(C.loggerMetaData,r,C);}static _log(r,...t){let a=C.logger;r=f(r),r&&typeof a[r]=="function"?a[r](C.getDateTimeString(),...t):console.log("Logger level not found : [",r,"]",...t);}static getDateTimeString(){let{day:r,year:t,hours:a,minutes:i,seconds:n,dayNameShort:o,monthName:s}=g.getUTCDateTimeDetails(),c=r<10?"0"+r:r,l=a<10?"0"+a:a,y=i<10?"0"+i:i,h=n<10?"0"+n:n;return "["+[o,c,s,t].join(" ")+" "+[l,y,h].join(":")+"]"}static log(...r){this._log("log",...r);}static info(...r){this._log("info",...r);}static debug(...r){this._log("debug",...r);}static warn(...r){this._log("warn",...r);}static error(...r){this._log("error",...r);}};C.loggerMetaData=Symbol("logger-meta-data");var w=C,fe=e=>{if(!e)return false;try{return ["warn","info","error"].every(r=>typeof e[r]=="function")}catch(r){return false}};function Le(e){return typeof e=="boolean"||!e||typeof e=="number"||typeof e=="string"||typeof e=="symbol"?false:Object(e).constructor===Promise||e.constructor&&(e.constructor.name==="Promise"||e.constructor.name==="AsyncFunction")||e instanceof Promise||typeof(e==null?void 0:e.then)=="function"&&typeof(e==null?void 0:e.catch)=="function"&&typeof(e==null?void 0:e.finally)=="function"?true:e&&typeof e.constructor=="function"&&Function.prototype.toString.call(e.constructor).replace(/\(.*\)/,"()")===Function.prototype.toString.call(Function).replace("Function","Promise").replace(/\(.*\)/,"()")}function ye(e){return e&&Object.prototype.toString.call(e)==="[object Promise]"?true:Le(e)}function pe(){return typeof window!="undefined"&&(window==null?void 0:window.document)!==void 0&&typeof document!="undefined"&&typeof navigator!="undefined"}var x=()=>{var e;try{if(typeof process!="undefined"&&(process!=null&&process.versions)&&((e=process==null?void 0:process.versions)!=null&&e.node)||typeof global=="object"&&(global==null?void 0:global.toString.call(global))==="[object global]")return !0}catch(r){}return false},Pe=()=>{var e,r;return !!(typeof window!="undefined"&&window&&typeof(window==null?void 0:window.process)=="object"&&((e=window==null?void 0:window.process)==null?void 0:e.type)==="renderer"||typeof process!="undefined"&&typeof(process==null?void 0:process.versions)=="object"&&((r=process.versions)!=null&&r.electron)||typeof navigator=="object"&&typeof navigator.userAgent=="string"&&String(navigator==null?void 0:navigator.userAgent).toLowerCase().indexOf("electron")>=0)},Re=()=>{if(typeof document!="undefined"&&document)try{return document.createEvent("TouchEvent"),!0}catch(e){try{return "ontouchstart"in window||"onmsgesturechange"in window}catch(r){}}return false},xe=()=>typeof window=="undefined"&&typeof process!="undefined",ge=()=>!!(typeof window!="undefined"&&typeof window=="object"&&window),He=()=>{if(!pe()||typeof navigator!="object"||!navigator||typeof navigator.userAgent!="string")return false;let e=navigator.userAgent.toLowerCase();return /android/i.test(e)},Fe=()=>{var e;return !ge()||!(window!=null&&window.ReactNativeWebView)?false:typeof((e=window==null?void 0:window.ReactNativeWebView)==null?void 0:e.postMessage)=="function"},ke=()=>x()&&process.platform==="darwin",Be=()=>x()&&process.platform==="win32",Ge=()=>x()&&process.platform==="linux",he={isWeb:pe,isLinux:Ge,isDarwin:ke,isWin32:Be,isNode:x,isElectron:Pe,isTouchDevice:Re,isServerSide:xe,isClientSide:ge,isAndroidMobileBrowser:He,isReactNativeWebview:Fe};var O=class e{static decycle(r,t=[]){if(typeof r=="function")return;if(!r||typeof r!="object")return r;if(t.includes(r))return null;let a=t.concat([r]);return Array.isArray(r)?r.map(i=>e.decycle(i,a)):Object.fromEntries(Object.entries(r).map(([i,n])=>[i,e.decycle(n,a)]))}static stringify(r,t=false){return typeof r=="string"?r:JSON.stringify(t!==false?e.decycle(r):r)}static isJSON(r){if(typeof r!="string")return false;let t=r.trim();if(t.length===0)return false;let a=t[0];if(a!=="{"&&a!=="[")return false;try{let i=JSON.parse(t);return i!==null&&typeof i=="object"}catch(i){return false}}static parse(r,t){if(typeof r=="string")try{r=JSON.parse(r,t);}catch(a){return r}if(r&&typeof r=="object")for(let a in r){let i=r[a];e.isJSON(i)&&(r[a]=e.parse(i,t));}return r}};var D=class D{static get storage(){var t;let r=Reflect.getMetadata(D.sessionStorageMetaData,D);if(W(r)&&(this._storage=r),this._storage)return this._storage;if(he.isClientSide()&&typeof window!="undefined"&&window.localStorage&&((t=window.localStorage)!=null&&t.getItem))this._storage={get:a=>window.localStorage.getItem(a),set:(a,i)=>window.localStorage.setItem(a,i),remove:a=>window.localStorage.removeItem(a),removeAll:()=>window.localStorage.clear()};else {let a={};this._storage={get:i=>a[i],set:(i,n)=>a[i]=n,remove:i=>delete a[i],removeAll:()=>a={}};}return this._storage}static set storage(r){W(r)&&Reflect.defineMetadata(D.sessionStorageMetaData,r,D);}static get keyNamespace(){return u(this._keyNamespace)?this._keyNamespace:""}static set keyNamespace(r){u(r)&&(this._keyNamespace=r.trim().replace(/\s+/g,"-"));}static sanitizeKey(r){if(!r||!u(r))return "";r=r.trim().replace(/\s+/g,"-");let t=this.keyNamespace;return t?`${t}-${r}`:r}};D.sessionStorageMetaData=Symbol("sessionStorage"),D._keyNamespace=void 0;var T=D;function H(e){return T.sanitizeKey(e)}var be=(e,r)=>(e=e&&O.stringify(e,r),e==null&&(e=""),e),Te=e=>{if(ye(e))return new Promise((r,t)=>{e.then(a=>{r(O.parse(a));}).catch(a=>{t(a);});});if(e!=null)return O.parse(e)},Ke=e=>{if(e=H(e),T.storage&&e&&typeof e=="string"){let r=T.storage.get(e);return Te(r)}},Ve=e=>{if(e=H(e),T.storage&&e&&typeof e=="string")return T.storage.remove(e)},We=()=>{if(T.storage)return T.storage.removeAll()},W=e=>{if(!e)return false;try{return ["get","set","remove","removeAll"].every(r=>typeof e[r]=="function")}catch(r){return false}},U={get:Ke,set:(e,r,t=true)=>(e=H(e),T.storage.set(e,be(r,t))),remove:Ve,handleGetValue:Te,sanitizeKey:H,handleSetValue:be,isValidStorage:W,Manager:T,removeAll:We};function S(e){return e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function E(e){if(e instanceof RegExp)return true;if(!e||typeof e!="object"||!Object.prototype.toString.call(e).includes("RegExp"))return false;try{return new RegExp(e),!0}catch(r){return false}}function Z(e){return typeof window!="object"||!window||typeof document=="undefined"||typeof HTMLElement=="undefined"||!HTMLElement?false:e===document?true:"HTMLElement"in window?!!e&&e instanceof HTMLElement:!!e&&typeof e=="object"&&e.nodeType===1&&!!e.nodeName}function m(e){if(e===null||typeof e!="object"||Z(e)||N(e)||E(e)||S(e))return false;let r=Object.getPrototypeOf(e);if(r===null)return true;let t=r.constructor;if(typeof t!="function")return false;if(t===Object)return true;let a=t.prototype;return typeof a!="object"?false:a===Object.prototype?true:typeof r.hasOwnProperty=="function"&&Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")&&typeof r.isPrototypeOf=="function"}function z(e){if(Array.isArray(e)){let a=[];for(var r=0;r<e.length;r++)a[r]=z(e[r]);return a}else if(m(e)&&e){let a={};for(var t in e)e.hasOwnProperty(t)&&(a[t]=z(e[t]));return a}else return e}Object.getSize=function(e,r=false){if(!e||typeof e!="object")return 0;if(Array.isArray(e))return e.length;typeof r!="boolean"&&(r=false);let t=0;for(let a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&(t++,r===true))return t;return t};function I(e,...r){let t=Array.isArray(e),a=m(e);(e==null||!t&&!a)&&(e={});for(let i=0;i<r.length;i++){let n=r[i];if(n==null)continue;let o=m(n),s=Array.isArray(n);if(!(!o&&!s)){if(t){s&&Ce(e,n);continue}else if(s)continue;for(let c in n){let l=n[c];if(l==null)continue;if(l===n){e[c]=e;continue}let y=e[c],h=Array.isArray(y),M=Array.isArray(l);if(h){M?Ce(e[c],l):e[c]=l;continue}else if(!m(y)){e[c]=l;continue}if(M||!m(l)){e[c]=l;continue}e[c]=I({},y,l);}}}return e}var Ce=(e,r)=>{let t=r.length,a=0;for(let i=0;i<e.length;i++){let n=e[i],o=r[i];if(i<t){let s=Array.isArray(n),c=Array.isArray(o),l=m(n),y=m(o);s&&c||l&&y?(e[a]=I(s?[]:{},n,o),a++):o!=null?(e[a]=o,a++):n!=null&&(e[a]=n,a++);}}for(let i=e.length;i<t;i++)r[i]!==void 0&&r[i]!==null&&e.push(r[i]);return e};function Ue(e,r){return F(e,"",{},r)}function F(e,r="",t={},a){if(t=m(t)?t:{},S(e)||N(e)||E(e)||Array.isArray(e)&&(a!=null&&a.skipArrays))return r&&(t[r]=e),t;if(typeof e=="function"||typeof e=="object"&&!m(e)&&!Ze(e))return t;if(e instanceof Map||e instanceof WeakMap)return Array.from(e.entries()).forEach(([i,n])=>{let o=r?`${r}[${String(i)}]`:String(i);F(n,o,t,a);}),t;if(Array.isArray(e)||e instanceof Set||e instanceof WeakSet)return (Array.isArray(e)?e:Array.from(e)).forEach((n,o)=>{let s=r?`${r}[${o}]`:String(o);F(n,s,t,a);}),t;if(m(e))for(let i in e){if(!Object.prototype.hasOwnProperty.call(e,i))continue;let n=e[i],o=r?r.endsWith("]")?`${r}.${i}`:`${r}.${i}`:i;F(n,o,t,a);}return t}function Ze(e){return Array.isArray(e)||e instanceof Set||e instanceof Map||e instanceof WeakMap||e instanceof WeakSet}function ze(e){return Object.entries(e)}Object.typedEntries=ze;Object.flatten=Ue;Object.clone=z;function L(e,r){if(e==null)return "";if(typeof e=="string")return e;if((typeof e=="number"||typeof e=="object"&&e instanceof Number)&&typeof e.formatNumber=="function")return e.formatNumber();if(e instanceof Date||typeof e=="object"&&e!==null&&e.constructor===Date)return typeof e.toFormat=="function"?e.toFormat():e.toISOString();if(e instanceof Error)return `Error: ${e.message}`;if(E(e))return e.toString();if(S(e))return String(e);if(Array.isArray(e))return JSON.stringify(e);if(typeof e=="object"&&e!==null){if(typeof e.toString=="function"&&e.toString!==Object.prototype.toString)return e.toString();if(typeof e.toString=="function"){let t=e.toString();if(t!=="[object Object]")return t}return JSON.stringify(e)}return typeof(e==null?void 0:e.toString)=="function"?e.toString():String(e)}function Me(e,r,t){let a=L,i=f(e);if(!m(r)||!r)return i;let n=/%\{([^}]+)\}/g,o=new Set,s,c=f(e);for(;(s=n.exec(c))!==null;){let l=s[1];l!==void 0&&o.add(l);}return o.forEach(l=>{let y;y=`%{${l}}`;let h=Object.prototype.hasOwnProperty.call(r,l)?r[l]:void 0,M=h===void 0?"":(()=>{try{return a(h,l,L)}catch(Q){return L(h)}})(),Ye=y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");i=i.replace(new RegExp(Ye,"g"),M);}),i}function J(e){return !!(e==null||typeof e=="number"&&isNaN(e)||typeof e=="string"&&e.trim()==="")}function Je(e){return f(e).replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f")}function k(e,r){var t=Object.prototype.toString.call(e);return t==="[object "+r+"]"}function A(e,r){if(["boolean","undefined"].includes(typeof e)||e===null)return String(e);if(b(e))return e.formatNumber();if(e instanceof Date)return e.toFormat();if(e instanceof Error)return e==null?void 0:e.toString();r=Object.assign({},r);let{parenthesis:t}=r,a=t?"(":"",i=t?")":"";return typeof e=="string"?(r==null?void 0:r.escapeString)!==false?"'"+Je(e)+"'":e:k(e,"RegExp")||k(e,"Number")||k(e,"Boolean")?e.toString():k(e,"Date")?"new Date("+e.getTime()+")":Array.isArray(e)?"["+e.map(n=>A(n,r)).join(",")+"]":typeof e=="object"?a+"{"+Object.keys(e).map(n=>{var o=e[n];return A(n,r)+":"+A(o,r)}).join(",")+"}"+i:e&&typeof(e==null?void 0:e.toString)=="function"?e==null?void 0:e.toString():String(e)}var $=Symbol("TRANSLATION_KEY");function Lr(e){return ie($,e)}var p=class p extends i18nJs.I18n{constructor(t={},a={}){super({},a);this._isLoading=false;this._locales=[];this.namespaceResolvers={};this._observableFactory=ae();this._____isObservable=true;this.hasRegisteredDefaultTranslations=false;this._namespacesLoaded={};this.hasRegisteredDefaultTranslations||(this.registerTranslations(K),this.hasRegisteredDefaultTranslations=true),this.registerTranslations(t),this.loadNamespaces();}static[Symbol.hasInstance](t){return this.isI18nInstance(t)}static isI18nInstance(t){if(!t||typeof t!="object")return false;try{if(t instanceof i18nJs.I18n)return !0}catch(a){}return typeof t.getLocale=="function"&&typeof t.translate=="function"&&typeof t.translateTarget=="function"}translate(t,a){return this.isPluralizeOptions(a)&&this.canPluralize(t)?(typeof a.count=="number"&&(a.countStr=a.count.formatNumber()),this.pluralize(a.count,t,a)):super.translate(t,a)}translateTarget(t,a){let i=p.getTargetTanslationKeys(t);for(let n in i)u(i[n])&&(i[n]=this.translate(i[n],a));return i}translateObject(t,a){if(!m(t))return {};let i={};for(let n in t){let o=t[n];u(o)&&(i[n]=Se.translate(o,a));}return i}static getTargetTanslationKeys(t){return ne(t,$)}on(t,a){return this._observableFactory.on.call(this,t,a)}finally(t,a){return this._observableFactory.finally.call(this,t,a)}off(t,a){var i;return (i=this._observableFactory)==null?void 0:i.off.call(this,t,a)}trigger(t,...a){var i;return (i=this._observableFactory)==null?void 0:i.trigger.call(this,t,...a)}offAll(){var t;return (t=this._observableFactory)==null?void 0:t.offAll.call(this)}once(t,a){var i;return (i=this._observableFactory)==null?void 0:i.once.call(this,t,a)}getEventCallBacks(){var t;return (t=this._observableFactory)==null?void 0:t.getEventCallBacks.call(this)}static getInstance(t){if(!this.isI18nInstance(p.instance)){let a=p.getLocaleFromSession();p.instance=this.createInstance({},Object.assign({},a?{locale:a}:{},t));}return p.instance}isDefaultInstance(){return this===p.instance}static setLocaleToSession(t){U.set("i18n.locale",t);}static getLocaleFromSession(){let t=U.get("i18n.locale");return u(t)?t:""}canPluralize(t,a){a=f(a,this.getLocale());let i=this.getNestedTranslation(t,a);return !m(i)||!i?false:u(i==null?void 0:i.one)&&u(i==null?void 0:i.other)}getNestedTranslation(t,a){a=f(a,this.getLocale());let i=(u(t)?t.trim().split("."):Array.isArray(t)?t:[]).filter(u);if(!i.length)return;let n=this.getTranslations(a);for(let o of i)if(m(n))n=n[o];else return;return n}isPluralizeOptions(t){return !!(m(t)&&t&&typeof t.count=="number")}static RegisterTranslations(t){return p.getInstance().registerTranslations(t)}static createInstance(t={},a={}){let s=Object.assign({},a),{interpolate:i}=s,n=re(s,["interpolate"]),o=new p(t,n);return o.interpolate=(c,l,y)=>{let h=p.flattenObject(y),M=this.defaultInterpolator(c,l,h);return u(M)&&M!==l&&(l=M),typeof i=="function"?i(c,l,y):Me(l,y)},o}getTranslations(t){let a=m(this.translations)?this.translations:{};return u(t)?m(a[t])?a[t]:{}:a}static registerMomentLocale(t,a){return u(t)&&m(a)&&Array.isArray(a.months)&&(this.momentLocales[t]=I({},this.momentLocales[t],a)),this.momentLocales}static getMomentLocale(t){return this.momentLocales[t]}static setMomentLocale(t){try{return Y__default.default.updateLocale(t,this.getMomentLocale(t)),!0}catch(a){console.error(a," setting moment locale : ",t);}return false}registerTranslations(t){return this.store(t),this.getTranslations()}store(t){super.store(t),this.trigger("translations-changed",this.getLocale(),this.getTranslations());}resolveTranslations(t){try{let a=Object.getOwnPropertyNames(t);for(let i of a){let n=Reflect.getMetadata($,t,i);if(n)try{t[i]=this.translate(n);}catch(o){w.error(o," resolving translation for key : ",n);}}}catch(a){w.error(a," resolving translations for target : ",t);}}getMissingPlaceholderString(t,a,i){return typeof this.missingPlaceholder=="function"?this.missingPlaceholder(this,t,f(a),Object.assign({},i)):t}getLocale(){return super.locale}setLocales(t){return this._locales=Array.isArray(t)?t:["en"],this._locales.includes("en")||this._locales.push("en"),this.getLocales()}hasLocale(t){return u(t)&&this.getLocales().includes(t)}getLocales(){let t=Object.keys(this.getTranslations()),a=Array.isArray(this._locales)?this._locales:["en"],i=[...t,...a.filter(n=>!t.includes(n))];return i.includes("en")||i.push("en"),i}isLocaleSupported(t){return u(t)?this.getLocales().includes(t):false}isLoading(){return this._isLoading}setLocale(t,a=false){return super.locale===t&&a!==true&&this._namespacesLoaded[t]?Promise.resolve(this.getLocale()):new Promise((i,n)=>(this._isLoading=true,this.trigger("namespaces-before-load",t),this.loadNamespaces(t).then(o=>{this.isDefaultInstance()&&(p.instance=this,this.isLocaleSupported(t)&&p.setLocaleToSession(t)),super.locale=t,p.setMomentLocale(t),this.trigger("locale-changed",t,o),i(t);}).catch(n).finally(()=>{this._isLoading=false;})))}registerNamespaceResolver(t,a){if(!u(t)||typeof a!="function"){console.warn("Invalid arguments for registerNamespaceResolver.",t,a);return}this.namespaceResolvers[t]=a;}static RegisterNamespaceResolver(t,a){return p.getInstance().registerNamespaceResolver(t,a)}loadNamespace(t,a,i=true){return !u(t)||!this.namespaceResolvers[t]?Promise.reject(new Error(`Invalid namespace or resolver for namespace "${t}".`)):(a=f(a,this.getLocale()),u(a)?this.namespaceResolvers[t](a).then(n=>{let o={};return o[a]=Object.assign({},n),m(n)&&(i!==false&&this.store(o),this.trigger("namespace-loaded",t,a,o)),o}):Promise.reject(new Error(`Locale is not set. Cannot load namespace "${t}".`)))}static LoadNamespace(t,a,i=true){return p.getInstance().loadNamespace(t,a,i)}loadNamespaces(t,a=true){let i=[],n={};t=f(t,this.getLocale()),this._isLoading=true;for(let o in this.namespaceResolvers)Object.prototype.hasOwnProperty.call(this.namespaceResolvers,o)&&typeof this.namespaceResolvers[o]=="function"&&i.push(new Promise(s=>{this.namespaceResolvers[o](t).then(c=>{I(n,c);}).finally(()=>{s(true);});}));return Promise.all(i).then(()=>{let o={};return o[t]=n,a!==false&&this.store(o),setTimeout(()=>{this.trigger("namespaces-loaded",t,o);},100),o}).finally(()=>{this._isLoading=false;})}static LoadNamespaces(t,a=true){return p.getInstance().loadNamespaces(t,a)}static flattenObject(t){return m(t)?Object.flatten(t):t}static defaultInterpolator(t,a,i){return J(a)?"":S(a)?(a=String(a),!m(i)||!i||!m(i)||!i?a:a.replace(/%{(.*?)}/g,(n,o)=>J(i[o])?"":S(i[o])?String(i[o]):A(i[o],{escapeString:false}))):A(a,{escapeString:false})}};p.momentLocales={};var v=p,Se=v.getInstance();try{Object.setPrototypeOf(Se,v.prototype);}catch(e){}exports.I18n=v;exports.Translate=Lr;exports.i18n=Se;
@@ -0,0 +1,396 @@
1
+ import { CountryCode } from '../countries/index';
2
+ import { PhoneNumber, PhoneNumberFormat } from 'google-libphonenumber';
3
+ import 'reflect-metadata';
4
+ import '../utils/numbers';
5
+ import { InputFormatterMask, InputFormatterMaskArray, InputFormatterMaskOptions, InputFormatterMaskResult, InputFormatterMaskWithValidation, InputFormatterOptions, InputFormatterResult } from './types';
6
+ export * from './types';
7
+ export declare class InputFormatter {
8
+ /**
9
+ * @description
10
+ * Formats a value according to the provided options defined in the InputFormatterOptions interface.
11
+ *
12
+ * This function takes an input value and formats it based on the specified type, format function,
13
+ * and other parameters. It returns an object containing the formatted value and other relevant
14
+ * information, such as whether the value can be a decimal.
15
+ *
16
+ * @param {InputFormatterOptions} options - The options for formatting, adhering to the InputFormatterOptions interface.
17
+ * @param {boolean} returnObject - Optional. If true, the function will return an object instead of a formatted string.
18
+ *
19
+ * @returns {InputFormatterResult} - An object containing:
20
+ * - formattedValue: The formatted output based on the provided options.
21
+ * - isDecimalType: A boolean indicating if the value can be treated as a decimal.
22
+ * - value: The original input value.
23
+ * - format: The formatting function or type used.
24
+ * - parsedValue: The parsed numeric value.
25
+ * - decimalValue: The decimal representation of the value, defaulting to 0 if not applicable.
26
+ *
27
+ * Example:
28
+ * ```typescript
29
+ * const options = {
30
+ * value: "123.45",
31
+ * type: "decimal",
32
+ * format: (opts) => `${opts.value} formatted`,
33
+ * };
34
+ * const result = formatValue(options);
35
+ * console.log(result);
36
+ * // Output: {
37
+ * // formattedValue: "123.45 formatted",
38
+ * // isDecimalType: true,
39
+ * // value: "123.45",
40
+ * // format: [Function],
41
+ * // parsedValue: 123.45,
42
+ * // decimalValue: 123.45
43
+ * // }
44
+ * ```
45
+ */
46
+ static formatValue({ value, type, format, dateFormat, phoneCountryCode, abreviateNumber, ...rest }: InputFormatterOptions): InputFormatterResult;
47
+ /**
48
+ * Gets the dial code for a given country code.
49
+ *
50
+ * @param {CountryCode} code The country code.
51
+ * @returns {string} The dial code for the given country code, or an empty string if the country code is not found.
52
+ *
53
+ * @example
54
+ * ```typescript
55
+ * console.log(CountriesManager.getCountryDialCode('US')); // '+1'
56
+ * ```
57
+ */
58
+ static getCountryDialCode(countryCode: CountryCode): string;
59
+ /**
60
+ * @description
61
+ * Formats a value based on the provided options and returns the formatted string.
62
+ *
63
+ * This function serves as a simpler interface for formatting values. It internally calls
64
+ * the `formatValue` function to obtain the formatted value and then returns it
65
+ * as a string. This is useful for scenarios where only the formatted string is needed.
66
+ *
67
+ * @param options - The options for formatting, adhering to the InputFormatterOptions interface.
68
+ * @ param returnObject - Optional. If true, the function will return an object instead of a formatted string.
69
+ *
70
+ * @returns {string} - The formatted value as a string.
71
+ *
72
+ * Example:
73
+ * ```typescript
74
+ * const options = {
75
+ * value: "123.45",
76
+ * type: "decimal",
77
+ * format: (opts) => `${opts.value} formatted`,
78
+ * };
79
+ * const formattedString = formatValue(options);
80
+ * console.log(formattedString);
81
+ * // Output: "123.45 formatted"
82
+ * ```
83
+ */
84
+ static formatValueAsString(options: InputFormatterOptions): string;
85
+ /***
86
+ * Check if a given mask is valid or not
87
+ * @param {InputFormatterMask}, the input mask to check
88
+ * @return {boolean} Wheather the mask is valid or not
89
+ */
90
+ static isValidMask(mask?: InputFormatterMask): mask is InputFormatterMaskArray | ((options: InputFormatterOptions) => InputFormatterMaskArray);
91
+ /**
92
+ * Parses a given value and converts it into a decimal number.
93
+ *
94
+ * This function takes a value as input and performs the following checks:
95
+ * - If the value is already a number, it returns the value directly.
96
+ * - If the value is undefined, null, or not a string, it returns 0.
97
+ * - If the value is a string, it trims whitespace, replaces commas with periods,
98
+ * and removes any spaces before converting it to a float.
99
+ *
100
+ * ### Parameters:
101
+ * - `value`:
102
+ * - **Type**: `any`
103
+ * - The value to be parsed. This can be a number, string, or any other type.
104
+ * The function will attempt to convert it to a decimal number.
105
+ *
106
+ * ### Returns:
107
+ * - **Type**: `number`
108
+ * - The decimal representation of the input value. If the input is invalid
109
+ * (e.g., undefined, null, or not a valid string), it returns 0.
110
+ *
111
+ * ### Example Usage:
112
+ * ```typescript
113
+ * const decimal1 = parseDecimal("1,234.56"); // Returns: 1234.56
114
+ * const decimal2 = parseDecimal(789); // Returns: 789
115
+ * const decimal3 = parseDecimal(null); // Returns: 0
116
+ * const decimal4 = parseDecimal("invalid"); // Returns: 0
117
+ * ```
118
+ */
119
+ static parseDecimal: (value: any) => number;
120
+ /***
121
+ Normalize a value to a string.
122
+ This method takes a value and a facultative decimal separator. It removes leading and trailing
123
+ whitespace, commas. It also replaces the comma with the decimal separator.
124
+ If the value is a number, it will be converted to a string.
125
+ @param {any} value - The value to normalize
126
+ @param {string} decimalSeparator - The decimal separator to use
127
+ */
128
+ static normalizeNumber(value: any, decimalSeparator?: string): string;
129
+ /***
130
+ * Check if the value ends with a decimal separator
131
+ * @param {any} value - The value to Check
132
+ * @returns {boolean} Whether the value ends with a decimal separator
133
+ */
134
+ static endsWithDecimalSeparator: (value: any) => boolean;
135
+ /**
136
+ * Formats a value with a mask.
137
+ *
138
+ * This method takes an options object with a value, mask, and other settings, and returns an object with the masked, unmasked, and obfuscated values, as well as the original mask array.
139
+ *
140
+ * @param options The options object with the value, mask, and other settings.
141
+ * @returns An object with the masked, unmasked, and obfuscated values, as well as the original mask array.
142
+ *
143
+ * @example
144
+ * ```typescript
145
+ * const options: InputFormatterMaskOptions = {
146
+ * value: '12345',
147
+ * mask: ['(', /\d/, /\d/, ')', ' ', /\d/, /\d/, /\d/, /\d/, /\d/, '-', /\d/, /\d/, /\d/, /\d/],
148
+ * obfuscationCharacter: '*',
149
+ * };
150
+ * const result = formatWithMask(options);
151
+ * console.log(result);
152
+ * // Output:
153
+ * ```
154
+ *
155
+ *
156
+ * @license This code is adapted from [Original Repository Name] (https://github.com/CaioQuirinoMedeiros/react-native-mask-input).
157
+ *
158
+ * Copyright (c) [2025] [CaioQuirinoMedeiros]
159
+ * Licensed under the MIT License (https://github.com/CaioQuirinoMedeiros/react-native-mask-input/blob/main/LICENSE)
160
+ *
161
+ */
162
+ static formatWithMask(options: InputFormatterMaskOptions): InputFormatterMaskResult;
163
+ /***
164
+ * Predefined masks for common moment formats.
165
+ * The keys of the object are the moment format strings, and the values are arrays of regular expressions or strings that define the expected format of the input value.
166
+ */
167
+ static MOMENT_MASKS_MAP: {
168
+ YYYY: any[];
169
+ YY: any[];
170
+ MM: any[];
171
+ M: (string | RegExp)[][];
172
+ MMMM: any[];
173
+ MMM: any[];
174
+ DD: any[];
175
+ D: (string | RegExp)[][];
176
+ HH: any[];
177
+ H: (string | RegExp)[][];
178
+ hh: any[];
179
+ h: (string | RegExp)[][];
180
+ mm: any[];
181
+ m: (string | RegExp)[][];
182
+ ss: any[];
183
+ s: (string | RegExp)[][];
184
+ SSS: any[];
185
+ Z: RegExp[];
186
+ ZZ: RegExp[];
187
+ A: string[];
188
+ a: string[];
189
+ };
190
+ /***
191
+ * A map of moment separators and their corresponding characters.
192
+ * The keys of the object are the separators, and the values are the corresponding characters.
193
+ */
194
+ static MOMENT_SEPARATOR_MAP: {
195
+ '/': string;
196
+ '-': string;
197
+ '.': string;
198
+ ' ': string;
199
+ ':': string;
200
+ T: string;
201
+ };
202
+ /***
203
+ * Creates a date mask, based on the specified moment format.
204
+ * @param {string} momentDateFormat - The moment format string.
205
+ * @returns {InputFormatterMaskWithValidation}} - An object containing the mask and a validation function.
206
+ */
207
+ static createDateMask(momentDateFormat: string): InputFormatterMaskWithValidation;
208
+ /***
209
+ * A mask for single facilitative space.
210
+ * @description A mask for a single facilitative space.
211
+ */
212
+ static SINGLE_SPACE_MASK: string;
213
+ /**
214
+ * Generates a phone number mask based on the country code.
215
+ * @param countryCode - The country code (e.g., "US", "FR", "IN").
216
+ * @param {PhoneNumberFormat} [format] - The format to use for the phone number mask. Defaults to PhoneNumberFormat.INTERNATIONAL.
217
+ * @returns {InputFormatterMaskWithValidation} The phone number mask, an array of mask elements (strings or regexes) representing the phone number format..
218
+ */
219
+ static createPhoneNumberMask(countryCode: CountryCode, format?: PhoneNumberFormat): InputFormatterMaskWithValidation;
220
+ /****
221
+ * Gets the phone number example for the given country code.
222
+ * @param countryCode The country code.
223
+ * @returns {PhoneNumber|null} The phone number example for the given country code, or null if no example is found.
224
+ */
225
+ static getPhoneNumberExample(countryCode: CountryCode): PhoneNumber | null;
226
+ /**
227
+ * Creates a phone number mask based on the provided phone number example and country code.
228
+ * Uses google-libphonenumber to ensure accurate regional formatting
229
+
230
+ This function takes a phone number example and an optional country code as input. It creates a mask based on the example number and the country code.
231
+
232
+ The function returns an object with a mask and a validation function. The mask is an array of mask elements, where each element represents a character or a regex pattern. The validation function checks if the input value is a valid phone number based on the provided country code.
233
+
234
+ If the country code is not provided, the default country code is used. If no example number is found for the provided country code, the function returns an empty mask and a validation function that always returns false.
235
+
236
+ @param {string} phoneNumberExample - The phone number example to use for the mask.
237
+ @param {CountryCode} [countryCode] - The country code to use for the mask. If not provided, the default country code is used.
238
+ @returns {InputFormatterMaskWithValidation} An object containing the mask and a validation function.
239
+ */
240
+ static createPhoneNumberMaskFromExample(phoneNumber: string, countryCode?: CountryCode, format?: PhoneNumberFormat): InputFormatterMaskWithValidation;
241
+ /**
242
+ * Predefined masks for common input formats.
243
+ *
244
+ * This object contains a set of predefined masks for common input formats such as date, time, date-time, and credit card numbers.
245
+ * Each mask is an array of regular expressions or strings that define the expected format of the input value.
246
+ * ```
247
+ */
248
+ static MASKS_WITH_VALIDATIONS: {
249
+ /**
250
+ * Mask for date input format.
251
+ *
252
+ * This mask expects the input value to be in the format of `YYYY-MM-DD` or `YYYY/MM/DD` or `YYYY.MM.DD`.
253
+ */
254
+ readonly DATE: InputFormatterMaskWithValidation;
255
+ /**
256
+ * Mask for time input format.
257
+ *
258
+ * This mask expects the input value to be in the format of `HH:MM:SS` or `HHHMMSS`.
259
+ */
260
+ readonly TIME: InputFormatterMaskWithValidation;
261
+ readonly DATE_TIME: InputFormatterMaskWithValidation;
262
+ CREDIT_CARD: {
263
+ mask: InputFormatterMaskArray;
264
+ validate: () => boolean;
265
+ };
266
+ };
267
+ /***
268
+ * Parse a phone number using the google-libphonenumber library.
269
+ * @param {string} number - The phone number to parse.
270
+ * @param {CountryCode} [countryCode] - The country code to use for parsing the phone number.
271
+ * @returns {PhoneNumber | null} The parsed phone number, or null if the parsing fails.
272
+ * @example
273
+ * // Parse a phone number
274
+ * const phoneNumber = InputFormatter.parsePhoneNumber('+1 (555) 123-4567');
275
+ * console.log(phoneNumber); // Output: PhoneNumber { countryCode: 'US', nationalNumber: '5551234567', ...}
276
+ *
277
+ */
278
+ static parsePhoneNumber(number: string, countryCode?: CountryCode): PhoneNumber | null;
279
+ /***
280
+ * Prefix a phone number with a dial code.
281
+ * @param {string} phoneNumber - The phone number to prefix.
282
+ * @param {string} dialCode - The dial code to prefix the phone number with.
283
+ * @returns {string} The prefixed phone number.
284
+ * @example
285
+ * // Prefix a phone number with a dial code
286
+ * const prefixedPhoneNumber = InputFormatter.prefixPhoneNumberWithDialCode('5551234567', '+1');
287
+ * console.log(prefixedPhoneNumber); // Output: +15551234567
288
+ */
289
+ static prefixPhoneNumberWithDialCode(phoneNumber: string, dialCode: string): string;
290
+ /**
291
+ * Validates a phone number using the google-libphonenumber library.
292
+ *
293
+ * @param {string} phoneNumber The phone number to validate.
294
+ * @param {CountryCode}, The country code to use for validation. If not provided, the default country code will be used.
295
+ * @returns True if the phone number is valid, false otherwise.
296
+ * @throws Error if there's an issue parsing the phone number.
297
+ * @example
298
+ * ```typescript
299
+ * const isValid = isValidPhoneNumber ('+1 202 555 0144');
300
+ * console.log(isValid); // Output: true
301
+ * ```
302
+ */
303
+ static isValidPhoneNumber(phoneNumber: string, countryCode?: CountryCode): phoneNumber is string;
304
+ /***
305
+ * An utility function that formats phone numbers using Google's libphonenumber library.
306
+ * @example
307
+ * // Returns "+1 650 253 0000"
308
+ * InputFormatter.formatPhoneNumber("6502530000", "US");
309
+ *
310
+ * @example
311
+ * // Returns "+44 20 7031 3000"
312
+ * InputFormatter.formatPhoneNumber("2070313000", "GB");
313
+ *
314
+ * @example
315
+ * // Returns "+33 1 42 68 53 00"
316
+ * InputFormatter.formatPhoneNumber("+33142685300");
317
+ *
318
+ * @example
319
+ * // Returns null (invalid phone number)
320
+ * InputFormatter.formatPhoneNumber("123", "US");
321
+ * Formats a phone number using the google-libphonenumber library.
322
+ * @param {string} phoneNumber - The phone number to format (can be in various formats)
323
+ * @param {CountryCode}, - ISO 3166-1 alpha-2 country code to use if the phone number doesn't have a country code
324
+ * @returns The formatted international phone number or null if parsing fails
325
+ *
326
+ */
327
+ static formatPhoneNumber(phoneNumber: string, countryCode?: CountryCode): string | null;
328
+ /***
329
+ * Cleans the phone number string by removing leading and trailing whitespace,
330
+ * replacing dots and hyphens with empty strings, and trimming the string.
331
+ *
332
+ * @param phoneNumber - The phone number string to Clean
333
+ * @returns The cleaned phone number string
334
+ */
335
+ static cleanPhoneNumber(phoneNumber: string): string;
336
+ /**
337
+ * Extracts the country dial code from international phone numbers.
338
+ * Supports formats based on ITU-T E.164 and common regional variations.
339
+ *
340
+ * Supported formats:
341
+ * 1. E.164 format: +[country code][area code][local number]
342
+ * Example: +12125551234
343
+ *
344
+ * 2. International format with spaces/separators:
345
+ * - +[country code] [area code] [local number]
346
+ * - +[country code].[area code].[local number]
347
+ * - +[country code]-[area code]-[local number]
348
+ * Examples:
349
+ * - +1 212 555 1234
350
+ * - +44.20.7123.4567
351
+ * - +81-3-1234-5678
352
+ *
353
+ * 3. International format with parentheses:
354
+ * - +[country code] ([area code]) [local number]
355
+ * - ([country code]) [area code] [local number]
356
+ * Examples:
357
+ * - +1 (212) 555-1234
358
+ * - (44) 20 7123 4567
359
+ *
360
+ * 4. 00 prefix format (common in Europe):
361
+ * - 00[country code][remainder]
362
+ * Example: 00441234567890
363
+ *
364
+ * 5. Regional formats:
365
+ * - 011[country code] (US/Canada international prefix)
366
+ * - 010[country code] (Japan international prefix)
367
+ *
368
+ * @param phoneNumber - The phone number string to extract the dial code from
369
+ * @param countryCode - The country code to use for extracting the dial code
370
+ * @returns The dial code with + prefix, or null if no valid code is found
371
+ */
372
+ static extractDialCodeFromPhoneNumber(phoneNumber: string, countryCode?: CountryCode): string;
373
+ /***
374
+ * Check if the provided number is a valid numeric string.
375
+ * @param {string} n The number to check.
376
+ * @returns {boolean} True if the number is a valid numeric string, false otherwise.
377
+ * @example
378
+ * ```typescript
379
+ * console.log(isNumericString('123')); // Output: true
380
+ * console.log(isNumericString('abc')); // Output: false
381
+ * ```
382
+ */
383
+ static isNumericString(n: string): boolean;
384
+ /***
385
+ * Extracts the numeric part of a phone number string.
386
+ * @param {string} str The phone number string.
387
+ * @returns {string} The numeric part of the phone number string.
388
+ * @example
389
+ * ```typescript
390
+ * console.log(extractNumbersFromString('+1 202 555 0144')); // Output: 2025550144
391
+ * console.log(extractNumbersFromString('+1 202 555 0144')); // Output: 2025550144
392
+ * console.log(extractNumbersFromString('2025550144')); // Output: 2025550144
393
+ * ```
394
+ */
395
+ static extractNumbersFromString(str: string): string;
396
+ }