@opengis/cms 0.0.22 → 0.0.26

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 (274) hide show
  1. package/dist/index-W-qQIppj-DRzFSjU1.js +2452 -0
  2. package/dist/index.html +28 -34
  3. package/dist/index.js +13915 -0
  4. package/dist/index.umd.cjs +153 -0
  5. package/package.json +4 -11
  6. package/dist/assets/AddUser-CX-McfRW.js +0 -1
  7. package/dist/assets/ApiKeys-DSv1exYv.js +0 -16
  8. package/dist/assets/Appearance-DDtOUvCV.js +0 -6
  9. package/dist/assets/ArticlesPage-D6B3cZsl.js +0 -6
  10. package/dist/assets/BuilderPage-CCeSMVWe.js +0 -1
  11. package/dist/assets/CollectionsBreadcrumb.vue_vue_type_script_setup_true_lang-DVYVfYF4.js +0 -1
  12. package/dist/assets/CollectionsPage-CHk8Cn5k.js +0 -1
  13. package/dist/assets/Dashboard-Bs7sXO6h.js +0 -11
  14. package/dist/assets/EditCollectionPage-gPuLJrN8.js +0 -41
  15. package/dist/assets/EmailPage-DhlWsPxk.js +0 -1
  16. package/dist/assets/EmptyData-Ct-xQv_N.js +0 -1
  17. package/dist/assets/FeedbackPage-DtaOncVv.js +0 -1
  18. package/dist/assets/Logs-CZ5klHNK.js +0 -1
  19. package/dist/assets/MediaBreadcrumb-BpOxt5PK.js +0 -11
  20. package/dist/assets/MediaPage-DqRcZFlO.js +0 -16
  21. package/dist/assets/MenuAddPage-BLcoVgrS.js +0 -1
  22. package/dist/assets/MenuItemPage-B2otXqkz.js +0 -20
  23. package/dist/assets/MenuPage-C00m4Fc_.js +0 -1
  24. package/dist/assets/MonacoEditor.vue_vue_type_script_setup_true_lang-CjoEsC67.js +0 -3
  25. package/dist/assets/PermissionsPage-LtqcCJ14.js +0 -1
  26. package/dist/assets/Settings-BHH6RoBP.js +0 -1
  27. package/dist/assets/SettingsTable-CY5pZx1z.js +0 -1
  28. package/dist/assets/SettingsTitle-t4WJBFxZ.js +0 -1
  29. package/dist/assets/SingletonsPage-Bn2Ypjhs.js +0 -6
  30. package/dist/assets/TagsPage-DAiakEth.js +0 -1
  31. package/dist/assets/UniversalTable.vue_vue_type_script_setup_true_lang-BQ5m4aZd.js +0 -11
  32. package/dist/assets/UniversalTablePagination.vue_vue_type_script_setup_true_lang-DppVBws0.js +0 -1
  33. package/dist/assets/Users-CMH5j0db.js +0 -1
  34. package/dist/assets/UsersPage-CDGreEib.js +0 -1
  35. package/dist/assets/arrow-up-DCe0WsrM.js +0 -16
  36. package/dist/assets/calendar-o9t4MkD2.js +0 -6
  37. package/dist/assets/chevron-left-WFftVS9c.js +0 -6
  38. package/dist/assets/chevron-right-BiiSb3Be.js +0 -6
  39. package/dist/assets/contentForm-unZQhjCu.js +0 -6
  40. package/dist/assets/en-BDx3Svx8.js +0 -1
  41. package/dist/assets/eye-Dijywc6g.js +0 -6
  42. package/dist/assets/file-B_duymIT.js +0 -6
  43. package/dist/assets/general-CkN_0qIV.js +0 -1
  44. package/dist/assets/index-BIp7eSXk.js +0 -1
  45. package/dist/assets/index-DCW2e4Az.js +0 -9
  46. package/dist/assets/index-DGweaj24.js +0 -1
  47. package/dist/assets/index-W-qQIppj-BDlsxaGB.js +0 -1
  48. package/dist/assets/index-W-qQIppj-BsopI3Hz-BIZR-dhy.js +0 -1
  49. package/dist/assets/index-oQz9FOqL.css +0 -1
  50. package/dist/assets/index-yMJAVBXk.js +0 -290
  51. package/dist/assets/list-CXRbSNky.js +0 -6
  52. package/dist/assets/logo-Cct5WB26.png +0 -0
  53. package/dist/assets/pencil-CwnPP4IJ.js +0 -6
  54. package/dist/assets/plus-DLR44m6p.js +0 -6
  55. package/dist/assets/save-FeDrOUOd.js +0 -6
  56. package/dist/assets/search-C4-fHihx.js +0 -6
  57. package/dist/assets/square-pen-xVs4e8Yb.js +0 -6
  58. package/dist/assets/trash-2-BGXMNU3d.js +0 -6
  59. package/dist/assets/uk-BA7DIKEL.js +0 -1
  60. package/dist/assets/useDebounce-DFq3rxAW.js +0 -1
  61. package/dist/assets/vs-form-reletion-link-C-xrdHDl.js +0 -20
  62. package/dist/assets/vs-form-reletion-link-bk-9ZkDH.css +0 -1
  63. package/dist/assets/vue.-sixQ7xP-CUPNuJcq.js +0 -1
  64. package/dist/assets/vuedraggable.umd-W_2WTF6i.js +0 -14
  65. package/dist/assets/x-D2t-wfBe.js +0 -6
  66. package/module/cms/card/cms.content.table/index.yml +0 -17
  67. package/module/cms/card/cms.content.table/main_info.hbs +0 -26
  68. package/module/cms/card/cms.menu.table/content_info.hbs +0 -16
  69. package/module/cms/card/cms.menu.table/index.yml +0 -18
  70. package/module/cms/card/cms.menu.table/main_info.hbs +0 -22
  71. package/module/cms/card/cms.settings.table/index.yml +0 -13
  72. package/module/cms/card/cms.settings.table/main_info.hbs +0 -20
  73. package/module/cms/cls/content.status.json +0 -18
  74. package/module/cms/cls/user_type.json +0 -10
  75. package/module/cms/form/admin.users.form.json +0 -78
  76. package/module/cms/form/cms.content.form.json +0 -79
  77. package/module/cms/form/cms.menu.form.json +0 -69
  78. package/module/cms/form/cms.settings.form.json +0 -32
  79. package/module/cms/menu.json +0 -24
  80. package/module/cms/router.js +0 -169
  81. package/module/cms/select/cms.page_type.sql +0 -2
  82. package/module/cms/select/collection.sql +0 -1
  83. package/module/cms/select/locale.sql +0 -17
  84. package/module/cms/select/news_tag_id.sql +0 -12
  85. package/module/cms/select/tag_id.sql +0 -1
  86. package/module/cms/table/admin.users.table.json +0 -54
  87. package/module/cms/table/cms.content.table.json +0 -106
  88. package/module/cms/table/cms.menu.table.json +0 -73
  89. package/module/cms/table/cms.settings.table.json +0 -57
  90. package/module/cms/table/collection.default.table.json +0 -102
  91. package/module/cms/table/single.default.table.json +0 -115
  92. package/src/App.css +0 -52
  93. package/src/App.vue +0 -62
  94. package/src/assets/image.png +0 -0
  95. package/src/assets/main.css +0 -3
  96. package/src/assets/tailwind-3.4.17.js +0 -113
  97. package/src/components/LanguageSwitcher.vue +0 -73
  98. package/src/components/SettingsCard.vue +0 -40
  99. package/src/components/builder/CreateForm.vue +0 -128
  100. package/src/components/builder/formTypeSchema.js +0 -145
  101. package/src/components/builder/tabs/index.ts +0 -9
  102. package/src/components/builder/tabs/vs-builder-edit.vue +0 -133
  103. package/src/components/builder/tabs/vs-builder-monaco.vue +0 -29
  104. package/src/components/builder/tabs/vs-builder-preview.vue +0 -39
  105. package/src/components/builder/vs-builder-datatable-controls.vue +0 -138
  106. package/src/components/builder/vs-builder-datatable-form.vue +0 -80
  107. package/src/components/builder/vs-builder-datatable.vue +0 -191
  108. package/src/components/builder/vs-builder-list-item.vue +0 -110
  109. package/src/components/collections/CollectionsBreadcrumb.vue +0 -52
  110. package/src/components/collections/CollectionsGrid.vue +0 -176
  111. package/src/components/collections/ContentBlock.vue +0 -75
  112. package/src/components/collections/formWrapper.vue +0 -156
  113. package/src/components/dashboard/ContentItem.vue +0 -82
  114. package/src/components/dashboard/DashboardHeader.vue +0 -33
  115. package/src/components/dashboard/QuickActions.vue +0 -84
  116. package/src/components/dashboard/RecentContent.vue +0 -54
  117. package/src/components/dashboard/StatCard.vue +0 -63
  118. package/src/components/dashboard/StatsGrid.vue +0 -28
  119. package/src/components/form-components/MonacoEditor.vue +0 -104
  120. package/src/components/form-components/VsFormMeta.vue +0 -40
  121. package/src/components/form-components/VsFormTags.vue +0 -150
  122. package/src/components/form-components/custom-datatable/vs-form-custom-datatable-add.vue +0 -84
  123. package/src/components/form-components/custom-datatable/vs-form-custom-datatable-controls.vue +0 -106
  124. package/src/components/form-components/index.js +0 -23
  125. package/src/components/form-components/reference/vs-form-reference-add.vue +0 -92
  126. package/src/components/form-components/reference/vs-form-reference-controls.vue +0 -101
  127. package/src/components/form-components/reference-list/referenceOptionList.js +0 -78
  128. package/src/components/form-components/reference-list/vs-form-reference-add.vue +0 -145
  129. package/src/components/form-components/reference-list/vs-form-reference-choce.vue +0 -39
  130. package/src/components/form-components/reference-list/vs-form-reference-controls.vue +0 -110
  131. package/src/components/form-components/reference-skeleton/about-skeleton.vue +0 -37
  132. package/src/components/form-components/reference-skeleton/banner-skeleton.vue +0 -29
  133. package/src/components/form-components/reference-skeleton/body-skeleton.vue +0 -56
  134. package/src/components/form-components/reference-skeleton/cards-skeleton.vue +0 -47
  135. package/src/components/form-components/reference-skeleton/documents-skeleton.vue +0 -64
  136. package/src/components/form-components/reference-skeleton/faq-skeleton.vue +0 -64
  137. package/src/components/form-components/reference-skeleton/form-skeleton.vue +0 -41
  138. package/src/components/form-components/reference-skeleton/index.js +0 -36
  139. package/src/components/form-components/reference-skeleton/infoLine-skeleton.vue +0 -37
  140. package/src/components/form-components/reference-skeleton/news-skeleton.vue +0 -54
  141. package/src/components/form-components/reference-skeleton/slider-skeleton.vue +0 -41
  142. package/src/components/form-components/reference-skeleton/tabs-skeleton.vue +0 -40
  143. package/src/components/form-components/reference-skeleton/team-skeleton.vue +0 -103
  144. package/src/components/form-components/reference-skeleton/usefulLinks-skeleton.vue +0 -52
  145. package/src/components/form-components/reference-skeleton/video-skeleton.vue +0 -36
  146. package/src/components/form-components/testReferenceTypes.js +0 -773
  147. package/src/components/form-components/vs-form-color-picker.vue +0 -29
  148. package/src/components/form-components/vs-form-custom-datatable.vue +0 -214
  149. package/src/components/form-components/vs-form-integer.vue +0 -86
  150. package/src/components/form-components/vs-form-key-value.vue +0 -201
  151. package/src/components/form-components/vs-form-marcdown-md.vue +0 -3
  152. package/src/components/form-components/vs-form-media-select.vue +0 -780
  153. package/src/components/form-components/vs-form-reference-list.vue +0 -97
  154. package/src/components/form-components/vs-form-reference.vue +0 -59
  155. package/src/components/form-components/vs-form-relation.vue +0 -30
  156. package/src/components/form-components/vs-form-reletion-link.vue +0 -34
  157. package/src/components/form-components/vs-form-select-collection.vue +0 -0
  158. package/src/components/form-components/vs-form-slug.vue +0 -72
  159. package/src/components/form-components/vs-form-tiptap.vue +0 -7
  160. package/src/components/form-components/vs-richtext-md.vue +0 -3
  161. package/src/components/icons/BellIcon.vue +0 -17
  162. package/src/components/icons/GlobeIcon.vue +0 -18
  163. package/src/components/icons/KeyIcon.vue +0 -20
  164. package/src/components/icons/PaletteIcon.vue +0 -22
  165. package/src/components/icons/SettingsIcon.vue +0 -19
  166. package/src/components/icons/ShieldIcon.vue +0 -18
  167. package/src/components/icons/UsersIcon.vue +0 -19
  168. package/src/components/icons/icon-chevron-right.vue +0 -16
  169. package/src/components/icons/icon-drag.vue +0 -20
  170. package/src/components/icons/icon-file-text.vue +0 -21
  171. package/src/components/icons/icon-folder.vue +0 -18
  172. package/src/components/icons/icon-grid.vue +0 -17
  173. package/src/components/icons/icon-group.vue +0 -19
  174. package/src/components/icons/icon-home.vue +0 -16
  175. package/src/components/icons/icon-image.vue +0 -18
  176. package/src/components/icons/icon-list.vue +0 -20
  177. package/src/components/icons/icon-more.vue +0 -17
  178. package/src/components/icons/icon-plus.vue +0 -17
  179. package/src/components/icons-types/icon-array.vue +0 -22
  180. package/src/components/icons-types/icon-boolean.vue +0 -18
  181. package/src/components/icons-types/icon-datalist.vue +0 -22
  182. package/src/components/icons-types/icon-date.vue +0 -20
  183. package/src/components/icons-types/icon-datetime.vue +0 -20
  184. package/src/components/icons-types/icon-file.vue +0 -21
  185. package/src/components/icons-types/icon-gallery.vue +0 -18
  186. package/src/components/icons-types/icon-image.vue +0 -19
  187. package/src/components/icons-types/icon-integer.vue +0 -20
  188. package/src/components/icons-types/icon-merkdown.vue +0 -18
  189. package/src/components/icons-types/icon-multiselect.vue +0 -22
  190. package/src/components/icons-types/icon-number.vue +0 -20
  191. package/src/components/icons-types/icon-radio.vue +0 -22
  192. package/src/components/icons-types/icon-reference-list.vue +0 -22
  193. package/src/components/icons-types/icon-reference.vue +0 -20
  194. package/src/components/icons-types/icon-relation.vue +0 -22
  195. package/src/components/icons-types/icon-richtext.vue +0 -18
  196. package/src/components/icons-types/icon-select.vue +0 -22
  197. package/src/components/icons-types/icon-slug.vue +0 -19
  198. package/src/components/icons-types/icon-text.vue +0 -19
  199. package/src/components/icons-types/index.js +0 -43
  200. package/src/components/layout/Layout.vue +0 -67
  201. package/src/components/layout/Sidebar.vue +0 -128
  202. package/src/components/media/FileUploadProgress.vue +0 -29
  203. package/src/components/media/MediaBreadcrumb.vue +0 -42
  204. package/src/components/media/MediaCreateFolder.vue +0 -59
  205. package/src/components/media/MediaFileInfo.vue +0 -148
  206. package/src/components/media/MediaGrid.vue +0 -148
  207. package/src/components/media/MediaList.vue +0 -148
  208. package/src/components/media/MediaViewControls.vue +0 -38
  209. package/src/components/media/TypeTag.vue +0 -23
  210. package/src/components/menu/AddNewItemInTree.vue +0 -75
  211. package/src/components/menu/MenuBody.vue +0 -149
  212. package/src/components/menu/MenuItem.vue +0 -73
  213. package/src/components/menu/MenuList.vue +0 -101
  214. package/src/components/referencec/index.ts +0 -7
  215. package/src/components/referencec/vs-reference-faq.vue +0 -61
  216. package/src/components/referencec/vs-reference-user-card.vue +0 -40
  217. package/src/components/settings/NotificationSettings.vue +0 -32
  218. package/src/components/settings/SettingsTable.vue +0 -50
  219. package/src/components/settings/SettingsTitle.vue +0 -33
  220. package/src/components/settings/SettingsToggleItem.vue +0 -25
  221. package/src/components/sidebar/DropdownMenu.vue +0 -34
  222. package/src/components/sidebar/SettingsSidebar.vue +0 -121
  223. package/src/components/sidebar/SidebarFooter.vue +0 -52
  224. package/src/components/sidebar/SidebarHeader.vue +0 -57
  225. package/src/components/sidebar/SidebarMenu.vue +0 -78
  226. package/src/components/ui/EmptyData.vue +0 -76
  227. package/src/components/ui/UniversalTable.vue +0 -310
  228. package/src/components/ui/UniversalTableFilters.vue +0 -0
  229. package/src/components/ui/UniversalTablePagination.vue +0 -118
  230. package/src/components/ui/VsPreview.vue +0 -75
  231. package/src/composables/useCollectionView.ts +0 -21
  232. package/src/composables/useDebounce.ts +0 -26
  233. package/src/composables/useMonaco.ts +0 -28
  234. package/src/composables/useTheme.ts +0 -40
  235. package/src/content/test-slug/metadata.json +0 -1
  236. package/src/i18n.ts +0 -75
  237. package/src/index.css +0 -3
  238. package/src/index.ts +0 -122
  239. package/src/locales/en.json +0 -778
  240. package/src/locales/uk.json +0 -797
  241. package/src/main.ts +0 -41
  242. package/src/pages/Dashboard.vue +0 -168
  243. package/src/pages/EmailPage.vue +0 -183
  244. package/src/pages/FeedbackPage.vue +0 -232
  245. package/src/pages/MediaPage.vue +0 -372
  246. package/src/pages/TagsPage.vue +0 -207
  247. package/src/pages/builder/BuilderPage.vue +0 -195
  248. package/src/pages/builder/EditCollectionPage.vue +0 -163
  249. package/src/pages/collections/ArticlesPage.vue +0 -385
  250. package/src/pages/collections/CollectionsPage.vue +0 -146
  251. package/src/pages/collections/SingletonsPage.vue +0 -119
  252. package/src/pages/collections/contentForm.vue +0 -484
  253. package/src/pages/collections/schema/seo.ts +0 -27
  254. package/src/pages/menu/MenuAddPage.vue +0 -123
  255. package/src/pages/menu/MenuItemPage.vue +0 -183
  256. package/src/pages/menu/MenuPage.vue +0 -133
  257. package/src/pages/settings/ApiKeys.vue +0 -75
  258. package/src/pages/settings/Appearance.vue +0 -80
  259. package/src/pages/settings/Logs.vue +0 -260
  260. package/src/pages/settings/PermissionsPage.vue +0 -237
  261. package/src/pages/settings/Settings.vue +0 -186
  262. package/src/pages/settings/Users.vue +0 -109
  263. package/src/pages/settings/general.vue +0 -154
  264. package/src/pages/settings/generalScheme.js +0 -132
  265. package/src/pages/users/AddUser.vue +0 -106
  266. package/src/pages/users/UsersPage.vue +0 -98
  267. package/src/props/builder.ts +0 -67
  268. package/src/props/content.ts +0 -56
  269. package/src/props/media.ts +0 -63
  270. package/src/router/index.ts +0 -181
  271. package/src/types/fastify-auth.d.ts +0 -4
  272. package/src/utils/getField.js +0 -270
  273. package/src/utils/translit.js +0 -19
  274. package/src/vite-env.d.ts +0 -1
