ku4web-components 6.7.13 → 6.7.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (161) hide show
  1. package/LICENSE +7 -10
  2. package/angular/index.js +1 -3
  3. package/angular/index.mjs +1 -1
  4. package/dist/cjs/{index-d4518258.js → index-6c555187.js} +220 -202
  5. package/dist/cjs/ku4-carousel-controls.cjs.entry.js +2 -1
  6. package/dist/cjs/ku4-carousel-slide.cjs.entry.js +3 -1
  7. package/dist/cjs/ku4-carousel.cjs.entry.js +2 -15
  8. package/dist/cjs/ku4-col.cjs.entry.js +11 -7
  9. package/dist/cjs/ku4-drawer.cjs.entry.js +6 -4
  10. package/dist/cjs/ku4-feature.cjs.entry.js +2 -6
  11. package/dist/cjs/ku4-focus-trap.cjs.entry.js +6 -4
  12. package/dist/cjs/ku4-form.cjs.entry.js +4 -2
  13. package/dist/cjs/ku4-grid.cjs.entry.js +14 -20
  14. package/dist/cjs/ku4-label.cjs.entry.js +4 -1
  15. package/dist/cjs/ku4-mask.cjs.entry.js +2 -31
  16. package/dist/cjs/ku4-modal.cjs.entry.js +2 -12
  17. package/dist/cjs/ku4-panel.cjs.entry.js +1 -4
  18. package/dist/cjs/ku4-preview.cjs.entry.js +11 -1
  19. package/dist/cjs/ku4-tab-list.cjs.entry.js +1 -1
  20. package/dist/cjs/ku4-tab-panel.cjs.entry.js +2 -4
  21. package/dist/cjs/ku4-tab.cjs.entry.js +2 -4
  22. package/dist/cjs/ku4-table.cjs.entry.js +1 -9
  23. package/dist/cjs/ku4-tooltip.cjs.entry.js +7 -1
  24. package/dist/cjs/ku4-validation.cjs.entry.js +9 -33
  25. package/dist/cjs/ku4web-components.cjs.js +2 -2
  26. package/dist/cjs/loader.cjs.js +2 -2
  27. package/dist/cjs/{shadow-css-a33dc836.js → shadow-css-bd1b81c3.js} +1 -1
  28. package/dist/esm/{index-86df1782.js → index-957d146b.js} +220 -202
  29. package/dist/esm/ku4-carousel-controls.entry.js +2 -1
  30. package/dist/esm/ku4-carousel-slide.entry.js +3 -1
  31. package/dist/esm/ku4-carousel.entry.js +2 -15
  32. package/dist/esm/ku4-col.entry.js +11 -7
  33. package/dist/esm/ku4-drawer.entry.js +6 -4
  34. package/dist/esm/ku4-feature.entry.js +2 -6
  35. package/dist/esm/ku4-focus-trap.entry.js +6 -4
  36. package/dist/esm/ku4-form.entry.js +4 -2
  37. package/dist/esm/ku4-grid.entry.js +14 -20
  38. package/dist/esm/ku4-label.entry.js +4 -1
  39. package/dist/esm/ku4-mask.entry.js +2 -31
  40. package/dist/esm/ku4-modal.entry.js +2 -12
  41. package/dist/esm/ku4-panel.entry.js +1 -4
  42. package/dist/esm/ku4-preview.entry.js +11 -1
  43. package/dist/esm/ku4-tab-list.entry.js +1 -1
  44. package/dist/esm/ku4-tab-panel.entry.js +2 -4
  45. package/dist/esm/ku4-tab.entry.js +2 -4
  46. package/dist/esm/ku4-table.entry.js +1 -9
  47. package/dist/esm/ku4-tooltip.entry.js +7 -1
  48. package/dist/esm/ku4-validation.entry.js +9 -33
  49. package/dist/esm/ku4web-components.js +2 -2
  50. package/dist/esm/loader.js +2 -2
  51. package/dist/esm/polyfills/css-shim.js +1 -1
  52. package/dist/esm/{shadow-css-4261c637.js → shadow-css-ad447c78.js} +1 -1
  53. package/dist/esm-es5/index-957d146b.js +2 -0
  54. package/dist/esm-es5/ku4-carousel-controls.entry.js +1 -1
  55. package/dist/esm-es5/ku4-carousel-slide.entry.js +1 -1
  56. package/dist/esm-es5/ku4-carousel.entry.js +1 -1
  57. package/dist/esm-es5/ku4-col.entry.js +1 -1
  58. package/dist/esm-es5/ku4-drawer.entry.js +1 -1
  59. package/dist/esm-es5/ku4-feature.entry.js +1 -1
  60. package/dist/esm-es5/ku4-focus-trap.entry.js +1 -1
  61. package/dist/esm-es5/ku4-form.entry.js +1 -1
  62. package/dist/esm-es5/ku4-grid.entry.js +1 -1
  63. package/dist/esm-es5/ku4-label.entry.js +1 -1
  64. package/dist/esm-es5/ku4-mask.entry.js +1 -1
  65. package/dist/esm-es5/ku4-modal.entry.js +1 -1
  66. package/dist/esm-es5/ku4-panel.entry.js +1 -1
  67. package/dist/esm-es5/ku4-preview.entry.js +1 -1
  68. package/dist/esm-es5/ku4-tab-list.entry.js +1 -1
  69. package/dist/esm-es5/ku4-tab-panel.entry.js +1 -1
  70. package/dist/esm-es5/ku4-tab.entry.js +1 -1
  71. package/dist/esm-es5/ku4-table.entry.js +1 -1
  72. package/dist/esm-es5/ku4-tooltip.entry.js +1 -1
  73. package/dist/esm-es5/ku4-validation.entry.js +1 -1
  74. package/dist/esm-es5/ku4web-components.js +1 -1
  75. package/dist/esm-es5/loader.js +1 -1
  76. package/dist/esm-es5/{shadow-css-4261c637.js → shadow-css-ad447c78.js} +0 -0
  77. package/dist/ku4web-components/ku4web-components.esm.js +1 -1
  78. package/dist/ku4web-components/ku4web-components.js +1 -1
  79. package/dist/ku4web-components/{p-517da8da.entry.js → p-0772733b.entry.js} +1 -1
  80. package/dist/ku4web-components/{p-63b36bc5.system.entry.js → p-13865812.system.entry.js} +1 -1
  81. package/dist/ku4web-components/p-1da96628.entry.js +1 -0
  82. package/dist/ku4web-components/{p-c3616b74.system.entry.js → p-212c12d9.system.entry.js} +1 -1
  83. package/dist/ku4web-components/p-26508a58.entry.js +1 -0
  84. package/dist/ku4web-components/p-282548d9.system.entry.js +1 -0
  85. package/dist/ku4web-components/p-28c15c46.system.entry.js +1 -0
  86. package/dist/ku4web-components/p-30e86d58.entry.js +1 -0
  87. package/dist/ku4web-components/p-344201be.system.entry.js +1 -0
  88. package/dist/ku4web-components/{p-2a630678.system.entry.js → p-3473e882.system.entry.js} +1 -1
  89. package/dist/ku4web-components/p-3bad27c8.entry.js +1 -0
  90. package/dist/ku4web-components/p-3c369c52.system.entry.js +1 -0
  91. package/dist/ku4web-components/p-556e08d2.system.js +2 -0
  92. package/dist/ku4web-components/p-558f5446.js +2 -0
  93. package/dist/ku4web-components/p-591a5737.system.entry.js +1 -0
  94. package/dist/ku4web-components/{p-c2dc6f6d.system.entry.js → p-5c87e225.system.entry.js} +1 -1
  95. package/dist/ku4web-components/{p-a84dd208.entry.js → p-6216bc96.entry.js} +1 -1
  96. package/dist/ku4web-components/{p-69165a40.system.js → p-6481a064.system.js} +1 -1
  97. package/dist/ku4web-components/{p-9d5d5758.system.entry.js → p-64c18ab1.system.entry.js} +1 -1
  98. package/dist/ku4web-components/p-69f12fa1.entry.js +1 -0
  99. package/dist/ku4web-components/{p-e1a494a4.system.entry.js → p-74c39b70.system.entry.js} +1 -1
  100. package/dist/ku4web-components/p-75de4fe4.system.entry.js +1 -0
  101. package/dist/ku4web-components/p-79d3dbaa.entry.js +1 -0
  102. package/dist/ku4web-components/{p-a8de6293.system.js → p-7a4d0d37.system.js} +0 -0
  103. package/dist/ku4web-components/{p-ef5d4167.js → p-7cc436d6.js} +0 -0
  104. package/dist/ku4web-components/{p-b0edddc6.system.entry.js → p-84988564.system.entry.js} +1 -1
  105. package/dist/ku4web-components/p-8b256643.entry.js +1 -0
  106. package/dist/ku4web-components/p-8b438fd6.system.entry.js +1 -0
  107. package/dist/ku4web-components/p-99c77683.entry.js +1 -0
  108. package/dist/ku4web-components/p-9cbcda7a.entry.js +1 -0
  109. package/dist/ku4web-components/{p-2a510b37.system.entry.js → p-9f08f419.system.entry.js} +1 -1
  110. package/dist/ku4web-components/p-a0ad128b.entry.js +1 -0
  111. package/dist/ku4web-components/p-b499e6cb.entry.js +1 -0
  112. package/dist/ku4web-components/p-bb53b540.entry.js +1 -0
  113. package/dist/ku4web-components/p-bd17f58b.system.entry.js +1 -0
  114. package/dist/ku4web-components/{p-dadf46ab.entry.js → p-bd45bbef.entry.js} +1 -1
  115. package/dist/ku4web-components/p-c44e4eb9.system.entry.js +1 -0
  116. package/dist/ku4web-components/{p-8410b9b5.system.entry.js → p-cd7c2c74.system.entry.js} +1 -1
  117. package/dist/ku4web-components/p-d25074c1.entry.js +1 -0
  118. package/dist/ku4web-components/{p-2a862665.entry.js → p-d93c4d57.entry.js} +1 -1
  119. package/dist/ku4web-components/{p-7a05df32.system.entry.js → p-e51ab6b5.system.entry.js} +1 -1
  120. package/dist/ku4web-components/p-e71a70df.system.entry.js +1 -0
  121. package/dist/ku4web-components/p-e90671f2.entry.js +1 -0
  122. package/dist/ku4web-components/p-f1f3f822.entry.js +1 -0
  123. package/dist/ku4web-components/p-feee514a.entry.js +1 -0
  124. package/dist/types/stencil-public-runtime.d.ts +20 -4
  125. package/mask/index.js +1 -1
  126. package/package.json +42 -42
  127. package/react/index.js +1 -3
  128. package/react/index.mjs +1 -1
  129. package/vue/index.js +1 -3
  130. package/vue/index.mjs +1 -1
  131. package/vue3/index.js +1 -3
  132. package/vue3/index.mjs +1 -1
  133. package/dist/esm-es5/index-86df1782.js +0 -2
  134. package/dist/ku4web-components/p-0611607f.entry.js +0 -1
  135. package/dist/ku4web-components/p-0c2fe92e.system.entry.js +0 -1
  136. package/dist/ku4web-components/p-0ced1fa7.system.js +0 -2
  137. package/dist/ku4web-components/p-168f206e.system.entry.js +0 -1
  138. package/dist/ku4web-components/p-1d80d5ea.entry.js +0 -1
  139. package/dist/ku4web-components/p-2f625567.system.entry.js +0 -1
  140. package/dist/ku4web-components/p-33da409b.system.entry.js +0 -1
  141. package/dist/ku4web-components/p-42bd3225.entry.js +0 -1
  142. package/dist/ku4web-components/p-43a3b16a.entry.js +0 -1
  143. package/dist/ku4web-components/p-722f1484.entry.js +0 -1
  144. package/dist/ku4web-components/p-728958cf.entry.js +0 -1
  145. package/dist/ku4web-components/p-80a59984.system.entry.js +0 -1
  146. package/dist/ku4web-components/p-89fe8fa0.entry.js +0 -1
  147. package/dist/ku4web-components/p-96b2c669.entry.js +0 -1
  148. package/dist/ku4web-components/p-a4f7342a.entry.js +0 -1
  149. package/dist/ku4web-components/p-a8ef8a26.system.entry.js +0 -1
  150. package/dist/ku4web-components/p-aac61317.entry.js +0 -1
  151. package/dist/ku4web-components/p-abb96c12.system.entry.js +0 -1
  152. package/dist/ku4web-components/p-ad0e5cff.entry.js +0 -1
  153. package/dist/ku4web-components/p-b9b65d90.system.entry.js +0 -1
  154. package/dist/ku4web-components/p-bcbf1f48.entry.js +0 -1
  155. package/dist/ku4web-components/p-d932f0d5.entry.js +0 -1
  156. package/dist/ku4web-components/p-dcb37faf.entry.js +0 -1
  157. package/dist/ku4web-components/p-e37a1d15.entry.js +0 -1
  158. package/dist/ku4web-components/p-e4c836ca.system.entry.js +0 -1
  159. package/dist/ku4web-components/p-f03c5bf4.entry.js +0 -1
  160. package/dist/ku4web-components/p-f8eab33b.system.entry.js +0 -1
  161. package/dist/ku4web-components/p-fbee7bb3.js +0 -2
