ku4web-components 6.7.0 → 6.7.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. package/dist/cjs/{index-1a439af7.js → index-2d850c25.js} +1 -0
  2. package/dist/cjs/{index-17a9a722.js → index-4ca7863f.js} +1 -1
  3. package/dist/cjs/ku4-carousel-controls.cjs.entry.js +2 -2
  4. package/dist/cjs/ku4-carousel-slide.cjs.entry.js +1 -1
  5. package/dist/cjs/ku4-carousel.cjs.entry.js +2 -2
  6. package/dist/cjs/ku4-col.cjs.entry.js +1 -1
  7. package/dist/cjs/ku4-drawer.cjs.entry.js +1 -1
  8. package/dist/cjs/ku4-feature.cjs.entry.js +2 -2
  9. package/dist/cjs/ku4-focus-trap.cjs.entry.js +2 -2
  10. package/dist/cjs/ku4-form.cjs.entry.js +14 -4
  11. package/dist/cjs/ku4-grid.cjs.entry.js +1 -1
  12. package/dist/cjs/ku4-label.cjs.entry.js +2 -2
  13. package/dist/cjs/ku4-mask.cjs.entry.js +2 -2
  14. package/dist/cjs/ku4-modal.cjs.entry.js +2 -2
  15. package/dist/cjs/ku4-panel.cjs.entry.js +1 -1
  16. package/dist/cjs/ku4-preview.cjs.entry.js +2 -2
  17. package/dist/cjs/ku4-tab-list.cjs.entry.js +3 -3
  18. package/dist/cjs/ku4-tab-panel.cjs.entry.js +3 -3
  19. package/dist/cjs/ku4-tab.cjs.entry.js +3 -3
  20. package/dist/cjs/ku4-table.cjs.entry.js +1 -1
  21. package/dist/cjs/ku4-tooltip.cjs.entry.js +2 -2
  22. package/dist/cjs/ku4-validation.cjs.entry.js +80 -38
  23. package/dist/cjs/ku4web-components.cjs.js +2 -2
  24. package/dist/cjs/loader.cjs.js +2 -2
  25. package/dist/cjs/{shadow-css-d26f27a8.js → shadow-css-8ae6d6e1.js} +1 -1
  26. package/dist/cjs/{uid-7f3954c8.js → uid-04ee16aa.js} +1 -1
  27. package/dist/esm/{index-765794a2.js → index-21724a14.js} +1 -1
  28. package/dist/esm/{index-77bdf1f1.js → index-4dba724d.js} +1 -1
  29. package/dist/esm/ku4-carousel-controls.entry.js +2 -2
  30. package/dist/esm/ku4-carousel-slide.entry.js +1 -1
  31. package/dist/esm/ku4-carousel.entry.js +2 -2
  32. package/dist/esm/ku4-col.entry.js +1 -1
  33. package/dist/esm/ku4-drawer.entry.js +1 -1
  34. package/dist/esm/ku4-feature.entry.js +2 -2
  35. package/dist/esm/ku4-focus-trap.entry.js +2 -2
  36. package/dist/esm/ku4-form.entry.js +14 -4
  37. package/dist/esm/ku4-grid.entry.js +1 -1
  38. package/dist/esm/ku4-label.entry.js +2 -2
  39. package/dist/esm/ku4-mask.entry.js +2 -2
  40. package/dist/esm/ku4-modal.entry.js +2 -2
  41. package/dist/esm/ku4-panel.entry.js +1 -1
  42. package/dist/esm/ku4-preview.entry.js +2 -2
  43. package/dist/esm/ku4-tab-list.entry.js +3 -3
  44. package/dist/esm/ku4-tab-panel.entry.js +3 -3
  45. package/dist/esm/ku4-tab.entry.js +3 -3
  46. package/dist/esm/ku4-table.entry.js +1 -1
  47. package/dist/esm/ku4-tooltip.entry.js +2 -2
  48. package/dist/esm/ku4-validation.entry.js +81 -39
  49. package/dist/esm/ku4web-components.js +2 -2
  50. package/dist/esm/loader.js +2 -2
  51. package/dist/esm/{shadow-css-e4879d51.js → shadow-css-1257b266.js} +1 -1
  52. package/dist/esm/{uid-d593801c.js → uid-7b4b0e6e.js} +1 -1
  53. package/dist/esm-es5/{index-765794a2.js → index-21724a14.js} +1 -1
  54. package/dist/esm-es5/{index-77bdf1f1.js → index-4dba724d.js} +1 -1
  55. package/dist/esm-es5/ku4-carousel-controls.entry.js +1 -1
  56. package/dist/esm-es5/ku4-carousel-slide.entry.js +1 -1
  57. package/dist/esm-es5/ku4-carousel.entry.js +1 -1
  58. package/dist/esm-es5/ku4-col.entry.js +1 -1
  59. package/dist/esm-es5/ku4-drawer.entry.js +1 -1
  60. package/dist/esm-es5/ku4-feature.entry.js +1 -1
  61. package/dist/esm-es5/ku4-focus-trap.entry.js +1 -1
  62. package/dist/esm-es5/ku4-form.entry.js +1 -1
  63. package/dist/esm-es5/ku4-grid.entry.js +1 -1
  64. package/dist/esm-es5/ku4-label.entry.js +1 -1
  65. package/dist/esm-es5/ku4-mask.entry.js +1 -1
  66. package/dist/esm-es5/ku4-modal.entry.js +1 -1
  67. package/dist/esm-es5/ku4-panel.entry.js +1 -1
  68. package/dist/esm-es5/ku4-preview.entry.js +1 -1
  69. package/dist/esm-es5/ku4-tab-list.entry.js +1 -1
  70. package/dist/esm-es5/ku4-tab-panel.entry.js +1 -1
  71. package/dist/esm-es5/ku4-tab.entry.js +1 -1
  72. package/dist/esm-es5/ku4-table.entry.js +1 -1
  73. package/dist/esm-es5/ku4-tooltip.entry.js +1 -1
  74. package/dist/esm-es5/ku4-validation.entry.js +1 -1
  75. package/dist/esm-es5/ku4web-components.js +1 -1
  76. package/dist/esm-es5/loader.js +1 -1
  77. package/dist/esm-es5/{shadow-css-e4879d51.js → shadow-css-1257b266.js} +0 -0
  78. package/dist/esm-es5/uid-7b4b0e6e.js +1 -0
  79. package/dist/ku4web-components/ku4web-components.esm.js +1 -1
  80. package/dist/ku4web-components/ku4web-components.js +1 -1
  81. package/dist/ku4web-components/{p-e0f035a4.entry.js → p-0669a534.entry.js} +1 -1
  82. package/dist/ku4web-components/{p-934f94af.js → p-0943c493.js} +1 -1
  83. package/dist/ku4web-components/{p-5a54ccf4.js → p-0af98743.js} +1 -1
  84. package/dist/ku4web-components/{p-fc9d0277.system.entry.js → p-220c33c5.system.entry.js} +1 -1
  85. package/dist/ku4web-components/{p-bdf70b2e.system.entry.js → p-22afbc6b.system.entry.js} +1 -1
  86. package/dist/ku4web-components/{p-77b1edbc.system.entry.js → p-2da96838.system.entry.js} +1 -1
  87. package/dist/ku4web-components/{p-7c000b31.system.entry.js → p-2df06b36.system.entry.js} +1 -1
  88. package/dist/ku4web-components/{p-18bb7b9b.entry.js → p-2f4a16d7.entry.js} +1 -1
  89. package/dist/ku4web-components/{p-66e49732.entry.js → p-332a5a54.entry.js} +1 -1
  90. package/dist/ku4web-components/{p-ef22004b.system.entry.js → p-36e2caf6.system.entry.js} +1 -1
  91. package/dist/ku4web-components/{p-0b2a3cfa.entry.js → p-3742c929.entry.js} +1 -1
  92. package/dist/ku4web-components/{p-142b7dce.entry.js → p-3d59749e.entry.js} +1 -1
  93. package/dist/ku4web-components/{p-fded7eeb.system.entry.js → p-4243b0a9.system.entry.js} +1 -1
  94. package/dist/ku4web-components/p-43d724df.system.entry.js +1 -0
  95. package/dist/ku4web-components/{p-ddb63577.entry.js → p-5119224c.entry.js} +1 -1
  96. package/dist/ku4web-components/{p-d12104ec.system.js → p-55f5c91c.system.js} +1 -1
  97. package/dist/ku4web-components/{p-49b9e642.entry.js → p-56f61856.entry.js} +1 -1
  98. package/dist/ku4web-components/{p-8474fb5c.entry.js → p-5acd5997.entry.js} +1 -1
  99. package/dist/ku4web-components/{p-05a99806.system.entry.js → p-6715c004.system.entry.js} +1 -1
  100. package/dist/ku4web-components/p-6981c0c5.system.js +1 -0
  101. package/dist/ku4web-components/{p-caf84e52.system.entry.js → p-6c7c6b42.system.entry.js} +1 -1
  102. package/dist/ku4web-components/{p-9098ae6e.entry.js → p-6f6a8c8d.entry.js} +1 -1
  103. package/dist/ku4web-components/{p-ae65e754.system.entry.js → p-6fc54c2b.system.entry.js} +1 -1
  104. package/dist/ku4web-components/{p-1357338f.system.entry.js → p-746378d8.system.entry.js} +1 -1
  105. package/dist/ku4web-components/{p-2b88cb44.system.entry.js → p-74ef5565.system.entry.js} +1 -1
  106. package/dist/ku4web-components/{p-f2ac3124.entry.js → p-7875dc99.entry.js} +1 -1
  107. package/dist/ku4web-components/{p-9be0de59.system.entry.js → p-90553d69.system.entry.js} +1 -1
  108. package/dist/ku4web-components/p-9260407c.entry.js +1 -0
  109. package/dist/ku4web-components/{p-f9b280d3.system.entry.js → p-9404f926.system.entry.js} +1 -1
  110. package/dist/ku4web-components/{p-ffe26c05.system.entry.js → p-96c08f79.system.entry.js} +1 -1
  111. package/dist/ku4web-components/{p-5dc43516.entry.js → p-996461ba.entry.js} +1 -1
  112. package/dist/ku4web-components/{p-567889f3.entry.js → p-9d027a50.entry.js} +1 -1
  113. package/dist/ku4web-components/{p-fbbfd0e9.entry.js → p-a4cd5761.entry.js} +1 -1
  114. package/dist/ku4web-components/{p-ac260744.system.entry.js → p-b2af9e06.system.entry.js} +1 -1
  115. package/dist/ku4web-components/{p-158d613d.system.js → p-b3ad84eb.system.js} +1 -1
  116. package/dist/ku4web-components/{p-d7103e97.entry.js → p-bb380a04.entry.js} +1 -1
  117. package/dist/ku4web-components/{p-534f855b.system.entry.js → p-be3b5409.system.entry.js} +1 -1
  118. package/dist/ku4web-components/{p-567c14ea.entry.js → p-c305fd7d.entry.js} +1 -1
  119. package/dist/ku4web-components/{p-82c0ff4b.entry.js → p-d1b4d5dc.entry.js} +1 -1
  120. package/dist/ku4web-components/p-d44118ae.js +1 -0
  121. package/dist/ku4web-components/{p-ec5d86de.system.entry.js → p-d56159f9.system.entry.js} +1 -1
  122. package/dist/ku4web-components/{p-0f4f858e.entry.js → p-d9a5870c.entry.js} +1 -1
  123. package/dist/ku4web-components/p-e11b977e.system.js +1 -0
  124. package/dist/ku4web-components/p-e2659cc2.system.entry.js +1 -0
  125. package/dist/ku4web-components/{p-622fa398.system.js → p-e77aa4b5.system.js} +0 -0
  126. package/dist/ku4web-components/{p-0cba397e.system.entry.js → p-ee51fe4d.system.entry.js} +1 -1
  127. package/dist/ku4web-components/p-f23287da.entry.js +1 -0
  128. package/dist/ku4web-components/{p-b73da6fd.entry.js → p-f33f1619.entry.js} +1 -1
  129. package/dist/ku4web-components/{p-e9f93813.js → p-f6330722.js} +0 -0
  130. package/dist/types/components/ku4-validation/ku4-validation.d.ts +14 -6
  131. package/dist/types/components.d.ts +4 -4
  132. package/package.json +11 -11
  133. package/dist/esm-es5/uid-d593801c.js +0 -1
  134. package/dist/ku4web-components/p-14752b72.system.js +0 -1
  135. package/dist/ku4web-components/p-563d1517.system.js +0 -1
  136. package/dist/ku4web-components/p-8319ab00.entry.js +0 -1
  137. package/dist/ku4web-components/p-a110d244.js +0 -1
  138. package/dist/ku4web-components/p-b1ca85ef.system.entry.js +0 -1
  139. package/dist/ku4web-components/p-c1f37401.entry.js +0 -1
  140. package/dist/ku4web-components/p-e468ba85.system.entry.js +0 -1