@@ -1 +0,0 @@
1
- function F(u){return typeof u=="string"||u instanceof String}function L(u){var e;return typeof u=="object"&&u!=null&&(u==null||(e=u.constructor)==null?void 0:e.name)==="Object"}function U(u,e){return Array.isArray(e)?U(u,(t,s)=>e.includes(s)):Object.entries(u).reduce((t,s)=>{let[i,a]=s;return e(a,i)&&(t[i]=a),t},{})}const l={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Y(u){switch(u){case l.LEFT:return l.FORCE_LEFT;case l.RIGHT:return l.FORCE_RIGHT;default:return u}}function w(u){return u.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function D(u,e){if(e===u)return!0;const t=Array.isArray(e),s=Array.isArray(u);let i;if(t&&s){if(e.length!=u.length)return!1;for(i=0;i<e.length;i++)if(!D(e[i],u[i]))return!1;return!0}if(t!=s)return!1;if(e&&u&&typeof e=="object"&&typeof u=="object"){const a=e instanceof Date,n=u instanceof Date;if(a&&n)return e.getTime()==u.getTime();if(a!=n)return!1;const r=e instanceof RegExp,h=u instanceof RegExp;if(r&&h)return e.toString()==u.toString();if(r!=h)return!1;const o=Object.keys(e);for(i=0;i<o.length;i++)if(!Object.prototype.hasOwnProperty.call(u,o[i]))return!1;for(i=0;i<o.length;i++)if(!D(u[o[i]],e[o[i]]))return!1;return!0}else if(e&&u&&typeof e=="function"&&typeof u=="function")return e.toString()===u.toString();return!1}class X{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?l.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?l.RIGHT:l.LEFT}}function d(u,e){return new d.InputMask(u,e)}function H(u){if(u==null)throw new Error("mask property should be defined");return u instanceof RegExp?d.MaskedRegExp:F(u)?d.MaskedPattern:u===Date?d.MaskedDate:u===Number?d.MaskedNumber:Array.isArray(u)||u===Array?d.MaskedDynamic:d.Masked&&u.prototype instanceof d.Masked?u:d.Masked&&u instanceof d.Masked?u.constructor:u instanceof Function?d.MaskedFunction:(console.warn("Mask not found for mask",u),d.Masked)}function x(u){if(!u)throw new Error("Options in not defined");if(d.Masked){if(u.prototype instanceof d.Masked)return{mask:u};const{mask:e=void 0,...t}=u instanceof d.Masked?{mask:u}:L(u)&&u.mask instanceof d.Masked?u:{};if(e){const s=e.mask;return{...U(e,(i,a)=>!a.startsWith("_")),mask:e.constructor,_mask:s,...t}}}return L(u)?{...u}:{mask:u}}function A(u){if(d.Masked&&u instanceof d.Masked)return u;const e=x(u),t=H(e.mask);if(!t)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===t&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new t(e)}d.createMask=A;class P{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,t){if(!(e==null||t==null||e===this.selectionStart&&t===this.selectionEnd))try{this._unsafeSelect(e,t)}catch{}}get isActive(){return!1}}d.MaskElement=P;const N=90,Z=89;class y extends P{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,t,s;return(e=(t=(s=this.input).getRootNode)==null?void 0:t.call(s))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){if(this._handlers.redo&&(e.keyCode===N&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===Z&&e.ctrlKey))return e.preventDefault(),this._handlers.redo(e);if(this._handlers.undo&&e.keyCode===N&&(e.metaKey||e.ctrlKey))return e.preventDefault(),this._handlers.undo(e);e.isComposing||this._handlers.selectionChange(e)}_onBeforeinput(e){if(e.inputType==="historyUndo"&&this._handlers.undo)return e.preventDefault(),this._handlers.undo(e);if(e.inputType==="historyRedo"&&this._handlers.redo)return e.preventDefault(),this._handlers.redo(e)}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}d.HTMLMaskElement=y;class $ extends y{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,t){this.input.setSelectionRange(e,t)}get value(){return this.input.value}set value(e){this.input.value=e}}d.HTMLMaskElement=y;class j extends y{get _unsafeSelectionStart(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,i=t&&t.focusOffset;return i==null||s==null||s<i?s:i}get _unsafeSelectionEnd(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,i=t&&t.focusOffset;return i==null||s==null||s>i?s:i}_unsafeSelect(e,t){if(!this.rootElement.createRange)return;const s=this.rootElement.createRange();s.setStart(this.input.firstChild||this.input,e),s.setEnd(this.input.lastChild||this.input,t);const i=this.rootElement,a=i.getSelection&&i.getSelection();a&&(a.removeAllRanges(),a.addRange(s))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}d.HTMLContenteditableMaskElement=j;class I{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>I.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}I.MAX_LENGTH=100;class W{constructor(e,t){this.el=e instanceof P?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new j(e):new $(e),this.masked=A(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new I,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var t;return e==null||((t=this.masked)==null?void 0:t.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof d.Masked)&&this.masked.constructor===H(e)){this.masked.updateOptions({mask:e});return}const t=e instanceof d.Masked?e:A({mask:e});t.unmaskedValue=this.masked.unmaskedValue,this.masked=t}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,t){const s=this._listeners[e];s&&s.forEach(i=>i(t))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const t=this.masked.unmaskedValue,s=this.masked.value,i=this.masked.rawInputValue,a=this.displayValue,n=this.unmaskedValue!==t||this.value!==s||this._rawInputValue!==i;this._unmaskedValue=t,this._value=s,this._rawInputValue=i,this.el.value!==a&&(this.el.value=a),e==="auto"?this.alignCursor():e!=null&&(this.cursorPos=e),n&&this._fireChangeEvents(),!this._historyChanging&&(n||this.history.isEmpty)&&this.history.push({unmaskedValue:t,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:t,...s}=e,i=!this.maskEquals(t),a=this.masked.optionsIsChanged(s);i&&(this.mask=t),a&&this.masked.updateOptions(s),(i||a)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,l.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,t){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t),this}off(e,t){if(!this._listeners[e])return this;if(!t)return delete this._listeners[e],this;const s=this._listeners[e].indexOf(t);return s>=0&&this._listeners[e].splice(s,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const t=new X({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),s=this.masked.rawInputValue,i=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,a=s===this.masked.rawInputValue?t.removeDirection:l.NONE;let n=this.masked.nearestInputPos(t.startChangePos+i,a);a!==l.NONE&&(n=this.masked.nearestInputPos(n,l.NONE)),this.updateControl(n),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}d.InputMask=W;class p{static normalize(e){return Array.isArray(e)?e:[e,new p]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}d.ChangeDetails=p;class E{constructor(e,t,s){e===void 0&&(e=""),t===void 0&&(t=0),this.value=e,this.from=t,this.stop=s}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const t=this.value[0];return this.value=this.value.slice(1),t}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class g{constructor(e){this._value="",this._update({...g.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,t){t===void 0&&(t={input:!0}),this.reset(),this.append(e,t,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,t){return e}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),Math.min(this.displayValue.length,t-e)}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this.displayValue.slice(e,t)}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new E(this.extractInput(e,t),e)}appendTail(e){return F(e)&&(e=new E(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new p({inserted:e,rawInserted:e})):new p}_appendChar(e,t,s){t===void 0&&(t={});const i=this.state;let a;if([e,a]=this.doPrepareChar(e,t),e&&(a=a.aggregate(this._appendCharRaw(e,t)),!a.rawInserted&&this.autofix==="pad")){const n=this.state;this.state=i;let r=this.pad(t);const h=this._appendCharRaw(e,t);r=r.aggregate(h),h.rawInserted||r.equals(a)?a=r:this.state=n}if(a.inserted){let n,r=this.doValidate(t)!==!1;if(r&&s!=null){const h=this.state;if(this.overwrite===!0){n=s.state;for(let c=0;c<a.rawInserted.length;++c)s.unshift(this.displayValue.length-a.tailShift)}let o=this.appendTail(s);if(r=o.rawInserted.length===s.toString().length,!(r&&o.inserted)&&this.overwrite==="shift"){this.state=h,n=s.state;for(let c=0;c<a.rawInserted.length;++c)s.shift();o=this.appendTail(s),r=o.rawInserted.length===s.toString().length}r&&o.inserted&&(this.state=h)}r||(a=new p,this.state=i,s&&n&&(s.state=n))}return a}_appendPlaceholder(){return new p}_appendEager(){return new p}append(e,t,s){if(!F(e))throw new Error("value should be string");const i=F(s)?new E(String(s)):s;t!=null&&t.tail&&(t._beforeTailState=this.state);let a;[e,a]=this.doPrepare(e,t);for(let n=0;n<e.length;++n){const r=this._appendChar(e[n],t,i);if(!r.rawInserted&&!this.doSkipInvalid(e[n],t,i))break;a.aggregate(r)}return(this.eager===!0||this.eager==="append")&&t!=null&&t.input&&e&&a.aggregate(this._appendEager()),i!=null&&(a.tailShift+=this.appendTail(i).tailShift),a}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(t),new p}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const t=this.rawInputValue,s=this.value,i=e();return this.rawInputValue=t,this.value&&this.value!==s&&s.indexOf(this.value)===0&&(this.append(s.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,i}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const t=this.state,s=e(this);return this.state=t,delete this._isolated,s}doSkipInvalid(e,t,s){return!!this.skipInvalid}doPrepare(e,t){return t===void 0&&(t={}),p.normalize(this.prepare?this.prepare(e,this,t):e)}doPrepareChar(e,t){return t===void 0&&(t={}),p.normalize(this.prepareChar?this.prepareChar(e,this,t):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,t,s,i,a){s===void 0&&(s=""),i===void 0&&(i=l.NONE),a===void 0&&(a={input:!0});const n=e+t,r=this.extractTail(n),h=this.eager===!0||this.eager==="remove";let o;h&&(i=Y(i),o=this.extractInput(0,n,{raw:!0}));let c=e;const f=new p;if(i!==l.NONE&&(c=this.nearestInputPos(e,t>1&&e!==0&&!h?l.NONE:i),f.tailShift=c-e),f.aggregate(this.remove(c)),h&&i!==l.NONE&&o===this.rawInputValue)if(i===l.FORCE_LEFT){let m;for(;o===this.rawInputValue&&(m=this.displayValue.length);)f.aggregate(new p({tailShift:-1})).aggregate(this.remove(m-1))}else i===l.FORCE_RIGHT&&r.unshift();return f.aggregate(this.append(s,a,r))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!D(this,e)}typedValueEquals(e){const t=this.typedValue;return e===t||g.EMPTY_VALUES.includes(e)&&g.EMPTY_VALUES.includes(t)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new p}}g.DEFAULTS={skipInvalid:!0};g.EMPTY_VALUES=[void 0,null,""];d.Masked=g;class v{constructor(e,t){e===void 0&&(e=[]),t===void 0&&(t=0),this.chunks=e,this.from=t}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=F(e)?new E(String(e)):e;const t=this.chunks[this.chunks.length-1],s=t&&(t.stop===e.stop||e.stop==null)&&e.from===t.from+t.toString().length;if(e instanceof E)s?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof v){if(e.stop==null){let i;for(;e.chunks.length&&e.chunks[0].stop==null;)i=e.chunks.shift(),i.from+=e.from,this.extend(i)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof d.MaskedPattern))return new E(this.toString()).appendTo(e);const t=new p;for(let s=0;s<this.chunks.length;++s){const i=this.chunks[s],a=e._mapPosToBlock(e.displayValue.length),n=i.stop;let r;if(n!=null&&(!a||a.index<=n)&&((i instanceof v||e._stops.indexOf(n)>=0)&&t.aggregate(e._appendPlaceholder(n)),r=i instanceof v&&e._blocks[n]),r){const h=r.appendTail(i);t.aggregate(h);const o=i.toString().slice(h.rawInserted.length);o&&t.aggregate(e.append(o,{tail:!0}))}else t.aggregate(e.append(i.toString(),{tail:!0}))}return t}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:t,...s}=e;Object.assign(this,s),this.chunks=t.map(i=>{const a="chunks"in i?new v:new E;return a.state=i,a})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const t=e!=null?e-this.from:e;let s=0;for(;s<this.chunks.length;){const i=this.chunks[s],a=i.unshift(t);if(i.toString()){if(!a)break;++s}else this.chunks.splice(s,1);if(a)return a}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const t=this.chunks[e],s=t.shift();if(t.toString()){if(!s)break;--e}else this.chunks.splice(e,1);if(s)return s}return""}}class J{constructor(e,t){this.masked=e,this._log=[];const{offset:s,index:i}=e._mapPosToBlock(t)||(t<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=s,this.index=i,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((t=this.block)==null?void 0:t.displayValue.length)||0){var t;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,l.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,l.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,l.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,l.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,l.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,l.NONE),!0})}}class G{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(t),this._value||(this._isRawInput=!1),new p}nearestInputPos(e,t){t===void 0&&(t=l.NONE);const s=0,i=this._value.length;switch(t){case l.LEFT:case l.FORCE_LEFT:return s;case l.NONE:case l.RIGHT:case l.FORCE_RIGHT:default:return i}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._isRawInput?t-e:0}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),s===void 0&&(s={}),s.raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new p;const s=this.eager===!0||this.eager==="append",i=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!s)&&!t.tail,a=new p({inserted:this.char,rawInserted:i?this.char:""});return this._value=this.char,this._isRawInput=i&&(t.raw||t.input),a}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new p;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new E("")}appendTail(e){return F(e)&&(e=new E(String(e))),e.appendTo(this)}append(e,t,s){const i=this._appendChar(e[0],t);return s!=null&&(i.tailShift+=this.appendTail(s).tailShift),i}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}pad(e){return this._appendPlaceholder()}}class b{constructor(e){const{parent:t,isOptional:s,placeholderChar:i,displayChar:a,lazy:n,eager:r,...h}=e;this.masked=A(h),Object.assign(this,{parent:t,isOptional:s,placeholderChar:i,displayChar:a,lazy:n,eager:r})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),e===0&&t>=1?(this.isFilled=!1,this.masked.remove(e,t)):new p}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new p;const s=this.masked.state;let i=this.masked._appendChar(e,this.currentMaskFlags(t));return i.inserted&&this.doValidate(t)===!1&&(i=new p,this.masked.state=s),!i.inserted&&!this.isOptional&&!this.lazy&&!t.input&&(i.inserted=this.placeholderChar),i.skip=!i.inserted&&!this.isOptional,this.isFilled=!!i.inserted,i}append(e,t,s){return this.masked.append(e,this.currentMaskFlags(t),s)}_appendPlaceholder(){return this.isFilled||this.isOptional?new p:(this.isFilled=!0,new p({inserted:this.placeholderChar}))}_appendEager(){return new p}extractTail(e,t){return this.masked.extractTail(e,t)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.masked.extractInput(e,t,s)}nearestInputPos(e,t){t===void 0&&(t=l.NONE);const s=0,i=this.value.length,a=Math.min(Math.max(e,s),i);switch(t){case l.LEFT:case l.FORCE_LEFT:return this.isComplete?a:s;case l.RIGHT:case l.FORCE_RIGHT:return this.isComplete?a:i;case l.NONE:default:return a}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.value.slice(e,t).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var t;return{...e,_beforeTailState:(e==null||(t=e._beforeTailState)==null?void 0:t.masked)||(e==null?void 0:e._beforeTailState)}}pad(e){return new p}}b.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class Q extends g{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=s=>s.search(t)>=0),super._update(e)}}d.MaskedRegExp=Q;class k extends g{constructor(e){super({...k.DEFAULTS,...e,definitions:Object.assign({},b.DEFAULT_DEFINITIONS,e==null?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const t=this.mask;if(!t||!e)return;let s=!1,i=!1;for(let a=0;a<t.length;++a){if(this.blocks){const o=t.slice(a),c=Object.keys(this.blocks).filter(m=>o.indexOf(m)===0);c.sort((m,S)=>S.length-m.length);const f=c[0];if(f){const{expose:m,repeat:S,...K}=x(this.blocks[f]),O={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...K,repeat:S,parent:this},T=S!=null?new d.RepeatBlock(O):A(O);T&&(this._blocks.push(T),m&&(this.exposeBlock=T),this._maskedBlocks[f]||(this._maskedBlocks[f]=[]),this._maskedBlocks[f].push(this._blocks.length-1)),a+=f.length-1;continue}}let n=t[a],r=n in e;if(n===k.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(n==="{"||n==="}"){s=!s;continue}if(n==="["||n==="]"){i=!i;continue}if(n===k.ESCAPE_CHAR){if(++a,n=t[a],!n)break;r=!1}const h=r?new b({isOptional:i,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...x(e[n]),parent:this}):new G({char:n,eager:this.eager,isUnmasking:s});this._blocks.push(h)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e){this.reset();return}const{_blocks:t,...s}=e;this._blocks.forEach((i,a)=>i.state=t[a]),super.state=s}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,t)=>e+=t.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(t),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,t)=>e+=t.value,"")}set value(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(t),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(t),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,t)=>e+=t.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const t=new p;let s=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(s==null)return t;this._blocks[s].isFilled&&++s;for(let i=s;i<this._blocks.length;++i){const a=this._blocks[i]._appendEager();if(!a.inserted)break;t.aggregate(a)}return t}_appendCharRaw(e,t){t===void 0&&(t={});const s=this._mapPosToBlock(this.displayValue.length),i=new p;if(!s)return i;for(let n=s.index,r;r=this._blocks[n];++n){var a;const h=r._appendChar(e,{...t,_beforeTailState:(a=t._beforeTailState)==null||(a=a._blocks)==null?void 0:a[n]});if(i.aggregate(h),h.consumed)break}return i}extractTail(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=new v;return e===t||this._forEachBlocksInRange(e,t,(i,a,n,r)=>{const h=i.extractTail(n,r);h.stop=this._findStopBefore(a),h.from=this._blockStartPos(a),h instanceof v&&(h.blockIndex=a),s.extend(h)}),s}extractInput(e,t,s){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),s===void 0&&(s={}),e===t)return"";let i="";return this._forEachBlocksInRange(e,t,(a,n,r,h)=>{i+=a.extractInput(r,h,s)}),i}_findStopBefore(e){let t;for(let s=0;s<this._stops.length;++s){const i=this._stops[s];if(i<=e)t=i;else break}return t}_appendPlaceholder(e){const t=new p;if(this.lazy&&e==null)return t;const s=this._mapPosToBlock(this.displayValue.length);if(!s)return t;const i=s.index,a=e??this._blocks.length;return this._blocks.slice(i,a).forEach(n=>{if(!n.lazy||e!=null){var r;t.aggregate(n._appendPlaceholder((r=n._blocks)==null?void 0:r.length))}}),t}_mapPosToBlock(e){let t="";for(let s=0;s<this._blocks.length;++s){const i=this._blocks[s],a=t.length;if(t+=i.displayValue,e<=t.length)return{index:s,offset:e-a}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((t,s)=>t+=s.displayValue.length,0)}_forEachBlocksInRange(e,t,s){t===void 0&&(t=this.displayValue.length);const i=this._mapPosToBlock(e);if(i){const a=this._mapPosToBlock(t),n=a&&i.index===a.index,r=i.offset,h=a&&n?a.offset:this._blocks[i.index].displayValue.length;if(s(this._blocks[i.index],i.index,r,h),a&&!n){for(let o=i.index+1;o<a.index;++o)s(this._blocks[o],o,0,this._blocks[o].displayValue.length);s(this._blocks[a.index],a.index,0,a.offset)}}}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=super.remove(e,t);return this._forEachBlocksInRange(e,t,(i,a,n,r)=>{s.aggregate(i.remove(n,r))}),s}nearestInputPos(e,t){if(t===void 0&&(t=l.NONE),!this._blocks.length)return 0;const s=new J(this,e);if(t===l.NONE)return s.pushRightBeforeInput()||(s.popState(),s.pushLeftBeforeInput())?s.pos:this.displayValue.length;if(t===l.LEFT||t===l.FORCE_LEFT){if(t===l.LEFT){if(s.pushRightBeforeFilled(),s.ok&&s.pos===e)return e;s.popState()}if(s.pushLeftBeforeInput(),s.pushLeftBeforeRequired(),s.pushLeftBeforeFilled(),t===l.LEFT){if(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.ok&&s.pos<=e||(s.popState(),s.ok&&s.pos<=e))return s.pos;s.popState()}return s.ok?s.pos:t===l.FORCE_LEFT?0:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:0)}return t===l.RIGHT||t===l.FORCE_RIGHT?(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.pushRightBeforeFilled()?s.pos:t===l.FORCE_RIGHT?this.displayValue.length:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:this.nearestInputPos(e,l.LEFT))):e}totalInputPositions(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);let s=0;return this._forEachBlocksInRange(e,t,(i,a,n,r)=>{s+=i.totalInputPositions(n,r)}),s}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const t=this._maskedBlocks[e];return t?t.map(s=>this._blocks[s]):[]}pad(e){const t=new p;return this._forEachBlocksInRange(0,this.displayValue.length,s=>t.aggregate(s.pad(e))),t}}k.DEFAULTS={...g.DEFAULTS,lazy:!0,placeholderChar:"_"};k.STOP_CHAR="`";k.ESCAPE_CHAR="\\";k.InputDefinition=b;k.FixedDefinition=G;d.MaskedPattern=k;class B extends k{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:t=this.to||0,from:s=this.from||0,maxLength:i=this.maxLength||0,autofix:a=this.autofix,...n}=e;this.to=t,this.from=s,this.maxLength=Math.max(String(t).length,i),this.autofix=a;const r=String(this.from).padStart(this.maxLength,"0"),h=String(this.to).padStart(this.maxLength,"0");let o=0;for(;o<h.length&&h[o]===r[o];)++o;n.mask=h.slice(0,o).replace(/0/g,"\\0")+"0".repeat(this.maxLength-o),super._update(n)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let t="",s="";const[,i,a]=e.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(t="0".repeat(i.length)+a,s="9".repeat(i.length)+a),t=t.padEnd(this.maxLength,"0"),s=s.padEnd(this.maxLength,"9"),[t,s]}doPrepareChar(e,t){t===void 0&&(t={});let s;return[e,s]=super.doPrepareChar(e.replace(/\D/g,""),t),e||(s.skip=!this.isComplete),[e,s]}_appendCharRaw(e,t){if(t===void 0&&(t={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,t);const s=String(this.from).padStart(this.maxLength,"0"),i=String(this.to).padStart(this.maxLength,"0"),[a,n]=this.boundaries(this.value+e);return Number(n)<this.from?super._appendCharRaw(s[this.value.length],t):Number(a)>this.to?!t.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(s[this.value.length],t).aggregate(this._appendCharRaw(e,t)):super._appendCharRaw(i[this.value.length],t):super._appendCharRaw(e,t)}doValidate(e){const t=this.value;if(t.search(/[^0]/)===-1&&t.length<=this._matchFrom)return!0;const[s,i]=this.boundaries(t);return this.from<=Number(i)&&Number(s)<=this.to&&super.doValidate(e)}pad(e){const t=new p;if(this.value.length===this.maxLength)return t;const s=this.value,i=this.maxLength-this.value.length;if(i){this.reset();for(let a=0;a<i;++a)t.aggregate(super._appendCharRaw("0",e));s.split("").forEach(a=>this._appendCharRaw(a))}return t}}d.MaskedRange=B;const ee="d{.}`m{.}`Y";class C extends k{static extractPatternOptions(e){const{mask:t,pattern:s,...i}=e;return{...i,mask:F(t)?t:s}}constructor(e){super(C.extractPatternOptions({...C.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:t,pattern:s,blocks:i,...a}={...C.DEFAULTS,...e},n=Object.assign({},C.GET_DEFAULT_BLOCKS());e.min&&(n.Y.from=e.min.getFullYear()),e.max&&(n.Y.to=e.max.getFullYear()),e.min&&e.max&&n.Y.from===n.Y.to&&(n.m.from=e.min.getMonth()+1,n.m.to=e.max.getMonth()+1,n.m.from===n.m.to&&(n.d.from=e.min.getDate(),n.d.to=e.max.getDate())),Object.assign(n,this.blocks,i),super._update({...a,mask:F(t)?t:s,blocks:n})}doValidate(e){const t=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&t!=null&&(this.min==null||this.min<=t)&&(this.max==null||t<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(C.extractPatternOptions(e))}}C.GET_DEFAULT_BLOCKS=()=>({d:{mask:B,from:1,to:31,maxLength:2},m:{mask:B,from:1,to:12,maxLength:2},Y:{mask:B,from:1900,to:9999}});C.DEFAULTS={...k.DEFAULTS,mask:Date,pattern:ee,format:(u,e)=>{if(!u)return"";const t=String(u.getDate()).padStart(2,"0"),s=String(u.getMonth()+1).padStart(2,"0"),i=u.getFullYear();return[t,s,i].join(".")},parse:(u,e)=>{const[t,s,i]=u.split(".").map(Number);return new Date(i,s-1,t)}};d.MaskedDate=C;class M extends g{constructor(e){super({...M.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(t=>{const{expose:s,...i}=x(t),a=A({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...i});return s&&(this.exposeMask=a),a}):[])}_appendCharRaw(e,t){t===void 0&&(t={});const s=this._applyDispatch(e,t);return this.currentMask&&s.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),s}_applyDispatch(e,t,s){e===void 0&&(e=""),t===void 0&&(t={}),s===void 0&&(s="");const i=t.tail&&t._beforeTailState!=null?t._beforeTailState._value:this.value,a=this.rawInputValue,n=t.tail&&t._beforeTailState!=null?t._beforeTailState._rawInputValue:a,r=a.slice(n.length),h=this.currentMask,o=new p,c=h==null?void 0:h.state;return this.currentMask=this.doDispatch(e,{...t},s),this.currentMask&&(this.currentMask!==h?(this.currentMask.reset(),n&&(this.currentMask.append(n,{raw:!0}),o.tailShift=this.currentMask.value.length-i.length),r&&(o.tailShift+=this.currentMask.append(r,{raw:!0,tail:!0}).tailShift)):c&&(this.currentMask.state=c)),o}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const t=new p;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var t,s;return{...e,_beforeTailState:((t=e._beforeTailState)==null?void 0:t.currentMaskRef)===this.currentMask&&((s=e._beforeTailState)==null?void 0:s.currentMask)||e._beforeTailState}}doDispatch(e,t,s){return t===void 0&&(t={}),s===void 0&&(s=""),this.dispatch(e,this,t,s)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,t){t===void 0&&(t={});let[s,i]=super.doPrepare(e,t);if(this.currentMask){let a;[s,a]=super.doPrepare(s,this.currentMaskFlags(t)),i=i.aggregate(a)}return[s,i]}doPrepareChar(e,t){t===void 0&&(t={});let[s,i]=super.doPrepareChar(e,t);if(this.currentMask){let a;[s,a]=super.doPrepareChar(s,this.currentMaskFlags(t)),i=i.aggregate(a)}return[s,i]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(t=>t.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let t=String(e);this.currentMask&&(this.currentMask.typedValue=e,t=this.currentMask.unmaskedValue),this.unmaskedValue=t}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,t){const s=new p;return this.currentMask&&s.aggregate(this.currentMask.remove(e,t)).aggregate(this._applyDispatch()),s}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(t=>t.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:t,currentMaskRef:s,currentMask:i,...a}=e;t&&this.compiledMasks.forEach((n,r)=>n.state=t[r]),s!=null&&(this.currentMask=s,this.currentMask.state=i),super.state=a}extractInput(e,t,s){return this.currentMask?this.currentMask.extractInput(e,t,s):""}extractTail(e,t){return this.currentMask?this.currentMask.extractTail(e,t):super.extractTail(e,t)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,t){return this.currentMask?this.currentMask.nearestInputPos(e,t):super.nearestInputPos(e,t)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((t,s)=>{if(!e[s])return;const{mask:i,...a}=e[s];return D(t,a)&&t.maskEquals(i)}):super.maskEquals(e)}typedValueEquals(e){var t;return!!((t=this.currentMask)!=null&&t.typedValueEquals(e))}}M.DEFAULTS={...g.DEFAULTS,dispatch:(u,e,t,s)=>{if(!e.compiledMasks.length)return;const i=e.rawInputValue,a=e.compiledMasks.map((n,r)=>{const h=e.currentMask===n,o=h?n.displayValue.length:n.nearestInputPos(n.displayValue.length,l.FORCE_LEFT);return n.rawInputValue!==i?(n.reset(),n.append(i,{raw:!0})):h||n.remove(o),n.append(u,e.currentMaskFlags(t)),n.appendTail(s),{index:r,weight:n.rawInputValue.length,totalInputPositions:n.totalInputPositions(0,Math.max(o,n.nearestInputPos(n.displayValue.length,l.FORCE_LEFT)))}});return a.sort((n,r)=>r.weight-n.weight||r.totalInputPositions-n.totalInputPositions),e.compiledMasks[a[0].index]}};d.MaskedDynamic=M;class V extends k{constructor(e){super({...V.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:t,...s}=e;if(t){const i=t.map(r=>r.length),a=Math.min(...i),n=Math.max(...i)-a;s.mask="*".repeat(a),n&&(s.mask+="["+"*".repeat(n)+"]"),this.enum=t}super._update(s)}_appendCharRaw(e,t){t===void 0&&(t={});const s=Math.min(this.nearestInputPos(0,l.FORCE_RIGHT),this.value.length),i=this.enum.filter(a=>this.matchValue(a,this.unmaskedValue+e,s));if(i.length){i.length===1&&this._forEachBlocksInRange(0,this.value.length,(n,r)=>{const h=i[0][r];r>=this.value.length||h===n.value||(n.reset(),n._appendChar(h,t))});const a=super._appendCharRaw(i[0][this.value.length],t);return i.length===1&&i[0].slice(this.unmaskedValue.length).split("").forEach(n=>a.aggregate(super._appendCharRaw(n))),a}return new p({skip:!this.isComplete})}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new E("",e)}remove(e,t){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),e===t)return new p;const s=Math.min(super.nearestInputPos(0,l.FORCE_RIGHT),this.value.length);let i;for(i=e;i>=0&&!(this.enum.filter(n=>this.matchValue(n,this.value.slice(s,i),s)).length>1);--i);const a=super.remove(i,t);return a.tailShift+=i-e,a}get isComplete(){return this.enum.indexOf(this.value)>=0}}V.DEFAULTS={...k.DEFAULTS,matchValue:(u,e,t)=>u.indexOf(e,t)===t};d.MaskedEnum=V;class te extends g{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}d.MaskedFunction=te;var z;class _ extends g{constructor(e){super({..._.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),t="\\d*",s=(this.scale?"("+w(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+t+s),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(w).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(w(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const t=e.split(this.radix);return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),t.join(this.radix)}doPrepareChar(e,t){t===void 0&&(t={});const[s,i]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),t);return e&&!s&&(i.skip=!0),s&&!this.allowPositive&&!this.value&&s!=="-"&&i.aggregate(this._appendChar("-")),[s,i]}_separatorsCount(e,t){t===void 0&&(t=!1);let s=0;for(let i=0;i<e;++i)this._value.indexOf(this.thousandsSeparator,i)===i&&(++s,t&&(e+=this.thousandsSeparator.length));return s}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t),this._removeThousandsSeparators(super.extractInput(e,t,s))}_appendCharRaw(e,t){t===void 0&&(t={});const s=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,i=this._separatorsCountFromSlice(s);this._value=this._removeThousandsSeparators(this.value);const a=this._value;this._value+=e;const n=this.number;let r=!isNaN(n),h=!1;if(r){let m;this.min!=null&&this.min<0&&this.number<this.min&&(m=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(m=this.max),m!=null&&(this.autofix?(this._value=this.format(m,this).replace(_.UNMASKED_RADIX,this.radix),h||(h=a===this._value&&!t.tail)):r=!1),r&&(r=!!this._value.match(this._numberRegExp))}let o;r?o=new p({inserted:this._value.slice(a.length),rawInserted:h?"":e,skip:h}):(this._value=a,o=new p),this._value=this._insertThousandsSeparators(this._value);const c=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,f=this._separatorsCountFromSlice(c);return o.tailShift+=(f-i)*this.thousandsSeparator.length,o}_findSeparatorAround(e){if(this.thousandsSeparator){const t=e-this.thousandsSeparator.length+1,s=this.value.indexOf(this.thousandsSeparator,t);if(s<=e)return s}return-1}_adjustRangeWithSeparators(e,t){const s=this._findSeparatorAround(e);s>=0&&(e=s);const i=this._findSeparatorAround(t);return i>=0&&(t=i+this.thousandsSeparator.length),[e,t]}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t);const s=this.value.slice(0,e),i=this.value.slice(t),a=this._separatorsCount(s.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(s+i));const n=this._separatorsCountFromSlice(s);return new p({tailShift:(n-a)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case l.NONE:case l.LEFT:case l.FORCE_LEFT:{const s=this._findSeparatorAround(e-1);if(s>=0){const i=s+this.thousandsSeparator.length;if(e<i||this.value.length<=i||t===l.FORCE_LEFT)return s}break}case l.RIGHT:case l.FORCE_RIGHT:{const s=this._findSeparatorAround(e);if(s>=0)return s+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let t=e;this.min!=null&&(t=Math.max(t,this.min)),this.max!=null&&(t=Math.min(t,this.max)),t!==e&&(this.unmaskedValue=this.format(t,this));let s=this.value;this.normalizeZeros&&(s=this._normalizeZeros(s)),this.padFractionalZeros&&this.scale>0&&(s=this._padFractionalZeros(s)),this._value=s}super.doCommit()}_normalizeZeros(e){const t=this._removeThousandsSeparators(e).split(this.radix);return t[0]=t[0].replace(/^(\D*)(0*)(\d*)/,(s,i,a,n)=>i+n),e.length&&!/\d$/.test(t[0])&&(t[0]=t[0]+"0"),t.length>1&&(t[1]=t[1].replace(/0*$/,""),t[1].length||(t.length=1)),this._insertThousandsSeparators(t.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const t=e.split(this.radix);return t.length<2&&t.push(""),t[1]=t[1].padEnd(this.scale,"0"),t.join(this.radix)}doSkipInvalid(e,t,s){t===void 0&&(t={});const i=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===_.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,t,s)&&!i}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,_.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(_.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||_.EMPTY_VALUES.includes(e)&&_.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}z=_;_.UNMASKED_RADIX=".";_.EMPTY_VALUES=[...g.EMPTY_VALUES,0];_.DEFAULTS={...g.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[z.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:u=>u.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})};d.MaskedNumber=_;const R={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function q(u,e,t){e===void 0&&(e=R.MASKED),t===void 0&&(t=R.MASKED);const s=A(u);return i=>s.runIsolated(a=>(a[e]=i,a[t]))}function se(u,e,t,s){return q(e,t,s)(u)}d.PIPE_TYPE=R;d.createPipe=q;d.pipe=se;class ie extends k{get repeatFrom(){var e;return(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?e:0}get repeatTo(){var e;return(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var t,s,i;const{repeat:a,...n}=x(e);this._blockOpts=Object.assign({},this._blockOpts,n);const r=A(this._blockOpts);this.repeat=(t=(s=a??r.repeat)!=null?s:this.repeat)!=null?t:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((i=this._blocks)==null?void 0:i.length)||0,this.repeatFrom)),blocks:{m:r},eager:r.eager,overwrite:r.overwrite,skipInvalid:r.skipInvalid,lazy:r.lazy,placeholderChar:r.placeholderChar,displayChar:r.displayChar})}_allocateBlock(e){if(e<this._blocks.length)return this._blocks[e];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(A(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(e,t){t===void 0&&(t={});const s=new p;for(let h=(i=(a=this._mapPosToBlock(this.displayValue.length))==null?void 0:a.index)!=null?i:Math.max(this._blocks.length-1,0),o,c;o=(n=this._blocks[h])!=null?n:c=!c&&this._allocateBlock(h);++h){var i,a,n,r;const f=o._appendChar(e,{...t,_beforeTailState:(r=t._beforeTailState)==null||(r=r._blocks)==null?void 0:r[h]});if(f.skip&&c){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(s.aggregate(f),f.consumed)break}return s}_trimEmptyTail(e,t){var s,i;e===void 0&&(e=0);const a=Math.max(((s=this._mapPosToBlock(e))==null?void 0:s.index)||0,this.repeatFrom,0);let n;t!=null&&(n=(i=this._mapPosToBlock(t))==null?void 0:i.index),n==null&&(n=this._blocks.length-1);let r=0;for(let h=n;a<=h&&!this._blocks[h].unmaskedValue;--h,++r);r&&(this._blocks.splice(n-r+1,r),this.mask=this.mask.slice(r))}reset(){super.reset(),this._trimEmptyTail()}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=super.remove(e,t);return this._trimEmptyTail(e,t),s}totalInputPositions(e,t){return e===void 0&&(e=0),t==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,t)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}}d.RepeatBlock=ie;try{globalThis.IMask=d}catch{}export{p as ChangeDetails,v as ChunksTailDetails,l as DIRECTION,j as HTMLContenteditableMaskElement,$ as HTMLInputMaskElement,y as HTMLMaskElement,W as InputMask,P as MaskElement,g as Masked,C as MaskedDate,M as MaskedDynamic,V as MaskedEnum,te as MaskedFunction,_ as MaskedNumber,k as MaskedPattern,B as MaskedRange,Q as MaskedRegExp,R as PIPE_TYPE,G as PatternFixedDefinition,b as PatternInputDefinition,ie as RepeatBlock,A as createMask,q as createPipe,d as default,Y as forceDirection,x as normalizeOpts,se as pipe};
@@ -1 +0,0 @@
1
- function F(n){return typeof n=="string"||n instanceof String}function L(n){var e;return typeof n=="object"&&n!=null&&(n==null||(e=n.constructor)==null?void 0:e.name)==="Object"}function U(n,e){return Array.isArray(e)?U(n,(t,s)=>e.includes(s)):Object.entries(n).reduce((t,s)=>{let[i,a]=s;return e(a,i)&&(t[i]=a),t},{})}const l={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Y(n){switch(n){case l.LEFT:return l.FORCE_LEFT;case l.RIGHT:return l.FORCE_RIGHT;default:return n}}function w(n){return n.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function D(n,e){if(e===n)return!0;const t=Array.isArray(e),s=Array.isArray(n);let i;if(t&&s){if(e.length!=n.length)return!1;for(i=0;i<e.length;i++)if(!D(e[i],n[i]))return!1;return!0}if(t!=s)return!1;if(e&&n&&typeof e=="object"&&typeof n=="object"){const a=e instanceof Date,u=n instanceof Date;if(a&&u)return e.getTime()==n.getTime();if(a!=u)return!1;const r=e instanceof RegExp,h=n instanceof RegExp;if(r&&h)return e.toString()==n.toString();if(r!=h)return!1;const o=Object.keys(e);for(i=0;i<o.length;i++)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=0;i<o.length;i++)if(!D(n[o[i]],e[o[i]]))return!1;return!0}else if(e&&n&&typeof e=="function"&&typeof n=="function")return e.toString()===n.toString();return!1}class X{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?l.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?l.RIGHT:l.LEFT}}function d(n,e){return new d.InputMask(n,e)}function H(n){if(n==null)throw new Error("mask property should be defined");return n instanceof RegExp?d.MaskedRegExp:F(n)?d.MaskedPattern:n===Date?d.MaskedDate:n===Number?d.MaskedNumber:Array.isArray(n)||n===Array?d.MaskedDynamic:d.Masked&&n.prototype instanceof d.Masked?n:d.Masked&&n instanceof d.Masked?n.constructor:n instanceof Function?d.MaskedFunction:(console.warn("Mask not found for mask",n),d.Masked)}function x(n){if(!n)throw new Error("Options in not defined");if(d.Masked){if(n.prototype instanceof d.Masked)return{mask:n};const{mask:e=void 0,...t}=n instanceof d.Masked?{mask:n}:L(n)&&n.mask instanceof d.Masked?n:{};if(e){const s=e.mask;return{...U(e,(i,a)=>!a.startsWith("_")),mask:e.constructor,_mask:s,...t}}}return L(n)?{...n}:{mask:n}}function A(n){if(d.Masked&&n instanceof d.Masked)return n;const e=x(n),t=H(e.mask);if(!t)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===t&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new t(e)}d.createMask=A;class P{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,t){if(!(e==null||t==null||e===this.selectionStart&&t===this.selectionEnd))try{this._unsafeSelect(e,t)}catch{}}get isActive(){return!1}}d.MaskElement=P;const N=90,Z=89;class y extends P{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,t,s;return(e=(t=(s=this.input).getRootNode)==null?void 0:t.call(s))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){if(this._handlers.redo&&(e.keyCode===N&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===Z&&e.ctrlKey))return e.preventDefault(),this._handlers.redo(e);if(this._handlers.undo&&e.keyCode===N&&(e.metaKey||e.ctrlKey))return e.preventDefault(),this._handlers.undo(e);e.isComposing||this._handlers.selectionChange(e)}_onBeforeinput(e){if(e.inputType==="historyUndo"&&this._handlers.undo)return e.preventDefault(),this._handlers.undo(e);if(e.inputType==="historyRedo"&&this._handlers.redo)return e.preventDefault(),this._handlers.redo(e)}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}d.HTMLMaskElement=y;class $ extends y{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,t){this.input.setSelectionRange(e,t)}get value(){return this.input.value}set value(e){this.input.value=e}}d.HTMLMaskElement=y;class j extends y{get _unsafeSelectionStart(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,i=t&&t.focusOffset;return i==null||s==null||s<i?s:i}get _unsafeSelectionEnd(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,i=t&&t.focusOffset;return i==null||s==null||s>i?s:i}_unsafeSelect(e,t){if(!this.rootElement.createRange)return;const s=this.rootElement.createRange();s.setStart(this.input.firstChild||this.input,e),s.setEnd(this.input.lastChild||this.input,t);const i=this.rootElement,a=i.getSelection&&i.getSelection();a&&(a.removeAllRanges(),a.addRange(s))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}d.HTMLContenteditableMaskElement=j;class I{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>I.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}I.MAX_LENGTH=100;class W{constructor(e,t){this.el=e instanceof P?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new j(e):new $(e),this.masked=A(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new I,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var t;return e==null||((t=this.masked)==null?void 0:t.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof d.Masked)&&this.masked.constructor===H(e)){this.masked.updateOptions({mask:e});return}const t=e instanceof d.Masked?e:A({mask:e});t.unmaskedValue=this.masked.unmaskedValue,this.masked=t}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,t){const s=this._listeners[e];s&&s.forEach(i=>i(t))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const t=this.masked.unmaskedValue,s=this.masked.value,i=this.masked.rawInputValue,a=this.displayValue,u=this.unmaskedValue!==t||this.value!==s||this._rawInputValue!==i;this._unmaskedValue=t,this._value=s,this._rawInputValue=i,this.el.value!==a&&(this.el.value=a),e==="auto"?this.alignCursor():e!=null&&(this.cursorPos=e),u&&this._fireChangeEvents(),!this._historyChanging&&(u||this.history.isEmpty)&&this.history.push({unmaskedValue:t,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:t,...s}=e,i=!this.maskEquals(t),a=this.masked.optionsIsChanged(s);i&&(this.mask=t),a&&this.masked.updateOptions(s),(i||a)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,l.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,t){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t),this}off(e,t){if(!this._listeners[e])return this;if(!t)return delete this._listeners[e],this;const s=this._listeners[e].indexOf(t);return s>=0&&this._listeners[e].splice(s,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const t=new X({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),s=this.masked.rawInputValue,i=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,a=s===this.masked.rawInputValue?t.removeDirection:l.NONE;let u=this.masked.nearestInputPos(t.startChangePos+i,a);a!==l.NONE&&(u=this.masked.nearestInputPos(u,l.NONE)),this.updateControl(u),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}d.InputMask=W;class p{static normalize(e){return Array.isArray(e)?e:[e,new p]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}d.ChangeDetails=p;class E{constructor(e,t,s){e===void 0&&(e=""),t===void 0&&(t=0),this.value=e,this.from=t,this.stop=s}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const t=this.value[0];return this.value=this.value.slice(1),t}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class g{constructor(e){this._value="",this._update({...g.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,t){t===void 0&&(t={input:!0}),this.reset(),this.append(e,t,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,t){return e}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),Math.min(this.displayValue.length,t-e)}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this.displayValue.slice(e,t)}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new E(this.extractInput(e,t),e)}appendTail(e){return F(e)&&(e=new E(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new p({inserted:e,rawInserted:e})):new p}_appendChar(e,t,s){t===void 0&&(t={});const i=this.state;let a;if([e,a]=this.doPrepareChar(e,t),e&&(a=a.aggregate(this._appendCharRaw(e,t)),!a.rawInserted&&this.autofix==="pad")){const u=this.state;this.state=i;let r=this.pad(t);const h=this._appendCharRaw(e,t);r=r.aggregate(h),h.rawInserted||r.equals(a)?a=r:this.state=u}if(a.inserted){let u,r=this.doValidate(t)!==!1;if(r&&s!=null){const h=this.state;if(this.overwrite===!0){u=s.state;for(let c=0;c<a.rawInserted.length;++c)s.unshift(this.displayValue.length-a.tailShift)}let o=this.appendTail(s);if(r=o.rawInserted.length===s.toString().length,!(r&&o.inserted)&&this.overwrite==="shift"){this.state=h,u=s.state;for(let c=0;c<a.rawInserted.length;++c)s.shift();o=this.appendTail(s),r=o.rawInserted.length===s.toString().length}r&&o.inserted&&(this.state=h)}r||(a=new p,this.state=i,s&&u&&(s.state=u))}return a}_appendPlaceholder(){return new p}_appendEager(){return new p}append(e,t,s){if(!F(e))throw new Error("value should be string");const i=F(s)?new E(String(s)):s;t!=null&&t.tail&&(t._beforeTailState=this.state);let a;[e,a]=this.doPrepare(e,t);for(let u=0;u<e.length;++u){const r=this._appendChar(e[u],t,i);if(!r.rawInserted&&!this.doSkipInvalid(e[u],t,i))break;a.aggregate(r)}return(this.eager===!0||this.eager==="append")&&t!=null&&t.input&&e&&a.aggregate(this._appendEager()),i!=null&&(a.tailShift+=this.appendTail(i).tailShift),a}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(t),new p}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const t=this.rawInputValue,s=this.value,i=e();return this.rawInputValue=t,this.value&&this.value!==s&&s.indexOf(this.value)===0&&(this.append(s.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,i}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const t=this.state,s=e(this);return this.state=t,delete this._isolated,s}doSkipInvalid(e,t,s){return!!this.skipInvalid}doPrepare(e,t){return t===void 0&&(t={}),p.normalize(this.prepare?this.prepare(e,this,t):e)}doPrepareChar(e,t){return t===void 0&&(t={}),p.normalize(this.prepareChar?this.prepareChar(e,this,t):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,t,s,i,a){s===void 0&&(s=""),i===void 0&&(i=l.NONE),a===void 0&&(a={input:!0});const u=e+t,r=this.extractTail(u),h=this.eager===!0||this.eager==="remove";let o;h&&(i=Y(i),o=this.extractInput(0,u,{raw:!0}));let c=e;const f=new p;if(i!==l.NONE&&(c=this.nearestInputPos(e,t>1&&e!==0&&!h?l.NONE:i),f.tailShift=c-e),f.aggregate(this.remove(c)),h&&i!==l.NONE&&o===this.rawInputValue)if(i===l.FORCE_LEFT){let m;for(;o===this.rawInputValue&&(m=this.displayValue.length);)f.aggregate(new p({tailShift:-1})).aggregate(this.remove(m-1))}else i===l.FORCE_RIGHT&&r.unshift();return f.aggregate(this.append(s,a,r))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!D(this,e)}typedValueEquals(e){const t=this.typedValue;return e===t||g.EMPTY_VALUES.includes(e)&&g.EMPTY_VALUES.includes(t)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new p}}g.DEFAULTS={skipInvalid:!0};g.EMPTY_VALUES=[void 0,null,""];d.Masked=g;class v{constructor(e,t){e===void 0&&(e=[]),t===void 0&&(t=0),this.chunks=e,this.from=t}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=F(e)?new E(String(e)):e;const t=this.chunks[this.chunks.length-1],s=t&&(t.stop===e.stop||e.stop==null)&&e.from===t.from+t.toString().length;if(e instanceof E)s?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof v){if(e.stop==null){let i;for(;e.chunks.length&&e.chunks[0].stop==null;)i=e.chunks.shift(),i.from+=e.from,this.extend(i)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof d.MaskedPattern))return new E(this.toString()).appendTo(e);const t=new p;for(let s=0;s<this.chunks.length;++s){const i=this.chunks[s],a=e._mapPosToBlock(e.displayValue.length),u=i.stop;let r;if(u!=null&&(!a||a.index<=u)&&((i instanceof v||e._stops.indexOf(u)>=0)&&t.aggregate(e._appendPlaceholder(u)),r=i instanceof v&&e._blocks[u]),r){const h=r.appendTail(i);t.aggregate(h);const o=i.toString().slice(h.rawInserted.length);o&&t.aggregate(e.append(o,{tail:!0}))}else t.aggregate(e.append(i.toString(),{tail:!0}))}return t}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:t,...s}=e;Object.assign(this,s),this.chunks=t.map(i=>{const a="chunks"in i?new v:new E;return a.state=i,a})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const t=e!=null?e-this.from:e;let s=0;for(;s<this.chunks.length;){const i=this.chunks[s],a=i.unshift(t);if(i.toString()){if(!a)break;++s}else this.chunks.splice(s,1);if(a)return a}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const t=this.chunks[e],s=t.shift();if(t.toString()){if(!s)break;--e}else this.chunks.splice(e,1);if(s)return s}return""}}class J{constructor(e,t){this.masked=e,this._log=[];const{offset:s,index:i}=e._mapPosToBlock(t)||(t<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=s,this.index=i,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((t=this.block)==null?void 0:t.displayValue.length)||0){var t;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,l.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,l.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,l.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,l.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,l.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,l.NONE),!0})}}class G{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(t),this._value||(this._isRawInput=!1),new p}nearestInputPos(e,t){t===void 0&&(t=l.NONE);const s=0,i=this._value.length;switch(t){case l.LEFT:case l.FORCE_LEFT:return s;case l.NONE:case l.RIGHT:case l.FORCE_RIGHT:default:return i}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._isRawInput?t-e:0}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),s===void 0&&(s={}),s.raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new p;const s=this.eager===!0||this.eager==="append",i=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!s)&&!t.tail,a=new p({inserted:this.char,rawInserted:i?this.char:""});return this._value=this.char,this._isRawInput=i&&(t.raw||t.input),a}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new p;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new E("")}appendTail(e){return F(e)&&(e=new E(String(e))),e.appendTo(this)}append(e,t,s){const i=this._appendChar(e[0],t);return s!=null&&(i.tailShift+=this.appendTail(s).tailShift),i}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}pad(e){return this._appendPlaceholder()}}class b{constructor(e){const{parent:t,isOptional:s,placeholderChar:i,displayChar:a,lazy:u,eager:r,...h}=e;this.masked=A(h),Object.assign(this,{parent:t,isOptional:s,placeholderChar:i,displayChar:a,lazy:u,eager:r})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),e===0&&t>=1?(this.isFilled=!1,this.masked.remove(e,t)):new p}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new p;const s=this.masked.state;let i=this.masked._appendChar(e,this.currentMaskFlags(t));return i.inserted&&this.doValidate(t)===!1&&(i=new p,this.masked.state=s),!i.inserted&&!this.isOptional&&!this.lazy&&!t.input&&(i.inserted=this.placeholderChar),i.skip=!i.inserted&&!this.isOptional,this.isFilled=!!i.inserted,i}append(e,t,s){return this.masked.append(e,this.currentMaskFlags(t),s)}_appendPlaceholder(){return this.isFilled||this.isOptional?new p:(this.isFilled=!0,new p({inserted:this.placeholderChar}))}_appendEager(){return new p}extractTail(e,t){return this.masked.extractTail(e,t)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.masked.extractInput(e,t,s)}nearestInputPos(e,t){t===void 0&&(t=l.NONE);const s=0,i=this.value.length,a=Math.min(Math.max(e,s),i);switch(t){case l.LEFT:case l.FORCE_LEFT:return this.isComplete?a:s;case l.RIGHT:case l.FORCE_RIGHT:return this.isComplete?a:i;case l.NONE:default:return a}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.value.slice(e,t).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var t;return{...e,_beforeTailState:(e==null||(t=e._beforeTailState)==null?void 0:t.masked)||(e==null?void 0:e._beforeTailState)}}pad(e){return new p}}b.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class Q extends g{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=s=>s.search(t)>=0),super._update(e)}}d.MaskedRegExp=Q;class k extends g{constructor(e){super({...k.DEFAULTS,...e,definitions:Object.assign({},b.DEFAULT_DEFINITIONS,e==null?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const t=this.mask;if(!t||!e)return;let s=!1,i=!1;for(let a=0;a<t.length;++a){if(this.blocks){const o=t.slice(a),c=Object.keys(this.blocks).filter(m=>o.indexOf(m)===0);c.sort((m,S)=>S.length-m.length);const f=c[0];if(f){const{expose:m,repeat:S,...K}=x(this.blocks[f]),O={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...K,repeat:S,parent:this},T=S!=null?new d.RepeatBlock(O):A(O);T&&(this._blocks.push(T),m&&(this.exposeBlock=T),this._maskedBlocks[f]||(this._maskedBlocks[f]=[]),this._maskedBlocks[f].push(this._blocks.length-1)),a+=f.length-1;continue}}let u=t[a],r=u in e;if(u===k.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(u==="{"||u==="}"){s=!s;continue}if(u==="["||u==="]"){i=!i;continue}if(u===k.ESCAPE_CHAR){if(++a,u=t[a],!u)break;r=!1}const h=r?new b({isOptional:i,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...x(e[u]),parent:this}):new G({char:u,eager:this.eager,isUnmasking:s});this._blocks.push(h)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e){this.reset();return}const{_blocks:t,...s}=e;this._blocks.forEach((i,a)=>i.state=t[a]),super.state=s}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,t)=>e+=t.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(t),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,t)=>e+=t.value,"")}set value(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(t),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(t),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,t)=>e+=t.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const t=new p;let s=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(s==null)return t;this._blocks[s].isFilled&&++s;for(let i=s;i<this._blocks.length;++i){const a=this._blocks[i]._appendEager();if(!a.inserted)break;t.aggregate(a)}return t}_appendCharRaw(e,t){t===void 0&&(t={});const s=this._mapPosToBlock(this.displayValue.length),i=new p;if(!s)return i;for(let u=s.index,r;r=this._blocks[u];++u){var a;const h=r._appendChar(e,{...t,_beforeTailState:(a=t._beforeTailState)==null||(a=a._blocks)==null?void 0:a[u]});if(i.aggregate(h),h.consumed)break}return i}extractTail(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=new v;return e===t||this._forEachBlocksInRange(e,t,(i,a,u,r)=>{const h=i.extractTail(u,r);h.stop=this._findStopBefore(a),h.from=this._blockStartPos(a),h instanceof v&&(h.blockIndex=a),s.extend(h)}),s}extractInput(e,t,s){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),s===void 0&&(s={}),e===t)return"";let i="";return this._forEachBlocksInRange(e,t,(a,u,r,h)=>{i+=a.extractInput(r,h,s)}),i}_findStopBefore(e){let t;for(let s=0;s<this._stops.length;++s){const i=this._stops[s];if(i<=e)t=i;else break}return t}_appendPlaceholder(e){const t=new p;if(this.lazy&&e==null)return t;const s=this._mapPosToBlock(this.displayValue.length);if(!s)return t;const i=s.index,a=e??this._blocks.length;return this._blocks.slice(i,a).forEach(u=>{if(!u.lazy||e!=null){var r;t.aggregate(u._appendPlaceholder((r=u._blocks)==null?void 0:r.length))}}),t}_mapPosToBlock(e){let t="";for(let s=0;s<this._blocks.length;++s){const i=this._blocks[s],a=t.length;if(t+=i.displayValue,e<=t.length)return{index:s,offset:e-a}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((t,s)=>t+=s.displayValue.length,0)}_forEachBlocksInRange(e,t,s){t===void 0&&(t=this.displayValue.length);const i=this._mapPosToBlock(e);if(i){const a=this._mapPosToBlock(t),u=a&&i.index===a.index,r=i.offset,h=a&&u?a.offset:this._blocks[i.index].displayValue.length;if(s(this._blocks[i.index],i.index,r,h),a&&!u){for(let o=i.index+1;o<a.index;++o)s(this._blocks[o],o,0,this._blocks[o].displayValue.length);s(this._blocks[a.index],a.index,0,a.offset)}}}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=super.remove(e,t);return this._forEachBlocksInRange(e,t,(i,a,u,r)=>{s.aggregate(i.remove(u,r))}),s}nearestInputPos(e,t){if(t===void 0&&(t=l.NONE),!this._blocks.length)return 0;const s=new J(this,e);if(t===l.NONE)return s.pushRightBeforeInput()||(s.popState(),s.pushLeftBeforeInput())?s.pos:this.displayValue.length;if(t===l.LEFT||t===l.FORCE_LEFT){if(t===l.LEFT){if(s.pushRightBeforeFilled(),s.ok&&s.pos===e)return e;s.popState()}if(s.pushLeftBeforeInput(),s.pushLeftBeforeRequired(),s.pushLeftBeforeFilled(),t===l.LEFT){if(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.ok&&s.pos<=e||(s.popState(),s.ok&&s.pos<=e))return s.pos;s.popState()}return s.ok?s.pos:t===l.FORCE_LEFT?0:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:0)}return t===l.RIGHT||t===l.FORCE_RIGHT?(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.pushRightBeforeFilled()?s.pos:t===l.FORCE_RIGHT?this.displayValue.length:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:this.nearestInputPos(e,l.LEFT))):e}totalInputPositions(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);let s=0;return this._forEachBlocksInRange(e,t,(i,a,u,r)=>{s+=i.totalInputPositions(u,r)}),s}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const t=this._maskedBlocks[e];return t?t.map(s=>this._blocks[s]):[]}pad(e){const t=new p;return this._forEachBlocksInRange(0,this.displayValue.length,s=>t.aggregate(s.pad(e))),t}}k.DEFAULTS={...g.DEFAULTS,lazy:!0,placeholderChar:"_"};k.STOP_CHAR="`";k.ESCAPE_CHAR="\\";k.InputDefinition=b;k.FixedDefinition=G;d.MaskedPattern=k;class B extends k{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:t=this.to||0,from:s=this.from||0,maxLength:i=this.maxLength||0,autofix:a=this.autofix,...u}=e;this.to=t,this.from=s,this.maxLength=Math.max(String(t).length,i),this.autofix=a;const r=String(this.from).padStart(this.maxLength,"0"),h=String(this.to).padStart(this.maxLength,"0");let o=0;for(;o<h.length&&h[o]===r[o];)++o;u.mask=h.slice(0,o).replace(/0/g,"\\0")+"0".repeat(this.maxLength-o),super._update(u)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let t="",s="";const[,i,a]=e.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(t="0".repeat(i.length)+a,s="9".repeat(i.length)+a),t=t.padEnd(this.maxLength,"0"),s=s.padEnd(this.maxLength,"9"),[t,s]}doPrepareChar(e,t){t===void 0&&(t={});let s;return[e,s]=super.doPrepareChar(e.replace(/\D/g,""),t),e||(s.skip=!this.isComplete),[e,s]}_appendCharRaw(e,t){if(t===void 0&&(t={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,t);const s=String(this.from).padStart(this.maxLength,"0"),i=String(this.to).padStart(this.maxLength,"0"),[a,u]=this.boundaries(this.value+e);return Number(u)<this.from?super._appendCharRaw(s[this.value.length],t):Number(a)>this.to?!t.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(s[this.value.length],t).aggregate(this._appendCharRaw(e,t)):super._appendCharRaw(i[this.value.length],t):super._appendCharRaw(e,t)}doValidate(e){const t=this.value;if(t.search(/[^0]/)===-1&&t.length<=this._matchFrom)return!0;const[s,i]=this.boundaries(t);return this.from<=Number(i)&&Number(s)<=this.to&&super.doValidate(e)}pad(e){const t=new p;if(this.value.length===this.maxLength)return t;const s=this.value,i=this.maxLength-this.value.length;if(i){this.reset();for(let a=0;a<i;++a)t.aggregate(super._appendCharRaw("0",e));s.split("").forEach(a=>this._appendCharRaw(a))}return t}}d.MaskedRange=B;const ee="d{.}`m{.}`Y";class C extends k{static extractPatternOptions(e){const{mask:t,pattern:s,...i}=e;return{...i,mask:F(t)?t:s}}constructor(e){super(C.extractPatternOptions({...C.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:t,pattern:s,blocks:i,...a}={...C.DEFAULTS,...e},u=Object.assign({},C.GET_DEFAULT_BLOCKS());e.min&&(u.Y.from=e.min.getFullYear()),e.max&&(u.Y.to=e.max.getFullYear()),e.min&&e.max&&u.Y.from===u.Y.to&&(u.m.from=e.min.getMonth()+1,u.m.to=e.max.getMonth()+1,u.m.from===u.m.to&&(u.d.from=e.min.getDate(),u.d.to=e.max.getDate())),Object.assign(u,this.blocks,i),super._update({...a,mask:F(t)?t:s,blocks:u})}doValidate(e){const t=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&t!=null&&(this.min==null||this.min<=t)&&(this.max==null||t<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(C.extractPatternOptions(e))}}C.GET_DEFAULT_BLOCKS=()=>({d:{mask:B,from:1,to:31,maxLength:2},m:{mask:B,from:1,to:12,maxLength:2},Y:{mask:B,from:1900,to:9999}});C.DEFAULTS={...k.DEFAULTS,mask:Date,pattern:ee,format:(n,e)=>{if(!n)return"";const t=String(n.getDate()).padStart(2,"0"),s=String(n.getMonth()+1).padStart(2,"0"),i=n.getFullYear();return[t,s,i].join(".")},parse:(n,e)=>{const[t,s,i]=n.split(".").map(Number);return new Date(i,s-1,t)}};d.MaskedDate=C;class M extends g{constructor(e){super({...M.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(t=>{const{expose:s,...i}=x(t),a=A({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...i});return s&&(this.exposeMask=a),a}):[])}_appendCharRaw(e,t){t===void 0&&(t={});const s=this._applyDispatch(e,t);return this.currentMask&&s.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),s}_applyDispatch(e,t,s){e===void 0&&(e=""),t===void 0&&(t={}),s===void 0&&(s="");const i=t.tail&&t._beforeTailState!=null?t._beforeTailState._value:this.value,a=this.rawInputValue,u=t.tail&&t._beforeTailState!=null?t._beforeTailState._rawInputValue:a,r=a.slice(u.length),h=this.currentMask,o=new p,c=h==null?void 0:h.state;return this.currentMask=this.doDispatch(e,{...t},s),this.currentMask&&(this.currentMask!==h?(this.currentMask.reset(),u&&(this.currentMask.append(u,{raw:!0}),o.tailShift=this.currentMask.value.length-i.length),r&&(o.tailShift+=this.currentMask.append(r,{raw:!0,tail:!0}).tailShift)):c&&(this.currentMask.state=c)),o}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const t=new p;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var t,s;return{...e,_beforeTailState:((t=e._beforeTailState)==null?void 0:t.currentMaskRef)===this.currentMask&&((s=e._beforeTailState)==null?void 0:s.currentMask)||e._beforeTailState}}doDispatch(e,t,s){return t===void 0&&(t={}),s===void 0&&(s=""),this.dispatch(e,this,t,s)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,t){t===void 0&&(t={});let[s,i]=super.doPrepare(e,t);if(this.currentMask){let a;[s,a]=super.doPrepare(s,this.currentMaskFlags(t)),i=i.aggregate(a)}return[s,i]}doPrepareChar(e,t){t===void 0&&(t={});let[s,i]=super.doPrepareChar(e,t);if(this.currentMask){let a;[s,a]=super.doPrepareChar(s,this.currentMaskFlags(t)),i=i.aggregate(a)}return[s,i]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(t=>t.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let t=String(e);this.currentMask&&(this.currentMask.typedValue=e,t=this.currentMask.unmaskedValue),this.unmaskedValue=t}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,t){const s=new p;return this.currentMask&&s.aggregate(this.currentMask.remove(e,t)).aggregate(this._applyDispatch()),s}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(t=>t.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:t,currentMaskRef:s,currentMask:i,...a}=e;t&&this.compiledMasks.forEach((u,r)=>u.state=t[r]),s!=null&&(this.currentMask=s,this.currentMask.state=i),super.state=a}extractInput(e,t,s){return this.currentMask?this.currentMask.extractInput(e,t,s):""}extractTail(e,t){return this.currentMask?this.currentMask.extractTail(e,t):super.extractTail(e,t)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,t){return this.currentMask?this.currentMask.nearestInputPos(e,t):super.nearestInputPos(e,t)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((t,s)=>{if(!e[s])return;const{mask:i,...a}=e[s];return D(t,a)&&t.maskEquals(i)}):super.maskEquals(e)}typedValueEquals(e){var t;return!!((t=this.currentMask)!=null&&t.typedValueEquals(e))}}M.DEFAULTS={...g.DEFAULTS,dispatch:(n,e,t,s)=>{if(!e.compiledMasks.length)return;const i=e.rawInputValue,a=e.compiledMasks.map((u,r)=>{const h=e.currentMask===u,o=h?u.displayValue.length:u.nearestInputPos(u.displayValue.length,l.FORCE_LEFT);return u.rawInputValue!==i?(u.reset(),u.append(i,{raw:!0})):h||u.remove(o),u.append(n,e.currentMaskFlags(t)),u.appendTail(s),{index:r,weight:u.rawInputValue.length,totalInputPositions:u.totalInputPositions(0,Math.max(o,u.nearestInputPos(u.displayValue.length,l.FORCE_LEFT)))}});return a.sort((u,r)=>r.weight-u.weight||r.totalInputPositions-u.totalInputPositions),e.compiledMasks[a[0].index]}};d.MaskedDynamic=M;class V extends k{constructor(e){super({...V.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:t,...s}=e;if(t){const i=t.map(r=>r.length),a=Math.min(...i),u=Math.max(...i)-a;s.mask="*".repeat(a),u&&(s.mask+="["+"*".repeat(u)+"]"),this.enum=t}super._update(s)}_appendCharRaw(e,t){t===void 0&&(t={});const s=Math.min(this.nearestInputPos(0,l.FORCE_RIGHT),this.value.length),i=this.enum.filter(a=>this.matchValue(a,this.unmaskedValue+e,s));if(i.length){i.length===1&&this._forEachBlocksInRange(0,this.value.length,(u,r)=>{const h=i[0][r];r>=this.value.length||h===u.value||(u.reset(),u._appendChar(h,t))});const a=super._appendCharRaw(i[0][this.value.length],t);return i.length===1&&i[0].slice(this.unmaskedValue.length).split("").forEach(u=>a.aggregate(super._appendCharRaw(u))),a}return new p({skip:!this.isComplete})}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new E("",e)}remove(e,t){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),e===t)return new p;const s=Math.min(super.nearestInputPos(0,l.FORCE_RIGHT),this.value.length);let i;for(i=e;i>=0&&!(this.enum.filter(u=>this.matchValue(u,this.value.slice(s,i),s)).length>1);--i);const a=super.remove(i,t);return a.tailShift+=i-e,a}get isComplete(){return this.enum.indexOf(this.value)>=0}}V.DEFAULTS={...k.DEFAULTS,matchValue:(n,e,t)=>n.indexOf(e,t)===t};d.MaskedEnum=V;class te extends g{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}d.MaskedFunction=te;var z;class _ extends g{constructor(e){super({..._.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),t="\\d*",s=(this.scale?"("+w(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+t+s),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(w).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(w(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const t=e.split(this.radix);return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),t.join(this.radix)}doPrepareChar(e,t){t===void 0&&(t={});const[s,i]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),t);return e&&!s&&(i.skip=!0),s&&!this.allowPositive&&!this.value&&s!=="-"&&i.aggregate(this._appendChar("-")),[s,i]}_separatorsCount(e,t){t===void 0&&(t=!1);let s=0;for(let i=0;i<e;++i)this._value.indexOf(this.thousandsSeparator,i)===i&&(++s,t&&(e+=this.thousandsSeparator.length));return s}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t),this._removeThousandsSeparators(super.extractInput(e,t,s))}_appendCharRaw(e,t){t===void 0&&(t={});const s=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,i=this._separatorsCountFromSlice(s);this._value=this._removeThousandsSeparators(this.value);const a=this._value;this._value+=e;const u=this.number;let r=!isNaN(u),h=!1;if(r){let m;this.min!=null&&this.min<0&&this.number<this.min&&(m=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(m=this.max),m!=null&&(this.autofix?(this._value=this.format(m,this).replace(_.UNMASKED_RADIX,this.radix),h||(h=a===this._value&&!t.tail)):r=!1),r&&(r=!!this._value.match(this._numberRegExp))}let o;r?o=new p({inserted:this._value.slice(a.length),rawInserted:h?"":e,skip:h}):(this._value=a,o=new p),this._value=this._insertThousandsSeparators(this._value);const c=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,f=this._separatorsCountFromSlice(c);return o.tailShift+=(f-i)*this.thousandsSeparator.length,o}_findSeparatorAround(e){if(this.thousandsSeparator){const t=e-this.thousandsSeparator.length+1,s=this.value.indexOf(this.thousandsSeparator,t);if(s<=e)return s}return-1}_adjustRangeWithSeparators(e,t){const s=this._findSeparatorAround(e);s>=0&&(e=s);const i=this._findSeparatorAround(t);return i>=0&&(t=i+this.thousandsSeparator.length),[e,t]}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t);const s=this.value.slice(0,e),i=this.value.slice(t),a=this._separatorsCount(s.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(s+i));const u=this._separatorsCountFromSlice(s);return new p({tailShift:(u-a)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case l.NONE:case l.LEFT:case l.FORCE_LEFT:{const s=this._findSeparatorAround(e-1);if(s>=0){const i=s+this.thousandsSeparator.length;if(e<i||this.value.length<=i||t===l.FORCE_LEFT)return s}break}case l.RIGHT:case l.FORCE_RIGHT:{const s=this._findSeparatorAround(e);if(s>=0)return s+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let t=e;this.min!=null&&(t=Math.max(t,this.min)),this.max!=null&&(t=Math.min(t,this.max)),t!==e&&(this.unmaskedValue=this.format(t,this));let s=this.value;this.normalizeZeros&&(s=this._normalizeZeros(s)),this.padFractionalZeros&&this.scale>0&&(s=this._padFractionalZeros(s)),this._value=s}super.doCommit()}_normalizeZeros(e){const t=this._removeThousandsSeparators(e).split(this.radix);return t[0]=t[0].replace(/^(\D*)(0*)(\d*)/,(s,i,a,u)=>i+u),e.length&&!/\d$/.test(t[0])&&(t[0]=t[0]+"0"),t.length>1&&(t[1]=t[1].replace(/0*$/,""),t[1].length||(t.length=1)),this._insertThousandsSeparators(t.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const t=e.split(this.radix);return t.length<2&&t.push(""),t[1]=t[1].padEnd(this.scale,"0"),t.join(this.radix)}doSkipInvalid(e,t,s){t===void 0&&(t={});const i=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===_.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,t,s)&&!i}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,_.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(_.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||_.EMPTY_VALUES.includes(e)&&_.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}z=_;_.UNMASKED_RADIX=".";_.EMPTY_VALUES=[...g.EMPTY_VALUES,0];_.DEFAULTS={...g.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[z.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:n=>n.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})};d.MaskedNumber=_;const R={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function q(n,e,t){e===void 0&&(e=R.MASKED),t===void 0&&(t=R.MASKED);const s=A(n);return i=>s.runIsolated(a=>(a[e]=i,a[t]))}function se(n,e,t,s){return q(e,t,s)(n)}d.PIPE_TYPE=R;d.createPipe=q;d.pipe=se;class ie extends k{get repeatFrom(){var e;return(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?e:0}get repeatTo(){var e;return(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var t,s,i;const{repeat:a,...u}=x(e);this._blockOpts=Object.assign({},this._blockOpts,u);const r=A(this._blockOpts);this.repeat=(t=(s=a??r.repeat)!=null?s:this.repeat)!=null?t:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((i=this._blocks)==null?void 0:i.length)||0,this.repeatFrom)),blocks:{m:r},eager:r.eager,overwrite:r.overwrite,skipInvalid:r.skipInvalid,lazy:r.lazy,placeholderChar:r.placeholderChar,displayChar:r.displayChar})}_allocateBlock(e){if(e<this._blocks.length)return this._blocks[e];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(A(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(e,t){t===void 0&&(t={});const s=new p;for(let h=(i=(a=this._mapPosToBlock(this.displayValue.length))==null?void 0:a.index)!=null?i:Math.max(this._blocks.length-1,0),o,c;o=(u=this._blocks[h])!=null?u:c=!c&&this._allocateBlock(h);++h){var i,a,u,r;const f=o._appendChar(e,{...t,_beforeTailState:(r=t._beforeTailState)==null||(r=r._blocks)==null?void 0:r[h]});if(f.skip&&c){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(s.aggregate(f),f.consumed)break}return s}_trimEmptyTail(e,t){var s,i;e===void 0&&(e=0);const a=Math.max(((s=this._mapPosToBlock(e))==null?void 0:s.index)||0,this.repeatFrom,0);let u;t!=null&&(u=(i=this._mapPosToBlock(t))==null?void 0:i.index),u==null&&(u=this._blocks.length-1);let r=0;for(let h=u;a<=h&&!this._blocks[h].unmaskedValue;--h,++r);r&&(this._blocks.splice(u-r+1,r),this.mask=this.mask.slice(r))}reset(){super.reset(),this._trimEmptyTail()}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=super.remove(e,t);return this._trimEmptyTail(e,t),s}totalInputPositions(e,t){return e===void 0&&(e=0),t==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,t)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}}d.RepeatBlock=ie;try{globalThis.IMask=d}catch{}export{p as ChangeDetails,v as ChunksTailDetails,l as DIRECTION,j as HTMLContenteditableMaskElement,$ as HTMLInputMaskElement,y as HTMLMaskElement,W as InputMask,P as MaskElement,g as Masked,C as MaskedDate,M as MaskedDynamic,V as MaskedEnum,te as MaskedFunction,_ as MaskedNumber,k as MaskedPattern,B as MaskedRange,Q as MaskedRegExp,R as PIPE_TYPE,G as PatternFixedDefinition,b as PatternInputDefinition,ie as RepeatBlock,A as createMask,q as createPipe,d as default,Y as forceDirection,x as normalizeOpts,se as pipe};
@@ -1 +0,0 @@
1
- @charset "UTF-8";@import"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap";.sidebar-menu[data-v-95c31110]{overflow-y:auto;scrollbar-width:thin;scrollbar-color:#e0e0e0 #f5f5f5}.sidebar-menu[data-v-95c31110]::-webkit-scrollbar{width:4px}.sidebar-menu[data-v-95c31110]::-webkit-scrollbar-thumb{border-radius:0}:root{--primary-50: #f8fafc;--primary-100: #f1f5f9;--primary-200: #e2e8f0;--primary-300: #cbd5e1;--primary-400: #94a3b8;--primary-500: #64748b;--primary-600: #475569;--primary-700: #334155;--primary-800: #1e293b;--primary-900: #0f172a;--accent-50: #f0f9ff;--accent-100: #e0f2fe;--accent-200: #bae6fd;--accent-300: #7dd3fc;--accent-400: #38bdf8;--accent-500: #0ea5e9;--accent-600: #0284c7;--accent-700: #0369a1;--accent-800: #075985;--accent-900: #0c4a6e;--success-500: #22c55e;--warning-500: #f59e0b;--error-500: #ef4444;--surface-light: #ffffff;--surface-dark: #1e293b;--transition-normal: .2s ease}body{font-family:Inter,sans-serif;margin:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;overflow-x:hidden}button,input,select,textarea{font-family:Inter,sans-serif}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fixed>div[data-v-047caa71]{transition:all .3s ease}.lightbox-fade-enter-active[data-v-624500a3],.lightbox-fade-leave-active[data-v-624500a3]{transition:opacity .18s ease}.lightbox-fade-enter-from[data-v-624500a3],.lightbox-fade-leave-to[data-v-624500a3]{opacity:0}.image-wrapper{display:grid;grid-template-rows:1fr 1fr;grid-template-columns:1fr 1fr 1fr 1fr;grid-column-gap:5px;grid-row-gap:3px;height:100%}.image0{height:100%;width:100%;grid-row-start:1;grid-column-start:1;grid-row-end:3;grid-column-end:3}.image1{grid-row-start:1;grid-column-start:3;grid-row-end:2;grid-column-end:4}.image2{grid-row-start:1;grid-column-start:4;grid-row-end:2;grid-column-end:5}.image3{grid-row-start:2;grid-column-start:3;grid-row-end:3;grid-column-end:4}.image4{grid-row-start:2;grid-column-start:4;grid-row-end:3;grid-column-end:5}.thumb-cover{position:absolute;top:0;right:0;bottom:0;left:0;z-index:5;background-color:#00000080;color:#fff;display:flex;align-items:center;justify-content:center;font-size:36px}.fade-enter-active,.fade-leave-active{transition:opacity .3s}.fade-enter-from,.fade-leave-to{opacity:0}.ui-dialog__wrapper[data-v-a6807cab]{position:relative}.ui-dialog__modal[data-v-a6807cab]{margin:10px;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);min-height:0;height:-moz-fit-content;height:fit-content;max-height:80vh;overflow:hidden}.ui-dialog__content[data-v-a6807cab]{min-height:0;height:100%;overflow:auto}.ui-dialog__content[data-v-a6807cab]::-webkit-scrollbar{width:6px;height:6px;background-color:#f5f5f5}.ui-dialog__content[data-v-a6807cab]::-webkit-scrollbar-thumb{border-radius:10px;background-color:#d9d9d9bf}.ui-dialog__content[data-v-a6807cab]::-webkit-scrollbar-track{background-color:#f5f5f5}@media (max-width: 650px){.ui-dialog__modal[data-v-a6807cab]{top:50%}}.fade-enter-active[data-v-a6807cab],.fade-leave-active[data-v-a6807cab]{transition:opacity .2s}.fade-enter-from[data-v-a6807cab],.fade-leave-to[data-v-a6807cab]{opacity:0}.content-enter-active[data-v-a6807cab],.content-leave-active[data-v-a6807cab]{transition:transform .4s}.content-enter-from[data-v-a6807cab],.content-leave-to[data-v-a6807cab]{transform:translate(-50%,-50%) scale(.95)}.ui-drawer__wrapper[data-v-c808fe88]{position:relative}.ui-drawer__drawer[data-v-c808fe88]{min-height:0;max-height:100vh;overflow:hidden}.ui-drawer__content[data-v-c808fe88]{min-height:0;height:100%;overflow:auto}.ui-drawer__content[data-v-c808fe88]::-webkit-scrollbar{width:6px;height:6px;background-color:#f5f5f5}.ui-drawer__content[data-v-c808fe88]::-webkit-scrollbar-thumb{border-radius:10px;background-color:#d9d9d9bf}.ui-drawer__content[data-v-c808fe88]::-webkit-scrollbar-track{background-color:#f5f5f5}.fade-enter-active[data-v-c808fe88],.fade-leave-active[data-v-c808fe88]{transition:opacity .2s}.fade-enter-from[data-v-c808fe88],.fade-leave-to[data-v-c808fe88]{opacity:0}.drawer-left .drawer-enter-active[data-v-c808fe88],.drawer-left .drawer-leave-active[data-v-c808fe88]{transition:transform .3s ease-in-out}.drawer-left .drawer-enter-from[data-v-c808fe88],.drawer-left .drawer-leave-to[data-v-c808fe88]{transform:translate(-100%)}.drawer-right .drawer-enter-active[data-v-c808fe88],.drawer-right .drawer-leave-active[data-v-c808fe88]{transition:transform .3s ease-in-out}.drawer-right .drawer-enter-from[data-v-c808fe88],.drawer-right .drawer-leave-to[data-v-c808fe88]{transform:translate(100%)}.drawer-top .drawer-enter-active[data-v-c808fe88],.drawer-top .drawer-leave-active[data-v-c808fe88]{transition:transform .3s ease-in-out}.drawer-top .drawer-enter-from[data-v-c808fe88],.drawer-top .drawer-leave-to[data-v-c808fe88]{transform:translateY(-100%)}.drawer-bottom .drawer-enter-active[data-v-c808fe88],.drawer-bottom .drawer-leave-active[data-v-c808fe88]{transition:transform .3s ease-in-out}.drawer-bottom .drawer-enter-from[data-v-c808fe88],.drawer-bottom .drawer-leave-to[data-v-c808fe88]{transform:translateY(100%)}.ui-dialog__wrapper[data-v-9b70dbbf]{position:relative}.ui-dialog__modal[data-v-9b70dbbf]{margin:10px;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);min-height:0;height:-moz-fit-content;height:fit-content;max-height:80vh;overflow:hidden}.ui-dialog__content[data-v-9b70dbbf]{min-height:0;height:100%;overflow:auto}.ui-dialog__content[data-v-9b70dbbf]::-webkit-scrollbar{width:6px;height:6px;background-color:#f5f5f5}.ui-dialog__content[data-v-9b70dbbf]::-webkit-scrollbar-thumb{border-radius:10px;background-color:#d9d9d9bf}.ui-dialog__content[data-v-9b70dbbf]::-webkit-scrollbar-track{background-color:#f5f5f5}@media (max-width: 650px){.ui-dialog__modal[data-v-9b70dbbf]{top:50%}}.fade-enter-active[data-v-9b70dbbf],.fade-leave-active[data-v-9b70dbbf]{transition:opacity .2s}.fade-enter-from[data-v-9b70dbbf],.fade-leave-to[data-v-9b70dbbf]{opacity:0}.content-enter-active[data-v-9b70dbbf],.content-leave-active[data-v-9b70dbbf]{transition:transform .4s}.content-enter-from[data-v-9b70dbbf],.content-leave-to[data-v-9b70dbbf]{transform:translate(-50%,-50%) scale(.95)}.loading-overlay[data-v-a2d01310]{position:fixed;top:0;left:0;width:100%;height:100%;background:#00000080;display:flex;justify-content:center;align-items:center;z-index:100}.loading-spinner[data-v-a2d01310]{border:8px solid rgba(0,0,0,.1);border-left:8px solid #fff;border-radius:50%;width:50px;height:50px;animation:spin-a2d01310 1s linear infinite}@keyframes spin-a2d01310{0%{transform:rotate(0)}to{transform:rotate(360deg)}}button[data-v-629fd3fb]{border-radius:inherit;border:inherit;padding:inherit;font-size:inherit;font-weight:inherit;font-family:inherit;background-color:inherit;cursor:inherit;transition:inherit}.pagination button[data-v-629fd3fb]:hover{border-color:inherit}.pagination button[data-v-629fd3fb]:focus,button[data-v-629fd3fb]:focus-visible{outline:inherit}.pagination input[data-v-629fd3fb]{border-radius:0;padding:.5rem .75rem!important;font-size:1rem;line-height:1.5rem;-moz-appearance:number-input!important}.pagination input[data-v-629fd3fb]::-webkit-inner-spin-button,input[data-v-629fd3fb]::-webkit-outer-spin-button{-webkit-appearance:inner-spin-button!important;display:block!important;margin:initial!important}.pagination ul[data-v-629fd3fb]{list-style:none;padding:0;margin:0}.pagination ul li[data-v-629fd3fb]{list-style:none}.pagination ul li+li[data-v-629fd3fb]{margin:0!important}.pagination input[type=number][data-v-629fd3fb]::-webkit-inner-spin-button,input[type=number][data-v-629fd3fb]::-webkit-outer-spin-button{-webkit-appearance:inner-spin-button!important;display:block!important;margin:initial!important}.grid[data-v-8e66207e]{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:1rem}.item-file:hover>div[data-v-286cdbc0]{display:flex!important;background-color:#00000080}.loader[data-v-e613a523]{width:24px;height:24px;border:3px solid #f3f3f3;border-top:3px solid #3b82f6;border-radius:50%;animation:spin-e613a523 1s linear infinite}@keyframes spin-e613a523{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.widget-file .vs-button{background-color:#2563eb;color:#fff;font-size:.875rem;line-height:1.25rem;font-weight:600}.ui-dialog__modal div.flex.justify-between.items-center.py-3.px-4.border-b{border-bottom-width:0px;--tw-text-opacity: 1;color:#1f2937;font-weight:500;font-size:1.125rem;line-height:1.75rem;padding-bottom:0rem}.ui-dialog__modal .ui-dialog__content .p-4{padding-top:0rem}.slide-fade-enter-active[data-v-90320b87],.slide-fade-leave-active[data-v-90320b87]{transition:all .3s ease}.slide-fade-enter-from[data-v-90320b87],.slide-fade-leave-to[data-v-90320b87]{max-height:0;opacity:0;transform:translateY(-10px)}.slide-fade-enter-to[data-v-90320b87],.slide-fade-leave-from[data-v-90320b87]{max-height:1000px;opacity:1;transform:translateY(0)}.slide-fade-enter-active[data-v-590eff11],.slide-fade-leave-active[data-v-590eff11]{transition:all .3s ease}.slide-fade-enter-from[data-v-590eff11],.slide-fade-leave-to[data-v-590eff11]{max-height:0;opacity:0;transform:translateY(-10px)}.slide-fade-enter-to[data-v-590eff11],.slide-fade-leave-from[data-v-590eff11]{max-height:1000px;opacity:1;transform:translateY(0)}.map-search-widget[data-v-3048520a]{width:100%}.vs-ctrl-group[data-v-150e767b]{display:inline-flex;flex-direction:column;background:#fff;border:1px solid #e5e7eb;border-radius:6px;overflow:hidden;box-shadow:0 1px 2px #0000000a;gap:2px}.vs-btn[data-v-150e767b]{width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center;background:#fff;border:none;cursor:pointer;border-radius:.375rem;transition:background-color .15s ease,color .15s ease,opacity .15s}.vs-btn svg[data-v-150e767b]{width:16px;height:16px;stroke:currentColor;fill:none;color:#3c3c43;stroke-width:2}.vs-btn[data-v-150e767b]:hover,.vs-active[data-v-150e767b]{background:#2563eb;color:#fff}.vs-btn[data-v-150e767b]:disabled{opacity:.5;cursor:not-allowed}.vs-btn-danger[data-v-150e767b]:hover{background:#ef4444;color:#fff}.ring-2[data-v-150e767b]{box-shadow:0 0 0 2px #3b82f699}.leaflet-map-wrapper .leaflet-container[data-v-150e767b]{font:inherit}.fullscreen[data-v-150e767b]{position:fixed!important;top:0;right:0;bottom:0;left:0;width:100vw!important;height:100vh!important;z-index:9999;background:#fff}.tool[data-v-150e767b]{line-height:1}.zoom-instructions-enter-active[data-v-150e767b],.zoom-instructions-leave-active[data-v-150e767b]{transition:all .3s ease}.zoom-instructions-enter-from[data-v-150e767b]{opacity:0;transform:scale(.95) translateY(-10px)}.zoom-instructions-leave-to[data-v-150e767b]{opacity:0;transform:scale(.95) translateY(10px)}.zoom-instructions-enter-to[data-v-150e767b],.zoom-instructions-leave-from[data-v-150e767b]{opacity:1;transform:scale(1) translateY(0)}.col-error .vs-form-text input[data-v-b0eba370]{border:1px solid red}.vs-form-text[data-v-b0eba370]{position:relative}.vs-form-text__input[data-v-b0eba370]::-moz-placeholder{opacity:.5}.vs-form-text__input[data-v-b0eba370]::placeholder{opacity:.5}.col-error .vs-form-text input[data-v-6ee5237d]{border:1px solid red}.vs-form-text[data-v-6ee5237d]{position:relative}.vs-form-text__input[data-v-6ee5237d]::-moz-placeholder{opacity:.5}.vs-form-text__input[data-v-6ee5237d]::placeholder{opacity:.5}[draggable=true][data-v-a0f7fbfc]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.vs-compact-form-navigation__item[data-v-1584a562]{--vs-nav-indicator-left: 4px}.vs-compact-form-navigation__item[data-v-1584a562]:before{content:"";position:absolute;top:50%;left:var(--vs-nav-indicator-left);width:1.5px;height:100%;transform:translateY(-50%);background-color:#6b728099;transition:background-color .2s ease}.vs-compact-form-navigation__button[data-v-1584a562]{transition:color .2s ease}.vs-compact-form-navigation__item--active[data-v-1584a562]:before{background-color:#2563eb;border-radius:9999px}