package/LICENSE CHANGED
@@ -1,14 +1,11 @@
1
- Copyright (c) 2020 kodmunki™
1
+ Copyright (c) 2020-2023 kodmunki™
2
2
 
3
- Permission is hereby granted, free of charge, to any individual person to
4
- use this software as is in personal projects that do not generate any
5
- revenue whatsoever. It cannot be copied edited repackaged, sold,
6
- resold, or included in any revenue generating project or any project that is
7
- tied in any way to any revenue generating endeavor without permission
8
- from kodmunki. Use in any enterprise software or any revenue generating
9
- project without permission is strictly prohibited. Usage licenses for
10
- enterprises and revenue generating projects can be requested from
11
- kodmunki directly.
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
12
9
 
13
10
  The above copyright notice and this permission notice shall be included in all
14
11
  copies or substantial portions of the Software.
package/angular/index.js CHANGED
@@ -1,3 +1 @@
1
- "use strict";function t(){
2
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
3
- t=function(){return r};var r={},e=Object.prototype,n=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function u(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{u({},"")}catch(t){u=function(t,r,e){return t[r]=e}}function c(t,r,e,n){var i=r&&r.prototype instanceof f?r:f,o=Object.create(i.prototype),s=new A(n||[]);return o._invoke=function(t,r,e){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return E()}for(e.method=i,e.arg=o;;){var s=e.delegate;if(s){var a=w(s,e);if(a){if(a===h)continue;return a}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var u=l(t,r,e);if("normal"===u.type){if(n=e.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n="completed",e.method="throw",e.arg=u.arg)}}}(t,e,s),o}function l(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}r.wrap=c;var h={};function f(){}function p(){}function d(){}var y={};u(y,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(F([])));m&&m!==e&&n.call(m,o)&&(y=m);var v=d.prototype=f.prototype=Object.create(y);function _(t){["next","throw","return"].forEach((function(r){u(t,r,(function(t){return this._invoke(r,t)}))}))}function b(t,r){function e(i,o,s,a){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==typeof h&&n.call(h,"__await")?r.resolve(h.__await).then((function(t){e("next",t,s,a)}),(function(t){e("throw",t,s,a)})):r.resolve(h).then((function(t){c.value=t,s(c)}),(function(t){return e("throw",t,s,a)}))}a(u.arg)}var i;this._invoke=function(t,n){function o(){return new r((function(r,i){e(t,n,r,i)}))}return i=i?i.then(o,o):o()}}function w(t,r){var e=t.iterator[r.method];if(void 0===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=void 0,w(t,r),"throw"===r.method))return h;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=l(e,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,h;var i=n.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function N(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function x(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function F(t){if(t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,i=function r(){for(;++e<t.length;)if(n.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=void 0,r.done=!0,r};return i.next=i}}return{next:E}}function E(){return{value:void 0,done:!0}}return p.prototype=d,u(v,"constructor",d),u(d,"constructor",p),p.displayName=u(d,a,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===p||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},r.awrap=function(t){return{__await:t}},_(b.prototype),u(b.prototype,s,(function(){return this})),r.AsyncIterator=b,r.async=function(t,e,n,i,o){void 0===o&&(o=Promise);var s=new b(c(t,e,n,i),o);return r.isGeneratorFunction(e)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(v),u(v,a,"Generator"),u(v,o,(function(){return this})),u(v,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=F,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function e(e,n){return s.type="throw",s.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return e(o.catchLoc,!0);if(this.prev<o.finallyLoc)return e(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return e(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return e(o.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=r,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(s)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),x(e),h}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var i=n.arg;x(e)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:F(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void 0),h}},r}function r(t,r,e,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void e(t)}a.done?r(u):Promise.resolve(u).then(n,i)}function e(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var s=t.apply(e,n);function a(t){r(s,i,o,a,u,"next",t)}function u(t){r(s,i,o,a,u,"throw",t)}a(void 0)}))}}Object.defineProperty(exports,"__esModule",{value:!0});class n{static isNull(t){return null===t}static isEmpty(t){return n.isString(t)&&""===t||n.isArray(t)&&t.length<1||n.isObjectLiteral(t)&&Object.keys(t).length<1}static isUndefined(t){return void 0===t}static isZero(t){return 0===t}static exists(t){return!(n.isUndefined(t)||n.isNull(t))}static isNullOrEmpty(t){return!n.exists(t)||n.isEmpty(t)}static isArray(t){return Array.isArray(t)}static isBool(t){return"boolean"==typeof t}static isTrue(t){return n.isBool(t)&&!0===t}static isFalse(t){return n.isBool(t)&&!1===t}static isDate(t){return t instanceof Date}static isNumber(t){return("number"==typeof t||t instanceof Number)&&!isNaN(t)}static isEven(t){return this.isNumber(t)&&!this.isZero(t)&&t%2==0}static isOdd(t){return this.isNumber(t)&&!this.isZero(t)&&!this.isEven(t)}static isString(t){return"string"==typeof t||t instanceof String}static isFunction(t){return t instanceof Function}static isAsyncFunction(t){try{return"AsyncFunction"===Object.getPrototypeOf(t).constructor.name||n.isFunction(t)&&/^async/.test(t.toString())||n.isFunction(t().then)}catch(t){return!1}}static isPromise(t){return t instanceof Promise}static isObject(t){return n.exists(t)&&"object"==typeof t&&!(n.isBool(t)||n.isNumber(t)||n.isDate(t)||n.isArray(t)||n.isString(t)||n.isFunction(t))}static isObjectLiteral(t){return n.isObject(t)&&t.constructor==={}.constructor}static isTruthy(t){return!n.isFalsy(t)}static isFalsy(t){return n.isZero(t)||n.isFalse(t)||n.isNullOrEmpty(t)||isNaN(t)}}function i(t){return n.exists(t)&&n.isFunction(t.replace)?t.replace(/^[\s\n]*/,""):t}function o(t){return n.exists(t)&&n.isFunction(t.replace)?t.replace(/[\s\n]*$/,""):t}function s(t,r=0){const e=Math.pow(10,-r);return Math.round(parseFloat((t*e).toFixed(Math.abs(r))))/e}function a(t,r=0){return s(t+5*Math.pow(10,r-1),r)}function u(t,r=0){return 0===t?0:s(t-5*Math.pow(10,r-1),r)}function c(t){const r=(t,e=0,n=1)=>0<t?r(--t,n,e+n):e;return r(t)}function l(t){let r=0,e=1,n=0;for(;t>1;)n=r,r=e,e+=n,t--;return t<1?r:e}function h(t){const r=isNaN(parseInt(t))||t<0||t>24?24:t,e=Math.random().toString().substring(2),n=Math.random().toString().substring(2);return e.concat(n).substring(0,r)}function f(){return function t(r){return r?(r^16*Math.random()>>r/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}Object.freeze({__proto__:null,build:function(...t){return"".concat(...t)},chunk:function(t,r=0){if(!n.isString(t)||Number.isNaN(r)||r<0)return[];if(r<t.length){let e=0;const n=r||t.length,i=[];for(;e<t.length;)i.push(t.slice(e,e+n)),e+=n;return i}return[t]},format:function(t,...r){return r.reduce(((t,r,e)=>t.replace(new RegExp(`\\{${e}\\}`,"g"),r&&r.toString?r.toString():r)),t)},trim:function(t){return i(o(t))},trimStart:i,trimEnd:o,capitalize:function(t=""){return(t||"").charAt(0).toUpperCase()+(t||"").slice(1).toLowerCase()},mask:function(t,r,e="_"){const i=t.toString().split(""),o=new RegExp(e);return n.isFunction(r)?r(t):n.isString(r)&&r.split("").reduce(((e,n)=>i.length>0&&(o.test(n)||i[0]===n&&t.indexOf(i[0])===r.indexOf(n))?e+i.shift():e+n),"")},unmask:function(t,r,e="_"){const i=new RegExp(e);return n.isFunction(r)?r(t):n.isString(r)&&t.split("").reduce(((t,e,n)=>i.test(e)||!i.test(r.charAt(n))&&r.charAt(n)===e?t:t+e),"")}}),Object.freeze({__proto__:null,random:function(t=0,r=1){return Math.random()*(r-t)+t},round:s,roundUp:a,roundDown:u,roundTowardZero:function(t,r=0){return t<0?a(t,r):u(t,r)},gcd:function t(r,e){return 0===e?Math.abs(r):t(e,r%e)},fib:c,fib2:l,fibArray:function(t){return Array(t).fill(0).map((()=>c(--t))).reverse()},fib2Array:function(t){return Array(t).fill(0).map((()=>l(--t))).reverse()},tryParseInt:function(t,r=0){const e=parseInt(t);return Number.isNaN(e)?r:e},tryParseFloat:function(t,r=0){const e=parseFloat(t);return Number.isNaN(e)?r:e}}),Object.freeze({__proto__:null,uid:h,uuid:f,suid:function(){return Symbol(h())},suuid:function(){return Symbol(f())}}),Object.freeze({__proto__:null,pattern:t=>t.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\"),escape:t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-+]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/_:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?_]+=[^=?_]*(&[^=?_]+=[^=?_]*)*(_.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i});class p{static isNull(t){return null===t}static isEmpty(t){return p.isString(t)&&""===t||p.isArray(t)&&t.length<1||p.isObjectLiteral(t)&&Object.keys(t).length<1}static isUndefined(t){return void 0===t}static isZero(t){return 0===t}static exists(t){return!(p.isUndefined(t)||p.isNull(t))}static isNullOrEmpty(t){return!p.exists(t)||p.isEmpty(t)}static isArray(t){return Array.isArray(t)}static isBool(t){return"boolean"==typeof t}static isTrue(t){return p.isBool(t)&&!0===t}static isFalse(t){return p.isBool(t)&&!1===t}static isDate(t){return t instanceof Date}static isNumber(t){return("number"==typeof t||t instanceof Number)&&!isNaN(t)}static isEven(t){return this.isNumber(t)&&!this.isZero(t)&&t%2==0}static isOdd(t){return this.isNumber(t)&&!this.isZero(t)&&!this.isEven(t)}static isString(t){return"string"==typeof t||t instanceof String}static isFunction(t){return t instanceof Function}static isAsyncFunction(t){try{return"AsyncFunction"===Object.getPrototypeOf(t).constructor.name||p.isFunction(t)&&/^async/.test(t.toString())||p.isFunction(t().then)}catch(t){return!1}}static isPromise(t){return t instanceof Promise}static isObject(t){return p.exists(t)&&"object"==typeof t&&!(p.isBool(t)||p.isNumber(t)||p.isDate(t)||p.isArray(t)||p.isString(t)||p.isFunction(t))}static isObjectLiteral(t){return p.isObject(t)&&t.constructor==={}.constructor}static isTruthy(t){return!p.isFalsy(t)}static isFalsy(t){return p.isZero(t)||p.isFalse(t)||p.isNullOrEmpty(t)||isNaN(t)}}function d(...t){return"".concat(...t)}function y(t,...r){return r.reduce(((t,r,e)=>t.replace(new RegExp(`\\{${e}\\}`,"g"),r&&r.toString?r.toString():r)),t)}function g(t){return m(v(t))}function m(t){return p.exists(t)&&p.isFunction(t.replace)?t.replace(/^[\s\n]*/,""):t}function v(t){return p.exists(t)&&p.isFunction(t.replace)?t.replace(/[\s\n]*$/,""):t}function _(t,r){try{return t()}catch{return r}}let b;Object.freeze({__proto__:null,build:d,chunk:function(t,r=0){if(!p.isString(t)||Number.isNaN(r)||r<0)return[];if(r<t.length){let e=0;const n=r||t.length,i=[];for(;e<t.length;)i.push(t.slice(e,e+n)),e+=n;return i}return[t]},format:y,trim:g,trimStart:m,trimEnd:v,capitalize:function(t=""){return(t||"").charAt(0).toUpperCase()+(t||"").slice(1).toLowerCase()},mask:function(t,r,e="_"){const n=t.toString().split(""),i=new RegExp(e);return p.isFunction(r)?r(t):p.isString(r)&&r.split("").reduce(((e,o)=>n.length>0&&(i.test(o)||n[0]===o&&t.indexOf(n[0])===r.indexOf(o))?e+n.shift():e+o),"")},unmask:function(t,r,e="_"){const n=new RegExp(e);return p.isFunction(r)?r(t):p.isString(r)&&t.split("").reduce(((t,e,i)=>n.test(e)||!n.test(r.charAt(i))&&r.charAt(i)===e?t:t+e),"")}}),_.async=async(t,r)=>{try{return await t()}catch{return r}};class w{constructor(t,r,e){if(r<1||r>12)throw new Error("Invalid month at Assert.DayPoint");if(e<1||e>N(r,t))throw new Error("Invalid date at DayPoint");this._value=arguments.length>=3?new Date(t,r-1,e):new Date,this._day=this._value.getDay(),this._date=e,this._month=r,this._year=t}get value(){return this._value}get day(){return this._day}get date(){return this._date}get month(){return this._month}get year(){return this._year}get shortYear(){const t=this._year.toString();return parseInt(t.substr(t.length-2))}get isWeekday(){const t=this._day;return t>0&&t<6}get isWeekend(){return!this.isWeekday}get isLeapYear(){return x(this._year)}get nextDay(){return A(this,1,0,0)}get prevDay(){return A(this,-1,0,0)}get nextMonth(){return A(this,0,1,0)}get prevMonth(){return A(this,0,-1,0)}get nextYear(){return A(this,0,0,1)}get prevYear(){return A(this,0,0,-1)}get firstDayOfMonth(){return new w(this._year,this._month,1)}get lastDayOfMonth(){return new w(this._year,this._month,N(this._month,this._year))}add(t,r,e){function n(t,r,e){let n=t,i=r;for(;i--;)n=n[e];return n}const{abs:i}=Math,o=i(t),s=i(e),a=i(r),u=e<0?"prevDay":"nextDay",c=r<0?"prevMonth":"nextMonth";return n(n(n(this,o,t<0?"prevYear":"nextYear"),a,c),s,u)}isBefore(t){return!(this.isAfter(t)||this.equals(t))}isAfter(t){const r=this._year,e=t.year,n=this._month,i=t.month;return r>e||r===e&&n>i||r===e&&n===i&&this._date>t.date}equals(t){return this._year===t.year&&this._month===t.month&&this._date===t.date}toString(t="mm/dd/yyyy"){const r=/y{3,}/i.test(t)?this._year:this.shortYear,e=this._month,n=this._date,i=/m{2}/i.test(t)&&e<10?"0{1}":"{1}",o=/d{2}/i.test(t)&&n<10?"0{2}":"{2}";return y(t.replace(/y+/gi,"{0}").replace(/m+/gi,i).replace(/d+/gi,o),r,e,n)}toDate(){return this._value}toJson(){return this._value.toJSON()}static canParse(t){return p.isString(t)||p.isNumber(t)||p.isDate(t)?!isNaN(new Date(t).valueOf()):t instanceof w}static parse(t){if(t instanceof w)return t;let r=p.isString(t)?g(t).replace(/T\d{2}:\d{2}:\d{2}(.\d+)?Z/,""):t;if(/^\d{4}-\d{1,2}-\d{1,2}$/.test(r)){const t=r.split("-"),[e]=t;t.push(e),t.shift(),r=t.join("/")}const e=new Date(r);if(!p.exists(r)||Number.isNaN(e.valueOf()))throw new Error(y("Cannot parse value= {0}",r));return new w(e.getFullYear(),e.getMonth()+1,e.getDate())}static tryParse(t){return _((()=>w.parse(t)),null)}static assumeNow(t){b=w.parse(t)}static get today(){return b||w.parse(new Date)}}function N(t,r){return 2===t?x(r)?29:28:t<8&&p.isEven(t)||t>7&&p.isOdd(t)?30:31}function x(t){const r=t.toString().split(/\B/);return parseFloat(d(r[r.length-2],r[r.length-1]))%4==0}function A(t,r,e,n){const i=t.month,o=t.year,s=t.date,a=e,u=n;let c=s+r,l=i+a,h=o+u;if(s+r>N(i,o)&&(c=1,l=i+a+1),s+r<1){const r=t.prevMonth;c=N(r.month,r.year),l=i+a-1}return l>12&&(l=1,h=o+u+1),l<1&&(l=12,h=o+u-1),new w(h,l,c)}function F(t,r=0){const e=Math.pow(10,-r);return Math.round(parseFloat((t*e).toFixed(Math.abs(r))))/e}function E(t,r=0){return F(t+5*Math.pow(10,r-1),r)}function O(t,r=0){return 0===t?0:F(t-5*Math.pow(10,r-1),r)}function S(t){const r=(t,e=0,n=1)=>0<t?r(--t,n,e+n):e;return r(t)}function j(t){let r=0,e=1,n=0;for(;t>1;)n=r,r=e,e+=n,t--;return t<1?r:e}function L(t){const r=isNaN(parseInt(t))||t<0||t>24?24:t,e=Math.random().toString().substring(2),n=Math.random().toString().substring(2);return e.concat(n).substring(0,r)}function $(){return function t(r){return r?(r^16*Math.random()>>r/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}Object.freeze({__proto__:null,random:function(t=0,r=1){return Math.random()*(r-t)+t},round:F,roundUp:E,roundDown:O,roundTowardZero:function(t,r=0){return t<0?E(t,r):O(t,r)},gcd:function t(r,e){return 0===e?Math.abs(r):t(e,r%e)},fib:S,fib2:j,fibArray:function(t){return Array(t).fill(0).map((()=>S(--t))).reverse()},fib2Array:function(t){return Array(t).fill(0).map((()=>j(--t))).reverse()},tryParseInt:function(t,r=0){const e=parseInt(t);return Number.isNaN(e)?r:e},tryParseFloat:function(t,r=0){const e=parseFloat(t);return Number.isNaN(e)?r:e}});var z=Object.freeze({__proto__:null,uid:L,uuid:$,suid:function(){return Symbol(L())},suuid:function(){return Symbol($())}});Object.freeze({__proto__:null,pattern:t=>t.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\"),escape:t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-+]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/_:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?_]+=[^=?_]*(&[^=?_]+=[^=?_]*)*(_.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i}),z.uid(),w.today.nextYear.toDate();const M=t=>new window.FormData(t),k=t=>{const r={};try{M(t).forEach(((t,e)=>{const n=r[e];p.isArray(n)?r[e].push(t):p.exists(n)?r[e]=[r[e],t]:r[e]=t}))}catch(e){[...t.elements].forEach((t=>{const{name:e,type:n,value:i,files:o}=t;if("file"===n)r[e]=o[0];else if("checkbox"===n||"radio"===n)t.checked&&(r[e]=i);else if(t.multiple){const n=[];t.querySelectorAll("option").forEach((t=>t.selected&&n.push(t.value))),r[e]=n.length<2?n[0]:n}else r[e]=i}))}return r};var D=k,P=M;exports.wireForm=function(r,i){if(r&&!r.__ku4wired__)try{var o=r.submit;r.submit=e(t().mark((function e(){var s,a,u;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s=D(r),a=P(r),t.next=4,i(s,a,r);case 4:u=t.sent,n.isFalse(u)||o.call(r);case 6:case"end":return t.stop()}}),e)}))),r.__ku4wired__=!0}catch(t){throw new Error("wireForm Error. See https://kodmunki.com/storybook/?path=/docs/form-ku4-form--basic for more information.")}};
1
+ "use strict";function t(){t=function(){return r};var r={},e=Object.prototype,n=e.hasOwnProperty,i=Object.defineProperty||function(t,r,e){t[r]=e.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{c({},"")}catch(t){c=function(t,r,e){return t[r]=e}}function l(t,r,e,n){var o=r&&r.prototype instanceof p?r:p,s=Object.create(o.prototype),a=new O(n||[]);return i(s,"_invoke",{value:N(t,e,a)}),s}function h(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}r.wrap=l;var f={};function p(){}function d(){}function y(){}var g={};c(g,s,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(E([])));v&&v!==e&&n.call(v,s)&&(g=v);var b=y.prototype=p.prototype=Object.create(g);function _(t){["next","throw","return"].forEach((function(r){c(t,r,(function(t){return this._invoke(r,t)}))}))}function w(t,r){function e(i,o,s,a){var u=h(t[i],t,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?r.resolve(l.__await).then((function(t){e("next",t,s,a)}),(function(t){e("throw",t,s,a)})):r.resolve(l).then((function(t){c.value=t,s(c)}),(function(t){return e("throw",t,s,a)}))}a(u.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new r((function(r,i){e(t,n,r,i)}))}return o=o?o.then(i,i):i()}})}function N(t,r,e){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return S()}for(e.method=i,e.arg=o;;){var s=e.delegate;if(s){var a=x(s,e);if(a){if(a===f)continue;return a}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var u=h(t,r,e);if("normal"===u.type){if(n=e.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n="completed",e.method="throw",e.arg=u.arg)}}}function x(t,r){var e=t.iterator[r.method];if(void 0===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=void 0,x(t,r),"throw"===r.method))return f;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=h(e,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,f;var i=n.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,f):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function A(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function F(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,i=function r(){for(;++e<t.length;)if(n.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=void 0,r.done=!0,r};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=y,i(b,"constructor",{value:y,configurable:!0}),i(y,"constructor",{value:d,configurable:!0}),d.displayName=c(y,u,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===d||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},r.awrap=function(t){return{__await:t}},_(w.prototype),c(w.prototype,a,(function(){return this})),r.AsyncIterator=w,r.async=function(t,e,n,i,o){void 0===o&&(o=Promise);var s=new w(l(t,e,n,i),o);return r.isGeneratorFunction(e)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(b),c(b,u,"Generator"),c(b,s,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=E,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(F),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function e(e,n){return s.type="throw",s.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return e(o.catchLoc,!0);if(this.prev<o.finallyLoc)return e(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return e(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return e(o.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=r,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(s)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),f},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),F(e),f}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var i=n.arg;F(e)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:E(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void 0),f}},r}function r(t,r,e,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void e(t)}a.done?r(u):Promise.resolve(u).then(n,i)}function e(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var s=t.apply(e,n);function a(t){r(s,i,o,a,u,"next",t)}function u(t){r(s,i,o,a,u,"throw",t)}a(void 0)}))}}let n,i=class{static isNull(t){return null===t}static isEmpty(t){return i.isString(t)&&""===t||i.isArray(t)&&t.length<1||i.isObjectLiteral(t)&&Object.keys(t).length<1}static isUndefined(t){return void 0===t}static isZero(t){return 0===t}static exists(t){return!(i.isUndefined(t)||i.isNull(t))}static isNullOrEmpty(t){return!i.exists(t)||i.isEmpty(t)}static isArray(t){return Array.isArray(t)}static isBool(t){return"boolean"==typeof t}static isTrue(t){return i.isBool(t)&&!0===t}static isFalse(t){return i.isBool(t)&&!1===t}static isDate(t){return t instanceof Date}static isNumber(t){return("number"==typeof t||t instanceof Number)&&!isNaN(t)}static isEven(t){return this.isNumber(t)&&!this.isZero(t)&&t%2==0}static isOdd(t){return this.isNumber(t)&&!this.isZero(t)&&!this.isEven(t)}static isString(t){return"string"==typeof t||t instanceof String}static isFunction(t){return t instanceof Function}static isAsyncFunction(t){try{return"AsyncFunction"===Object.getPrototypeOf(t).constructor.name||i.isFunction(t)&&/^async/.test(t.toString())||i.isFunction(t().then)}catch(t){return!1}}static isPromise(t){return t instanceof Promise}static isObject(t){return i.exists(t)&&"object"==typeof t&&!(i.isBool(t)||i.isNumber(t)||i.isDate(t)||i.isArray(t)||i.isString(t)||i.isFunction(t))}static isObjectLiteral(t){return i.isObject(t)&&t.constructor==={}.constructor}static isTruthy(t){return!i.isFalsy(t)}static isFalsy(t){return i.isZero(t)||i.isFalse(t)||i.isNullOrEmpty(t)||isNaN(t)}};function o(t){return i.exists(t)&&i.isFunction(t.replace)?t.replace(/^[\s\n]*/,""):t}function s(t){return i.exists(t)&&i.isFunction(t.replace)?t.replace(/[\s\n]*$/,""):t}function a(t,r=0){const e=Math.pow(10,-r);return Math.round(parseFloat((t*e).toFixed(Math.abs(r))))/e}function u(t,r=0){return a(t+5*Math.pow(10,r-1),r)}function c(t,r=0){return 0===t?0:a(t-5*Math.pow(10,r-1),r)}function l(t){const r=(t,e=0,n=1)=>0<t?r(--t,n,e+n):e;return r(t)}function h(t){let r=0,e=1,n=0;for(;t>1;)n=r,r=e,e+=n,t--;return t<1?r:e}function f(t){const r=isNaN(parseInt(t))||t<0||t>24?24:t,e=Math.random().toString().substring(2),n=Math.random().toString().substring(2);return e.concat(n).substring(0,r)}function p(){return function t(r){return r?(r^16*Math.random()>>r/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}Object.freeze({__proto__:null,build:function(...t){return"".concat(...t)},chunk:function(t,r=0){if(!i.isString(t)||Number.isNaN(r)||r<0)return[];if(r<t.length){let e=0;const n=r||t.length,i=[];for(;e<t.length;)i.push(t.slice(e,e+n)),e+=n;return i}return[t]},format:function(t,...r){return r.reduce(((t,r,e)=>t.replace(new RegExp(`\\{${e}\\}`,"g"),r&&r.toString?r.toString():r)),t)},trim:function(t){return o(s(t))},trimStart:o,trimEnd:s,capitalize:function(t=""){return(t||"").charAt(0).toUpperCase()+(t||"").slice(1).toLowerCase()},mask:function(t,r,e="_"){const n=t.toString().split(""),o=new RegExp(e);return i.isFunction(r)?r(t):i.isString(r)&&r.split("").reduce(((e,i)=>n.length>0&&(o.test(i)||n[0]===i&&t.indexOf(n[0])===r.indexOf(i))?e+n.shift():e+i),"")},unmask:function(t,r,e="_"){const n=new RegExp(e);return i.isFunction(r)?r(t):i.isString(r)&&t.split("").reduce(((t,e,i)=>n.test(e)||!n.test(r.charAt(i))&&r.charAt(i)===e?t:t+e),"")}}),Object.freeze({__proto__:null,random:function(t=0,r=1){return Math.random()*(r-t)+t},round:a,roundUp:u,roundDown:c,roundTowardZero:function(t,r=0){return t<0?u(t,r):c(t,r)},gcd:function t(r,e){return 0===e?Math.abs(r):t(e,r%e)},fib:l,fib2:h,fibArray:function(t){return Array(t).fill(0).map((()=>l(--t))).reverse()},fib2Array:function(t){return Array(t).fill(0).map((()=>h(--t))).reverse()},tryParseInt:function(t,r=0){const e=parseInt(t);return Number.isNaN(e)?r:e},tryParseFloat:function(t,r=0){const e=parseFloat(t);return Number.isNaN(e)?r:e}}),Object.freeze({__proto__:null,uid:f,uuid:p,suid:function(){return Symbol(f())},suuid:function(){return Symbol(p())}}),Object.freeze({__proto__:null,pattern:t=>t.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\"),escape:t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-+]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/_:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?_]+=[^=?_]*(&[^=?_]+=[^=?_]*)*(_.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i});class d{static isNull(t){return null===t}static isEmpty(t){return d.isString(t)&&""===t||d.isArray(t)&&t.length<1||d.isObjectLiteral(t)&&Object.keys(t).length<1}static isUndefined(t){return void 0===t}static isZero(t){return 0===t}static exists(t){return!(d.isUndefined(t)||d.isNull(t))}static isNullOrEmpty(t){return!d.exists(t)||d.isEmpty(t)}static isArray(t){return Array.isArray(t)}static isBool(t){return"boolean"==typeof t}static isTrue(t){return d.isBool(t)&&!0===t}static isFalse(t){return d.isBool(t)&&!1===t}static isDate(t){return t instanceof Date}static isNumber(t){return("number"==typeof t||t instanceof Number)&&!isNaN(t)}static isEven(t){return this.isNumber(t)&&!this.isZero(t)&&t%2==0}static isOdd(t){return this.isNumber(t)&&!this.isZero(t)&&!this.isEven(t)}static isString(t){return"string"==typeof t||t instanceof String}static isFunction(t){return t instanceof Function}static isAsyncFunction(t){try{return"AsyncFunction"===Object.getPrototypeOf(t).constructor.name||d.isFunction(t)&&/^async/.test(t.toString())||d.isFunction(t().then)}catch(t){return!1}}static isPromise(t){return t instanceof Promise}static isObject(t){return d.exists(t)&&"object"==typeof t&&!(d.isBool(t)||d.isNumber(t)||d.isDate(t)||d.isArray(t)||d.isString(t)||d.isFunction(t))}static isObjectLiteral(t){return d.isObject(t)&&t.constructor==={}.constructor}static isTruthy(t){return!d.isFalsy(t)}static isFalsy(t){return d.isZero(t)||d.isFalse(t)||d.isNullOrEmpty(t)||isNaN(t)}}function y(...t){return"".concat(...t)}function g(t,...r){return r.reduce(((t,r,e)=>t.replace(new RegExp(`\\{${e}\\}`,"g"),r&&r.toString?r.toString():r)),t)}function m(t){return v(b(t))}function v(t){return d.exists(t)&&d.isFunction(t.replace)?t.replace(/^[\s\n]*/,""):t}function b(t){return d.exists(t)&&d.isFunction(t.replace)?t.replace(/[\s\n]*$/,""):t}function _(t,r){try{return t()}catch{return r}}Object.freeze({__proto__:null,build:y,chunk:function(t,r=0){if(!d.isString(t)||Number.isNaN(r)||r<0)return[];if(r<t.length){let e=0;const n=r||t.length,i=[];for(;e<t.length;)i.push(t.slice(e,e+n)),e+=n;return i}return[t]},format:g,trim:m,trimStart:v,trimEnd:b,capitalize:function(t=""){return(t||"").charAt(0).toUpperCase()+(t||"").slice(1).toLowerCase()},mask:function(t,r,e="_"){const n=t.toString().split(""),i=new RegExp(e);return d.isFunction(r)?r(t):d.isString(r)&&r.split("").reduce(((e,o)=>n.length>0&&(i.test(o)||n[0]===o&&t.indexOf(n[0])===r.indexOf(o))?e+n.shift():e+o),"")},unmask:function(t,r,e="_"){const n=new RegExp(e);return d.isFunction(r)?r(t):d.isString(r)&&t.split("").reduce(((t,e,i)=>n.test(e)||!n.test(r.charAt(i))&&r.charAt(i)===e?t:t+e),"")}}),_.async=async(t,r)=>{try{return await t()}catch{return r}};class w{constructor(t,r,e){if(r<1||r>12)throw new Error("Invalid month at Assert.DayPoint");if(e<1||e>N(r,t))throw new Error("Invalid date at DayPoint");this._value=arguments.length>=3?new Date(t,r-1,e):new Date,this._day=this._value.getDay(),this._date=e,this._month=r,this._year=t}get value(){return this._value}get day(){return this._day}get date(){return this._date}get month(){return this._month}get year(){return this._year}get shortYear(){const t=this._year.toString();return parseInt(t.substr(t.length-2))}get isWeekday(){const t=this._day;return t>0&&t<6}get isWeekend(){return!this.isWeekday}get isLeapYear(){return x(this._year)}get nextDay(){return A(this,1,0,0)}get prevDay(){return A(this,-1,0,0)}get nextMonth(){return A(this,0,1,0)}get prevMonth(){return A(this,0,-1,0)}get nextYear(){return A(this,0,0,1)}get prevYear(){return A(this,0,0,-1)}get firstDayOfMonth(){return new w(this._year,this._month,1)}get lastDayOfMonth(){return new w(this._year,this._month,N(this._month,this._year))}add(t,r,e){function n(t,r,e){let n=t,i=r;for(;i--;)n=n[e];return n}const{abs:i}=Math,o=i(t),s=i(e),a=i(r),u=e<0?"prevDay":"nextDay",c=r<0?"prevMonth":"nextMonth";return n(n(n(this,o,t<0?"prevYear":"nextYear"),a,c),s,u)}isBefore(t){return!(this.isAfter(t)||this.equals(t))}isAfter(t){const r=this._year,e=t.year,n=this._month,i=t.month;return r>e||r===e&&n>i||r===e&&n===i&&this._date>t.date}equals(t){return this._year===t.year&&this._month===t.month&&this._date===t.date}toString(t="mm/dd/yyyy"){const r=/y{3,}/i.test(t)?this._year:this.shortYear,e=this._month,n=this._date,i=/m{2}/i.test(t)&&e<10?"0{1}":"{1}",o=/d{2}/i.test(t)&&n<10?"0{2}":"{2}";return g(t.replace(/y+/gi,"{0}").replace(/m+/gi,i).replace(/d+/gi,o),r,e,n)}toDate(){return this._value}toJson(){return this._value.toJSON()}static canParse(t){return d.isString(t)||d.isNumber(t)||d.isDate(t)?!isNaN(new Date(t).valueOf()):t instanceof w}static parse(t){if(t instanceof w)return t;let r=d.isString(t)?m(t).replace(/T\d{2}:\d{2}:\d{2}(.\d+)?Z/,""):t;if(/^\d{4}-\d{1,2}-\d{1,2}$/.test(r)){const t=r.split("-"),[e]=t;t.push(e),t.shift(),r=t.join("/")}const e=new Date(r);if(!d.exists(r)||Number.isNaN(e.valueOf()))throw new Error(g("Cannot parse value= {0}",r));return new w(e.getFullYear(),e.getMonth()+1,e.getDate())}static tryParse(t){return _((()=>w.parse(t)),null)}static assumeNow(t){n=w.parse(t)}static get today(){return n||w.parse(new Date)}}function N(t,r){return 2===t?x(r)?29:28:t<8&&d.isEven(t)||t>7&&d.isOdd(t)?30:31}function x(t){const r=t.toString().split(/\B/);return parseFloat(y(r[r.length-2],r[r.length-1]))%4==0}function A(t,r,e,n){const i=t.month,o=t.year,s=t.date,a=e,u=n;let c=s+r,l=i+a,h=o+u;if(s+r>N(i,o)&&(c=1,l=i+a+1),s+r<1){const r=t.prevMonth;c=N(r.month,r.year),l=i+a-1}return l>12&&(l=1,h=o+u+1),l<1&&(l=12,h=o+u-1),new w(h,l,c)}function F(t,r=0){const e=Math.pow(10,-r);return Math.round(parseFloat((t*e).toFixed(Math.abs(r))))/e}function O(t,r=0){return F(t+5*Math.pow(10,r-1),r)}function E(t,r=0){return 0===t?0:F(t-5*Math.pow(10,r-1),r)}function S(t){const r=(t,e=0,n=1)=>0<t?r(--t,n,e+n):e;return r(t)}function j(t){let r=0,e=1,n=0;for(;t>1;)n=r,r=e,e+=n,t--;return t<1?r:e}function L(t){const r=isNaN(parseInt(t))||t<0||t>24?24:t,e=Math.random().toString().substring(2),n=Math.random().toString().substring(2);return e.concat(n).substring(0,r)}function $(){return function t(r){return r?(r^16*Math.random()>>r/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}Object.freeze({__proto__:null,random:function(t=0,r=1){return Math.random()*(r-t)+t},round:F,roundUp:O,roundDown:E,roundTowardZero:function(t,r=0){return t<0?O(t,r):E(t,r)},gcd:function t(r,e){return 0===e?Math.abs(r):t(e,r%e)},fib:S,fib2:j,fibArray:function(t){return Array(t).fill(0).map((()=>S(--t))).reverse()},fib2Array:function(t){return Array(t).fill(0).map((()=>j(--t))).reverse()},tryParseInt:function(t,r=0){const e=parseInt(t);return Number.isNaN(e)?r:e},tryParseFloat:function(t,r=0){const e=parseFloat(t);return Number.isNaN(e)?r:e}});var z=Object.freeze({__proto__:null,uid:L,uuid:$,suid:function(){return Symbol(L())},suuid:function(){return Symbol($())}});Object.freeze({__proto__:null,pattern:t=>t.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\"),escape:t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-+]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/_:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?_]+=[^=?_]*(&[^=?_]+=[^=?_]*)*(_.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i}),z.uid(),w.today.nextYear.toDate();const M=t=>new window.FormData(t),k=t=>{const r={};try{M(t).forEach(((t,e)=>{const n=r[e];d.isArray(n)?r[e].push(t):d.exists(n)?r[e]=[r[e],t]:r[e]=t}))}catch(e){[...t.elements].forEach((t=>{const{name:e,type:n,value:i,files:o}=t;if("file"===n)r[e]=o[0];else if("checkbox"===n||"radio"===n)t.checked&&(r[e]=i);else if(t.multiple){const n=[];t.querySelectorAll("option").forEach((t=>t.selected&&n.push(t.value))),r[e]=n.length<2?n[0]:n}else r[e]=i}))}return r};var D=k,P=M;exports.wireForm=function(r,n){if(r&&!r.__ku4wired__)try{var o=r.submit;r.submit=e(t().mark((function e(){var s,a,u;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s=D(r),a=P(r),t.next=4,n(s,a,r);case 4:u=t.sent,i.isFalse(u)||o.call(r);case 6:case"end":return t.stop()}}),e)}))),r.__ku4wired__=!0}catch(t){throw new Error("wireForm Error. See https://kodmunki.com/storybook/?path=/docs/form-ku4-form--basic for more information.")}};
package/angular/index.mjs CHANGED
@@ -1 +1 @@
1
- class t{static isNull(t){return null===t}static isEmpty(r){return t.isString(r)&&""===r||t.isArray(r)&&r.length<1||t.isObjectLiteral(r)&&Object.keys(r).length<1}static isUndefined(t){return void 0===t}static isZero(t){return 0===t}static exists(r){return!(t.isUndefined(r)||t.isNull(r))}static isNullOrEmpty(r){return!t.exists(r)||t.isEmpty(r)}static isArray(t){return Array.isArray(t)}static isBool(t){return"boolean"==typeof t}static isTrue(r){return t.isBool(r)&&!0===r}static isFalse(r){return t.isBool(r)&&!1===r}static isDate(t){return t instanceof Date}static isNumber(t){return("number"==typeof t||t instanceof Number)&&!isNaN(t)}static isEven(t){return this.isNumber(t)&&!this.isZero(t)&&t%2==0}static isOdd(t){return this.isNumber(t)&&!this.isZero(t)&&!this.isEven(t)}static isString(t){return"string"==typeof t||t instanceof String}static isFunction(t){return t instanceof Function}static isAsyncFunction(r){try{return"AsyncFunction"===Object.getPrototypeOf(r).constructor.name||t.isFunction(r)&&/^async/.test(r.toString())||t.isFunction(r().then)}catch(t){return!1}}static isPromise(t){return t instanceof Promise}static isObject(r){return t.exists(r)&&"object"==typeof r&&!(t.isBool(r)||t.isNumber(r)||t.isDate(r)||t.isArray(r)||t.isString(r)||t.isFunction(r))}static isObjectLiteral(r){return t.isObject(r)&&r.constructor==={}.constructor}static isTruthy(r){return!t.isFalsy(r)}static isFalsy(r){return t.isZero(r)||t.isFalse(r)||t.isNullOrEmpty(r)||isNaN(r)}}function r(r){return t.exists(r)&&t.isFunction(r.replace)?r.replace(/^[\s\n]*/,""):r}function e(r){return t.exists(r)&&t.isFunction(r.replace)?r.replace(/[\s\n]*$/,""):r}function n(t,r=0){const e=Math.pow(10,-r);return Math.round(parseFloat((t*e).toFixed(Math.abs(r))))/e}function i(t,r=0){return n(t+5*Math.pow(10,r-1),r)}function s(t,r=0){return 0===t?0:n(t-5*Math.pow(10,r-1),r)}function a(t){const r=(t,e=0,n=1)=>0<t?r(--t,n,e+n):e;return r(t)}function u(t){let r=0,e=1,n=0;for(;t>1;)n=r,r=e,e+=n,t--;return t<1?r:e}function o(t){const r=isNaN(parseInt(t))||t<0||t>24?24:t,e=Math.random().toString().substring(2),n=Math.random().toString().substring(2);return e.concat(n).substring(0,r)}function c(){return function t(r){return r?(r^16*Math.random()>>r/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}Object.freeze({__proto__:null,build:function(...t){return"".concat(...t)},chunk:function(r,e=0){if(!t.isString(r)||Number.isNaN(e)||e<0)return[];if(e<r.length){let t=0;const n=e||r.length,i=[];for(;t<r.length;)i.push(r.slice(t,t+n)),t+=n;return i}return[r]},format:function(t,...r){return r.reduce(((t,r,e)=>t.replace(new RegExp(`\\{${e}\\}`,"g"),r&&r.toString?r.toString():r)),t)},trim:function(t){return r(e(t))},trimStart:r,trimEnd:e,capitalize:function(t=""){return(t||"").charAt(0).toUpperCase()+(t||"").slice(1).toLowerCase()},mask:function(r,e,n="_"){const i=r.toString().split(""),s=new RegExp(n);return t.isFunction(e)?e(r):t.isString(e)&&e.split("").reduce(((t,n)=>i.length>0&&(s.test(n)||i[0]===n&&r.indexOf(i[0])===e.indexOf(n))?t+i.shift():t+n),"")},unmask:function(r,e,n="_"){const i=new RegExp(n);return t.isFunction(e)?e(r):t.isString(e)&&r.split("").reduce(((t,r,n)=>i.test(r)||!i.test(e.charAt(n))&&e.charAt(n)===r?t:t+r),"")}}),Object.freeze({__proto__:null,random:function(t=0,r=1){return Math.random()*(r-t)+t},round:n,roundUp:i,roundDown:s,roundTowardZero:function(t,r=0){return t<0?i(t,r):s(t,r)},gcd:function t(r,e){return 0===e?Math.abs(r):t(e,r%e)},fib:a,fib2:u,fibArray:function(t){return Array(t).fill(0).map((()=>a(--t))).reverse()},fib2Array:function(t){return Array(t).fill(0).map((()=>u(--t))).reverse()},tryParseInt:function(t,r=0){const e=parseInt(t);return Number.isNaN(e)?r:e},tryParseFloat:function(t,r=0){const e=parseFloat(t);return Number.isNaN(e)?r:e}}),Object.freeze({__proto__:null,uid:o,uuid:c,suid:function(){return Symbol(o())},suuid:function(){return Symbol(c())}}),Object.freeze({__proto__:null,pattern:t=>t.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\"),escape:t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-+]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/_:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?_]+=[^=?_]*(&[^=?_]+=[^=?_]*)*(_.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i});class l{static isNull(t){return null===t}static isEmpty(t){return l.isString(t)&&""===t||l.isArray(t)&&t.length<1||l.isObjectLiteral(t)&&Object.keys(t).length<1}static isUndefined(t){return void 0===t}static isZero(t){return 0===t}static exists(t){return!(l.isUndefined(t)||l.isNull(t))}static isNullOrEmpty(t){return!l.exists(t)||l.isEmpty(t)}static isArray(t){return Array.isArray(t)}static isBool(t){return"boolean"==typeof t}static isTrue(t){return l.isBool(t)&&!0===t}static isFalse(t){return l.isBool(t)&&!1===t}static isDate(t){return t instanceof Date}static isNumber(t){return("number"==typeof t||t instanceof Number)&&!isNaN(t)}static isEven(t){return this.isNumber(t)&&!this.isZero(t)&&t%2==0}static isOdd(t){return this.isNumber(t)&&!this.isZero(t)&&!this.isEven(t)}static isString(t){return"string"==typeof t||t instanceof String}static isFunction(t){return t instanceof Function}static isAsyncFunction(t){try{return"AsyncFunction"===Object.getPrototypeOf(t).constructor.name||l.isFunction(t)&&/^async/.test(t.toString())||l.isFunction(t().then)}catch(t){return!1}}static isPromise(t){return t instanceof Promise}static isObject(t){return l.exists(t)&&"object"==typeof t&&!(l.isBool(t)||l.isNumber(t)||l.isDate(t)||l.isArray(t)||l.isString(t)||l.isFunction(t))}static isObjectLiteral(t){return l.isObject(t)&&t.constructor==={}.constructor}static isTruthy(t){return!l.isFalsy(t)}static isFalsy(t){return l.isZero(t)||l.isFalse(t)||l.isNullOrEmpty(t)||isNaN(t)}}function h(...t){return"".concat(...t)}function f(t,...r){return r.reduce(((t,r,e)=>t.replace(new RegExp(`\\{${e}\\}`,"g"),r&&r.toString?r.toString():r)),t)}function p(t){return d(y(t))}function d(t){return l.exists(t)&&l.isFunction(t.replace)?t.replace(/^[\s\n]*/,""):t}function y(t){return l.exists(t)&&l.isFunction(t.replace)?t.replace(/[\s\n]*$/,""):t}function g(t,r){try{return t()}catch{return r}}let m;Object.freeze({__proto__:null,build:h,chunk:function(t,r=0){if(!l.isString(t)||Number.isNaN(r)||r<0)return[];if(r<t.length){let e=0;const n=r||t.length,i=[];for(;e<t.length;)i.push(t.slice(e,e+n)),e+=n;return i}return[t]},format:f,trim:p,trimStart:d,trimEnd:y,capitalize:function(t=""){return(t||"").charAt(0).toUpperCase()+(t||"").slice(1).toLowerCase()},mask:function(t,r,e="_"){const n=t.toString().split(""),i=new RegExp(e);return l.isFunction(r)?r(t):l.isString(r)&&r.split("").reduce(((e,s)=>n.length>0&&(i.test(s)||n[0]===s&&t.indexOf(n[0])===r.indexOf(s))?e+n.shift():e+s),"")},unmask:function(t,r,e="_"){const n=new RegExp(e);return l.isFunction(r)?r(t):l.isString(r)&&t.split("").reduce(((t,e,i)=>n.test(e)||!n.test(r.charAt(i))&&r.charAt(i)===e?t:t+e),"")}}),g.async=async(t,r)=>{try{return await t()}catch{return r}};class _{constructor(t,r,e){if(r<1||r>12)throw new Error("Invalid month at Assert.DayPoint");if(e<1||e>b(r,t))throw new Error("Invalid date at DayPoint");this._value=arguments.length>=3?new Date(t,r-1,e):new Date,this._day=this._value.getDay(),this._date=e,this._month=r,this._year=t}get value(){return this._value}get day(){return this._day}get date(){return this._date}get month(){return this._month}get year(){return this._year}get shortYear(){const t=this._year.toString();return parseInt(t.substr(t.length-2))}get isWeekday(){const t=this._day;return t>0&&t<6}get isWeekend(){return!this.isWeekday}get isLeapYear(){return N(this._year)}get nextDay(){return A(this,1,0,0)}get prevDay(){return A(this,-1,0,0)}get nextMonth(){return A(this,0,1,0)}get prevMonth(){return A(this,0,-1,0)}get nextYear(){return A(this,0,0,1)}get prevYear(){return A(this,0,0,-1)}get firstDayOfMonth(){return new _(this._year,this._month,1)}get lastDayOfMonth(){return new _(this._year,this._month,b(this._month,this._year))}add(t,r,e){function n(t,r,e){let n=t,i=r;for(;i--;)n=n[e];return n}const{abs:i}=Math,s=i(t),a=i(e),u=i(r),o=e<0?"prevDay":"nextDay",c=r<0?"prevMonth":"nextMonth";return n(n(n(this,s,t<0?"prevYear":"nextYear"),u,c),a,o)}isBefore(t){return!(this.isAfter(t)||this.equals(t))}isAfter(t){const r=this._year,e=t.year,n=this._month,i=t.month;return r>e||r===e&&n>i||r===e&&n===i&&this._date>t.date}equals(t){return this._year===t.year&&this._month===t.month&&this._date===t.date}toString(t="mm/dd/yyyy"){const r=/y{3,}/i.test(t)?this._year:this.shortYear,e=this._month,n=this._date,i=/m{2}/i.test(t)&&e<10?"0{1}":"{1}",s=/d{2}/i.test(t)&&n<10?"0{2}":"{2}";return f(t.replace(/y+/gi,"{0}").replace(/m+/gi,i).replace(/d+/gi,s),r,e,n)}toDate(){return this._value}toJson(){return this._value.toJSON()}static canParse(t){return l.isString(t)||l.isNumber(t)||l.isDate(t)?!isNaN(new Date(t).valueOf()):t instanceof _}static parse(t){if(t instanceof _)return t;let r=l.isString(t)?p(t).replace(/T\d{2}:\d{2}:\d{2}(.\d+)?Z/,""):t;if(/^\d{4}-\d{1,2}-\d{1,2}$/.test(r)){const t=r.split("-"),[e]=t;t.push(e),t.shift(),r=t.join("/")}const e=new Date(r);if(!l.exists(r)||Number.isNaN(e.valueOf()))throw new Error(f("Cannot parse value= {0}",r));return new _(e.getFullYear(),e.getMonth()+1,e.getDate())}static tryParse(t){return g((()=>_.parse(t)),null)}static assumeNow(t){m=_.parse(t)}static get today(){return m||_.parse(new Date)}}function b(t,r){return 2===t?N(r)?29:28:t<8&&l.isEven(t)||t>7&&l.isOdd(t)?30:31}function N(t){const r=t.toString().split(/\B/);return parseFloat(h(r[r.length-2],r[r.length-1]))%4==0}function A(t,r,e,n){const i=t.month,s=t.year,a=t.date,u=e,o=n;let c=a+r,l=i+u,h=s+o;if(a+r>b(i,s)&&(c=1,l=i+u+1),a+r<1){const r=t.prevMonth;c=b(r.month,r.year),l=i+u-1}return l>12&&(l=1,h=s+o+1),l<1&&(l=12,h=s+o-1),new _(h,l,c)}function w(t,r=0){const e=Math.pow(10,-r);return Math.round(parseFloat((t*e).toFixed(Math.abs(r))))/e}function F(t,r=0){return w(t+5*Math.pow(10,r-1),r)}function S(t,r=0){return 0===t?0:w(t-5*Math.pow(10,r-1),r)}function O(t){const r=(t,e=0,n=1)=>0<t?r(--t,n,e+n):e;return r(t)}function $(t){let r=0,e=1,n=0;for(;t>1;)n=r,r=e,e+=n,t--;return t<1?r:e}function v(t){const r=isNaN(parseInt(t))||t<0||t>24?24:t,e=Math.random().toString().substring(2),n=Math.random().toString().substring(2);return e.concat(n).substring(0,r)}function x(){return function t(r){return r?(r^16*Math.random()>>r/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}Object.freeze({__proto__:null,random:function(t=0,r=1){return Math.random()*(r-t)+t},round:w,roundUp:F,roundDown:S,roundTowardZero:function(t,r=0){return t<0?F(t,r):S(t,r)},gcd:function t(r,e){return 0===e?Math.abs(r):t(e,r%e)},fib:O,fib2:$,fibArray:function(t){return Array(t).fill(0).map((()=>O(--t))).reverse()},fib2Array:function(t){return Array(t).fill(0).map((()=>$(--t))).reverse()},tryParseInt:function(t,r=0){const e=parseInt(t);return Number.isNaN(e)?r:e},tryParseFloat:function(t,r=0){const e=parseFloat(t);return Number.isNaN(e)?r:e}});var z=Object.freeze({__proto__:null,uid:v,uuid:x,suid:function(){return Symbol(v())},suuid:function(){return Symbol(x())}});Object.freeze({__proto__:null,pattern:t=>t.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\"),escape:t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-+]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/_:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?_]+=[^=?_]*(&[^=?_]+=[^=?_]*)*(_.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i}),z.uid(),_.today.nextYear.toDate();const E=t=>new window.FormData(t),M=t=>{const r={};try{E(t).forEach(((t,e)=>{const n=r[e];l.isArray(n)?r[e].push(t):l.exists(n)?r[e]=[r[e],t]:r[e]=t}))}catch(e){[...t.elements].forEach((t=>{const{name:e,type:n,value:i,files:s}=t;if("file"===n)r[e]=s[0];else if("checkbox"===n||"radio"===n)t.checked&&(r[e]=i);else if(t.multiple){const n=[];t.querySelectorAll("option").forEach((t=>t.selected&&n.push(t.value))),r[e]=n.length<2?n[0]:n}else r[e]=i}))}return r};var D=M,j=E;const k=(r,e)=>{if(r&&!r.__ku4wired__)try{const n=r.submit;r.submit=async()=>{const i=D(r),s=j(r),a=await e(i,s,r);t.isFalse(a)||n.call(r)},r.__ku4wired__=!0}catch(t){throw new Error("wireForm Error. See https://kodmunki.com/storybook/?path=/docs/form-ku4-form--basic for more information.")}};export{k as wireForm};
1
+ let t,r=class{static isNull(t){return null===t}static isEmpty(t){return r.isString(t)&&""===t||r.isArray(t)&&t.length<1||r.isObjectLiteral(t)&&Object.keys(t).length<1}static isUndefined(t){return void 0===t}static isZero(t){return 0===t}static exists(t){return!(r.isUndefined(t)||r.isNull(t))}static isNullOrEmpty(t){return!r.exists(t)||r.isEmpty(t)}static isArray(t){return Array.isArray(t)}static isBool(t){return"boolean"==typeof t}static isTrue(t){return r.isBool(t)&&!0===t}static isFalse(t){return r.isBool(t)&&!1===t}static isDate(t){return t instanceof Date}static isNumber(t){return("number"==typeof t||t instanceof Number)&&!isNaN(t)}static isEven(t){return this.isNumber(t)&&!this.isZero(t)&&t%2==0}static isOdd(t){return this.isNumber(t)&&!this.isZero(t)&&!this.isEven(t)}static isString(t){return"string"==typeof t||t instanceof String}static isFunction(t){return t instanceof Function}static isAsyncFunction(t){try{return"AsyncFunction"===Object.getPrototypeOf(t).constructor.name||r.isFunction(t)&&/^async/.test(t.toString())||r.isFunction(t().then)}catch(t){return!1}}static isPromise(t){return t instanceof Promise}static isObject(t){return r.exists(t)&&"object"==typeof t&&!(r.isBool(t)||r.isNumber(t)||r.isDate(t)||r.isArray(t)||r.isString(t)||r.isFunction(t))}static isObjectLiteral(t){return r.isObject(t)&&t.constructor==={}.constructor}static isTruthy(t){return!r.isFalsy(t)}static isFalsy(t){return r.isZero(t)||r.isFalse(t)||r.isNullOrEmpty(t)||isNaN(t)}};function e(t){return r.exists(t)&&r.isFunction(t.replace)?t.replace(/^[\s\n]*/,""):t}function n(t){return r.exists(t)&&r.isFunction(t.replace)?t.replace(/[\s\n]*$/,""):t}function i(t,r=0){const e=Math.pow(10,-r);return Math.round(parseFloat((t*e).toFixed(Math.abs(r))))/e}function s(t,r=0){return i(t+5*Math.pow(10,r-1),r)}function a(t,r=0){return 0===t?0:i(t-5*Math.pow(10,r-1),r)}function u(t){const r=(t,e=0,n=1)=>0<t?r(--t,n,e+n):e;return r(t)}function o(t){let r=0,e=1,n=0;for(;t>1;)n=r,r=e,e+=n,t--;return t<1?r:e}function c(t){const r=isNaN(parseInt(t))||t<0||t>24?24:t,e=Math.random().toString().substring(2),n=Math.random().toString().substring(2);return e.concat(n).substring(0,r)}function l(){return function t(r){return r?(r^16*Math.random()>>r/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}Object.freeze({__proto__:null,build:function(...t){return"".concat(...t)},chunk:function(t,e=0){if(!r.isString(t)||Number.isNaN(e)||e<0)return[];if(e<t.length){let r=0;const n=e||t.length,i=[];for(;r<t.length;)i.push(t.slice(r,r+n)),r+=n;return i}return[t]},format:function(t,...r){return r.reduce(((t,r,e)=>t.replace(new RegExp(`\\{${e}\\}`,"g"),r&&r.toString?r.toString():r)),t)},trim:function(t){return e(n(t))},trimStart:e,trimEnd:n,capitalize:function(t=""){return(t||"").charAt(0).toUpperCase()+(t||"").slice(1).toLowerCase()},mask:function(t,e,n="_"){const i=t.toString().split(""),s=new RegExp(n);return r.isFunction(e)?e(t):r.isString(e)&&e.split("").reduce(((r,n)=>i.length>0&&(s.test(n)||i[0]===n&&t.indexOf(i[0])===e.indexOf(n))?r+i.shift():r+n),"")},unmask:function(t,e,n="_"){const i=new RegExp(n);return r.isFunction(e)?e(t):r.isString(e)&&t.split("").reduce(((t,r,n)=>i.test(r)||!i.test(e.charAt(n))&&e.charAt(n)===r?t:t+r),"")}}),Object.freeze({__proto__:null,random:function(t=0,r=1){return Math.random()*(r-t)+t},round:i,roundUp:s,roundDown:a,roundTowardZero:function(t,r=0){return t<0?s(t,r):a(t,r)},gcd:function t(r,e){return 0===e?Math.abs(r):t(e,r%e)},fib:u,fib2:o,fibArray:function(t){return Array(t).fill(0).map((()=>u(--t))).reverse()},fib2Array:function(t){return Array(t).fill(0).map((()=>o(--t))).reverse()},tryParseInt:function(t,r=0){const e=parseInt(t);return Number.isNaN(e)?r:e},tryParseFloat:function(t,r=0){const e=parseFloat(t);return Number.isNaN(e)?r:e}}),Object.freeze({__proto__:null,uid:c,uuid:l,suid:function(){return Symbol(c())},suuid:function(){return Symbol(l())}}),Object.freeze({__proto__:null,pattern:t=>t.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\"),escape:t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-+]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/_:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?_]+=[^=?_]*(&[^=?_]+=[^=?_]*)*(_.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i});class h{static isNull(t){return null===t}static isEmpty(t){return h.isString(t)&&""===t||h.isArray(t)&&t.length<1||h.isObjectLiteral(t)&&Object.keys(t).length<1}static isUndefined(t){return void 0===t}static isZero(t){return 0===t}static exists(t){return!(h.isUndefined(t)||h.isNull(t))}static isNullOrEmpty(t){return!h.exists(t)||h.isEmpty(t)}static isArray(t){return Array.isArray(t)}static isBool(t){return"boolean"==typeof t}static isTrue(t){return h.isBool(t)&&!0===t}static isFalse(t){return h.isBool(t)&&!1===t}static isDate(t){return t instanceof Date}static isNumber(t){return("number"==typeof t||t instanceof Number)&&!isNaN(t)}static isEven(t){return this.isNumber(t)&&!this.isZero(t)&&t%2==0}static isOdd(t){return this.isNumber(t)&&!this.isZero(t)&&!this.isEven(t)}static isString(t){return"string"==typeof t||t instanceof String}static isFunction(t){return t instanceof Function}static isAsyncFunction(t){try{return"AsyncFunction"===Object.getPrototypeOf(t).constructor.name||h.isFunction(t)&&/^async/.test(t.toString())||h.isFunction(t().then)}catch(t){return!1}}static isPromise(t){return t instanceof Promise}static isObject(t){return h.exists(t)&&"object"==typeof t&&!(h.isBool(t)||h.isNumber(t)||h.isDate(t)||h.isArray(t)||h.isString(t)||h.isFunction(t))}static isObjectLiteral(t){return h.isObject(t)&&t.constructor==={}.constructor}static isTruthy(t){return!h.isFalsy(t)}static isFalsy(t){return h.isZero(t)||h.isFalse(t)||h.isNullOrEmpty(t)||isNaN(t)}}function f(...t){return"".concat(...t)}function p(t,...r){return r.reduce(((t,r,e)=>t.replace(new RegExp(`\\{${e}\\}`,"g"),r&&r.toString?r.toString():r)),t)}function d(t){return y(g(t))}function y(t){return h.exists(t)&&h.isFunction(t.replace)?t.replace(/^[\s\n]*/,""):t}function g(t){return h.exists(t)&&h.isFunction(t.replace)?t.replace(/[\s\n]*$/,""):t}function m(t,r){try{return t()}catch{return r}}Object.freeze({__proto__:null,build:f,chunk:function(t,r=0){if(!h.isString(t)||Number.isNaN(r)||r<0)return[];if(r<t.length){let e=0;const n=r||t.length,i=[];for(;e<t.length;)i.push(t.slice(e,e+n)),e+=n;return i}return[t]},format:p,trim:d,trimStart:y,trimEnd:g,capitalize:function(t=""){return(t||"").charAt(0).toUpperCase()+(t||"").slice(1).toLowerCase()},mask:function(t,r,e="_"){const n=t.toString().split(""),i=new RegExp(e);return h.isFunction(r)?r(t):h.isString(r)&&r.split("").reduce(((e,s)=>n.length>0&&(i.test(s)||n[0]===s&&t.indexOf(n[0])===r.indexOf(s))?e+n.shift():e+s),"")},unmask:function(t,r,e="_"){const n=new RegExp(e);return h.isFunction(r)?r(t):h.isString(r)&&t.split("").reduce(((t,e,i)=>n.test(e)||!n.test(r.charAt(i))&&r.charAt(i)===e?t:t+e),"")}}),m.async=async(t,r)=>{try{return await t()}catch{return r}};class _{constructor(t,r,e){if(r<1||r>12)throw new Error("Invalid month at Assert.DayPoint");if(e<1||e>b(r,t))throw new Error("Invalid date at DayPoint");this._value=arguments.length>=3?new Date(t,r-1,e):new Date,this._day=this._value.getDay(),this._date=e,this._month=r,this._year=t}get value(){return this._value}get day(){return this._day}get date(){return this._date}get month(){return this._month}get year(){return this._year}get shortYear(){const t=this._year.toString();return parseInt(t.substr(t.length-2))}get isWeekday(){const t=this._day;return t>0&&t<6}get isWeekend(){return!this.isWeekday}get isLeapYear(){return N(this._year)}get nextDay(){return A(this,1,0,0)}get prevDay(){return A(this,-1,0,0)}get nextMonth(){return A(this,0,1,0)}get prevMonth(){return A(this,0,-1,0)}get nextYear(){return A(this,0,0,1)}get prevYear(){return A(this,0,0,-1)}get firstDayOfMonth(){return new _(this._year,this._month,1)}get lastDayOfMonth(){return new _(this._year,this._month,b(this._month,this._year))}add(t,r,e){function n(t,r,e){let n=t,i=r;for(;i--;)n=n[e];return n}const{abs:i}=Math,s=i(t),a=i(e),u=i(r),o=e<0?"prevDay":"nextDay",c=r<0?"prevMonth":"nextMonth";return n(n(n(this,s,t<0?"prevYear":"nextYear"),u,c),a,o)}isBefore(t){return!(this.isAfter(t)||this.equals(t))}isAfter(t){const r=this._year,e=t.year,n=this._month,i=t.month;return r>e||r===e&&n>i||r===e&&n===i&&this._date>t.date}equals(t){return this._year===t.year&&this._month===t.month&&this._date===t.date}toString(t="mm/dd/yyyy"){const r=/y{3,}/i.test(t)?this._year:this.shortYear,e=this._month,n=this._date,i=/m{2}/i.test(t)&&e<10?"0{1}":"{1}",s=/d{2}/i.test(t)&&n<10?"0{2}":"{2}";return p(t.replace(/y+/gi,"{0}").replace(/m+/gi,i).replace(/d+/gi,s),r,e,n)}toDate(){return this._value}toJson(){return this._value.toJSON()}static canParse(t){return h.isString(t)||h.isNumber(t)||h.isDate(t)?!isNaN(new Date(t).valueOf()):t instanceof _}static parse(t){if(t instanceof _)return t;let r=h.isString(t)?d(t).replace(/T\d{2}:\d{2}:\d{2}(.\d+)?Z/,""):t;if(/^\d{4}-\d{1,2}-\d{1,2}$/.test(r)){const t=r.split("-"),[e]=t;t.push(e),t.shift(),r=t.join("/")}const e=new Date(r);if(!h.exists(r)||Number.isNaN(e.valueOf()))throw new Error(p("Cannot parse value= {0}",r));return new _(e.getFullYear(),e.getMonth()+1,e.getDate())}static tryParse(t){return m((()=>_.parse(t)),null)}static assumeNow(r){t=_.parse(r)}static get today(){return t||_.parse(new Date)}}function b(t,r){return 2===t?N(r)?29:28:t<8&&h.isEven(t)||t>7&&h.isOdd(t)?30:31}function N(t){const r=t.toString().split(/\B/);return parseFloat(f(r[r.length-2],r[r.length-1]))%4==0}function A(t,r,e,n){const i=t.month,s=t.year,a=t.date,u=e,o=n;let c=a+r,l=i+u,h=s+o;if(a+r>b(i,s)&&(c=1,l=i+u+1),a+r<1){const r=t.prevMonth;c=b(r.month,r.year),l=i+u-1}return l>12&&(l=1,h=s+o+1),l<1&&(l=12,h=s+o-1),new _(h,l,c)}function w(t,r=0){const e=Math.pow(10,-r);return Math.round(parseFloat((t*e).toFixed(Math.abs(r))))/e}function F(t,r=0){return w(t+5*Math.pow(10,r-1),r)}function S(t,r=0){return 0===t?0:w(t-5*Math.pow(10,r-1),r)}function O(t){const r=(t,e=0,n=1)=>0<t?r(--t,n,e+n):e;return r(t)}function $(t){let r=0,e=1,n=0;for(;t>1;)n=r,r=e,e+=n,t--;return t<1?r:e}function v(t){const r=isNaN(parseInt(t))||t<0||t>24?24:t,e=Math.random().toString().substring(2),n=Math.random().toString().substring(2);return e.concat(n).substring(0,r)}function x(){return function t(r){return r?(r^16*Math.random()>>r/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}Object.freeze({__proto__:null,random:function(t=0,r=1){return Math.random()*(r-t)+t},round:w,roundUp:F,roundDown:S,roundTowardZero:function(t,r=0){return t<0?F(t,r):S(t,r)},gcd:function t(r,e){return 0===e?Math.abs(r):t(e,r%e)},fib:O,fib2:$,fibArray:function(t){return Array(t).fill(0).map((()=>O(--t))).reverse()},fib2Array:function(t){return Array(t).fill(0).map((()=>$(--t))).reverse()},tryParseInt:function(t,r=0){const e=parseInt(t);return Number.isNaN(e)?r:e},tryParseFloat:function(t,r=0){const e=parseFloat(t);return Number.isNaN(e)?r:e}});var z=Object.freeze({__proto__:null,uid:v,uuid:x,suid:function(){return Symbol(v())},suuid:function(){return Symbol(x())}});Object.freeze({__proto__:null,pattern:t=>t.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\"),escape:t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-+]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/_:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?_]+=[^=?_]*(&[^=?_]+=[^=?_]*)*(_.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i}),z.uid(),_.today.nextYear.toDate();const E=t=>new window.FormData(t),M=t=>{const r={};try{E(t).forEach(((t,e)=>{const n=r[e];h.isArray(n)?r[e].push(t):h.exists(n)?r[e]=[r[e],t]:r[e]=t}))}catch(e){[...t.elements].forEach((t=>{const{name:e,type:n,value:i,files:s}=t;if("file"===n)r[e]=s[0];else if("checkbox"===n||"radio"===n)t.checked&&(r[e]=i);else if(t.multiple){const n=[];t.querySelectorAll("option").forEach((t=>t.selected&&n.push(t.value))),r[e]=n.length<2?n[0]:n}else r[e]=i}))}return r};var D=M,j=E;const k=(t,e)=>{if(t&&!t.__ku4wired__)try{const n=t.submit;t.submit=async()=>{const i=D(t),s=j(t),a=await e(i,s,t);r.isFalse(a)||n.call(t)},t.__ku4wired__=!0}catch(t){throw new Error("wireForm Error. See https://kodmunki.com/storybook/?path=/docs/form-ku4-form--basic for more information.")}};export{k as wireForm};