@@ -1 +0,0 @@
1
- var __extends=this&&this.__extends||function(){var t=function(e,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n))t[n]=e[n]};return t(e,n)};return function(e,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var __awaiter=this&&this.__awaiter||function(t,e,n,r){function i(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,o){function u(t){try{a(r.next(t))}catch(e){o(e)}}function s(t){try{a(r["throw"](t))}catch(e){o(e)}}function a(t){t.done?n(t.value):i(t.value).then(u,s)}a((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,u;return u={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(t){return function(e){return a([t,e])}}function a(u){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(o=u[0]&2?i["return"]:u[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;if(i=0,o)u=[u[0]&2,o.value];switch(u[0]){case 0:case 1:o=u;break;case 4:n.label++;return{value:u[1],done:false};case 5:n.label++;i=u[1];u=[0];continue;case 7:u=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1];o=u;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(u);break}if(o[2])n.ops.pop();n.trys.pop();continue}u=e.call(t,n)}catch(s){u=[6,s];i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};System.register([],(function(t){"use strict";return{execute:function(){var e=this;var n=function(){function t(){}t.isNull=function(t){return null===t};t.isEmpty=function(e){return t.isString(e)&&""===e||t.isArray(e)&&e.length<1||t.isObjectLiteral(e)&&Object.keys(e).length<1};t.isUndefined=function(t){return void 0===t};t.isZero=function(t){return 0===t};t.exists=function(e){return!(t.isUndefined(e)||t.isNull(e))};t.isNullOrEmpty=function(e){return!t.exists(e)||t.isEmpty(e)};t.isArray=function(t){return Array.isArray(t)};t.isBool=function(t){return"boolean"==typeof t};t.isTrue=function(e){return t.isBool(e)&&!0===e};t.isFalse=function(e){return t.isBool(e)&&!1===e};t.isDate=function(t){return t instanceof Date};t.isNumber=function(t){return("number"==typeof t||t instanceof Number)&&!isNaN(t)};t.isEven=function(t){return this.isNumber(t)&&!this.isZero(t)&&t%2==0};t.isOdd=function(t){return this.isNumber(t)&&!this.isZero(t)&&!this.isEven(t)};t.isString=function(t){return"string"==typeof t||t instanceof String};t.isFunction=function(t){return t instanceof Function};t.isAsyncFunction=function(e){try{return"AsyncFunction"===Object.getPrototypeOf(e).constructor.name||t.isFunction(e)&&/^async/.test(e.toString())||t.isFunction(e().then)}catch(t){return!1}};t.isPromise=function(t){return t instanceof Promise};t.isObject=function(e){return t.exists(e)&&"object"==typeof e&&!(t.isBool(e)||t.isNumber(e)||t.isDate(e)||t.isArray(e)||t.isString(e)||t.isFunction(e))};t.isObjectLiteral=function(e){return t.isObject(e)&&e.constructor==={}.constructor};t.isTruthy=function(e){return!t.isFalsy(e)};t.isFalsy=function(e){return t.isZero(e)||t.isFalse(e)||t.isNullOrEmpty(e)||isNaN(e)};return t}();t("t",n);function r(){var t=[];for(var e=0;e<arguments.length;e++){t[e]=arguments[e]}return"".concat.apply("",t)}function i(t){var e=[];for(var n=1;n<arguments.length;n++){e[n-1]=arguments[n]}return e.reduce((function(t,e,n){return t.replace(new RegExp("\\{".concat(n,"\\}"),"g"),e&&e.toString?e.toString():e)}),t)}function o(t){return u(s(t))}function u(t){return n.exists(t)&&n.isFunction(t.replace)?t.replace(/^[\s\n]*/,""):t}function s(t){return n.exists(t)&&n.isFunction(t.replace)?t.replace(/[\s\n]*$/,""):t}var a=t("a",Object.freeze({__proto__:null,build:r,chunk:function(t,e){if(e===void 0){e=0}if(!n.isString(t)||Number.isNaN(e)||e<0)return[];if(e<t.length){var r=0;var i=e||t.length,o=[];for(;r<t.length;)o.push(t.slice(r,r+i)),r+=i;return o}return[t]},format:i,trim:o,trimStart:u,trimEnd:s,capitalize:function(t){if(t===void 0){t=""}return(t||"").charAt(0).toUpperCase()+(t||"").slice(1).toLowerCase()},mask:function(t,e,r){if(r===void 0){r="_"}return n.isFunction(e)?e(t):n.isString(e)&&t.split("").reduce((function(t,e){return t.replace(new RegExp(r),e)}),e)},unmask:function(t,e,r){if(r===void 0){r="_"}var i=new RegExp(r);return n.isFunction(e)?e(t):n.isString(e)&&t.split("").reduce((function(t,n,r){return!i.test(n)&&i.test(e.charAt(r))?t+n:t}),"")}}));var c=t("o",(function(t){return t.reduce((function(t,e){return t.includes(e)||t.push(e),t}),[])}));var f=function(){function t(t){this._list=t,this._head=0}Object.defineProperty(t.prototype,"isEmpty",{get:function(){return this.length<1},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"index",{get:function(){return this._head},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"length",{get:function(){return this._list.length},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"current",{get:function(){return this._list[this._head]},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"next",{get:function(){var t=this.length;var e=this._head;return this._head=e++<t-1?e:0,this.current},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"prev",{get:function(){var t=this.length;var e=this._head;return this._head=--e<0?t-1:e,this.current},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"peekNext",{get:function(){var t=this.length,e=this._head;return this._list[e+1<t?e+1:0]},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"peekPrev",{get:function(){var t=this.length,e=this._head;return this._list[e-1<0?t-1:e-1]},enumerable:false,configurable:true});return t}();t("c",f);function l(t,e){try{return t()}catch(n){return e}}l.async=function(t,n){return __awaiter(e,void 0,void 0,(function(){var e;return __generator(this,(function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);return[4,t()];case 1:return[2,r.sent()];case 2:e=r.sent();return[2,n];case 3:return[2]}}))}))};function p(t,e){if(e===void 0){e=0}var n=Math.pow(10,-e);return Math.round(parseFloat((t*n).toFixed(Math.abs(e))))/n}function h(t,e){if(e===void 0){e=0}return p(t+5*Math.pow(10,e-1),e)}function y(t,e){if(e===void 0){e=0}if(0===t)return 0;return p(t-5*Math.pow(10,e-1),e)}function d(t,e){if(e===void 0){e=0}return t<0?h(t,e):y(t,e)}function b(t){var e=function(t,n,r){if(n===void 0){n=0}if(r===void 0){r=1}return 0<t?e(--t,r,n+r):n};return e(t)}function g(t){var e=0,n=1,r=0;for(;t>1;)r=e,e=n,n+=r,t--;return t<1?e:n}function v(t,e){if(e===void 0){e=0}var n=parseInt(t);return Number.isNaN(n)?e:n}Object.freeze({__proto__:null,random:function(t,e){if(t===void 0){t=0}if(e===void 0){e=1}return Math.random()*(e-t)+t},round:p,roundUp:h,roundDown:y,roundTowardZero:d,gcd:function t(e,n){return 0===n?Math.abs(e):t(n,e%n)},fib:b,fib2:g,fibArray:function(t){return Array(t).fill(0).map((function(){return b(--t)})).reverse()},fib2Array:function(t){return Array(t).fill(0).map((function(){return g(--t)})).reverse()},tryParseInt:v,tryParseFloat:function(t,e){if(e===void 0){e=0}var n=parseFloat(t);return Number.isNaN(n)?e:n}});var m=function(){function t(t,e){if(t===void 0){t=0}if(e===void 0){e=0}if(!n.isNumber(t)||!n.isNumber(e))throw new Error("Coord requires numeric x and y values");this._x=t,this._y=e}Object.defineProperty(t.prototype,"x",{get:function(){return this._x},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"y",{get:function(){return this._y},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"value",{get:function(){return{x:this.x,y:this.y}},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"half",{get:function(){return this.divide(new t(2,2))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"abs",{get:function(){return new t(Math.abs(this.x),Math.abs(this.y))},enumerable:false,configurable:true});t.prototype.equals=function(t){return this.x===t.x&&this.y===t.y};t.prototype.add=function(e){return new t(this.x+e.x,this.y+e.y)};t.prototype.subtract=function(e){return new t(this.x-e.x,this.y-e.y)};t.prototype.multiply=function(e){return new t(this.x*e.x,this.y*e.y)};t.prototype.divide=function(e){return new t(this.x/e.x,this.y/e.y)};t.prototype.round=function(e){if(e===void 0){e=0}return new t(p(this.x,e),p(this.y,e))};t.prototype.toString=function(){return"(".concat(this.x,",").concat(this.y,")")};t.canParse=function(e){return n.isArray(e)?!(Number.isNaN(e[0])||Number.isNaN(e[1])):n.isObjectLiteral(e)&&"x"in e&&"y"in e?!(Number.isNaN(e.x)||Number.isNaN(e.y)):e instanceof t};t.parse=function(e){return n.exists(e)?e instanceof t?e:n.isArray(e)?new t(e[0],e[1]):n.isObjectLiteral(e)&&n.exists(e.x)&&n.exists(e.y)?new t(e.x,e.y):null:null};t.tryParse=function(e){return l((function(){return t.parse(e)}),null)};return t}();var _=function(t){__extends(e,t);function e(e,n){if(e===void 0){e=0}if(n===void 0){n=0}var r=this;r=t.call(this,e,n)||this,r._lengthSquared=Math.pow(e,2)+Math.pow(n,2),r._magnitude=Math.sqrt(r._lengthSquared),r._unitNormalX=0===e&&0===n?0:e/r._magnitude,r._unitNormalY=0===e&&0===n?0:n/r._magnitude;return r}Object.defineProperty(e.prototype,"magnitude",{get:function(){return this._magnitude},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isZero",{get:function(){return 0===this.x&&0===this.y},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"normal",{get:function(){return new e(this._unitNormalX,this._unitNormalY)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"invert",{get:function(){return new e(-this.x,-this.y)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"norm",{get:function(){return new e(Math.abs(this.x),Math.abs(this.y))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"perpendicular",{get:function(){return new e(-this.y,this.x)},enumerable:false,configurable:true});e.prototype.equals=function(t){return t instanceof e&&this.x===t.x&&this.y===t.y};e.prototype.add=function(t){return t instanceof e?new e(this.x+t.x,this.y+t.y):null};e.prototype.dot=function(t){return t instanceof e?this.x*t.x+this.y*t.y:null};e.prototype.perpendicularAtTo=function(t){if(!(t instanceof e))return null;var n=t.add(this.projectionOfOnto(t).invert);return new e(n.x,n.y)};e.prototype.projectionOfOnto=function(t){if(!(t instanceof e))return null;var n=t.normal.scale(this.dot(t.normal));return new e(n.x,n.y)};e.prototype.scale=function(t){return new e(this.x*t,this.y*t)};e.prototype.unitNormalDot=function(t){return t instanceof e?this.normal.x*t.normal.x+this.normal.y*t.normal.y:null};e.prototype.reflect=function(t){if(!(t instanceof e))return null;if(t.isZero)return this;var n=t.normal;return this.add(n.scale(2*n.dot(this)).invert)};e.prototype.round=function(t){if(t===void 0){t=0}return new e(p(this.x,t),p(this.y,t))};return e}(m);var x=function(t){__extends(e,t);function e(e,n){return t.call(this,e,n)||this}e.prototype.isAbove=function(t){return this.y<t.y};e.prototype.isBelow=function(t){return this.y>t.y};e.prototype.isLeftOf=function(t){return this.x<t.x};e.prototype.isRightOf=function(t){return this.x>t.x};e.prototype.distanceFrom=function(t){return new _(this.x-t.x,this.y-t.y)};e.prototype.distanceTo=function(t){return this.distanceFrom(t).invert};e.canParse=function(t){return t instanceof e||m.canParse(t)};e.parse=function(t){if(t instanceof e)return t;var n=m.parse(t);return new e(n.x,n.y)};e.tryParse=function(t){return l((function(){return e.parse(t)}),null)};return e}(m);var w=function(){function t(t,e,n,r){if(t===void 0){t=0}if(e===void 0){e=0}if(n===void 0){n=0}if(r===void 0){r=0}this.origin=new x(t,e),this.dimensions=new m(n,r),this.diagonal=x.parse(this.origin.add(this.dimensions)),this.center=this.diagonal.half}t.prototype.contains=function(t){return this.origin.isAbove(t)&&this.origin.isLeftOf(t)&&this.diagonal.isRightOf(t)&&this.diagonal.isBelow(t)};t.prototype.aspectToFit=function(e){var n=this.dimensions,r=e.dimensions,i=r.x,o=r.y;var u=n.x,s=n.y;return u>s&&0!==u?(s*=i/u,u=i,s>o&&(s=o,u*=s/n.y)):s>o&&(u*=o/s,s=o),new t(this.origin.x,this.origin.y,u,s)};return t}();t("M",w);var O=t("j",(function(t,e,n){if(n===void 0){n=!1}var r;return function(){var i=[];for(var o=0;o<arguments.length;o++){i[o]=arguments[o]}var u=n&&!r;clearTimeout(r),r=setTimeout((function(){r=null,n||t.apply(void 0,i)}),e),u&&t.apply(void 0,i)}}));var N=function(){function t(t){this._milliseconds=t}Object.defineProperty(t.prototype,"isRunning",{get:function(){return n.exists(this._intervalId)},enumerable:false,configurable:true});t.prototype.onInterval=function(t){return this.clear(),this._didInterval=t,this};t.prototype.start=function(){var t=this;return this.clear(),this._intervalId=setInterval((function(){t._didInterval()}),this._milliseconds),this};t.prototype.clear=function(){return clearInterval(this._intervalId),this._intervalId=null,this};return t}();t("L",N);var j=function(){function t(t){this._milliseconds=t}Object.defineProperty(t.prototype,"isRunning",{get:function(){return n.exists(this._timeoutId)},enumerable:false,configurable:true});t.prototype.onTimeout=function(t){return this.clear(),this._didTimeout=t,this};t.prototype.start=function(){var t=this;return this.clear(),this._timeoutId=setTimeout((function(){t._didTimeout()}),this._milliseconds),this};t.prototype.clear=function(){return clearTimeout(this._timeoutId),this._timeoutId=null,this};return t}();t("C",j);var P=t("Y",(function(t){return new Promise((function(e){return setTimeout(e,t)}))}));function A(t){var e=isNaN(parseInt(t))||t<0||t>24?24:t,n=Math.random().toString().substring(2),r=Math.random().toString().substring(2);return n.concat(r).substring(0,e)}function F(){return function t(e){return e?(e^16*Math.random()>>e/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}var S=t("R",Object.freeze({__proto__:null,uid:A,uuid:F,suid:function(){return Symbol(A())},suuid:function(){return Symbol(F())}}));Object.freeze({__proto__:null,pattern:function(t){return t.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\")},escape:function(t){return 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})}}}));
@@ -1 +0,0 @@
1
- import{r as i,c as t,h as s,H as h,g as a}from"./p-934f94af.js";import{t as e,R as n,Y as r}from"./p-5a54ccf4.js";const d=class{constructor(s){i(this,s),this.didValidate=t(this,"validate",7),this.pattern=".*",this.flags="",this.method="";const h=this.pattern.split(" "),a=this.flags.split(" "),n=e.isString(this.method)?this.method.trim():this.method;this.regex=h.map(((i,t)=>new RegExp(i,a[t]))),this.validationMethod=e.isNullOrEmpty(n)?()=>!0:e.isString(n)?new Function("value, input, form",/^return/.test(n)?n:`return ${n}`):e.isFunction(n)?n:()=>!0,this.handleInput=this.handleInput.bind(this),this.handleChange=this.handleChange.bind(this),this.handleBlur=this.handleBlur.bind(this),this.handleReset=this.handleReset.bind(this)}async validate(){return await this.assert()}async handleInput(){("file"===this.input.type||e.isFalse(this.isValid))&&await this.assert()}async handleChange(){("file"===this.input.type||e.isFalse(this.isValid))&&await this.assert()}async handleBlur(){await this.assert()}handleReset(){this.isValid=!0,this.invalid=!this.isValid,this.input.setAttribute("aria-invalid",this.invalid)}async assert(){const{ele:i,validOptions:t,input:s,regex:h,checked:a,form:n}=this;if("file"===s.type&&e.isNullOrEmpty(s.value))return;const r=this.isValid;var d,l,o,c;return this.isValid=!!this.disabled||(e.isBool(a)?s.checked===a:(d=h,l=s.value,c=i,((o=t)?o.some((i=>i===l))&&(d||[]).every((i=>i.test(l))):c?c.value===l&&(d||[]).every((i=>i.test(l))):(d||[]).every((i=>i.test(l))))&&await this.validationMethod(s.value,s,n))),this.invalid=!this.isValid,s.setAttribute("aria-invalid",this.invalid),e.isFalse(r)&&this.isValid&&this.didValidate.emit(this.isValid),this.isValid}componentWillLoad(){if(this.input=document.getElementById(this.for),e.exists(this.input)){this.ele=document.getElementById(this.element)||document.querySelector(this.element),this.validOptions=e.exists(this.values)?this.values.split(","):this.ele&&"DATALIST"===this.ele.nodeName&&[].slice.call(this.ele.querySelectorAll("option")).map((i=>i.value));const i=this.input.getAttribute("aria-describedby"),t=this.host.getAttribute("id")||n.uid();this.host.setAttribute("id",t),e.isNullOrEmpty(i)&&this.input.setAttribute("aria-describedby",t),r(0).then((()=>{this.input.addEventListener("input",this.handleInput),this.input.addEventListener("change",this.handleChange),this.input.addEventListener("blur",this.handleBlur)})),e.isFunction(this.host.closest)&&(this.form=this.host.closest("form"),this.form&&this.form.addEventListener&&this.form.addEventListener("reset",this.handleReset))}else console.error("ku4-validation must have a valid `for` referencing target field `id`.")}disconnectedCallback(){this.input&&this.input.removeEventListener&&(this.input.removeEventListener("input",this.handleInput),this.input.removeEventListener("change",this.handleChange),this.input.removeEventListener("blur",this.handleBlur)),this.form&&this.form.removeEventListener&&this.form.removeEventListener("reset",this.handleReset)}render(){return s(h,{role:"alert","aria-live":"assertive"},s("slot",null))}get host(){return a(this)}};d.style=":host{visibility:hidden !important}:host([invalid]){visibility:visible !important}:host([disabled]){visibility:hidden !important}:host([invalid][disabled]){visibility:hidden !important}:host([invalid][hidden]){visibility:hidden !important}";export{d as ku4_validation}
@@ -1 +0,0 @@
1
- import{R as o}from"./p-5a54ccf4.js";const c=()=>{o.uid()};export{c as u}
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,i,n){function r(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,s){function a(t){try{u(n.next(t))}catch(e){s(e)}}function o(t){try{u(n["throw"](t))}catch(e){s(e)}}function u(t){t.done?i(t.value):r(t.value).then(a,o)}u((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,r,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(t){return function(e){return u([t,e])}}function u(a){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,r&&(s=a[0]&2?r["return"]:a[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,a[1])).done)return s;if(r=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;r=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(s=i.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){i.label=a[1];break}if(a[0]===6&&i.label<s[1]){i.label=s[1];s=a;break}if(s&&i.label<s[2]){i.label=s[2];i.ops.push(a);break}if(s[2])i.ops.pop();i.trys.pop();continue}a=e.call(t,i)}catch(o){a=[6,o];r=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-d12104ec.system.js","./p-563d1517.system.js"],(function(t){"use strict";var e,i,n,r,s,a,o,u;return{setters:[function(t){e=t.r;i=t.c;n=t.h;r=t.H;s=t.g},function(t){a=t.t;o=t.R;u=t.Y}],execute:function(){var l=function(t,e,i,n){return i?i.some((function(t){return t===e}))&&(t||[]).every((function(t){return t.test(e)})):n?n.value===e&&(t||[]).every((function(t){return t.test(e)})):(t||[]).every((function(t){return t.test(e)}))};var h=":host{visibility:hidden !important}:host([invalid]){visibility:visible !important}:host([disabled]){visibility:hidden !important}:host([invalid][disabled]){visibility:hidden !important}:host([invalid][hidden]){visibility:hidden !important}";var d=t("ku4_validation",function(){function t(t){e(this,t);this.didValidate=i(this,"validate",7);this.pattern=".*";this.flags="";this.method="";var n=this.pattern.split(" ");var r=this.flags.split(" ");var s=a.isString(this.method)?this.method.trim():this.method;this.regex=n.map((function(t,e){return new RegExp(t,r[e])}));this.validationMethod=a.isNullOrEmpty(s)?function(){return true}:a.isString(s)?new Function("value, input, form",/^return/.test(s)?s:"return ".concat(s)):a.isFunction(s)?s:function(){return true};this.handleInput=this.handleInput.bind(this);this.handleChange=this.handleChange.bind(this);this.handleBlur=this.handleBlur.bind(this);this.handleReset=this.handleReset.bind(this)}t.prototype.validate=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.assert()];case 1:return[2,t.sent()]}}))}))};t.prototype.handleInput=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:t=this.input.type==="file"||a.isFalse(this.isValid);if(!t)return[3,2];return[4,this.assert()];case 1:t=e.sent();e.label=2;case 2:t;return[2]}}))}))};t.prototype.handleChange=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:t=this.input.type==="file"||a.isFalse(this.isValid);if(!t)return[3,2];return[4,this.assert()];case 1:t=e.sent();e.label=2;case 2:t;return[2]}}))}))};t.prototype.handleBlur=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.assert()];case 1:t.sent();return[2]}}))}))};t.prototype.handleReset=function(){this.isValid=true;this.invalid=!this.isValid;this.input.setAttribute("aria-invalid",this.invalid)};t.prototype.assert=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,i,n,r,s,o,u,h,d,c,f;return __generator(this,(function(p){switch(p.label){case 0:t=this,e=t.ele,i=t.validOptions,n=t.input,r=t.regex,s=t.checked,o=t.form;if(n.type==="file"&&a.isNullOrEmpty(n.value)){return[2]}u=this.isValid;h=this;if(!this.disabled)return[3,1];d=true;return[3,6];case 1:if(!a.isBool(s))return[3,2];c=n.checked===s;return[3,5];case 2:f=l(r,n.value,i,e);if(!f)return[3,4];return[4,this.validationMethod(n.value,n,o)];case 3:f=p.sent();p.label=4;case 4:c=f;p.label=5;case 5:d=c;p.label=6;case 6:h.isValid=d;this.invalid=!this.isValid;n.setAttribute("aria-invalid",this.invalid);if(a.isFalse(u)&&this.isValid){this.didValidate.emit(this.isValid)}return[2,this.isValid]}}))}))};t.prototype.componentWillLoad=function(){var t=this;this.input=document.getElementById(this.for);if(a.exists(this.input)){this.ele=document.getElementById(this.element)||document.querySelector(this.element);this.validOptions=a.exists(this.values)?this.values.split(","):this.ele&&this.ele.nodeName==="DATALIST"&&[].slice.call(this.ele.querySelectorAll("option")).map((function(t){return t.value}));var e=this.input.getAttribute("aria-describedby");var i=this.host.getAttribute("id")||o.uid();this.host.setAttribute("id",i);if(a.isNullOrEmpty(e)){this.input.setAttribute("aria-describedby",i)}u(0).then((function(){t.input.addEventListener("input",t.handleInput);t.input.addEventListener("change",t.handleChange);t.input.addEventListener("blur",t.handleBlur)}));if(a.isFunction(this.host.closest)){this.form=this.host.closest("form");if(this.form&&this.form.addEventListener){this.form.addEventListener("reset",this.handleReset)}}}else{console.error("ku4-validation must have a valid `for` referencing target field `id`.")}};t.prototype.disconnectedCallback=function(){if(this.input&&this.input.removeEventListener){this.input.removeEventListener("input",this.handleInput);this.input.removeEventListener("change",this.handleChange);this.input.removeEventListener("blur",this.handleBlur)}if(this.form&&this.form.removeEventListener){this.form.removeEventListener("reset",this.handleReset)}};t.prototype.render=function(){return n(r,{role:"alert","aria-live":"assertive"},n("slot",null))};Object.defineProperty(t.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return t}());d.style=h}}}));
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as i,g as h}from"./p-934f94af.js";import{Y as a,t as e}from"./p-5a54ccf4.js";import{i as n}from"./p-e8b35187.js";const r=class{constructor(i){t(this,i),this.didValidate=s(this,"validate",7),this.validate=this.validate.bind(this),this.handleReset=this.handleReset.bind(this)}async listFieldNames(){return n.readFieldNames(this.form)}async validate(){const{fields:t}=this,s=t.map((t=>t.validate()));return this.isValid=await Promise.all(s).then((t=>!t.some((t=>!1===t)))),this.valid=this.isValid,this.invalid=!this.isValid,await a(100).then((()=>this.host.querySelectorAll("ku4-validation[invalid]"))).then((t=>this.didValidate.emit({invalid:t}))),this.isValid}async invalidate(t){if(e.isArray(t))t.forEach((t=>{const s=this.fields.find((s=>s.for===t));s&&(s.invalid=!0)}));else{const s=this.fields.find((s=>s.for===t));s&&(s.invalid=!0)}return this.isValid=!1,this.valid=this.isValid,this.invalid=!this.isValid,this}async read(){return n.read(this.form)}async write(t){return n.write(this.form,t),Object.keys(t).forEach((t=>{try{this.form.querySelector(`[name="${t}"]`).dispatchEvent(new window.Event("change"))}catch(s){}})),this}async focusFirstInvalid(){a(100).then((()=>{const t=document.querySelector("ku4-valiation[invalid]");e.exists(t)&&t.scrollIntoView({behavior:"smooth",block:"center"})}))}get form(){return this.host.querySelector("form")}get fields(){return[].slice.call(this.form.querySelectorAll("ku4-validation"))}handleReset(){this.isValid=!0,this.valid=this.isValid,this.invalid=!this.isValid}componentWillLoad(){const{form:t}=this;if(e.exists(t)){const s=t.onsubmit||(()=>{});t.onsubmit=i=>(i.preventDefault(),this.validate().then((h=>h&&s.call(t,i))).then((s=>!e.isFalse(s)&&t.submit())),!1),t.addEventListener("reset",this.handleReset),this.fields.forEach((t=>t.addEventListener("validated",this.validate)))}}disconnectedCallback(){const{form:t}=this;e.exists(t)&&(t.removeEventListener("reset",this.handleReset),this.fields.forEach((t=>t.removeEventListener("validated",this.validate))))}render(){return i("slot",null)}get host(){return h(this)}};export{r as ku4_form}
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,i,n){function r(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n["throw"](t))}catch(e){o(e)}}function u(t){t.done?i(t.value):r(t.value).then(a,s)}u((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,r,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return u([t,e])}}function u(a){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,r&&(o=a[0]&2?r["return"]:a[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;if(r=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;r=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(a[0]===6&&i.label<o[1]){i.label=o[1];o=a;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(a);break}if(o[2])i.ops.pop();i.trys.pop();continue}a=e.call(t,i)}catch(s){a=[6,s];r=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-d12104ec.system.js","./p-563d1517.system.js","./p-eb21757a.system.js"],(function(t){"use strict";var e,i,n,r,o,a,s;return{setters:[function(t){e=t.r;i=t.c;n=t.h;r=t.g},function(t){o=t.Y;a=t.t},function(t){s=t.i}],execute:function(){var u=t("ku4_form",function(){function t(t){e(this,t);this.didValidate=i(this,"validate",7);this.validate=this.validate.bind(this);this.handleReset=this.handleReset.bind(this)}t.prototype.listFieldNames=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,s.readFieldNames(this.form)]}))}))};t.prototype.validate=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,i;var n=this;return __generator(this,(function(r){switch(r.label){case 0:t=this.fields;e=t.map((function(t){return t.validate()}));i=this;return[4,Promise.all(e).then((function(t){return!t.some((function(t){return t===false}))}))];case 1:i.isValid=r.sent();this.valid=this.isValid;this.invalid=!this.isValid;return[4,o(100).then((function(){return n.host.querySelectorAll("ku4-validation[invalid]")})).then((function(t){return n.didValidate.emit({invalid:t})}))];case 2:r.sent();return[2,this.isValid]}}))}))};t.prototype.invalidate=function(t){return __awaiter(this,void 0,void 0,(function(){var e;var i=this;return __generator(this,(function(n){if(a.isArray(t)){t.forEach((function(t){var e=i.fields.find((function(e){return e.for===t}));if(e){e.invalid=true}}))}else{e=this.fields.find((function(e){return e.for===t}));if(e){e.invalid=true}}this.isValid=false;this.valid=this.isValid;this.invalid=!this.isValid;return[2,this]}))}))};t.prototype.read=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,s.read(this.form)]}))}))};t.prototype.write=function(t){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(i){s.write(this.form,t);Object.keys(t).forEach((function(t){try{e.form.querySelector('[name="'.concat(t,'"]')).dispatchEvent(new window.Event("change"))}catch(i){}}));return[2,this]}))}))};t.prototype.focusFirstInvalid=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){o(100).then((function(){var t=document.querySelector("ku4-valiation[invalid]");if(a.exists(t)){t.scrollIntoView({behavior:"smooth",block:"center"})}}));return[2]}))}))};Object.defineProperty(t.prototype,"form",{get:function(){return this.host.querySelector("form")},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"fields",{get:function(){return[].slice.call(this.form.querySelectorAll("ku4-validation"))},enumerable:false,configurable:true});t.prototype.handleReset=function(){this.isValid=true;this.valid=this.isValid;this.invalid=!this.isValid};t.prototype.componentWillLoad=function(){var t=this;var e=this.form;if(a.exists(e)){var i=e.onsubmit||function(){};e.onsubmit=function(n){n.preventDefault();t.validate().then((function(t){return t&&i.call(e,n)})).then((function(t){return!a.isFalse(t)&&e.submit()}));return false};e.addEventListener("reset",this.handleReset);this.fields.forEach((function(e){return e.addEventListener("validated",t.validate)}))}};t.prototype.disconnectedCallback=function(){var t=this;var e=this.form;if(a.exists(e)){e.removeEventListener("reset",this.handleReset);this.fields.forEach((function(e){return e.removeEventListener("validated",t.validate)}))}};t.prototype.render=function(){return n("slot",null)};Object.defineProperty(t.prototype,"host",{get:function(){return r(this)},enumerable:false,configurable:true});return t}())}}}));